From f7cc66fad4ea7e7d35e8dd9a6fc7d64c000f6e59 Mon Sep 17 00:00:00 2001
From: p-zielinski <82354717+p-zielinski@users.noreply.github.com>
Date: Fri, 25 Oct 2024 10:24:29 +0200
Subject: [PATCH] v4.0.0 (#51)
---
ENDPOINTS-COVERAGE.md | 131 +-
README.md | 361 +-
__tests__/test_02_redemption.py | 19 +-
__tests__/test_04_publications.py | 2 +-
docs/AccessSettings.md | 14 +
docs/AccessSettingsAssign.md | 14 +
docs/AccessSettingsCampaignAssignmentsList.md | 2 +-
docs/AccessSettingsUnassign.md | 14 +
docs/BinApi.md | 187 +
docs/Campaign.md | 44 +
docs/CampaignBase.md | 1 +
docs/CampaignTemplate.md | 18 +
docs/CampaignsApi.md | 11 +-
docs/CampaignsCreateRequestBody.md | 3 +-
docs/CampaignsCreateResponseBody.md | 1 +
docs/CampaignsGetResponseBody.md | 1 +
docs/CampaignsUpdateRequestBody.md | 5 +-
docs/CampaignsUpdateResponseBody.md | 1 +
...uchersCreateCombinedResponseBodyPublish.md | 2 +-
...ersCreateCombinedResponseBodyRedemption.md | 2 +-
...paignsVouchersCreateResponseBodyPublish.md | 2 +-
...gnsVouchersCreateResponseBodyRedemption.md | 2 +-
docs/CategoriesCreateRequestBody.md | 2 +-
docs/CategoriesCreateResponseBody.md | 2 +-
docs/CategoriesGetResponseBody.md | 3 +-
docs/CategoriesUpdateRequestBody.md | 2 +-
docs/CategoriesUpdateResponseBody.md | 2 +-
docs/Category.md | 3 +-
docs/CategoryWithStackingRulesType.md | 19 +
docs/ClientSideApi.md | 4 +-
docs/ClientValidationsValidateResponseBody.md | 2 +-
...ionsValidateResponseBodyRedeemablesItem.md | 2 +-
docs/CustomersApi.md | 4 +-
docs/ExportsApi.md | 20 +-
docs/FilterConditionsDateTime.md | 18 +
docs/FilterConditionsDateTimeConditions.md | 18 +
docs/Location.md | 18 +
docs/LocationShape.md | 15 +
docs/LocationShapeDistance.md | 14 +
docs/LocationShapeGeojson.md | 13 +
docs/LocationsApi.md | 190 +
docs/LocationsGetResponseBody.md | 18 +
docs/LocationsGetResponseBodyShape.md | 15 +
docs/LocationsGetResponseBodyShapeDistance.md | 14 +
docs/LocationsGetResponseBodyShapeGeojson.md | 13 +
docs/LocationsListResponseBody.md | 17 +
docs/LoyaltiesCreateCampaignRequestBody.md | 2 +-
docs/LoyaltiesCreateCampaignResponseBody.md | 1 +
docs/LoyaltiesGetCampaignResponseBody.md | 1 +
...yaltiesMembersCreateResponseBodyPublish.md | 2 +-
...tiesMembersCreateResponseBodyRedemption.md | 2 +-
.../LoyaltiesMembersGetResponseBodyPublish.md | 2 +-
...yaltiesMembersGetResponseBodyRedemption.md | 2 +-
...tiesMembersRedemptionRedeemResponseBody.md | 2 +-
...bersRedemptionRedeemResponseBodyChannel.md | 4 +-
...bersRedemptionRedeemResponseBodyVoucher.md | 2 +-
...emptionRedeemResponseBodyVoucherPublish.md | 2 +-
...tionRedeemResponseBodyVoucherRedemption.md | 2 +-
...mbersTransfersCreateResponseBodyPublish.md | 2 +-
...rsTransfersCreateResponseBodyRedemption.md | 2 +-
...gnmentsGetResponseBodyParametersLoyalty.md | 1 +
...AssignmentResponseBodyParametersLoyalty.md | 1 +
...RewardsGetResponseBodyParametersLoyalty.md | 1 +
...eAssignmentRequestBodyParametersLoyalty.md | 1 +
...AssignmentResponseBodyParametersLoyalty.md | 1 +
docs/LoyaltiesUpdateCampaignResponseBody.md | 1 +
docs/LoyaltyCampaign.md | 1 +
docs/LoyaltyMemberPublish.md | 2 +-
docs/LoyaltyMemberRedemption.md | 2 +-
docs/ManagementApi.md | 3380 +++++
docs/ManagementProject.md | 34 +
.../ManagementProjectApiUsageNotifications.md | 18 +
docs/ManagementProjectDefaultCodeConfig.md | 13 +
docs/ManagementProjectLimits.md | 14 +
docs/ManagementProjectLimitsApiCallsItem.md | 14 +
...ManagementProjectLimitsBulkApiCallsItem.md | 14 +
...mentProjectWebhooksCalloutNotifications.md | 14 +
...bhooksCalloutNotificationsDistributions.md | 15 +
...ectWebhooksCalloutNotificationsWebhooks.md | 15 +
docs/ManagementProjectsBranding.md | 17 +
docs/ManagementProjectsBrandingAddress.md | 17 +
docs/ManagementProjectsBrandingBrand.md | 17 +
docs/ManagementProjectsBrandingCockpits.md | 20 +
docs/ManagementProjectsBrandingContact.md | 14 +
...gementProjectsBrandingCreateRequestBody.md | 16 +
...rojectsBrandingCreateRequestBodyAddress.md | 17 +
...tProjectsBrandingCreateRequestBodyBrand.md | 17 +
...ojectsBrandingCreateRequestBodyCockpits.md | 20 +
...rojectsBrandingCreateRequestBodyContact.md | 14 +
...ementProjectsBrandingCreateResponseBody.md | 17 +
...ojectsBrandingCreateResponseBodyAddress.md | 17 +
...ProjectsBrandingCreateResponseBodyBrand.md | 17 +
...jectsBrandingCreateResponseBodyCockpits.md | 20 +
...ojectsBrandingCreateResponseBodyContact.md | 14 +
...nagementProjectsBrandingGetResponseBody.md | 17 +
...tProjectsBrandingGetResponseBodyAddress.md | 17 +
...entProjectsBrandingGetResponseBodyBrand.md | 17 +
...ProjectsBrandingGetResponseBodyCockpits.md | 20 +
...tProjectsBrandingGetResponseBodyContact.md | 14 +
...agementProjectsBrandingListResponseBody.md | 16 +
...gementProjectsBrandingUpdateRequestBody.md | 15 +
...rojectsBrandingUpdateRequestBodyAddress.md | 17 +
...tProjectsBrandingUpdateRequestBodyBrand.md | 17 +
...ojectsBrandingUpdateRequestBodyCockpits.md | 20 +
...rojectsBrandingUpdateRequestBodyContact.md | 14 +
...ementProjectsBrandingUpdateResponseBody.md | 17 +
...ojectsBrandingUpdateResponseBodyAddress.md | 17 +
...ProjectsBrandingUpdateResponseBodyBrand.md | 17 +
...jectsBrandingUpdateResponseBodyCockpits.md | 20 +
...ojectsBrandingUpdateResponseBodyContact.md | 14 +
docs/ManagementProjectsCreateRequestBody.md | 31 +
...sCreateRequestBodyApiUsageNotifications.md | 17 +
...ementProjectsCreateRequestBodyUsersItem.md | 15 +
...RequestBodyWebhooksCalloutNotifications.md | 14 +
...bhooksCalloutNotificationsDistributions.md | 15 +
...odyWebhooksCalloutNotificationsWebhooks.md | 15 +
docs/ManagementProjectsCreateResponseBody.md | 35 +
...CreateResponseBodyApiUsageNotifications.md | 18 +
...ProjectsCreateResponseBodyClientSideKey.md | 14 +
...ProjectsCreateResponseBodyServerSideKey.md | 14 +
...esponseBodyWebhooksCalloutNotifications.md | 14 +
...bhooksCalloutNotificationsDistributions.md | 15 +
...odyWebhooksCalloutNotificationsWebhooks.md | 15 +
docs/ManagementProjectsCustomEventSchema.md | 18 +
...nagementProjectsCustomEventSchemaSchema.md | 13 +
...ectsCustomEventSchemasCreateRequestBody.md | 14 +
...stomEventSchemasCreateRequestBodySchema.md | 13 +
...ctsCustomEventSchemasCreateResponseBody.md | 18 +
...tomEventSchemasCreateResponseBodySchema.md | 13 +
...ojectsCustomEventSchemasGetResponseBody.md | 18 +
...CustomEventSchemasGetResponseBodySchema.md | 13 +
...jectsCustomEventSchemasListResponseBody.md | 16 +
...ectsCustomEventSchemasUpdateRequestBody.md | 13 +
...stomEventSchemasUpdateRequestBodySchema.md | 13 +
...ctsCustomEventSchemasUpdateResponseBody.md | 18 +
...tomEventSchemasUpdateResponseBodySchema.md | 13 +
docs/ManagementProjectsGetResponseBody.md | 34 +
...ctsGetResponseBodyApiUsageNotifications.md | 18 +
...rojectsGetResponseBodyDefaultCodeConfig.md | 13 +
...ManagementProjectsGetResponseBodyLimits.md | 14 +
...ojectsGetResponseBodyLimitsApiCallsItem.md | 14 +
...tsGetResponseBodyLimitsBulkApiCallsItem.md | 14 +
...esponseBodyWebhooksCalloutNotifications.md | 14 +
...bhooksCalloutNotificationsDistributions.md | 15 +
...odyWebhooksCalloutNotificationsWebhooks.md | 15 +
docs/ManagementProjectsListResponseBody.md | 16 +
docs/ManagementProjectsMetadataSchema.md | 19 +
...rojectsMetadataSchemasCreateRequestBody.md | 15 +
...ojectsMetadataSchemasCreateResponseBody.md | 19 +
...tProjectsMetadataSchemasGetResponseBody.md | 19 +
...ProjectsMetadataSchemasListResponseBody.md | 16 +
...rojectsMetadataSchemasUpdateRequestBody.md | 14 +
...ojectsMetadataSchemasUpdateResponseBody.md | 19 +
docs/ManagementProjectsStackingRules.md | 27 +
...tProjectsStackingRulesCreateRequestBody.md | 24 +
...ProjectsStackingRulesCreateResponseBody.md | 27 +
...entProjectsStackingRulesGetResponseBody.md | 27 +
...ntProjectsStackingRulesListResponseBody.md | 16 +
...tProjectsStackingRulesUpdateRequestBody.md | 24 +
...ProjectsStackingRulesUpdateResponseBody.md | 27 +
...TemplatesCampaignsCopyCreateRequestBody.md | 15 +
...emplatesCampaignsCopyCreateResponseBody.md | 18 +
...jectsTemplatesCampaignsListResponseBody.md | 18 +
docs/ManagementProjectsUpdateRequestBody.md | 28 +
...sUpdateRequestBodyApiUsageNotifications.md | 17 +
...jectsUpdateRequestBodyDefaultCodeConfig.md | 13 +
...RequestBodyWebhooksCalloutNotifications.md | 14 +
...bhooksCalloutNotificationsDistributions.md | 15 +
...odyWebhooksCalloutNotificationsWebhooks.md | 15 +
docs/ManagementProjectsUpdateResponseBody.md | 34 +
...UpdateResponseBodyApiUsageNotifications.md | 18 +
...ectsUpdateResponseBodyDefaultCodeConfig.md | 13 +
...agementProjectsUpdateResponseBodyLimits.md | 14 +
...ctsUpdateResponseBodyLimitsApiCallsItem.md | 14 +
...pdateResponseBodyLimitsBulkApiCallsItem.md | 14 +
...esponseBodyWebhooksCalloutNotifications.md | 14 +
...bhooksCalloutNotificationsDistributions.md | 15 +
...odyWebhooksCalloutNotificationsWebhooks.md | 15 +
...anagementProjectsUsersAssignRequestBody.md | 14 +
...nagementProjectsUsersAssignResponseBody.md | 19 +
...agementProjectsUsersGetUserResponseBody.md | 19 +
...entProjectsUsersInviteCreateRequestBody.md | 16 +
...ManagementProjectsUsersListResponseBody.md | 16 +
...ementProjectsUsersUpdateRoleRequestBody.md | 12 +
...mentProjectsUsersUpdateRoleResponseBody.md | 19 +
docs/ManagementProjectsWebhook.md | 18 +
...gementProjectsWebhooksCreateRequestBody.md | 15 +
...ementProjectsWebhooksCreateResponseBody.md | 18 +
...nagementProjectsWebhooksGetResponseBody.md | 18 +
...agementProjectsWebhooksListResponseBody.md | 16 +
...gementProjectsWebhooksUpdateRequestBody.md | 15 +
...ementProjectsWebhooksUpdateResponseBody.md | 18 +
docs/MetadataSchema.md | 19 +
docs/MetadataSchemaDeprecated.md | 19 +
docs/MetadataSchemasApi.md | 178 +
docs/MetadataSchemasGetResponseBody.md | 19 +
docs/MetadataSchemasListResponseBody.md | 16 +
docs/Order.md | 2 +-
docs/OrderCalculated.md | 2 +-
docs/OrderItemProduct.md | 2 +-
docs/OrdersCreateRequestBody.md | 2 +-
docs/OrdersCreateResponseBody.md | 2 +-
docs/OrdersGetResponseBody.md | 2 +-
docs/OrdersImportCreateRequestBodyItem.md | 2 +-
docs/OrdersUpdateRequestBody.md | 2 +-
docs/OrdersUpdateResponseBody.md | 2 +-
docs/ParameterCampaignType.md | 2 -
docs/ParameterFiltersListBin.md | 16 +
docs/ParameterFiltersListBinId.md | 13 +
docs/ParameterFiltersListBinResourceId.md | 13 +
docs/ParameterFiltersListBinResourceName.md | 13 +
docs/ParameterFiltersListBinResourceType.md | 13 +
...terFiltersListBinResourceTypeConditions.md | 19 +
docs/ParameterFiltersListCampaigns.md | 18 +
...meterFiltersListCampaignsCampaignStatus.md | 13 +
...rsListCampaignsCampaignStatusConditions.md | 19 +
...ParameterFiltersListCampaignsCategories.md | 13 +
...arameterFiltersListCampaignsCategoryIds.md | 13 +
...meterFiltersListCampaignsIsReferralCode.md | 14 +
...erFiltersListCampaignsValidityTimeframe.md | 13 +
...arameterFiltersListCampaignsVoucherType.md | 13 +
...ParameterFiltersListCustomerRedeemables.md | 1 +
...iltersListCustomerRedeemablesCampaignId.md | 1 -
...tersListCustomerRedeemablesCampaignType.md | 1 -
...FiltersListCustomerRedeemablesCreatedAt.md | 3 +-
...iltersListCustomerRedeemablesHolderRole.md | 1 -
...rameterFiltersListCustomerRedeemablesId.md | 1 -
...tersListCustomerRedeemablesRedeemableId.md | 1 -
...ListCustomerRedeemablesRedeemableObject.md | 1 -
...ltersListCustomerRedeemablesVoucherType.md | 1 -
docs/ParameterFiltersListLocations.md | 14 +
.../ParameterFiltersListLocationsCreatedAt.md | 13 +
docs/ParameterFiltersListLocationsName.md | 12 +
.../ParameterFiltersListLocationsUpdatedAt.md | 13 +
docs/ParameterFiltersListPublications.md | 21 +
...eterFiltersListPublicationsCampaignName.md | 13 +
...ameterFiltersListPublicationsCustomerId.md | 13 +
...meterFiltersListPublicationsFailureCode.md | 13 +
...erFiltersListPublicationsIsReferralCode.md | 13 +
...erFiltersListPublicationsParentObjectId.md | 13 +
...rFiltersListPublicationsRelatedObjectId.md | 13 +
.../ParameterFiltersListPublicationsResult.md | 13 +
...arameterFiltersListPublicationsSourceId.md | 13 +
...meterFiltersListPublicationsVoucherType.md | 13 +
docs/ParameterFiltersListRedemptions.md | 1 +
...meterFiltersListRedemptionsCampaignName.md | 1 -
...rameterFiltersListRedemptionsCustomerId.md | 1 -
...ameterFiltersListRedemptionsFailureCode.md | 1 -
docs/ParameterFiltersListRedemptionsObject.md | 1 -
...iltersListRedemptionsParentRedemptionId.md | 1 -
...erFiltersListRedemptionsRelatedObjectId.md | 1 -
...ersListRedemptionsRelatedObjectParentId.md | 1 -
docs/ParameterFiltersListRedemptionsResult.md | 1 -
...arameterFiltersListRedemptionsUserLogin.md | 1 -
...ameterFiltersListRedemptionsVoucherCode.md | 1 -
...erFiltersListReferralsRedeemableHolders.md | 16 +
...istReferralsRedeemableHoldersCampaignId.md | 13 +
...tReferralsRedeemableHoldersCampaignType.md | 13 +
...ListReferralsRedeemableHoldersCreatedAt.md | 13 +
...istReferralsRedeemableHoldersCustomerId.md | 13 +
...istReferralsRedeemableHoldersHolderRole.md | 13 +
...lsRedeemableHoldersHolderRoleConditions.md | 19 +
...FiltersListReferralsRedeemableHoldersId.md | 13 +
...tReferralsRedeemableHoldersRedeemableId.md | 13 +
...erralsRedeemableHoldersRedeemableObject.md | 13 +
...stReferralsRedeemableHoldersVoucherType.md | 13 +
docs/ParameterFiltersListTemplates.md | 15 +
...rameterFiltersListTemplatesCampaignType.md | 13 +
...tersListTemplatesCampaignTypeConditions.md | 20 +
docs/ParameterFiltersListTemplatesId.md | 13 +
docs/ParameterFiltersListTemplatesName.md | 13 +
docs/ParameterOrderListBin.md | 12 +
docs/ParameterOrderListLocations.md | 16 +
docs/ParameterTemplatesList.md | 12 +
docs/ParameterVoucherTypeListPublications.md | 2 -
docs/ProductCollectionsCreateRequestBody.md | 2 +-
docs/ProductCollectionsCreateResponseBody.md | 2 +-
docs/ProductCollectionsGetResponseBody.md | 2 +-
docs/ProductCollectionsItem.md | 2 +-
docs/ProductsApi.md | 4 +-
.../PromotionsStacksUpdateRequestBodyTiers.md | 2 +-
docs/PromotionsTiersCreateRequestBody.md | 4 +-
docs/PublicationsApi.md | 5 +-
docs/PublicationsCreateRequestBody.md | 2 +-
docs/QualificationsOption.md | 2 +-
docs/QualificationsRedeemable.md | 2 +-
docs/QualificationsRedeemableBase.md | 2 +-
docs/RedeemableHolder.md | 23 +
docs/RedeemableVoucherPublish.md | 2 +-
docs/RedeemableVoucherRedemption.md | 2 +-
docs/Redemption.md | 4 +-
docs/RedemptionChannel.md | 4 +-
docs/RedemptionEntry.md | 2 +-
docs/RedemptionEntryChannel.md | 2 +-
docs/RedemptionEntryOrder.md | 2 +-
docs/RedemptionEntryVoucherPublish.md | 2 +-
docs/RedemptionEntryVoucherRedemption.md | 2 +-
docs/RedemptionRedeem.md | 35 +
docs/RedemptionRedeemChannel.md | 14 +
docs/RedemptionRedeemGift.md | 13 +
docs/RedemptionRedeemLoyaltyCard.md | 13 +
docs/RedemptionRedeemRelatedRedemptions.md | 13 +
...RedeemRelatedRedemptionsRedemptionsItem.md | 13 +
...onRedeemRelatedRedemptionsRollbacksItem.md | 13 +
docs/RedemptionRedeemVoucher.md | 42 +
docs/RedemptionRedeemVoucherGift.md | 15 +
docs/RedemptionRedeemVoucherLoyaltyCard.md | 16 +
docs/RedemptionRedeemVoucherPublish.md | 15 +
docs/RedemptionRedeemVoucherRedemption.md | 17 +
docs/RedemptionVoucher.md | 2 +-
docs/RedemptionVoucherPublish.md | 2 +-
docs/RedemptionVoucherRedemption.md | 2 +-
docs/RedemptionsApi.md | 2 +-
docs/RedemptionsGetResponseBody.md | 2 +-
docs/RedemptionsGetResponseBodyChannel.md | 2 +-
docs/RedemptionsGetResponseBodyOrder.md | 2 +-
...edemptionsGetResponseBodyVoucherPublish.md | 2 +-
...mptionsGetResponseBodyVoucherRedemption.md | 2 +-
...emptionsListResponseBodyRedemptionsItem.md | 2 +-
...sListResponseBodyRedemptionsItemChannel.md | 2 +-
...onsListResponseBodyRedemptionsItemOrder.md | 2 +-
...sponseBodyRedemptionsItemVoucherPublish.md | 2 +-
...nseBodyRedemptionsItemVoucherRedemption.md | 2 +-
.../RedemptionsRollbacksCreateResponseBody.md | 2 +-
docs/ReferralsApi.md | 560 +
...lsMembersHoldersCreateInBulkRequestBody.md | 14 +
...sMembersHoldersCreateInBulkResponseBody.md | 13 +
...ReferralsMembersHoldersListResponseBody.md | 18 +
docs/RewardAssignmentParametersLoyalty.md | 1 +
...mentsCreateRequestBodyParametersLoyalty.md | 1 +
docs/RewardsAssignmentsCreateResponseBody.md | 2 +-
...entsCreateResponseBodyParametersLoyalty.md | 1 +
...gnmentsGetResponseBodyParametersLoyalty.md | 1 +
...mentsUpdateRequestBodyParametersLoyalty.md | 1 +
docs/RewardsAssignmentsUpdateResponseBody.md | 2 +-
...entsUpdateResponseBodyParametersLoyalty.md | 1 +
docs/StackingRules.md | 2 +-
docs/TemplatesApi.md | 634 +
...CampaignsCampaignSetupCreateRequestBody.md | 29 +
...nsCampaignSetupCreateRequestBodyVoucher.md | 14 +
...SetupCreateRequestBodyVoucherRedemption.md | 13 +
...ampaignsCampaignSetupCreateResponseBody.md | 15 +
...pCreateResponseBodyCreatedResourcesItem.md | 13 +
docs/TemplatesCampaignsCreateRequestBody.md | 16 +
...atesCampaignsCreateTemplateResponseBody.md | 18 +
docs/TemplatesCampaignsGetResponseBody.md | 19 +
docs/TemplatesCampaignsListResponseBody.md | 18 +
...atesCampaignsTierSetupCreateRequestBody.md | 25 +
...tesCampaignsTierSetupCreateResponseBody.md | 15 +
...pCreateResponseBodyCreatedResourcesItem.md | 13 +
docs/TemplatesCampaignsUpdateRequestBody.md | 14 +
docs/TemplatesCampaignsUpdateResponseBody.md | 19 +
docs/TrashBinItem.md | 20 +
docs/TrashBinListResponseBody.md | 18 +
docs/UsageNotifications.md | 15 +
docs/User.md | 19 +
docs/ValidationRule.md | 2 +-
docs/ValidationRulesCreateRequestBody.md | 2 +-
docs/ValidationRulesCreateResponseBody.md | 2 +-
docs/ValidationRulesGetResponseBody.md | 2 +-
docs/ValidationRulesUpdateRequestBody.md | 2 +-
docs/ValidationRulesUpdateResponseBody.md | 2 +-
docs/ValidationsApi.md | 2 +-
docs/ValidationsRedeemableInapplicable.md | 2 +-
docs/ValidationsRedeemableSkipped.md | 2 +-
docs/ValidationsValidateResponseBody.md | 2 +-
...ionsValidateResponseBodyRedeemablesItem.md | 2 +-
docs/VoucherPublish.md | 2 +-
docs/VoucherRedemption.md | 2 +-
docs/VoucherWithCategoriesPublish.md | 2 +-
docs/VoucherWithCategoriesRedemption.md | 2 +-
docs/VouchersCreateResponseBodyPublish.md | 2 +-
docs/VouchersCreateResponseBodyRedemption.md | 2 +-
docs/VouchersDisableResponseBodyPublish.md | 2 +-
docs/VouchersDisableResponseBodyRedemption.md | 2 +-
docs/VouchersEnableResponseBodyPublish.md | 2 +-
docs/VouchersEnableResponseBodyRedemption.md | 2 +-
docs/VouchersGetResponseBodyPublish.md | 2 +-
docs/VouchersGetResponseBodyRedemption.md | 2 +-
docs/VouchersUpdateResponseBodyPublish.md | 2 +-
docs/VouchersUpdateResponseBodyRedemption.md | 2 +-
pyproject.toml | 2 +-
setup.py | 2 +-
voucherify/__init__.py | 218 +-
voucherify/api/__init__.py | 6 +
voucherify/api/bin_api.py | 608 +
voucherify/api/campaigns_api.py | 18 +
voucherify/api/customers_api.py | 12 +-
voucherify/api/exports_api.py | 2 +
voucherify/api/locations_api.py | 626 +
voucherify/api/management_api.py | 10684 ++++++++++++++++
voucherify/api/metadata_schemas_api.py | 545 +
voucherify/api/products_api.py | 12 +-
voucherify/api/publications_api.py | 19 +-
voucherify/api/referrals_api.py | 1857 +++
voucherify/api/templates_api.py | 2031 +++
voucherify/api_client.py | 48 +-
voucherify/configuration.py | 20 +-
voucherify/models/__init__.py | 210 +-
voucherify/models/access_settings.py | 108 +
voucherify/models/access_settings_assign.py | 100 +
...cess_settings_campaign_assignments_list.py | 2 +-
voucherify/models/access_settings_unassign.py | 100 +
voucherify/models/campaign.py | 364 +
voucherify/models/campaign_base.py | 13 +-
voucherify/models/campaign_template.py | 156 +
.../models/campaigns_create_request_body.py | 28 +-
.../models/campaigns_create_response_body.py | 13 +-
.../models/campaigns_get_response_body.py | 13 +-
.../models/campaigns_update_request_body.py | 39 +-
.../models/campaigns_update_response_body.py | 13 +-
...s_create_combined_response_body_publish.py | 2 +-
...reate_combined_response_body_redemption.py | 2 +-
...s_vouchers_create_response_body_publish.py | 2 +-
...ouchers_create_response_body_redemption.py | 2 +-
.../models/categories_create_request_body.py | 5 +-
.../models/categories_create_response_body.py | 5 +-
.../models/categories_get_response_body.py | 26 +-
.../models/categories_update_request_body.py | 5 +-
.../models/categories_update_response_body.py | 5 +-
voucherify/models/category.py | 26 +-
.../category_with_stacking_rules_type.py | 157 +
...ient_validations_validate_response_body.py | 2 +-
...validate_response_body_redeemables_item.py | 6 +-
voucherify/models/customer_redeemable.py | 8 +-
.../models/filter_conditions_date_time.py | 129 +
.../filter_conditions_date_time_conditions.py | 129 +
voucherify/models/location.py | 143 +
voucherify/models/location_shape.py | 142 +
voucherify/models/location_shape_distance.py | 100 +
voucherify/models/location_shape_geojson.py | 110 +
.../models/locations_get_response_body.py | 143 +
.../locations_get_response_body_shape.py | 142 +
...ations_get_response_body_shape_distance.py | 100 +
...cations_get_response_body_shape_geojson.py | 110 +
.../models/locations_list_response_body.py | 129 +
.../loyalties_create_campaign_request_body.py | 16 +-
...loyalties_create_campaign_response_body.py | 9 +-
.../loyalties_get_campaign_response_body.py | 9 +-
...es_members_create_response_body_publish.py | 2 +-
...members_create_response_body_redemption.py | 2 +-
...lties_members_get_response_body_publish.py | 2 +-
...es_members_get_response_body_redemption.py | 2 +-
...members_redemption_redeem_response_body.py | 24 +-
...redemption_redeem_response_body_channel.py | 8 +-
...redemption_redeem_response_body_voucher.py | 12 +-
...on_redeem_response_body_voucher_publish.py | 2 +-
...redeem_response_body_voucher_redemption.py | 2 +-
..._transfers_create_response_body_publish.py | 2 +-
...ansfers_create_response_body_redemption.py | 2 +-
...ts_get_response_body_parameters_loyalty.py | 13 +-
...gnment_response_body_parameters_loyalty.py | 13 +-
...ds_get_response_body_parameters_loyalty.py | 13 +-
...ignment_request_body_parameters_loyalty.py | 13 +-
...gnment_response_body_parameters_loyalty.py | 13 +-
...loyalties_update_campaign_response_body.py | 9 +-
voucherify/models/loyalty_campaign.py | 9 +-
voucherify/models/loyalty_member_publish.py | 2 +-
.../models/loyalty_member_redemption.py | 2 +-
voucherify/models/management_project.py | 283 +
...agement_project_api_usage_notifications.py | 117 +
.../management_project_default_code_config.py | 93 +
.../models/management_project_limits.py | 116 +
...anagement_project_limits_api_calls_item.py | 90 +
...ment_project_limits_bulk_api_calls_item.py | 90 +
..._project_webhooks_callout_notifications.py | 108 +
...oks_callout_notifications_distributions.py | 107 +
...webhooks_callout_notifications_webhooks.py | 107 +
.../models/management_projects_branding.py | 137 +
.../management_projects_branding_address.py | 121 +
.../management_projects_branding_brand.py | 121 +
.../management_projects_branding_cockpits.py | 152 +
.../management_projects_branding_contact.py | 100 +
...t_projects_branding_create_request_body.py | 130 +
...ts_branding_create_request_body_address.py | 121 +
...ects_branding_create_request_body_brand.py | 121 +
...s_branding_create_request_body_cockpits.py | 152 +
...ts_branding_create_request_body_contact.py | 100 +
..._projects_branding_create_response_body.py | 137 +
...s_branding_create_response_body_address.py | 121 +
...cts_branding_create_response_body_brand.py | 121 +
..._branding_create_response_body_cockpits.py | 152 +
...s_branding_create_response_body_contact.py | 100 +
...ent_projects_branding_get_response_body.py | 137 +
...ects_branding_get_response_body_address.py | 121 +
...ojects_branding_get_response_body_brand.py | 121 +
...cts_branding_get_response_body_cockpits.py | 152 +
...ects_branding_get_response_body_contact.py | 100 +
...nt_projects_branding_list_response_body.py | 142 +
...t_projects_branding_update_request_body.py | 130 +
...ts_branding_update_request_body_address.py | 121 +
...ects_branding_update_request_body_brand.py | 121 +
...s_branding_update_request_body_cockpits.py | 152 +
...ts_branding_update_request_body_contact.py | 100 +
..._projects_branding_update_response_body.py | 137 +
...s_branding_update_response_body_address.py | 121 +
...cts_branding_update_response_body_brand.py | 121 +
..._branding_update_response_body_cockpits.py | 152 +
...s_branding_update_response_body_contact.py | 100 +
...management_projects_create_request_body.py | 255 +
...te_request_body_api_usage_notifications.py | 112 +
...projects_create_request_body_users_item.py | 92 +
...est_body_webhooks_callout_notifications.py | 108 +
...oks_callout_notifications_distributions.py | 107 +
...webhooks_callout_notifications_webhooks.py | 107 +
...anagement_projects_create_response_body.py | 283 +
...e_response_body_api_usage_notifications.py | 117 +
...ts_create_response_body_client_side_key.py | 100 +
...ts_create_response_body_server_side_key.py | 100 +
...nse_body_webhooks_callout_notifications.py | 108 +
...oks_callout_notifications_distributions.py | 107 +
...webhooks_callout_notifications_webhooks.py | 107 +
...management_projects_custom_event_schema.py | 143 +
...ent_projects_custom_event_schema_schema.py | 93 +
...ustom_event_schemas_create_request_body.py | 104 +
...vent_schemas_create_request_body_schema.py | 93 +
...stom_event_schemas_create_response_body.py | 143 +
...ent_schemas_create_response_body_schema.py | 93 +
..._custom_event_schemas_get_response_body.py | 143 +
..._event_schemas_get_response_body_schema.py | 93 +
...custom_event_schemas_list_response_body.py | 142 +
...ustom_event_schemas_update_request_body.py | 97 +
...vent_schemas_update_request_body_schema.py | 93 +
...stom_event_schemas_update_response_body.py | 143 +
...ent_schemas_update_response_body_schema.py | 93 +
.../management_projects_get_response_body.py | 283 +
...t_response_body_api_usage_notifications.py | 117 +
...s_get_response_body_default_code_config.py | 93 +
...ement_projects_get_response_body_limits.py | 116 +
...get_response_body_limits_api_calls_item.py | 90 +
...esponse_body_limits_bulk_api_calls_item.py | 90 +
...nse_body_webhooks_callout_notifications.py | 108 +
...oks_callout_notifications_distributions.py | 107 +
...webhooks_callout_notifications_webhooks.py | 107 +
.../management_projects_list_response_body.py | 142 +
.../management_projects_metadata_schema.py | 136 +
...ts_metadata_schemas_create_request_body.py | 107 +
...s_metadata_schemas_create_response_body.py | 136 +
...ects_metadata_schemas_get_response_body.py | 136 +
...cts_metadata_schemas_list_response_body.py | 142 +
...ts_metadata_schemas_update_request_body.py | 100 +
...s_metadata_schemas_update_response_body.py | 136 +
.../management_projects_stacking_rules.py | 223 +
...ects_stacking_rules_create_request_body.py | 201 +
...cts_stacking_rules_create_response_body.py | 223 +
...ojects_stacking_rules_get_response_body.py | 223 +
...jects_stacking_rules_list_response_body.py | 142 +
...ects_stacking_rules_update_request_body.py | 201 +
...cts_stacking_rules_update_response_body.py | 223 +
...ates_campaigns_copy_create_request_body.py | 107 +
...tes_campaigns_copy_create_response_body.py | 149 +
..._templates_campaigns_list_response_body.py | 156 +
...management_projects_update_request_body.py | 220 +
...te_request_body_api_usage_notifications.py | 112 +
...update_request_body_default_code_config.py | 93 +
...est_body_webhooks_callout_notifications.py | 108 +
...oks_callout_notifications_distributions.py | 107 +
...webhooks_callout_notifications_webhooks.py | 107 +
...anagement_projects_update_response_body.py | 283 +
...e_response_body_api_usage_notifications.py | 117 +
...pdate_response_body_default_code_config.py | 93 +
...nt_projects_update_response_body_limits.py | 116 +
...ate_response_body_limits_api_calls_item.py | 90 +
...esponse_body_limits_bulk_api_calls_item.py | 90 +
...nse_body_webhooks_callout_notifications.py | 108 +
...oks_callout_notifications_distributions.py | 107 +
...webhooks_callout_notifications_webhooks.py | 107 +
...ment_projects_users_assign_request_body.py | 107 +
...ent_projects_users_assign_response_body.py | 135 +
...t_projects_users_get_user_response_body.py | 135 +
...ojects_users_invite_create_request_body.py | 114 +
...ement_projects_users_list_response_body.py | 142 +
...projects_users_update_role_request_body.py | 93 +
...rojects_users_update_role_response_body.py | 135 +
.../models/management_projects_webhook.py | 150 +
...t_projects_webhooks_create_request_body.py | 118 +
..._projects_webhooks_create_response_body.py | 150 +
...ent_projects_webhooks_get_response_body.py | 150 +
...nt_projects_webhooks_list_response_body.py | 142 +
...t_projects_webhooks_update_request_body.py | 118 +
..._projects_webhooks_update_response_body.py | 150 +
voucherify/models/metadata_schema.py | 136 +
.../models/metadata_schema_deprecated.py | 136 +
.../metadata_schemas_get_response_body.py | 136 +
.../metadata_schemas_list_response_body.py | 142 +
voucherify/models/order.py | 2 +-
voucherify/models/order_calculated.py | 2 +-
voucherify/models/order_item_product.py | 2 +-
.../models/orders_create_request_body.py | 2 +-
.../models/orders_create_response_body.py | 2 +-
voucherify/models/orders_get_response_body.py | 2 +-
.../orders_import_create_request_body_item.py | 2 +-
.../models/orders_update_request_body.py | 2 +-
.../models/orders_update_response_body.py | 2 +-
voucherify/models/parameter_campaign_type.py | 1 -
.../models/parameter_filters_list_bin.py | 133 +
.../models/parameter_filters_list_bin_id.py | 92 +
.../parameter_filters_list_bin_resource_id.py | 92 +
...arameter_filters_list_bin_resource_name.py | 92 +
...arameter_filters_list_bin_resource_type.py | 92 +
...lters_list_bin_resource_type_conditions.py | 184 +
.../parameter_filters_list_campaigns.py | 155 +
..._filters_list_campaigns_campaign_status.py | 92 +
...st_campaigns_campaign_status_conditions.py | 184 +
...meter_filters_list_campaigns_categories.py | 92 +
...ter_filters_list_campaigns_category_ids.py | 92 +
...filters_list_campaigns_is_referral_code.py | 120 +
...lters_list_campaigns_validity_timeframe.py | 92 +
...ter_filters_list_campaigns_voucher_type.py | 92 +
...meter_filters_list_customer_redeemables.py | 7 +-
...s_list_customer_redeemables_campaign_id.py | 7 +-
...list_customer_redeemables_campaign_type.py | 7 +-
...rs_list_customer_redeemables_created_at.py | 16 +-
...s_list_customer_redeemables_holder_role.py | 7 +-
...er_filters_list_customer_redeemables_id.py | 7 +-
...list_customer_redeemables_redeemable_id.py | 7 +-
..._customer_redeemables_redeemable_object.py | 7 +-
..._list_customer_redeemables_voucher_type.py | 7 +-
.../parameter_filters_list_locations.py | 119 +
...meter_filters_list_locations_created_at.py | 92 +
.../parameter_filters_list_locations_name.py | 92 +
...meter_filters_list_locations_updated_at.py | 92 +
.../parameter_filters_list_publications.py | 188 +
...filters_list_publications_campaign_name.py | 92 +
...r_filters_list_publications_customer_id.py | 92 +
..._filters_list_publications_failure_code.py | 92 +
...ters_list_publications_is_referral_code.py | 92 +
...ters_list_publications_parent_object_id.py | 92 +
...ers_list_publications_related_object_id.py | 92 +
...ameter_filters_list_publications_result.py | 92 +
...ter_filters_list_publications_source_id.py | 92 +
..._filters_list_publications_voucher_type.py | 92 +
.../parameter_filters_list_redemptions.py | 7 +-
..._filters_list_redemptions_campaign_name.py | 7 +-
...er_filters_list_redemptions_customer_id.py | 7 +-
...r_filters_list_redemptions_failure_code.py | 7 +-
...rameter_filters_list_redemptions_object.py | 7 +-
...s_list_redemptions_parent_redemption_id.py | 7 +-
...ters_list_redemptions_related_object_id.py | 7 +-
...st_redemptions_related_object_parent_id.py | 7 +-
...rameter_filters_list_redemptions_result.py | 7 +-
...ter_filters_list_redemptions_user_login.py | 7 +-
...r_filters_list_redemptions_voucher_code.py | 7 +-
...lters_list_referrals_redeemable_holders.py | 133 +
...eferrals_redeemable_holders_campaign_id.py | 92 +
...errals_redeemable_holders_campaign_type.py | 92 +
...referrals_redeemable_holders_created_at.py | 92 +
...eferrals_redeemable_holders_customer_id.py | 92 +
...eferrals_redeemable_holders_holder_role.py | 92 +
...deemable_holders_holder_role_conditions.py | 184 +
...rs_list_referrals_redeemable_holders_id.py | 92 +
...errals_redeemable_holders_redeemable_id.py | 92 +
...ls_redeemable_holders_redeemable_object.py | 92 +
...ferrals_redeemable_holders_voucher_type.py | 92 +
.../parameter_filters_list_templates.py | 122 +
...er_filters_list_templates_campaign_type.py | 97 +
...list_templates_campaign_type_conditions.py | 184 +
.../parameter_filters_list_templates_id.py | 92 +
.../parameter_filters_list_templates_name.py | 92 +
voucherify/models/parameter_order_list_bin.py | 38 +
.../models/parameter_order_list_locations.py | 40 +
voucherify/models/parameter_templates_list.py | 38 +
...arameter_voucher_type_list_publications.py | 1 -
...product_collections_create_request_body.py | 8 +-
...roduct_collections_create_response_body.py | 8 +-
.../product_collections_get_response_body.py | 8 +-
voucherify/models/product_collections_item.py | 8 +-
...otions_stacks_update_request_body_tiers.py | 2 +-
.../promotions_tiers_create_request_body.py | 28 +-
.../publications_create_request_body.py | 11 +-
voucherify/models/qualifications_option.py | 2 +-
.../models/qualifications_redeemable.py | 6 +-
.../models/qualifications_redeemable_base.py | 6 +-
voucherify/models/redeemable_holder.py | 204 +
.../models/redeemable_voucher_publish.py | 2 +-
.../models/redeemable_voucher_redemption.py | 2 +-
voucherify/models/redemption.py | 26 +-
voucherify/models/redemption_channel.py | 8 +-
voucherify/models/redemption_entry.py | 22 +-
voucherify/models/redemption_entry_channel.py | 8 +-
voucherify/models/redemption_entry_order.py | 2 +-
.../redemption_entry_voucher_publish.py | 2 +-
.../redemption_entry_voucher_redemption.py | 2 +-
voucherify/models/redemption_redeem.py | 304 +
.../models/redemption_redeem_channel.py | 110 +
voucherify/models/redemption_redeem_gift.py | 93 +
.../models/redemption_redeem_loyalty_card.py | 93 +
.../redemption_redeem_related_redemptions.py | 116 +
...em_related_redemptions_redemptions_item.py | 91 +
...deem_related_redemptions_rollbacks_item.py | 91 +
.../models/redemption_redeem_voucher.py | 331 +
.../models/redemption_redeem_voucher_gift.py | 117 +
.../redemption_redeem_voucher_loyalty_card.py | 115 +
.../redemption_redeem_voucher_publish.py | 107 +
.../redemption_redeem_voucher_redemption.py | 121 +
voucherify/models/redemption_voucher.py | 6 +-
.../models/redemption_voucher_publish.py | 2 +-
.../models/redemption_voucher_redemption.py | 2 +-
.../models/redemptions_get_response_body.py | 22 +-
.../redemptions_get_response_body_channel.py | 8 +-
.../redemptions_get_response_body_order.py | 2 +-
...tions_get_response_body_voucher_publish.py | 2 +-
...ns_get_response_body_voucher_redemption.py | 2 +-
...ons_list_response_body_redemptions_item.py | 12 +-
..._response_body_redemptions_item_channel.py | 13 +-
...st_response_body_redemptions_item_order.py | 2 +-
...e_body_redemptions_item_voucher_publish.py | 2 +-
...ody_redemptions_item_voucher_redemption.py | 2 +-
...emptions_rollbacks_create_response_body.py | 2 +-
.../models/referral_program_referee_reward.py | 4 +-
...ers_holders_create_in_bulk_request_body.py | 108 +
...rs_holders_create_in_bulk_response_body.py | 101 +
...rals_members_holders_list_response_body.py | 136 +
.../reward_assignment_parameters_loyalty.py | 13 +-
..._create_request_body_parameters_loyalty.py | 13 +-
...ewards_assignments_create_response_body.py | 2 +-
...create_response_body_parameters_loyalty.py | 13 +-
...ts_get_response_body_parameters_loyalty.py | 13 +-
..._update_request_body_parameters_loyalty.py | 13 +-
...ewards_assignments_update_response_body.py | 2 +-
...update_response_body_parameters_loyalty.py | 13 +-
voucherify/models/stacking_rules.py | 2 +-
...igns_campaign_setup_create_request_body.py | 224 +
...paign_setup_create_request_body_voucher.py | 103 +
..._create_request_body_voucher_redemption.py | 93 +
...gns_campaign_setup_create_response_body.py | 124 +
...te_response_body_created_resources_item.py | 100 +
...templates_campaigns_create_request_body.py | 114 +
...campaigns_create_template_response_body.py | 149 +
.../templates_campaigns_get_response_body.py | 156 +
.../templates_campaigns_list_response_body.py | 156 +
...ampaigns_tier_setup_create_request_body.py | 182 +
...mpaigns_tier_setup_create_response_body.py | 124 +
...te_response_body_created_resources_item.py | 100 +
...templates_campaigns_update_request_body.py | 100 +
...emplates_campaigns_update_response_body.py | 156 +
voucherify/models/trash_bin_item.py | 163 +
.../models/trash_bin_list_response_body.py | 156 +
voucherify/models/usage_notifications.py | 115 +
voucherify/models/user.py | 135 +
voucherify/models/validation_rule.py | 6 +-
.../validation_rules_create_request_body.py | 6 +-
.../validation_rules_create_response_body.py | 6 +-
.../validation_rules_get_response_body.py | 6 +-
.../validation_rules_update_request_body.py | 6 +-
.../validation_rules_update_response_body.py | 6 +-
.../validations_redeemable_inapplicable.py | 6 +-
.../models/validations_redeemable_skipped.py | 6 +-
.../validations_validate_response_body.py | 2 +-
...validate_response_body_redeemables_item.py | 6 +-
voucherify/models/voucher_publish.py | 2 +-
voucherify/models/voucher_redemption.py | 2 +-
.../models/voucher_with_categories_publish.py | 2 +-
.../voucher_with_categories_redemption.py | 2 +-
.../vouchers_create_response_body_publish.py | 2 +-
...ouchers_create_response_body_redemption.py | 2 +-
.../vouchers_disable_response_body_publish.py | 2 +-
...uchers_disable_response_body_redemption.py | 2 +-
.../vouchers_enable_response_body_publish.py | 2 +-
...ouchers_enable_response_body_redemption.py | 2 +-
.../vouchers_get_response_body_publish.py | 2 +-
.../vouchers_get_response_body_redemption.py | 2 +-
.../vouchers_update_response_body_publish.py | 2 +-
...ouchers_update_response_body_redemption.py | 2 +-
764 files changed, 55131 insertions(+), 796 deletions(-)
create mode 100644 docs/AccessSettings.md
create mode 100644 docs/AccessSettingsAssign.md
create mode 100644 docs/AccessSettingsUnassign.md
create mode 100644 docs/BinApi.md
create mode 100644 docs/Campaign.md
create mode 100644 docs/CampaignTemplate.md
create mode 100644 docs/CategoryWithStackingRulesType.md
create mode 100644 docs/FilterConditionsDateTime.md
create mode 100644 docs/FilterConditionsDateTimeConditions.md
create mode 100644 docs/Location.md
create mode 100644 docs/LocationShape.md
create mode 100644 docs/LocationShapeDistance.md
create mode 100644 docs/LocationShapeGeojson.md
create mode 100644 docs/LocationsApi.md
create mode 100644 docs/LocationsGetResponseBody.md
create mode 100644 docs/LocationsGetResponseBodyShape.md
create mode 100644 docs/LocationsGetResponseBodyShapeDistance.md
create mode 100644 docs/LocationsGetResponseBodyShapeGeojson.md
create mode 100644 docs/LocationsListResponseBody.md
create mode 100644 docs/ManagementApi.md
create mode 100644 docs/ManagementProject.md
create mode 100644 docs/ManagementProjectApiUsageNotifications.md
create mode 100644 docs/ManagementProjectDefaultCodeConfig.md
create mode 100644 docs/ManagementProjectLimits.md
create mode 100644 docs/ManagementProjectLimitsApiCallsItem.md
create mode 100644 docs/ManagementProjectLimitsBulkApiCallsItem.md
create mode 100644 docs/ManagementProjectWebhooksCalloutNotifications.md
create mode 100644 docs/ManagementProjectWebhooksCalloutNotificationsDistributions.md
create mode 100644 docs/ManagementProjectWebhooksCalloutNotificationsWebhooks.md
create mode 100644 docs/ManagementProjectsBranding.md
create mode 100644 docs/ManagementProjectsBrandingAddress.md
create mode 100644 docs/ManagementProjectsBrandingBrand.md
create mode 100644 docs/ManagementProjectsBrandingCockpits.md
create mode 100644 docs/ManagementProjectsBrandingContact.md
create mode 100644 docs/ManagementProjectsBrandingCreateRequestBody.md
create mode 100644 docs/ManagementProjectsBrandingCreateRequestBodyAddress.md
create mode 100644 docs/ManagementProjectsBrandingCreateRequestBodyBrand.md
create mode 100644 docs/ManagementProjectsBrandingCreateRequestBodyCockpits.md
create mode 100644 docs/ManagementProjectsBrandingCreateRequestBodyContact.md
create mode 100644 docs/ManagementProjectsBrandingCreateResponseBody.md
create mode 100644 docs/ManagementProjectsBrandingCreateResponseBodyAddress.md
create mode 100644 docs/ManagementProjectsBrandingCreateResponseBodyBrand.md
create mode 100644 docs/ManagementProjectsBrandingCreateResponseBodyCockpits.md
create mode 100644 docs/ManagementProjectsBrandingCreateResponseBodyContact.md
create mode 100644 docs/ManagementProjectsBrandingGetResponseBody.md
create mode 100644 docs/ManagementProjectsBrandingGetResponseBodyAddress.md
create mode 100644 docs/ManagementProjectsBrandingGetResponseBodyBrand.md
create mode 100644 docs/ManagementProjectsBrandingGetResponseBodyCockpits.md
create mode 100644 docs/ManagementProjectsBrandingGetResponseBodyContact.md
create mode 100644 docs/ManagementProjectsBrandingListResponseBody.md
create mode 100644 docs/ManagementProjectsBrandingUpdateRequestBody.md
create mode 100644 docs/ManagementProjectsBrandingUpdateRequestBodyAddress.md
create mode 100644 docs/ManagementProjectsBrandingUpdateRequestBodyBrand.md
create mode 100644 docs/ManagementProjectsBrandingUpdateRequestBodyCockpits.md
create mode 100644 docs/ManagementProjectsBrandingUpdateRequestBodyContact.md
create mode 100644 docs/ManagementProjectsBrandingUpdateResponseBody.md
create mode 100644 docs/ManagementProjectsBrandingUpdateResponseBodyAddress.md
create mode 100644 docs/ManagementProjectsBrandingUpdateResponseBodyBrand.md
create mode 100644 docs/ManagementProjectsBrandingUpdateResponseBodyCockpits.md
create mode 100644 docs/ManagementProjectsBrandingUpdateResponseBodyContact.md
create mode 100644 docs/ManagementProjectsCreateRequestBody.md
create mode 100644 docs/ManagementProjectsCreateRequestBodyApiUsageNotifications.md
create mode 100644 docs/ManagementProjectsCreateRequestBodyUsersItem.md
create mode 100644 docs/ManagementProjectsCreateRequestBodyWebhooksCalloutNotifications.md
create mode 100644 docs/ManagementProjectsCreateRequestBodyWebhooksCalloutNotificationsDistributions.md
create mode 100644 docs/ManagementProjectsCreateRequestBodyWebhooksCalloutNotificationsWebhooks.md
create mode 100644 docs/ManagementProjectsCreateResponseBody.md
create mode 100644 docs/ManagementProjectsCreateResponseBodyApiUsageNotifications.md
create mode 100644 docs/ManagementProjectsCreateResponseBodyClientSideKey.md
create mode 100644 docs/ManagementProjectsCreateResponseBodyServerSideKey.md
create mode 100644 docs/ManagementProjectsCreateResponseBodyWebhooksCalloutNotifications.md
create mode 100644 docs/ManagementProjectsCreateResponseBodyWebhooksCalloutNotificationsDistributions.md
create mode 100644 docs/ManagementProjectsCreateResponseBodyWebhooksCalloutNotificationsWebhooks.md
create mode 100644 docs/ManagementProjectsCustomEventSchema.md
create mode 100644 docs/ManagementProjectsCustomEventSchemaSchema.md
create mode 100644 docs/ManagementProjectsCustomEventSchemasCreateRequestBody.md
create mode 100644 docs/ManagementProjectsCustomEventSchemasCreateRequestBodySchema.md
create mode 100644 docs/ManagementProjectsCustomEventSchemasCreateResponseBody.md
create mode 100644 docs/ManagementProjectsCustomEventSchemasCreateResponseBodySchema.md
create mode 100644 docs/ManagementProjectsCustomEventSchemasGetResponseBody.md
create mode 100644 docs/ManagementProjectsCustomEventSchemasGetResponseBodySchema.md
create mode 100644 docs/ManagementProjectsCustomEventSchemasListResponseBody.md
create mode 100644 docs/ManagementProjectsCustomEventSchemasUpdateRequestBody.md
create mode 100644 docs/ManagementProjectsCustomEventSchemasUpdateRequestBodySchema.md
create mode 100644 docs/ManagementProjectsCustomEventSchemasUpdateResponseBody.md
create mode 100644 docs/ManagementProjectsCustomEventSchemasUpdateResponseBodySchema.md
create mode 100644 docs/ManagementProjectsGetResponseBody.md
create mode 100644 docs/ManagementProjectsGetResponseBodyApiUsageNotifications.md
create mode 100644 docs/ManagementProjectsGetResponseBodyDefaultCodeConfig.md
create mode 100644 docs/ManagementProjectsGetResponseBodyLimits.md
create mode 100644 docs/ManagementProjectsGetResponseBodyLimitsApiCallsItem.md
create mode 100644 docs/ManagementProjectsGetResponseBodyLimitsBulkApiCallsItem.md
create mode 100644 docs/ManagementProjectsGetResponseBodyWebhooksCalloutNotifications.md
create mode 100644 docs/ManagementProjectsGetResponseBodyWebhooksCalloutNotificationsDistributions.md
create mode 100644 docs/ManagementProjectsGetResponseBodyWebhooksCalloutNotificationsWebhooks.md
create mode 100644 docs/ManagementProjectsListResponseBody.md
create mode 100644 docs/ManagementProjectsMetadataSchema.md
create mode 100644 docs/ManagementProjectsMetadataSchemasCreateRequestBody.md
create mode 100644 docs/ManagementProjectsMetadataSchemasCreateResponseBody.md
create mode 100644 docs/ManagementProjectsMetadataSchemasGetResponseBody.md
create mode 100644 docs/ManagementProjectsMetadataSchemasListResponseBody.md
create mode 100644 docs/ManagementProjectsMetadataSchemasUpdateRequestBody.md
create mode 100644 docs/ManagementProjectsMetadataSchemasUpdateResponseBody.md
create mode 100644 docs/ManagementProjectsStackingRules.md
create mode 100644 docs/ManagementProjectsStackingRulesCreateRequestBody.md
create mode 100644 docs/ManagementProjectsStackingRulesCreateResponseBody.md
create mode 100644 docs/ManagementProjectsStackingRulesGetResponseBody.md
create mode 100644 docs/ManagementProjectsStackingRulesListResponseBody.md
create mode 100644 docs/ManagementProjectsStackingRulesUpdateRequestBody.md
create mode 100644 docs/ManagementProjectsStackingRulesUpdateResponseBody.md
create mode 100644 docs/ManagementProjectsTemplatesCampaignsCopyCreateRequestBody.md
create mode 100644 docs/ManagementProjectsTemplatesCampaignsCopyCreateResponseBody.md
create mode 100644 docs/ManagementProjectsTemplatesCampaignsListResponseBody.md
create mode 100644 docs/ManagementProjectsUpdateRequestBody.md
create mode 100644 docs/ManagementProjectsUpdateRequestBodyApiUsageNotifications.md
create mode 100644 docs/ManagementProjectsUpdateRequestBodyDefaultCodeConfig.md
create mode 100644 docs/ManagementProjectsUpdateRequestBodyWebhooksCalloutNotifications.md
create mode 100644 docs/ManagementProjectsUpdateRequestBodyWebhooksCalloutNotificationsDistributions.md
create mode 100644 docs/ManagementProjectsUpdateRequestBodyWebhooksCalloutNotificationsWebhooks.md
create mode 100644 docs/ManagementProjectsUpdateResponseBody.md
create mode 100644 docs/ManagementProjectsUpdateResponseBodyApiUsageNotifications.md
create mode 100644 docs/ManagementProjectsUpdateResponseBodyDefaultCodeConfig.md
create mode 100644 docs/ManagementProjectsUpdateResponseBodyLimits.md
create mode 100644 docs/ManagementProjectsUpdateResponseBodyLimitsApiCallsItem.md
create mode 100644 docs/ManagementProjectsUpdateResponseBodyLimitsBulkApiCallsItem.md
create mode 100644 docs/ManagementProjectsUpdateResponseBodyWebhooksCalloutNotifications.md
create mode 100644 docs/ManagementProjectsUpdateResponseBodyWebhooksCalloutNotificationsDistributions.md
create mode 100644 docs/ManagementProjectsUpdateResponseBodyWebhooksCalloutNotificationsWebhooks.md
create mode 100644 docs/ManagementProjectsUsersAssignRequestBody.md
create mode 100644 docs/ManagementProjectsUsersAssignResponseBody.md
create mode 100644 docs/ManagementProjectsUsersGetUserResponseBody.md
create mode 100644 docs/ManagementProjectsUsersInviteCreateRequestBody.md
create mode 100644 docs/ManagementProjectsUsersListResponseBody.md
create mode 100644 docs/ManagementProjectsUsersUpdateRoleRequestBody.md
create mode 100644 docs/ManagementProjectsUsersUpdateRoleResponseBody.md
create mode 100644 docs/ManagementProjectsWebhook.md
create mode 100644 docs/ManagementProjectsWebhooksCreateRequestBody.md
create mode 100644 docs/ManagementProjectsWebhooksCreateResponseBody.md
create mode 100644 docs/ManagementProjectsWebhooksGetResponseBody.md
create mode 100644 docs/ManagementProjectsWebhooksListResponseBody.md
create mode 100644 docs/ManagementProjectsWebhooksUpdateRequestBody.md
create mode 100644 docs/ManagementProjectsWebhooksUpdateResponseBody.md
create mode 100644 docs/MetadataSchema.md
create mode 100644 docs/MetadataSchemaDeprecated.md
create mode 100644 docs/MetadataSchemasApi.md
create mode 100644 docs/MetadataSchemasGetResponseBody.md
create mode 100644 docs/MetadataSchemasListResponseBody.md
create mode 100644 docs/ParameterFiltersListBin.md
create mode 100644 docs/ParameterFiltersListBinId.md
create mode 100644 docs/ParameterFiltersListBinResourceId.md
create mode 100644 docs/ParameterFiltersListBinResourceName.md
create mode 100644 docs/ParameterFiltersListBinResourceType.md
create mode 100644 docs/ParameterFiltersListBinResourceTypeConditions.md
create mode 100644 docs/ParameterFiltersListCampaigns.md
create mode 100644 docs/ParameterFiltersListCampaignsCampaignStatus.md
create mode 100644 docs/ParameterFiltersListCampaignsCampaignStatusConditions.md
create mode 100644 docs/ParameterFiltersListCampaignsCategories.md
create mode 100644 docs/ParameterFiltersListCampaignsCategoryIds.md
create mode 100644 docs/ParameterFiltersListCampaignsIsReferralCode.md
create mode 100644 docs/ParameterFiltersListCampaignsValidityTimeframe.md
create mode 100644 docs/ParameterFiltersListCampaignsVoucherType.md
create mode 100644 docs/ParameterFiltersListLocations.md
create mode 100644 docs/ParameterFiltersListLocationsCreatedAt.md
create mode 100644 docs/ParameterFiltersListLocationsName.md
create mode 100644 docs/ParameterFiltersListLocationsUpdatedAt.md
create mode 100644 docs/ParameterFiltersListPublications.md
create mode 100644 docs/ParameterFiltersListPublicationsCampaignName.md
create mode 100644 docs/ParameterFiltersListPublicationsCustomerId.md
create mode 100644 docs/ParameterFiltersListPublicationsFailureCode.md
create mode 100644 docs/ParameterFiltersListPublicationsIsReferralCode.md
create mode 100644 docs/ParameterFiltersListPublicationsParentObjectId.md
create mode 100644 docs/ParameterFiltersListPublicationsRelatedObjectId.md
create mode 100644 docs/ParameterFiltersListPublicationsResult.md
create mode 100644 docs/ParameterFiltersListPublicationsSourceId.md
create mode 100644 docs/ParameterFiltersListPublicationsVoucherType.md
create mode 100644 docs/ParameterFiltersListReferralsRedeemableHolders.md
create mode 100644 docs/ParameterFiltersListReferralsRedeemableHoldersCampaignId.md
create mode 100644 docs/ParameterFiltersListReferralsRedeemableHoldersCampaignType.md
create mode 100644 docs/ParameterFiltersListReferralsRedeemableHoldersCreatedAt.md
create mode 100644 docs/ParameterFiltersListReferralsRedeemableHoldersCustomerId.md
create mode 100644 docs/ParameterFiltersListReferralsRedeemableHoldersHolderRole.md
create mode 100644 docs/ParameterFiltersListReferralsRedeemableHoldersHolderRoleConditions.md
create mode 100644 docs/ParameterFiltersListReferralsRedeemableHoldersId.md
create mode 100644 docs/ParameterFiltersListReferralsRedeemableHoldersRedeemableId.md
create mode 100644 docs/ParameterFiltersListReferralsRedeemableHoldersRedeemableObject.md
create mode 100644 docs/ParameterFiltersListReferralsRedeemableHoldersVoucherType.md
create mode 100644 docs/ParameterFiltersListTemplates.md
create mode 100644 docs/ParameterFiltersListTemplatesCampaignType.md
create mode 100644 docs/ParameterFiltersListTemplatesCampaignTypeConditions.md
create mode 100644 docs/ParameterFiltersListTemplatesId.md
create mode 100644 docs/ParameterFiltersListTemplatesName.md
create mode 100644 docs/ParameterOrderListBin.md
create mode 100644 docs/ParameterOrderListLocations.md
create mode 100644 docs/ParameterTemplatesList.md
create mode 100644 docs/RedeemableHolder.md
create mode 100644 docs/RedemptionRedeem.md
create mode 100644 docs/RedemptionRedeemChannel.md
create mode 100644 docs/RedemptionRedeemGift.md
create mode 100644 docs/RedemptionRedeemLoyaltyCard.md
create mode 100644 docs/RedemptionRedeemRelatedRedemptions.md
create mode 100644 docs/RedemptionRedeemRelatedRedemptionsRedemptionsItem.md
create mode 100644 docs/RedemptionRedeemRelatedRedemptionsRollbacksItem.md
create mode 100644 docs/RedemptionRedeemVoucher.md
create mode 100644 docs/RedemptionRedeemVoucherGift.md
create mode 100644 docs/RedemptionRedeemVoucherLoyaltyCard.md
create mode 100644 docs/RedemptionRedeemVoucherPublish.md
create mode 100644 docs/RedemptionRedeemVoucherRedemption.md
create mode 100644 docs/ReferralsApi.md
create mode 100644 docs/ReferralsMembersHoldersCreateInBulkRequestBody.md
create mode 100644 docs/ReferralsMembersHoldersCreateInBulkResponseBody.md
create mode 100644 docs/ReferralsMembersHoldersListResponseBody.md
create mode 100644 docs/TemplatesApi.md
create mode 100644 docs/TemplatesCampaignsCampaignSetupCreateRequestBody.md
create mode 100644 docs/TemplatesCampaignsCampaignSetupCreateRequestBodyVoucher.md
create mode 100644 docs/TemplatesCampaignsCampaignSetupCreateRequestBodyVoucherRedemption.md
create mode 100644 docs/TemplatesCampaignsCampaignSetupCreateResponseBody.md
create mode 100644 docs/TemplatesCampaignsCampaignSetupCreateResponseBodyCreatedResourcesItem.md
create mode 100644 docs/TemplatesCampaignsCreateRequestBody.md
create mode 100644 docs/TemplatesCampaignsCreateTemplateResponseBody.md
create mode 100644 docs/TemplatesCampaignsGetResponseBody.md
create mode 100644 docs/TemplatesCampaignsListResponseBody.md
create mode 100644 docs/TemplatesCampaignsTierSetupCreateRequestBody.md
create mode 100644 docs/TemplatesCampaignsTierSetupCreateResponseBody.md
create mode 100644 docs/TemplatesCampaignsTierSetupCreateResponseBodyCreatedResourcesItem.md
create mode 100644 docs/TemplatesCampaignsUpdateRequestBody.md
create mode 100644 docs/TemplatesCampaignsUpdateResponseBody.md
create mode 100644 docs/TrashBinItem.md
create mode 100644 docs/TrashBinListResponseBody.md
create mode 100644 docs/UsageNotifications.md
create mode 100644 docs/User.md
create mode 100644 voucherify/api/bin_api.py
create mode 100644 voucherify/api/locations_api.py
create mode 100644 voucherify/api/management_api.py
create mode 100644 voucherify/api/metadata_schemas_api.py
create mode 100644 voucherify/api/referrals_api.py
create mode 100644 voucherify/api/templates_api.py
create mode 100644 voucherify/models/access_settings.py
create mode 100644 voucherify/models/access_settings_assign.py
create mode 100644 voucherify/models/access_settings_unassign.py
create mode 100644 voucherify/models/campaign.py
create mode 100644 voucherify/models/campaign_template.py
create mode 100644 voucherify/models/category_with_stacking_rules_type.py
create mode 100644 voucherify/models/filter_conditions_date_time.py
create mode 100644 voucherify/models/filter_conditions_date_time_conditions.py
create mode 100644 voucherify/models/location.py
create mode 100644 voucherify/models/location_shape.py
create mode 100644 voucherify/models/location_shape_distance.py
create mode 100644 voucherify/models/location_shape_geojson.py
create mode 100644 voucherify/models/locations_get_response_body.py
create mode 100644 voucherify/models/locations_get_response_body_shape.py
create mode 100644 voucherify/models/locations_get_response_body_shape_distance.py
create mode 100644 voucherify/models/locations_get_response_body_shape_geojson.py
create mode 100644 voucherify/models/locations_list_response_body.py
create mode 100644 voucherify/models/management_project.py
create mode 100644 voucherify/models/management_project_api_usage_notifications.py
create mode 100644 voucherify/models/management_project_default_code_config.py
create mode 100644 voucherify/models/management_project_limits.py
create mode 100644 voucherify/models/management_project_limits_api_calls_item.py
create mode 100644 voucherify/models/management_project_limits_bulk_api_calls_item.py
create mode 100644 voucherify/models/management_project_webhooks_callout_notifications.py
create mode 100644 voucherify/models/management_project_webhooks_callout_notifications_distributions.py
create mode 100644 voucherify/models/management_project_webhooks_callout_notifications_webhooks.py
create mode 100644 voucherify/models/management_projects_branding.py
create mode 100644 voucherify/models/management_projects_branding_address.py
create mode 100644 voucherify/models/management_projects_branding_brand.py
create mode 100644 voucherify/models/management_projects_branding_cockpits.py
create mode 100644 voucherify/models/management_projects_branding_contact.py
create mode 100644 voucherify/models/management_projects_branding_create_request_body.py
create mode 100644 voucherify/models/management_projects_branding_create_request_body_address.py
create mode 100644 voucherify/models/management_projects_branding_create_request_body_brand.py
create mode 100644 voucherify/models/management_projects_branding_create_request_body_cockpits.py
create mode 100644 voucherify/models/management_projects_branding_create_request_body_contact.py
create mode 100644 voucherify/models/management_projects_branding_create_response_body.py
create mode 100644 voucherify/models/management_projects_branding_create_response_body_address.py
create mode 100644 voucherify/models/management_projects_branding_create_response_body_brand.py
create mode 100644 voucherify/models/management_projects_branding_create_response_body_cockpits.py
create mode 100644 voucherify/models/management_projects_branding_create_response_body_contact.py
create mode 100644 voucherify/models/management_projects_branding_get_response_body.py
create mode 100644 voucherify/models/management_projects_branding_get_response_body_address.py
create mode 100644 voucherify/models/management_projects_branding_get_response_body_brand.py
create mode 100644 voucherify/models/management_projects_branding_get_response_body_cockpits.py
create mode 100644 voucherify/models/management_projects_branding_get_response_body_contact.py
create mode 100644 voucherify/models/management_projects_branding_list_response_body.py
create mode 100644 voucherify/models/management_projects_branding_update_request_body.py
create mode 100644 voucherify/models/management_projects_branding_update_request_body_address.py
create mode 100644 voucherify/models/management_projects_branding_update_request_body_brand.py
create mode 100644 voucherify/models/management_projects_branding_update_request_body_cockpits.py
create mode 100644 voucherify/models/management_projects_branding_update_request_body_contact.py
create mode 100644 voucherify/models/management_projects_branding_update_response_body.py
create mode 100644 voucherify/models/management_projects_branding_update_response_body_address.py
create mode 100644 voucherify/models/management_projects_branding_update_response_body_brand.py
create mode 100644 voucherify/models/management_projects_branding_update_response_body_cockpits.py
create mode 100644 voucherify/models/management_projects_branding_update_response_body_contact.py
create mode 100644 voucherify/models/management_projects_create_request_body.py
create mode 100644 voucherify/models/management_projects_create_request_body_api_usage_notifications.py
create mode 100644 voucherify/models/management_projects_create_request_body_users_item.py
create mode 100644 voucherify/models/management_projects_create_request_body_webhooks_callout_notifications.py
create mode 100644 voucherify/models/management_projects_create_request_body_webhooks_callout_notifications_distributions.py
create mode 100644 voucherify/models/management_projects_create_request_body_webhooks_callout_notifications_webhooks.py
create mode 100644 voucherify/models/management_projects_create_response_body.py
create mode 100644 voucherify/models/management_projects_create_response_body_api_usage_notifications.py
create mode 100644 voucherify/models/management_projects_create_response_body_client_side_key.py
create mode 100644 voucherify/models/management_projects_create_response_body_server_side_key.py
create mode 100644 voucherify/models/management_projects_create_response_body_webhooks_callout_notifications.py
create mode 100644 voucherify/models/management_projects_create_response_body_webhooks_callout_notifications_distributions.py
create mode 100644 voucherify/models/management_projects_create_response_body_webhooks_callout_notifications_webhooks.py
create mode 100644 voucherify/models/management_projects_custom_event_schema.py
create mode 100644 voucherify/models/management_projects_custom_event_schema_schema.py
create mode 100644 voucherify/models/management_projects_custom_event_schemas_create_request_body.py
create mode 100644 voucherify/models/management_projects_custom_event_schemas_create_request_body_schema.py
create mode 100644 voucherify/models/management_projects_custom_event_schemas_create_response_body.py
create mode 100644 voucherify/models/management_projects_custom_event_schemas_create_response_body_schema.py
create mode 100644 voucherify/models/management_projects_custom_event_schemas_get_response_body.py
create mode 100644 voucherify/models/management_projects_custom_event_schemas_get_response_body_schema.py
create mode 100644 voucherify/models/management_projects_custom_event_schemas_list_response_body.py
create mode 100644 voucherify/models/management_projects_custom_event_schemas_update_request_body.py
create mode 100644 voucherify/models/management_projects_custom_event_schemas_update_request_body_schema.py
create mode 100644 voucherify/models/management_projects_custom_event_schemas_update_response_body.py
create mode 100644 voucherify/models/management_projects_custom_event_schemas_update_response_body_schema.py
create mode 100644 voucherify/models/management_projects_get_response_body.py
create mode 100644 voucherify/models/management_projects_get_response_body_api_usage_notifications.py
create mode 100644 voucherify/models/management_projects_get_response_body_default_code_config.py
create mode 100644 voucherify/models/management_projects_get_response_body_limits.py
create mode 100644 voucherify/models/management_projects_get_response_body_limits_api_calls_item.py
create mode 100644 voucherify/models/management_projects_get_response_body_limits_bulk_api_calls_item.py
create mode 100644 voucherify/models/management_projects_get_response_body_webhooks_callout_notifications.py
create mode 100644 voucherify/models/management_projects_get_response_body_webhooks_callout_notifications_distributions.py
create mode 100644 voucherify/models/management_projects_get_response_body_webhooks_callout_notifications_webhooks.py
create mode 100644 voucherify/models/management_projects_list_response_body.py
create mode 100644 voucherify/models/management_projects_metadata_schema.py
create mode 100644 voucherify/models/management_projects_metadata_schemas_create_request_body.py
create mode 100644 voucherify/models/management_projects_metadata_schemas_create_response_body.py
create mode 100644 voucherify/models/management_projects_metadata_schemas_get_response_body.py
create mode 100644 voucherify/models/management_projects_metadata_schemas_list_response_body.py
create mode 100644 voucherify/models/management_projects_metadata_schemas_update_request_body.py
create mode 100644 voucherify/models/management_projects_metadata_schemas_update_response_body.py
create mode 100644 voucherify/models/management_projects_stacking_rules.py
create mode 100644 voucherify/models/management_projects_stacking_rules_create_request_body.py
create mode 100644 voucherify/models/management_projects_stacking_rules_create_response_body.py
create mode 100644 voucherify/models/management_projects_stacking_rules_get_response_body.py
create mode 100644 voucherify/models/management_projects_stacking_rules_list_response_body.py
create mode 100644 voucherify/models/management_projects_stacking_rules_update_request_body.py
create mode 100644 voucherify/models/management_projects_stacking_rules_update_response_body.py
create mode 100644 voucherify/models/management_projects_templates_campaigns_copy_create_request_body.py
create mode 100644 voucherify/models/management_projects_templates_campaigns_copy_create_response_body.py
create mode 100644 voucherify/models/management_projects_templates_campaigns_list_response_body.py
create mode 100644 voucherify/models/management_projects_update_request_body.py
create mode 100644 voucherify/models/management_projects_update_request_body_api_usage_notifications.py
create mode 100644 voucherify/models/management_projects_update_request_body_default_code_config.py
create mode 100644 voucherify/models/management_projects_update_request_body_webhooks_callout_notifications.py
create mode 100644 voucherify/models/management_projects_update_request_body_webhooks_callout_notifications_distributions.py
create mode 100644 voucherify/models/management_projects_update_request_body_webhooks_callout_notifications_webhooks.py
create mode 100644 voucherify/models/management_projects_update_response_body.py
create mode 100644 voucherify/models/management_projects_update_response_body_api_usage_notifications.py
create mode 100644 voucherify/models/management_projects_update_response_body_default_code_config.py
create mode 100644 voucherify/models/management_projects_update_response_body_limits.py
create mode 100644 voucherify/models/management_projects_update_response_body_limits_api_calls_item.py
create mode 100644 voucherify/models/management_projects_update_response_body_limits_bulk_api_calls_item.py
create mode 100644 voucherify/models/management_projects_update_response_body_webhooks_callout_notifications.py
create mode 100644 voucherify/models/management_projects_update_response_body_webhooks_callout_notifications_distributions.py
create mode 100644 voucherify/models/management_projects_update_response_body_webhooks_callout_notifications_webhooks.py
create mode 100644 voucherify/models/management_projects_users_assign_request_body.py
create mode 100644 voucherify/models/management_projects_users_assign_response_body.py
create mode 100644 voucherify/models/management_projects_users_get_user_response_body.py
create mode 100644 voucherify/models/management_projects_users_invite_create_request_body.py
create mode 100644 voucherify/models/management_projects_users_list_response_body.py
create mode 100644 voucherify/models/management_projects_users_update_role_request_body.py
create mode 100644 voucherify/models/management_projects_users_update_role_response_body.py
create mode 100644 voucherify/models/management_projects_webhook.py
create mode 100644 voucherify/models/management_projects_webhooks_create_request_body.py
create mode 100644 voucherify/models/management_projects_webhooks_create_response_body.py
create mode 100644 voucherify/models/management_projects_webhooks_get_response_body.py
create mode 100644 voucherify/models/management_projects_webhooks_list_response_body.py
create mode 100644 voucherify/models/management_projects_webhooks_update_request_body.py
create mode 100644 voucherify/models/management_projects_webhooks_update_response_body.py
create mode 100644 voucherify/models/metadata_schema.py
create mode 100644 voucherify/models/metadata_schema_deprecated.py
create mode 100644 voucherify/models/metadata_schemas_get_response_body.py
create mode 100644 voucherify/models/metadata_schemas_list_response_body.py
create mode 100644 voucherify/models/parameter_filters_list_bin.py
create mode 100644 voucherify/models/parameter_filters_list_bin_id.py
create mode 100644 voucherify/models/parameter_filters_list_bin_resource_id.py
create mode 100644 voucherify/models/parameter_filters_list_bin_resource_name.py
create mode 100644 voucherify/models/parameter_filters_list_bin_resource_type.py
create mode 100644 voucherify/models/parameter_filters_list_bin_resource_type_conditions.py
create mode 100644 voucherify/models/parameter_filters_list_campaigns.py
create mode 100644 voucherify/models/parameter_filters_list_campaigns_campaign_status.py
create mode 100644 voucherify/models/parameter_filters_list_campaigns_campaign_status_conditions.py
create mode 100644 voucherify/models/parameter_filters_list_campaigns_categories.py
create mode 100644 voucherify/models/parameter_filters_list_campaigns_category_ids.py
create mode 100644 voucherify/models/parameter_filters_list_campaigns_is_referral_code.py
create mode 100644 voucherify/models/parameter_filters_list_campaigns_validity_timeframe.py
create mode 100644 voucherify/models/parameter_filters_list_campaigns_voucher_type.py
create mode 100644 voucherify/models/parameter_filters_list_locations.py
create mode 100644 voucherify/models/parameter_filters_list_locations_created_at.py
create mode 100644 voucherify/models/parameter_filters_list_locations_name.py
create mode 100644 voucherify/models/parameter_filters_list_locations_updated_at.py
create mode 100644 voucherify/models/parameter_filters_list_publications.py
create mode 100644 voucherify/models/parameter_filters_list_publications_campaign_name.py
create mode 100644 voucherify/models/parameter_filters_list_publications_customer_id.py
create mode 100644 voucherify/models/parameter_filters_list_publications_failure_code.py
create mode 100644 voucherify/models/parameter_filters_list_publications_is_referral_code.py
create mode 100644 voucherify/models/parameter_filters_list_publications_parent_object_id.py
create mode 100644 voucherify/models/parameter_filters_list_publications_related_object_id.py
create mode 100644 voucherify/models/parameter_filters_list_publications_result.py
create mode 100644 voucherify/models/parameter_filters_list_publications_source_id.py
create mode 100644 voucherify/models/parameter_filters_list_publications_voucher_type.py
create mode 100644 voucherify/models/parameter_filters_list_referrals_redeemable_holders.py
create mode 100644 voucherify/models/parameter_filters_list_referrals_redeemable_holders_campaign_id.py
create mode 100644 voucherify/models/parameter_filters_list_referrals_redeemable_holders_campaign_type.py
create mode 100644 voucherify/models/parameter_filters_list_referrals_redeemable_holders_created_at.py
create mode 100644 voucherify/models/parameter_filters_list_referrals_redeemable_holders_customer_id.py
create mode 100644 voucherify/models/parameter_filters_list_referrals_redeemable_holders_holder_role.py
create mode 100644 voucherify/models/parameter_filters_list_referrals_redeemable_holders_holder_role_conditions.py
create mode 100644 voucherify/models/parameter_filters_list_referrals_redeemable_holders_id.py
create mode 100644 voucherify/models/parameter_filters_list_referrals_redeemable_holders_redeemable_id.py
create mode 100644 voucherify/models/parameter_filters_list_referrals_redeemable_holders_redeemable_object.py
create mode 100644 voucherify/models/parameter_filters_list_referrals_redeemable_holders_voucher_type.py
create mode 100644 voucherify/models/parameter_filters_list_templates.py
create mode 100644 voucherify/models/parameter_filters_list_templates_campaign_type.py
create mode 100644 voucherify/models/parameter_filters_list_templates_campaign_type_conditions.py
create mode 100644 voucherify/models/parameter_filters_list_templates_id.py
create mode 100644 voucherify/models/parameter_filters_list_templates_name.py
create mode 100644 voucherify/models/parameter_order_list_bin.py
create mode 100644 voucherify/models/parameter_order_list_locations.py
create mode 100644 voucherify/models/parameter_templates_list.py
create mode 100644 voucherify/models/redeemable_holder.py
create mode 100644 voucherify/models/redemption_redeem.py
create mode 100644 voucherify/models/redemption_redeem_channel.py
create mode 100644 voucherify/models/redemption_redeem_gift.py
create mode 100644 voucherify/models/redemption_redeem_loyalty_card.py
create mode 100644 voucherify/models/redemption_redeem_related_redemptions.py
create mode 100644 voucherify/models/redemption_redeem_related_redemptions_redemptions_item.py
create mode 100644 voucherify/models/redemption_redeem_related_redemptions_rollbacks_item.py
create mode 100644 voucherify/models/redemption_redeem_voucher.py
create mode 100644 voucherify/models/redemption_redeem_voucher_gift.py
create mode 100644 voucherify/models/redemption_redeem_voucher_loyalty_card.py
create mode 100644 voucherify/models/redemption_redeem_voucher_publish.py
create mode 100644 voucherify/models/redemption_redeem_voucher_redemption.py
create mode 100644 voucherify/models/referrals_members_holders_create_in_bulk_request_body.py
create mode 100644 voucherify/models/referrals_members_holders_create_in_bulk_response_body.py
create mode 100644 voucherify/models/referrals_members_holders_list_response_body.py
create mode 100644 voucherify/models/templates_campaigns_campaign_setup_create_request_body.py
create mode 100644 voucherify/models/templates_campaigns_campaign_setup_create_request_body_voucher.py
create mode 100644 voucherify/models/templates_campaigns_campaign_setup_create_request_body_voucher_redemption.py
create mode 100644 voucherify/models/templates_campaigns_campaign_setup_create_response_body.py
create mode 100644 voucherify/models/templates_campaigns_campaign_setup_create_response_body_created_resources_item.py
create mode 100644 voucherify/models/templates_campaigns_create_request_body.py
create mode 100644 voucherify/models/templates_campaigns_create_template_response_body.py
create mode 100644 voucherify/models/templates_campaigns_get_response_body.py
create mode 100644 voucherify/models/templates_campaigns_list_response_body.py
create mode 100644 voucherify/models/templates_campaigns_tier_setup_create_request_body.py
create mode 100644 voucherify/models/templates_campaigns_tier_setup_create_response_body.py
create mode 100644 voucherify/models/templates_campaigns_tier_setup_create_response_body_created_resources_item.py
create mode 100644 voucherify/models/templates_campaigns_update_request_body.py
create mode 100644 voucherify/models/templates_campaigns_update_response_body.py
create mode 100644 voucherify/models/trash_bin_item.py
create mode 100644 voucherify/models/trash_bin_list_response_body.py
create mode 100644 voucherify/models/usage_notifications.py
create mode 100644 voucherify/models/user.py
diff --git a/ENDPOINTS-COVERAGE.md b/ENDPOINTS-COVERAGE.md
index 7354b32b..db6317d6 100644
--- a/ENDPOINTS-COVERAGE.md
+++ b/ENDPOINTS-COVERAGE.md
@@ -264,73 +264,80 @@
| /v1/categories/{categoryId} | delete | Delete Category | supported | |
| /v1/categories/{categoryId} | put | Update Category | supported | |
## Metadata Schemas
-| endpoint | method | summary | is supported | is deprecated |
-| ------------------------------- | ------ | --------------------- | ------------ | ------------- |
-| /v1/metadata-schemas | get | List Metadata Schemas | | |
-| /v1/metadata-schemas/{resource} | get | Get Metadata Schema | | |
+| endpoint | method | summary | is supported | is deprecated |
+| ------------------------------- | ------ | --------------------- | ------------------------------------ | ------------- |
+| /v1/metadata-schemas | get | List Metadata Schemas | supported | |
+| /v1/metadata-schemas/{resource} | get | Get Metadata Schema | supported | |
## Locations
-| endpoint | method | summary | is supported | is deprecated |
-| -------------------------- | ------ | -------------- | ------------ | ------------- |
-| /v1/locations | get | List Locations | | |
-| /v1/locations/{locationId} | get | Get Location | | |
+| endpoint | method | summary | is supported | is deprecated |
+| -------------------------- | ------ | -------------- | ------------------------------------ | ------------- |
+| /v1/locations | get | List Locations | supported | |
+| /v1/locations/{locationId} | get | Get Location | supported | |
## Referrals
-| endpoint | method | summary | is supported | is deprecated |
-| ---------------------------------------------------------------- | ------ | --------------------------- | ------------ | ------------- |
-| /v1/referrals/{campaignId}/members/{memberId}/holders | post | Add Referral Code Holders | | |
-| /v1/referrals/{campaignId}/members/{memberId}/holders | get | List Referral Code Holders | | |
-| /v1/referrals/{campaignId}/members/{memberId}/holders/{holderId} | delete | Remove Referral Card Holder | | |
-| /v1/referrals/members/{memberId}/holders | post | Add Referral Code Holders | | |
-| /v1/referrals/members/{memberId}/holders | get | List Referral Code Holders | | |
-| /v1/referrals/members/{memberId}/holders/{holderId} | delete | Remove Referral Card Holder | | |
+| endpoint | method | summary | is supported | is deprecated |
+| ---------------------------------------------------------------- | ------ | --------------------------- | ------------------------------------ | ------------- |
+| /v1/referrals/{campaignId}/members/{memberId}/holders | post | Add Referral Code Holders | supported | |
+| /v1/referrals/{campaignId}/members/{memberId}/holders | get | List Referral Code Holders | supported | |
+| /v1/referrals/{campaignId}/members/{memberId}/holders/{holderId} | delete | Remove Referral Card Holder | supported | |
+| /v1/referrals/members/{memberId}/holders | post | Add Referral Code Holders | supported | |
+| /v1/referrals/members/{memberId}/holders | get | List Referral Code Holders | supported | |
+| /v1/referrals/members/{memberId}/holders/{holderId} | delete | Remove Referral Card Holder | supported | |
## Bin
-| endpoint | method | summary | is supported | is deprecated |
-| -------------------------- | ------ | ---------------- | ------------ | ------------- |
-| /v1/trash-bin | get | List Bin Entries | | |
-| /v1/trash-bin/{binEntryId} | delete | Delete Bin Entry | | |
+| endpoint | method | summary | is supported | is deprecated |
+| -------------------------- | ------ | ---------------- | ------------------------------------ | ------------- |
+| /v1/trash-bin | get | List Bin Entries | supported | |
+| /v1/trash-bin/{binEntryId} | delete | Delete Bin Entry | supported | |
## Templates
-| endpoint | method | summary | is supported | is deprecated |
-| ----------------------- | ------ | ------------------------ | ------------ | ------------- |
-| /v1/templates/campaigns | get | List Campaign Templates | | |
-| /v1/templates/campaigns | post | Create Campaign Template | | |
+| endpoint | method | summary | is supported | is deprecated |
+| ----------------------------------------------------------- | ------ | -------------------------------- | ------------------------------------ | ------------- |
+| /v1/templates/campaigns | get | List Campaign Templates | supported | |
+| /v1/templates/campaigns | post | Create Campaign Template | supported | |
+| /v1/templates/campaigns/{campaignTemplateId} | get | Get Campaign Template | supported | |
+| /v1/templates/campaigns/{campaignTemplateId} | put | Update Campaign Template | supported | |
+| /v1/templates/campaigns/{campaignTemplateId} | delete | Delete Campaign Template | supported | |
+| /v1/templates/campaigns/{campaignTemplateId}/campaign-setup | post | Create Campaign From Template | supported | |
+| /v1/templates/campaigns/{campaignTemplateId}/tier-setup | post | Add Promotion Tier From Template | supported | |
## Management
-| endpoint | method | summary | is supported | is deprecated |
-| ------------------------------------------------------------------------------ | ------ | -------------------------- | ------------ | ------------- |
-| /management/v1/projects | post | Create Project | | |
-| /management/v1/projects | get | List Projects | | |
-| /management/v1/projects/{projectId} | get | Get Project | | |
-| /management/v1/projects/{projectId} | put | Update Project | | |
-| /management/v1/projects/{projectId} | delete | Delete Project | | |
-| /management/v1/projects/{projectId}/users | post | Assign User | | |
-| /management/v1/projects/{projectId}/users | get | List Users | | |
-| /management/v1/projects/{projectId}/users/{userId} | get | Get User | | |
-| /management/v1/projects/{projectId}/users/{userId} | put | Update User | | |
-| /management/v1/projects/{projectId}/users/{userId} | delete | Unassign User | | |
-| /management/v1/projects/users/invite | post | Invite a New User | | |
-| /management/v1/projects/{projectId}/stacking-rules | post | Create Stacking Rules | | |
-| /management/v1/projects/{projectId}/stacking-rules | get | List Stacking Rules | | |
-| /management/v1/projects/{projectId}/stacking-rules/{stackingRulesId} | get | Get Stacking Rules | | |
-| /management/v1/projects/{projectId}/stacking-rules/{stackingRulesId} | put | Update Stacking Rules | | |
-| /management/v1/projects/{projectId}/stacking-rules/{stackingRulesId} | delete | Delete Stacking Rules | | |
-| /management/v1/projects/{projectId}/metadata-schemas | post | Create Metadata Schema | | |
-| /management/v1/projects/{projectId}/metadata-schemas | get | List Metadata Schemas | | |
-| /management/v1/projects/{projectId}/metadata-schemas/{metadataSchemaId} | get | Get Metadata Schema | | |
-| /management/v1/projects/{projectId}/metadata-schemas/{metadataSchemaId} | put | Update Metadata Schema | | |
-| /management/v1/projects/{projectId}/metadata-schemas/{metadataSchemaId} | delete | Delete Metadata Schema | | |
-| /management/v1/projects/{projectId}/custom-event-schemas | post | Create Custom Event Schema | | |
-| /management/v1/projects/{projectId}/custom-event-schemas | get | List Custom Event Schemas | | |
-| /management/v1/projects/{projectId}/custom-event-schemas/{customEventSchemaId} | get | Get Custom Event Schema | | |
-| /management/v1/projects/{projectId}/custom-event-schemas/{customEventSchemaId} | put | Update Custom Event Schema | | |
-| /management/v1/projects/{projectId}/custom-event-schemas/{customEventSchemaId} | delete | Delete Custom Event Schema | | |
-| /management/v1/projects/{projectId}/webhooks | post | Create Webhook | | |
-| /management/v1/projects/{projectId}/webhooks | get | List Webhooks | | |
-| /management/v1/projects/{projectId}/webhooks/{webhookId} | get | Get Webhook | | |
-| /management/v1/projects/{projectId}/webhooks/{webhookId} | put | Update Webhook | | |
-| /management/v1/projects/{projectId}/webhooks/{webhookId} | delete | Delete Webhook | | |
-| /management/v1/projects/{projectId}/branding | post | Create Brand | | |
-| /management/v1/projects/{projectId}/branding | get | List Brands | | |
-| /management/v1/projects/{projectId}/branding/{brandingId} | get | Get Brand | | |
-| /management/v1/projects/{projectId}/branding/{brandingId} | put | Update Brand | | |
-| /management/v1/projects/{projectId}/branding/{brandingId} | delete | Delete Brand | | |
+| endpoint | method | summary | is supported | is deprecated |
+| --------------------------------------------------------------------------------- | ------ | ----------------------------------- | ------------------------------------ | ------------- |
+| /management/v1/projects | post | Create Project | supported | |
+| /management/v1/projects | get | List Projects | supported | |
+| /management/v1/projects/{projectId} | get | Get Project | supported | |
+| /management/v1/projects/{projectId} | put | Update Project | supported | |
+| /management/v1/projects/{projectId} | delete | Delete Project | supported | |
+| /management/v1/projects/{projectId}/users | post | Assign User | supported | |
+| /management/v1/projects/{projectId}/users | get | List Users | supported | |
+| /management/v1/projects/{projectId}/users/{userId} | get | Get User | supported | |
+| /management/v1/projects/{projectId}/users/{userId} | put | Update User | supported | |
+| /management/v1/projects/{projectId}/users/{userId} | delete | Unassign User | supported | |
+| /management/v1/projects/users/invite | post | Invite a New User | supported | |
+| /management/v1/projects/{projectId}/templates/campaigns | get | List Campaign Templates | supported | |
+| /management/v1/projects/{projectId}/templates/campaigns/{campaignTemplateId}/copy | post | Copy Campaign Template to a Project | supported | |
+| /management/v1/projects/{projectId}/stacking-rules | post | Create Stacking Rules | supported | |
+| /management/v1/projects/{projectId}/stacking-rules | get | List Stacking Rules | supported | |
+| /management/v1/projects/{projectId}/stacking-rules/{stackingRulesId} | get | Get Stacking Rules | supported | |
+| /management/v1/projects/{projectId}/stacking-rules/{stackingRulesId} | put | Update Stacking Rules | supported | |
+| /management/v1/projects/{projectId}/stacking-rules/{stackingRulesId} | delete | Delete Stacking Rules | supported | |
+| /management/v1/projects/{projectId}/metadata-schemas | post | Create Metadata Schema | supported | |
+| /management/v1/projects/{projectId}/metadata-schemas | get | List Metadata Schemas | supported | |
+| /management/v1/projects/{projectId}/metadata-schemas/{metadataSchemaId} | get | Get Metadata Schema | supported | |
+| /management/v1/projects/{projectId}/metadata-schemas/{metadataSchemaId} | put | Update Metadata Schema | supported | |
+| /management/v1/projects/{projectId}/metadata-schemas/{metadataSchemaId} | delete | Delete Metadata Schema | supported | |
+| /management/v1/projects/{projectId}/custom-event-schemas | post | Create Custom Event Schema | supported | |
+| /management/v1/projects/{projectId}/custom-event-schemas | get | List Custom Event Schemas | supported | |
+| /management/v1/projects/{projectId}/custom-event-schemas/{customEventSchemaId} | get | Get Custom Event Schema | supported | |
+| /management/v1/projects/{projectId}/custom-event-schemas/{customEventSchemaId} | put | Update Custom Event Schema | supported | |
+| /management/v1/projects/{projectId}/custom-event-schemas/{customEventSchemaId} | delete | Delete Custom Event Schema | supported | |
+| /management/v1/projects/{projectId}/webhooks | post | Create Webhook | supported | |
+| /management/v1/projects/{projectId}/webhooks | get | List Webhooks | supported | |
+| /management/v1/projects/{projectId}/webhooks/{webhookId} | get | Get Webhook | supported | |
+| /management/v1/projects/{projectId}/webhooks/{webhookId} | put | Update Webhook | supported | |
+| /management/v1/projects/{projectId}/webhooks/{webhookId} | delete | Delete Webhook | supported | |
+| /management/v1/projects/{projectId}/branding | post | Create Brand | supported | |
+| /management/v1/projects/{projectId}/branding | get | List Brands | supported | |
+| /management/v1/projects/{projectId}/branding/{brandingId} | get | Get Brand | supported | |
+| /management/v1/projects/{projectId}/branding/{brandingId} | put | Update Brand | supported | |
+| /management/v1/projects/{projectId}/branding/{brandingId} | delete | Delete Brand | supported | |
## Client-side
| endpoint | method | summary | is supported | is deprecated |
| --------------------------- | ------ | ------------------------------------------- | ------------------------------------ | ------------------------------------ |
diff --git a/README.md b/README.md
index 67fcf12c..b10572fa 100644
--- a/README.md
+++ b/README.md
@@ -103,6 +103,86 @@ Remember that this SDK is auto generated (except of the tests) so changes made h
## 📅 Changelog
+- **2024-10-28** - `4.0.0`
+ - Fix object parsing in query. For example `filters` while listing redemptions.
+ - !!! BREAKING CHANGES !!!
+ - Remove support for `/client/v1/customers/{customerId}/consents` - put `Update Customer's consents (client-side) [Deprecated]`
+ - Pagination changed on listing card transactions(listLoyaltyCardTransactions) - NO `page` param is supported - use `starting_after_id` instead.
+ - Pagination changed on listing voucher transactions(listVoucherTransactions) - NO `page` param is supported - use `starting_after_id` instead.
+ - ApplicableToEffect - changed - `EVERY` -> `TO_EVERY`, `CHEAPEST` -> `TO_CHEAPEST`, `MOST_EXPENSIVE` -> `TO_MOST_EXPENSIVE`, 2 new values introduced.
+ - `listPublications` parameter `filters` have changed - now uses `ParameterFiltersListPublications` instead of `String`
+ - `ParameterFiltersListRedemptions` and `ParameterFiltersListCustomerRedeemables` have been updated
+ - enum `LUCKY_DRAW`, `LUCKY_DRAW_CODE`, `VOUCHER_LUCKY_DRAW_CODE`, `CAMPAIGN_LUCKY_DRAW` have been deleted from everywhere and no longer supported
+ - CampaignsUpdateRequestBody - properties `activityDurationAfterPublishing`, `joinOnce`, `autoJoin`, `type`, `uniqueWinners`, `uniqueWinnersPerDraw` and enum `AUTO_UPDATE` | `STATIC` have been deleted and no longer supported
+ - `updateCustomersConsents` has been deleted and no longer supported
+ - `FilterConditionsDateTimeConditions` model has been renamed to `FilterConditionsDateTime`
+ - FilterConditionsDateTime - `conditions` has been divided on `$after`, `$before`, `$hasValue`, `$isUnknown`, `moreThan`, `lessThan` properties
+ - ParamterFiltersListCustomerRedeemables - model name of `createdAt` has been renamed from `FilterConditionsDateTime` to `ParameterFiltersListCustomerRedeemablesCreatedAt`
+ - `filter` property in schemas ProductCollectionsCreateRequestBody, ProductCollectionsCreateResponseBody, ProductCollectionsItem and ProductCollectionsGetResponseBody has changed. Uses plain `object`.
+ - `discount` property in schema CampaignsUpdateRequestBody now uses `Discount` model
+ - properties `winnersCount`, `uniqueWinnersPerDraw`, `uniqueWinners` in model `CampaignsUpdateRequestBody` were deleted.
+ - property `stackingRulesType` were deleted from models `CategoriesGetResponseBody`, `Category`
+ - property `categories` in model `ClientValidationsValidateResponseBodyRedeemablesItem` uses now Array model
+ - model `ParameterFiltersListCustomerRedeemablesCampaignId` has been fixed, can use junction properly.
+ - model `ParameterFiltersListRedemptions` has been fixed, can use junction properly.
+ - property `filter` in model `ProductCollectionsCreateRequestBody` now uses plain Object
+ - property `categories` in model `QualificationsRedeemable` now uses `Array`
+ - Added support:
+ - /v1/metadata-schemas - get `List Metadata Schemas`
+ - /v1/metadata-schemas/{resource} - get `Get Metadata Schema`
+ - /v1/locations - `List Locations`
+ - /v1/locations/{locationId} - get `Get Location`
+ - /v1/referrals/{campaignId}/members/{memberId}/holders - post `Add Referral Code Holders`
+ - /v1/referrals/{campaignId}/members/{memberId}/holders - get `List Referral Code Holders`
+ - /v1/referrals/{campaignId}/members/{memberId}/holders/{holderId} - delete `Remove Referral Card Holder`
+ - /v1/referrals/members/{memberId}/holders - post `Add Referral Code Holders`
+ - /v1/referrals/members/{memberId}/holders - get `List Referral Code Holders`
+ - /v1/referrals/members/{memberId}/holders/{holderId} - delete `Remove Referral Card Holder`
+ - /v1/trash-bin - get `List Bin Entries`
+ - /v1/trash-bin/{binEntryId} - delete `Delete Bin Entry`
+ - /v1/templates/campaigns - get `List Campaign Templates`
+ - /v1/templates/campaigns - post `Create Campaign Template`
+ - /v1/templates/campaigns/{campaignTemplateId} - get `Get Campaign Template`
+ - /v1/templates/campaigns/{campaignTemplateId} - put `Update Campaign Template`
+ - /v1/templates/campaigns/{campaignTemplateId} - delete `Delete Campaign Template`
+ - /v1/templates/campaigns/{campaignTemplateId}/campaign-setup - post `Create Campaign From Template`
+ - /v1/templates/campaigns/{campaignTemplateId}/tier-setup - post `Add Promotion Tier From Template`
+ - /management/v1/projects - post `Create Project`
+ - /management/v1/projects - get `List Projects`
+ - /management/v1/projects/{projectId} - get `Get Project`
+ - /management/v1/projects/{projectId} - put `Update Project`
+ - /management/v1/projects/{projectId} - delete `Delete Project`
+ - /management/v1/projects/{projectId}/users - post `Assign User`
+ - /management/v1/projects/{projectId}/users/{userId} - put `Update User`
+ - /management/v1/projects/{projectId}/users/{userId} - delete `Unassign User`
+ - /management/v1/projects/users/invite - post `Invite a New User`
+ - /management/v1/projects/{projectId}/templates/campaigns - get `List Campaign Templates`
+ - /management/v1/projects/{projectId}/templates/campaigns/{campaignTemplateId}/copy - post `Copy Campaign Template to a Project`
+ - /management/v1/projects/{projectId}/stacking-rules - post `Create Stacking Rules`
+ - /management/v1/projects/{projectId}/stacking-rules - get `List Stacking Rules`
+ - /management/v1/projects/{projectId}/stacking-rules/{stackingRulesId} - get `Get Stacking Rules`
+ - /management/v1/projects/{projectId}/stacking-rules/{stackingRulesId} - put `Update Stacking Rules`
+ - /management/v1/projects/{projectId}/stacking-rules/{stackingRulesId} - delete `Delete Stacking Rules`
+ - /management/v1/projects/{projectId}/metadata-schemas - post `Create Metadata Schema`
+ - /management/v1/projects/{projectId}/metadata-schemas - get `List Metadata Schemas`
+ - /management/v1/projects/{projectId}/metadata-schemas/{metadataSchemaId} - get `Get Metadata Schema`
+ - /management/v1/projects/{projectId}/metadata-schemas/{metadataSchemaId} - put `Update Metadata Schema`
+ - /management/v1/projects/{projectId}/metadata-schemas/{metadataSchemaId} - delete `Delete Metadata Schema`
+ - /management/v1/projects/{projectId}/custom-event-schemas - post `Create Custom Event Schema`
+ - /management/v1/projects/{projectId}/custom-event-schemas - get `List Custom Event Schemas`
+ - /management/v1/projects/{projectId}/custom-event-schemas/{customEventSchemaId} - get `Get Custom Event Schema`
+ - /management/v1/projects/{projectId}/custom-event-schemas/{customEventSchemaId} - put `Update Custom Event Schema`
+ - /management/v1/projects/{projectId}/custom-event-schemas/{customEventSchemaId} - delete `Delete Custom Event Schema`
+ - /management/v1/projects/{projectId}/webhooks - post `Create Webhook`
+ - /management/v1/projects/{projectId}/webhooks - get `List Webhooks`
+ - /management/v1/projects/{projectId}/webhooks/{webhookId} - get `Get Webhook`
+ - /management/v1/projects/{projectId}/webhooks/{webhookId} - put `Update Webhook`
+ - /management/v1/projects/{projectId}/webhooks/{webhookId} - delete `Delete Webhook`
+ - /management/v1/projects/{projectId}/branding - post `Create Brand`
+ - /management/v1/projects/{projectId}/branding - get `List Brands`
+ - /management/v1/projects/{projectId}/branding/{brandingId} - get `Get Brand`
+ - /management/v1/projects/{projectId}/branding/{brandingId} - put `Update Brand`
+ - /management/v1/projects/{projectId}/branding/{brandingId} - delete `Delete Brand`
- **2024-09-18** - `3.0.0`
- The new version of the SDK includes coverage for all the most commonly used Voucherify endpoints and supports typed models.
@@ -159,6 +239,8 @@ Class | Method | HTTP request | Description
------------ | ------------- | ------------- | -------------
*AsyncActionsApi* | [**get_async_action**](docs/AsyncActionsApi.md#get_async_action) | **GET** /v1/async-actions/{asyncActionId} | Get Async Action
*AsyncActionsApi* | [**list_async_actions**](docs/AsyncActionsApi.md#list_async_actions) | **GET** /v1/async-actions | List Async Actions
+*BinApi* | [**delete_bin_entry**](docs/BinApi.md#delete_bin_entry) | **DELETE** /v1/trash-bin/{binEntryId} | Delete Bin Entry
+*BinApi* | [**list_bin_entries**](docs/BinApi.md#list_bin_entries) | **GET** /v1/trash-bin | List Bin Entries
*CampaignsApi* | [**add_voucher_with_specific_code_to_campaign**](docs/CampaignsApi.md#add_voucher_with_specific_code_to_campaign) | **POST** /v1/campaigns/{campaignId}/vouchers/{code} | Add Voucher with Specific Code to Campaign
*CampaignsApi* | [**add_vouchers_to_campaign**](docs/CampaignsApi.md#add_vouchers_to_campaign) | **POST** /v1/campaigns/{campaignId}/vouchers | Add Vouchers to Campaign
*CampaignsApi* | [**create_campaign**](docs/CampaignsApi.md#create_campaign) | **POST** /v1/campaigns | Create Campaign
@@ -198,6 +280,8 @@ Class | Method | HTTP request | Description
*ExportsApi* | [**download_export**](docs/ExportsApi.md#download_export) | **GET** /v1/exports/{export_Id} | Download Export
*ExportsApi* | [**get_export**](docs/ExportsApi.md#get_export) | **GET** /v1/exports/{exportId} | Get Export
*ExportsApi* | [**list_exports**](docs/ExportsApi.md#list_exports) | **GET** /v1/exports | List Exports
+*LocationsApi* | [**get_location**](docs/LocationsApi.md#get_location) | **GET** /v1/locations/{locationId} | Get Location
+*LocationsApi* | [**list_locations**](docs/LocationsApi.md#list_locations) | **GET** /v1/locations | List Locations
*LoyaltiesApi* | [**add_member**](docs/LoyaltiesApi.md#add_member) | **POST** /v1/loyalties/{campaignId}/members | Add Member
*LoyaltiesApi* | [**create_earning_rule**](docs/LoyaltiesApi.md#create_earning_rule) | **POST** /v1/loyalties/{campaignId}/earning-rules | Create Earning Rule
*LoyaltiesApi* | [**create_in_bulk_loyalty_tiers**](docs/LoyaltiesApi.md#create_in_bulk_loyalty_tiers) | **POST** /v1/loyalties/{campaignId}/tiers | Create loyalty tiers
@@ -242,6 +326,46 @@ Class | Method | HTTP request | Description
*LoyaltiesApi* | [**update_loyalty_card_balance1**](docs/LoyaltiesApi.md#update_loyalty_card_balance1) | **POST** /v1/loyalties/{campaignId}/members/{memberId}/balance | Add or Remove Loyalty Card Balance
*LoyaltiesApi* | [**update_loyalty_program**](docs/LoyaltiesApi.md#update_loyalty_program) | **PUT** /v1/loyalties/{campaignId} | Update Loyalty Campaign
*LoyaltiesApi* | [**update_reward_assignment1**](docs/LoyaltiesApi.md#update_reward_assignment1) | **PUT** /v1/loyalties/{campaignId}/rewards/{assignmentId} | Update Reward Assignment
+*ManagementApi* | [**assign_user**](docs/ManagementApi.md#assign_user) | **POST** /management/v1/projects/{projectId}/users | Assign User
+*ManagementApi* | [**create_brand**](docs/ManagementApi.md#create_brand) | **POST** /management/v1/projects/{projectId}/branding | Create Brand
+*ManagementApi* | [**create_custom_event_schema**](docs/ManagementApi.md#create_custom_event_schema) | **POST** /management/v1/projects/{projectId}/custom-event-schemas | Create Custom Event Schema
+*ManagementApi* | [**create_metadata_schema**](docs/ManagementApi.md#create_metadata_schema) | **POST** /management/v1/projects/{projectId}/metadata-schemas | Create Metadata Schema
+*ManagementApi* | [**create_project**](docs/ManagementApi.md#create_project) | **POST** /management/v1/projects | Create Project
+*ManagementApi* | [**create_stacking_rules**](docs/ManagementApi.md#create_stacking_rules) | **POST** /management/v1/projects/{projectId}/stacking-rules | Create Stacking Rules
+*ManagementApi* | [**create_webhook**](docs/ManagementApi.md#create_webhook) | **POST** /management/v1/projects/{projectId}/webhooks | Create Webhook
+*ManagementApi* | [**delete_brand**](docs/ManagementApi.md#delete_brand) | **DELETE** /management/v1/projects/{projectId}/branding/{brandingId} | Delete Brand
+*ManagementApi* | [**delete_custom_event_schema**](docs/ManagementApi.md#delete_custom_event_schema) | **DELETE** /management/v1/projects/{projectId}/custom-event-schemas/{customEventSchemaId} | Delete Custom Event Schema
+*ManagementApi* | [**delete_metadata_schema**](docs/ManagementApi.md#delete_metadata_schema) | **DELETE** /management/v1/projects/{projectId}/metadata-schemas/{metadataSchemaId} | Delete Metadata Schema
+*ManagementApi* | [**delete_project**](docs/ManagementApi.md#delete_project) | **DELETE** /management/v1/projects/{projectId} | Delete Project
+*ManagementApi* | [**delete_stacking_rules**](docs/ManagementApi.md#delete_stacking_rules) | **DELETE** /management/v1/projects/{projectId}/stacking-rules/{stackingRulesId} | Delete Stacking Rules
+*ManagementApi* | [**delete_webhook**](docs/ManagementApi.md#delete_webhook) | **DELETE** /management/v1/projects/{projectId}/webhooks/{webhookId} | Delete Webhook
+*ManagementApi* | [**get_brand**](docs/ManagementApi.md#get_brand) | **GET** /management/v1/projects/{projectId}/branding/{brandingId} | Get Brand
+*ManagementApi* | [**get_custom_event_schema**](docs/ManagementApi.md#get_custom_event_schema) | **GET** /management/v1/projects/{projectId}/custom-event-schemas/{customEventSchemaId} | Get Custom Event Schema
+*ManagementApi* | [**get_metadata_schema1**](docs/ManagementApi.md#get_metadata_schema1) | **GET** /management/v1/projects/{projectId}/metadata-schemas/{metadataSchemaId} | Get Metadata Schema
+*ManagementApi* | [**get_project**](docs/ManagementApi.md#get_project) | **GET** /management/v1/projects/{projectId} | Get Project
+*ManagementApi* | [**get_stacking_rules**](docs/ManagementApi.md#get_stacking_rules) | **GET** /management/v1/projects/{projectId}/stacking-rules/{stackingRulesId} | Get Stacking Rules
+*ManagementApi* | [**get_user**](docs/ManagementApi.md#get_user) | **GET** /management/v1/projects/{projectId}/users/{userId} | Get User
+*ManagementApi* | [**get_webhook**](docs/ManagementApi.md#get_webhook) | **GET** /management/v1/projects/{projectId}/webhooks/{webhookId} | Get Webhook
+*ManagementApi* | [**invite_user**](docs/ManagementApi.md#invite_user) | **POST** /management/v1/projects/users/invite | Invite a New User
+*ManagementApi* | [**list_brands**](docs/ManagementApi.md#list_brands) | **GET** /management/v1/projects/{projectId}/branding | List Brands
+*ManagementApi* | [**list_custom_event_schemas**](docs/ManagementApi.md#list_custom_event_schemas) | **GET** /management/v1/projects/{projectId}/custom-event-schemas | List Custom Event Schemas
+*ManagementApi* | [**list_metadata_schemas1**](docs/ManagementApi.md#list_metadata_schemas1) | **GET** /management/v1/projects/{projectId}/metadata-schemas | List Metadata Schemas
+*ManagementApi* | [**list_projects**](docs/ManagementApi.md#list_projects) | **GET** /management/v1/projects | List Projects
+*ManagementApi* | [**list_stacking_rules**](docs/ManagementApi.md#list_stacking_rules) | **GET** /management/v1/projects/{projectId}/stacking-rules | List Stacking Rules
+*ManagementApi* | [**list_users**](docs/ManagementApi.md#list_users) | **GET** /management/v1/projects/{projectId}/users | List Users
+*ManagementApi* | [**list_webhooks**](docs/ManagementApi.md#list_webhooks) | **GET** /management/v1/projects/{projectId}/webhooks | List Webhooks
+*ManagementApi* | [**management_copy_campaign_template**](docs/ManagementApi.md#management_copy_campaign_template) | **POST** /management/v1/projects/{projectId}/templates/campaigns/{campaignTemplateId}/copy | Copy Campaign Template to a Project
+*ManagementApi* | [**management_list_campaign_templates**](docs/ManagementApi.md#management_list_campaign_templates) | **GET** /management/v1/projects/{projectId}/templates/campaigns | List Campaign Templates
+*ManagementApi* | [**unassign_user**](docs/ManagementApi.md#unassign_user) | **DELETE** /management/v1/projects/{projectId}/users/{userId} | Unassign User
+*ManagementApi* | [**update_brand**](docs/ManagementApi.md#update_brand) | **PUT** /management/v1/projects/{projectId}/branding/{brandingId} | Update Brand
+*ManagementApi* | [**update_custom_event_schema**](docs/ManagementApi.md#update_custom_event_schema) | **PUT** /management/v1/projects/{projectId}/custom-event-schemas/{customEventSchemaId} | Update Custom Event Schema
+*ManagementApi* | [**update_metadata_schema**](docs/ManagementApi.md#update_metadata_schema) | **PUT** /management/v1/projects/{projectId}/metadata-schemas/{metadataSchemaId} | Update Metadata Schema
+*ManagementApi* | [**update_project**](docs/ManagementApi.md#update_project) | **PUT** /management/v1/projects/{projectId} | Update Project
+*ManagementApi* | [**update_stacking_rules**](docs/ManagementApi.md#update_stacking_rules) | **PUT** /management/v1/projects/{projectId}/stacking-rules/{stackingRulesId} | Update Stacking Rules
+*ManagementApi* | [**update_user**](docs/ManagementApi.md#update_user) | **PUT** /management/v1/projects/{projectId}/users/{userId} | Update User
+*ManagementApi* | [**update_webhook**](docs/ManagementApi.md#update_webhook) | **PUT** /management/v1/projects/{projectId}/webhooks/{webhookId} | Update Webhook
+*MetadataSchemasApi* | [**get_metadata_schema**](docs/MetadataSchemasApi.md#get_metadata_schema) | **GET** /v1/metadata-schemas/{resource} | Get Metadata Schema
+*MetadataSchemasApi* | [**list_metadata_schemas**](docs/MetadataSchemasApi.md#list_metadata_schemas) | **GET** /v1/metadata-schemas | List Metadata Schemas
*OrdersApi* | [**create_order**](docs/OrdersApi.md#create_order) | **POST** /v1/orders | Create Order
*OrdersApi* | [**create_order_export**](docs/OrdersApi.md#create_order_export) | **POST** /v1/orders/export | Create Orders Export
*OrdersApi* | [**get_order**](docs/OrdersApi.md#get_order) | **GET** /v1/orders/{orderId} | Get Order
@@ -291,6 +415,12 @@ Class | Method | HTTP request | Description
*RedemptionsApi* | [**redeem_stacked_discounts**](docs/RedemptionsApi.md#redeem_stacked_discounts) | **POST** /v1/redemptions | Redeem Stackable Discounts
*RedemptionsApi* | [**rollback_redemption**](docs/RedemptionsApi.md#rollback_redemption) | **POST** /v1/redemptions/{redemptionId}/rollback | Rollback Redemption
*RedemptionsApi* | [**rollback_stacked_redemptions**](docs/RedemptionsApi.md#rollback_stacked_redemptions) | **POST** /v1/redemptions/{parentRedemptionId}/rollbacks | Rollback Stackable Redemptions
+*ReferralsApi* | [**referrals_add_holders**](docs/ReferralsApi.md#referrals_add_holders) | **POST** /v1/referrals/members/{memberId}/holders | Add Referral Code Holders
+*ReferralsApi* | [**referrals_add_holders1**](docs/ReferralsApi.md#referrals_add_holders1) | **POST** /v1/referrals/{campaignId}/members/{memberId}/holders | Add Referral Code Holders
+*ReferralsApi* | [**referrals_code_holders**](docs/ReferralsApi.md#referrals_code_holders) | **GET** /v1/referrals/{campaignId}/members/{memberId}/holders | List Referral Code Holders
+*ReferralsApi* | [**referrals_code_holders1**](docs/ReferralsApi.md#referrals_code_holders1) | **GET** /v1/referrals/members/{memberId}/holders | List Referral Code Holders
+*ReferralsApi* | [**referrals_remove_holder**](docs/ReferralsApi.md#referrals_remove_holder) | **DELETE** /v1/referrals/members/{memberId}/holders/{holderId} | Remove Referral Card Holder
+*ReferralsApi* | [**referrals_remove_holder1**](docs/ReferralsApi.md#referrals_remove_holder1) | **DELETE** /v1/referrals/{campaignId}/members/{memberId}/holders/{holderId} | Remove Referral Card Holder
*RewardsApi* | [**create_reward**](docs/RewardsApi.md#create_reward) | **POST** /v1/rewards | Create Reward
*RewardsApi* | [**create_reward_assignment**](docs/RewardsApi.md#create_reward_assignment) | **POST** /v1/rewards/{rewardId}/assignments | Create Reward Assignment
*RewardsApi* | [**delete_reward**](docs/RewardsApi.md#delete_reward) | **DELETE** /v1/rewards/{rewardId} | Delete Reward
@@ -304,6 +434,13 @@ Class | Method | HTTP request | Description
*SegmentsApi* | [**create_segment**](docs/SegmentsApi.md#create_segment) | **POST** /v1/segments | Create Segment
*SegmentsApi* | [**delete_segment**](docs/SegmentsApi.md#delete_segment) | **DELETE** /v1/segments/{segmentId} | Delete Segment
*SegmentsApi* | [**get_segment**](docs/SegmentsApi.md#get_segment) | **GET** /v1/segments/{segmentId} | Get Segment
+*TemplatesApi* | [**add_tier_from_template**](docs/TemplatesApi.md#add_tier_from_template) | **POST** /v1/templates/campaigns/{campaignTemplateId}/tier-setup | Add Promotion Tier From Template
+*TemplatesApi* | [**create_campaign_from_template**](docs/TemplatesApi.md#create_campaign_from_template) | **POST** /v1/templates/campaigns/{campaignTemplateId}/campaign-setup | Create Campaign From Template
+*TemplatesApi* | [**create_campaign_template**](docs/TemplatesApi.md#create_campaign_template) | **POST** /v1/templates/campaigns | Create Campaign Template
+*TemplatesApi* | [**delete_campaign_template**](docs/TemplatesApi.md#delete_campaign_template) | **DELETE** /v1/templates/campaigns/{campaignTemplateId} | Delete Campaign Template
+*TemplatesApi* | [**get_campaign_template**](docs/TemplatesApi.md#get_campaign_template) | **GET** /v1/templates/campaigns/{campaignTemplateId} | Get Campaign Template
+*TemplatesApi* | [**list_campaign_templates**](docs/TemplatesApi.md#list_campaign_templates) | **GET** /v1/templates/campaigns | List Campaign Templates
+*TemplatesApi* | [**update_campaign_template**](docs/TemplatesApi.md#update_campaign_template) | **PUT** /v1/templates/campaigns/{campaignTemplateId} | Update Campaign Template
*ValidationRulesApi* | [**create_validation_rule_assignment**](docs/ValidationRulesApi.md#create_validation_rule_assignment) | **POST** /v1/validation-rules/{validationRuleId}/assignments | Create Validation Rules Assignments
*ValidationRulesApi* | [**create_validation_rules**](docs/ValidationRulesApi.md#create_validation_rules) | **POST** /v1/validation-rules | Create Validation Rules
*ValidationRulesApi* | [**delete_validation_rule_assignment**](docs/ValidationRulesApi.md#delete_validation_rule_assignment) | **DELETE** /v1/validation-rules/{validationRuleId}/assignments/{assignmentId} | Delete Validation Rule Assignment
@@ -343,11 +480,13 @@ Class | Method | HTTP request | Description
- [AsyncActionGetResponseBody](docs/AsyncActionGetResponseBody.md)
- [AsyncActionsListResponseBody](docs/AsyncActionsListResponseBody.md)
- [BusValRuleAssignment](docs/BusValRuleAssignment.md)
+ - [Campaign](docs/Campaign.md)
- [CampaignBase](docs/CampaignBase.md)
- [CampaignLoyaltyCard](docs/CampaignLoyaltyCard.md)
- [CampaignLoyaltyCardExpirationRules](docs/CampaignLoyaltyCardExpirationRules.md)
- [CampaignLoyaltyVoucher](docs/CampaignLoyaltyVoucher.md)
- [CampaignLoyaltyVoucherRedemption](docs/CampaignLoyaltyVoucherRedemption.md)
+ - [CampaignTemplate](docs/CampaignTemplate.md)
- [CampaignVoucher](docs/CampaignVoucher.md)
- [CampaignVoucherRedemption](docs/CampaignVoucherRedemption.md)
- [CampaignsCreateRequestBody](docs/CampaignsCreateRequestBody.md)
@@ -386,6 +525,7 @@ Class | Method | HTTP request | Description
- [CategoriesUpdateRequestBody](docs/CategoriesUpdateRequestBody.md)
- [CategoriesUpdateResponseBody](docs/CategoriesUpdateResponseBody.md)
- [Category](docs/Category.md)
+ - [CategoryWithStackingRulesType](docs/CategoryWithStackingRulesType.md)
- [ClientEventsCreateRequestBody](docs/ClientEventsCreateRequestBody.md)
- [ClientEventsCreateRequestBodyLoyalty](docs/ClientEventsCreateRequestBodyLoyalty.md)
- [ClientEventsCreateRequestBodyReferral](docs/ClientEventsCreateRequestBodyReferral.md)
@@ -502,6 +642,7 @@ Class | Method | HTTP request | Description
- [ExportsGetResponseBodyResult](docs/ExportsGetResponseBodyResult.md)
- [ExportsListResponseBody](docs/ExportsListResponseBody.md)
- [FieldConditions](docs/FieldConditions.md)
+ - [FilterConditionsDateTime](docs/FilterConditionsDateTime.md)
- [FilterConditionsString](docs/FilterConditionsString.md)
- [FiltersCondition](docs/FiltersCondition.md)
- [Gift](docs/Gift.md)
@@ -509,6 +650,15 @@ Class | Method | HTTP request | Description
- [InapplicableToResultList](docs/InapplicableToResultList.md)
- [Junction](docs/Junction.md)
- [ListPublicationsItemVoucher](docs/ListPublicationsItemVoucher.md)
+ - [Location](docs/Location.md)
+ - [LocationShape](docs/LocationShape.md)
+ - [LocationShapeDistance](docs/LocationShapeDistance.md)
+ - [LocationShapeGeojson](docs/LocationShapeGeojson.md)
+ - [LocationsGetResponseBody](docs/LocationsGetResponseBody.md)
+ - [LocationsGetResponseBodyShape](docs/LocationsGetResponseBodyShape.md)
+ - [LocationsGetResponseBodyShapeDistance](docs/LocationsGetResponseBodyShapeDistance.md)
+ - [LocationsGetResponseBodyShapeGeojson](docs/LocationsGetResponseBodyShapeGeojson.md)
+ - [LocationsListResponseBody](docs/LocationsListResponseBody.md)
- [LoyaltiesCreateCampaignRequestBody](docs/LoyaltiesCreateCampaignRequestBody.md)
- [LoyaltiesCreateCampaignResponseBody](docs/LoyaltiesCreateCampaignResponseBody.md)
- [LoyaltiesDeleteResponseBody](docs/LoyaltiesDeleteResponseBody.md)
@@ -767,8 +917,132 @@ Class | Method | HTTP request | Description
- [LoyaltyTiersExpirationAllExpirationDate](docs/LoyaltyTiersExpirationAllExpirationDate.md)
- [LoyaltyTiersExpirationAllExpirationDateRounding](docs/LoyaltyTiersExpirationAllExpirationDateRounding.md)
- [LoyaltyTiersExpirationAllStartDate](docs/LoyaltyTiersExpirationAllStartDate.md)
- - [LuckyDraw](docs/LuckyDraw.md)
+ - [ManagementProject](docs/ManagementProject.md)
+ - [ManagementProjectApiUsageNotifications](docs/ManagementProjectApiUsageNotifications.md)
+ - [ManagementProjectDefaultCodeConfig](docs/ManagementProjectDefaultCodeConfig.md)
+ - [ManagementProjectLimits](docs/ManagementProjectLimits.md)
+ - [ManagementProjectLimitsApiCallsItem](docs/ManagementProjectLimitsApiCallsItem.md)
+ - [ManagementProjectLimitsBulkApiCallsItem](docs/ManagementProjectLimitsBulkApiCallsItem.md)
+ - [ManagementProjectWebhooksCalloutNotifications](docs/ManagementProjectWebhooksCalloutNotifications.md)
+ - [ManagementProjectWebhooksCalloutNotificationsDistributions](docs/ManagementProjectWebhooksCalloutNotificationsDistributions.md)
+ - [ManagementProjectWebhooksCalloutNotificationsWebhooks](docs/ManagementProjectWebhooksCalloutNotificationsWebhooks.md)
+ - [ManagementProjectsBranding](docs/ManagementProjectsBranding.md)
+ - [ManagementProjectsBrandingAddress](docs/ManagementProjectsBrandingAddress.md)
+ - [ManagementProjectsBrandingBrand](docs/ManagementProjectsBrandingBrand.md)
+ - [ManagementProjectsBrandingCockpits](docs/ManagementProjectsBrandingCockpits.md)
+ - [ManagementProjectsBrandingContact](docs/ManagementProjectsBrandingContact.md)
+ - [ManagementProjectsBrandingCreateRequestBody](docs/ManagementProjectsBrandingCreateRequestBody.md)
+ - [ManagementProjectsBrandingCreateRequestBodyAddress](docs/ManagementProjectsBrandingCreateRequestBodyAddress.md)
+ - [ManagementProjectsBrandingCreateRequestBodyBrand](docs/ManagementProjectsBrandingCreateRequestBodyBrand.md)
+ - [ManagementProjectsBrandingCreateRequestBodyCockpits](docs/ManagementProjectsBrandingCreateRequestBodyCockpits.md)
+ - [ManagementProjectsBrandingCreateRequestBodyContact](docs/ManagementProjectsBrandingCreateRequestBodyContact.md)
+ - [ManagementProjectsBrandingCreateResponseBody](docs/ManagementProjectsBrandingCreateResponseBody.md)
+ - [ManagementProjectsBrandingCreateResponseBodyAddress](docs/ManagementProjectsBrandingCreateResponseBodyAddress.md)
+ - [ManagementProjectsBrandingCreateResponseBodyBrand](docs/ManagementProjectsBrandingCreateResponseBodyBrand.md)
+ - [ManagementProjectsBrandingCreateResponseBodyCockpits](docs/ManagementProjectsBrandingCreateResponseBodyCockpits.md)
+ - [ManagementProjectsBrandingCreateResponseBodyContact](docs/ManagementProjectsBrandingCreateResponseBodyContact.md)
+ - [ManagementProjectsBrandingGetResponseBody](docs/ManagementProjectsBrandingGetResponseBody.md)
+ - [ManagementProjectsBrandingGetResponseBodyAddress](docs/ManagementProjectsBrandingGetResponseBodyAddress.md)
+ - [ManagementProjectsBrandingGetResponseBodyBrand](docs/ManagementProjectsBrandingGetResponseBodyBrand.md)
+ - [ManagementProjectsBrandingGetResponseBodyCockpits](docs/ManagementProjectsBrandingGetResponseBodyCockpits.md)
+ - [ManagementProjectsBrandingGetResponseBodyContact](docs/ManagementProjectsBrandingGetResponseBodyContact.md)
+ - [ManagementProjectsBrandingListResponseBody](docs/ManagementProjectsBrandingListResponseBody.md)
+ - [ManagementProjectsBrandingUpdateRequestBody](docs/ManagementProjectsBrandingUpdateRequestBody.md)
+ - [ManagementProjectsBrandingUpdateRequestBodyAddress](docs/ManagementProjectsBrandingUpdateRequestBodyAddress.md)
+ - [ManagementProjectsBrandingUpdateRequestBodyBrand](docs/ManagementProjectsBrandingUpdateRequestBodyBrand.md)
+ - [ManagementProjectsBrandingUpdateRequestBodyCockpits](docs/ManagementProjectsBrandingUpdateRequestBodyCockpits.md)
+ - [ManagementProjectsBrandingUpdateRequestBodyContact](docs/ManagementProjectsBrandingUpdateRequestBodyContact.md)
+ - [ManagementProjectsBrandingUpdateResponseBody](docs/ManagementProjectsBrandingUpdateResponseBody.md)
+ - [ManagementProjectsBrandingUpdateResponseBodyAddress](docs/ManagementProjectsBrandingUpdateResponseBodyAddress.md)
+ - [ManagementProjectsBrandingUpdateResponseBodyBrand](docs/ManagementProjectsBrandingUpdateResponseBodyBrand.md)
+ - [ManagementProjectsBrandingUpdateResponseBodyCockpits](docs/ManagementProjectsBrandingUpdateResponseBodyCockpits.md)
+ - [ManagementProjectsBrandingUpdateResponseBodyContact](docs/ManagementProjectsBrandingUpdateResponseBodyContact.md)
+ - [ManagementProjectsCreateRequestBody](docs/ManagementProjectsCreateRequestBody.md)
+ - [ManagementProjectsCreateRequestBodyApiUsageNotifications](docs/ManagementProjectsCreateRequestBodyApiUsageNotifications.md)
+ - [ManagementProjectsCreateRequestBodyUsersItem](docs/ManagementProjectsCreateRequestBodyUsersItem.md)
+ - [ManagementProjectsCreateRequestBodyWebhooksCalloutNotifications](docs/ManagementProjectsCreateRequestBodyWebhooksCalloutNotifications.md)
+ - [ManagementProjectsCreateRequestBodyWebhooksCalloutNotificationsDistributions](docs/ManagementProjectsCreateRequestBodyWebhooksCalloutNotificationsDistributions.md)
+ - [ManagementProjectsCreateRequestBodyWebhooksCalloutNotificationsWebhooks](docs/ManagementProjectsCreateRequestBodyWebhooksCalloutNotificationsWebhooks.md)
+ - [ManagementProjectsCreateResponseBody](docs/ManagementProjectsCreateResponseBody.md)
+ - [ManagementProjectsCreateResponseBodyApiUsageNotifications](docs/ManagementProjectsCreateResponseBodyApiUsageNotifications.md)
+ - [ManagementProjectsCreateResponseBodyClientSideKey](docs/ManagementProjectsCreateResponseBodyClientSideKey.md)
+ - [ManagementProjectsCreateResponseBodyServerSideKey](docs/ManagementProjectsCreateResponseBodyServerSideKey.md)
+ - [ManagementProjectsCreateResponseBodyWebhooksCalloutNotifications](docs/ManagementProjectsCreateResponseBodyWebhooksCalloutNotifications.md)
+ - [ManagementProjectsCreateResponseBodyWebhooksCalloutNotificationsDistributions](docs/ManagementProjectsCreateResponseBodyWebhooksCalloutNotificationsDistributions.md)
+ - [ManagementProjectsCreateResponseBodyWebhooksCalloutNotificationsWebhooks](docs/ManagementProjectsCreateResponseBodyWebhooksCalloutNotificationsWebhooks.md)
+ - [ManagementProjectsCustomEventSchema](docs/ManagementProjectsCustomEventSchema.md)
+ - [ManagementProjectsCustomEventSchemaSchema](docs/ManagementProjectsCustomEventSchemaSchema.md)
+ - [ManagementProjectsCustomEventSchemasCreateRequestBody](docs/ManagementProjectsCustomEventSchemasCreateRequestBody.md)
+ - [ManagementProjectsCustomEventSchemasCreateRequestBodySchema](docs/ManagementProjectsCustomEventSchemasCreateRequestBodySchema.md)
+ - [ManagementProjectsCustomEventSchemasCreateResponseBody](docs/ManagementProjectsCustomEventSchemasCreateResponseBody.md)
+ - [ManagementProjectsCustomEventSchemasCreateResponseBodySchema](docs/ManagementProjectsCustomEventSchemasCreateResponseBodySchema.md)
+ - [ManagementProjectsCustomEventSchemasGetResponseBody](docs/ManagementProjectsCustomEventSchemasGetResponseBody.md)
+ - [ManagementProjectsCustomEventSchemasGetResponseBodySchema](docs/ManagementProjectsCustomEventSchemasGetResponseBodySchema.md)
+ - [ManagementProjectsCustomEventSchemasListResponseBody](docs/ManagementProjectsCustomEventSchemasListResponseBody.md)
+ - [ManagementProjectsCustomEventSchemasUpdateRequestBody](docs/ManagementProjectsCustomEventSchemasUpdateRequestBody.md)
+ - [ManagementProjectsCustomEventSchemasUpdateRequestBodySchema](docs/ManagementProjectsCustomEventSchemasUpdateRequestBodySchema.md)
+ - [ManagementProjectsCustomEventSchemasUpdateResponseBody](docs/ManagementProjectsCustomEventSchemasUpdateResponseBody.md)
+ - [ManagementProjectsCustomEventSchemasUpdateResponseBodySchema](docs/ManagementProjectsCustomEventSchemasUpdateResponseBodySchema.md)
+ - [ManagementProjectsGetResponseBody](docs/ManagementProjectsGetResponseBody.md)
+ - [ManagementProjectsGetResponseBodyApiUsageNotifications](docs/ManagementProjectsGetResponseBodyApiUsageNotifications.md)
+ - [ManagementProjectsGetResponseBodyDefaultCodeConfig](docs/ManagementProjectsGetResponseBodyDefaultCodeConfig.md)
+ - [ManagementProjectsGetResponseBodyLimits](docs/ManagementProjectsGetResponseBodyLimits.md)
+ - [ManagementProjectsGetResponseBodyLimitsApiCallsItem](docs/ManagementProjectsGetResponseBodyLimitsApiCallsItem.md)
+ - [ManagementProjectsGetResponseBodyLimitsBulkApiCallsItem](docs/ManagementProjectsGetResponseBodyLimitsBulkApiCallsItem.md)
+ - [ManagementProjectsGetResponseBodyWebhooksCalloutNotifications](docs/ManagementProjectsGetResponseBodyWebhooksCalloutNotifications.md)
+ - [ManagementProjectsGetResponseBodyWebhooksCalloutNotificationsDistributions](docs/ManagementProjectsGetResponseBodyWebhooksCalloutNotificationsDistributions.md)
+ - [ManagementProjectsGetResponseBodyWebhooksCalloutNotificationsWebhooks](docs/ManagementProjectsGetResponseBodyWebhooksCalloutNotificationsWebhooks.md)
+ - [ManagementProjectsListResponseBody](docs/ManagementProjectsListResponseBody.md)
+ - [ManagementProjectsMetadataSchema](docs/ManagementProjectsMetadataSchema.md)
+ - [ManagementProjectsMetadataSchemasCreateRequestBody](docs/ManagementProjectsMetadataSchemasCreateRequestBody.md)
+ - [ManagementProjectsMetadataSchemasCreateResponseBody](docs/ManagementProjectsMetadataSchemasCreateResponseBody.md)
+ - [ManagementProjectsMetadataSchemasGetResponseBody](docs/ManagementProjectsMetadataSchemasGetResponseBody.md)
+ - [ManagementProjectsMetadataSchemasListResponseBody](docs/ManagementProjectsMetadataSchemasListResponseBody.md)
+ - [ManagementProjectsMetadataSchemasUpdateRequestBody](docs/ManagementProjectsMetadataSchemasUpdateRequestBody.md)
+ - [ManagementProjectsMetadataSchemasUpdateResponseBody](docs/ManagementProjectsMetadataSchemasUpdateResponseBody.md)
+ - [ManagementProjectsStackingRules](docs/ManagementProjectsStackingRules.md)
+ - [ManagementProjectsStackingRulesCreateRequestBody](docs/ManagementProjectsStackingRulesCreateRequestBody.md)
+ - [ManagementProjectsStackingRulesCreateResponseBody](docs/ManagementProjectsStackingRulesCreateResponseBody.md)
+ - [ManagementProjectsStackingRulesGetResponseBody](docs/ManagementProjectsStackingRulesGetResponseBody.md)
+ - [ManagementProjectsStackingRulesListResponseBody](docs/ManagementProjectsStackingRulesListResponseBody.md)
+ - [ManagementProjectsStackingRulesUpdateRequestBody](docs/ManagementProjectsStackingRulesUpdateRequestBody.md)
+ - [ManagementProjectsStackingRulesUpdateResponseBody](docs/ManagementProjectsStackingRulesUpdateResponseBody.md)
+ - [ManagementProjectsTemplatesCampaignsCopyCreateRequestBody](docs/ManagementProjectsTemplatesCampaignsCopyCreateRequestBody.md)
+ - [ManagementProjectsTemplatesCampaignsCopyCreateResponseBody](docs/ManagementProjectsTemplatesCampaignsCopyCreateResponseBody.md)
+ - [ManagementProjectsTemplatesCampaignsListResponseBody](docs/ManagementProjectsTemplatesCampaignsListResponseBody.md)
+ - [ManagementProjectsUpdateRequestBody](docs/ManagementProjectsUpdateRequestBody.md)
+ - [ManagementProjectsUpdateRequestBodyApiUsageNotifications](docs/ManagementProjectsUpdateRequestBodyApiUsageNotifications.md)
+ - [ManagementProjectsUpdateRequestBodyDefaultCodeConfig](docs/ManagementProjectsUpdateRequestBodyDefaultCodeConfig.md)
+ - [ManagementProjectsUpdateRequestBodyWebhooksCalloutNotifications](docs/ManagementProjectsUpdateRequestBodyWebhooksCalloutNotifications.md)
+ - [ManagementProjectsUpdateRequestBodyWebhooksCalloutNotificationsDistributions](docs/ManagementProjectsUpdateRequestBodyWebhooksCalloutNotificationsDistributions.md)
+ - [ManagementProjectsUpdateRequestBodyWebhooksCalloutNotificationsWebhooks](docs/ManagementProjectsUpdateRequestBodyWebhooksCalloutNotificationsWebhooks.md)
+ - [ManagementProjectsUpdateResponseBody](docs/ManagementProjectsUpdateResponseBody.md)
+ - [ManagementProjectsUpdateResponseBodyApiUsageNotifications](docs/ManagementProjectsUpdateResponseBodyApiUsageNotifications.md)
+ - [ManagementProjectsUpdateResponseBodyDefaultCodeConfig](docs/ManagementProjectsUpdateResponseBodyDefaultCodeConfig.md)
+ - [ManagementProjectsUpdateResponseBodyLimits](docs/ManagementProjectsUpdateResponseBodyLimits.md)
+ - [ManagementProjectsUpdateResponseBodyLimitsApiCallsItem](docs/ManagementProjectsUpdateResponseBodyLimitsApiCallsItem.md)
+ - [ManagementProjectsUpdateResponseBodyLimitsBulkApiCallsItem](docs/ManagementProjectsUpdateResponseBodyLimitsBulkApiCallsItem.md)
+ - [ManagementProjectsUpdateResponseBodyWebhooksCalloutNotifications](docs/ManagementProjectsUpdateResponseBodyWebhooksCalloutNotifications.md)
+ - [ManagementProjectsUpdateResponseBodyWebhooksCalloutNotificationsDistributions](docs/ManagementProjectsUpdateResponseBodyWebhooksCalloutNotificationsDistributions.md)
+ - [ManagementProjectsUpdateResponseBodyWebhooksCalloutNotificationsWebhooks](docs/ManagementProjectsUpdateResponseBodyWebhooksCalloutNotificationsWebhooks.md)
+ - [ManagementProjectsUsersAssignRequestBody](docs/ManagementProjectsUsersAssignRequestBody.md)
+ - [ManagementProjectsUsersAssignResponseBody](docs/ManagementProjectsUsersAssignResponseBody.md)
+ - [ManagementProjectsUsersGetUserResponseBody](docs/ManagementProjectsUsersGetUserResponseBody.md)
+ - [ManagementProjectsUsersInviteCreateRequestBody](docs/ManagementProjectsUsersInviteCreateRequestBody.md)
+ - [ManagementProjectsUsersListResponseBody](docs/ManagementProjectsUsersListResponseBody.md)
+ - [ManagementProjectsUsersUpdateRoleRequestBody](docs/ManagementProjectsUsersUpdateRoleRequestBody.md)
+ - [ManagementProjectsUsersUpdateRoleResponseBody](docs/ManagementProjectsUsersUpdateRoleResponseBody.md)
+ - [ManagementProjectsWebhook](docs/ManagementProjectsWebhook.md)
+ - [ManagementProjectsWebhooksCreateRequestBody](docs/ManagementProjectsWebhooksCreateRequestBody.md)
+ - [ManagementProjectsWebhooksCreateResponseBody](docs/ManagementProjectsWebhooksCreateResponseBody.md)
+ - [ManagementProjectsWebhooksGetResponseBody](docs/ManagementProjectsWebhooksGetResponseBody.md)
+ - [ManagementProjectsWebhooksListResponseBody](docs/ManagementProjectsWebhooksListResponseBody.md)
+ - [ManagementProjectsWebhooksUpdateRequestBody](docs/ManagementProjectsWebhooksUpdateRequestBody.md)
+ - [ManagementProjectsWebhooksUpdateResponseBody](docs/ManagementProjectsWebhooksUpdateResponseBody.md)
- [MemberActivity](docs/MemberActivity.md)
+ - [MetadataSchemaDeprecated](docs/MetadataSchemaDeprecated.md)
+ - [MetadataSchemasGetResponseBody](docs/MetadataSchemasGetResponseBody.md)
+ - [MetadataSchemasListResponseBody](docs/MetadataSchemasListResponseBody.md)
- [Order](docs/Order.md)
- [OrderCalculated](docs/OrderCalculated.md)
- [OrderCalculatedItem](docs/OrderCalculatedItem.md)
@@ -793,12 +1067,25 @@ Class | Method | HTTP request | Description
- [ParameterCampaignType](docs/ParameterCampaignType.md)
- [ParameterCreatedBeforeAfter](docs/ParameterCreatedBeforeAfter.md)
- [ParameterExpandListCampaigns](docs/ParameterExpandListCampaigns.md)
+ - [ParameterFiltersListBin](docs/ParameterFiltersListBin.md)
+ - [ParameterFiltersListBinId](docs/ParameterFiltersListBinId.md)
+ - [ParameterFiltersListBinResourceId](docs/ParameterFiltersListBinResourceId.md)
+ - [ParameterFiltersListBinResourceName](docs/ParameterFiltersListBinResourceName.md)
+ - [ParameterFiltersListBinResourceType](docs/ParameterFiltersListBinResourceType.md)
+ - [ParameterFiltersListBinResourceTypeConditions](docs/ParameterFiltersListBinResourceTypeConditions.md)
+ - [ParameterFiltersListCampaigns](docs/ParameterFiltersListCampaigns.md)
+ - [ParameterFiltersListCampaignsCampaignStatus](docs/ParameterFiltersListCampaignsCampaignStatus.md)
+ - [ParameterFiltersListCampaignsCampaignStatusConditions](docs/ParameterFiltersListCampaignsCampaignStatusConditions.md)
+ - [ParameterFiltersListCampaignsCategories](docs/ParameterFiltersListCampaignsCategories.md)
+ - [ParameterFiltersListCampaignsCategoryIds](docs/ParameterFiltersListCampaignsCategoryIds.md)
+ - [ParameterFiltersListCampaignsIsReferralCode](docs/ParameterFiltersListCampaignsIsReferralCode.md)
+ - [ParameterFiltersListCampaignsValidityTimeframe](docs/ParameterFiltersListCampaignsValidityTimeframe.md)
+ - [ParameterFiltersListCampaignsVoucherType](docs/ParameterFiltersListCampaignsVoucherType.md)
- [ParameterFiltersListCustomerRedeemables](docs/ParameterFiltersListCustomerRedeemables.md)
- [ParameterFiltersListCustomerRedeemablesCampaignId](docs/ParameterFiltersListCustomerRedeemablesCampaignId.md)
- [ParameterFiltersListCustomerRedeemablesCampaignType](docs/ParameterFiltersListCustomerRedeemablesCampaignType.md)
- [ParameterFiltersListCustomerRedeemablesCampaignTypeConditions](docs/ParameterFiltersListCustomerRedeemablesCampaignTypeConditions.md)
- [ParameterFiltersListCustomerRedeemablesCreatedAt](docs/ParameterFiltersListCustomerRedeemablesCreatedAt.md)
- - [ParameterFiltersListCustomerRedeemablesCreatedAtConditions](docs/ParameterFiltersListCustomerRedeemablesCreatedAtConditions.md)
- [ParameterFiltersListCustomerRedeemablesHolderRole](docs/ParameterFiltersListCustomerRedeemablesHolderRole.md)
- [ParameterFiltersListCustomerRedeemablesHolderRoleConditions](docs/ParameterFiltersListCustomerRedeemablesHolderRoleConditions.md)
- [ParameterFiltersListCustomerRedeemablesId](docs/ParameterFiltersListCustomerRedeemablesId.md)
@@ -807,6 +1094,20 @@ Class | Method | HTTP request | Description
- [ParameterFiltersListCustomerRedeemablesRedeemableObjectConditions](docs/ParameterFiltersListCustomerRedeemablesRedeemableObjectConditions.md)
- [ParameterFiltersListCustomerRedeemablesVoucherType](docs/ParameterFiltersListCustomerRedeemablesVoucherType.md)
- [ParameterFiltersListCustomerRedeemablesVoucherTypeConditions](docs/ParameterFiltersListCustomerRedeemablesVoucherTypeConditions.md)
+ - [ParameterFiltersListLocations](docs/ParameterFiltersListLocations.md)
+ - [ParameterFiltersListLocationsCreatedAt](docs/ParameterFiltersListLocationsCreatedAt.md)
+ - [ParameterFiltersListLocationsName](docs/ParameterFiltersListLocationsName.md)
+ - [ParameterFiltersListLocationsUpdatedAt](docs/ParameterFiltersListLocationsUpdatedAt.md)
+ - [ParameterFiltersListPublications](docs/ParameterFiltersListPublications.md)
+ - [ParameterFiltersListPublicationsCampaignName](docs/ParameterFiltersListPublicationsCampaignName.md)
+ - [ParameterFiltersListPublicationsCustomerId](docs/ParameterFiltersListPublicationsCustomerId.md)
+ - [ParameterFiltersListPublicationsFailureCode](docs/ParameterFiltersListPublicationsFailureCode.md)
+ - [ParameterFiltersListPublicationsIsReferralCode](docs/ParameterFiltersListPublicationsIsReferralCode.md)
+ - [ParameterFiltersListPublicationsParentObjectId](docs/ParameterFiltersListPublicationsParentObjectId.md)
+ - [ParameterFiltersListPublicationsRelatedObjectId](docs/ParameterFiltersListPublicationsRelatedObjectId.md)
+ - [ParameterFiltersListPublicationsResult](docs/ParameterFiltersListPublicationsResult.md)
+ - [ParameterFiltersListPublicationsSourceId](docs/ParameterFiltersListPublicationsSourceId.md)
+ - [ParameterFiltersListPublicationsVoucherType](docs/ParameterFiltersListPublicationsVoucherType.md)
- [ParameterFiltersListRedemptions](docs/ParameterFiltersListRedemptions.md)
- [ParameterFiltersListRedemptionsCampaignName](docs/ParameterFiltersListRedemptionsCampaignName.md)
- [ParameterFiltersListRedemptionsCustomerId](docs/ParameterFiltersListRedemptionsCustomerId.md)
@@ -818,13 +1119,26 @@ Class | Method | HTTP request | Description
- [ParameterFiltersListRedemptionsResult](docs/ParameterFiltersListRedemptionsResult.md)
- [ParameterFiltersListRedemptionsUserLogin](docs/ParameterFiltersListRedemptionsUserLogin.md)
- [ParameterFiltersListRedemptionsVoucherCode](docs/ParameterFiltersListRedemptionsVoucherCode.md)
+ - [ParameterFiltersListReferralsRedeemableHolders](docs/ParameterFiltersListReferralsRedeemableHolders.md)
+ - [ParameterFiltersListReferralsRedeemableHoldersCreatedAt](docs/ParameterFiltersListReferralsRedeemableHoldersCreatedAt.md)
+ - [ParameterFiltersListReferralsRedeemableHoldersCustomerId](docs/ParameterFiltersListReferralsRedeemableHoldersCustomerId.md)
+ - [ParameterFiltersListReferralsRedeemableHoldersHolderRole](docs/ParameterFiltersListReferralsRedeemableHoldersHolderRole.md)
+ - [ParameterFiltersListReferralsRedeemableHoldersHolderRoleConditions](docs/ParameterFiltersListReferralsRedeemableHoldersHolderRoleConditions.md)
+ - [ParameterFiltersListReferralsRedeemableHoldersId](docs/ParameterFiltersListReferralsRedeemableHoldersId.md)
+ - [ParameterFiltersListTemplates](docs/ParameterFiltersListTemplates.md)
+ - [ParameterFiltersListTemplatesCampaignType](docs/ParameterFiltersListTemplatesCampaignType.md)
+ - [ParameterFiltersListTemplatesCampaignTypeConditions](docs/ParameterFiltersListTemplatesCampaignTypeConditions.md)
+ - [ParameterFiltersListTemplatesId](docs/ParameterFiltersListTemplatesId.md)
+ - [ParameterFiltersListTemplatesName](docs/ParameterFiltersListTemplatesName.md)
- [ParameterOrder](docs/ParameterOrder.md)
- [ParameterOrderCreatedAt](docs/ParameterOrderCreatedAt.md)
- [ParameterOrderListAllPromotionStacks](docs/ParameterOrderListAllPromotionStacks.md)
+ - [ParameterOrderListBin](docs/ParameterOrderListBin.md)
- [ParameterOrderListCampaigns](docs/ParameterOrderListCampaigns.md)
- [ParameterOrderListCustomers](docs/ParameterOrderListCustomers.md)
- [ParameterOrderListEarningRules](docs/ParameterOrderListEarningRules.md)
- [ParameterOrderListExports](docs/ParameterOrderListExports.md)
+ - [ParameterOrderListLocations](docs/ParameterOrderListLocations.md)
- [ParameterOrderListLoyaltyTiers](docs/ParameterOrderListLoyaltyTiers.md)
- [ParameterOrderListOrders](docs/ParameterOrderListOrders.md)
- [ParameterOrderListPromotionTiers](docs/ParameterOrderListPromotionTiers.md)
@@ -837,21 +1151,18 @@ Class | Method | HTTP request | Description
- [ParameterOrderListValidationRules](docs/ParameterOrderListValidationRules.md)
- [ParameterOrderVouchers](docs/ParameterOrderVouchers.md)
- [ParameterResultListPublications](docs/ParameterResultListPublications.md)
+ - [ParameterTemplatesList](docs/ParameterTemplatesList.md)
- [ParameterUpdatedBeforeAfter](docs/ParameterUpdatedBeforeAfter.md)
- [ParameterVoucherTypeListPublications](docs/ParameterVoucherTypeListPublications.md)
- [PointsExpirationTypes](docs/PointsExpirationTypes.md)
- [Product](docs/Product.md)
- [ProductCollectionsCreateRequestBody](docs/ProductCollectionsCreateRequestBody.md)
- - [ProductCollectionsCreateRequestBodyFilter](docs/ProductCollectionsCreateRequestBodyFilter.md)
- [ProductCollectionsCreateRequestBodyProductsItem](docs/ProductCollectionsCreateRequestBodyProductsItem.md)
- [ProductCollectionsCreateResponseBody](docs/ProductCollectionsCreateResponseBody.md)
- - [ProductCollectionsCreateResponseBodyFilter](docs/ProductCollectionsCreateResponseBodyFilter.md)
- [ProductCollectionsCreateResponseBodyProductsItem](docs/ProductCollectionsCreateResponseBodyProductsItem.md)
- [ProductCollectionsGetResponseBody](docs/ProductCollectionsGetResponseBody.md)
- - [ProductCollectionsGetResponseBodyFilter](docs/ProductCollectionsGetResponseBodyFilter.md)
- [ProductCollectionsGetResponseBodyProductsItem](docs/ProductCollectionsGetResponseBodyProductsItem.md)
- [ProductCollectionsItem](docs/ProductCollectionsItem.md)
- - [ProductCollectionsItemFilter](docs/ProductCollectionsItemFilter.md)
- [ProductCollectionsItemProductsItem](docs/ProductCollectionsItemProductsItem.md)
- [ProductCollectionsListResponseBody](docs/ProductCollectionsListResponseBody.md)
- [ProductCollectionsProductsListResponseBody](docs/ProductCollectionsProductsListResponseBody.md)
@@ -933,8 +1244,6 @@ Class | Method | HTTP request | Description
- [PromotionsTiersUpdateResponseBodySummaryOrders](docs/PromotionsTiersUpdateResponseBodySummaryOrders.md)
- [PromotionsTiersUpdateResponseBodySummaryRedemptions](docs/PromotionsTiersUpdateResponseBodySummaryRedemptions.md)
- [PublicationsCreateRequestBody](docs/PublicationsCreateRequestBody.md)
- - [PublicationsCreateRequestBodyCustomer](docs/PublicationsCreateRequestBodyCustomer.md)
- - [PublicationsCreateRequestBodyCustomerAddress](docs/PublicationsCreateRequestBodyCustomerAddress.md)
- [PublicationsCreateResponseBody](docs/PublicationsCreateResponseBody.md)
- [PublicationsListResponseBody](docs/PublicationsListResponseBody.md)
- [PublicationsListResponseBodyPublicationsItem](docs/PublicationsListResponseBodyPublicationsItem.md)
@@ -955,6 +1264,7 @@ Class | Method | HTTP request | Description
- [QualificationsRedeemableBase](docs/QualificationsRedeemableBase.md)
- [QualificationsRedeemables](docs/QualificationsRedeemables.md)
- [RedeemableGift](docs/RedeemableGift.md)
+ - [RedeemableHolder](docs/RedeemableHolder.md)
- [RedeemableLoyaltyCard](docs/RedeemableLoyaltyCard.md)
- [RedeemableResult](docs/RedeemableResult.md)
- [RedeemableVoucher](docs/RedeemableVoucher.md)
@@ -1073,6 +1383,9 @@ Class | Method | HTTP request | Description
- [ReferralProgramCustomEvent](docs/ReferralProgramCustomEvent.md)
- [ReferralProgramRefereeReward](docs/ReferralProgramRefereeReward.md)
- [ReferralProgramRefereeRewardRelatedObjectParent](docs/ReferralProgramRefereeRewardRelatedObjectParent.md)
+ - [ReferralsMembersHoldersCreateInBulkRequestBody](docs/ReferralsMembersHoldersCreateInBulkRequestBody.md)
+ - [ReferralsMembersHoldersCreateInBulkResponseBody](docs/ReferralsMembersHoldersCreateInBulkResponseBody.md)
+ - [ReferralsMembersHoldersListResponseBody](docs/ReferralsMembersHoldersListResponseBody.md)
- [Referrer](docs/Referrer.md)
- [ReferrerAddress](docs/ReferrerAddress.md)
- [ReferrerId](docs/ReferrerId.md)
@@ -1136,6 +1449,24 @@ Class | Method | HTTP request | Description
- [SkusImportCsvCreateResponseBody](docs/SkusImportCsvCreateResponseBody.md)
- [SkusListForProduct](docs/SkusListForProduct.md)
- [StackingRules](docs/StackingRules.md)
+ - [TemplatesCampaignsCampaignSetupCreateRequestBody](docs/TemplatesCampaignsCampaignSetupCreateRequestBody.md)
+ - [TemplatesCampaignsCampaignSetupCreateRequestBodyVoucher](docs/TemplatesCampaignsCampaignSetupCreateRequestBodyVoucher.md)
+ - [TemplatesCampaignsCampaignSetupCreateRequestBodyVoucherRedemption](docs/TemplatesCampaignsCampaignSetupCreateRequestBodyVoucherRedemption.md)
+ - [TemplatesCampaignsCampaignSetupCreateResponseBody](docs/TemplatesCampaignsCampaignSetupCreateResponseBody.md)
+ - [TemplatesCampaignsCampaignSetupCreateResponseBodyCreatedResourcesItem](docs/TemplatesCampaignsCampaignSetupCreateResponseBodyCreatedResourcesItem.md)
+ - [TemplatesCampaignsCreateRequestBody](docs/TemplatesCampaignsCreateRequestBody.md)
+ - [TemplatesCampaignsCreateTemplateResponseBody](docs/TemplatesCampaignsCreateTemplateResponseBody.md)
+ - [TemplatesCampaignsGetResponseBody](docs/TemplatesCampaignsGetResponseBody.md)
+ - [TemplatesCampaignsListResponseBody](docs/TemplatesCampaignsListResponseBody.md)
+ - [TemplatesCampaignsTierSetupCreateRequestBody](docs/TemplatesCampaignsTierSetupCreateRequestBody.md)
+ - [TemplatesCampaignsTierSetupCreateResponseBody](docs/TemplatesCampaignsTierSetupCreateResponseBody.md)
+ - [TemplatesCampaignsTierSetupCreateResponseBodyCreatedResourcesItem](docs/TemplatesCampaignsTierSetupCreateResponseBodyCreatedResourcesItem.md)
+ - [TemplatesCampaignsUpdateRequestBody](docs/TemplatesCampaignsUpdateRequestBody.md)
+ - [TemplatesCampaignsUpdateResponseBody](docs/TemplatesCampaignsUpdateResponseBody.md)
+ - [TrashBinItem](docs/TrashBinItem.md)
+ - [TrashBinListResponseBody](docs/TrashBinListResponseBody.md)
+ - [UsageNotifications](docs/UsageNotifications.md)
+ - [User](docs/User.md)
- [ValidationRule](docs/ValidationRule.md)
- [ValidationRuleApplicableTo](docs/ValidationRuleApplicableTo.md)
- [ValidationRuleAssignment](docs/ValidationRuleAssignment.md)
@@ -1296,6 +1627,20 @@ Authentication schemes defined for the API:
- **API key parameter name**: X-Client-Application-Id
- **Location**: HTTP header
+
+### X-Management-Id
+
+- **Type**: API key
+- **API key parameter name**: X-Management-Id
+- **Location**: HTTP header
+
+
+### X-Management-Token
+
+- **Type**: API key
+- **API key parameter name**: X-Management-Token
+- **Location**: HTTP header
+
## Author
diff --git a/__tests__/test_02_redemption.py b/__tests__/test_02_redemption.py
index 6487ab6f..35ec9d01 100644
--- a/__tests__/test_02_redemption.py
+++ b/__tests__/test_02_redemption.py
@@ -105,20 +105,19 @@ def test_03_get_customer(self):
def test_04_list_redemptions(self):
with voucherifyClient.ApiClient(spec_utils.configuration) as api_client:
api_instance = voucherifyClient.RedemptionsApi(api_client)
- # OBJECTS IN QUERY ARE NOT YET SUPPORTED !!
- #
- # list_redemptions_filters = voucherifyClient.ParameterFiltersListRedemptions(
- # voucher_code=voucherifyClient.ParameterFiltersListRedemptionsVoucherCode(
- # conditions=voucherifyClient.FilterConditionsString(
- # var_is=voucher_code
- # )
- # )
- # )
+
+ list_redemptions_filters = voucherifyClient.ParameterFiltersListRedemptions(
+ voucher_code=voucherifyClient.ParameterFiltersListRedemptionsVoucherCode(
+ conditions=voucherifyClient.FilterConditionsString(
+ is_not=voucher_code
+ )
+ )
+ )
try:
result = api_instance.list_redemptions(
100,
None,None,None,None,None,None,
- # list_redemptions_filters
+ list_redemptions_filters
)
self.assertEqual(result.object, 'list')
except voucherifyClient.ApiException as e:
diff --git a/__tests__/test_04_publications.py b/__tests__/test_04_publications.py
index 7bf04a5d..15e2d45a 100644
--- a/__tests__/test_04_publications.py
+++ b/__tests__/test_04_publications.py
@@ -45,7 +45,7 @@ def test_01_test_publications(self):
True,
voucherifyClient.PublicationsCreateRequestBody(
campaign=voucherifyClient.CreatePublicationCampaign(name=campaign_name),
- customer=voucherifyClient.PublicationsCreateRequestBodyCustomer(
+ customer=voucherifyClient.Customer(
email=email
)
)
diff --git a/docs/AccessSettings.md b/docs/AccessSettings.md
new file mode 100644
index 00000000..e31d710c
--- /dev/null
+++ b/docs/AccessSettings.md
@@ -0,0 +1,14 @@
+# AccessSettings
+
+Assigns or unassigns an area or store to the campaign. **NOTE**: this object can be sent if the Areas and Stores enterprise feature is enabled. Contact [Voucherify Sales](https://www.voucherify.io/contact-sales) to learn more.
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**assign** | [**AccessSettingsAssign**](AccessSettingsAssign.md) | | [optional]
+**unassign** | [**AccessSettingsUnassign**](AccessSettingsUnassign.md) | | [optional]
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/docs/AccessSettingsAssign.md b/docs/AccessSettingsAssign.md
new file mode 100644
index 00000000..c585da8d
--- /dev/null
+++ b/docs/AccessSettingsAssign.md
@@ -0,0 +1,14 @@
+# AccessSettingsAssign
+
+Assigns the campaign to an area or a store. Provide the area and/or store IDs in the respective arrays. If a campaign changes assignments between areas or stores, unassign it from the area. For example, if a campaign is assigned to Area-01, but it must be now assigned to Store-01 within this area, you have to unassign the campaign from Area-01 and assign to Store-01 only. If you want to assign the campaign to stores only, you do not have to send the area ID.
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**areas_ids** | **List[str]** | List all area IDs to which the campaign will be assigned. | [optional]
+**area_stores_ids** | **List[str]** | List all store IDs to which the campaign will be assigned. | [optional]
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/docs/AccessSettingsCampaignAssignmentsList.md b/docs/AccessSettingsCampaignAssignmentsList.md
index 9dcd13e8..10649b90 100644
--- a/docs/AccessSettingsCampaignAssignmentsList.md
+++ b/docs/AccessSettingsCampaignAssignmentsList.md
@@ -1,6 +1,6 @@
# AccessSettingsCampaignAssignmentsList
-Lists all assignments of the campaign to areas and stores if the Areas and Stores feature is enabled (Enterprise feature).
+Lists all assignments of the campaign to areas and stores. **NOTE**: This object is returned only if the Areas and Stores enterprise feature is enabled. Contact [Voucherify Sales](https://www.voucherify.io/contact-sales) to learn more.
## Properties
diff --git a/docs/AccessSettingsUnassign.md b/docs/AccessSettingsUnassign.md
new file mode 100644
index 00000000..3a99cfa6
--- /dev/null
+++ b/docs/AccessSettingsUnassign.md
@@ -0,0 +1,14 @@
+# AccessSettingsUnassign
+
+Unassigns the campaign from an area or a store. Provide the area and/or store IDs in the respective arrays. If a campaign changes assignments between areas or stores, unassign it first. For example, if a campaign is assigned to Area-01, but it must be now assigned to Store-01 within this area, you have to unassign the campaign from Area-01 and assigned to Store-01 only. If you want to assign the campaign to stores only, you do not have to send the area ID.
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**areas_ids** | **List[str]** | List all area IDs from which the campaign will be unassigned. | [optional]
+**area_stores_ids** | **List[str]** | List all store IDs to which the campaign will be unassigned. | [optional]
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/docs/BinApi.md b/docs/BinApi.md
new file mode 100644
index 00000000..be6568d2
--- /dev/null
+++ b/docs/BinApi.md
@@ -0,0 +1,187 @@
+# voucherify.BinApi
+
+All URIs are relative to *https://api.voucherify.io*
+
+Method | HTTP request | Description
+------------- | ------------- | -------------
+[**delete_bin_entry**](BinApi.md#delete_bin_entry) | **DELETE** /v1/trash-bin/{binEntryId} | Delete Bin Entry
+[**list_bin_entries**](BinApi.md#list_bin_entries) | **GET** /v1/trash-bin | List Bin Entries
+
+
+# **delete_bin_entry**
+> delete_bin_entry(bin_entry_id)
+
+Delete Bin Entry
+
+Deletes permanently a bin entry with a given ID.The following resources can be moved to the bin and permanently deleted: - campaigns - vouchers - products - SKUs To use this endpoint and delete a given resource type, you must have the following permissions: - vouchers.delete to delete a voucher, - campaigns.delete to delete a campaign, - products.delete to delete a product or SKU.
+
+### Example
+
+* Api Key Authentication (X-App-Id):
+* Api Key Authentication (X-App-Token):
+
+```python
+import voucherify
+from voucherify.rest import ApiException
+from pprint import pprint
+
+# Defining the host is optional and defaults to https://api.voucherify.io
+# See configuration.py for a list of all supported configuration parameters.
+configuration = voucherify.Configuration(
+ host = "https://api.voucherify.io"
+)
+
+# The client must configure the authentication and authorization parameters
+# in accordance with the API server security policy.
+# Examples for each auth method are provided below, use the example that
+# satisfies your auth use case.
+
+# Configure API key authorization: X-App-Id
+configuration.api_key['X-App-Id'] = os.environ["API_KEY"]
+
+# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
+# configuration.api_key_prefix['X-App-Id'] = 'Bearer'
+
+# Configure API key authorization: X-App-Token
+configuration.api_key['X-App-Token'] = os.environ["API_KEY"]
+
+# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
+# configuration.api_key_prefix['X-App-Token'] = 'Bearer'
+
+# Enter a context with an instance of the API client
+with voucherify.ApiClient(configuration) as api_client:
+ # Create an instance of the API class
+ api_instance = voucherify.BinApi(api_client)
+ bin_entry_id = 'bin_entry_id_example' # str | Provide the unique identifier of the bin entry.
+
+ try:
+ # Delete Bin Entry
+ api_instance.delete_bin_entry(bin_entry_id)
+ except Exception as e:
+ print("Exception when calling BinApi->delete_bin_entry: %s\n" % e)
+```
+
+
+
+### Parameters
+
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **bin_entry_id** | **str**| Provide the unique identifier of the bin entry. |
+
+### Return type
+
+void (empty response body)
+
+### Authorization
+
+[X-App-Id](../README.md#X-App-Id), [X-App-Token](../README.md#X-App-Token)
+
+### HTTP request headers
+
+ - **Content-Type**: Not defined
+ - **Accept**: Not defined
+
+### HTTP response details
+
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+**2XX** | Returns no content if deletion is successful. | - |
+
+[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
+
+# **list_bin_entries**
+> TrashBinListResponseBody list_bin_entries(limit=limit, order=order, starting_after_id=starting_after_id, filters=filters)
+
+List Bin Entries
+
+Retrieves a list of resources moved to the bin. The following resources can be moved to the bin: - campaigns - vouchers - products - SKUs To use this endpoint, you must have the following permissions: - vouchers.read - campaigns.read - products.read
+
+### Example
+
+* Api Key Authentication (X-App-Id):
+* Api Key Authentication (X-App-Token):
+
+```python
+import voucherify
+from voucherify.models.parameter_filters_list_bin import ParameterFiltersListBin
+from voucherify.models.parameter_order_list_bin import ParameterOrderListBin
+from voucherify.models.trash_bin_list_response_body import TrashBinListResponseBody
+from voucherify.rest import ApiException
+from pprint import pprint
+
+# Defining the host is optional and defaults to https://api.voucherify.io
+# See configuration.py for a list of all supported configuration parameters.
+configuration = voucherify.Configuration(
+ host = "https://api.voucherify.io"
+)
+
+# The client must configure the authentication and authorization parameters
+# in accordance with the API server security policy.
+# Examples for each auth method are provided below, use the example that
+# satisfies your auth use case.
+
+# Configure API key authorization: X-App-Id
+configuration.api_key['X-App-Id'] = os.environ["API_KEY"]
+
+# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
+# configuration.api_key_prefix['X-App-Id'] = 'Bearer'
+
+# Configure API key authorization: X-App-Token
+configuration.api_key['X-App-Token'] = os.environ["API_KEY"]
+
+# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
+# configuration.api_key_prefix['X-App-Token'] = 'Bearer'
+
+# Enter a context with an instance of the API client
+with voucherify.ApiClient(configuration) as api_client:
+ # Create an instance of the API class
+ api_instance = voucherify.BinApi(api_client)
+ limit = 56 # int | Limits the number of objects to be returned. The limit can range between 1 and 100 items. If no limit is set, it returns 10 items. (optional)
+ order = voucherify.ParameterOrderListBin() # ParameterOrderListBin | Orders the bin entries according the date and time when they were moved to the bin or according to the bin entry ID. The dash - preceding a sorting option means sorting in a descending order. (optional)
+ starting_after_id = 'starting_after_id_example' # str | A cursor for pagination. It retrieves the events starting after an event with the given ID. (optional)
+ filters = voucherify.ParameterFiltersListBin() # ParameterFiltersListBin | Filters for listing bin entries. (optional)
+
+ try:
+ # List Bin Entries
+ api_response = api_instance.list_bin_entries(limit=limit, order=order, starting_after_id=starting_after_id, filters=filters)
+ print("The response of BinApi->list_bin_entries:\n")
+ pprint(api_response)
+ except Exception as e:
+ print("Exception when calling BinApi->list_bin_entries: %s\n" % e)
+```
+
+
+
+### Parameters
+
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **limit** | **int**| Limits the number of objects to be returned. The limit can range between 1 and 100 items. If no limit is set, it returns 10 items. | [optional]
+ **order** | [**ParameterOrderListBin**](.md)| Orders the bin entries according the date and time when they were moved to the bin or according to the bin entry ID. The dash - preceding a sorting option means sorting in a descending order. | [optional]
+ **starting_after_id** | **str**| A cursor for pagination. It retrieves the events starting after an event with the given ID. | [optional]
+ **filters** | [**ParameterFiltersListBin**](.md)| Filters for listing bin entries. | [optional]
+
+### Return type
+
+[**TrashBinListResponseBody**](TrashBinListResponseBody.md)
+
+### Authorization
+
+[X-App-Id](../README.md#X-App-Id), [X-App-Token](../README.md#X-App-Token)
+
+### HTTP request headers
+
+ - **Content-Type**: Not defined
+ - **Accept**: application/json
+
+### HTTP response details
+
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+**2XX** | Returns the list of all the bin entries matching the query parameters. | - |
+
+[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
+
diff --git a/docs/Campaign.md b/docs/Campaign.md
new file mode 100644
index 00000000..fb007bb6
--- /dev/null
+++ b/docs/Campaign.md
@@ -0,0 +1,44 @@
+# Campaign
+
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**id** | **str** | Unique campaign ID, assigned by Voucherify. | [optional]
+**name** | **str** | Campaign name. | [optional]
+**description** | **str** | An optional field to keep any extra textual information about the campaign such as a campaign description and details. | [optional]
+**campaign_type** | **str** | Type of campaign. | [optional]
+**type** | **str** | Defines whether the campaign can be updated with new vouchers after campaign creation. - `AUTO_UPDATE`: the campaign is dynamic, i.e. vouchers will generate based on set criteria - `STATIC`: vouchers need to be manually published | [optional]
+**voucher** | [**CampaignVoucher**](CampaignVoucher.md) | | [optional]
+**auto_join** | **bool** | Indicates whether customers will be able to auto-join a loyalty campaign if any earning rule is fulfilled. | [optional]
+**join_once** | **bool** | If this value is set to `true`, customers will be able to join the campaign only once. | [optional]
+**use_voucher_metadata_schema** | **bool** | Flag indicating whether the campaign is to use the voucher's metadata schema instead of the campaign metadata schema. | [optional]
+**validity_timeframe** | [**ValidityTimeframe**](ValidityTimeframe.md) | | [optional]
+**validity_day_of_week** | **List[int]** | Integer array corresponding to the particular days of the week in which the voucher is valid. - `0` Sunday - `1` Monday - `2` Tuesday - `3` Wednesday - `4` Thursday - `5` Friday - `6` Saturday | [optional]
+**validity_hours** | [**ValidityHours**](ValidityHours.md) | | [optional]
+**activity_duration_after_publishing** | **str** | Defines the amount of time the vouchers will be active after publishing. The value is shown in the ISO 8601 format. For example, a voucher with the value of P24D will be valid for a duration of 24 days. | [optional]
+**vouchers_count** | **int** | Total number of unique vouchers in campaign. | [optional]
+**start_date** | **datetime** | Activation timestamp defines when the campaign starts to be active in ISO 8601 format. Campaign is *inactive before* this date. | [optional]
+**expiration_date** | **datetime** | Expiration timestamp defines when the campaign expires in ISO 8601 format. Campaign is *inactive after* this date. | [optional]
+**active** | **bool** | A flag to toggle the campaign on or off. You can disable a campaign even though it's within the active period defined by the `start_date` and `expiration_date`. - `true` indicates an *active* campaign - `false` indicates an *inactive* campaign | [optional]
+**metadata** | **object** | The metadata object stores all custom attributes assigned to the campaign. A set of key/value pairs that you can attach to a campaign object. It can be useful for storing additional information about the campaign in a structured format. | [optional]
+**created_at** | **datetime** | Timestamp representing the date and time when the campaign was created. The value is shown in the ISO 8601 format. | [optional]
+**updated_at** | **datetime** | Timestamp representing the date and time when the campaign was last updated in ISO 8601 format. | [optional]
+**category** | **str** | Unique category name. | [optional]
+**creation_status** | **str** | Indicates the status of the campaign creation. | [optional]
+**vouchers_generation_status** | **str** | Indicates the status of the campaign's voucher generation. | [optional]
+**readonly** | **bool** | Indicates whether the campaign can be only read by a restricted user in the Areas and Stores enterprise feature. It is returned only to restricted users; this field is not returned for users with other roles. | [optional]
+**protected** | **bool** | Indicates whether the resource can be deleted. | [optional]
+**category_id** | **str** | Unique category ID that this campaign belongs to. | [optional]
+**categories** | [**List[Category]**](Category.md) | Contains details about the category. | [optional]
+**object** | **str** | The type of the object represented by JSON. This object stores information about the campaign. | [optional] [default to 'campaign']
+**referral_program** | [**ReferralProgram**](ReferralProgram.md) | | [optional]
+**loyalty_tiers_expiration** | [**LoyaltyTiersExpirationAll**](LoyaltyTiersExpirationAll.md) | | [optional]
+**promotion** | [**PromotionTiersList**](PromotionTiersList.md) | | [optional]
+**validation_rules_assignments** | [**ValidationRulesAssignmentsList**](ValidationRulesAssignmentsList.md) | | [optional]
+**access_settings_assignments** | [**AccessSettingsCampaignAssignmentsList**](AccessSettingsCampaignAssignmentsList.md) | | [optional]
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/docs/CampaignBase.md b/docs/CampaignBase.md
index a035510a..97ea392a 100644
--- a/docs/CampaignBase.md
+++ b/docs/CampaignBase.md
@@ -29,6 +29,7 @@ Name | Type | Description | Notes
**category** | **str** | Unique category name. | [optional]
**creation_status** | **str** | Indicates the status of the campaign creation. | [optional]
**vouchers_generation_status** | **str** | Indicates the status of the campaign's voucher generation. | [optional]
+**readonly** | **bool** | Indicates whether the campaign can be only read by a restricted user in the Areas and Stores enterprise feature. It is returned only to restricted users; this field is not returned for users with other roles. | [optional]
**protected** | **bool** | Indicates whether the resource can be deleted. | [optional]
**category_id** | **str** | Unique category ID that this campaign belongs to. | [optional]
**categories** | [**List[Category]**](Category.md) | Contains details about the category. | [optional]
diff --git a/docs/CampaignTemplate.md b/docs/CampaignTemplate.md
new file mode 100644
index 00000000..c97ea6c4
--- /dev/null
+++ b/docs/CampaignTemplate.md
@@ -0,0 +1,18 @@
+# CampaignTemplate
+
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**id** | **str** | Unique identifier of the campaign template. It is assigned by Voucherify. | [optional]
+**name** | **str** | User-defined name of the campaign template. | [optional]
+**description** | **str** | User-defined description of the campaign template. | [optional]
+**campaign_type** | **str** | Type of the campaign used to create the campaign template. Templates created from a promotion tier are converted to `DISCOUNT_COUPONS`. | [optional]
+**created_at** | **datetime** | Timestamp representing the date and time when the campaign template was created. The value is shown in the ISO 8601 format. | [optional]
+**object** | **str** | The type of the object represented by JSON. | [optional] [default to 'campaign_template']
+**updated_at** | **datetime** | Timestamp representing the date and time when the campaign template was last updated. The value is shown in the ISO 8601 format. | [optional]
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/docs/CampaignsApi.md b/docs/CampaignsApi.md
index b6c65b03..f070a29c 100644
--- a/docs/CampaignsApi.md
+++ b/docs/CampaignsApi.md
@@ -245,7 +245,7 @@ configuration.api_key['X-App-Token'] = os.environ["API_KEY"]
with voucherify.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = voucherify.CampaignsApi(api_client)
- campaigns_create_request_body = {"name":"Discount Campaign 4","campaign_type":"DISCOUNT_COUPONS","join_once":true,"type":"AUTO_UPDATE","category_id":"cat_0bb343dee3cdb5ec0c","start_date":"2020-08-16T00:00:00Z","expiration_date":"2023-12-26T00:00:00Z","vouchers_count":3,"voucher":{"type":"DISCOUNT_VOUCHER","discount":{"percent_off":10,"type":"PERCENT"},"redemption":{"quantity":10},"code_config":{"pattern":"10OFF-#######"}},"validity_timeframe":{"interval":"P2D","duration":"P1D"},"validity_day_of_week":[0,1,2],"activity_duration_after_publishing":"P24D","use_voucher_metadata_schema":false,"metadata":{"region":"AMER"}} # CampaignsCreateRequestBody | Specify the details of the campaign that you would like to create. (optional)
+ campaigns_create_request_body = {"name":"Discount Campaign 4","campaign_type":"DISCOUNT_COUPONS","join_once":true,"type":"AUTO_UPDATE","start_date":"2020-08-16T00:00:00Z","expiration_date":"2023-12-26T00:00:00Z","vouchers_count":3,"voucher":{"type":"DISCOUNT_VOUCHER","discount":{"percent_off":10,"type":"PERCENT"},"redemption":{"quantity":10},"code_config":{"pattern":"10OFF-#######"}},"validity_timeframe":{"interval":"P2D","duration":"P1D"},"validity_day_of_week":[0,1,2],"activity_duration_after_publishing":"P24D","use_voucher_metadata_schema":false,"metadata":{"region":"AMER"}} # CampaignsCreateRequestBody | Specify the details of the campaign that you would like to create. (optional)
try:
# Create Campaign
@@ -677,7 +677,7 @@ with voucherify.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = voucherify.CampaignsApi(api_client)
campaign_id = 'campaign_id_example' # str | The ID of an existing campaign to which youre importing the codes. You can either pass the campaign ID, which was assigned by Voucherify, or the name of the campaign as the path parameter value.
- campaigns_import_voucher_item = [{"code":"CODE7","category":"First","redemption":{"quantity":1},"metadata":{"season":"Fall"},"additional_info":"secret-code1","active":true},{"code":"CODE8","category":"Second","redemption":{"quantity":18},"metadata":{"season":"Fall"},"additional_info":"secret-code1","active":true},{"code":"CODE9","category_id":"cat_0bb343dee3cdb5ec0c","redemption":{"quantity":4},"metadata":{"season":"Fall"},"additional_info":"secret-code1","active":true}] # List[CampaignsImportVoucherItem] | Discount type, expiration date and the remaining attributes will be taken from the Campaign settings. (optional)
+ campaigns_import_voucher_item = [{"code":"CODE7","category":"First","redemption":{"quantity":1},"metadata":{"season":"Fall"},"additional_info":"secret-code1","active":true},{"code":"CODE8","category":"Second","redemption":{"quantity":18},"metadata":{"season":"Fall"},"additional_info":"secret-code1","active":true},{"code":"CODE9","redemption":{"quantity":4},"metadata":{"season":"Fall"},"additional_info":"secret-code1","active":true}] # List[CampaignsImportVoucherItem] | Discount type, expiration date and the remaining attributes will be taken from the Campaign settings. (optional)
try:
# Import Vouchers to Campaign
@@ -808,7 +808,7 @@ Name | Type | Description | Notes
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
# **list_campaigns**
-> CampaignsListResponseBody list_campaigns(limit=limit, page=page, campaign_type=campaign_type, expand=expand, order=order)
+> CampaignsListResponseBody list_campaigns(limit=limit, page=page, campaign_type=campaign_type, expand=expand, order=order, filters=filters)
List Campaigns
@@ -824,6 +824,7 @@ import voucherify
from voucherify.models.campaigns_list_response_body import CampaignsListResponseBody
from voucherify.models.parameter_campaign_type import ParameterCampaignType
from voucherify.models.parameter_expand_list_campaigns import ParameterExpandListCampaigns
+from voucherify.models.parameter_filters_list_campaigns import ParameterFiltersListCampaigns
from voucherify.models.parameter_order_list_campaigns import ParameterOrderListCampaigns
from voucherify.rest import ApiException
from pprint import pprint
@@ -860,10 +861,11 @@ with voucherify.ApiClient(configuration) as api_client:
campaign_type = voucherify.ParameterCampaignType() # ParameterCampaignType | This attribute allows filtering by campaign type. (optional)
expand = category # ParameterExpandListCampaigns | Include an expanded categories object in the response. (optional) (default to category)
order = voucherify.ParameterOrderListCampaigns() # ParameterOrderListCampaigns | Sorts the results using one of the filtering options, where the dash - preceding a sorting option means sorting in a descending order. (optional)
+ filters = voucherify.ParameterFiltersListCampaigns() # ParameterFiltersListCampaigns | Filters the results by campaign status or whether the campaign is a referral campaign. (optional)
try:
# List Campaigns
- api_response = api_instance.list_campaigns(limit=limit, page=page, campaign_type=campaign_type, expand=expand, order=order)
+ api_response = api_instance.list_campaigns(limit=limit, page=page, campaign_type=campaign_type, expand=expand, order=order, filters=filters)
print("The response of CampaignsApi->list_campaigns:\n")
pprint(api_response)
except Exception as e:
@@ -882,6 +884,7 @@ Name | Type | Description | Notes
**campaign_type** | [**ParameterCampaignType**](.md)| This attribute allows filtering by campaign type. | [optional]
**expand** | [**ParameterExpandListCampaigns**](.md)| Include an expanded categories object in the response. | [optional] [default to category]
**order** | [**ParameterOrderListCampaigns**](.md)| Sorts the results using one of the filtering options, where the dash - preceding a sorting option means sorting in a descending order. | [optional]
+ **filters** | [**ParameterFiltersListCampaigns**](.md)| Filters the results by campaign status or whether the campaign is a referral campaign. | [optional]
### Return type
diff --git a/docs/CampaignsCreateRequestBody.md b/docs/CampaignsCreateRequestBody.md
index f9c059df..aa45961a 100644
--- a/docs/CampaignsCreateRequestBody.md
+++ b/docs/CampaignsCreateRequestBody.md
@@ -18,15 +18,14 @@ Name | Type | Description | Notes
**validity_day_of_week** | **List[int]** | Integer array corresponding to the particular days of the week in which the voucher is valid. - `0` Sunday - `1` Monday - `2` Tuesday - `3` Wednesday - `4` Thursday - `5` Friday - `6` Saturday | [optional]
**validity_hours** | [**ValidityHours**](ValidityHours.md) | | [optional]
**activity_duration_after_publishing** | **str** | Defines the amount of time the vouchers will be active after publishing. The value is shown in the ISO 8601 format. For example, a voucher with the value of P24D will be valid for a duration of 24 days. | [optional]
-**validation_rules** | **List[str]** | Array containing the ID of the validation rule associated with the promotion tier. | [optional]
**category_id** | **str** | Unique category ID that this campaign belongs to. Either pass this parameter OR the `category`. | [optional]
**category** | **str** | The category assigned to the campaign. Either pass this parameter OR the `category_id`. | [optional]
**metadata** | **object** | | [optional]
+**validation_rules** | **List[str]** | Array containing the ID of the validation rule associated with the promotion tier. | [optional]
**campaign_type** | **str** | | [optional]
**voucher** | [**CampaignsCreateRequestBodyVoucher**](CampaignsCreateRequestBodyVoucher.md) | | [optional]
**referral_program** | [**ReferralProgram**](ReferralProgram.md) | | [optional]
**promotion** | [**CampaignsCreateRequestBodyPromotion**](CampaignsCreateRequestBodyPromotion.md) | | [optional]
-**lucky_draw** | [**LuckyDraw**](LuckyDraw.md) | | [optional]
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
diff --git a/docs/CampaignsCreateResponseBody.md b/docs/CampaignsCreateResponseBody.md
index 9994b6a1..9a6be731 100644
--- a/docs/CampaignsCreateResponseBody.md
+++ b/docs/CampaignsCreateResponseBody.md
@@ -29,6 +29,7 @@ Name | Type | Description | Notes
**category** | **str** | Unique category name. | [optional]
**creation_status** | **str** | Indicates the status of the campaign creation. | [optional]
**vouchers_generation_status** | **str** | Indicates the status of the campaign's voucher generation. | [optional]
+**readonly** | **bool** | Indicates whether the campaign can be only read by a restricted user in the Areas and Stores enterprise feature. It is returned only to restricted users; this field is not returned for users with other roles. | [optional]
**protected** | **bool** | Indicates whether the resource can be deleted. | [optional]
**category_id** | **str** | Unique category ID that this campaign belongs to. | [optional]
**categories** | [**List[Category]**](Category.md) | Contains details about the category. | [optional]
diff --git a/docs/CampaignsGetResponseBody.md b/docs/CampaignsGetResponseBody.md
index 7f080b57..5a495eed 100644
--- a/docs/CampaignsGetResponseBody.md
+++ b/docs/CampaignsGetResponseBody.md
@@ -29,6 +29,7 @@ Name | Type | Description | Notes
**category** | **str** | Unique category name. | [optional]
**creation_status** | **str** | Indicates the status of the campaign creation. | [optional]
**vouchers_generation_status** | **str** | Indicates the status of the campaign's voucher generation. | [optional]
+**readonly** | **bool** | Indicates whether the campaign can be only read by a restricted user in the Areas and Stores enterprise feature. It is returned only to restricted users; this field is not returned for users with other roles. | [optional]
**protected** | **bool** | Indicates whether the resource can be deleted. | [optional]
**category_id** | **str** | Unique category ID that this campaign belongs to. | [optional]
**categories** | [**List[Category]**](Category.md) | Contains details about the category. | [optional]
diff --git a/docs/CampaignsUpdateRequestBody.md b/docs/CampaignsUpdateRequestBody.md
index e5c8eaf2..2adedcad 100644
--- a/docs/CampaignsUpdateRequestBody.md
+++ b/docs/CampaignsUpdateRequestBody.md
@@ -19,14 +19,11 @@ Name | Type | Description | Notes
**join_once** | **bool** | If this value is set to `true`, customers will be able to join the campaign only once. | [optional]
**auto_join** | **bool** | Indicates whether customers will be able to auto-join a loyalty campaign if any earning rule is fulfilled. | [optional]
**type** | **str** | Defines whether the campaign can be updated with new vouchers after campaign creation. - `AUTO_UPDATE`: By choosing the auto update option you will create a campaign that can be enhanced by new vouchers after the time of creation (e.g. by publish vouchers method). - `STATIC`: vouchers need to be manually published. | [optional]
-**discount** | **object** | | [optional]
+**discount** | [**Discount**](Discount.md) | | [optional]
**referral_program** | [**ReferralProgram**](ReferralProgram.md) | | [optional]
**gift** | [**Gift**](Gift.md) | | [optional]
**loyalty_tiers_expiration** | [**LoyaltyTiersExpirationAll**](LoyaltyTiersExpirationAll.md) | | [optional]
**options** | [**CampaignsUpdateRequestBodyOptions**](CampaignsUpdateRequestBodyOptions.md) | | [optional]
-**winners_count** | **str** | It represents the total number of winners in a lucky draw. | [optional]
-**unique_winners_per_draw** | **str** | It indicates whether each winner in a draw is unique or not. | [optional]
-**unique_winners** | **str** | Specifies whether each participant can win only once across multiple draws. | [optional]
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
diff --git a/docs/CampaignsUpdateResponseBody.md b/docs/CampaignsUpdateResponseBody.md
index 2964f0d5..ffccce4e 100644
--- a/docs/CampaignsUpdateResponseBody.md
+++ b/docs/CampaignsUpdateResponseBody.md
@@ -29,6 +29,7 @@ Name | Type | Description | Notes
**category** | **str** | Unique category name. | [optional]
**creation_status** | **str** | Indicates the status of the campaign creation. | [optional]
**vouchers_generation_status** | **str** | Indicates the status of the campaign's voucher generation. | [optional]
+**readonly** | **bool** | Indicates whether the campaign can be only read by a restricted user in the Areas and Stores enterprise feature. It is returned only to restricted users; this field is not returned for users with other roles. | [optional]
**protected** | **bool** | Indicates whether the resource can be deleted. | [optional]
**category_id** | **str** | Unique category ID that this campaign belongs to. | [optional]
**categories** | [**List[Category]**](Category.md) | Contains details about the category. | [optional]
diff --git a/docs/CampaignsVouchersCreateCombinedResponseBodyPublish.md b/docs/CampaignsVouchersCreateCombinedResponseBodyPublish.md
index 222e2717..c811bfa0 100644
--- a/docs/CampaignsVouchersCreateCombinedResponseBodyPublish.md
+++ b/docs/CampaignsVouchersCreateCombinedResponseBodyPublish.md
@@ -8,7 +8,7 @@ Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**object** | **str** | The type of the object represented is by default `list`. To get this list, you need to make a call to the endpoint returned in the `url` attribute. | [optional] [default to 'list']
**count** | **int** | Publication events counter. | [optional]
-**url** | **str** | The endpoint where this list of publications can be accessed using a GET method. `/v1/vouchers/{voucher_code}/publications` | [optional]
+**url** | **str** | The endpoint where this list of publications can be accessed using a **GET** method. `/v1/vouchers/{voucher_code}/publications` | [optional]
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
diff --git a/docs/CampaignsVouchersCreateCombinedResponseBodyRedemption.md b/docs/CampaignsVouchersCreateCombinedResponseBodyRedemption.md
index 899731ab..aad10205 100644
--- a/docs/CampaignsVouchersCreateCombinedResponseBodyRedemption.md
+++ b/docs/CampaignsVouchersCreateCombinedResponseBodyRedemption.md
@@ -10,7 +10,7 @@ Name | Type | Description | Notes
**redeemed_quantity** | **int** | How many times a voucher has already been redeemed. | [optional]
**redeemed_points** | **int** | Total loyalty points redeemed. | [optional]
**object** | **str** | The type of the object represented is by default `list`. To get this list, you need to make a call to the endpoint returned in the url attribute. | [optional] [default to 'list']
-**url** | **str** | The endpoint where this list of redemptions can be accessed using a GET method. `/v1/vouchers/{voucher_code}/redemptions` | [optional]
+**url** | **str** | The endpoint where this list of redemptions can be accessed using a **GET** method. `/v1/vouchers/{voucher_code}/redemptions` | [optional]
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
diff --git a/docs/CampaignsVouchersCreateResponseBodyPublish.md b/docs/CampaignsVouchersCreateResponseBodyPublish.md
index 7afcbdc5..0ef623bd 100644
--- a/docs/CampaignsVouchersCreateResponseBodyPublish.md
+++ b/docs/CampaignsVouchersCreateResponseBodyPublish.md
@@ -8,7 +8,7 @@ Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**object** | **str** | The type of the object represented is by default `list`. To get this list, you need to make a call to the endpoint returned in the `url` attribute. | [optional] [default to 'list']
**count** | **int** | Publication events counter. | [optional]
-**url** | **str** | The endpoint where this list of publications can be accessed using a GET method. `/v1/vouchers/{voucher_code}/publications` | [optional]
+**url** | **str** | The endpoint where this list of publications can be accessed using a **GET** method. `/v1/vouchers/{voucher_code}/publications` | [optional]
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
diff --git a/docs/CampaignsVouchersCreateResponseBodyRedemption.md b/docs/CampaignsVouchersCreateResponseBodyRedemption.md
index 36ca89e6..a4e6a7b1 100644
--- a/docs/CampaignsVouchersCreateResponseBodyRedemption.md
+++ b/docs/CampaignsVouchersCreateResponseBodyRedemption.md
@@ -10,7 +10,7 @@ Name | Type | Description | Notes
**redeemed_quantity** | **int** | How many times a voucher has already been redeemed. | [optional]
**redeemed_points** | **int** | Total loyalty points redeemed. | [optional]
**object** | **str** | The type of the object represented is by default `list`. To get this list, you need to make a call to the endpoint returned in the url attribute. | [optional] [default to 'list']
-**url** | **str** | The endpoint where this list of redemptions can be accessed using a GET method. `/v1/vouchers/{voucher_code}/redemptions` | [optional]
+**url** | **str** | The endpoint where this list of redemptions can be accessed using a **GET** method. `/v1/vouchers/{voucher_code}/redemptions` | [optional]
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
diff --git a/docs/CategoriesCreateRequestBody.md b/docs/CategoriesCreateRequestBody.md
index 00d486e9..5562122d 100644
--- a/docs/CategoriesCreateRequestBody.md
+++ b/docs/CategoriesCreateRequestBody.md
@@ -7,7 +7,7 @@ Request body schema for **POST** `v1/categories`.
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**name** | **str** | Category name. | [optional]
-**hierarchy** | **int** | Category hierarchy. | [optional]
+**hierarchy** | **int** | Category hierarchy. Categories with lower hierarchy are processed before categories with higher hierarchy value. | [optional]
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
diff --git a/docs/CategoriesCreateResponseBody.md b/docs/CategoriesCreateResponseBody.md
index 0dac2ceb..94a5c0dc 100644
--- a/docs/CategoriesCreateResponseBody.md
+++ b/docs/CategoriesCreateResponseBody.md
@@ -8,7 +8,7 @@ Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**id** | **str** | Unique category ID assigned by Voucherify. | [optional]
**name** | **str** | Category name. | [optional]
-**hierarchy** | **int** | Category hierarchy. | [optional]
+**hierarchy** | **int** | Category hierarchy. Categories with lower hierarchy are processed before categories with higher hierarchy value. | [optional]
**object** | **str** | | [optional] [default to 'category']
**created_at** | **datetime** | Timestamp representing the date and time when the category was created. The value is shown in the ISO 8601 format. | [optional]
diff --git a/docs/CategoriesGetResponseBody.md b/docs/CategoriesGetResponseBody.md
index b3c2ee44..650093a8 100644
--- a/docs/CategoriesGetResponseBody.md
+++ b/docs/CategoriesGetResponseBody.md
@@ -8,11 +8,10 @@ Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**id** | **str** | Unique category ID assigned by Voucherify. | [optional]
**name** | **str** | Category name. | [optional]
-**hierarchy** | **int** | Category hierarchy. | [optional]
+**hierarchy** | **int** | Category hierarchy. Categories with lower hierarchy are processed before categories with higher hierarchy value. | [optional]
**object** | **str** | The type of the object represented by the JSON. This object stores information about the category. | [optional] [default to 'category']
**created_at** | **datetime** | Timestamp representing the date and time when the category was created. The value is shown in the ISO 8601 format. | [optional]
**updated_at** | **datetime** | Timestamp representing the date and time when the category was updated. The value is shown in the ISO 8601 format. | [optional]
-**stacking_rules_type** | **str** | The type of the stacking rule eligibility. | [optional]
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
diff --git a/docs/CategoriesUpdateRequestBody.md b/docs/CategoriesUpdateRequestBody.md
index e3f804f6..5a504350 100644
--- a/docs/CategoriesUpdateRequestBody.md
+++ b/docs/CategoriesUpdateRequestBody.md
@@ -7,7 +7,7 @@ Request body schema for **PUT** `v1/categories/{categoryId}`.
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**name** | **str** | Category name. | [optional]
-**hierarchy** | **int** | Category hierarchy. | [optional]
+**hierarchy** | **int** | Category hierarchy. Categories with lower hierarchy are processed before categories with higher hierarchy value. | [optional]
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
diff --git a/docs/CategoriesUpdateResponseBody.md b/docs/CategoriesUpdateResponseBody.md
index 8ed5017d..b5a95301 100644
--- a/docs/CategoriesUpdateResponseBody.md
+++ b/docs/CategoriesUpdateResponseBody.md
@@ -8,7 +8,7 @@ Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**id** | **str** | Unique category ID assigned by Voucherify. | [optional]
**name** | **str** | Category name. | [optional]
-**hierarchy** | **int** | Category hierarchy. | [optional]
+**hierarchy** | **int** | Category hierarchy. Categories with lower hierarchy are processed before categories with higher hierarchy value. | [optional]
**object** | **str** | | [optional] [default to 'category']
**created_at** | **datetime** | Timestamp representing the date and time when the category was created. The value is shown in the ISO 8601 format. | [optional]
**updated_at** | **datetime** | Timestamp representing the date and time when the category was updated. The value is shown in the ISO 8601 format. | [optional]
diff --git a/docs/Category.md b/docs/Category.md
index 79d52977..f6303104 100644
--- a/docs/Category.md
+++ b/docs/Category.md
@@ -8,11 +8,10 @@ Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**id** | **str** | Unique category ID assigned by Voucherify. | [optional]
**name** | **str** | Category name. | [optional]
-**hierarchy** | **int** | Category hierarchy. | [optional]
+**hierarchy** | **int** | Category hierarchy. Categories with lower hierarchy are processed before categories with higher hierarchy value. | [optional]
**object** | **str** | The type of the object represented by the JSON. This object stores information about the category. | [optional] [default to 'category']
**created_at** | **datetime** | Timestamp representing the date and time when the category was created. The value is shown in the ISO 8601 format. | [optional]
**updated_at** | **datetime** | Timestamp representing the date and time when the category was updated. The value is shown in the ISO 8601 format. | [optional]
-**stacking_rules_type** | **str** | The type of the stacking rule eligibility. | [optional]
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
diff --git a/docs/CategoryWithStackingRulesType.md b/docs/CategoryWithStackingRulesType.md
new file mode 100644
index 00000000..389ba583
--- /dev/null
+++ b/docs/CategoryWithStackingRulesType.md
@@ -0,0 +1,19 @@
+# CategoryWithStackingRulesType
+
+Category object with `stacking_rules_type`
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**id** | **str** | Unique category ID assigned by Voucherify. | [optional]
+**name** | **str** | Category name. | [optional]
+**hierarchy** | **int** | Category hierarchy. Categories with lower hierarchy are processed before categories with higher hierarchy value. | [optional]
+**object** | **str** | The type of the object represented by the JSON. This object stores information about the category. | [optional] [default to 'category']
+**created_at** | **datetime** | Timestamp representing the date and time when the category was created. The value is shown in the ISO 8601 format. | [optional]
+**updated_at** | **datetime** | Timestamp representing the date and time when the category was updated. The value is shown in the ISO 8601 format. | [optional]
+**stacking_rules_type** | **str** | The type of the stacking rule eligibility. | [optional]
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/docs/ClientSideApi.md b/docs/ClientSideApi.md
index f0c6841f..e65e5535 100644
--- a/docs/ClientSideApi.md
+++ b/docs/ClientSideApi.md
@@ -278,7 +278,7 @@ Name | Type | Description | Notes
| Status code | Description | Response headers |
|-------------|-------------|------------------|
-**2XX** | Depending on your project settings: all redeemables must be valid or just one must be valid to result as valid redemption. See https://support.voucherify.io/article/604-stacking-rules#application-rules | - |
+**2XX** | Depending on your project settings: all redeemables must be valid or just one must be valid to result as valid redemption. Read more in the [Stacking Rule Documentation](https://support.voucherify.io/article/604-stacking-rules). | - |
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
@@ -456,7 +456,7 @@ Name | Type | Description | Notes
| Status code | Description | Response headers |
|-------------|-------------|------------------|
-**2XX** | Depending on your project settings: all redeemables must be valid or just one must be valid to result as valid validation. See https://support.voucherify.io/article/604-stacking-rules#application-rules | - |
+**2XX** | Depending on your project settings: all redeemables must be valid or just one must be valid to result as valid validation. Read more in the [Stacking Rule Documentation](https://support.voucherify.io/article/604-stacking-rules). | - |
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
diff --git a/docs/ClientValidationsValidateResponseBody.md b/docs/ClientValidationsValidateResponseBody.md
index 587293d1..03df350b 100644
--- a/docs/ClientValidationsValidateResponseBody.md
+++ b/docs/ClientValidationsValidateResponseBody.md
@@ -1,6 +1,6 @@
# ClientValidationsValidateResponseBody
-Response body schema for POST `/validations`.
+Response body schema for **POST** `/validations`.
## Properties
diff --git a/docs/ClientValidationsValidateResponseBodyRedeemablesItem.md b/docs/ClientValidationsValidateResponseBodyRedeemablesItem.md
index 814fa786..7fb42720 100644
--- a/docs/ClientValidationsValidateResponseBodyRedeemablesItem.md
+++ b/docs/ClientValidationsValidateResponseBodyRedeemablesItem.md
@@ -13,7 +13,7 @@ Name | Type | Description | Notes
**inapplicable_to** | [**InapplicableToResultList**](InapplicableToResultList.md) | | [optional]
**result** | [**ClientValidationsValidateResponseBodyRedeemablesItemResult**](ClientValidationsValidateResponseBodyRedeemablesItemResult.md) | | [optional]
**metadata** | **object** | | [optional]
-**categories** | [**List[Category]**](Category.md) | | [optional]
+**categories** | [**List[CategoryWithStackingRulesType]**](CategoryWithStackingRulesType.md) | | [optional]
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
diff --git a/docs/CustomersApi.md b/docs/CustomersApi.md
index 1208440e..c9aa7d16 100644
--- a/docs/CustomersApi.md
+++ b/docs/CustomersApi.md
@@ -938,7 +938,7 @@ Name | Type | Description | Notes
Update Customers in Bulk
-Updates customers in one asynchronous operation. The request can include up to **10 MB** of data. The response returns a unique asynchronous action ID. Use this ID in the query paramater of the GET Async Action endpoint to check, e.g.: - The status of your request (in queue, in progress, done, or failed) - Resources that failed to be updated - The report file with details about the update If a customer object is not found, it is **upserted**. This is shown in the report file in the GET Async Action endpoint. The upserted resources have value false in the found column and true in the updated column. This API request starts a process that affects Voucherify data in bulk. In the case of small jobs (like bulk update), the request is put into a queue and processed when every other bulk request placed in the queue prior to this request is finished.
+Updates customers in one asynchronous operation. The request can include up to **10 MB** of data. The response returns a unique asynchronous action ID. Use this ID in the query paramater of the GET Async Action endpoint to check, e.g.: - The status of your request (in queue, in progress, done, or failed) - Resources that failed to be updated - The report file with details about the update If a customer object is not found, it is **upserted**. This is shown in the report file in the **GET** Async Action endpoint. The upserted resources have value false in the found column and true in the updated column. This API request starts a process that affects Voucherify data in bulk. In the case of small jobs (like bulk update), the request is put into a queue and processed when every other bulk request placed in the queue prior to this request is finished.
### Example
@@ -1025,7 +1025,7 @@ Name | Type | Description | Notes
Update Customers' Metadata in Bulk
-Updates metadata parameters for a list of customers. Every resource in the list will receive the metadata defined in the request. The request can include up to **10 MB** of data. The response returns a unique asynchronous action ID. Use this ID in the query paramater of the GET Async Action endpoint to check, e.g.: - The status of your request (in queue, in progress, done, or failed) - Resources that failed to be updated - The report file with details about the update If a product object is not found, it is **upserted**. This is shown in the report file in the GET Async Action endpoint. The upserted resources have value false in the found column and true in the updated column. This API request starts a process that affects Voucherify data in bulk. In the case of small jobs (like bulk update), the request is put into a queue and processed when every other bulk request placed in the queue prior to this request is finished.
+Updates metadata parameters for a list of customers. Every resource in the list will receive the metadata defined in the request. The request can include up to **10 MB** of data. The response returns a unique asynchronous action ID. Use this ID in the query paramater of the GET Async Action endpoint to check, e.g.: - The status of your request (in queue, in progress, done, or failed) - Resources that failed to be updated - The report file with details about the update If a product object is not found, it is **upserted**. This is shown in the report file in the **GET** Async Action endpoint. The upserted resources have value false in the found column and true in the updated column. This API request starts a process that affects Voucherify data in bulk. In the case of small jobs (like bulk update), the request is put into a queue and processed when every other bulk request placed in the queue prior to this request is finished.
### Example
diff --git a/docs/ExportsApi.md b/docs/ExportsApi.md
index 90bff872..b204c893 100644
--- a/docs/ExportsApi.md
+++ b/docs/ExportsApi.md
@@ -190,6 +190,8 @@ Download the contents of the exported CSV file. 📘 Important notes **Base U
### Example
+* Api Key Authentication (X-App-Id):
+* Api Key Authentication (X-App-Token):
```python
import voucherify
@@ -202,6 +204,22 @@ configuration = voucherify.Configuration(
host = "https://api.voucherify.io"
)
+# The client must configure the authentication and authorization parameters
+# in accordance with the API server security policy.
+# Examples for each auth method are provided below, use the example that
+# satisfies your auth use case.
+
+# Configure API key authorization: X-App-Id
+configuration.api_key['X-App-Id'] = os.environ["API_KEY"]
+
+# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
+# configuration.api_key_prefix['X-App-Id'] = 'Bearer'
+
+# Configure API key authorization: X-App-Token
+configuration.api_key['X-App-Token'] = os.environ["API_KEY"]
+
+# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
+# configuration.api_key_prefix['X-App-Token'] = 'Bearer'
# Enter a context with an instance of the API client
with voucherify.ApiClient(configuration) as api_client:
@@ -235,7 +253,7 @@ Name | Type | Description | Notes
### Authorization
-No authorization required
+[X-App-Id](../README.md#X-App-Id), [X-App-Token](../README.md#X-App-Token)
### HTTP request headers
diff --git a/docs/FilterConditionsDateTime.md b/docs/FilterConditionsDateTime.md
new file mode 100644
index 00000000..4a17ab29
--- /dev/null
+++ b/docs/FilterConditionsDateTime.md
@@ -0,0 +1,18 @@
+# FilterConditionsDateTime
+
+Data filters used to narrow down the data records to be returned in the result.
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**after** | **datetime** | Value is after this date. The value for this parameter is shown in the ISO 8601 format. | [optional]
+**before** | **datetime** | Value is before this date. The value for this parameter is shown in the ISO 8601 format. | [optional]
+**has_value** | **str** | Value is NOT null. The value for this parameter is an empty string. | [optional]
+**is_unknown** | **str** | Value is null. The value for this parameter is an empty string. | [optional]
+**more_than** | **int** | Value is more days ago before the current date and time, e.g. more than `10` days ago. | [optional]
+**less_than** | **int** | Value is less days before the current date and time, e.g. less than `10` days ago. | [optional]
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/docs/FilterConditionsDateTimeConditions.md b/docs/FilterConditionsDateTimeConditions.md
new file mode 100644
index 00000000..5e8ce319
--- /dev/null
+++ b/docs/FilterConditionsDateTimeConditions.md
@@ -0,0 +1,18 @@
+# FilterConditionsDateTimeConditions
+
+Data filters used to narrow down the data records to be returned in the result.
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**after** | **datetime** | Value is after this date. The value for this parameter is shown in the ISO 8601 format. | [optional]
+**before** | **datetime** | Value is before this date. The value for this parameter is shown in the ISO 8601 format. | [optional]
+**has_value** | **str** | Value is NOT null. The value for this parameter is an empty string. | [optional]
+**is_unknown** | **str** | Value is null. The value for this parameter is an empty string. | [optional]
+**more_than** | **int** | Value is more days ago before the current date and time, e.g. more than `10` days ago. | [optional]
+**less_than** | **int** | Value is less days before the current date and time, e.g. less than `10` days ago. | [optional]
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/docs/Location.md b/docs/Location.md
new file mode 100644
index 00000000..b6e8de1f
--- /dev/null
+++ b/docs/Location.md
@@ -0,0 +1,18 @@
+# Location
+
+This is an object representing a location.
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**id** | **str** | Unique location ID, assigned by the Voucherify API. | [optional]
+**object** | **str** | The type of the object represented by JSON. This object stores information about a `location`. | [optional] [default to 'location']
+**name** | **str** | Location name. | [optional]
+**shape** | [**LocationShape**](LocationShape.md) | | [optional]
+**created_at** | **datetime** | Timestamp representing the date and time when the location was created. The value is shown in the ISO 8601 format. | [optional]
+**updated_at** | **datetime** | Timestamp representing the date and time when the location was updated. The value is shown in the ISO 8601 format. | [optional]
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/docs/LocationShape.md b/docs/LocationShape.md
new file mode 100644
index 00000000..a8e7a1b9
--- /dev/null
+++ b/docs/LocationShape.md
@@ -0,0 +1,15 @@
+# LocationShape
+
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**type** | **str** | | [optional]
+**format** | **str** | | [optional]
+**distance** | [**LocationShapeDistance**](LocationShapeDistance.md) | | [optional]
+**geojson** | [**LocationShapeGeojson**](LocationShapeGeojson.md) | | [optional]
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/docs/LocationShapeDistance.md b/docs/LocationShapeDistance.md
new file mode 100644
index 00000000..b5ca8af3
--- /dev/null
+++ b/docs/LocationShapeDistance.md
@@ -0,0 +1,14 @@
+# LocationShapeDistance
+
+Defines the parameters for the circle.
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**center** | **str** | Center of the circle identified by GPS coordinates in decimal degrees. | [optional]
+**radius** | **str** | Defines the radius of the circle. | [optional]
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/docs/LocationShapeGeojson.md b/docs/LocationShapeGeojson.md
new file mode 100644
index 00000000..19d317cc
--- /dev/null
+++ b/docs/LocationShapeGeojson.md
@@ -0,0 +1,13 @@
+# LocationShapeGeojson
+
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**type** | **str** | | [optional]
+**coordinates** | **List[List[int]]** | | [optional]
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/docs/LocationsApi.md b/docs/LocationsApi.md
new file mode 100644
index 00000000..69e88acf
--- /dev/null
+++ b/docs/LocationsApi.md
@@ -0,0 +1,190 @@
+# voucherify.LocationsApi
+
+All URIs are relative to *https://api.voucherify.io*
+
+Method | HTTP request | Description
+------------- | ------------- | -------------
+[**get_location**](LocationsApi.md#get_location) | **GET** /v1/locations/{locationId} | Get Location
+[**list_locations**](LocationsApi.md#list_locations) | **GET** /v1/locations | List Locations
+
+
+# **get_location**
+> LocationsGetResponseBody get_location(location_id)
+
+Get Location
+
+Returns a location object.
+
+### Example
+
+* Api Key Authentication (X-App-Id):
+* Api Key Authentication (X-App-Token):
+
+```python
+import voucherify
+from voucherify.models.locations_get_response_body import LocationsGetResponseBody
+from voucherify.rest import ApiException
+from pprint import pprint
+
+# Defining the host is optional and defaults to https://api.voucherify.io
+# See configuration.py for a list of all supported configuration parameters.
+configuration = voucherify.Configuration(
+ host = "https://api.voucherify.io"
+)
+
+# The client must configure the authentication and authorization parameters
+# in accordance with the API server security policy.
+# Examples for each auth method are provided below, use the example that
+# satisfies your auth use case.
+
+# Configure API key authorization: X-App-Id
+configuration.api_key['X-App-Id'] = os.environ["API_KEY"]
+
+# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
+# configuration.api_key_prefix['X-App-Id'] = 'Bearer'
+
+# Configure API key authorization: X-App-Token
+configuration.api_key['X-App-Token'] = os.environ["API_KEY"]
+
+# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
+# configuration.api_key_prefix['X-App-Token'] = 'Bearer'
+
+# Enter a context with an instance of the API client
+with voucherify.ApiClient(configuration) as api_client:
+ # Create an instance of the API class
+ api_instance = voucherify.LocationsApi(api_client)
+ location_id = 'location_id_example' # str | The unique location ID.
+
+ try:
+ # Get Location
+ api_response = api_instance.get_location(location_id)
+ print("The response of LocationsApi->get_location:\n")
+ pprint(api_response)
+ except Exception as e:
+ print("Exception when calling LocationsApi->get_location: %s\n" % e)
+```
+
+
+
+### Parameters
+
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **location_id** | **str**| The unique location ID. |
+
+### Return type
+
+[**LocationsGetResponseBody**](LocationsGetResponseBody.md)
+
+### Authorization
+
+[X-App-Id](../README.md#X-App-Id), [X-App-Token](../README.md#X-App-Token)
+
+### HTTP request headers
+
+ - **Content-Type**: Not defined
+ - **Accept**: application/json
+
+### HTTP response details
+
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+**2XX** | Returns a location object. | - |
+
+[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
+
+# **list_locations**
+> LocationsListResponseBody list_locations(limit=limit, order=order, filters=filters, end_date=end_date)
+
+List Locations
+
+Returns a list of your locations.
+
+### Example
+
+* Api Key Authentication (X-App-Id):
+* Api Key Authentication (X-App-Token):
+
+```python
+import voucherify
+from voucherify.models.locations_list_response_body import LocationsListResponseBody
+from voucherify.models.parameter_filters_list_locations import ParameterFiltersListLocations
+from voucherify.models.parameter_order_list_locations import ParameterOrderListLocations
+from voucherify.rest import ApiException
+from pprint import pprint
+
+# Defining the host is optional and defaults to https://api.voucherify.io
+# See configuration.py for a list of all supported configuration parameters.
+configuration = voucherify.Configuration(
+ host = "https://api.voucherify.io"
+)
+
+# The client must configure the authentication and authorization parameters
+# in accordance with the API server security policy.
+# Examples for each auth method are provided below, use the example that
+# satisfies your auth use case.
+
+# Configure API key authorization: X-App-Id
+configuration.api_key['X-App-Id'] = os.environ["API_KEY"]
+
+# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
+# configuration.api_key_prefix['X-App-Id'] = 'Bearer'
+
+# Configure API key authorization: X-App-Token
+configuration.api_key['X-App-Token'] = os.environ["API_KEY"]
+
+# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
+# configuration.api_key_prefix['X-App-Token'] = 'Bearer'
+
+# Enter a context with an instance of the API client
+with voucherify.ApiClient(configuration) as api_client:
+ # Create an instance of the API class
+ api_instance = voucherify.LocationsApi(api_client)
+ limit = 56 # int | Limits the number of objects to be returned. The limit can range between 1 and 100 items. If no limit is set, it returns 10 items. (optional)
+ order = voucherify.ParameterOrderListLocations() # ParameterOrderListLocations | Sorts the results using one of the filtering options, where the dash - preceding a sorting option means sorting in a descending order. (optional)
+ filters = voucherify.ParameterFiltersListLocations() # ParameterFiltersListLocations | Filter the locations using one of the available filters. (optional)
+ end_date = '2013-10-20T19:20:30+01:00' # datetime | A filter on the list based on the end date. This will filter out all locations whose end date falls before the specified date and time. A date value must be presented in the ISO 8601 format (2016-11-16T14:14:31Z or 2016-11-16). (optional)
+
+ try:
+ # List Locations
+ api_response = api_instance.list_locations(limit=limit, order=order, filters=filters, end_date=end_date)
+ print("The response of LocationsApi->list_locations:\n")
+ pprint(api_response)
+ except Exception as e:
+ print("Exception when calling LocationsApi->list_locations: %s\n" % e)
+```
+
+
+
+### Parameters
+
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **limit** | **int**| Limits the number of objects to be returned. The limit can range between 1 and 100 items. If no limit is set, it returns 10 items. | [optional]
+ **order** | [**ParameterOrderListLocations**](.md)| Sorts the results using one of the filtering options, where the dash - preceding a sorting option means sorting in a descending order. | [optional]
+ **filters** | [**ParameterFiltersListLocations**](.md)| Filter the locations using one of the available filters. | [optional]
+ **end_date** | **datetime**| A filter on the list based on the end date. This will filter out all locations whose end date falls before the specified date and time. A date value must be presented in the ISO 8601 format (2016-11-16T14:14:31Z or 2016-11-16). | [optional]
+
+### Return type
+
+[**LocationsListResponseBody**](LocationsListResponseBody.md)
+
+### Authorization
+
+[X-App-Id](../README.md#X-App-Id), [X-App-Token](../README.md#X-App-Token)
+
+### HTTP request headers
+
+ - **Content-Type**: Not defined
+ - **Accept**: application/json
+
+### HTTP response details
+
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+**2XX** | Returns a dictionary that contains an array of locations. Each entry in the array is a separate location object. If no more locations are available, the resulting array will be empty. The result can be narrowed down according to specified (or default) filters. | - |
+
+[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
+
diff --git a/docs/LocationsGetResponseBody.md b/docs/LocationsGetResponseBody.md
new file mode 100644
index 00000000..fc65ef6e
--- /dev/null
+++ b/docs/LocationsGetResponseBody.md
@@ -0,0 +1,18 @@
+# LocationsGetResponseBody
+
+Response schema for listing locations using **GET** `/v1/locations/{locationId}`.
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**id** | **str** | Unique location ID, assigned by the Voucherify API. | [optional]
+**object** | **str** | The type of the object represented by JSON. This object stores information about a `location`. | [optional] [default to 'location']
+**name** | **str** | Location name. | [optional]
+**shape** | [**LocationsGetResponseBodyShape**](LocationsGetResponseBodyShape.md) | | [optional]
+**created_at** | **datetime** | Timestamp representing the date and time when the location was created. The value is shown in the ISO 8601 format. | [optional]
+**updated_at** | **datetime** | Timestamp representing the date and time when the location was updated. The value is shown in the ISO 8601 format. | [optional]
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/docs/LocationsGetResponseBodyShape.md b/docs/LocationsGetResponseBodyShape.md
new file mode 100644
index 00000000..c890f7e0
--- /dev/null
+++ b/docs/LocationsGetResponseBodyShape.md
@@ -0,0 +1,15 @@
+# LocationsGetResponseBodyShape
+
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**type** | **str** | | [optional]
+**format** | **str** | | [optional]
+**distance** | [**LocationsGetResponseBodyShapeDistance**](LocationsGetResponseBodyShapeDistance.md) | | [optional]
+**geojson** | [**LocationsGetResponseBodyShapeGeojson**](LocationsGetResponseBodyShapeGeojson.md) | | [optional]
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/docs/LocationsGetResponseBodyShapeDistance.md b/docs/LocationsGetResponseBodyShapeDistance.md
new file mode 100644
index 00000000..c54cdc61
--- /dev/null
+++ b/docs/LocationsGetResponseBodyShapeDistance.md
@@ -0,0 +1,14 @@
+# LocationsGetResponseBodyShapeDistance
+
+Defines the parameters for the circle.
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**center** | **str** | Center of the circle identified by GPS coordinates in decimal degrees. | [optional]
+**radius** | **str** | Defines the radius of the circle. | [optional]
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/docs/LocationsGetResponseBodyShapeGeojson.md b/docs/LocationsGetResponseBodyShapeGeojson.md
new file mode 100644
index 00000000..2f0fb2de
--- /dev/null
+++ b/docs/LocationsGetResponseBodyShapeGeojson.md
@@ -0,0 +1,13 @@
+# LocationsGetResponseBodyShapeGeojson
+
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**type** | **str** | | [optional]
+**coordinates** | **List[List[int]]** | | [optional]
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/docs/LocationsListResponseBody.md b/docs/LocationsListResponseBody.md
new file mode 100644
index 00000000..b3f1dc67
--- /dev/null
+++ b/docs/LocationsListResponseBody.md
@@ -0,0 +1,17 @@
+# LocationsListResponseBody
+
+Response schema for listing locations using **GET** `v1/locations`.
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**object** | **str** | The type of the object represented by JSON. This object stores information about locations in a dictionary. | [optional] [default to 'list']
+**data_ref** | **str** | Identifies the name of the attribute that contains the array of metadata schema objects. | [optional] [default to 'data']
+**data** | [**List[Location]**](Location.md) | Array of location objects. | [optional]
+**total** | **int** | Total number of locations. | [optional]
+**has_more** | **bool** | As query results are always limited (by the limit parameter), the `has_more` flag indicates if there are more records for given filter parameters. This lets you know if you can run another request (with a different end date filter) to get more records returned in the results. | [optional]
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/docs/LoyaltiesCreateCampaignRequestBody.md b/docs/LoyaltiesCreateCampaignRequestBody.md
index 3b3cd45e..78cbb3f1 100644
--- a/docs/LoyaltiesCreateCampaignRequestBody.md
+++ b/docs/LoyaltiesCreateCampaignRequestBody.md
@@ -19,10 +19,10 @@ Name | Type | Description | Notes
**validity_day_of_week** | **List[int]** | Integer array corresponding to the particular days of the week in which the voucher is valid. - `0` Sunday - `1` Monday - `2` Tuesday - `3` Wednesday - `4` Thursday - `5` Friday - `6` Saturday | [optional]
**validity_hours** | [**ValidityHours**](ValidityHours.md) | | [optional]
**activity_duration_after_publishing** | **str** | Defines the amount of time the vouchers will be active after publishing. The value is shown in the ISO 8601 format. For example, a voucher with the value of P24D will be valid for a duration of 24 days. | [optional]
-**validation_rules** | **List[str]** | Array containing the ID of the validation rule associated with the promotion tier. | [optional]
**category_id** | **str** | Unique category ID that this campaign belongs to. Either pass this parameter OR the `category`. | [optional]
**category** | **str** | The category assigned to the campaign. Either pass this parameter OR the `category_id`. | [optional]
**metadata** | **object** | The metadata object stores all custom attributes assigned to the campaign. A set of key/value pairs that you can attach to a campaign object. It can be useful for storing additional information about the campaign in a structured format. | [optional]
+**validation_rules** | **List[str]** | Array containing the ID of the validation rule associated with the promotion tier. | [optional]
**campaign_type** | **str** | Type of campaign. | [optional] [default to 'LOYALTY_PROGRAM']
**voucher** | [**CampaignLoyaltyVoucher**](CampaignLoyaltyVoucher.md) | | [optional]
diff --git a/docs/LoyaltiesCreateCampaignResponseBody.md b/docs/LoyaltiesCreateCampaignResponseBody.md
index 5eb58828..83860f95 100644
--- a/docs/LoyaltiesCreateCampaignResponseBody.md
+++ b/docs/LoyaltiesCreateCampaignResponseBody.md
@@ -29,6 +29,7 @@ Name | Type | Description | Notes
**category** | **str** | Unique category name. | [optional]
**creation_status** | **str** | Indicates the status of the campaign creation. | [optional]
**vouchers_generation_status** | **str** | Indicates the status of the campaign's voucher generation. | [optional]
+**readonly** | **bool** | Indicates whether the campaign can be only read by a restricted user in the Areas and Stores enterprise feature. It is returned only to restricted users; this field is not returned for users with other roles. | [optional]
**protected** | **bool** | Indicates whether the resource can be deleted. | [optional]
**category_id** | **str** | Unique category ID that this campaign belongs to. | [optional]
**categories** | [**List[Category]**](Category.md) | Contains details about the category. | [optional]
diff --git a/docs/LoyaltiesGetCampaignResponseBody.md b/docs/LoyaltiesGetCampaignResponseBody.md
index 57c4c116..0868c716 100644
--- a/docs/LoyaltiesGetCampaignResponseBody.md
+++ b/docs/LoyaltiesGetCampaignResponseBody.md
@@ -29,6 +29,7 @@ Name | Type | Description | Notes
**category** | **str** | Unique category name. | [optional]
**creation_status** | **str** | Indicates the status of the campaign creation. | [optional]
**vouchers_generation_status** | **str** | Indicates the status of the campaign's voucher generation. | [optional]
+**readonly** | **bool** | Indicates whether the campaign can be only read by a restricted user in the Areas and Stores enterprise feature. It is returned only to restricted users; this field is not returned for users with other roles. | [optional]
**protected** | **bool** | Indicates whether the resource can be deleted. | [optional]
**category_id** | **str** | Unique category ID that this campaign belongs to. | [optional]
**categories** | [**List[Category]**](Category.md) | Contains details about the category. | [optional]
diff --git a/docs/LoyaltiesMembersCreateResponseBodyPublish.md b/docs/LoyaltiesMembersCreateResponseBodyPublish.md
index 460afd67..f8f6c8e1 100644
--- a/docs/LoyaltiesMembersCreateResponseBodyPublish.md
+++ b/docs/LoyaltiesMembersCreateResponseBodyPublish.md
@@ -8,7 +8,7 @@ Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**object** | **str** | The type of the object represented is by default `list`. To get this list, you need to make a call to the endpoint returned in the `url` attribute. | [optional] [default to 'list']
**count** | **int** | Publication event counter. | [optional]
-**url** | **str** | The endpoint where this list of publications can be accessed using a GET method. `/v1/vouchers/{voucher_code}/publications` | [optional]
+**url** | **str** | The endpoint where this list of publications can be accessed using a **GET** method. `/v1/vouchers/{voucher_code}/publications` | [optional]
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
diff --git a/docs/LoyaltiesMembersCreateResponseBodyRedemption.md b/docs/LoyaltiesMembersCreateResponseBodyRedemption.md
index c7e0eb26..c42ef5bf 100644
--- a/docs/LoyaltiesMembersCreateResponseBodyRedemption.md
+++ b/docs/LoyaltiesMembersCreateResponseBodyRedemption.md
@@ -10,7 +10,7 @@ Name | Type | Description | Notes
**redeemed_quantity** | **int** | How many times a voucher has already been redeemed. | [optional]
**redeemed_points** | **int** | Total loyalty points redeemed. | [optional]
**object** | **str** | The type of the object represented is by default `list`. To get this list, you need to make a call to the endpoint returned in the url attribute. | [optional] [default to 'list']
-**url** | **str** | The endpoint where this list of redemptions can be accessed using a GET method. `/v1/vouchers/{voucher_code}/redemptions` | [optional]
+**url** | **str** | The endpoint where this list of redemptions can be accessed using a **GET** method. `/v1/vouchers/{voucher_code}/redemptions` | [optional]
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
diff --git a/docs/LoyaltiesMembersGetResponseBodyPublish.md b/docs/LoyaltiesMembersGetResponseBodyPublish.md
index 7100d71b..50e61807 100644
--- a/docs/LoyaltiesMembersGetResponseBodyPublish.md
+++ b/docs/LoyaltiesMembersGetResponseBodyPublish.md
@@ -8,7 +8,7 @@ Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**object** | **str** | The type of the object represented is by default `list`. To get this list, you need to make a call to the endpoint returned in the `url` attribute. | [optional] [default to 'list']
**count** | **int** | Publication event counter. | [optional]
-**url** | **str** | The endpoint where this list of publications can be accessed using a GET method. `/v1/vouchers/{voucher_code}/publications` | [optional]
+**url** | **str** | The endpoint where this list of publications can be accessed using a **GET** method. `/v1/vouchers/{voucher_code}/publications` | [optional]
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
diff --git a/docs/LoyaltiesMembersGetResponseBodyRedemption.md b/docs/LoyaltiesMembersGetResponseBodyRedemption.md
index cc7afcb0..c1eb2049 100644
--- a/docs/LoyaltiesMembersGetResponseBodyRedemption.md
+++ b/docs/LoyaltiesMembersGetResponseBodyRedemption.md
@@ -10,7 +10,7 @@ Name | Type | Description | Notes
**redeemed_quantity** | **int** | How many times a voucher has already been redeemed. | [optional]
**redeemed_points** | **int** | Total loyalty points redeemed. | [optional]
**object** | **str** | The type of the object represented is by default `list`. To get this list, you need to make a call to the endpoint returned in the url attribute. | [optional] [default to 'list']
-**url** | **str** | The endpoint where this list of redemptions can be accessed using a GET method. `/v1/vouchers/{voucher_code}/redemptions` | [optional]
+**url** | **str** | The endpoint where this list of redemptions can be accessed using a **GET** method. `/v1/vouchers/{voucher_code}/redemptions` | [optional]
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
diff --git a/docs/LoyaltiesMembersRedemptionRedeemResponseBody.md b/docs/LoyaltiesMembersRedemptionRedeemResponseBody.md
index e4540ddc..00a13ca3 100644
--- a/docs/LoyaltiesMembersRedemptionRedeemResponseBody.md
+++ b/docs/LoyaltiesMembersRedemptionRedeemResponseBody.md
@@ -24,11 +24,11 @@ Name | Type | Description | Notes
**customer** | [**SimpleCustomer**](SimpleCustomer.md) | | [optional]
**related_object_type** | **str** | Defines the related object. | [optional]
**related_object_id** | **str** | Unique related object ID assigned by Voucherify, i.e. v_lfZi4rcEGe0sN9gmnj40bzwK2FH6QUno for a voucher. | [optional]
-**voucher** | [**LoyaltiesMembersRedemptionRedeemResponseBodyVoucher**](LoyaltiesMembersRedemptionRedeemResponseBodyVoucher.md) | | [optional]
**promotion_tier** | [**PromotionTier**](PromotionTier.md) | | [optional]
**reward** | [**RedemptionRewardResult**](RedemptionRewardResult.md) | | [optional]
**gift** | [**LoyaltiesMembersRedemptionRedeemResponseBodyGift**](LoyaltiesMembersRedemptionRedeemResponseBodyGift.md) | | [optional]
**loyalty_card** | [**LoyaltiesMembersRedemptionRedeemResponseBodyLoyaltyCard**](LoyaltiesMembersRedemptionRedeemResponseBodyLoyaltyCard.md) | | [optional]
+**voucher** | [**LoyaltiesMembersRedemptionRedeemResponseBodyVoucher**](LoyaltiesMembersRedemptionRedeemResponseBodyVoucher.md) | | [optional]
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
diff --git a/docs/LoyaltiesMembersRedemptionRedeemResponseBodyChannel.md b/docs/LoyaltiesMembersRedemptionRedeemResponseBodyChannel.md
index b324fbec..3838926e 100644
--- a/docs/LoyaltiesMembersRedemptionRedeemResponseBodyChannel.md
+++ b/docs/LoyaltiesMembersRedemptionRedeemResponseBodyChannel.md
@@ -6,8 +6,8 @@ Defines the details of the channel through which the redemption was issued.
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
-**channel_id** | **str** | Unique channel ID of the user performing the redemption. This is either a user ID from a user using the Voucherify Dashboard or an X-APP-Id of a user using the API. | [optional]
-**channel_type** | **str** | The source of the channel for the redemption. A `USER` corresponds to the Voucherify Dashboard and an `API` corresponds to the API. | [optional]
+**channel_id** | **str** | Unique channel ID of the user performing the redemption. This is either a user ID from a user using the Voucherify Dashboard or an X-APP-Id of a user using the API. For `AUTO_REDEEM`, it is the reward assignment ID. | [optional]
+**channel_type** | **str** | The source of the channel for the redemption. A `USER` corresponds to the Voucherify Dashboard, `API` corresponds to the API, and `AUTO_REDEEM` corresponds to a loyalty campaign reward that has been redeemed automatically. | [optional]
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
diff --git a/docs/LoyaltiesMembersRedemptionRedeemResponseBodyVoucher.md b/docs/LoyaltiesMembersRedemptionRedeemResponseBodyVoucher.md
index e461a84c..cafb8875 100644
--- a/docs/LoyaltiesMembersRedemptionRedeemResponseBodyVoucher.md
+++ b/docs/LoyaltiesMembersRedemptionRedeemResponseBodyVoucher.md
@@ -33,7 +33,7 @@ Name | Type | Description | Notes
**object** | **str** | The type of the object represented by JSON. Default is `voucher`. | [optional] [default to 'voucher']
**publish** | [**LoyaltiesMembersRedemptionRedeemResponseBodyVoucherPublish**](LoyaltiesMembersRedemptionRedeemResponseBodyVoucherPublish.md) | | [optional]
**redemption** | [**LoyaltiesMembersRedemptionRedeemResponseBodyVoucherRedemption**](LoyaltiesMembersRedemptionRedeemResponseBodyVoucherRedemption.md) | | [optional]
-**categories** | [**List[Category]**](Category.md) | Contains details about the category. | [optional]
+**categories** | **List[object]** | Always returns an empty array. | [optional]
**validation_rules_assignments** | [**ValidationRulesAssignmentsList**](ValidationRulesAssignmentsList.md) | | [optional]
**holder** | [**SimpleCustomer**](SimpleCustomer.md) | | [optional]
diff --git a/docs/LoyaltiesMembersRedemptionRedeemResponseBodyVoucherPublish.md b/docs/LoyaltiesMembersRedemptionRedeemResponseBodyVoucherPublish.md
index c62e1954..6c617715 100644
--- a/docs/LoyaltiesMembersRedemptionRedeemResponseBodyVoucherPublish.md
+++ b/docs/LoyaltiesMembersRedemptionRedeemResponseBodyVoucherPublish.md
@@ -8,7 +8,7 @@ Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**object** | **str** | The type of the object represented is by default `list`. To get this list, you need to make a call to the endpoint returned in the `url` attribute. | [optional] [default to 'list']
**count** | **int** | Publication events counter. | [optional]
-**url** | **str** | The endpoint where this list of publications can be accessed using a GET method. `/v1/vouchers/{voucher_code}/publications` | [optional]
+**url** | **str** | The endpoint where this list of publications can be accessed using a **GET** method. `/v1/vouchers/{voucher_code}/publications` | [optional]
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
diff --git a/docs/LoyaltiesMembersRedemptionRedeemResponseBodyVoucherRedemption.md b/docs/LoyaltiesMembersRedemptionRedeemResponseBodyVoucherRedemption.md
index 614888b1..b35915c6 100644
--- a/docs/LoyaltiesMembersRedemptionRedeemResponseBodyVoucherRedemption.md
+++ b/docs/LoyaltiesMembersRedemptionRedeemResponseBodyVoucherRedemption.md
@@ -10,7 +10,7 @@ Name | Type | Description | Notes
**redeemed_quantity** | **int** | How many times a voucher has already been redeemed. | [optional]
**redeemed_points** | **int** | Total loyalty points redeemed. | [optional]
**object** | **str** | The type of the object represented is by default `list`. To get this list, you need to make a call to the endpoint returned in the url attribute. | [optional] [default to 'list']
-**url** | **str** | The endpoint where this list of redemptions can be accessed using a GET method. `/v1/vouchers/{voucher_code}/redemptions` | [optional]
+**url** | **str** | The endpoint where this list of redemptions can be accessed using a **GET** method. `/v1/vouchers/{voucher_code}/redemptions` | [optional]
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
diff --git a/docs/LoyaltiesMembersTransfersCreateResponseBodyPublish.md b/docs/LoyaltiesMembersTransfersCreateResponseBodyPublish.md
index 26f80bf3..9813c2a6 100644
--- a/docs/LoyaltiesMembersTransfersCreateResponseBodyPublish.md
+++ b/docs/LoyaltiesMembersTransfersCreateResponseBodyPublish.md
@@ -9,7 +9,7 @@ Name | Type | Description | Notes
**object** | **str** | The type of the object represented is by default list. To get this list, you need to make a call to the endpoint returned in the url attribute. | [optional] [default to 'list']
**count** | **int** | Publication events counter. | [optional]
**entries** | **List[str]** | | [optional]
-**url** | **str** | The endpoint where this list of publications can be accessed using a GET method. /v1/vouchers/{voucher_code}/publications | [optional]
+**url** | **str** | The endpoint where this list of publications can be accessed using a **GET** method. /v1/vouchers/{voucher_code}/publications | [optional]
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
diff --git a/docs/LoyaltiesMembersTransfersCreateResponseBodyRedemption.md b/docs/LoyaltiesMembersTransfersCreateResponseBodyRedemption.md
index 22d1f2ed..a65a2302 100644
--- a/docs/LoyaltiesMembersTransfersCreateResponseBodyRedemption.md
+++ b/docs/LoyaltiesMembersTransfersCreateResponseBodyRedemption.md
@@ -10,7 +10,7 @@ Name | Type | Description | Notes
**redeemed_points** | **int** | Total loyalty points redeemed. | [optional]
**redeemed_quantity** | **int** | How many times a voucher has already been redeemed. | [optional]
**object** | **str** | The type of the object represented is by default list. To get this list, you need to make a call to the endpoint returned in the url attribute. | [optional] [default to 'list']
-**url** | **str** | The endpoint where this list of redemptions can be accessed using a GET method. /v1/vouchers/{voucher_code}/redemptions | [optional]
+**url** | **str** | The endpoint where this list of redemptions can be accessed using a **GET** method. /v1/vouchers/{voucher_code}/redemptions | [optional]
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
diff --git a/docs/LoyaltiesRewardAssignmentsGetResponseBodyParametersLoyalty.md b/docs/LoyaltiesRewardAssignmentsGetResponseBodyParametersLoyalty.md
index 224363be..49133865 100644
--- a/docs/LoyaltiesRewardAssignmentsGetResponseBodyParametersLoyalty.md
+++ b/docs/LoyaltiesRewardAssignmentsGetResponseBodyParametersLoyalty.md
@@ -7,6 +7,7 @@ Defines the equivalent points value of the reward.
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**points** | **int** | The number of points required to redeem the reward. | [optional]
+**auto_redeem** | **bool** | Determines if the reward is redeemed automatically when the customer reaches the sufficient number of points to redeem it. Value `true` means that the automatic reward redemption is active. Only one reward can be set to be redeemed automatically in a loyalty campaign, i.e. only one can have the value `true`. | [optional]
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
diff --git a/docs/LoyaltiesRewardsCreateAssignmentResponseBodyParametersLoyalty.md b/docs/LoyaltiesRewardsCreateAssignmentResponseBodyParametersLoyalty.md
index 5bb3d769..1b91f5a4 100644
--- a/docs/LoyaltiesRewardsCreateAssignmentResponseBodyParametersLoyalty.md
+++ b/docs/LoyaltiesRewardsCreateAssignmentResponseBodyParametersLoyalty.md
@@ -7,6 +7,7 @@ Defines the equivalent points value of the reward.
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**points** | **int** | The number of points required to redeem the reward. | [optional]
+**auto_redeem** | **bool** | Determines if the reward is redeemed automatically when the customer reaches the sufficient number of points to redeem it. Value `true` means that the automatic reward redemption is active. Only one reward can be set to be redeemed automatically in a loyalty campaign, i.e. only one can have the value `true`. | [optional]
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
diff --git a/docs/LoyaltiesRewardsGetResponseBodyParametersLoyalty.md b/docs/LoyaltiesRewardsGetResponseBodyParametersLoyalty.md
index ce093a55..042f84d3 100644
--- a/docs/LoyaltiesRewardsGetResponseBodyParametersLoyalty.md
+++ b/docs/LoyaltiesRewardsGetResponseBodyParametersLoyalty.md
@@ -7,6 +7,7 @@ Defines the equivalent points value of the reward.
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**points** | **int** | The number of points required to redeem the reward. | [optional]
+**auto_redeem** | **bool** | Determines if the reward is redeemed automatically when the customer reaches the sufficient number of points to redeem it. Value `true` means that the automatic reward redemption is active. Only one reward can be set to be redeemed automatically in a loyalty campaign, i.e. only one can have the value `true`. | [optional]
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
diff --git a/docs/LoyaltiesRewardsUpdateAssignmentRequestBodyParametersLoyalty.md b/docs/LoyaltiesRewardsUpdateAssignmentRequestBodyParametersLoyalty.md
index 75983274..44a44e7f 100644
--- a/docs/LoyaltiesRewardsUpdateAssignmentRequestBodyParametersLoyalty.md
+++ b/docs/LoyaltiesRewardsUpdateAssignmentRequestBodyParametersLoyalty.md
@@ -7,6 +7,7 @@ Stores the points parameter.
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**points** | **int** | Defines how many points are required to obtain the reward. | [optional]
+**auto_redeem** | **bool** | Determines if the reward is redeemed automatically when the customer reaches the sufficient number of points to redeem it. Value `true` means that the automatic reward redemption is active. Only one reward can be set to be redeemed automatically in a loyalty campaign, i.e. only one can have the value `true`. | [optional]
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
diff --git a/docs/LoyaltiesRewardsUpdateAssignmentResponseBodyParametersLoyalty.md b/docs/LoyaltiesRewardsUpdateAssignmentResponseBodyParametersLoyalty.md
index 64d1049a..cf37e532 100644
--- a/docs/LoyaltiesRewardsUpdateAssignmentResponseBodyParametersLoyalty.md
+++ b/docs/LoyaltiesRewardsUpdateAssignmentResponseBodyParametersLoyalty.md
@@ -7,6 +7,7 @@ Defines the equivalent points value of the reward.
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**points** | **int** | The number of points required to redeem the reward. | [optional]
+**auto_redeem** | **bool** | Determines if the reward is redeemed automatically when the customer reaches the sufficient number of points to redeem it. Value `true` means that the automatic reward redemption is active. Only one reward can be set to be redeemed automatically in a loyalty campaign, i.e. only one can have the value `true`. | [optional]
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
diff --git a/docs/LoyaltiesUpdateCampaignResponseBody.md b/docs/LoyaltiesUpdateCampaignResponseBody.md
index faa913a7..82269a2d 100644
--- a/docs/LoyaltiesUpdateCampaignResponseBody.md
+++ b/docs/LoyaltiesUpdateCampaignResponseBody.md
@@ -29,6 +29,7 @@ Name | Type | Description | Notes
**category** | **str** | Unique category name. | [optional]
**creation_status** | **str** | Indicates the status of the campaign creation. | [optional]
**vouchers_generation_status** | **str** | Indicates the status of the campaign's voucher generation. | [optional]
+**readonly** | **bool** | Indicates whether the campaign can be only read by a restricted user in the Areas and Stores enterprise feature. It is returned only to restricted users; this field is not returned for users with other roles. | [optional]
**protected** | **bool** | Indicates whether the resource can be deleted. | [optional]
**category_id** | **str** | Unique category ID that this campaign belongs to. | [optional]
**categories** | [**List[Category]**](Category.md) | Contains details about the category. | [optional]
diff --git a/docs/LoyaltyCampaign.md b/docs/LoyaltyCampaign.md
index 6bb2f3eb..6e32a055 100644
--- a/docs/LoyaltyCampaign.md
+++ b/docs/LoyaltyCampaign.md
@@ -28,6 +28,7 @@ Name | Type | Description | Notes
**category** | **str** | Unique category name. | [optional]
**creation_status** | **str** | Indicates the status of the campaign creation. | [optional]
**vouchers_generation_status** | **str** | Indicates the status of the campaign's voucher generation. | [optional]
+**readonly** | **bool** | Indicates whether the campaign can be only read by a restricted user in the Areas and Stores enterprise feature. It is returned only to restricted users; this field is not returned for users with other roles. | [optional]
**protected** | **bool** | Indicates whether the resource can be deleted. | [optional]
**category_id** | **str** | Unique category ID that this campaign belongs to. | [optional]
**categories** | [**List[Category]**](Category.md) | Contains details about the category. | [optional]
diff --git a/docs/LoyaltyMemberPublish.md b/docs/LoyaltyMemberPublish.md
index e8ff86fc..f0ddfcb6 100644
--- a/docs/LoyaltyMemberPublish.md
+++ b/docs/LoyaltyMemberPublish.md
@@ -8,7 +8,7 @@ Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**object** | **str** | The type of the object represented is by default `list`. To get this list, you need to make a call to the endpoint returned in the `url` attribute. | [optional] [default to 'list']
**count** | **int** | Publication event counter. | [optional]
-**url** | **str** | The endpoint where this list of publications can be accessed using a GET method. `/v1/vouchers/{voucher_code}/publications` | [optional]
+**url** | **str** | The endpoint where this list of publications can be accessed using a **GET** method. `/v1/vouchers/{voucher_code}/publications` | [optional]
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
diff --git a/docs/LoyaltyMemberRedemption.md b/docs/LoyaltyMemberRedemption.md
index e8b46e83..c1d64496 100644
--- a/docs/LoyaltyMemberRedemption.md
+++ b/docs/LoyaltyMemberRedemption.md
@@ -10,7 +10,7 @@ Name | Type | Description | Notes
**redeemed_quantity** | **int** | How many times a voucher has already been redeemed. | [optional]
**redeemed_points** | **int** | Total loyalty points redeemed. | [optional]
**object** | **str** | The type of the object represented is by default `list`. To get this list, you need to make a call to the endpoint returned in the url attribute. | [optional] [default to 'list']
-**url** | **str** | The endpoint where this list of redemptions can be accessed using a GET method. `/v1/vouchers/{voucher_code}/redemptions` | [optional]
+**url** | **str** | The endpoint where this list of redemptions can be accessed using a **GET** method. `/v1/vouchers/{voucher_code}/redemptions` | [optional]
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
diff --git a/docs/ManagementApi.md b/docs/ManagementApi.md
new file mode 100644
index 00000000..c9b693d2
--- /dev/null
+++ b/docs/ManagementApi.md
@@ -0,0 +1,3380 @@
+# voucherify.ManagementApi
+
+All URIs are relative to *https://api.voucherify.io*
+
+Method | HTTP request | Description
+------------- | ------------- | -------------
+[**assign_user**](ManagementApi.md#assign_user) | **POST** /management/v1/projects/{projectId}/users | Assign User
+[**create_brand**](ManagementApi.md#create_brand) | **POST** /management/v1/projects/{projectId}/branding | Create Brand
+[**create_custom_event_schema**](ManagementApi.md#create_custom_event_schema) | **POST** /management/v1/projects/{projectId}/custom-event-schemas | Create Custom Event Schema
+[**create_metadata_schema**](ManagementApi.md#create_metadata_schema) | **POST** /management/v1/projects/{projectId}/metadata-schemas | Create Metadata Schema
+[**create_project**](ManagementApi.md#create_project) | **POST** /management/v1/projects | Create Project
+[**create_stacking_rules**](ManagementApi.md#create_stacking_rules) | **POST** /management/v1/projects/{projectId}/stacking-rules | Create Stacking Rules
+[**create_webhook**](ManagementApi.md#create_webhook) | **POST** /management/v1/projects/{projectId}/webhooks | Create Webhook
+[**delete_brand**](ManagementApi.md#delete_brand) | **DELETE** /management/v1/projects/{projectId}/branding/{brandingId} | Delete Brand
+[**delete_custom_event_schema**](ManagementApi.md#delete_custom_event_schema) | **DELETE** /management/v1/projects/{projectId}/custom-event-schemas/{customEventSchemaId} | Delete Custom Event Schema
+[**delete_metadata_schema**](ManagementApi.md#delete_metadata_schema) | **DELETE** /management/v1/projects/{projectId}/metadata-schemas/{metadataSchemaId} | Delete Metadata Schema
+[**delete_project**](ManagementApi.md#delete_project) | **DELETE** /management/v1/projects/{projectId} | Delete Project
+[**delete_stacking_rules**](ManagementApi.md#delete_stacking_rules) | **DELETE** /management/v1/projects/{projectId}/stacking-rules/{stackingRulesId} | Delete Stacking Rules
+[**delete_webhook**](ManagementApi.md#delete_webhook) | **DELETE** /management/v1/projects/{projectId}/webhooks/{webhookId} | Delete Webhook
+[**get_brand**](ManagementApi.md#get_brand) | **GET** /management/v1/projects/{projectId}/branding/{brandingId} | Get Brand
+[**get_custom_event_schema**](ManagementApi.md#get_custom_event_schema) | **GET** /management/v1/projects/{projectId}/custom-event-schemas/{customEventSchemaId} | Get Custom Event Schema
+[**get_metadata_schema1**](ManagementApi.md#get_metadata_schema1) | **GET** /management/v1/projects/{projectId}/metadata-schemas/{metadataSchemaId} | Get Metadata Schema
+[**get_project**](ManagementApi.md#get_project) | **GET** /management/v1/projects/{projectId} | Get Project
+[**get_stacking_rules**](ManagementApi.md#get_stacking_rules) | **GET** /management/v1/projects/{projectId}/stacking-rules/{stackingRulesId} | Get Stacking Rules
+[**get_user**](ManagementApi.md#get_user) | **GET** /management/v1/projects/{projectId}/users/{userId} | Get User
+[**get_webhook**](ManagementApi.md#get_webhook) | **GET** /management/v1/projects/{projectId}/webhooks/{webhookId} | Get Webhook
+[**invite_user**](ManagementApi.md#invite_user) | **POST** /management/v1/projects/users/invite | Invite a New User
+[**list_brands**](ManagementApi.md#list_brands) | **GET** /management/v1/projects/{projectId}/branding | List Brands
+[**list_custom_event_schemas**](ManagementApi.md#list_custom_event_schemas) | **GET** /management/v1/projects/{projectId}/custom-event-schemas | List Custom Event Schemas
+[**list_metadata_schemas1**](ManagementApi.md#list_metadata_schemas1) | **GET** /management/v1/projects/{projectId}/metadata-schemas | List Metadata Schemas
+[**list_projects**](ManagementApi.md#list_projects) | **GET** /management/v1/projects | List Projects
+[**list_stacking_rules**](ManagementApi.md#list_stacking_rules) | **GET** /management/v1/projects/{projectId}/stacking-rules | List Stacking Rules
+[**list_users**](ManagementApi.md#list_users) | **GET** /management/v1/projects/{projectId}/users | List Users
+[**list_webhooks**](ManagementApi.md#list_webhooks) | **GET** /management/v1/projects/{projectId}/webhooks | List Webhooks
+[**management_copy_campaign_template**](ManagementApi.md#management_copy_campaign_template) | **POST** /management/v1/projects/{projectId}/templates/campaigns/{campaignTemplateId}/copy | Copy Campaign Template to a Project
+[**management_list_campaign_templates**](ManagementApi.md#management_list_campaign_templates) | **GET** /management/v1/projects/{projectId}/templates/campaigns | List Campaign Templates
+[**unassign_user**](ManagementApi.md#unassign_user) | **DELETE** /management/v1/projects/{projectId}/users/{userId} | Unassign User
+[**update_brand**](ManagementApi.md#update_brand) | **PUT** /management/v1/projects/{projectId}/branding/{brandingId} | Update Brand
+[**update_custom_event_schema**](ManagementApi.md#update_custom_event_schema) | **PUT** /management/v1/projects/{projectId}/custom-event-schemas/{customEventSchemaId} | Update Custom Event Schema
+[**update_metadata_schema**](ManagementApi.md#update_metadata_schema) | **PUT** /management/v1/projects/{projectId}/metadata-schemas/{metadataSchemaId} | Update Metadata Schema
+[**update_project**](ManagementApi.md#update_project) | **PUT** /management/v1/projects/{projectId} | Update Project
+[**update_stacking_rules**](ManagementApi.md#update_stacking_rules) | **PUT** /management/v1/projects/{projectId}/stacking-rules/{stackingRulesId} | Update Stacking Rules
+[**update_user**](ManagementApi.md#update_user) | **PUT** /management/v1/projects/{projectId}/users/{userId} | Update User
+[**update_webhook**](ManagementApi.md#update_webhook) | **PUT** /management/v1/projects/{projectId}/webhooks/{webhookId} | Update Webhook
+
+
+# **assign_user**
+> ManagementProjectsUsersAssignResponseBody assign_user(project_id, management_projects_users_assign_request_body=management_projects_users_assign_request_body)
+
+Assign User
+
+Assigns a user to a given project. The user must be an existing user in Voucherify. 🚧 Correct Use of Data To avoid errors, use the role key with either id or login keys.
+
+### Example
+
+* Api Key Authentication (X-Management-Token):
+* Api Key Authentication (X-Management-Id):
+
+```python
+import voucherify
+from voucherify.models.management_projects_users_assign_request_body import ManagementProjectsUsersAssignRequestBody
+from voucherify.models.management_projects_users_assign_response_body import ManagementProjectsUsersAssignResponseBody
+from voucherify.rest import ApiException
+from pprint import pprint
+
+# Defining the host is optional and defaults to https://api.voucherify.io
+# See configuration.py for a list of all supported configuration parameters.
+configuration = voucherify.Configuration(
+ host = "https://api.voucherify.io"
+)
+
+# The client must configure the authentication and authorization parameters
+# in accordance with the API server security policy.
+# Examples for each auth method are provided below, use the example that
+# satisfies your auth use case.
+
+# Configure API key authorization: X-Management-Token
+configuration.api_key['X-Management-Token'] = os.environ["API_KEY"]
+
+# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
+# configuration.api_key_prefix['X-Management-Token'] = 'Bearer'
+
+# Configure API key authorization: X-Management-Id
+configuration.api_key['X-Management-Id'] = os.environ["API_KEY"]
+
+# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
+# configuration.api_key_prefix['X-Management-Id'] = 'Bearer'
+
+# Enter a context with an instance of the API client
+with voucherify.ApiClient(configuration) as api_client:
+ # Create an instance of the API class
+ api_instance = voucherify.ManagementApi(api_client)
+ project_id = 'project_id_example' # str | Provide the unique identifier of the project.
+ management_projects_users_assign_request_body = voucherify.ManagementProjectsUsersAssignRequestBody() # ManagementProjectsUsersAssignRequestBody | Defines the user details. (optional)
+
+ try:
+ # Assign User
+ api_response = api_instance.assign_user(project_id, management_projects_users_assign_request_body=management_projects_users_assign_request_body)
+ print("The response of ManagementApi->assign_user:\n")
+ pprint(api_response)
+ except Exception as e:
+ print("Exception when calling ManagementApi->assign_user: %s\n" % e)
+```
+
+
+
+### Parameters
+
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **project_id** | **str**| Provide the unique identifier of the project. |
+ **management_projects_users_assign_request_body** | [**ManagementProjectsUsersAssignRequestBody**](ManagementProjectsUsersAssignRequestBody.md)| Defines the user details. | [optional]
+
+### Return type
+
+[**ManagementProjectsUsersAssignResponseBody**](ManagementProjectsUsersAssignResponseBody.md)
+
+### Authorization
+
+[X-Management-Token](../README.md#X-Management-Token), [X-Management-Id](../README.md#X-Management-Id)
+
+### HTTP request headers
+
+ - **Content-Type**: application/json
+ - **Accept**: application/json
+
+### HTTP response details
+
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+**2XX** | Returns the details about the user assigned to the project. | - |
+
+[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
+
+# **create_brand**
+> ManagementProjectsBrandingCreateResponseBody create_brand(project_id, management_projects_branding_create_request_body=management_projects_branding_create_request_body)
+
+Create Brand
+
+Creates a new brand configuration. You can have only one brand configured for a project. 📘 White Labelling The white labelling settings which can be found in Project Settings > Brand Details and which are available only for Enterprise clients as a separate service can be configured only in the user interface.
+
+### Example
+
+* Api Key Authentication (X-Management-Token):
+* Api Key Authentication (X-Management-Id):
+
+```python
+import voucherify
+from voucherify.models.management_projects_branding_create_request_body import ManagementProjectsBrandingCreateRequestBody
+from voucherify.models.management_projects_branding_create_response_body import ManagementProjectsBrandingCreateResponseBody
+from voucherify.rest import ApiException
+from pprint import pprint
+
+# Defining the host is optional and defaults to https://api.voucherify.io
+# See configuration.py for a list of all supported configuration parameters.
+configuration = voucherify.Configuration(
+ host = "https://api.voucherify.io"
+)
+
+# The client must configure the authentication and authorization parameters
+# in accordance with the API server security policy.
+# Examples for each auth method are provided below, use the example that
+# satisfies your auth use case.
+
+# Configure API key authorization: X-Management-Token
+configuration.api_key['X-Management-Token'] = os.environ["API_KEY"]
+
+# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
+# configuration.api_key_prefix['X-Management-Token'] = 'Bearer'
+
+# Configure API key authorization: X-Management-Id
+configuration.api_key['X-Management-Id'] = os.environ["API_KEY"]
+
+# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
+# configuration.api_key_prefix['X-Management-Id'] = 'Bearer'
+
+# Enter a context with an instance of the API client
+with voucherify.ApiClient(configuration) as api_client:
+ # Create an instance of the API class
+ api_instance = voucherify.ManagementApi(api_client)
+ project_id = 'project_id_example' # str | Provide the unique identifier of the project.
+ management_projects_branding_create_request_body = {"brand":{"name":"Voucherify PSA","privacy_policy_url":null,"terms_of_use_url":null,"permission_reminder":"You are receiving this email because you opted in at our website.","website_url":"voucherify.io"},"address":{"street":"Porcelanowa 23","city":"Katowice","postal":"43-246","state":null,"country":"Poland"},"contact":{"email":"support@voucherify.io","phone":null},"cockpits":{"campaigns_overview_enabled":false,"loyalty_enabled":true,"gift_cards_enabled":true,"coupons_enabled":true,"referrals_enabled":true,"theme":"default","use_custom_double_opt_in_redirect_url":false,"custom_double_opt_in_redirect_url":null}} # ManagementProjectsBrandingCreateRequestBody | Defines a brand configuration. (optional)
+
+ try:
+ # Create Brand
+ api_response = api_instance.create_brand(project_id, management_projects_branding_create_request_body=management_projects_branding_create_request_body)
+ print("The response of ManagementApi->create_brand:\n")
+ pprint(api_response)
+ except Exception as e:
+ print("Exception when calling ManagementApi->create_brand: %s\n" % e)
+```
+
+
+
+### Parameters
+
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **project_id** | **str**| Provide the unique identifier of the project. |
+ **management_projects_branding_create_request_body** | [**ManagementProjectsBrandingCreateRequestBody**](ManagementProjectsBrandingCreateRequestBody.md)| Defines a brand configuration. | [optional]
+
+### Return type
+
+[**ManagementProjectsBrandingCreateResponseBody**](ManagementProjectsBrandingCreateResponseBody.md)
+
+### Authorization
+
+[X-Management-Token](../README.md#X-Management-Token), [X-Management-Id](../README.md#X-Management-Id)
+
+### HTTP request headers
+
+ - **Content-Type**: application/json
+ - **Accept**: application/json
+
+### HTTP response details
+
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+**2XX** | Returns the details about the brand configuration. | - |
+
+[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
+
+# **create_custom_event_schema**
+> ManagementProjectsCustomEventSchemasCreateResponseBody create_custom_event_schema(project_id, management_projects_custom_event_schemas_create_request_body=management_projects_custom_event_schemas_create_request_body)
+
+Create Custom Event Schema
+
+Creates a custom event schema. The properties object is required, but it can be empty, however. This object is for optional custom properties (metadata). 📘 Custom Event Documentation Read [Custom Events](https://support.voucherify.io/article/111-custom-events) article to learn how custom events work in Voucherify. Read also the details about the Track Custom Event endpoint and the Custom Event Object.
+
+### Example
+
+* Api Key Authentication (X-Management-Token):
+* Api Key Authentication (X-Management-Id):
+
+```python
+import voucherify
+from voucherify.models.management_projects_custom_event_schemas_create_request_body import ManagementProjectsCustomEventSchemasCreateRequestBody
+from voucherify.models.management_projects_custom_event_schemas_create_response_body import ManagementProjectsCustomEventSchemasCreateResponseBody
+from voucherify.rest import ApiException
+from pprint import pprint
+
+# Defining the host is optional and defaults to https://api.voucherify.io
+# See configuration.py for a list of all supported configuration parameters.
+configuration = voucherify.Configuration(
+ host = "https://api.voucherify.io"
+)
+
+# The client must configure the authentication and authorization parameters
+# in accordance with the API server security policy.
+# Examples for each auth method are provided below, use the example that
+# satisfies your auth use case.
+
+# Configure API key authorization: X-Management-Token
+configuration.api_key['X-Management-Token'] = os.environ["API_KEY"]
+
+# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
+# configuration.api_key_prefix['X-Management-Token'] = 'Bearer'
+
+# Configure API key authorization: X-Management-Id
+configuration.api_key['X-Management-Id'] = os.environ["API_KEY"]
+
+# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
+# configuration.api_key_prefix['X-Management-Id'] = 'Bearer'
+
+# Enter a context with an instance of the API client
+with voucherify.ApiClient(configuration) as api_client:
+ # Create an instance of the API class
+ api_instance = voucherify.ManagementApi(api_client)
+ project_id = 'project_id_example' # str | Provide the unique identifier of the project.
+ management_projects_custom_event_schemas_create_request_body = voucherify.ManagementProjectsCustomEventSchemasCreateRequestBody() # ManagementProjectsCustomEventSchemasCreateRequestBody | Defines the custom event schema. (optional)
+
+ try:
+ # Create Custom Event Schema
+ api_response = api_instance.create_custom_event_schema(project_id, management_projects_custom_event_schemas_create_request_body=management_projects_custom_event_schemas_create_request_body)
+ print("The response of ManagementApi->create_custom_event_schema:\n")
+ pprint(api_response)
+ except Exception as e:
+ print("Exception when calling ManagementApi->create_custom_event_schema: %s\n" % e)
+```
+
+
+
+### Parameters
+
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **project_id** | **str**| Provide the unique identifier of the project. |
+ **management_projects_custom_event_schemas_create_request_body** | [**ManagementProjectsCustomEventSchemasCreateRequestBody**](ManagementProjectsCustomEventSchemasCreateRequestBody.md)| Defines the custom event schema. | [optional]
+
+### Return type
+
+[**ManagementProjectsCustomEventSchemasCreateResponseBody**](ManagementProjectsCustomEventSchemasCreateResponseBody.md)
+
+### Authorization
+
+[X-Management-Token](../README.md#X-Management-Token), [X-Management-Id](../README.md#X-Management-Id)
+
+### HTTP request headers
+
+ - **Content-Type**: application/json
+ - **Accept**: application/json
+
+### HTTP response details
+
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+**2XX** | Returns the details about the custom event schema. | - |
+
+[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
+
+# **create_metadata_schema**
+> ManagementProjectsMetadataSchemasCreateResponseBody create_metadata_schema(project_id, management_projects_metadata_schemas_create_request_body=management_projects_metadata_schemas_create_request_body)
+
+Create Metadata Schema
+
+Creates a new metadata (custom attribute) schema. The schema consists of a set of key-value pairs to customize Voucherify resources. You can nest your object within a standard metadata schema, e.g. within a campaign or customer schema. However, your nested object cannot include another nested object. The standard metadata schemas are: - Campaign - Voucher - Publication - Redemption - Product - Customer - Order - Order line item - Loyalty Tier - Promotion Tier - Earning rule - Reward 📘 Metadata Documentation Read the Getting Started with Metadata articles to learn how metadata work in Voucherify.
+
+### Example
+
+* Api Key Authentication (X-Management-Token):
+* Api Key Authentication (X-Management-Id):
+
+```python
+import voucherify
+from voucherify.models.management_projects_metadata_schemas_create_request_body import ManagementProjectsMetadataSchemasCreateRequestBody
+from voucherify.models.management_projects_metadata_schemas_create_response_body import ManagementProjectsMetadataSchemasCreateResponseBody
+from voucherify.rest import ApiException
+from pprint import pprint
+
+# Defining the host is optional and defaults to https://api.voucherify.io
+# See configuration.py for a list of all supported configuration parameters.
+configuration = voucherify.Configuration(
+ host = "https://api.voucherify.io"
+)
+
+# The client must configure the authentication and authorization parameters
+# in accordance with the API server security policy.
+# Examples for each auth method are provided below, use the example that
+# satisfies your auth use case.
+
+# Configure API key authorization: X-Management-Token
+configuration.api_key['X-Management-Token'] = os.environ["API_KEY"]
+
+# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
+# configuration.api_key_prefix['X-Management-Token'] = 'Bearer'
+
+# Configure API key authorization: X-Management-Id
+configuration.api_key['X-Management-Id'] = os.environ["API_KEY"]
+
+# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
+# configuration.api_key_prefix['X-Management-Id'] = 'Bearer'
+
+# Enter a context with an instance of the API client
+with voucherify.ApiClient(configuration) as api_client:
+ # Create an instance of the API class
+ api_instance = voucherify.ManagementApi(api_client)
+ project_id = 'project_id_example' # str | Provide the unique identifier of the project.
+ management_projects_metadata_schemas_create_request_body = voucherify.ManagementProjectsMetadataSchemasCreateRequestBody() # ManagementProjectsMetadataSchemasCreateRequestBody | Defines the metadata schema. (optional)
+
+ try:
+ # Create Metadata Schema
+ api_response = api_instance.create_metadata_schema(project_id, management_projects_metadata_schemas_create_request_body=management_projects_metadata_schemas_create_request_body)
+ print("The response of ManagementApi->create_metadata_schema:\n")
+ pprint(api_response)
+ except Exception as e:
+ print("Exception when calling ManagementApi->create_metadata_schema: %s\n" % e)
+```
+
+
+
+### Parameters
+
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **project_id** | **str**| Provide the unique identifier of the project. |
+ **management_projects_metadata_schemas_create_request_body** | [**ManagementProjectsMetadataSchemasCreateRequestBody**](ManagementProjectsMetadataSchemasCreateRequestBody.md)| Defines the metadata schema. | [optional]
+
+### Return type
+
+[**ManagementProjectsMetadataSchemasCreateResponseBody**](ManagementProjectsMetadataSchemasCreateResponseBody.md)
+
+### Authorization
+
+[X-Management-Token](../README.md#X-Management-Token), [X-Management-Id](../README.md#X-Management-Id)
+
+### HTTP request headers
+
+ - **Content-Type**: application/json
+ - **Accept**: application/json
+
+### HTTP response details
+
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+**2XX** | Returns the details about the metadata schema. | - |
+
+[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
+
+# **create_project**
+> ManagementProjectsCreateResponseBody create_project(management_projects_create_request_body=management_projects_create_request_body)
+
+Create Project
+
+Creates a new project. You can add users, specify the cluster, timezone, currency, and other details. All owners are added to the project by default.
+
+### Example
+
+* Api Key Authentication (X-Management-Token):
+* Api Key Authentication (X-Management-Id):
+
+```python
+import voucherify
+from voucherify.models.management_projects_create_request_body import ManagementProjectsCreateRequestBody
+from voucherify.models.management_projects_create_response_body import ManagementProjectsCreateResponseBody
+from voucherify.rest import ApiException
+from pprint import pprint
+
+# Defining the host is optional and defaults to https://api.voucherify.io
+# See configuration.py for a list of all supported configuration parameters.
+configuration = voucherify.Configuration(
+ host = "https://api.voucherify.io"
+)
+
+# The client must configure the authentication and authorization parameters
+# in accordance with the API server security policy.
+# Examples for each auth method are provided below, use the example that
+# satisfies your auth use case.
+
+# Configure API key authorization: X-Management-Token
+configuration.api_key['X-Management-Token'] = os.environ["API_KEY"]
+
+# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
+# configuration.api_key_prefix['X-Management-Token'] = 'Bearer'
+
+# Configure API key authorization: X-Management-Id
+configuration.api_key['X-Management-Id'] = os.environ["API_KEY"]
+
+# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
+# configuration.api_key_prefix['X-Management-Id'] = 'Bearer'
+
+# Enter a context with an instance of the API client
+with voucherify.ApiClient(configuration) as api_client:
+ # Create an instance of the API class
+ api_instance = voucherify.ManagementApi(api_client)
+ management_projects_create_request_body = voucherify.ManagementProjectsCreateRequestBody() # ManagementProjectsCreateRequestBody | Define project details. (optional)
+
+ try:
+ # Create Project
+ api_response = api_instance.create_project(management_projects_create_request_body=management_projects_create_request_body)
+ print("The response of ManagementApi->create_project:\n")
+ pprint(api_response)
+ except Exception as e:
+ print("Exception when calling ManagementApi->create_project: %s\n" % e)
+```
+
+
+
+### Parameters
+
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **management_projects_create_request_body** | [**ManagementProjectsCreateRequestBody**](ManagementProjectsCreateRequestBody.md)| Define project details. | [optional]
+
+### Return type
+
+[**ManagementProjectsCreateResponseBody**](ManagementProjectsCreateResponseBody.md)
+
+### Authorization
+
+[X-Management-Token](../README.md#X-Management-Token), [X-Management-Id](../README.md#X-Management-Id)
+
+### HTTP request headers
+
+ - **Content-Type**: application/json
+ - **Accept**: application/json
+
+### HTTP response details
+
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+**2XX** | Returns the details of a created project. | - |
+
+[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
+
+# **create_stacking_rules**
+> ManagementProjectsStackingRulesCreateResponseBody create_stacking_rules(project_id, management_projects_stacking_rules_create_request_body=management_projects_stacking_rules_create_request_body)
+
+Create Stacking Rules
+
+Overwrites the default stacking rules. If new stacking rules have been created for the project earlier (e.g. in the user interface), it returns an error. Use Update Stacking Rules endpoint to change the rules. 📘 Stacking Rules Documentation Read [the Stacking Rules article](https://support.voucherify.io/article/604-stacking-rules) to learn how they work.
+
+### Example
+
+* Api Key Authentication (X-Management-Token):
+* Api Key Authentication (X-Management-Id):
+
+```python
+import voucherify
+from voucherify.models.management_projects_stacking_rules_create_request_body import ManagementProjectsStackingRulesCreateRequestBody
+from voucherify.models.management_projects_stacking_rules_create_response_body import ManagementProjectsStackingRulesCreateResponseBody
+from voucherify.rest import ApiException
+from pprint import pprint
+
+# Defining the host is optional and defaults to https://api.voucherify.io
+# See configuration.py for a list of all supported configuration parameters.
+configuration = voucherify.Configuration(
+ host = "https://api.voucherify.io"
+)
+
+# The client must configure the authentication and authorization parameters
+# in accordance with the API server security policy.
+# Examples for each auth method are provided below, use the example that
+# satisfies your auth use case.
+
+# Configure API key authorization: X-Management-Token
+configuration.api_key['X-Management-Token'] = os.environ["API_KEY"]
+
+# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
+# configuration.api_key_prefix['X-Management-Token'] = 'Bearer'
+
+# Configure API key authorization: X-Management-Id
+configuration.api_key['X-Management-Id'] = os.environ["API_KEY"]
+
+# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
+# configuration.api_key_prefix['X-Management-Id'] = 'Bearer'
+
+# Enter a context with an instance of the API client
+with voucherify.ApiClient(configuration) as api_client:
+ # Create an instance of the API class
+ api_instance = voucherify.ManagementApi(api_client)
+ project_id = 'project_id_example' # str | Provide the unique identifier of the project.
+ management_projects_stacking_rules_create_request_body = voucherify.ManagementProjectsStackingRulesCreateRequestBody() # ManagementProjectsStackingRulesCreateRequestBody | Defines the stacking rule parameters. (optional)
+
+ try:
+ # Create Stacking Rules
+ api_response = api_instance.create_stacking_rules(project_id, management_projects_stacking_rules_create_request_body=management_projects_stacking_rules_create_request_body)
+ print("The response of ManagementApi->create_stacking_rules:\n")
+ pprint(api_response)
+ except Exception as e:
+ print("Exception when calling ManagementApi->create_stacking_rules: %s\n" % e)
+```
+
+
+
+### Parameters
+
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **project_id** | **str**| Provide the unique identifier of the project. |
+ **management_projects_stacking_rules_create_request_body** | [**ManagementProjectsStackingRulesCreateRequestBody**](ManagementProjectsStackingRulesCreateRequestBody.md)| Defines the stacking rule parameters. | [optional]
+
+### Return type
+
+[**ManagementProjectsStackingRulesCreateResponseBody**](ManagementProjectsStackingRulesCreateResponseBody.md)
+
+### Authorization
+
+[X-Management-Token](../README.md#X-Management-Token), [X-Management-Id](../README.md#X-Management-Id)
+
+### HTTP request headers
+
+ - **Content-Type**: application/json
+ - **Accept**: application/json
+
+### HTTP response details
+
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+**2XX** | Returns the details about the stacking rules assigned to the project. | - |
+
+[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
+
+# **create_webhook**
+> ManagementProjectsWebhooksCreateResponseBody create_webhook(project_id, management_projects_webhooks_create_request_body=management_projects_webhooks_create_request_body)
+
+Create Webhook
+
+Creates a new webhook configuration. 📘 Webhook Documentation Read Webhooks v2024-01-01 article to learn how webhooks work in Voucherify.
+
+### Example
+
+* Api Key Authentication (X-Management-Token):
+* Api Key Authentication (X-Management-Id):
+
+```python
+import voucherify
+from voucherify.models.management_projects_webhooks_create_request_body import ManagementProjectsWebhooksCreateRequestBody
+from voucherify.models.management_projects_webhooks_create_response_body import ManagementProjectsWebhooksCreateResponseBody
+from voucherify.rest import ApiException
+from pprint import pprint
+
+# Defining the host is optional and defaults to https://api.voucherify.io
+# See configuration.py for a list of all supported configuration parameters.
+configuration = voucherify.Configuration(
+ host = "https://api.voucherify.io"
+)
+
+# The client must configure the authentication and authorization parameters
+# in accordance with the API server security policy.
+# Examples for each auth method are provided below, use the example that
+# satisfies your auth use case.
+
+# Configure API key authorization: X-Management-Token
+configuration.api_key['X-Management-Token'] = os.environ["API_KEY"]
+
+# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
+# configuration.api_key_prefix['X-Management-Token'] = 'Bearer'
+
+# Configure API key authorization: X-Management-Id
+configuration.api_key['X-Management-Id'] = os.environ["API_KEY"]
+
+# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
+# configuration.api_key_prefix['X-Management-Id'] = 'Bearer'
+
+# Enter a context with an instance of the API client
+with voucherify.ApiClient(configuration) as api_client:
+ # Create an instance of the API class
+ api_instance = voucherify.ManagementApi(api_client)
+ project_id = 'project_id_example' # str | Provide the unique identifier of the project.
+ management_projects_webhooks_create_request_body = voucherify.ManagementProjectsWebhooksCreateRequestBody() # ManagementProjectsWebhooksCreateRequestBody | Defines a webhook configuration. (optional)
+
+ try:
+ # Create Webhook
+ api_response = api_instance.create_webhook(project_id, management_projects_webhooks_create_request_body=management_projects_webhooks_create_request_body)
+ print("The response of ManagementApi->create_webhook:\n")
+ pprint(api_response)
+ except Exception as e:
+ print("Exception when calling ManagementApi->create_webhook: %s\n" % e)
+```
+
+
+
+### Parameters
+
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **project_id** | **str**| Provide the unique identifier of the project. |
+ **management_projects_webhooks_create_request_body** | [**ManagementProjectsWebhooksCreateRequestBody**](ManagementProjectsWebhooksCreateRequestBody.md)| Defines a webhook configuration. | [optional]
+
+### Return type
+
+[**ManagementProjectsWebhooksCreateResponseBody**](ManagementProjectsWebhooksCreateResponseBody.md)
+
+### Authorization
+
+[X-Management-Token](../README.md#X-Management-Token), [X-Management-Id](../README.md#X-Management-Id)
+
+### HTTP request headers
+
+ - **Content-Type**: application/json
+ - **Accept**: application/json
+
+### HTTP response details
+
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+**2XX** | Returns the details about the webhook configuration. | - |
+
+[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
+
+# **delete_brand**
+> delete_brand(project_id, branding_id)
+
+Delete Brand
+
+Deletes permanently a brand configuration.
+
+### Example
+
+* Api Key Authentication (X-Management-Token):
+* Api Key Authentication (X-Management-Id):
+
+```python
+import voucherify
+from voucherify.rest import ApiException
+from pprint import pprint
+
+# Defining the host is optional and defaults to https://api.voucherify.io
+# See configuration.py for a list of all supported configuration parameters.
+configuration = voucherify.Configuration(
+ host = "https://api.voucherify.io"
+)
+
+# The client must configure the authentication and authorization parameters
+# in accordance with the API server security policy.
+# Examples for each auth method are provided below, use the example that
+# satisfies your auth use case.
+
+# Configure API key authorization: X-Management-Token
+configuration.api_key['X-Management-Token'] = os.environ["API_KEY"]
+
+# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
+# configuration.api_key_prefix['X-Management-Token'] = 'Bearer'
+
+# Configure API key authorization: X-Management-Id
+configuration.api_key['X-Management-Id'] = os.environ["API_KEY"]
+
+# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
+# configuration.api_key_prefix['X-Management-Id'] = 'Bearer'
+
+# Enter a context with an instance of the API client
+with voucherify.ApiClient(configuration) as api_client:
+ # Create an instance of the API class
+ api_instance = voucherify.ManagementApi(api_client)
+ project_id = 'project_id_example' # str | Provide the unique identifier of the project.
+ branding_id = 'branding_id_example' # str | Provide the unique identifier of the brand configuration.
+
+ try:
+ # Delete Brand
+ api_instance.delete_brand(project_id, branding_id)
+ except Exception as e:
+ print("Exception when calling ManagementApi->delete_brand: %s\n" % e)
+```
+
+
+
+### Parameters
+
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **project_id** | **str**| Provide the unique identifier of the project. |
+ **branding_id** | **str**| Provide the unique identifier of the brand configuration. |
+
+### Return type
+
+void (empty response body)
+
+### Authorization
+
+[X-Management-Token](../README.md#X-Management-Token), [X-Management-Id](../README.md#X-Management-Id)
+
+### HTTP request headers
+
+ - **Content-Type**: Not defined
+ - **Accept**: Not defined
+
+### HTTP response details
+
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+**2XX** | Returns no content if the brand configuration has been successfully deleted. | - |
+
+[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
+
+# **delete_custom_event_schema**
+> delete_custom_event_schema(project_id, custom_event_schema_id)
+
+Delete Custom Event Schema
+
+Deletes permanently the custom event schema with its custom properties (metadata). 📘 Custom Event Documentation Read [Custom Events](https://support.voucherify.io/article/111-custom-events) article to learn how custom events work in Voucherify. Read also the details about the Track Custom Event endpoint and the Custom Event Object.
+
+### Example
+
+* Api Key Authentication (X-Management-Token):
+* Api Key Authentication (X-Management-Id):
+
+```python
+import voucherify
+from voucherify.rest import ApiException
+from pprint import pprint
+
+# Defining the host is optional and defaults to https://api.voucherify.io
+# See configuration.py for a list of all supported configuration parameters.
+configuration = voucherify.Configuration(
+ host = "https://api.voucherify.io"
+)
+
+# The client must configure the authentication and authorization parameters
+# in accordance with the API server security policy.
+# Examples for each auth method are provided below, use the example that
+# satisfies your auth use case.
+
+# Configure API key authorization: X-Management-Token
+configuration.api_key['X-Management-Token'] = os.environ["API_KEY"]
+
+# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
+# configuration.api_key_prefix['X-Management-Token'] = 'Bearer'
+
+# Configure API key authorization: X-Management-Id
+configuration.api_key['X-Management-Id'] = os.environ["API_KEY"]
+
+# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
+# configuration.api_key_prefix['X-Management-Id'] = 'Bearer'
+
+# Enter a context with an instance of the API client
+with voucherify.ApiClient(configuration) as api_client:
+ # Create an instance of the API class
+ api_instance = voucherify.ManagementApi(api_client)
+ project_id = 'project_id_example' # str | Provide the unique identifier of the project.
+ custom_event_schema_id = 'custom_event_schema_id_example' # str | Provide the unique identifier of the custom event schema.
+
+ try:
+ # Delete Custom Event Schema
+ api_instance.delete_custom_event_schema(project_id, custom_event_schema_id)
+ except Exception as e:
+ print("Exception when calling ManagementApi->delete_custom_event_schema: %s\n" % e)
+```
+
+
+
+### Parameters
+
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **project_id** | **str**| Provide the unique identifier of the project. |
+ **custom_event_schema_id** | **str**| Provide the unique identifier of the custom event schema. |
+
+### Return type
+
+void (empty response body)
+
+### Authorization
+
+[X-Management-Token](../README.md#X-Management-Token), [X-Management-Id](../README.md#X-Management-Id)
+
+### HTTP request headers
+
+ - **Content-Type**: Not defined
+ - **Accept**: Not defined
+
+### HTTP response details
+
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+**2XX** | Returns no content if the custom event schema has been successfully deleted. | - |
+
+[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
+
+# **delete_metadata_schema**
+> delete_metadata_schema(project_id, metadata_schema_id)
+
+Delete Metadata Schema
+
+Deletes permanently the metadata schema. In standard metadata schemas, this endpoint removes permanently all definitions. The standard metadata schemas are: - Campaign - Voucher - Publication - Redemption - Product - Customer - Order - Order line item - Loyalty Tier - Promotion Tier - Earning rule - Reward If you want to delete only one definition, use the Update Metadata Schema endpoint. In the request, provide the deleted: true pair in the definition object. This definition will be moved to Removed definitions. If you want to create a new standard metadata schema, use the Create Metadata Schema endpoint. 🚧 Metadata Purging This endpoint deletes permanently the metadata schemas only. However, it does not purge the metadata from associated entities, so the metadata added to those entities will remain. If you want to purge metadata from the entities: 1. Remove all the definitions you want to purge. You can do this either in Voucherify Project Settings > Metadata Schema tab or with the Update Metadata Schema endpoint. 2. In Voucherify Project Settings > Metadata Schema tab, go to the relevant metadata schema. 3. In Removed definitions, click the bin button next to the definitions whose metadata you want to purge from entities. Note: - This is an asynchronous action. You will be notified when it has been completed. - You cannot purge metadata for the Redemption and Publication schemas. 4. Use the Delete Metadata Schema request to delete the metadata schema from Voucherify. 📘 Metadata Documentation Read the Getting Started with Metadata articles to learn how metadata work in Voucherify.
+
+### Example
+
+* Api Key Authentication (X-Management-Token):
+* Api Key Authentication (X-Management-Id):
+
+```python
+import voucherify
+from voucherify.rest import ApiException
+from pprint import pprint
+
+# Defining the host is optional and defaults to https://api.voucherify.io
+# See configuration.py for a list of all supported configuration parameters.
+configuration = voucherify.Configuration(
+ host = "https://api.voucherify.io"
+)
+
+# The client must configure the authentication and authorization parameters
+# in accordance with the API server security policy.
+# Examples for each auth method are provided below, use the example that
+# satisfies your auth use case.
+
+# Configure API key authorization: X-Management-Token
+configuration.api_key['X-Management-Token'] = os.environ["API_KEY"]
+
+# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
+# configuration.api_key_prefix['X-Management-Token'] = 'Bearer'
+
+# Configure API key authorization: X-Management-Id
+configuration.api_key['X-Management-Id'] = os.environ["API_KEY"]
+
+# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
+# configuration.api_key_prefix['X-Management-Id'] = 'Bearer'
+
+# Enter a context with an instance of the API client
+with voucherify.ApiClient(configuration) as api_client:
+ # Create an instance of the API class
+ api_instance = voucherify.ManagementApi(api_client)
+ project_id = 'project_id_example' # str | Provide the unique identifier of the project.
+ metadata_schema_id = 'metadata_schema_id_example' # str | Provide the unique identifier of the metadata schema.
+
+ try:
+ # Delete Metadata Schema
+ api_instance.delete_metadata_schema(project_id, metadata_schema_id)
+ except Exception as e:
+ print("Exception when calling ManagementApi->delete_metadata_schema: %s\n" % e)
+```
+
+
+
+### Parameters
+
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **project_id** | **str**| Provide the unique identifier of the project. |
+ **metadata_schema_id** | **str**| Provide the unique identifier of the metadata schema. |
+
+### Return type
+
+void (empty response body)
+
+### Authorization
+
+[X-Management-Token](../README.md#X-Management-Token), [X-Management-Id](../README.md#X-Management-Id)
+
+### HTTP request headers
+
+ - **Content-Type**: Not defined
+ - **Accept**: Not defined
+
+### HTTP response details
+
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+**2XX** | Returns no content if the metadata schema has been successfully deleted. | - |
+
+[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
+
+# **delete_project**
+> delete_project(project_id)
+
+Delete Project
+
+Deletes an existing project. The users currently using the deleted project will be automatically logged out. 🚧 Sandbox Project The sandbox project cannot be deleted.
+
+### Example
+
+* Api Key Authentication (X-Management-Token):
+* Api Key Authentication (X-Management-Id):
+
+```python
+import voucherify
+from voucherify.rest import ApiException
+from pprint import pprint
+
+# Defining the host is optional and defaults to https://api.voucherify.io
+# See configuration.py for a list of all supported configuration parameters.
+configuration = voucherify.Configuration(
+ host = "https://api.voucherify.io"
+)
+
+# The client must configure the authentication and authorization parameters
+# in accordance with the API server security policy.
+# Examples for each auth method are provided below, use the example that
+# satisfies your auth use case.
+
+# Configure API key authorization: X-Management-Token
+configuration.api_key['X-Management-Token'] = os.environ["API_KEY"]
+
+# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
+# configuration.api_key_prefix['X-Management-Token'] = 'Bearer'
+
+# Configure API key authorization: X-Management-Id
+configuration.api_key['X-Management-Id'] = os.environ["API_KEY"]
+
+# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
+# configuration.api_key_prefix['X-Management-Id'] = 'Bearer'
+
+# Enter a context with an instance of the API client
+with voucherify.ApiClient(configuration) as api_client:
+ # Create an instance of the API class
+ api_instance = voucherify.ManagementApi(api_client)
+ project_id = 'project_id_example' # str | Provide the unique identifier of the project.
+
+ try:
+ # Delete Project
+ api_instance.delete_project(project_id)
+ except Exception as e:
+ print("Exception when calling ManagementApi->delete_project: %s\n" % e)
+```
+
+
+
+### Parameters
+
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **project_id** | **str**| Provide the unique identifier of the project. |
+
+### Return type
+
+void (empty response body)
+
+### Authorization
+
+[X-Management-Token](../README.md#X-Management-Token), [X-Management-Id](../README.md#X-Management-Id)
+
+### HTTP request headers
+
+ - **Content-Type**: Not defined
+ - **Accept**: Not defined
+
+### HTTP response details
+
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+**2XX** | Returns no content if deletion is successful. | - |
+
+[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
+
+# **delete_stacking_rules**
+> delete_stacking_rules(project_id, stacking_rules_id)
+
+Delete Stacking Rules
+
+Deletes permanently the current settings for the stacking rules. The stacking rules are restored to default values. 📘 Stacking Rules Documentation Read [the Stacking Rules article](https://support.voucherify.io/article/604-stacking-rules) to learn how they work.
+
+### Example
+
+* Api Key Authentication (X-Management-Token):
+* Api Key Authentication (X-Management-Id):
+
+```python
+import voucherify
+from voucherify.rest import ApiException
+from pprint import pprint
+
+# Defining the host is optional and defaults to https://api.voucherify.io
+# See configuration.py for a list of all supported configuration parameters.
+configuration = voucherify.Configuration(
+ host = "https://api.voucherify.io"
+)
+
+# The client must configure the authentication and authorization parameters
+# in accordance with the API server security policy.
+# Examples for each auth method are provided below, use the example that
+# satisfies your auth use case.
+
+# Configure API key authorization: X-Management-Token
+configuration.api_key['X-Management-Token'] = os.environ["API_KEY"]
+
+# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
+# configuration.api_key_prefix['X-Management-Token'] = 'Bearer'
+
+# Configure API key authorization: X-Management-Id
+configuration.api_key['X-Management-Id'] = os.environ["API_KEY"]
+
+# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
+# configuration.api_key_prefix['X-Management-Id'] = 'Bearer'
+
+# Enter a context with an instance of the API client
+with voucherify.ApiClient(configuration) as api_client:
+ # Create an instance of the API class
+ api_instance = voucherify.ManagementApi(api_client)
+ project_id = 'project_id_example' # str | Provide the unique identifier of the project.
+ stacking_rules_id = 'stacking_rules_id_example' # str | Provide the unique identifier of the stacking rules.
+
+ try:
+ # Delete Stacking Rules
+ api_instance.delete_stacking_rules(project_id, stacking_rules_id)
+ except Exception as e:
+ print("Exception when calling ManagementApi->delete_stacking_rules: %s\n" % e)
+```
+
+
+
+### Parameters
+
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **project_id** | **str**| Provide the unique identifier of the project. |
+ **stacking_rules_id** | **str**| Provide the unique identifier of the stacking rules. |
+
+### Return type
+
+void (empty response body)
+
+### Authorization
+
+[X-Management-Token](../README.md#X-Management-Token), [X-Management-Id](../README.md#X-Management-Id)
+
+### HTTP request headers
+
+ - **Content-Type**: Not defined
+ - **Accept**: Not defined
+
+### HTTP response details
+
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+**2XX** | Returns no content if the stacking rules have been successfully deleted. | - |
+
+[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
+
+# **delete_webhook**
+> delete_webhook(project_id, webhook_id)
+
+Delete Webhook
+
+Deletes a webhook configuration. 📘 Webhook Documentation Read Webhooks v2024-01-1 article to learn how webhooks work in Voucherify.
+
+### Example
+
+* Api Key Authentication (X-Management-Token):
+* Api Key Authentication (X-Management-Id):
+
+```python
+import voucherify
+from voucherify.rest import ApiException
+from pprint import pprint
+
+# Defining the host is optional and defaults to https://api.voucherify.io
+# See configuration.py for a list of all supported configuration parameters.
+configuration = voucherify.Configuration(
+ host = "https://api.voucherify.io"
+)
+
+# The client must configure the authentication and authorization parameters
+# in accordance with the API server security policy.
+# Examples for each auth method are provided below, use the example that
+# satisfies your auth use case.
+
+# Configure API key authorization: X-Management-Token
+configuration.api_key['X-Management-Token'] = os.environ["API_KEY"]
+
+# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
+# configuration.api_key_prefix['X-Management-Token'] = 'Bearer'
+
+# Configure API key authorization: X-Management-Id
+configuration.api_key['X-Management-Id'] = os.environ["API_KEY"]
+
+# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
+# configuration.api_key_prefix['X-Management-Id'] = 'Bearer'
+
+# Enter a context with an instance of the API client
+with voucherify.ApiClient(configuration) as api_client:
+ # Create an instance of the API class
+ api_instance = voucherify.ManagementApi(api_client)
+ project_id = 'project_id_example' # str | Provide the unique identifier of the project.
+ webhook_id = 'webhook_id_example' # str | Provide the unique identifier of the webhook configuration.
+
+ try:
+ # Delete Webhook
+ api_instance.delete_webhook(project_id, webhook_id)
+ except Exception as e:
+ print("Exception when calling ManagementApi->delete_webhook: %s\n" % e)
+```
+
+
+
+### Parameters
+
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **project_id** | **str**| Provide the unique identifier of the project. |
+ **webhook_id** | **str**| Provide the unique identifier of the webhook configuration. |
+
+### Return type
+
+void (empty response body)
+
+### Authorization
+
+[X-Management-Token](../README.md#X-Management-Token), [X-Management-Id](../README.md#X-Management-Id)
+
+### HTTP request headers
+
+ - **Content-Type**: Not defined
+ - **Accept**: Not defined
+
+### HTTP response details
+
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+**2XX** | Returns no content if the webhook configuration has been successfully deleted. | - |
+
+[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
+
+# **get_brand**
+> ManagementProjectsBrandingGetResponseBody get_brand(project_id, branding_id)
+
+Get Brand
+
+Retrieves a brand configuration.
+
+### Example
+
+* Api Key Authentication (X-Management-Token):
+* Api Key Authentication (X-Management-Id):
+
+```python
+import voucherify
+from voucherify.models.management_projects_branding_get_response_body import ManagementProjectsBrandingGetResponseBody
+from voucherify.rest import ApiException
+from pprint import pprint
+
+# Defining the host is optional and defaults to https://api.voucherify.io
+# See configuration.py for a list of all supported configuration parameters.
+configuration = voucherify.Configuration(
+ host = "https://api.voucherify.io"
+)
+
+# The client must configure the authentication and authorization parameters
+# in accordance with the API server security policy.
+# Examples for each auth method are provided below, use the example that
+# satisfies your auth use case.
+
+# Configure API key authorization: X-Management-Token
+configuration.api_key['X-Management-Token'] = os.environ["API_KEY"]
+
+# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
+# configuration.api_key_prefix['X-Management-Token'] = 'Bearer'
+
+# Configure API key authorization: X-Management-Id
+configuration.api_key['X-Management-Id'] = os.environ["API_KEY"]
+
+# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
+# configuration.api_key_prefix['X-Management-Id'] = 'Bearer'
+
+# Enter a context with an instance of the API client
+with voucherify.ApiClient(configuration) as api_client:
+ # Create an instance of the API class
+ api_instance = voucherify.ManagementApi(api_client)
+ project_id = 'project_id_example' # str | Provide the unique identifier of the project.
+ branding_id = 'branding_id_example' # str | Provide the unique identifier of the brand configuration.
+
+ try:
+ # Get Brand
+ api_response = api_instance.get_brand(project_id, branding_id)
+ print("The response of ManagementApi->get_brand:\n")
+ pprint(api_response)
+ except Exception as e:
+ print("Exception when calling ManagementApi->get_brand: %s\n" % e)
+```
+
+
+
+### Parameters
+
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **project_id** | **str**| Provide the unique identifier of the project. |
+ **branding_id** | **str**| Provide the unique identifier of the brand configuration. |
+
+### Return type
+
+[**ManagementProjectsBrandingGetResponseBody**](ManagementProjectsBrandingGetResponseBody.md)
+
+### Authorization
+
+[X-Management-Token](../README.md#X-Management-Token), [X-Management-Id](../README.md#X-Management-Id)
+
+### HTTP request headers
+
+ - **Content-Type**: Not defined
+ - **Accept**: application/json
+
+### HTTP response details
+
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+**2XX** | Returns the brand configuration. | - |
+
+[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
+
+# **get_custom_event_schema**
+> ManagementProjectsCustomEventSchemasGetResponseBody get_custom_event_schema(project_id, custom_event_schema_id)
+
+Get Custom Event Schema
+
+Retrieves a custom event schema. 📘 Custom Event Documentation Read [Custom Events](https://support.voucherify.io/article/111-custom-events) article to learn how custom events work in Voucherify. Read also the details about the Track Custom Event endpoint and the Custom Event Object.
+
+### Example
+
+* Api Key Authentication (X-Management-Token):
+* Api Key Authentication (X-Management-Id):
+
+```python
+import voucherify
+from voucherify.models.management_projects_custom_event_schemas_get_response_body import ManagementProjectsCustomEventSchemasGetResponseBody
+from voucherify.rest import ApiException
+from pprint import pprint
+
+# Defining the host is optional and defaults to https://api.voucherify.io
+# See configuration.py for a list of all supported configuration parameters.
+configuration = voucherify.Configuration(
+ host = "https://api.voucherify.io"
+)
+
+# The client must configure the authentication and authorization parameters
+# in accordance with the API server security policy.
+# Examples for each auth method are provided below, use the example that
+# satisfies your auth use case.
+
+# Configure API key authorization: X-Management-Token
+configuration.api_key['X-Management-Token'] = os.environ["API_KEY"]
+
+# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
+# configuration.api_key_prefix['X-Management-Token'] = 'Bearer'
+
+# Configure API key authorization: X-Management-Id
+configuration.api_key['X-Management-Id'] = os.environ["API_KEY"]
+
+# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
+# configuration.api_key_prefix['X-Management-Id'] = 'Bearer'
+
+# Enter a context with an instance of the API client
+with voucherify.ApiClient(configuration) as api_client:
+ # Create an instance of the API class
+ api_instance = voucherify.ManagementApi(api_client)
+ project_id = 'project_id_example' # str | Provide the unique identifier of the project.
+ custom_event_schema_id = 'custom_event_schema_id_example' # str | Provide the unique identifier of the custom event schema.
+
+ try:
+ # Get Custom Event Schema
+ api_response = api_instance.get_custom_event_schema(project_id, custom_event_schema_id)
+ print("The response of ManagementApi->get_custom_event_schema:\n")
+ pprint(api_response)
+ except Exception as e:
+ print("Exception when calling ManagementApi->get_custom_event_schema: %s\n" % e)
+```
+
+
+
+### Parameters
+
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **project_id** | **str**| Provide the unique identifier of the project. |
+ **custom_event_schema_id** | **str**| Provide the unique identifier of the custom event schema. |
+
+### Return type
+
+[**ManagementProjectsCustomEventSchemasGetResponseBody**](ManagementProjectsCustomEventSchemasGetResponseBody.md)
+
+### Authorization
+
+[X-Management-Token](../README.md#X-Management-Token), [X-Management-Id](../README.md#X-Management-Id)
+
+### HTTP request headers
+
+ - **Content-Type**: Not defined
+ - **Accept**: application/json
+
+### HTTP response details
+
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+**2XX** | Returns the custom event schema. | - |
+
+[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
+
+# **get_metadata_schema1**
+> ManagementProjectsMetadataSchemasGetResponseBody get_metadata_schema1(project_id, metadata_schema_id)
+
+Get Metadata Schema
+
+Retrieves a metadata schema. 📘 Metadata Documentation Read the Getting Started with Metadata articles to learn how metadata work in Voucherify.
+
+### Example
+
+* Api Key Authentication (X-Management-Token):
+* Api Key Authentication (X-Management-Id):
+
+```python
+import voucherify
+from voucherify.models.management_projects_metadata_schemas_get_response_body import ManagementProjectsMetadataSchemasGetResponseBody
+from voucherify.rest import ApiException
+from pprint import pprint
+
+# Defining the host is optional and defaults to https://api.voucherify.io
+# See configuration.py for a list of all supported configuration parameters.
+configuration = voucherify.Configuration(
+ host = "https://api.voucherify.io"
+)
+
+# The client must configure the authentication and authorization parameters
+# in accordance with the API server security policy.
+# Examples for each auth method are provided below, use the example that
+# satisfies your auth use case.
+
+# Configure API key authorization: X-Management-Token
+configuration.api_key['X-Management-Token'] = os.environ["API_KEY"]
+
+# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
+# configuration.api_key_prefix['X-Management-Token'] = 'Bearer'
+
+# Configure API key authorization: X-Management-Id
+configuration.api_key['X-Management-Id'] = os.environ["API_KEY"]
+
+# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
+# configuration.api_key_prefix['X-Management-Id'] = 'Bearer'
+
+# Enter a context with an instance of the API client
+with voucherify.ApiClient(configuration) as api_client:
+ # Create an instance of the API class
+ api_instance = voucherify.ManagementApi(api_client)
+ project_id = 'project_id_example' # str | Provide the unique identifier of the project.
+ metadata_schema_id = 'metadata_schema_id_example' # str | Provide the unique identifier of the metadata schema.
+
+ try:
+ # Get Metadata Schema
+ api_response = api_instance.get_metadata_schema1(project_id, metadata_schema_id)
+ print("The response of ManagementApi->get_metadata_schema1:\n")
+ pprint(api_response)
+ except Exception as e:
+ print("Exception when calling ManagementApi->get_metadata_schema1: %s\n" % e)
+```
+
+
+
+### Parameters
+
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **project_id** | **str**| Provide the unique identifier of the project. |
+ **metadata_schema_id** | **str**| Provide the unique identifier of the metadata schema. |
+
+### Return type
+
+[**ManagementProjectsMetadataSchemasGetResponseBody**](ManagementProjectsMetadataSchemasGetResponseBody.md)
+
+### Authorization
+
+[X-Management-Token](../README.md#X-Management-Token), [X-Management-Id](../README.md#X-Management-Id)
+
+### HTTP request headers
+
+ - **Content-Type**: Not defined
+ - **Accept**: application/json
+
+### HTTP response details
+
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+**2XX** | Returns the metadata schema. | - |
+
+[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
+
+# **get_project**
+> ManagementProjectsGetResponseBody get_project(project_id)
+
+Get Project
+
+Retrieves an existing project.
+
+### Example
+
+* Api Key Authentication (X-Management-Token):
+* Api Key Authentication (X-Management-Id):
+
+```python
+import voucherify
+from voucherify.models.management_projects_get_response_body import ManagementProjectsGetResponseBody
+from voucherify.rest import ApiException
+from pprint import pprint
+
+# Defining the host is optional and defaults to https://api.voucherify.io
+# See configuration.py for a list of all supported configuration parameters.
+configuration = voucherify.Configuration(
+ host = "https://api.voucherify.io"
+)
+
+# The client must configure the authentication and authorization parameters
+# in accordance with the API server security policy.
+# Examples for each auth method are provided below, use the example that
+# satisfies your auth use case.
+
+# Configure API key authorization: X-Management-Token
+configuration.api_key['X-Management-Token'] = os.environ["API_KEY"]
+
+# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
+# configuration.api_key_prefix['X-Management-Token'] = 'Bearer'
+
+# Configure API key authorization: X-Management-Id
+configuration.api_key['X-Management-Id'] = os.environ["API_KEY"]
+
+# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
+# configuration.api_key_prefix['X-Management-Id'] = 'Bearer'
+
+# Enter a context with an instance of the API client
+with voucherify.ApiClient(configuration) as api_client:
+ # Create an instance of the API class
+ api_instance = voucherify.ManagementApi(api_client)
+ project_id = 'project_id_example' # str | Provide the unique identifier of the project.
+
+ try:
+ # Get Project
+ api_response = api_instance.get_project(project_id)
+ print("The response of ManagementApi->get_project:\n")
+ pprint(api_response)
+ except Exception as e:
+ print("Exception when calling ManagementApi->get_project: %s\n" % e)
+```
+
+
+
+### Parameters
+
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **project_id** | **str**| Provide the unique identifier of the project. |
+
+### Return type
+
+[**ManagementProjectsGetResponseBody**](ManagementProjectsGetResponseBody.md)
+
+### Authorization
+
+[X-Management-Token](../README.md#X-Management-Token), [X-Management-Id](../README.md#X-Management-Id)
+
+### HTTP request headers
+
+ - **Content-Type**: Not defined
+ - **Accept**: application/json
+
+### HTTP response details
+
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+**2XX** | Returns the details of a project. | - |
+
+[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
+
+# **get_stacking_rules**
+> ManagementProjectsStackingRulesGetResponseBody get_stacking_rules(project_id, stacking_rules_id)
+
+Get Stacking Rules
+
+Retrieves the stacking rules for the project. 📘 Stacking Rules Documentation Read [the Stacking Rules article](https://support.voucherify.io/article/604-stacking-rules) to learn how they work.
+
+### Example
+
+* Api Key Authentication (X-Management-Token):
+* Api Key Authentication (X-Management-Id):
+
+```python
+import voucherify
+from voucherify.models.management_projects_stacking_rules_get_response_body import ManagementProjectsStackingRulesGetResponseBody
+from voucherify.rest import ApiException
+from pprint import pprint
+
+# Defining the host is optional and defaults to https://api.voucherify.io
+# See configuration.py for a list of all supported configuration parameters.
+configuration = voucherify.Configuration(
+ host = "https://api.voucherify.io"
+)
+
+# The client must configure the authentication and authorization parameters
+# in accordance with the API server security policy.
+# Examples for each auth method are provided below, use the example that
+# satisfies your auth use case.
+
+# Configure API key authorization: X-Management-Token
+configuration.api_key['X-Management-Token'] = os.environ["API_KEY"]
+
+# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
+# configuration.api_key_prefix['X-Management-Token'] = 'Bearer'
+
+# Configure API key authorization: X-Management-Id
+configuration.api_key['X-Management-Id'] = os.environ["API_KEY"]
+
+# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
+# configuration.api_key_prefix['X-Management-Id'] = 'Bearer'
+
+# Enter a context with an instance of the API client
+with voucherify.ApiClient(configuration) as api_client:
+ # Create an instance of the API class
+ api_instance = voucherify.ManagementApi(api_client)
+ project_id = 'project_id_example' # str | Provide the unique identifier of the project.
+ stacking_rules_id = 'stacking_rules_id_example' # str | Provide the unique identifier of the stacking rules.
+
+ try:
+ # Get Stacking Rules
+ api_response = api_instance.get_stacking_rules(project_id, stacking_rules_id)
+ print("The response of ManagementApi->get_stacking_rules:\n")
+ pprint(api_response)
+ except Exception as e:
+ print("Exception when calling ManagementApi->get_stacking_rules: %s\n" % e)
+```
+
+
+
+### Parameters
+
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **project_id** | **str**| Provide the unique identifier of the project. |
+ **stacking_rules_id** | **str**| Provide the unique identifier of the stacking rules. |
+
+### Return type
+
+[**ManagementProjectsStackingRulesGetResponseBody**](ManagementProjectsStackingRulesGetResponseBody.md)
+
+### Authorization
+
+[X-Management-Token](../README.md#X-Management-Token), [X-Management-Id](../README.md#X-Management-Id)
+
+### HTTP request headers
+
+ - **Content-Type**: Not defined
+ - **Accept**: application/json
+
+### HTTP response details
+
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+**2XX** | Returns the stacking rules for the project. | - |
+
+[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
+
+# **get_user**
+> ManagementProjectsUsersGetUserResponseBody get_user(project_id, user_id)
+
+Get User
+
+Retrieves the project users details.
+
+### Example
+
+* Api Key Authentication (X-Management-Token):
+* Api Key Authentication (X-Management-Id):
+
+```python
+import voucherify
+from voucherify.models.management_projects_users_get_user_response_body import ManagementProjectsUsersGetUserResponseBody
+from voucherify.rest import ApiException
+from pprint import pprint
+
+# Defining the host is optional and defaults to https://api.voucherify.io
+# See configuration.py for a list of all supported configuration parameters.
+configuration = voucherify.Configuration(
+ host = "https://api.voucherify.io"
+)
+
+# The client must configure the authentication and authorization parameters
+# in accordance with the API server security policy.
+# Examples for each auth method are provided below, use the example that
+# satisfies your auth use case.
+
+# Configure API key authorization: X-Management-Token
+configuration.api_key['X-Management-Token'] = os.environ["API_KEY"]
+
+# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
+# configuration.api_key_prefix['X-Management-Token'] = 'Bearer'
+
+# Configure API key authorization: X-Management-Id
+configuration.api_key['X-Management-Id'] = os.environ["API_KEY"]
+
+# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
+# configuration.api_key_prefix['X-Management-Id'] = 'Bearer'
+
+# Enter a context with an instance of the API client
+with voucherify.ApiClient(configuration) as api_client:
+ # Create an instance of the API class
+ api_instance = voucherify.ManagementApi(api_client)
+ project_id = 'project_id_example' # str | Provide the unique identifier of the project.
+ user_id = 'user_id_example' # str | Provide the unique identifier of the user. Alternatively, provide the users login.
+
+ try:
+ # Get User
+ api_response = api_instance.get_user(project_id, user_id)
+ print("The response of ManagementApi->get_user:\n")
+ pprint(api_response)
+ except Exception as e:
+ print("Exception when calling ManagementApi->get_user: %s\n" % e)
+```
+
+
+
+### Parameters
+
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **project_id** | **str**| Provide the unique identifier of the project. |
+ **user_id** | **str**| Provide the unique identifier of the user. Alternatively, provide the users login. |
+
+### Return type
+
+[**ManagementProjectsUsersGetUserResponseBody**](ManagementProjectsUsersGetUserResponseBody.md)
+
+### Authorization
+
+[X-Management-Token](../README.md#X-Management-Token), [X-Management-Id](../README.md#X-Management-Id)
+
+### HTTP request headers
+
+ - **Content-Type**: Not defined
+ - **Accept**: application/json
+
+### HTTP response details
+
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+**2XX** | Returns the project user's details. | - |
+
+[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
+
+# **get_webhook**
+> ManagementProjectsWebhooksGetResponseBody get_webhook(project_id, webhook_id)
+
+Get Webhook
+
+Retrieves a webhook configuration. 📘 Webhook Documentation Read Webhooks v2024-01-1 article to learn how webhooks work in Voucherify.
+
+### Example
+
+* Api Key Authentication (X-Management-Token):
+* Api Key Authentication (X-Management-Id):
+
+```python
+import voucherify
+from voucherify.models.management_projects_webhooks_get_response_body import ManagementProjectsWebhooksGetResponseBody
+from voucherify.rest import ApiException
+from pprint import pprint
+
+# Defining the host is optional and defaults to https://api.voucherify.io
+# See configuration.py for a list of all supported configuration parameters.
+configuration = voucherify.Configuration(
+ host = "https://api.voucherify.io"
+)
+
+# The client must configure the authentication and authorization parameters
+# in accordance with the API server security policy.
+# Examples for each auth method are provided below, use the example that
+# satisfies your auth use case.
+
+# Configure API key authorization: X-Management-Token
+configuration.api_key['X-Management-Token'] = os.environ["API_KEY"]
+
+# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
+# configuration.api_key_prefix['X-Management-Token'] = 'Bearer'
+
+# Configure API key authorization: X-Management-Id
+configuration.api_key['X-Management-Id'] = os.environ["API_KEY"]
+
+# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
+# configuration.api_key_prefix['X-Management-Id'] = 'Bearer'
+
+# Enter a context with an instance of the API client
+with voucherify.ApiClient(configuration) as api_client:
+ # Create an instance of the API class
+ api_instance = voucherify.ManagementApi(api_client)
+ project_id = 'project_id_example' # str | Provide the unique identifier of the project.
+ webhook_id = 'webhook_id_example' # str | Provide the unique identifier of the webhook configuration.
+
+ try:
+ # Get Webhook
+ api_response = api_instance.get_webhook(project_id, webhook_id)
+ print("The response of ManagementApi->get_webhook:\n")
+ pprint(api_response)
+ except Exception as e:
+ print("Exception when calling ManagementApi->get_webhook: %s\n" % e)
+```
+
+
+
+### Parameters
+
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **project_id** | **str**| Provide the unique identifier of the project. |
+ **webhook_id** | **str**| Provide the unique identifier of the webhook configuration. |
+
+### Return type
+
+[**ManagementProjectsWebhooksGetResponseBody**](ManagementProjectsWebhooksGetResponseBody.md)
+
+### Authorization
+
+[X-Management-Token](../README.md#X-Management-Token), [X-Management-Id](../README.md#X-Management-Id)
+
+### HTTP request headers
+
+ - **Content-Type**: Not defined
+ - **Accept**: application/json
+
+### HTTP response details
+
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+**2XX** | Returns the webhook configuration. | - |
+
+[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
+
+# **invite_user**
+> invite_user(management_projects_users_invite_create_request_body=management_projects_users_invite_create_request_body)
+
+Invite a New User
+
+Sends an invitation to an email address that has not been used yet as a Voucherify user login. You can specify the projects to which the invited user will be assigned and define their roles.
+
+### Example
+
+* Api Key Authentication (X-Management-Token):
+* Api Key Authentication (X-Management-Id):
+
+```python
+import voucherify
+from voucherify.models.management_projects_users_invite_create_request_body import ManagementProjectsUsersInviteCreateRequestBody
+from voucherify.rest import ApiException
+from pprint import pprint
+
+# Defining the host is optional and defaults to https://api.voucherify.io
+# See configuration.py for a list of all supported configuration parameters.
+configuration = voucherify.Configuration(
+ host = "https://api.voucherify.io"
+)
+
+# The client must configure the authentication and authorization parameters
+# in accordance with the API server security policy.
+# Examples for each auth method are provided below, use the example that
+# satisfies your auth use case.
+
+# Configure API key authorization: X-Management-Token
+configuration.api_key['X-Management-Token'] = os.environ["API_KEY"]
+
+# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
+# configuration.api_key_prefix['X-Management-Token'] = 'Bearer'
+
+# Configure API key authorization: X-Management-Id
+configuration.api_key['X-Management-Id'] = os.environ["API_KEY"]
+
+# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
+# configuration.api_key_prefix['X-Management-Id'] = 'Bearer'
+
+# Enter a context with an instance of the API client
+with voucherify.ApiClient(configuration) as api_client:
+ # Create an instance of the API class
+ api_instance = voucherify.ManagementApi(api_client)
+ management_projects_users_invite_create_request_body = voucherify.ManagementProjectsUsersInviteCreateRequestBody() # ManagementProjectsUsersInviteCreateRequestBody | Defines the details of the invitation, the project, and roles to which the user will be assigned. (optional)
+
+ try:
+ # Invite a New User
+ api_instance.invite_user(management_projects_users_invite_create_request_body=management_projects_users_invite_create_request_body)
+ except Exception as e:
+ print("Exception when calling ManagementApi->invite_user: %s\n" % e)
+```
+
+
+
+### Parameters
+
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **management_projects_users_invite_create_request_body** | [**ManagementProjectsUsersInviteCreateRequestBody**](ManagementProjectsUsersInviteCreateRequestBody.md)| Defines the details of the invitation, the project, and roles to which the user will be assigned. | [optional]
+
+### Return type
+
+void (empty response body)
+
+### Authorization
+
+[X-Management-Token](../README.md#X-Management-Token), [X-Management-Id](../README.md#X-Management-Id)
+
+### HTTP request headers
+
+ - **Content-Type**: application/json
+ - **Accept**: Not defined
+
+### HTTP response details
+
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+**2XX** | Returns no content if the invitation has been sent successfully. | - |
+
+[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
+
+# **list_brands**
+> ManagementProjectsBrandingListResponseBody list_brands(project_id)
+
+List Brands
+
+Lists all brand configurations. Because a project can have only one brand, it always returns a list with one item. This endpoint can be used to retrieve the brand configuration created with the Voucherify Dashboard and the ID.
+
+### Example
+
+* Api Key Authentication (X-Management-Token):
+* Api Key Authentication (X-Management-Id):
+
+```python
+import voucherify
+from voucherify.models.management_projects_branding_list_response_body import ManagementProjectsBrandingListResponseBody
+from voucherify.rest import ApiException
+from pprint import pprint
+
+# Defining the host is optional and defaults to https://api.voucherify.io
+# See configuration.py for a list of all supported configuration parameters.
+configuration = voucherify.Configuration(
+ host = "https://api.voucherify.io"
+)
+
+# The client must configure the authentication and authorization parameters
+# in accordance with the API server security policy.
+# Examples for each auth method are provided below, use the example that
+# satisfies your auth use case.
+
+# Configure API key authorization: X-Management-Token
+configuration.api_key['X-Management-Token'] = os.environ["API_KEY"]
+
+# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
+# configuration.api_key_prefix['X-Management-Token'] = 'Bearer'
+
+# Configure API key authorization: X-Management-Id
+configuration.api_key['X-Management-Id'] = os.environ["API_KEY"]
+
+# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
+# configuration.api_key_prefix['X-Management-Id'] = 'Bearer'
+
+# Enter a context with an instance of the API client
+with voucherify.ApiClient(configuration) as api_client:
+ # Create an instance of the API class
+ api_instance = voucherify.ManagementApi(api_client)
+ project_id = 'project_id_example' # str | Provide the unique identifier of the project.
+
+ try:
+ # List Brands
+ api_response = api_instance.list_brands(project_id)
+ print("The response of ManagementApi->list_brands:\n")
+ pprint(api_response)
+ except Exception as e:
+ print("Exception when calling ManagementApi->list_brands: %s\n" % e)
+```
+
+
+
+### Parameters
+
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **project_id** | **str**| Provide the unique identifier of the project. |
+
+### Return type
+
+[**ManagementProjectsBrandingListResponseBody**](ManagementProjectsBrandingListResponseBody.md)
+
+### Authorization
+
+[X-Management-Token](../README.md#X-Management-Token), [X-Management-Id](../README.md#X-Management-Id)
+
+### HTTP request headers
+
+ - **Content-Type**: Not defined
+ - **Accept**: application/json
+
+### HTTP response details
+
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+**2XX** | Returns the details about the brand created in the project. | - |
+
+[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
+
+# **list_custom_event_schemas**
+> ManagementProjectsCustomEventSchemasListResponseBody list_custom_event_schemas(project_id)
+
+List Custom Event Schemas
+
+Lists all custom event schemas available in the project. 📘 Custom Event Documentation Read [Custom Events](https://support.voucherify.io/article/111-custom-events) article to learn how custom events work in Voucherify. Read also the details about the Track Custom Event endpoint and the Custom Event Object.
+
+### Example
+
+* Api Key Authentication (X-Management-Token):
+* Api Key Authentication (X-Management-Id):
+
+```python
+import voucherify
+from voucherify.models.management_projects_custom_event_schemas_list_response_body import ManagementProjectsCustomEventSchemasListResponseBody
+from voucherify.rest import ApiException
+from pprint import pprint
+
+# Defining the host is optional and defaults to https://api.voucherify.io
+# See configuration.py for a list of all supported configuration parameters.
+configuration = voucherify.Configuration(
+ host = "https://api.voucherify.io"
+)
+
+# The client must configure the authentication and authorization parameters
+# in accordance with the API server security policy.
+# Examples for each auth method are provided below, use the example that
+# satisfies your auth use case.
+
+# Configure API key authorization: X-Management-Token
+configuration.api_key['X-Management-Token'] = os.environ["API_KEY"]
+
+# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
+# configuration.api_key_prefix['X-Management-Token'] = 'Bearer'
+
+# Configure API key authorization: X-Management-Id
+configuration.api_key['X-Management-Id'] = os.environ["API_KEY"]
+
+# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
+# configuration.api_key_prefix['X-Management-Id'] = 'Bearer'
+
+# Enter a context with an instance of the API client
+with voucherify.ApiClient(configuration) as api_client:
+ # Create an instance of the API class
+ api_instance = voucherify.ManagementApi(api_client)
+ project_id = 'project_id_example' # str | Provide the unique identifier of the project.
+
+ try:
+ # List Custom Event Schemas
+ api_response = api_instance.list_custom_event_schemas(project_id)
+ print("The response of ManagementApi->list_custom_event_schemas:\n")
+ pprint(api_response)
+ except Exception as e:
+ print("Exception when calling ManagementApi->list_custom_event_schemas: %s\n" % e)
+```
+
+
+
+### Parameters
+
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **project_id** | **str**| Provide the unique identifier of the project. |
+
+### Return type
+
+[**ManagementProjectsCustomEventSchemasListResponseBody**](ManagementProjectsCustomEventSchemasListResponseBody.md)
+
+### Authorization
+
+[X-Management-Token](../README.md#X-Management-Token), [X-Management-Id](../README.md#X-Management-Id)
+
+### HTTP request headers
+
+ - **Content-Type**: Not defined
+ - **Accept**: application/json
+
+### HTTP response details
+
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+**2XX** | Returns the details about the custom event schemas created in the project. | - |
+
+[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
+
+# **list_metadata_schemas1**
+> ManagementProjectsMetadataSchemasListResponseBody list_metadata_schemas1(project_id)
+
+List Metadata Schemas
+
+Lists all metadata schemas available in the project. 📘 Metadata Documentation Read the Getting Started with Metadata articles to learn how metadata work in Voucherify.
+
+### Example
+
+* Api Key Authentication (X-Management-Token):
+* Api Key Authentication (X-Management-Id):
+
+```python
+import voucherify
+from voucherify.models.management_projects_metadata_schemas_list_response_body import ManagementProjectsMetadataSchemasListResponseBody
+from voucherify.rest import ApiException
+from pprint import pprint
+
+# Defining the host is optional and defaults to https://api.voucherify.io
+# See configuration.py for a list of all supported configuration parameters.
+configuration = voucherify.Configuration(
+ host = "https://api.voucherify.io"
+)
+
+# The client must configure the authentication and authorization parameters
+# in accordance with the API server security policy.
+# Examples for each auth method are provided below, use the example that
+# satisfies your auth use case.
+
+# Configure API key authorization: X-Management-Token
+configuration.api_key['X-Management-Token'] = os.environ["API_KEY"]
+
+# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
+# configuration.api_key_prefix['X-Management-Token'] = 'Bearer'
+
+# Configure API key authorization: X-Management-Id
+configuration.api_key['X-Management-Id'] = os.environ["API_KEY"]
+
+# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
+# configuration.api_key_prefix['X-Management-Id'] = 'Bearer'
+
+# Enter a context with an instance of the API client
+with voucherify.ApiClient(configuration) as api_client:
+ # Create an instance of the API class
+ api_instance = voucherify.ManagementApi(api_client)
+ project_id = 'project_id_example' # str | Provide the unique identifier of the project.
+
+ try:
+ # List Metadata Schemas
+ api_response = api_instance.list_metadata_schemas1(project_id)
+ print("The response of ManagementApi->list_metadata_schemas1:\n")
+ pprint(api_response)
+ except Exception as e:
+ print("Exception when calling ManagementApi->list_metadata_schemas1: %s\n" % e)
+```
+
+
+
+### Parameters
+
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **project_id** | **str**| Provide the unique identifier of the project. |
+
+### Return type
+
+[**ManagementProjectsMetadataSchemasListResponseBody**](ManagementProjectsMetadataSchemasListResponseBody.md)
+
+### Authorization
+
+[X-Management-Token](../README.md#X-Management-Token), [X-Management-Id](../README.md#X-Management-Id)
+
+### HTTP request headers
+
+ - **Content-Type**: Not defined
+ - **Accept**: application/json
+
+### HTTP response details
+
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+**2XX** | Returns the details about the metadata schemas created in the project. | - |
+
+[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
+
+# **list_projects**
+> ManagementProjectsListResponseBody list_projects()
+
+List Projects
+
+Lists all projects for the organization. The endpoint does not require any query parameters.
+
+### Example
+
+* Api Key Authentication (X-Management-Token):
+* Api Key Authentication (X-Management-Id):
+
+```python
+import voucherify
+from voucherify.models.management_projects_list_response_body import ManagementProjectsListResponseBody
+from voucherify.rest import ApiException
+from pprint import pprint
+
+# Defining the host is optional and defaults to https://api.voucherify.io
+# See configuration.py for a list of all supported configuration parameters.
+configuration = voucherify.Configuration(
+ host = "https://api.voucherify.io"
+)
+
+# The client must configure the authentication and authorization parameters
+# in accordance with the API server security policy.
+# Examples for each auth method are provided below, use the example that
+# satisfies your auth use case.
+
+# Configure API key authorization: X-Management-Token
+configuration.api_key['X-Management-Token'] = os.environ["API_KEY"]
+
+# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
+# configuration.api_key_prefix['X-Management-Token'] = 'Bearer'
+
+# Configure API key authorization: X-Management-Id
+configuration.api_key['X-Management-Id'] = os.environ["API_KEY"]
+
+# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
+# configuration.api_key_prefix['X-Management-Id'] = 'Bearer'
+
+# Enter a context with an instance of the API client
+with voucherify.ApiClient(configuration) as api_client:
+ # Create an instance of the API class
+ api_instance = voucherify.ManagementApi(api_client)
+
+ try:
+ # List Projects
+ api_response = api_instance.list_projects()
+ print("The response of ManagementApi->list_projects:\n")
+ pprint(api_response)
+ except Exception as e:
+ print("Exception when calling ManagementApi->list_projects: %s\n" % e)
+```
+
+
+
+### Parameters
+
+This endpoint does not need any parameter.
+
+### Return type
+
+[**ManagementProjectsListResponseBody**](ManagementProjectsListResponseBody.md)
+
+### Authorization
+
+[X-Management-Token](../README.md#X-Management-Token), [X-Management-Id](../README.md#X-Management-Id)
+
+### HTTP request headers
+
+ - **Content-Type**: Not defined
+ - **Accept**: application/json
+
+### HTTP response details
+
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+**2XX** | Returns the list of all projects with their details. | - |
+
+[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
+
+# **list_stacking_rules**
+> ManagementProjectsStackingRulesListResponseBody list_stacking_rules(project_id)
+
+List Stacking Rules
+
+Lists all stacking rules. Returns always a list with one item. This endpoint can be used to retrieve the default stacking rules. The default stacking rules do not have an ID that could be used with the Get Stacking Rules or Update Stacking Rules endpoints. 📘 Stacking Rules Documentation Read [the Stacking Rules article](https://support.voucherify.io/article/604-stacking-rules) to learn how they work.
+
+### Example
+
+* Api Key Authentication (X-Management-Token):
+* Api Key Authentication (X-Management-Id):
+
+```python
+import voucherify
+from voucherify.models.management_projects_stacking_rules_list_response_body import ManagementProjectsStackingRulesListResponseBody
+from voucherify.rest import ApiException
+from pprint import pprint
+
+# Defining the host is optional and defaults to https://api.voucherify.io
+# See configuration.py for a list of all supported configuration parameters.
+configuration = voucherify.Configuration(
+ host = "https://api.voucherify.io"
+)
+
+# The client must configure the authentication and authorization parameters
+# in accordance with the API server security policy.
+# Examples for each auth method are provided below, use the example that
+# satisfies your auth use case.
+
+# Configure API key authorization: X-Management-Token
+configuration.api_key['X-Management-Token'] = os.environ["API_KEY"]
+
+# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
+# configuration.api_key_prefix['X-Management-Token'] = 'Bearer'
+
+# Configure API key authorization: X-Management-Id
+configuration.api_key['X-Management-Id'] = os.environ["API_KEY"]
+
+# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
+# configuration.api_key_prefix['X-Management-Id'] = 'Bearer'
+
+# Enter a context with an instance of the API client
+with voucherify.ApiClient(configuration) as api_client:
+ # Create an instance of the API class
+ api_instance = voucherify.ManagementApi(api_client)
+ project_id = 'project_id_example' # str | Provide the unique identifier of the project.
+
+ try:
+ # List Stacking Rules
+ api_response = api_instance.list_stacking_rules(project_id)
+ print("The response of ManagementApi->list_stacking_rules:\n")
+ pprint(api_response)
+ except Exception as e:
+ print("Exception when calling ManagementApi->list_stacking_rules: %s\n" % e)
+```
+
+
+
+### Parameters
+
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **project_id** | **str**| Provide the unique identifier of the project. |
+
+### Return type
+
+[**ManagementProjectsStackingRulesListResponseBody**](ManagementProjectsStackingRulesListResponseBody.md)
+
+### Authorization
+
+[X-Management-Token](../README.md#X-Management-Token), [X-Management-Id](../README.md#X-Management-Id)
+
+### HTTP request headers
+
+ - **Content-Type**: Not defined
+ - **Accept**: application/json
+
+### HTTP response details
+
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+**2XX** | Returns the details about the stacking rules assigned to the project. These can be either the default stacking rules or the created ones. | - |
+
+[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
+
+# **list_users**
+> ManagementProjectsUsersListResponseBody list_users(project_id)
+
+List Users
+
+Lists all users assigned to the project.
+
+### Example
+
+* Api Key Authentication (X-Management-Token):
+* Api Key Authentication (X-Management-Id):
+
+```python
+import voucherify
+from voucherify.models.management_projects_users_list_response_body import ManagementProjectsUsersListResponseBody
+from voucherify.rest import ApiException
+from pprint import pprint
+
+# Defining the host is optional and defaults to https://api.voucherify.io
+# See configuration.py for a list of all supported configuration parameters.
+configuration = voucherify.Configuration(
+ host = "https://api.voucherify.io"
+)
+
+# The client must configure the authentication and authorization parameters
+# in accordance with the API server security policy.
+# Examples for each auth method are provided below, use the example that
+# satisfies your auth use case.
+
+# Configure API key authorization: X-Management-Token
+configuration.api_key['X-Management-Token'] = os.environ["API_KEY"]
+
+# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
+# configuration.api_key_prefix['X-Management-Token'] = 'Bearer'
+
+# Configure API key authorization: X-Management-Id
+configuration.api_key['X-Management-Id'] = os.environ["API_KEY"]
+
+# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
+# configuration.api_key_prefix['X-Management-Id'] = 'Bearer'
+
+# Enter a context with an instance of the API client
+with voucherify.ApiClient(configuration) as api_client:
+ # Create an instance of the API class
+ api_instance = voucherify.ManagementApi(api_client)
+ project_id = 'project_id_example' # str | Provide the unique identifier of the project.
+
+ try:
+ # List Users
+ api_response = api_instance.list_users(project_id)
+ print("The response of ManagementApi->list_users:\n")
+ pprint(api_response)
+ except Exception as e:
+ print("Exception when calling ManagementApi->list_users: %s\n" % e)
+```
+
+
+
+### Parameters
+
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **project_id** | **str**| Provide the unique identifier of the project. |
+
+### Return type
+
+[**ManagementProjectsUsersListResponseBody**](ManagementProjectsUsersListResponseBody.md)
+
+### Authorization
+
+[X-Management-Token](../README.md#X-Management-Token), [X-Management-Id](../README.md#X-Management-Id)
+
+### HTTP request headers
+
+ - **Content-Type**: Not defined
+ - **Accept**: application/json
+
+### HTTP response details
+
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+**2XX** | Returns the list of all the users assigned to the project. | - |
+
+[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
+
+# **list_webhooks**
+> ManagementProjectsWebhooksListResponseBody list_webhooks(project_id)
+
+List Webhooks
+
+Lists all webhook configurations for the project. 📘 Webhook Documentation Read Webhooks v2024-01-1 article to learn how webhooks work in Voucherify.
+
+### Example
+
+* Api Key Authentication (X-Management-Token):
+* Api Key Authentication (X-Management-Id):
+
+```python
+import voucherify
+from voucherify.models.management_projects_webhooks_list_response_body import ManagementProjectsWebhooksListResponseBody
+from voucherify.rest import ApiException
+from pprint import pprint
+
+# Defining the host is optional and defaults to https://api.voucherify.io
+# See configuration.py for a list of all supported configuration parameters.
+configuration = voucherify.Configuration(
+ host = "https://api.voucherify.io"
+)
+
+# The client must configure the authentication and authorization parameters
+# in accordance with the API server security policy.
+# Examples for each auth method are provided below, use the example that
+# satisfies your auth use case.
+
+# Configure API key authorization: X-Management-Token
+configuration.api_key['X-Management-Token'] = os.environ["API_KEY"]
+
+# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
+# configuration.api_key_prefix['X-Management-Token'] = 'Bearer'
+
+# Configure API key authorization: X-Management-Id
+configuration.api_key['X-Management-Id'] = os.environ["API_KEY"]
+
+# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
+# configuration.api_key_prefix['X-Management-Id'] = 'Bearer'
+
+# Enter a context with an instance of the API client
+with voucherify.ApiClient(configuration) as api_client:
+ # Create an instance of the API class
+ api_instance = voucherify.ManagementApi(api_client)
+ project_id = 'project_id_example' # str | Provide the unique identifier of the project.
+
+ try:
+ # List Webhooks
+ api_response = api_instance.list_webhooks(project_id)
+ print("The response of ManagementApi->list_webhooks:\n")
+ pprint(api_response)
+ except Exception as e:
+ print("Exception when calling ManagementApi->list_webhooks: %s\n" % e)
+```
+
+
+
+### Parameters
+
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **project_id** | **str**| Provide the unique identifier of the project. |
+
+### Return type
+
+[**ManagementProjectsWebhooksListResponseBody**](ManagementProjectsWebhooksListResponseBody.md)
+
+### Authorization
+
+[X-Management-Token](../README.md#X-Management-Token), [X-Management-Id](../README.md#X-Management-Id)
+
+### HTTP request headers
+
+ - **Content-Type**: Not defined
+ - **Accept**: application/json
+
+### HTTP response details
+
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+**2XX** | Returns the details about webhook configurations created in the project. | - |
+
+[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
+
+# **management_copy_campaign_template**
+> ManagementProjectsTemplatesCampaignsCopyCreateResponseBody management_copy_campaign_template(project_id, campaign_template_id, management_projects_templates_campaigns_copy_create_request_body=management_projects_templates_campaigns_copy_create_request_body)
+
+Copy Campaign Template to a Project
+
+Copies a campaign template to another project. The resources, like validation rules or products, will not be copied to the destination project yet. When the template is used to create a new campaign or add a new promotion tier, the resources will be created in the destination project. 📘 Campaign Templates – Documentation Read the [Campaign Templates documentation](https://support.voucherify.io/article/620-campaign-templates) to learn more about this feature.
+
+### Example
+
+* Api Key Authentication (X-Management-Token):
+* Api Key Authentication (X-Management-Id):
+
+```python
+import voucherify
+from voucherify.models.management_projects_templates_campaigns_copy_create_request_body import ManagementProjectsTemplatesCampaignsCopyCreateRequestBody
+from voucherify.models.management_projects_templates_campaigns_copy_create_response_body import ManagementProjectsTemplatesCampaignsCopyCreateResponseBody
+from voucherify.rest import ApiException
+from pprint import pprint
+
+# Defining the host is optional and defaults to https://api.voucherify.io
+# See configuration.py for a list of all supported configuration parameters.
+configuration = voucherify.Configuration(
+ host = "https://api.voucherify.io"
+)
+
+# The client must configure the authentication and authorization parameters
+# in accordance with the API server security policy.
+# Examples for each auth method are provided below, use the example that
+# satisfies your auth use case.
+
+# Configure API key authorization: X-Management-Token
+configuration.api_key['X-Management-Token'] = os.environ["API_KEY"]
+
+# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
+# configuration.api_key_prefix['X-Management-Token'] = 'Bearer'
+
+# Configure API key authorization: X-Management-Id
+configuration.api_key['X-Management-Id'] = os.environ["API_KEY"]
+
+# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
+# configuration.api_key_prefix['X-Management-Id'] = 'Bearer'
+
+# Enter a context with an instance of the API client
+with voucherify.ApiClient(configuration) as api_client:
+ # Create an instance of the API class
+ api_instance = voucherify.ManagementApi(api_client)
+ project_id = 'project_id_example' # str | Provide the unique identifier of the project.
+ campaign_template_id = 'campaign_template_id_example' # str | Provide the unique identifier of the campaign template.
+ management_projects_templates_campaigns_copy_create_request_body = voucherify.ManagementProjectsTemplatesCampaignsCopyCreateRequestBody() # ManagementProjectsTemplatesCampaignsCopyCreateRequestBody | Determines the details about the template in the destination project as well as the destination project itself. (optional)
+
+ try:
+ # Copy Campaign Template to a Project
+ api_response = api_instance.management_copy_campaign_template(project_id, campaign_template_id, management_projects_templates_campaigns_copy_create_request_body=management_projects_templates_campaigns_copy_create_request_body)
+ print("The response of ManagementApi->management_copy_campaign_template:\n")
+ pprint(api_response)
+ except Exception as e:
+ print("Exception when calling ManagementApi->management_copy_campaign_template: %s\n" % e)
+```
+
+
+
+### Parameters
+
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **project_id** | **str**| Provide the unique identifier of the project. |
+ **campaign_template_id** | **str**| Provide the unique identifier of the campaign template. |
+ **management_projects_templates_campaigns_copy_create_request_body** | [**ManagementProjectsTemplatesCampaignsCopyCreateRequestBody**](ManagementProjectsTemplatesCampaignsCopyCreateRequestBody.md)| Determines the details about the template in the destination project as well as the destination project itself. | [optional]
+
+### Return type
+
+[**ManagementProjectsTemplatesCampaignsCopyCreateResponseBody**](ManagementProjectsTemplatesCampaignsCopyCreateResponseBody.md)
+
+### Authorization
+
+[X-Management-Token](../README.md#X-Management-Token), [X-Management-Id](../README.md#X-Management-Id)
+
+### HTTP request headers
+
+ - **Content-Type**: application/json
+ - **Accept**: application/json
+
+### HTTP response details
+
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+**2XX** | Returns the details about the copied campaign template. | - |
+
+[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
+
+# **management_list_campaign_templates**
+> ManagementProjectsTemplatesCampaignsListResponseBody management_list_campaign_templates(project_id, limit=limit, starting_after_id=starting_after_id, order=order, include_total=include_total, filters=filters)
+
+List Campaign Templates
+
+Lists all campaign templates available in the project. 👍 List Campaign Templates This endpoint works in the same way as the List Campaign Templates endpoint. 📘 Campaign Templates – Documentation Read the [Campaign Templates documentation](https://support.voucherify.io/article/620-campaign-templates) to learn more about this feature.
+
+### Example
+
+* Api Key Authentication (X-Management-Token):
+* Api Key Authentication (X-Management-Id):
+
+```python
+import voucherify
+from voucherify.models.management_projects_templates_campaigns_list_response_body import ManagementProjectsTemplatesCampaignsListResponseBody
+from voucherify.models.parameter_filters_list_templates import ParameterFiltersListTemplates
+from voucherify.models.parameter_templates_list import ParameterTemplatesList
+from voucherify.rest import ApiException
+from pprint import pprint
+
+# Defining the host is optional and defaults to https://api.voucherify.io
+# See configuration.py for a list of all supported configuration parameters.
+configuration = voucherify.Configuration(
+ host = "https://api.voucherify.io"
+)
+
+# The client must configure the authentication and authorization parameters
+# in accordance with the API server security policy.
+# Examples for each auth method are provided below, use the example that
+# satisfies your auth use case.
+
+# Configure API key authorization: X-Management-Token
+configuration.api_key['X-Management-Token'] = os.environ["API_KEY"]
+
+# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
+# configuration.api_key_prefix['X-Management-Token'] = 'Bearer'
+
+# Configure API key authorization: X-Management-Id
+configuration.api_key['X-Management-Id'] = os.environ["API_KEY"]
+
+# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
+# configuration.api_key_prefix['X-Management-Id'] = 'Bearer'
+
+# Enter a context with an instance of the API client
+with voucherify.ApiClient(configuration) as api_client:
+ # Create an instance of the API class
+ api_instance = voucherify.ManagementApi(api_client)
+ project_id = 'project_id_example' # str | Provide the unique identifier of the project.
+ limit = 56 # int | Limits the number of objects to be returned. The limit can range between 1 and 100 items. If no limit is set, it returns 10 items. (optional)
+ starting_after_id = 'starting_after_id_example' # str | A cursor for pagination. It retrieves the campaign templates created after a template with the given ID. (optional)
+ order = voucherify.ParameterTemplatesList() # ParameterTemplatesList | Sorts the results using one of the filtering options, where the dash - preceding a sorting option means sorting in a descending order. (optional)
+ include_total = True # bool | If set to true, the response returns the number of all campaign templates, regardless of the applied filters or limits. Set to false by default. (optional)
+ filters = voucherify.ParameterFiltersListTemplates() # ParameterFiltersListTemplates | Filters for listing templates. (optional)
+
+ try:
+ # List Campaign Templates
+ api_response = api_instance.management_list_campaign_templates(project_id, limit=limit, starting_after_id=starting_after_id, order=order, include_total=include_total, filters=filters)
+ print("The response of ManagementApi->management_list_campaign_templates:\n")
+ pprint(api_response)
+ except Exception as e:
+ print("Exception when calling ManagementApi->management_list_campaign_templates: %s\n" % e)
+```
+
+
+
+### Parameters
+
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **project_id** | **str**| Provide the unique identifier of the project. |
+ **limit** | **int**| Limits the number of objects to be returned. The limit can range between 1 and 100 items. If no limit is set, it returns 10 items. | [optional]
+ **starting_after_id** | **str**| A cursor for pagination. It retrieves the campaign templates created after a template with the given ID. | [optional]
+ **order** | [**ParameterTemplatesList**](.md)| Sorts the results using one of the filtering options, where the dash - preceding a sorting option means sorting in a descending order. | [optional]
+ **include_total** | **bool**| If set to true, the response returns the number of all campaign templates, regardless of the applied filters or limits. Set to false by default. | [optional]
+ **filters** | [**ParameterFiltersListTemplates**](.md)| Filters for listing templates. | [optional]
+
+### Return type
+
+[**ManagementProjectsTemplatesCampaignsListResponseBody**](ManagementProjectsTemplatesCampaignsListResponseBody.md)
+
+### Authorization
+
+[X-Management-Token](../README.md#X-Management-Token), [X-Management-Id](../README.md#X-Management-Id)
+
+### HTTP request headers
+
+ - **Content-Type**: Not defined
+ - **Accept**: application/json
+
+### HTTP response details
+
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+**2XX** | Returns a dictionary of campaign template objects. The templates are returned by creation date by default. The most recent objects appear last unless specified otherwise with the `order` parameter. | - |
+
+[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
+
+# **unassign_user**
+> unassign_user(project_id, user_id)
+
+Unassign User
+
+Unassigns the user from the project. If the user is currently logged in, they are automatically logged out. If the user is assigned to only one project, they cannot be unassigned from that project.
+
+### Example
+
+* Api Key Authentication (X-Management-Token):
+* Api Key Authentication (X-Management-Id):
+
+```python
+import voucherify
+from voucherify.rest import ApiException
+from pprint import pprint
+
+# Defining the host is optional and defaults to https://api.voucherify.io
+# See configuration.py for a list of all supported configuration parameters.
+configuration = voucherify.Configuration(
+ host = "https://api.voucherify.io"
+)
+
+# The client must configure the authentication and authorization parameters
+# in accordance with the API server security policy.
+# Examples for each auth method are provided below, use the example that
+# satisfies your auth use case.
+
+# Configure API key authorization: X-Management-Token
+configuration.api_key['X-Management-Token'] = os.environ["API_KEY"]
+
+# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
+# configuration.api_key_prefix['X-Management-Token'] = 'Bearer'
+
+# Configure API key authorization: X-Management-Id
+configuration.api_key['X-Management-Id'] = os.environ["API_KEY"]
+
+# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
+# configuration.api_key_prefix['X-Management-Id'] = 'Bearer'
+
+# Enter a context with an instance of the API client
+with voucherify.ApiClient(configuration) as api_client:
+ # Create an instance of the API class
+ api_instance = voucherify.ManagementApi(api_client)
+ project_id = 'project_id_example' # str | Provide the unique identifier of the project.
+ user_id = 'user_id_example' # str | Provide the unique identifier of the user. Alternatively, provide the users login.
+
+ try:
+ # Unassign User
+ api_instance.unassign_user(project_id, user_id)
+ except Exception as e:
+ print("Exception when calling ManagementApi->unassign_user: %s\n" % e)
+```
+
+
+
+### Parameters
+
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **project_id** | **str**| Provide the unique identifier of the project. |
+ **user_id** | **str**| Provide the unique identifier of the user. Alternatively, provide the users login. |
+
+### Return type
+
+void (empty response body)
+
+### Authorization
+
+[X-Management-Token](../README.md#X-Management-Token), [X-Management-Id](../README.md#X-Management-Id)
+
+### HTTP request headers
+
+ - **Content-Type**: Not defined
+ - **Accept**: Not defined
+
+### HTTP response details
+
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+**2XX** | Returns no content if the user has been successfully unnassigned. | - |
+
+[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
+
+# **update_brand**
+> ManagementProjectsBrandingUpdateResponseBody update_brand(project_id, branding_id, management_projects_branding_update_request_body=management_projects_branding_update_request_body)
+
+Update Brand
+
+Updates a brand configuration. Only the fields sent in the request will be updated. The fields omitted in the request will remain unchanged. 📘 White Labelling The white labelling settings which can be found in Project Settings > Brand Details and which are available only for Enterprise clients as a separate service can be configured only in the user interface.
+
+### Example
+
+* Api Key Authentication (X-Management-Token):
+* Api Key Authentication (X-Management-Id):
+
+```python
+import voucherify
+from voucherify.models.management_projects_branding_update_request_body import ManagementProjectsBrandingUpdateRequestBody
+from voucherify.models.management_projects_branding_update_response_body import ManagementProjectsBrandingUpdateResponseBody
+from voucherify.rest import ApiException
+from pprint import pprint
+
+# Defining the host is optional and defaults to https://api.voucherify.io
+# See configuration.py for a list of all supported configuration parameters.
+configuration = voucherify.Configuration(
+ host = "https://api.voucherify.io"
+)
+
+# The client must configure the authentication and authorization parameters
+# in accordance with the API server security policy.
+# Examples for each auth method are provided below, use the example that
+# satisfies your auth use case.
+
+# Configure API key authorization: X-Management-Token
+configuration.api_key['X-Management-Token'] = os.environ["API_KEY"]
+
+# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
+# configuration.api_key_prefix['X-Management-Token'] = 'Bearer'
+
+# Configure API key authorization: X-Management-Id
+configuration.api_key['X-Management-Id'] = os.environ["API_KEY"]
+
+# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
+# configuration.api_key_prefix['X-Management-Id'] = 'Bearer'
+
+# Enter a context with an instance of the API client
+with voucherify.ApiClient(configuration) as api_client:
+ # Create an instance of the API class
+ api_instance = voucherify.ManagementApi(api_client)
+ project_id = 'project_id_example' # str | Provide the unique identifier of the project.
+ branding_id = 'branding_id_example' # str | Provide the unique identifier of the brand configuration.
+ management_projects_branding_update_request_body = voucherify.ManagementProjectsBrandingUpdateRequestBody() # ManagementProjectsBrandingUpdateRequestBody | Defines the brand configuration to be updated. (optional)
+
+ try:
+ # Update Brand
+ api_response = api_instance.update_brand(project_id, branding_id, management_projects_branding_update_request_body=management_projects_branding_update_request_body)
+ print("The response of ManagementApi->update_brand:\n")
+ pprint(api_response)
+ except Exception as e:
+ print("Exception when calling ManagementApi->update_brand: %s\n" % e)
+```
+
+
+
+### Parameters
+
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **project_id** | **str**| Provide the unique identifier of the project. |
+ **branding_id** | **str**| Provide the unique identifier of the brand configuration. |
+ **management_projects_branding_update_request_body** | [**ManagementProjectsBrandingUpdateRequestBody**](ManagementProjectsBrandingUpdateRequestBody.md)| Defines the brand configuration to be updated. | [optional]
+
+### Return type
+
+[**ManagementProjectsBrandingUpdateResponseBody**](ManagementProjectsBrandingUpdateResponseBody.md)
+
+### Authorization
+
+[X-Management-Token](../README.md#X-Management-Token), [X-Management-Id](../README.md#X-Management-Id)
+
+### HTTP request headers
+
+ - **Content-Type**: application/json
+ - **Accept**: application/json
+
+### HTTP response details
+
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+**2XX** | Returns the details about the updated brand configuration. | - |
+
+[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
+
+# **update_custom_event_schema**
+> ManagementProjectsCustomEventSchemasUpdateResponseBody update_custom_event_schema(project_id, custom_event_schema_id, management_projects_custom_event_schemas_update_request_body=management_projects_custom_event_schemas_update_request_body)
+
+Update Custom Event Schema
+
+Updates a custom event schema. With this request, you can: - Add a non-existing property to a custom event schema. - Update an existing property. In the request, you can provide only those properties you want to add or update. Definitions omitted in the request remain unchanged. 👍 Additional Notes - You can change the type of an existing property, e.g. from string to number. - You can remove a custom property with this endpoint by providing deleted: true in the request. However, you cannot permanently remove an event definition or its property with this endpoint. 📘 Custom Event Documentation Read [Custom Events](https://support.voucherify.io/article/111-custom-events) article to learn how custom events work in Voucherify. Read also the details about the Track Custom Event endpoint and the Custom Event Object.
+
+### Example
+
+* Api Key Authentication (X-Management-Token):
+* Api Key Authentication (X-Management-Id):
+
+```python
+import voucherify
+from voucherify.models.management_projects_custom_event_schemas_update_request_body import ManagementProjectsCustomEventSchemasUpdateRequestBody
+from voucherify.models.management_projects_custom_event_schemas_update_response_body import ManagementProjectsCustomEventSchemasUpdateResponseBody
+from voucherify.rest import ApiException
+from pprint import pprint
+
+# Defining the host is optional and defaults to https://api.voucherify.io
+# See configuration.py for a list of all supported configuration parameters.
+configuration = voucherify.Configuration(
+ host = "https://api.voucherify.io"
+)
+
+# The client must configure the authentication and authorization parameters
+# in accordance with the API server security policy.
+# Examples for each auth method are provided below, use the example that
+# satisfies your auth use case.
+
+# Configure API key authorization: X-Management-Token
+configuration.api_key['X-Management-Token'] = os.environ["API_KEY"]
+
+# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
+# configuration.api_key_prefix['X-Management-Token'] = 'Bearer'
+
+# Configure API key authorization: X-Management-Id
+configuration.api_key['X-Management-Id'] = os.environ["API_KEY"]
+
+# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
+# configuration.api_key_prefix['X-Management-Id'] = 'Bearer'
+
+# Enter a context with an instance of the API client
+with voucherify.ApiClient(configuration) as api_client:
+ # Create an instance of the API class
+ api_instance = voucherify.ManagementApi(api_client)
+ project_id = 'project_id_example' # str | Provide the unique identifier of the project.
+ custom_event_schema_id = 'custom_event_schema_id_example' # str | Provide the unique identifier of the custom event schema.
+ management_projects_custom_event_schemas_update_request_body = voucherify.ManagementProjectsCustomEventSchemasUpdateRequestBody() # ManagementProjectsCustomEventSchemasUpdateRequestBody | Defines the custom event schema to be updated. (optional)
+
+ try:
+ # Update Custom Event Schema
+ api_response = api_instance.update_custom_event_schema(project_id, custom_event_schema_id, management_projects_custom_event_schemas_update_request_body=management_projects_custom_event_schemas_update_request_body)
+ print("The response of ManagementApi->update_custom_event_schema:\n")
+ pprint(api_response)
+ except Exception as e:
+ print("Exception when calling ManagementApi->update_custom_event_schema: %s\n" % e)
+```
+
+
+
+### Parameters
+
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **project_id** | **str**| Provide the unique identifier of the project. |
+ **custom_event_schema_id** | **str**| Provide the unique identifier of the custom event schema. |
+ **management_projects_custom_event_schemas_update_request_body** | [**ManagementProjectsCustomEventSchemasUpdateRequestBody**](ManagementProjectsCustomEventSchemasUpdateRequestBody.md)| Defines the custom event schema to be updated. | [optional]
+
+### Return type
+
+[**ManagementProjectsCustomEventSchemasUpdateResponseBody**](ManagementProjectsCustomEventSchemasUpdateResponseBody.md)
+
+### Authorization
+
+[X-Management-Token](../README.md#X-Management-Token), [X-Management-Id](../README.md#X-Management-Id)
+
+### HTTP request headers
+
+ - **Content-Type**: application/json
+ - **Accept**: application/json
+
+### HTTP response details
+
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+**2XX** | Returns the details about the updated custom event schema. | - |
+
+[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
+
+# **update_metadata_schema**
+> ManagementProjectsMetadataSchemasUpdateResponseBody update_metadata_schema(project_id, metadata_schema_id, management_projects_metadata_schemas_update_request_body=management_projects_metadata_schemas_update_request_body)
+
+Update Metadata Schema
+
+Updates a metadata schema. With this request, you can: - Add a non-existing attribute definition to the metadata schema. - Update an existing attribute definition by overwriting its current values. In the request, you can provide only those definitions you want to add or update. Definitions omitted in the request remain unchanged. However, if you want to update a definition, you will have to add all its current key-value pairs as well. Only the pairs sent in the request are saved for this definition. This means that the key-value pairs that are not sent in a request are restored to default values. For example, if your definition has an array with values and it is not sent in an update request, the array values will be deleted. 👍 Additional Notes - You cannot change the type of an existing schema, e.g. from string to number. - You can remove a definition with this endpoint by providing deleted: true in the request. It will be moved to the Removed definitions section in the user interface. However, you cannot permanently remove a definition with this endpoint. 📘 Metadata Documentation Read the Getting Started with Metadata articles to learn how metadata work in Voucherify.
+
+### Example
+
+* Api Key Authentication (X-Management-Token):
+* Api Key Authentication (X-Management-Id):
+
+```python
+import voucherify
+from voucherify.models.management_projects_metadata_schemas_update_request_body import ManagementProjectsMetadataSchemasUpdateRequestBody
+from voucherify.models.management_projects_metadata_schemas_update_response_body import ManagementProjectsMetadataSchemasUpdateResponseBody
+from voucherify.rest import ApiException
+from pprint import pprint
+
+# Defining the host is optional and defaults to https://api.voucherify.io
+# See configuration.py for a list of all supported configuration parameters.
+configuration = voucherify.Configuration(
+ host = "https://api.voucherify.io"
+)
+
+# The client must configure the authentication and authorization parameters
+# in accordance with the API server security policy.
+# Examples for each auth method are provided below, use the example that
+# satisfies your auth use case.
+
+# Configure API key authorization: X-Management-Token
+configuration.api_key['X-Management-Token'] = os.environ["API_KEY"]
+
+# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
+# configuration.api_key_prefix['X-Management-Token'] = 'Bearer'
+
+# Configure API key authorization: X-Management-Id
+configuration.api_key['X-Management-Id'] = os.environ["API_KEY"]
+
+# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
+# configuration.api_key_prefix['X-Management-Id'] = 'Bearer'
+
+# Enter a context with an instance of the API client
+with voucherify.ApiClient(configuration) as api_client:
+ # Create an instance of the API class
+ api_instance = voucherify.ManagementApi(api_client)
+ project_id = 'project_id_example' # str | Provide the unique identifier of the project.
+ metadata_schema_id = 'metadata_schema_id_example' # str | Provide the unique identifier of the metadata schema.
+ management_projects_metadata_schemas_update_request_body = voucherify.ManagementProjectsMetadataSchemasUpdateRequestBody() # ManagementProjectsMetadataSchemasUpdateRequestBody | Defines the metadata schema to be updated. (optional)
+
+ try:
+ # Update Metadata Schema
+ api_response = api_instance.update_metadata_schema(project_id, metadata_schema_id, management_projects_metadata_schemas_update_request_body=management_projects_metadata_schemas_update_request_body)
+ print("The response of ManagementApi->update_metadata_schema:\n")
+ pprint(api_response)
+ except Exception as e:
+ print("Exception when calling ManagementApi->update_metadata_schema: %s\n" % e)
+```
+
+
+
+### Parameters
+
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **project_id** | **str**| Provide the unique identifier of the project. |
+ **metadata_schema_id** | **str**| Provide the unique identifier of the metadata schema. |
+ **management_projects_metadata_schemas_update_request_body** | [**ManagementProjectsMetadataSchemasUpdateRequestBody**](ManagementProjectsMetadataSchemasUpdateRequestBody.md)| Defines the metadata schema to be updated. | [optional]
+
+### Return type
+
+[**ManagementProjectsMetadataSchemasUpdateResponseBody**](ManagementProjectsMetadataSchemasUpdateResponseBody.md)
+
+### Authorization
+
+[X-Management-Token](../README.md#X-Management-Token), [X-Management-Id](../README.md#X-Management-Id)
+
+### HTTP request headers
+
+ - **Content-Type**: application/json
+ - **Accept**: application/json
+
+### HTTP response details
+
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+**2XX** | Returns the details about the updated metadata schema. | - |
+
+[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
+
+# **update_project**
+> ManagementProjectsUpdateResponseBody update_project(project_id, management_projects_update_request_body=management_projects_update_request_body)
+
+Update Project
+
+Updates an existing project. You can add or modify settings for timezone, currency, notifications, and other details. Only the fields sent in the request will be updated.
+
+### Example
+
+* Api Key Authentication (X-Management-Token):
+* Api Key Authentication (X-Management-Id):
+
+```python
+import voucherify
+from voucherify.models.management_projects_update_request_body import ManagementProjectsUpdateRequestBody
+from voucherify.models.management_projects_update_response_body import ManagementProjectsUpdateResponseBody
+from voucherify.rest import ApiException
+from pprint import pprint
+
+# Defining the host is optional and defaults to https://api.voucherify.io
+# See configuration.py for a list of all supported configuration parameters.
+configuration = voucherify.Configuration(
+ host = "https://api.voucherify.io"
+)
+
+# The client must configure the authentication and authorization parameters
+# in accordance with the API server security policy.
+# Examples for each auth method are provided below, use the example that
+# satisfies your auth use case.
+
+# Configure API key authorization: X-Management-Token
+configuration.api_key['X-Management-Token'] = os.environ["API_KEY"]
+
+# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
+# configuration.api_key_prefix['X-Management-Token'] = 'Bearer'
+
+# Configure API key authorization: X-Management-Id
+configuration.api_key['X-Management-Id'] = os.environ["API_KEY"]
+
+# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
+# configuration.api_key_prefix['X-Management-Id'] = 'Bearer'
+
+# Enter a context with an instance of the API client
+with voucherify.ApiClient(configuration) as api_client:
+ # Create an instance of the API class
+ api_instance = voucherify.ManagementApi(api_client)
+ project_id = 'project_id_example' # str | Provide the unique identifier of the project.
+ management_projects_update_request_body = voucherify.ManagementProjectsUpdateRequestBody() # ManagementProjectsUpdateRequestBody | Define the project details to be updated. (optional)
+
+ try:
+ # Update Project
+ api_response = api_instance.update_project(project_id, management_projects_update_request_body=management_projects_update_request_body)
+ print("The response of ManagementApi->update_project:\n")
+ pprint(api_response)
+ except Exception as e:
+ print("Exception when calling ManagementApi->update_project: %s\n" % e)
+```
+
+
+
+### Parameters
+
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **project_id** | **str**| Provide the unique identifier of the project. |
+ **management_projects_update_request_body** | [**ManagementProjectsUpdateRequestBody**](ManagementProjectsUpdateRequestBody.md)| Define the project details to be updated. | [optional]
+
+### Return type
+
+[**ManagementProjectsUpdateResponseBody**](ManagementProjectsUpdateResponseBody.md)
+
+### Authorization
+
+[X-Management-Token](../README.md#X-Management-Token), [X-Management-Id](../README.md#X-Management-Id)
+
+### HTTP request headers
+
+ - **Content-Type**: application/json
+ - **Accept**: application/json
+
+### HTTP response details
+
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+**2XX** | Returns the details of an updated project. | - |
+
+[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
+
+# **update_stacking_rules**
+> ManagementProjectsStackingRulesUpdateResponseBody update_stacking_rules(project_id, stacking_rules_id, management_projects_stacking_rules_update_request_body=management_projects_stacking_rules_update_request_body)
+
+Update Stacking Rules
+
+Updates the stacking rules. Only the provided fields will be updated. However, if you update an array, the content of the array is overwritten. This means that if you want to add new values to an array and retain existing ones, you need to provide both the existing and new values in the request. 📘 Stacking Rules Documentation Read [the Stacking Rules article](https://support.voucherify.io/article/604-stacking-rules) to learn how they work.
+
+### Example
+
+* Api Key Authentication (X-Management-Token):
+* Api Key Authentication (X-Management-Id):
+
+```python
+import voucherify
+from voucherify.models.management_projects_stacking_rules_update_request_body import ManagementProjectsStackingRulesUpdateRequestBody
+from voucherify.models.management_projects_stacking_rules_update_response_body import ManagementProjectsStackingRulesUpdateResponseBody
+from voucherify.rest import ApiException
+from pprint import pprint
+
+# Defining the host is optional and defaults to https://api.voucherify.io
+# See configuration.py for a list of all supported configuration parameters.
+configuration = voucherify.Configuration(
+ host = "https://api.voucherify.io"
+)
+
+# The client must configure the authentication and authorization parameters
+# in accordance with the API server security policy.
+# Examples for each auth method are provided below, use the example that
+# satisfies your auth use case.
+
+# Configure API key authorization: X-Management-Token
+configuration.api_key['X-Management-Token'] = os.environ["API_KEY"]
+
+# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
+# configuration.api_key_prefix['X-Management-Token'] = 'Bearer'
+
+# Configure API key authorization: X-Management-Id
+configuration.api_key['X-Management-Id'] = os.environ["API_KEY"]
+
+# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
+# configuration.api_key_prefix['X-Management-Id'] = 'Bearer'
+
+# Enter a context with an instance of the API client
+with voucherify.ApiClient(configuration) as api_client:
+ # Create an instance of the API class
+ api_instance = voucherify.ManagementApi(api_client)
+ project_id = 'project_id_example' # str | Provide the unique identifier of the project.
+ stacking_rules_id = 'stacking_rules_id_example' # str | Provide the unique identifier of the stacking rules.
+ management_projects_stacking_rules_update_request_body = voucherify.ManagementProjectsStackingRulesUpdateRequestBody() # ManagementProjectsStackingRulesUpdateRequestBody | Defines the stacking rules to be updated. (optional)
+
+ try:
+ # Update Stacking Rules
+ api_response = api_instance.update_stacking_rules(project_id, stacking_rules_id, management_projects_stacking_rules_update_request_body=management_projects_stacking_rules_update_request_body)
+ print("The response of ManagementApi->update_stacking_rules:\n")
+ pprint(api_response)
+ except Exception as e:
+ print("Exception when calling ManagementApi->update_stacking_rules: %s\n" % e)
+```
+
+
+
+### Parameters
+
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **project_id** | **str**| Provide the unique identifier of the project. |
+ **stacking_rules_id** | **str**| Provide the unique identifier of the stacking rules. |
+ **management_projects_stacking_rules_update_request_body** | [**ManagementProjectsStackingRulesUpdateRequestBody**](ManagementProjectsStackingRulesUpdateRequestBody.md)| Defines the stacking rules to be updated. | [optional]
+
+### Return type
+
+[**ManagementProjectsStackingRulesUpdateResponseBody**](ManagementProjectsStackingRulesUpdateResponseBody.md)
+
+### Authorization
+
+[X-Management-Token](../README.md#X-Management-Token), [X-Management-Id](../README.md#X-Management-Id)
+
+### HTTP request headers
+
+ - **Content-Type**: application/json
+ - **Accept**: application/json
+
+### HTTP response details
+
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+**2XX** | Returns the details about the updated stacking rules. | - |
+
+[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
+
+# **update_user**
+> ManagementProjectsUsersUpdateRoleResponseBody update_user(project_id, user_id, management_projects_users_update_role_request_body=management_projects_users_update_role_request_body)
+
+Update User
+
+Updates the users role.
+
+### Example
+
+* Api Key Authentication (X-Management-Token):
+* Api Key Authentication (X-Management-Id):
+
+```python
+import voucherify
+from voucherify.models.management_projects_users_update_role_request_body import ManagementProjectsUsersUpdateRoleRequestBody
+from voucherify.models.management_projects_users_update_role_response_body import ManagementProjectsUsersUpdateRoleResponseBody
+from voucherify.rest import ApiException
+from pprint import pprint
+
+# Defining the host is optional and defaults to https://api.voucherify.io
+# See configuration.py for a list of all supported configuration parameters.
+configuration = voucherify.Configuration(
+ host = "https://api.voucherify.io"
+)
+
+# The client must configure the authentication and authorization parameters
+# in accordance with the API server security policy.
+# Examples for each auth method are provided below, use the example that
+# satisfies your auth use case.
+
+# Configure API key authorization: X-Management-Token
+configuration.api_key['X-Management-Token'] = os.environ["API_KEY"]
+
+# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
+# configuration.api_key_prefix['X-Management-Token'] = 'Bearer'
+
+# Configure API key authorization: X-Management-Id
+configuration.api_key['X-Management-Id'] = os.environ["API_KEY"]
+
+# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
+# configuration.api_key_prefix['X-Management-Id'] = 'Bearer'
+
+# Enter a context with an instance of the API client
+with voucherify.ApiClient(configuration) as api_client:
+ # Create an instance of the API class
+ api_instance = voucherify.ManagementApi(api_client)
+ project_id = 'project_id_example' # str | Provide the unique identifier of the project.
+ user_id = 'user_id_example' # str | Provide the unique identifier of the user. Alternatively, provide the users login.
+ management_projects_users_update_role_request_body = voucherify.ManagementProjectsUsersUpdateRoleRequestBody() # ManagementProjectsUsersUpdateRoleRequestBody | Defines the users new role. (optional)
+
+ try:
+ # Update User
+ api_response = api_instance.update_user(project_id, user_id, management_projects_users_update_role_request_body=management_projects_users_update_role_request_body)
+ print("The response of ManagementApi->update_user:\n")
+ pprint(api_response)
+ except Exception as e:
+ print("Exception when calling ManagementApi->update_user: %s\n" % e)
+```
+
+
+
+### Parameters
+
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **project_id** | **str**| Provide the unique identifier of the project. |
+ **user_id** | **str**| Provide the unique identifier of the user. Alternatively, provide the users login. |
+ **management_projects_users_update_role_request_body** | [**ManagementProjectsUsersUpdateRoleRequestBody**](ManagementProjectsUsersUpdateRoleRequestBody.md)| Defines the users new role. | [optional]
+
+### Return type
+
+[**ManagementProjectsUsersUpdateRoleResponseBody**](ManagementProjectsUsersUpdateRoleResponseBody.md)
+
+### Authorization
+
+[X-Management-Token](../README.md#X-Management-Token), [X-Management-Id](../README.md#X-Management-Id)
+
+### HTTP request headers
+
+ - **Content-Type**: application/json
+ - **Accept**: application/json
+
+### HTTP response details
+
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+**2XX** | Returns the details about the user assigned to the project. | - |
+
+[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
+
+# **update_webhook**
+> ManagementProjectsWebhooksUpdateResponseBody update_webhook(project_id, webhook_id, management_projects_webhooks_update_request_body=management_projects_webhooks_update_request_body)
+
+Update Webhook
+
+Updates a webhook configuration. The events listed in the request are overwritten. If you want to add more events, provide also the events that are already in the webhook configuration. 📘 Webhook Documentation Read Webhooks v2024-01-1 article to learn how webhooks work in Voucherify.
+
+### Example
+
+* Api Key Authentication (X-Management-Token):
+* Api Key Authentication (X-Management-Id):
+
+```python
+import voucherify
+from voucherify.models.management_projects_webhooks_update_request_body import ManagementProjectsWebhooksUpdateRequestBody
+from voucherify.models.management_projects_webhooks_update_response_body import ManagementProjectsWebhooksUpdateResponseBody
+from voucherify.rest import ApiException
+from pprint import pprint
+
+# Defining the host is optional and defaults to https://api.voucherify.io
+# See configuration.py for a list of all supported configuration parameters.
+configuration = voucherify.Configuration(
+ host = "https://api.voucherify.io"
+)
+
+# The client must configure the authentication and authorization parameters
+# in accordance with the API server security policy.
+# Examples for each auth method are provided below, use the example that
+# satisfies your auth use case.
+
+# Configure API key authorization: X-Management-Token
+configuration.api_key['X-Management-Token'] = os.environ["API_KEY"]
+
+# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
+# configuration.api_key_prefix['X-Management-Token'] = 'Bearer'
+
+# Configure API key authorization: X-Management-Id
+configuration.api_key['X-Management-Id'] = os.environ["API_KEY"]
+
+# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
+# configuration.api_key_prefix['X-Management-Id'] = 'Bearer'
+
+# Enter a context with an instance of the API client
+with voucherify.ApiClient(configuration) as api_client:
+ # Create an instance of the API class
+ api_instance = voucherify.ManagementApi(api_client)
+ project_id = 'project_id_example' # str | Provide the unique identifier of the project.
+ webhook_id = 'webhook_id_example' # str | Provide the unique identifier of the webhook configuration.
+ management_projects_webhooks_update_request_body = voucherify.ManagementProjectsWebhooksUpdateRequestBody() # ManagementProjectsWebhooksUpdateRequestBody | Defines the webhook configuration to be updated. (optional)
+
+ try:
+ # Update Webhook
+ api_response = api_instance.update_webhook(project_id, webhook_id, management_projects_webhooks_update_request_body=management_projects_webhooks_update_request_body)
+ print("The response of ManagementApi->update_webhook:\n")
+ pprint(api_response)
+ except Exception as e:
+ print("Exception when calling ManagementApi->update_webhook: %s\n" % e)
+```
+
+
+
+### Parameters
+
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **project_id** | **str**| Provide the unique identifier of the project. |
+ **webhook_id** | **str**| Provide the unique identifier of the webhook configuration. |
+ **management_projects_webhooks_update_request_body** | [**ManagementProjectsWebhooksUpdateRequestBody**](ManagementProjectsWebhooksUpdateRequestBody.md)| Defines the webhook configuration to be updated. | [optional]
+
+### Return type
+
+[**ManagementProjectsWebhooksUpdateResponseBody**](ManagementProjectsWebhooksUpdateResponseBody.md)
+
+### Authorization
+
+[X-Management-Token](../README.md#X-Management-Token), [X-Management-Id](../README.md#X-Management-Id)
+
+### HTTP request headers
+
+ - **Content-Type**: application/json
+ - **Accept**: application/json
+
+### HTTP response details
+
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+**2XX** | Returns the details about the updated webhook configuration. | - |
+
+[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
+
diff --git a/docs/ManagementProject.md b/docs/ManagementProject.md
new file mode 100644
index 00000000..ff49e16d
--- /dev/null
+++ b/docs/ManagementProject.md
@@ -0,0 +1,34 @@
+# ManagementProject
+
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**id** | **str** | Unique identifier of the project. | [optional]
+**name** | **str** | The name of the project. | [optional]
+**description** | **str** | A user-defined description of the project, e.g. its purpose, scope, region. | [optional]
+**timezone** | **str** | The time zone in which the project is established. It can be in the GMT format or in accordance with IANA time zone database. | [optional]
+**currency** | **str** | The currency used in the project. It is equal to a 3-letter ISO 4217 code. | [optional]
+**dial_code** | **str** | The country dial code for the project. It is equal to an ITU country code. | [optional]
+**webhook_version** | **str** | The webhook version used in the project. | [optional] [default to 'v2024-01-01']
+**client_trusted_domains** | **List[str]** | An array of URL addresses that allow client requests. | [optional]
+**client_redeem_enabled** | **bool** | Enables client-side redemption. | [optional]
+**client_publish_enabled** | **bool** | Enables client-side publication. | [optional]
+**client_list_vouchers_enabled** | **bool** | Enables client-side listing of vouchers. | [optional]
+**client_create_customer_enabled** | **bool** | Enables client-side creation of customers. | [optional]
+**client_loyalty_events_enabled** | **bool** | Enables client-side events for loyalty and referral programs. | [optional]
+**client_set_voucher_expiration_date_enabled** | **bool** | Enables client-side setting of voucher expiration date. | [optional]
+**webhooks_callout_notifications** | [**ManagementProjectWebhooksCalloutNotifications**](ManagementProjectWebhooksCalloutNotifications.md) | | [optional]
+**api_usage_notifications** | [**ManagementProjectApiUsageNotifications**](ManagementProjectApiUsageNotifications.md) | | [optional]
+**cluster_id** | **str** | The identifier of the cluster where the project will be created. | [optional]
+**case_sensitive_codes** | **bool** | Determines if the vouchers in the project will be: - case sensitive - if `true`, `C0dE-cfV` is **not** equal to `c0de-cfv`), - case insensitive - if `false`, `C0dE-cfV` is equal to `c0de-cfv`. | [optional]
+**api_version** | **str** | The API version used in the project. Currently, the default and only value is `v2018-08-01`. | [optional] [default to 'v2018-08-01']
+**is_sandbox** | **bool** | Determines if the project is a sandbox project. | [optional]
+**webhook_token** | **str** | Webhook token used for authentication. | [optional]
+**default_code_config** | [**ManagementProjectDefaultCodeConfig**](ManagementProjectDefaultCodeConfig.md) | | [optional]
+**limits** | [**ManagementProjectLimits**](ManagementProjectLimits.md) | | [optional]
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/docs/ManagementProjectApiUsageNotifications.md b/docs/ManagementProjectApiUsageNotifications.md
new file mode 100644
index 00000000..c10dba6b
--- /dev/null
+++ b/docs/ManagementProjectApiUsageNotifications.md
@@ -0,0 +1,18 @@
+# ManagementProjectApiUsageNotifications
+
+Determines the notification settings.
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**redemptions** | [**UsageNotifications**](UsageNotifications.md) | | [optional]
+**messages** | [**UsageNotifications**](UsageNotifications.md) | | [optional]
+**api_calls** | [**UsageNotifications**](UsageNotifications.md) | | [optional]
+**bulk_api_calls** | [**UsageNotifications**](UsageNotifications.md) | | [optional]
+**webhook_calls** | [**UsageNotifications**](UsageNotifications.md) | | [optional]
+**cycle_calls** | [**UsageNotifications**](UsageNotifications.md) | | [optional]
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/docs/ManagementProjectDefaultCodeConfig.md b/docs/ManagementProjectDefaultCodeConfig.md
new file mode 100644
index 00000000..91b591bc
--- /dev/null
+++ b/docs/ManagementProjectDefaultCodeConfig.md
@@ -0,0 +1,13 @@
+# ManagementProjectDefaultCodeConfig
+
+Determines the character set that is used as default for vouchers. It is affected by the `\"case_sensitive_codes\"` setting.
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**charset** | **str** | Lists all characters that are used as default for vouchers | [optional]
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/docs/ManagementProjectLimits.md b/docs/ManagementProjectLimits.md
new file mode 100644
index 00000000..82842461
--- /dev/null
+++ b/docs/ManagementProjectLimits.md
@@ -0,0 +1,14 @@
+# ManagementProjectLimits
+
+Determines additional limits set on a given project, e.g. the Sandbox project. If no limits are returned, the limits set for the whole organization apply.
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**api_calls** | [**List[ManagementProjectLimitsApiCallsItem]**](ManagementProjectLimitsApiCallsItem.md) | | [optional]
+**bulk_api_calls** | [**List[ManagementProjectLimitsBulkApiCallsItem]**](ManagementProjectLimitsBulkApiCallsItem.md) | | [optional]
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/docs/ManagementProjectLimitsApiCallsItem.md b/docs/ManagementProjectLimitsApiCallsItem.md
new file mode 100644
index 00000000..93be7275
--- /dev/null
+++ b/docs/ManagementProjectLimitsApiCallsItem.md
@@ -0,0 +1,14 @@
+# ManagementProjectLimitsApiCallsItem
+
+Determines the limit of API calls per given unit time.
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**value** | **int** | Determines the maximum number of API calls per time set in `\"duration\"`. | [optional]
+**duration** | **str** | Determines the amount of time during which the calls up to the number specified in the `value` can be made. The duration is presented in the ISO 8601 format, e.g. `PT1H` means one hour. | [optional]
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/docs/ManagementProjectLimitsBulkApiCallsItem.md b/docs/ManagementProjectLimitsBulkApiCallsItem.md
new file mode 100644
index 00000000..61877fb6
--- /dev/null
+++ b/docs/ManagementProjectLimitsBulkApiCallsItem.md
@@ -0,0 +1,14 @@
+# ManagementProjectLimitsBulkApiCallsItem
+
+
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**value** | **int** | Determines the maximum number of API calls per time set in `\"duration\"`. | [optional]
+**duration** | **str** | Determines the amount of time during which the calls up to the number specified in the `value` can be made. The duration is presented in the ISO 8601 format, e.g. `PT1H` means one hour. | [optional]
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/docs/ManagementProjectWebhooksCalloutNotifications.md b/docs/ManagementProjectWebhooksCalloutNotifications.md
new file mode 100644
index 00000000..7cf89446
--- /dev/null
+++ b/docs/ManagementProjectWebhooksCalloutNotifications.md
@@ -0,0 +1,14 @@
+# ManagementProjectWebhooksCalloutNotifications
+
+Determines the notification settings for webhook callouts configured in Distributions and Project settings.
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**distributions** | [**ManagementProjectWebhooksCalloutNotificationsDistributions**](ManagementProjectWebhooksCalloutNotificationsDistributions.md) | | [optional]
+**webhooks** | [**ManagementProjectWebhooksCalloutNotificationsWebhooks**](ManagementProjectWebhooksCalloutNotificationsWebhooks.md) | | [optional]
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/docs/ManagementProjectWebhooksCalloutNotificationsDistributions.md b/docs/ManagementProjectWebhooksCalloutNotificationsDistributions.md
new file mode 100644
index 00000000..1e4224b3
--- /dev/null
+++ b/docs/ManagementProjectWebhooksCalloutNotificationsDistributions.md
@@ -0,0 +1,15 @@
+# ManagementProjectWebhooksCalloutNotificationsDistributions
+
+Determines the notification settings for webhooks sent through Distributions.
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**email** | **bool** | Enables the notification through an email. | [optional]
+**in_app** | **bool** | Enables the notification through an email. | [optional]
+**emails** | **List[str]** | An array of email addresses which will receive the notification. | [optional]
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/docs/ManagementProjectWebhooksCalloutNotificationsWebhooks.md b/docs/ManagementProjectWebhooksCalloutNotificationsWebhooks.md
new file mode 100644
index 00000000..d73e4aef
--- /dev/null
+++ b/docs/ManagementProjectWebhooksCalloutNotificationsWebhooks.md
@@ -0,0 +1,15 @@
+# ManagementProjectWebhooksCalloutNotificationsWebhooks
+
+Determines the notification settings for webhooks sent as set out in the Project settings.
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**email** | **bool** | Enables the notification through an email. | [optional]
+**in_app** | **bool** | Enables the notification through an email. | [optional]
+**emails** | **List[str]** | An array of email addresses which will receive the notification. | [optional]
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/docs/ManagementProjectsBranding.md b/docs/ManagementProjectsBranding.md
new file mode 100644
index 00000000..c5e3da34
--- /dev/null
+++ b/docs/ManagementProjectsBranding.md
@@ -0,0 +1,17 @@
+# ManagementProjectsBranding
+
+Response brand schema.
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**id** | **str** | Unique identifier of the brand configuration. | [optional]
+**brand** | [**ManagementProjectsBrandingBrand**](ManagementProjectsBrandingBrand.md) | | [optional]
+**address** | [**ManagementProjectsBrandingAddress**](ManagementProjectsBrandingAddress.md) | | [optional]
+**contact** | [**ManagementProjectsBrandingContact**](ManagementProjectsBrandingContact.md) | | [optional]
+**cockpits** | [**ManagementProjectsBrandingCockpits**](ManagementProjectsBrandingCockpits.md) | | [optional]
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/docs/ManagementProjectsBrandingAddress.md b/docs/ManagementProjectsBrandingAddress.md
new file mode 100644
index 00000000..73f107f5
--- /dev/null
+++ b/docs/ManagementProjectsBrandingAddress.md
@@ -0,0 +1,17 @@
+# ManagementProjectsBrandingAddress
+
+Defines the address details.
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**street** | **str** | Defines the brand's street. | [optional]
+**city** | **str** | Defines the brand's city. | [optional]
+**postal** | **str** | Defines the brand's postal code. | [optional]
+**state** | **str** | Defines the brand's state or similar administrative area. | [optional]
+**country** | **str** | Defines the brand's country. | [optional]
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/docs/ManagementProjectsBrandingBrand.md b/docs/ManagementProjectsBrandingBrand.md
new file mode 100644
index 00000000..1b35308f
--- /dev/null
+++ b/docs/ManagementProjectsBrandingBrand.md
@@ -0,0 +1,17 @@
+# ManagementProjectsBrandingBrand
+
+Defines basic brand details.
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**name** | **str** | Defines brand name. | [optional]
+**privacy_policy_url** | **str** | Defines the URL to the brand's privacy policy. It must be a valid URL format. | [optional]
+**terms_of_use_url** | **str** | Defines the URL to the brand's terms of use. It must be a valid URL format. | [optional]
+**permission_reminder** | **str** | Defines the message that is displayed to customers who opted in an email newsletter. | [optional]
+**website_url** | **str** | Defines the URL to the brand's website. It must be a valid URL format. | [optional]
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/docs/ManagementProjectsBrandingCockpits.md b/docs/ManagementProjectsBrandingCockpits.md
new file mode 100644
index 00000000..c819695e
--- /dev/null
+++ b/docs/ManagementProjectsBrandingCockpits.md
@@ -0,0 +1,20 @@
+# ManagementProjectsBrandingCockpits
+
+Defines customer cockpit details.
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**campaigns_overview_enabled** | **bool** | Enables the campaign overview for customers. | [optional]
+**loyalty_enabled** | **bool** | Enables the loyalty campaign overview for customers. | [optional]
+**gift_cards_enabled** | **bool** | Enables the gift card overview for customers. | [optional]
+**coupons_enabled** | **bool** | Enables the discount coupon overview for customers. | [optional]
+**referrals_enabled** | **bool** | Enables the referral campaign overview for customers. | [optional]
+**theme** | **str** | Determines the color scheme of the customer cockpit. | [optional]
+**use_custom_double_opt_in_redirect_url** | **bool** | Enables the double opt-in option. It must be a valid URL format. | [optional]
+**custom_double_opt_in_redirect_url** | **str** | Defines the URL for the double opt-in consent. It must be a valid URL format. | [optional]
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/docs/ManagementProjectsBrandingContact.md b/docs/ManagementProjectsBrandingContact.md
new file mode 100644
index 00000000..f57abf10
--- /dev/null
+++ b/docs/ManagementProjectsBrandingContact.md
@@ -0,0 +1,14 @@
+# ManagementProjectsBrandingContact
+
+Defines contact details.
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**email** | **str** | Defines the brand's email address. It must be a valid email format. | [optional]
+**phone** | **str** | Defines the brand's phone number. | [optional]
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/docs/ManagementProjectsBrandingCreateRequestBody.md b/docs/ManagementProjectsBrandingCreateRequestBody.md
new file mode 100644
index 00000000..50d44fdb
--- /dev/null
+++ b/docs/ManagementProjectsBrandingCreateRequestBody.md
@@ -0,0 +1,16 @@
+# ManagementProjectsBrandingCreateRequestBody
+
+Request body schema for **POST** `/management/v1/projects/{projectId}/branding`.
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**brand** | [**ManagementProjectsBrandingCreateRequestBodyBrand**](ManagementProjectsBrandingCreateRequestBodyBrand.md) | | [optional]
+**address** | [**ManagementProjectsBrandingCreateRequestBodyAddress**](ManagementProjectsBrandingCreateRequestBodyAddress.md) | | [optional]
+**contact** | [**ManagementProjectsBrandingCreateRequestBodyContact**](ManagementProjectsBrandingCreateRequestBodyContact.md) | | [optional]
+**cockpits** | [**ManagementProjectsBrandingCreateRequestBodyCockpits**](ManagementProjectsBrandingCreateRequestBodyCockpits.md) | | [optional]
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/docs/ManagementProjectsBrandingCreateRequestBodyAddress.md b/docs/ManagementProjectsBrandingCreateRequestBodyAddress.md
new file mode 100644
index 00000000..1e445e47
--- /dev/null
+++ b/docs/ManagementProjectsBrandingCreateRequestBodyAddress.md
@@ -0,0 +1,17 @@
+# ManagementProjectsBrandingCreateRequestBodyAddress
+
+Defines the address details.
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**street** | **str** | Defines the brand's street. | [optional]
+**city** | **str** | Defines the brand's city. | [optional]
+**postal** | **str** | Defines the brand's postal code. | [optional]
+**state** | **str** | Defines the brand's state or similar administrative area. | [optional]
+**country** | **str** | Defines the brand's country. | [optional]
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/docs/ManagementProjectsBrandingCreateRequestBodyBrand.md b/docs/ManagementProjectsBrandingCreateRequestBodyBrand.md
new file mode 100644
index 00000000..709ee660
--- /dev/null
+++ b/docs/ManagementProjectsBrandingCreateRequestBodyBrand.md
@@ -0,0 +1,17 @@
+# ManagementProjectsBrandingCreateRequestBodyBrand
+
+Defines basic brand details.
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**name** | **str** | Defines brand name. | [optional]
+**privacy_policy_url** | **str** | Defines the URL to the brand's privacy policy. It must be a valid URL format. | [optional]
+**terms_of_use_url** | **str** | Defines the URL to the brand's terms of use. It must be a valid URL format. | [optional]
+**permission_reminder** | **str** | Defines the message that is displayed to customers who opted in an email newsletter. | [optional] [default to 'You are receiving this email because you opted in at our website.']
+**website_url** | **str** | Defines the URL to the brand's website. It must be a valid URL format. | [optional]
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/docs/ManagementProjectsBrandingCreateRequestBodyCockpits.md b/docs/ManagementProjectsBrandingCreateRequestBodyCockpits.md
new file mode 100644
index 00000000..4b4eddf0
--- /dev/null
+++ b/docs/ManagementProjectsBrandingCreateRequestBodyCockpits.md
@@ -0,0 +1,20 @@
+# ManagementProjectsBrandingCreateRequestBodyCockpits
+
+Defines customer cockpit details.
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**campaigns_overview_enabled** | **bool** | Enables the campaign overview for customers. | [optional] [default to False]
+**loyalty_enabled** | **bool** | Enables the loyalty campaign overview for customers. | [optional] [default to True]
+**gift_cards_enabled** | **bool** | Enables the gift card overview for customers. | [optional] [default to True]
+**coupons_enabled** | **bool** | Enables the discount coupon overview for customers. | [optional] [default to True]
+**referrals_enabled** | **bool** | Enables the referral campaign overview for customers. | [optional] [default to True]
+**theme** | **str** | Determines the color scheme of the customer cockpit. | [optional] [default to 'default']
+**use_custom_double_opt_in_redirect_url** | **bool** | Enables the double opt-in option. It must be a valid URL format. | [optional] [default to False]
+**custom_double_opt_in_redirect_url** | **str** | Defines the URL for the double opt-in consent. It must be a valid URL format. | [optional]
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/docs/ManagementProjectsBrandingCreateRequestBodyContact.md b/docs/ManagementProjectsBrandingCreateRequestBodyContact.md
new file mode 100644
index 00000000..3cd5ae39
--- /dev/null
+++ b/docs/ManagementProjectsBrandingCreateRequestBodyContact.md
@@ -0,0 +1,14 @@
+# ManagementProjectsBrandingCreateRequestBodyContact
+
+Defines contact details.
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**email** | **str** | Defines the brand's email address. It must be a valid email format. | [optional]
+**phone** | **str** | Defines the brand's phone number. | [optional]
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/docs/ManagementProjectsBrandingCreateResponseBody.md b/docs/ManagementProjectsBrandingCreateResponseBody.md
new file mode 100644
index 00000000..26838953
--- /dev/null
+++ b/docs/ManagementProjectsBrandingCreateResponseBody.md
@@ -0,0 +1,17 @@
+# ManagementProjectsBrandingCreateResponseBody
+
+Response body schema for **POST** `/management/v1/projects/{projectId}/branding`.
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**id** | **str** | Unique identifier of the brand configuration. | [optional]
+**brand** | [**ManagementProjectsBrandingCreateResponseBodyBrand**](ManagementProjectsBrandingCreateResponseBodyBrand.md) | | [optional]
+**address** | [**ManagementProjectsBrandingCreateResponseBodyAddress**](ManagementProjectsBrandingCreateResponseBodyAddress.md) | | [optional]
+**contact** | [**ManagementProjectsBrandingCreateResponseBodyContact**](ManagementProjectsBrandingCreateResponseBodyContact.md) | | [optional]
+**cockpits** | [**ManagementProjectsBrandingCreateResponseBodyCockpits**](ManagementProjectsBrandingCreateResponseBodyCockpits.md) | | [optional]
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/docs/ManagementProjectsBrandingCreateResponseBodyAddress.md b/docs/ManagementProjectsBrandingCreateResponseBodyAddress.md
new file mode 100644
index 00000000..bee9d70a
--- /dev/null
+++ b/docs/ManagementProjectsBrandingCreateResponseBodyAddress.md
@@ -0,0 +1,17 @@
+# ManagementProjectsBrandingCreateResponseBodyAddress
+
+Defines the address details.
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**street** | **str** | Defines the brand's street. | [optional]
+**city** | **str** | Defines the brand's city. | [optional]
+**postal** | **str** | Defines the brand's postal code. | [optional]
+**state** | **str** | Defines the brand's state or similar administrative area. | [optional]
+**country** | **str** | Defines the brand's country. | [optional]
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/docs/ManagementProjectsBrandingCreateResponseBodyBrand.md b/docs/ManagementProjectsBrandingCreateResponseBodyBrand.md
new file mode 100644
index 00000000..42463cd7
--- /dev/null
+++ b/docs/ManagementProjectsBrandingCreateResponseBodyBrand.md
@@ -0,0 +1,17 @@
+# ManagementProjectsBrandingCreateResponseBodyBrand
+
+Defines basic brand details.
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**name** | **str** | Defines brand name. | [optional]
+**privacy_policy_url** | **str** | Defines the URL to the brand's privacy policy. It must be a valid URL format. | [optional]
+**terms_of_use_url** | **str** | Defines the URL to the brand's terms of use. It must be a valid URL format. | [optional]
+**permission_reminder** | **str** | Defines the message that is displayed to customers who opted in an email newsletter. | [optional]
+**website_url** | **str** | Defines the URL to the brand's website. It must be a valid URL format. | [optional]
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/docs/ManagementProjectsBrandingCreateResponseBodyCockpits.md b/docs/ManagementProjectsBrandingCreateResponseBodyCockpits.md
new file mode 100644
index 00000000..febc2743
--- /dev/null
+++ b/docs/ManagementProjectsBrandingCreateResponseBodyCockpits.md
@@ -0,0 +1,20 @@
+# ManagementProjectsBrandingCreateResponseBodyCockpits
+
+Defines customer cockpit details.
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**campaigns_overview_enabled** | **bool** | Enables the campaign overview for customers. | [optional]
+**loyalty_enabled** | **bool** | Enables the loyalty campaign overview for customers. | [optional]
+**gift_cards_enabled** | **bool** | Enables the gift card overview for customers. | [optional]
+**coupons_enabled** | **bool** | Enables the discount coupon overview for customers. | [optional]
+**referrals_enabled** | **bool** | Enables the referral campaign overview for customers. | [optional]
+**theme** | **str** | Determines the color scheme of the customer cockpit. | [optional]
+**use_custom_double_opt_in_redirect_url** | **bool** | Enables the double opt-in option. It must be a valid URL format. | [optional]
+**custom_double_opt_in_redirect_url** | **str** | Defines the URL for the double opt-in consent. It must be a valid URL format. | [optional]
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/docs/ManagementProjectsBrandingCreateResponseBodyContact.md b/docs/ManagementProjectsBrandingCreateResponseBodyContact.md
new file mode 100644
index 00000000..b6d915b1
--- /dev/null
+++ b/docs/ManagementProjectsBrandingCreateResponseBodyContact.md
@@ -0,0 +1,14 @@
+# ManagementProjectsBrandingCreateResponseBodyContact
+
+Defines contact details.
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**email** | **str** | Defines the brand's email address. It must be a valid email format. | [optional]
+**phone** | **str** | Defines the brand's phone number. | [optional]
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/docs/ManagementProjectsBrandingGetResponseBody.md b/docs/ManagementProjectsBrandingGetResponseBody.md
new file mode 100644
index 00000000..c89eefbd
--- /dev/null
+++ b/docs/ManagementProjectsBrandingGetResponseBody.md
@@ -0,0 +1,17 @@
+# ManagementProjectsBrandingGetResponseBody
+
+Response body schema for **GET** `/management/v1/projects/{projectId}/branding/{brandingId}`.
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**id** | **str** | Unique identifier of the brand configuration. | [optional]
+**brand** | [**ManagementProjectsBrandingGetResponseBodyBrand**](ManagementProjectsBrandingGetResponseBodyBrand.md) | | [optional]
+**address** | [**ManagementProjectsBrandingGetResponseBodyAddress**](ManagementProjectsBrandingGetResponseBodyAddress.md) | | [optional]
+**contact** | [**ManagementProjectsBrandingGetResponseBodyContact**](ManagementProjectsBrandingGetResponseBodyContact.md) | | [optional]
+**cockpits** | [**ManagementProjectsBrandingGetResponseBodyCockpits**](ManagementProjectsBrandingGetResponseBodyCockpits.md) | | [optional]
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/docs/ManagementProjectsBrandingGetResponseBodyAddress.md b/docs/ManagementProjectsBrandingGetResponseBodyAddress.md
new file mode 100644
index 00000000..7e564d28
--- /dev/null
+++ b/docs/ManagementProjectsBrandingGetResponseBodyAddress.md
@@ -0,0 +1,17 @@
+# ManagementProjectsBrandingGetResponseBodyAddress
+
+Defines the address details.
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**street** | **str** | Defines the brand's street. | [optional]
+**city** | **str** | Defines the brand's city. | [optional]
+**postal** | **str** | Defines the brand's postal code. | [optional]
+**state** | **str** | Defines the brand's state or similar administrative area. | [optional]
+**country** | **str** | Defines the brand's country. | [optional]
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/docs/ManagementProjectsBrandingGetResponseBodyBrand.md b/docs/ManagementProjectsBrandingGetResponseBodyBrand.md
new file mode 100644
index 00000000..7638f327
--- /dev/null
+++ b/docs/ManagementProjectsBrandingGetResponseBodyBrand.md
@@ -0,0 +1,17 @@
+# ManagementProjectsBrandingGetResponseBodyBrand
+
+Defines basic brand details.
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**name** | **str** | Defines brand name. | [optional]
+**privacy_policy_url** | **str** | Defines the URL to the brand's privacy policy. It must be a valid URL format. | [optional]
+**terms_of_use_url** | **str** | Defines the URL to the brand's terms of use. It must be a valid URL format. | [optional]
+**permission_reminder** | **str** | Defines the message that is displayed to customers who opted in an email newsletter. | [optional]
+**website_url** | **str** | Defines the URL to the brand's website. It must be a valid URL format. | [optional]
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/docs/ManagementProjectsBrandingGetResponseBodyCockpits.md b/docs/ManagementProjectsBrandingGetResponseBodyCockpits.md
new file mode 100644
index 00000000..9e9b80ab
--- /dev/null
+++ b/docs/ManagementProjectsBrandingGetResponseBodyCockpits.md
@@ -0,0 +1,20 @@
+# ManagementProjectsBrandingGetResponseBodyCockpits
+
+Defines customer cockpit details.
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**campaigns_overview_enabled** | **bool** | Enables the campaign overview for customers. | [optional]
+**loyalty_enabled** | **bool** | Enables the loyalty campaign overview for customers. | [optional]
+**gift_cards_enabled** | **bool** | Enables the gift card overview for customers. | [optional]
+**coupons_enabled** | **bool** | Enables the discount coupon overview for customers. | [optional]
+**referrals_enabled** | **bool** | Enables the referral campaign overview for customers. | [optional]
+**theme** | **str** | Determines the color scheme of the customer cockpit. | [optional]
+**use_custom_double_opt_in_redirect_url** | **bool** | Enables the double opt-in option. It must be a valid URL format. | [optional]
+**custom_double_opt_in_redirect_url** | **str** | Defines the URL for the double opt-in consent. It must be a valid URL format. | [optional]
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/docs/ManagementProjectsBrandingGetResponseBodyContact.md b/docs/ManagementProjectsBrandingGetResponseBodyContact.md
new file mode 100644
index 00000000..7daece19
--- /dev/null
+++ b/docs/ManagementProjectsBrandingGetResponseBodyContact.md
@@ -0,0 +1,14 @@
+# ManagementProjectsBrandingGetResponseBodyContact
+
+Defines contact details.
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**email** | **str** | Defines the brand's email address. It must be a valid email format. | [optional]
+**phone** | **str** | Defines the brand's phone number. | [optional]
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/docs/ManagementProjectsBrandingListResponseBody.md b/docs/ManagementProjectsBrandingListResponseBody.md
new file mode 100644
index 00000000..764a4876
--- /dev/null
+++ b/docs/ManagementProjectsBrandingListResponseBody.md
@@ -0,0 +1,16 @@
+# ManagementProjectsBrandingListResponseBody
+
+Object containing a list of brand configurations. It always contains one item.
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**object** | **str** | The type of the object represented by JSON. This object stores information about the brand in a dictionary. | [optional] [default to 'list']
+**data_ref** | **str** | Identifies the name of the attribute that contains the array of brand objects. | [optional] [default to 'data']
+**data** | [**List[ManagementProjectsBranding]**](ManagementProjectsBranding.md) | Array of brand objects. It contains only one object. | [optional]
+**total** | **int** | The total number of brand objects. It is always `1`. | [optional]
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/docs/ManagementProjectsBrandingUpdateRequestBody.md b/docs/ManagementProjectsBrandingUpdateRequestBody.md
new file mode 100644
index 00000000..1ffdbc0f
--- /dev/null
+++ b/docs/ManagementProjectsBrandingUpdateRequestBody.md
@@ -0,0 +1,15 @@
+# ManagementProjectsBrandingUpdateRequestBody
+
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**brand** | [**ManagementProjectsBrandingUpdateRequestBodyBrand**](ManagementProjectsBrandingUpdateRequestBodyBrand.md) | | [optional]
+**address** | [**ManagementProjectsBrandingUpdateRequestBodyAddress**](ManagementProjectsBrandingUpdateRequestBodyAddress.md) | | [optional]
+**contact** | [**ManagementProjectsBrandingUpdateRequestBodyContact**](ManagementProjectsBrandingUpdateRequestBodyContact.md) | | [optional]
+**cockpits** | [**ManagementProjectsBrandingUpdateRequestBodyCockpits**](ManagementProjectsBrandingUpdateRequestBodyCockpits.md) | | [optional]
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/docs/ManagementProjectsBrandingUpdateRequestBodyAddress.md b/docs/ManagementProjectsBrandingUpdateRequestBodyAddress.md
new file mode 100644
index 00000000..8f0264b1
--- /dev/null
+++ b/docs/ManagementProjectsBrandingUpdateRequestBodyAddress.md
@@ -0,0 +1,17 @@
+# ManagementProjectsBrandingUpdateRequestBodyAddress
+
+Defines the address details.
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**street** | **str** | Defines the brand's street. | [optional]
+**city** | **str** | Defines the brand's city. | [optional]
+**postal** | **str** | Defines the brand's postal code | [optional]
+**state** | **str** | Defines the brand's state or similar administrative area. | [optional]
+**country** | **str** | Defines the brand's country. | [optional]
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/docs/ManagementProjectsBrandingUpdateRequestBodyBrand.md b/docs/ManagementProjectsBrandingUpdateRequestBodyBrand.md
new file mode 100644
index 00000000..1993353d
--- /dev/null
+++ b/docs/ManagementProjectsBrandingUpdateRequestBodyBrand.md
@@ -0,0 +1,17 @@
+# ManagementProjectsBrandingUpdateRequestBodyBrand
+
+Defines basic brand details.
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**name** | **str** | Defines brand name. | [optional]
+**privacy_policy_url** | **str** | Defines the URL to the brand's privacy policy. | [optional]
+**terms_of_use_url** | **str** | Defines the URL to the brand's terms of use. | [optional]
+**permission_reminder** | **str** | Defines the message that is displayed to customers who opted in an email newsletter. | [optional]
+**website_url** | **str** | Defines the URL to the brand's website. | [optional]
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/docs/ManagementProjectsBrandingUpdateRequestBodyCockpits.md b/docs/ManagementProjectsBrandingUpdateRequestBodyCockpits.md
new file mode 100644
index 00000000..e3e28e82
--- /dev/null
+++ b/docs/ManagementProjectsBrandingUpdateRequestBodyCockpits.md
@@ -0,0 +1,20 @@
+# ManagementProjectsBrandingUpdateRequestBodyCockpits
+
+Defines customer cockpit details.
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**campaigns_overview_enabled** | **bool** | Indicates if the campaign overview is turned on for customers. | [optional]
+**loyalty_enabled** | **bool** | Indicates if the loyalty campaign overview is turned on for customers. | [optional]
+**gift_cards_enabled** | **bool** | Indicates if the gift card overview is turned on for customers. | [optional]
+**coupons_enabled** | **bool** | Indicates if the discount coupon overview is turned on for customers. | [optional]
+**referrals_enabled** | **bool** | Indicates if the referral campaign overview is turned on for customers. | [optional]
+**theme** | **str** | Determines the color scheme of the customer cockpit. | [optional]
+**use_custom_double_opt_in_redirect_url** | **bool** | Indicates if the double opt-in option is turned on. | [optional]
+**custom_double_opt_in_redirect_url** | **str** | Defines the URL for the double opt-in consent. | [optional]
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/docs/ManagementProjectsBrandingUpdateRequestBodyContact.md b/docs/ManagementProjectsBrandingUpdateRequestBodyContact.md
new file mode 100644
index 00000000..4b4ec3d2
--- /dev/null
+++ b/docs/ManagementProjectsBrandingUpdateRequestBodyContact.md
@@ -0,0 +1,14 @@
+# ManagementProjectsBrandingUpdateRequestBodyContact
+
+Defines contact details.
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**email** | **str** | Defines the brand's email address. It must be a valid email format. | [optional]
+**phone** | **str** | Defines the brand's phone number. | [optional]
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/docs/ManagementProjectsBrandingUpdateResponseBody.md b/docs/ManagementProjectsBrandingUpdateResponseBody.md
new file mode 100644
index 00000000..0b865f3a
--- /dev/null
+++ b/docs/ManagementProjectsBrandingUpdateResponseBody.md
@@ -0,0 +1,17 @@
+# ManagementProjectsBrandingUpdateResponseBody
+
+Response body schema for **PUT** `/management/v1/projects/{projectId}/branding/{brandingId}`.
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**id** | **str** | Unique identifier of the brand configuration. | [optional]
+**brand** | [**ManagementProjectsBrandingUpdateResponseBodyBrand**](ManagementProjectsBrandingUpdateResponseBodyBrand.md) | | [optional]
+**address** | [**ManagementProjectsBrandingUpdateResponseBodyAddress**](ManagementProjectsBrandingUpdateResponseBodyAddress.md) | | [optional]
+**contact** | [**ManagementProjectsBrandingUpdateResponseBodyContact**](ManagementProjectsBrandingUpdateResponseBodyContact.md) | | [optional]
+**cockpits** | [**ManagementProjectsBrandingUpdateResponseBodyCockpits**](ManagementProjectsBrandingUpdateResponseBodyCockpits.md) | | [optional]
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/docs/ManagementProjectsBrandingUpdateResponseBodyAddress.md b/docs/ManagementProjectsBrandingUpdateResponseBodyAddress.md
new file mode 100644
index 00000000..eb0f3f02
--- /dev/null
+++ b/docs/ManagementProjectsBrandingUpdateResponseBodyAddress.md
@@ -0,0 +1,17 @@
+# ManagementProjectsBrandingUpdateResponseBodyAddress
+
+Defines the address details.
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**street** | **str** | Defines the brand's street. | [optional]
+**city** | **str** | Defines the brand's city. | [optional]
+**postal** | **str** | Defines the brand's postal code. | [optional]
+**state** | **str** | Defines the brand's state or similar administrative area. | [optional]
+**country** | **str** | Defines the brand's country. | [optional]
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/docs/ManagementProjectsBrandingUpdateResponseBodyBrand.md b/docs/ManagementProjectsBrandingUpdateResponseBodyBrand.md
new file mode 100644
index 00000000..2071520a
--- /dev/null
+++ b/docs/ManagementProjectsBrandingUpdateResponseBodyBrand.md
@@ -0,0 +1,17 @@
+# ManagementProjectsBrandingUpdateResponseBodyBrand
+
+Defines basic brand details.
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**name** | **str** | Defines brand name. | [optional]
+**privacy_policy_url** | **str** | Defines the URL to the brand's privacy policy. It must be a valid URL format. | [optional]
+**terms_of_use_url** | **str** | Defines the URL to the brand's terms of use. It must be a valid URL format. | [optional]
+**permission_reminder** | **str** | Defines the message that is displayed to customers who opted in an email newsletter. | [optional]
+**website_url** | **str** | Defines the URL to the brand's website. It must be a valid URL format. | [optional]
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/docs/ManagementProjectsBrandingUpdateResponseBodyCockpits.md b/docs/ManagementProjectsBrandingUpdateResponseBodyCockpits.md
new file mode 100644
index 00000000..c8d181fd
--- /dev/null
+++ b/docs/ManagementProjectsBrandingUpdateResponseBodyCockpits.md
@@ -0,0 +1,20 @@
+# ManagementProjectsBrandingUpdateResponseBodyCockpits
+
+Defines customer cockpit details.
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**campaigns_overview_enabled** | **bool** | Enables the campaign overview for customers. | [optional]
+**loyalty_enabled** | **bool** | Enables the loyalty campaign overview for customers. | [optional]
+**gift_cards_enabled** | **bool** | Enables the gift card overview for customers. | [optional]
+**coupons_enabled** | **bool** | Enables the discount coupon overview for customers. | [optional]
+**referrals_enabled** | **bool** | Enables the referral campaign overview for customers. | [optional]
+**theme** | **str** | Determines the color scheme of the customer cockpit. | [optional]
+**use_custom_double_opt_in_redirect_url** | **bool** | Enables the double opt-in option. It must be a valid URL format. | [optional]
+**custom_double_opt_in_redirect_url** | **str** | Defines the URL for the double opt-in consent. It must be a valid URL format. | [optional]
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/docs/ManagementProjectsBrandingUpdateResponseBodyContact.md b/docs/ManagementProjectsBrandingUpdateResponseBodyContact.md
new file mode 100644
index 00000000..6ffe98ad
--- /dev/null
+++ b/docs/ManagementProjectsBrandingUpdateResponseBodyContact.md
@@ -0,0 +1,14 @@
+# ManagementProjectsBrandingUpdateResponseBodyContact
+
+Defines contact details.
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**email** | **str** | Defines the brand's email address. It must be a valid email format. | [optional]
+**phone** | **str** | Defines the brand's phone number. | [optional]
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/docs/ManagementProjectsCreateRequestBody.md b/docs/ManagementProjectsCreateRequestBody.md
new file mode 100644
index 00000000..7a43d2ec
--- /dev/null
+++ b/docs/ManagementProjectsCreateRequestBody.md
@@ -0,0 +1,31 @@
+# ManagementProjectsCreateRequestBody
+
+Request body schema for **POST** `/management/v1/projects`.
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**case_sensitive_codes** | **bool** | Determines if the vouchers in the project will be case sensitive (if `true`, `C0dE-cfV` is not equal to `c0de-cfv`) or case insensitive (if false, `C0dE-cfV` is equal to `c0de-cfv`). | [optional]
+**name** | **str** | The name of the project. | [optional]
+**description** | **str** | A user-defined description of the project, e.g. its purpose, scope, region. | [optional]
+**timezone** | **str** | The time zone in which the project is established. It can be in the GMT format or in accordance with IANA time zone database. | [optional]
+**currency** | **str** | The currency used in the project. It is equal to a 3-letter ISO 4217 code. | [optional]
+**dial_code** | **str** | The country dial code for the project. It is equal to an ITU country code. | [optional]
+**webhook_version** | **str** | The webhook version used in the project. | [optional] [default to 'v2024-01-01']
+**client_trusted_domains** | **List[str]** | An array of URL addresses that allow client requests. | [optional]
+**client_redeem_enabled** | **bool** | Enables client-side redemption. | [optional]
+**client_publish_enabled** | **bool** | Enables client-side publication. | [optional]
+**client_list_vouchers_enabled** | **bool** | Enables client-side listing of vouchers. | [optional]
+**client_create_customer_enabled** | **bool** | Enables client-side creation of customers. | [optional]
+**client_loyalty_events_enabled** | **bool** | Enables client-side events for loyalty and referral programs. | [optional]
+**client_set_voucher_expiration_date_enabled** | **bool** | Enables client-side setting of voucher expiration date. | [optional]
+**webhooks_callout_notifications** | [**ManagementProjectsCreateRequestBodyWebhooksCalloutNotifications**](ManagementProjectsCreateRequestBodyWebhooksCalloutNotifications.md) | | [optional]
+**api_usage_notifications** | [**ManagementProjectsCreateRequestBodyApiUsageNotifications**](ManagementProjectsCreateRequestBodyApiUsageNotifications.md) | | [optional]
+**cluster_id** | **str** | The identifier of the cluster where the project will be created. The default cluster is `eu1` unless otherwise configured. | [optional]
+**api_version** | **str** | The API version used in the project. Currently, the default and only value is `v2018-08-01`. | [optional] [default to 'v2018-08-01']
+**users** | [**List[ManagementProjectsCreateRequestBodyUsersItem]**](ManagementProjectsCreateRequestBodyUsersItem.md) | The users (their identifiers, logins, and roles) who will be assigned to the project. You can assign only existing Voucherify users. It must be used either in the following combinations: - `id` and `role`, or - `login` and `role`. | [optional]
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/docs/ManagementProjectsCreateRequestBodyApiUsageNotifications.md b/docs/ManagementProjectsCreateRequestBodyApiUsageNotifications.md
new file mode 100644
index 00000000..1a3b8d8c
--- /dev/null
+++ b/docs/ManagementProjectsCreateRequestBodyApiUsageNotifications.md
@@ -0,0 +1,17 @@
+# ManagementProjectsCreateRequestBodyApiUsageNotifications
+
+Determines the notification settings.
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**messages** | [**UsageNotifications**](UsageNotifications.md) | | [optional]
+**api_calls** | [**UsageNotifications**](UsageNotifications.md) | | [optional]
+**bulk_api_calls** | [**UsageNotifications**](UsageNotifications.md) | | [optional]
+**webhook_calls** | [**UsageNotifications**](UsageNotifications.md) | | [optional]
+**cycle_calls** | [**UsageNotifications**](UsageNotifications.md) | | [optional]
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/docs/ManagementProjectsCreateRequestBodyUsersItem.md b/docs/ManagementProjectsCreateRequestBodyUsersItem.md
new file mode 100644
index 00000000..62e68176
--- /dev/null
+++ b/docs/ManagementProjectsCreateRequestBodyUsersItem.md
@@ -0,0 +1,15 @@
+# ManagementProjectsCreateRequestBodyUsersItem
+
+Contains details about the users who will be assigned to the project. Only the `id` and `role` or `login` and `role` should be provided in the request.
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**id** | **str** | The unique identifier of the user who will be assigned to the project. It can be found in Team Settings > Team > Edit member. **Required** with the `role` string. Do **not** use with the `login` string. | [optional]
+**login** | **str** | The login data of the user who will be assigned to the project. **Required** with the `role` string. Do **not** use with the `id` string. | [optional]
+**role** | **str** | The role of the user to be added. It can be one of the following predefined roles: `ADMIN`, `USER`, `VIEWER`, `MERCHANT` or an ID of a custom role. |
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/docs/ManagementProjectsCreateRequestBodyWebhooksCalloutNotifications.md b/docs/ManagementProjectsCreateRequestBodyWebhooksCalloutNotifications.md
new file mode 100644
index 00000000..106f5e02
--- /dev/null
+++ b/docs/ManagementProjectsCreateRequestBodyWebhooksCalloutNotifications.md
@@ -0,0 +1,14 @@
+# ManagementProjectsCreateRequestBodyWebhooksCalloutNotifications
+
+Determines the notification settings for webhook callouts configured in Distributions and Project settings.
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**distributions** | [**ManagementProjectsCreateRequestBodyWebhooksCalloutNotificationsDistributions**](ManagementProjectsCreateRequestBodyWebhooksCalloutNotificationsDistributions.md) | | [optional]
+**webhooks** | [**ManagementProjectsCreateRequestBodyWebhooksCalloutNotificationsWebhooks**](ManagementProjectsCreateRequestBodyWebhooksCalloutNotificationsWebhooks.md) | | [optional]
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/docs/ManagementProjectsCreateRequestBodyWebhooksCalloutNotificationsDistributions.md b/docs/ManagementProjectsCreateRequestBodyWebhooksCalloutNotificationsDistributions.md
new file mode 100644
index 00000000..fb064d57
--- /dev/null
+++ b/docs/ManagementProjectsCreateRequestBodyWebhooksCalloutNotificationsDistributions.md
@@ -0,0 +1,15 @@
+# ManagementProjectsCreateRequestBodyWebhooksCalloutNotificationsDistributions
+
+Determines the notification settings for webhooks sent through Distributions.
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**email** | **bool** | Enables the notification through an email. | [optional]
+**in_app** | **bool** | Enables the notification through an email. | [optional]
+**emails** | **List[str]** | An array of email addresses which will receive the notification. | [optional]
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/docs/ManagementProjectsCreateRequestBodyWebhooksCalloutNotificationsWebhooks.md b/docs/ManagementProjectsCreateRequestBodyWebhooksCalloutNotificationsWebhooks.md
new file mode 100644
index 00000000..2222efce
--- /dev/null
+++ b/docs/ManagementProjectsCreateRequestBodyWebhooksCalloutNotificationsWebhooks.md
@@ -0,0 +1,15 @@
+# ManagementProjectsCreateRequestBodyWebhooksCalloutNotificationsWebhooks
+
+Determines the notification settings for webhooks sent as set out in the Project settings.
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**email** | **bool** | Enables the notification through an email. | [optional]
+**in_app** | **bool** | Enables the notification through an email. | [optional]
+**emails** | **List[str]** | An array of email addresses which will receive the notification. | [optional]
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/docs/ManagementProjectsCreateResponseBody.md b/docs/ManagementProjectsCreateResponseBody.md
new file mode 100644
index 00000000..393892a9
--- /dev/null
+++ b/docs/ManagementProjectsCreateResponseBody.md
@@ -0,0 +1,35 @@
+# ManagementProjectsCreateResponseBody
+
+Response body schema for **POST** `management/v1/projects`.
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**id** | **str** | Unique identifier of the project. | [optional]
+**name** | **str** | The name of the project. | [optional]
+**description** | **str** | A user-defined description of the project, e.g. its purpose, scope, region. | [optional]
+**timezone** | **str** | The time zone in which the project is established. It can be in the GMT format or in accordance with IANA time zone database. | [optional]
+**currency** | **str** | The currency used in the project. It is equal to a 3-letter ISO 4217 code. | [optional]
+**dial_code** | **str** | The country dial code for the project. It is equal to an ITU country code. | [optional]
+**webhook_version** | **str** | The webhook version used in the project. | [optional] [default to 'v2024-01-01']
+**client_trusted_domains** | **List[str]** | An array of URL addresses that allow client requests. | [optional]
+**client_redeem_enabled** | **bool** | Enables client-side redemption. | [optional]
+**client_publish_enabled** | **bool** | Enables client-side publication. | [optional]
+**client_list_vouchers_enabled** | **bool** | Enables client-side listing of vouchers. | [optional]
+**client_create_customer_enabled** | **bool** | Enables client-side creation of customers. | [optional]
+**client_loyalty_events_enabled** | **bool** | Enables client-side events for loyalty and referral programs. | [optional]
+**client_set_voucher_expiration_date_enabled** | **bool** | Enables client-side setting of voucher expiration date. | [optional]
+**webhooks_callout_notifications** | [**ManagementProjectsCreateResponseBodyWebhooksCalloutNotifications**](ManagementProjectsCreateResponseBodyWebhooksCalloutNotifications.md) | | [optional]
+**api_usage_notifications** | [**ManagementProjectsCreateResponseBodyApiUsageNotifications**](ManagementProjectsCreateResponseBodyApiUsageNotifications.md) | | [optional]
+**cluster_id** | **str** | The identifier of the cluster where the project will be created. | [optional]
+**case_sensitive_codes** | **bool** | Determines if the vouchers in the project will be: - case sensitive - if `true`, `C0dE-cfV` is **not** equal to `c0de-cfv`), - case insensitive - if `false`, `C0dE-cfV` is equal to `c0de-cfv`. | [optional]
+**api_version** | **str** | The API version used in the project. Currently, the default and only value is `v2018-08-01`. | [optional] [default to 'v2018-08-01']
+**is_sandbox** | **bool** | Determines if the project is a sandbox project. | [optional]
+**webhook_token** | **str** | Webhook token used for authentication. | [optional]
+**server_side_key** | [**ManagementProjectsCreateResponseBodyServerSideKey**](ManagementProjectsCreateResponseBodyServerSideKey.md) | | [optional]
+**client_side_key** | [**ManagementProjectsCreateResponseBodyClientSideKey**](ManagementProjectsCreateResponseBodyClientSideKey.md) | | [optional]
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/docs/ManagementProjectsCreateResponseBodyApiUsageNotifications.md b/docs/ManagementProjectsCreateResponseBodyApiUsageNotifications.md
new file mode 100644
index 00000000..ac0be035
--- /dev/null
+++ b/docs/ManagementProjectsCreateResponseBodyApiUsageNotifications.md
@@ -0,0 +1,18 @@
+# ManagementProjectsCreateResponseBodyApiUsageNotifications
+
+Determines the notification settings.
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**redemptions** | [**UsageNotifications**](UsageNotifications.md) | | [optional]
+**messages** | [**UsageNotifications**](UsageNotifications.md) | | [optional]
+**api_calls** | [**UsageNotifications**](UsageNotifications.md) | | [optional]
+**bulk_api_calls** | [**UsageNotifications**](UsageNotifications.md) | | [optional]
+**webhook_calls** | [**UsageNotifications**](UsageNotifications.md) | | [optional]
+**cycle_calls** | [**UsageNotifications**](UsageNotifications.md) | | [optional]
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/docs/ManagementProjectsCreateResponseBodyClientSideKey.md b/docs/ManagementProjectsCreateResponseBodyClientSideKey.md
new file mode 100644
index 00000000..bf0c99fc
--- /dev/null
+++ b/docs/ManagementProjectsCreateResponseBodyClientSideKey.md
@@ -0,0 +1,14 @@
+# ManagementProjectsCreateResponseBodyClientSideKey
+
+Contains the `app_id` and `app_token` to authenticate client-side requests.
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**app_id** | **str** | Application ID to be used as `X-App-Id` header in every HTTP request. | [optional]
+**app_token** | **str** | Application token to be used as `X-App-Token` header in every HTTP request. The application token (secret key) for the client-side authentication is visible in the Project Settings for 14 days when it is first generated in a newly-created project. Write your application token down and keep it in a safe place. | [optional]
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/docs/ManagementProjectsCreateResponseBodyServerSideKey.md b/docs/ManagementProjectsCreateResponseBodyServerSideKey.md
new file mode 100644
index 00000000..6efadc3b
--- /dev/null
+++ b/docs/ManagementProjectsCreateResponseBodyServerSideKey.md
@@ -0,0 +1,14 @@
+# ManagementProjectsCreateResponseBodyServerSideKey
+
+Contains the `app_id` and `app_token` to authenticate server-side requests.
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**app_id** | **str** | Application ID to be used as `X-App-Id` header in every HTTP request. | [optional]
+**app_token** | **str** | Application token to be used as `X-App-Token` header in every HTTP request. The application token (secret key) for the server-side authentication is visible in the Project Settings for 14 days when it is first generated in a newly-created project. Write your application token down and keep it in a safe place. | [optional]
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/docs/ManagementProjectsCreateResponseBodyWebhooksCalloutNotifications.md b/docs/ManagementProjectsCreateResponseBodyWebhooksCalloutNotifications.md
new file mode 100644
index 00000000..97b1ea67
--- /dev/null
+++ b/docs/ManagementProjectsCreateResponseBodyWebhooksCalloutNotifications.md
@@ -0,0 +1,14 @@
+# ManagementProjectsCreateResponseBodyWebhooksCalloutNotifications
+
+Determines the notification settings for webhook callouts configured in Distributions and Project settings.
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**distributions** | [**ManagementProjectsCreateResponseBodyWebhooksCalloutNotificationsDistributions**](ManagementProjectsCreateResponseBodyWebhooksCalloutNotificationsDistributions.md) | | [optional]
+**webhooks** | [**ManagementProjectsCreateResponseBodyWebhooksCalloutNotificationsWebhooks**](ManagementProjectsCreateResponseBodyWebhooksCalloutNotificationsWebhooks.md) | | [optional]
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/docs/ManagementProjectsCreateResponseBodyWebhooksCalloutNotificationsDistributions.md b/docs/ManagementProjectsCreateResponseBodyWebhooksCalloutNotificationsDistributions.md
new file mode 100644
index 00000000..d5d3ac25
--- /dev/null
+++ b/docs/ManagementProjectsCreateResponseBodyWebhooksCalloutNotificationsDistributions.md
@@ -0,0 +1,15 @@
+# ManagementProjectsCreateResponseBodyWebhooksCalloutNotificationsDistributions
+
+Determines the notification settings for webhooks sent through Distributions.
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**email** | **bool** | Enables the notification through an email. | [optional]
+**in_app** | **bool** | Enables the notification through an email. | [optional]
+**emails** | **List[str]** | An array of email addresses which will receive the notification. | [optional]
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/docs/ManagementProjectsCreateResponseBodyWebhooksCalloutNotificationsWebhooks.md b/docs/ManagementProjectsCreateResponseBodyWebhooksCalloutNotificationsWebhooks.md
new file mode 100644
index 00000000..cbe1d213
--- /dev/null
+++ b/docs/ManagementProjectsCreateResponseBodyWebhooksCalloutNotificationsWebhooks.md
@@ -0,0 +1,15 @@
+# ManagementProjectsCreateResponseBodyWebhooksCalloutNotificationsWebhooks
+
+Determines the notification settings for webhooks sent as set out in the Project settings.
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**email** | **bool** | Enables the notification through an email. | [optional]
+**in_app** | **bool** | Enables the notification through an email. | [optional]
+**emails** | **List[str]** | An array of email addresses which will receive the notification. | [optional]
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/docs/ManagementProjectsCustomEventSchema.md b/docs/ManagementProjectsCustomEventSchema.md
new file mode 100644
index 00000000..35dbbe60
--- /dev/null
+++ b/docs/ManagementProjectsCustomEventSchema.md
@@ -0,0 +1,18 @@
+# ManagementProjectsCustomEventSchema
+
+Object containing the response to creating a custom event schema.
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**id** | **str** | Unique identifier of the custom event schema. | [optional]
+**name** | **str** | User-defined name of the custom event. This is also shown in **Project Settings** > **Event Schema** in the Voucherify Dashboard. | [optional]
+**var_schema** | [**ManagementProjectsCustomEventSchemaSchema**](ManagementProjectsCustomEventSchemaSchema.md) | | [optional]
+**created_at** | **datetime** | Timestamp representing the date and time when the custom event schema was created. The value is shown in the ISO 8601 format. | [optional]
+**updated_at** | **datetime** | Timestamp representing the date and time when the custom event schema was updated. The value is shown in the ISO 8601 format. | [optional]
+**object** | **str** | The type of the object represented by JSON. | [optional] [default to 'custom-event-schema']
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/docs/ManagementProjectsCustomEventSchemaSchema.md b/docs/ManagementProjectsCustomEventSchemaSchema.md
new file mode 100644
index 00000000..4ad03950
--- /dev/null
+++ b/docs/ManagementProjectsCustomEventSchemaSchema.md
@@ -0,0 +1,13 @@
+# ManagementProjectsCustomEventSchemaSchema
+
+Object containing custom event schema and its custom attributes (metadata).
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**properties** | **object** | Defines custom event custom attributes (metadata). | [optional]
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/docs/ManagementProjectsCustomEventSchemasCreateRequestBody.md b/docs/ManagementProjectsCustomEventSchemasCreateRequestBody.md
new file mode 100644
index 00000000..7f293c01
--- /dev/null
+++ b/docs/ManagementProjectsCustomEventSchemasCreateRequestBody.md
@@ -0,0 +1,14 @@
+# ManagementProjectsCustomEventSchemasCreateRequestBody
+
+Request body schema for **POST** `/management/v1/projects/{projectId}/custom-event-schema`.
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**name** | **str** | User-defined name of the custom event. This is also shown in **Project Settings** > **Event Schema** in the Voucherify Dashboard. | [optional]
+**var_schema** | [**ManagementProjectsCustomEventSchemasCreateRequestBodySchema**](ManagementProjectsCustomEventSchemasCreateRequestBodySchema.md) | | [optional]
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/docs/ManagementProjectsCustomEventSchemasCreateRequestBodySchema.md b/docs/ManagementProjectsCustomEventSchemasCreateRequestBodySchema.md
new file mode 100644
index 00000000..bc6b6f09
--- /dev/null
+++ b/docs/ManagementProjectsCustomEventSchemasCreateRequestBodySchema.md
@@ -0,0 +1,13 @@
+# ManagementProjectsCustomEventSchemasCreateRequestBodySchema
+
+Object containing custom event schema and its custom attributes (metadata).
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**properties** | **object** | Defines custom event custom attributes (metadata). | [optional]
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/docs/ManagementProjectsCustomEventSchemasCreateResponseBody.md b/docs/ManagementProjectsCustomEventSchemasCreateResponseBody.md
new file mode 100644
index 00000000..e5662d8d
--- /dev/null
+++ b/docs/ManagementProjectsCustomEventSchemasCreateResponseBody.md
@@ -0,0 +1,18 @@
+# ManagementProjectsCustomEventSchemasCreateResponseBody
+
+Response body schema for **POST** `/management/v1/projects/{projectId}/custom-event-schema`.
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**id** | **str** | Unique identifier of the custom event schema. | [optional]
+**name** | **str** | User-defined name of the custom event. This is also shown in **Project Settings** > **Event Schema** in the Voucherify Dashboard. | [optional]
+**var_schema** | [**ManagementProjectsCustomEventSchemasCreateResponseBodySchema**](ManagementProjectsCustomEventSchemasCreateResponseBodySchema.md) | | [optional]
+**created_at** | **datetime** | Timestamp representing the date and time when the custom event schema was created. The value is shown in the ISO 8601 format. | [optional]
+**updated_at** | **datetime** | Timestamp representing the date and time when the custom event schema was updated. The value is shown in the ISO 8601 format. | [optional]
+**object** | **str** | The type of the object represented by JSON. | [optional] [default to 'custom-event-schema']
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/docs/ManagementProjectsCustomEventSchemasCreateResponseBodySchema.md b/docs/ManagementProjectsCustomEventSchemasCreateResponseBodySchema.md
new file mode 100644
index 00000000..94a6cbba
--- /dev/null
+++ b/docs/ManagementProjectsCustomEventSchemasCreateResponseBodySchema.md
@@ -0,0 +1,13 @@
+# ManagementProjectsCustomEventSchemasCreateResponseBodySchema
+
+Object containing custom event schema and its custom attributes (metadata).
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**properties** | **object** | Defines custom event custom attributes (metadata). | [optional]
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/docs/ManagementProjectsCustomEventSchemasGetResponseBody.md b/docs/ManagementProjectsCustomEventSchemasGetResponseBody.md
new file mode 100644
index 00000000..7cf8a247
--- /dev/null
+++ b/docs/ManagementProjectsCustomEventSchemasGetResponseBody.md
@@ -0,0 +1,18 @@
+# ManagementProjectsCustomEventSchemasGetResponseBody
+
+Response body schema for **GET** `/management/v1/projects/{projectId}/custom-event-schema/{customEventSchemaId}`.
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**id** | **str** | Unique identifier of the custom event schema. | [optional]
+**name** | **str** | User-defined name of the custom event. This is also shown in **Project Settings** > **Event Schema** in the Voucherify Dashboard. | [optional]
+**var_schema** | [**ManagementProjectsCustomEventSchemasGetResponseBodySchema**](ManagementProjectsCustomEventSchemasGetResponseBodySchema.md) | | [optional]
+**created_at** | **datetime** | Timestamp representing the date and time when the custom event schema was created. The value is shown in the ISO 8601 format. | [optional]
+**updated_at** | **datetime** | Timestamp representing the date and time when the custom event schema was updated. The value is shown in the ISO 8601 format. | [optional]
+**object** | **str** | The type of the object represented by JSON. | [optional] [default to 'custom-event-schema']
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/docs/ManagementProjectsCustomEventSchemasGetResponseBodySchema.md b/docs/ManagementProjectsCustomEventSchemasGetResponseBodySchema.md
new file mode 100644
index 00000000..0fd71469
--- /dev/null
+++ b/docs/ManagementProjectsCustomEventSchemasGetResponseBodySchema.md
@@ -0,0 +1,13 @@
+# ManagementProjectsCustomEventSchemasGetResponseBodySchema
+
+Object containing custom event schema and its custom attributes (metadata).
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**properties** | **object** | Defines custom event custom attributes (metadata). | [optional]
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/docs/ManagementProjectsCustomEventSchemasListResponseBody.md b/docs/ManagementProjectsCustomEventSchemasListResponseBody.md
new file mode 100644
index 00000000..042e4edc
--- /dev/null
+++ b/docs/ManagementProjectsCustomEventSchemasListResponseBody.md
@@ -0,0 +1,16 @@
+# ManagementProjectsCustomEventSchemasListResponseBody
+
+Object containing a list of custom event schemas.
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**object** | **str** | The type of the object represented by JSON. This object stores information about the custom event schemas in a dictionary. | [optional] [default to 'list']
+**data_ref** | **str** | Identifies the name of the attribute that contains the array of custom event schema objects. | [optional] [default to 'data']
+**data** | [**List[ManagementProjectsCustomEventSchema]**](ManagementProjectsCustomEventSchema.md) | Array of custom event schema objects. | [optional]
+**total** | **int** | The total number of custom event schema objects. | [optional]
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/docs/ManagementProjectsCustomEventSchemasUpdateRequestBody.md b/docs/ManagementProjectsCustomEventSchemasUpdateRequestBody.md
new file mode 100644
index 00000000..9a675f02
--- /dev/null
+++ b/docs/ManagementProjectsCustomEventSchemasUpdateRequestBody.md
@@ -0,0 +1,13 @@
+# ManagementProjectsCustomEventSchemasUpdateRequestBody
+
+Request body schema for **POST** `/management/v1/projects/{projectId}/custom-event-schema/{customEventSchemaId}`.
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**var_schema** | [**ManagementProjectsCustomEventSchemasUpdateRequestBodySchema**](ManagementProjectsCustomEventSchemasUpdateRequestBodySchema.md) | | [optional]
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/docs/ManagementProjectsCustomEventSchemasUpdateRequestBodySchema.md b/docs/ManagementProjectsCustomEventSchemasUpdateRequestBodySchema.md
new file mode 100644
index 00000000..9686f71c
--- /dev/null
+++ b/docs/ManagementProjectsCustomEventSchemasUpdateRequestBodySchema.md
@@ -0,0 +1,13 @@
+# ManagementProjectsCustomEventSchemasUpdateRequestBodySchema
+
+Object containing custom event schema and its custom attributes (metadata).
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**properties** | **object** | Defines custom event custom attributes (metadata). | [optional]
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/docs/ManagementProjectsCustomEventSchemasUpdateResponseBody.md b/docs/ManagementProjectsCustomEventSchemasUpdateResponseBody.md
new file mode 100644
index 00000000..085e00e7
--- /dev/null
+++ b/docs/ManagementProjectsCustomEventSchemasUpdateResponseBody.md
@@ -0,0 +1,18 @@
+# ManagementProjectsCustomEventSchemasUpdateResponseBody
+
+Response body schema for **POST** `/management/v1/projects/{projectId}/custom-event-schema/{customEventSchemaId}`.
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**id** | **str** | Unique identifier of the custom event schema. | [optional]
+**name** | **str** | User-defined name of the custom event. This is also shown in **Project Settings** > **Event Schema** in the Voucherify Dashboard. | [optional]
+**var_schema** | [**ManagementProjectsCustomEventSchemasUpdateResponseBodySchema**](ManagementProjectsCustomEventSchemasUpdateResponseBodySchema.md) | | [optional]
+**created_at** | **datetime** | Timestamp representing the date and time when the custom event schema was created. The value is shown in the ISO 8601 format. | [optional]
+**updated_at** | **datetime** | Timestamp representing the date and time when the custom event schema was updated. The value is shown in the ISO 8601 format. | [optional]
+**object** | **str** | The type of the object represented by JSON. | [optional] [default to 'custom-event-schema']
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/docs/ManagementProjectsCustomEventSchemasUpdateResponseBodySchema.md b/docs/ManagementProjectsCustomEventSchemasUpdateResponseBodySchema.md
new file mode 100644
index 00000000..d4a5da7b
--- /dev/null
+++ b/docs/ManagementProjectsCustomEventSchemasUpdateResponseBodySchema.md
@@ -0,0 +1,13 @@
+# ManagementProjectsCustomEventSchemasUpdateResponseBodySchema
+
+Object containing custom event schema and its custom attributes (metadata).
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**properties** | **object** | Defines custom event custom attributes (metadata). | [optional]
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/docs/ManagementProjectsGetResponseBody.md b/docs/ManagementProjectsGetResponseBody.md
new file mode 100644
index 00000000..24a0b3ec
--- /dev/null
+++ b/docs/ManagementProjectsGetResponseBody.md
@@ -0,0 +1,34 @@
+# ManagementProjectsGetResponseBody
+
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**id** | **str** | Unique identifier of the project. | [optional]
+**name** | **str** | The name of the project. | [optional]
+**description** | **str** | A user-defined description of the project, e.g. its purpose, scope, region. | [optional]
+**timezone** | **str** | The time zone in which the project is established. It can be in the GMT format or in accordance with IANA time zone database. | [optional]
+**currency** | **str** | The currency used in the project. It is equal to a 3-letter ISO 4217 code. | [optional]
+**dial_code** | **str** | The country dial code for the project. It is equal to an ITU country code. | [optional]
+**webhook_version** | **str** | The webhook version used in the project. | [optional] [default to 'v2024-01-01']
+**client_trusted_domains** | **List[str]** | An array of URL addresses that allow client requests. | [optional]
+**client_redeem_enabled** | **bool** | Enables client-side redemption. | [optional]
+**client_publish_enabled** | **bool** | Enables client-side publication. | [optional]
+**client_list_vouchers_enabled** | **bool** | Enables client-side listing of vouchers. | [optional]
+**client_create_customer_enabled** | **bool** | Enables client-side creation of customers. | [optional]
+**client_loyalty_events_enabled** | **bool** | Enables client-side events for loyalty and referral programs. | [optional]
+**client_set_voucher_expiration_date_enabled** | **bool** | Enables client-side setting of voucher expiration date. | [optional]
+**webhooks_callout_notifications** | [**ManagementProjectsGetResponseBodyWebhooksCalloutNotifications**](ManagementProjectsGetResponseBodyWebhooksCalloutNotifications.md) | | [optional]
+**api_usage_notifications** | [**ManagementProjectsGetResponseBodyApiUsageNotifications**](ManagementProjectsGetResponseBodyApiUsageNotifications.md) | | [optional]
+**cluster_id** | **str** | The identifier of the cluster where the project will be created. | [optional]
+**case_sensitive_codes** | **bool** | Determines if the vouchers in the project will be: - case sensitive - if `true`, `C0dE-cfV` is **not** equal to `c0de-cfv`), - case insensitive - if `false`, `C0dE-cfV` is equal to `c0de-cfv`. | [optional]
+**api_version** | **str** | The API version used in the project. Currently, the default and only value is `v2018-08-01`. | [optional] [default to 'v2018-08-01']
+**is_sandbox** | **bool** | Determines if the project is a sandbox project. | [optional]
+**webhook_token** | **str** | Webhook token used for authentication. | [optional]
+**default_code_config** | [**ManagementProjectsGetResponseBodyDefaultCodeConfig**](ManagementProjectsGetResponseBodyDefaultCodeConfig.md) | | [optional]
+**limits** | [**ManagementProjectsGetResponseBodyLimits**](ManagementProjectsGetResponseBodyLimits.md) | | [optional]
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/docs/ManagementProjectsGetResponseBodyApiUsageNotifications.md b/docs/ManagementProjectsGetResponseBodyApiUsageNotifications.md
new file mode 100644
index 00000000..eb05cc99
--- /dev/null
+++ b/docs/ManagementProjectsGetResponseBodyApiUsageNotifications.md
@@ -0,0 +1,18 @@
+# ManagementProjectsGetResponseBodyApiUsageNotifications
+
+Determines the notification settings.
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**redemptions** | [**UsageNotifications**](UsageNotifications.md) | | [optional]
+**messages** | [**UsageNotifications**](UsageNotifications.md) | | [optional]
+**api_calls** | [**UsageNotifications**](UsageNotifications.md) | | [optional]
+**bulk_api_calls** | [**UsageNotifications**](UsageNotifications.md) | | [optional]
+**webhook_calls** | [**UsageNotifications**](UsageNotifications.md) | | [optional]
+**cycle_calls** | [**UsageNotifications**](UsageNotifications.md) | | [optional]
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/docs/ManagementProjectsGetResponseBodyDefaultCodeConfig.md b/docs/ManagementProjectsGetResponseBodyDefaultCodeConfig.md
new file mode 100644
index 00000000..0dc5e1bc
--- /dev/null
+++ b/docs/ManagementProjectsGetResponseBodyDefaultCodeConfig.md
@@ -0,0 +1,13 @@
+# ManagementProjectsGetResponseBodyDefaultCodeConfig
+
+Determines the character set that is used as default for vouchers. It is affected by the `\"case_sensitive_codes\"` setting.
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**charset** | **str** | Lists all characters that are used as default for vouchers | [optional]
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/docs/ManagementProjectsGetResponseBodyLimits.md b/docs/ManagementProjectsGetResponseBodyLimits.md
new file mode 100644
index 00000000..76b2bc58
--- /dev/null
+++ b/docs/ManagementProjectsGetResponseBodyLimits.md
@@ -0,0 +1,14 @@
+# ManagementProjectsGetResponseBodyLimits
+
+Determines additional limits set on a given project, e.g. the Sandbox project. If no limits are returned, the limits set for the whole organization apply.
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**api_calls** | [**List[ManagementProjectsGetResponseBodyLimitsApiCallsItem]**](ManagementProjectsGetResponseBodyLimitsApiCallsItem.md) | | [optional]
+**bulk_api_calls** | [**List[ManagementProjectsGetResponseBodyLimitsBulkApiCallsItem]**](ManagementProjectsGetResponseBodyLimitsBulkApiCallsItem.md) | | [optional]
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/docs/ManagementProjectsGetResponseBodyLimitsApiCallsItem.md b/docs/ManagementProjectsGetResponseBodyLimitsApiCallsItem.md
new file mode 100644
index 00000000..62cfc183
--- /dev/null
+++ b/docs/ManagementProjectsGetResponseBodyLimitsApiCallsItem.md
@@ -0,0 +1,14 @@
+# ManagementProjectsGetResponseBodyLimitsApiCallsItem
+
+Determines the limit of API calls per given unit time.
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**value** | **int** | Determines the maximum number of API calls per time set in `\"duration\"`. | [optional]
+**duration** | **str** | Determines the amount of time during which the calls up to the number specified in the `value` can be made. The duration is presented in the ISO 8601 format, e.g. `PT1H` means one hour. | [optional]
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/docs/ManagementProjectsGetResponseBodyLimitsBulkApiCallsItem.md b/docs/ManagementProjectsGetResponseBodyLimitsBulkApiCallsItem.md
new file mode 100644
index 00000000..595d65a3
--- /dev/null
+++ b/docs/ManagementProjectsGetResponseBodyLimitsBulkApiCallsItem.md
@@ -0,0 +1,14 @@
+# ManagementProjectsGetResponseBodyLimitsBulkApiCallsItem
+
+
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**value** | **int** | Determines the maximum number of API calls per time set in `\"duration\"`. | [optional]
+**duration** | **str** | Determines the amount of time during which the calls up to the number specified in the `value` can be made. The duration is presented in the ISO 8601 format, e.g. `PT1H` means one hour. | [optional]
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/docs/ManagementProjectsGetResponseBodyWebhooksCalloutNotifications.md b/docs/ManagementProjectsGetResponseBodyWebhooksCalloutNotifications.md
new file mode 100644
index 00000000..8508694f
--- /dev/null
+++ b/docs/ManagementProjectsGetResponseBodyWebhooksCalloutNotifications.md
@@ -0,0 +1,14 @@
+# ManagementProjectsGetResponseBodyWebhooksCalloutNotifications
+
+Determines the notification settings for webhook callouts configured in Distributions and Project settings.
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**distributions** | [**ManagementProjectsGetResponseBodyWebhooksCalloutNotificationsDistributions**](ManagementProjectsGetResponseBodyWebhooksCalloutNotificationsDistributions.md) | | [optional]
+**webhooks** | [**ManagementProjectsGetResponseBodyWebhooksCalloutNotificationsWebhooks**](ManagementProjectsGetResponseBodyWebhooksCalloutNotificationsWebhooks.md) | | [optional]
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/docs/ManagementProjectsGetResponseBodyWebhooksCalloutNotificationsDistributions.md b/docs/ManagementProjectsGetResponseBodyWebhooksCalloutNotificationsDistributions.md
new file mode 100644
index 00000000..c5105387
--- /dev/null
+++ b/docs/ManagementProjectsGetResponseBodyWebhooksCalloutNotificationsDistributions.md
@@ -0,0 +1,15 @@
+# ManagementProjectsGetResponseBodyWebhooksCalloutNotificationsDistributions
+
+Determines the notification settings for webhooks sent through Distributions.
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**email** | **bool** | Enables the notification through an email. | [optional]
+**in_app** | **bool** | Enables the notification through an email. | [optional]
+**emails** | **List[str]** | An array of email addresses which will receive the notification. | [optional]
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/docs/ManagementProjectsGetResponseBodyWebhooksCalloutNotificationsWebhooks.md b/docs/ManagementProjectsGetResponseBodyWebhooksCalloutNotificationsWebhooks.md
new file mode 100644
index 00000000..2fd19636
--- /dev/null
+++ b/docs/ManagementProjectsGetResponseBodyWebhooksCalloutNotificationsWebhooks.md
@@ -0,0 +1,15 @@
+# ManagementProjectsGetResponseBodyWebhooksCalloutNotificationsWebhooks
+
+Determines the notification settings for webhooks sent as set out in the Project settings.
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**email** | **bool** | Enables the notification through an email. | [optional]
+**in_app** | **bool** | Enables the notification through an email. | [optional]
+**emails** | **List[str]** | An array of email addresses which will receive the notification. | [optional]
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/docs/ManagementProjectsListResponseBody.md b/docs/ManagementProjectsListResponseBody.md
new file mode 100644
index 00000000..41a54f1e
--- /dev/null
+++ b/docs/ManagementProjectsListResponseBody.md
@@ -0,0 +1,16 @@
+# ManagementProjectsListResponseBody
+
+Schema model for **GET** `managment/v1/projects`.
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**object** | **str** | The type of the object represented by JSON. This object stores information about the projects in a dictionary. | [optional] [default to 'list']
+**data_ref** | **str** | Identifies the name of the attribute that contains the array of project objects. | [optional] [default to 'data']
+**data** | [**List[ManagementProject]**](ManagementProject.md) | Array of project objects. | [optional]
+**total** | **int** | The total number of projects. | [optional]
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/docs/ManagementProjectsMetadataSchema.md b/docs/ManagementProjectsMetadataSchema.md
new file mode 100644
index 00000000..c4eeb23c
--- /dev/null
+++ b/docs/ManagementProjectsMetadataSchema.md
@@ -0,0 +1,19 @@
+# ManagementProjectsMetadataSchema
+
+Object representing a metadata schema.
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**id** | **str** | Unique identifier of the metadata schema. | [optional]
+**related_object** | **str** | The resource type. You can define custom metadata schemas, which have a custom `\"related_object\"` resource type. The standard metadata schemas are: `\"campaign\"`, `\"customer\"`, `\"earning_rule\"`, `\"loyalty_tier\"`, `\"order\"`, `\"order_item\"`, `\"product\"`, `\"promotion_tier\"`, `\"publication\"`, `\"redemption\"`, `\"reward\"`, `\"voucher\"`. | [optional]
+**properties** | **object** | Contains metadata definitions. | [optional]
+**allow_defined_only** | **bool** | Restricts the creation of metadata fields when set to `true`. It indicates whether or not you can create new metadata definitions, e.g. in the campaign or publication manager. If set to `true`, then only the defined fields are available for assigning values. | [optional]
+**created_at** | **datetime** | Timestamp representing the date and time when the metadata schema was created. The value for this parameter is shown in the ISO 8601 format. | [optional]
+**updated_at** | **datetime** | Timestamp representing the date and time when the metadata schema was updated. The value for this parameter is shown in the ISO 8601 format. | [optional]
+**object** | **str** | The type of the object represented by the JSON. This object stores information about the metadata schema. | [optional] [default to 'metadata_schema']
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/docs/ManagementProjectsMetadataSchemasCreateRequestBody.md b/docs/ManagementProjectsMetadataSchemasCreateRequestBody.md
new file mode 100644
index 00000000..ba6df427
--- /dev/null
+++ b/docs/ManagementProjectsMetadataSchemasCreateRequestBody.md
@@ -0,0 +1,15 @@
+# ManagementProjectsMetadataSchemasCreateRequestBody
+
+
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**related_object** | **str** | The resource type. You can define custom metadata schemas, which have a custom `\"related_object\"` resource type, or you can use standard resource types: `\"campaign\"`, `\"customer\"`, `\"earning_rule\"`, `\"loyalty_tier\"`, `\"order\"`, `\"order_item\"`, `\"product\"`, `\"promotion_tier\"`, `\"publication\"`, `\"redemption\"`, `\"reward\"`, `\"voucher\"`. | [optional]
+**allow_defined_only** | **bool** | Restricts the creation of metadata fields when set to `true`. In other words, it indicates whether or not you are allowed to create new metadata definitions; for example, in the campaign manager or publication manager. If it is set to true, then only the defined fields will be available for assigning values. | [optional] [default to False]
+**properties** | **object** | Contains metadata definitions. There can be many properties within this object. Only the properties sent in the request will be created. | [optional]
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/docs/ManagementProjectsMetadataSchemasCreateResponseBody.md b/docs/ManagementProjectsMetadataSchemasCreateResponseBody.md
new file mode 100644
index 00000000..5e88895e
--- /dev/null
+++ b/docs/ManagementProjectsMetadataSchemasCreateResponseBody.md
@@ -0,0 +1,19 @@
+# ManagementProjectsMetadataSchemasCreateResponseBody
+
+Response body schema for **POST** `management/v1/projects/{projectId}/metadata-schemas`.
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**id** | **str** | Unique identifier of the metadata schema. | [optional]
+**related_object** | **str** | The resource type. You can define custom metadata schemas, which have a custom `\"related_object\"` resource type. The standard metadata schemas are: `\"campaign\"`, `\"customer\"`, `\"earning_rule\"`, `\"loyalty_tier\"`, `\"order\"`, `\"order_item\"`, `\"product\"`, `\"promotion_tier\"`, `\"publication\"`, `\"redemption\"`, `\"reward\"`, `\"voucher\"`. | [optional]
+**properties** | **object** | Contains metadata definitions. | [optional]
+**allow_defined_only** | **bool** | Restricts the creation of metadata fields when set to `true`. It indicates whether or not you can create new metadata definitions, e.g. in the campaign or publication manager. If set to `true`, then only the defined fields are available for assigning values. | [optional]
+**created_at** | **datetime** | Timestamp representing the date and time when the metadata schema was created. The value for this parameter is shown in the ISO 8601 format. | [optional]
+**updated_at** | **datetime** | Timestamp representing the date and time when the metadata schema was updated. The value for this parameter is shown in the ISO 8601 format. | [optional]
+**object** | **str** | The type of the object represented by the JSON. This object stores information about the metadata schema. | [optional] [default to 'metadata_schema']
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/docs/ManagementProjectsMetadataSchemasGetResponseBody.md b/docs/ManagementProjectsMetadataSchemasGetResponseBody.md
new file mode 100644
index 00000000..5e908a07
--- /dev/null
+++ b/docs/ManagementProjectsMetadataSchemasGetResponseBody.md
@@ -0,0 +1,19 @@
+# ManagementProjectsMetadataSchemasGetResponseBody
+
+Response body schema for **GET** `management/v1/projects/{projectId}/metadata-schemas/{metadataSchemaId}`.
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**id** | **str** | Unique identifier of the metadata schema. | [optional]
+**related_object** | **str** | The resource type. You can define custom metadata schemas, which have a custom `\"related_object\"` resource type. The standard metadata schemas are: `\"campaign\"`, `\"customer\"`, `\"earning_rule\"`, `\"loyalty_tier\"`, `\"order\"`, `\"order_item\"`, `\"product\"`, `\"promotion_tier\"`, `\"publication\"`, `\"redemption\"`, `\"reward\"`, `\"voucher\"`. | [optional]
+**properties** | **object** | Contains metadata definitions. | [optional]
+**allow_defined_only** | **bool** | Restricts the creation of metadata fields when set to `true`. It indicates whether or not you can create new metadata definitions, e.g. in the campaign or publication manager. If set to `true`, then only the defined fields are available for assigning values. | [optional]
+**created_at** | **datetime** | Timestamp representing the date and time when the metadata schema was created. The value for this parameter is shown in the ISO 8601 format. | [optional]
+**updated_at** | **datetime** | Timestamp representing the date and time when the metadata schema was updated. The value for this parameter is shown in the ISO 8601 format. | [optional]
+**object** | **str** | The type of the object represented by the JSON. This object stores information about the metadata schema. | [optional] [default to 'metadata_schema']
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/docs/ManagementProjectsMetadataSchemasListResponseBody.md b/docs/ManagementProjectsMetadataSchemasListResponseBody.md
new file mode 100644
index 00000000..1da6cf3a
--- /dev/null
+++ b/docs/ManagementProjectsMetadataSchemasListResponseBody.md
@@ -0,0 +1,16 @@
+# ManagementProjectsMetadataSchemasListResponseBody
+
+Object containing a list of metadata schemas.
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**object** | **str** | The type of the object represented by JSON. This object stores information about the metadata schemas in a dictionary. | [optional] [default to 'list']
+**data_ref** | **str** | Identifies the name of the attribute that contains the array of metadata schema objects. | [optional] [default to 'data']
+**data** | [**List[ManagementProjectsMetadataSchema]**](ManagementProjectsMetadataSchema.md) | Array of metadata schema objects. The metadata schemas are listed by related object properties. | [optional]
+**total** | **int** | The total number of metadata schema objects. | [optional]
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/docs/ManagementProjectsMetadataSchemasUpdateRequestBody.md b/docs/ManagementProjectsMetadataSchemasUpdateRequestBody.md
new file mode 100644
index 00000000..8652e0d2
--- /dev/null
+++ b/docs/ManagementProjectsMetadataSchemasUpdateRequestBody.md
@@ -0,0 +1,14 @@
+# ManagementProjectsMetadataSchemasUpdateRequestBody
+
+
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**allow_defined_only** | **bool** | Restricts the creation of metadata fields when set to `true`. In other words, it indicates whether or not you are allowed to create new metadata definitions; for example, in the campaign manager or publication manager. If it is set to true, then only the defined fields will be available for assigning values. | [optional]
+**properties** | **object** | Contains metadata definitions. There can be many properties within this object. Only the properties sent in the request will be updated. However, if you send a property, all its key-value pairs must be provided - otherwise, they will be overwritten to new values. You cannot change the `\"type\"` property. However, it is required, so you need to add it to the request. | [optional]
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/docs/ManagementProjectsMetadataSchemasUpdateResponseBody.md b/docs/ManagementProjectsMetadataSchemasUpdateResponseBody.md
new file mode 100644
index 00000000..fcd7dc2e
--- /dev/null
+++ b/docs/ManagementProjectsMetadataSchemasUpdateResponseBody.md
@@ -0,0 +1,19 @@
+# ManagementProjectsMetadataSchemasUpdateResponseBody
+
+Response body schema for **PUT** `management/v1/projects/{projectId}/metadata-schemas/{metadataSchemaId}`.
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**id** | **str** | Unique identifier of the metadata schema. | [optional]
+**related_object** | **str** | The resource type. You can define custom metadata schemas, which have a custom `\"related_object\"` resource type. The standard metadata schemas are: `\"campaign\"`, `\"customer\"`, `\"earning_rule\"`, `\"loyalty_tier\"`, `\"order\"`, `\"order_item\"`, `\"product\"`, `\"promotion_tier\"`, `\"publication\"`, `\"redemption\"`, `\"reward\"`, `\"voucher\"`. | [optional]
+**properties** | **object** | Contains metadata definitions. | [optional]
+**allow_defined_only** | **bool** | Restricts the creation of metadata fields when set to `true`. It indicates whether or not you can create new metadata definitions, e.g. in the campaign or publication manager. If set to `true`, then only the defined fields are available for assigning values. | [optional]
+**created_at** | **datetime** | Timestamp representing the date and time when the metadata schema was created. The value for this parameter is shown in the ISO 8601 format. | [optional]
+**updated_at** | **datetime** | Timestamp representing the date and time when the metadata schema was updated. The value for this parameter is shown in the ISO 8601 format. | [optional]
+**object** | **str** | The type of the object represented by the JSON. This object stores information about the metadata schema. | [optional] [default to 'metadata_schema']
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/docs/ManagementProjectsStackingRules.md b/docs/ManagementProjectsStackingRules.md
new file mode 100644
index 00000000..9bce3644
--- /dev/null
+++ b/docs/ManagementProjectsStackingRules.md
@@ -0,0 +1,27 @@
+# ManagementProjectsStackingRules
+
+Object representing the details of the stacking rules.
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**id** | **str** | The unique identifier of the stacking rules. | [optional]
+**exclusive_categories** | **List[str]** | Lists the IDs of the categories that are exclusive. | [optional]
+**joint_categories** | **List[str]** | Lists the IDs of the categories that are joint. | [optional]
+**redeemables_limit** | **int** | Defines how many redeemables can be sent to Voucherify for validation at the same time. | [optional]
+**applicable_redeemables_limit** | **int** | Defines how many redeemables can be applied at the same time. The number must be less than or equal to `\"redeemables_limit\"`. | [optional]
+**applicable_redeemables_per_category_limit** | **int** | Defines how many redeemables with the same category can be applied at the same time. The number must be less than or equal to `\"applicable_redeemables_limit\"`. | [optional]
+**applicable_exclusive_redeemables_limit** | **int** | Defines how many redeemables with an assigned exclusive category can be applied at the same time. | [optional]
+**applicable_exclusive_redeemables_per_category_limit** | **int** | Defines how many exclusive redeemables with the same category can be applied at the same time. The number must be less than or equal to `\"applicable_exclusive_redeemables_limit\"`. | [optional]
+**discount_calculation_mode** | **str** | Defines if the discounts are applied by taking into account the initial order amount or the discounted order amount. | [optional]
+**initial_amount_mode_categories** | **List[str]** | Lists the IDs of the categories that apply a discount based on the initial amount. | [optional]
+**discounted_amount_mode_categories** | **List[str]** | Lists the IDs of the categories that apply a discount based on the discounted amount. | [optional]
+**redeemables_application_mode** | **str** | Defines the application mode for redeemables. `\"ALL\"` means that all redeemables must be validated for the redemption to be successful. `\"PARTIAL\"` means that only those redeemables that can be validated will be redeemed. The redeemables that fail validaton will be skipped. | [optional]
+**redeemables_sorting_rule** | **str** | Defines the sorting rule for redeemables. `\"CATEGORY_HIERARCHY\"` means that redeemables are applied with the order established by the hierarchy of the categories. `\"REQUESTED_ORDER\"` means that redeemables are applied with the order established in the request. | [optional]
+**created_at** | **datetime** | Timestamp representing the date and time when the stacking rules were created. The value for this parameter is shown in the ISO 8601 format. | [optional]
+**updated_at** | **datetime** | Timestamp representing the date and time when the stacking rules were updated. The value for this parameter is shown in the ISO 8601 format. | [optional]
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/docs/ManagementProjectsStackingRulesCreateRequestBody.md b/docs/ManagementProjectsStackingRulesCreateRequestBody.md
new file mode 100644
index 00000000..74109a2a
--- /dev/null
+++ b/docs/ManagementProjectsStackingRulesCreateRequestBody.md
@@ -0,0 +1,24 @@
+# ManagementProjectsStackingRulesCreateRequestBody
+
+Request body schema for **POST** `/management/v1/projects/{projectId}/stacking-rules`.
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**exclusive_categories** | **List[str]** | Lists the IDs of the categories that are exclusive. | [optional]
+**joint_categories** | **List[str]** | Lists the IDs of the categories that are joint. | [optional]
+**redeemables_limit** | **int** | Defines how many redeemables can be sent to Voucherify for validation at the same time. | [optional]
+**applicable_redeemables_limit** | **int** | Defines how many redeemables can be applied at the same time. The number must be less than or equal to `\"redeemables_limit\"`. | [optional]
+**applicable_redeemables_per_category_limit** | **int** | Defines how many redeemables with the same category can be applied at the same time. The number must be less than or equal to `\"applicable_redeemables_limit\"`. | [optional]
+**applicable_exclusive_redeemables_limit** | **int** | Defines how many redeemables with an assigned exclusive category can be applied at the same time. | [optional]
+**applicable_exclusive_redeemables_per_category_limit** | **int** | Defines how many exclusive redeemables with the same category can be applied at the same time. The number must be less than or equal to `\"applicable_exclusive_redeemables_limit\"`. | [optional]
+**discount_calculation_mode** | **str** | Defines if the discounts are applied by taking into account the initial order amount or the discounted order amount. | [optional]
+**initial_amount_mode_categories** | **List[str]** | Lists the IDs of the categories that apply a discount based on the initial amount. | [optional]
+**discounted_amount_mode_categories** | **List[str]** | Lists the IDs of the categories that apply a discount based on the discounted amount. | [optional]
+**redeemables_application_mode** | **str** | Defines the application mode for redeemables. `\"ALL\"` means that all redeemables must be validated for the redemption to be successful. `\"PARTIAL\"` means that only those redeemables that can be validated will be redeemed. The redeemables that fail validaton will be skipped. | [optional]
+**redeemables_sorting_rule** | **str** | Defines the sorting rule for redeemables. `\"CATEGORY_HIERARCHY\"` means that redeemables are applied with the order established by the hierarchy of the categories. `\"REQUESTED_ORDER\"` means that redeemables are applied with the order established in the request. | [optional]
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/docs/ManagementProjectsStackingRulesCreateResponseBody.md b/docs/ManagementProjectsStackingRulesCreateResponseBody.md
new file mode 100644
index 00000000..0bb936ea
--- /dev/null
+++ b/docs/ManagementProjectsStackingRulesCreateResponseBody.md
@@ -0,0 +1,27 @@
+# ManagementProjectsStackingRulesCreateResponseBody
+
+Response body schema for **POST** `/management/v1/projects/{projectId}/stacking-rules`.
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**id** | **str** | The unique identifier of the stacking rules. | [optional]
+**exclusive_categories** | **List[str]** | Lists the IDs of the categories that are exclusive. | [optional]
+**joint_categories** | **List[str]** | Lists the IDs of the categories that are joint. | [optional]
+**redeemables_limit** | **int** | Defines how many redeemables can be sent to Voucherify for validation at the same time. | [optional]
+**applicable_redeemables_limit** | **int** | Defines how many redeemables can be applied at the same time. The number must be less than or equal to `\"redeemables_limit\"`. | [optional]
+**applicable_redeemables_per_category_limit** | **int** | Defines how many redeemables with the same category can be applied at the same time. The number must be less than or equal to `\"applicable_redeemables_limit\"`. | [optional]
+**applicable_exclusive_redeemables_limit** | **int** | Defines how many redeemables with an assigned exclusive category can be applied at the same time. | [optional]
+**applicable_exclusive_redeemables_per_category_limit** | **int** | Defines how many exclusive redeemables with the same category can be applied at the same time. The number must be less than or equal to `\"applicable_exclusive_redeemables_limit\"`. | [optional]
+**discount_calculation_mode** | **str** | Defines if the discounts are applied by taking into account the initial order amount or the discounted order amount. | [optional]
+**initial_amount_mode_categories** | **List[str]** | Lists the IDs of the categories that apply a discount based on the initial amount. | [optional]
+**discounted_amount_mode_categories** | **List[str]** | Lists the IDs of the categories that apply a discount based on the discounted amount. | [optional]
+**redeemables_application_mode** | **str** | Defines the application mode for redeemables. `\"ALL\"` means that all redeemables must be validated for the redemption to be successful. `\"PARTIAL\"` means that only those redeemables that can be validated will be redeemed. The redeemables that fail validaton will be skipped. | [optional]
+**redeemables_sorting_rule** | **str** | Defines the sorting rule for redeemables. `\"CATEGORY_HIERARCHY\"` means that redeemables are applied with the order established by the hierarchy of the categories. `\"REQUESTED_ORDER\"` means that redeemables are applied with the order established in the request. | [optional]
+**created_at** | **datetime** | Timestamp representing the date and time when the stacking rules were created. The value for this parameter is shown in the ISO 8601 format. | [optional]
+**updated_at** | **datetime** | Timestamp representing the date and time when the stacking rules were updated. The value for this parameter is shown in the ISO 8601 format. | [optional]
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/docs/ManagementProjectsStackingRulesGetResponseBody.md b/docs/ManagementProjectsStackingRulesGetResponseBody.md
new file mode 100644
index 00000000..f10d43a7
--- /dev/null
+++ b/docs/ManagementProjectsStackingRulesGetResponseBody.md
@@ -0,0 +1,27 @@
+# ManagementProjectsStackingRulesGetResponseBody
+
+Response body schema for **GET** `/management/v1/projects/{projectId}/stacking-rules/{stackingRulesId}`.
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**id** | **str** | The unique identifier of the stacking rules. | [optional]
+**exclusive_categories** | **List[str]** | Lists the IDs of the categories that are exclusive. | [optional]
+**joint_categories** | **List[str]** | Lists the IDs of the categories that are joint. | [optional]
+**redeemables_limit** | **int** | Defines how many redeemables can be sent to Voucherify for validation at the same time. | [optional]
+**applicable_redeemables_limit** | **int** | Defines how many redeemables can be applied at the same time. The number must be less than or equal to `\"redeemables_limit\"`. | [optional]
+**applicable_redeemables_per_category_limit** | **int** | Defines how many redeemables with the same category can be applied at the same time. The number must be less than or equal to `\"applicable_redeemables_limit\"`. | [optional]
+**applicable_exclusive_redeemables_limit** | **int** | Defines how many redeemables with an assigned exclusive category can be applied at the same time. | [optional]
+**applicable_exclusive_redeemables_per_category_limit** | **int** | Defines how many exclusive redeemables with the same category can be applied at the same time. The number must be less than or equal to `\"applicable_exclusive_redeemables_limit\"`. | [optional]
+**discount_calculation_mode** | **str** | Defines if the discounts are applied by taking into account the initial order amount or the discounted order amount. | [optional]
+**initial_amount_mode_categories** | **List[str]** | Lists the IDs of the categories that apply a discount based on the initial amount. | [optional]
+**discounted_amount_mode_categories** | **List[str]** | Lists the IDs of the categories that apply a discount based on the discounted amount. | [optional]
+**redeemables_application_mode** | **str** | Defines the application mode for redeemables. `\"ALL\"` means that all redeemables must be validated for the redemption to be successful. `\"PARTIAL\"` means that only those redeemables that can be validated will be redeemed. The redeemables that fail validaton will be skipped. | [optional]
+**redeemables_sorting_rule** | **str** | Defines the sorting rule for redeemables. `\"CATEGORY_HIERARCHY\"` means that redeemables are applied with the order established by the hierarchy of the categories. `\"REQUESTED_ORDER\"` means that redeemables are applied with the order established in the request. | [optional]
+**created_at** | **datetime** | Timestamp representing the date and time when the stacking rules were created. The value for this parameter is shown in the ISO 8601 format. | [optional]
+**updated_at** | **datetime** | Timestamp representing the date and time when the stacking rules were updated. The value for this parameter is shown in the ISO 8601 format. | [optional]
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/docs/ManagementProjectsStackingRulesListResponseBody.md b/docs/ManagementProjectsStackingRulesListResponseBody.md
new file mode 100644
index 00000000..232359e2
--- /dev/null
+++ b/docs/ManagementProjectsStackingRulesListResponseBody.md
@@ -0,0 +1,16 @@
+# ManagementProjectsStackingRulesListResponseBody
+
+Response body schema for **GET** `/management/v1/projects/{projectId}/stacking-rules`.
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**object** | **str** | The type of the object represented by JSON. This object stores information about the stacking rules in a dictionary. | [optional] [default to 'list']
+**data_ref** | **str** | Identifies the name of the attribute that contains the array of stacking rule objects. | [optional] [default to 'data']
+**data** | [**List[ManagementProjectsStackingRules]**](ManagementProjectsStackingRules.md) | Array of only one stacking rule object. | [optional]
+**total** | **int** | The total number of stacking rule objects. It is always 1. | [optional]
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/docs/ManagementProjectsStackingRulesUpdateRequestBody.md b/docs/ManagementProjectsStackingRulesUpdateRequestBody.md
new file mode 100644
index 00000000..59afc643
--- /dev/null
+++ b/docs/ManagementProjectsStackingRulesUpdateRequestBody.md
@@ -0,0 +1,24 @@
+# ManagementProjectsStackingRulesUpdateRequestBody
+
+Request body schema for **PUT** `/management/v1/projects/{projectId}/stacking-rules/{stackingRulesId}`.
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**exclusive_categories** | **List[str]** | Lists the IDs of the categories that are exclusive. | [optional]
+**joint_categories** | **List[str]** | Lists the IDs of the categories that are joint. | [optional]
+**redeemables_limit** | **int** | Defines how many redeemables can be sent to Voucherify for validation at the same time. | [optional]
+**applicable_redeemables_limit** | **int** | Defines how many redeemables can be applied at the same time. The number must be less than or equal to `\"redeemables_limit\"`. | [optional]
+**applicable_redeemables_per_category_limit** | **int** | Defines how many redeemables with the same category can be applied at the same time. The number must be less than or equal to `\"applicable_redeemables_limit\"`. | [optional]
+**applicable_exclusive_redeemables_limit** | **int** | Defines how many redeemables with an assigned exclusive category can be applied at the same time. | [optional]
+**applicable_exclusive_redeemables_per_category_limit** | **int** | Defines how many exclusive redeemables with the same category can be applied at the same time. The number must be less than or equal to `\"applicable_exclusive_redeemables_limit\"`. | [optional]
+**discount_calculation_mode** | **str** | Defines if the discounts are applied by taking into account the initial order amount or the discounted order amount. | [optional]
+**initial_amount_mode_categories** | **List[str]** | Lists the IDs of the categories that apply a discount based on the initial amount. | [optional]
+**discounted_amount_mode_categories** | **List[str]** | Lists the IDs of the categories that apply a discount based on the discounted amount. | [optional]
+**redeemables_application_mode** | **str** | Defines the application mode for redeemables. `\"ALL\"` means that all redeemables must be validated for the redemption to be successful. `\"PARTIAL\"` means that only those redeemables that can be validated will be redeemed. The redeemables that fail validaton will be skipped. | [optional]
+**redeemables_sorting_rule** | **str** | Defines the sorting rule for redeemables. `\"CATEGORY_HIERARCHY\"` means that redeemables are applied with the order established by the hierarchy of the categories. `\"REQUESTED_ORDER\"` means that redeemables are applied with the order established in the request. | [optional]
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/docs/ManagementProjectsStackingRulesUpdateResponseBody.md b/docs/ManagementProjectsStackingRulesUpdateResponseBody.md
new file mode 100644
index 00000000..fd3b099a
--- /dev/null
+++ b/docs/ManagementProjectsStackingRulesUpdateResponseBody.md
@@ -0,0 +1,27 @@
+# ManagementProjectsStackingRulesUpdateResponseBody
+
+Response body schema for **PUT** `/management/v1/projects/{projectId}/stacking-rules/{stackingRulesId}`.
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**id** | **str** | The unique identifier of the stacking rules. | [optional]
+**exclusive_categories** | **List[str]** | Lists the IDs of the categories that are exclusive. | [optional]
+**joint_categories** | **List[str]** | Lists the IDs of the categories that are joint. | [optional]
+**redeemables_limit** | **int** | Defines how many redeemables can be sent to Voucherify for validation at the same time. | [optional]
+**applicable_redeemables_limit** | **int** | Defines how many redeemables can be applied at the same time. The number must be less than or equal to `\"redeemables_limit\"`. | [optional]
+**applicable_redeemables_per_category_limit** | **int** | Defines how many redeemables with the same category can be applied at the same time. The number must be less than or equal to `\"applicable_redeemables_limit\"`. | [optional]
+**applicable_exclusive_redeemables_limit** | **int** | Defines how many redeemables with an assigned exclusive category can be applied at the same time. | [optional]
+**applicable_exclusive_redeemables_per_category_limit** | **int** | Defines how many exclusive redeemables with the same category can be applied at the same time. The number must be less than or equal to `\"applicable_exclusive_redeemables_limit\"`. | [optional]
+**discount_calculation_mode** | **str** | Defines if the discounts are applied by taking into account the initial order amount or the discounted order amount. | [optional]
+**initial_amount_mode_categories** | **List[str]** | Lists the IDs of the categories that apply a discount based on the initial amount. | [optional]
+**discounted_amount_mode_categories** | **List[str]** | Lists the IDs of the categories that apply a discount based on the discounted amount. | [optional]
+**redeemables_application_mode** | **str** | Defines the application mode for redeemables. `\"ALL\"` means that all redeemables must be validated for the redemption to be successful. `\"PARTIAL\"` means that only those redeemables that can be validated will be redeemed. The redeemables that fail validaton will be skipped. | [optional]
+**redeemables_sorting_rule** | **str** | Defines the sorting rule for redeemables. `\"CATEGORY_HIERARCHY\"` means that redeemables are applied with the order established by the hierarchy of the categories. `\"REQUESTED_ORDER\"` means that redeemables are applied with the order established in the request. | [optional]
+**created_at** | **datetime** | Timestamp representing the date and time when the stacking rules were created. The value for this parameter is shown in the ISO 8601 format. | [optional]
+**updated_at** | **datetime** | Timestamp representing the date and time when the stacking rules were updated. The value for this parameter is shown in the ISO 8601 format. | [optional]
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/docs/ManagementProjectsTemplatesCampaignsCopyCreateRequestBody.md b/docs/ManagementProjectsTemplatesCampaignsCopyCreateRequestBody.md
new file mode 100644
index 00000000..832875fc
--- /dev/null
+++ b/docs/ManagementProjectsTemplatesCampaignsCopyCreateRequestBody.md
@@ -0,0 +1,15 @@
+# ManagementProjectsTemplatesCampaignsCopyCreateRequestBody
+
+Response body schema for **POST** `/management/v1/projects/{projectId}/templates/campaigns/{campaignTemplateId}/copy`.
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**name** | **str** | User-defined name of the campaign template. It must be unique. | [optional]
+**description** | **str** | User-defined description of the campaign template. | [optional]
+**destination_project_id** | **str** | Unique identifier of the project to which the campaign template will be copied. | [optional]
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/docs/ManagementProjectsTemplatesCampaignsCopyCreateResponseBody.md b/docs/ManagementProjectsTemplatesCampaignsCopyCreateResponseBody.md
new file mode 100644
index 00000000..f4c4d481
--- /dev/null
+++ b/docs/ManagementProjectsTemplatesCampaignsCopyCreateResponseBody.md
@@ -0,0 +1,18 @@
+# ManagementProjectsTemplatesCampaignsCopyCreateResponseBody
+
+Response body schema for **POST** `/management/v1/projects/{projectId}/templates/campaigns/{campaignTemplateId}/copy`.
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**id** | **str** | Unique identifier of the campaign template. It is assigned by Voucherify. | [optional]
+**name** | **str** | User-defined name of the campaign template. | [optional]
+**description** | **str** | User-defined description of the campaign template. | [optional]
+**campaign_type** | **str** | Type of the campaign used to create the campaign template. Templates created from a promotion tier are converted to `DISCOUNT_COUPONS`. | [optional]
+**created_at** | **datetime** | Timestamp representing the date and time when the campaign template was created. The value is shown in the ISO 8601 format. | [optional]
+**object** | **str** | The type of the object represented by JSON. | [optional] [default to 'campaign_template']
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/docs/ManagementProjectsTemplatesCampaignsListResponseBody.md b/docs/ManagementProjectsTemplatesCampaignsListResponseBody.md
new file mode 100644
index 00000000..c3ebbf52
--- /dev/null
+++ b/docs/ManagementProjectsTemplatesCampaignsListResponseBody.md
@@ -0,0 +1,18 @@
+# ManagementProjectsTemplatesCampaignsListResponseBody
+
+Response body schema for **GET** `/management/v1/projects/{projectId}/templates/campaigns`.
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**object** | **str** | The type of the object represented by JSON. This object stores information about campaign templates. | [optional] [default to 'list']
+**data_ref** | **str** | Identifies the name of the JSON property that contains the array of campaign templates. | [optional] [default to 'data']
+**data** | [**List[CampaignTemplate]**](CampaignTemplate.md) | Dictionary that contains an array of campaign templates. | [optional]
+**total** | **int** | Total number of templates, regardless of the applied query parameters. Displayed only if the `include_total` query paremeter is set to `true`. | [optional]
+**has_more** | **bool** | As query results are always limited (by the limit parameter), the `has_more` flag indicates if there are more records for given filter parameters. This lets you know if you can run another request to get more records returned in the results. | [optional]
+**more_starting_after** | **str** | Returns an ID that can be used to return another page of results. Use the template ID in the `starting_after_id` query parameter to display another page of the results starting after the template with that ID. | [optional]
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/docs/ManagementProjectsUpdateRequestBody.md b/docs/ManagementProjectsUpdateRequestBody.md
new file mode 100644
index 00000000..981efafc
--- /dev/null
+++ b/docs/ManagementProjectsUpdateRequestBody.md
@@ -0,0 +1,28 @@
+# ManagementProjectsUpdateRequestBody
+
+Request body schema for **PUT** `/management/v1/projects/{projectId}`.
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**name** | **str** | The name of the project. | [optional]
+**description** | **str** | A user-defined description of the project, e.g. its purpose, scope, region. | [optional]
+**timezone** | **str** | The time zone in which the project is established. It can be in the GMT format or in accordance with IANA time zone database. | [optional]
+**currency** | **str** | The currency used in the project. It is equal to a 3-letter ISO 4217 code. | [optional]
+**dial_code** | **str** | The country dial code for the project. It is equal to an ITU country code. | [optional]
+**webhook_version** | **str** | The webhook version used in the project. | [optional] [default to 'v2024-01-01']
+**client_trusted_domains** | **List[str]** | An array of URL addresses that allow client requests. | [optional]
+**client_redeem_enabled** | **bool** | Enables client-side redemption. | [optional]
+**client_publish_enabled** | **bool** | Enables client-side publication. | [optional]
+**client_list_vouchers_enabled** | **bool** | Enables client-side listing of vouchers. | [optional]
+**client_create_customer_enabled** | **bool** | Enables client-side creation of customers. | [optional]
+**client_loyalty_events_enabled** | **bool** | Enables client-side events for loyalty and referral programs. | [optional]
+**client_set_voucher_expiration_date_enabled** | **bool** | Enables client-side setting of voucher expiration date. | [optional]
+**webhooks_callout_notifications** | [**ManagementProjectsUpdateRequestBodyWebhooksCalloutNotifications**](ManagementProjectsUpdateRequestBodyWebhooksCalloutNotifications.md) | | [optional]
+**api_usage_notifications** | [**ManagementProjectsUpdateRequestBodyApiUsageNotifications**](ManagementProjectsUpdateRequestBodyApiUsageNotifications.md) | | [optional]
+**default_code_config** | [**ManagementProjectsUpdateRequestBodyDefaultCodeConfig**](ManagementProjectsUpdateRequestBodyDefaultCodeConfig.md) | | [optional]
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/docs/ManagementProjectsUpdateRequestBodyApiUsageNotifications.md b/docs/ManagementProjectsUpdateRequestBodyApiUsageNotifications.md
new file mode 100644
index 00000000..642e7246
--- /dev/null
+++ b/docs/ManagementProjectsUpdateRequestBodyApiUsageNotifications.md
@@ -0,0 +1,17 @@
+# ManagementProjectsUpdateRequestBodyApiUsageNotifications
+
+Determines the notification settings.
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**messages** | [**UsageNotifications**](UsageNotifications.md) | | [optional]
+**api_calls** | [**UsageNotifications**](UsageNotifications.md) | | [optional]
+**bulk_api_calls** | [**UsageNotifications**](UsageNotifications.md) | | [optional]
+**webhook_calls** | [**UsageNotifications**](UsageNotifications.md) | | [optional]
+**cycle_calls** | [**UsageNotifications**](UsageNotifications.md) | | [optional]
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/docs/ManagementProjectsUpdateRequestBodyDefaultCodeConfig.md b/docs/ManagementProjectsUpdateRequestBodyDefaultCodeConfig.md
new file mode 100644
index 00000000..cb7ea864
--- /dev/null
+++ b/docs/ManagementProjectsUpdateRequestBodyDefaultCodeConfig.md
@@ -0,0 +1,13 @@
+# ManagementProjectsUpdateRequestBodyDefaultCodeConfig
+
+Determines the character set that is used as default for vouchers. It is affected by the `\"case_sensitive_codes\"` setting.
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**charset** | **str** | Lists all characters that are used as default for vouchers | [optional]
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/docs/ManagementProjectsUpdateRequestBodyWebhooksCalloutNotifications.md b/docs/ManagementProjectsUpdateRequestBodyWebhooksCalloutNotifications.md
new file mode 100644
index 00000000..3be795a6
--- /dev/null
+++ b/docs/ManagementProjectsUpdateRequestBodyWebhooksCalloutNotifications.md
@@ -0,0 +1,14 @@
+# ManagementProjectsUpdateRequestBodyWebhooksCalloutNotifications
+
+Determines the notification settings for webhook callouts configured in Distributions and Project settings.
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**distributions** | [**ManagementProjectsUpdateRequestBodyWebhooksCalloutNotificationsDistributions**](ManagementProjectsUpdateRequestBodyWebhooksCalloutNotificationsDistributions.md) | | [optional]
+**webhooks** | [**ManagementProjectsUpdateRequestBodyWebhooksCalloutNotificationsWebhooks**](ManagementProjectsUpdateRequestBodyWebhooksCalloutNotificationsWebhooks.md) | | [optional]
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/docs/ManagementProjectsUpdateRequestBodyWebhooksCalloutNotificationsDistributions.md b/docs/ManagementProjectsUpdateRequestBodyWebhooksCalloutNotificationsDistributions.md
new file mode 100644
index 00000000..be220799
--- /dev/null
+++ b/docs/ManagementProjectsUpdateRequestBodyWebhooksCalloutNotificationsDistributions.md
@@ -0,0 +1,15 @@
+# ManagementProjectsUpdateRequestBodyWebhooksCalloutNotificationsDistributions
+
+Determines the notification settings for webhooks sent through Distributions.
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**email** | **bool** | Enables the notification through an email. | [optional]
+**in_app** | **bool** | Enables the notification through an email. | [optional]
+**emails** | **List[str]** | An array of email addresses which will receive the notification. | [optional]
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/docs/ManagementProjectsUpdateRequestBodyWebhooksCalloutNotificationsWebhooks.md b/docs/ManagementProjectsUpdateRequestBodyWebhooksCalloutNotificationsWebhooks.md
new file mode 100644
index 00000000..3fec7783
--- /dev/null
+++ b/docs/ManagementProjectsUpdateRequestBodyWebhooksCalloutNotificationsWebhooks.md
@@ -0,0 +1,15 @@
+# ManagementProjectsUpdateRequestBodyWebhooksCalloutNotificationsWebhooks
+
+Determines the notification settings for webhooks sent as set out in the Project settings.
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**email** | **bool** | Enables the notification through an email. | [optional]
+**in_app** | **bool** | Enables the notification through an email. | [optional]
+**emails** | **List[str]** | An array of email addresses which will receive the notification. | [optional]
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/docs/ManagementProjectsUpdateResponseBody.md b/docs/ManagementProjectsUpdateResponseBody.md
new file mode 100644
index 00000000..512f0476
--- /dev/null
+++ b/docs/ManagementProjectsUpdateResponseBody.md
@@ -0,0 +1,34 @@
+# ManagementProjectsUpdateResponseBody
+
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**id** | **str** | Unique identifier of the project. | [optional]
+**name** | **str** | The name of the project. | [optional]
+**description** | **str** | A user-defined description of the project, e.g. its purpose, scope, region. | [optional]
+**timezone** | **str** | The time zone in which the project is established. It can be in the GMT format or in accordance with IANA time zone database. | [optional]
+**currency** | **str** | The currency used in the project. It is equal to a 3-letter ISO 4217 code. | [optional]
+**dial_code** | **str** | The country dial code for the project. It is equal to an ITU country code. | [optional]
+**webhook_version** | **str** | The webhook version used in the project. | [optional] [default to 'v2024-01-01']
+**client_trusted_domains** | **List[str]** | An array of URL addresses that allow client requests. | [optional]
+**client_redeem_enabled** | **bool** | Enables client-side redemption. | [optional]
+**client_publish_enabled** | **bool** | Enables client-side publication. | [optional]
+**client_list_vouchers_enabled** | **bool** | Enables client-side listing of vouchers. | [optional]
+**client_create_customer_enabled** | **bool** | Enables client-side creation of customers. | [optional]
+**client_loyalty_events_enabled** | **bool** | Enables client-side events for loyalty and referral programs. | [optional]
+**client_set_voucher_expiration_date_enabled** | **bool** | Enables client-side setting of voucher expiration date. | [optional]
+**webhooks_callout_notifications** | [**ManagementProjectsUpdateResponseBodyWebhooksCalloutNotifications**](ManagementProjectsUpdateResponseBodyWebhooksCalloutNotifications.md) | | [optional]
+**api_usage_notifications** | [**ManagementProjectsUpdateResponseBodyApiUsageNotifications**](ManagementProjectsUpdateResponseBodyApiUsageNotifications.md) | | [optional]
+**cluster_id** | **str** | The identifier of the cluster where the project will be created. | [optional]
+**case_sensitive_codes** | **bool** | Determines if the vouchers in the project will be: - case sensitive - if `true`, `C0dE-cfV` is **not** equal to `c0de-cfv`), - case insensitive - if `false`, `C0dE-cfV` is equal to `c0de-cfv`. | [optional]
+**api_version** | **str** | The API version used in the project. Currently, the default and only value is `v2018-08-01`. | [optional] [default to 'v2018-08-01']
+**is_sandbox** | **bool** | Determines if the project is a sandbox project. | [optional]
+**webhook_token** | **str** | Webhook token used for authentication. | [optional]
+**default_code_config** | [**ManagementProjectsUpdateResponseBodyDefaultCodeConfig**](ManagementProjectsUpdateResponseBodyDefaultCodeConfig.md) | | [optional]
+**limits** | [**ManagementProjectsUpdateResponseBodyLimits**](ManagementProjectsUpdateResponseBodyLimits.md) | | [optional]
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/docs/ManagementProjectsUpdateResponseBodyApiUsageNotifications.md b/docs/ManagementProjectsUpdateResponseBodyApiUsageNotifications.md
new file mode 100644
index 00000000..ad7ccc6b
--- /dev/null
+++ b/docs/ManagementProjectsUpdateResponseBodyApiUsageNotifications.md
@@ -0,0 +1,18 @@
+# ManagementProjectsUpdateResponseBodyApiUsageNotifications
+
+Determines the notification settings.
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**redemptions** | [**UsageNotifications**](UsageNotifications.md) | | [optional]
+**messages** | [**UsageNotifications**](UsageNotifications.md) | | [optional]
+**api_calls** | [**UsageNotifications**](UsageNotifications.md) | | [optional]
+**bulk_api_calls** | [**UsageNotifications**](UsageNotifications.md) | | [optional]
+**webhook_calls** | [**UsageNotifications**](UsageNotifications.md) | | [optional]
+**cycle_calls** | [**UsageNotifications**](UsageNotifications.md) | | [optional]
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/docs/ManagementProjectsUpdateResponseBodyDefaultCodeConfig.md b/docs/ManagementProjectsUpdateResponseBodyDefaultCodeConfig.md
new file mode 100644
index 00000000..cad795b9
--- /dev/null
+++ b/docs/ManagementProjectsUpdateResponseBodyDefaultCodeConfig.md
@@ -0,0 +1,13 @@
+# ManagementProjectsUpdateResponseBodyDefaultCodeConfig
+
+Determines the character set that is used as default for vouchers. It is affected by the `\"case_sensitive_codes\"` setting.
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**charset** | **str** | Lists all characters that are used as default for vouchers | [optional]
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/docs/ManagementProjectsUpdateResponseBodyLimits.md b/docs/ManagementProjectsUpdateResponseBodyLimits.md
new file mode 100644
index 00000000..6a2c184c
--- /dev/null
+++ b/docs/ManagementProjectsUpdateResponseBodyLimits.md
@@ -0,0 +1,14 @@
+# ManagementProjectsUpdateResponseBodyLimits
+
+Determines additional limits set on a given project, e.g. the Sandbox project. If no limits are returned, the limits set for the whole organization apply.
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**api_calls** | [**List[ManagementProjectsUpdateResponseBodyLimitsApiCallsItem]**](ManagementProjectsUpdateResponseBodyLimitsApiCallsItem.md) | | [optional]
+**bulk_api_calls** | [**List[ManagementProjectsUpdateResponseBodyLimitsBulkApiCallsItem]**](ManagementProjectsUpdateResponseBodyLimitsBulkApiCallsItem.md) | | [optional]
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/docs/ManagementProjectsUpdateResponseBodyLimitsApiCallsItem.md b/docs/ManagementProjectsUpdateResponseBodyLimitsApiCallsItem.md
new file mode 100644
index 00000000..795c417e
--- /dev/null
+++ b/docs/ManagementProjectsUpdateResponseBodyLimitsApiCallsItem.md
@@ -0,0 +1,14 @@
+# ManagementProjectsUpdateResponseBodyLimitsApiCallsItem
+
+Determines the limit of API calls per given unit time.
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**value** | **int** | Determines the maximum number of API calls per time set in `\"duration\"`. | [optional]
+**duration** | **str** | Determines the amount of time during which the calls up to the number specified in the `value` can be made. The duration is presented in the ISO 8601 format, e.g. `PT1H` means one hour. | [optional]
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/docs/ManagementProjectsUpdateResponseBodyLimitsBulkApiCallsItem.md b/docs/ManagementProjectsUpdateResponseBodyLimitsBulkApiCallsItem.md
new file mode 100644
index 00000000..e7ef8de8
--- /dev/null
+++ b/docs/ManagementProjectsUpdateResponseBodyLimitsBulkApiCallsItem.md
@@ -0,0 +1,14 @@
+# ManagementProjectsUpdateResponseBodyLimitsBulkApiCallsItem
+
+
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**value** | **int** | Determines the maximum number of API calls per time set in `\"duration\"`. | [optional]
+**duration** | **str** | Determines the amount of time during which the calls up to the number specified in the `value` can be made. The duration is presented in the ISO 8601 format, e.g. `PT1H` means one hour. | [optional]
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/docs/ManagementProjectsUpdateResponseBodyWebhooksCalloutNotifications.md b/docs/ManagementProjectsUpdateResponseBodyWebhooksCalloutNotifications.md
new file mode 100644
index 00000000..31e17d28
--- /dev/null
+++ b/docs/ManagementProjectsUpdateResponseBodyWebhooksCalloutNotifications.md
@@ -0,0 +1,14 @@
+# ManagementProjectsUpdateResponseBodyWebhooksCalloutNotifications
+
+Determines the notification settings for webhook callouts configured in Distributions and Project settings.
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**distributions** | [**ManagementProjectsUpdateResponseBodyWebhooksCalloutNotificationsDistributions**](ManagementProjectsUpdateResponseBodyWebhooksCalloutNotificationsDistributions.md) | | [optional]
+**webhooks** | [**ManagementProjectsUpdateResponseBodyWebhooksCalloutNotificationsWebhooks**](ManagementProjectsUpdateResponseBodyWebhooksCalloutNotificationsWebhooks.md) | | [optional]
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/docs/ManagementProjectsUpdateResponseBodyWebhooksCalloutNotificationsDistributions.md b/docs/ManagementProjectsUpdateResponseBodyWebhooksCalloutNotificationsDistributions.md
new file mode 100644
index 00000000..36b1bf73
--- /dev/null
+++ b/docs/ManagementProjectsUpdateResponseBodyWebhooksCalloutNotificationsDistributions.md
@@ -0,0 +1,15 @@
+# ManagementProjectsUpdateResponseBodyWebhooksCalloutNotificationsDistributions
+
+Determines the notification settings for webhooks sent through Distributions.
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**email** | **bool** | Enables the notification through an email. | [optional]
+**in_app** | **bool** | Enables the notification through an email. | [optional]
+**emails** | **List[str]** | An array of email addresses which will receive the notification. | [optional]
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/docs/ManagementProjectsUpdateResponseBodyWebhooksCalloutNotificationsWebhooks.md b/docs/ManagementProjectsUpdateResponseBodyWebhooksCalloutNotificationsWebhooks.md
new file mode 100644
index 00000000..a399c3b9
--- /dev/null
+++ b/docs/ManagementProjectsUpdateResponseBodyWebhooksCalloutNotificationsWebhooks.md
@@ -0,0 +1,15 @@
+# ManagementProjectsUpdateResponseBodyWebhooksCalloutNotificationsWebhooks
+
+Determines the notification settings for webhooks sent as set out in the Project settings.
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**email** | **bool** | Enables the notification through an email. | [optional]
+**in_app** | **bool** | Enables the notification through an email. | [optional]
+**emails** | **List[str]** | An array of email addresses which will receive the notification. | [optional]
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/docs/ManagementProjectsUsersAssignRequestBody.md b/docs/ManagementProjectsUsersAssignRequestBody.md
new file mode 100644
index 00000000..1022480a
--- /dev/null
+++ b/docs/ManagementProjectsUsersAssignRequestBody.md
@@ -0,0 +1,14 @@
+# ManagementProjectsUsersAssignRequestBody
+
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**id** | **str** | The unique identifier of the user who will be assigned to the project. It can be found in Team Settings > Team > Edit member. **Required** with the `role` string. Do **not** use with the `login` string. | [optional]
+**login** | **str** | The login data of the user who will be assigned to the project. **Required** with the `role` string. Do **not** use with the `id` string. | [optional]
+**role** | **str** | The role of the user to be added. It can be one of the following predefined roles: `ADMIN`, `USER`, `VIEWER`, `MERCHANT`, or an ID of a custom role. | [optional]
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/docs/ManagementProjectsUsersAssignResponseBody.md b/docs/ManagementProjectsUsersAssignResponseBody.md
new file mode 100644
index 00000000..bedea91c
--- /dev/null
+++ b/docs/ManagementProjectsUsersAssignResponseBody.md
@@ -0,0 +1,19 @@
+# ManagementProjectsUsersAssignResponseBody
+
+Details about the user assigned to the project.
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**id** | **str** | The unique identifier of the user who has been assigned to the project. | [optional]
+**login** | **str** | The login data of the user who has been assigned to the project. | [optional]
+**email** | **str** | The email address of the user who has been assigned to the project. | [optional]
+**first_name** | **str** | The first name of the user who has been assigned to the project. | [optional]
+**last_name** | **str** | The last name of the user who has been assigned to the project. | [optional]
+**projects** | **object** | Lists key-value pairs, where the key is the project to which the user is assigned. The value is the role assigned in a given project. The predefined Voucherify roles are: `ADMIN`, `USER`, `VIEWER`, `MERCHANT`, `USER_RESTRICTED` (for the Areas and Stores, an Enterprise feature). | [optional]
+**is_owner** | **bool** | Determines if the user is the owner for the organization in Voucherify. | [optional]
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/docs/ManagementProjectsUsersGetUserResponseBody.md b/docs/ManagementProjectsUsersGetUserResponseBody.md
new file mode 100644
index 00000000..6c616ff6
--- /dev/null
+++ b/docs/ManagementProjectsUsersGetUserResponseBody.md
@@ -0,0 +1,19 @@
+# ManagementProjectsUsersGetUserResponseBody
+
+Details about the user assigned to the project.
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**id** | **str** | The unique identifier of the user who has been assigned to the project. | [optional]
+**login** | **str** | The login data of the user who has been assigned to the project. | [optional]
+**email** | **str** | The email address of the user who has been assigned to the project. | [optional]
+**first_name** | **str** | The first name of the user who has been assigned to the project. | [optional]
+**last_name** | **str** | The last name of the user who has been assigned to the project. | [optional]
+**projects** | **object** | Lists key-value pairs, where the key is the project to which the user is assigned. The value is the role assigned in a given project. The predefined Voucherify roles are: `ADMIN`, `USER`, `VIEWER`, `MERCHANT`, `USER_RESTRICTED` (for the Areas and Stores, an Enterprise feature). | [optional]
+**is_owner** | **bool** | Determines if the user is the owner for the organization in Voucherify. | [optional]
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/docs/ManagementProjectsUsersInviteCreateRequestBody.md b/docs/ManagementProjectsUsersInviteCreateRequestBody.md
new file mode 100644
index 00000000..bac5fdd6
--- /dev/null
+++ b/docs/ManagementProjectsUsersInviteCreateRequestBody.md
@@ -0,0 +1,16 @@
+# ManagementProjectsUsersInviteCreateRequestBody
+
+Request body schema for **POST** `/management/v1/projects/users/invite`.
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**email** | **str** | Email address to which the invitation will be sent. Must be a valid email address. | [optional]
+**first_name** | **str** | First name of the person who will receive the invitation. The name will be used in the user profile. | [optional]
+**last_name** | **str** | Last name of the person who will receive the invitation. The name will be used in the user profile. | [optional]
+**projects** | **object** | In the key, provide the project ID to which the new user will be assigned. In the value, provide the role which the user will have in the project. The predefined Voucherify roles are: `ADMIN`, `USER`, `VIEWER`, `MERCHANT`, `USER_RESTRICTED` (for the Areas and Stores, an Enterprise feature). Send a custom role ID (Enterprise feature) to assign a custom role. | [optional]
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/docs/ManagementProjectsUsersListResponseBody.md b/docs/ManagementProjectsUsersListResponseBody.md
new file mode 100644
index 00000000..2dfc7d03
--- /dev/null
+++ b/docs/ManagementProjectsUsersListResponseBody.md
@@ -0,0 +1,16 @@
+# ManagementProjectsUsersListResponseBody
+
+Object containing a list of users assigned to the project.
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**object** | **str** | The type of the object represented by JSON. This object stores information about the users in a dictionary. | [optional] [default to 'list']
+**data_ref** | **str** | Identifies the name of the attribute that contains the array of user objects. | [optional] [default to 'data']
+**data** | [**List[User]**](User.md) | Array of user objects. | [optional]
+**total** | **int** | The total number of users. | [optional]
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/docs/ManagementProjectsUsersUpdateRoleRequestBody.md b/docs/ManagementProjectsUsersUpdateRoleRequestBody.md
new file mode 100644
index 00000000..77fbabb2
--- /dev/null
+++ b/docs/ManagementProjectsUsersUpdateRoleRequestBody.md
@@ -0,0 +1,12 @@
+# ManagementProjectsUsersUpdateRoleRequestBody
+
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**role** | **str** | The role of the user to be added. It can be a custom role or one of following predefined roles: `ADMIN`, `USER`, `VIEWER`, `MERCHANT` or an ID of a custom role.. | [optional]
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/docs/ManagementProjectsUsersUpdateRoleResponseBody.md b/docs/ManagementProjectsUsersUpdateRoleResponseBody.md
new file mode 100644
index 00000000..13dbfa3c
--- /dev/null
+++ b/docs/ManagementProjectsUsersUpdateRoleResponseBody.md
@@ -0,0 +1,19 @@
+# ManagementProjectsUsersUpdateRoleResponseBody
+
+Details about the user assigned to the project.
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**id** | **str** | The unique identifier of the user who has been assigned to the project. | [optional]
+**login** | **str** | The login data of the user who has been assigned to the project. | [optional]
+**email** | **str** | The email address of the user who has been assigned to the project. | [optional]
+**first_name** | **str** | The first name of the user who has been assigned to the project. | [optional]
+**last_name** | **str** | The last name of the user who has been assigned to the project. | [optional]
+**projects** | **object** | Lists key-value pairs, where the key is the project to which the user is assigned. The value is the role assigned in a given project. The predefined Voucherify roles are: `ADMIN`, `USER`, `VIEWER`, `MERCHANT`, `USER_RESTRICTED` (for the Areas and Stores, an Enterprise feature). | [optional]
+**is_owner** | **bool** | Determines if the user is the owner for the organization in Voucherify. | [optional]
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/docs/ManagementProjectsWebhook.md b/docs/ManagementProjectsWebhook.md
new file mode 100644
index 00000000..e23093f2
--- /dev/null
+++ b/docs/ManagementProjectsWebhook.md
@@ -0,0 +1,18 @@
+# ManagementProjectsWebhook
+
+Response body schema for webhook endpoints.
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**id** | **str** | Unique identifier of the webhook. | [optional]
+**object** | **str** | The type of the object represented by JSON. | [optional] [default to 'webhook']
+**created_at** | **datetime** | Timestamp representing the date and time when the webhook configuration was created. The value for this parameter is shown in the ISO 8601 format. | [optional]
+**target_url** | **str** | URL address that receives webhooks. | [optional]
+**events** | **List[str]** | Lists the events that trigger webhook sendout. | [optional]
+**active** | **bool** | Determines if the webhook configuration is active. | [optional] [default to True]
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/docs/ManagementProjectsWebhooksCreateRequestBody.md b/docs/ManagementProjectsWebhooksCreateRequestBody.md
new file mode 100644
index 00000000..30988637
--- /dev/null
+++ b/docs/ManagementProjectsWebhooksCreateRequestBody.md
@@ -0,0 +1,15 @@
+# ManagementProjectsWebhooksCreateRequestBody
+
+Request body schema for **POST** `/management/v1/projects/{projectId}/webhooks/{webhookId}`.
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**target_url** | **str** | URL address that receives webhooks. | [optional]
+**events** | **List[str]** | Lists the events that trigger webhook sendout. | [optional]
+**active** | **bool** | Determines if the webhook configuration is active. | [optional] [default to True]
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/docs/ManagementProjectsWebhooksCreateResponseBody.md b/docs/ManagementProjectsWebhooksCreateResponseBody.md
new file mode 100644
index 00000000..46e0804d
--- /dev/null
+++ b/docs/ManagementProjectsWebhooksCreateResponseBody.md
@@ -0,0 +1,18 @@
+# ManagementProjectsWebhooksCreateResponseBody
+
+Response body schema for **POST** `/management/v1/projects/{projectId}/webhooks`.
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**id** | **str** | Unique identifier of the webhook. | [optional]
+**object** | **str** | The type of the object represented by JSON. | [optional] [default to 'webhook']
+**created_at** | **datetime** | Timestamp representing the date and time when the webhook configuration was created. The value for this parameter is shown in the ISO 8601 format. | [optional]
+**target_url** | **str** | URL address that receives webhooks. | [optional]
+**events** | **List[str]** | Lists the events that trigger webhook sendout. | [optional]
+**active** | **bool** | Determines if the webhook configuration is active. | [optional] [default to True]
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/docs/ManagementProjectsWebhooksGetResponseBody.md b/docs/ManagementProjectsWebhooksGetResponseBody.md
new file mode 100644
index 00000000..75a230e1
--- /dev/null
+++ b/docs/ManagementProjectsWebhooksGetResponseBody.md
@@ -0,0 +1,18 @@
+# ManagementProjectsWebhooksGetResponseBody
+
+Response body schema for **GET** `/management/v1/projects/{projectId}/webhooks/{webhookId}`.
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**id** | **str** | Unique identifier of the webhook. | [optional]
+**object** | **str** | The type of the object represented by JSON. | [optional] [default to 'webhook']
+**created_at** | **datetime** | Timestamp representing the date and time when the webhook configuration was created. The value for this parameter is shown in the ISO 8601 format. | [optional]
+**target_url** | **str** | URL address that receives webhooks. | [optional]
+**events** | **List[str]** | Lists the events that trigger webhook sendout. | [optional]
+**active** | **bool** | Determines if the webhook configuration is active. | [optional] [default to True]
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/docs/ManagementProjectsWebhooksListResponseBody.md b/docs/ManagementProjectsWebhooksListResponseBody.md
new file mode 100644
index 00000000..31f601bf
--- /dev/null
+++ b/docs/ManagementProjectsWebhooksListResponseBody.md
@@ -0,0 +1,16 @@
+# ManagementProjectsWebhooksListResponseBody
+
+Object containing a list of webhook configurations.
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**object** | **str** | The type of the object represented by JSON. This object stores information about the webhook configurations in a dictionary. | [optional] [default to 'list']
+**data_ref** | **str** | Identifies the name of the attribute that contains the array of webhook objects. | [optional] [default to 'data']
+**data** | [**List[ManagementProjectsWebhook]**](ManagementProjectsWebhook.md) | Array of webhook objects. | [optional]
+**total** | **int** | The total number of webhook objects. | [optional]
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/docs/ManagementProjectsWebhooksUpdateRequestBody.md b/docs/ManagementProjectsWebhooksUpdateRequestBody.md
new file mode 100644
index 00000000..787793b9
--- /dev/null
+++ b/docs/ManagementProjectsWebhooksUpdateRequestBody.md
@@ -0,0 +1,15 @@
+# ManagementProjectsWebhooksUpdateRequestBody
+
+Request body schema for **PUT** `/management/v1/projects/{projectId}/webhooks`.
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**target_url** | **str** | URL address that receives webhooks. | [optional]
+**events** | **List[str]** | Lists the events that trigger webhook sendout. | [optional]
+**active** | **bool** | Determines if the webhook configuration is active. | [optional] [default to True]
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/docs/ManagementProjectsWebhooksUpdateResponseBody.md b/docs/ManagementProjectsWebhooksUpdateResponseBody.md
new file mode 100644
index 00000000..eccf52f6
--- /dev/null
+++ b/docs/ManagementProjectsWebhooksUpdateResponseBody.md
@@ -0,0 +1,18 @@
+# ManagementProjectsWebhooksUpdateResponseBody
+
+Response body schema for **PUT** `/management/v1/projects/{projectId}/webhooks/{webhookId}`.
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**id** | **str** | Unique identifier of the webhook. | [optional]
+**object** | **str** | The type of the object represented by JSON. | [optional] [default to 'webhook']
+**created_at** | **datetime** | Timestamp representing the date and time when the webhook configuration was created. The value for this parameter is shown in the ISO 8601 format. | [optional]
+**target_url** | **str** | URL address that receives webhooks. | [optional]
+**events** | **List[str]** | Lists the events that trigger webhook sendout. | [optional]
+**active** | **bool** | Determines if the webhook configuration is active. | [optional] [default to True]
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/docs/MetadataSchema.md b/docs/MetadataSchema.md
new file mode 100644
index 00000000..df925628
--- /dev/null
+++ b/docs/MetadataSchema.md
@@ -0,0 +1,19 @@
+# MetadataSchema
+
+Object representing a metadata schema.
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**id** | **str** | Unique identifier of the metadata schema. | [optional]
+**related_object** | **str** | The resource type. You can define custom metadata schemas, which have a custom `\"related_object\"` resource type. The standard metadata schemas are: `\"campaign\"`, `\"customer\"`, `\"earning_rule\"`, `\"loyalty_tier\"`, `\"order\"`, `\"order_item\"`, `\"product\"`, `\"promotion_tier\"`, `\"publication\"`, `\"redemption\"`, `\"reward\"`, `\"voucher\"`. | [optional]
+**properties** | **object** | Contains metadata definitions. | [optional]
+**allow_defined_only** | **bool** | Restricts the creation of metadata fields when set to `true`. It indicates whether or not you can create new metadata definitions, e.g. in the campaign or publication manager. If set to `true`, then only the defined fields are available for assigning values. | [optional]
+**created_at** | **datetime** | Timestamp representing the date and time when the metadata schema was created. The value for this parameter is shown in the ISO 8601 format. | [optional]
+**updated_at** | **datetime** | Timestamp representing the date and time when the metadata schema was updated. The value for this parameter is shown in the ISO 8601 format. | [optional]
+**object** | **str** | The type of the object represented by the JSON. This object stores information about the metadata schema. | [optional] [default to 'metadata_schema']
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/docs/MetadataSchemaDeprecated.md b/docs/MetadataSchemaDeprecated.md
new file mode 100644
index 00000000..ac9e50d0
--- /dev/null
+++ b/docs/MetadataSchemaDeprecated.md
@@ -0,0 +1,19 @@
+# MetadataSchemaDeprecated
+
+Object representing a metadata schema.
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**id** | **str** | Unique identifier of the metadata schema. | [optional]
+**related_object** | **str** | The resource type. You can define custom metadata schemas, which have a custom `\"related_object\"` resource type. The standard metadata schemas are: `\"campaign\"`, `\"customer\"`, `\"earning_rule\"`, `\"loyalty_tier\"`, `\"order\"`, `\"order_item\"`, `\"product\"`, `\"promotion_tier\"`, `\"publication\"`, `\"redemption\"`, `\"reward\"`, `\"voucher\"`. | [optional]
+**properties** | **object** | Contains metadata definitions. | [optional]
+**allow_defined_only** | **bool** | Restricts the creation of metadata fields when set to `true`. It indicates whether or not you can create new metadata definitions, e.g. in the campaign or publication manager. If set to `true`, then only the defined fields are available for assigning values. | [optional]
+**created_at** | **datetime** | Timestamp representing the date and time when the metadata schema was created. The value for this parameter is shown in the ISO 8601 format. | [optional]
+**updated_at** | **datetime** | Timestamp representing the date and time when the metadata schema was updated. The value for this parameter is shown in the ISO 8601 format. | [optional]
+**object** | **str** | The type of the object represented by the JSON. This object stores information about the metadata schema. | [optional] [default to 'metadata_schema']
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/docs/MetadataSchemasApi.md b/docs/MetadataSchemasApi.md
new file mode 100644
index 00000000..a76a2e68
--- /dev/null
+++ b/docs/MetadataSchemasApi.md
@@ -0,0 +1,178 @@
+# voucherify.MetadataSchemasApi
+
+All URIs are relative to *https://api.voucherify.io*
+
+Method | HTTP request | Description
+------------- | ------------- | -------------
+[**get_metadata_schema**](MetadataSchemasApi.md#get_metadata_schema) | **GET** /v1/metadata-schemas/{resource} | Get Metadata Schema
+[**list_metadata_schemas**](MetadataSchemasApi.md#list_metadata_schemas) | **GET** /v1/metadata-schemas | List Metadata Schemas
+
+
+# **get_metadata_schema**
+> MetadataSchemasGetResponseBody get_metadata_schema(resource)
+
+Get Metadata Schema
+
+Retrieves a metadata schema per resource type. # Resource types ## Standard You can retrieve metadata schemas for the standard metadata schema definitions listed below. Add one of these types as the resource path parameter. - campaign - customer - earning_rule - loyalty_tier - order - order_item - product - promotion_tier - publication - redemption - reward - voucher ## Custom If you have defined a [custom metadata schema](https://support.voucherify.io/article/99-schema-validation-metadata#add-metadata), provide its name in the resource field to retrieve its details. 📘 Management API If you have Management API enabled, you can also use the Get Metadata Schemas endpoint to retrieve a metadata schema using its ID.
+
+### Example
+
+* Api Key Authentication (X-App-Id):
+* Api Key Authentication (X-App-Token):
+
+```python
+import voucherify
+from voucherify.models.metadata_schemas_get_response_body import MetadataSchemasGetResponseBody
+from voucherify.rest import ApiException
+from pprint import pprint
+
+# Defining the host is optional and defaults to https://api.voucherify.io
+# See configuration.py for a list of all supported configuration parameters.
+configuration = voucherify.Configuration(
+ host = "https://api.voucherify.io"
+)
+
+# The client must configure the authentication and authorization parameters
+# in accordance with the API server security policy.
+# Examples for each auth method are provided below, use the example that
+# satisfies your auth use case.
+
+# Configure API key authorization: X-App-Id
+configuration.api_key['X-App-Id'] = os.environ["API_KEY"]
+
+# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
+# configuration.api_key_prefix['X-App-Id'] = 'Bearer'
+
+# Configure API key authorization: X-App-Token
+configuration.api_key['X-App-Token'] = os.environ["API_KEY"]
+
+# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
+# configuration.api_key_prefix['X-App-Token'] = 'Bearer'
+
+# Enter a context with an instance of the API client
+with voucherify.ApiClient(configuration) as api_client:
+ # Create an instance of the API class
+ api_instance = voucherify.MetadataSchemasApi(api_client)
+ resource = 'resource_example' # str | There is an infinite number of possibilities for retrieving metadata schemas by the resource type because you can define custom metadata schemas.
+
+ try:
+ # Get Metadata Schema
+ api_response = api_instance.get_metadata_schema(resource)
+ print("The response of MetadataSchemasApi->get_metadata_schema:\n")
+ pprint(api_response)
+ except Exception as e:
+ print("Exception when calling MetadataSchemasApi->get_metadata_schema: %s\n" % e)
+```
+
+
+
+### Parameters
+
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **resource** | **str**| There is an infinite number of possibilities for retrieving metadata schemas by the resource type because you can define custom metadata schemas. |
+
+### Return type
+
+[**MetadataSchemasGetResponseBody**](MetadataSchemasGetResponseBody.md)
+
+### Authorization
+
+[X-App-Id](../README.md#X-App-Id), [X-App-Token](../README.md#X-App-Token)
+
+### HTTP request headers
+
+ - **Content-Type**: Not defined
+ - **Accept**: application/json
+
+### HTTP response details
+
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+**2XX** | The response does not include unknown metadata properties in the response, i.e. those that have been defined outside of the **Project Settings** > **Metadata Schema** definitions. For example, an unknown metadata property can be defined in the campaign manager. | - |
+
+[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
+
+# **list_metadata_schemas**
+> MetadataSchemasListResponseBody list_metadata_schemas()
+
+List Metadata Schemas
+
+Retrieve metadata schema definitions. 📘 Management API If you have Management API enabled, you can also use the List Metadata Schemas endpoint to list all metadata schemas.
+
+### Example
+
+* Api Key Authentication (X-App-Id):
+* Api Key Authentication (X-App-Token):
+
+```python
+import voucherify
+from voucherify.models.metadata_schemas_list_response_body import MetadataSchemasListResponseBody
+from voucherify.rest import ApiException
+from pprint import pprint
+
+# Defining the host is optional and defaults to https://api.voucherify.io
+# See configuration.py for a list of all supported configuration parameters.
+configuration = voucherify.Configuration(
+ host = "https://api.voucherify.io"
+)
+
+# The client must configure the authentication and authorization parameters
+# in accordance with the API server security policy.
+# Examples for each auth method are provided below, use the example that
+# satisfies your auth use case.
+
+# Configure API key authorization: X-App-Id
+configuration.api_key['X-App-Id'] = os.environ["API_KEY"]
+
+# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
+# configuration.api_key_prefix['X-App-Id'] = 'Bearer'
+
+# Configure API key authorization: X-App-Token
+configuration.api_key['X-App-Token'] = os.environ["API_KEY"]
+
+# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
+# configuration.api_key_prefix['X-App-Token'] = 'Bearer'
+
+# Enter a context with an instance of the API client
+with voucherify.ApiClient(configuration) as api_client:
+ # Create an instance of the API class
+ api_instance = voucherify.MetadataSchemasApi(api_client)
+
+ try:
+ # List Metadata Schemas
+ api_response = api_instance.list_metadata_schemas()
+ print("The response of MetadataSchemasApi->list_metadata_schemas:\n")
+ pprint(api_response)
+ except Exception as e:
+ print("Exception when calling MetadataSchemasApi->list_metadata_schemas: %s\n" % e)
+```
+
+
+
+### Parameters
+
+This endpoint does not need any parameter.
+
+### Return type
+
+[**MetadataSchemasListResponseBody**](MetadataSchemasListResponseBody.md)
+
+### Authorization
+
+[X-App-Id](../README.md#X-App-Id), [X-App-Token](../README.md#X-App-Token)
+
+### HTTP request headers
+
+ - **Content-Type**: Not defined
+ - **Accept**: application/json
+
+### HTTP response details
+
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+**2XX** | Returns an array of metadata schema definitions. The response does not include unknown metadata properties in the response, i.e. those that have been defined outside of the **Project Settings** > **Metadata Schema** definitions. For example, an unknown metadata property can be defined in the campaign manager while creating a campaign. | - |
+
+[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
+
diff --git a/docs/MetadataSchemasGetResponseBody.md b/docs/MetadataSchemasGetResponseBody.md
new file mode 100644
index 00000000..8d0d3a25
--- /dev/null
+++ b/docs/MetadataSchemasGetResponseBody.md
@@ -0,0 +1,19 @@
+# MetadataSchemasGetResponseBody
+
+Response body schema for **GET** `/v1/metadata-schemas/{resource}`.
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**id** | **str** | Unique identifier of the metadata schema. | [optional]
+**related_object** | **str** | The resource type. You can define custom metadata schemas, which have a custom `\"related_object\"` resource type. The standard metadata schemas are: `\"campaign\"`, `\"customer\"`, `\"earning_rule\"`, `\"loyalty_tier\"`, `\"order\"`, `\"order_item\"`, `\"product\"`, `\"promotion_tier\"`, `\"publication\"`, `\"redemption\"`, `\"reward\"`, `\"voucher\"`. | [optional]
+**properties** | **object** | Contains metadata definitions. | [optional]
+**allow_defined_only** | **bool** | Restricts the creation of metadata fields when set to `true`. It indicates whether or not you can create new metadata definitions, e.g. in the campaign or publication manager. If set to `true`, then only the defined fields are available for assigning values. | [optional]
+**created_at** | **datetime** | Timestamp representing the date and time when the metadata schema was created. The value for this parameter is shown in the ISO 8601 format. | [optional]
+**updated_at** | **datetime** | Timestamp representing the date and time when the metadata schema was updated. The value for this parameter is shown in the ISO 8601 format. | [optional]
+**object** | **str** | The type of the object represented by the JSON. This object stores information about the metadata schema. | [optional] [default to 'metadata_schema']
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/docs/MetadataSchemasListResponseBody.md b/docs/MetadataSchemasListResponseBody.md
new file mode 100644
index 00000000..04eb89a5
--- /dev/null
+++ b/docs/MetadataSchemasListResponseBody.md
@@ -0,0 +1,16 @@
+# MetadataSchemasListResponseBody
+
+Object containing a list of metadata schemas.
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**object** | **str** | The type of the object represented by JSON. This object stores information about the metadata schemas in a dictionary. | [optional] [default to 'list']
+**data_ref** | **str** | Identifies the name of the attribute that contains the array of metadata schema objects. | [optional] [default to 'schemas']
+**schemas** | [**List[MetadataSchemaDeprecated]**](MetadataSchemaDeprecated.md) | Array of metadata schema objects. The metadata schemas are listed by related object properties. | [optional]
+**total** | **int** | The total number of metadata schema objects. | [optional]
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/docs/Order.md b/docs/Order.md
index bd37ca6f..9f2ba0d9 100644
--- a/docs/Order.md
+++ b/docs/Order.md
@@ -12,7 +12,7 @@ Name | Type | Description | Notes
**amount** | **int** | A positive integer in the smallest currency unit (e.g. 100 cents for $1.00) representing the total amount of the order. This is the sum of the order items' amounts. | [optional]
**initial_amount** | **int** | A positive integer in the smallest currency unit (e.g. 100 cents for $1.00) representing the total amount of the order. This is the sum of the order items' amounts. | [optional]
**discount_amount** | **int** | Sum of all order-level discounts applied to the order. | [optional]
-**items** | [**List[OrderItem]**](OrderItem.md) | Array of items applied to the order. | [optional]
+**items** | [**List[OrderItem]**](OrderItem.md) | Array of items applied to the order. It can include up 500 items. | [optional]
**metadata** | **object** | A set of custom key/value pairs that you can attach to an order. It can be useful for storing additional information about the order in a structured format. | [optional]
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
diff --git a/docs/OrderCalculated.md b/docs/OrderCalculated.md
index d00f1635..64ae5abe 100644
--- a/docs/OrderCalculated.md
+++ b/docs/OrderCalculated.md
@@ -18,7 +18,7 @@ Name | Type | Description | Notes
**applied_discount_amount** | **int** | This field shows the order-level discount applied. | [optional]
**items_applied_discount_amount** | **int** | Sum of all product-specific discounts applied in a particular request. `sum(items, i => i.applied_discount_amount)` | [optional]
**total_applied_discount_amount** | **int** | Sum of all order-level AND all product-specific discounts applied in a particular request. `total_applied_discount_amount` = `applied_discount_amount` + `items_applied_discount_amount` | [optional]
-**items** | [**List[OrderCalculatedItem]**](OrderCalculatedItem.md) | Array of items applied to the order. | [optional]
+**items** | [**List[OrderCalculatedItem]**](OrderCalculatedItem.md) | Array of items applied to the order. It can include up 500 items. | [optional]
**metadata** | **object** | A set of custom key/value pairs that you can attach to an order. It can be useful for storing additional information about the order in a structured format. | [optional]
**object** | **str** | The type of the object represented by JSON. | [optional] [default to 'order']
**created_at** | **datetime** | Timestamp representing the date and time when the order was created. The value is shown in the ISO 8601 format. | [optional]
diff --git a/docs/OrderItemProduct.md b/docs/OrderItemProduct.md
index 0e9df6e7..4c2a2681 100644
--- a/docs/OrderItemProduct.md
+++ b/docs/OrderItemProduct.md
@@ -8,7 +8,7 @@ Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**id** | **str** | A unique identifier that represents the product and is assigned by Voucherify. | [optional]
**source_id** | **str** | The merchant's product ID (if it is different than Voucherify's product ID). It is really useful in case of integration between multiple systems. It can be an ID from an eCommerce site, a database or a 3rd party service. | [optional]
-**override** | **bool** | The override set to `true` is used to store the product information in the system. If the product does not exist, it will be created with a source_id; if it does exist, the provided values for the name, price, and metadata will replace those already stored in the system. | [optional]
+**override** | **bool** | The override set to `true` is used to store the product information in the system. If the product does not exist, it will be created with a source_id; if it does exist, the provided values for the name, price, and metadata will replace those already stored in the system. Override works only for endpoints that create an order in the database. | [optional]
**name** | **str** | Product name. | [optional]
**metadata** | **object** | A set of custom key/value pairs that you can attach to a product. It can be useful for storing additional information about the product in a structured format. | [optional]
**price** | **float** | Product price. A positive integer in the smallest currency unit (e.g. 100 cents for $1.00). | [optional]
diff --git a/docs/OrdersCreateRequestBody.md b/docs/OrdersCreateRequestBody.md
index 61f38105..14469d54 100644
--- a/docs/OrdersCreateRequestBody.md
+++ b/docs/OrdersCreateRequestBody.md
@@ -12,7 +12,7 @@ Name | Type | Description | Notes
**amount** | **int** | A positive integer in the smallest currency unit (e.g. 100 cents for $1.00) representing the total amount of the order. This is the sum of the order items' amounts. | [optional]
**initial_amount** | **int** | A positive integer in the smallest currency unit (e.g. 100 cents for $1.00) representing the total amount of the order. This is the sum of the order items' amounts. | [optional]
**discount_amount** | **int** | Sum of all order-level discounts applied to the order. | [optional]
-**items** | [**List[OrderItem]**](OrderItem.md) | Array of items applied to the order. | [optional]
+**items** | [**List[OrderItem]**](OrderItem.md) | Array of items applied to the order. It can include up 500 items. | [optional]
**metadata** | **object** | A set of custom key/value pairs that you can attach to an order. It can be useful for storing additional information about the order in a structured format. | [optional]
**created_at** | **datetime** | Timestamp representing the date and time when the order was created. The value is shown in the ISO 8601 format. | [optional]
**referrer_id** | **str** | Unique referrer ID. | [optional]
diff --git a/docs/OrdersCreateResponseBody.md b/docs/OrdersCreateResponseBody.md
index 050a2ab5..250fe31e 100644
--- a/docs/OrdersCreateResponseBody.md
+++ b/docs/OrdersCreateResponseBody.md
@@ -18,7 +18,7 @@ Name | Type | Description | Notes
**applied_discount_amount** | **int** | This field shows the order-level discount applied. | [optional]
**items_applied_discount_amount** | **int** | Sum of all product-specific discounts applied in a particular request. `sum(items, i => i.applied_discount_amount)` | [optional]
**total_applied_discount_amount** | **int** | Sum of all order-level AND all product-specific discounts applied in a particular request. `total_applied_discount_amount` = `applied_discount_amount` + `items_applied_discount_amount` | [optional]
-**items** | [**List[OrderCalculatedItem]**](OrderCalculatedItem.md) | Array of items applied to the order. | [optional]
+**items** | [**List[OrderCalculatedItem]**](OrderCalculatedItem.md) | Array of items applied to the order. It can include up 500 items. | [optional]
**metadata** | **object** | A set of custom key/value pairs that you can attach to an order. It can be useful for storing additional information about the order in a structured format. | [optional]
**object** | **str** | The type of the object represented by JSON. | [optional] [default to 'order']
**created_at** | **datetime** | Timestamp representing the date and time when the order was created. The value is shown in the ISO 8601 format. | [optional]
diff --git a/docs/OrdersGetResponseBody.md b/docs/OrdersGetResponseBody.md
index 4ab3e814..28ca1c97 100644
--- a/docs/OrdersGetResponseBody.md
+++ b/docs/OrdersGetResponseBody.md
@@ -18,7 +18,7 @@ Name | Type | Description | Notes
**applied_discount_amount** | **int** | This field shows the order-level discount applied. | [optional]
**items_applied_discount_amount** | **int** | Sum of all product-specific discounts applied in a particular request. `sum(items, i => i.applied_discount_amount)` | [optional]
**total_applied_discount_amount** | **int** | Sum of all order-level AND all product-specific discounts applied in a particular request. `total_applied_discount_amount` = `applied_discount_amount` + `items_applied_discount_amount` | [optional]
-**items** | [**List[OrderCalculatedItem]**](OrderCalculatedItem.md) | Array of items applied to the order. | [optional]
+**items** | [**List[OrderCalculatedItem]**](OrderCalculatedItem.md) | Array of items applied to the order. It can include up 500 items. | [optional]
**metadata** | **object** | A set of custom key/value pairs that you can attach to an order. It can be useful for storing additional information about the order in a structured format. | [optional]
**object** | **str** | The type of the object represented by JSON. | [optional] [default to 'order']
**created_at** | **datetime** | Timestamp representing the date and time when the order was created. The value is shown in the ISO 8601 format. | [optional]
diff --git a/docs/OrdersImportCreateRequestBodyItem.md b/docs/OrdersImportCreateRequestBodyItem.md
index a5758f06..730bb410 100644
--- a/docs/OrdersImportCreateRequestBodyItem.md
+++ b/docs/OrdersImportCreateRequestBodyItem.md
@@ -11,7 +11,7 @@ Name | Type | Description | Notes
**amount** | **int** | A positive integer in the smallest currency unit (e.g. 100 cents for $1.00) representing the total amount of the order. This is the sum of the order items' amounts. | [optional]
**initial_amount** | **int** | A positive integer in the smallest currency unit (e.g. 100 cents for $1.00) representing the total amount of the order. This is the sum of the order items' amounts. | [optional]
**discount_amount** | **int** | Sum of all order-level discounts applied to the order. | [optional]
-**items** | [**List[OrderItem]**](OrderItem.md) | Array of items applied to the order. | [optional]
+**items** | [**List[OrderItem]**](OrderItem.md) | Array of items applied to the order. It can include up 500 items. | [optional]
**metadata** | **object** | A set of custom key/value pairs that you can attach to an order. It can be useful for storing additional information about the order in a structured format. | [optional]
**created_at** | **datetime** | Timestamp representing the date and time when the order was created. The value is shown in the ISO 8601 format. | [optional]
**referrer_id** | **str** | Unique referrer ID. | [optional]
diff --git a/docs/OrdersUpdateRequestBody.md b/docs/OrdersUpdateRequestBody.md
index 258d73bd..1354c663 100644
--- a/docs/OrdersUpdateRequestBody.md
+++ b/docs/OrdersUpdateRequestBody.md
@@ -11,7 +11,7 @@ Name | Type | Description | Notes
**amount** | **int** | A positive integer in the smallest currency unit (e.g. 100 cents for $1.00) representing the total amount of the order. This is the sum of the order items' amounts. | [optional]
**initial_amount** | **int** | A positive integer in the smallest currency unit (e.g. 100 cents for $1.00) representing the total amount of the order. This is the sum of the order items' amounts. | [optional]
**discount_amount** | **int** | Sum of all order-level discounts applied to the order. | [optional]
-**items** | [**List[OrderItem]**](OrderItem.md) | Array of items applied to the order. | [optional]
+**items** | [**List[OrderItem]**](OrderItem.md) | Array of items applied to the order. It can include up 500 items. | [optional]
**metadata** | **object** | A set of custom key/value pairs that you can attach to an order. It can be useful for storing additional information about the order in a structured format. | [optional]
**created_at** | **datetime** | Timestamp representing the date and time when the order was created. The value is shown in the ISO 8601 format. | [optional]
**referrer_id** | **str** | Unique referrer ID. | [optional]
diff --git a/docs/OrdersUpdateResponseBody.md b/docs/OrdersUpdateResponseBody.md
index ae959d1e..c1753252 100644
--- a/docs/OrdersUpdateResponseBody.md
+++ b/docs/OrdersUpdateResponseBody.md
@@ -18,7 +18,7 @@ Name | Type | Description | Notes
**applied_discount_amount** | **int** | This field shows the order-level discount applied. | [optional]
**items_applied_discount_amount** | **int** | Sum of all product-specific discounts applied in a particular request. `sum(items, i => i.applied_discount_amount)` | [optional]
**total_applied_discount_amount** | **int** | Sum of all order-level AND all product-specific discounts applied in a particular request. `total_applied_discount_amount` = `applied_discount_amount` + `items_applied_discount_amount` | [optional]
-**items** | [**List[OrderCalculatedItem]**](OrderCalculatedItem.md) | Array of items applied to the order. | [optional]
+**items** | [**List[OrderCalculatedItem]**](OrderCalculatedItem.md) | Array of items applied to the order. It can include up 500 items. | [optional]
**metadata** | **object** | A set of custom key/value pairs that you can attach to an order. It can be useful for storing additional information about the order in a structured format. | [optional]
**object** | **str** | The type of the object represented by JSON. | [optional] [default to 'order']
**created_at** | **datetime** | Timestamp representing the date and time when the order was created. The value is shown in the ISO 8601 format. | [optional]
diff --git a/docs/ParameterCampaignType.md b/docs/ParameterCampaignType.md
index d015eb96..41d5150e 100644
--- a/docs/ParameterCampaignType.md
+++ b/docs/ParameterCampaignType.md
@@ -13,8 +13,6 @@
* `LOYALTY_PROGRAM` (value: `'LOYALTY_PROGRAM'`)
-* `LUCKY_DRAW` (value: `'LUCKY_DRAW'`)
-
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
diff --git a/docs/ParameterFiltersListBin.md b/docs/ParameterFiltersListBin.md
new file mode 100644
index 00000000..d5cbd19c
--- /dev/null
+++ b/docs/ParameterFiltersListBin.md
@@ -0,0 +1,16 @@
+# ParameterFiltersListBin
+
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**junction** | [**Junction**](Junction.md) | | [optional]
+**id** | [**ParameterFiltersListBinId**](ParameterFiltersListBinId.md) | | [optional]
+**resource_type** | [**ParameterFiltersListBinResourceType**](ParameterFiltersListBinResourceType.md) | | [optional]
+**resource_name** | [**ParameterFiltersListBinResourceName**](ParameterFiltersListBinResourceName.md) | | [optional]
+**resource_id** | [**ParameterFiltersListBinResourceId**](ParameterFiltersListBinResourceId.md) | | [optional]
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/docs/ParameterFiltersListBinId.md b/docs/ParameterFiltersListBinId.md
new file mode 100644
index 00000000..e78ef88b
--- /dev/null
+++ b/docs/ParameterFiltersListBinId.md
@@ -0,0 +1,13 @@
+# ParameterFiltersListBinId
+
+Unique identifier of the bin entry.
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**conditions** | [**FilterConditionsString**](FilterConditionsString.md) | | [optional]
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/docs/ParameterFiltersListBinResourceId.md b/docs/ParameterFiltersListBinResourceId.md
new file mode 100644
index 00000000..da656123
--- /dev/null
+++ b/docs/ParameterFiltersListBinResourceId.md
@@ -0,0 +1,13 @@
+# ParameterFiltersListBinResourceId
+
+Unique identifier of the resource moved to the bin.
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**conditions** | [**FilterConditionsString**](FilterConditionsString.md) | | [optional]
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/docs/ParameterFiltersListBinResourceName.md b/docs/ParameterFiltersListBinResourceName.md
new file mode 100644
index 00000000..94a10a21
--- /dev/null
+++ b/docs/ParameterFiltersListBinResourceName.md
@@ -0,0 +1,13 @@
+# ParameterFiltersListBinResourceName
+
+Name of the resource moved to the bin: the name of the campaign, voucher, product, or SKU.
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**conditions** | [**FilterConditionsString**](FilterConditionsString.md) | | [optional]
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/docs/ParameterFiltersListBinResourceType.md b/docs/ParameterFiltersListBinResourceType.md
new file mode 100644
index 00000000..cc044bff
--- /dev/null
+++ b/docs/ParameterFiltersListBinResourceType.md
@@ -0,0 +1,13 @@
+# ParameterFiltersListBinResourceType
+
+Resource type of the resource moved to the bin.
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**conditions** | [**ParameterFiltersListBinResourceTypeConditions**](ParameterFiltersListBinResourceTypeConditions.md) | | [optional]
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/docs/ParameterFiltersListBinResourceTypeConditions.md b/docs/ParameterFiltersListBinResourceTypeConditions.md
new file mode 100644
index 00000000..095fee7d
--- /dev/null
+++ b/docs/ParameterFiltersListBinResourceTypeConditions.md
@@ -0,0 +1,19 @@
+# ParameterFiltersListBinResourceTypeConditions
+
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**var_in** | **List[str]** | Array of resource values that should be included in the results (multiple values). | [optional]
+**not_in** | **List[str]** | Array of resource values that should be included in the results (multiple values). | [optional]
+**var_is** | **str** | Value is exactly this value (single value). | [optional]
+**is_not** | **str** | Results omit this value (single value). | [optional]
+**has_value** | **str** | Value is NOT null. The value for this parameter is an empty string. | [optional]
+**is_unknown** | **str** | Value is null. The value for this parameter is an empty string. | [optional]
+**starts_with** | **str** | Value starts with the specified string. | [optional]
+**ends_with** | **str** | Value ends with the specified string. | [optional]
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/docs/ParameterFiltersListCampaigns.md b/docs/ParameterFiltersListCampaigns.md
new file mode 100644
index 00000000..7bde9456
--- /dev/null
+++ b/docs/ParameterFiltersListCampaigns.md
@@ -0,0 +1,18 @@
+# ParameterFiltersListCampaigns
+
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**campaign_status** | [**ParameterFiltersListCampaignsCampaignStatus**](ParameterFiltersListCampaignsCampaignStatus.md) | | [optional]
+**is_referral_code** | [**ParameterFiltersListCampaignsIsReferralCode**](ParameterFiltersListCampaignsIsReferralCode.md) | | [optional]
+**validity_timeframe** | [**ParameterFiltersListCampaignsValidityTimeframe**](ParameterFiltersListCampaignsValidityTimeframe.md) | | [optional]
+**voucher_type** | [**ParameterFiltersListCampaignsVoucherType**](ParameterFiltersListCampaignsVoucherType.md) | | [optional]
+**categories** | [**ParameterFiltersListCampaignsCategories**](ParameterFiltersListCampaignsCategories.md) | | [optional]
+**category_ids** | [**ParameterFiltersListCampaignsCategoryIds**](ParameterFiltersListCampaignsCategoryIds.md) | | [optional]
+**junction** | [**Junction**](Junction.md) | | [optional]
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/docs/ParameterFiltersListCampaignsCampaignStatus.md b/docs/ParameterFiltersListCampaignsCampaignStatus.md
new file mode 100644
index 00000000..8b7e6cec
--- /dev/null
+++ b/docs/ParameterFiltersListCampaignsCampaignStatus.md
@@ -0,0 +1,13 @@
+# ParameterFiltersListCampaignsCampaignStatus
+
+Type of the campaign. Allowed values: `DONE`, `IN_PROGRESS`, `DRAFT`, `FAILED` `MODIFYING`
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**conditions** | [**ParameterFiltersListCampaignsCampaignStatusConditions**](ParameterFiltersListCampaignsCampaignStatusConditions.md) | | [optional]
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/docs/ParameterFiltersListCampaignsCampaignStatusConditions.md b/docs/ParameterFiltersListCampaignsCampaignStatusConditions.md
new file mode 100644
index 00000000..0510228e
--- /dev/null
+++ b/docs/ParameterFiltersListCampaignsCampaignStatusConditions.md
@@ -0,0 +1,19 @@
+# ParameterFiltersListCampaignsCampaignStatusConditions
+
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**var_in** | **List[str]** | Array of resource values that should be included in the results (multiple values). | [optional]
+**not_in** | **List[str]** | Array of resource values that should be included in the results (multiple values). | [optional]
+**var_is** | **str** | Value is exactly this value (single value). | [optional]
+**is_not** | **str** | Results omit this value (single value). | [optional]
+**has_value** | **str** | Value is NOT null. The value for this parameter is an empty string. | [optional]
+**is_unknown** | **str** | Value is null. The value for this parameter is an empty string. | [optional]
+**starts_with** | **str** | Value starts with the specified string. | [optional]
+**ends_with** | **str** | Value ends with the specified string. | [optional]
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/docs/ParameterFiltersListCampaignsCategories.md b/docs/ParameterFiltersListCampaignsCategories.md
new file mode 100644
index 00000000..66ecffef
--- /dev/null
+++ b/docs/ParameterFiltersListCampaignsCategories.md
@@ -0,0 +1,13 @@
+# ParameterFiltersListCampaignsCategories
+
+Filter by categories names
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**conditions** | [**FilterConditionsString**](FilterConditionsString.md) | | [optional]
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/docs/ParameterFiltersListCampaignsCategoryIds.md b/docs/ParameterFiltersListCampaignsCategoryIds.md
new file mode 100644
index 00000000..727d4d29
--- /dev/null
+++ b/docs/ParameterFiltersListCampaignsCategoryIds.md
@@ -0,0 +1,13 @@
+# ParameterFiltersListCampaignsCategoryIds
+
+Filter by categories ids
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**conditions** | [**FilterConditionsString**](FilterConditionsString.md) | | [optional]
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/docs/ParameterFiltersListCampaignsIsReferralCode.md b/docs/ParameterFiltersListCampaignsIsReferralCode.md
new file mode 100644
index 00000000..aa17986b
--- /dev/null
+++ b/docs/ParameterFiltersListCampaignsIsReferralCode.md
@@ -0,0 +1,14 @@
+# ParameterFiltersListCampaignsIsReferralCode
+
+
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**var_is** | **str** | Value is exactly this value (single value). | [optional]
+**is_not** | **str** | Results omit this value (single value). | [optional]
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/docs/ParameterFiltersListCampaignsValidityTimeframe.md b/docs/ParameterFiltersListCampaignsValidityTimeframe.md
new file mode 100644
index 00000000..d8176a02
--- /dev/null
+++ b/docs/ParameterFiltersListCampaignsValidityTimeframe.md
@@ -0,0 +1,13 @@
+# ParameterFiltersListCampaignsValidityTimeframe
+
+Filter by validity timeframe
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**conditions** | [**FilterConditionsDateTime**](FilterConditionsDateTime.md) | | [optional]
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/docs/ParameterFiltersListCampaignsVoucherType.md b/docs/ParameterFiltersListCampaignsVoucherType.md
new file mode 100644
index 00000000..078ea5a1
--- /dev/null
+++ b/docs/ParameterFiltersListCampaignsVoucherType.md
@@ -0,0 +1,13 @@
+# ParameterFiltersListCampaignsVoucherType
+
+Filter by voucher type
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**conditions** | [**FilterConditionsString**](FilterConditionsString.md) | | [optional]
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/docs/ParameterFiltersListCustomerRedeemables.md b/docs/ParameterFiltersListCustomerRedeemables.md
index 98e6bf23..e759fd69 100644
--- a/docs/ParameterFiltersListCustomerRedeemables.md
+++ b/docs/ParameterFiltersListCustomerRedeemables.md
@@ -13,6 +13,7 @@ Name | Type | Description | Notes
**campaign_id** | [**ParameterFiltersListCustomerRedeemablesCampaignId**](ParameterFiltersListCustomerRedeemablesCampaignId.md) | | [optional]
**campaign_type** | [**ParameterFiltersListCustomerRedeemablesCampaignType**](ParameterFiltersListCustomerRedeemablesCampaignType.md) | | [optional]
**voucher_type** | [**ParameterFiltersListCustomerRedeemablesVoucherType**](ParameterFiltersListCustomerRedeemablesVoucherType.md) | | [optional]
+**junction** | [**Junction**](Junction.md) | | [optional]
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
diff --git a/docs/ParameterFiltersListCustomerRedeemablesCampaignId.md b/docs/ParameterFiltersListCustomerRedeemablesCampaignId.md
index afdc296a..0e76eeb6 100644
--- a/docs/ParameterFiltersListCustomerRedeemablesCampaignId.md
+++ b/docs/ParameterFiltersListCustomerRedeemablesCampaignId.md
@@ -7,7 +7,6 @@ Unique campaign identifer, e.g. `camp_bfrwAVsP6Q1EM1ZjgHwheKYr`.
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**conditions** | [**FilterConditionsString**](FilterConditionsString.md) | | [optional]
-**junction** | [**Junction**](Junction.md) | | [optional]
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
diff --git a/docs/ParameterFiltersListCustomerRedeemablesCampaignType.md b/docs/ParameterFiltersListCustomerRedeemablesCampaignType.md
index 9f3201f4..1fd5dfb4 100644
--- a/docs/ParameterFiltersListCustomerRedeemablesCampaignType.md
+++ b/docs/ParameterFiltersListCustomerRedeemablesCampaignType.md
@@ -7,7 +7,6 @@ Type of the campaign. Allowed values: `DISCOUNT_COUPONS`, `REFERRAL_PROGRAM`, `G
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**conditions** | [**ParameterFiltersListCustomerRedeemablesCampaignTypeConditions**](ParameterFiltersListCustomerRedeemablesCampaignTypeConditions.md) | | [optional]
-**junction** | [**Junction**](Junction.md) | | [optional]
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
diff --git a/docs/ParameterFiltersListCustomerRedeemablesCreatedAt.md b/docs/ParameterFiltersListCustomerRedeemablesCreatedAt.md
index b7c56e20..3c8b1d81 100644
--- a/docs/ParameterFiltersListCustomerRedeemablesCreatedAt.md
+++ b/docs/ParameterFiltersListCustomerRedeemablesCreatedAt.md
@@ -6,8 +6,7 @@ Timestamp representing the date and time when the customer redeemable was create
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
-**conditions** | [**ParameterFiltersListCustomerRedeemablesCreatedAtConditions**](ParameterFiltersListCustomerRedeemablesCreatedAtConditions.md) | | [optional]
-**junction** | [**Junction**](Junction.md) | | [optional]
+**conditions** | [**FilterConditionsDateTime**](FilterConditionsDateTime.md) | | [optional]
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
diff --git a/docs/ParameterFiltersListCustomerRedeemablesHolderRole.md b/docs/ParameterFiltersListCustomerRedeemablesHolderRole.md
index 6402612e..c8978606 100644
--- a/docs/ParameterFiltersListCustomerRedeemablesHolderRole.md
+++ b/docs/ParameterFiltersListCustomerRedeemablesHolderRole.md
@@ -7,7 +7,6 @@ Holder role of the redeemable. Allowed values: `OWNER`, `REFEREE`, `REFERRER`.
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**conditions** | [**ParameterFiltersListCustomerRedeemablesHolderRoleConditions**](ParameterFiltersListCustomerRedeemablesHolderRoleConditions.md) | | [optional]
-**junction** | [**Junction**](Junction.md) | | [optional]
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
diff --git a/docs/ParameterFiltersListCustomerRedeemablesId.md b/docs/ParameterFiltersListCustomerRedeemablesId.md
index 3ff69a7c..2b7437db 100644
--- a/docs/ParameterFiltersListCustomerRedeemablesId.md
+++ b/docs/ParameterFiltersListCustomerRedeemablesId.md
@@ -7,7 +7,6 @@ Unique redeemable holder ID, i.e. `rh_0e77502f84f0f4a6a8`.
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**conditions** | [**FilterConditionsString**](FilterConditionsString.md) | | [optional]
-**junction** | [**Junction**](Junction.md) | | [optional]
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
diff --git a/docs/ParameterFiltersListCustomerRedeemablesRedeemableId.md b/docs/ParameterFiltersListCustomerRedeemablesRedeemableId.md
index 77dadbe5..3882526f 100644
--- a/docs/ParameterFiltersListCustomerRedeemablesRedeemableId.md
+++ b/docs/ParameterFiltersListCustomerRedeemablesRedeemableId.md
@@ -7,7 +7,6 @@ Unique redeemable ID, e.g. `v_hS8JFl8S6lNcd1L69wLIoXgTio7eWEgk`.
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**conditions** | [**FilterConditionsString**](FilterConditionsString.md) | | [optional]
-**junction** | [**Junction**](Junction.md) | | [optional]
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
diff --git a/docs/ParameterFiltersListCustomerRedeemablesRedeemableObject.md b/docs/ParameterFiltersListCustomerRedeemablesRedeemableObject.md
index 268256f1..01bf0781 100644
--- a/docs/ParameterFiltersListCustomerRedeemablesRedeemableObject.md
+++ b/docs/ParameterFiltersListCustomerRedeemablesRedeemableObject.md
@@ -7,7 +7,6 @@ Unique related object, i.e. `voucher`.
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**conditions** | [**ParameterFiltersListCustomerRedeemablesRedeemableObjectConditions**](ParameterFiltersListCustomerRedeemablesRedeemableObjectConditions.md) | | [optional]
-**junction** | [**Junction**](Junction.md) | | [optional]
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
diff --git a/docs/ParameterFiltersListCustomerRedeemablesVoucherType.md b/docs/ParameterFiltersListCustomerRedeemablesVoucherType.md
index 2f1f218b..fbed2ad5 100644
--- a/docs/ParameterFiltersListCustomerRedeemablesVoucherType.md
+++ b/docs/ParameterFiltersListCustomerRedeemablesVoucherType.md
@@ -7,7 +7,6 @@ Type of the voucher. Allowed values: `DISCOUNT_VOUCHER`, `GIFT_VOUCHER`, `LOYALT
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**conditions** | [**ParameterFiltersListCustomerRedeemablesVoucherTypeConditions**](ParameterFiltersListCustomerRedeemablesVoucherTypeConditions.md) | | [optional]
-**junction** | [**Junction**](Junction.md) | | [optional]
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
diff --git a/docs/ParameterFiltersListLocations.md b/docs/ParameterFiltersListLocations.md
new file mode 100644
index 00000000..23dc59c1
--- /dev/null
+++ b/docs/ParameterFiltersListLocations.md
@@ -0,0 +1,14 @@
+# ParameterFiltersListLocations
+
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**name** | [**ParameterFiltersListLocationsName**](ParameterFiltersListLocationsName.md) | | [optional]
+**created_at** | [**ParameterFiltersListLocationsCreatedAt**](ParameterFiltersListLocationsCreatedAt.md) | | [optional]
+**updated_at** | [**ParameterFiltersListLocationsUpdatedAt**](ParameterFiltersListLocationsUpdatedAt.md) | | [optional]
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/docs/ParameterFiltersListLocationsCreatedAt.md b/docs/ParameterFiltersListLocationsCreatedAt.md
new file mode 100644
index 00000000..20b5bfc5
--- /dev/null
+++ b/docs/ParameterFiltersListLocationsCreatedAt.md
@@ -0,0 +1,13 @@
+# ParameterFiltersListLocationsCreatedAt
+
+Timestamp representing the date and time when the location was created. The value is shown in the ISO 8601 format.
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**conditions** | [**FilterConditionsDateTime**](FilterConditionsDateTime.md) | | [optional]
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/docs/ParameterFiltersListLocationsName.md b/docs/ParameterFiltersListLocationsName.md
new file mode 100644
index 00000000..7ba0a181
--- /dev/null
+++ b/docs/ParameterFiltersListLocationsName.md
@@ -0,0 +1,12 @@
+# ParameterFiltersListLocationsName
+
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**conditions** | [**FilterConditionsString**](FilterConditionsString.md) | | [optional]
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/docs/ParameterFiltersListLocationsUpdatedAt.md b/docs/ParameterFiltersListLocationsUpdatedAt.md
new file mode 100644
index 00000000..103db11e
--- /dev/null
+++ b/docs/ParameterFiltersListLocationsUpdatedAt.md
@@ -0,0 +1,13 @@
+# ParameterFiltersListLocationsUpdatedAt
+
+Timestamp representing the date and time when the location was updated. The value is shown in the ISO 8601 format.
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**conditions** | [**FilterConditionsDateTime**](FilterConditionsDateTime.md) | | [optional]
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/docs/ParameterFiltersListPublications.md b/docs/ParameterFiltersListPublications.md
new file mode 100644
index 00000000..65cbc36e
--- /dev/null
+++ b/docs/ParameterFiltersListPublications.md
@@ -0,0 +1,21 @@
+# ParameterFiltersListPublications
+
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**junction** | [**Junction**](Junction.md) | | [optional]
+**failure_code** | [**ParameterFiltersListPublicationsFailureCode**](ParameterFiltersListPublicationsFailureCode.md) | | [optional]
+**result** | [**ParameterFiltersListPublicationsResult**](ParameterFiltersListPublicationsResult.md) | | [optional]
+**customer_id** | [**ParameterFiltersListPublicationsCustomerId**](ParameterFiltersListPublicationsCustomerId.md) | | [optional]
+**campaign_name** | [**ParameterFiltersListPublicationsCampaignName**](ParameterFiltersListPublicationsCampaignName.md) | | [optional]
+**voucher_type** | [**ParameterFiltersListPublicationsVoucherType**](ParameterFiltersListPublicationsVoucherType.md) | | [optional]
+**is_referral_code** | [**ParameterFiltersListPublicationsIsReferralCode**](ParameterFiltersListPublicationsIsReferralCode.md) | | [optional]
+**parent_object_id** | [**ParameterFiltersListPublicationsParentObjectId**](ParameterFiltersListPublicationsParentObjectId.md) | | [optional]
+**related_object_id** | [**ParameterFiltersListPublicationsRelatedObjectId**](ParameterFiltersListPublicationsRelatedObjectId.md) | | [optional]
+**source_id** | [**ParameterFiltersListPublicationsSourceId**](ParameterFiltersListPublicationsSourceId.md) | | [optional]
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/docs/ParameterFiltersListPublicationsCampaignName.md b/docs/ParameterFiltersListPublicationsCampaignName.md
new file mode 100644
index 00000000..18b34239
--- /dev/null
+++ b/docs/ParameterFiltersListPublicationsCampaignName.md
@@ -0,0 +1,13 @@
+# ParameterFiltersListPublicationsCampaignName
+
+Filter publications by campaign names.
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**conditions** | [**FilterConditionsString**](FilterConditionsString.md) | | [optional]
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/docs/ParameterFiltersListPublicationsCustomerId.md b/docs/ParameterFiltersListPublicationsCustomerId.md
new file mode 100644
index 00000000..f639627a
--- /dev/null
+++ b/docs/ParameterFiltersListPublicationsCustomerId.md
@@ -0,0 +1,13 @@
+# ParameterFiltersListPublicationsCustomerId
+
+Filter publications by customer ids.
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**conditions** | [**FilterConditionsString**](FilterConditionsString.md) | | [optional]
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/docs/ParameterFiltersListPublicationsFailureCode.md b/docs/ParameterFiltersListPublicationsFailureCode.md
new file mode 100644
index 00000000..c529a728
--- /dev/null
+++ b/docs/ParameterFiltersListPublicationsFailureCode.md
@@ -0,0 +1,13 @@
+# ParameterFiltersListPublicationsFailureCode
+
+Filter publications by ids.
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**conditions** | [**FilterConditionsString**](FilterConditionsString.md) | | [optional]
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/docs/ParameterFiltersListPublicationsIsReferralCode.md b/docs/ParameterFiltersListPublicationsIsReferralCode.md
new file mode 100644
index 00000000..0e12d94a
--- /dev/null
+++ b/docs/ParameterFiltersListPublicationsIsReferralCode.md
@@ -0,0 +1,13 @@
+# ParameterFiltersListPublicationsIsReferralCode
+
+Filter publications by is referall code.
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**conditions** | [**FilterConditionsString**](FilterConditionsString.md) | | [optional]
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/docs/ParameterFiltersListPublicationsParentObjectId.md b/docs/ParameterFiltersListPublicationsParentObjectId.md
new file mode 100644
index 00000000..3f457908
--- /dev/null
+++ b/docs/ParameterFiltersListPublicationsParentObjectId.md
@@ -0,0 +1,13 @@
+# ParameterFiltersListPublicationsParentObjectId
+
+Filter publications by parent object id.
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**conditions** | [**FilterConditionsString**](FilterConditionsString.md) | | [optional]
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/docs/ParameterFiltersListPublicationsRelatedObjectId.md b/docs/ParameterFiltersListPublicationsRelatedObjectId.md
new file mode 100644
index 00000000..cfd47fb4
--- /dev/null
+++ b/docs/ParameterFiltersListPublicationsRelatedObjectId.md
@@ -0,0 +1,13 @@
+# ParameterFiltersListPublicationsRelatedObjectId
+
+Filter publications by related object id.
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**conditions** | [**FilterConditionsString**](FilterConditionsString.md) | | [optional]
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/docs/ParameterFiltersListPublicationsResult.md b/docs/ParameterFiltersListPublicationsResult.md
new file mode 100644
index 00000000..e031279a
--- /dev/null
+++ b/docs/ParameterFiltersListPublicationsResult.md
@@ -0,0 +1,13 @@
+# ParameterFiltersListPublicationsResult
+
+Filter publications by names.
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**conditions** | [**FilterConditionsString**](FilterConditionsString.md) | | [optional]
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/docs/ParameterFiltersListPublicationsSourceId.md b/docs/ParameterFiltersListPublicationsSourceId.md
new file mode 100644
index 00000000..2f4a9303
--- /dev/null
+++ b/docs/ParameterFiltersListPublicationsSourceId.md
@@ -0,0 +1,13 @@
+# ParameterFiltersListPublicationsSourceId
+
+Filter publications by source id.
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**conditions** | [**FilterConditionsString**](FilterConditionsString.md) | | [optional]
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/docs/ParameterFiltersListPublicationsVoucherType.md b/docs/ParameterFiltersListPublicationsVoucherType.md
new file mode 100644
index 00000000..12c322e0
--- /dev/null
+++ b/docs/ParameterFiltersListPublicationsVoucherType.md
@@ -0,0 +1,13 @@
+# ParameterFiltersListPublicationsVoucherType
+
+Filter publications by voucher types.
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**conditions** | [**FilterConditionsString**](FilterConditionsString.md) | | [optional]
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/docs/ParameterFiltersListRedemptions.md b/docs/ParameterFiltersListRedemptions.md
index 35ef19e3..5ac8a0f6 100644
--- a/docs/ParameterFiltersListRedemptions.md
+++ b/docs/ParameterFiltersListRedemptions.md
@@ -15,6 +15,7 @@ Name | Type | Description | Notes
**customer_id** | [**ParameterFiltersListRedemptionsCustomerId**](ParameterFiltersListRedemptionsCustomerId.md) | | [optional]
**campaign_name** | [**ParameterFiltersListRedemptionsCampaignName**](ParameterFiltersListRedemptionsCampaignName.md) | | [optional]
**user_login** | [**ParameterFiltersListRedemptionsUserLogin**](ParameterFiltersListRedemptionsUserLogin.md) | | [optional]
+**junction** | [**Junction**](Junction.md) | | [optional]
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
diff --git a/docs/ParameterFiltersListRedemptionsCampaignName.md b/docs/ParameterFiltersListRedemptionsCampaignName.md
index a135fc5c..22fc784c 100644
--- a/docs/ParameterFiltersListRedemptionsCampaignName.md
+++ b/docs/ParameterFiltersListRedemptionsCampaignName.md
@@ -7,7 +7,6 @@ Campaign name.
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**conditions** | [**FilterConditionsString**](FilterConditionsString.md) | | [optional]
-**junction** | [**Junction**](Junction.md) | | [optional]
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
diff --git a/docs/ParameterFiltersListRedemptionsCustomerId.md b/docs/ParameterFiltersListRedemptionsCustomerId.md
index 382d7761..1a2334ff 100644
--- a/docs/ParameterFiltersListRedemptionsCustomerId.md
+++ b/docs/ParameterFiltersListRedemptionsCustomerId.md
@@ -7,7 +7,6 @@ Unique customer ID, i.e. cust_sehkNIi8Uq2qQuRqSr7xn4Zi.
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**conditions** | [**FilterConditionsString**](FilterConditionsString.md) | | [optional]
-**junction** | [**Junction**](Junction.md) | | [optional]
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
diff --git a/docs/ParameterFiltersListRedemptionsFailureCode.md b/docs/ParameterFiltersListRedemptionsFailureCode.md
index 76eee48f..15f418bc 100644
--- a/docs/ParameterFiltersListRedemptionsFailureCode.md
+++ b/docs/ParameterFiltersListRedemptionsFailureCode.md
@@ -7,7 +7,6 @@ Failure code, i.e. quantity_exceeded.
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**conditions** | [**FilterConditionsString**](FilterConditionsString.md) | | [optional]
-**junction** | [**Junction**](Junction.md) | | [optional]
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
diff --git a/docs/ParameterFiltersListRedemptionsObject.md b/docs/ParameterFiltersListRedemptionsObject.md
index 300a54c6..1b33b0e7 100644
--- a/docs/ParameterFiltersListRedemptionsObject.md
+++ b/docs/ParameterFiltersListRedemptionsObject.md
@@ -7,7 +7,6 @@ Specify which type of object to return, i.e. `redemption` or `redemption_rollbac
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**conditions** | [**FilterConditionsString**](FilterConditionsString.md) | | [optional]
-**junction** | [**Junction**](Junction.md) | | [optional]
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
diff --git a/docs/ParameterFiltersListRedemptionsParentRedemptionId.md b/docs/ParameterFiltersListRedemptionsParentRedemptionId.md
index 228f595d..3d2b04ae 100644
--- a/docs/ParameterFiltersListRedemptionsParentRedemptionId.md
+++ b/docs/ParameterFiltersListRedemptionsParentRedemptionId.md
@@ -7,7 +7,6 @@ Unique parent redemption ID, i.e. r_0c5952900bcbfd54b6.
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**conditions** | [**FilterConditionsString**](FilterConditionsString.md) | | [optional]
-**junction** | [**Junction**](Junction.md) | | [optional]
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
diff --git a/docs/ParameterFiltersListRedemptionsRelatedObjectId.md b/docs/ParameterFiltersListRedemptionsRelatedObjectId.md
index a4f7630c..5d8dbedf 100644
--- a/docs/ParameterFiltersListRedemptionsRelatedObjectId.md
+++ b/docs/ParameterFiltersListRedemptionsRelatedObjectId.md
@@ -7,7 +7,6 @@ Unique related object ID, i.e. v_hS8JFl8S6lNcd1L69wLIoXgTio7eWEgk.
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**conditions** | [**FilterConditionsString**](FilterConditionsString.md) | | [optional]
-**junction** | [**Junction**](Junction.md) | | [optional]
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
diff --git a/docs/ParameterFiltersListRedemptionsRelatedObjectParentId.md b/docs/ParameterFiltersListRedemptionsRelatedObjectParentId.md
index 8cdcfcb0..3f4ef223 100644
--- a/docs/ParameterFiltersListRedemptionsRelatedObjectParentId.md
+++ b/docs/ParameterFiltersListRedemptionsRelatedObjectParentId.md
@@ -7,7 +7,6 @@ Unique related object parent ID, i.e. camp_22noMlhTADb7Fq2UL3vWu3d1.
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**conditions** | [**FilterConditionsString**](FilterConditionsString.md) | | [optional]
-**junction** | [**Junction**](Junction.md) | | [optional]
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
diff --git a/docs/ParameterFiltersListRedemptionsResult.md b/docs/ParameterFiltersListRedemptionsResult.md
index 788162b0..4a0d1f9c 100644
--- a/docs/ParameterFiltersListRedemptionsResult.md
+++ b/docs/ParameterFiltersListRedemptionsResult.md
@@ -7,7 +7,6 @@ Result, i.e. `SUCCESS` or `FAILURE`.
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**conditions** | [**FilterConditionsString**](FilterConditionsString.md) | | [optional]
-**junction** | [**Junction**](Junction.md) | | [optional]
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
diff --git a/docs/ParameterFiltersListRedemptionsUserLogin.md b/docs/ParameterFiltersListRedemptionsUserLogin.md
index 3fdb5994..0bc1cf19 100644
--- a/docs/ParameterFiltersListRedemptionsUserLogin.md
+++ b/docs/ParameterFiltersListRedemptionsUserLogin.md
@@ -7,7 +7,6 @@ User login used to login to Voucherify, i.e. name.lastname@email.com
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**conditions** | [**FilterConditionsString**](FilterConditionsString.md) | | [optional]
-**junction** | [**Junction**](Junction.md) | | [optional]
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
diff --git a/docs/ParameterFiltersListRedemptionsVoucherCode.md b/docs/ParameterFiltersListRedemptionsVoucherCode.md
index 922acdb8..aa4f1d55 100644
--- a/docs/ParameterFiltersListRedemptionsVoucherCode.md
+++ b/docs/ParameterFiltersListRedemptionsVoucherCode.md
@@ -7,7 +7,6 @@ Unique voucher code.
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**conditions** | [**FilterConditionsString**](FilterConditionsString.md) | | [optional]
-**junction** | [**Junction**](Junction.md) | | [optional]
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
diff --git a/docs/ParameterFiltersListReferralsRedeemableHolders.md b/docs/ParameterFiltersListReferralsRedeemableHolders.md
new file mode 100644
index 00000000..22a103d6
--- /dev/null
+++ b/docs/ParameterFiltersListReferralsRedeemableHolders.md
@@ -0,0 +1,16 @@
+# ParameterFiltersListReferralsRedeemableHolders
+
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**id** | [**ParameterFiltersListReferralsRedeemableHoldersId**](ParameterFiltersListReferralsRedeemableHoldersId.md) | | [optional]
+**created_at** | [**ParameterFiltersListReferralsRedeemableHoldersCreatedAt**](ParameterFiltersListReferralsRedeemableHoldersCreatedAt.md) | | [optional]
+**holder_role** | [**ParameterFiltersListReferralsRedeemableHoldersHolderRole**](ParameterFiltersListReferralsRedeemableHoldersHolderRole.md) | | [optional]
+**customer_id** | [**ParameterFiltersListReferralsRedeemableHoldersCustomerId**](ParameterFiltersListReferralsRedeemableHoldersCustomerId.md) | | [optional]
+**junction** | [**Junction**](Junction.md) | | [optional]
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/docs/ParameterFiltersListReferralsRedeemableHoldersCampaignId.md b/docs/ParameterFiltersListReferralsRedeemableHoldersCampaignId.md
new file mode 100644
index 00000000..39e06ffe
--- /dev/null
+++ b/docs/ParameterFiltersListReferralsRedeemableHoldersCampaignId.md
@@ -0,0 +1,13 @@
+# ParameterFiltersListReferralsRedeemableHoldersCampaignId
+
+Unique customer ID, i.e. `cust_sehkNIi8Uq2qQuRqSr7xn4Zi`.
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**conditions** | [**FilterConditionsString**](FilterConditionsString.md) | | [optional]
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/docs/ParameterFiltersListReferralsRedeemableHoldersCampaignType.md b/docs/ParameterFiltersListReferralsRedeemableHoldersCampaignType.md
new file mode 100644
index 00000000..8addfa56
--- /dev/null
+++ b/docs/ParameterFiltersListReferralsRedeemableHoldersCampaignType.md
@@ -0,0 +1,13 @@
+# ParameterFiltersListReferralsRedeemableHoldersCampaignType
+
+Type of the campaign. Allowed values: `DISCOUNT_COUPONS`, `REFERRAL_PROGRAM`, `GIFT_VOUCHERS`, `LOYALTY_PROGRAM`
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**conditions** | [**ParameterFiltersListCustomerRedeemablesCampaignTypeConditions**](ParameterFiltersListCustomerRedeemablesCampaignTypeConditions.md) | | [optional]
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/docs/ParameterFiltersListReferralsRedeemableHoldersCreatedAt.md b/docs/ParameterFiltersListReferralsRedeemableHoldersCreatedAt.md
new file mode 100644
index 00000000..6daceab0
--- /dev/null
+++ b/docs/ParameterFiltersListReferralsRedeemableHoldersCreatedAt.md
@@ -0,0 +1,13 @@
+# ParameterFiltersListReferralsRedeemableHoldersCreatedAt
+
+Timestamp representing the date and time when the redeemable was added to the holder. The value is shown in the ISO 8601 format.
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**conditions** | [**FilterConditionsDateTime**](FilterConditionsDateTime.md) | | [optional]
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/docs/ParameterFiltersListReferralsRedeemableHoldersCustomerId.md b/docs/ParameterFiltersListReferralsRedeemableHoldersCustomerId.md
new file mode 100644
index 00000000..730115d7
--- /dev/null
+++ b/docs/ParameterFiltersListReferralsRedeemableHoldersCustomerId.md
@@ -0,0 +1,13 @@
+# ParameterFiltersListReferralsRedeemableHoldersCustomerId
+
+Unique customer ID, i.e. `cust_sehkNIi8Uq2qQuRqSr7xn4Zi`.
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**conditions** | [**FilterConditionsString**](FilterConditionsString.md) | | [optional]
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/docs/ParameterFiltersListReferralsRedeemableHoldersHolderRole.md b/docs/ParameterFiltersListReferralsRedeemableHoldersHolderRole.md
new file mode 100644
index 00000000..60702d5c
--- /dev/null
+++ b/docs/ParameterFiltersListReferralsRedeemableHoldersHolderRole.md
@@ -0,0 +1,13 @@
+# ParameterFiltersListReferralsRedeemableHoldersHolderRole
+
+Holder role of the redeemable. Allowed values: `REFEREE`, `REFERRER`
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**conditions** | [**ParameterFiltersListReferralsRedeemableHoldersHolderRoleConditions**](ParameterFiltersListReferralsRedeemableHoldersHolderRoleConditions.md) | | [optional]
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/docs/ParameterFiltersListReferralsRedeemableHoldersHolderRoleConditions.md b/docs/ParameterFiltersListReferralsRedeemableHoldersHolderRoleConditions.md
new file mode 100644
index 00000000..fca75428
--- /dev/null
+++ b/docs/ParameterFiltersListReferralsRedeemableHoldersHolderRoleConditions.md
@@ -0,0 +1,19 @@
+# ParameterFiltersListReferralsRedeemableHoldersHolderRoleConditions
+
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**var_in** | **List[str]** | Array of resource values that should be included in the results (multiple values). | [optional]
+**not_in** | **List[str]** | Array of resource values that should be included in the results (multiple values). | [optional]
+**var_is** | **str** | Value is exactly this value (single value). | [optional]
+**is_not** | **str** | Results omit this value (single value). | [optional]
+**has_value** | **str** | Value is NOT null. The value for this parameter is an empty string. | [optional]
+**is_unknown** | **str** | Value is null. The value for this parameter is an empty string. | [optional]
+**starts_with** | **str** | Value starts with the specified string. | [optional]
+**ends_with** | **str** | Value ends with the specified string. | [optional]
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/docs/ParameterFiltersListReferralsRedeemableHoldersId.md b/docs/ParameterFiltersListReferralsRedeemableHoldersId.md
new file mode 100644
index 00000000..f5a21221
--- /dev/null
+++ b/docs/ParameterFiltersListReferralsRedeemableHoldersId.md
@@ -0,0 +1,13 @@
+# ParameterFiltersListReferralsRedeemableHoldersId
+
+Unique redeemable holder ID, i.e. `rh_0e77502f84f0f4a6a8`.
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**conditions** | [**FilterConditionsString**](FilterConditionsString.md) | | [optional]
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/docs/ParameterFiltersListReferralsRedeemableHoldersRedeemableId.md b/docs/ParameterFiltersListReferralsRedeemableHoldersRedeemableId.md
new file mode 100644
index 00000000..f15f4df9
--- /dev/null
+++ b/docs/ParameterFiltersListReferralsRedeemableHoldersRedeemableId.md
@@ -0,0 +1,13 @@
+# ParameterFiltersListReferralsRedeemableHoldersRedeemableId
+
+Unique customer ID, i.e. `cust_sehkNIi8Uq2qQuRqSr7xn4Zi`.
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**conditions** | [**FilterConditionsString**](FilterConditionsString.md) | | [optional]
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/docs/ParameterFiltersListReferralsRedeemableHoldersRedeemableObject.md b/docs/ParameterFiltersListReferralsRedeemableHoldersRedeemableObject.md
new file mode 100644
index 00000000..49235950
--- /dev/null
+++ b/docs/ParameterFiltersListReferralsRedeemableHoldersRedeemableObject.md
@@ -0,0 +1,13 @@
+# ParameterFiltersListReferralsRedeemableHoldersRedeemableObject
+
+Unique customer ID, i.e. `cust_sehkNIi8Uq2qQuRqSr7xn4Zi`.
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**conditions** | [**FilterConditionsString**](FilterConditionsString.md) | | [optional]
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/docs/ParameterFiltersListReferralsRedeemableHoldersVoucherType.md b/docs/ParameterFiltersListReferralsRedeemableHoldersVoucherType.md
new file mode 100644
index 00000000..fbb16bc3
--- /dev/null
+++ b/docs/ParameterFiltersListReferralsRedeemableHoldersVoucherType.md
@@ -0,0 +1,13 @@
+# ParameterFiltersListReferralsRedeemableHoldersVoucherType
+
+Type of the voucher. Allowed values: `DISCOUNT_VOUCHER`, `GIFT_VOUCHER`, `LOYALTY_CARD`.
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**conditions** | [**ParameterFiltersListCustomerRedeemablesVoucherTypeConditions**](ParameterFiltersListCustomerRedeemablesVoucherTypeConditions.md) | | [optional]
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/docs/ParameterFiltersListTemplates.md b/docs/ParameterFiltersListTemplates.md
new file mode 100644
index 00000000..5565e8aa
--- /dev/null
+++ b/docs/ParameterFiltersListTemplates.md
@@ -0,0 +1,15 @@
+# ParameterFiltersListTemplates
+
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**junction** | [**Junction**](Junction.md) | | [optional]
+**id** | [**ParameterFiltersListTemplatesId**](ParameterFiltersListTemplatesId.md) | | [optional]
+**name** | [**ParameterFiltersListTemplatesName**](ParameterFiltersListTemplatesName.md) | | [optional]
+**campaign_type** | [**ParameterFiltersListTemplatesCampaignType**](ParameterFiltersListTemplatesCampaignType.md) | | [optional]
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/docs/ParameterFiltersListTemplatesCampaignType.md b/docs/ParameterFiltersListTemplatesCampaignType.md
new file mode 100644
index 00000000..f077a7ce
--- /dev/null
+++ b/docs/ParameterFiltersListTemplatesCampaignType.md
@@ -0,0 +1,13 @@
+# ParameterFiltersListTemplatesCampaignType
+
+Campaign template campaign type.
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**conditions** | [**ParameterFiltersListTemplatesCampaignTypeConditions**](ParameterFiltersListTemplatesCampaignTypeConditions.md) | | [optional]
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/docs/ParameterFiltersListTemplatesCampaignTypeConditions.md b/docs/ParameterFiltersListTemplatesCampaignTypeConditions.md
new file mode 100644
index 00000000..20a9d248
--- /dev/null
+++ b/docs/ParameterFiltersListTemplatesCampaignTypeConditions.md
@@ -0,0 +1,20 @@
+# ParameterFiltersListTemplatesCampaignTypeConditions
+
+Data filters used to narrow down the data records to be returned in the result.
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**var_in** | **List[str]** | Array of resource values that should be included in the results (multiple values). | [optional]
+**not_in** | **List[str]** | Array of resource values that should be included in the results (multiple values). | [optional]
+**var_is** | **str** | Value is exactly this value (single value). | [optional]
+**is_not** | **str** | Results omit this value (single value). | [optional]
+**has_value** | **str** | Value is NOT null. The value for this parameter is an empty string. | [optional]
+**is_unknown** | **str** | Value is null. The value for this parameter is an empty string. | [optional]
+**starts_with** | **str** | Value starts with the specified string. | [optional]
+**ends_with** | **str** | Value ends with the specified string. | [optional]
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/docs/ParameterFiltersListTemplatesId.md b/docs/ParameterFiltersListTemplatesId.md
new file mode 100644
index 00000000..3a6c5d3c
--- /dev/null
+++ b/docs/ParameterFiltersListTemplatesId.md
@@ -0,0 +1,13 @@
+# ParameterFiltersListTemplatesId
+
+Unique template ID.
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**conditions** | [**FilterConditionsString**](FilterConditionsString.md) | | [optional]
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/docs/ParameterFiltersListTemplatesName.md b/docs/ParameterFiltersListTemplatesName.md
new file mode 100644
index 00000000..c9353e9b
--- /dev/null
+++ b/docs/ParameterFiltersListTemplatesName.md
@@ -0,0 +1,13 @@
+# ParameterFiltersListTemplatesName
+
+Unique user-defined template name.
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**conditions** | [**FilterConditionsString**](FilterConditionsString.md) | | [optional]
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/docs/ParameterOrderListBin.md b/docs/ParameterOrderListBin.md
new file mode 100644
index 00000000..1bbc1b72
--- /dev/null
+++ b/docs/ParameterOrderListBin.md
@@ -0,0 +1,12 @@
+# ParameterOrderListBin
+
+
+## Enum
+
+* `ID` (value: `'id'`)
+
+* `MINUS_ID` (value: `'-id'`)
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/docs/ParameterOrderListLocations.md b/docs/ParameterOrderListLocations.md
new file mode 100644
index 00000000..dc6208a7
--- /dev/null
+++ b/docs/ParameterOrderListLocations.md
@@ -0,0 +1,16 @@
+# ParameterOrderListLocations
+
+
+## Enum
+
+* `CREATED_AT` (value: `'created_at'`)
+
+* `MINUS_CREATED_AT` (value: `'-created_at'`)
+
+* `UPDATED_AT` (value: `'updated_at'`)
+
+* `MINUS_UPDATED_AT` (value: `'-updated_at'`)
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/docs/ParameterTemplatesList.md b/docs/ParameterTemplatesList.md
new file mode 100644
index 00000000..133a1ba7
--- /dev/null
+++ b/docs/ParameterTemplatesList.md
@@ -0,0 +1,12 @@
+# ParameterTemplatesList
+
+
+## Enum
+
+* `ID` (value: `'id'`)
+
+* `MINUS_ID` (value: `'-id'`)
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/docs/ParameterVoucherTypeListPublications.md b/docs/ParameterVoucherTypeListPublications.md
index 47f46c4e..f4d62746 100644
--- a/docs/ParameterVoucherTypeListPublications.md
+++ b/docs/ParameterVoucherTypeListPublications.md
@@ -7,8 +7,6 @@
* `LOYALTY` (value: `'loyalty'`)
-* `LUCKY_DRAW` (value: `'lucky_draw'`)
-
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
diff --git a/docs/ProductCollectionsCreateRequestBody.md b/docs/ProductCollectionsCreateRequestBody.md
index 545c00f8..134fbde2 100644
--- a/docs/ProductCollectionsCreateRequestBody.md
+++ b/docs/ProductCollectionsCreateRequestBody.md
@@ -8,7 +8,7 @@ Name | Type | Description | Notes
**type** | **str** | Show that the product collection is static (manually selected products). | [optional] [default to 'STATIC']
**name** | **str** | Unique user-defined product collection name. | [optional]
**products** | [**List[ProductCollectionsCreateRequestBodyProductsItem]**](ProductCollectionsCreateRequestBodyProductsItem.md) | Defines a set of products for a `STATIC` product collection type. | [optional]
-**filter** | [**ProductCollectionsCreateRequestBodyFilter**](ProductCollectionsCreateRequestBodyFilter.md) | | [optional]
+**filter** | **object** | Defines a set of criteria and boundary conditions for an `AUTO_UPDATE` product collection type. | [optional]
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
diff --git a/docs/ProductCollectionsCreateResponseBody.md b/docs/ProductCollectionsCreateResponseBody.md
index 06a9ef6f..26b8c5ff 100644
--- a/docs/ProductCollectionsCreateResponseBody.md
+++ b/docs/ProductCollectionsCreateResponseBody.md
@@ -9,7 +9,7 @@ Name | Type | Description | Notes
**id** | **str** | Product collection ID. | [optional]
**name** | **str** | Unique user-defined product collection name. | [optional]
**type** | **str** | Describes whether the product collection is dynamic (products come in and leave based on set criteria) or static (manually selected products). | [optional]
-**filter** | [**ProductCollectionsCreateResponseBodyFilter**](ProductCollectionsCreateResponseBodyFilter.md) | | [optional]
+**filter** | **object** | Defines a set of criteria and boundary conditions for an `AUTO_UPDATE` product collection type. | [optional]
**products** | [**List[ProductCollectionsCreateResponseBodyProductsItem]**](ProductCollectionsCreateResponseBodyProductsItem.md) | Defines a set of products for a `STATIC` product collection type. | [optional]
**created_at** | **datetime** | Timestamp representing the date and time when the product collection was created. The value is shown in the ISO 8601 format. | [optional]
**object** | **str** | The type of the object represented by JSON. This object stores information about the static product collection. | [optional] [default to 'products_collection']
diff --git a/docs/ProductCollectionsGetResponseBody.md b/docs/ProductCollectionsGetResponseBody.md
index 10e2018d..b3b8e5a7 100644
--- a/docs/ProductCollectionsGetResponseBody.md
+++ b/docs/ProductCollectionsGetResponseBody.md
@@ -9,7 +9,7 @@ Name | Type | Description | Notes
**id** | **str** | Product collection ID. | [optional]
**name** | **str** | Unique user-defined product collection name. | [optional]
**type** | **str** | Describes whether the product collection is dynamic (products come in and leave based on set criteria) or static (manually selected products). | [optional]
-**filter** | [**ProductCollectionsGetResponseBodyFilter**](ProductCollectionsGetResponseBodyFilter.md) | | [optional]
+**filter** | **object** | Defines a set of criteria and boundary conditions for an `AUTO_UPDATE` product collection type. | [optional]
**products** | [**List[ProductCollectionsGetResponseBodyProductsItem]**](ProductCollectionsGetResponseBodyProductsItem.md) | Defines a set of products for a `STATIC` product collection type. | [optional]
**created_at** | **datetime** | Timestamp representing the date and time when the product collection was created. The value is shown in the ISO 8601 format. | [optional]
**object** | **str** | The type of the object represented by JSON. This object stores information about the static product collection. | [optional] [default to 'products_collection']
diff --git a/docs/ProductCollectionsItem.md b/docs/ProductCollectionsItem.md
index a63357ff..4e40e29c 100644
--- a/docs/ProductCollectionsItem.md
+++ b/docs/ProductCollectionsItem.md
@@ -9,7 +9,7 @@ Name | Type | Description | Notes
**id** | **str** | Product collection ID. | [optional]
**name** | **str** | Unique user-defined product collection name. | [optional]
**type** | **str** | Describes whether the product collection is dynamic (products come in and leave based on set criteria) or static (manually selected products). | [optional]
-**filter** | [**ProductCollectionsItemFilter**](ProductCollectionsItemFilter.md) | | [optional]
+**filter** | **object** | Defines a set of criteria and boundary conditions for an `AUTO_UPDATE` product collection type. | [optional]
**products** | [**List[ProductCollectionsItemProductsItem]**](ProductCollectionsItemProductsItem.md) | Defines a set of products for a `STATIC` product collection type. | [optional]
**created_at** | **datetime** | Timestamp representing the date and time when the product collection was created. The value is shown in the ISO 8601 format. | [optional]
**object** | **str** | The type of the object represented by JSON. This object stores information about the static product collection. | [optional] [default to 'products_collection']
diff --git a/docs/ProductsApi.md b/docs/ProductsApi.md
index 94e09385..59c89b3e 100644
--- a/docs/ProductsApi.md
+++ b/docs/ProductsApi.md
@@ -998,7 +998,7 @@ Name | Type | Description | Notes
Update Products in Bulk
-Update products in one asynchronous operation. The request can include up to **10 MB** of data. The response returns a unique asynchronous action ID. Use this ID in the query paramater of the GET Async Action endpoint to check, e.g.: - The status of your request (in queue, in progress, done, or failed) - Resources that failed to be updated - The report file with details about the update If a product object is not found, it is **upserted**. This is shown in the report file in the GET Async Action endpoint. The upserted resources have value false in the found column and true in the updated column. This API request starts a process that affects Voucherify data in bulk. In the case of small jobs (like bulk update), the request is put into a queue and processed when every other bulk request placed in the queue prior to this request is finished.
+Update products in one asynchronous operation. The request can include up to **10 MB** of data. The response returns a unique asynchronous action ID. Use this ID in the query paramater of the GET Async Action endpoint to check, e.g.: - The status of your request (in queue, in progress, done, or failed) - Resources that failed to be updated - The report file with details about the update If a product object is not found, it is **upserted**. This is shown in the report file in the **GET** Async Action endpoint. The upserted resources have value false in the found column and true in the updated column. This API request starts a process that affects Voucherify data in bulk. In the case of small jobs (like bulk update), the request is put into a queue and processed when every other bulk request placed in the queue prior to this request is finished.
### Example
@@ -1085,7 +1085,7 @@ Name | Type | Description | Notes
Update Products' Metadata in Bulk
-Updates metadata parameters for a list of products. Every resource in the list will receive the metadata defined in the request. The request can include up to **10 MB** of data. The response returns a unique asynchronous action ID. Use this ID in the query paramater of the GET Async Action endpoint to check, e.g.: - The status of your request (in queue, in progress, done, or failed) - Resources that failed to be updated - The report file with details about the update If a product object is not found, it is **upserted**. This is shown in the report file in the GET Async Action endpoint. The upserted resources have value false in the found column and true in the updated column. This API request starts a process that affects Voucherify data in bulk. In the case of small jobs (like bulk update), the request is put into a queue and processed when every other bulk request placed in the queue prior to this request is finished.
+Updates metadata parameters for a list of products. Every resource in the list will receive the metadata defined in the request. The request can include up to **10 MB** of data. The response returns a unique asynchronous action ID. Use this ID in the query paramater of the GET Async Action endpoint to check, e.g.: - The status of your request (in queue, in progress, done, or failed) - Resources that failed to be updated - The report file with details about the update If a product object is not found, it is **upserted**. This is shown in the report file in the **GET** Async Action endpoint. The upserted resources have value false in the found column and true in the updated column. This API request starts a process that affects Voucherify data in bulk. In the case of small jobs (like bulk update), the request is put into a queue and processed when every other bulk request placed in the queue prior to this request is finished.
### Example
diff --git a/docs/PromotionsStacksUpdateRequestBodyTiers.md b/docs/PromotionsStacksUpdateRequestBodyTiers.md
index 0ae3005e..e515ec9c 100644
--- a/docs/PromotionsStacksUpdateRequestBodyTiers.md
+++ b/docs/PromotionsStacksUpdateRequestBodyTiers.md
@@ -7,7 +7,7 @@ Contains the tier configuration. A promotion stack can include up to 30 tiers.
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**ids** | **List[str]** | Contains the list of tiers in a pre-defined sequence. | [optional]
-**hierarchy_mode** | **str** | Category hierarchy. | [optional] [default to 'MANUAL']
+**hierarchy_mode** | **str** | Category hierarchy. Categories with lower hierarchy are processed before categories with higher hierarchy value. | [optional] [default to 'MANUAL']
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
diff --git a/docs/PromotionsTiersCreateRequestBody.md b/docs/PromotionsTiersCreateRequestBody.md
index 3d00378b..b9f1ce89 100644
--- a/docs/PromotionsTiersCreateRequestBody.md
+++ b/docs/PromotionsTiersCreateRequestBody.md
@@ -8,7 +8,6 @@ Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**name** | **str** | Name of the promotion tier. | [optional]
**banner** | **str** | Text to be displayed to your customers on your website. | [optional]
-**action** | [**PromotionsTiersCreateRequestBodyAction**](PromotionsTiersCreateRequestBodyAction.md) | | [optional]
**metadata** | **object** | The metadata object stores all custom attributes assigned to the promotion tier. A set of key/value pairs that you can attach to a promotion tier object. It can be useful for storing additional information about the promotion tier in a structured format. | [optional]
**hierarchy** | **int** | The promotions hierarchy defines the order in which the discounts from different tiers will be applied to a customer's order. If a customer qualifies for discounts from more than one tier, discounts will be applied in the order defined in the hierarchy. | [optional]
**active** | **bool** | A flag to toggle the promotion tier on or off. You can disable a promotion tier even though it's within the active period defined by the `start_date` and `expiration_date`. - `true` indicates an *active* promotion tier - `false` indicates an *inactive* promotion tier | [optional]
@@ -17,9 +16,10 @@ Name | Type | Description | Notes
**validity_timeframe** | [**ValidityTimeframe**](ValidityTimeframe.md) | | [optional]
**validity_day_of_week** | **List[int]** | Integer array corresponding to the particular days of the week in which the voucher is valid. - `0` Sunday - `1` Monday - `2` Tuesday - `3` Wednesday - `4` Thursday - `5` Friday - `6` Saturday | [optional]
**validity_hours** | [**ValidityHours**](ValidityHours.md) | | [optional]
-**validation_rule_assignments** | [**ValidationRuleAssignmentsList**](ValidationRuleAssignmentsList.md) | | [optional]
**category** | **str** | Assign a new or update the promotion tier's category using name. | [optional]
**category_id** | **str** | Assign a new or update the promotion tier's category using id | [optional]
+**action** | [**PromotionsTiersCreateRequestBodyAction**](PromotionsTiersCreateRequestBodyAction.md) | | [optional]
+**validation_rule_assignments** | [**ValidationRuleAssignmentsList**](ValidationRuleAssignmentsList.md) | | [optional]
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
diff --git a/docs/PublicationsApi.md b/docs/PublicationsApi.md
index 00830333..e97054c8 100644
--- a/docs/PublicationsApi.md
+++ b/docs/PublicationsApi.md
@@ -210,6 +210,7 @@ Retrieve a list of publications. To return a **particular** publication, you can
```python
import voucherify
+from voucherify.models.parameter_filters_list_publications import ParameterFiltersListPublications
from voucherify.models.parameter_order_list_publications import ParameterOrderListPublications
from voucherify.models.parameter_result_list_publications import ParameterResultListPublications
from voucherify.models.parameter_voucher_type_list_publications import ParameterVoucherTypeListPublications
@@ -253,7 +254,7 @@ with voucherify.ApiClient(configuration) as api_client:
result = voucherify.ParameterResultListPublications() # ParameterResultListPublications | Filters by a publication result. (optional)
voucher_type = voucherify.ParameterVoucherTypeListPublications() # ParameterVoucherTypeListPublications | Filters by a voucher type. (optional)
is_referral_code = True # bool | This filter works only for the true option. If set to true, the query returns only publications of codes from referral campaigns. (optional)
- filters = 'filters_example' # str | Allows for combining the filters mentioned in the endpoint description. (optional)
+ filters = voucherify.ParameterFiltersListPublications() # ParameterFiltersListPublications | Filters for listing publications. (optional)
source_id = 'source_id_example' # str | Using this endpoint with a particular publication source_id, which was sent with the original request to create a publication, returns in the response, exactly the same code published initially because the code was assigned to the given publication. As a result, you can use this endpoint as a reference and return a code that was assigned in a publication by using a particular source_id. (optional)
try:
@@ -281,7 +282,7 @@ Name | Type | Description | Notes
**result** | [**ParameterResultListPublications**](.md)| Filters by a publication result. | [optional]
**voucher_type** | [**ParameterVoucherTypeListPublications**](.md)| Filters by a voucher type. | [optional]
**is_referral_code** | **bool**| This filter works only for the true option. If set to true, the query returns only publications of codes from referral campaigns. | [optional]
- **filters** | **str**| Allows for combining the filters mentioned in the endpoint description. | [optional]
+ **filters** | [**ParameterFiltersListPublications**](.md)| Filters for listing publications. | [optional]
**source_id** | **str**| Using this endpoint with a particular publication source_id, which was sent with the original request to create a publication, returns in the response, exactly the same code published initially because the code was assigned to the given publication. As a result, you can use this endpoint as a reference and return a code that was assigned in a publication by using a particular source_id. | [optional]
### Return type
diff --git a/docs/PublicationsCreateRequestBody.md b/docs/PublicationsCreateRequestBody.md
index eee25785..ba91d38b 100644
--- a/docs/PublicationsCreateRequestBody.md
+++ b/docs/PublicationsCreateRequestBody.md
@@ -7,7 +7,7 @@ Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**voucher** | **str** | Code of the voucher being published. | [optional]
**source_id** | **str** | The merchant's publication ID if it is different from the Voucherify publication ID. It's an optional tracking identifier of a publication. It is really useful in case of an integration between multiple systems. It can be a publication ID from a CRM system, database or 3rd-party service. If `source_id` is provided only 1 voucher can be published per request. | [optional]
-**customer** | [**PublicationsCreateRequestBodyCustomer**](PublicationsCreateRequestBodyCustomer.md) | | [optional]
+**customer** | [**Customer**](Customer.md) | | [optional]
**metadata** | **object** | | [optional]
**channel** | **str** | Specify the distribution channel. | [optional]
**campaign** | [**CreatePublicationCampaign**](CreatePublicationCampaign.md) | | [optional]
diff --git a/docs/QualificationsOption.md b/docs/QualificationsOption.md
index 26995bc2..f7baf343 100644
--- a/docs/QualificationsOption.md
+++ b/docs/QualificationsOption.md
@@ -9,7 +9,7 @@ Name | Type | Description | Notes
**limit** | **int** | The maximum number of redeemables to be returned in the API request. The actual number of returned redeemables will be determined by the API. The default value is set to 5 | [optional]
**starting_after** | **datetime** | Cursor used for paging. | [optional]
**filters** | [**QualificationsOptionFilters**](QualificationsOptionFilters.md) | | [optional]
-**expand** | **List[str]** | The expand array lets you configure the parameters included in the response. Depending on the strings included in the array, the response will contain different details. | **Expand Option** | **Response Body** | |:---|:---| | [\"redeemable\"] | - Returns the redeemables' metadata. | | [\"category\"] | - Returns an expanded `categories` object, showing details about the category. | | [\"validation_rules\"] | - Returns an expanded `validation_rules` object, showing details about the validation rules. | | [optional]
+**expand** | **List[str]** | The expand array lets you configure the parameters included in the response. Depending on the strings included in the array, the response will contain different details. | **Expand Option** | **Response Body** | |:---|:---| | [`\"redeemable\"`] | Returns the redeemables':<br>- metadata<br>- redeemable name,<br>- campaign name,<br>- campaign ID| | [`\"category\"`] | - Returns an expanded `categories` object, showing details about the category. | | [`\"validation_rules\"`] | - Returns an expanded `validation_rules` object, showing details about the validation rules. | | [optional]
**sorting_rule** | **str** | Is used to determine the order in which data is displayed in the result array. - `DEFAULT` - Sorting descending by `created_at` - `BEST_DEAL` - Sorting descending by `total_applied_discount_amount` - `LEAST_DEAL` - Sorting ascending by `total_applied_discount_amount` | [optional]
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
diff --git a/docs/QualificationsRedeemable.md b/docs/QualificationsRedeemable.md
index 91f91236..4a79c0b9 100644
--- a/docs/QualificationsRedeemable.md
+++ b/docs/QualificationsRedeemable.md
@@ -14,7 +14,7 @@ Name | Type | Description | Notes
**applicable_to** | [**ApplicableToResultList**](ApplicableToResultList.md) | | [optional]
**inapplicable_to** | [**InapplicableToResultList**](InapplicableToResultList.md) | | [optional]
**metadata** | **object** | The metadata object stores all custom attributes assigned to the product. A set of key/value pairs that you can attach to a product object. It can be useful for storing additional information about the product in a structured format. | [optional]
-**categories** | [**List[Category]**](Category.md) | List of category information. | [optional]
+**categories** | [**List[CategoryWithStackingRulesType]**](CategoryWithStackingRulesType.md) | List of category information. | [optional]
**banner** | **str** | Name of the earning rule. This is displayed as a header for the earning rule in the Dashboard. | [optional]
**name** | **str** | Name of the redeemable. | [optional]
**campaign_name** | **str** | Name of the campaign associated to the redeemable. This field is available only if object is not `campaign` | [optional]
diff --git a/docs/QualificationsRedeemableBase.md b/docs/QualificationsRedeemableBase.md
index 5de268e9..9260ad83 100644
--- a/docs/QualificationsRedeemableBase.md
+++ b/docs/QualificationsRedeemableBase.md
@@ -15,7 +15,7 @@ Name | Type | Description | Notes
**applicable_to** | [**ApplicableToResultList**](ApplicableToResultList.md) | | [optional]
**inapplicable_to** | [**InapplicableToResultList**](InapplicableToResultList.md) | | [optional]
**metadata** | **object** | The metadata object stores all custom attributes assigned to the product. A set of key/value pairs that you can attach to a product object. It can be useful for storing additional information about the product in a structured format. | [optional]
-**categories** | [**List[Category]**](Category.md) | List of category information. | [optional]
+**categories** | [**List[CategoryWithStackingRulesType]**](CategoryWithStackingRulesType.md) | List of category information. | [optional]
**banner** | **str** | Name of the earning rule. This is displayed as a header for the earning rule in the Dashboard. | [optional]
**name** | **str** | Name of the redeemable. | [optional]
**campaign_name** | **str** | Name of the campaign associated to the redeemable. This field is available only if object is not `campaign` | [optional]
diff --git a/docs/RedeemableHolder.md b/docs/RedeemableHolder.md
new file mode 100644
index 00000000..af40beae
--- /dev/null
+++ b/docs/RedeemableHolder.md
@@ -0,0 +1,23 @@
+# RedeemableHolder
+
+Single customer's redeemable
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**id** | **str** | Unique identifier of the redeemable holder. | [optional]
+**created_at** | **datetime** | Timestamp representing the date and time when the redeemable was assigned. The value is shown in the ISO 8601 format. | [optional]
+**redeemable_id** | **str** | Identifier of the redeemable item. | [optional]
+**redeemable_object** | **str** | Type of the redeemable. | [optional]
+**customer_id** | **str** | Unique identifier of the customer. | [optional]
+**holder_role** | **str** | Role of the holder. | [optional]
+**campaign_id** | **str** | Unique identifier of the campaign as assigned by Voucherify. | [optional]
+**campaign_type** | **str** | Defines the type of the campaign. | [optional] [default to 'REFERRAL_PROGRAM']
+**voucher_type** | **str** | Defines the type of the voucher. | [optional]
+**metadata** | **object** | A set of custom key/value pairs that you can attach to a redeemable holder. The metadata object stores all custom attributes assigned to the `redeemable_holder` object. | [optional]
+**object** | **str** | The type of the object represented by JSON. | [optional] [default to 'redeemable_holder']
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/docs/RedeemableVoucherPublish.md b/docs/RedeemableVoucherPublish.md
index 6bd62f31..28ba6f5f 100644
--- a/docs/RedeemableVoucherPublish.md
+++ b/docs/RedeemableVoucherPublish.md
@@ -8,7 +8,7 @@ Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**object** | **str** | The type of the object represented is by default `list`. To get this list, you need to make a call to the endpoint returned in the `url` attribute. | [optional] [default to 'list']
**count** | **int** | Publication events counter. | [optional]
-**url** | **str** | The endpoint where this list of publications can be accessed using a GET method. `/v1/vouchers/{voucher_code}/publications` | [optional]
+**url** | **str** | The endpoint where this list of publications can be accessed using a **GET** method. `/v1/vouchers/{voucher_code}/publications` | [optional]
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
diff --git a/docs/RedeemableVoucherRedemption.md b/docs/RedeemableVoucherRedemption.md
index b3fdb9a8..2e6a36db 100644
--- a/docs/RedeemableVoucherRedemption.md
+++ b/docs/RedeemableVoucherRedemption.md
@@ -10,7 +10,7 @@ Name | Type | Description | Notes
**redeemed_quantity** | **int** | How many times a voucher has already been redeemed. | [optional]
**redeemed_points** | **int** | Total loyalty points redeemed. | [optional]
**object** | **str** | The type of the object represented is by default `list`. To get this list, you need to make a call to the endpoint returned in the url attribute. | [optional] [default to 'list']
-**url** | **str** | The endpoint where this list of redemptions can be accessed using a GET method. `/v1/vouchers/{voucher_code}/redemptions` | [optional]
+**url** | **str** | The endpoint where this list of redemptions can be accessed using a **GET** method. `/v1/vouchers/{voucher_code}/redemptions` | [optional]
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
diff --git a/docs/Redemption.md b/docs/Redemption.md
index 5d3d0381..1c6c3b27 100644
--- a/docs/Redemption.md
+++ b/docs/Redemption.md
@@ -1,6 +1,6 @@
# Redemption
-This is an object representing a redemption.
+This is an object representing a redemption for **POST** `v1/redemptions` and **POST** `/client/v1/redemptions`.
## Properties
@@ -24,11 +24,11 @@ Name | Type | Description | Notes
**customer** | [**SimpleCustomer**](SimpleCustomer.md) | | [optional]
**related_object_type** | **str** | Defines the related object. | [optional]
**related_object_id** | **str** | Unique related object ID assigned by Voucherify, i.e. v_lfZi4rcEGe0sN9gmnj40bzwK2FH6QUno for a voucher. | [optional]
-**voucher** | [**RedemptionVoucher**](RedemptionVoucher.md) | | [optional]
**promotion_tier** | [**PromotionTier**](PromotionTier.md) | | [optional]
**reward** | [**RedemptionRewardResult**](RedemptionRewardResult.md) | | [optional]
**gift** | [**RedemptionGift**](RedemptionGift.md) | | [optional]
**loyalty_card** | [**RedemptionLoyaltyCard**](RedemptionLoyaltyCard.md) | | [optional]
+**voucher** | [**RedemptionVoucher**](RedemptionVoucher.md) | | [optional]
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
diff --git a/docs/RedemptionChannel.md b/docs/RedemptionChannel.md
index 2864120e..e4db7cab 100644
--- a/docs/RedemptionChannel.md
+++ b/docs/RedemptionChannel.md
@@ -6,8 +6,8 @@ Defines the details of the channel through which the redemption was issued.
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
-**channel_id** | **str** | Unique channel ID of the user performing the redemption. This is either a user ID from a user using the Voucherify Dashboard or an X-APP-Id of a user using the API. | [optional]
-**channel_type** | **str** | The source of the channel for the redemption. A `USER` corresponds to the Voucherify Dashboard and an `API` corresponds to the API. | [optional]
+**channel_id** | **str** | Unique channel ID of the user performing the redemption. This is either a user ID from a user using the Voucherify Dashboard or an X-APP-Id of a user using the API. For `AUTO_REDEEM`, it is the reward assignment ID. | [optional]
+**channel_type** | **str** | The source of the channel for the redemption. A `USER` corresponds to the Voucherify Dashboard, `API` corresponds to the API, and `AUTO_REDEEM` corresponds to a loyalty campaign reward that has been redeemed automatically. | [optional]
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
diff --git a/docs/RedemptionEntry.md b/docs/RedemptionEntry.md
index 3a951adf..5788ccfd 100644
--- a/docs/RedemptionEntry.md
+++ b/docs/RedemptionEntry.md
@@ -23,11 +23,11 @@ Name | Type | Description | Notes
**customer** | [**RedemptionEntryCustomer**](RedemptionEntryCustomer.md) | | [optional]
**related_object_type** | **str** | Defines the related object. | [optional]
**related_object_id** | **str** | | [optional]
-**voucher** | [**RedemptionEntryVoucher**](RedemptionEntryVoucher.md) | | [optional]
**promotion_tier** | [**RedemptionEntryPromotionTier**](RedemptionEntryPromotionTier.md) | | [optional]
**reward** | [**RedemptionRewardResult**](RedemptionRewardResult.md) | | [optional]
**gift** | [**RedemptionEntryGift**](RedemptionEntryGift.md) | | [optional]
**loyalty_card** | [**RedemptionEntryLoyaltyCard**](RedemptionEntryLoyaltyCard.md) | | [optional]
+**voucher** | [**RedemptionEntryVoucher**](RedemptionEntryVoucher.md) | | [optional]
**reason** | **str** | System generated cause for the redemption being invalid in the context of the provided parameters. | [optional]
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
diff --git a/docs/RedemptionEntryChannel.md b/docs/RedemptionEntryChannel.md
index 717537f0..68f2b310 100644
--- a/docs/RedemptionEntryChannel.md
+++ b/docs/RedemptionEntryChannel.md
@@ -6,7 +6,7 @@
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**channel_id** | **str** | | [optional]
-**channel_type** | **str** | The source of the channel for the redemption. A `USER` corresponds to the Voucherify Dashboard and an `API` corresponds to the API. | [optional]
+**channel_type** | **str** | | [optional]
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
diff --git a/docs/RedemptionEntryOrder.md b/docs/RedemptionEntryOrder.md
index 71f41189..958abd6f 100644
--- a/docs/RedemptionEntryOrder.md
+++ b/docs/RedemptionEntryOrder.md
@@ -17,7 +17,7 @@ Name | Type | Description | Notes
**applied_discount_amount** | **int** | This field shows the order-level discount applied. | [optional]
**items_applied_discount_amount** | **int** | Sum of all product-specific discounts applied in a particular request. `sum(items, i => i.applied_discount_amount)` | [optional]
**total_applied_discount_amount** | **int** | Sum of all order-level AND all product-specific discounts applied in a particular request. `total_applied_discount_amount` = `applied_discount_amount` + `items_applied_discount_amount` | [optional]
-**items** | [**List[OrderCalculatedItem]**](OrderCalculatedItem.md) | Array of items applied to the order. | [optional]
+**items** | [**List[OrderCalculatedItem]**](OrderCalculatedItem.md) | Array of items applied to the order. It can include up 500 items. | [optional]
**metadata** | **object** | | [optional]
**object** | **str** | The type of the object represented by JSON. | [optional] [default to 'order']
**created_at** | **datetime** | Timestamp representing the date and time when the order was created. The value is shown in the ISO 8601 format. | [optional]
diff --git a/docs/RedemptionEntryVoucherPublish.md b/docs/RedemptionEntryVoucherPublish.md
index c0a346d5..94b7ce18 100644
--- a/docs/RedemptionEntryVoucherPublish.md
+++ b/docs/RedemptionEntryVoucherPublish.md
@@ -7,7 +7,7 @@ Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**object** | **str** | The type of the object represented is by default `list`. To get this list, you need to make a call to the endpoint returned in the `url` attribute. | [optional] [default to 'list']
**count** | **int** | Publication events counter. | [optional]
-**url** | **str** | The endpoint where this list of publications can be accessed using a GET method. `/v1/vouchers/{voucher_code}/publications` | [optional]
+**url** | **str** | The endpoint where this list of publications can be accessed using a **GET** method. `/v1/vouchers/{voucher_code}/publications` | [optional]
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
diff --git a/docs/RedemptionEntryVoucherRedemption.md b/docs/RedemptionEntryVoucherRedemption.md
index f4adbfd2..f2fd4a35 100644
--- a/docs/RedemptionEntryVoucherRedemption.md
+++ b/docs/RedemptionEntryVoucherRedemption.md
@@ -9,7 +9,7 @@ Name | Type | Description | Notes
**redeemed_quantity** | **int** | How many times a voucher has already been redeemed. | [optional]
**redeemed_points** | **int** | Total loyalty points redeemed. | [optional]
**object** | **str** | The type of the object represented is by default `list`. To get this list, you need to make a call to the endpoint returned in the url attribute. | [optional] [default to 'list']
-**url** | **str** | The endpoint where this list of redemptions can be accessed using a GET method. `/v1/vouchers/{voucher_code}/redemptions` | [optional]
+**url** | **str** | The endpoint where this list of redemptions can be accessed using a **GET** method. `/v1/vouchers/{voucher_code}/redemptions` | [optional]
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
diff --git a/docs/RedemptionRedeem.md b/docs/RedemptionRedeem.md
new file mode 100644
index 00000000..50c237e9
--- /dev/null
+++ b/docs/RedemptionRedeem.md
@@ -0,0 +1,35 @@
+# RedemptionRedeem
+
+This is an object representing a redemption for **POST** `v1/redemptions`, **POST** `v1/loyalties/{campaignId}/members/{memberId}/redemption`, **POST** `v1/loyalties/members/{memberId}/redemption`, **POST** `/client/v1/redemptions`.
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**id** | **str** | Unique redemption ID. | [optional]
+**object** | **str** | The type of the object represented by the JSON | [optional] [default to 'redemption']
+**var_date** | **datetime** | Timestamp representing the date and time when the object was created. The value is shown in the ISO 8601 format. | [optional]
+**customer_id** | **str** | Unique customer ID of the redeeming customer. | [optional]
+**tracking_id** | **str** | Hashed customer source ID. | [optional]
+**metadata** | **object** | The metadata object stores all custom attributes assigned to the redemption. | [optional]
+**amount** | **int** | For gift cards, this is a positive integer in the smallest currency unit (e.g. 100 cents for $1.00) representing the number of redeemed credits. For loyalty cards, this is the number of loyalty points used in the transaction. | [optional]
+**redemption** | **str** | Unique redemption ID of the parent redemption. | [optional]
+**result** | **str** | Redemption result. | [optional]
+**status** | **str** | Redemption status. | [optional]
+**related_redemptions** | [**RedemptionRedeemRelatedRedemptions**](RedemptionRedeemRelatedRedemptions.md) | | [optional]
+**failure_code** | **str** | If the result is `FAILURE`, this parameter will provide a generic reason as to why the redemption failed. | [optional]
+**failure_message** | **str** | If the result is `FAILURE`, this parameter will provide a more expanded reason as to why the redemption failed. | [optional]
+**order** | [**OrderCalculated**](OrderCalculated.md) | | [optional]
+**channel** | [**RedemptionRedeemChannel**](RedemptionRedeemChannel.md) | | [optional]
+**customer** | [**SimpleCustomer**](SimpleCustomer.md) | | [optional]
+**related_object_type** | **str** | Defines the related object. | [optional]
+**related_object_id** | **str** | Unique related object ID assigned by Voucherify, i.e. v_lfZi4rcEGe0sN9gmnj40bzwK2FH6QUno for a voucher. | [optional]
+**promotion_tier** | [**PromotionTier**](PromotionTier.md) | | [optional]
+**reward** | [**RedemptionRewardResult**](RedemptionRewardResult.md) | | [optional]
+**gift** | [**RedemptionRedeemGift**](RedemptionRedeemGift.md) | | [optional]
+**loyalty_card** | [**RedemptionRedeemLoyaltyCard**](RedemptionRedeemLoyaltyCard.md) | | [optional]
+**voucher** | [**RedemptionRedeemVoucher**](RedemptionRedeemVoucher.md) | | [optional]
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/docs/RedemptionRedeemChannel.md b/docs/RedemptionRedeemChannel.md
new file mode 100644
index 00000000..84b8da1e
--- /dev/null
+++ b/docs/RedemptionRedeemChannel.md
@@ -0,0 +1,14 @@
+# RedemptionRedeemChannel
+
+Defines the details of the channel through which the redemption was issued.
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**channel_id** | **str** | Unique channel ID of the user performing the redemption. This is either a user ID from a user using the Voucherify Dashboard or an X-APP-Id of a user using the API. | [optional]
+**channel_type** | **str** | The source of the channel for the redemption. A `USER` corresponds to the Voucherify Dashboard and an `API` corresponds to the API. | [optional]
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/docs/RedemptionRedeemGift.md b/docs/RedemptionRedeemGift.md
new file mode 100644
index 00000000..333776ad
--- /dev/null
+++ b/docs/RedemptionRedeemGift.md
@@ -0,0 +1,13 @@
+# RedemptionRedeemGift
+
+Contains the amount subtracted from the gift card for the redemption.
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**amount** | **int** | Amount subtracted from the gift card as a result of the redemption. The amount is expressed as the smallest currency unit (e.g. 100 cents for $1.00). | [optional]
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/docs/RedemptionRedeemLoyaltyCard.md b/docs/RedemptionRedeemLoyaltyCard.md
new file mode 100644
index 00000000..84e2b931
--- /dev/null
+++ b/docs/RedemptionRedeemLoyaltyCard.md
@@ -0,0 +1,13 @@
+# RedemptionRedeemLoyaltyCard
+
+Contains the number of points subtracted from the loyalty card for the redemption.
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**points** | **int** | Number of points subtracted from the loyalty card as a result of the redemption. | [optional]
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/docs/RedemptionRedeemRelatedRedemptions.md b/docs/RedemptionRedeemRelatedRedemptions.md
new file mode 100644
index 00000000..c6f20463
--- /dev/null
+++ b/docs/RedemptionRedeemRelatedRedemptions.md
@@ -0,0 +1,13 @@
+# RedemptionRedeemRelatedRedemptions
+
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**rollbacks** | [**List[RedemptionRedeemRelatedRedemptionsRollbacksItem]**](RedemptionRedeemRelatedRedemptionsRollbacksItem.md) | | [optional]
+**redemptions** | [**List[RedemptionRedeemRelatedRedemptionsRedemptionsItem]**](RedemptionRedeemRelatedRedemptionsRedemptionsItem.md) | | [optional]
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/docs/RedemptionRedeemRelatedRedemptionsRedemptionsItem.md b/docs/RedemptionRedeemRelatedRedemptionsRedemptionsItem.md
new file mode 100644
index 00000000..812bef17
--- /dev/null
+++ b/docs/RedemptionRedeemRelatedRedemptionsRedemptionsItem.md
@@ -0,0 +1,13 @@
+# RedemptionRedeemRelatedRedemptionsRedemptionsItem
+
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**id** | **str** | Unique redemption ID. | [optional]
+**var_date** | **datetime** | Timestamp representing the date and time when the object was created. The value is shown in the ISO 8601 format. | [optional]
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/docs/RedemptionRedeemRelatedRedemptionsRollbacksItem.md b/docs/RedemptionRedeemRelatedRedemptionsRollbacksItem.md
new file mode 100644
index 00000000..eedd978a
--- /dev/null
+++ b/docs/RedemptionRedeemRelatedRedemptionsRollbacksItem.md
@@ -0,0 +1,13 @@
+# RedemptionRedeemRelatedRedemptionsRollbacksItem
+
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**id** | **str** | Unique rollback redemption ID. | [optional]
+**var_date** | **datetime** | Timestamp representing the date and time when the object was created. The value is shown in the ISO 8601 format. | [optional]
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/docs/RedemptionRedeemVoucher.md b/docs/RedemptionRedeemVoucher.md
new file mode 100644
index 00000000..b07627aa
--- /dev/null
+++ b/docs/RedemptionRedeemVoucher.md
@@ -0,0 +1,42 @@
+# RedemptionRedeemVoucher
+
+Defines the details of the voucher being redeemed.
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**id** | **str** | Assigned by the Voucherify API, identifies the voucher. | [optional]
+**code** | **str** | A code that identifies a voucher. Pattern can use all letters of the English alphabet, Arabic numerals, and special characters. | [optional]
+**campaign** | **str** | A unique campaign name, identifies the voucher's parent campaign. | [optional]
+**campaign_id** | **str** | Assigned by the Voucherify API, identifies the voucher's parent campaign. | [optional]
+**category** | **str** | Tag defining the category that this voucher belongs to. Useful when listing vouchers using the List Vouchers endpoint. | [optional]
+**category_id** | **str** | Unique category ID assigned by Voucherify. | [optional]
+**type** | **str** | Defines the type of the voucher. | [optional]
+**discount** | [**Discount**](Discount.md) | | [optional]
+**gift** | [**RedemptionRedeemVoucherGift**](RedemptionRedeemVoucherGift.md) | | [optional]
+**loyalty_card** | [**RedemptionRedeemVoucherLoyaltyCard**](RedemptionRedeemVoucherLoyaltyCard.md) | | [optional]
+**start_date** | **datetime** | Activation timestamp defines when the code starts to be active in ISO 8601 format. Voucher is *inactive before* this date. | [optional]
+**expiration_date** | **datetime** | Expiration timestamp defines when the code expires in ISO 8601 format. Voucher is *inactive after* this date. | [optional]
+**validity_timeframe** | [**ValidityTimeframe**](ValidityTimeframe.md) | | [optional]
+**validity_day_of_week** | **List[int]** | Integer array corresponding to the particular days of the week in which the voucher is valid. - `0` Sunday - `1` Monday - `2` Tuesday - `3` Wednesday - `4` Thursday - `5` Friday - `6` Saturday | [optional]
+**validity_hours** | [**ValidityHours**](ValidityHours.md) | | [optional]
+**active** | **bool** | A flag to toggle the voucher on or off. You can disable a voucher even though it's within the active period defined by the `start_date` and `expiration_date`. - `true` indicates an *active* voucher - `false` indicates an *inactive* voucher | [optional]
+**additional_info** | **str** | An optional field to keep any extra textual information about the code such as a code description and details. | [optional]
+**metadata** | **object** | The metadata object stores all custom attributes assigned to the code. A set of key/value pairs that you can attach to a voucher object. It can be useful for storing additional information about the voucher in a structured format. | [optional]
+**assets** | [**VoucherAssets**](VoucherAssets.md) | | [optional]
+**is_referral_code** | **bool** | Flag indicating whether this voucher is a referral code; `true` for campaign type `REFERRAL_PROGRAM`. | [optional]
+**created_at** | **datetime** | Timestamp representing the date and time when the voucher was created. The value is shown in the ISO 8601 format. | [optional]
+**updated_at** | **datetime** | Timestamp representing the date and time when the voucher was last updated in ISO 8601 format. | [optional]
+**holder_id** | **str** | Unique customer identifier of the redeemable holder. It equals to the customer ID assigned by Voucherify. | [optional]
+**referrer_id** | **str** | Unique identifier of the referring person. | [optional]
+**object** | **str** | The type of the object represented by JSON. Default is `voucher`. | [optional] [default to 'voucher']
+**publish** | [**RedemptionRedeemVoucherPublish**](RedemptionRedeemVoucherPublish.md) | | [optional]
+**redemption** | [**RedemptionRedeemVoucherRedemption**](RedemptionRedeemVoucherRedemption.md) | | [optional]
+**categories** | [**List[CategoryWithStackingRulesType]**](CategoryWithStackingRulesType.md) | Contains details about the category. | [optional]
+**validation_rules_assignments** | [**ValidationRulesAssignmentsList**](ValidationRulesAssignmentsList.md) | | [optional]
+**holder** | [**SimpleCustomer**](SimpleCustomer.md) | | [optional]
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/docs/RedemptionRedeemVoucherGift.md b/docs/RedemptionRedeemVoucherGift.md
new file mode 100644
index 00000000..3237857b
--- /dev/null
+++ b/docs/RedemptionRedeemVoucherGift.md
@@ -0,0 +1,15 @@
+# RedemptionRedeemVoucherGift
+
+Object representing gift parameters. Child attributes are present only if `type` is `GIFT_VOUCHER`. Defaults to `null`.
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**amount** | **int** | Total gift card income over the lifetime of the card. Value is multiplied by 100 to precisely represent 2 decimal places. For example, $100 amount is written as 10000. | [optional]
+**balance** | **int** | Available funds. Value is multiplied by 100 to precisely represent 2 decimal places. For example, $100 amount is written as 10000. | [optional]
+**effect** | **str** | Defines how the credits are applied to the customer's order. | [optional]
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/docs/RedemptionRedeemVoucherLoyaltyCard.md b/docs/RedemptionRedeemVoucherLoyaltyCard.md
new file mode 100644
index 00000000..d51dc7c1
--- /dev/null
+++ b/docs/RedemptionRedeemVoucherLoyaltyCard.md
@@ -0,0 +1,16 @@
+# RedemptionRedeemVoucherLoyaltyCard
+
+Object representing loyalty card parameters. Child attributes are present only if `type` is `LOYALTY_CARD`. Defaults to `null`.
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**points** | **int** | Total points incurred over the lifespan of the loyalty card. | [optional]
+**balance** | **int** | Points available for reward redemption. | [optional]
+**next_expiration_date** | **date** | The next closest date when the next set of points are due to expire. | [optional]
+**next_expiration_points** | **int** | The amount of points that are set to expire next. | [optional]
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/docs/RedemptionRedeemVoucherPublish.md b/docs/RedemptionRedeemVoucherPublish.md
new file mode 100644
index 00000000..0feb4a40
--- /dev/null
+++ b/docs/RedemptionRedeemVoucherPublish.md
@@ -0,0 +1,15 @@
+# RedemptionRedeemVoucherPublish
+
+Stores a summary of publication events: an event counter and endpoint to return details of each event. Publication is an assignment of a code to a customer, e.g. through a distribution.
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**object** | **str** | The type of the object represented is by default `list`. To get this list, you need to make a call to the endpoint returned in the `url` attribute. | [optional] [default to 'list']
+**count** | **int** | Publication events counter. | [optional]
+**url** | **str** | The endpoint where this list of publications can be accessed using a GET method. `/v1/vouchers/{voucher_code}/publications` | [optional]
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/docs/RedemptionRedeemVoucherRedemption.md b/docs/RedemptionRedeemVoucherRedemption.md
new file mode 100644
index 00000000..84472bb3
--- /dev/null
+++ b/docs/RedemptionRedeemVoucherRedemption.md
@@ -0,0 +1,17 @@
+# RedemptionRedeemVoucherRedemption
+
+Stores a summary of redemptions that have been applied to the voucher.
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**quantity** | **int** | How many times a voucher can be redeemed. A `null` value means unlimited. | [optional]
+**redeemed_quantity** | **int** | How many times a voucher has already been redeemed. | [optional]
+**redeemed_points** | **int** | Total loyalty points redeemed. | [optional]
+**object** | **str** | The type of the object represented is by default `list`. To get this list, you need to make a call to the endpoint returned in the url attribute. | [optional] [default to 'list']
+**url** | **str** | The endpoint where this list of redemptions can be accessed using a GET method. `/v1/vouchers/{voucher_code}/redemptions` | [optional]
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/docs/RedemptionVoucher.md b/docs/RedemptionVoucher.md
index 433b3e82..2dc31f13 100644
--- a/docs/RedemptionVoucher.md
+++ b/docs/RedemptionVoucher.md
@@ -33,7 +33,7 @@ Name | Type | Description | Notes
**object** | **str** | The type of the object represented by JSON. Default is `voucher`. | [optional] [default to 'voucher']
**publish** | [**RedemptionVoucherPublish**](RedemptionVoucherPublish.md) | | [optional]
**redemption** | [**RedemptionVoucherRedemption**](RedemptionVoucherRedemption.md) | | [optional]
-**categories** | [**List[Category]**](Category.md) | Contains details about the category. | [optional]
+**categories** | [**List[CategoryWithStackingRulesType]**](CategoryWithStackingRulesType.md) | Contains details about the category. | [optional]
**validation_rules_assignments** | [**ValidationRulesAssignmentsList**](ValidationRulesAssignmentsList.md) | | [optional]
**holder** | [**SimpleCustomer**](SimpleCustomer.md) | | [optional]
diff --git a/docs/RedemptionVoucherPublish.md b/docs/RedemptionVoucherPublish.md
index 00cf0d41..11e5c315 100644
--- a/docs/RedemptionVoucherPublish.md
+++ b/docs/RedemptionVoucherPublish.md
@@ -8,7 +8,7 @@ Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**object** | **str** | The type of the object represented is by default `list`. To get this list, you need to make a call to the endpoint returned in the `url` attribute. | [optional] [default to 'list']
**count** | **int** | Publication events counter. | [optional]
-**url** | **str** | The endpoint where this list of publications can be accessed using a GET method. `/v1/vouchers/{voucher_code}/publications` | [optional]
+**url** | **str** | The endpoint where this list of publications can be accessed using a **GET** method. `/v1/vouchers/{voucher_code}/publications` | [optional]
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
diff --git a/docs/RedemptionVoucherRedemption.md b/docs/RedemptionVoucherRedemption.md
index 6e958bcd..396945a7 100644
--- a/docs/RedemptionVoucherRedemption.md
+++ b/docs/RedemptionVoucherRedemption.md
@@ -10,7 +10,7 @@ Name | Type | Description | Notes
**redeemed_quantity** | **int** | How many times a voucher has already been redeemed. | [optional]
**redeemed_points** | **int** | Total loyalty points redeemed. | [optional]
**object** | **str** | The type of the object represented is by default `list`. To get this list, you need to make a call to the endpoint returned in the url attribute. | [optional] [default to 'list']
-**url** | **str** | The endpoint where this list of redemptions can be accessed using a GET method. `/v1/vouchers/{voucher_code}/redemptions` | [optional]
+**url** | **str** | The endpoint where this list of redemptions can be accessed using a **GET** method. `/v1/vouchers/{voucher_code}/redemptions` | [optional]
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
diff --git a/docs/RedemptionsApi.md b/docs/RedemptionsApi.md
index 81d7b154..10f1d42c 100644
--- a/docs/RedemptionsApi.md
+++ b/docs/RedemptionsApi.md
@@ -370,7 +370,7 @@ Name | Type | Description | Notes
| Status code | Description | Response headers |
|-------------|-------------|------------------|
-**2XX** | Depending on your project settings: all redeemables must be valid or just one must be valid to result as valid redemption. See https://support.voucherify.io/article/604-stacking-rules#application-rules | - |
+**2XX** | Depending on your project settings: all redeemables must be valid or just one must be valid to result as valid redemption. Read more in the [Stacking Rule Documentation](https://support.voucherify.io/article/604-stacking-rules). | - |
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
diff --git a/docs/RedemptionsGetResponseBody.md b/docs/RedemptionsGetResponseBody.md
index 0eac2b61..94ad0732 100644
--- a/docs/RedemptionsGetResponseBody.md
+++ b/docs/RedemptionsGetResponseBody.md
@@ -23,11 +23,11 @@ Name | Type | Description | Notes
**customer** | [**RedemptionsGetResponseBodyCustomer**](RedemptionsGetResponseBodyCustomer.md) | | [optional]
**related_object_type** | **str** | Defines the related object. | [optional]
**related_object_id** | **str** | | [optional]
-**voucher** | [**RedemptionsGetResponseBodyVoucher**](RedemptionsGetResponseBodyVoucher.md) | | [optional]
**promotion_tier** | [**RedemptionsGetResponseBodyPromotionTier**](RedemptionsGetResponseBodyPromotionTier.md) | | [optional]
**reward** | [**RedemptionRewardResult**](RedemptionRewardResult.md) | | [optional]
**gift** | [**RedemptionsGetResponseBodyGift**](RedemptionsGetResponseBodyGift.md) | | [optional]
**loyalty_card** | [**RedemptionsGetResponseBodyLoyaltyCard**](RedemptionsGetResponseBodyLoyaltyCard.md) | | [optional]
+**voucher** | [**RedemptionsGetResponseBodyVoucher**](RedemptionsGetResponseBodyVoucher.md) | | [optional]
**reason** | **str** | System generated cause for the redemption being invalid in the context of the provided parameters. | [optional]
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
diff --git a/docs/RedemptionsGetResponseBodyChannel.md b/docs/RedemptionsGetResponseBodyChannel.md
index 48d84681..9832da85 100644
--- a/docs/RedemptionsGetResponseBodyChannel.md
+++ b/docs/RedemptionsGetResponseBodyChannel.md
@@ -6,7 +6,7 @@
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**channel_id** | **str** | | [optional]
-**channel_type** | **str** | The source of the channel for the redemption. A `USER` corresponds to the Voucherify Dashboard and an `API` corresponds to the API. | [optional]
+**channel_type** | **str** | | [optional]
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
diff --git a/docs/RedemptionsGetResponseBodyOrder.md b/docs/RedemptionsGetResponseBodyOrder.md
index 5998d154..4f2f1fd8 100644
--- a/docs/RedemptionsGetResponseBodyOrder.md
+++ b/docs/RedemptionsGetResponseBodyOrder.md
@@ -17,7 +17,7 @@ Name | Type | Description | Notes
**applied_discount_amount** | **int** | This field shows the order-level discount applied. | [optional]
**items_applied_discount_amount** | **int** | Sum of all product-specific discounts applied in a particular request. `sum(items, i => i.applied_discount_amount)` | [optional]
**total_applied_discount_amount** | **int** | Sum of all order-level AND all product-specific discounts applied in a particular request. `total_applied_discount_amount` = `applied_discount_amount` + `items_applied_discount_amount` | [optional]
-**items** | [**List[OrderCalculatedItem]**](OrderCalculatedItem.md) | Array of items applied to the order. | [optional]
+**items** | [**List[OrderCalculatedItem]**](OrderCalculatedItem.md) | Array of items applied to the order. It can include up 500 items. | [optional]
**metadata** | **object** | | [optional]
**object** | **str** | The type of the object represented by JSON. | [optional] [default to 'order']
**created_at** | **datetime** | Timestamp representing the date and time when the order was created. The value is shown in the ISO 8601 format. | [optional]
diff --git a/docs/RedemptionsGetResponseBodyVoucherPublish.md b/docs/RedemptionsGetResponseBodyVoucherPublish.md
index eeebf0de..b52d8faa 100644
--- a/docs/RedemptionsGetResponseBodyVoucherPublish.md
+++ b/docs/RedemptionsGetResponseBodyVoucherPublish.md
@@ -7,7 +7,7 @@ Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**object** | **str** | The type of the object represented is by default `list`. To get this list, you need to make a call to the endpoint returned in the `url` attribute. | [optional] [default to 'list']
**count** | **int** | Publication events counter. | [optional]
-**url** | **str** | The endpoint where this list of publications can be accessed using a GET method. `/v1/vouchers/{voucher_code}/publications` | [optional]
+**url** | **str** | The endpoint where this list of publications can be accessed using a **GET** method. `/v1/vouchers/{voucher_code}/publications` | [optional]
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
diff --git a/docs/RedemptionsGetResponseBodyVoucherRedemption.md b/docs/RedemptionsGetResponseBodyVoucherRedemption.md
index d0b3ea88..1725c772 100644
--- a/docs/RedemptionsGetResponseBodyVoucherRedemption.md
+++ b/docs/RedemptionsGetResponseBodyVoucherRedemption.md
@@ -9,7 +9,7 @@ Name | Type | Description | Notes
**redeemed_quantity** | **int** | How many times a voucher has already been redeemed. | [optional]
**redeemed_points** | **int** | Total loyalty points redeemed. | [optional]
**object** | **str** | The type of the object represented is by default `list`. To get this list, you need to make a call to the endpoint returned in the url attribute. | [optional] [default to 'list']
-**url** | **str** | The endpoint where this list of redemptions can be accessed using a GET method. `/v1/vouchers/{voucher_code}/redemptions` | [optional]
+**url** | **str** | The endpoint where this list of redemptions can be accessed using a **GET** method. `/v1/vouchers/{voucher_code}/redemptions` | [optional]
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
diff --git a/docs/RedemptionsListResponseBodyRedemptionsItem.md b/docs/RedemptionsListResponseBodyRedemptionsItem.md
index fb398e66..dcb3fcb1 100644
--- a/docs/RedemptionsListResponseBodyRedemptionsItem.md
+++ b/docs/RedemptionsListResponseBodyRedemptionsItem.md
@@ -23,11 +23,11 @@ Name | Type | Description | Notes
**customer** | [**RedemptionsListResponseBodyRedemptionsItemCustomer**](RedemptionsListResponseBodyRedemptionsItemCustomer.md) | | [optional]
**related_object_type** | **str** | Defines the related object. | [optional]
**related_object_id** | **str** | | [optional]
-**voucher** | [**RedemptionsListResponseBodyRedemptionsItemVoucher**](RedemptionsListResponseBodyRedemptionsItemVoucher.md) | | [optional]
**promotion_tier** | [**RedemptionsListResponseBodyRedemptionsItemPromotionTier**](RedemptionsListResponseBodyRedemptionsItemPromotionTier.md) | | [optional]
**reward** | [**RedemptionRewardResult**](RedemptionRewardResult.md) | | [optional]
**gift** | [**RedemptionsListResponseBodyRedemptionsItemGift**](RedemptionsListResponseBodyRedemptionsItemGift.md) | | [optional]
**loyalty_card** | [**RedemptionsListResponseBodyRedemptionsItemLoyaltyCard**](RedemptionsListResponseBodyRedemptionsItemLoyaltyCard.md) | | [optional]
+**voucher** | [**RedemptionsListResponseBodyRedemptionsItemVoucher**](RedemptionsListResponseBodyRedemptionsItemVoucher.md) | | [optional]
**reason** | **str** | System generated cause for the redemption being invalid in the context of the provided parameters. | [optional]
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
diff --git a/docs/RedemptionsListResponseBodyRedemptionsItemChannel.md b/docs/RedemptionsListResponseBodyRedemptionsItemChannel.md
index c97cb1dc..9f90a64f 100644
--- a/docs/RedemptionsListResponseBodyRedemptionsItemChannel.md
+++ b/docs/RedemptionsListResponseBodyRedemptionsItemChannel.md
@@ -6,7 +6,7 @@
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**channel_id** | **str** | | [optional]
-**channel_type** | **str** | The source of the channel for the redemption. A `USER` corresponds to the Voucherify Dashboard and an `API` corresponds to the API. | [optional]
+**channel_type** | **str** | | [optional]
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
diff --git a/docs/RedemptionsListResponseBodyRedemptionsItemOrder.md b/docs/RedemptionsListResponseBodyRedemptionsItemOrder.md
index 6cdd566c..aab20e43 100644
--- a/docs/RedemptionsListResponseBodyRedemptionsItemOrder.md
+++ b/docs/RedemptionsListResponseBodyRedemptionsItemOrder.md
@@ -17,7 +17,7 @@ Name | Type | Description | Notes
**applied_discount_amount** | **int** | This field shows the order-level discount applied. | [optional]
**items_applied_discount_amount** | **int** | Sum of all product-specific discounts applied in a particular request. `sum(items, i => i.applied_discount_amount)` | [optional]
**total_applied_discount_amount** | **int** | Sum of all order-level AND all product-specific discounts applied in a particular request. `total_applied_discount_amount` = `applied_discount_amount` + `items_applied_discount_amount` | [optional]
-**items** | [**List[OrderCalculatedItem]**](OrderCalculatedItem.md) | Array of items applied to the order. | [optional]
+**items** | [**List[OrderCalculatedItem]**](OrderCalculatedItem.md) | Array of items applied to the order. It can include up 500 items. | [optional]
**metadata** | **object** | | [optional]
**object** | **str** | The type of the object represented by JSON. | [optional] [default to 'order']
**created_at** | **datetime** | Timestamp representing the date and time when the order was created. The value is shown in the ISO 8601 format. | [optional]
diff --git a/docs/RedemptionsListResponseBodyRedemptionsItemVoucherPublish.md b/docs/RedemptionsListResponseBodyRedemptionsItemVoucherPublish.md
index 5269982c..635a5584 100644
--- a/docs/RedemptionsListResponseBodyRedemptionsItemVoucherPublish.md
+++ b/docs/RedemptionsListResponseBodyRedemptionsItemVoucherPublish.md
@@ -7,7 +7,7 @@ Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**object** | **str** | The type of the object represented is by default `list`. To get this list, you need to make a call to the endpoint returned in the `url` attribute. | [optional] [default to 'list']
**count** | **int** | Publication events counter. | [optional]
-**url** | **str** | The endpoint where this list of publications can be accessed using a GET method. `/v1/vouchers/{voucher_code}/publications` | [optional]
+**url** | **str** | The endpoint where this list of publications can be accessed using a **GET** method. `/v1/vouchers/{voucher_code}/publications` | [optional]
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
diff --git a/docs/RedemptionsListResponseBodyRedemptionsItemVoucherRedemption.md b/docs/RedemptionsListResponseBodyRedemptionsItemVoucherRedemption.md
index 269fc956..58fd15e6 100644
--- a/docs/RedemptionsListResponseBodyRedemptionsItemVoucherRedemption.md
+++ b/docs/RedemptionsListResponseBodyRedemptionsItemVoucherRedemption.md
@@ -9,7 +9,7 @@ Name | Type | Description | Notes
**redeemed_quantity** | **int** | How many times a voucher has already been redeemed. | [optional]
**redeemed_points** | **int** | Total loyalty points redeemed. | [optional]
**object** | **str** | The type of the object represented is by default `list`. To get this list, you need to make a call to the endpoint returned in the url attribute. | [optional] [default to 'list']
-**url** | **str** | The endpoint where this list of redemptions can be accessed using a GET method. `/v1/vouchers/{voucher_code}/redemptions` | [optional]
+**url** | **str** | The endpoint where this list of redemptions can be accessed using a **GET** method. `/v1/vouchers/{voucher_code}/redemptions` | [optional]
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
diff --git a/docs/RedemptionsRollbacksCreateResponseBody.md b/docs/RedemptionsRollbacksCreateResponseBody.md
index bfd772d3..7fa1f5d1 100644
--- a/docs/RedemptionsRollbacksCreateResponseBody.md
+++ b/docs/RedemptionsRollbacksCreateResponseBody.md
@@ -1,6 +1,6 @@
# RedemptionsRollbacksCreateResponseBody
-Response body schema for POST `/redemptions/{parentRedemptionID}/rollbacks`.
+Response body schema for **POST** `/redemptions/{parentRedemptionID}/rollbacks`.
## Properties
diff --git a/docs/ReferralsApi.md b/docs/ReferralsApi.md
new file mode 100644
index 00000000..ea5d9122
--- /dev/null
+++ b/docs/ReferralsApi.md
@@ -0,0 +1,560 @@
+# voucherify.ReferralsApi
+
+All URIs are relative to *https://api.voucherify.io*
+
+Method | HTTP request | Description
+------------- | ------------- | -------------
+[**referrals_add_holders**](ReferralsApi.md#referrals_add_holders) | **POST** /v1/referrals/members/{memberId}/holders | Add Referral Code Holders
+[**referrals_add_holders1**](ReferralsApi.md#referrals_add_holders1) | **POST** /v1/referrals/{campaignId}/members/{memberId}/holders | Add Referral Code Holders
+[**referrals_code_holders**](ReferralsApi.md#referrals_code_holders) | **GET** /v1/referrals/{campaignId}/members/{memberId}/holders | List Referral Code Holders
+[**referrals_code_holders1**](ReferralsApi.md#referrals_code_holders1) | **GET** /v1/referrals/members/{memberId}/holders | List Referral Code Holders
+[**referrals_remove_holder**](ReferralsApi.md#referrals_remove_holder) | **DELETE** /v1/referrals/members/{memberId}/holders/{holderId} | Remove Referral Card Holder
+[**referrals_remove_holder1**](ReferralsApi.md#referrals_remove_holder1) | **DELETE** /v1/referrals/{campaignId}/members/{memberId}/holders/{holderId} | Remove Referral Card Holder
+
+
+# **referrals_add_holders**
+> ReferralsMembersHoldersCreateInBulkResponseBody referrals_add_holders(member_id, referrals_members_holders_create_in_bulk_request_body=referrals_members_holders_create_in_bulk_request_body)
+
+Add Referral Code Holders
+
+Adds new holders to a referral code as **referees**. The data sent in the request is upserted into the customer data. If the request returns an error even for one customer, you have to resend the whole request. Customer data is upserted if the data for all customers is correct. To use this endpoint, you must have the following permissions: - Create and modify Customers and Segments (customers.modify) - Publish Voucher (vouchers.publish) 👍 To add a holder as a referer, use the Create Publication endpoint. 📘 Alternative endpoint This endpoint is an alternative to the Add Referral Code Holders endpoint. The URL was re-designed to retrieve the referral member holders without providing the campaignId as a path paremeter.
+
+### Example
+
+* Api Key Authentication (X-App-Id):
+* Api Key Authentication (X-App-Token):
+
+```python
+import voucherify
+from voucherify.models.referrals_members_holders_create_in_bulk_request_body import ReferralsMembersHoldersCreateInBulkRequestBody
+from voucherify.models.referrals_members_holders_create_in_bulk_response_body import ReferralsMembersHoldersCreateInBulkResponseBody
+from voucherify.rest import ApiException
+from pprint import pprint
+
+# Defining the host is optional and defaults to https://api.voucherify.io
+# See configuration.py for a list of all supported configuration parameters.
+configuration = voucherify.Configuration(
+ host = "https://api.voucherify.io"
+)
+
+# The client must configure the authentication and authorization parameters
+# in accordance with the API server security policy.
+# Examples for each auth method are provided below, use the example that
+# satisfies your auth use case.
+
+# Configure API key authorization: X-App-Id
+configuration.api_key['X-App-Id'] = os.environ["API_KEY"]
+
+# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
+# configuration.api_key_prefix['X-App-Id'] = 'Bearer'
+
+# Configure API key authorization: X-App-Token
+configuration.api_key['X-App-Token'] = os.environ["API_KEY"]
+
+# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
+# configuration.api_key_prefix['X-App-Token'] = 'Bearer'
+
+# Enter a context with an instance of the API client
+with voucherify.ApiClient(configuration) as api_client:
+ # Create an instance of the API class
+ api_instance = voucherify.ReferralsApi(api_client)
+ member_id = 'member_id_example' # str | Unique referral code or its identifier.
+ referrals_members_holders_create_in_bulk_request_body = {"holders":[{"source_id":"cst-prsn01","name":"Alex Doe","email":"alex-doe@your.domain.com","country":"England"},{"source_id":"cst-prsn02","name":"Alex Joe","email":"alex-joe@your.domain.com","country":"Wales"}],"metadata":{"influencer_code":true}} # ReferralsMembersHoldersCreateInBulkRequestBody | Specify the customer data to be upserted as redeemable holders. (optional)
+
+ try:
+ # Add Referral Code Holders
+ api_response = api_instance.referrals_add_holders(member_id, referrals_members_holders_create_in_bulk_request_body=referrals_members_holders_create_in_bulk_request_body)
+ print("The response of ReferralsApi->referrals_add_holders:\n")
+ pprint(api_response)
+ except Exception as e:
+ print("Exception when calling ReferralsApi->referrals_add_holders: %s\n" % e)
+```
+
+
+
+### Parameters
+
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **member_id** | **str**| Unique referral code or its identifier. |
+ **referrals_members_holders_create_in_bulk_request_body** | [**ReferralsMembersHoldersCreateInBulkRequestBody**](ReferralsMembersHoldersCreateInBulkRequestBody.md)| Specify the customer data to be upserted as redeemable holders. | [optional]
+
+### Return type
+
+[**ReferralsMembersHoldersCreateInBulkResponseBody**](ReferralsMembersHoldersCreateInBulkResponseBody.md)
+
+### Authorization
+
+[X-App-Id](../README.md#X-App-Id), [X-App-Token](../README.md#X-App-Token)
+
+### HTTP request headers
+
+ - **Content-Type**: application/json
+ - **Accept**: application/json
+
+### HTTP response details
+
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+**2XX** | Returns a list of redeemable holder objects. | - |
+
+[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
+
+# **referrals_add_holders1**
+> ReferralsMembersHoldersCreateInBulkResponseBody referrals_add_holders1(campaign_id, member_id, referrals_members_holders_create_in_bulk_request_body=referrals_members_holders_create_in_bulk_request_body)
+
+Add Referral Code Holders
+
+Adds new holders to a referral code as **referees**. The data sent in the request is upserted into the customer data. If the request returns an error even for one customer, you have to resend the whole request. Customer data is upserted if the data for all customers is correct. To use this endpoint, you must have the following permissions: - Create and modify Customers and Segments (customers.modify) - Publish Voucher (vouchers.publish) 👍 To add a holder as a referer, use the Create Publication endpoint.
+
+### Example
+
+* Api Key Authentication (X-App-Id):
+* Api Key Authentication (X-App-Token):
+
+```python
+import voucherify
+from voucherify.models.referrals_members_holders_create_in_bulk_request_body import ReferralsMembersHoldersCreateInBulkRequestBody
+from voucherify.models.referrals_members_holders_create_in_bulk_response_body import ReferralsMembersHoldersCreateInBulkResponseBody
+from voucherify.rest import ApiException
+from pprint import pprint
+
+# Defining the host is optional and defaults to https://api.voucherify.io
+# See configuration.py for a list of all supported configuration parameters.
+configuration = voucherify.Configuration(
+ host = "https://api.voucherify.io"
+)
+
+# The client must configure the authentication and authorization parameters
+# in accordance with the API server security policy.
+# Examples for each auth method are provided below, use the example that
+# satisfies your auth use case.
+
+# Configure API key authorization: X-App-Id
+configuration.api_key['X-App-Id'] = os.environ["API_KEY"]
+
+# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
+# configuration.api_key_prefix['X-App-Id'] = 'Bearer'
+
+# Configure API key authorization: X-App-Token
+configuration.api_key['X-App-Token'] = os.environ["API_KEY"]
+
+# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
+# configuration.api_key_prefix['X-App-Token'] = 'Bearer'
+
+# Enter a context with an instance of the API client
+with voucherify.ApiClient(configuration) as api_client:
+ # Create an instance of the API class
+ api_instance = voucherify.ReferralsApi(api_client)
+ campaign_id = 'campaign_id_example' # str | Unique identifier of a referral program campaign.
+ member_id = 'member_id_example' # str | Unique referral code or its identifier.
+ referrals_members_holders_create_in_bulk_request_body = {"holders":[{"source_id":"cst-prsn01","name":"Alex Doe","email":"alex-doe@your.domain.com","country":"England"},{"source_id":"cst-prsn02","name":"Alex Joe","email":"alex-joe@your.domain.com","country":"Wales"}],"metadata":{"influencer_code":true}} # ReferralsMembersHoldersCreateInBulkRequestBody | Specify the customer data to be upserted as redeemable holders. (optional)
+
+ try:
+ # Add Referral Code Holders
+ api_response = api_instance.referrals_add_holders1(campaign_id, member_id, referrals_members_holders_create_in_bulk_request_body=referrals_members_holders_create_in_bulk_request_body)
+ print("The response of ReferralsApi->referrals_add_holders1:\n")
+ pprint(api_response)
+ except Exception as e:
+ print("Exception when calling ReferralsApi->referrals_add_holders1: %s\n" % e)
+```
+
+
+
+### Parameters
+
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **campaign_id** | **str**| Unique identifier of a referral program campaign. |
+ **member_id** | **str**| Unique referral code or its identifier. |
+ **referrals_members_holders_create_in_bulk_request_body** | [**ReferralsMembersHoldersCreateInBulkRequestBody**](ReferralsMembersHoldersCreateInBulkRequestBody.md)| Specify the customer data to be upserted as redeemable holders. | [optional]
+
+### Return type
+
+[**ReferralsMembersHoldersCreateInBulkResponseBody**](ReferralsMembersHoldersCreateInBulkResponseBody.md)
+
+### Authorization
+
+[X-App-Id](../README.md#X-App-Id), [X-App-Token](../README.md#X-App-Token)
+
+### HTTP request headers
+
+ - **Content-Type**: application/json
+ - **Accept**: application/json
+
+### HTTP response details
+
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+**2XX** | Returns a list of redeemable holder objects. | - |
+
+[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
+
+# **referrals_code_holders**
+> ReferralsMembersHoldersListResponseBody referrals_code_holders(campaign_id, member_id, limit=limit, order=order, starting_after_id=starting_after_id, filters=filters)
+
+List Referral Code Holders
+
+Retrieves all the redeemables that have been assigned to the customer. To use this endpoint, you must have the following permissions: - Read Customers (customers.details.read)
+
+### Example
+
+* Api Key Authentication (X-App-Id):
+* Api Key Authentication (X-App-Token):
+
+```python
+import voucherify
+from voucherify.models.parameter_filters_list_referrals_redeemable_holders import ParameterFiltersListReferralsRedeemableHolders
+from voucherify.models.parameter_order_list_redeemables import ParameterOrderListRedeemables
+from voucherify.models.referrals_members_holders_list_response_body import ReferralsMembersHoldersListResponseBody
+from voucherify.rest import ApiException
+from pprint import pprint
+
+# Defining the host is optional and defaults to https://api.voucherify.io
+# See configuration.py for a list of all supported configuration parameters.
+configuration = voucherify.Configuration(
+ host = "https://api.voucherify.io"
+)
+
+# The client must configure the authentication and authorization parameters
+# in accordance with the API server security policy.
+# Examples for each auth method are provided below, use the example that
+# satisfies your auth use case.
+
+# Configure API key authorization: X-App-Id
+configuration.api_key['X-App-Id'] = os.environ["API_KEY"]
+
+# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
+# configuration.api_key_prefix['X-App-Id'] = 'Bearer'
+
+# Configure API key authorization: X-App-Token
+configuration.api_key['X-App-Token'] = os.environ["API_KEY"]
+
+# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
+# configuration.api_key_prefix['X-App-Token'] = 'Bearer'
+
+# Enter a context with an instance of the API client
+with voucherify.ApiClient(configuration) as api_client:
+ # Create an instance of the API class
+ api_instance = voucherify.ReferralsApi(api_client)
+ campaign_id = 'campaign_id_example' # str | Unique identifier of a referral program campaign.
+ member_id = 'member_id_example' # str | Unique referral code or its identifier.
+ limit = 56 # int | Limits the number of objects to be returned. The limit can range between 1 and 100 items. If no limit is set, it returns 10 items. (optional)
+ order = voucherify.ParameterOrderListRedeemables() # ParameterOrderListRedeemables | Sorts the results using one of the filtering options, where the dash - preceding a sorting option means sorting in a descending order. (optional)
+ starting_after_id = 'starting_after_id_example' # str | A cursor for pagination. It retrieves the events starting after an event with the given ID. (optional)
+ filters = voucherify.ParameterFiltersListReferralsRedeemableHolders() # ParameterFiltersListReferralsRedeemableHolders | Filters for listing customer redeemables. (optional)
+
+ try:
+ # List Referral Code Holders
+ api_response = api_instance.referrals_code_holders(campaign_id, member_id, limit=limit, order=order, starting_after_id=starting_after_id, filters=filters)
+ print("The response of ReferralsApi->referrals_code_holders:\n")
+ pprint(api_response)
+ except Exception as e:
+ print("Exception when calling ReferralsApi->referrals_code_holders: %s\n" % e)
+```
+
+
+
+### Parameters
+
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **campaign_id** | **str**| Unique identifier of a referral program campaign. |
+ **member_id** | **str**| Unique referral code or its identifier. |
+ **limit** | **int**| Limits the number of objects to be returned. The limit can range between 1 and 100 items. If no limit is set, it returns 10 items. | [optional]
+ **order** | [**ParameterOrderListRedeemables**](.md)| Sorts the results using one of the filtering options, where the dash - preceding a sorting option means sorting in a descending order. | [optional]
+ **starting_after_id** | **str**| A cursor for pagination. It retrieves the events starting after an event with the given ID. | [optional]
+ **filters** | [**ParameterFiltersListReferralsRedeemableHolders**](.md)| Filters for listing customer redeemables. | [optional]
+
+### Return type
+
+[**ReferralsMembersHoldersListResponseBody**](ReferralsMembersHoldersListResponseBody.md)
+
+### Authorization
+
+[X-App-Id](../README.md#X-App-Id), [X-App-Token](../README.md#X-App-Token)
+
+### HTTP request headers
+
+ - **Content-Type**: Not defined
+ - **Accept**: application/json
+
+### HTTP response details
+
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+**2XX** | Returns the holders of the redeemable that is assigned to the referral campaign. | - |
+
+[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
+
+# **referrals_code_holders1**
+> ReferralsMembersHoldersListResponseBody referrals_code_holders1(member_id, limit=limit, order=order, starting_after_id=starting_after_id, filters=filters)
+
+List Referral Code Holders
+
+Retrieves the holders of the referral code from a referral campaign. To use this endpoint, you must have the following permissions: - Read Customers (customers.details.read) 📘 Alternative endpoint This endpoint is an alternative to the List Member Holders endpoint. The URL was re-designed to retrieve the referral member holders without providing the campaignId as a path paremeter.
+
+### Example
+
+* Api Key Authentication (X-App-Id):
+* Api Key Authentication (X-App-Token):
+
+```python
+import voucherify
+from voucherify.models.parameter_filters_list_referrals_redeemable_holders import ParameterFiltersListReferralsRedeemableHolders
+from voucherify.models.parameter_order_list_redeemables import ParameterOrderListRedeemables
+from voucherify.models.referrals_members_holders_list_response_body import ReferralsMembersHoldersListResponseBody
+from voucherify.rest import ApiException
+from pprint import pprint
+
+# Defining the host is optional and defaults to https://api.voucherify.io
+# See configuration.py for a list of all supported configuration parameters.
+configuration = voucherify.Configuration(
+ host = "https://api.voucherify.io"
+)
+
+# The client must configure the authentication and authorization parameters
+# in accordance with the API server security policy.
+# Examples for each auth method are provided below, use the example that
+# satisfies your auth use case.
+
+# Configure API key authorization: X-App-Id
+configuration.api_key['X-App-Id'] = os.environ["API_KEY"]
+
+# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
+# configuration.api_key_prefix['X-App-Id'] = 'Bearer'
+
+# Configure API key authorization: X-App-Token
+configuration.api_key['X-App-Token'] = os.environ["API_KEY"]
+
+# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
+# configuration.api_key_prefix['X-App-Token'] = 'Bearer'
+
+# Enter a context with an instance of the API client
+with voucherify.ApiClient(configuration) as api_client:
+ # Create an instance of the API class
+ api_instance = voucherify.ReferralsApi(api_client)
+ member_id = 'member_id_example' # str | Unique referral code or its identifier.
+ limit = 56 # int | Limits the number of objects to be returned. The limit can range between 1 and 100 items. If no limit is set, it returns 10 items. (optional)
+ order = voucherify.ParameterOrderListRedeemables() # ParameterOrderListRedeemables | Sorts the results using one of the filtering options, where the dash - preceding a sorting option means sorting in a descending order. (optional)
+ starting_after_id = 'starting_after_id_example' # str | A cursor for pagination. It retrieves the events starting after an event with the given ID. (optional)
+ filters = voucherify.ParameterFiltersListReferralsRedeemableHolders() # ParameterFiltersListReferralsRedeemableHolders | Filters for listing customer redeemables. (optional)
+
+ try:
+ # List Referral Code Holders
+ api_response = api_instance.referrals_code_holders1(member_id, limit=limit, order=order, starting_after_id=starting_after_id, filters=filters)
+ print("The response of ReferralsApi->referrals_code_holders1:\n")
+ pprint(api_response)
+ except Exception as e:
+ print("Exception when calling ReferralsApi->referrals_code_holders1: %s\n" % e)
+```
+
+
+
+### Parameters
+
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **member_id** | **str**| Unique referral code or its identifier. |
+ **limit** | **int**| Limits the number of objects to be returned. The limit can range between 1 and 100 items. If no limit is set, it returns 10 items. | [optional]
+ **order** | [**ParameterOrderListRedeemables**](.md)| Sorts the results using one of the filtering options, where the dash - preceding a sorting option means sorting in a descending order. | [optional]
+ **starting_after_id** | **str**| A cursor for pagination. It retrieves the events starting after an event with the given ID. | [optional]
+ **filters** | [**ParameterFiltersListReferralsRedeemableHolders**](.md)| Filters for listing customer redeemables. | [optional]
+
+### Return type
+
+[**ReferralsMembersHoldersListResponseBody**](ReferralsMembersHoldersListResponseBody.md)
+
+### Authorization
+
+[X-App-Id](../README.md#X-App-Id), [X-App-Token](../README.md#X-App-Token)
+
+### HTTP request headers
+
+ - **Content-Type**: Not defined
+ - **Accept**: application/json
+
+### HTTP response details
+
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+**2XX** | Returns the holders of the redeemable that is assigned to the referral campaign. | - |
+
+[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
+
+# **referrals_remove_holder**
+> referrals_remove_holder(member_id, holder_id)
+
+Remove Referral Card Holder
+
+Removes the holder from a referral card. You can remove a referee only. To use this endpoint, you must have the following permissions: - Create and modify Customers and Segments (customers.modify) - Publish Voucher (vouchers.publish) 📘 Alternative endpoint This endpoint is an alternative to the Remove Referral Card Holder endpoint. The URL was re-designed to retrieve the referral member holders without providing the campaignId as a path paremeter.
+
+### Example
+
+* Api Key Authentication (X-App-Id):
+* Api Key Authentication (X-App-Token):
+
+```python
+import voucherify
+from voucherify.rest import ApiException
+from pprint import pprint
+
+# Defining the host is optional and defaults to https://api.voucherify.io
+# See configuration.py for a list of all supported configuration parameters.
+configuration = voucherify.Configuration(
+ host = "https://api.voucherify.io"
+)
+
+# The client must configure the authentication and authorization parameters
+# in accordance with the API server security policy.
+# Examples for each auth method are provided below, use the example that
+# satisfies your auth use case.
+
+# Configure API key authorization: X-App-Id
+configuration.api_key['X-App-Id'] = os.environ["API_KEY"]
+
+# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
+# configuration.api_key_prefix['X-App-Id'] = 'Bearer'
+
+# Configure API key authorization: X-App-Token
+configuration.api_key['X-App-Token'] = os.environ["API_KEY"]
+
+# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
+# configuration.api_key_prefix['X-App-Token'] = 'Bearer'
+
+# Enter a context with an instance of the API client
+with voucherify.ApiClient(configuration) as api_client:
+ # Create an instance of the API class
+ api_instance = voucherify.ReferralsApi(api_client)
+ member_id = 'member_id_example' # str | Unique referral code or its identifier.
+ holder_id = 'holder_id_example' # str | Unique identifier of a redeemable holder.
+
+ try:
+ # Remove Referral Card Holder
+ api_instance.referrals_remove_holder(member_id, holder_id)
+ except Exception as e:
+ print("Exception when calling ReferralsApi->referrals_remove_holder: %s\n" % e)
+```
+
+
+
+### Parameters
+
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **member_id** | **str**| Unique referral code or its identifier. |
+ **holder_id** | **str**| Unique identifier of a redeemable holder. |
+
+### Return type
+
+void (empty response body)
+
+### Authorization
+
+[X-App-Id](../README.md#X-App-Id), [X-App-Token](../README.md#X-App-Token)
+
+### HTTP request headers
+
+ - **Content-Type**: Not defined
+ - **Accept**: Not defined
+
+### HTTP response details
+
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+**2XX** | Returns no content if removal is successful. | - |
+
+[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
+
+# **referrals_remove_holder1**
+> referrals_remove_holder1(campaign_id, member_id, holder_id)
+
+Remove Referral Card Holder
+
+Removes the holder from a referral card. You can remove a referee only. To use this endpoint, you must have the following permissions: - Create and modify Customers and Segments (customers.modify) - Publish Voucher (vouchers.publish)
+
+### Example
+
+* Api Key Authentication (X-App-Id):
+* Api Key Authentication (X-App-Token):
+
+```python
+import voucherify
+from voucherify.rest import ApiException
+from pprint import pprint
+
+# Defining the host is optional and defaults to https://api.voucherify.io
+# See configuration.py for a list of all supported configuration parameters.
+configuration = voucherify.Configuration(
+ host = "https://api.voucherify.io"
+)
+
+# The client must configure the authentication and authorization parameters
+# in accordance with the API server security policy.
+# Examples for each auth method are provided below, use the example that
+# satisfies your auth use case.
+
+# Configure API key authorization: X-App-Id
+configuration.api_key['X-App-Id'] = os.environ["API_KEY"]
+
+# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
+# configuration.api_key_prefix['X-App-Id'] = 'Bearer'
+
+# Configure API key authorization: X-App-Token
+configuration.api_key['X-App-Token'] = os.environ["API_KEY"]
+
+# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
+# configuration.api_key_prefix['X-App-Token'] = 'Bearer'
+
+# Enter a context with an instance of the API client
+with voucherify.ApiClient(configuration) as api_client:
+ # Create an instance of the API class
+ api_instance = voucherify.ReferralsApi(api_client)
+ campaign_id = 'campaign_id_example' # str | Unique identifier of a referral program campaign.
+ member_id = 'member_id_example' # str | Unique referral code or its identifier.
+ holder_id = 'holder_id_example' # str | Unique identifier of a redeemable holder.
+
+ try:
+ # Remove Referral Card Holder
+ api_instance.referrals_remove_holder1(campaign_id, member_id, holder_id)
+ except Exception as e:
+ print("Exception when calling ReferralsApi->referrals_remove_holder1: %s\n" % e)
+```
+
+
+
+### Parameters
+
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **campaign_id** | **str**| Unique identifier of a referral program campaign. |
+ **member_id** | **str**| Unique referral code or its identifier. |
+ **holder_id** | **str**| Unique identifier of a redeemable holder. |
+
+### Return type
+
+void (empty response body)
+
+### Authorization
+
+[X-App-Id](../README.md#X-App-Id), [X-App-Token](../README.md#X-App-Token)
+
+### HTTP request headers
+
+ - **Content-Type**: Not defined
+ - **Accept**: Not defined
+
+### HTTP response details
+
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+**2XX** | Returns no content if removal is successful. | - |
+
+[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
+
diff --git a/docs/ReferralsMembersHoldersCreateInBulkRequestBody.md b/docs/ReferralsMembersHoldersCreateInBulkRequestBody.md
new file mode 100644
index 00000000..c299db50
--- /dev/null
+++ b/docs/ReferralsMembersHoldersCreateInBulkRequestBody.md
@@ -0,0 +1,14 @@
+# ReferralsMembersHoldersCreateInBulkRequestBody
+
+Request body schema for **POST** `v1/referrals/{campaignId}/members/{memberId}/holders` and **POST** `v1/referrals/members/{memberId}/holders`.
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**holders** | [**List[Customer]**](Customer.md) | Array of holders to be added to a referral card as referees. You have to send at least one object in the array up to a maximum of 100 objects. You can send either a `source_id` or `id`, or both; however, at least one of them is required. If both are sent, Voucherify checks `id` to upsert that customer's data. | [optional]
+**metadata** | **object** | A set of custom key/value pairs that you can attach to the redeemable holders sent in the array. The value can be a string, number, boolean, date, datetime, image URL, or object. The metadata must meet the metadata schema for publications. The metadata object stores all custom attributes assigned to the redeemable holder. | [optional]
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/docs/ReferralsMembersHoldersCreateInBulkResponseBody.md b/docs/ReferralsMembersHoldersCreateInBulkResponseBody.md
new file mode 100644
index 00000000..a51b8f9f
--- /dev/null
+++ b/docs/ReferralsMembersHoldersCreateInBulkResponseBody.md
@@ -0,0 +1,13 @@
+# ReferralsMembersHoldersCreateInBulkResponseBody
+
+Response body schema for **POST** `v1/referrals/{campaignId}/members/{memberId}/holders` and **POST** `v1/referrals/members/{memberId}/holders`.
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**holders** | [**List[RedeemableHolder]**](RedeemableHolder.md) | Contains an array of referral card holders who are the customers sent in the request. | [optional]
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/docs/ReferralsMembersHoldersListResponseBody.md b/docs/ReferralsMembersHoldersListResponseBody.md
new file mode 100644
index 00000000..5fc7d922
--- /dev/null
+++ b/docs/ReferralsMembersHoldersListResponseBody.md
@@ -0,0 +1,18 @@
+# ReferralsMembersHoldersListResponseBody
+
+Response body schema for **GET** `v1/referrals/{campaignId}/members/{memberId}/holders` and for **GET** `v1/referrals/members/{memberId}/holders`
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**object** | **str** | The type of the object represented by JSON. This object stores information about redeemables holders | [optional] [default to 'list']
+**data_ref** | **str** | Identifies the name of the JSON property that contains the array of holders. | [optional] [default to 'data']
+**data** | [**List[RedeemableHolder]**](RedeemableHolder.md) | A dictionary that contains an array of holders. | [optional]
+**total** | **int** | Total number of holders assigned to the redeemable. | [optional]
+**has_more** | **bool** | As query results are always limited (by the limit parameter), the `has_more` flag indicates if there are more records for given filter parameters. This lets you know if you can run another request with a `starting_after_id` query or a different limit to get more records returned in the results. | [optional]
+**more_starting_after** | **str** | Returns an ID that can be used to return another page of results. Use the ID in the `starting_after_id` query parameter to display another page of the results occuring after the field with that ID. | [optional]
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/docs/RewardAssignmentParametersLoyalty.md b/docs/RewardAssignmentParametersLoyalty.md
index 96848df1..f6e93040 100644
--- a/docs/RewardAssignmentParametersLoyalty.md
+++ b/docs/RewardAssignmentParametersLoyalty.md
@@ -7,6 +7,7 @@ Defines the equivalent points value of the reward.
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**points** | **int** | The number of points required to redeem the reward. | [optional]
+**auto_redeem** | **bool** | Determines if the reward is redeemed automatically when the customer reaches the sufficient number of points to redeem it. Value `true` means that the automatic reward redemption is active. Only one reward can be set to be redeemed automatically in a loyalty campaign, i.e. only one can have the value `true`. | [optional]
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
diff --git a/docs/RewardsAssignmentsCreateRequestBodyParametersLoyalty.md b/docs/RewardsAssignmentsCreateRequestBodyParametersLoyalty.md
index bc302471..a8c030ae 100644
--- a/docs/RewardsAssignmentsCreateRequestBodyParametersLoyalty.md
+++ b/docs/RewardsAssignmentsCreateRequestBodyParametersLoyalty.md
@@ -7,6 +7,7 @@ Defines the equivalent points value of the reward.
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**points** | **int** | Number of points that will be subtracted from the loyalty card points balance if the reward is redeemed. Must be positive integer. | [optional]
+**auto_redeem** | **bool** | Determines if the reward is redeemed automatically when the customer reaches the sufficient number of points to redeem it. Value `true` means that the automatic reward redemption is active. Only one reward can be set to be redeemed automatically in a loyalty campaign, i.e. only one can have the value `true`. | [optional]
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
diff --git a/docs/RewardsAssignmentsCreateResponseBody.md b/docs/RewardsAssignmentsCreateResponseBody.md
index 3563fcfc..6d3b29bd 100644
--- a/docs/RewardsAssignmentsCreateResponseBody.md
+++ b/docs/RewardsAssignmentsCreateResponseBody.md
@@ -1,6 +1,6 @@
# RewardsAssignmentsCreateResponseBody
-Response body schema for **GET** `v1/rewards/{rewardId}/assignments/{assignmentId}`.
+Response body schema for **POST** `v1/rewards/{rewardId}/assignments/`.
## Properties
diff --git a/docs/RewardsAssignmentsCreateResponseBodyParametersLoyalty.md b/docs/RewardsAssignmentsCreateResponseBodyParametersLoyalty.md
index 9b356b72..12122c22 100644
--- a/docs/RewardsAssignmentsCreateResponseBodyParametersLoyalty.md
+++ b/docs/RewardsAssignmentsCreateResponseBodyParametersLoyalty.md
@@ -7,6 +7,7 @@ Defines the equivalent points value of the reward.
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**points** | **int** | The number of points required to redeem the reward. | [optional]
+**auto_redeem** | **bool** | Determines if the reward is redeemed automatically when the customer reaches the sufficient number of points to redeem it. Value `true` means that the automatic reward redemption is active. Only one reward can be set to be redeemed automatically in a loyalty campaign, i.e. only one can have the value `true`. | [optional]
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
diff --git a/docs/RewardsAssignmentsGetResponseBodyParametersLoyalty.md b/docs/RewardsAssignmentsGetResponseBodyParametersLoyalty.md
index caee23a7..9ef436ea 100644
--- a/docs/RewardsAssignmentsGetResponseBodyParametersLoyalty.md
+++ b/docs/RewardsAssignmentsGetResponseBodyParametersLoyalty.md
@@ -7,6 +7,7 @@ Defines the equivalent points value of the reward.
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**points** | **int** | The number of points required to redeem the reward. | [optional]
+**auto_redeem** | **bool** | Determines if the reward is redeemed automatically when the customer reaches the sufficient number of points to redeem it. Value `true` means that the automatic reward redemption is active. Only one reward can be set to be redeemed automatically in a loyalty campaign, i.e. only one can have the value `true`. | [optional]
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
diff --git a/docs/RewardsAssignmentsUpdateRequestBodyParametersLoyalty.md b/docs/RewardsAssignmentsUpdateRequestBodyParametersLoyalty.md
index 46fcd256..c73d5c8c 100644
--- a/docs/RewardsAssignmentsUpdateRequestBodyParametersLoyalty.md
+++ b/docs/RewardsAssignmentsUpdateRequestBodyParametersLoyalty.md
@@ -7,6 +7,7 @@ Stores the points parameter.
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**points** | **int** | Defines how many points are required to obtain the reward. | [optional]
+**auto_redeem** | **bool** | Determines if the reward is redeemed automatically when the customer reaches the sufficient number of points to redeem it. Value `true` means that the automatic reward redemption is active. Only one reward can be set to be redeemed automatically in a loyalty campaign, i.e. only one can have the value `true`. | [optional]
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
diff --git a/docs/RewardsAssignmentsUpdateResponseBody.md b/docs/RewardsAssignmentsUpdateResponseBody.md
index 3b50ad2f..a97d0c68 100644
--- a/docs/RewardsAssignmentsUpdateResponseBody.md
+++ b/docs/RewardsAssignmentsUpdateResponseBody.md
@@ -1,6 +1,6 @@
# RewardsAssignmentsUpdateResponseBody
-Response body schema for **GET** `v1/rewards/{rewardId}/assignments/{assignmentId}`.
+Response body schema for **PUT** `v1/rewards/{rewardId}/assignments/{assignmentId}`.
## Properties
diff --git a/docs/RewardsAssignmentsUpdateResponseBodyParametersLoyalty.md b/docs/RewardsAssignmentsUpdateResponseBodyParametersLoyalty.md
index 1400b528..4acabf46 100644
--- a/docs/RewardsAssignmentsUpdateResponseBodyParametersLoyalty.md
+++ b/docs/RewardsAssignmentsUpdateResponseBodyParametersLoyalty.md
@@ -7,6 +7,7 @@ Defines the equivalent points value of the reward.
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**points** | **int** | The number of points required to redeem the reward. | [optional]
+**auto_redeem** | **bool** | Determines if the reward is redeemed automatically when the customer reaches the sufficient number of points to redeem it. Value `true` means that the automatic reward redemption is active. Only one reward can be set to be redeemed automatically in a loyalty campaign, i.e. only one can have the value `true`. | [optional]
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
diff --git a/docs/StackingRules.md b/docs/StackingRules.md
index b5d24124..cb49a5a8 100644
--- a/docs/StackingRules.md
+++ b/docs/StackingRules.md
@@ -1,6 +1,6 @@
# StackingRules
-Defines stacking rules for redeemables. Read more in the [Help Center](https://support.voucherify.io/article/604-stacking-rules)
+Defines stacking rules for redeemables. Read more in the [Stacking Rule Documentation](https://support.voucherify.io/article/604-stacking-rules).
## Properties
diff --git a/docs/TemplatesApi.md b/docs/TemplatesApi.md
new file mode 100644
index 00000000..7b10cccb
--- /dev/null
+++ b/docs/TemplatesApi.md
@@ -0,0 +1,634 @@
+# voucherify.TemplatesApi
+
+All URIs are relative to *https://api.voucherify.io*
+
+Method | HTTP request | Description
+------------- | ------------- | -------------
+[**add_tier_from_template**](TemplatesApi.md#add_tier_from_template) | **POST** /v1/templates/campaigns/{campaignTemplateId}/tier-setup | Add Promotion Tier From Template
+[**create_campaign_from_template**](TemplatesApi.md#create_campaign_from_template) | **POST** /v1/templates/campaigns/{campaignTemplateId}/campaign-setup | Create Campaign From Template
+[**create_campaign_template**](TemplatesApi.md#create_campaign_template) | **POST** /v1/templates/campaigns | Create Campaign Template
+[**delete_campaign_template**](TemplatesApi.md#delete_campaign_template) | **DELETE** /v1/templates/campaigns/{campaignTemplateId} | Delete Campaign Template
+[**get_campaign_template**](TemplatesApi.md#get_campaign_template) | **GET** /v1/templates/campaigns/{campaignTemplateId} | Get Campaign Template
+[**list_campaign_templates**](TemplatesApi.md#list_campaign_templates) | **GET** /v1/templates/campaigns | List Campaign Templates
+[**update_campaign_template**](TemplatesApi.md#update_campaign_template) | **PUT** /v1/templates/campaigns/{campaignTemplateId} | Update Campaign Template
+
+
+# **add_tier_from_template**
+> TemplatesCampaignsTierSetupCreateResponseBody add_tier_from_template(campaign_template_id, templates_campaigns_tier_setup_create_request_body=templates_campaigns_tier_setup_create_request_body)
+
+Add Promotion Tier From Template
+
+Creates a promotion tier out of a discount campaign template and adds it to an existing promotion campaign. To add a promotion tier to a campaign, you need to provide the name in the request and the campaign ID. Other fields are optional. If no other fields are sent, the configuration from the template will be used. You can send new values of the fields listed below to replace the settings saved in the template. However, you cannot assign an action or an existing validation rule or create a new one in the request. If the template has a validation rule, a new validation rule is always created for the promotion tier. When the promotion tier has been created, then you can: - Update the validation rule, - Unassign the validation rule, - Assign an existing validation rule. 👍 Promotion Tiers and Campaign Templates You can create a campaign template out of a promotion tier. Promotion tiers are converted to a discount campaign with the DISCOUNT_COUPON type. You can use this template to create: - Discount campaign - Promotion tier 📘 Campaign Templates – Documentation Read the [Campaign Templates documentation](https://support.voucherify.io/article/620-campaign-templates) to learn more about this feature.
+
+### Example
+
+* Api Key Authentication (X-App-Id):
+* Api Key Authentication (X-App-Token):
+
+```python
+import voucherify
+from voucherify.models.templates_campaigns_tier_setup_create_request_body import TemplatesCampaignsTierSetupCreateRequestBody
+from voucherify.models.templates_campaigns_tier_setup_create_response_body import TemplatesCampaignsTierSetupCreateResponseBody
+from voucherify.rest import ApiException
+from pprint import pprint
+
+# Defining the host is optional and defaults to https://api.voucherify.io
+# See configuration.py for a list of all supported configuration parameters.
+configuration = voucherify.Configuration(
+ host = "https://api.voucherify.io"
+)
+
+# The client must configure the authentication and authorization parameters
+# in accordance with the API server security policy.
+# Examples for each auth method are provided below, use the example that
+# satisfies your auth use case.
+
+# Configure API key authorization: X-App-Id
+configuration.api_key['X-App-Id'] = os.environ["API_KEY"]
+
+# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
+# configuration.api_key_prefix['X-App-Id'] = 'Bearer'
+
+# Configure API key authorization: X-App-Token
+configuration.api_key['X-App-Token'] = os.environ["API_KEY"]
+
+# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
+# configuration.api_key_prefix['X-App-Token'] = 'Bearer'
+
+# Enter a context with an instance of the API client
+with voucherify.ApiClient(configuration) as api_client:
+ # Create an instance of the API class
+ api_instance = voucherify.TemplatesApi(api_client)
+ campaign_template_id = 'campaign_template_id_example' # str | Pass the campaign template ID that was assigned by Voucherify.
+ templates_campaigns_tier_setup_create_request_body = voucherify.TemplatesCampaignsTierSetupCreateRequestBody() # TemplatesCampaignsTierSetupCreateRequestBody | Only name and campaign_id are required. The rest of the fields will overwrite the template configuration. (optional)
+
+ try:
+ # Add Promotion Tier From Template
+ api_response = api_instance.add_tier_from_template(campaign_template_id, templates_campaigns_tier_setup_create_request_body=templates_campaigns_tier_setup_create_request_body)
+ print("The response of TemplatesApi->add_tier_from_template:\n")
+ pprint(api_response)
+ except Exception as e:
+ print("Exception when calling TemplatesApi->add_tier_from_template: %s\n" % e)
+```
+
+
+
+### Parameters
+
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **campaign_template_id** | **str**| Pass the campaign template ID that was assigned by Voucherify. |
+ **templates_campaigns_tier_setup_create_request_body** | [**TemplatesCampaignsTierSetupCreateRequestBody**](TemplatesCampaignsTierSetupCreateRequestBody.md)| Only name and campaign_id are required. The rest of the fields will overwrite the template configuration. | [optional]
+
+### Return type
+
+[**TemplatesCampaignsTierSetupCreateResponseBody**](TemplatesCampaignsTierSetupCreateResponseBody.md)
+
+### Authorization
+
+[X-App-Id](../README.md#X-App-Id), [X-App-Token](../README.md#X-App-Token)
+
+### HTTP request headers
+
+ - **Content-Type**: application/json
+ - **Accept**: application/json
+
+### HTTP response details
+
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+**2XX** | Returns the details about the added promotion tier and about the resources that have been created out of the template and added to the project. | - |
+
+[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
+
+# **create_campaign_from_template**
+> TemplatesCampaignsCampaignSetupCreateResponseBody create_campaign_from_template(campaign_template_id, templates_campaigns_campaign_setup_create_request_body=templates_campaigns_campaign_setup_create_request_body)
+
+Create Campaign From Template
+
+Creates a campaign out of a campaign template. To create a campaign, you need to provide the name in the request, while other fields are optional. If no other fields are sent, the configuration from the template will be used. You can send new values of the fields listed below to replace the settings saved in the template. However, you cannot assign an existing validation rule or create a new one in the request. If the template has a validation rule, a new validation rule is always created for the campaign. When the campaign has been created, then you can: - Update the validation rule, - Unassign the validation rule, - Assign an existing validation rule. 👍 Promotion Tiers and Campaign Templates You can create a campaign template out of a promotion tier. Promotion tiers are converted to a discount campaign with the DISCOUNT_COUPON type. You can use this template to create: - Discount campaign - Promotion tier 📘 Campaign Templates – Documentation Read the [Campaign Templates documentation](https://support.voucherify.io/article/620-campaign-templates) to learn more about this feature.
+
+### Example
+
+* Api Key Authentication (X-App-Id):
+* Api Key Authentication (X-App-Token):
+
+```python
+import voucherify
+from voucherify.models.templates_campaigns_campaign_setup_create_request_body import TemplatesCampaignsCampaignSetupCreateRequestBody
+from voucherify.models.templates_campaigns_campaign_setup_create_response_body import TemplatesCampaignsCampaignSetupCreateResponseBody
+from voucherify.rest import ApiException
+from pprint import pprint
+
+# Defining the host is optional and defaults to https://api.voucherify.io
+# See configuration.py for a list of all supported configuration parameters.
+configuration = voucherify.Configuration(
+ host = "https://api.voucherify.io"
+)
+
+# The client must configure the authentication and authorization parameters
+# in accordance with the API server security policy.
+# Examples for each auth method are provided below, use the example that
+# satisfies your auth use case.
+
+# Configure API key authorization: X-App-Id
+configuration.api_key['X-App-Id'] = os.environ["API_KEY"]
+
+# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
+# configuration.api_key_prefix['X-App-Id'] = 'Bearer'
+
+# Configure API key authorization: X-App-Token
+configuration.api_key['X-App-Token'] = os.environ["API_KEY"]
+
+# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
+# configuration.api_key_prefix['X-App-Token'] = 'Bearer'
+
+# Enter a context with an instance of the API client
+with voucherify.ApiClient(configuration) as api_client:
+ # Create an instance of the API class
+ api_instance = voucherify.TemplatesApi(api_client)
+ campaign_template_id = 'campaign_template_id_example' # str | Pass the campaign template ID that was assigned by Voucherify.
+ templates_campaigns_campaign_setup_create_request_body = {"name":"Campaign-out-of-template","description":"Created out of a template","auto_join":true,"join_once":true} # TemplatesCampaignsCampaignSetupCreateRequestBody | Only name is required. The rest of the fields will overwrite the template configuration. (optional)
+
+ try:
+ # Create Campaign From Template
+ api_response = api_instance.create_campaign_from_template(campaign_template_id, templates_campaigns_campaign_setup_create_request_body=templates_campaigns_campaign_setup_create_request_body)
+ print("The response of TemplatesApi->create_campaign_from_template:\n")
+ pprint(api_response)
+ except Exception as e:
+ print("Exception when calling TemplatesApi->create_campaign_from_template: %s\n" % e)
+```
+
+
+
+### Parameters
+
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **campaign_template_id** | **str**| Pass the campaign template ID that was assigned by Voucherify. |
+ **templates_campaigns_campaign_setup_create_request_body** | [**TemplatesCampaignsCampaignSetupCreateRequestBody**](TemplatesCampaignsCampaignSetupCreateRequestBody.md)| Only name is required. The rest of the fields will overwrite the template configuration. | [optional]
+
+### Return type
+
+[**TemplatesCampaignsCampaignSetupCreateResponseBody**](TemplatesCampaignsCampaignSetupCreateResponseBody.md)
+
+### Authorization
+
+[X-App-Id](../README.md#X-App-Id), [X-App-Token](../README.md#X-App-Token)
+
+### HTTP request headers
+
+ - **Content-Type**: application/json
+ - **Accept**: application/json
+
+### HTTP response details
+
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+**2XX** | Returns the details about the created campaign and about the resources that have been created out of the template and added to the project. | - |
+
+[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
+
+# **create_campaign_template**
+> TemplatesCampaignsCreateTemplateResponseBody create_campaign_template(templates_campaigns_create_request_body=templates_campaigns_create_request_body)
+
+Create Campaign Template
+
+Creates a template for a discount or gift campaign, or a promotion tier. A template stores campaign configuration **without** the following details: - Campaign name - Category - Code count The following elements are not supported by campaign templates: - Redeeming API keys - Redeeming users - Customer loyalty tier - Static segments 👍 Promotion Tiers and Campaign Templates You can create a campaign template out of a promotion tier. Promotion tiers are converted to a discount campaign with the DISCOUNT_COUPON type. You can use this template to create: - Discount campaign, - Promotion tier. 📘 Campaign Templates – Documentation Read the [Campaign Templates documentation](https://support.voucherify.io/article/620-campaign-templates) to learn more about this feature.
+
+### Example
+
+* Api Key Authentication (X-App-Id):
+* Api Key Authentication (X-App-Token):
+
+```python
+import voucherify
+from voucherify.models.templates_campaigns_create_request_body import TemplatesCampaignsCreateRequestBody
+from voucherify.models.templates_campaigns_create_template_response_body import TemplatesCampaignsCreateTemplateResponseBody
+from voucherify.rest import ApiException
+from pprint import pprint
+
+# Defining the host is optional and defaults to https://api.voucherify.io
+# See configuration.py for a list of all supported configuration parameters.
+configuration = voucherify.Configuration(
+ host = "https://api.voucherify.io"
+)
+
+# The client must configure the authentication and authorization parameters
+# in accordance with the API server security policy.
+# Examples for each auth method are provided below, use the example that
+# satisfies your auth use case.
+
+# Configure API key authorization: X-App-Id
+configuration.api_key['X-App-Id'] = os.environ["API_KEY"]
+
+# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
+# configuration.api_key_prefix['X-App-Id'] = 'Bearer'
+
+# Configure API key authorization: X-App-Token
+configuration.api_key['X-App-Token'] = os.environ["API_KEY"]
+
+# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
+# configuration.api_key_prefix['X-App-Token'] = 'Bearer'
+
+# Enter a context with an instance of the API client
+with voucherify.ApiClient(configuration) as api_client:
+ # Create an instance of the API class
+ api_instance = voucherify.TemplatesApi(api_client)
+ templates_campaigns_create_request_body = voucherify.TemplatesCampaignsCreateRequestBody() # TemplatesCampaignsCreateRequestBody | Provide details for a campaign template (optional)
+
+ try:
+ # Create Campaign Template
+ api_response = api_instance.create_campaign_template(templates_campaigns_create_request_body=templates_campaigns_create_request_body)
+ print("The response of TemplatesApi->create_campaign_template:\n")
+ pprint(api_response)
+ except Exception as e:
+ print("Exception when calling TemplatesApi->create_campaign_template: %s\n" % e)
+```
+
+
+
+### Parameters
+
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **templates_campaigns_create_request_body** | [**TemplatesCampaignsCreateRequestBody**](TemplatesCampaignsCreateRequestBody.md)| Provide details for a campaign template | [optional]
+
+### Return type
+
+[**TemplatesCampaignsCreateTemplateResponseBody**](TemplatesCampaignsCreateTemplateResponseBody.md)
+
+### Authorization
+
+[X-App-Id](../README.md#X-App-Id), [X-App-Token](../README.md#X-App-Token)
+
+### HTTP request headers
+
+ - **Content-Type**: application/json
+ - **Accept**: application/json
+
+### HTTP response details
+
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+**2XX** | Returns the details of a created campaign template. | - |
+
+[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
+
+# **delete_campaign_template**
+> delete_campaign_template(campaign_template_id)
+
+Delete Campaign Template
+
+Deletes the campaign template permanently. 📘 Campaign Templates – Documentation Read the [Campaign Templates documentation](https://support.voucherify.io/article/620-campaign-templates) to learn more about this feature.
+
+### Example
+
+* Api Key Authentication (X-App-Id):
+* Api Key Authentication (X-App-Token):
+
+```python
+import voucherify
+from voucherify.rest import ApiException
+from pprint import pprint
+
+# Defining the host is optional and defaults to https://api.voucherify.io
+# See configuration.py for a list of all supported configuration parameters.
+configuration = voucherify.Configuration(
+ host = "https://api.voucherify.io"
+)
+
+# The client must configure the authentication and authorization parameters
+# in accordance with the API server security policy.
+# Examples for each auth method are provided below, use the example that
+# satisfies your auth use case.
+
+# Configure API key authorization: X-App-Id
+configuration.api_key['X-App-Id'] = os.environ["API_KEY"]
+
+# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
+# configuration.api_key_prefix['X-App-Id'] = 'Bearer'
+
+# Configure API key authorization: X-App-Token
+configuration.api_key['X-App-Token'] = os.environ["API_KEY"]
+
+# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
+# configuration.api_key_prefix['X-App-Token'] = 'Bearer'
+
+# Enter a context with an instance of the API client
+with voucherify.ApiClient(configuration) as api_client:
+ # Create an instance of the API class
+ api_instance = voucherify.TemplatesApi(api_client)
+ campaign_template_id = 'campaign_template_id_example' # str | Pass the campaign template ID that was assigned by Voucherify.
+
+ try:
+ # Delete Campaign Template
+ api_instance.delete_campaign_template(campaign_template_id)
+ except Exception as e:
+ print("Exception when calling TemplatesApi->delete_campaign_template: %s\n" % e)
+```
+
+
+
+### Parameters
+
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **campaign_template_id** | **str**| Pass the campaign template ID that was assigned by Voucherify. |
+
+### Return type
+
+void (empty response body)
+
+### Authorization
+
+[X-App-Id](../README.md#X-App-Id), [X-App-Token](../README.md#X-App-Token)
+
+### HTTP request headers
+
+ - **Content-Type**: Not defined
+ - **Accept**: Not defined
+
+### HTTP response details
+
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+**2XX** | Returns no content if deletion is successful. | - |
+
+[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
+
+# **get_campaign_template**
+> TemplatesCampaignsGetResponseBody get_campaign_template(campaign_template_id)
+
+Get Campaign Template
+
+Retrieves a campaign template available in the project. 📘 Campaign Templates – Documentation Read the [Campaign Templates documentation](https://support.voucherify.io/article/620-campaign-templates) to learn more about this feature.
+
+### Example
+
+* Api Key Authentication (X-App-Id):
+* Api Key Authentication (X-App-Token):
+
+```python
+import voucherify
+from voucherify.models.templates_campaigns_get_response_body import TemplatesCampaignsGetResponseBody
+from voucherify.rest import ApiException
+from pprint import pprint
+
+# Defining the host is optional and defaults to https://api.voucherify.io
+# See configuration.py for a list of all supported configuration parameters.
+configuration = voucherify.Configuration(
+ host = "https://api.voucherify.io"
+)
+
+# The client must configure the authentication and authorization parameters
+# in accordance with the API server security policy.
+# Examples for each auth method are provided below, use the example that
+# satisfies your auth use case.
+
+# Configure API key authorization: X-App-Id
+configuration.api_key['X-App-Id'] = os.environ["API_KEY"]
+
+# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
+# configuration.api_key_prefix['X-App-Id'] = 'Bearer'
+
+# Configure API key authorization: X-App-Token
+configuration.api_key['X-App-Token'] = os.environ["API_KEY"]
+
+# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
+# configuration.api_key_prefix['X-App-Token'] = 'Bearer'
+
+# Enter a context with an instance of the API client
+with voucherify.ApiClient(configuration) as api_client:
+ # Create an instance of the API class
+ api_instance = voucherify.TemplatesApi(api_client)
+ campaign_template_id = 'campaign_template_id_example' # str | Pass the campaign template ID that was assigned by Voucherify.
+
+ try:
+ # Get Campaign Template
+ api_response = api_instance.get_campaign_template(campaign_template_id)
+ print("The response of TemplatesApi->get_campaign_template:\n")
+ pprint(api_response)
+ except Exception as e:
+ print("Exception when calling TemplatesApi->get_campaign_template: %s\n" % e)
+```
+
+
+
+### Parameters
+
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **campaign_template_id** | **str**| Pass the campaign template ID that was assigned by Voucherify. |
+
+### Return type
+
+[**TemplatesCampaignsGetResponseBody**](TemplatesCampaignsGetResponseBody.md)
+
+### Authorization
+
+[X-App-Id](../README.md#X-App-Id), [X-App-Token](../README.md#X-App-Token)
+
+### HTTP request headers
+
+ - **Content-Type**: Not defined
+ - **Accept**: application/json
+
+### HTTP response details
+
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+**2XX** | Returns the details about a campaign template. | - |
+
+[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
+
+# **list_campaign_templates**
+> TemplatesCampaignsListResponseBody list_campaign_templates(limit=limit, starting_after_id=starting_after_id, order=order, include_total=include_total, filters=filters)
+
+List Campaign Templates
+
+Lists all campaign templates available in the project. 📘 Campaign Templates – Documentation Read the [Campaign Templates documentation](https://support.voucherify.io/article/620-campaign-templates) to learn more about this feature.
+
+### Example
+
+* Api Key Authentication (X-App-Id):
+* Api Key Authentication (X-App-Token):
+
+```python
+import voucherify
+from voucherify.models.parameter_filters_list_templates import ParameterFiltersListTemplates
+from voucherify.models.parameter_templates_list import ParameterTemplatesList
+from voucherify.models.templates_campaigns_list_response_body import TemplatesCampaignsListResponseBody
+from voucherify.rest import ApiException
+from pprint import pprint
+
+# Defining the host is optional and defaults to https://api.voucherify.io
+# See configuration.py for a list of all supported configuration parameters.
+configuration = voucherify.Configuration(
+ host = "https://api.voucherify.io"
+)
+
+# The client must configure the authentication and authorization parameters
+# in accordance with the API server security policy.
+# Examples for each auth method are provided below, use the example that
+# satisfies your auth use case.
+
+# Configure API key authorization: X-App-Id
+configuration.api_key['X-App-Id'] = os.environ["API_KEY"]
+
+# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
+# configuration.api_key_prefix['X-App-Id'] = 'Bearer'
+
+# Configure API key authorization: X-App-Token
+configuration.api_key['X-App-Token'] = os.environ["API_KEY"]
+
+# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
+# configuration.api_key_prefix['X-App-Token'] = 'Bearer'
+
+# Enter a context with an instance of the API client
+with voucherify.ApiClient(configuration) as api_client:
+ # Create an instance of the API class
+ api_instance = voucherify.TemplatesApi(api_client)
+ limit = 56 # int | Limits the number of objects to be returned. The limit can range between 1 and 100 items. If no limit is set, it returns 10 items. (optional)
+ starting_after_id = 'starting_after_id_example' # str | A cursor for pagination. It retrieves the campaign templates created after a template with the given ID. (optional)
+ order = voucherify.ParameterTemplatesList() # ParameterTemplatesList | Sorts the results using one of the filtering options, where the dash - preceding a sorting option means sorting in a descending order. (optional)
+ include_total = True # bool | If set to true, the response returns the number of all campaign templates, regardless of the applied filters or limits. Set to false by default. (optional)
+ filters = voucherify.ParameterFiltersListTemplates() # ParameterFiltersListTemplates | Filters for listing templates. (optional)
+
+ try:
+ # List Campaign Templates
+ api_response = api_instance.list_campaign_templates(limit=limit, starting_after_id=starting_after_id, order=order, include_total=include_total, filters=filters)
+ print("The response of TemplatesApi->list_campaign_templates:\n")
+ pprint(api_response)
+ except Exception as e:
+ print("Exception when calling TemplatesApi->list_campaign_templates: %s\n" % e)
+```
+
+
+
+### Parameters
+
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **limit** | **int**| Limits the number of objects to be returned. The limit can range between 1 and 100 items. If no limit is set, it returns 10 items. | [optional]
+ **starting_after_id** | **str**| A cursor for pagination. It retrieves the campaign templates created after a template with the given ID. | [optional]
+ **order** | [**ParameterTemplatesList**](.md)| Sorts the results using one of the filtering options, where the dash - preceding a sorting option means sorting in a descending order. | [optional]
+ **include_total** | **bool**| If set to true, the response returns the number of all campaign templates, regardless of the applied filters or limits. Set to false by default. | [optional]
+ **filters** | [**ParameterFiltersListTemplates**](.md)| Filters for listing templates. | [optional]
+
+### Return type
+
+[**TemplatesCampaignsListResponseBody**](TemplatesCampaignsListResponseBody.md)
+
+### Authorization
+
+[X-App-Id](../README.md#X-App-Id), [X-App-Token](../README.md#X-App-Token)
+
+### HTTP request headers
+
+ - **Content-Type**: Not defined
+ - **Accept**: application/json
+
+### HTTP response details
+
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+**2XX** | Returns a dictionary of campaign template objects. The templates are returned by creation date by default. The most recent objects appear last unless specified otherwise with the `order` parameter. | - |
+
+[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
+
+# **update_campaign_template**
+> TemplatesCampaignsUpdateResponseBody update_campaign_template(campaign_template_id, templates_campaigns_update_request_body=templates_campaigns_update_request_body)
+
+Update Campaign Template
+
+Updates the name or description of the campaign template. 📘 Campaign Templates – Documentation Read the [Campaign Templates documentation](https://support.voucherify.io/article/620-campaign-templates) to learn more about this feature.
+
+### Example
+
+* Api Key Authentication (X-App-Id):
+* Api Key Authentication (X-App-Token):
+
+```python
+import voucherify
+from voucherify.models.templates_campaigns_update_request_body import TemplatesCampaignsUpdateRequestBody
+from voucherify.models.templates_campaigns_update_response_body import TemplatesCampaignsUpdateResponseBody
+from voucherify.rest import ApiException
+from pprint import pprint
+
+# Defining the host is optional and defaults to https://api.voucherify.io
+# See configuration.py for a list of all supported configuration parameters.
+configuration = voucherify.Configuration(
+ host = "https://api.voucherify.io"
+)
+
+# The client must configure the authentication and authorization parameters
+# in accordance with the API server security policy.
+# Examples for each auth method are provided below, use the example that
+# satisfies your auth use case.
+
+# Configure API key authorization: X-App-Id
+configuration.api_key['X-App-Id'] = os.environ["API_KEY"]
+
+# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
+# configuration.api_key_prefix['X-App-Id'] = 'Bearer'
+
+# Configure API key authorization: X-App-Token
+configuration.api_key['X-App-Token'] = os.environ["API_KEY"]
+
+# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
+# configuration.api_key_prefix['X-App-Token'] = 'Bearer'
+
+# Enter a context with an instance of the API client
+with voucherify.ApiClient(configuration) as api_client:
+ # Create an instance of the API class
+ api_instance = voucherify.TemplatesApi(api_client)
+ campaign_template_id = 'campaign_template_id_example' # str | Pass the campaign template ID that was assigned by Voucherify.
+ templates_campaigns_update_request_body = voucherify.TemplatesCampaignsUpdateRequestBody() # TemplatesCampaignsUpdateRequestBody | Provide the new name or description for the campaign template (optional)
+
+ try:
+ # Update Campaign Template
+ api_response = api_instance.update_campaign_template(campaign_template_id, templates_campaigns_update_request_body=templates_campaigns_update_request_body)
+ print("The response of TemplatesApi->update_campaign_template:\n")
+ pprint(api_response)
+ except Exception as e:
+ print("Exception when calling TemplatesApi->update_campaign_template: %s\n" % e)
+```
+
+
+
+### Parameters
+
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **campaign_template_id** | **str**| Pass the campaign template ID that was assigned by Voucherify. |
+ **templates_campaigns_update_request_body** | [**TemplatesCampaignsUpdateRequestBody**](TemplatesCampaignsUpdateRequestBody.md)| Provide the new name or description for the campaign template | [optional]
+
+### Return type
+
+[**TemplatesCampaignsUpdateResponseBody**](TemplatesCampaignsUpdateResponseBody.md)
+
+### Authorization
+
+[X-App-Id](../README.md#X-App-Id), [X-App-Token](../README.md#X-App-Token)
+
+### HTTP request headers
+
+ - **Content-Type**: application/json
+ - **Accept**: application/json
+
+### HTTP response details
+
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+**2XX** | Returns the details of an updated campaign template. | - |
+
+[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
+
diff --git a/docs/TemplatesCampaignsCampaignSetupCreateRequestBody.md b/docs/TemplatesCampaignsCampaignSetupCreateRequestBody.md
new file mode 100644
index 00000000..1322677b
--- /dev/null
+++ b/docs/TemplatesCampaignsCampaignSetupCreateRequestBody.md
@@ -0,0 +1,29 @@
+# TemplatesCampaignsCampaignSetupCreateRequestBody
+
+Request body schema for **POST** `/v1/templates/campaigns/{campaignTemplateId}/campaign-setup`.
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**name** | **str** | Campaign name. | [optional]
+**description** | **str** | An optional field to keep any extra textual information about the campaign such as a campaign description and details. | [optional]
+**type** | **str** | Defines whether the campaign can be updated with new vouchers after campaign creation. - `AUTO_UPDATE`: By choosing the auto update option you will create a campaign that can be enhanced by new vouchers after the time of creation (e.g. by publish vouchers method). - `STATIC`: vouchers need to be manually published. | [optional]
+**join_once** | **bool** | If this value is set to `true`, customers will be able to join the campaign only once. | [optional]
+**auto_join** | **bool** | Indicates whether customers will be able to auto-join a loyalty campaign if any earning rule is fulfilled. | [optional]
+**use_voucher_metadata_schema** | **bool** | Flag indicating whether the campaign is to use the voucher's metadata schema instead of the campaign metadata schema. | [optional]
+**vouchers_count** | **int** | Total number of unique vouchers in campaign (size of campaign). | [optional]
+**start_date** | **datetime** | Activation timestamp defines when the campaign starts to be active in ISO 8601 format. Campaign is *inactive before* this date. | [optional]
+**expiration_date** | **datetime** | Expiration timestamp defines when the campaign expires in ISO 8601 format. Campaign is *inactive after* this date. | [optional]
+**validity_timeframe** | [**ValidityTimeframe**](ValidityTimeframe.md) | | [optional]
+**validity_day_of_week** | **List[int]** | Integer array corresponding to the particular days of the week in which the voucher is valid. - `0` Sunday - `1` Monday - `2` Tuesday - `3` Wednesday - `4` Thursday - `5` Friday - `6` Saturday | [optional]
+**validity_hours** | [**ValidityHours**](ValidityHours.md) | | [optional]
+**activity_duration_after_publishing** | **str** | Defines the amount of time the vouchers will be active after publishing. The value is shown in the ISO 8601 format. For example, a voucher with the value of P24D will be valid for a duration of 24 days. | [optional]
+**category_id** | **str** | Unique category ID that this campaign belongs to. Either pass this parameter OR the `category`. | [optional]
+**category** | **str** | The category assigned to the campaign. Either pass this parameter OR the `category_id`. | [optional]
+**metadata** | **object** | The metadata object stores all custom attributes assigned to the campaign. A set of key/value pairs that you can attach to a campaign object. It can be useful for storing additional information about the campaign in a structured format. | [optional]
+**voucher** | [**TemplatesCampaignsCampaignSetupCreateRequestBodyVoucher**](TemplatesCampaignsCampaignSetupCreateRequestBodyVoucher.md) | | [optional]
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/docs/TemplatesCampaignsCampaignSetupCreateRequestBodyVoucher.md b/docs/TemplatesCampaignsCampaignSetupCreateRequestBodyVoucher.md
new file mode 100644
index 00000000..a507c375
--- /dev/null
+++ b/docs/TemplatesCampaignsCampaignSetupCreateRequestBodyVoucher.md
@@ -0,0 +1,14 @@
+# TemplatesCampaignsCampaignSetupCreateRequestBodyVoucher
+
+
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**code_config** | [**CodeConfig**](CodeConfig.md) | | [optional]
+**redemption** | [**TemplatesCampaignsCampaignSetupCreateRequestBodyVoucherRedemption**](TemplatesCampaignsCampaignSetupCreateRequestBodyVoucherRedemption.md) | | [optional]
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/docs/TemplatesCampaignsCampaignSetupCreateRequestBodyVoucherRedemption.md b/docs/TemplatesCampaignsCampaignSetupCreateRequestBodyVoucherRedemption.md
new file mode 100644
index 00000000..c784ca59
--- /dev/null
+++ b/docs/TemplatesCampaignsCampaignSetupCreateRequestBodyVoucherRedemption.md
@@ -0,0 +1,13 @@
+# TemplatesCampaignsCampaignSetupCreateRequestBodyVoucherRedemption
+
+Stores the quantity of redemptions that can be applied to the voucher.
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**quantity** | **int** | How many times a voucher can be redeemed. A `null` value means unlimited. | [optional]
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/docs/TemplatesCampaignsCampaignSetupCreateResponseBody.md b/docs/TemplatesCampaignsCampaignSetupCreateResponseBody.md
new file mode 100644
index 00000000..ea2dee55
--- /dev/null
+++ b/docs/TemplatesCampaignsCampaignSetupCreateResponseBody.md
@@ -0,0 +1,15 @@
+# TemplatesCampaignsCampaignSetupCreateResponseBody
+
+Response body schema for **POST** `/v1/templates/campaigns/{campaignTemplateId}/campaign-setup`.
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**created_resources** | [**List[TemplatesCampaignsCampaignSetupCreateResponseBodyCreatedResourcesItem]**](TemplatesCampaignsCampaignSetupCreateResponseBodyCreatedResourcesItem.md) | Contains a list of resources that have been added to the project when the campaign has been created out of the template. | [optional]
+**campaign** | [**Campaign**](Campaign.md) | |
+**object** | **str** | The type of the object represented by JSON. This object stores information about the campaign created out of the campaign template. | [optional] [default to 'campaign_setup']
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/docs/TemplatesCampaignsCampaignSetupCreateResponseBodyCreatedResourcesItem.md b/docs/TemplatesCampaignsCampaignSetupCreateResponseBodyCreatedResourcesItem.md
new file mode 100644
index 00000000..b389e1c5
--- /dev/null
+++ b/docs/TemplatesCampaignsCampaignSetupCreateResponseBodyCreatedResourcesItem.md
@@ -0,0 +1,13 @@
+# TemplatesCampaignsCampaignSetupCreateResponseBodyCreatedResourcesItem
+
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**id** | **str** | Unique identifier assigned to the created resource. It is assigned by Voucherify. | [optional]
+**object** | **str** | The type of the created resource. | [optional]
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/docs/TemplatesCampaignsCreateRequestBody.md b/docs/TemplatesCampaignsCreateRequestBody.md
new file mode 100644
index 00000000..1aa3da5b
--- /dev/null
+++ b/docs/TemplatesCampaignsCreateRequestBody.md
@@ -0,0 +1,16 @@
+# TemplatesCampaignsCreateRequestBody
+
+Request body schema for **POST** `/templates/campaign`.
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**campaign_id** | **str** | Unique identifier of the campaign that will create a template. It must be an ID of an existing discount or gift card campaign. It cannot be passed when `promotion_tier_id` has value. Required when the `promotion_tier_id` is not passed or it is `null`. | [optional]
+**promotion_tier_id** | **str** | Unique identifier of the promotion tier that will create a template. It cannot be passed when `campaign_id` has value. Required when the `campaign_id` is not passed or it is `null`. | [optional]
+**name** | **str** | User-defined name of the campaign template. It must be unique. | [optional]
+**description** | **str** | User-defined description of the campaign template. | [optional]
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/docs/TemplatesCampaignsCreateTemplateResponseBody.md b/docs/TemplatesCampaignsCreateTemplateResponseBody.md
new file mode 100644
index 00000000..bd1324ed
--- /dev/null
+++ b/docs/TemplatesCampaignsCreateTemplateResponseBody.md
@@ -0,0 +1,18 @@
+# TemplatesCampaignsCreateTemplateResponseBody
+
+Response body schema for **POST** `/v1/templates/campaigns`.
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**id** | **str** | Unique identifier of the campaign template. It is assigned by Voucherify. | [optional]
+**name** | **str** | User-defined name of the campaign template. | [optional]
+**description** | **str** | User-defined description of the campaign template. | [optional]
+**campaign_type** | **str** | Type of the campaign used to create the campaign template. Templates created from a promotion tier are converted to `DISCOUNT_COUPONS`. | [optional]
+**created_at** | **datetime** | Timestamp representing the date and time when the campaign template was created. The value is shown in the ISO 8601 format. | [optional]
+**object** | **str** | The type of the object represented by JSON. | [optional] [default to 'campaign_template']
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/docs/TemplatesCampaignsGetResponseBody.md b/docs/TemplatesCampaignsGetResponseBody.md
new file mode 100644
index 00000000..a7833ae1
--- /dev/null
+++ b/docs/TemplatesCampaignsGetResponseBody.md
@@ -0,0 +1,19 @@
+# TemplatesCampaignsGetResponseBody
+
+Response body schema for **GET** `/v1/templates/campaign/{campaignTemplateId}`.
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**id** | **str** | Unique identifier of the campaign template. It is assigned by Voucherify. | [optional]
+**name** | **str** | User-defined name of the campaign template. | [optional]
+**description** | **str** | User-defined description of the campaign template. | [optional]
+**campaign_type** | **str** | Type of the campaign used to create the campaign template. Templates created from a promotion tier are converted to `DISCOUNT_COUPONS`. | [optional]
+**created_at** | **datetime** | Timestamp representing the date and time when the campaign template was created. The value is shown in the ISO 8601 format. | [optional]
+**object** | **str** | The type of the object represented by JSON. | [optional] [default to 'campaign_template']
+**updated_at** | **datetime** | Timestamp representing the date and time when the campaign template was last updated. The value is shown in the ISO 8601 format. | [optional]
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/docs/TemplatesCampaignsListResponseBody.md b/docs/TemplatesCampaignsListResponseBody.md
new file mode 100644
index 00000000..eed00971
--- /dev/null
+++ b/docs/TemplatesCampaignsListResponseBody.md
@@ -0,0 +1,18 @@
+# TemplatesCampaignsListResponseBody
+
+Response body schema for **GET** `/v1/templates/campaign`.
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**object** | **str** | The type of the object represented by JSON. This object stores information about campaign templates. | [optional] [default to 'list']
+**data_ref** | **str** | Identifies the name of the JSON property that contains the array of campaign templates. | [optional] [default to 'data']
+**data** | [**List[CampaignTemplate]**](CampaignTemplate.md) | Dictionary that contains an array of campaign templates. | [optional]
+**total** | **int** | Total number of templates, regardless of the applied query parameters. Displayed only if the `include_total` query paremeter is set to `true`. | [optional]
+**has_more** | **bool** | As query results are always limited (by the limit parameter), the `has_more` flag indicates if there are more records for given filter parameters. This lets you know if you can run another request to get more records returned in the results. | [optional]
+**more_starting_after** | **str** | Returns an ID that can be used to return another page of results. Use the template ID in the `starting_after_id` query parameter to display another page of the results starting after the template with that ID. | [optional]
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/docs/TemplatesCampaignsTierSetupCreateRequestBody.md b/docs/TemplatesCampaignsTierSetupCreateRequestBody.md
new file mode 100644
index 00000000..91feca70
--- /dev/null
+++ b/docs/TemplatesCampaignsTierSetupCreateRequestBody.md
@@ -0,0 +1,25 @@
+# TemplatesCampaignsTierSetupCreateRequestBody
+
+Request body schema for **POST** `/v1/templates/campaigns/{campaignTemplateId}/tier-setup`.
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**campaign_id** | **str** | Unique campaign identifier, assigned by Voucherify. Defines the promotion campaign to which the promotion tier will be added. | [optional]
+**name** | **str** | Name of the promotion tier. | [optional]
+**banner** | **str** | Text to be displayed to your customers on your website. | [optional]
+**metadata** | **object** | The metadata object stores all custom attributes assigned to the promotion tier. A set of key/value pairs that you can attach to a promotion tier object. It can be useful for storing additional information about the promotion tier in a structured format. | [optional]
+**hierarchy** | **int** | The promotions hierarchy defines the order in which the discounts from different tiers will be applied to a customer's order. If a customer qualifies for discounts from more than one tier, discounts will be applied in the order defined in the hierarchy. | [optional]
+**active** | **bool** | A flag to toggle the promotion tier on or off. You can disable a promotion tier even though it's within the active period defined by the `start_date` and `expiration_date`. - `true` indicates an *active* promotion tier - `false` indicates an *inactive* promotion tier | [optional]
+**start_date** | **datetime** | Activation timestamp defines when the promotion tier starts to be active in ISO 8601 format. Promotion tier is *inactive before* this date. | [optional]
+**expiration_date** | **datetime** | Activation timestamp defines when the promotion tier expires in ISO 8601 format. Promotion tier is *inactive after* this date. | [optional]
+**validity_timeframe** | [**ValidityTimeframe**](ValidityTimeframe.md) | | [optional]
+**validity_day_of_week** | **List[int]** | Integer array corresponding to the particular days of the week in which the voucher is valid. - `0` Sunday - `1` Monday - `2` Tuesday - `3` Wednesday - `4` Thursday - `5` Friday - `6` Saturday | [optional]
+**validity_hours** | [**ValidityHours**](ValidityHours.md) | | [optional]
+**category** | **str** | Assign a new or update the promotion tier's category using name. | [optional]
+**category_id** | **str** | Assign a new or update the promotion tier's category using id | [optional]
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/docs/TemplatesCampaignsTierSetupCreateResponseBody.md b/docs/TemplatesCampaignsTierSetupCreateResponseBody.md
new file mode 100644
index 00000000..afac3596
--- /dev/null
+++ b/docs/TemplatesCampaignsTierSetupCreateResponseBody.md
@@ -0,0 +1,15 @@
+# TemplatesCampaignsTierSetupCreateResponseBody
+
+Response body schema for **POST** `/v1/templates/campaigns/{campaignTemplateId}/tier-setup`.
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**created_resources** | [**List[TemplatesCampaignsTierSetupCreateResponseBodyCreatedResourcesItem]**](TemplatesCampaignsTierSetupCreateResponseBodyCreatedResourcesItem.md) | Contains a list of resources that have been added to the project when the promotion tier has been created out of the template. | [optional]
+**promotion_tier** | [**PromotionTier**](PromotionTier.md) | | [optional]
+**object** | **str** | The type of the object represented by JSON. This object stores information about the campaign created out of the campaign template. | [optional] [default to 'promotion_tier_setup']
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/docs/TemplatesCampaignsTierSetupCreateResponseBodyCreatedResourcesItem.md b/docs/TemplatesCampaignsTierSetupCreateResponseBodyCreatedResourcesItem.md
new file mode 100644
index 00000000..32b8062c
--- /dev/null
+++ b/docs/TemplatesCampaignsTierSetupCreateResponseBodyCreatedResourcesItem.md
@@ -0,0 +1,13 @@
+# TemplatesCampaignsTierSetupCreateResponseBodyCreatedResourcesItem
+
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**id** | **str** | Unique identifier assigned to the created resource. It is assigned by Voucherify. | [optional]
+**object** | **str** | The type of the created resource. | [optional]
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/docs/TemplatesCampaignsUpdateRequestBody.md b/docs/TemplatesCampaignsUpdateRequestBody.md
new file mode 100644
index 00000000..ad1170b3
--- /dev/null
+++ b/docs/TemplatesCampaignsUpdateRequestBody.md
@@ -0,0 +1,14 @@
+# TemplatesCampaignsUpdateRequestBody
+
+Request body schema for **PUT** `/templates/campaign/{campaignTemplateId}`.
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**name** | **str** | User-defined name of the campaign template. It must be unique. | [optional]
+**description** | **str** | User-defined description of the campaign template. | [optional]
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/docs/TemplatesCampaignsUpdateResponseBody.md b/docs/TemplatesCampaignsUpdateResponseBody.md
new file mode 100644
index 00000000..d1826527
--- /dev/null
+++ b/docs/TemplatesCampaignsUpdateResponseBody.md
@@ -0,0 +1,19 @@
+# TemplatesCampaignsUpdateResponseBody
+
+Request body schema for **PUT** `/templates/campaign/{campaignTemplateId}`.
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**id** | **str** | Unique identifier of the campaign template. It is assigned by Voucherify. | [optional]
+**name** | **str** | User-defined name of the campaign template. | [optional]
+**description** | **str** | User-defined description of the campaign template. | [optional]
+**campaign_type** | **str** | Type of the campaign used to create the campaign template. Templates created from a promotion tier are converted to `DISCOUNT_COUPONS`. | [optional]
+**created_at** | **datetime** | Timestamp representing the date and time when the campaign template was created. The value is shown in the ISO 8601 format. | [optional]
+**object** | **str** | The type of the object represented by JSON. | [optional] [default to 'campaign_template']
+**updated_at** | **datetime** | Timestamp representing the date and time when the campaign template was last updated. The value is shown in the ISO 8601 format. | [optional]
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/docs/TrashBinItem.md b/docs/TrashBinItem.md
new file mode 100644
index 00000000..58111ada
--- /dev/null
+++ b/docs/TrashBinItem.md
@@ -0,0 +1,20 @@
+# TrashBinItem
+
+Resource moved to the bin, i.e. a campaign, product, SKU, or voucher.
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**id** | **str** | Unique identifier of the trash bin entry. It should not be confused with the ID of the resource moved to the bin. | [optional]
+**created_at** | **datetime** | Timestamp representing the date and time when the resource was moved to the bin. The value for this parameter is shown in the ISO 8601 format. | [optional]
+**deleted_by_user_id** | **str** | Unique identifier of the user who moved the resource to the bin. It returns a user ID if the resource was moved to the bin through an action in the website. It returns a `null` if the resource was deleted through the API. | [optional]
+**resource_id** | **str** | Unique identifier of the resource moved to the bin, i.e. an ID of a campaign, product, SKU, or voucher. | [optional]
+**resource_type** | **str** | Type of the resource moved to the bin. | [optional]
+**resource_name** | **str** | Name of the resouce moved to the bin. It is the name of the campaign, product or SKU, or the voucher code. | [optional]
+**resource_parent_id** | **str** | Unique identifier of the parent resource. For a voucher, it is a campaign ID, except for standalone vouchers. For an SKU, it is the product ID. It returns `null` for campaigns and base products. | [optional]
+**object** | **str** | The type of the object represented by JSON. It is equal to the `resource_type`. | [optional]
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/docs/TrashBinListResponseBody.md b/docs/TrashBinListResponseBody.md
new file mode 100644
index 00000000..ebad51dc
--- /dev/null
+++ b/docs/TrashBinListResponseBody.md
@@ -0,0 +1,18 @@
+# TrashBinListResponseBody
+
+Retrieves a list of the resources moved the bin.
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**object** | **str** | The type of the object represented by JSON. This object stores information about the bin entries in a dictionary. | [optional] [default to 'list']
+**data_ref** | **str** | Identifies the name of the attribute that contains the array of bin entry objects. | [optional] [default to 'data']
+**data** | [**List[TrashBinItem]**](TrashBinItem.md) | Array of bin entry objects. | [optional]
+**total** | **int** | The total number of bin entries. This is the number of the entries returned in the array, not the number of all matching results or all resources currently moved to the bin. | [optional]
+**has_more** | **bool** | As query results are always limited (by the limit parameter), the `has_more` flag indicates if there are more records for given filter parameters. This lets you know if you can run another request with a `starting_after_id` query or a different limit to get more records returned in the results. | [optional]
+**more_starting_after** | **str** | If `has_more` is `true`, it returns an ID that can be used to return another page of results. Use the ID in the `starting_after_id` query parameter to display another page of the results occuring after the field with that ID. | [optional]
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/docs/UsageNotifications.md b/docs/UsageNotifications.md
new file mode 100644
index 00000000..7ac101b6
--- /dev/null
+++ b/docs/UsageNotifications.md
@@ -0,0 +1,15 @@
+# UsageNotifications
+
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**enabled** | **bool** | Enables the notification. | [optional]
+**value** | **int** | The percent value of the limit which, when reached, triggers the notification. | [optional]
+**in_app** | **bool** | Enables the notification in the application. | [optional]
+**emails** | **List[str]** | An array of email addresses which will receive the notification. | [optional]
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/docs/User.md b/docs/User.md
new file mode 100644
index 00000000..234282bd
--- /dev/null
+++ b/docs/User.md
@@ -0,0 +1,19 @@
+# User
+
+Details about the user.
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**id** | **str** | The unique identifier of the user who has been assigned to the project. | [optional]
+**login** | **str** | The login data of the user who has been assigned to the project. | [optional]
+**email** | **str** | The email address of the user who has been assigned to the project. | [optional]
+**first_name** | **str** | The first name of the user who has been assigned to the project. | [optional]
+**last_name** | **str** | The last name of the user who has been assigned to the project. | [optional]
+**projects** | **object** | Lists key-value pairs, where the key is the project to which the user is assigned. The value is the role assigned in a given project. The predefined Voucherify roles are: `ADMIN`, `USER`, `VIEWER`, `MERCHANT`, `USER_RESTRICTED` (for the Areas and Stores, an Enterprise feature). | [optional]
+**is_owner** | **bool** | Determines if the user is the owner for the organization in Voucherify. | [optional]
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/docs/ValidationRule.md b/docs/ValidationRule.md
index d2e9fac4..5bede5c4 100644
--- a/docs/ValidationRule.md
+++ b/docs/ValidationRule.md
@@ -10,7 +10,7 @@ Name | Type | Description | Notes
**error** | [**ValidationRuleError**](ValidationRuleError.md) | | [optional]
**applicable_to** | [**ValidationRuleApplicableTo**](ValidationRuleApplicableTo.md) | | [optional]
**type** | **str** | Type of validation rule. | [optional] [default to 'expression']
-**context_type** | **str** | Validation rule context type. | **Context Type** | **Definition** | |:---|:---| | earning_rule.order.paid | | | earning_rule.custom_event | | | earning_rule.customer.segment.entered | | | campaign.discount_coupons | | | campaign.discount_coupons.discount.apply_to_order | | | campaign.discount_coupons.discount.apply_to_items | | | campaign.discount_coupons.discount.apply_to_items_proportionally | | | campaign.discount_coupons.discount.apply_to_items_proportionally_by_quantity | | | campaign.discount_coupons.discount.fixed.apply_to_items | | | campaign.gift_vouchers | | | campaign.gift_vouchers.gift.apply_to_order | | | campaign.gift_vouchers.gift.apply_to_items | | | campaign.referral_program | | | campaign.referral_program.discount.apply_to_order | | | campaign.referral_program.discount.apply_to_items | | | campaign.referral_program.discount.apply_to_items_proportionally | | | campaign.referral_program.discount.apply_to_items_proportionally_by_quantity | | | campaign.referral_program.discount.fixed.apply_to_items | | | campaign.promotion | | | campaign.promotion.discount.apply_to_order | | | campaign.promotion.discount.apply_to_items | | | campaign.promotion.discount.apply_to_items_proportionally | | | campaign.promotion.discount.apply_to_items_proportionally_by_quantity | | | campaign.promotion.discount.fixed.apply_to_items | | | campaign.loyalty_program | | | campaign.lucky_draw | | | voucher.discount_voucher | | | voucher.discount_voucher.discount.apply_to_order | | | voucher.discount_voucher.discount.apply_to_items | | | voucher.discount_voucher.discount.apply_to_items_proportionally | | | voucher.discount_voucher.discount.apply_to_items_proportionally_by_quantity | | | voucher.discount_voucher.discount.fixed.apply_to_items | | | voucher.gift_voucher | | | voucher.gift_voucher.gift.apply_to_order | | | voucher.gift_voucher.gift.apply_to_items | | | voucher.loyalty_card | | | voucher.lucky_draw_code | | | distribution.custom_event | | | reward_assignment.pay_with_points | | | global | | | [optional] [default to 'global']
+**context_type** | **str** | Validation rule context type. | **Context Type** | **Definition** | |:---|:---| | earning_rule.order.paid | | | earning_rule.custom_event | | | earning_rule.customer.segment.entered | | | campaign.discount_coupons | | | campaign.discount_coupons.discount.apply_to_order | | | campaign.discount_coupons.discount.apply_to_items | | | campaign.discount_coupons.discount.apply_to_items_proportionally | | | campaign.discount_coupons.discount.apply_to_items_proportionally_by_quantity | | | campaign.discount_coupons.discount.fixed.apply_to_items | | | campaign.gift_vouchers | | | campaign.gift_vouchers.gift.apply_to_order | | | campaign.gift_vouchers.gift.apply_to_items | | | campaign.referral_program | | | campaign.referral_program.discount.apply_to_order | | | campaign.referral_program.discount.apply_to_items | | | campaign.referral_program.discount.apply_to_items_proportionally | | | campaign.referral_program.discount.apply_to_items_proportionally_by_quantity | | | campaign.referral_program.discount.fixed.apply_to_items | | | campaign.promotion | | | campaign.promotion.discount.apply_to_order | | | campaign.promotion.discount.apply_to_items | | | campaign.promotion.discount.apply_to_items_proportionally | | | campaign.promotion.discount.apply_to_items_proportionally_by_quantity | | | campaign.promotion.discount.fixed.apply_to_items | | | campaign.loyalty_program | | | voucher.discount_voucher | | | voucher.discount_voucher.discount.apply_to_order | | | voucher.discount_voucher.discount.apply_to_items | | | voucher.discount_voucher.discount.apply_to_items_proportionally | | | voucher.discount_voucher.discount.apply_to_items_proportionally_by_quantity | | | voucher.discount_voucher.discount.fixed.apply_to_items | | | voucher.gift_voucher | | | voucher.gift_voucher.gift.apply_to_order | | | voucher.gift_voucher.gift.apply_to_items | | | voucher.loyalty_card | | | distribution.custom_event | | | reward_assignment.pay_with_points | | | global | | | [optional] [default to 'global']
**id** | **str** | Unique validation rule ID. | [optional]
**created_at** | **datetime** | Timestamp representing the date and time when the validation rule was created. The value is shown in the ISO 8601 format. | [optional]
**updated_at** | **datetime** | Timestamp representing the date and time when the validation rule was updated. The value is shown in the ISO 8601 format. | [optional]
diff --git a/docs/ValidationRulesCreateRequestBody.md b/docs/ValidationRulesCreateRequestBody.md
index 4f6d6712..a44b6bdd 100644
--- a/docs/ValidationRulesCreateRequestBody.md
+++ b/docs/ValidationRulesCreateRequestBody.md
@@ -11,7 +11,7 @@ Name | Type | Description | Notes
**error** | [**ValidationRulesCreateRequestBodyError**](ValidationRulesCreateRequestBodyError.md) | | [optional]
**applicable_to** | [**ValidationRulesCreateRequestBodyApplicableTo**](ValidationRulesCreateRequestBodyApplicableTo.md) | | [optional]
**type** | **str** | Type of validation rule. | [optional] [default to 'expression']
-**context_type** | **str** | Validation rule context type. | **Context Type** | **Definition** | |:---|:---| | earning_rule.order.paid | | | earning_rule.custom_event | | | earning_rule.customer.segment.entered | | | campaign.discount_coupons | | | campaign.discount_coupons.discount.apply_to_order | | | campaign.discount_coupons.discount.apply_to_items | | | campaign.discount_coupons.discount.apply_to_items_proportionally | | | campaign.discount_coupons.discount.apply_to_items_proportionally_by_quantity | | | campaign.discount_coupons.discount.fixed.apply_to_items | | | campaign.gift_vouchers | | | campaign.gift_vouchers.gift.apply_to_order | | | campaign.gift_vouchers.gift.apply_to_items | | | campaign.referral_program | | | campaign.referral_program.discount.apply_to_order | | | campaign.referral_program.discount.apply_to_items | | | campaign.referral_program.discount.apply_to_items_proportionally | | | campaign.referral_program.discount.apply_to_items_proportionally_by_quantity | | | campaign.referral_program.discount.fixed.apply_to_items | | | campaign.promotion | | | campaign.promotion.discount.apply_to_order | | | campaign.promotion.discount.apply_to_items | | | campaign.promotion.discount.apply_to_items_proportionally | | | campaign.promotion.discount.apply_to_items_proportionally_by_quantity | | | campaign.promotion.discount.fixed.apply_to_items | | | campaign.loyalty_program | | | campaign.lucky_draw | | | voucher.discount_voucher | | | voucher.discount_voucher.discount.apply_to_order | | | voucher.discount_voucher.discount.apply_to_items | | | voucher.discount_voucher.discount.apply_to_items_proportionally | | | voucher.discount_voucher.discount.apply_to_items_proportionally_by_quantity | | | voucher.discount_voucher.discount.fixed.apply_to_items | | | voucher.gift_voucher | | | voucher.gift_voucher.gift.apply_to_order | | | voucher.gift_voucher.gift.apply_to_items | | | voucher.loyalty_card | | | voucher.lucky_draw_code | | | distribution.custom_event | | | reward_assignment.pay_with_points | | | global | | | [optional] [default to 'global']
+**context_type** | **str** | Validation rule context type. | **Context Type** | **Definition** | |:---|:---| | earning_rule.order.paid | | | earning_rule.custom_event | | | earning_rule.customer.segment.entered | | | campaign.discount_coupons | | | campaign.discount_coupons.discount.apply_to_order | | | campaign.discount_coupons.discount.apply_to_items | | | campaign.discount_coupons.discount.apply_to_items_proportionally | | | campaign.discount_coupons.discount.apply_to_items_proportionally_by_quantity | | | campaign.discount_coupons.discount.fixed.apply_to_items | | | campaign.gift_vouchers | | | campaign.gift_vouchers.gift.apply_to_order | | | campaign.gift_vouchers.gift.apply_to_items | | | campaign.referral_program | | | campaign.referral_program.discount.apply_to_order | | | campaign.referral_program.discount.apply_to_items | | | campaign.referral_program.discount.apply_to_items_proportionally | | | campaign.referral_program.discount.apply_to_items_proportionally_by_quantity | | | campaign.referral_program.discount.fixed.apply_to_items | | | campaign.promotion | | | campaign.promotion.discount.apply_to_order | | | campaign.promotion.discount.apply_to_items | | | campaign.promotion.discount.apply_to_items_proportionally | | | campaign.promotion.discount.apply_to_items_proportionally_by_quantity | | | campaign.promotion.discount.fixed.apply_to_items | | | campaign.loyalty_program | | | voucher.discount_voucher | | | voucher.discount_voucher.discount.apply_to_order | | | voucher.discount_voucher.discount.apply_to_items | | | voucher.discount_voucher.discount.apply_to_items_proportionally | | | voucher.discount_voucher.discount.apply_to_items_proportionally_by_quantity | | | voucher.discount_voucher.discount.fixed.apply_to_items | | | voucher.gift_voucher | | | voucher.gift_voucher.gift.apply_to_order | | | voucher.gift_voucher.gift.apply_to_items | | | voucher.loyalty_card | | | distribution.custom_event | | | reward_assignment.pay_with_points | | | global | | | [optional] [default to 'global']
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
diff --git a/docs/ValidationRulesCreateResponseBody.md b/docs/ValidationRulesCreateResponseBody.md
index 1509fdd8..55266ac6 100644
--- a/docs/ValidationRulesCreateResponseBody.md
+++ b/docs/ValidationRulesCreateResponseBody.md
@@ -11,7 +11,7 @@ Name | Type | Description | Notes
**error** | [**ValidationRulesCreateResponseBodyError**](ValidationRulesCreateResponseBodyError.md) | | [optional]
**applicable_to** | [**ValidationRulesCreateResponseBodyApplicableTo**](ValidationRulesCreateResponseBodyApplicableTo.md) | | [optional]
**type** | **str** | Type of validation rule. | [optional] [default to 'expression']
-**context_type** | **str** | Validation rule context type. | **Context Type** | **Definition** | |:---|:---| | earning_rule.order.paid | | | earning_rule.custom_event | | | earning_rule.customer.segment.entered | | | campaign.discount_coupons | | | campaign.discount_coupons.discount.apply_to_order | | | campaign.discount_coupons.discount.apply_to_items | | | campaign.discount_coupons.discount.apply_to_items_proportionally | | | campaign.discount_coupons.discount.apply_to_items_proportionally_by_quantity | | | campaign.discount_coupons.discount.fixed.apply_to_items | | | campaign.gift_vouchers | | | campaign.gift_vouchers.gift.apply_to_order | | | campaign.gift_vouchers.gift.apply_to_items | | | campaign.referral_program | | | campaign.referral_program.discount.apply_to_order | | | campaign.referral_program.discount.apply_to_items | | | campaign.referral_program.discount.apply_to_items_proportionally | | | campaign.referral_program.discount.apply_to_items_proportionally_by_quantity | | | campaign.referral_program.discount.fixed.apply_to_items | | | campaign.promotion | | | campaign.promotion.discount.apply_to_order | | | campaign.promotion.discount.apply_to_items | | | campaign.promotion.discount.apply_to_items_proportionally | | | campaign.promotion.discount.apply_to_items_proportionally_by_quantity | | | campaign.promotion.discount.fixed.apply_to_items | | | campaign.loyalty_program | | | campaign.lucky_draw | | | voucher.discount_voucher | | | voucher.discount_voucher.discount.apply_to_order | | | voucher.discount_voucher.discount.apply_to_items | | | voucher.discount_voucher.discount.apply_to_items_proportionally | | | voucher.discount_voucher.discount.apply_to_items_proportionally_by_quantity | | | voucher.discount_voucher.discount.fixed.apply_to_items | | | voucher.gift_voucher | | | voucher.gift_voucher.gift.apply_to_order | | | voucher.gift_voucher.gift.apply_to_items | | | voucher.loyalty_card | | | voucher.lucky_draw_code | | | distribution.custom_event | | | reward_assignment.pay_with_points | | | global | | | [optional] [default to 'global']
+**context_type** | **str** | Validation rule context type. | **Context Type** | **Definition** | |:---|:---| | earning_rule.order.paid | | | earning_rule.custom_event | | | earning_rule.customer.segment.entered | | | campaign.discount_coupons | | | campaign.discount_coupons.discount.apply_to_order | | | campaign.discount_coupons.discount.apply_to_items | | | campaign.discount_coupons.discount.apply_to_items_proportionally | | | campaign.discount_coupons.discount.apply_to_items_proportionally_by_quantity | | | campaign.discount_coupons.discount.fixed.apply_to_items | | | campaign.gift_vouchers | | | campaign.gift_vouchers.gift.apply_to_order | | | campaign.gift_vouchers.gift.apply_to_items | | | campaign.referral_program | | | campaign.referral_program.discount.apply_to_order | | | campaign.referral_program.discount.apply_to_items | | | campaign.referral_program.discount.apply_to_items_proportionally | | | campaign.referral_program.discount.apply_to_items_proportionally_by_quantity | | | campaign.referral_program.discount.fixed.apply_to_items | | | campaign.promotion | | | campaign.promotion.discount.apply_to_order | | | campaign.promotion.discount.apply_to_items | | | campaign.promotion.discount.apply_to_items_proportionally | | | campaign.promotion.discount.apply_to_items_proportionally_by_quantity | | | campaign.promotion.discount.fixed.apply_to_items | | | campaign.loyalty_program | | | voucher.discount_voucher | | | voucher.discount_voucher.discount.apply_to_order | | | voucher.discount_voucher.discount.apply_to_items | | | voucher.discount_voucher.discount.apply_to_items_proportionally | | | voucher.discount_voucher.discount.apply_to_items_proportionally_by_quantity | | | voucher.discount_voucher.discount.fixed.apply_to_items | | | voucher.gift_voucher | | | voucher.gift_voucher.gift.apply_to_order | | | voucher.gift_voucher.gift.apply_to_items | | | voucher.loyalty_card | | | distribution.custom_event | | | reward_assignment.pay_with_points | | | global | | | [optional] [default to 'global']
**id** | **str** | Unique validation rule ID. | [optional]
**created_at** | **datetime** | Timestamp representing the date and time when the validation rule was created. The value is shown in the ISO 8601 format. | [optional]
**updated_at** | **datetime** | Timestamp representing the date and time when the validation rule was updated. The value is shown in the ISO 8601 format. | [optional]
diff --git a/docs/ValidationRulesGetResponseBody.md b/docs/ValidationRulesGetResponseBody.md
index 1aa68068..6c74a578 100644
--- a/docs/ValidationRulesGetResponseBody.md
+++ b/docs/ValidationRulesGetResponseBody.md
@@ -11,7 +11,7 @@ Name | Type | Description | Notes
**error** | [**ValidationRulesGetResponseBodyError**](ValidationRulesGetResponseBodyError.md) | | [optional]
**applicable_to** | [**ValidationRulesGetResponseBodyApplicableTo**](ValidationRulesGetResponseBodyApplicableTo.md) | | [optional]
**type** | **str** | Type of validation rule. | [optional] [default to 'expression']
-**context_type** | **str** | Validation rule context type. | **Context Type** | **Definition** | |:---|:---| | earning_rule.order.paid | | | earning_rule.custom_event | | | earning_rule.customer.segment.entered | | | campaign.discount_coupons | | | campaign.discount_coupons.discount.apply_to_order | | | campaign.discount_coupons.discount.apply_to_items | | | campaign.discount_coupons.discount.apply_to_items_proportionally | | | campaign.discount_coupons.discount.apply_to_items_proportionally_by_quantity | | | campaign.discount_coupons.discount.fixed.apply_to_items | | | campaign.gift_vouchers | | | campaign.gift_vouchers.gift.apply_to_order | | | campaign.gift_vouchers.gift.apply_to_items | | | campaign.referral_program | | | campaign.referral_program.discount.apply_to_order | | | campaign.referral_program.discount.apply_to_items | | | campaign.referral_program.discount.apply_to_items_proportionally | | | campaign.referral_program.discount.apply_to_items_proportionally_by_quantity | | | campaign.referral_program.discount.fixed.apply_to_items | | | campaign.promotion | | | campaign.promotion.discount.apply_to_order | | | campaign.promotion.discount.apply_to_items | | | campaign.promotion.discount.apply_to_items_proportionally | | | campaign.promotion.discount.apply_to_items_proportionally_by_quantity | | | campaign.promotion.discount.fixed.apply_to_items | | | campaign.loyalty_program | | | campaign.lucky_draw | | | voucher.discount_voucher | | | voucher.discount_voucher.discount.apply_to_order | | | voucher.discount_voucher.discount.apply_to_items | | | voucher.discount_voucher.discount.apply_to_items_proportionally | | | voucher.discount_voucher.discount.apply_to_items_proportionally_by_quantity | | | voucher.discount_voucher.discount.fixed.apply_to_items | | | voucher.gift_voucher | | | voucher.gift_voucher.gift.apply_to_order | | | voucher.gift_voucher.gift.apply_to_items | | | voucher.loyalty_card | | | voucher.lucky_draw_code | | | distribution.custom_event | | | reward_assignment.pay_with_points | | | global | | | [optional] [default to 'global']
+**context_type** | **str** | Validation rule context type. | **Context Type** | **Definition** | |:---|:---| | earning_rule.order.paid | | | earning_rule.custom_event | | | earning_rule.customer.segment.entered | | | campaign.discount_coupons | | | campaign.discount_coupons.discount.apply_to_order | | | campaign.discount_coupons.discount.apply_to_items | | | campaign.discount_coupons.discount.apply_to_items_proportionally | | | campaign.discount_coupons.discount.apply_to_items_proportionally_by_quantity | | | campaign.discount_coupons.discount.fixed.apply_to_items | | | campaign.gift_vouchers | | | campaign.gift_vouchers.gift.apply_to_order | | | campaign.gift_vouchers.gift.apply_to_items | | | campaign.referral_program | | | campaign.referral_program.discount.apply_to_order | | | campaign.referral_program.discount.apply_to_items | | | campaign.referral_program.discount.apply_to_items_proportionally | | | campaign.referral_program.discount.apply_to_items_proportionally_by_quantity | | | campaign.referral_program.discount.fixed.apply_to_items | | | campaign.promotion | | | campaign.promotion.discount.apply_to_order | | | campaign.promotion.discount.apply_to_items | | | campaign.promotion.discount.apply_to_items_proportionally | | | campaign.promotion.discount.apply_to_items_proportionally_by_quantity | | | campaign.promotion.discount.fixed.apply_to_items | | | campaign.loyalty_program | | | voucher.discount_voucher | | | voucher.discount_voucher.discount.apply_to_order | | | voucher.discount_voucher.discount.apply_to_items | | | voucher.discount_voucher.discount.apply_to_items_proportionally | | | voucher.discount_voucher.discount.apply_to_items_proportionally_by_quantity | | | voucher.discount_voucher.discount.fixed.apply_to_items | | | voucher.gift_voucher | | | voucher.gift_voucher.gift.apply_to_order | | | voucher.gift_voucher.gift.apply_to_items | | | voucher.loyalty_card | | | distribution.custom_event | | | reward_assignment.pay_with_points | | | global | | | [optional] [default to 'global']
**id** | **str** | Unique validation rule ID. | [optional]
**created_at** | **datetime** | Timestamp representing the date and time when the validation rule was created. The value is shown in the ISO 8601 format. | [optional]
**updated_at** | **datetime** | Timestamp representing the date and time when the validation rule was updated. The value is shown in the ISO 8601 format. | [optional]
diff --git a/docs/ValidationRulesUpdateRequestBody.md b/docs/ValidationRulesUpdateRequestBody.md
index 284b4fe9..57328db4 100644
--- a/docs/ValidationRulesUpdateRequestBody.md
+++ b/docs/ValidationRulesUpdateRequestBody.md
@@ -11,7 +11,7 @@ Name | Type | Description | Notes
**error** | [**ValidationRulesUpdateRequestBodyError**](ValidationRulesUpdateRequestBodyError.md) | | [optional]
**applicable_to** | [**ValidationRulesUpdateRequestBodyApplicableTo**](ValidationRulesUpdateRequestBodyApplicableTo.md) | | [optional]
**type** | **str** | Type of validation rule. | [optional] [default to 'expression']
-**context_type** | **str** | Validation rule context type. | **Context Type** | **Definition** | |:---|:---| | earning_rule.order.paid | | | earning_rule.custom_event | | | earning_rule.customer.segment.entered | | | campaign.discount_coupons | | | campaign.discount_coupons.discount.apply_to_order | | | campaign.discount_coupons.discount.apply_to_items | | | campaign.discount_coupons.discount.apply_to_items_proportionally | | | campaign.discount_coupons.discount.apply_to_items_proportionally_by_quantity | | | campaign.discount_coupons.discount.fixed.apply_to_items | | | campaign.gift_vouchers | | | campaign.gift_vouchers.gift.apply_to_order | | | campaign.gift_vouchers.gift.apply_to_items | | | campaign.referral_program | | | campaign.referral_program.discount.apply_to_order | | | campaign.referral_program.discount.apply_to_items | | | campaign.referral_program.discount.apply_to_items_proportionally | | | campaign.referral_program.discount.apply_to_items_proportionally_by_quantity | | | campaign.referral_program.discount.fixed.apply_to_items | | | campaign.promotion | | | campaign.promotion.discount.apply_to_order | | | campaign.promotion.discount.apply_to_items | | | campaign.promotion.discount.apply_to_items_proportionally | | | campaign.promotion.discount.apply_to_items_proportionally_by_quantity | | | campaign.promotion.discount.fixed.apply_to_items | | | campaign.loyalty_program | | | campaign.lucky_draw | | | voucher.discount_voucher | | | voucher.discount_voucher.discount.apply_to_order | | | voucher.discount_voucher.discount.apply_to_items | | | voucher.discount_voucher.discount.apply_to_items_proportionally | | | voucher.discount_voucher.discount.apply_to_items_proportionally_by_quantity | | | voucher.discount_voucher.discount.fixed.apply_to_items | | | voucher.gift_voucher | | | voucher.gift_voucher.gift.apply_to_order | | | voucher.gift_voucher.gift.apply_to_items | | | voucher.loyalty_card | | | voucher.lucky_draw_code | | | distribution.custom_event | | | reward_assignment.pay_with_points | | | global | | | [optional] [default to 'global']
+**context_type** | **str** | Validation rule context type. | **Context Type** | **Definition** | |:---|:---| | earning_rule.order.paid | | | earning_rule.custom_event | | | earning_rule.customer.segment.entered | | | campaign.discount_coupons | | | campaign.discount_coupons.discount.apply_to_order | | | campaign.discount_coupons.discount.apply_to_items | | | campaign.discount_coupons.discount.apply_to_items_proportionally | | | campaign.discount_coupons.discount.apply_to_items_proportionally_by_quantity | | | campaign.discount_coupons.discount.fixed.apply_to_items | | | campaign.gift_vouchers | | | campaign.gift_vouchers.gift.apply_to_order | | | campaign.gift_vouchers.gift.apply_to_items | | | campaign.referral_program | | | campaign.referral_program.discount.apply_to_order | | | campaign.referral_program.discount.apply_to_items | | | campaign.referral_program.discount.apply_to_items_proportionally | | | campaign.referral_program.discount.apply_to_items_proportionally_by_quantity | | | campaign.referral_program.discount.fixed.apply_to_items | | | campaign.promotion | | | campaign.promotion.discount.apply_to_order | | | campaign.promotion.discount.apply_to_items | | | campaign.promotion.discount.apply_to_items_proportionally | | | campaign.promotion.discount.apply_to_items_proportionally_by_quantity | | | campaign.promotion.discount.fixed.apply_to_items | | | campaign.loyalty_program | | | voucher.discount_voucher | | | voucher.discount_voucher.discount.apply_to_order | | | voucher.discount_voucher.discount.apply_to_items | | | voucher.discount_voucher.discount.apply_to_items_proportionally | | | voucher.discount_voucher.discount.apply_to_items_proportionally_by_quantity | | | voucher.discount_voucher.discount.fixed.apply_to_items | | | voucher.gift_voucher | | | voucher.gift_voucher.gift.apply_to_order | | | voucher.gift_voucher.gift.apply_to_items | | | voucher.loyalty_card | | | distribution.custom_event | | | reward_assignment.pay_with_points | | | global | | | [optional] [default to 'global']
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
diff --git a/docs/ValidationRulesUpdateResponseBody.md b/docs/ValidationRulesUpdateResponseBody.md
index 380b94e2..b177db9a 100644
--- a/docs/ValidationRulesUpdateResponseBody.md
+++ b/docs/ValidationRulesUpdateResponseBody.md
@@ -11,7 +11,7 @@ Name | Type | Description | Notes
**error** | [**ValidationRulesUpdateResponseBodyError**](ValidationRulesUpdateResponseBodyError.md) | | [optional]
**applicable_to** | [**ValidationRulesUpdateResponseBodyApplicableTo**](ValidationRulesUpdateResponseBodyApplicableTo.md) | | [optional]
**type** | **str** | Type of validation rule. | [optional] [default to 'expression']
-**context_type** | **str** | Validation rule context type. | **Context Type** | **Definition** | |:---|:---| | earning_rule.order.paid | | | earning_rule.custom_event | | | earning_rule.customer.segment.entered | | | campaign.discount_coupons | | | campaign.discount_coupons.discount.apply_to_order | | | campaign.discount_coupons.discount.apply_to_items | | | campaign.discount_coupons.discount.apply_to_items_proportionally | | | campaign.discount_coupons.discount.apply_to_items_proportionally_by_quantity | | | campaign.discount_coupons.discount.fixed.apply_to_items | | | campaign.gift_vouchers | | | campaign.gift_vouchers.gift.apply_to_order | | | campaign.gift_vouchers.gift.apply_to_items | | | campaign.referral_program | | | campaign.referral_program.discount.apply_to_order | | | campaign.referral_program.discount.apply_to_items | | | campaign.referral_program.discount.apply_to_items_proportionally | | | campaign.referral_program.discount.apply_to_items_proportionally_by_quantity | | | campaign.referral_program.discount.fixed.apply_to_items | | | campaign.promotion | | | campaign.promotion.discount.apply_to_order | | | campaign.promotion.discount.apply_to_items | | | campaign.promotion.discount.apply_to_items_proportionally | | | campaign.promotion.discount.apply_to_items_proportionally_by_quantity | | | campaign.promotion.discount.fixed.apply_to_items | | | campaign.loyalty_program | | | campaign.lucky_draw | | | voucher.discount_voucher | | | voucher.discount_voucher.discount.apply_to_order | | | voucher.discount_voucher.discount.apply_to_items | | | voucher.discount_voucher.discount.apply_to_items_proportionally | | | voucher.discount_voucher.discount.apply_to_items_proportionally_by_quantity | | | voucher.discount_voucher.discount.fixed.apply_to_items | | | voucher.gift_voucher | | | voucher.gift_voucher.gift.apply_to_order | | | voucher.gift_voucher.gift.apply_to_items | | | voucher.loyalty_card | | | voucher.lucky_draw_code | | | distribution.custom_event | | | reward_assignment.pay_with_points | | | global | | | [optional] [default to 'global']
+**context_type** | **str** | Validation rule context type. | **Context Type** | **Definition** | |:---|:---| | earning_rule.order.paid | | | earning_rule.custom_event | | | earning_rule.customer.segment.entered | | | campaign.discount_coupons | | | campaign.discount_coupons.discount.apply_to_order | | | campaign.discount_coupons.discount.apply_to_items | | | campaign.discount_coupons.discount.apply_to_items_proportionally | | | campaign.discount_coupons.discount.apply_to_items_proportionally_by_quantity | | | campaign.discount_coupons.discount.fixed.apply_to_items | | | campaign.gift_vouchers | | | campaign.gift_vouchers.gift.apply_to_order | | | campaign.gift_vouchers.gift.apply_to_items | | | campaign.referral_program | | | campaign.referral_program.discount.apply_to_order | | | campaign.referral_program.discount.apply_to_items | | | campaign.referral_program.discount.apply_to_items_proportionally | | | campaign.referral_program.discount.apply_to_items_proportionally_by_quantity | | | campaign.referral_program.discount.fixed.apply_to_items | | | campaign.promotion | | | campaign.promotion.discount.apply_to_order | | | campaign.promotion.discount.apply_to_items | | | campaign.promotion.discount.apply_to_items_proportionally | | | campaign.promotion.discount.apply_to_items_proportionally_by_quantity | | | campaign.promotion.discount.fixed.apply_to_items | | | campaign.loyalty_program | | | voucher.discount_voucher | | | voucher.discount_voucher.discount.apply_to_order | | | voucher.discount_voucher.discount.apply_to_items | | | voucher.discount_voucher.discount.apply_to_items_proportionally | | | voucher.discount_voucher.discount.apply_to_items_proportionally_by_quantity | | | voucher.discount_voucher.discount.fixed.apply_to_items | | | voucher.gift_voucher | | | voucher.gift_voucher.gift.apply_to_order | | | voucher.gift_voucher.gift.apply_to_items | | | voucher.loyalty_card | | | distribution.custom_event | | | reward_assignment.pay_with_points | | | global | | | [optional] [default to 'global']
**id** | **str** | Unique validation rule ID. | [optional]
**created_at** | **datetime** | Timestamp representing the date and time when the validation rule was created. The value is shown in the ISO 8601 format. | [optional]
**updated_at** | **datetime** | Timestamp representing the date and time when the validation rule was updated. The value is shown in the ISO 8601 format. | [optional]
diff --git a/docs/ValidationsApi.md b/docs/ValidationsApi.md
index 34349596..ff011a87 100644
--- a/docs/ValidationsApi.md
+++ b/docs/ValidationsApi.md
@@ -90,7 +90,7 @@ Name | Type | Description | Notes
| Status code | Description | Response headers |
|-------------|-------------|------------------|
-**2XX** | Depending on your project settings: all redeemables must be valid or just one must be valid to result as valid validation. See https://support.voucherify.io/article/604-stacking-rules#application-rules | - |
+**2XX** | Depending on your project settings: all redeemables must be valid or just one must be valid to result as valid validation. Read more in the [Stacking Rule Documentation](https://support.voucherify.io/article/604-stacking-rules). | - |
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
diff --git a/docs/ValidationsRedeemableInapplicable.md b/docs/ValidationsRedeemableInapplicable.md
index 68c8bb04..78f20cbb 100644
--- a/docs/ValidationsRedeemableInapplicable.md
+++ b/docs/ValidationsRedeemableInapplicable.md
@@ -10,7 +10,7 @@ Name | Type | Description | Notes
**object** | **str** | Redeemable's object type. | [optional]
**result** | [**ValidationsRedeemableInapplicableResult**](ValidationsRedeemableInapplicableResult.md) | | [optional]
**metadata** | **object** | The metadata object stores all custom attributes in the form of key/value pairs assigned to the redeemable. | [optional]
-**categories** | [**List[Category]**](Category.md) | | [optional]
+**categories** | [**List[CategoryWithStackingRulesType]**](CategoryWithStackingRulesType.md) | | [optional]
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
diff --git a/docs/ValidationsRedeemableSkipped.md b/docs/ValidationsRedeemableSkipped.md
index f4f49291..96a9a1a2 100644
--- a/docs/ValidationsRedeemableSkipped.md
+++ b/docs/ValidationsRedeemableSkipped.md
@@ -10,7 +10,7 @@ Name | Type | Description | Notes
**object** | **str** | Redeemable's object type. | [optional]
**result** | [**ValidationsRedeemableSkippedResult**](ValidationsRedeemableSkippedResult.md) | | [optional]
**metadata** | **object** | The metadata object stores all custom attributes in the form of key/value pairs assigned to the redeemable. | [optional]
-**categories** | [**List[Category]**](Category.md) | | [optional]
+**categories** | [**List[CategoryWithStackingRulesType]**](CategoryWithStackingRulesType.md) | | [optional]
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
diff --git a/docs/ValidationsValidateResponseBody.md b/docs/ValidationsValidateResponseBody.md
index fe9c6c18..39e9d784 100644
--- a/docs/ValidationsValidateResponseBody.md
+++ b/docs/ValidationsValidateResponseBody.md
@@ -1,6 +1,6 @@
# ValidationsValidateResponseBody
-Response body schema for POST `/validations`.
+Response body schema for **POST** `v1/validations`.
## Properties
diff --git a/docs/ValidationsValidateResponseBodyRedeemablesItem.md b/docs/ValidationsValidateResponseBodyRedeemablesItem.md
index 0ee7e7c5..2bb7b506 100644
--- a/docs/ValidationsValidateResponseBodyRedeemablesItem.md
+++ b/docs/ValidationsValidateResponseBodyRedeemablesItem.md
@@ -13,7 +13,7 @@ Name | Type | Description | Notes
**inapplicable_to** | [**InapplicableToResultList**](InapplicableToResultList.md) | | [optional]
**result** | [**ValidationsValidateResponseBodyRedeemablesItemResult**](ValidationsValidateResponseBodyRedeemablesItemResult.md) | | [optional]
**metadata** | **object** | | [optional]
-**categories** | [**List[Category]**](Category.md) | | [optional]
+**categories** | [**List[CategoryWithStackingRulesType]**](CategoryWithStackingRulesType.md) | | [optional]
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
diff --git a/docs/VoucherPublish.md b/docs/VoucherPublish.md
index ea46c0cf..56bcf71a 100644
--- a/docs/VoucherPublish.md
+++ b/docs/VoucherPublish.md
@@ -8,7 +8,7 @@ Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**object** | **str** | The type of the object represented is by default `list`. To get this list, you need to make a call to the endpoint returned in the `url` attribute. | [optional] [default to 'list']
**count** | **int** | Publication events counter. | [optional]
-**url** | **str** | The endpoint where this list of publications can be accessed using a GET method. `/v1/vouchers/{voucher_code}/publications` | [optional]
+**url** | **str** | The endpoint where this list of publications can be accessed using a **GET** method. `/v1/vouchers/{voucher_code}/publications` | [optional]
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
diff --git a/docs/VoucherRedemption.md b/docs/VoucherRedemption.md
index 63f6808a..99455d31 100644
--- a/docs/VoucherRedemption.md
+++ b/docs/VoucherRedemption.md
@@ -10,7 +10,7 @@ Name | Type | Description | Notes
**redeemed_quantity** | **int** | How many times a voucher has already been redeemed. | [optional]
**redeemed_points** | **int** | Total loyalty points redeemed. | [optional]
**object** | **str** | The type of the object represented is by default `list`. To get this list, you need to make a call to the endpoint returned in the url attribute. | [optional] [default to 'list']
-**url** | **str** | The endpoint where this list of redemptions can be accessed using a GET method. `/v1/vouchers/{voucher_code}/redemptions` | [optional]
+**url** | **str** | The endpoint where this list of redemptions can be accessed using a **GET** method. `/v1/vouchers/{voucher_code}/redemptions` | [optional]
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
diff --git a/docs/VoucherWithCategoriesPublish.md b/docs/VoucherWithCategoriesPublish.md
index b4aeebcb..e5617521 100644
--- a/docs/VoucherWithCategoriesPublish.md
+++ b/docs/VoucherWithCategoriesPublish.md
@@ -8,7 +8,7 @@ Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**object** | **str** | The type of the object represented is by default `list`. To get this list, you need to make a call to the endpoint returned in the `url` attribute. | [optional] [default to 'list']
**count** | **int** | Publication events counter. | [optional]
-**url** | **str** | The endpoint where this list of publications can be accessed using a GET method. `/v1/vouchers/{voucher_code}/publications` | [optional]
+**url** | **str** | The endpoint where this list of publications can be accessed using a **GET** method. `/v1/vouchers/{voucher_code}/publications` | [optional]
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
diff --git a/docs/VoucherWithCategoriesRedemption.md b/docs/VoucherWithCategoriesRedemption.md
index bd2bf465..2e143d19 100644
--- a/docs/VoucherWithCategoriesRedemption.md
+++ b/docs/VoucherWithCategoriesRedemption.md
@@ -10,7 +10,7 @@ Name | Type | Description | Notes
**redeemed_quantity** | **int** | How many times a voucher has already been redeemed. | [optional]
**redeemed_points** | **int** | Total loyalty points redeemed. | [optional]
**object** | **str** | The type of the object represented is by default `list`. To get this list, you need to make a call to the endpoint returned in the url attribute. | [optional] [default to 'list']
-**url** | **str** | The endpoint where this list of redemptions can be accessed using a GET method. `/v1/vouchers/{voucher_code}/redemptions` | [optional]
+**url** | **str** | The endpoint where this list of redemptions can be accessed using a **GET** method. `/v1/vouchers/{voucher_code}/redemptions` | [optional]
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
diff --git a/docs/VouchersCreateResponseBodyPublish.md b/docs/VouchersCreateResponseBodyPublish.md
index 6fd718ec..aca1c9cc 100644
--- a/docs/VouchersCreateResponseBodyPublish.md
+++ b/docs/VouchersCreateResponseBodyPublish.md
@@ -8,7 +8,7 @@ Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**object** | **str** | The type of the object represented is by default `list`. To get this list, you need to make a call to the endpoint returned in the `url` attribute. | [optional] [default to 'list']
**count** | **int** | Publication events counter. | [optional]
-**url** | **str** | The endpoint where this list of publications can be accessed using a GET method. `/v1/vouchers/{voucher_code}/publications` | [optional]
+**url** | **str** | The endpoint where this list of publications can be accessed using a **GET** method. `/v1/vouchers/{voucher_code}/publications` | [optional]
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
diff --git a/docs/VouchersCreateResponseBodyRedemption.md b/docs/VouchersCreateResponseBodyRedemption.md
index ea75b570..27ec7fa3 100644
--- a/docs/VouchersCreateResponseBodyRedemption.md
+++ b/docs/VouchersCreateResponseBodyRedemption.md
@@ -10,7 +10,7 @@ Name | Type | Description | Notes
**redeemed_quantity** | **int** | How many times a voucher has already been redeemed. | [optional]
**redeemed_points** | **int** | Total loyalty points redeemed. | [optional]
**object** | **str** | The type of the object represented is by default `list`. To get this list, you need to make a call to the endpoint returned in the url attribute. | [optional] [default to 'list']
-**url** | **str** | The endpoint where this list of redemptions can be accessed using a GET method. `/v1/vouchers/{voucher_code}/redemptions` | [optional]
+**url** | **str** | The endpoint where this list of redemptions can be accessed using a **GET** method. `/v1/vouchers/{voucher_code}/redemptions` | [optional]
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
diff --git a/docs/VouchersDisableResponseBodyPublish.md b/docs/VouchersDisableResponseBodyPublish.md
index 2ac55d06..9625655e 100644
--- a/docs/VouchersDisableResponseBodyPublish.md
+++ b/docs/VouchersDisableResponseBodyPublish.md
@@ -8,7 +8,7 @@ Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**object** | **str** | The type of the object represented is by default `list`. To get this list, you need to make a call to the endpoint returned in the `url` attribute. | [optional] [default to 'list']
**count** | **int** | Publication events counter. | [optional]
-**url** | **str** | The endpoint where this list of publications can be accessed using a GET method. `/v1/vouchers/{voucher_code}/publications` | [optional]
+**url** | **str** | The endpoint where this list of publications can be accessed using a **GET** method. `/v1/vouchers/{voucher_code}/publications` | [optional]
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
diff --git a/docs/VouchersDisableResponseBodyRedemption.md b/docs/VouchersDisableResponseBodyRedemption.md
index b0870a59..57aa728c 100644
--- a/docs/VouchersDisableResponseBodyRedemption.md
+++ b/docs/VouchersDisableResponseBodyRedemption.md
@@ -10,7 +10,7 @@ Name | Type | Description | Notes
**redeemed_quantity** | **int** | How many times a voucher has already been redeemed. | [optional]
**redeemed_points** | **int** | Total loyalty points redeemed. | [optional]
**object** | **str** | The type of the object represented is by default `list`. To get this list, you need to make a call to the endpoint returned in the url attribute. | [optional] [default to 'list']
-**url** | **str** | The endpoint where this list of redemptions can be accessed using a GET method. `/v1/vouchers/{voucher_code}/redemptions` | [optional]
+**url** | **str** | The endpoint where this list of redemptions can be accessed using a **GET** method. `/v1/vouchers/{voucher_code}/redemptions` | [optional]
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
diff --git a/docs/VouchersEnableResponseBodyPublish.md b/docs/VouchersEnableResponseBodyPublish.md
index a12e0ed1..2892f8ae 100644
--- a/docs/VouchersEnableResponseBodyPublish.md
+++ b/docs/VouchersEnableResponseBodyPublish.md
@@ -8,7 +8,7 @@ Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**object** | **str** | The type of the object represented is by default `list`. To get this list, you need to make a call to the endpoint returned in the `url` attribute. | [optional] [default to 'list']
**count** | **int** | Publication events counter. | [optional]
-**url** | **str** | The endpoint where this list of publications can be accessed using a GET method. `/v1/vouchers/{voucher_code}/publications` | [optional]
+**url** | **str** | The endpoint where this list of publications can be accessed using a **GET** method. `/v1/vouchers/{voucher_code}/publications` | [optional]
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
diff --git a/docs/VouchersEnableResponseBodyRedemption.md b/docs/VouchersEnableResponseBodyRedemption.md
index c0f7b9a4..c8a2d8c2 100644
--- a/docs/VouchersEnableResponseBodyRedemption.md
+++ b/docs/VouchersEnableResponseBodyRedemption.md
@@ -10,7 +10,7 @@ Name | Type | Description | Notes
**redeemed_quantity** | **int** | How many times a voucher has already been redeemed. | [optional]
**redeemed_points** | **int** | Total loyalty points redeemed. | [optional]
**object** | **str** | The type of the object represented is by default `list`. To get this list, you need to make a call to the endpoint returned in the url attribute. | [optional] [default to 'list']
-**url** | **str** | The endpoint where this list of redemptions can be accessed using a GET method. `/v1/vouchers/{voucher_code}/redemptions` | [optional]
+**url** | **str** | The endpoint where this list of redemptions can be accessed using a **GET** method. `/v1/vouchers/{voucher_code}/redemptions` | [optional]
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
diff --git a/docs/VouchersGetResponseBodyPublish.md b/docs/VouchersGetResponseBodyPublish.md
index a0d56820..9d006ec7 100644
--- a/docs/VouchersGetResponseBodyPublish.md
+++ b/docs/VouchersGetResponseBodyPublish.md
@@ -8,7 +8,7 @@ Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**object** | **str** | The type of the object represented is by default `list`. To get this list, you need to make a call to the endpoint returned in the `url` attribute. | [optional] [default to 'list']
**count** | **int** | Publication events counter. | [optional]
-**url** | **str** | The endpoint where this list of publications can be accessed using a GET method. `/v1/vouchers/{voucher_code}/publications` | [optional]
+**url** | **str** | The endpoint where this list of publications can be accessed using a **GET** method. `/v1/vouchers/{voucher_code}/publications` | [optional]
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
diff --git a/docs/VouchersGetResponseBodyRedemption.md b/docs/VouchersGetResponseBodyRedemption.md
index 84edcded..ba24b062 100644
--- a/docs/VouchersGetResponseBodyRedemption.md
+++ b/docs/VouchersGetResponseBodyRedemption.md
@@ -10,7 +10,7 @@ Name | Type | Description | Notes
**redeemed_quantity** | **int** | How many times a voucher has already been redeemed. | [optional]
**redeemed_points** | **int** | Total loyalty points redeemed. | [optional]
**object** | **str** | The type of the object represented is by default `list`. To get this list, you need to make a call to the endpoint returned in the url attribute. | [optional] [default to 'list']
-**url** | **str** | The endpoint where this list of redemptions can be accessed using a GET method. `/v1/vouchers/{voucher_code}/redemptions` | [optional]
+**url** | **str** | The endpoint where this list of redemptions can be accessed using a **GET** method. `/v1/vouchers/{voucher_code}/redemptions` | [optional]
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
diff --git a/docs/VouchersUpdateResponseBodyPublish.md b/docs/VouchersUpdateResponseBodyPublish.md
index 25e40173..e3bde1c9 100644
--- a/docs/VouchersUpdateResponseBodyPublish.md
+++ b/docs/VouchersUpdateResponseBodyPublish.md
@@ -8,7 +8,7 @@ Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**object** | **str** | The type of the object represented is by default `list`. To get this list, you need to make a call to the endpoint returned in the `url` attribute. | [optional] [default to 'list']
**count** | **int** | Publication events counter. | [optional]
-**url** | **str** | The endpoint where this list of publications can be accessed using a GET method. `/v1/vouchers/{voucher_code}/publications` | [optional]
+**url** | **str** | The endpoint where this list of publications can be accessed using a **GET** method. `/v1/vouchers/{voucher_code}/publications` | [optional]
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
diff --git a/docs/VouchersUpdateResponseBodyRedemption.md b/docs/VouchersUpdateResponseBodyRedemption.md
index 3543082d..0c951007 100644
--- a/docs/VouchersUpdateResponseBodyRedemption.md
+++ b/docs/VouchersUpdateResponseBodyRedemption.md
@@ -10,7 +10,7 @@ Name | Type | Description | Notes
**redeemed_quantity** | **int** | How many times a voucher has already been redeemed. | [optional]
**redeemed_points** | **int** | Total loyalty points redeemed. | [optional]
**object** | **str** | The type of the object represented is by default `list`. To get this list, you need to make a call to the endpoint returned in the url attribute. | [optional] [default to 'list']
-**url** | **str** | The endpoint where this list of redemptions can be accessed using a GET method. `/v1/vouchers/{voucher_code}/redemptions` | [optional]
+**url** | **str** | The endpoint where this list of redemptions can be accessed using a **GET** method. `/v1/vouchers/{voucher_code}/redemptions` | [optional]
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
diff --git a/pyproject.toml b/pyproject.toml
index 3a646c34..557d0339 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -1,6 +1,6 @@
[tool.poetry]
name = "voucherify"
-version = "3.0.0"
+version = "4.0.0"
description = "Voucherify API"
authors = ["Voucherify Team "]
license = "MIT"
diff --git a/setup.py b/setup.py
index b63b35a2..81329d63 100755
--- a/setup.py
+++ b/setup.py
@@ -22,7 +22,7 @@
# prerequisite: setuptools
# http://pypi.python.org/pypi/setuptools
NAME = "voucherify"
-VERSION = "3.0.0"
+VERSION = "4.0.0"
PYTHON_REQUIRES = ">=3.7"
REQUIRES = [
"urllib3 >= 1.25.3, < 2.1.0",
diff --git a/voucherify/__init__.py b/voucherify/__init__.py
index fa40c63e..677e3927 100644
--- a/voucherify/__init__.py
+++ b/voucherify/__init__.py
@@ -15,17 +15,21 @@
""" # noqa: E501
-__version__ = "3.0.0"
+__version__ = "4.0.0"
# import apis into sdk package
from voucherify.api.async_actions_api import AsyncActionsApi
+from voucherify.api.bin_api import BinApi
from voucherify.api.campaigns_api import CampaignsApi
from voucherify.api.categories_api import CategoriesApi
from voucherify.api.client_side_api import ClientSideApi
from voucherify.api.customers_api import CustomersApi
from voucherify.api.events_api import EventsApi
from voucherify.api.exports_api import ExportsApi
+from voucherify.api.locations_api import LocationsApi
from voucherify.api.loyalties_api import LoyaltiesApi
+from voucherify.api.management_api import ManagementApi
+from voucherify.api.metadata_schemas_api import MetadataSchemasApi
from voucherify.api.orders_api import OrdersApi
from voucherify.api.product_collections_api import ProductCollectionsApi
from voucherify.api.products_api import ProductsApi
@@ -33,8 +37,10 @@
from voucherify.api.publications_api import PublicationsApi
from voucherify.api.qualifications_api import QualificationsApi
from voucherify.api.redemptions_api import RedemptionsApi
+from voucherify.api.referrals_api import ReferralsApi
from voucherify.api.rewards_api import RewardsApi
from voucherify.api.segments_api import SegmentsApi
+from voucherify.api.templates_api import TemplatesApi
from voucherify.api.validation_rules_api import ValidationRulesApi
from voucherify.api.validations_api import ValidationsApi
from voucherify.api.vouchers_api import VouchersApi
@@ -60,11 +66,13 @@
from voucherify.models.async_action_get_response_body import AsyncActionGetResponseBody
from voucherify.models.async_actions_list_response_body import AsyncActionsListResponseBody
from voucherify.models.bus_val_rule_assignment import BusValRuleAssignment
+from voucherify.models.campaign import Campaign
from voucherify.models.campaign_base import CampaignBase
from voucherify.models.campaign_loyalty_card import CampaignLoyaltyCard
from voucherify.models.campaign_loyalty_card_expiration_rules import CampaignLoyaltyCardExpirationRules
from voucherify.models.campaign_loyalty_voucher import CampaignLoyaltyVoucher
from voucherify.models.campaign_loyalty_voucher_redemption import CampaignLoyaltyVoucherRedemption
+from voucherify.models.campaign_template import CampaignTemplate
from voucherify.models.campaign_voucher import CampaignVoucher
from voucherify.models.campaign_voucher_redemption import CampaignVoucherRedemption
from voucherify.models.campaigns_create_request_body import CampaignsCreateRequestBody
@@ -103,6 +111,7 @@
from voucherify.models.categories_update_request_body import CategoriesUpdateRequestBody
from voucherify.models.categories_update_response_body import CategoriesUpdateResponseBody
from voucherify.models.category import Category
+from voucherify.models.category_with_stacking_rules_type import CategoryWithStackingRulesType
from voucherify.models.client_events_create_request_body import ClientEventsCreateRequestBody
from voucherify.models.client_events_create_request_body_loyalty import ClientEventsCreateRequestBodyLoyalty
from voucherify.models.client_events_create_request_body_referral import ClientEventsCreateRequestBodyReferral
@@ -219,6 +228,7 @@
from voucherify.models.exports_get_response_body_result import ExportsGetResponseBodyResult
from voucherify.models.exports_list_response_body import ExportsListResponseBody
from voucherify.models.field_conditions import FieldConditions
+from voucherify.models.filter_conditions_date_time import FilterConditionsDateTime
from voucherify.models.filter_conditions_string import FilterConditionsString
from voucherify.models.filters_condition import FiltersCondition
from voucherify.models.gift import Gift
@@ -226,6 +236,15 @@
from voucherify.models.inapplicable_to_result_list import InapplicableToResultList
from voucherify.models.junction import Junction
from voucherify.models.list_publications_item_voucher import ListPublicationsItemVoucher
+from voucherify.models.location import Location
+from voucherify.models.location_shape import LocationShape
+from voucherify.models.location_shape_distance import LocationShapeDistance
+from voucherify.models.location_shape_geojson import LocationShapeGeojson
+from voucherify.models.locations_get_response_body import LocationsGetResponseBody
+from voucherify.models.locations_get_response_body_shape import LocationsGetResponseBodyShape
+from voucherify.models.locations_get_response_body_shape_distance import LocationsGetResponseBodyShapeDistance
+from voucherify.models.locations_get_response_body_shape_geojson import LocationsGetResponseBodyShapeGeojson
+from voucherify.models.locations_list_response_body import LocationsListResponseBody
from voucherify.models.loyalties_create_campaign_request_body import LoyaltiesCreateCampaignRequestBody
from voucherify.models.loyalties_create_campaign_response_body import LoyaltiesCreateCampaignResponseBody
from voucherify.models.loyalties_delete_response_body import LoyaltiesDeleteResponseBody
@@ -484,8 +503,132 @@
from voucherify.models.loyalty_tiers_expiration_all_expiration_date import LoyaltyTiersExpirationAllExpirationDate
from voucherify.models.loyalty_tiers_expiration_all_expiration_date_rounding import LoyaltyTiersExpirationAllExpirationDateRounding
from voucherify.models.loyalty_tiers_expiration_all_start_date import LoyaltyTiersExpirationAllStartDate
-from voucherify.models.lucky_draw import LuckyDraw
+from voucherify.models.management_project import ManagementProject
+from voucherify.models.management_project_api_usage_notifications import ManagementProjectApiUsageNotifications
+from voucherify.models.management_project_default_code_config import ManagementProjectDefaultCodeConfig
+from voucherify.models.management_project_limits import ManagementProjectLimits
+from voucherify.models.management_project_limits_api_calls_item import ManagementProjectLimitsApiCallsItem
+from voucherify.models.management_project_limits_bulk_api_calls_item import ManagementProjectLimitsBulkApiCallsItem
+from voucherify.models.management_project_webhooks_callout_notifications import ManagementProjectWebhooksCalloutNotifications
+from voucherify.models.management_project_webhooks_callout_notifications_distributions import ManagementProjectWebhooksCalloutNotificationsDistributions
+from voucherify.models.management_project_webhooks_callout_notifications_webhooks import ManagementProjectWebhooksCalloutNotificationsWebhooks
+from voucherify.models.management_projects_branding import ManagementProjectsBranding
+from voucherify.models.management_projects_branding_address import ManagementProjectsBrandingAddress
+from voucherify.models.management_projects_branding_brand import ManagementProjectsBrandingBrand
+from voucherify.models.management_projects_branding_cockpits import ManagementProjectsBrandingCockpits
+from voucherify.models.management_projects_branding_contact import ManagementProjectsBrandingContact
+from voucherify.models.management_projects_branding_create_request_body import ManagementProjectsBrandingCreateRequestBody
+from voucherify.models.management_projects_branding_create_request_body_address import ManagementProjectsBrandingCreateRequestBodyAddress
+from voucherify.models.management_projects_branding_create_request_body_brand import ManagementProjectsBrandingCreateRequestBodyBrand
+from voucherify.models.management_projects_branding_create_request_body_cockpits import ManagementProjectsBrandingCreateRequestBodyCockpits
+from voucherify.models.management_projects_branding_create_request_body_contact import ManagementProjectsBrandingCreateRequestBodyContact
+from voucherify.models.management_projects_branding_create_response_body import ManagementProjectsBrandingCreateResponseBody
+from voucherify.models.management_projects_branding_create_response_body_address import ManagementProjectsBrandingCreateResponseBodyAddress
+from voucherify.models.management_projects_branding_create_response_body_brand import ManagementProjectsBrandingCreateResponseBodyBrand
+from voucherify.models.management_projects_branding_create_response_body_cockpits import ManagementProjectsBrandingCreateResponseBodyCockpits
+from voucherify.models.management_projects_branding_create_response_body_contact import ManagementProjectsBrandingCreateResponseBodyContact
+from voucherify.models.management_projects_branding_get_response_body import ManagementProjectsBrandingGetResponseBody
+from voucherify.models.management_projects_branding_get_response_body_address import ManagementProjectsBrandingGetResponseBodyAddress
+from voucherify.models.management_projects_branding_get_response_body_brand import ManagementProjectsBrandingGetResponseBodyBrand
+from voucherify.models.management_projects_branding_get_response_body_cockpits import ManagementProjectsBrandingGetResponseBodyCockpits
+from voucherify.models.management_projects_branding_get_response_body_contact import ManagementProjectsBrandingGetResponseBodyContact
+from voucherify.models.management_projects_branding_list_response_body import ManagementProjectsBrandingListResponseBody
+from voucherify.models.management_projects_branding_update_request_body import ManagementProjectsBrandingUpdateRequestBody
+from voucherify.models.management_projects_branding_update_request_body_address import ManagementProjectsBrandingUpdateRequestBodyAddress
+from voucherify.models.management_projects_branding_update_request_body_brand import ManagementProjectsBrandingUpdateRequestBodyBrand
+from voucherify.models.management_projects_branding_update_request_body_cockpits import ManagementProjectsBrandingUpdateRequestBodyCockpits
+from voucherify.models.management_projects_branding_update_request_body_contact import ManagementProjectsBrandingUpdateRequestBodyContact
+from voucherify.models.management_projects_branding_update_response_body import ManagementProjectsBrandingUpdateResponseBody
+from voucherify.models.management_projects_branding_update_response_body_address import ManagementProjectsBrandingUpdateResponseBodyAddress
+from voucherify.models.management_projects_branding_update_response_body_brand import ManagementProjectsBrandingUpdateResponseBodyBrand
+from voucherify.models.management_projects_branding_update_response_body_cockpits import ManagementProjectsBrandingUpdateResponseBodyCockpits
+from voucherify.models.management_projects_branding_update_response_body_contact import ManagementProjectsBrandingUpdateResponseBodyContact
+from voucherify.models.management_projects_create_request_body import ManagementProjectsCreateRequestBody
+from voucherify.models.management_projects_create_request_body_api_usage_notifications import ManagementProjectsCreateRequestBodyApiUsageNotifications
+from voucherify.models.management_projects_create_request_body_users_item import ManagementProjectsCreateRequestBodyUsersItem
+from voucherify.models.management_projects_create_request_body_webhooks_callout_notifications import ManagementProjectsCreateRequestBodyWebhooksCalloutNotifications
+from voucherify.models.management_projects_create_request_body_webhooks_callout_notifications_distributions import ManagementProjectsCreateRequestBodyWebhooksCalloutNotificationsDistributions
+from voucherify.models.management_projects_create_request_body_webhooks_callout_notifications_webhooks import ManagementProjectsCreateRequestBodyWebhooksCalloutNotificationsWebhooks
+from voucherify.models.management_projects_create_response_body import ManagementProjectsCreateResponseBody
+from voucherify.models.management_projects_create_response_body_api_usage_notifications import ManagementProjectsCreateResponseBodyApiUsageNotifications
+from voucherify.models.management_projects_create_response_body_client_side_key import ManagementProjectsCreateResponseBodyClientSideKey
+from voucherify.models.management_projects_create_response_body_server_side_key import ManagementProjectsCreateResponseBodyServerSideKey
+from voucherify.models.management_projects_create_response_body_webhooks_callout_notifications import ManagementProjectsCreateResponseBodyWebhooksCalloutNotifications
+from voucherify.models.management_projects_create_response_body_webhooks_callout_notifications_distributions import ManagementProjectsCreateResponseBodyWebhooksCalloutNotificationsDistributions
+from voucherify.models.management_projects_create_response_body_webhooks_callout_notifications_webhooks import ManagementProjectsCreateResponseBodyWebhooksCalloutNotificationsWebhooks
+from voucherify.models.management_projects_custom_event_schema import ManagementProjectsCustomEventSchema
+from voucherify.models.management_projects_custom_event_schema_schema import ManagementProjectsCustomEventSchemaSchema
+from voucherify.models.management_projects_custom_event_schemas_create_request_body import ManagementProjectsCustomEventSchemasCreateRequestBody
+from voucherify.models.management_projects_custom_event_schemas_create_request_body_schema import ManagementProjectsCustomEventSchemasCreateRequestBodySchema
+from voucherify.models.management_projects_custom_event_schemas_create_response_body import ManagementProjectsCustomEventSchemasCreateResponseBody
+from voucherify.models.management_projects_custom_event_schemas_create_response_body_schema import ManagementProjectsCustomEventSchemasCreateResponseBodySchema
+from voucherify.models.management_projects_custom_event_schemas_get_response_body import ManagementProjectsCustomEventSchemasGetResponseBody
+from voucherify.models.management_projects_custom_event_schemas_get_response_body_schema import ManagementProjectsCustomEventSchemasGetResponseBodySchema
+from voucherify.models.management_projects_custom_event_schemas_list_response_body import ManagementProjectsCustomEventSchemasListResponseBody
+from voucherify.models.management_projects_custom_event_schemas_update_request_body import ManagementProjectsCustomEventSchemasUpdateRequestBody
+from voucherify.models.management_projects_custom_event_schemas_update_request_body_schema import ManagementProjectsCustomEventSchemasUpdateRequestBodySchema
+from voucherify.models.management_projects_custom_event_schemas_update_response_body import ManagementProjectsCustomEventSchemasUpdateResponseBody
+from voucherify.models.management_projects_custom_event_schemas_update_response_body_schema import ManagementProjectsCustomEventSchemasUpdateResponseBodySchema
+from voucherify.models.management_projects_get_response_body import ManagementProjectsGetResponseBody
+from voucherify.models.management_projects_get_response_body_api_usage_notifications import ManagementProjectsGetResponseBodyApiUsageNotifications
+from voucherify.models.management_projects_get_response_body_default_code_config import ManagementProjectsGetResponseBodyDefaultCodeConfig
+from voucherify.models.management_projects_get_response_body_limits import ManagementProjectsGetResponseBodyLimits
+from voucherify.models.management_projects_get_response_body_limits_api_calls_item import ManagementProjectsGetResponseBodyLimitsApiCallsItem
+from voucherify.models.management_projects_get_response_body_limits_bulk_api_calls_item import ManagementProjectsGetResponseBodyLimitsBulkApiCallsItem
+from voucherify.models.management_projects_get_response_body_webhooks_callout_notifications import ManagementProjectsGetResponseBodyWebhooksCalloutNotifications
+from voucherify.models.management_projects_get_response_body_webhooks_callout_notifications_distributions import ManagementProjectsGetResponseBodyWebhooksCalloutNotificationsDistributions
+from voucherify.models.management_projects_get_response_body_webhooks_callout_notifications_webhooks import ManagementProjectsGetResponseBodyWebhooksCalloutNotificationsWebhooks
+from voucherify.models.management_projects_list_response_body import ManagementProjectsListResponseBody
+from voucherify.models.management_projects_metadata_schema import ManagementProjectsMetadataSchema
+from voucherify.models.management_projects_metadata_schemas_create_request_body import ManagementProjectsMetadataSchemasCreateRequestBody
+from voucherify.models.management_projects_metadata_schemas_create_response_body import ManagementProjectsMetadataSchemasCreateResponseBody
+from voucherify.models.management_projects_metadata_schemas_get_response_body import ManagementProjectsMetadataSchemasGetResponseBody
+from voucherify.models.management_projects_metadata_schemas_list_response_body import ManagementProjectsMetadataSchemasListResponseBody
+from voucherify.models.management_projects_metadata_schemas_update_request_body import ManagementProjectsMetadataSchemasUpdateRequestBody
+from voucherify.models.management_projects_metadata_schemas_update_response_body import ManagementProjectsMetadataSchemasUpdateResponseBody
+from voucherify.models.management_projects_stacking_rules import ManagementProjectsStackingRules
+from voucherify.models.management_projects_stacking_rules_create_request_body import ManagementProjectsStackingRulesCreateRequestBody
+from voucherify.models.management_projects_stacking_rules_create_response_body import ManagementProjectsStackingRulesCreateResponseBody
+from voucherify.models.management_projects_stacking_rules_get_response_body import ManagementProjectsStackingRulesGetResponseBody
+from voucherify.models.management_projects_stacking_rules_list_response_body import ManagementProjectsStackingRulesListResponseBody
+from voucherify.models.management_projects_stacking_rules_update_request_body import ManagementProjectsStackingRulesUpdateRequestBody
+from voucherify.models.management_projects_stacking_rules_update_response_body import ManagementProjectsStackingRulesUpdateResponseBody
+from voucherify.models.management_projects_templates_campaigns_copy_create_request_body import ManagementProjectsTemplatesCampaignsCopyCreateRequestBody
+from voucherify.models.management_projects_templates_campaigns_copy_create_response_body import ManagementProjectsTemplatesCampaignsCopyCreateResponseBody
+from voucherify.models.management_projects_templates_campaigns_list_response_body import ManagementProjectsTemplatesCampaignsListResponseBody
+from voucherify.models.management_projects_update_request_body import ManagementProjectsUpdateRequestBody
+from voucherify.models.management_projects_update_request_body_api_usage_notifications import ManagementProjectsUpdateRequestBodyApiUsageNotifications
+from voucherify.models.management_projects_update_request_body_default_code_config import ManagementProjectsUpdateRequestBodyDefaultCodeConfig
+from voucherify.models.management_projects_update_request_body_webhooks_callout_notifications import ManagementProjectsUpdateRequestBodyWebhooksCalloutNotifications
+from voucherify.models.management_projects_update_request_body_webhooks_callout_notifications_distributions import ManagementProjectsUpdateRequestBodyWebhooksCalloutNotificationsDistributions
+from voucherify.models.management_projects_update_request_body_webhooks_callout_notifications_webhooks import ManagementProjectsUpdateRequestBodyWebhooksCalloutNotificationsWebhooks
+from voucherify.models.management_projects_update_response_body import ManagementProjectsUpdateResponseBody
+from voucherify.models.management_projects_update_response_body_api_usage_notifications import ManagementProjectsUpdateResponseBodyApiUsageNotifications
+from voucherify.models.management_projects_update_response_body_default_code_config import ManagementProjectsUpdateResponseBodyDefaultCodeConfig
+from voucherify.models.management_projects_update_response_body_limits import ManagementProjectsUpdateResponseBodyLimits
+from voucherify.models.management_projects_update_response_body_limits_api_calls_item import ManagementProjectsUpdateResponseBodyLimitsApiCallsItem
+from voucherify.models.management_projects_update_response_body_limits_bulk_api_calls_item import ManagementProjectsUpdateResponseBodyLimitsBulkApiCallsItem
+from voucherify.models.management_projects_update_response_body_webhooks_callout_notifications import ManagementProjectsUpdateResponseBodyWebhooksCalloutNotifications
+from voucherify.models.management_projects_update_response_body_webhooks_callout_notifications_distributions import ManagementProjectsUpdateResponseBodyWebhooksCalloutNotificationsDistributions
+from voucherify.models.management_projects_update_response_body_webhooks_callout_notifications_webhooks import ManagementProjectsUpdateResponseBodyWebhooksCalloutNotificationsWebhooks
+from voucherify.models.management_projects_users_assign_request_body import ManagementProjectsUsersAssignRequestBody
+from voucherify.models.management_projects_users_assign_response_body import ManagementProjectsUsersAssignResponseBody
+from voucherify.models.management_projects_users_get_user_response_body import ManagementProjectsUsersGetUserResponseBody
+from voucherify.models.management_projects_users_invite_create_request_body import ManagementProjectsUsersInviteCreateRequestBody
+from voucherify.models.management_projects_users_list_response_body import ManagementProjectsUsersListResponseBody
+from voucherify.models.management_projects_users_update_role_request_body import ManagementProjectsUsersUpdateRoleRequestBody
+from voucherify.models.management_projects_users_update_role_response_body import ManagementProjectsUsersUpdateRoleResponseBody
+from voucherify.models.management_projects_webhook import ManagementProjectsWebhook
+from voucherify.models.management_projects_webhooks_create_request_body import ManagementProjectsWebhooksCreateRequestBody
+from voucherify.models.management_projects_webhooks_create_response_body import ManagementProjectsWebhooksCreateResponseBody
+from voucherify.models.management_projects_webhooks_get_response_body import ManagementProjectsWebhooksGetResponseBody
+from voucherify.models.management_projects_webhooks_list_response_body import ManagementProjectsWebhooksListResponseBody
+from voucherify.models.management_projects_webhooks_update_request_body import ManagementProjectsWebhooksUpdateRequestBody
+from voucherify.models.management_projects_webhooks_update_response_body import ManagementProjectsWebhooksUpdateResponseBody
from voucherify.models.member_activity import MemberActivity
+from voucherify.models.metadata_schema_deprecated import MetadataSchemaDeprecated
+from voucherify.models.metadata_schemas_get_response_body import MetadataSchemasGetResponseBody
+from voucherify.models.metadata_schemas_list_response_body import MetadataSchemasListResponseBody
from voucherify.models.order import Order
from voucherify.models.order_calculated import OrderCalculated
from voucherify.models.order_calculated_item import OrderCalculatedItem
@@ -510,12 +653,25 @@
from voucherify.models.parameter_campaign_type import ParameterCampaignType
from voucherify.models.parameter_created_before_after import ParameterCreatedBeforeAfter
from voucherify.models.parameter_expand_list_campaigns import ParameterExpandListCampaigns
+from voucherify.models.parameter_filters_list_bin import ParameterFiltersListBin
+from voucherify.models.parameter_filters_list_bin_id import ParameterFiltersListBinId
+from voucherify.models.parameter_filters_list_bin_resource_id import ParameterFiltersListBinResourceId
+from voucherify.models.parameter_filters_list_bin_resource_name import ParameterFiltersListBinResourceName
+from voucherify.models.parameter_filters_list_bin_resource_type import ParameterFiltersListBinResourceType
+from voucherify.models.parameter_filters_list_bin_resource_type_conditions import ParameterFiltersListBinResourceTypeConditions
+from voucherify.models.parameter_filters_list_campaigns import ParameterFiltersListCampaigns
+from voucherify.models.parameter_filters_list_campaigns_campaign_status import ParameterFiltersListCampaignsCampaignStatus
+from voucherify.models.parameter_filters_list_campaigns_campaign_status_conditions import ParameterFiltersListCampaignsCampaignStatusConditions
+from voucherify.models.parameter_filters_list_campaigns_categories import ParameterFiltersListCampaignsCategories
+from voucherify.models.parameter_filters_list_campaigns_category_ids import ParameterFiltersListCampaignsCategoryIds
+from voucherify.models.parameter_filters_list_campaigns_is_referral_code import ParameterFiltersListCampaignsIsReferralCode
+from voucherify.models.parameter_filters_list_campaigns_validity_timeframe import ParameterFiltersListCampaignsValidityTimeframe
+from voucherify.models.parameter_filters_list_campaigns_voucher_type import ParameterFiltersListCampaignsVoucherType
from voucherify.models.parameter_filters_list_customer_redeemables import ParameterFiltersListCustomerRedeemables
from voucherify.models.parameter_filters_list_customer_redeemables_campaign_id import ParameterFiltersListCustomerRedeemablesCampaignId
from voucherify.models.parameter_filters_list_customer_redeemables_campaign_type import ParameterFiltersListCustomerRedeemablesCampaignType
from voucherify.models.parameter_filters_list_customer_redeemables_campaign_type_conditions import ParameterFiltersListCustomerRedeemablesCampaignTypeConditions
from voucherify.models.parameter_filters_list_customer_redeemables_created_at import ParameterFiltersListCustomerRedeemablesCreatedAt
-from voucherify.models.parameter_filters_list_customer_redeemables_created_at_conditions import ParameterFiltersListCustomerRedeemablesCreatedAtConditions
from voucherify.models.parameter_filters_list_customer_redeemables_holder_role import ParameterFiltersListCustomerRedeemablesHolderRole
from voucherify.models.parameter_filters_list_customer_redeemables_holder_role_conditions import ParameterFiltersListCustomerRedeemablesHolderRoleConditions
from voucherify.models.parameter_filters_list_customer_redeemables_id import ParameterFiltersListCustomerRedeemablesId
@@ -524,6 +680,20 @@
from voucherify.models.parameter_filters_list_customer_redeemables_redeemable_object_conditions import ParameterFiltersListCustomerRedeemablesRedeemableObjectConditions
from voucherify.models.parameter_filters_list_customer_redeemables_voucher_type import ParameterFiltersListCustomerRedeemablesVoucherType
from voucherify.models.parameter_filters_list_customer_redeemables_voucher_type_conditions import ParameterFiltersListCustomerRedeemablesVoucherTypeConditions
+from voucherify.models.parameter_filters_list_locations import ParameterFiltersListLocations
+from voucherify.models.parameter_filters_list_locations_created_at import ParameterFiltersListLocationsCreatedAt
+from voucherify.models.parameter_filters_list_locations_name import ParameterFiltersListLocationsName
+from voucherify.models.parameter_filters_list_locations_updated_at import ParameterFiltersListLocationsUpdatedAt
+from voucherify.models.parameter_filters_list_publications import ParameterFiltersListPublications
+from voucherify.models.parameter_filters_list_publications_campaign_name import ParameterFiltersListPublicationsCampaignName
+from voucherify.models.parameter_filters_list_publications_customer_id import ParameterFiltersListPublicationsCustomerId
+from voucherify.models.parameter_filters_list_publications_failure_code import ParameterFiltersListPublicationsFailureCode
+from voucherify.models.parameter_filters_list_publications_is_referral_code import ParameterFiltersListPublicationsIsReferralCode
+from voucherify.models.parameter_filters_list_publications_parent_object_id import ParameterFiltersListPublicationsParentObjectId
+from voucherify.models.parameter_filters_list_publications_related_object_id import ParameterFiltersListPublicationsRelatedObjectId
+from voucherify.models.parameter_filters_list_publications_result import ParameterFiltersListPublicationsResult
+from voucherify.models.parameter_filters_list_publications_source_id import ParameterFiltersListPublicationsSourceId
+from voucherify.models.parameter_filters_list_publications_voucher_type import ParameterFiltersListPublicationsVoucherType
from voucherify.models.parameter_filters_list_redemptions import ParameterFiltersListRedemptions
from voucherify.models.parameter_filters_list_redemptions_campaign_name import ParameterFiltersListRedemptionsCampaignName
from voucherify.models.parameter_filters_list_redemptions_customer_id import ParameterFiltersListRedemptionsCustomerId
@@ -535,13 +705,26 @@
from voucherify.models.parameter_filters_list_redemptions_result import ParameterFiltersListRedemptionsResult
from voucherify.models.parameter_filters_list_redemptions_user_login import ParameterFiltersListRedemptionsUserLogin
from voucherify.models.parameter_filters_list_redemptions_voucher_code import ParameterFiltersListRedemptionsVoucherCode
+from voucherify.models.parameter_filters_list_referrals_redeemable_holders import ParameterFiltersListReferralsRedeemableHolders
+from voucherify.models.parameter_filters_list_referrals_redeemable_holders_created_at import ParameterFiltersListReferralsRedeemableHoldersCreatedAt
+from voucherify.models.parameter_filters_list_referrals_redeemable_holders_customer_id import ParameterFiltersListReferralsRedeemableHoldersCustomerId
+from voucherify.models.parameter_filters_list_referrals_redeemable_holders_holder_role import ParameterFiltersListReferralsRedeemableHoldersHolderRole
+from voucherify.models.parameter_filters_list_referrals_redeemable_holders_holder_role_conditions import ParameterFiltersListReferralsRedeemableHoldersHolderRoleConditions
+from voucherify.models.parameter_filters_list_referrals_redeemable_holders_id import ParameterFiltersListReferralsRedeemableHoldersId
+from voucherify.models.parameter_filters_list_templates import ParameterFiltersListTemplates
+from voucherify.models.parameter_filters_list_templates_campaign_type import ParameterFiltersListTemplatesCampaignType
+from voucherify.models.parameter_filters_list_templates_campaign_type_conditions import ParameterFiltersListTemplatesCampaignTypeConditions
+from voucherify.models.parameter_filters_list_templates_id import ParameterFiltersListTemplatesId
+from voucherify.models.parameter_filters_list_templates_name import ParameterFiltersListTemplatesName
from voucherify.models.parameter_order import ParameterOrder
from voucherify.models.parameter_order_created_at import ParameterOrderCreatedAt
from voucherify.models.parameter_order_list_all_promotion_stacks import ParameterOrderListAllPromotionStacks
+from voucherify.models.parameter_order_list_bin import ParameterOrderListBin
from voucherify.models.parameter_order_list_campaigns import ParameterOrderListCampaigns
from voucherify.models.parameter_order_list_customers import ParameterOrderListCustomers
from voucherify.models.parameter_order_list_earning_rules import ParameterOrderListEarningRules
from voucherify.models.parameter_order_list_exports import ParameterOrderListExports
+from voucherify.models.parameter_order_list_locations import ParameterOrderListLocations
from voucherify.models.parameter_order_list_loyalty_tiers import ParameterOrderListLoyaltyTiers
from voucherify.models.parameter_order_list_orders import ParameterOrderListOrders
from voucherify.models.parameter_order_list_promotion_tiers import ParameterOrderListPromotionTiers
@@ -554,21 +737,18 @@
from voucherify.models.parameter_order_list_validation_rules import ParameterOrderListValidationRules
from voucherify.models.parameter_order_vouchers import ParameterOrderVouchers
from voucherify.models.parameter_result_list_publications import ParameterResultListPublications
+from voucherify.models.parameter_templates_list import ParameterTemplatesList
from voucherify.models.parameter_updated_before_after import ParameterUpdatedBeforeAfter
from voucherify.models.parameter_voucher_type_list_publications import ParameterVoucherTypeListPublications
from voucherify.models.points_expiration_types import PointsExpirationTypes
from voucherify.models.product import Product
from voucherify.models.product_collections_create_request_body import ProductCollectionsCreateRequestBody
-from voucherify.models.product_collections_create_request_body_filter import ProductCollectionsCreateRequestBodyFilter
from voucherify.models.product_collections_create_request_body_products_item import ProductCollectionsCreateRequestBodyProductsItem
from voucherify.models.product_collections_create_response_body import ProductCollectionsCreateResponseBody
-from voucherify.models.product_collections_create_response_body_filter import ProductCollectionsCreateResponseBodyFilter
from voucherify.models.product_collections_create_response_body_products_item import ProductCollectionsCreateResponseBodyProductsItem
from voucherify.models.product_collections_get_response_body import ProductCollectionsGetResponseBody
-from voucherify.models.product_collections_get_response_body_filter import ProductCollectionsGetResponseBodyFilter
from voucherify.models.product_collections_get_response_body_products_item import ProductCollectionsGetResponseBodyProductsItem
from voucherify.models.product_collections_item import ProductCollectionsItem
-from voucherify.models.product_collections_item_filter import ProductCollectionsItemFilter
from voucherify.models.product_collections_item_products_item import ProductCollectionsItemProductsItem
from voucherify.models.product_collections_list_response_body import ProductCollectionsListResponseBody
from voucherify.models.product_collections_products_list_response_body import ProductCollectionsProductsListResponseBody
@@ -650,8 +830,6 @@
from voucherify.models.promotions_tiers_update_response_body_summary_orders import PromotionsTiersUpdateResponseBodySummaryOrders
from voucherify.models.promotions_tiers_update_response_body_summary_redemptions import PromotionsTiersUpdateResponseBodySummaryRedemptions
from voucherify.models.publications_create_request_body import PublicationsCreateRequestBody
-from voucherify.models.publications_create_request_body_customer import PublicationsCreateRequestBodyCustomer
-from voucherify.models.publications_create_request_body_customer_address import PublicationsCreateRequestBodyCustomerAddress
from voucherify.models.publications_create_response_body import PublicationsCreateResponseBody
from voucherify.models.publications_list_response_body import PublicationsListResponseBody
from voucherify.models.publications_list_response_body_publications_item import PublicationsListResponseBodyPublicationsItem
@@ -672,6 +850,7 @@
from voucherify.models.qualifications_redeemable_base import QualificationsRedeemableBase
from voucherify.models.qualifications_redeemables import QualificationsRedeemables
from voucherify.models.redeemable_gift import RedeemableGift
+from voucherify.models.redeemable_holder import RedeemableHolder
from voucherify.models.redeemable_loyalty_card import RedeemableLoyaltyCard
from voucherify.models.redeemable_result import RedeemableResult
from voucherify.models.redeemable_voucher import RedeemableVoucher
@@ -790,6 +969,9 @@
from voucherify.models.referral_program_custom_event import ReferralProgramCustomEvent
from voucherify.models.referral_program_referee_reward import ReferralProgramRefereeReward
from voucherify.models.referral_program_referee_reward_related_object_parent import ReferralProgramRefereeRewardRelatedObjectParent
+from voucherify.models.referrals_members_holders_create_in_bulk_request_body import ReferralsMembersHoldersCreateInBulkRequestBody
+from voucherify.models.referrals_members_holders_create_in_bulk_response_body import ReferralsMembersHoldersCreateInBulkResponseBody
+from voucherify.models.referrals_members_holders_list_response_body import ReferralsMembersHoldersListResponseBody
from voucherify.models.referrer import Referrer
from voucherify.models.referrer_address import ReferrerAddress
from voucherify.models.referrer_id import ReferrerId
@@ -853,6 +1035,24 @@
from voucherify.models.skus_import_csv_create_response_body import SkusImportCsvCreateResponseBody
from voucherify.models.skus_list_for_product import SkusListForProduct
from voucherify.models.stacking_rules import StackingRules
+from voucherify.models.templates_campaigns_campaign_setup_create_request_body import TemplatesCampaignsCampaignSetupCreateRequestBody
+from voucherify.models.templates_campaigns_campaign_setup_create_request_body_voucher import TemplatesCampaignsCampaignSetupCreateRequestBodyVoucher
+from voucherify.models.templates_campaigns_campaign_setup_create_request_body_voucher_redemption import TemplatesCampaignsCampaignSetupCreateRequestBodyVoucherRedemption
+from voucherify.models.templates_campaigns_campaign_setup_create_response_body import TemplatesCampaignsCampaignSetupCreateResponseBody
+from voucherify.models.templates_campaigns_campaign_setup_create_response_body_created_resources_item import TemplatesCampaignsCampaignSetupCreateResponseBodyCreatedResourcesItem
+from voucherify.models.templates_campaigns_create_request_body import TemplatesCampaignsCreateRequestBody
+from voucherify.models.templates_campaigns_create_template_response_body import TemplatesCampaignsCreateTemplateResponseBody
+from voucherify.models.templates_campaigns_get_response_body import TemplatesCampaignsGetResponseBody
+from voucherify.models.templates_campaigns_list_response_body import TemplatesCampaignsListResponseBody
+from voucherify.models.templates_campaigns_tier_setup_create_request_body import TemplatesCampaignsTierSetupCreateRequestBody
+from voucherify.models.templates_campaigns_tier_setup_create_response_body import TemplatesCampaignsTierSetupCreateResponseBody
+from voucherify.models.templates_campaigns_tier_setup_create_response_body_created_resources_item import TemplatesCampaignsTierSetupCreateResponseBodyCreatedResourcesItem
+from voucherify.models.templates_campaigns_update_request_body import TemplatesCampaignsUpdateRequestBody
+from voucherify.models.templates_campaigns_update_response_body import TemplatesCampaignsUpdateResponseBody
+from voucherify.models.trash_bin_item import TrashBinItem
+from voucherify.models.trash_bin_list_response_body import TrashBinListResponseBody
+from voucherify.models.usage_notifications import UsageNotifications
+from voucherify.models.user import User
from voucherify.models.validation_rule import ValidationRule
from voucherify.models.validation_rule_applicable_to import ValidationRuleApplicableTo
from voucherify.models.validation_rule_assignment import ValidationRuleAssignment
diff --git a/voucherify/api/__init__.py b/voucherify/api/__init__.py
index 66ca31b2..098c5adc 100644
--- a/voucherify/api/__init__.py
+++ b/voucherify/api/__init__.py
@@ -2,13 +2,17 @@
# import apis into api package
from voucherify.api.async_actions_api import AsyncActionsApi
+from voucherify.api.bin_api import BinApi
from voucherify.api.campaigns_api import CampaignsApi
from voucherify.api.categories_api import CategoriesApi
from voucherify.api.client_side_api import ClientSideApi
from voucherify.api.customers_api import CustomersApi
from voucherify.api.events_api import EventsApi
from voucherify.api.exports_api import ExportsApi
+from voucherify.api.locations_api import LocationsApi
from voucherify.api.loyalties_api import LoyaltiesApi
+from voucherify.api.management_api import ManagementApi
+from voucherify.api.metadata_schemas_api import MetadataSchemasApi
from voucherify.api.orders_api import OrdersApi
from voucherify.api.product_collections_api import ProductCollectionsApi
from voucherify.api.products_api import ProductsApi
@@ -16,8 +20,10 @@
from voucherify.api.publications_api import PublicationsApi
from voucherify.api.qualifications_api import QualificationsApi
from voucherify.api.redemptions_api import RedemptionsApi
+from voucherify.api.referrals_api import ReferralsApi
from voucherify.api.rewards_api import RewardsApi
from voucherify.api.segments_api import SegmentsApi
+from voucherify.api.templates_api import TemplatesApi
from voucherify.api.validation_rules_api import ValidationRulesApi
from voucherify.api.validations_api import ValidationsApi
from voucherify.api.vouchers_api import VouchersApi
diff --git a/voucherify/api/bin_api.py b/voucherify/api/bin_api.py
new file mode 100644
index 00000000..45e3750e
--- /dev/null
+++ b/voucherify/api/bin_api.py
@@ -0,0 +1,608 @@
+# coding: utf-8
+
+"""
+ Voucherify API
+
+ Voucherify promotion engine REST API. Please see https://docs.voucherify.io/docs for more details.
+
+ The version of the OpenAPI document: v2018-08-01
+ Contact: support@voucherify.io
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+import warnings
+from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt
+from typing import Any, Dict, List, Optional, Tuple, Union
+from typing_extensions import Annotated
+
+from pydantic import Field, StrictStr
+from typing import Optional
+from typing_extensions import Annotated
+from voucherify.models.parameter_filters_list_bin import ParameterFiltersListBin
+from voucherify.models.parameter_order_list_bin import ParameterOrderListBin
+from voucherify.models.trash_bin_list_response_body import TrashBinListResponseBody
+
+from voucherify.api_client import ApiClient, RequestSerialized
+from voucherify.api_response import ApiResponse
+from voucherify.rest import RESTResponseType
+
+
+class BinApi:
+ """NOTE: This class is auto generated by OpenAPI Generator
+ Ref: https://openapi-generator.tech
+
+ Do not edit the class manually.
+ """
+
+ def __init__(self, api_client=None) -> None:
+ if api_client is None:
+ api_client = ApiClient.get_default()
+ self.api_client = api_client
+
+
+ @validate_call
+ def delete_bin_entry(
+ self,
+ bin_entry_id: Annotated[StrictStr, Field(description="Provide the unique identifier of the bin entry.")],
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> None:
+ """Delete Bin Entry
+
+ Deletes permanently a bin entry with a given ID.The following resources can be moved to the bin and permanently deleted: - campaigns - vouchers - products - SKUs To use this endpoint and delete a given resource type, you must have the following permissions: - vouchers.delete to delete a voucher, - campaigns.delete to delete a campaign, - products.delete to delete a product or SKU.
+
+ :param bin_entry_id: Provide the unique identifier of the bin entry. (required)
+ :type bin_entry_id: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._delete_bin_entry_serialize(
+ bin_entry_id=bin_entry_id,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '2XX': None,
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ ).data
+
+
+ @validate_call
+ def delete_bin_entry_with_http_info(
+ self,
+ bin_entry_id: Annotated[StrictStr, Field(description="Provide the unique identifier of the bin entry.")],
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> ApiResponse[None]:
+ """Delete Bin Entry
+
+ Deletes permanently a bin entry with a given ID.The following resources can be moved to the bin and permanently deleted: - campaigns - vouchers - products - SKUs To use this endpoint and delete a given resource type, you must have the following permissions: - vouchers.delete to delete a voucher, - campaigns.delete to delete a campaign, - products.delete to delete a product or SKU.
+
+ :param bin_entry_id: Provide the unique identifier of the bin entry. (required)
+ :type bin_entry_id: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._delete_bin_entry_serialize(
+ bin_entry_id=bin_entry_id,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '2XX': None,
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ )
+
+
+ @validate_call
+ def delete_bin_entry_without_preload_content(
+ self,
+ bin_entry_id: Annotated[StrictStr, Field(description="Provide the unique identifier of the bin entry.")],
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> RESTResponseType:
+ """Delete Bin Entry
+
+ Deletes permanently a bin entry with a given ID.The following resources can be moved to the bin and permanently deleted: - campaigns - vouchers - products - SKUs To use this endpoint and delete a given resource type, you must have the following permissions: - vouchers.delete to delete a voucher, - campaigns.delete to delete a campaign, - products.delete to delete a product or SKU.
+
+ :param bin_entry_id: Provide the unique identifier of the bin entry. (required)
+ :type bin_entry_id: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._delete_bin_entry_serialize(
+ bin_entry_id=bin_entry_id,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '2XX': None,
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+
+ def _delete_bin_entry_serialize(
+ self,
+ bin_entry_id,
+ _request_auth,
+ _content_type,
+ _headers,
+ _host_index,
+ ) -> RequestSerialized:
+
+ _host = None
+
+ _collection_formats: Dict[str, str] = {
+ }
+
+ _path_params: Dict[str, str] = {}
+ _query_params: List[Tuple[str, str]] = []
+ _header_params: Dict[str, Optional[str]] = _headers or {}
+ _form_params: List[Tuple[str, str]] = []
+ _files: Dict[str, Union[str, bytes]] = {}
+ _body_params: Optional[bytes] = None
+
+ # process the path parameters
+ if bin_entry_id is not None:
+ _path_params['binEntryId'] = bin_entry_id
+ # process the query parameters
+ # process the header parameters
+ # process the form parameters
+ # process the body parameter
+
+
+
+
+ # authentication setting
+ _auth_settings: List[str] = [
+ 'X-App-Id',
+ 'X-App-Token'
+ ]
+
+ return self.api_client.param_serialize(
+ method='DELETE',
+ resource_path='/v1/trash-bin/{binEntryId}',
+ path_params=_path_params,
+ query_params=_query_params,
+ header_params=_header_params,
+ body=_body_params,
+ post_params=_form_params,
+ files=_files,
+ auth_settings=_auth_settings,
+ collection_formats=_collection_formats,
+ _host=_host,
+ _request_auth=_request_auth
+ )
+
+
+
+
+ @validate_call
+ def list_bin_entries(
+ self,
+ limit: Annotated[Optional[Annotated[int, Field(le=100, strict=True, ge=1)]], Field(description="Limits the number of objects to be returned. The limit can range between 1 and 100 items. If no limit is set, it returns 10 items.")] = None,
+ order: Annotated[Optional[ParameterOrderListBin], Field(description="Orders the bin entries according the date and time when they were moved to the bin or according to the bin entry ID. The dash - preceding a sorting option means sorting in a descending order.")] = None,
+ starting_after_id: Annotated[Optional[StrictStr], Field(description="A cursor for pagination. It retrieves the events starting after an event with the given ID.")] = None,
+ filters: Annotated[Optional[ParameterFiltersListBin], Field(description="Filters for listing bin entries.")] = None,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> TrashBinListResponseBody:
+ """List Bin Entries
+
+ Retrieves a list of resources moved to the bin. The following resources can be moved to the bin: - campaigns - vouchers - products - SKUs To use this endpoint, you must have the following permissions: - vouchers.read - campaigns.read - products.read
+
+ :param limit: Limits the number of objects to be returned. The limit can range between 1 and 100 items. If no limit is set, it returns 10 items.
+ :type limit: int
+ :param order: Orders the bin entries according the date and time when they were moved to the bin or according to the bin entry ID. The dash - preceding a sorting option means sorting in a descending order.
+ :type order: ParameterOrderListBin
+ :param starting_after_id: A cursor for pagination. It retrieves the events starting after an event with the given ID.
+ :type starting_after_id: str
+ :param filters: Filters for listing bin entries.
+ :type filters: ParameterFiltersListBin
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._list_bin_entries_serialize(
+ limit=limit,
+ order=order,
+ starting_after_id=starting_after_id,
+ filters=filters,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '2XX': "TrashBinListResponseBody",
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ ).data
+
+
+ @validate_call
+ def list_bin_entries_with_http_info(
+ self,
+ limit: Annotated[Optional[Annotated[int, Field(le=100, strict=True, ge=1)]], Field(description="Limits the number of objects to be returned. The limit can range between 1 and 100 items. If no limit is set, it returns 10 items.")] = None,
+ order: Annotated[Optional[ParameterOrderListBin], Field(description="Orders the bin entries according the date and time when they were moved to the bin or according to the bin entry ID. The dash - preceding a sorting option means sorting in a descending order.")] = None,
+ starting_after_id: Annotated[Optional[StrictStr], Field(description="A cursor for pagination. It retrieves the events starting after an event with the given ID.")] = None,
+ filters: Annotated[Optional[ParameterFiltersListBin], Field(description="Filters for listing bin entries.")] = None,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> ApiResponse[TrashBinListResponseBody]:
+ """List Bin Entries
+
+ Retrieves a list of resources moved to the bin. The following resources can be moved to the bin: - campaigns - vouchers - products - SKUs To use this endpoint, you must have the following permissions: - vouchers.read - campaigns.read - products.read
+
+ :param limit: Limits the number of objects to be returned. The limit can range between 1 and 100 items. If no limit is set, it returns 10 items.
+ :type limit: int
+ :param order: Orders the bin entries according the date and time when they were moved to the bin or according to the bin entry ID. The dash - preceding a sorting option means sorting in a descending order.
+ :type order: ParameterOrderListBin
+ :param starting_after_id: A cursor for pagination. It retrieves the events starting after an event with the given ID.
+ :type starting_after_id: str
+ :param filters: Filters for listing bin entries.
+ :type filters: ParameterFiltersListBin
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._list_bin_entries_serialize(
+ limit=limit,
+ order=order,
+ starting_after_id=starting_after_id,
+ filters=filters,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '2XX': "TrashBinListResponseBody",
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ )
+
+
+ @validate_call
+ def list_bin_entries_without_preload_content(
+ self,
+ limit: Annotated[Optional[Annotated[int, Field(le=100, strict=True, ge=1)]], Field(description="Limits the number of objects to be returned. The limit can range between 1 and 100 items. If no limit is set, it returns 10 items.")] = None,
+ order: Annotated[Optional[ParameterOrderListBin], Field(description="Orders the bin entries according the date and time when they were moved to the bin or according to the bin entry ID. The dash - preceding a sorting option means sorting in a descending order.")] = None,
+ starting_after_id: Annotated[Optional[StrictStr], Field(description="A cursor for pagination. It retrieves the events starting after an event with the given ID.")] = None,
+ filters: Annotated[Optional[ParameterFiltersListBin], Field(description="Filters for listing bin entries.")] = None,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> RESTResponseType:
+ """List Bin Entries
+
+ Retrieves a list of resources moved to the bin. The following resources can be moved to the bin: - campaigns - vouchers - products - SKUs To use this endpoint, you must have the following permissions: - vouchers.read - campaigns.read - products.read
+
+ :param limit: Limits the number of objects to be returned. The limit can range between 1 and 100 items. If no limit is set, it returns 10 items.
+ :type limit: int
+ :param order: Orders the bin entries according the date and time when they were moved to the bin or according to the bin entry ID. The dash - preceding a sorting option means sorting in a descending order.
+ :type order: ParameterOrderListBin
+ :param starting_after_id: A cursor for pagination. It retrieves the events starting after an event with the given ID.
+ :type starting_after_id: str
+ :param filters: Filters for listing bin entries.
+ :type filters: ParameterFiltersListBin
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._list_bin_entries_serialize(
+ limit=limit,
+ order=order,
+ starting_after_id=starting_after_id,
+ filters=filters,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '2XX': "TrashBinListResponseBody",
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+
+ def _list_bin_entries_serialize(
+ self,
+ limit,
+ order,
+ starting_after_id,
+ filters,
+ _request_auth,
+ _content_type,
+ _headers,
+ _host_index,
+ ) -> RequestSerialized:
+
+ _host = None
+
+ _collection_formats: Dict[str, str] = {
+ }
+
+ _path_params: Dict[str, str] = {}
+ _query_params: List[Tuple[str, str]] = []
+ _header_params: Dict[str, Optional[str]] = _headers or {}
+ _form_params: List[Tuple[str, str]] = []
+ _files: Dict[str, Union[str, bytes]] = {}
+ _body_params: Optional[bytes] = None
+
+ # process the path parameters
+ # process the query parameters
+ if limit is not None:
+
+ _query_params.append(('limit', limit))
+
+ if order is not None:
+
+ _query_params.append(('order', order.value))
+
+ if starting_after_id is not None:
+
+ _query_params.append(('starting_after_id', starting_after_id))
+
+ if filters is not None:
+
+ _query_params.append(('filters', filters))
+
+ # process the header parameters
+ # process the form parameters
+ # process the body parameter
+
+
+ # set the HTTP header `Accept`
+ if 'Accept' not in _header_params:
+ _header_params['Accept'] = self.api_client.select_header_accept(
+ [
+ 'application/json'
+ ]
+ )
+
+
+ # authentication setting
+ _auth_settings: List[str] = [
+ 'X-App-Id',
+ 'X-App-Token'
+ ]
+
+ return self.api_client.param_serialize(
+ method='GET',
+ resource_path='/v1/trash-bin',
+ path_params=_path_params,
+ query_params=_query_params,
+ header_params=_header_params,
+ body=_body_params,
+ post_params=_form_params,
+ files=_files,
+ auth_settings=_auth_settings,
+ collection_formats=_collection_formats,
+ _host=_host,
+ _request_auth=_request_auth
+ )
+
+
diff --git a/voucherify/api/campaigns_api.py b/voucherify/api/campaigns_api.py
index 50b3f114..f199d814 100644
--- a/voucherify/api/campaigns_api.py
+++ b/voucherify/api/campaigns_api.py
@@ -36,6 +36,7 @@
from voucherify.models.campaigns_vouchers_create_response_body import CampaignsVouchersCreateResponseBody
from voucherify.models.parameter_campaign_type import ParameterCampaignType
from voucherify.models.parameter_expand_list_campaigns import ParameterExpandListCampaigns
+from voucherify.models.parameter_filters_list_campaigns import ParameterFiltersListCampaigns
from voucherify.models.parameter_order_list_campaigns import ParameterOrderListCampaigns
from voucherify.api_client import ApiClient, RequestSerialized
@@ -2579,6 +2580,7 @@ def list_campaigns(
campaign_type: Annotated[Optional[ParameterCampaignType], Field(description="This attribute allows filtering by campaign type.")] = None,
expand: Annotated[Optional[ParameterExpandListCampaigns], Field(description="Include an expanded categories object in the response.")] = None,
order: Annotated[Optional[ParameterOrderListCampaigns], Field(description="Sorts the results using one of the filtering options, where the dash - preceding a sorting option means sorting in a descending order.")] = None,
+ filters: Annotated[Optional[ParameterFiltersListCampaigns], Field(description="Filters the results by campaign status or whether the campaign is a referral campaign.")] = None,
_request_timeout: Union[
None,
Annotated[StrictFloat, Field(gt=0)],
@@ -2606,6 +2608,8 @@ def list_campaigns(
:type expand: ParameterExpandListCampaigns
:param order: Sorts the results using one of the filtering options, where the dash - preceding a sorting option means sorting in a descending order.
:type order: ParameterOrderListCampaigns
+ :param filters: Filters the results by campaign status or whether the campaign is a referral campaign.
+ :type filters: ParameterFiltersListCampaigns
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
@@ -2634,6 +2638,7 @@ def list_campaigns(
campaign_type=campaign_type,
expand=expand,
order=order,
+ filters=filters,
_request_auth=_request_auth,
_content_type=_content_type,
_headers=_headers,
@@ -2662,6 +2667,7 @@ def list_campaigns_with_http_info(
campaign_type: Annotated[Optional[ParameterCampaignType], Field(description="This attribute allows filtering by campaign type.")] = None,
expand: Annotated[Optional[ParameterExpandListCampaigns], Field(description="Include an expanded categories object in the response.")] = None,
order: Annotated[Optional[ParameterOrderListCampaigns], Field(description="Sorts the results using one of the filtering options, where the dash - preceding a sorting option means sorting in a descending order.")] = None,
+ filters: Annotated[Optional[ParameterFiltersListCampaigns], Field(description="Filters the results by campaign status or whether the campaign is a referral campaign.")] = None,
_request_timeout: Union[
None,
Annotated[StrictFloat, Field(gt=0)],
@@ -2689,6 +2695,8 @@ def list_campaigns_with_http_info(
:type expand: ParameterExpandListCampaigns
:param order: Sorts the results using one of the filtering options, where the dash - preceding a sorting option means sorting in a descending order.
:type order: ParameterOrderListCampaigns
+ :param filters: Filters the results by campaign status or whether the campaign is a referral campaign.
+ :type filters: ParameterFiltersListCampaigns
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
@@ -2717,6 +2725,7 @@ def list_campaigns_with_http_info(
campaign_type=campaign_type,
expand=expand,
order=order,
+ filters=filters,
_request_auth=_request_auth,
_content_type=_content_type,
_headers=_headers,
@@ -2745,6 +2754,7 @@ def list_campaigns_without_preload_content(
campaign_type: Annotated[Optional[ParameterCampaignType], Field(description="This attribute allows filtering by campaign type.")] = None,
expand: Annotated[Optional[ParameterExpandListCampaigns], Field(description="Include an expanded categories object in the response.")] = None,
order: Annotated[Optional[ParameterOrderListCampaigns], Field(description="Sorts the results using one of the filtering options, where the dash - preceding a sorting option means sorting in a descending order.")] = None,
+ filters: Annotated[Optional[ParameterFiltersListCampaigns], Field(description="Filters the results by campaign status or whether the campaign is a referral campaign.")] = None,
_request_timeout: Union[
None,
Annotated[StrictFloat, Field(gt=0)],
@@ -2772,6 +2782,8 @@ def list_campaigns_without_preload_content(
:type expand: ParameterExpandListCampaigns
:param order: Sorts the results using one of the filtering options, where the dash - preceding a sorting option means sorting in a descending order.
:type order: ParameterOrderListCampaigns
+ :param filters: Filters the results by campaign status or whether the campaign is a referral campaign.
+ :type filters: ParameterFiltersListCampaigns
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
@@ -2800,6 +2812,7 @@ def list_campaigns_without_preload_content(
campaign_type=campaign_type,
expand=expand,
order=order,
+ filters=filters,
_request_auth=_request_auth,
_content_type=_content_type,
_headers=_headers,
@@ -2823,6 +2836,7 @@ def _list_campaigns_serialize(
campaign_type,
expand,
order,
+ filters,
_request_auth,
_content_type,
_headers,
@@ -2863,6 +2877,10 @@ def _list_campaigns_serialize(
_query_params.append(('order', order.value))
+ if filters is not None:
+
+ _query_params.append(('filters', filters))
+
# process the header parameters
# process the form parameters
# process the body parameter
diff --git a/voucherify/api/customers_api.py b/voucherify/api/customers_api.py
index 1880adac..1291c133 100644
--- a/voucherify/api/customers_api.py
+++ b/voucherify/api/customers_api.py
@@ -3200,7 +3200,7 @@ def update_customers_in_bulk(
) -> CustomersUpdateInBulkResponseBody:
"""Update Customers in Bulk
- Updates customers in one asynchronous operation. The request can include up to **10 MB** of data. The response returns a unique asynchronous action ID. Use this ID in the query paramater of the GET Async Action endpoint to check, e.g.: - The status of your request (in queue, in progress, done, or failed) - Resources that failed to be updated - The report file with details about the update If a customer object is not found, it is **upserted**. This is shown in the report file in the GET Async Action endpoint. The upserted resources have value false in the found column and true in the updated column. This API request starts a process that affects Voucherify data in bulk. In the case of small jobs (like bulk update), the request is put into a queue and processed when every other bulk request placed in the queue prior to this request is finished.
+ Updates customers in one asynchronous operation. The request can include up to **10 MB** of data. The response returns a unique asynchronous action ID. Use this ID in the query paramater of the GET Async Action endpoint to check, e.g.: - The status of your request (in queue, in progress, done, or failed) - Resources that failed to be updated - The report file with details about the update If a customer object is not found, it is **upserted**. This is shown in the report file in the **GET** Async Action endpoint. The upserted resources have value false in the found column and true in the updated column. This API request starts a process that affects Voucherify data in bulk. In the case of small jobs (like bulk update), the request is put into a queue and processed when every other bulk request placed in the queue prior to this request is finished.
:param customers_update_in_bulk_request_body: List the customer fields to be updated in each customer object.
:type customers_update_in_bulk_request_body: List[CustomersUpdateInBulkRequestBody]
@@ -3267,7 +3267,7 @@ def update_customers_in_bulk_with_http_info(
) -> ApiResponse[CustomersUpdateInBulkResponseBody]:
"""Update Customers in Bulk
- Updates customers in one asynchronous operation. The request can include up to **10 MB** of data. The response returns a unique asynchronous action ID. Use this ID in the query paramater of the GET Async Action endpoint to check, e.g.: - The status of your request (in queue, in progress, done, or failed) - Resources that failed to be updated - The report file with details about the update If a customer object is not found, it is **upserted**. This is shown in the report file in the GET Async Action endpoint. The upserted resources have value false in the found column and true in the updated column. This API request starts a process that affects Voucherify data in bulk. In the case of small jobs (like bulk update), the request is put into a queue and processed when every other bulk request placed in the queue prior to this request is finished.
+ Updates customers in one asynchronous operation. The request can include up to **10 MB** of data. The response returns a unique asynchronous action ID. Use this ID in the query paramater of the GET Async Action endpoint to check, e.g.: - The status of your request (in queue, in progress, done, or failed) - Resources that failed to be updated - The report file with details about the update If a customer object is not found, it is **upserted**. This is shown in the report file in the **GET** Async Action endpoint. The upserted resources have value false in the found column and true in the updated column. This API request starts a process that affects Voucherify data in bulk. In the case of small jobs (like bulk update), the request is put into a queue and processed when every other bulk request placed in the queue prior to this request is finished.
:param customers_update_in_bulk_request_body: List the customer fields to be updated in each customer object.
:type customers_update_in_bulk_request_body: List[CustomersUpdateInBulkRequestBody]
@@ -3334,7 +3334,7 @@ def update_customers_in_bulk_without_preload_content(
) -> RESTResponseType:
"""Update Customers in Bulk
- Updates customers in one asynchronous operation. The request can include up to **10 MB** of data. The response returns a unique asynchronous action ID. Use this ID in the query paramater of the GET Async Action endpoint to check, e.g.: - The status of your request (in queue, in progress, done, or failed) - Resources that failed to be updated - The report file with details about the update If a customer object is not found, it is **upserted**. This is shown in the report file in the GET Async Action endpoint. The upserted resources have value false in the found column and true in the updated column. This API request starts a process that affects Voucherify data in bulk. In the case of small jobs (like bulk update), the request is put into a queue and processed when every other bulk request placed in the queue prior to this request is finished.
+ Updates customers in one asynchronous operation. The request can include up to **10 MB** of data. The response returns a unique asynchronous action ID. Use this ID in the query paramater of the GET Async Action endpoint to check, e.g.: - The status of your request (in queue, in progress, done, or failed) - Resources that failed to be updated - The report file with details about the update If a customer object is not found, it is **upserted**. This is shown in the report file in the **GET** Async Action endpoint. The upserted resources have value false in the found column and true in the updated column. This API request starts a process that affects Voucherify data in bulk. In the case of small jobs (like bulk update), the request is put into a queue and processed when every other bulk request placed in the queue prior to this request is finished.
:param customers_update_in_bulk_request_body: List the customer fields to be updated in each customer object.
:type customers_update_in_bulk_request_body: List[CustomersUpdateInBulkRequestBody]
@@ -3474,7 +3474,7 @@ def update_customers_metadata_in_bulk(
) -> CustomersMetadataUpdateInBulkResponseBody:
"""Update Customers' Metadata in Bulk
- Updates metadata parameters for a list of customers. Every resource in the list will receive the metadata defined in the request. The request can include up to **10 MB** of data. The response returns a unique asynchronous action ID. Use this ID in the query paramater of the GET Async Action endpoint to check, e.g.: - The status of your request (in queue, in progress, done, or failed) - Resources that failed to be updated - The report file with details about the update If a product object is not found, it is **upserted**. This is shown in the report file in the GET Async Action endpoint. The upserted resources have value false in the found column and true in the updated column. This API request starts a process that affects Voucherify data in bulk. In the case of small jobs (like bulk update), the request is put into a queue and processed when every other bulk request placed in the queue prior to this request is finished.
+ Updates metadata parameters for a list of customers. Every resource in the list will receive the metadata defined in the request. The request can include up to **10 MB** of data. The response returns a unique asynchronous action ID. Use this ID in the query paramater of the GET Async Action endpoint to check, e.g.: - The status of your request (in queue, in progress, done, or failed) - Resources that failed to be updated - The report file with details about the update If a product object is not found, it is **upserted**. This is shown in the report file in the **GET** Async Action endpoint. The upserted resources have value false in the found column and true in the updated column. This API request starts a process that affects Voucherify data in bulk. In the case of small jobs (like bulk update), the request is put into a queue and processed when every other bulk request placed in the queue prior to this request is finished.
:param customers_metadata_update_in_bulk_request_body: List the source_ids of the customers you would like to update with the metadata key/value pairs.
:type customers_metadata_update_in_bulk_request_body: CustomersMetadataUpdateInBulkRequestBody
@@ -3541,7 +3541,7 @@ def update_customers_metadata_in_bulk_with_http_info(
) -> ApiResponse[CustomersMetadataUpdateInBulkResponseBody]:
"""Update Customers' Metadata in Bulk
- Updates metadata parameters for a list of customers. Every resource in the list will receive the metadata defined in the request. The request can include up to **10 MB** of data. The response returns a unique asynchronous action ID. Use this ID in the query paramater of the GET Async Action endpoint to check, e.g.: - The status of your request (in queue, in progress, done, or failed) - Resources that failed to be updated - The report file with details about the update If a product object is not found, it is **upserted**. This is shown in the report file in the GET Async Action endpoint. The upserted resources have value false in the found column and true in the updated column. This API request starts a process that affects Voucherify data in bulk. In the case of small jobs (like bulk update), the request is put into a queue and processed when every other bulk request placed in the queue prior to this request is finished.
+ Updates metadata parameters for a list of customers. Every resource in the list will receive the metadata defined in the request. The request can include up to **10 MB** of data. The response returns a unique asynchronous action ID. Use this ID in the query paramater of the GET Async Action endpoint to check, e.g.: - The status of your request (in queue, in progress, done, or failed) - Resources that failed to be updated - The report file with details about the update If a product object is not found, it is **upserted**. This is shown in the report file in the **GET** Async Action endpoint. The upserted resources have value false in the found column and true in the updated column. This API request starts a process that affects Voucherify data in bulk. In the case of small jobs (like bulk update), the request is put into a queue and processed when every other bulk request placed in the queue prior to this request is finished.
:param customers_metadata_update_in_bulk_request_body: List the source_ids of the customers you would like to update with the metadata key/value pairs.
:type customers_metadata_update_in_bulk_request_body: CustomersMetadataUpdateInBulkRequestBody
@@ -3608,7 +3608,7 @@ def update_customers_metadata_in_bulk_without_preload_content(
) -> RESTResponseType:
"""Update Customers' Metadata in Bulk
- Updates metadata parameters for a list of customers. Every resource in the list will receive the metadata defined in the request. The request can include up to **10 MB** of data. The response returns a unique asynchronous action ID. Use this ID in the query paramater of the GET Async Action endpoint to check, e.g.: - The status of your request (in queue, in progress, done, or failed) - Resources that failed to be updated - The report file with details about the update If a product object is not found, it is **upserted**. This is shown in the report file in the GET Async Action endpoint. The upserted resources have value false in the found column and true in the updated column. This API request starts a process that affects Voucherify data in bulk. In the case of small jobs (like bulk update), the request is put into a queue and processed when every other bulk request placed in the queue prior to this request is finished.
+ Updates metadata parameters for a list of customers. Every resource in the list will receive the metadata defined in the request. The request can include up to **10 MB** of data. The response returns a unique asynchronous action ID. Use this ID in the query paramater of the GET Async Action endpoint to check, e.g.: - The status of your request (in queue, in progress, done, or failed) - Resources that failed to be updated - The report file with details about the update If a product object is not found, it is **upserted**. This is shown in the report file in the **GET** Async Action endpoint. The upserted resources have value false in the found column and true in the updated column. This API request starts a process that affects Voucherify data in bulk. In the case of small jobs (like bulk update), the request is put into a queue and processed when every other bulk request placed in the queue prior to this request is finished.
:param customers_metadata_update_in_bulk_request_body: List the source_ids of the customers you would like to update with the metadata key/value pairs.
:type customers_metadata_update_in_bulk_request_body: CustomersMetadataUpdateInBulkRequestBody
diff --git a/voucherify/api/exports_api.py b/voucherify/api/exports_api.py
index 0ba32251..2b66d1fc 100644
--- a/voucherify/api/exports_api.py
+++ b/voucherify/api/exports_api.py
@@ -825,6 +825,8 @@ def _download_export_serialize(
# authentication setting
_auth_settings: List[str] = [
+ 'X-App-Id',
+ 'X-App-Token'
]
return self.api_client.param_serialize(
diff --git a/voucherify/api/locations_api.py b/voucherify/api/locations_api.py
new file mode 100644
index 00000000..565b2f37
--- /dev/null
+++ b/voucherify/api/locations_api.py
@@ -0,0 +1,626 @@
+# coding: utf-8
+
+"""
+ Voucherify API
+
+ Voucherify promotion engine REST API. Please see https://docs.voucherify.io/docs for more details.
+
+ The version of the OpenAPI document: v2018-08-01
+ Contact: support@voucherify.io
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+import warnings
+from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt
+from typing import Any, Dict, List, Optional, Tuple, Union
+from typing_extensions import Annotated
+
+from datetime import datetime
+from pydantic import Field, StrictStr
+from typing import Optional
+from typing_extensions import Annotated
+from voucherify.models.locations_get_response_body import LocationsGetResponseBody
+from voucherify.models.locations_list_response_body import LocationsListResponseBody
+from voucherify.models.parameter_filters_list_locations import ParameterFiltersListLocations
+from voucherify.models.parameter_order_list_locations import ParameterOrderListLocations
+
+from voucherify.api_client import ApiClient, RequestSerialized
+from voucherify.api_response import ApiResponse
+from voucherify.rest import RESTResponseType
+
+
+class LocationsApi:
+ """NOTE: This class is auto generated by OpenAPI Generator
+ Ref: https://openapi-generator.tech
+
+ Do not edit the class manually.
+ """
+
+ def __init__(self, api_client=None) -> None:
+ if api_client is None:
+ api_client = ApiClient.get_default()
+ self.api_client = api_client
+
+
+ @validate_call
+ def get_location(
+ self,
+ location_id: Annotated[StrictStr, Field(description="The unique location ID.")],
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> LocationsGetResponseBody:
+ """Get Location
+
+ Returns a location object.
+
+ :param location_id: The unique location ID. (required)
+ :type location_id: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._get_location_serialize(
+ location_id=location_id,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '2XX': "LocationsGetResponseBody",
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ ).data
+
+
+ @validate_call
+ def get_location_with_http_info(
+ self,
+ location_id: Annotated[StrictStr, Field(description="The unique location ID.")],
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> ApiResponse[LocationsGetResponseBody]:
+ """Get Location
+
+ Returns a location object.
+
+ :param location_id: The unique location ID. (required)
+ :type location_id: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._get_location_serialize(
+ location_id=location_id,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '2XX': "LocationsGetResponseBody",
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ )
+
+
+ @validate_call
+ def get_location_without_preload_content(
+ self,
+ location_id: Annotated[StrictStr, Field(description="The unique location ID.")],
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> RESTResponseType:
+ """Get Location
+
+ Returns a location object.
+
+ :param location_id: The unique location ID. (required)
+ :type location_id: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._get_location_serialize(
+ location_id=location_id,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '2XX': "LocationsGetResponseBody",
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+
+ def _get_location_serialize(
+ self,
+ location_id,
+ _request_auth,
+ _content_type,
+ _headers,
+ _host_index,
+ ) -> RequestSerialized:
+
+ _host = None
+
+ _collection_formats: Dict[str, str] = {
+ }
+
+ _path_params: Dict[str, str] = {}
+ _query_params: List[Tuple[str, str]] = []
+ _header_params: Dict[str, Optional[str]] = _headers or {}
+ _form_params: List[Tuple[str, str]] = []
+ _files: Dict[str, Union[str, bytes]] = {}
+ _body_params: Optional[bytes] = None
+
+ # process the path parameters
+ if location_id is not None:
+ _path_params['locationId'] = location_id
+ # process the query parameters
+ # process the header parameters
+ # process the form parameters
+ # process the body parameter
+
+
+ # set the HTTP header `Accept`
+ if 'Accept' not in _header_params:
+ _header_params['Accept'] = self.api_client.select_header_accept(
+ [
+ 'application/json'
+ ]
+ )
+
+
+ # authentication setting
+ _auth_settings: List[str] = [
+ 'X-App-Id',
+ 'X-App-Token'
+ ]
+
+ return self.api_client.param_serialize(
+ method='GET',
+ resource_path='/v1/locations/{locationId}',
+ path_params=_path_params,
+ query_params=_query_params,
+ header_params=_header_params,
+ body=_body_params,
+ post_params=_form_params,
+ files=_files,
+ auth_settings=_auth_settings,
+ collection_formats=_collection_formats,
+ _host=_host,
+ _request_auth=_request_auth
+ )
+
+
+
+
+ @validate_call
+ def list_locations(
+ self,
+ limit: Annotated[Optional[Annotated[int, Field(le=100, strict=True, ge=1)]], Field(description="Limits the number of objects to be returned. The limit can range between 1 and 100 items. If no limit is set, it returns 10 items.")] = None,
+ order: Annotated[Optional[ParameterOrderListLocations], Field(description="Sorts the results using one of the filtering options, where the dash - preceding a sorting option means sorting in a descending order.")] = None,
+ filters: Annotated[Optional[ParameterFiltersListLocations], Field(description="Filter the locations using one of the available filters.")] = None,
+ end_date: Annotated[Optional[datetime], Field(description="A filter on the list based on the end date. This will filter out all locations whose end date falls before the specified date and time. A date value must be presented in the ISO 8601 format (2016-11-16T14:14:31Z or 2016-11-16).")] = None,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> LocationsListResponseBody:
+ """List Locations
+
+ Returns a list of your locations.
+
+ :param limit: Limits the number of objects to be returned. The limit can range between 1 and 100 items. If no limit is set, it returns 10 items.
+ :type limit: int
+ :param order: Sorts the results using one of the filtering options, where the dash - preceding a sorting option means sorting in a descending order.
+ :type order: ParameterOrderListLocations
+ :param filters: Filter the locations using one of the available filters.
+ :type filters: ParameterFiltersListLocations
+ :param end_date: A filter on the list based on the end date. This will filter out all locations whose end date falls before the specified date and time. A date value must be presented in the ISO 8601 format (2016-11-16T14:14:31Z or 2016-11-16).
+ :type end_date: datetime
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._list_locations_serialize(
+ limit=limit,
+ order=order,
+ filters=filters,
+ end_date=end_date,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '2XX': "LocationsListResponseBody",
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ ).data
+
+
+ @validate_call
+ def list_locations_with_http_info(
+ self,
+ limit: Annotated[Optional[Annotated[int, Field(le=100, strict=True, ge=1)]], Field(description="Limits the number of objects to be returned. The limit can range between 1 and 100 items. If no limit is set, it returns 10 items.")] = None,
+ order: Annotated[Optional[ParameterOrderListLocations], Field(description="Sorts the results using one of the filtering options, where the dash - preceding a sorting option means sorting in a descending order.")] = None,
+ filters: Annotated[Optional[ParameterFiltersListLocations], Field(description="Filter the locations using one of the available filters.")] = None,
+ end_date: Annotated[Optional[datetime], Field(description="A filter on the list based on the end date. This will filter out all locations whose end date falls before the specified date and time. A date value must be presented in the ISO 8601 format (2016-11-16T14:14:31Z or 2016-11-16).")] = None,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> ApiResponse[LocationsListResponseBody]:
+ """List Locations
+
+ Returns a list of your locations.
+
+ :param limit: Limits the number of objects to be returned. The limit can range between 1 and 100 items. If no limit is set, it returns 10 items.
+ :type limit: int
+ :param order: Sorts the results using one of the filtering options, where the dash - preceding a sorting option means sorting in a descending order.
+ :type order: ParameterOrderListLocations
+ :param filters: Filter the locations using one of the available filters.
+ :type filters: ParameterFiltersListLocations
+ :param end_date: A filter on the list based on the end date. This will filter out all locations whose end date falls before the specified date and time. A date value must be presented in the ISO 8601 format (2016-11-16T14:14:31Z or 2016-11-16).
+ :type end_date: datetime
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._list_locations_serialize(
+ limit=limit,
+ order=order,
+ filters=filters,
+ end_date=end_date,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '2XX': "LocationsListResponseBody",
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ )
+
+
+ @validate_call
+ def list_locations_without_preload_content(
+ self,
+ limit: Annotated[Optional[Annotated[int, Field(le=100, strict=True, ge=1)]], Field(description="Limits the number of objects to be returned. The limit can range between 1 and 100 items. If no limit is set, it returns 10 items.")] = None,
+ order: Annotated[Optional[ParameterOrderListLocations], Field(description="Sorts the results using one of the filtering options, where the dash - preceding a sorting option means sorting in a descending order.")] = None,
+ filters: Annotated[Optional[ParameterFiltersListLocations], Field(description="Filter the locations using one of the available filters.")] = None,
+ end_date: Annotated[Optional[datetime], Field(description="A filter on the list based on the end date. This will filter out all locations whose end date falls before the specified date and time. A date value must be presented in the ISO 8601 format (2016-11-16T14:14:31Z or 2016-11-16).")] = None,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> RESTResponseType:
+ """List Locations
+
+ Returns a list of your locations.
+
+ :param limit: Limits the number of objects to be returned. The limit can range between 1 and 100 items. If no limit is set, it returns 10 items.
+ :type limit: int
+ :param order: Sorts the results using one of the filtering options, where the dash - preceding a sorting option means sorting in a descending order.
+ :type order: ParameterOrderListLocations
+ :param filters: Filter the locations using one of the available filters.
+ :type filters: ParameterFiltersListLocations
+ :param end_date: A filter on the list based on the end date. This will filter out all locations whose end date falls before the specified date and time. A date value must be presented in the ISO 8601 format (2016-11-16T14:14:31Z or 2016-11-16).
+ :type end_date: datetime
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._list_locations_serialize(
+ limit=limit,
+ order=order,
+ filters=filters,
+ end_date=end_date,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '2XX': "LocationsListResponseBody",
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+
+ def _list_locations_serialize(
+ self,
+ limit,
+ order,
+ filters,
+ end_date,
+ _request_auth,
+ _content_type,
+ _headers,
+ _host_index,
+ ) -> RequestSerialized:
+
+ _host = None
+
+ _collection_formats: Dict[str, str] = {
+ }
+
+ _path_params: Dict[str, str] = {}
+ _query_params: List[Tuple[str, str]] = []
+ _header_params: Dict[str, Optional[str]] = _headers or {}
+ _form_params: List[Tuple[str, str]] = []
+ _files: Dict[str, Union[str, bytes]] = {}
+ _body_params: Optional[bytes] = None
+
+ # process the path parameters
+ # process the query parameters
+ if limit is not None:
+
+ _query_params.append(('limit', limit))
+
+ if order is not None:
+
+ _query_params.append(('order', order.value))
+
+ if filters is not None:
+
+ _query_params.append(('filters', filters))
+
+ if end_date is not None:
+ if isinstance(end_date, datetime):
+ _query_params.append(
+ (
+ 'end_date',
+ end_date.strftime(
+ self.api_client.configuration.datetime_format
+ )
+ )
+ )
+ else:
+ _query_params.append(('end_date', end_date))
+
+ # process the header parameters
+ # process the form parameters
+ # process the body parameter
+
+
+ # set the HTTP header `Accept`
+ if 'Accept' not in _header_params:
+ _header_params['Accept'] = self.api_client.select_header_accept(
+ [
+ 'application/json'
+ ]
+ )
+
+
+ # authentication setting
+ _auth_settings: List[str] = [
+ 'X-App-Id',
+ 'X-App-Token'
+ ]
+
+ return self.api_client.param_serialize(
+ method='GET',
+ resource_path='/v1/locations',
+ path_params=_path_params,
+ query_params=_query_params,
+ header_params=_header_params,
+ body=_body_params,
+ post_params=_form_params,
+ files=_files,
+ auth_settings=_auth_settings,
+ collection_formats=_collection_formats,
+ _host=_host,
+ _request_auth=_request_auth
+ )
+
+
diff --git a/voucherify/api/management_api.py b/voucherify/api/management_api.py
new file mode 100644
index 00000000..fec60795
--- /dev/null
+++ b/voucherify/api/management_api.py
@@ -0,0 +1,10684 @@
+# coding: utf-8
+
+"""
+ Voucherify API
+
+ Voucherify promotion engine REST API. Please see https://docs.voucherify.io/docs for more details.
+
+ The version of the OpenAPI document: v2018-08-01
+ Contact: support@voucherify.io
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+import warnings
+from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt
+from typing import Any, Dict, List, Optional, Tuple, Union
+from typing_extensions import Annotated
+
+from pydantic import Field, StrictBool, StrictStr
+from typing import Optional
+from typing_extensions import Annotated
+from voucherify.models.management_projects_branding_create_request_body import ManagementProjectsBrandingCreateRequestBody
+from voucherify.models.management_projects_branding_create_response_body import ManagementProjectsBrandingCreateResponseBody
+from voucherify.models.management_projects_branding_get_response_body import ManagementProjectsBrandingGetResponseBody
+from voucherify.models.management_projects_branding_list_response_body import ManagementProjectsBrandingListResponseBody
+from voucherify.models.management_projects_branding_update_request_body import ManagementProjectsBrandingUpdateRequestBody
+from voucherify.models.management_projects_branding_update_response_body import ManagementProjectsBrandingUpdateResponseBody
+from voucherify.models.management_projects_create_request_body import ManagementProjectsCreateRequestBody
+from voucherify.models.management_projects_create_response_body import ManagementProjectsCreateResponseBody
+from voucherify.models.management_projects_custom_event_schemas_create_request_body import ManagementProjectsCustomEventSchemasCreateRequestBody
+from voucherify.models.management_projects_custom_event_schemas_create_response_body import ManagementProjectsCustomEventSchemasCreateResponseBody
+from voucherify.models.management_projects_custom_event_schemas_get_response_body import ManagementProjectsCustomEventSchemasGetResponseBody
+from voucherify.models.management_projects_custom_event_schemas_list_response_body import ManagementProjectsCustomEventSchemasListResponseBody
+from voucherify.models.management_projects_custom_event_schemas_update_request_body import ManagementProjectsCustomEventSchemasUpdateRequestBody
+from voucherify.models.management_projects_custom_event_schemas_update_response_body import ManagementProjectsCustomEventSchemasUpdateResponseBody
+from voucherify.models.management_projects_get_response_body import ManagementProjectsGetResponseBody
+from voucherify.models.management_projects_list_response_body import ManagementProjectsListResponseBody
+from voucherify.models.management_projects_metadata_schemas_create_request_body import ManagementProjectsMetadataSchemasCreateRequestBody
+from voucherify.models.management_projects_metadata_schemas_create_response_body import ManagementProjectsMetadataSchemasCreateResponseBody
+from voucherify.models.management_projects_metadata_schemas_get_response_body import ManagementProjectsMetadataSchemasGetResponseBody
+from voucherify.models.management_projects_metadata_schemas_list_response_body import ManagementProjectsMetadataSchemasListResponseBody
+from voucherify.models.management_projects_metadata_schemas_update_request_body import ManagementProjectsMetadataSchemasUpdateRequestBody
+from voucherify.models.management_projects_metadata_schemas_update_response_body import ManagementProjectsMetadataSchemasUpdateResponseBody
+from voucherify.models.management_projects_stacking_rules_create_request_body import ManagementProjectsStackingRulesCreateRequestBody
+from voucherify.models.management_projects_stacking_rules_create_response_body import ManagementProjectsStackingRulesCreateResponseBody
+from voucherify.models.management_projects_stacking_rules_get_response_body import ManagementProjectsStackingRulesGetResponseBody
+from voucherify.models.management_projects_stacking_rules_list_response_body import ManagementProjectsStackingRulesListResponseBody
+from voucherify.models.management_projects_stacking_rules_update_request_body import ManagementProjectsStackingRulesUpdateRequestBody
+from voucherify.models.management_projects_stacking_rules_update_response_body import ManagementProjectsStackingRulesUpdateResponseBody
+from voucherify.models.management_projects_templates_campaigns_copy_create_request_body import ManagementProjectsTemplatesCampaignsCopyCreateRequestBody
+from voucherify.models.management_projects_templates_campaigns_copy_create_response_body import ManagementProjectsTemplatesCampaignsCopyCreateResponseBody
+from voucherify.models.management_projects_templates_campaigns_list_response_body import ManagementProjectsTemplatesCampaignsListResponseBody
+from voucherify.models.management_projects_update_request_body import ManagementProjectsUpdateRequestBody
+from voucherify.models.management_projects_update_response_body import ManagementProjectsUpdateResponseBody
+from voucherify.models.management_projects_users_assign_request_body import ManagementProjectsUsersAssignRequestBody
+from voucherify.models.management_projects_users_assign_response_body import ManagementProjectsUsersAssignResponseBody
+from voucherify.models.management_projects_users_get_user_response_body import ManagementProjectsUsersGetUserResponseBody
+from voucherify.models.management_projects_users_invite_create_request_body import ManagementProjectsUsersInviteCreateRequestBody
+from voucherify.models.management_projects_users_list_response_body import ManagementProjectsUsersListResponseBody
+from voucherify.models.management_projects_users_update_role_request_body import ManagementProjectsUsersUpdateRoleRequestBody
+from voucherify.models.management_projects_users_update_role_response_body import ManagementProjectsUsersUpdateRoleResponseBody
+from voucherify.models.management_projects_webhooks_create_request_body import ManagementProjectsWebhooksCreateRequestBody
+from voucherify.models.management_projects_webhooks_create_response_body import ManagementProjectsWebhooksCreateResponseBody
+from voucherify.models.management_projects_webhooks_get_response_body import ManagementProjectsWebhooksGetResponseBody
+from voucherify.models.management_projects_webhooks_list_response_body import ManagementProjectsWebhooksListResponseBody
+from voucherify.models.management_projects_webhooks_update_request_body import ManagementProjectsWebhooksUpdateRequestBody
+from voucherify.models.management_projects_webhooks_update_response_body import ManagementProjectsWebhooksUpdateResponseBody
+from voucherify.models.parameter_filters_list_templates import ParameterFiltersListTemplates
+from voucherify.models.parameter_templates_list import ParameterTemplatesList
+
+from voucherify.api_client import ApiClient, RequestSerialized
+from voucherify.api_response import ApiResponse
+from voucherify.rest import RESTResponseType
+
+
+class ManagementApi:
+ """NOTE: This class is auto generated by OpenAPI Generator
+ Ref: https://openapi-generator.tech
+
+ Do not edit the class manually.
+ """
+
+ def __init__(self, api_client=None) -> None:
+ if api_client is None:
+ api_client = ApiClient.get_default()
+ self.api_client = api_client
+
+
+ @validate_call
+ def assign_user(
+ self,
+ project_id: Annotated[StrictStr, Field(description="Provide the unique identifier of the project.")],
+ management_projects_users_assign_request_body: Annotated[Optional[ManagementProjectsUsersAssignRequestBody], Field(description="Defines the user details.")] = None,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> ManagementProjectsUsersAssignResponseBody:
+ """Assign User
+
+ Assigns a user to a given project. The user must be an existing user in Voucherify. 🚧 Correct Use of Data To avoid errors, use the role key with either id or login keys.
+
+ :param project_id: Provide the unique identifier of the project. (required)
+ :type project_id: str
+ :param management_projects_users_assign_request_body: Defines the user details.
+ :type management_projects_users_assign_request_body: ManagementProjectsUsersAssignRequestBody
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._assign_user_serialize(
+ project_id=project_id,
+ management_projects_users_assign_request_body=management_projects_users_assign_request_body,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '2XX': "ManagementProjectsUsersAssignResponseBody",
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ ).data
+
+
+ @validate_call
+ def assign_user_with_http_info(
+ self,
+ project_id: Annotated[StrictStr, Field(description="Provide the unique identifier of the project.")],
+ management_projects_users_assign_request_body: Annotated[Optional[ManagementProjectsUsersAssignRequestBody], Field(description="Defines the user details.")] = None,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> ApiResponse[ManagementProjectsUsersAssignResponseBody]:
+ """Assign User
+
+ Assigns a user to a given project. The user must be an existing user in Voucherify. 🚧 Correct Use of Data To avoid errors, use the role key with either id or login keys.
+
+ :param project_id: Provide the unique identifier of the project. (required)
+ :type project_id: str
+ :param management_projects_users_assign_request_body: Defines the user details.
+ :type management_projects_users_assign_request_body: ManagementProjectsUsersAssignRequestBody
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._assign_user_serialize(
+ project_id=project_id,
+ management_projects_users_assign_request_body=management_projects_users_assign_request_body,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '2XX': "ManagementProjectsUsersAssignResponseBody",
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ )
+
+
+ @validate_call
+ def assign_user_without_preload_content(
+ self,
+ project_id: Annotated[StrictStr, Field(description="Provide the unique identifier of the project.")],
+ management_projects_users_assign_request_body: Annotated[Optional[ManagementProjectsUsersAssignRequestBody], Field(description="Defines the user details.")] = None,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> RESTResponseType:
+ """Assign User
+
+ Assigns a user to a given project. The user must be an existing user in Voucherify. 🚧 Correct Use of Data To avoid errors, use the role key with either id or login keys.
+
+ :param project_id: Provide the unique identifier of the project. (required)
+ :type project_id: str
+ :param management_projects_users_assign_request_body: Defines the user details.
+ :type management_projects_users_assign_request_body: ManagementProjectsUsersAssignRequestBody
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._assign_user_serialize(
+ project_id=project_id,
+ management_projects_users_assign_request_body=management_projects_users_assign_request_body,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '2XX': "ManagementProjectsUsersAssignResponseBody",
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+
+ def _assign_user_serialize(
+ self,
+ project_id,
+ management_projects_users_assign_request_body,
+ _request_auth,
+ _content_type,
+ _headers,
+ _host_index,
+ ) -> RequestSerialized:
+
+ _host = None
+
+ _collection_formats: Dict[str, str] = {
+ }
+
+ _path_params: Dict[str, str] = {}
+ _query_params: List[Tuple[str, str]] = []
+ _header_params: Dict[str, Optional[str]] = _headers or {}
+ _form_params: List[Tuple[str, str]] = []
+ _files: Dict[str, Union[str, bytes]] = {}
+ _body_params: Optional[bytes] = None
+
+ # process the path parameters
+ if project_id is not None:
+ _path_params['projectId'] = project_id
+ # process the query parameters
+ # process the header parameters
+ # process the form parameters
+ # process the body parameter
+ if management_projects_users_assign_request_body is not None:
+ _body_params = management_projects_users_assign_request_body
+
+
+ # set the HTTP header `Accept`
+ if 'Accept' not in _header_params:
+ _header_params['Accept'] = self.api_client.select_header_accept(
+ [
+ 'application/json'
+ ]
+ )
+
+ # set the HTTP header `Content-Type`
+ if _content_type:
+ _header_params['Content-Type'] = _content_type
+ else:
+ _default_content_type = (
+ self.api_client.select_header_content_type(
+ [
+ 'application/json'
+ ]
+ )
+ )
+ if _default_content_type is not None:
+ _header_params['Content-Type'] = _default_content_type
+
+ # authentication setting
+ _auth_settings: List[str] = [
+ 'X-Management-Token',
+ 'X-Management-Id'
+ ]
+
+ return self.api_client.param_serialize(
+ method='POST',
+ resource_path='/management/v1/projects/{projectId}/users',
+ path_params=_path_params,
+ query_params=_query_params,
+ header_params=_header_params,
+ body=_body_params,
+ post_params=_form_params,
+ files=_files,
+ auth_settings=_auth_settings,
+ collection_formats=_collection_formats,
+ _host=_host,
+ _request_auth=_request_auth
+ )
+
+
+
+
+ @validate_call
+ def create_brand(
+ self,
+ project_id: Annotated[StrictStr, Field(description="Provide the unique identifier of the project.")],
+ management_projects_branding_create_request_body: Annotated[Optional[ManagementProjectsBrandingCreateRequestBody], Field(description="Defines a brand configuration.")] = None,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> ManagementProjectsBrandingCreateResponseBody:
+ """Create Brand
+
+ Creates a new brand configuration. You can have only one brand configured for a project. 📘 White Labelling The white labelling settings which can be found in Project Settings > Brand Details and which are available only for Enterprise clients as a separate service can be configured only in the user interface.
+
+ :param project_id: Provide the unique identifier of the project. (required)
+ :type project_id: str
+ :param management_projects_branding_create_request_body: Defines a brand configuration.
+ :type management_projects_branding_create_request_body: ManagementProjectsBrandingCreateRequestBody
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._create_brand_serialize(
+ project_id=project_id,
+ management_projects_branding_create_request_body=management_projects_branding_create_request_body,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '2XX': "ManagementProjectsBrandingCreateResponseBody",
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ ).data
+
+
+ @validate_call
+ def create_brand_with_http_info(
+ self,
+ project_id: Annotated[StrictStr, Field(description="Provide the unique identifier of the project.")],
+ management_projects_branding_create_request_body: Annotated[Optional[ManagementProjectsBrandingCreateRequestBody], Field(description="Defines a brand configuration.")] = None,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> ApiResponse[ManagementProjectsBrandingCreateResponseBody]:
+ """Create Brand
+
+ Creates a new brand configuration. You can have only one brand configured for a project. 📘 White Labelling The white labelling settings which can be found in Project Settings > Brand Details and which are available only for Enterprise clients as a separate service can be configured only in the user interface.
+
+ :param project_id: Provide the unique identifier of the project. (required)
+ :type project_id: str
+ :param management_projects_branding_create_request_body: Defines a brand configuration.
+ :type management_projects_branding_create_request_body: ManagementProjectsBrandingCreateRequestBody
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._create_brand_serialize(
+ project_id=project_id,
+ management_projects_branding_create_request_body=management_projects_branding_create_request_body,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '2XX': "ManagementProjectsBrandingCreateResponseBody",
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ )
+
+
+ @validate_call
+ def create_brand_without_preload_content(
+ self,
+ project_id: Annotated[StrictStr, Field(description="Provide the unique identifier of the project.")],
+ management_projects_branding_create_request_body: Annotated[Optional[ManagementProjectsBrandingCreateRequestBody], Field(description="Defines a brand configuration.")] = None,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> RESTResponseType:
+ """Create Brand
+
+ Creates a new brand configuration. You can have only one brand configured for a project. 📘 White Labelling The white labelling settings which can be found in Project Settings > Brand Details and which are available only for Enterprise clients as a separate service can be configured only in the user interface.
+
+ :param project_id: Provide the unique identifier of the project. (required)
+ :type project_id: str
+ :param management_projects_branding_create_request_body: Defines a brand configuration.
+ :type management_projects_branding_create_request_body: ManagementProjectsBrandingCreateRequestBody
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._create_brand_serialize(
+ project_id=project_id,
+ management_projects_branding_create_request_body=management_projects_branding_create_request_body,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '2XX': "ManagementProjectsBrandingCreateResponseBody",
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+
+ def _create_brand_serialize(
+ self,
+ project_id,
+ management_projects_branding_create_request_body,
+ _request_auth,
+ _content_type,
+ _headers,
+ _host_index,
+ ) -> RequestSerialized:
+
+ _host = None
+
+ _collection_formats: Dict[str, str] = {
+ }
+
+ _path_params: Dict[str, str] = {}
+ _query_params: List[Tuple[str, str]] = []
+ _header_params: Dict[str, Optional[str]] = _headers or {}
+ _form_params: List[Tuple[str, str]] = []
+ _files: Dict[str, Union[str, bytes]] = {}
+ _body_params: Optional[bytes] = None
+
+ # process the path parameters
+ if project_id is not None:
+ _path_params['projectId'] = project_id
+ # process the query parameters
+ # process the header parameters
+ # process the form parameters
+ # process the body parameter
+ if management_projects_branding_create_request_body is not None:
+ _body_params = management_projects_branding_create_request_body
+
+
+ # set the HTTP header `Accept`
+ if 'Accept' not in _header_params:
+ _header_params['Accept'] = self.api_client.select_header_accept(
+ [
+ 'application/json'
+ ]
+ )
+
+ # set the HTTP header `Content-Type`
+ if _content_type:
+ _header_params['Content-Type'] = _content_type
+ else:
+ _default_content_type = (
+ self.api_client.select_header_content_type(
+ [
+ 'application/json'
+ ]
+ )
+ )
+ if _default_content_type is not None:
+ _header_params['Content-Type'] = _default_content_type
+
+ # authentication setting
+ _auth_settings: List[str] = [
+ 'X-Management-Token',
+ 'X-Management-Id'
+ ]
+
+ return self.api_client.param_serialize(
+ method='POST',
+ resource_path='/management/v1/projects/{projectId}/branding',
+ path_params=_path_params,
+ query_params=_query_params,
+ header_params=_header_params,
+ body=_body_params,
+ post_params=_form_params,
+ files=_files,
+ auth_settings=_auth_settings,
+ collection_formats=_collection_formats,
+ _host=_host,
+ _request_auth=_request_auth
+ )
+
+
+
+
+ @validate_call
+ def create_custom_event_schema(
+ self,
+ project_id: Annotated[StrictStr, Field(description="Provide the unique identifier of the project.")],
+ management_projects_custom_event_schemas_create_request_body: Annotated[Optional[ManagementProjectsCustomEventSchemasCreateRequestBody], Field(description="Defines the custom event schema.")] = None,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> ManagementProjectsCustomEventSchemasCreateResponseBody:
+ """Create Custom Event Schema
+
+ Creates a custom event schema. The properties object is required, but it can be empty, however. This object is for optional custom properties (metadata). 📘 Custom Event Documentation Read [Custom Events](https://support.voucherify.io/article/111-custom-events) article to learn how custom events work in Voucherify. Read also the details about the Track Custom Event endpoint and the Custom Event Object.
+
+ :param project_id: Provide the unique identifier of the project. (required)
+ :type project_id: str
+ :param management_projects_custom_event_schemas_create_request_body: Defines the custom event schema.
+ :type management_projects_custom_event_schemas_create_request_body: ManagementProjectsCustomEventSchemasCreateRequestBody
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._create_custom_event_schema_serialize(
+ project_id=project_id,
+ management_projects_custom_event_schemas_create_request_body=management_projects_custom_event_schemas_create_request_body,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '2XX': "ManagementProjectsCustomEventSchemasCreateResponseBody",
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ ).data
+
+
+ @validate_call
+ def create_custom_event_schema_with_http_info(
+ self,
+ project_id: Annotated[StrictStr, Field(description="Provide the unique identifier of the project.")],
+ management_projects_custom_event_schemas_create_request_body: Annotated[Optional[ManagementProjectsCustomEventSchemasCreateRequestBody], Field(description="Defines the custom event schema.")] = None,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> ApiResponse[ManagementProjectsCustomEventSchemasCreateResponseBody]:
+ """Create Custom Event Schema
+
+ Creates a custom event schema. The properties object is required, but it can be empty, however. This object is for optional custom properties (metadata). 📘 Custom Event Documentation Read [Custom Events](https://support.voucherify.io/article/111-custom-events) article to learn how custom events work in Voucherify. Read also the details about the Track Custom Event endpoint and the Custom Event Object.
+
+ :param project_id: Provide the unique identifier of the project. (required)
+ :type project_id: str
+ :param management_projects_custom_event_schemas_create_request_body: Defines the custom event schema.
+ :type management_projects_custom_event_schemas_create_request_body: ManagementProjectsCustomEventSchemasCreateRequestBody
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._create_custom_event_schema_serialize(
+ project_id=project_id,
+ management_projects_custom_event_schemas_create_request_body=management_projects_custom_event_schemas_create_request_body,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '2XX': "ManagementProjectsCustomEventSchemasCreateResponseBody",
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ )
+
+
+ @validate_call
+ def create_custom_event_schema_without_preload_content(
+ self,
+ project_id: Annotated[StrictStr, Field(description="Provide the unique identifier of the project.")],
+ management_projects_custom_event_schemas_create_request_body: Annotated[Optional[ManagementProjectsCustomEventSchemasCreateRequestBody], Field(description="Defines the custom event schema.")] = None,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> RESTResponseType:
+ """Create Custom Event Schema
+
+ Creates a custom event schema. The properties object is required, but it can be empty, however. This object is for optional custom properties (metadata). 📘 Custom Event Documentation Read [Custom Events](https://support.voucherify.io/article/111-custom-events) article to learn how custom events work in Voucherify. Read also the details about the Track Custom Event endpoint and the Custom Event Object.
+
+ :param project_id: Provide the unique identifier of the project. (required)
+ :type project_id: str
+ :param management_projects_custom_event_schemas_create_request_body: Defines the custom event schema.
+ :type management_projects_custom_event_schemas_create_request_body: ManagementProjectsCustomEventSchemasCreateRequestBody
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._create_custom_event_schema_serialize(
+ project_id=project_id,
+ management_projects_custom_event_schemas_create_request_body=management_projects_custom_event_schemas_create_request_body,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '2XX': "ManagementProjectsCustomEventSchemasCreateResponseBody",
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+
+ def _create_custom_event_schema_serialize(
+ self,
+ project_id,
+ management_projects_custom_event_schemas_create_request_body,
+ _request_auth,
+ _content_type,
+ _headers,
+ _host_index,
+ ) -> RequestSerialized:
+
+ _host = None
+
+ _collection_formats: Dict[str, str] = {
+ }
+
+ _path_params: Dict[str, str] = {}
+ _query_params: List[Tuple[str, str]] = []
+ _header_params: Dict[str, Optional[str]] = _headers or {}
+ _form_params: List[Tuple[str, str]] = []
+ _files: Dict[str, Union[str, bytes]] = {}
+ _body_params: Optional[bytes] = None
+
+ # process the path parameters
+ if project_id is not None:
+ _path_params['projectId'] = project_id
+ # process the query parameters
+ # process the header parameters
+ # process the form parameters
+ # process the body parameter
+ if management_projects_custom_event_schemas_create_request_body is not None:
+ _body_params = management_projects_custom_event_schemas_create_request_body
+
+
+ # set the HTTP header `Accept`
+ if 'Accept' not in _header_params:
+ _header_params['Accept'] = self.api_client.select_header_accept(
+ [
+ 'application/json'
+ ]
+ )
+
+ # set the HTTP header `Content-Type`
+ if _content_type:
+ _header_params['Content-Type'] = _content_type
+ else:
+ _default_content_type = (
+ self.api_client.select_header_content_type(
+ [
+ 'application/json'
+ ]
+ )
+ )
+ if _default_content_type is not None:
+ _header_params['Content-Type'] = _default_content_type
+
+ # authentication setting
+ _auth_settings: List[str] = [
+ 'X-Management-Token',
+ 'X-Management-Id'
+ ]
+
+ return self.api_client.param_serialize(
+ method='POST',
+ resource_path='/management/v1/projects/{projectId}/custom-event-schemas',
+ path_params=_path_params,
+ query_params=_query_params,
+ header_params=_header_params,
+ body=_body_params,
+ post_params=_form_params,
+ files=_files,
+ auth_settings=_auth_settings,
+ collection_formats=_collection_formats,
+ _host=_host,
+ _request_auth=_request_auth
+ )
+
+
+
+
+ @validate_call
+ def create_metadata_schema(
+ self,
+ project_id: Annotated[StrictStr, Field(description="Provide the unique identifier of the project.")],
+ management_projects_metadata_schemas_create_request_body: Annotated[Optional[ManagementProjectsMetadataSchemasCreateRequestBody], Field(description="Defines the metadata schema.")] = None,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> ManagementProjectsMetadataSchemasCreateResponseBody:
+ """Create Metadata Schema
+
+ Creates a new metadata (custom attribute) schema. The schema consists of a set of key-value pairs to customize Voucherify resources. You can nest your object within a standard metadata schema, e.g. within a campaign or customer schema. However, your nested object cannot include another nested object. The standard metadata schemas are: - Campaign - Voucher - Publication - Redemption - Product - Customer - Order - Order line item - Loyalty Tier - Promotion Tier - Earning rule - Reward 📘 Metadata Documentation Read the Getting Started with Metadata articles to learn how metadata work in Voucherify.
+
+ :param project_id: Provide the unique identifier of the project. (required)
+ :type project_id: str
+ :param management_projects_metadata_schemas_create_request_body: Defines the metadata schema.
+ :type management_projects_metadata_schemas_create_request_body: ManagementProjectsMetadataSchemasCreateRequestBody
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._create_metadata_schema_serialize(
+ project_id=project_id,
+ management_projects_metadata_schemas_create_request_body=management_projects_metadata_schemas_create_request_body,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '2XX': "ManagementProjectsMetadataSchemasCreateResponseBody",
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ ).data
+
+
+ @validate_call
+ def create_metadata_schema_with_http_info(
+ self,
+ project_id: Annotated[StrictStr, Field(description="Provide the unique identifier of the project.")],
+ management_projects_metadata_schemas_create_request_body: Annotated[Optional[ManagementProjectsMetadataSchemasCreateRequestBody], Field(description="Defines the metadata schema.")] = None,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> ApiResponse[ManagementProjectsMetadataSchemasCreateResponseBody]:
+ """Create Metadata Schema
+
+ Creates a new metadata (custom attribute) schema. The schema consists of a set of key-value pairs to customize Voucherify resources. You can nest your object within a standard metadata schema, e.g. within a campaign or customer schema. However, your nested object cannot include another nested object. The standard metadata schemas are: - Campaign - Voucher - Publication - Redemption - Product - Customer - Order - Order line item - Loyalty Tier - Promotion Tier - Earning rule - Reward 📘 Metadata Documentation Read the Getting Started with Metadata articles to learn how metadata work in Voucherify.
+
+ :param project_id: Provide the unique identifier of the project. (required)
+ :type project_id: str
+ :param management_projects_metadata_schemas_create_request_body: Defines the metadata schema.
+ :type management_projects_metadata_schemas_create_request_body: ManagementProjectsMetadataSchemasCreateRequestBody
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._create_metadata_schema_serialize(
+ project_id=project_id,
+ management_projects_metadata_schemas_create_request_body=management_projects_metadata_schemas_create_request_body,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '2XX': "ManagementProjectsMetadataSchemasCreateResponseBody",
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ )
+
+
+ @validate_call
+ def create_metadata_schema_without_preload_content(
+ self,
+ project_id: Annotated[StrictStr, Field(description="Provide the unique identifier of the project.")],
+ management_projects_metadata_schemas_create_request_body: Annotated[Optional[ManagementProjectsMetadataSchemasCreateRequestBody], Field(description="Defines the metadata schema.")] = None,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> RESTResponseType:
+ """Create Metadata Schema
+
+ Creates a new metadata (custom attribute) schema. The schema consists of a set of key-value pairs to customize Voucherify resources. You can nest your object within a standard metadata schema, e.g. within a campaign or customer schema. However, your nested object cannot include another nested object. The standard metadata schemas are: - Campaign - Voucher - Publication - Redemption - Product - Customer - Order - Order line item - Loyalty Tier - Promotion Tier - Earning rule - Reward 📘 Metadata Documentation Read the Getting Started with Metadata articles to learn how metadata work in Voucherify.
+
+ :param project_id: Provide the unique identifier of the project. (required)
+ :type project_id: str
+ :param management_projects_metadata_schemas_create_request_body: Defines the metadata schema.
+ :type management_projects_metadata_schemas_create_request_body: ManagementProjectsMetadataSchemasCreateRequestBody
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._create_metadata_schema_serialize(
+ project_id=project_id,
+ management_projects_metadata_schemas_create_request_body=management_projects_metadata_schemas_create_request_body,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '2XX': "ManagementProjectsMetadataSchemasCreateResponseBody",
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+
+ def _create_metadata_schema_serialize(
+ self,
+ project_id,
+ management_projects_metadata_schemas_create_request_body,
+ _request_auth,
+ _content_type,
+ _headers,
+ _host_index,
+ ) -> RequestSerialized:
+
+ _host = None
+
+ _collection_formats: Dict[str, str] = {
+ }
+
+ _path_params: Dict[str, str] = {}
+ _query_params: List[Tuple[str, str]] = []
+ _header_params: Dict[str, Optional[str]] = _headers or {}
+ _form_params: List[Tuple[str, str]] = []
+ _files: Dict[str, Union[str, bytes]] = {}
+ _body_params: Optional[bytes] = None
+
+ # process the path parameters
+ if project_id is not None:
+ _path_params['projectId'] = project_id
+ # process the query parameters
+ # process the header parameters
+ # process the form parameters
+ # process the body parameter
+ if management_projects_metadata_schemas_create_request_body is not None:
+ _body_params = management_projects_metadata_schemas_create_request_body
+
+
+ # set the HTTP header `Accept`
+ if 'Accept' not in _header_params:
+ _header_params['Accept'] = self.api_client.select_header_accept(
+ [
+ 'application/json'
+ ]
+ )
+
+ # set the HTTP header `Content-Type`
+ if _content_type:
+ _header_params['Content-Type'] = _content_type
+ else:
+ _default_content_type = (
+ self.api_client.select_header_content_type(
+ [
+ 'application/json'
+ ]
+ )
+ )
+ if _default_content_type is not None:
+ _header_params['Content-Type'] = _default_content_type
+
+ # authentication setting
+ _auth_settings: List[str] = [
+ 'X-Management-Token',
+ 'X-Management-Id'
+ ]
+
+ return self.api_client.param_serialize(
+ method='POST',
+ resource_path='/management/v1/projects/{projectId}/metadata-schemas',
+ path_params=_path_params,
+ query_params=_query_params,
+ header_params=_header_params,
+ body=_body_params,
+ post_params=_form_params,
+ files=_files,
+ auth_settings=_auth_settings,
+ collection_formats=_collection_formats,
+ _host=_host,
+ _request_auth=_request_auth
+ )
+
+
+
+
+ @validate_call
+ def create_project(
+ self,
+ management_projects_create_request_body: Annotated[Optional[ManagementProjectsCreateRequestBody], Field(description="Define project details.")] = None,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> ManagementProjectsCreateResponseBody:
+ """Create Project
+
+ Creates a new project. You can add users, specify the cluster, timezone, currency, and other details. All owners are added to the project by default.
+
+ :param management_projects_create_request_body: Define project details.
+ :type management_projects_create_request_body: ManagementProjectsCreateRequestBody
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._create_project_serialize(
+ management_projects_create_request_body=management_projects_create_request_body,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '2XX': "ManagementProjectsCreateResponseBody",
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ ).data
+
+
+ @validate_call
+ def create_project_with_http_info(
+ self,
+ management_projects_create_request_body: Annotated[Optional[ManagementProjectsCreateRequestBody], Field(description="Define project details.")] = None,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> ApiResponse[ManagementProjectsCreateResponseBody]:
+ """Create Project
+
+ Creates a new project. You can add users, specify the cluster, timezone, currency, and other details. All owners are added to the project by default.
+
+ :param management_projects_create_request_body: Define project details.
+ :type management_projects_create_request_body: ManagementProjectsCreateRequestBody
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._create_project_serialize(
+ management_projects_create_request_body=management_projects_create_request_body,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '2XX': "ManagementProjectsCreateResponseBody",
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ )
+
+
+ @validate_call
+ def create_project_without_preload_content(
+ self,
+ management_projects_create_request_body: Annotated[Optional[ManagementProjectsCreateRequestBody], Field(description="Define project details.")] = None,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> RESTResponseType:
+ """Create Project
+
+ Creates a new project. You can add users, specify the cluster, timezone, currency, and other details. All owners are added to the project by default.
+
+ :param management_projects_create_request_body: Define project details.
+ :type management_projects_create_request_body: ManagementProjectsCreateRequestBody
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._create_project_serialize(
+ management_projects_create_request_body=management_projects_create_request_body,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '2XX': "ManagementProjectsCreateResponseBody",
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+
+ def _create_project_serialize(
+ self,
+ management_projects_create_request_body,
+ _request_auth,
+ _content_type,
+ _headers,
+ _host_index,
+ ) -> RequestSerialized:
+
+ _host = None
+
+ _collection_formats: Dict[str, str] = {
+ }
+
+ _path_params: Dict[str, str] = {}
+ _query_params: List[Tuple[str, str]] = []
+ _header_params: Dict[str, Optional[str]] = _headers or {}
+ _form_params: List[Tuple[str, str]] = []
+ _files: Dict[str, Union[str, bytes]] = {}
+ _body_params: Optional[bytes] = None
+
+ # process the path parameters
+ # process the query parameters
+ # process the header parameters
+ # process the form parameters
+ # process the body parameter
+ if management_projects_create_request_body is not None:
+ _body_params = management_projects_create_request_body
+
+
+ # set the HTTP header `Accept`
+ if 'Accept' not in _header_params:
+ _header_params['Accept'] = self.api_client.select_header_accept(
+ [
+ 'application/json'
+ ]
+ )
+
+ # set the HTTP header `Content-Type`
+ if _content_type:
+ _header_params['Content-Type'] = _content_type
+ else:
+ _default_content_type = (
+ self.api_client.select_header_content_type(
+ [
+ 'application/json'
+ ]
+ )
+ )
+ if _default_content_type is not None:
+ _header_params['Content-Type'] = _default_content_type
+
+ # authentication setting
+ _auth_settings: List[str] = [
+ 'X-Management-Token',
+ 'X-Management-Id'
+ ]
+
+ return self.api_client.param_serialize(
+ method='POST',
+ resource_path='/management/v1/projects',
+ path_params=_path_params,
+ query_params=_query_params,
+ header_params=_header_params,
+ body=_body_params,
+ post_params=_form_params,
+ files=_files,
+ auth_settings=_auth_settings,
+ collection_formats=_collection_formats,
+ _host=_host,
+ _request_auth=_request_auth
+ )
+
+
+
+
+ @validate_call
+ def create_stacking_rules(
+ self,
+ project_id: Annotated[StrictStr, Field(description="Provide the unique identifier of the project.")],
+ management_projects_stacking_rules_create_request_body: Annotated[Optional[ManagementProjectsStackingRulesCreateRequestBody], Field(description="Defines the stacking rule parameters.")] = None,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> ManagementProjectsStackingRulesCreateResponseBody:
+ """Create Stacking Rules
+
+ Overwrites the default stacking rules. If new stacking rules have been created for the project earlier (e.g. in the user interface), it returns an error. Use Update Stacking Rules endpoint to change the rules. 📘 Stacking Rules Documentation Read [the Stacking Rules article](https://support.voucherify.io/article/604-stacking-rules) to learn how they work.
+
+ :param project_id: Provide the unique identifier of the project. (required)
+ :type project_id: str
+ :param management_projects_stacking_rules_create_request_body: Defines the stacking rule parameters.
+ :type management_projects_stacking_rules_create_request_body: ManagementProjectsStackingRulesCreateRequestBody
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._create_stacking_rules_serialize(
+ project_id=project_id,
+ management_projects_stacking_rules_create_request_body=management_projects_stacking_rules_create_request_body,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '2XX': "ManagementProjectsStackingRulesCreateResponseBody",
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ ).data
+
+
+ @validate_call
+ def create_stacking_rules_with_http_info(
+ self,
+ project_id: Annotated[StrictStr, Field(description="Provide the unique identifier of the project.")],
+ management_projects_stacking_rules_create_request_body: Annotated[Optional[ManagementProjectsStackingRulesCreateRequestBody], Field(description="Defines the stacking rule parameters.")] = None,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> ApiResponse[ManagementProjectsStackingRulesCreateResponseBody]:
+ """Create Stacking Rules
+
+ Overwrites the default stacking rules. If new stacking rules have been created for the project earlier (e.g. in the user interface), it returns an error. Use Update Stacking Rules endpoint to change the rules. 📘 Stacking Rules Documentation Read [the Stacking Rules article](https://support.voucherify.io/article/604-stacking-rules) to learn how they work.
+
+ :param project_id: Provide the unique identifier of the project. (required)
+ :type project_id: str
+ :param management_projects_stacking_rules_create_request_body: Defines the stacking rule parameters.
+ :type management_projects_stacking_rules_create_request_body: ManagementProjectsStackingRulesCreateRequestBody
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._create_stacking_rules_serialize(
+ project_id=project_id,
+ management_projects_stacking_rules_create_request_body=management_projects_stacking_rules_create_request_body,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '2XX': "ManagementProjectsStackingRulesCreateResponseBody",
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ )
+
+
+ @validate_call
+ def create_stacking_rules_without_preload_content(
+ self,
+ project_id: Annotated[StrictStr, Field(description="Provide the unique identifier of the project.")],
+ management_projects_stacking_rules_create_request_body: Annotated[Optional[ManagementProjectsStackingRulesCreateRequestBody], Field(description="Defines the stacking rule parameters.")] = None,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> RESTResponseType:
+ """Create Stacking Rules
+
+ Overwrites the default stacking rules. If new stacking rules have been created for the project earlier (e.g. in the user interface), it returns an error. Use Update Stacking Rules endpoint to change the rules. 📘 Stacking Rules Documentation Read [the Stacking Rules article](https://support.voucherify.io/article/604-stacking-rules) to learn how they work.
+
+ :param project_id: Provide the unique identifier of the project. (required)
+ :type project_id: str
+ :param management_projects_stacking_rules_create_request_body: Defines the stacking rule parameters.
+ :type management_projects_stacking_rules_create_request_body: ManagementProjectsStackingRulesCreateRequestBody
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._create_stacking_rules_serialize(
+ project_id=project_id,
+ management_projects_stacking_rules_create_request_body=management_projects_stacking_rules_create_request_body,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '2XX': "ManagementProjectsStackingRulesCreateResponseBody",
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+
+ def _create_stacking_rules_serialize(
+ self,
+ project_id,
+ management_projects_stacking_rules_create_request_body,
+ _request_auth,
+ _content_type,
+ _headers,
+ _host_index,
+ ) -> RequestSerialized:
+
+ _host = None
+
+ _collection_formats: Dict[str, str] = {
+ }
+
+ _path_params: Dict[str, str] = {}
+ _query_params: List[Tuple[str, str]] = []
+ _header_params: Dict[str, Optional[str]] = _headers or {}
+ _form_params: List[Tuple[str, str]] = []
+ _files: Dict[str, Union[str, bytes]] = {}
+ _body_params: Optional[bytes] = None
+
+ # process the path parameters
+ if project_id is not None:
+ _path_params['projectId'] = project_id
+ # process the query parameters
+ # process the header parameters
+ # process the form parameters
+ # process the body parameter
+ if management_projects_stacking_rules_create_request_body is not None:
+ _body_params = management_projects_stacking_rules_create_request_body
+
+
+ # set the HTTP header `Accept`
+ if 'Accept' not in _header_params:
+ _header_params['Accept'] = self.api_client.select_header_accept(
+ [
+ 'application/json'
+ ]
+ )
+
+ # set the HTTP header `Content-Type`
+ if _content_type:
+ _header_params['Content-Type'] = _content_type
+ else:
+ _default_content_type = (
+ self.api_client.select_header_content_type(
+ [
+ 'application/json'
+ ]
+ )
+ )
+ if _default_content_type is not None:
+ _header_params['Content-Type'] = _default_content_type
+
+ # authentication setting
+ _auth_settings: List[str] = [
+ 'X-Management-Token',
+ 'X-Management-Id'
+ ]
+
+ return self.api_client.param_serialize(
+ method='POST',
+ resource_path='/management/v1/projects/{projectId}/stacking-rules',
+ path_params=_path_params,
+ query_params=_query_params,
+ header_params=_header_params,
+ body=_body_params,
+ post_params=_form_params,
+ files=_files,
+ auth_settings=_auth_settings,
+ collection_formats=_collection_formats,
+ _host=_host,
+ _request_auth=_request_auth
+ )
+
+
+
+
+ @validate_call
+ def create_webhook(
+ self,
+ project_id: Annotated[StrictStr, Field(description="Provide the unique identifier of the project.")],
+ management_projects_webhooks_create_request_body: Annotated[Optional[ManagementProjectsWebhooksCreateRequestBody], Field(description="Defines a webhook configuration.")] = None,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> ManagementProjectsWebhooksCreateResponseBody:
+ """Create Webhook
+
+ Creates a new webhook configuration. 📘 Webhook Documentation Read Webhooks v2024-01-01 article to learn how webhooks work in Voucherify.
+
+ :param project_id: Provide the unique identifier of the project. (required)
+ :type project_id: str
+ :param management_projects_webhooks_create_request_body: Defines a webhook configuration.
+ :type management_projects_webhooks_create_request_body: ManagementProjectsWebhooksCreateRequestBody
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._create_webhook_serialize(
+ project_id=project_id,
+ management_projects_webhooks_create_request_body=management_projects_webhooks_create_request_body,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '2XX': "ManagementProjectsWebhooksCreateResponseBody",
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ ).data
+
+
+ @validate_call
+ def create_webhook_with_http_info(
+ self,
+ project_id: Annotated[StrictStr, Field(description="Provide the unique identifier of the project.")],
+ management_projects_webhooks_create_request_body: Annotated[Optional[ManagementProjectsWebhooksCreateRequestBody], Field(description="Defines a webhook configuration.")] = None,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> ApiResponse[ManagementProjectsWebhooksCreateResponseBody]:
+ """Create Webhook
+
+ Creates a new webhook configuration. 📘 Webhook Documentation Read Webhooks v2024-01-01 article to learn how webhooks work in Voucherify.
+
+ :param project_id: Provide the unique identifier of the project. (required)
+ :type project_id: str
+ :param management_projects_webhooks_create_request_body: Defines a webhook configuration.
+ :type management_projects_webhooks_create_request_body: ManagementProjectsWebhooksCreateRequestBody
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._create_webhook_serialize(
+ project_id=project_id,
+ management_projects_webhooks_create_request_body=management_projects_webhooks_create_request_body,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '2XX': "ManagementProjectsWebhooksCreateResponseBody",
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ )
+
+
+ @validate_call
+ def create_webhook_without_preload_content(
+ self,
+ project_id: Annotated[StrictStr, Field(description="Provide the unique identifier of the project.")],
+ management_projects_webhooks_create_request_body: Annotated[Optional[ManagementProjectsWebhooksCreateRequestBody], Field(description="Defines a webhook configuration.")] = None,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> RESTResponseType:
+ """Create Webhook
+
+ Creates a new webhook configuration. 📘 Webhook Documentation Read Webhooks v2024-01-01 article to learn how webhooks work in Voucherify.
+
+ :param project_id: Provide the unique identifier of the project. (required)
+ :type project_id: str
+ :param management_projects_webhooks_create_request_body: Defines a webhook configuration.
+ :type management_projects_webhooks_create_request_body: ManagementProjectsWebhooksCreateRequestBody
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._create_webhook_serialize(
+ project_id=project_id,
+ management_projects_webhooks_create_request_body=management_projects_webhooks_create_request_body,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '2XX': "ManagementProjectsWebhooksCreateResponseBody",
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+
+ def _create_webhook_serialize(
+ self,
+ project_id,
+ management_projects_webhooks_create_request_body,
+ _request_auth,
+ _content_type,
+ _headers,
+ _host_index,
+ ) -> RequestSerialized:
+
+ _host = None
+
+ _collection_formats: Dict[str, str] = {
+ }
+
+ _path_params: Dict[str, str] = {}
+ _query_params: List[Tuple[str, str]] = []
+ _header_params: Dict[str, Optional[str]] = _headers or {}
+ _form_params: List[Tuple[str, str]] = []
+ _files: Dict[str, Union[str, bytes]] = {}
+ _body_params: Optional[bytes] = None
+
+ # process the path parameters
+ if project_id is not None:
+ _path_params['projectId'] = project_id
+ # process the query parameters
+ # process the header parameters
+ # process the form parameters
+ # process the body parameter
+ if management_projects_webhooks_create_request_body is not None:
+ _body_params = management_projects_webhooks_create_request_body
+
+
+ # set the HTTP header `Accept`
+ if 'Accept' not in _header_params:
+ _header_params['Accept'] = self.api_client.select_header_accept(
+ [
+ 'application/json'
+ ]
+ )
+
+ # set the HTTP header `Content-Type`
+ if _content_type:
+ _header_params['Content-Type'] = _content_type
+ else:
+ _default_content_type = (
+ self.api_client.select_header_content_type(
+ [
+ 'application/json'
+ ]
+ )
+ )
+ if _default_content_type is not None:
+ _header_params['Content-Type'] = _default_content_type
+
+ # authentication setting
+ _auth_settings: List[str] = [
+ 'X-Management-Token',
+ 'X-Management-Id'
+ ]
+
+ return self.api_client.param_serialize(
+ method='POST',
+ resource_path='/management/v1/projects/{projectId}/webhooks',
+ path_params=_path_params,
+ query_params=_query_params,
+ header_params=_header_params,
+ body=_body_params,
+ post_params=_form_params,
+ files=_files,
+ auth_settings=_auth_settings,
+ collection_formats=_collection_formats,
+ _host=_host,
+ _request_auth=_request_auth
+ )
+
+
+
+
+ @validate_call
+ def delete_brand(
+ self,
+ project_id: Annotated[StrictStr, Field(description="Provide the unique identifier of the project.")],
+ branding_id: Annotated[StrictStr, Field(description="Provide the unique identifier of the brand configuration.")],
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> None:
+ """Delete Brand
+
+ Deletes permanently a brand configuration.
+
+ :param project_id: Provide the unique identifier of the project. (required)
+ :type project_id: str
+ :param branding_id: Provide the unique identifier of the brand configuration. (required)
+ :type branding_id: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._delete_brand_serialize(
+ project_id=project_id,
+ branding_id=branding_id,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '2XX': None,
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ ).data
+
+
+ @validate_call
+ def delete_brand_with_http_info(
+ self,
+ project_id: Annotated[StrictStr, Field(description="Provide the unique identifier of the project.")],
+ branding_id: Annotated[StrictStr, Field(description="Provide the unique identifier of the brand configuration.")],
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> ApiResponse[None]:
+ """Delete Brand
+
+ Deletes permanently a brand configuration.
+
+ :param project_id: Provide the unique identifier of the project. (required)
+ :type project_id: str
+ :param branding_id: Provide the unique identifier of the brand configuration. (required)
+ :type branding_id: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._delete_brand_serialize(
+ project_id=project_id,
+ branding_id=branding_id,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '2XX': None,
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ )
+
+
+ @validate_call
+ def delete_brand_without_preload_content(
+ self,
+ project_id: Annotated[StrictStr, Field(description="Provide the unique identifier of the project.")],
+ branding_id: Annotated[StrictStr, Field(description="Provide the unique identifier of the brand configuration.")],
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> RESTResponseType:
+ """Delete Brand
+
+ Deletes permanently a brand configuration.
+
+ :param project_id: Provide the unique identifier of the project. (required)
+ :type project_id: str
+ :param branding_id: Provide the unique identifier of the brand configuration. (required)
+ :type branding_id: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._delete_brand_serialize(
+ project_id=project_id,
+ branding_id=branding_id,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '2XX': None,
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+
+ def _delete_brand_serialize(
+ self,
+ project_id,
+ branding_id,
+ _request_auth,
+ _content_type,
+ _headers,
+ _host_index,
+ ) -> RequestSerialized:
+
+ _host = None
+
+ _collection_formats: Dict[str, str] = {
+ }
+
+ _path_params: Dict[str, str] = {}
+ _query_params: List[Tuple[str, str]] = []
+ _header_params: Dict[str, Optional[str]] = _headers or {}
+ _form_params: List[Tuple[str, str]] = []
+ _files: Dict[str, Union[str, bytes]] = {}
+ _body_params: Optional[bytes] = None
+
+ # process the path parameters
+ if project_id is not None:
+ _path_params['projectId'] = project_id
+ if branding_id is not None:
+ _path_params['brandingId'] = branding_id
+ # process the query parameters
+ # process the header parameters
+ # process the form parameters
+ # process the body parameter
+
+
+
+
+ # authentication setting
+ _auth_settings: List[str] = [
+ 'X-Management-Token',
+ 'X-Management-Id'
+ ]
+
+ return self.api_client.param_serialize(
+ method='DELETE',
+ resource_path='/management/v1/projects/{projectId}/branding/{brandingId}',
+ path_params=_path_params,
+ query_params=_query_params,
+ header_params=_header_params,
+ body=_body_params,
+ post_params=_form_params,
+ files=_files,
+ auth_settings=_auth_settings,
+ collection_formats=_collection_formats,
+ _host=_host,
+ _request_auth=_request_auth
+ )
+
+
+
+
+ @validate_call
+ def delete_custom_event_schema(
+ self,
+ project_id: Annotated[StrictStr, Field(description="Provide the unique identifier of the project.")],
+ custom_event_schema_id: Annotated[StrictStr, Field(description="Provide the unique identifier of the custom event schema.")],
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> None:
+ """Delete Custom Event Schema
+
+ Deletes permanently the custom event schema with its custom properties (metadata). 📘 Custom Event Documentation Read [Custom Events](https://support.voucherify.io/article/111-custom-events) article to learn how custom events work in Voucherify. Read also the details about the Track Custom Event endpoint and the Custom Event Object.
+
+ :param project_id: Provide the unique identifier of the project. (required)
+ :type project_id: str
+ :param custom_event_schema_id: Provide the unique identifier of the custom event schema. (required)
+ :type custom_event_schema_id: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._delete_custom_event_schema_serialize(
+ project_id=project_id,
+ custom_event_schema_id=custom_event_schema_id,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '2XX': None,
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ ).data
+
+
+ @validate_call
+ def delete_custom_event_schema_with_http_info(
+ self,
+ project_id: Annotated[StrictStr, Field(description="Provide the unique identifier of the project.")],
+ custom_event_schema_id: Annotated[StrictStr, Field(description="Provide the unique identifier of the custom event schema.")],
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> ApiResponse[None]:
+ """Delete Custom Event Schema
+
+ Deletes permanently the custom event schema with its custom properties (metadata). 📘 Custom Event Documentation Read [Custom Events](https://support.voucherify.io/article/111-custom-events) article to learn how custom events work in Voucherify. Read also the details about the Track Custom Event endpoint and the Custom Event Object.
+
+ :param project_id: Provide the unique identifier of the project. (required)
+ :type project_id: str
+ :param custom_event_schema_id: Provide the unique identifier of the custom event schema. (required)
+ :type custom_event_schema_id: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._delete_custom_event_schema_serialize(
+ project_id=project_id,
+ custom_event_schema_id=custom_event_schema_id,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '2XX': None,
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ )
+
+
+ @validate_call
+ def delete_custom_event_schema_without_preload_content(
+ self,
+ project_id: Annotated[StrictStr, Field(description="Provide the unique identifier of the project.")],
+ custom_event_schema_id: Annotated[StrictStr, Field(description="Provide the unique identifier of the custom event schema.")],
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> RESTResponseType:
+ """Delete Custom Event Schema
+
+ Deletes permanently the custom event schema with its custom properties (metadata). 📘 Custom Event Documentation Read [Custom Events](https://support.voucherify.io/article/111-custom-events) article to learn how custom events work in Voucherify. Read also the details about the Track Custom Event endpoint and the Custom Event Object.
+
+ :param project_id: Provide the unique identifier of the project. (required)
+ :type project_id: str
+ :param custom_event_schema_id: Provide the unique identifier of the custom event schema. (required)
+ :type custom_event_schema_id: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._delete_custom_event_schema_serialize(
+ project_id=project_id,
+ custom_event_schema_id=custom_event_schema_id,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '2XX': None,
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+
+ def _delete_custom_event_schema_serialize(
+ self,
+ project_id,
+ custom_event_schema_id,
+ _request_auth,
+ _content_type,
+ _headers,
+ _host_index,
+ ) -> RequestSerialized:
+
+ _host = None
+
+ _collection_formats: Dict[str, str] = {
+ }
+
+ _path_params: Dict[str, str] = {}
+ _query_params: List[Tuple[str, str]] = []
+ _header_params: Dict[str, Optional[str]] = _headers or {}
+ _form_params: List[Tuple[str, str]] = []
+ _files: Dict[str, Union[str, bytes]] = {}
+ _body_params: Optional[bytes] = None
+
+ # process the path parameters
+ if project_id is not None:
+ _path_params['projectId'] = project_id
+ if custom_event_schema_id is not None:
+ _path_params['customEventSchemaId'] = custom_event_schema_id
+ # process the query parameters
+ # process the header parameters
+ # process the form parameters
+ # process the body parameter
+
+
+
+
+ # authentication setting
+ _auth_settings: List[str] = [
+ 'X-Management-Token',
+ 'X-Management-Id'
+ ]
+
+ return self.api_client.param_serialize(
+ method='DELETE',
+ resource_path='/management/v1/projects/{projectId}/custom-event-schemas/{customEventSchemaId}',
+ path_params=_path_params,
+ query_params=_query_params,
+ header_params=_header_params,
+ body=_body_params,
+ post_params=_form_params,
+ files=_files,
+ auth_settings=_auth_settings,
+ collection_formats=_collection_formats,
+ _host=_host,
+ _request_auth=_request_auth
+ )
+
+
+
+
+ @validate_call
+ def delete_metadata_schema(
+ self,
+ project_id: Annotated[StrictStr, Field(description="Provide the unique identifier of the project.")],
+ metadata_schema_id: Annotated[StrictStr, Field(description="Provide the unique identifier of the metadata schema.")],
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> None:
+ """Delete Metadata Schema
+
+ Deletes permanently the metadata schema. In standard metadata schemas, this endpoint removes permanently all definitions. The standard metadata schemas are: - Campaign - Voucher - Publication - Redemption - Product - Customer - Order - Order line item - Loyalty Tier - Promotion Tier - Earning rule - Reward If you want to delete only one definition, use the Update Metadata Schema endpoint. In the request, provide the deleted: true pair in the definition object. This definition will be moved to Removed definitions. If you want to create a new standard metadata schema, use the Create Metadata Schema endpoint. 🚧 Metadata Purging This endpoint deletes permanently the metadata schemas only. However, it does not purge the metadata from associated entities, so the metadata added to those entities will remain. If you want to purge metadata from the entities: 1. Remove all the definitions you want to purge. You can do this either in Voucherify Project Settings > Metadata Schema tab or with the Update Metadata Schema endpoint. 2. In Voucherify Project Settings > Metadata Schema tab, go to the relevant metadata schema. 3. In Removed definitions, click the bin button next to the definitions whose metadata you want to purge from entities. Note: - This is an asynchronous action. You will be notified when it has been completed. - You cannot purge metadata for the Redemption and Publication schemas. 4. Use the Delete Metadata Schema request to delete the metadata schema from Voucherify. 📘 Metadata Documentation Read the Getting Started with Metadata articles to learn how metadata work in Voucherify.
+
+ :param project_id: Provide the unique identifier of the project. (required)
+ :type project_id: str
+ :param metadata_schema_id: Provide the unique identifier of the metadata schema. (required)
+ :type metadata_schema_id: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._delete_metadata_schema_serialize(
+ project_id=project_id,
+ metadata_schema_id=metadata_schema_id,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '2XX': None,
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ ).data
+
+
+ @validate_call
+ def delete_metadata_schema_with_http_info(
+ self,
+ project_id: Annotated[StrictStr, Field(description="Provide the unique identifier of the project.")],
+ metadata_schema_id: Annotated[StrictStr, Field(description="Provide the unique identifier of the metadata schema.")],
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> ApiResponse[None]:
+ """Delete Metadata Schema
+
+ Deletes permanently the metadata schema. In standard metadata schemas, this endpoint removes permanently all definitions. The standard metadata schemas are: - Campaign - Voucher - Publication - Redemption - Product - Customer - Order - Order line item - Loyalty Tier - Promotion Tier - Earning rule - Reward If you want to delete only one definition, use the Update Metadata Schema endpoint. In the request, provide the deleted: true pair in the definition object. This definition will be moved to Removed definitions. If you want to create a new standard metadata schema, use the Create Metadata Schema endpoint. 🚧 Metadata Purging This endpoint deletes permanently the metadata schemas only. However, it does not purge the metadata from associated entities, so the metadata added to those entities will remain. If you want to purge metadata from the entities: 1. Remove all the definitions you want to purge. You can do this either in Voucherify Project Settings > Metadata Schema tab or with the Update Metadata Schema endpoint. 2. In Voucherify Project Settings > Metadata Schema tab, go to the relevant metadata schema. 3. In Removed definitions, click the bin button next to the definitions whose metadata you want to purge from entities. Note: - This is an asynchronous action. You will be notified when it has been completed. - You cannot purge metadata for the Redemption and Publication schemas. 4. Use the Delete Metadata Schema request to delete the metadata schema from Voucherify. 📘 Metadata Documentation Read the Getting Started with Metadata articles to learn how metadata work in Voucherify.
+
+ :param project_id: Provide the unique identifier of the project. (required)
+ :type project_id: str
+ :param metadata_schema_id: Provide the unique identifier of the metadata schema. (required)
+ :type metadata_schema_id: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._delete_metadata_schema_serialize(
+ project_id=project_id,
+ metadata_schema_id=metadata_schema_id,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '2XX': None,
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ )
+
+
+ @validate_call
+ def delete_metadata_schema_without_preload_content(
+ self,
+ project_id: Annotated[StrictStr, Field(description="Provide the unique identifier of the project.")],
+ metadata_schema_id: Annotated[StrictStr, Field(description="Provide the unique identifier of the metadata schema.")],
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> RESTResponseType:
+ """Delete Metadata Schema
+
+ Deletes permanently the metadata schema. In standard metadata schemas, this endpoint removes permanently all definitions. The standard metadata schemas are: - Campaign - Voucher - Publication - Redemption - Product - Customer - Order - Order line item - Loyalty Tier - Promotion Tier - Earning rule - Reward If you want to delete only one definition, use the Update Metadata Schema endpoint. In the request, provide the deleted: true pair in the definition object. This definition will be moved to Removed definitions. If you want to create a new standard metadata schema, use the Create Metadata Schema endpoint. 🚧 Metadata Purging This endpoint deletes permanently the metadata schemas only. However, it does not purge the metadata from associated entities, so the metadata added to those entities will remain. If you want to purge metadata from the entities: 1. Remove all the definitions you want to purge. You can do this either in Voucherify Project Settings > Metadata Schema tab or with the Update Metadata Schema endpoint. 2. In Voucherify Project Settings > Metadata Schema tab, go to the relevant metadata schema. 3. In Removed definitions, click the bin button next to the definitions whose metadata you want to purge from entities. Note: - This is an asynchronous action. You will be notified when it has been completed. - You cannot purge metadata for the Redemption and Publication schemas. 4. Use the Delete Metadata Schema request to delete the metadata schema from Voucherify. 📘 Metadata Documentation Read the Getting Started with Metadata articles to learn how metadata work in Voucherify.
+
+ :param project_id: Provide the unique identifier of the project. (required)
+ :type project_id: str
+ :param metadata_schema_id: Provide the unique identifier of the metadata schema. (required)
+ :type metadata_schema_id: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._delete_metadata_schema_serialize(
+ project_id=project_id,
+ metadata_schema_id=metadata_schema_id,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '2XX': None,
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+
+ def _delete_metadata_schema_serialize(
+ self,
+ project_id,
+ metadata_schema_id,
+ _request_auth,
+ _content_type,
+ _headers,
+ _host_index,
+ ) -> RequestSerialized:
+
+ _host = None
+
+ _collection_formats: Dict[str, str] = {
+ }
+
+ _path_params: Dict[str, str] = {}
+ _query_params: List[Tuple[str, str]] = []
+ _header_params: Dict[str, Optional[str]] = _headers or {}
+ _form_params: List[Tuple[str, str]] = []
+ _files: Dict[str, Union[str, bytes]] = {}
+ _body_params: Optional[bytes] = None
+
+ # process the path parameters
+ if project_id is not None:
+ _path_params['projectId'] = project_id
+ if metadata_schema_id is not None:
+ _path_params['metadataSchemaId'] = metadata_schema_id
+ # process the query parameters
+ # process the header parameters
+ # process the form parameters
+ # process the body parameter
+
+
+
+
+ # authentication setting
+ _auth_settings: List[str] = [
+ 'X-Management-Token',
+ 'X-Management-Id'
+ ]
+
+ return self.api_client.param_serialize(
+ method='DELETE',
+ resource_path='/management/v1/projects/{projectId}/metadata-schemas/{metadataSchemaId}',
+ path_params=_path_params,
+ query_params=_query_params,
+ header_params=_header_params,
+ body=_body_params,
+ post_params=_form_params,
+ files=_files,
+ auth_settings=_auth_settings,
+ collection_formats=_collection_formats,
+ _host=_host,
+ _request_auth=_request_auth
+ )
+
+
+
+
+ @validate_call
+ def delete_project(
+ self,
+ project_id: Annotated[StrictStr, Field(description="Provide the unique identifier of the project.")],
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> None:
+ """Delete Project
+
+ Deletes an existing project. The users currently using the deleted project will be automatically logged out. 🚧 Sandbox Project The sandbox project cannot be deleted.
+
+ :param project_id: Provide the unique identifier of the project. (required)
+ :type project_id: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._delete_project_serialize(
+ project_id=project_id,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '2XX': None,
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ ).data
+
+
+ @validate_call
+ def delete_project_with_http_info(
+ self,
+ project_id: Annotated[StrictStr, Field(description="Provide the unique identifier of the project.")],
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> ApiResponse[None]:
+ """Delete Project
+
+ Deletes an existing project. The users currently using the deleted project will be automatically logged out. 🚧 Sandbox Project The sandbox project cannot be deleted.
+
+ :param project_id: Provide the unique identifier of the project. (required)
+ :type project_id: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._delete_project_serialize(
+ project_id=project_id,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '2XX': None,
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ )
+
+
+ @validate_call
+ def delete_project_without_preload_content(
+ self,
+ project_id: Annotated[StrictStr, Field(description="Provide the unique identifier of the project.")],
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> RESTResponseType:
+ """Delete Project
+
+ Deletes an existing project. The users currently using the deleted project will be automatically logged out. 🚧 Sandbox Project The sandbox project cannot be deleted.
+
+ :param project_id: Provide the unique identifier of the project. (required)
+ :type project_id: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._delete_project_serialize(
+ project_id=project_id,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '2XX': None,
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+
+ def _delete_project_serialize(
+ self,
+ project_id,
+ _request_auth,
+ _content_type,
+ _headers,
+ _host_index,
+ ) -> RequestSerialized:
+
+ _host = None
+
+ _collection_formats: Dict[str, str] = {
+ }
+
+ _path_params: Dict[str, str] = {}
+ _query_params: List[Tuple[str, str]] = []
+ _header_params: Dict[str, Optional[str]] = _headers or {}
+ _form_params: List[Tuple[str, str]] = []
+ _files: Dict[str, Union[str, bytes]] = {}
+ _body_params: Optional[bytes] = None
+
+ # process the path parameters
+ if project_id is not None:
+ _path_params['projectId'] = project_id
+ # process the query parameters
+ # process the header parameters
+ # process the form parameters
+ # process the body parameter
+
+
+
+
+ # authentication setting
+ _auth_settings: List[str] = [
+ 'X-Management-Token',
+ 'X-Management-Id'
+ ]
+
+ return self.api_client.param_serialize(
+ method='DELETE',
+ resource_path='/management/v1/projects/{projectId}',
+ path_params=_path_params,
+ query_params=_query_params,
+ header_params=_header_params,
+ body=_body_params,
+ post_params=_form_params,
+ files=_files,
+ auth_settings=_auth_settings,
+ collection_formats=_collection_formats,
+ _host=_host,
+ _request_auth=_request_auth
+ )
+
+
+
+
+ @validate_call
+ def delete_stacking_rules(
+ self,
+ project_id: Annotated[StrictStr, Field(description="Provide the unique identifier of the project.")],
+ stacking_rules_id: Annotated[StrictStr, Field(description="Provide the unique identifier of the stacking rules.")],
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> None:
+ """Delete Stacking Rules
+
+ Deletes permanently the current settings for the stacking rules. The stacking rules are restored to default values. 📘 Stacking Rules Documentation Read [the Stacking Rules article](https://support.voucherify.io/article/604-stacking-rules) to learn how they work.
+
+ :param project_id: Provide the unique identifier of the project. (required)
+ :type project_id: str
+ :param stacking_rules_id: Provide the unique identifier of the stacking rules. (required)
+ :type stacking_rules_id: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._delete_stacking_rules_serialize(
+ project_id=project_id,
+ stacking_rules_id=stacking_rules_id,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '2XX': None,
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ ).data
+
+
+ @validate_call
+ def delete_stacking_rules_with_http_info(
+ self,
+ project_id: Annotated[StrictStr, Field(description="Provide the unique identifier of the project.")],
+ stacking_rules_id: Annotated[StrictStr, Field(description="Provide the unique identifier of the stacking rules.")],
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> ApiResponse[None]:
+ """Delete Stacking Rules
+
+ Deletes permanently the current settings for the stacking rules. The stacking rules are restored to default values. 📘 Stacking Rules Documentation Read [the Stacking Rules article](https://support.voucherify.io/article/604-stacking-rules) to learn how they work.
+
+ :param project_id: Provide the unique identifier of the project. (required)
+ :type project_id: str
+ :param stacking_rules_id: Provide the unique identifier of the stacking rules. (required)
+ :type stacking_rules_id: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._delete_stacking_rules_serialize(
+ project_id=project_id,
+ stacking_rules_id=stacking_rules_id,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '2XX': None,
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ )
+
+
+ @validate_call
+ def delete_stacking_rules_without_preload_content(
+ self,
+ project_id: Annotated[StrictStr, Field(description="Provide the unique identifier of the project.")],
+ stacking_rules_id: Annotated[StrictStr, Field(description="Provide the unique identifier of the stacking rules.")],
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> RESTResponseType:
+ """Delete Stacking Rules
+
+ Deletes permanently the current settings for the stacking rules. The stacking rules are restored to default values. 📘 Stacking Rules Documentation Read [the Stacking Rules article](https://support.voucherify.io/article/604-stacking-rules) to learn how they work.
+
+ :param project_id: Provide the unique identifier of the project. (required)
+ :type project_id: str
+ :param stacking_rules_id: Provide the unique identifier of the stacking rules. (required)
+ :type stacking_rules_id: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._delete_stacking_rules_serialize(
+ project_id=project_id,
+ stacking_rules_id=stacking_rules_id,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '2XX': None,
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+
+ def _delete_stacking_rules_serialize(
+ self,
+ project_id,
+ stacking_rules_id,
+ _request_auth,
+ _content_type,
+ _headers,
+ _host_index,
+ ) -> RequestSerialized:
+
+ _host = None
+
+ _collection_formats: Dict[str, str] = {
+ }
+
+ _path_params: Dict[str, str] = {}
+ _query_params: List[Tuple[str, str]] = []
+ _header_params: Dict[str, Optional[str]] = _headers or {}
+ _form_params: List[Tuple[str, str]] = []
+ _files: Dict[str, Union[str, bytes]] = {}
+ _body_params: Optional[bytes] = None
+
+ # process the path parameters
+ if project_id is not None:
+ _path_params['projectId'] = project_id
+ if stacking_rules_id is not None:
+ _path_params['stackingRulesId'] = stacking_rules_id
+ # process the query parameters
+ # process the header parameters
+ # process the form parameters
+ # process the body parameter
+
+
+
+
+ # authentication setting
+ _auth_settings: List[str] = [
+ 'X-Management-Token',
+ 'X-Management-Id'
+ ]
+
+ return self.api_client.param_serialize(
+ method='DELETE',
+ resource_path='/management/v1/projects/{projectId}/stacking-rules/{stackingRulesId}',
+ path_params=_path_params,
+ query_params=_query_params,
+ header_params=_header_params,
+ body=_body_params,
+ post_params=_form_params,
+ files=_files,
+ auth_settings=_auth_settings,
+ collection_formats=_collection_formats,
+ _host=_host,
+ _request_auth=_request_auth
+ )
+
+
+
+
+ @validate_call
+ def delete_webhook(
+ self,
+ project_id: Annotated[StrictStr, Field(description="Provide the unique identifier of the project.")],
+ webhook_id: Annotated[StrictStr, Field(description="Provide the unique identifier of the webhook configuration.")],
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> None:
+ """Delete Webhook
+
+ Deletes a webhook configuration. 📘 Webhook Documentation Read Webhooks v2024-01-1 article to learn how webhooks work in Voucherify.
+
+ :param project_id: Provide the unique identifier of the project. (required)
+ :type project_id: str
+ :param webhook_id: Provide the unique identifier of the webhook configuration. (required)
+ :type webhook_id: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._delete_webhook_serialize(
+ project_id=project_id,
+ webhook_id=webhook_id,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '2XX': None,
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ ).data
+
+
+ @validate_call
+ def delete_webhook_with_http_info(
+ self,
+ project_id: Annotated[StrictStr, Field(description="Provide the unique identifier of the project.")],
+ webhook_id: Annotated[StrictStr, Field(description="Provide the unique identifier of the webhook configuration.")],
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> ApiResponse[None]:
+ """Delete Webhook
+
+ Deletes a webhook configuration. 📘 Webhook Documentation Read Webhooks v2024-01-1 article to learn how webhooks work in Voucherify.
+
+ :param project_id: Provide the unique identifier of the project. (required)
+ :type project_id: str
+ :param webhook_id: Provide the unique identifier of the webhook configuration. (required)
+ :type webhook_id: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._delete_webhook_serialize(
+ project_id=project_id,
+ webhook_id=webhook_id,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '2XX': None,
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ )
+
+
+ @validate_call
+ def delete_webhook_without_preload_content(
+ self,
+ project_id: Annotated[StrictStr, Field(description="Provide the unique identifier of the project.")],
+ webhook_id: Annotated[StrictStr, Field(description="Provide the unique identifier of the webhook configuration.")],
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> RESTResponseType:
+ """Delete Webhook
+
+ Deletes a webhook configuration. 📘 Webhook Documentation Read Webhooks v2024-01-1 article to learn how webhooks work in Voucherify.
+
+ :param project_id: Provide the unique identifier of the project. (required)
+ :type project_id: str
+ :param webhook_id: Provide the unique identifier of the webhook configuration. (required)
+ :type webhook_id: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._delete_webhook_serialize(
+ project_id=project_id,
+ webhook_id=webhook_id,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '2XX': None,
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+
+ def _delete_webhook_serialize(
+ self,
+ project_id,
+ webhook_id,
+ _request_auth,
+ _content_type,
+ _headers,
+ _host_index,
+ ) -> RequestSerialized:
+
+ _host = None
+
+ _collection_formats: Dict[str, str] = {
+ }
+
+ _path_params: Dict[str, str] = {}
+ _query_params: List[Tuple[str, str]] = []
+ _header_params: Dict[str, Optional[str]] = _headers or {}
+ _form_params: List[Tuple[str, str]] = []
+ _files: Dict[str, Union[str, bytes]] = {}
+ _body_params: Optional[bytes] = None
+
+ # process the path parameters
+ if project_id is not None:
+ _path_params['projectId'] = project_id
+ if webhook_id is not None:
+ _path_params['webhookId'] = webhook_id
+ # process the query parameters
+ # process the header parameters
+ # process the form parameters
+ # process the body parameter
+
+
+
+
+ # authentication setting
+ _auth_settings: List[str] = [
+ 'X-Management-Token',
+ 'X-Management-Id'
+ ]
+
+ return self.api_client.param_serialize(
+ method='DELETE',
+ resource_path='/management/v1/projects/{projectId}/webhooks/{webhookId}',
+ path_params=_path_params,
+ query_params=_query_params,
+ header_params=_header_params,
+ body=_body_params,
+ post_params=_form_params,
+ files=_files,
+ auth_settings=_auth_settings,
+ collection_formats=_collection_formats,
+ _host=_host,
+ _request_auth=_request_auth
+ )
+
+
+
+
+ @validate_call
+ def get_brand(
+ self,
+ project_id: Annotated[StrictStr, Field(description="Provide the unique identifier of the project.")],
+ branding_id: Annotated[StrictStr, Field(description="Provide the unique identifier of the brand configuration.")],
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> ManagementProjectsBrandingGetResponseBody:
+ """Get Brand
+
+ Retrieves a brand configuration.
+
+ :param project_id: Provide the unique identifier of the project. (required)
+ :type project_id: str
+ :param branding_id: Provide the unique identifier of the brand configuration. (required)
+ :type branding_id: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._get_brand_serialize(
+ project_id=project_id,
+ branding_id=branding_id,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '2XX': "ManagementProjectsBrandingGetResponseBody",
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ ).data
+
+
+ @validate_call
+ def get_brand_with_http_info(
+ self,
+ project_id: Annotated[StrictStr, Field(description="Provide the unique identifier of the project.")],
+ branding_id: Annotated[StrictStr, Field(description="Provide the unique identifier of the brand configuration.")],
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> ApiResponse[ManagementProjectsBrandingGetResponseBody]:
+ """Get Brand
+
+ Retrieves a brand configuration.
+
+ :param project_id: Provide the unique identifier of the project. (required)
+ :type project_id: str
+ :param branding_id: Provide the unique identifier of the brand configuration. (required)
+ :type branding_id: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._get_brand_serialize(
+ project_id=project_id,
+ branding_id=branding_id,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '2XX': "ManagementProjectsBrandingGetResponseBody",
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ )
+
+
+ @validate_call
+ def get_brand_without_preload_content(
+ self,
+ project_id: Annotated[StrictStr, Field(description="Provide the unique identifier of the project.")],
+ branding_id: Annotated[StrictStr, Field(description="Provide the unique identifier of the brand configuration.")],
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> RESTResponseType:
+ """Get Brand
+
+ Retrieves a brand configuration.
+
+ :param project_id: Provide the unique identifier of the project. (required)
+ :type project_id: str
+ :param branding_id: Provide the unique identifier of the brand configuration. (required)
+ :type branding_id: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._get_brand_serialize(
+ project_id=project_id,
+ branding_id=branding_id,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '2XX': "ManagementProjectsBrandingGetResponseBody",
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+
+ def _get_brand_serialize(
+ self,
+ project_id,
+ branding_id,
+ _request_auth,
+ _content_type,
+ _headers,
+ _host_index,
+ ) -> RequestSerialized:
+
+ _host = None
+
+ _collection_formats: Dict[str, str] = {
+ }
+
+ _path_params: Dict[str, str] = {}
+ _query_params: List[Tuple[str, str]] = []
+ _header_params: Dict[str, Optional[str]] = _headers or {}
+ _form_params: List[Tuple[str, str]] = []
+ _files: Dict[str, Union[str, bytes]] = {}
+ _body_params: Optional[bytes] = None
+
+ # process the path parameters
+ if project_id is not None:
+ _path_params['projectId'] = project_id
+ if branding_id is not None:
+ _path_params['brandingId'] = branding_id
+ # process the query parameters
+ # process the header parameters
+ # process the form parameters
+ # process the body parameter
+
+
+ # set the HTTP header `Accept`
+ if 'Accept' not in _header_params:
+ _header_params['Accept'] = self.api_client.select_header_accept(
+ [
+ 'application/json'
+ ]
+ )
+
+
+ # authentication setting
+ _auth_settings: List[str] = [
+ 'X-Management-Token',
+ 'X-Management-Id'
+ ]
+
+ return self.api_client.param_serialize(
+ method='GET',
+ resource_path='/management/v1/projects/{projectId}/branding/{brandingId}',
+ path_params=_path_params,
+ query_params=_query_params,
+ header_params=_header_params,
+ body=_body_params,
+ post_params=_form_params,
+ files=_files,
+ auth_settings=_auth_settings,
+ collection_formats=_collection_formats,
+ _host=_host,
+ _request_auth=_request_auth
+ )
+
+
+
+
+ @validate_call
+ def get_custom_event_schema(
+ self,
+ project_id: Annotated[StrictStr, Field(description="Provide the unique identifier of the project.")],
+ custom_event_schema_id: Annotated[StrictStr, Field(description="Provide the unique identifier of the custom event schema.")],
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> ManagementProjectsCustomEventSchemasGetResponseBody:
+ """Get Custom Event Schema
+
+ Retrieves a custom event schema. 📘 Custom Event Documentation Read [Custom Events](https://support.voucherify.io/article/111-custom-events) article to learn how custom events work in Voucherify. Read also the details about the Track Custom Event endpoint and the Custom Event Object.
+
+ :param project_id: Provide the unique identifier of the project. (required)
+ :type project_id: str
+ :param custom_event_schema_id: Provide the unique identifier of the custom event schema. (required)
+ :type custom_event_schema_id: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._get_custom_event_schema_serialize(
+ project_id=project_id,
+ custom_event_schema_id=custom_event_schema_id,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '2XX': "ManagementProjectsCustomEventSchemasGetResponseBody",
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ ).data
+
+
+ @validate_call
+ def get_custom_event_schema_with_http_info(
+ self,
+ project_id: Annotated[StrictStr, Field(description="Provide the unique identifier of the project.")],
+ custom_event_schema_id: Annotated[StrictStr, Field(description="Provide the unique identifier of the custom event schema.")],
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> ApiResponse[ManagementProjectsCustomEventSchemasGetResponseBody]:
+ """Get Custom Event Schema
+
+ Retrieves a custom event schema. 📘 Custom Event Documentation Read [Custom Events](https://support.voucherify.io/article/111-custom-events) article to learn how custom events work in Voucherify. Read also the details about the Track Custom Event endpoint and the Custom Event Object.
+
+ :param project_id: Provide the unique identifier of the project. (required)
+ :type project_id: str
+ :param custom_event_schema_id: Provide the unique identifier of the custom event schema. (required)
+ :type custom_event_schema_id: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._get_custom_event_schema_serialize(
+ project_id=project_id,
+ custom_event_schema_id=custom_event_schema_id,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '2XX': "ManagementProjectsCustomEventSchemasGetResponseBody",
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ )
+
+
+ @validate_call
+ def get_custom_event_schema_without_preload_content(
+ self,
+ project_id: Annotated[StrictStr, Field(description="Provide the unique identifier of the project.")],
+ custom_event_schema_id: Annotated[StrictStr, Field(description="Provide the unique identifier of the custom event schema.")],
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> RESTResponseType:
+ """Get Custom Event Schema
+
+ Retrieves a custom event schema. 📘 Custom Event Documentation Read [Custom Events](https://support.voucherify.io/article/111-custom-events) article to learn how custom events work in Voucherify. Read also the details about the Track Custom Event endpoint and the Custom Event Object.
+
+ :param project_id: Provide the unique identifier of the project. (required)
+ :type project_id: str
+ :param custom_event_schema_id: Provide the unique identifier of the custom event schema. (required)
+ :type custom_event_schema_id: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._get_custom_event_schema_serialize(
+ project_id=project_id,
+ custom_event_schema_id=custom_event_schema_id,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '2XX': "ManagementProjectsCustomEventSchemasGetResponseBody",
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+
+ def _get_custom_event_schema_serialize(
+ self,
+ project_id,
+ custom_event_schema_id,
+ _request_auth,
+ _content_type,
+ _headers,
+ _host_index,
+ ) -> RequestSerialized:
+
+ _host = None
+
+ _collection_formats: Dict[str, str] = {
+ }
+
+ _path_params: Dict[str, str] = {}
+ _query_params: List[Tuple[str, str]] = []
+ _header_params: Dict[str, Optional[str]] = _headers or {}
+ _form_params: List[Tuple[str, str]] = []
+ _files: Dict[str, Union[str, bytes]] = {}
+ _body_params: Optional[bytes] = None
+
+ # process the path parameters
+ if project_id is not None:
+ _path_params['projectId'] = project_id
+ if custom_event_schema_id is not None:
+ _path_params['customEventSchemaId'] = custom_event_schema_id
+ # process the query parameters
+ # process the header parameters
+ # process the form parameters
+ # process the body parameter
+
+
+ # set the HTTP header `Accept`
+ if 'Accept' not in _header_params:
+ _header_params['Accept'] = self.api_client.select_header_accept(
+ [
+ 'application/json'
+ ]
+ )
+
+
+ # authentication setting
+ _auth_settings: List[str] = [
+ 'X-Management-Token',
+ 'X-Management-Id'
+ ]
+
+ return self.api_client.param_serialize(
+ method='GET',
+ resource_path='/management/v1/projects/{projectId}/custom-event-schemas/{customEventSchemaId}',
+ path_params=_path_params,
+ query_params=_query_params,
+ header_params=_header_params,
+ body=_body_params,
+ post_params=_form_params,
+ files=_files,
+ auth_settings=_auth_settings,
+ collection_formats=_collection_formats,
+ _host=_host,
+ _request_auth=_request_auth
+ )
+
+
+
+
+ @validate_call
+ def get_metadata_schema1(
+ self,
+ project_id: Annotated[StrictStr, Field(description="Provide the unique identifier of the project.")],
+ metadata_schema_id: Annotated[StrictStr, Field(description="Provide the unique identifier of the metadata schema.")],
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> ManagementProjectsMetadataSchemasGetResponseBody:
+ """Get Metadata Schema
+
+ Retrieves a metadata schema. 📘 Metadata Documentation Read the Getting Started with Metadata articles to learn how metadata work in Voucherify.
+
+ :param project_id: Provide the unique identifier of the project. (required)
+ :type project_id: str
+ :param metadata_schema_id: Provide the unique identifier of the metadata schema. (required)
+ :type metadata_schema_id: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._get_metadata_schema1_serialize(
+ project_id=project_id,
+ metadata_schema_id=metadata_schema_id,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '2XX': "ManagementProjectsMetadataSchemasGetResponseBody",
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ ).data
+
+
+ @validate_call
+ def get_metadata_schema1_with_http_info(
+ self,
+ project_id: Annotated[StrictStr, Field(description="Provide the unique identifier of the project.")],
+ metadata_schema_id: Annotated[StrictStr, Field(description="Provide the unique identifier of the metadata schema.")],
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> ApiResponse[ManagementProjectsMetadataSchemasGetResponseBody]:
+ """Get Metadata Schema
+
+ Retrieves a metadata schema. 📘 Metadata Documentation Read the Getting Started with Metadata articles to learn how metadata work in Voucherify.
+
+ :param project_id: Provide the unique identifier of the project. (required)
+ :type project_id: str
+ :param metadata_schema_id: Provide the unique identifier of the metadata schema. (required)
+ :type metadata_schema_id: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._get_metadata_schema1_serialize(
+ project_id=project_id,
+ metadata_schema_id=metadata_schema_id,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '2XX': "ManagementProjectsMetadataSchemasGetResponseBody",
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ )
+
+
+ @validate_call
+ def get_metadata_schema1_without_preload_content(
+ self,
+ project_id: Annotated[StrictStr, Field(description="Provide the unique identifier of the project.")],
+ metadata_schema_id: Annotated[StrictStr, Field(description="Provide the unique identifier of the metadata schema.")],
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> RESTResponseType:
+ """Get Metadata Schema
+
+ Retrieves a metadata schema. 📘 Metadata Documentation Read the Getting Started with Metadata articles to learn how metadata work in Voucherify.
+
+ :param project_id: Provide the unique identifier of the project. (required)
+ :type project_id: str
+ :param metadata_schema_id: Provide the unique identifier of the metadata schema. (required)
+ :type metadata_schema_id: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._get_metadata_schema1_serialize(
+ project_id=project_id,
+ metadata_schema_id=metadata_schema_id,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '2XX': "ManagementProjectsMetadataSchemasGetResponseBody",
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+
+ def _get_metadata_schema1_serialize(
+ self,
+ project_id,
+ metadata_schema_id,
+ _request_auth,
+ _content_type,
+ _headers,
+ _host_index,
+ ) -> RequestSerialized:
+
+ _host = None
+
+ _collection_formats: Dict[str, str] = {
+ }
+
+ _path_params: Dict[str, str] = {}
+ _query_params: List[Tuple[str, str]] = []
+ _header_params: Dict[str, Optional[str]] = _headers or {}
+ _form_params: List[Tuple[str, str]] = []
+ _files: Dict[str, Union[str, bytes]] = {}
+ _body_params: Optional[bytes] = None
+
+ # process the path parameters
+ if project_id is not None:
+ _path_params['projectId'] = project_id
+ if metadata_schema_id is not None:
+ _path_params['metadataSchemaId'] = metadata_schema_id
+ # process the query parameters
+ # process the header parameters
+ # process the form parameters
+ # process the body parameter
+
+
+ # set the HTTP header `Accept`
+ if 'Accept' not in _header_params:
+ _header_params['Accept'] = self.api_client.select_header_accept(
+ [
+ 'application/json'
+ ]
+ )
+
+
+ # authentication setting
+ _auth_settings: List[str] = [
+ 'X-Management-Token',
+ 'X-Management-Id'
+ ]
+
+ return self.api_client.param_serialize(
+ method='GET',
+ resource_path='/management/v1/projects/{projectId}/metadata-schemas/{metadataSchemaId}',
+ path_params=_path_params,
+ query_params=_query_params,
+ header_params=_header_params,
+ body=_body_params,
+ post_params=_form_params,
+ files=_files,
+ auth_settings=_auth_settings,
+ collection_formats=_collection_formats,
+ _host=_host,
+ _request_auth=_request_auth
+ )
+
+
+
+
+ @validate_call
+ def get_project(
+ self,
+ project_id: Annotated[StrictStr, Field(description="Provide the unique identifier of the project.")],
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> ManagementProjectsGetResponseBody:
+ """Get Project
+
+ Retrieves an existing project.
+
+ :param project_id: Provide the unique identifier of the project. (required)
+ :type project_id: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._get_project_serialize(
+ project_id=project_id,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '2XX': "ManagementProjectsGetResponseBody",
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ ).data
+
+
+ @validate_call
+ def get_project_with_http_info(
+ self,
+ project_id: Annotated[StrictStr, Field(description="Provide the unique identifier of the project.")],
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> ApiResponse[ManagementProjectsGetResponseBody]:
+ """Get Project
+
+ Retrieves an existing project.
+
+ :param project_id: Provide the unique identifier of the project. (required)
+ :type project_id: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._get_project_serialize(
+ project_id=project_id,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '2XX': "ManagementProjectsGetResponseBody",
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ )
+
+
+ @validate_call
+ def get_project_without_preload_content(
+ self,
+ project_id: Annotated[StrictStr, Field(description="Provide the unique identifier of the project.")],
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> RESTResponseType:
+ """Get Project
+
+ Retrieves an existing project.
+
+ :param project_id: Provide the unique identifier of the project. (required)
+ :type project_id: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._get_project_serialize(
+ project_id=project_id,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '2XX': "ManagementProjectsGetResponseBody",
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+
+ def _get_project_serialize(
+ self,
+ project_id,
+ _request_auth,
+ _content_type,
+ _headers,
+ _host_index,
+ ) -> RequestSerialized:
+
+ _host = None
+
+ _collection_formats: Dict[str, str] = {
+ }
+
+ _path_params: Dict[str, str] = {}
+ _query_params: List[Tuple[str, str]] = []
+ _header_params: Dict[str, Optional[str]] = _headers or {}
+ _form_params: List[Tuple[str, str]] = []
+ _files: Dict[str, Union[str, bytes]] = {}
+ _body_params: Optional[bytes] = None
+
+ # process the path parameters
+ if project_id is not None:
+ _path_params['projectId'] = project_id
+ # process the query parameters
+ # process the header parameters
+ # process the form parameters
+ # process the body parameter
+
+
+ # set the HTTP header `Accept`
+ if 'Accept' not in _header_params:
+ _header_params['Accept'] = self.api_client.select_header_accept(
+ [
+ 'application/json'
+ ]
+ )
+
+
+ # authentication setting
+ _auth_settings: List[str] = [
+ 'X-Management-Token',
+ 'X-Management-Id'
+ ]
+
+ return self.api_client.param_serialize(
+ method='GET',
+ resource_path='/management/v1/projects/{projectId}',
+ path_params=_path_params,
+ query_params=_query_params,
+ header_params=_header_params,
+ body=_body_params,
+ post_params=_form_params,
+ files=_files,
+ auth_settings=_auth_settings,
+ collection_formats=_collection_formats,
+ _host=_host,
+ _request_auth=_request_auth
+ )
+
+
+
+
+ @validate_call
+ def get_stacking_rules(
+ self,
+ project_id: Annotated[StrictStr, Field(description="Provide the unique identifier of the project.")],
+ stacking_rules_id: Annotated[StrictStr, Field(description="Provide the unique identifier of the stacking rules.")],
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> ManagementProjectsStackingRulesGetResponseBody:
+ """Get Stacking Rules
+
+ Retrieves the stacking rules for the project. 📘 Stacking Rules Documentation Read [the Stacking Rules article](https://support.voucherify.io/article/604-stacking-rules) to learn how they work.
+
+ :param project_id: Provide the unique identifier of the project. (required)
+ :type project_id: str
+ :param stacking_rules_id: Provide the unique identifier of the stacking rules. (required)
+ :type stacking_rules_id: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._get_stacking_rules_serialize(
+ project_id=project_id,
+ stacking_rules_id=stacking_rules_id,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '2XX': "ManagementProjectsStackingRulesGetResponseBody",
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ ).data
+
+
+ @validate_call
+ def get_stacking_rules_with_http_info(
+ self,
+ project_id: Annotated[StrictStr, Field(description="Provide the unique identifier of the project.")],
+ stacking_rules_id: Annotated[StrictStr, Field(description="Provide the unique identifier of the stacking rules.")],
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> ApiResponse[ManagementProjectsStackingRulesGetResponseBody]:
+ """Get Stacking Rules
+
+ Retrieves the stacking rules for the project. 📘 Stacking Rules Documentation Read [the Stacking Rules article](https://support.voucherify.io/article/604-stacking-rules) to learn how they work.
+
+ :param project_id: Provide the unique identifier of the project. (required)
+ :type project_id: str
+ :param stacking_rules_id: Provide the unique identifier of the stacking rules. (required)
+ :type stacking_rules_id: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._get_stacking_rules_serialize(
+ project_id=project_id,
+ stacking_rules_id=stacking_rules_id,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '2XX': "ManagementProjectsStackingRulesGetResponseBody",
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ )
+
+
+ @validate_call
+ def get_stacking_rules_without_preload_content(
+ self,
+ project_id: Annotated[StrictStr, Field(description="Provide the unique identifier of the project.")],
+ stacking_rules_id: Annotated[StrictStr, Field(description="Provide the unique identifier of the stacking rules.")],
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> RESTResponseType:
+ """Get Stacking Rules
+
+ Retrieves the stacking rules for the project. 📘 Stacking Rules Documentation Read [the Stacking Rules article](https://support.voucherify.io/article/604-stacking-rules) to learn how they work.
+
+ :param project_id: Provide the unique identifier of the project. (required)
+ :type project_id: str
+ :param stacking_rules_id: Provide the unique identifier of the stacking rules. (required)
+ :type stacking_rules_id: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._get_stacking_rules_serialize(
+ project_id=project_id,
+ stacking_rules_id=stacking_rules_id,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '2XX': "ManagementProjectsStackingRulesGetResponseBody",
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+
+ def _get_stacking_rules_serialize(
+ self,
+ project_id,
+ stacking_rules_id,
+ _request_auth,
+ _content_type,
+ _headers,
+ _host_index,
+ ) -> RequestSerialized:
+
+ _host = None
+
+ _collection_formats: Dict[str, str] = {
+ }
+
+ _path_params: Dict[str, str] = {}
+ _query_params: List[Tuple[str, str]] = []
+ _header_params: Dict[str, Optional[str]] = _headers or {}
+ _form_params: List[Tuple[str, str]] = []
+ _files: Dict[str, Union[str, bytes]] = {}
+ _body_params: Optional[bytes] = None
+
+ # process the path parameters
+ if project_id is not None:
+ _path_params['projectId'] = project_id
+ if stacking_rules_id is not None:
+ _path_params['stackingRulesId'] = stacking_rules_id
+ # process the query parameters
+ # process the header parameters
+ # process the form parameters
+ # process the body parameter
+
+
+ # set the HTTP header `Accept`
+ if 'Accept' not in _header_params:
+ _header_params['Accept'] = self.api_client.select_header_accept(
+ [
+ 'application/json'
+ ]
+ )
+
+
+ # authentication setting
+ _auth_settings: List[str] = [
+ 'X-Management-Token',
+ 'X-Management-Id'
+ ]
+
+ return self.api_client.param_serialize(
+ method='GET',
+ resource_path='/management/v1/projects/{projectId}/stacking-rules/{stackingRulesId}',
+ path_params=_path_params,
+ query_params=_query_params,
+ header_params=_header_params,
+ body=_body_params,
+ post_params=_form_params,
+ files=_files,
+ auth_settings=_auth_settings,
+ collection_formats=_collection_formats,
+ _host=_host,
+ _request_auth=_request_auth
+ )
+
+
+
+
+ @validate_call
+ def get_user(
+ self,
+ project_id: Annotated[StrictStr, Field(description="Provide the unique identifier of the project.")],
+ user_id: Annotated[StrictStr, Field(description="Provide the unique identifier of the user. Alternatively, provide the users login.")],
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> ManagementProjectsUsersGetUserResponseBody:
+ """Get User
+
+ Retrieves the project users details.
+
+ :param project_id: Provide the unique identifier of the project. (required)
+ :type project_id: str
+ :param user_id: Provide the unique identifier of the user. Alternatively, provide the users login. (required)
+ :type user_id: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._get_user_serialize(
+ project_id=project_id,
+ user_id=user_id,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '2XX': "ManagementProjectsUsersGetUserResponseBody",
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ ).data
+
+
+ @validate_call
+ def get_user_with_http_info(
+ self,
+ project_id: Annotated[StrictStr, Field(description="Provide the unique identifier of the project.")],
+ user_id: Annotated[StrictStr, Field(description="Provide the unique identifier of the user. Alternatively, provide the users login.")],
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> ApiResponse[ManagementProjectsUsersGetUserResponseBody]:
+ """Get User
+
+ Retrieves the project users details.
+
+ :param project_id: Provide the unique identifier of the project. (required)
+ :type project_id: str
+ :param user_id: Provide the unique identifier of the user. Alternatively, provide the users login. (required)
+ :type user_id: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._get_user_serialize(
+ project_id=project_id,
+ user_id=user_id,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '2XX': "ManagementProjectsUsersGetUserResponseBody",
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ )
+
+
+ @validate_call
+ def get_user_without_preload_content(
+ self,
+ project_id: Annotated[StrictStr, Field(description="Provide the unique identifier of the project.")],
+ user_id: Annotated[StrictStr, Field(description="Provide the unique identifier of the user. Alternatively, provide the users login.")],
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> RESTResponseType:
+ """Get User
+
+ Retrieves the project users details.
+
+ :param project_id: Provide the unique identifier of the project. (required)
+ :type project_id: str
+ :param user_id: Provide the unique identifier of the user. Alternatively, provide the users login. (required)
+ :type user_id: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._get_user_serialize(
+ project_id=project_id,
+ user_id=user_id,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '2XX': "ManagementProjectsUsersGetUserResponseBody",
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+
+ def _get_user_serialize(
+ self,
+ project_id,
+ user_id,
+ _request_auth,
+ _content_type,
+ _headers,
+ _host_index,
+ ) -> RequestSerialized:
+
+ _host = None
+
+ _collection_formats: Dict[str, str] = {
+ }
+
+ _path_params: Dict[str, str] = {}
+ _query_params: List[Tuple[str, str]] = []
+ _header_params: Dict[str, Optional[str]] = _headers or {}
+ _form_params: List[Tuple[str, str]] = []
+ _files: Dict[str, Union[str, bytes]] = {}
+ _body_params: Optional[bytes] = None
+
+ # process the path parameters
+ if project_id is not None:
+ _path_params['projectId'] = project_id
+ if user_id is not None:
+ _path_params['userId'] = user_id
+ # process the query parameters
+ # process the header parameters
+ # process the form parameters
+ # process the body parameter
+
+
+ # set the HTTP header `Accept`
+ if 'Accept' not in _header_params:
+ _header_params['Accept'] = self.api_client.select_header_accept(
+ [
+ 'application/json'
+ ]
+ )
+
+
+ # authentication setting
+ _auth_settings: List[str] = [
+ 'X-Management-Token',
+ 'X-Management-Id'
+ ]
+
+ return self.api_client.param_serialize(
+ method='GET',
+ resource_path='/management/v1/projects/{projectId}/users/{userId}',
+ path_params=_path_params,
+ query_params=_query_params,
+ header_params=_header_params,
+ body=_body_params,
+ post_params=_form_params,
+ files=_files,
+ auth_settings=_auth_settings,
+ collection_formats=_collection_formats,
+ _host=_host,
+ _request_auth=_request_auth
+ )
+
+
+
+
+ @validate_call
+ def get_webhook(
+ self,
+ project_id: Annotated[StrictStr, Field(description="Provide the unique identifier of the project.")],
+ webhook_id: Annotated[StrictStr, Field(description="Provide the unique identifier of the webhook configuration.")],
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> ManagementProjectsWebhooksGetResponseBody:
+ """Get Webhook
+
+ Retrieves a webhook configuration. 📘 Webhook Documentation Read Webhooks v2024-01-1 article to learn how webhooks work in Voucherify.
+
+ :param project_id: Provide the unique identifier of the project. (required)
+ :type project_id: str
+ :param webhook_id: Provide the unique identifier of the webhook configuration. (required)
+ :type webhook_id: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._get_webhook_serialize(
+ project_id=project_id,
+ webhook_id=webhook_id,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '2XX': "ManagementProjectsWebhooksGetResponseBody",
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ ).data
+
+
+ @validate_call
+ def get_webhook_with_http_info(
+ self,
+ project_id: Annotated[StrictStr, Field(description="Provide the unique identifier of the project.")],
+ webhook_id: Annotated[StrictStr, Field(description="Provide the unique identifier of the webhook configuration.")],
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> ApiResponse[ManagementProjectsWebhooksGetResponseBody]:
+ """Get Webhook
+
+ Retrieves a webhook configuration. 📘 Webhook Documentation Read Webhooks v2024-01-1 article to learn how webhooks work in Voucherify.
+
+ :param project_id: Provide the unique identifier of the project. (required)
+ :type project_id: str
+ :param webhook_id: Provide the unique identifier of the webhook configuration. (required)
+ :type webhook_id: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._get_webhook_serialize(
+ project_id=project_id,
+ webhook_id=webhook_id,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '2XX': "ManagementProjectsWebhooksGetResponseBody",
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ )
+
+
+ @validate_call
+ def get_webhook_without_preload_content(
+ self,
+ project_id: Annotated[StrictStr, Field(description="Provide the unique identifier of the project.")],
+ webhook_id: Annotated[StrictStr, Field(description="Provide the unique identifier of the webhook configuration.")],
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> RESTResponseType:
+ """Get Webhook
+
+ Retrieves a webhook configuration. 📘 Webhook Documentation Read Webhooks v2024-01-1 article to learn how webhooks work in Voucherify.
+
+ :param project_id: Provide the unique identifier of the project. (required)
+ :type project_id: str
+ :param webhook_id: Provide the unique identifier of the webhook configuration. (required)
+ :type webhook_id: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._get_webhook_serialize(
+ project_id=project_id,
+ webhook_id=webhook_id,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '2XX': "ManagementProjectsWebhooksGetResponseBody",
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+
+ def _get_webhook_serialize(
+ self,
+ project_id,
+ webhook_id,
+ _request_auth,
+ _content_type,
+ _headers,
+ _host_index,
+ ) -> RequestSerialized:
+
+ _host = None
+
+ _collection_formats: Dict[str, str] = {
+ }
+
+ _path_params: Dict[str, str] = {}
+ _query_params: List[Tuple[str, str]] = []
+ _header_params: Dict[str, Optional[str]] = _headers or {}
+ _form_params: List[Tuple[str, str]] = []
+ _files: Dict[str, Union[str, bytes]] = {}
+ _body_params: Optional[bytes] = None
+
+ # process the path parameters
+ if project_id is not None:
+ _path_params['projectId'] = project_id
+ if webhook_id is not None:
+ _path_params['webhookId'] = webhook_id
+ # process the query parameters
+ # process the header parameters
+ # process the form parameters
+ # process the body parameter
+
+
+ # set the HTTP header `Accept`
+ if 'Accept' not in _header_params:
+ _header_params['Accept'] = self.api_client.select_header_accept(
+ [
+ 'application/json'
+ ]
+ )
+
+
+ # authentication setting
+ _auth_settings: List[str] = [
+ 'X-Management-Token',
+ 'X-Management-Id'
+ ]
+
+ return self.api_client.param_serialize(
+ method='GET',
+ resource_path='/management/v1/projects/{projectId}/webhooks/{webhookId}',
+ path_params=_path_params,
+ query_params=_query_params,
+ header_params=_header_params,
+ body=_body_params,
+ post_params=_form_params,
+ files=_files,
+ auth_settings=_auth_settings,
+ collection_formats=_collection_formats,
+ _host=_host,
+ _request_auth=_request_auth
+ )
+
+
+
+
+ @validate_call
+ def invite_user(
+ self,
+ management_projects_users_invite_create_request_body: Annotated[Optional[ManagementProjectsUsersInviteCreateRequestBody], Field(description="Defines the details of the invitation, the project, and roles to which the user will be assigned.")] = None,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> None:
+ """Invite a New User
+
+ Sends an invitation to an email address that has not been used yet as a Voucherify user login. You can specify the projects to which the invited user will be assigned and define their roles.
+
+ :param management_projects_users_invite_create_request_body: Defines the details of the invitation, the project, and roles to which the user will be assigned.
+ :type management_projects_users_invite_create_request_body: ManagementProjectsUsersInviteCreateRequestBody
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._invite_user_serialize(
+ management_projects_users_invite_create_request_body=management_projects_users_invite_create_request_body,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '2XX': None,
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ ).data
+
+
+ @validate_call
+ def invite_user_with_http_info(
+ self,
+ management_projects_users_invite_create_request_body: Annotated[Optional[ManagementProjectsUsersInviteCreateRequestBody], Field(description="Defines the details of the invitation, the project, and roles to which the user will be assigned.")] = None,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> ApiResponse[None]:
+ """Invite a New User
+
+ Sends an invitation to an email address that has not been used yet as a Voucherify user login. You can specify the projects to which the invited user will be assigned and define their roles.
+
+ :param management_projects_users_invite_create_request_body: Defines the details of the invitation, the project, and roles to which the user will be assigned.
+ :type management_projects_users_invite_create_request_body: ManagementProjectsUsersInviteCreateRequestBody
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._invite_user_serialize(
+ management_projects_users_invite_create_request_body=management_projects_users_invite_create_request_body,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '2XX': None,
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ )
+
+
+ @validate_call
+ def invite_user_without_preload_content(
+ self,
+ management_projects_users_invite_create_request_body: Annotated[Optional[ManagementProjectsUsersInviteCreateRequestBody], Field(description="Defines the details of the invitation, the project, and roles to which the user will be assigned.")] = None,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> RESTResponseType:
+ """Invite a New User
+
+ Sends an invitation to an email address that has not been used yet as a Voucherify user login. You can specify the projects to which the invited user will be assigned and define their roles.
+
+ :param management_projects_users_invite_create_request_body: Defines the details of the invitation, the project, and roles to which the user will be assigned.
+ :type management_projects_users_invite_create_request_body: ManagementProjectsUsersInviteCreateRequestBody
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._invite_user_serialize(
+ management_projects_users_invite_create_request_body=management_projects_users_invite_create_request_body,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '2XX': None,
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+
+ def _invite_user_serialize(
+ self,
+ management_projects_users_invite_create_request_body,
+ _request_auth,
+ _content_type,
+ _headers,
+ _host_index,
+ ) -> RequestSerialized:
+
+ _host = None
+
+ _collection_formats: Dict[str, str] = {
+ }
+
+ _path_params: Dict[str, str] = {}
+ _query_params: List[Tuple[str, str]] = []
+ _header_params: Dict[str, Optional[str]] = _headers or {}
+ _form_params: List[Tuple[str, str]] = []
+ _files: Dict[str, Union[str, bytes]] = {}
+ _body_params: Optional[bytes] = None
+
+ # process the path parameters
+ # process the query parameters
+ # process the header parameters
+ # process the form parameters
+ # process the body parameter
+ if management_projects_users_invite_create_request_body is not None:
+ _body_params = management_projects_users_invite_create_request_body
+
+
+
+ # set the HTTP header `Content-Type`
+ if _content_type:
+ _header_params['Content-Type'] = _content_type
+ else:
+ _default_content_type = (
+ self.api_client.select_header_content_type(
+ [
+ 'application/json'
+ ]
+ )
+ )
+ if _default_content_type is not None:
+ _header_params['Content-Type'] = _default_content_type
+
+ # authentication setting
+ _auth_settings: List[str] = [
+ 'X-Management-Token',
+ 'X-Management-Id'
+ ]
+
+ return self.api_client.param_serialize(
+ method='POST',
+ resource_path='/management/v1/projects/users/invite',
+ path_params=_path_params,
+ query_params=_query_params,
+ header_params=_header_params,
+ body=_body_params,
+ post_params=_form_params,
+ files=_files,
+ auth_settings=_auth_settings,
+ collection_formats=_collection_formats,
+ _host=_host,
+ _request_auth=_request_auth
+ )
+
+
+
+
+ @validate_call
+ def list_brands(
+ self,
+ project_id: Annotated[StrictStr, Field(description="Provide the unique identifier of the project.")],
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> ManagementProjectsBrandingListResponseBody:
+ """List Brands
+
+ Lists all brand configurations. Because a project can have only one brand, it always returns a list with one item. This endpoint can be used to retrieve the brand configuration created with the Voucherify Dashboard and the ID.
+
+ :param project_id: Provide the unique identifier of the project. (required)
+ :type project_id: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._list_brands_serialize(
+ project_id=project_id,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '2XX': "ManagementProjectsBrandingListResponseBody",
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ ).data
+
+
+ @validate_call
+ def list_brands_with_http_info(
+ self,
+ project_id: Annotated[StrictStr, Field(description="Provide the unique identifier of the project.")],
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> ApiResponse[ManagementProjectsBrandingListResponseBody]:
+ """List Brands
+
+ Lists all brand configurations. Because a project can have only one brand, it always returns a list with one item. This endpoint can be used to retrieve the brand configuration created with the Voucherify Dashboard and the ID.
+
+ :param project_id: Provide the unique identifier of the project. (required)
+ :type project_id: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._list_brands_serialize(
+ project_id=project_id,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '2XX': "ManagementProjectsBrandingListResponseBody",
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ )
+
+
+ @validate_call
+ def list_brands_without_preload_content(
+ self,
+ project_id: Annotated[StrictStr, Field(description="Provide the unique identifier of the project.")],
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> RESTResponseType:
+ """List Brands
+
+ Lists all brand configurations. Because a project can have only one brand, it always returns a list with one item. This endpoint can be used to retrieve the brand configuration created with the Voucherify Dashboard and the ID.
+
+ :param project_id: Provide the unique identifier of the project. (required)
+ :type project_id: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._list_brands_serialize(
+ project_id=project_id,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '2XX': "ManagementProjectsBrandingListResponseBody",
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+
+ def _list_brands_serialize(
+ self,
+ project_id,
+ _request_auth,
+ _content_type,
+ _headers,
+ _host_index,
+ ) -> RequestSerialized:
+
+ _host = None
+
+ _collection_formats: Dict[str, str] = {
+ }
+
+ _path_params: Dict[str, str] = {}
+ _query_params: List[Tuple[str, str]] = []
+ _header_params: Dict[str, Optional[str]] = _headers or {}
+ _form_params: List[Tuple[str, str]] = []
+ _files: Dict[str, Union[str, bytes]] = {}
+ _body_params: Optional[bytes] = None
+
+ # process the path parameters
+ if project_id is not None:
+ _path_params['projectId'] = project_id
+ # process the query parameters
+ # process the header parameters
+ # process the form parameters
+ # process the body parameter
+
+
+ # set the HTTP header `Accept`
+ if 'Accept' not in _header_params:
+ _header_params['Accept'] = self.api_client.select_header_accept(
+ [
+ 'application/json'
+ ]
+ )
+
+
+ # authentication setting
+ _auth_settings: List[str] = [
+ 'X-Management-Token',
+ 'X-Management-Id'
+ ]
+
+ return self.api_client.param_serialize(
+ method='GET',
+ resource_path='/management/v1/projects/{projectId}/branding',
+ path_params=_path_params,
+ query_params=_query_params,
+ header_params=_header_params,
+ body=_body_params,
+ post_params=_form_params,
+ files=_files,
+ auth_settings=_auth_settings,
+ collection_formats=_collection_formats,
+ _host=_host,
+ _request_auth=_request_auth
+ )
+
+
+
+
+ @validate_call
+ def list_custom_event_schemas(
+ self,
+ project_id: Annotated[StrictStr, Field(description="Provide the unique identifier of the project.")],
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> ManagementProjectsCustomEventSchemasListResponseBody:
+ """List Custom Event Schemas
+
+ Lists all custom event schemas available in the project. 📘 Custom Event Documentation Read [Custom Events](https://support.voucherify.io/article/111-custom-events) article to learn how custom events work in Voucherify. Read also the details about the Track Custom Event endpoint and the Custom Event Object.
+
+ :param project_id: Provide the unique identifier of the project. (required)
+ :type project_id: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._list_custom_event_schemas_serialize(
+ project_id=project_id,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '2XX': "ManagementProjectsCustomEventSchemasListResponseBody",
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ ).data
+
+
+ @validate_call
+ def list_custom_event_schemas_with_http_info(
+ self,
+ project_id: Annotated[StrictStr, Field(description="Provide the unique identifier of the project.")],
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> ApiResponse[ManagementProjectsCustomEventSchemasListResponseBody]:
+ """List Custom Event Schemas
+
+ Lists all custom event schemas available in the project. 📘 Custom Event Documentation Read [Custom Events](https://support.voucherify.io/article/111-custom-events) article to learn how custom events work in Voucherify. Read also the details about the Track Custom Event endpoint and the Custom Event Object.
+
+ :param project_id: Provide the unique identifier of the project. (required)
+ :type project_id: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._list_custom_event_schemas_serialize(
+ project_id=project_id,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '2XX': "ManagementProjectsCustomEventSchemasListResponseBody",
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ )
+
+
+ @validate_call
+ def list_custom_event_schemas_without_preload_content(
+ self,
+ project_id: Annotated[StrictStr, Field(description="Provide the unique identifier of the project.")],
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> RESTResponseType:
+ """List Custom Event Schemas
+
+ Lists all custom event schemas available in the project. 📘 Custom Event Documentation Read [Custom Events](https://support.voucherify.io/article/111-custom-events) article to learn how custom events work in Voucherify. Read also the details about the Track Custom Event endpoint and the Custom Event Object.
+
+ :param project_id: Provide the unique identifier of the project. (required)
+ :type project_id: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._list_custom_event_schemas_serialize(
+ project_id=project_id,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '2XX': "ManagementProjectsCustomEventSchemasListResponseBody",
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+
+ def _list_custom_event_schemas_serialize(
+ self,
+ project_id,
+ _request_auth,
+ _content_type,
+ _headers,
+ _host_index,
+ ) -> RequestSerialized:
+
+ _host = None
+
+ _collection_formats: Dict[str, str] = {
+ }
+
+ _path_params: Dict[str, str] = {}
+ _query_params: List[Tuple[str, str]] = []
+ _header_params: Dict[str, Optional[str]] = _headers or {}
+ _form_params: List[Tuple[str, str]] = []
+ _files: Dict[str, Union[str, bytes]] = {}
+ _body_params: Optional[bytes] = None
+
+ # process the path parameters
+ if project_id is not None:
+ _path_params['projectId'] = project_id
+ # process the query parameters
+ # process the header parameters
+ # process the form parameters
+ # process the body parameter
+
+
+ # set the HTTP header `Accept`
+ if 'Accept' not in _header_params:
+ _header_params['Accept'] = self.api_client.select_header_accept(
+ [
+ 'application/json'
+ ]
+ )
+
+
+ # authentication setting
+ _auth_settings: List[str] = [
+ 'X-Management-Token',
+ 'X-Management-Id'
+ ]
+
+ return self.api_client.param_serialize(
+ method='GET',
+ resource_path='/management/v1/projects/{projectId}/custom-event-schemas',
+ path_params=_path_params,
+ query_params=_query_params,
+ header_params=_header_params,
+ body=_body_params,
+ post_params=_form_params,
+ files=_files,
+ auth_settings=_auth_settings,
+ collection_formats=_collection_formats,
+ _host=_host,
+ _request_auth=_request_auth
+ )
+
+
+
+
+ @validate_call
+ def list_metadata_schemas1(
+ self,
+ project_id: Annotated[StrictStr, Field(description="Provide the unique identifier of the project.")],
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> ManagementProjectsMetadataSchemasListResponseBody:
+ """List Metadata Schemas
+
+ Lists all metadata schemas available in the project. 📘 Metadata Documentation Read the Getting Started with Metadata articles to learn how metadata work in Voucherify.
+
+ :param project_id: Provide the unique identifier of the project. (required)
+ :type project_id: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._list_metadata_schemas1_serialize(
+ project_id=project_id,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '2XX': "ManagementProjectsMetadataSchemasListResponseBody",
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ ).data
+
+
+ @validate_call
+ def list_metadata_schemas1_with_http_info(
+ self,
+ project_id: Annotated[StrictStr, Field(description="Provide the unique identifier of the project.")],
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> ApiResponse[ManagementProjectsMetadataSchemasListResponseBody]:
+ """List Metadata Schemas
+
+ Lists all metadata schemas available in the project. 📘 Metadata Documentation Read the Getting Started with Metadata articles to learn how metadata work in Voucherify.
+
+ :param project_id: Provide the unique identifier of the project. (required)
+ :type project_id: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._list_metadata_schemas1_serialize(
+ project_id=project_id,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '2XX': "ManagementProjectsMetadataSchemasListResponseBody",
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ )
+
+
+ @validate_call
+ def list_metadata_schemas1_without_preload_content(
+ self,
+ project_id: Annotated[StrictStr, Field(description="Provide the unique identifier of the project.")],
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> RESTResponseType:
+ """List Metadata Schemas
+
+ Lists all metadata schemas available in the project. 📘 Metadata Documentation Read the Getting Started with Metadata articles to learn how metadata work in Voucherify.
+
+ :param project_id: Provide the unique identifier of the project. (required)
+ :type project_id: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._list_metadata_schemas1_serialize(
+ project_id=project_id,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '2XX': "ManagementProjectsMetadataSchemasListResponseBody",
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+
+ def _list_metadata_schemas1_serialize(
+ self,
+ project_id,
+ _request_auth,
+ _content_type,
+ _headers,
+ _host_index,
+ ) -> RequestSerialized:
+
+ _host = None
+
+ _collection_formats: Dict[str, str] = {
+ }
+
+ _path_params: Dict[str, str] = {}
+ _query_params: List[Tuple[str, str]] = []
+ _header_params: Dict[str, Optional[str]] = _headers or {}
+ _form_params: List[Tuple[str, str]] = []
+ _files: Dict[str, Union[str, bytes]] = {}
+ _body_params: Optional[bytes] = None
+
+ # process the path parameters
+ if project_id is not None:
+ _path_params['projectId'] = project_id
+ # process the query parameters
+ # process the header parameters
+ # process the form parameters
+ # process the body parameter
+
+
+ # set the HTTP header `Accept`
+ if 'Accept' not in _header_params:
+ _header_params['Accept'] = self.api_client.select_header_accept(
+ [
+ 'application/json'
+ ]
+ )
+
+
+ # authentication setting
+ _auth_settings: List[str] = [
+ 'X-Management-Token',
+ 'X-Management-Id'
+ ]
+
+ return self.api_client.param_serialize(
+ method='GET',
+ resource_path='/management/v1/projects/{projectId}/metadata-schemas',
+ path_params=_path_params,
+ query_params=_query_params,
+ header_params=_header_params,
+ body=_body_params,
+ post_params=_form_params,
+ files=_files,
+ auth_settings=_auth_settings,
+ collection_formats=_collection_formats,
+ _host=_host,
+ _request_auth=_request_auth
+ )
+
+
+
+
+ @validate_call
+ def list_projects(
+ self,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> ManagementProjectsListResponseBody:
+ """List Projects
+
+ Lists all projects for the organization. The endpoint does not require any query parameters.
+
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._list_projects_serialize(
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '2XX': "ManagementProjectsListResponseBody",
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ ).data
+
+
+ @validate_call
+ def list_projects_with_http_info(
+ self,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> ApiResponse[ManagementProjectsListResponseBody]:
+ """List Projects
+
+ Lists all projects for the organization. The endpoint does not require any query parameters.
+
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._list_projects_serialize(
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '2XX': "ManagementProjectsListResponseBody",
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ )
+
+
+ @validate_call
+ def list_projects_without_preload_content(
+ self,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> RESTResponseType:
+ """List Projects
+
+ Lists all projects for the organization. The endpoint does not require any query parameters.
+
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._list_projects_serialize(
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '2XX': "ManagementProjectsListResponseBody",
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+
+ def _list_projects_serialize(
+ self,
+ _request_auth,
+ _content_type,
+ _headers,
+ _host_index,
+ ) -> RequestSerialized:
+
+ _host = None
+
+ _collection_formats: Dict[str, str] = {
+ }
+
+ _path_params: Dict[str, str] = {}
+ _query_params: List[Tuple[str, str]] = []
+ _header_params: Dict[str, Optional[str]] = _headers or {}
+ _form_params: List[Tuple[str, str]] = []
+ _files: Dict[str, Union[str, bytes]] = {}
+ _body_params: Optional[bytes] = None
+
+ # process the path parameters
+ # process the query parameters
+ # process the header parameters
+ # process the form parameters
+ # process the body parameter
+
+
+ # set the HTTP header `Accept`
+ if 'Accept' not in _header_params:
+ _header_params['Accept'] = self.api_client.select_header_accept(
+ [
+ 'application/json'
+ ]
+ )
+
+
+ # authentication setting
+ _auth_settings: List[str] = [
+ 'X-Management-Token',
+ 'X-Management-Id'
+ ]
+
+ return self.api_client.param_serialize(
+ method='GET',
+ resource_path='/management/v1/projects',
+ path_params=_path_params,
+ query_params=_query_params,
+ header_params=_header_params,
+ body=_body_params,
+ post_params=_form_params,
+ files=_files,
+ auth_settings=_auth_settings,
+ collection_formats=_collection_formats,
+ _host=_host,
+ _request_auth=_request_auth
+ )
+
+
+
+
+ @validate_call
+ def list_stacking_rules(
+ self,
+ project_id: Annotated[StrictStr, Field(description="Provide the unique identifier of the project.")],
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> ManagementProjectsStackingRulesListResponseBody:
+ """List Stacking Rules
+
+ Lists all stacking rules. Returns always a list with one item. This endpoint can be used to retrieve the default stacking rules. The default stacking rules do not have an ID that could be used with the Get Stacking Rules or Update Stacking Rules endpoints. 📘 Stacking Rules Documentation Read [the Stacking Rules article](https://support.voucherify.io/article/604-stacking-rules) to learn how they work.
+
+ :param project_id: Provide the unique identifier of the project. (required)
+ :type project_id: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._list_stacking_rules_serialize(
+ project_id=project_id,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '2XX': "ManagementProjectsStackingRulesListResponseBody",
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ ).data
+
+
+ @validate_call
+ def list_stacking_rules_with_http_info(
+ self,
+ project_id: Annotated[StrictStr, Field(description="Provide the unique identifier of the project.")],
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> ApiResponse[ManagementProjectsStackingRulesListResponseBody]:
+ """List Stacking Rules
+
+ Lists all stacking rules. Returns always a list with one item. This endpoint can be used to retrieve the default stacking rules. The default stacking rules do not have an ID that could be used with the Get Stacking Rules or Update Stacking Rules endpoints. 📘 Stacking Rules Documentation Read [the Stacking Rules article](https://support.voucherify.io/article/604-stacking-rules) to learn how they work.
+
+ :param project_id: Provide the unique identifier of the project. (required)
+ :type project_id: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._list_stacking_rules_serialize(
+ project_id=project_id,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '2XX': "ManagementProjectsStackingRulesListResponseBody",
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ )
+
+
+ @validate_call
+ def list_stacking_rules_without_preload_content(
+ self,
+ project_id: Annotated[StrictStr, Field(description="Provide the unique identifier of the project.")],
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> RESTResponseType:
+ """List Stacking Rules
+
+ Lists all stacking rules. Returns always a list with one item. This endpoint can be used to retrieve the default stacking rules. The default stacking rules do not have an ID that could be used with the Get Stacking Rules or Update Stacking Rules endpoints. 📘 Stacking Rules Documentation Read [the Stacking Rules article](https://support.voucherify.io/article/604-stacking-rules) to learn how they work.
+
+ :param project_id: Provide the unique identifier of the project. (required)
+ :type project_id: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._list_stacking_rules_serialize(
+ project_id=project_id,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '2XX': "ManagementProjectsStackingRulesListResponseBody",
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+
+ def _list_stacking_rules_serialize(
+ self,
+ project_id,
+ _request_auth,
+ _content_type,
+ _headers,
+ _host_index,
+ ) -> RequestSerialized:
+
+ _host = None
+
+ _collection_formats: Dict[str, str] = {
+ }
+
+ _path_params: Dict[str, str] = {}
+ _query_params: List[Tuple[str, str]] = []
+ _header_params: Dict[str, Optional[str]] = _headers or {}
+ _form_params: List[Tuple[str, str]] = []
+ _files: Dict[str, Union[str, bytes]] = {}
+ _body_params: Optional[bytes] = None
+
+ # process the path parameters
+ if project_id is not None:
+ _path_params['projectId'] = project_id
+ # process the query parameters
+ # process the header parameters
+ # process the form parameters
+ # process the body parameter
+
+
+ # set the HTTP header `Accept`
+ if 'Accept' not in _header_params:
+ _header_params['Accept'] = self.api_client.select_header_accept(
+ [
+ 'application/json'
+ ]
+ )
+
+
+ # authentication setting
+ _auth_settings: List[str] = [
+ 'X-Management-Token',
+ 'X-Management-Id'
+ ]
+
+ return self.api_client.param_serialize(
+ method='GET',
+ resource_path='/management/v1/projects/{projectId}/stacking-rules',
+ path_params=_path_params,
+ query_params=_query_params,
+ header_params=_header_params,
+ body=_body_params,
+ post_params=_form_params,
+ files=_files,
+ auth_settings=_auth_settings,
+ collection_formats=_collection_formats,
+ _host=_host,
+ _request_auth=_request_auth
+ )
+
+
+
+
+ @validate_call
+ def list_users(
+ self,
+ project_id: Annotated[StrictStr, Field(description="Provide the unique identifier of the project.")],
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> ManagementProjectsUsersListResponseBody:
+ """List Users
+
+ Lists all users assigned to the project.
+
+ :param project_id: Provide the unique identifier of the project. (required)
+ :type project_id: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._list_users_serialize(
+ project_id=project_id,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '2XX': "ManagementProjectsUsersListResponseBody",
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ ).data
+
+
+ @validate_call
+ def list_users_with_http_info(
+ self,
+ project_id: Annotated[StrictStr, Field(description="Provide the unique identifier of the project.")],
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> ApiResponse[ManagementProjectsUsersListResponseBody]:
+ """List Users
+
+ Lists all users assigned to the project.
+
+ :param project_id: Provide the unique identifier of the project. (required)
+ :type project_id: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._list_users_serialize(
+ project_id=project_id,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '2XX': "ManagementProjectsUsersListResponseBody",
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ )
+
+
+ @validate_call
+ def list_users_without_preload_content(
+ self,
+ project_id: Annotated[StrictStr, Field(description="Provide the unique identifier of the project.")],
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> RESTResponseType:
+ """List Users
+
+ Lists all users assigned to the project.
+
+ :param project_id: Provide the unique identifier of the project. (required)
+ :type project_id: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._list_users_serialize(
+ project_id=project_id,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '2XX': "ManagementProjectsUsersListResponseBody",
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+
+ def _list_users_serialize(
+ self,
+ project_id,
+ _request_auth,
+ _content_type,
+ _headers,
+ _host_index,
+ ) -> RequestSerialized:
+
+ _host = None
+
+ _collection_formats: Dict[str, str] = {
+ }
+
+ _path_params: Dict[str, str] = {}
+ _query_params: List[Tuple[str, str]] = []
+ _header_params: Dict[str, Optional[str]] = _headers or {}
+ _form_params: List[Tuple[str, str]] = []
+ _files: Dict[str, Union[str, bytes]] = {}
+ _body_params: Optional[bytes] = None
+
+ # process the path parameters
+ if project_id is not None:
+ _path_params['projectId'] = project_id
+ # process the query parameters
+ # process the header parameters
+ # process the form parameters
+ # process the body parameter
+
+
+ # set the HTTP header `Accept`
+ if 'Accept' not in _header_params:
+ _header_params['Accept'] = self.api_client.select_header_accept(
+ [
+ 'application/json'
+ ]
+ )
+
+
+ # authentication setting
+ _auth_settings: List[str] = [
+ 'X-Management-Token',
+ 'X-Management-Id'
+ ]
+
+ return self.api_client.param_serialize(
+ method='GET',
+ resource_path='/management/v1/projects/{projectId}/users',
+ path_params=_path_params,
+ query_params=_query_params,
+ header_params=_header_params,
+ body=_body_params,
+ post_params=_form_params,
+ files=_files,
+ auth_settings=_auth_settings,
+ collection_formats=_collection_formats,
+ _host=_host,
+ _request_auth=_request_auth
+ )
+
+
+
+
+ @validate_call
+ def list_webhooks(
+ self,
+ project_id: Annotated[StrictStr, Field(description="Provide the unique identifier of the project.")],
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> ManagementProjectsWebhooksListResponseBody:
+ """List Webhooks
+
+ Lists all webhook configurations for the project. 📘 Webhook Documentation Read Webhooks v2024-01-1 article to learn how webhooks work in Voucherify.
+
+ :param project_id: Provide the unique identifier of the project. (required)
+ :type project_id: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._list_webhooks_serialize(
+ project_id=project_id,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '2XX': "ManagementProjectsWebhooksListResponseBody",
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ ).data
+
+
+ @validate_call
+ def list_webhooks_with_http_info(
+ self,
+ project_id: Annotated[StrictStr, Field(description="Provide the unique identifier of the project.")],
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> ApiResponse[ManagementProjectsWebhooksListResponseBody]:
+ """List Webhooks
+
+ Lists all webhook configurations for the project. 📘 Webhook Documentation Read Webhooks v2024-01-1 article to learn how webhooks work in Voucherify.
+
+ :param project_id: Provide the unique identifier of the project. (required)
+ :type project_id: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._list_webhooks_serialize(
+ project_id=project_id,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '2XX': "ManagementProjectsWebhooksListResponseBody",
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ )
+
+
+ @validate_call
+ def list_webhooks_without_preload_content(
+ self,
+ project_id: Annotated[StrictStr, Field(description="Provide the unique identifier of the project.")],
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> RESTResponseType:
+ """List Webhooks
+
+ Lists all webhook configurations for the project. 📘 Webhook Documentation Read Webhooks v2024-01-1 article to learn how webhooks work in Voucherify.
+
+ :param project_id: Provide the unique identifier of the project. (required)
+ :type project_id: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._list_webhooks_serialize(
+ project_id=project_id,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '2XX': "ManagementProjectsWebhooksListResponseBody",
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+
+ def _list_webhooks_serialize(
+ self,
+ project_id,
+ _request_auth,
+ _content_type,
+ _headers,
+ _host_index,
+ ) -> RequestSerialized:
+
+ _host = None
+
+ _collection_formats: Dict[str, str] = {
+ }
+
+ _path_params: Dict[str, str] = {}
+ _query_params: List[Tuple[str, str]] = []
+ _header_params: Dict[str, Optional[str]] = _headers or {}
+ _form_params: List[Tuple[str, str]] = []
+ _files: Dict[str, Union[str, bytes]] = {}
+ _body_params: Optional[bytes] = None
+
+ # process the path parameters
+ if project_id is not None:
+ _path_params['projectId'] = project_id
+ # process the query parameters
+ # process the header parameters
+ # process the form parameters
+ # process the body parameter
+
+
+ # set the HTTP header `Accept`
+ if 'Accept' not in _header_params:
+ _header_params['Accept'] = self.api_client.select_header_accept(
+ [
+ 'application/json'
+ ]
+ )
+
+
+ # authentication setting
+ _auth_settings: List[str] = [
+ 'X-Management-Token',
+ 'X-Management-Id'
+ ]
+
+ return self.api_client.param_serialize(
+ method='GET',
+ resource_path='/management/v1/projects/{projectId}/webhooks',
+ path_params=_path_params,
+ query_params=_query_params,
+ header_params=_header_params,
+ body=_body_params,
+ post_params=_form_params,
+ files=_files,
+ auth_settings=_auth_settings,
+ collection_formats=_collection_formats,
+ _host=_host,
+ _request_auth=_request_auth
+ )
+
+
+
+
+ @validate_call
+ def management_copy_campaign_template(
+ self,
+ project_id: Annotated[StrictStr, Field(description="Provide the unique identifier of the project.")],
+ campaign_template_id: Annotated[StrictStr, Field(description="Provide the unique identifier of the campaign template.")],
+ management_projects_templates_campaigns_copy_create_request_body: Annotated[Optional[ManagementProjectsTemplatesCampaignsCopyCreateRequestBody], Field(description="Determines the details about the template in the destination project as well as the destination project itself.")] = None,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> ManagementProjectsTemplatesCampaignsCopyCreateResponseBody:
+ """Copy Campaign Template to a Project
+
+ Copies a campaign template to another project. The resources, like validation rules or products, will not be copied to the destination project yet. When the template is used to create a new campaign or add a new promotion tier, the resources will be created in the destination project. 📘 Campaign Templates – Documentation Read the [Campaign Templates documentation](https://support.voucherify.io/article/620-campaign-templates) to learn more about this feature.
+
+ :param project_id: Provide the unique identifier of the project. (required)
+ :type project_id: str
+ :param campaign_template_id: Provide the unique identifier of the campaign template. (required)
+ :type campaign_template_id: str
+ :param management_projects_templates_campaigns_copy_create_request_body: Determines the details about the template in the destination project as well as the destination project itself.
+ :type management_projects_templates_campaigns_copy_create_request_body: ManagementProjectsTemplatesCampaignsCopyCreateRequestBody
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._management_copy_campaign_template_serialize(
+ project_id=project_id,
+ campaign_template_id=campaign_template_id,
+ management_projects_templates_campaigns_copy_create_request_body=management_projects_templates_campaigns_copy_create_request_body,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '2XX': "ManagementProjectsTemplatesCampaignsCopyCreateResponseBody",
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ ).data
+
+
+ @validate_call
+ def management_copy_campaign_template_with_http_info(
+ self,
+ project_id: Annotated[StrictStr, Field(description="Provide the unique identifier of the project.")],
+ campaign_template_id: Annotated[StrictStr, Field(description="Provide the unique identifier of the campaign template.")],
+ management_projects_templates_campaigns_copy_create_request_body: Annotated[Optional[ManagementProjectsTemplatesCampaignsCopyCreateRequestBody], Field(description="Determines the details about the template in the destination project as well as the destination project itself.")] = None,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> ApiResponse[ManagementProjectsTemplatesCampaignsCopyCreateResponseBody]:
+ """Copy Campaign Template to a Project
+
+ Copies a campaign template to another project. The resources, like validation rules or products, will not be copied to the destination project yet. When the template is used to create a new campaign or add a new promotion tier, the resources will be created in the destination project. 📘 Campaign Templates – Documentation Read the [Campaign Templates documentation](https://support.voucherify.io/article/620-campaign-templates) to learn more about this feature.
+
+ :param project_id: Provide the unique identifier of the project. (required)
+ :type project_id: str
+ :param campaign_template_id: Provide the unique identifier of the campaign template. (required)
+ :type campaign_template_id: str
+ :param management_projects_templates_campaigns_copy_create_request_body: Determines the details about the template in the destination project as well as the destination project itself.
+ :type management_projects_templates_campaigns_copy_create_request_body: ManagementProjectsTemplatesCampaignsCopyCreateRequestBody
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._management_copy_campaign_template_serialize(
+ project_id=project_id,
+ campaign_template_id=campaign_template_id,
+ management_projects_templates_campaigns_copy_create_request_body=management_projects_templates_campaigns_copy_create_request_body,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '2XX': "ManagementProjectsTemplatesCampaignsCopyCreateResponseBody",
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ )
+
+
+ @validate_call
+ def management_copy_campaign_template_without_preload_content(
+ self,
+ project_id: Annotated[StrictStr, Field(description="Provide the unique identifier of the project.")],
+ campaign_template_id: Annotated[StrictStr, Field(description="Provide the unique identifier of the campaign template.")],
+ management_projects_templates_campaigns_copy_create_request_body: Annotated[Optional[ManagementProjectsTemplatesCampaignsCopyCreateRequestBody], Field(description="Determines the details about the template in the destination project as well as the destination project itself.")] = None,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> RESTResponseType:
+ """Copy Campaign Template to a Project
+
+ Copies a campaign template to another project. The resources, like validation rules or products, will not be copied to the destination project yet. When the template is used to create a new campaign or add a new promotion tier, the resources will be created in the destination project. 📘 Campaign Templates – Documentation Read the [Campaign Templates documentation](https://support.voucherify.io/article/620-campaign-templates) to learn more about this feature.
+
+ :param project_id: Provide the unique identifier of the project. (required)
+ :type project_id: str
+ :param campaign_template_id: Provide the unique identifier of the campaign template. (required)
+ :type campaign_template_id: str
+ :param management_projects_templates_campaigns_copy_create_request_body: Determines the details about the template in the destination project as well as the destination project itself.
+ :type management_projects_templates_campaigns_copy_create_request_body: ManagementProjectsTemplatesCampaignsCopyCreateRequestBody
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._management_copy_campaign_template_serialize(
+ project_id=project_id,
+ campaign_template_id=campaign_template_id,
+ management_projects_templates_campaigns_copy_create_request_body=management_projects_templates_campaigns_copy_create_request_body,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '2XX': "ManagementProjectsTemplatesCampaignsCopyCreateResponseBody",
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+
+ def _management_copy_campaign_template_serialize(
+ self,
+ project_id,
+ campaign_template_id,
+ management_projects_templates_campaigns_copy_create_request_body,
+ _request_auth,
+ _content_type,
+ _headers,
+ _host_index,
+ ) -> RequestSerialized:
+
+ _host = None
+
+ _collection_formats: Dict[str, str] = {
+ }
+
+ _path_params: Dict[str, str] = {}
+ _query_params: List[Tuple[str, str]] = []
+ _header_params: Dict[str, Optional[str]] = _headers or {}
+ _form_params: List[Tuple[str, str]] = []
+ _files: Dict[str, Union[str, bytes]] = {}
+ _body_params: Optional[bytes] = None
+
+ # process the path parameters
+ if project_id is not None:
+ _path_params['projectId'] = project_id
+ if campaign_template_id is not None:
+ _path_params['campaignTemplateId'] = campaign_template_id
+ # process the query parameters
+ # process the header parameters
+ # process the form parameters
+ # process the body parameter
+ if management_projects_templates_campaigns_copy_create_request_body is not None:
+ _body_params = management_projects_templates_campaigns_copy_create_request_body
+
+
+ # set the HTTP header `Accept`
+ if 'Accept' not in _header_params:
+ _header_params['Accept'] = self.api_client.select_header_accept(
+ [
+ 'application/json'
+ ]
+ )
+
+ # set the HTTP header `Content-Type`
+ if _content_type:
+ _header_params['Content-Type'] = _content_type
+ else:
+ _default_content_type = (
+ self.api_client.select_header_content_type(
+ [
+ 'application/json'
+ ]
+ )
+ )
+ if _default_content_type is not None:
+ _header_params['Content-Type'] = _default_content_type
+
+ # authentication setting
+ _auth_settings: List[str] = [
+ 'X-Management-Token',
+ 'X-Management-Id'
+ ]
+
+ return self.api_client.param_serialize(
+ method='POST',
+ resource_path='/management/v1/projects/{projectId}/templates/campaigns/{campaignTemplateId}/copy',
+ path_params=_path_params,
+ query_params=_query_params,
+ header_params=_header_params,
+ body=_body_params,
+ post_params=_form_params,
+ files=_files,
+ auth_settings=_auth_settings,
+ collection_formats=_collection_formats,
+ _host=_host,
+ _request_auth=_request_auth
+ )
+
+
+
+
+ @validate_call
+ def management_list_campaign_templates(
+ self,
+ project_id: Annotated[StrictStr, Field(description="Provide the unique identifier of the project.")],
+ limit: Annotated[Optional[Annotated[int, Field(le=100, strict=True, ge=1)]], Field(description="Limits the number of objects to be returned. The limit can range between 1 and 100 items. If no limit is set, it returns 10 items.")] = None,
+ starting_after_id: Annotated[Optional[StrictStr], Field(description="A cursor for pagination. It retrieves the campaign templates created after a template with the given ID.")] = None,
+ order: Annotated[Optional[ParameterTemplatesList], Field(description="Sorts the results using one of the filtering options, where the dash - preceding a sorting option means sorting in a descending order.")] = None,
+ include_total: Annotated[Optional[StrictBool], Field(description="If set to true, the response returns the number of all campaign templates, regardless of the applied filters or limits. Set to false by default.")] = None,
+ filters: Annotated[Optional[ParameterFiltersListTemplates], Field(description="Filters for listing templates.")] = None,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> ManagementProjectsTemplatesCampaignsListResponseBody:
+ """List Campaign Templates
+
+ Lists all campaign templates available in the project. 👍 List Campaign Templates This endpoint works in the same way as the List Campaign Templates endpoint. 📘 Campaign Templates – Documentation Read the [Campaign Templates documentation](https://support.voucherify.io/article/620-campaign-templates) to learn more about this feature.
+
+ :param project_id: Provide the unique identifier of the project. (required)
+ :type project_id: str
+ :param limit: Limits the number of objects to be returned. The limit can range between 1 and 100 items. If no limit is set, it returns 10 items.
+ :type limit: int
+ :param starting_after_id: A cursor for pagination. It retrieves the campaign templates created after a template with the given ID.
+ :type starting_after_id: str
+ :param order: Sorts the results using one of the filtering options, where the dash - preceding a sorting option means sorting in a descending order.
+ :type order: ParameterTemplatesList
+ :param include_total: If set to true, the response returns the number of all campaign templates, regardless of the applied filters or limits. Set to false by default.
+ :type include_total: bool
+ :param filters: Filters for listing templates.
+ :type filters: ParameterFiltersListTemplates
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._management_list_campaign_templates_serialize(
+ project_id=project_id,
+ limit=limit,
+ starting_after_id=starting_after_id,
+ order=order,
+ include_total=include_total,
+ filters=filters,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '2XX': "ManagementProjectsTemplatesCampaignsListResponseBody",
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ ).data
+
+
+ @validate_call
+ def management_list_campaign_templates_with_http_info(
+ self,
+ project_id: Annotated[StrictStr, Field(description="Provide the unique identifier of the project.")],
+ limit: Annotated[Optional[Annotated[int, Field(le=100, strict=True, ge=1)]], Field(description="Limits the number of objects to be returned. The limit can range between 1 and 100 items. If no limit is set, it returns 10 items.")] = None,
+ starting_after_id: Annotated[Optional[StrictStr], Field(description="A cursor for pagination. It retrieves the campaign templates created after a template with the given ID.")] = None,
+ order: Annotated[Optional[ParameterTemplatesList], Field(description="Sorts the results using one of the filtering options, where the dash - preceding a sorting option means sorting in a descending order.")] = None,
+ include_total: Annotated[Optional[StrictBool], Field(description="If set to true, the response returns the number of all campaign templates, regardless of the applied filters or limits. Set to false by default.")] = None,
+ filters: Annotated[Optional[ParameterFiltersListTemplates], Field(description="Filters for listing templates.")] = None,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> ApiResponse[ManagementProjectsTemplatesCampaignsListResponseBody]:
+ """List Campaign Templates
+
+ Lists all campaign templates available in the project. 👍 List Campaign Templates This endpoint works in the same way as the List Campaign Templates endpoint. 📘 Campaign Templates – Documentation Read the [Campaign Templates documentation](https://support.voucherify.io/article/620-campaign-templates) to learn more about this feature.
+
+ :param project_id: Provide the unique identifier of the project. (required)
+ :type project_id: str
+ :param limit: Limits the number of objects to be returned. The limit can range between 1 and 100 items. If no limit is set, it returns 10 items.
+ :type limit: int
+ :param starting_after_id: A cursor for pagination. It retrieves the campaign templates created after a template with the given ID.
+ :type starting_after_id: str
+ :param order: Sorts the results using one of the filtering options, where the dash - preceding a sorting option means sorting in a descending order.
+ :type order: ParameterTemplatesList
+ :param include_total: If set to true, the response returns the number of all campaign templates, regardless of the applied filters or limits. Set to false by default.
+ :type include_total: bool
+ :param filters: Filters for listing templates.
+ :type filters: ParameterFiltersListTemplates
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._management_list_campaign_templates_serialize(
+ project_id=project_id,
+ limit=limit,
+ starting_after_id=starting_after_id,
+ order=order,
+ include_total=include_total,
+ filters=filters,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '2XX': "ManagementProjectsTemplatesCampaignsListResponseBody",
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ )
+
+
+ @validate_call
+ def management_list_campaign_templates_without_preload_content(
+ self,
+ project_id: Annotated[StrictStr, Field(description="Provide the unique identifier of the project.")],
+ limit: Annotated[Optional[Annotated[int, Field(le=100, strict=True, ge=1)]], Field(description="Limits the number of objects to be returned. The limit can range between 1 and 100 items. If no limit is set, it returns 10 items.")] = None,
+ starting_after_id: Annotated[Optional[StrictStr], Field(description="A cursor for pagination. It retrieves the campaign templates created after a template with the given ID.")] = None,
+ order: Annotated[Optional[ParameterTemplatesList], Field(description="Sorts the results using one of the filtering options, where the dash - preceding a sorting option means sorting in a descending order.")] = None,
+ include_total: Annotated[Optional[StrictBool], Field(description="If set to true, the response returns the number of all campaign templates, regardless of the applied filters or limits. Set to false by default.")] = None,
+ filters: Annotated[Optional[ParameterFiltersListTemplates], Field(description="Filters for listing templates.")] = None,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> RESTResponseType:
+ """List Campaign Templates
+
+ Lists all campaign templates available in the project. 👍 List Campaign Templates This endpoint works in the same way as the List Campaign Templates endpoint. 📘 Campaign Templates – Documentation Read the [Campaign Templates documentation](https://support.voucherify.io/article/620-campaign-templates) to learn more about this feature.
+
+ :param project_id: Provide the unique identifier of the project. (required)
+ :type project_id: str
+ :param limit: Limits the number of objects to be returned. The limit can range between 1 and 100 items. If no limit is set, it returns 10 items.
+ :type limit: int
+ :param starting_after_id: A cursor for pagination. It retrieves the campaign templates created after a template with the given ID.
+ :type starting_after_id: str
+ :param order: Sorts the results using one of the filtering options, where the dash - preceding a sorting option means sorting in a descending order.
+ :type order: ParameterTemplatesList
+ :param include_total: If set to true, the response returns the number of all campaign templates, regardless of the applied filters or limits. Set to false by default.
+ :type include_total: bool
+ :param filters: Filters for listing templates.
+ :type filters: ParameterFiltersListTemplates
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._management_list_campaign_templates_serialize(
+ project_id=project_id,
+ limit=limit,
+ starting_after_id=starting_after_id,
+ order=order,
+ include_total=include_total,
+ filters=filters,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '2XX': "ManagementProjectsTemplatesCampaignsListResponseBody",
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+
+ def _management_list_campaign_templates_serialize(
+ self,
+ project_id,
+ limit,
+ starting_after_id,
+ order,
+ include_total,
+ filters,
+ _request_auth,
+ _content_type,
+ _headers,
+ _host_index,
+ ) -> RequestSerialized:
+
+ _host = None
+
+ _collection_formats: Dict[str, str] = {
+ }
+
+ _path_params: Dict[str, str] = {}
+ _query_params: List[Tuple[str, str]] = []
+ _header_params: Dict[str, Optional[str]] = _headers or {}
+ _form_params: List[Tuple[str, str]] = []
+ _files: Dict[str, Union[str, bytes]] = {}
+ _body_params: Optional[bytes] = None
+
+ # process the path parameters
+ if project_id is not None:
+ _path_params['projectId'] = project_id
+ # process the query parameters
+ if limit is not None:
+
+ _query_params.append(('limit', limit))
+
+ if starting_after_id is not None:
+
+ _query_params.append(('starting_after_id', starting_after_id))
+
+ if order is not None:
+
+ _query_params.append(('order', order.value))
+
+ if include_total is not None:
+
+ _query_params.append(('include_total', include_total))
+
+ if filters is not None:
+
+ _query_params.append(('filters', filters))
+
+ # process the header parameters
+ # process the form parameters
+ # process the body parameter
+
+
+ # set the HTTP header `Accept`
+ if 'Accept' not in _header_params:
+ _header_params['Accept'] = self.api_client.select_header_accept(
+ [
+ 'application/json'
+ ]
+ )
+
+
+ # authentication setting
+ _auth_settings: List[str] = [
+ 'X-Management-Token',
+ 'X-Management-Id'
+ ]
+
+ return self.api_client.param_serialize(
+ method='GET',
+ resource_path='/management/v1/projects/{projectId}/templates/campaigns',
+ path_params=_path_params,
+ query_params=_query_params,
+ header_params=_header_params,
+ body=_body_params,
+ post_params=_form_params,
+ files=_files,
+ auth_settings=_auth_settings,
+ collection_formats=_collection_formats,
+ _host=_host,
+ _request_auth=_request_auth
+ )
+
+
+
+
+ @validate_call
+ def unassign_user(
+ self,
+ project_id: Annotated[StrictStr, Field(description="Provide the unique identifier of the project.")],
+ user_id: Annotated[StrictStr, Field(description="Provide the unique identifier of the user. Alternatively, provide the users login.")],
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> None:
+ """Unassign User
+
+ Unassigns the user from the project. If the user is currently logged in, they are automatically logged out. If the user is assigned to only one project, they cannot be unassigned from that project.
+
+ :param project_id: Provide the unique identifier of the project. (required)
+ :type project_id: str
+ :param user_id: Provide the unique identifier of the user. Alternatively, provide the users login. (required)
+ :type user_id: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._unassign_user_serialize(
+ project_id=project_id,
+ user_id=user_id,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '2XX': None,
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ ).data
+
+
+ @validate_call
+ def unassign_user_with_http_info(
+ self,
+ project_id: Annotated[StrictStr, Field(description="Provide the unique identifier of the project.")],
+ user_id: Annotated[StrictStr, Field(description="Provide the unique identifier of the user. Alternatively, provide the users login.")],
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> ApiResponse[None]:
+ """Unassign User
+
+ Unassigns the user from the project. If the user is currently logged in, they are automatically logged out. If the user is assigned to only one project, they cannot be unassigned from that project.
+
+ :param project_id: Provide the unique identifier of the project. (required)
+ :type project_id: str
+ :param user_id: Provide the unique identifier of the user. Alternatively, provide the users login. (required)
+ :type user_id: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._unassign_user_serialize(
+ project_id=project_id,
+ user_id=user_id,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '2XX': None,
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ )
+
+
+ @validate_call
+ def unassign_user_without_preload_content(
+ self,
+ project_id: Annotated[StrictStr, Field(description="Provide the unique identifier of the project.")],
+ user_id: Annotated[StrictStr, Field(description="Provide the unique identifier of the user. Alternatively, provide the users login.")],
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> RESTResponseType:
+ """Unassign User
+
+ Unassigns the user from the project. If the user is currently logged in, they are automatically logged out. If the user is assigned to only one project, they cannot be unassigned from that project.
+
+ :param project_id: Provide the unique identifier of the project. (required)
+ :type project_id: str
+ :param user_id: Provide the unique identifier of the user. Alternatively, provide the users login. (required)
+ :type user_id: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._unassign_user_serialize(
+ project_id=project_id,
+ user_id=user_id,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '2XX': None,
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+
+ def _unassign_user_serialize(
+ self,
+ project_id,
+ user_id,
+ _request_auth,
+ _content_type,
+ _headers,
+ _host_index,
+ ) -> RequestSerialized:
+
+ _host = None
+
+ _collection_formats: Dict[str, str] = {
+ }
+
+ _path_params: Dict[str, str] = {}
+ _query_params: List[Tuple[str, str]] = []
+ _header_params: Dict[str, Optional[str]] = _headers or {}
+ _form_params: List[Tuple[str, str]] = []
+ _files: Dict[str, Union[str, bytes]] = {}
+ _body_params: Optional[bytes] = None
+
+ # process the path parameters
+ if project_id is not None:
+ _path_params['projectId'] = project_id
+ if user_id is not None:
+ _path_params['userId'] = user_id
+ # process the query parameters
+ # process the header parameters
+ # process the form parameters
+ # process the body parameter
+
+
+
+
+ # authentication setting
+ _auth_settings: List[str] = [
+ 'X-Management-Token',
+ 'X-Management-Id'
+ ]
+
+ return self.api_client.param_serialize(
+ method='DELETE',
+ resource_path='/management/v1/projects/{projectId}/users/{userId}',
+ path_params=_path_params,
+ query_params=_query_params,
+ header_params=_header_params,
+ body=_body_params,
+ post_params=_form_params,
+ files=_files,
+ auth_settings=_auth_settings,
+ collection_formats=_collection_formats,
+ _host=_host,
+ _request_auth=_request_auth
+ )
+
+
+
+
+ @validate_call
+ def update_brand(
+ self,
+ project_id: Annotated[StrictStr, Field(description="Provide the unique identifier of the project.")],
+ branding_id: Annotated[StrictStr, Field(description="Provide the unique identifier of the brand configuration.")],
+ management_projects_branding_update_request_body: Annotated[Optional[ManagementProjectsBrandingUpdateRequestBody], Field(description="Defines the brand configuration to be updated.")] = None,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> ManagementProjectsBrandingUpdateResponseBody:
+ """Update Brand
+
+ Updates a brand configuration. Only the fields sent in the request will be updated. The fields omitted in the request will remain unchanged. 📘 White Labelling The white labelling settings which can be found in Project Settings > Brand Details and which are available only for Enterprise clients as a separate service can be configured only in the user interface.
+
+ :param project_id: Provide the unique identifier of the project. (required)
+ :type project_id: str
+ :param branding_id: Provide the unique identifier of the brand configuration. (required)
+ :type branding_id: str
+ :param management_projects_branding_update_request_body: Defines the brand configuration to be updated.
+ :type management_projects_branding_update_request_body: ManagementProjectsBrandingUpdateRequestBody
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._update_brand_serialize(
+ project_id=project_id,
+ branding_id=branding_id,
+ management_projects_branding_update_request_body=management_projects_branding_update_request_body,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '2XX': "ManagementProjectsBrandingUpdateResponseBody",
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ ).data
+
+
+ @validate_call
+ def update_brand_with_http_info(
+ self,
+ project_id: Annotated[StrictStr, Field(description="Provide the unique identifier of the project.")],
+ branding_id: Annotated[StrictStr, Field(description="Provide the unique identifier of the brand configuration.")],
+ management_projects_branding_update_request_body: Annotated[Optional[ManagementProjectsBrandingUpdateRequestBody], Field(description="Defines the brand configuration to be updated.")] = None,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> ApiResponse[ManagementProjectsBrandingUpdateResponseBody]:
+ """Update Brand
+
+ Updates a brand configuration. Only the fields sent in the request will be updated. The fields omitted in the request will remain unchanged. 📘 White Labelling The white labelling settings which can be found in Project Settings > Brand Details and which are available only for Enterprise clients as a separate service can be configured only in the user interface.
+
+ :param project_id: Provide the unique identifier of the project. (required)
+ :type project_id: str
+ :param branding_id: Provide the unique identifier of the brand configuration. (required)
+ :type branding_id: str
+ :param management_projects_branding_update_request_body: Defines the brand configuration to be updated.
+ :type management_projects_branding_update_request_body: ManagementProjectsBrandingUpdateRequestBody
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._update_brand_serialize(
+ project_id=project_id,
+ branding_id=branding_id,
+ management_projects_branding_update_request_body=management_projects_branding_update_request_body,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '2XX': "ManagementProjectsBrandingUpdateResponseBody",
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ )
+
+
+ @validate_call
+ def update_brand_without_preload_content(
+ self,
+ project_id: Annotated[StrictStr, Field(description="Provide the unique identifier of the project.")],
+ branding_id: Annotated[StrictStr, Field(description="Provide the unique identifier of the brand configuration.")],
+ management_projects_branding_update_request_body: Annotated[Optional[ManagementProjectsBrandingUpdateRequestBody], Field(description="Defines the brand configuration to be updated.")] = None,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> RESTResponseType:
+ """Update Brand
+
+ Updates a brand configuration. Only the fields sent in the request will be updated. The fields omitted in the request will remain unchanged. 📘 White Labelling The white labelling settings which can be found in Project Settings > Brand Details and which are available only for Enterprise clients as a separate service can be configured only in the user interface.
+
+ :param project_id: Provide the unique identifier of the project. (required)
+ :type project_id: str
+ :param branding_id: Provide the unique identifier of the brand configuration. (required)
+ :type branding_id: str
+ :param management_projects_branding_update_request_body: Defines the brand configuration to be updated.
+ :type management_projects_branding_update_request_body: ManagementProjectsBrandingUpdateRequestBody
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._update_brand_serialize(
+ project_id=project_id,
+ branding_id=branding_id,
+ management_projects_branding_update_request_body=management_projects_branding_update_request_body,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '2XX': "ManagementProjectsBrandingUpdateResponseBody",
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+
+ def _update_brand_serialize(
+ self,
+ project_id,
+ branding_id,
+ management_projects_branding_update_request_body,
+ _request_auth,
+ _content_type,
+ _headers,
+ _host_index,
+ ) -> RequestSerialized:
+
+ _host = None
+
+ _collection_formats: Dict[str, str] = {
+ }
+
+ _path_params: Dict[str, str] = {}
+ _query_params: List[Tuple[str, str]] = []
+ _header_params: Dict[str, Optional[str]] = _headers or {}
+ _form_params: List[Tuple[str, str]] = []
+ _files: Dict[str, Union[str, bytes]] = {}
+ _body_params: Optional[bytes] = None
+
+ # process the path parameters
+ if project_id is not None:
+ _path_params['projectId'] = project_id
+ if branding_id is not None:
+ _path_params['brandingId'] = branding_id
+ # process the query parameters
+ # process the header parameters
+ # process the form parameters
+ # process the body parameter
+ if management_projects_branding_update_request_body is not None:
+ _body_params = management_projects_branding_update_request_body
+
+
+ # set the HTTP header `Accept`
+ if 'Accept' not in _header_params:
+ _header_params['Accept'] = self.api_client.select_header_accept(
+ [
+ 'application/json'
+ ]
+ )
+
+ # set the HTTP header `Content-Type`
+ if _content_type:
+ _header_params['Content-Type'] = _content_type
+ else:
+ _default_content_type = (
+ self.api_client.select_header_content_type(
+ [
+ 'application/json'
+ ]
+ )
+ )
+ if _default_content_type is not None:
+ _header_params['Content-Type'] = _default_content_type
+
+ # authentication setting
+ _auth_settings: List[str] = [
+ 'X-Management-Token',
+ 'X-Management-Id'
+ ]
+
+ return self.api_client.param_serialize(
+ method='PUT',
+ resource_path='/management/v1/projects/{projectId}/branding/{brandingId}',
+ path_params=_path_params,
+ query_params=_query_params,
+ header_params=_header_params,
+ body=_body_params,
+ post_params=_form_params,
+ files=_files,
+ auth_settings=_auth_settings,
+ collection_formats=_collection_formats,
+ _host=_host,
+ _request_auth=_request_auth
+ )
+
+
+
+
+ @validate_call
+ def update_custom_event_schema(
+ self,
+ project_id: Annotated[StrictStr, Field(description="Provide the unique identifier of the project.")],
+ custom_event_schema_id: Annotated[StrictStr, Field(description="Provide the unique identifier of the custom event schema.")],
+ management_projects_custom_event_schemas_update_request_body: Annotated[Optional[ManagementProjectsCustomEventSchemasUpdateRequestBody], Field(description="Defines the custom event schema to be updated.")] = None,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> ManagementProjectsCustomEventSchemasUpdateResponseBody:
+ """Update Custom Event Schema
+
+ Updates a custom event schema. With this request, you can: - Add a non-existing property to a custom event schema. - Update an existing property. In the request, you can provide only those properties you want to add or update. Definitions omitted in the request remain unchanged. 👍 Additional Notes - You can change the type of an existing property, e.g. from string to number. - You can remove a custom property with this endpoint by providing deleted: true in the request. However, you cannot permanently remove an event definition or its property with this endpoint. 📘 Custom Event Documentation Read [Custom Events](https://support.voucherify.io/article/111-custom-events) article to learn how custom events work in Voucherify. Read also the details about the Track Custom Event endpoint and the Custom Event Object.
+
+ :param project_id: Provide the unique identifier of the project. (required)
+ :type project_id: str
+ :param custom_event_schema_id: Provide the unique identifier of the custom event schema. (required)
+ :type custom_event_schema_id: str
+ :param management_projects_custom_event_schemas_update_request_body: Defines the custom event schema to be updated.
+ :type management_projects_custom_event_schemas_update_request_body: ManagementProjectsCustomEventSchemasUpdateRequestBody
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._update_custom_event_schema_serialize(
+ project_id=project_id,
+ custom_event_schema_id=custom_event_schema_id,
+ management_projects_custom_event_schemas_update_request_body=management_projects_custom_event_schemas_update_request_body,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '2XX': "ManagementProjectsCustomEventSchemasUpdateResponseBody",
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ ).data
+
+
+ @validate_call
+ def update_custom_event_schema_with_http_info(
+ self,
+ project_id: Annotated[StrictStr, Field(description="Provide the unique identifier of the project.")],
+ custom_event_schema_id: Annotated[StrictStr, Field(description="Provide the unique identifier of the custom event schema.")],
+ management_projects_custom_event_schemas_update_request_body: Annotated[Optional[ManagementProjectsCustomEventSchemasUpdateRequestBody], Field(description="Defines the custom event schema to be updated.")] = None,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> ApiResponse[ManagementProjectsCustomEventSchemasUpdateResponseBody]:
+ """Update Custom Event Schema
+
+ Updates a custom event schema. With this request, you can: - Add a non-existing property to a custom event schema. - Update an existing property. In the request, you can provide only those properties you want to add or update. Definitions omitted in the request remain unchanged. 👍 Additional Notes - You can change the type of an existing property, e.g. from string to number. - You can remove a custom property with this endpoint by providing deleted: true in the request. However, you cannot permanently remove an event definition or its property with this endpoint. 📘 Custom Event Documentation Read [Custom Events](https://support.voucherify.io/article/111-custom-events) article to learn how custom events work in Voucherify. Read also the details about the Track Custom Event endpoint and the Custom Event Object.
+
+ :param project_id: Provide the unique identifier of the project. (required)
+ :type project_id: str
+ :param custom_event_schema_id: Provide the unique identifier of the custom event schema. (required)
+ :type custom_event_schema_id: str
+ :param management_projects_custom_event_schemas_update_request_body: Defines the custom event schema to be updated.
+ :type management_projects_custom_event_schemas_update_request_body: ManagementProjectsCustomEventSchemasUpdateRequestBody
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._update_custom_event_schema_serialize(
+ project_id=project_id,
+ custom_event_schema_id=custom_event_schema_id,
+ management_projects_custom_event_schemas_update_request_body=management_projects_custom_event_schemas_update_request_body,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '2XX': "ManagementProjectsCustomEventSchemasUpdateResponseBody",
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ )
+
+
+ @validate_call
+ def update_custom_event_schema_without_preload_content(
+ self,
+ project_id: Annotated[StrictStr, Field(description="Provide the unique identifier of the project.")],
+ custom_event_schema_id: Annotated[StrictStr, Field(description="Provide the unique identifier of the custom event schema.")],
+ management_projects_custom_event_schemas_update_request_body: Annotated[Optional[ManagementProjectsCustomEventSchemasUpdateRequestBody], Field(description="Defines the custom event schema to be updated.")] = None,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> RESTResponseType:
+ """Update Custom Event Schema
+
+ Updates a custom event schema. With this request, you can: - Add a non-existing property to a custom event schema. - Update an existing property. In the request, you can provide only those properties you want to add or update. Definitions omitted in the request remain unchanged. 👍 Additional Notes - You can change the type of an existing property, e.g. from string to number. - You can remove a custom property with this endpoint by providing deleted: true in the request. However, you cannot permanently remove an event definition or its property with this endpoint. 📘 Custom Event Documentation Read [Custom Events](https://support.voucherify.io/article/111-custom-events) article to learn how custom events work in Voucherify. Read also the details about the Track Custom Event endpoint and the Custom Event Object.
+
+ :param project_id: Provide the unique identifier of the project. (required)
+ :type project_id: str
+ :param custom_event_schema_id: Provide the unique identifier of the custom event schema. (required)
+ :type custom_event_schema_id: str
+ :param management_projects_custom_event_schemas_update_request_body: Defines the custom event schema to be updated.
+ :type management_projects_custom_event_schemas_update_request_body: ManagementProjectsCustomEventSchemasUpdateRequestBody
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._update_custom_event_schema_serialize(
+ project_id=project_id,
+ custom_event_schema_id=custom_event_schema_id,
+ management_projects_custom_event_schemas_update_request_body=management_projects_custom_event_schemas_update_request_body,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '2XX': "ManagementProjectsCustomEventSchemasUpdateResponseBody",
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+
+ def _update_custom_event_schema_serialize(
+ self,
+ project_id,
+ custom_event_schema_id,
+ management_projects_custom_event_schemas_update_request_body,
+ _request_auth,
+ _content_type,
+ _headers,
+ _host_index,
+ ) -> RequestSerialized:
+
+ _host = None
+
+ _collection_formats: Dict[str, str] = {
+ }
+
+ _path_params: Dict[str, str] = {}
+ _query_params: List[Tuple[str, str]] = []
+ _header_params: Dict[str, Optional[str]] = _headers or {}
+ _form_params: List[Tuple[str, str]] = []
+ _files: Dict[str, Union[str, bytes]] = {}
+ _body_params: Optional[bytes] = None
+
+ # process the path parameters
+ if project_id is not None:
+ _path_params['projectId'] = project_id
+ if custom_event_schema_id is not None:
+ _path_params['customEventSchemaId'] = custom_event_schema_id
+ # process the query parameters
+ # process the header parameters
+ # process the form parameters
+ # process the body parameter
+ if management_projects_custom_event_schemas_update_request_body is not None:
+ _body_params = management_projects_custom_event_schemas_update_request_body
+
+
+ # set the HTTP header `Accept`
+ if 'Accept' not in _header_params:
+ _header_params['Accept'] = self.api_client.select_header_accept(
+ [
+ 'application/json'
+ ]
+ )
+
+ # set the HTTP header `Content-Type`
+ if _content_type:
+ _header_params['Content-Type'] = _content_type
+ else:
+ _default_content_type = (
+ self.api_client.select_header_content_type(
+ [
+ 'application/json'
+ ]
+ )
+ )
+ if _default_content_type is not None:
+ _header_params['Content-Type'] = _default_content_type
+
+ # authentication setting
+ _auth_settings: List[str] = [
+ 'X-Management-Token',
+ 'X-Management-Id'
+ ]
+
+ return self.api_client.param_serialize(
+ method='PUT',
+ resource_path='/management/v1/projects/{projectId}/custom-event-schemas/{customEventSchemaId}',
+ path_params=_path_params,
+ query_params=_query_params,
+ header_params=_header_params,
+ body=_body_params,
+ post_params=_form_params,
+ files=_files,
+ auth_settings=_auth_settings,
+ collection_formats=_collection_formats,
+ _host=_host,
+ _request_auth=_request_auth
+ )
+
+
+
+
+ @validate_call
+ def update_metadata_schema(
+ self,
+ project_id: Annotated[StrictStr, Field(description="Provide the unique identifier of the project.")],
+ metadata_schema_id: Annotated[StrictStr, Field(description="Provide the unique identifier of the metadata schema.")],
+ management_projects_metadata_schemas_update_request_body: Annotated[Optional[ManagementProjectsMetadataSchemasUpdateRequestBody], Field(description="Defines the metadata schema to be updated.")] = None,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> ManagementProjectsMetadataSchemasUpdateResponseBody:
+ """Update Metadata Schema
+
+ Updates a metadata schema. With this request, you can: - Add a non-existing attribute definition to the metadata schema. - Update an existing attribute definition by overwriting its current values. In the request, you can provide only those definitions you want to add or update. Definitions omitted in the request remain unchanged. However, if you want to update a definition, you will have to add all its current key-value pairs as well. Only the pairs sent in the request are saved for this definition. This means that the key-value pairs that are not sent in a request are restored to default values. For example, if your definition has an array with values and it is not sent in an update request, the array values will be deleted. 👍 Additional Notes - You cannot change the type of an existing schema, e.g. from string to number. - You can remove a definition with this endpoint by providing deleted: true in the request. It will be moved to the Removed definitions section in the user interface. However, you cannot permanently remove a definition with this endpoint. 📘 Metadata Documentation Read the Getting Started with Metadata articles to learn how metadata work in Voucherify.
+
+ :param project_id: Provide the unique identifier of the project. (required)
+ :type project_id: str
+ :param metadata_schema_id: Provide the unique identifier of the metadata schema. (required)
+ :type metadata_schema_id: str
+ :param management_projects_metadata_schemas_update_request_body: Defines the metadata schema to be updated.
+ :type management_projects_metadata_schemas_update_request_body: ManagementProjectsMetadataSchemasUpdateRequestBody
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._update_metadata_schema_serialize(
+ project_id=project_id,
+ metadata_schema_id=metadata_schema_id,
+ management_projects_metadata_schemas_update_request_body=management_projects_metadata_schemas_update_request_body,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '2XX': "ManagementProjectsMetadataSchemasUpdateResponseBody",
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ ).data
+
+
+ @validate_call
+ def update_metadata_schema_with_http_info(
+ self,
+ project_id: Annotated[StrictStr, Field(description="Provide the unique identifier of the project.")],
+ metadata_schema_id: Annotated[StrictStr, Field(description="Provide the unique identifier of the metadata schema.")],
+ management_projects_metadata_schemas_update_request_body: Annotated[Optional[ManagementProjectsMetadataSchemasUpdateRequestBody], Field(description="Defines the metadata schema to be updated.")] = None,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> ApiResponse[ManagementProjectsMetadataSchemasUpdateResponseBody]:
+ """Update Metadata Schema
+
+ Updates a metadata schema. With this request, you can: - Add a non-existing attribute definition to the metadata schema. - Update an existing attribute definition by overwriting its current values. In the request, you can provide only those definitions you want to add or update. Definitions omitted in the request remain unchanged. However, if you want to update a definition, you will have to add all its current key-value pairs as well. Only the pairs sent in the request are saved for this definition. This means that the key-value pairs that are not sent in a request are restored to default values. For example, if your definition has an array with values and it is not sent in an update request, the array values will be deleted. 👍 Additional Notes - You cannot change the type of an existing schema, e.g. from string to number. - You can remove a definition with this endpoint by providing deleted: true in the request. It will be moved to the Removed definitions section in the user interface. However, you cannot permanently remove a definition with this endpoint. 📘 Metadata Documentation Read the Getting Started with Metadata articles to learn how metadata work in Voucherify.
+
+ :param project_id: Provide the unique identifier of the project. (required)
+ :type project_id: str
+ :param metadata_schema_id: Provide the unique identifier of the metadata schema. (required)
+ :type metadata_schema_id: str
+ :param management_projects_metadata_schemas_update_request_body: Defines the metadata schema to be updated.
+ :type management_projects_metadata_schemas_update_request_body: ManagementProjectsMetadataSchemasUpdateRequestBody
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._update_metadata_schema_serialize(
+ project_id=project_id,
+ metadata_schema_id=metadata_schema_id,
+ management_projects_metadata_schemas_update_request_body=management_projects_metadata_schemas_update_request_body,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '2XX': "ManagementProjectsMetadataSchemasUpdateResponseBody",
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ )
+
+
+ @validate_call
+ def update_metadata_schema_without_preload_content(
+ self,
+ project_id: Annotated[StrictStr, Field(description="Provide the unique identifier of the project.")],
+ metadata_schema_id: Annotated[StrictStr, Field(description="Provide the unique identifier of the metadata schema.")],
+ management_projects_metadata_schemas_update_request_body: Annotated[Optional[ManagementProjectsMetadataSchemasUpdateRequestBody], Field(description="Defines the metadata schema to be updated.")] = None,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> RESTResponseType:
+ """Update Metadata Schema
+
+ Updates a metadata schema. With this request, you can: - Add a non-existing attribute definition to the metadata schema. - Update an existing attribute definition by overwriting its current values. In the request, you can provide only those definitions you want to add or update. Definitions omitted in the request remain unchanged. However, if you want to update a definition, you will have to add all its current key-value pairs as well. Only the pairs sent in the request are saved for this definition. This means that the key-value pairs that are not sent in a request are restored to default values. For example, if your definition has an array with values and it is not sent in an update request, the array values will be deleted. 👍 Additional Notes - You cannot change the type of an existing schema, e.g. from string to number. - You can remove a definition with this endpoint by providing deleted: true in the request. It will be moved to the Removed definitions section in the user interface. However, you cannot permanently remove a definition with this endpoint. 📘 Metadata Documentation Read the Getting Started with Metadata articles to learn how metadata work in Voucherify.
+
+ :param project_id: Provide the unique identifier of the project. (required)
+ :type project_id: str
+ :param metadata_schema_id: Provide the unique identifier of the metadata schema. (required)
+ :type metadata_schema_id: str
+ :param management_projects_metadata_schemas_update_request_body: Defines the metadata schema to be updated.
+ :type management_projects_metadata_schemas_update_request_body: ManagementProjectsMetadataSchemasUpdateRequestBody
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._update_metadata_schema_serialize(
+ project_id=project_id,
+ metadata_schema_id=metadata_schema_id,
+ management_projects_metadata_schemas_update_request_body=management_projects_metadata_schemas_update_request_body,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '2XX': "ManagementProjectsMetadataSchemasUpdateResponseBody",
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+
+ def _update_metadata_schema_serialize(
+ self,
+ project_id,
+ metadata_schema_id,
+ management_projects_metadata_schemas_update_request_body,
+ _request_auth,
+ _content_type,
+ _headers,
+ _host_index,
+ ) -> RequestSerialized:
+
+ _host = None
+
+ _collection_formats: Dict[str, str] = {
+ }
+
+ _path_params: Dict[str, str] = {}
+ _query_params: List[Tuple[str, str]] = []
+ _header_params: Dict[str, Optional[str]] = _headers or {}
+ _form_params: List[Tuple[str, str]] = []
+ _files: Dict[str, Union[str, bytes]] = {}
+ _body_params: Optional[bytes] = None
+
+ # process the path parameters
+ if project_id is not None:
+ _path_params['projectId'] = project_id
+ if metadata_schema_id is not None:
+ _path_params['metadataSchemaId'] = metadata_schema_id
+ # process the query parameters
+ # process the header parameters
+ # process the form parameters
+ # process the body parameter
+ if management_projects_metadata_schemas_update_request_body is not None:
+ _body_params = management_projects_metadata_schemas_update_request_body
+
+
+ # set the HTTP header `Accept`
+ if 'Accept' not in _header_params:
+ _header_params['Accept'] = self.api_client.select_header_accept(
+ [
+ 'application/json'
+ ]
+ )
+
+ # set the HTTP header `Content-Type`
+ if _content_type:
+ _header_params['Content-Type'] = _content_type
+ else:
+ _default_content_type = (
+ self.api_client.select_header_content_type(
+ [
+ 'application/json'
+ ]
+ )
+ )
+ if _default_content_type is not None:
+ _header_params['Content-Type'] = _default_content_type
+
+ # authentication setting
+ _auth_settings: List[str] = [
+ 'X-Management-Token',
+ 'X-Management-Id'
+ ]
+
+ return self.api_client.param_serialize(
+ method='PUT',
+ resource_path='/management/v1/projects/{projectId}/metadata-schemas/{metadataSchemaId}',
+ path_params=_path_params,
+ query_params=_query_params,
+ header_params=_header_params,
+ body=_body_params,
+ post_params=_form_params,
+ files=_files,
+ auth_settings=_auth_settings,
+ collection_formats=_collection_formats,
+ _host=_host,
+ _request_auth=_request_auth
+ )
+
+
+
+
+ @validate_call
+ def update_project(
+ self,
+ project_id: Annotated[StrictStr, Field(description="Provide the unique identifier of the project.")],
+ management_projects_update_request_body: Annotated[Optional[ManagementProjectsUpdateRequestBody], Field(description="Define the project details to be updated.")] = None,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> ManagementProjectsUpdateResponseBody:
+ """Update Project
+
+ Updates an existing project. You can add or modify settings for timezone, currency, notifications, and other details. Only the fields sent in the request will be updated.
+
+ :param project_id: Provide the unique identifier of the project. (required)
+ :type project_id: str
+ :param management_projects_update_request_body: Define the project details to be updated.
+ :type management_projects_update_request_body: ManagementProjectsUpdateRequestBody
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._update_project_serialize(
+ project_id=project_id,
+ management_projects_update_request_body=management_projects_update_request_body,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '2XX': "ManagementProjectsUpdateResponseBody",
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ ).data
+
+
+ @validate_call
+ def update_project_with_http_info(
+ self,
+ project_id: Annotated[StrictStr, Field(description="Provide the unique identifier of the project.")],
+ management_projects_update_request_body: Annotated[Optional[ManagementProjectsUpdateRequestBody], Field(description="Define the project details to be updated.")] = None,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> ApiResponse[ManagementProjectsUpdateResponseBody]:
+ """Update Project
+
+ Updates an existing project. You can add or modify settings for timezone, currency, notifications, and other details. Only the fields sent in the request will be updated.
+
+ :param project_id: Provide the unique identifier of the project. (required)
+ :type project_id: str
+ :param management_projects_update_request_body: Define the project details to be updated.
+ :type management_projects_update_request_body: ManagementProjectsUpdateRequestBody
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._update_project_serialize(
+ project_id=project_id,
+ management_projects_update_request_body=management_projects_update_request_body,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '2XX': "ManagementProjectsUpdateResponseBody",
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ )
+
+
+ @validate_call
+ def update_project_without_preload_content(
+ self,
+ project_id: Annotated[StrictStr, Field(description="Provide the unique identifier of the project.")],
+ management_projects_update_request_body: Annotated[Optional[ManagementProjectsUpdateRequestBody], Field(description="Define the project details to be updated.")] = None,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> RESTResponseType:
+ """Update Project
+
+ Updates an existing project. You can add or modify settings for timezone, currency, notifications, and other details. Only the fields sent in the request will be updated.
+
+ :param project_id: Provide the unique identifier of the project. (required)
+ :type project_id: str
+ :param management_projects_update_request_body: Define the project details to be updated.
+ :type management_projects_update_request_body: ManagementProjectsUpdateRequestBody
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._update_project_serialize(
+ project_id=project_id,
+ management_projects_update_request_body=management_projects_update_request_body,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '2XX': "ManagementProjectsUpdateResponseBody",
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+
+ def _update_project_serialize(
+ self,
+ project_id,
+ management_projects_update_request_body,
+ _request_auth,
+ _content_type,
+ _headers,
+ _host_index,
+ ) -> RequestSerialized:
+
+ _host = None
+
+ _collection_formats: Dict[str, str] = {
+ }
+
+ _path_params: Dict[str, str] = {}
+ _query_params: List[Tuple[str, str]] = []
+ _header_params: Dict[str, Optional[str]] = _headers or {}
+ _form_params: List[Tuple[str, str]] = []
+ _files: Dict[str, Union[str, bytes]] = {}
+ _body_params: Optional[bytes] = None
+
+ # process the path parameters
+ if project_id is not None:
+ _path_params['projectId'] = project_id
+ # process the query parameters
+ # process the header parameters
+ # process the form parameters
+ # process the body parameter
+ if management_projects_update_request_body is not None:
+ _body_params = management_projects_update_request_body
+
+
+ # set the HTTP header `Accept`
+ if 'Accept' not in _header_params:
+ _header_params['Accept'] = self.api_client.select_header_accept(
+ [
+ 'application/json'
+ ]
+ )
+
+ # set the HTTP header `Content-Type`
+ if _content_type:
+ _header_params['Content-Type'] = _content_type
+ else:
+ _default_content_type = (
+ self.api_client.select_header_content_type(
+ [
+ 'application/json'
+ ]
+ )
+ )
+ if _default_content_type is not None:
+ _header_params['Content-Type'] = _default_content_type
+
+ # authentication setting
+ _auth_settings: List[str] = [
+ 'X-Management-Token',
+ 'X-Management-Id'
+ ]
+
+ return self.api_client.param_serialize(
+ method='PUT',
+ resource_path='/management/v1/projects/{projectId}',
+ path_params=_path_params,
+ query_params=_query_params,
+ header_params=_header_params,
+ body=_body_params,
+ post_params=_form_params,
+ files=_files,
+ auth_settings=_auth_settings,
+ collection_formats=_collection_formats,
+ _host=_host,
+ _request_auth=_request_auth
+ )
+
+
+
+
+ @validate_call
+ def update_stacking_rules(
+ self,
+ project_id: Annotated[StrictStr, Field(description="Provide the unique identifier of the project.")],
+ stacking_rules_id: Annotated[StrictStr, Field(description="Provide the unique identifier of the stacking rules.")],
+ management_projects_stacking_rules_update_request_body: Annotated[Optional[ManagementProjectsStackingRulesUpdateRequestBody], Field(description="Defines the stacking rules to be updated.")] = None,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> ManagementProjectsStackingRulesUpdateResponseBody:
+ """Update Stacking Rules
+
+ Updates the stacking rules. Only the provided fields will be updated. However, if you update an array, the content of the array is overwritten. This means that if you want to add new values to an array and retain existing ones, you need to provide both the existing and new values in the request. 📘 Stacking Rules Documentation Read [the Stacking Rules article](https://support.voucherify.io/article/604-stacking-rules) to learn how they work.
+
+ :param project_id: Provide the unique identifier of the project. (required)
+ :type project_id: str
+ :param stacking_rules_id: Provide the unique identifier of the stacking rules. (required)
+ :type stacking_rules_id: str
+ :param management_projects_stacking_rules_update_request_body: Defines the stacking rules to be updated.
+ :type management_projects_stacking_rules_update_request_body: ManagementProjectsStackingRulesUpdateRequestBody
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._update_stacking_rules_serialize(
+ project_id=project_id,
+ stacking_rules_id=stacking_rules_id,
+ management_projects_stacking_rules_update_request_body=management_projects_stacking_rules_update_request_body,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '2XX': "ManagementProjectsStackingRulesUpdateResponseBody",
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ ).data
+
+
+ @validate_call
+ def update_stacking_rules_with_http_info(
+ self,
+ project_id: Annotated[StrictStr, Field(description="Provide the unique identifier of the project.")],
+ stacking_rules_id: Annotated[StrictStr, Field(description="Provide the unique identifier of the stacking rules.")],
+ management_projects_stacking_rules_update_request_body: Annotated[Optional[ManagementProjectsStackingRulesUpdateRequestBody], Field(description="Defines the stacking rules to be updated.")] = None,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> ApiResponse[ManagementProjectsStackingRulesUpdateResponseBody]:
+ """Update Stacking Rules
+
+ Updates the stacking rules. Only the provided fields will be updated. However, if you update an array, the content of the array is overwritten. This means that if you want to add new values to an array and retain existing ones, you need to provide both the existing and new values in the request. 📘 Stacking Rules Documentation Read [the Stacking Rules article](https://support.voucherify.io/article/604-stacking-rules) to learn how they work.
+
+ :param project_id: Provide the unique identifier of the project. (required)
+ :type project_id: str
+ :param stacking_rules_id: Provide the unique identifier of the stacking rules. (required)
+ :type stacking_rules_id: str
+ :param management_projects_stacking_rules_update_request_body: Defines the stacking rules to be updated.
+ :type management_projects_stacking_rules_update_request_body: ManagementProjectsStackingRulesUpdateRequestBody
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._update_stacking_rules_serialize(
+ project_id=project_id,
+ stacking_rules_id=stacking_rules_id,
+ management_projects_stacking_rules_update_request_body=management_projects_stacking_rules_update_request_body,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '2XX': "ManagementProjectsStackingRulesUpdateResponseBody",
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ )
+
+
+ @validate_call
+ def update_stacking_rules_without_preload_content(
+ self,
+ project_id: Annotated[StrictStr, Field(description="Provide the unique identifier of the project.")],
+ stacking_rules_id: Annotated[StrictStr, Field(description="Provide the unique identifier of the stacking rules.")],
+ management_projects_stacking_rules_update_request_body: Annotated[Optional[ManagementProjectsStackingRulesUpdateRequestBody], Field(description="Defines the stacking rules to be updated.")] = None,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> RESTResponseType:
+ """Update Stacking Rules
+
+ Updates the stacking rules. Only the provided fields will be updated. However, if you update an array, the content of the array is overwritten. This means that if you want to add new values to an array and retain existing ones, you need to provide both the existing and new values in the request. 📘 Stacking Rules Documentation Read [the Stacking Rules article](https://support.voucherify.io/article/604-stacking-rules) to learn how they work.
+
+ :param project_id: Provide the unique identifier of the project. (required)
+ :type project_id: str
+ :param stacking_rules_id: Provide the unique identifier of the stacking rules. (required)
+ :type stacking_rules_id: str
+ :param management_projects_stacking_rules_update_request_body: Defines the stacking rules to be updated.
+ :type management_projects_stacking_rules_update_request_body: ManagementProjectsStackingRulesUpdateRequestBody
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._update_stacking_rules_serialize(
+ project_id=project_id,
+ stacking_rules_id=stacking_rules_id,
+ management_projects_stacking_rules_update_request_body=management_projects_stacking_rules_update_request_body,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '2XX': "ManagementProjectsStackingRulesUpdateResponseBody",
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+
+ def _update_stacking_rules_serialize(
+ self,
+ project_id,
+ stacking_rules_id,
+ management_projects_stacking_rules_update_request_body,
+ _request_auth,
+ _content_type,
+ _headers,
+ _host_index,
+ ) -> RequestSerialized:
+
+ _host = None
+
+ _collection_formats: Dict[str, str] = {
+ }
+
+ _path_params: Dict[str, str] = {}
+ _query_params: List[Tuple[str, str]] = []
+ _header_params: Dict[str, Optional[str]] = _headers or {}
+ _form_params: List[Tuple[str, str]] = []
+ _files: Dict[str, Union[str, bytes]] = {}
+ _body_params: Optional[bytes] = None
+
+ # process the path parameters
+ if project_id is not None:
+ _path_params['projectId'] = project_id
+ if stacking_rules_id is not None:
+ _path_params['stackingRulesId'] = stacking_rules_id
+ # process the query parameters
+ # process the header parameters
+ # process the form parameters
+ # process the body parameter
+ if management_projects_stacking_rules_update_request_body is not None:
+ _body_params = management_projects_stacking_rules_update_request_body
+
+
+ # set the HTTP header `Accept`
+ if 'Accept' not in _header_params:
+ _header_params['Accept'] = self.api_client.select_header_accept(
+ [
+ 'application/json'
+ ]
+ )
+
+ # set the HTTP header `Content-Type`
+ if _content_type:
+ _header_params['Content-Type'] = _content_type
+ else:
+ _default_content_type = (
+ self.api_client.select_header_content_type(
+ [
+ 'application/json'
+ ]
+ )
+ )
+ if _default_content_type is not None:
+ _header_params['Content-Type'] = _default_content_type
+
+ # authentication setting
+ _auth_settings: List[str] = [
+ 'X-Management-Token',
+ 'X-Management-Id'
+ ]
+
+ return self.api_client.param_serialize(
+ method='PUT',
+ resource_path='/management/v1/projects/{projectId}/stacking-rules/{stackingRulesId}',
+ path_params=_path_params,
+ query_params=_query_params,
+ header_params=_header_params,
+ body=_body_params,
+ post_params=_form_params,
+ files=_files,
+ auth_settings=_auth_settings,
+ collection_formats=_collection_formats,
+ _host=_host,
+ _request_auth=_request_auth
+ )
+
+
+
+
+ @validate_call
+ def update_user(
+ self,
+ project_id: Annotated[StrictStr, Field(description="Provide the unique identifier of the project.")],
+ user_id: Annotated[StrictStr, Field(description="Provide the unique identifier of the user. Alternatively, provide the users login.")],
+ management_projects_users_update_role_request_body: Annotated[Optional[ManagementProjectsUsersUpdateRoleRequestBody], Field(description="Defines the users new role.")] = None,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> ManagementProjectsUsersUpdateRoleResponseBody:
+ """Update User
+
+ Updates the users role.
+
+ :param project_id: Provide the unique identifier of the project. (required)
+ :type project_id: str
+ :param user_id: Provide the unique identifier of the user. Alternatively, provide the users login. (required)
+ :type user_id: str
+ :param management_projects_users_update_role_request_body: Defines the users new role.
+ :type management_projects_users_update_role_request_body: ManagementProjectsUsersUpdateRoleRequestBody
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._update_user_serialize(
+ project_id=project_id,
+ user_id=user_id,
+ management_projects_users_update_role_request_body=management_projects_users_update_role_request_body,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '2XX': "ManagementProjectsUsersUpdateRoleResponseBody",
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ ).data
+
+
+ @validate_call
+ def update_user_with_http_info(
+ self,
+ project_id: Annotated[StrictStr, Field(description="Provide the unique identifier of the project.")],
+ user_id: Annotated[StrictStr, Field(description="Provide the unique identifier of the user. Alternatively, provide the users login.")],
+ management_projects_users_update_role_request_body: Annotated[Optional[ManagementProjectsUsersUpdateRoleRequestBody], Field(description="Defines the users new role.")] = None,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> ApiResponse[ManagementProjectsUsersUpdateRoleResponseBody]:
+ """Update User
+
+ Updates the users role.
+
+ :param project_id: Provide the unique identifier of the project. (required)
+ :type project_id: str
+ :param user_id: Provide the unique identifier of the user. Alternatively, provide the users login. (required)
+ :type user_id: str
+ :param management_projects_users_update_role_request_body: Defines the users new role.
+ :type management_projects_users_update_role_request_body: ManagementProjectsUsersUpdateRoleRequestBody
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._update_user_serialize(
+ project_id=project_id,
+ user_id=user_id,
+ management_projects_users_update_role_request_body=management_projects_users_update_role_request_body,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '2XX': "ManagementProjectsUsersUpdateRoleResponseBody",
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ )
+
+
+ @validate_call
+ def update_user_without_preload_content(
+ self,
+ project_id: Annotated[StrictStr, Field(description="Provide the unique identifier of the project.")],
+ user_id: Annotated[StrictStr, Field(description="Provide the unique identifier of the user. Alternatively, provide the users login.")],
+ management_projects_users_update_role_request_body: Annotated[Optional[ManagementProjectsUsersUpdateRoleRequestBody], Field(description="Defines the users new role.")] = None,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> RESTResponseType:
+ """Update User
+
+ Updates the users role.
+
+ :param project_id: Provide the unique identifier of the project. (required)
+ :type project_id: str
+ :param user_id: Provide the unique identifier of the user. Alternatively, provide the users login. (required)
+ :type user_id: str
+ :param management_projects_users_update_role_request_body: Defines the users new role.
+ :type management_projects_users_update_role_request_body: ManagementProjectsUsersUpdateRoleRequestBody
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._update_user_serialize(
+ project_id=project_id,
+ user_id=user_id,
+ management_projects_users_update_role_request_body=management_projects_users_update_role_request_body,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '2XX': "ManagementProjectsUsersUpdateRoleResponseBody",
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+
+ def _update_user_serialize(
+ self,
+ project_id,
+ user_id,
+ management_projects_users_update_role_request_body,
+ _request_auth,
+ _content_type,
+ _headers,
+ _host_index,
+ ) -> RequestSerialized:
+
+ _host = None
+
+ _collection_formats: Dict[str, str] = {
+ }
+
+ _path_params: Dict[str, str] = {}
+ _query_params: List[Tuple[str, str]] = []
+ _header_params: Dict[str, Optional[str]] = _headers or {}
+ _form_params: List[Tuple[str, str]] = []
+ _files: Dict[str, Union[str, bytes]] = {}
+ _body_params: Optional[bytes] = None
+
+ # process the path parameters
+ if project_id is not None:
+ _path_params['projectId'] = project_id
+ if user_id is not None:
+ _path_params['userId'] = user_id
+ # process the query parameters
+ # process the header parameters
+ # process the form parameters
+ # process the body parameter
+ if management_projects_users_update_role_request_body is not None:
+ _body_params = management_projects_users_update_role_request_body
+
+
+ # set the HTTP header `Accept`
+ if 'Accept' not in _header_params:
+ _header_params['Accept'] = self.api_client.select_header_accept(
+ [
+ 'application/json'
+ ]
+ )
+
+ # set the HTTP header `Content-Type`
+ if _content_type:
+ _header_params['Content-Type'] = _content_type
+ else:
+ _default_content_type = (
+ self.api_client.select_header_content_type(
+ [
+ 'application/json'
+ ]
+ )
+ )
+ if _default_content_type is not None:
+ _header_params['Content-Type'] = _default_content_type
+
+ # authentication setting
+ _auth_settings: List[str] = [
+ 'X-Management-Token',
+ 'X-Management-Id'
+ ]
+
+ return self.api_client.param_serialize(
+ method='PUT',
+ resource_path='/management/v1/projects/{projectId}/users/{userId}',
+ path_params=_path_params,
+ query_params=_query_params,
+ header_params=_header_params,
+ body=_body_params,
+ post_params=_form_params,
+ files=_files,
+ auth_settings=_auth_settings,
+ collection_formats=_collection_formats,
+ _host=_host,
+ _request_auth=_request_auth
+ )
+
+
+
+
+ @validate_call
+ def update_webhook(
+ self,
+ project_id: Annotated[StrictStr, Field(description="Provide the unique identifier of the project.")],
+ webhook_id: Annotated[StrictStr, Field(description="Provide the unique identifier of the webhook configuration.")],
+ management_projects_webhooks_update_request_body: Annotated[Optional[ManagementProjectsWebhooksUpdateRequestBody], Field(description="Defines the webhook configuration to be updated.")] = None,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> ManagementProjectsWebhooksUpdateResponseBody:
+ """Update Webhook
+
+ Updates a webhook configuration. The events listed in the request are overwritten. If you want to add more events, provide also the events that are already in the webhook configuration. 📘 Webhook Documentation Read Webhooks v2024-01-1 article to learn how webhooks work in Voucherify.
+
+ :param project_id: Provide the unique identifier of the project. (required)
+ :type project_id: str
+ :param webhook_id: Provide the unique identifier of the webhook configuration. (required)
+ :type webhook_id: str
+ :param management_projects_webhooks_update_request_body: Defines the webhook configuration to be updated.
+ :type management_projects_webhooks_update_request_body: ManagementProjectsWebhooksUpdateRequestBody
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._update_webhook_serialize(
+ project_id=project_id,
+ webhook_id=webhook_id,
+ management_projects_webhooks_update_request_body=management_projects_webhooks_update_request_body,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '2XX': "ManagementProjectsWebhooksUpdateResponseBody",
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ ).data
+
+
+ @validate_call
+ def update_webhook_with_http_info(
+ self,
+ project_id: Annotated[StrictStr, Field(description="Provide the unique identifier of the project.")],
+ webhook_id: Annotated[StrictStr, Field(description="Provide the unique identifier of the webhook configuration.")],
+ management_projects_webhooks_update_request_body: Annotated[Optional[ManagementProjectsWebhooksUpdateRequestBody], Field(description="Defines the webhook configuration to be updated.")] = None,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> ApiResponse[ManagementProjectsWebhooksUpdateResponseBody]:
+ """Update Webhook
+
+ Updates a webhook configuration. The events listed in the request are overwritten. If you want to add more events, provide also the events that are already in the webhook configuration. 📘 Webhook Documentation Read Webhooks v2024-01-1 article to learn how webhooks work in Voucherify.
+
+ :param project_id: Provide the unique identifier of the project. (required)
+ :type project_id: str
+ :param webhook_id: Provide the unique identifier of the webhook configuration. (required)
+ :type webhook_id: str
+ :param management_projects_webhooks_update_request_body: Defines the webhook configuration to be updated.
+ :type management_projects_webhooks_update_request_body: ManagementProjectsWebhooksUpdateRequestBody
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._update_webhook_serialize(
+ project_id=project_id,
+ webhook_id=webhook_id,
+ management_projects_webhooks_update_request_body=management_projects_webhooks_update_request_body,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '2XX': "ManagementProjectsWebhooksUpdateResponseBody",
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ )
+
+
+ @validate_call
+ def update_webhook_without_preload_content(
+ self,
+ project_id: Annotated[StrictStr, Field(description="Provide the unique identifier of the project.")],
+ webhook_id: Annotated[StrictStr, Field(description="Provide the unique identifier of the webhook configuration.")],
+ management_projects_webhooks_update_request_body: Annotated[Optional[ManagementProjectsWebhooksUpdateRequestBody], Field(description="Defines the webhook configuration to be updated.")] = None,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> RESTResponseType:
+ """Update Webhook
+
+ Updates a webhook configuration. The events listed in the request are overwritten. If you want to add more events, provide also the events that are already in the webhook configuration. 📘 Webhook Documentation Read Webhooks v2024-01-1 article to learn how webhooks work in Voucherify.
+
+ :param project_id: Provide the unique identifier of the project. (required)
+ :type project_id: str
+ :param webhook_id: Provide the unique identifier of the webhook configuration. (required)
+ :type webhook_id: str
+ :param management_projects_webhooks_update_request_body: Defines the webhook configuration to be updated.
+ :type management_projects_webhooks_update_request_body: ManagementProjectsWebhooksUpdateRequestBody
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._update_webhook_serialize(
+ project_id=project_id,
+ webhook_id=webhook_id,
+ management_projects_webhooks_update_request_body=management_projects_webhooks_update_request_body,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '2XX': "ManagementProjectsWebhooksUpdateResponseBody",
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+
+ def _update_webhook_serialize(
+ self,
+ project_id,
+ webhook_id,
+ management_projects_webhooks_update_request_body,
+ _request_auth,
+ _content_type,
+ _headers,
+ _host_index,
+ ) -> RequestSerialized:
+
+ _host = None
+
+ _collection_formats: Dict[str, str] = {
+ }
+
+ _path_params: Dict[str, str] = {}
+ _query_params: List[Tuple[str, str]] = []
+ _header_params: Dict[str, Optional[str]] = _headers or {}
+ _form_params: List[Tuple[str, str]] = []
+ _files: Dict[str, Union[str, bytes]] = {}
+ _body_params: Optional[bytes] = None
+
+ # process the path parameters
+ if project_id is not None:
+ _path_params['projectId'] = project_id
+ if webhook_id is not None:
+ _path_params['webhookId'] = webhook_id
+ # process the query parameters
+ # process the header parameters
+ # process the form parameters
+ # process the body parameter
+ if management_projects_webhooks_update_request_body is not None:
+ _body_params = management_projects_webhooks_update_request_body
+
+
+ # set the HTTP header `Accept`
+ if 'Accept' not in _header_params:
+ _header_params['Accept'] = self.api_client.select_header_accept(
+ [
+ 'application/json'
+ ]
+ )
+
+ # set the HTTP header `Content-Type`
+ if _content_type:
+ _header_params['Content-Type'] = _content_type
+ else:
+ _default_content_type = (
+ self.api_client.select_header_content_type(
+ [
+ 'application/json'
+ ]
+ )
+ )
+ if _default_content_type is not None:
+ _header_params['Content-Type'] = _default_content_type
+
+ # authentication setting
+ _auth_settings: List[str] = [
+ 'X-Management-Token',
+ 'X-Management-Id'
+ ]
+
+ return self.api_client.param_serialize(
+ method='PUT',
+ resource_path='/management/v1/projects/{projectId}/webhooks/{webhookId}',
+ path_params=_path_params,
+ query_params=_query_params,
+ header_params=_header_params,
+ body=_body_params,
+ post_params=_form_params,
+ files=_files,
+ auth_settings=_auth_settings,
+ collection_formats=_collection_formats,
+ _host=_host,
+ _request_auth=_request_auth
+ )
+
+
diff --git a/voucherify/api/metadata_schemas_api.py b/voucherify/api/metadata_schemas_api.py
new file mode 100644
index 00000000..5b7a7b9e
--- /dev/null
+++ b/voucherify/api/metadata_schemas_api.py
@@ -0,0 +1,545 @@
+# coding: utf-8
+
+"""
+ Voucherify API
+
+ Voucherify promotion engine REST API. Please see https://docs.voucherify.io/docs for more details.
+
+ The version of the OpenAPI document: v2018-08-01
+ Contact: support@voucherify.io
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+import warnings
+from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt
+from typing import Any, Dict, List, Optional, Tuple, Union
+from typing_extensions import Annotated
+
+from pydantic import Field, StrictStr
+from typing_extensions import Annotated
+from voucherify.models.metadata_schemas_get_response_body import MetadataSchemasGetResponseBody
+from voucherify.models.metadata_schemas_list_response_body import MetadataSchemasListResponseBody
+
+from voucherify.api_client import ApiClient, RequestSerialized
+from voucherify.api_response import ApiResponse
+from voucherify.rest import RESTResponseType
+
+
+class MetadataSchemasApi:
+ """NOTE: This class is auto generated by OpenAPI Generator
+ Ref: https://openapi-generator.tech
+
+ Do not edit the class manually.
+ """
+
+ def __init__(self, api_client=None) -> None:
+ if api_client is None:
+ api_client = ApiClient.get_default()
+ self.api_client = api_client
+
+
+ @validate_call
+ def get_metadata_schema(
+ self,
+ resource: Annotated[StrictStr, Field(description="There is an infinite number of possibilities for retrieving metadata schemas by the resource type because you can define custom metadata schemas.")],
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> MetadataSchemasGetResponseBody:
+ """Get Metadata Schema
+
+ Retrieves a metadata schema per resource type. # Resource types ## Standard You can retrieve metadata schemas for the standard metadata schema definitions listed below. Add one of these types as the resource path parameter. - campaign - customer - earning_rule - loyalty_tier - order - order_item - product - promotion_tier - publication - redemption - reward - voucher ## Custom If you have defined a [custom metadata schema](https://support.voucherify.io/article/99-schema-validation-metadata#add-metadata), provide its name in the resource field to retrieve its details. 📘 Management API If you have Management API enabled, you can also use the Get Metadata Schemas endpoint to retrieve a metadata schema using its ID.
+
+ :param resource: There is an infinite number of possibilities for retrieving metadata schemas by the resource type because you can define custom metadata schemas. (required)
+ :type resource: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._get_metadata_schema_serialize(
+ resource=resource,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '2XX': "MetadataSchemasGetResponseBody",
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ ).data
+
+
+ @validate_call
+ def get_metadata_schema_with_http_info(
+ self,
+ resource: Annotated[StrictStr, Field(description="There is an infinite number of possibilities for retrieving metadata schemas by the resource type because you can define custom metadata schemas.")],
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> ApiResponse[MetadataSchemasGetResponseBody]:
+ """Get Metadata Schema
+
+ Retrieves a metadata schema per resource type. # Resource types ## Standard You can retrieve metadata schemas for the standard metadata schema definitions listed below. Add one of these types as the resource path parameter. - campaign - customer - earning_rule - loyalty_tier - order - order_item - product - promotion_tier - publication - redemption - reward - voucher ## Custom If you have defined a [custom metadata schema](https://support.voucherify.io/article/99-schema-validation-metadata#add-metadata), provide its name in the resource field to retrieve its details. 📘 Management API If you have Management API enabled, you can also use the Get Metadata Schemas endpoint to retrieve a metadata schema using its ID.
+
+ :param resource: There is an infinite number of possibilities for retrieving metadata schemas by the resource type because you can define custom metadata schemas. (required)
+ :type resource: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._get_metadata_schema_serialize(
+ resource=resource,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '2XX': "MetadataSchemasGetResponseBody",
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ )
+
+
+ @validate_call
+ def get_metadata_schema_without_preload_content(
+ self,
+ resource: Annotated[StrictStr, Field(description="There is an infinite number of possibilities for retrieving metadata schemas by the resource type because you can define custom metadata schemas.")],
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> RESTResponseType:
+ """Get Metadata Schema
+
+ Retrieves a metadata schema per resource type. # Resource types ## Standard You can retrieve metadata schemas for the standard metadata schema definitions listed below. Add one of these types as the resource path parameter. - campaign - customer - earning_rule - loyalty_tier - order - order_item - product - promotion_tier - publication - redemption - reward - voucher ## Custom If you have defined a [custom metadata schema](https://support.voucherify.io/article/99-schema-validation-metadata#add-metadata), provide its name in the resource field to retrieve its details. 📘 Management API If you have Management API enabled, you can also use the Get Metadata Schemas endpoint to retrieve a metadata schema using its ID.
+
+ :param resource: There is an infinite number of possibilities for retrieving metadata schemas by the resource type because you can define custom metadata schemas. (required)
+ :type resource: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._get_metadata_schema_serialize(
+ resource=resource,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '2XX': "MetadataSchemasGetResponseBody",
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+
+ def _get_metadata_schema_serialize(
+ self,
+ resource,
+ _request_auth,
+ _content_type,
+ _headers,
+ _host_index,
+ ) -> RequestSerialized:
+
+ _host = None
+
+ _collection_formats: Dict[str, str] = {
+ }
+
+ _path_params: Dict[str, str] = {}
+ _query_params: List[Tuple[str, str]] = []
+ _header_params: Dict[str, Optional[str]] = _headers or {}
+ _form_params: List[Tuple[str, str]] = []
+ _files: Dict[str, Union[str, bytes]] = {}
+ _body_params: Optional[bytes] = None
+
+ # process the path parameters
+ if resource is not None:
+ _path_params['resource'] = resource
+ # process the query parameters
+ # process the header parameters
+ # process the form parameters
+ # process the body parameter
+
+
+ # set the HTTP header `Accept`
+ if 'Accept' not in _header_params:
+ _header_params['Accept'] = self.api_client.select_header_accept(
+ [
+ 'application/json'
+ ]
+ )
+
+
+ # authentication setting
+ _auth_settings: List[str] = [
+ 'X-App-Id',
+ 'X-App-Token'
+ ]
+
+ return self.api_client.param_serialize(
+ method='GET',
+ resource_path='/v1/metadata-schemas/{resource}',
+ path_params=_path_params,
+ query_params=_query_params,
+ header_params=_header_params,
+ body=_body_params,
+ post_params=_form_params,
+ files=_files,
+ auth_settings=_auth_settings,
+ collection_formats=_collection_formats,
+ _host=_host,
+ _request_auth=_request_auth
+ )
+
+
+
+
+ @validate_call
+ def list_metadata_schemas(
+ self,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> MetadataSchemasListResponseBody:
+ """List Metadata Schemas
+
+ Retrieve metadata schema definitions. 📘 Management API If you have Management API enabled, you can also use the List Metadata Schemas endpoint to list all metadata schemas.
+
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._list_metadata_schemas_serialize(
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '2XX': "MetadataSchemasListResponseBody",
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ ).data
+
+
+ @validate_call
+ def list_metadata_schemas_with_http_info(
+ self,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> ApiResponse[MetadataSchemasListResponseBody]:
+ """List Metadata Schemas
+
+ Retrieve metadata schema definitions. 📘 Management API If you have Management API enabled, you can also use the List Metadata Schemas endpoint to list all metadata schemas.
+
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._list_metadata_schemas_serialize(
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '2XX': "MetadataSchemasListResponseBody",
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ )
+
+
+ @validate_call
+ def list_metadata_schemas_without_preload_content(
+ self,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> RESTResponseType:
+ """List Metadata Schemas
+
+ Retrieve metadata schema definitions. 📘 Management API If you have Management API enabled, you can also use the List Metadata Schemas endpoint to list all metadata schemas.
+
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._list_metadata_schemas_serialize(
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '2XX': "MetadataSchemasListResponseBody",
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+
+ def _list_metadata_schemas_serialize(
+ self,
+ _request_auth,
+ _content_type,
+ _headers,
+ _host_index,
+ ) -> RequestSerialized:
+
+ _host = None
+
+ _collection_formats: Dict[str, str] = {
+ }
+
+ _path_params: Dict[str, str] = {}
+ _query_params: List[Tuple[str, str]] = []
+ _header_params: Dict[str, Optional[str]] = _headers or {}
+ _form_params: List[Tuple[str, str]] = []
+ _files: Dict[str, Union[str, bytes]] = {}
+ _body_params: Optional[bytes] = None
+
+ # process the path parameters
+ # process the query parameters
+ # process the header parameters
+ # process the form parameters
+ # process the body parameter
+
+
+ # set the HTTP header `Accept`
+ if 'Accept' not in _header_params:
+ _header_params['Accept'] = self.api_client.select_header_accept(
+ [
+ 'application/json'
+ ]
+ )
+
+
+ # authentication setting
+ _auth_settings: List[str] = [
+ 'X-App-Id',
+ 'X-App-Token'
+ ]
+
+ return self.api_client.param_serialize(
+ method='GET',
+ resource_path='/v1/metadata-schemas',
+ path_params=_path_params,
+ query_params=_query_params,
+ header_params=_header_params,
+ body=_body_params,
+ post_params=_form_params,
+ files=_files,
+ auth_settings=_auth_settings,
+ collection_formats=_collection_formats,
+ _host=_host,
+ _request_auth=_request_auth
+ )
+
+
diff --git a/voucherify/api/products_api.py b/voucherify/api/products_api.py
index 84acb252..e59fcd5e 100644
--- a/voucherify/api/products_api.py
+++ b/voucherify/api/products_api.py
@@ -3259,7 +3259,7 @@ def update_products_in_bulk(
) -> ProductsUpdateInBulkResponseBody:
"""Update Products in Bulk
- Update products in one asynchronous operation. The request can include up to **10 MB** of data. The response returns a unique asynchronous action ID. Use this ID in the query paramater of the GET Async Action endpoint to check, e.g.: - The status of your request (in queue, in progress, done, or failed) - Resources that failed to be updated - The report file with details about the update If a product object is not found, it is **upserted**. This is shown in the report file in the GET Async Action endpoint. The upserted resources have value false in the found column and true in the updated column. This API request starts a process that affects Voucherify data in bulk. In the case of small jobs (like bulk update), the request is put into a queue and processed when every other bulk request placed in the queue prior to this request is finished.
+ Update products in one asynchronous operation. The request can include up to **10 MB** of data. The response returns a unique asynchronous action ID. Use this ID in the query paramater of the GET Async Action endpoint to check, e.g.: - The status of your request (in queue, in progress, done, or failed) - Resources that failed to be updated - The report file with details about the update If a product object is not found, it is **upserted**. This is shown in the report file in the **GET** Async Action endpoint. The upserted resources have value false in the found column and true in the updated column. This API request starts a process that affects Voucherify data in bulk. In the case of small jobs (like bulk update), the request is put into a queue and processed when every other bulk request placed in the queue prior to this request is finished.
:param products_update_in_bulk_request_body: List the product fields to be updated in each customer object.
:type products_update_in_bulk_request_body: List[ProductsUpdateInBulkRequestBody]
@@ -3326,7 +3326,7 @@ def update_products_in_bulk_with_http_info(
) -> ApiResponse[ProductsUpdateInBulkResponseBody]:
"""Update Products in Bulk
- Update products in one asynchronous operation. The request can include up to **10 MB** of data. The response returns a unique asynchronous action ID. Use this ID in the query paramater of the GET Async Action endpoint to check, e.g.: - The status of your request (in queue, in progress, done, or failed) - Resources that failed to be updated - The report file with details about the update If a product object is not found, it is **upserted**. This is shown in the report file in the GET Async Action endpoint. The upserted resources have value false in the found column and true in the updated column. This API request starts a process that affects Voucherify data in bulk. In the case of small jobs (like bulk update), the request is put into a queue and processed when every other bulk request placed in the queue prior to this request is finished.
+ Update products in one asynchronous operation. The request can include up to **10 MB** of data. The response returns a unique asynchronous action ID. Use this ID in the query paramater of the GET Async Action endpoint to check, e.g.: - The status of your request (in queue, in progress, done, or failed) - Resources that failed to be updated - The report file with details about the update If a product object is not found, it is **upserted**. This is shown in the report file in the **GET** Async Action endpoint. The upserted resources have value false in the found column and true in the updated column. This API request starts a process that affects Voucherify data in bulk. In the case of small jobs (like bulk update), the request is put into a queue and processed when every other bulk request placed in the queue prior to this request is finished.
:param products_update_in_bulk_request_body: List the product fields to be updated in each customer object.
:type products_update_in_bulk_request_body: List[ProductsUpdateInBulkRequestBody]
@@ -3393,7 +3393,7 @@ def update_products_in_bulk_without_preload_content(
) -> RESTResponseType:
"""Update Products in Bulk
- Update products in one asynchronous operation. The request can include up to **10 MB** of data. The response returns a unique asynchronous action ID. Use this ID in the query paramater of the GET Async Action endpoint to check, e.g.: - The status of your request (in queue, in progress, done, or failed) - Resources that failed to be updated - The report file with details about the update If a product object is not found, it is **upserted**. This is shown in the report file in the GET Async Action endpoint. The upserted resources have value false in the found column and true in the updated column. This API request starts a process that affects Voucherify data in bulk. In the case of small jobs (like bulk update), the request is put into a queue and processed when every other bulk request placed in the queue prior to this request is finished.
+ Update products in one asynchronous operation. The request can include up to **10 MB** of data. The response returns a unique asynchronous action ID. Use this ID in the query paramater of the GET Async Action endpoint to check, e.g.: - The status of your request (in queue, in progress, done, or failed) - Resources that failed to be updated - The report file with details about the update If a product object is not found, it is **upserted**. This is shown in the report file in the **GET** Async Action endpoint. The upserted resources have value false in the found column and true in the updated column. This API request starts a process that affects Voucherify data in bulk. In the case of small jobs (like bulk update), the request is put into a queue and processed when every other bulk request placed in the queue prior to this request is finished.
:param products_update_in_bulk_request_body: List the product fields to be updated in each customer object.
:type products_update_in_bulk_request_body: List[ProductsUpdateInBulkRequestBody]
@@ -3533,7 +3533,7 @@ def update_products_metadata_in_bulk(
) -> ProductsMetadataUpdateInBulkResponseBody:
"""Update Products' Metadata in Bulk
- Updates metadata parameters for a list of products. Every resource in the list will receive the metadata defined in the request. The request can include up to **10 MB** of data. The response returns a unique asynchronous action ID. Use this ID in the query paramater of the GET Async Action endpoint to check, e.g.: - The status of your request (in queue, in progress, done, or failed) - Resources that failed to be updated - The report file with details about the update If a product object is not found, it is **upserted**. This is shown in the report file in the GET Async Action endpoint. The upserted resources have value false in the found column and true in the updated column. This API request starts a process that affects Voucherify data in bulk. In the case of small jobs (like bulk update), the request is put into a queue and processed when every other bulk request placed in the queue prior to this request is finished.
+ Updates metadata parameters for a list of products. Every resource in the list will receive the metadata defined in the request. The request can include up to **10 MB** of data. The response returns a unique asynchronous action ID. Use this ID in the query paramater of the GET Async Action endpoint to check, e.g.: - The status of your request (in queue, in progress, done, or failed) - Resources that failed to be updated - The report file with details about the update If a product object is not found, it is **upserted**. This is shown in the report file in the **GET** Async Action endpoint. The upserted resources have value false in the found column and true in the updated column. This API request starts a process that affects Voucherify data in bulk. In the case of small jobs (like bulk update), the request is put into a queue and processed when every other bulk request placed in the queue prior to this request is finished.
:param products_metadata_update_in_bulk_request_body: List the source_ids of the products you would like to update with the metadata key/value pairs.
:type products_metadata_update_in_bulk_request_body: ProductsMetadataUpdateInBulkRequestBody
@@ -3600,7 +3600,7 @@ def update_products_metadata_in_bulk_with_http_info(
) -> ApiResponse[ProductsMetadataUpdateInBulkResponseBody]:
"""Update Products' Metadata in Bulk
- Updates metadata parameters for a list of products. Every resource in the list will receive the metadata defined in the request. The request can include up to **10 MB** of data. The response returns a unique asynchronous action ID. Use this ID in the query paramater of the GET Async Action endpoint to check, e.g.: - The status of your request (in queue, in progress, done, or failed) - Resources that failed to be updated - The report file with details about the update If a product object is not found, it is **upserted**. This is shown in the report file in the GET Async Action endpoint. The upserted resources have value false in the found column and true in the updated column. This API request starts a process that affects Voucherify data in bulk. In the case of small jobs (like bulk update), the request is put into a queue and processed when every other bulk request placed in the queue prior to this request is finished.
+ Updates metadata parameters for a list of products. Every resource in the list will receive the metadata defined in the request. The request can include up to **10 MB** of data. The response returns a unique asynchronous action ID. Use this ID in the query paramater of the GET Async Action endpoint to check, e.g.: - The status of your request (in queue, in progress, done, or failed) - Resources that failed to be updated - The report file with details about the update If a product object is not found, it is **upserted**. This is shown in the report file in the **GET** Async Action endpoint. The upserted resources have value false in the found column and true in the updated column. This API request starts a process that affects Voucherify data in bulk. In the case of small jobs (like bulk update), the request is put into a queue and processed when every other bulk request placed in the queue prior to this request is finished.
:param products_metadata_update_in_bulk_request_body: List the source_ids of the products you would like to update with the metadata key/value pairs.
:type products_metadata_update_in_bulk_request_body: ProductsMetadataUpdateInBulkRequestBody
@@ -3667,7 +3667,7 @@ def update_products_metadata_in_bulk_without_preload_content(
) -> RESTResponseType:
"""Update Products' Metadata in Bulk
- Updates metadata parameters for a list of products. Every resource in the list will receive the metadata defined in the request. The request can include up to **10 MB** of data. The response returns a unique asynchronous action ID. Use this ID in the query paramater of the GET Async Action endpoint to check, e.g.: - The status of your request (in queue, in progress, done, or failed) - Resources that failed to be updated - The report file with details about the update If a product object is not found, it is **upserted**. This is shown in the report file in the GET Async Action endpoint. The upserted resources have value false in the found column and true in the updated column. This API request starts a process that affects Voucherify data in bulk. In the case of small jobs (like bulk update), the request is put into a queue and processed when every other bulk request placed in the queue prior to this request is finished.
+ Updates metadata parameters for a list of products. Every resource in the list will receive the metadata defined in the request. The request can include up to **10 MB** of data. The response returns a unique asynchronous action ID. Use this ID in the query paramater of the GET Async Action endpoint to check, e.g.: - The status of your request (in queue, in progress, done, or failed) - Resources that failed to be updated - The report file with details about the update If a product object is not found, it is **upserted**. This is shown in the report file in the **GET** Async Action endpoint. The upserted resources have value false in the found column and true in the updated column. This API request starts a process that affects Voucherify data in bulk. In the case of small jobs (like bulk update), the request is put into a queue and processed when every other bulk request placed in the queue prior to this request is finished.
:param products_metadata_update_in_bulk_request_body: List the source_ids of the products you would like to update with the metadata key/value pairs.
:type products_metadata_update_in_bulk_request_body: ProductsMetadataUpdateInBulkRequestBody
diff --git a/voucherify/api/publications_api.py b/voucherify/api/publications_api.py
index 4f807db4..41e922b8 100644
--- a/voucherify/api/publications_api.py
+++ b/voucherify/api/publications_api.py
@@ -22,6 +22,7 @@
from typing_extensions import Annotated
from voucherify.models.create_publication_campaign import CreatePublicationCampaign
from voucherify.models.customer import Customer
+from voucherify.models.parameter_filters_list_publications import ParameterFiltersListPublications
from voucherify.models.parameter_order_list_publications import ParameterOrderListPublications
from voucherify.models.parameter_result_list_publications import ParameterResultListPublications
from voucherify.models.parameter_voucher_type_list_publications import ParameterVoucherTypeListPublications
@@ -696,7 +697,7 @@ def list_publications(
result: Annotated[Optional[ParameterResultListPublications], Field(description="Filters by a publication result.")] = None,
voucher_type: Annotated[Optional[ParameterVoucherTypeListPublications], Field(description="Filters by a voucher type.")] = None,
is_referral_code: Annotated[Optional[StrictBool], Field(description="This filter works only for the true option. If set to true, the query returns only publications of codes from referral campaigns. ")] = None,
- filters: Annotated[Optional[StrictStr], Field(description="Allows for combining the filters mentioned in the endpoint description.")] = None,
+ filters: Annotated[Optional[ParameterFiltersListPublications], Field(description="Filters for listing publications.")] = None,
source_id: Annotated[Optional[StrictStr], Field(description="Using this endpoint with a particular publication source_id, which was sent with the original request to create a publication, returns in the response, exactly the same code published initially because the code was assigned to the given publication. As a result, you can use this endpoint as a reference and return a code that was assigned in a publication by using a particular source_id.")] = None,
_request_timeout: Union[
None,
@@ -733,8 +734,8 @@ def list_publications(
:type voucher_type: ParameterVoucherTypeListPublications
:param is_referral_code: This filter works only for the true option. If set to true, the query returns only publications of codes from referral campaigns.
:type is_referral_code: bool
- :param filters: Allows for combining the filters mentioned in the endpoint description.
- :type filters: str
+ :param filters: Filters for listing publications.
+ :type filters: ParameterFiltersListPublications
:param source_id: Using this endpoint with a particular publication source_id, which was sent with the original request to create a publication, returns in the response, exactly the same code published initially because the code was assigned to the given publication. As a result, you can use this endpoint as a reference and return a code that was assigned in a publication by using a particular source_id.
:type source_id: str
:param _request_timeout: timeout setting for this request. If one
@@ -803,7 +804,7 @@ def list_publications_with_http_info(
result: Annotated[Optional[ParameterResultListPublications], Field(description="Filters by a publication result.")] = None,
voucher_type: Annotated[Optional[ParameterVoucherTypeListPublications], Field(description="Filters by a voucher type.")] = None,
is_referral_code: Annotated[Optional[StrictBool], Field(description="This filter works only for the true option. If set to true, the query returns only publications of codes from referral campaigns. ")] = None,
- filters: Annotated[Optional[StrictStr], Field(description="Allows for combining the filters mentioned in the endpoint description.")] = None,
+ filters: Annotated[Optional[ParameterFiltersListPublications], Field(description="Filters for listing publications.")] = None,
source_id: Annotated[Optional[StrictStr], Field(description="Using this endpoint with a particular publication source_id, which was sent with the original request to create a publication, returns in the response, exactly the same code published initially because the code was assigned to the given publication. As a result, you can use this endpoint as a reference and return a code that was assigned in a publication by using a particular source_id.")] = None,
_request_timeout: Union[
None,
@@ -840,8 +841,8 @@ def list_publications_with_http_info(
:type voucher_type: ParameterVoucherTypeListPublications
:param is_referral_code: This filter works only for the true option. If set to true, the query returns only publications of codes from referral campaigns.
:type is_referral_code: bool
- :param filters: Allows for combining the filters mentioned in the endpoint description.
- :type filters: str
+ :param filters: Filters for listing publications.
+ :type filters: ParameterFiltersListPublications
:param source_id: Using this endpoint with a particular publication source_id, which was sent with the original request to create a publication, returns in the response, exactly the same code published initially because the code was assigned to the given publication. As a result, you can use this endpoint as a reference and return a code that was assigned in a publication by using a particular source_id.
:type source_id: str
:param _request_timeout: timeout setting for this request. If one
@@ -910,7 +911,7 @@ def list_publications_without_preload_content(
result: Annotated[Optional[ParameterResultListPublications], Field(description="Filters by a publication result.")] = None,
voucher_type: Annotated[Optional[ParameterVoucherTypeListPublications], Field(description="Filters by a voucher type.")] = None,
is_referral_code: Annotated[Optional[StrictBool], Field(description="This filter works only for the true option. If set to true, the query returns only publications of codes from referral campaigns. ")] = None,
- filters: Annotated[Optional[StrictStr], Field(description="Allows for combining the filters mentioned in the endpoint description.")] = None,
+ filters: Annotated[Optional[ParameterFiltersListPublications], Field(description="Filters for listing publications.")] = None,
source_id: Annotated[Optional[StrictStr], Field(description="Using this endpoint with a particular publication source_id, which was sent with the original request to create a publication, returns in the response, exactly the same code published initially because the code was assigned to the given publication. As a result, you can use this endpoint as a reference and return a code that was assigned in a publication by using a particular source_id.")] = None,
_request_timeout: Union[
None,
@@ -947,8 +948,8 @@ def list_publications_without_preload_content(
:type voucher_type: ParameterVoucherTypeListPublications
:param is_referral_code: This filter works only for the true option. If set to true, the query returns only publications of codes from referral campaigns.
:type is_referral_code: bool
- :param filters: Allows for combining the filters mentioned in the endpoint description.
- :type filters: str
+ :param filters: Filters for listing publications.
+ :type filters: ParameterFiltersListPublications
:param source_id: Using this endpoint with a particular publication source_id, which was sent with the original request to create a publication, returns in the response, exactly the same code published initially because the code was assigned to the given publication. As a result, you can use this endpoint as a reference and return a code that was assigned in a publication by using a particular source_id.
:type source_id: str
:param _request_timeout: timeout setting for this request. If one
diff --git a/voucherify/api/referrals_api.py b/voucherify/api/referrals_api.py
new file mode 100644
index 00000000..f93b3d6a
--- /dev/null
+++ b/voucherify/api/referrals_api.py
@@ -0,0 +1,1857 @@
+# coding: utf-8
+
+"""
+ Voucherify API
+
+ Voucherify promotion engine REST API. Please see https://docs.voucherify.io/docs for more details.
+
+ The version of the OpenAPI document: v2018-08-01
+ Contact: support@voucherify.io
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+import warnings
+from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt
+from typing import Any, Dict, List, Optional, Tuple, Union
+from typing_extensions import Annotated
+
+from pydantic import Field, StrictStr
+from typing import Optional
+from typing_extensions import Annotated
+from voucherify.models.parameter_filters_list_referrals_redeemable_holders import ParameterFiltersListReferralsRedeemableHolders
+from voucherify.models.parameter_order_list_redeemables import ParameterOrderListRedeemables
+from voucherify.models.referrals_members_holders_create_in_bulk_request_body import ReferralsMembersHoldersCreateInBulkRequestBody
+from voucherify.models.referrals_members_holders_create_in_bulk_response_body import ReferralsMembersHoldersCreateInBulkResponseBody
+from voucherify.models.referrals_members_holders_list_response_body import ReferralsMembersHoldersListResponseBody
+
+from voucherify.api_client import ApiClient, RequestSerialized
+from voucherify.api_response import ApiResponse
+from voucherify.rest import RESTResponseType
+
+
+class ReferralsApi:
+ """NOTE: This class is auto generated by OpenAPI Generator
+ Ref: https://openapi-generator.tech
+
+ Do not edit the class manually.
+ """
+
+ def __init__(self, api_client=None) -> None:
+ if api_client is None:
+ api_client = ApiClient.get_default()
+ self.api_client = api_client
+
+
+ @validate_call
+ def referrals_add_holders(
+ self,
+ member_id: Annotated[StrictStr, Field(description="Unique referral code or its identifier.")],
+ referrals_members_holders_create_in_bulk_request_body: Annotated[Optional[ReferralsMembersHoldersCreateInBulkRequestBody], Field(description="Specify the customer data to be upserted as redeemable holders.")] = None,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> ReferralsMembersHoldersCreateInBulkResponseBody:
+ """Add Referral Code Holders
+
+ Adds new holders to a referral code as **referees**. The data sent in the request is upserted into the customer data. If the request returns an error even for one customer, you have to resend the whole request. Customer data is upserted if the data for all customers is correct. To use this endpoint, you must have the following permissions: - Create and modify Customers and Segments (customers.modify) - Publish Voucher (vouchers.publish) 👍 To add a holder as a referer, use the Create Publication endpoint. 📘 Alternative endpoint This endpoint is an alternative to the Add Referral Code Holders endpoint. The URL was re-designed to retrieve the referral member holders without providing the campaignId as a path paremeter.
+
+ :param member_id: Unique referral code or its identifier. (required)
+ :type member_id: str
+ :param referrals_members_holders_create_in_bulk_request_body: Specify the customer data to be upserted as redeemable holders.
+ :type referrals_members_holders_create_in_bulk_request_body: ReferralsMembersHoldersCreateInBulkRequestBody
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._referrals_add_holders_serialize(
+ member_id=member_id,
+ referrals_members_holders_create_in_bulk_request_body=referrals_members_holders_create_in_bulk_request_body,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '2XX': "ReferralsMembersHoldersCreateInBulkResponseBody",
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ ).data
+
+
+ @validate_call
+ def referrals_add_holders_with_http_info(
+ self,
+ member_id: Annotated[StrictStr, Field(description="Unique referral code or its identifier.")],
+ referrals_members_holders_create_in_bulk_request_body: Annotated[Optional[ReferralsMembersHoldersCreateInBulkRequestBody], Field(description="Specify the customer data to be upserted as redeemable holders.")] = None,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> ApiResponse[ReferralsMembersHoldersCreateInBulkResponseBody]:
+ """Add Referral Code Holders
+
+ Adds new holders to a referral code as **referees**. The data sent in the request is upserted into the customer data. If the request returns an error even for one customer, you have to resend the whole request. Customer data is upserted if the data for all customers is correct. To use this endpoint, you must have the following permissions: - Create and modify Customers and Segments (customers.modify) - Publish Voucher (vouchers.publish) 👍 To add a holder as a referer, use the Create Publication endpoint. 📘 Alternative endpoint This endpoint is an alternative to the Add Referral Code Holders endpoint. The URL was re-designed to retrieve the referral member holders without providing the campaignId as a path paremeter.
+
+ :param member_id: Unique referral code or its identifier. (required)
+ :type member_id: str
+ :param referrals_members_holders_create_in_bulk_request_body: Specify the customer data to be upserted as redeemable holders.
+ :type referrals_members_holders_create_in_bulk_request_body: ReferralsMembersHoldersCreateInBulkRequestBody
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._referrals_add_holders_serialize(
+ member_id=member_id,
+ referrals_members_holders_create_in_bulk_request_body=referrals_members_holders_create_in_bulk_request_body,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '2XX': "ReferralsMembersHoldersCreateInBulkResponseBody",
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ )
+
+
+ @validate_call
+ def referrals_add_holders_without_preload_content(
+ self,
+ member_id: Annotated[StrictStr, Field(description="Unique referral code or its identifier.")],
+ referrals_members_holders_create_in_bulk_request_body: Annotated[Optional[ReferralsMembersHoldersCreateInBulkRequestBody], Field(description="Specify the customer data to be upserted as redeemable holders.")] = None,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> RESTResponseType:
+ """Add Referral Code Holders
+
+ Adds new holders to a referral code as **referees**. The data sent in the request is upserted into the customer data. If the request returns an error even for one customer, you have to resend the whole request. Customer data is upserted if the data for all customers is correct. To use this endpoint, you must have the following permissions: - Create and modify Customers and Segments (customers.modify) - Publish Voucher (vouchers.publish) 👍 To add a holder as a referer, use the Create Publication endpoint. 📘 Alternative endpoint This endpoint is an alternative to the Add Referral Code Holders endpoint. The URL was re-designed to retrieve the referral member holders without providing the campaignId as a path paremeter.
+
+ :param member_id: Unique referral code or its identifier. (required)
+ :type member_id: str
+ :param referrals_members_holders_create_in_bulk_request_body: Specify the customer data to be upserted as redeemable holders.
+ :type referrals_members_holders_create_in_bulk_request_body: ReferralsMembersHoldersCreateInBulkRequestBody
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._referrals_add_holders_serialize(
+ member_id=member_id,
+ referrals_members_holders_create_in_bulk_request_body=referrals_members_holders_create_in_bulk_request_body,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '2XX': "ReferralsMembersHoldersCreateInBulkResponseBody",
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+
+ def _referrals_add_holders_serialize(
+ self,
+ member_id,
+ referrals_members_holders_create_in_bulk_request_body,
+ _request_auth,
+ _content_type,
+ _headers,
+ _host_index,
+ ) -> RequestSerialized:
+
+ _host = None
+
+ _collection_formats: Dict[str, str] = {
+ }
+
+ _path_params: Dict[str, str] = {}
+ _query_params: List[Tuple[str, str]] = []
+ _header_params: Dict[str, Optional[str]] = _headers or {}
+ _form_params: List[Tuple[str, str]] = []
+ _files: Dict[str, Union[str, bytes]] = {}
+ _body_params: Optional[bytes] = None
+
+ # process the path parameters
+ if member_id is not None:
+ _path_params['memberId'] = member_id
+ # process the query parameters
+ # process the header parameters
+ # process the form parameters
+ # process the body parameter
+ if referrals_members_holders_create_in_bulk_request_body is not None:
+ _body_params = referrals_members_holders_create_in_bulk_request_body
+
+
+ # set the HTTP header `Accept`
+ if 'Accept' not in _header_params:
+ _header_params['Accept'] = self.api_client.select_header_accept(
+ [
+ 'application/json'
+ ]
+ )
+
+ # set the HTTP header `Content-Type`
+ if _content_type:
+ _header_params['Content-Type'] = _content_type
+ else:
+ _default_content_type = (
+ self.api_client.select_header_content_type(
+ [
+ 'application/json'
+ ]
+ )
+ )
+ if _default_content_type is not None:
+ _header_params['Content-Type'] = _default_content_type
+
+ # authentication setting
+ _auth_settings: List[str] = [
+ 'X-App-Id',
+ 'X-App-Token'
+ ]
+
+ return self.api_client.param_serialize(
+ method='POST',
+ resource_path='/v1/referrals/members/{memberId}/holders',
+ path_params=_path_params,
+ query_params=_query_params,
+ header_params=_header_params,
+ body=_body_params,
+ post_params=_form_params,
+ files=_files,
+ auth_settings=_auth_settings,
+ collection_formats=_collection_formats,
+ _host=_host,
+ _request_auth=_request_auth
+ )
+
+
+
+
+ @validate_call
+ def referrals_add_holders1(
+ self,
+ campaign_id: Annotated[StrictStr, Field(description="Unique identifier of a referral program campaign.")],
+ member_id: Annotated[StrictStr, Field(description="Unique referral code or its identifier.")],
+ referrals_members_holders_create_in_bulk_request_body: Annotated[Optional[ReferralsMembersHoldersCreateInBulkRequestBody], Field(description="Specify the customer data to be upserted as redeemable holders.")] = None,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> ReferralsMembersHoldersCreateInBulkResponseBody:
+ """Add Referral Code Holders
+
+ Adds new holders to a referral code as **referees**. The data sent in the request is upserted into the customer data. If the request returns an error even for one customer, you have to resend the whole request. Customer data is upserted if the data for all customers is correct. To use this endpoint, you must have the following permissions: - Create and modify Customers and Segments (customers.modify) - Publish Voucher (vouchers.publish) 👍 To add a holder as a referer, use the Create Publication endpoint.
+
+ :param campaign_id: Unique identifier of a referral program campaign. (required)
+ :type campaign_id: str
+ :param member_id: Unique referral code or its identifier. (required)
+ :type member_id: str
+ :param referrals_members_holders_create_in_bulk_request_body: Specify the customer data to be upserted as redeemable holders.
+ :type referrals_members_holders_create_in_bulk_request_body: ReferralsMembersHoldersCreateInBulkRequestBody
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._referrals_add_holders1_serialize(
+ campaign_id=campaign_id,
+ member_id=member_id,
+ referrals_members_holders_create_in_bulk_request_body=referrals_members_holders_create_in_bulk_request_body,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '2XX': "ReferralsMembersHoldersCreateInBulkResponseBody",
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ ).data
+
+
+ @validate_call
+ def referrals_add_holders1_with_http_info(
+ self,
+ campaign_id: Annotated[StrictStr, Field(description="Unique identifier of a referral program campaign.")],
+ member_id: Annotated[StrictStr, Field(description="Unique referral code or its identifier.")],
+ referrals_members_holders_create_in_bulk_request_body: Annotated[Optional[ReferralsMembersHoldersCreateInBulkRequestBody], Field(description="Specify the customer data to be upserted as redeemable holders.")] = None,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> ApiResponse[ReferralsMembersHoldersCreateInBulkResponseBody]:
+ """Add Referral Code Holders
+
+ Adds new holders to a referral code as **referees**. The data sent in the request is upserted into the customer data. If the request returns an error even for one customer, you have to resend the whole request. Customer data is upserted if the data for all customers is correct. To use this endpoint, you must have the following permissions: - Create and modify Customers and Segments (customers.modify) - Publish Voucher (vouchers.publish) 👍 To add a holder as a referer, use the Create Publication endpoint.
+
+ :param campaign_id: Unique identifier of a referral program campaign. (required)
+ :type campaign_id: str
+ :param member_id: Unique referral code or its identifier. (required)
+ :type member_id: str
+ :param referrals_members_holders_create_in_bulk_request_body: Specify the customer data to be upserted as redeemable holders.
+ :type referrals_members_holders_create_in_bulk_request_body: ReferralsMembersHoldersCreateInBulkRequestBody
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._referrals_add_holders1_serialize(
+ campaign_id=campaign_id,
+ member_id=member_id,
+ referrals_members_holders_create_in_bulk_request_body=referrals_members_holders_create_in_bulk_request_body,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '2XX': "ReferralsMembersHoldersCreateInBulkResponseBody",
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ )
+
+
+ @validate_call
+ def referrals_add_holders1_without_preload_content(
+ self,
+ campaign_id: Annotated[StrictStr, Field(description="Unique identifier of a referral program campaign.")],
+ member_id: Annotated[StrictStr, Field(description="Unique referral code or its identifier.")],
+ referrals_members_holders_create_in_bulk_request_body: Annotated[Optional[ReferralsMembersHoldersCreateInBulkRequestBody], Field(description="Specify the customer data to be upserted as redeemable holders.")] = None,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> RESTResponseType:
+ """Add Referral Code Holders
+
+ Adds new holders to a referral code as **referees**. The data sent in the request is upserted into the customer data. If the request returns an error even for one customer, you have to resend the whole request. Customer data is upserted if the data for all customers is correct. To use this endpoint, you must have the following permissions: - Create and modify Customers and Segments (customers.modify) - Publish Voucher (vouchers.publish) 👍 To add a holder as a referer, use the Create Publication endpoint.
+
+ :param campaign_id: Unique identifier of a referral program campaign. (required)
+ :type campaign_id: str
+ :param member_id: Unique referral code or its identifier. (required)
+ :type member_id: str
+ :param referrals_members_holders_create_in_bulk_request_body: Specify the customer data to be upserted as redeemable holders.
+ :type referrals_members_holders_create_in_bulk_request_body: ReferralsMembersHoldersCreateInBulkRequestBody
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._referrals_add_holders1_serialize(
+ campaign_id=campaign_id,
+ member_id=member_id,
+ referrals_members_holders_create_in_bulk_request_body=referrals_members_holders_create_in_bulk_request_body,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '2XX': "ReferralsMembersHoldersCreateInBulkResponseBody",
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+
+ def _referrals_add_holders1_serialize(
+ self,
+ campaign_id,
+ member_id,
+ referrals_members_holders_create_in_bulk_request_body,
+ _request_auth,
+ _content_type,
+ _headers,
+ _host_index,
+ ) -> RequestSerialized:
+
+ _host = None
+
+ _collection_formats: Dict[str, str] = {
+ }
+
+ _path_params: Dict[str, str] = {}
+ _query_params: List[Tuple[str, str]] = []
+ _header_params: Dict[str, Optional[str]] = _headers or {}
+ _form_params: List[Tuple[str, str]] = []
+ _files: Dict[str, Union[str, bytes]] = {}
+ _body_params: Optional[bytes] = None
+
+ # process the path parameters
+ if campaign_id is not None:
+ _path_params['campaignId'] = campaign_id
+ if member_id is not None:
+ _path_params['memberId'] = member_id
+ # process the query parameters
+ # process the header parameters
+ # process the form parameters
+ # process the body parameter
+ if referrals_members_holders_create_in_bulk_request_body is not None:
+ _body_params = referrals_members_holders_create_in_bulk_request_body
+
+
+ # set the HTTP header `Accept`
+ if 'Accept' not in _header_params:
+ _header_params['Accept'] = self.api_client.select_header_accept(
+ [
+ 'application/json'
+ ]
+ )
+
+ # set the HTTP header `Content-Type`
+ if _content_type:
+ _header_params['Content-Type'] = _content_type
+ else:
+ _default_content_type = (
+ self.api_client.select_header_content_type(
+ [
+ 'application/json'
+ ]
+ )
+ )
+ if _default_content_type is not None:
+ _header_params['Content-Type'] = _default_content_type
+
+ # authentication setting
+ _auth_settings: List[str] = [
+ 'X-App-Id',
+ 'X-App-Token'
+ ]
+
+ return self.api_client.param_serialize(
+ method='POST',
+ resource_path='/v1/referrals/{campaignId}/members/{memberId}/holders',
+ path_params=_path_params,
+ query_params=_query_params,
+ header_params=_header_params,
+ body=_body_params,
+ post_params=_form_params,
+ files=_files,
+ auth_settings=_auth_settings,
+ collection_formats=_collection_formats,
+ _host=_host,
+ _request_auth=_request_auth
+ )
+
+
+
+
+ @validate_call
+ def referrals_code_holders(
+ self,
+ campaign_id: Annotated[StrictStr, Field(description="Unique identifier of a referral program campaign.")],
+ member_id: Annotated[StrictStr, Field(description="Unique referral code or its identifier.")],
+ limit: Annotated[Optional[Annotated[int, Field(le=100, strict=True, ge=1)]], Field(description="Limits the number of objects to be returned. The limit can range between 1 and 100 items. If no limit is set, it returns 10 items.")] = None,
+ order: Annotated[Optional[ParameterOrderListRedeemables], Field(description="Sorts the results using one of the filtering options, where the dash - preceding a sorting option means sorting in a descending order.")] = None,
+ starting_after_id: Annotated[Optional[StrictStr], Field(description="A cursor for pagination. It retrieves the events starting after an event with the given ID.")] = None,
+ filters: Annotated[Optional[ParameterFiltersListReferralsRedeemableHolders], Field(description="Filters for listing customer redeemables.")] = None,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> ReferralsMembersHoldersListResponseBody:
+ """List Referral Code Holders
+
+ Retrieves all the redeemables that have been assigned to the customer. To use this endpoint, you must have the following permissions: - Read Customers (customers.details.read)
+
+ :param campaign_id: Unique identifier of a referral program campaign. (required)
+ :type campaign_id: str
+ :param member_id: Unique referral code or its identifier. (required)
+ :type member_id: str
+ :param limit: Limits the number of objects to be returned. The limit can range between 1 and 100 items. If no limit is set, it returns 10 items.
+ :type limit: int
+ :param order: Sorts the results using one of the filtering options, where the dash - preceding a sorting option means sorting in a descending order.
+ :type order: ParameterOrderListRedeemables
+ :param starting_after_id: A cursor for pagination. It retrieves the events starting after an event with the given ID.
+ :type starting_after_id: str
+ :param filters: Filters for listing customer redeemables.
+ :type filters: ParameterFiltersListReferralsRedeemableHolders
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._referrals_code_holders_serialize(
+ campaign_id=campaign_id,
+ member_id=member_id,
+ limit=limit,
+ order=order,
+ starting_after_id=starting_after_id,
+ filters=filters,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '2XX': "ReferralsMembersHoldersListResponseBody",
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ ).data
+
+
+ @validate_call
+ def referrals_code_holders_with_http_info(
+ self,
+ campaign_id: Annotated[StrictStr, Field(description="Unique identifier of a referral program campaign.")],
+ member_id: Annotated[StrictStr, Field(description="Unique referral code or its identifier.")],
+ limit: Annotated[Optional[Annotated[int, Field(le=100, strict=True, ge=1)]], Field(description="Limits the number of objects to be returned. The limit can range between 1 and 100 items. If no limit is set, it returns 10 items.")] = None,
+ order: Annotated[Optional[ParameterOrderListRedeemables], Field(description="Sorts the results using one of the filtering options, where the dash - preceding a sorting option means sorting in a descending order.")] = None,
+ starting_after_id: Annotated[Optional[StrictStr], Field(description="A cursor for pagination. It retrieves the events starting after an event with the given ID.")] = None,
+ filters: Annotated[Optional[ParameterFiltersListReferralsRedeemableHolders], Field(description="Filters for listing customer redeemables.")] = None,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> ApiResponse[ReferralsMembersHoldersListResponseBody]:
+ """List Referral Code Holders
+
+ Retrieves all the redeemables that have been assigned to the customer. To use this endpoint, you must have the following permissions: - Read Customers (customers.details.read)
+
+ :param campaign_id: Unique identifier of a referral program campaign. (required)
+ :type campaign_id: str
+ :param member_id: Unique referral code or its identifier. (required)
+ :type member_id: str
+ :param limit: Limits the number of objects to be returned. The limit can range between 1 and 100 items. If no limit is set, it returns 10 items.
+ :type limit: int
+ :param order: Sorts the results using one of the filtering options, where the dash - preceding a sorting option means sorting in a descending order.
+ :type order: ParameterOrderListRedeemables
+ :param starting_after_id: A cursor for pagination. It retrieves the events starting after an event with the given ID.
+ :type starting_after_id: str
+ :param filters: Filters for listing customer redeemables.
+ :type filters: ParameterFiltersListReferralsRedeemableHolders
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._referrals_code_holders_serialize(
+ campaign_id=campaign_id,
+ member_id=member_id,
+ limit=limit,
+ order=order,
+ starting_after_id=starting_after_id,
+ filters=filters,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '2XX': "ReferralsMembersHoldersListResponseBody",
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ )
+
+
+ @validate_call
+ def referrals_code_holders_without_preload_content(
+ self,
+ campaign_id: Annotated[StrictStr, Field(description="Unique identifier of a referral program campaign.")],
+ member_id: Annotated[StrictStr, Field(description="Unique referral code or its identifier.")],
+ limit: Annotated[Optional[Annotated[int, Field(le=100, strict=True, ge=1)]], Field(description="Limits the number of objects to be returned. The limit can range between 1 and 100 items. If no limit is set, it returns 10 items.")] = None,
+ order: Annotated[Optional[ParameterOrderListRedeemables], Field(description="Sorts the results using one of the filtering options, where the dash - preceding a sorting option means sorting in a descending order.")] = None,
+ starting_after_id: Annotated[Optional[StrictStr], Field(description="A cursor for pagination. It retrieves the events starting after an event with the given ID.")] = None,
+ filters: Annotated[Optional[ParameterFiltersListReferralsRedeemableHolders], Field(description="Filters for listing customer redeemables.")] = None,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> RESTResponseType:
+ """List Referral Code Holders
+
+ Retrieves all the redeemables that have been assigned to the customer. To use this endpoint, you must have the following permissions: - Read Customers (customers.details.read)
+
+ :param campaign_id: Unique identifier of a referral program campaign. (required)
+ :type campaign_id: str
+ :param member_id: Unique referral code or its identifier. (required)
+ :type member_id: str
+ :param limit: Limits the number of objects to be returned. The limit can range between 1 and 100 items. If no limit is set, it returns 10 items.
+ :type limit: int
+ :param order: Sorts the results using one of the filtering options, where the dash - preceding a sorting option means sorting in a descending order.
+ :type order: ParameterOrderListRedeemables
+ :param starting_after_id: A cursor for pagination. It retrieves the events starting after an event with the given ID.
+ :type starting_after_id: str
+ :param filters: Filters for listing customer redeemables.
+ :type filters: ParameterFiltersListReferralsRedeemableHolders
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._referrals_code_holders_serialize(
+ campaign_id=campaign_id,
+ member_id=member_id,
+ limit=limit,
+ order=order,
+ starting_after_id=starting_after_id,
+ filters=filters,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '2XX': "ReferralsMembersHoldersListResponseBody",
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+
+ def _referrals_code_holders_serialize(
+ self,
+ campaign_id,
+ member_id,
+ limit,
+ order,
+ starting_after_id,
+ filters,
+ _request_auth,
+ _content_type,
+ _headers,
+ _host_index,
+ ) -> RequestSerialized:
+
+ _host = None
+
+ _collection_formats: Dict[str, str] = {
+ }
+
+ _path_params: Dict[str, str] = {}
+ _query_params: List[Tuple[str, str]] = []
+ _header_params: Dict[str, Optional[str]] = _headers or {}
+ _form_params: List[Tuple[str, str]] = []
+ _files: Dict[str, Union[str, bytes]] = {}
+ _body_params: Optional[bytes] = None
+
+ # process the path parameters
+ if campaign_id is not None:
+ _path_params['campaignId'] = campaign_id
+ if member_id is not None:
+ _path_params['memberId'] = member_id
+ # process the query parameters
+ if limit is not None:
+
+ _query_params.append(('limit', limit))
+
+ if order is not None:
+
+ _query_params.append(('order', order.value))
+
+ if starting_after_id is not None:
+
+ _query_params.append(('starting_after_id', starting_after_id))
+
+ if filters is not None:
+
+ _query_params.append(('filters', filters))
+
+ # process the header parameters
+ # process the form parameters
+ # process the body parameter
+
+
+ # set the HTTP header `Accept`
+ if 'Accept' not in _header_params:
+ _header_params['Accept'] = self.api_client.select_header_accept(
+ [
+ 'application/json'
+ ]
+ )
+
+
+ # authentication setting
+ _auth_settings: List[str] = [
+ 'X-App-Id',
+ 'X-App-Token'
+ ]
+
+ return self.api_client.param_serialize(
+ method='GET',
+ resource_path='/v1/referrals/{campaignId}/members/{memberId}/holders',
+ path_params=_path_params,
+ query_params=_query_params,
+ header_params=_header_params,
+ body=_body_params,
+ post_params=_form_params,
+ files=_files,
+ auth_settings=_auth_settings,
+ collection_formats=_collection_formats,
+ _host=_host,
+ _request_auth=_request_auth
+ )
+
+
+
+
+ @validate_call
+ def referrals_code_holders1(
+ self,
+ member_id: Annotated[StrictStr, Field(description="Unique referral code or its identifier.")],
+ limit: Annotated[Optional[Annotated[int, Field(le=100, strict=True, ge=1)]], Field(description="Limits the number of objects to be returned. The limit can range between 1 and 100 items. If no limit is set, it returns 10 items.")] = None,
+ order: Annotated[Optional[ParameterOrderListRedeemables], Field(description="Sorts the results using one of the filtering options, where the dash - preceding a sorting option means sorting in a descending order.")] = None,
+ starting_after_id: Annotated[Optional[StrictStr], Field(description="A cursor for pagination. It retrieves the events starting after an event with the given ID.")] = None,
+ filters: Annotated[Optional[ParameterFiltersListReferralsRedeemableHolders], Field(description="Filters for listing customer redeemables.")] = None,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> ReferralsMembersHoldersListResponseBody:
+ """List Referral Code Holders
+
+ Retrieves the holders of the referral code from a referral campaign. To use this endpoint, you must have the following permissions: - Read Customers (customers.details.read) 📘 Alternative endpoint This endpoint is an alternative to the List Member Holders endpoint. The URL was re-designed to retrieve the referral member holders without providing the campaignId as a path paremeter.
+
+ :param member_id: Unique referral code or its identifier. (required)
+ :type member_id: str
+ :param limit: Limits the number of objects to be returned. The limit can range between 1 and 100 items. If no limit is set, it returns 10 items.
+ :type limit: int
+ :param order: Sorts the results using one of the filtering options, where the dash - preceding a sorting option means sorting in a descending order.
+ :type order: ParameterOrderListRedeemables
+ :param starting_after_id: A cursor for pagination. It retrieves the events starting after an event with the given ID.
+ :type starting_after_id: str
+ :param filters: Filters for listing customer redeemables.
+ :type filters: ParameterFiltersListReferralsRedeemableHolders
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._referrals_code_holders1_serialize(
+ member_id=member_id,
+ limit=limit,
+ order=order,
+ starting_after_id=starting_after_id,
+ filters=filters,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '2XX': "ReferralsMembersHoldersListResponseBody",
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ ).data
+
+
+ @validate_call
+ def referrals_code_holders1_with_http_info(
+ self,
+ member_id: Annotated[StrictStr, Field(description="Unique referral code or its identifier.")],
+ limit: Annotated[Optional[Annotated[int, Field(le=100, strict=True, ge=1)]], Field(description="Limits the number of objects to be returned. The limit can range between 1 and 100 items. If no limit is set, it returns 10 items.")] = None,
+ order: Annotated[Optional[ParameterOrderListRedeemables], Field(description="Sorts the results using one of the filtering options, where the dash - preceding a sorting option means sorting in a descending order.")] = None,
+ starting_after_id: Annotated[Optional[StrictStr], Field(description="A cursor for pagination. It retrieves the events starting after an event with the given ID.")] = None,
+ filters: Annotated[Optional[ParameterFiltersListReferralsRedeemableHolders], Field(description="Filters for listing customer redeemables.")] = None,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> ApiResponse[ReferralsMembersHoldersListResponseBody]:
+ """List Referral Code Holders
+
+ Retrieves the holders of the referral code from a referral campaign. To use this endpoint, you must have the following permissions: - Read Customers (customers.details.read) 📘 Alternative endpoint This endpoint is an alternative to the List Member Holders endpoint. The URL was re-designed to retrieve the referral member holders without providing the campaignId as a path paremeter.
+
+ :param member_id: Unique referral code or its identifier. (required)
+ :type member_id: str
+ :param limit: Limits the number of objects to be returned. The limit can range between 1 and 100 items. If no limit is set, it returns 10 items.
+ :type limit: int
+ :param order: Sorts the results using one of the filtering options, where the dash - preceding a sorting option means sorting in a descending order.
+ :type order: ParameterOrderListRedeemables
+ :param starting_after_id: A cursor for pagination. It retrieves the events starting after an event with the given ID.
+ :type starting_after_id: str
+ :param filters: Filters for listing customer redeemables.
+ :type filters: ParameterFiltersListReferralsRedeemableHolders
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._referrals_code_holders1_serialize(
+ member_id=member_id,
+ limit=limit,
+ order=order,
+ starting_after_id=starting_after_id,
+ filters=filters,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '2XX': "ReferralsMembersHoldersListResponseBody",
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ )
+
+
+ @validate_call
+ def referrals_code_holders1_without_preload_content(
+ self,
+ member_id: Annotated[StrictStr, Field(description="Unique referral code or its identifier.")],
+ limit: Annotated[Optional[Annotated[int, Field(le=100, strict=True, ge=1)]], Field(description="Limits the number of objects to be returned. The limit can range between 1 and 100 items. If no limit is set, it returns 10 items.")] = None,
+ order: Annotated[Optional[ParameterOrderListRedeemables], Field(description="Sorts the results using one of the filtering options, where the dash - preceding a sorting option means sorting in a descending order.")] = None,
+ starting_after_id: Annotated[Optional[StrictStr], Field(description="A cursor for pagination. It retrieves the events starting after an event with the given ID.")] = None,
+ filters: Annotated[Optional[ParameterFiltersListReferralsRedeemableHolders], Field(description="Filters for listing customer redeemables.")] = None,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> RESTResponseType:
+ """List Referral Code Holders
+
+ Retrieves the holders of the referral code from a referral campaign. To use this endpoint, you must have the following permissions: - Read Customers (customers.details.read) 📘 Alternative endpoint This endpoint is an alternative to the List Member Holders endpoint. The URL was re-designed to retrieve the referral member holders without providing the campaignId as a path paremeter.
+
+ :param member_id: Unique referral code or its identifier. (required)
+ :type member_id: str
+ :param limit: Limits the number of objects to be returned. The limit can range between 1 and 100 items. If no limit is set, it returns 10 items.
+ :type limit: int
+ :param order: Sorts the results using one of the filtering options, where the dash - preceding a sorting option means sorting in a descending order.
+ :type order: ParameterOrderListRedeemables
+ :param starting_after_id: A cursor for pagination. It retrieves the events starting after an event with the given ID.
+ :type starting_after_id: str
+ :param filters: Filters for listing customer redeemables.
+ :type filters: ParameterFiltersListReferralsRedeemableHolders
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._referrals_code_holders1_serialize(
+ member_id=member_id,
+ limit=limit,
+ order=order,
+ starting_after_id=starting_after_id,
+ filters=filters,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '2XX': "ReferralsMembersHoldersListResponseBody",
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+
+ def _referrals_code_holders1_serialize(
+ self,
+ member_id,
+ limit,
+ order,
+ starting_after_id,
+ filters,
+ _request_auth,
+ _content_type,
+ _headers,
+ _host_index,
+ ) -> RequestSerialized:
+
+ _host = None
+
+ _collection_formats: Dict[str, str] = {
+ }
+
+ _path_params: Dict[str, str] = {}
+ _query_params: List[Tuple[str, str]] = []
+ _header_params: Dict[str, Optional[str]] = _headers or {}
+ _form_params: List[Tuple[str, str]] = []
+ _files: Dict[str, Union[str, bytes]] = {}
+ _body_params: Optional[bytes] = None
+
+ # process the path parameters
+ if member_id is not None:
+ _path_params['memberId'] = member_id
+ # process the query parameters
+ if limit is not None:
+
+ _query_params.append(('limit', limit))
+
+ if order is not None:
+
+ _query_params.append(('order', order.value))
+
+ if starting_after_id is not None:
+
+ _query_params.append(('starting_after_id', starting_after_id))
+
+ if filters is not None:
+
+ _query_params.append(('filters', filters))
+
+ # process the header parameters
+ # process the form parameters
+ # process the body parameter
+
+
+ # set the HTTP header `Accept`
+ if 'Accept' not in _header_params:
+ _header_params['Accept'] = self.api_client.select_header_accept(
+ [
+ 'application/json'
+ ]
+ )
+
+
+ # authentication setting
+ _auth_settings: List[str] = [
+ 'X-App-Id',
+ 'X-App-Token'
+ ]
+
+ return self.api_client.param_serialize(
+ method='GET',
+ resource_path='/v1/referrals/members/{memberId}/holders',
+ path_params=_path_params,
+ query_params=_query_params,
+ header_params=_header_params,
+ body=_body_params,
+ post_params=_form_params,
+ files=_files,
+ auth_settings=_auth_settings,
+ collection_formats=_collection_formats,
+ _host=_host,
+ _request_auth=_request_auth
+ )
+
+
+
+
+ @validate_call
+ def referrals_remove_holder(
+ self,
+ member_id: Annotated[StrictStr, Field(description="Unique referral code or its identifier.")],
+ holder_id: Annotated[StrictStr, Field(description="Unique identifier of a redeemable holder.")],
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> None:
+ """Remove Referral Card Holder
+
+ Removes the holder from a referral card. You can remove a referee only. To use this endpoint, you must have the following permissions: - Create and modify Customers and Segments (customers.modify) - Publish Voucher (vouchers.publish) 📘 Alternative endpoint This endpoint is an alternative to the Remove Referral Card Holder endpoint. The URL was re-designed to retrieve the referral member holders without providing the campaignId as a path paremeter.
+
+ :param member_id: Unique referral code or its identifier. (required)
+ :type member_id: str
+ :param holder_id: Unique identifier of a redeemable holder. (required)
+ :type holder_id: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._referrals_remove_holder_serialize(
+ member_id=member_id,
+ holder_id=holder_id,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '2XX': None,
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ ).data
+
+
+ @validate_call
+ def referrals_remove_holder_with_http_info(
+ self,
+ member_id: Annotated[StrictStr, Field(description="Unique referral code or its identifier.")],
+ holder_id: Annotated[StrictStr, Field(description="Unique identifier of a redeemable holder.")],
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> ApiResponse[None]:
+ """Remove Referral Card Holder
+
+ Removes the holder from a referral card. You can remove a referee only. To use this endpoint, you must have the following permissions: - Create and modify Customers and Segments (customers.modify) - Publish Voucher (vouchers.publish) 📘 Alternative endpoint This endpoint is an alternative to the Remove Referral Card Holder endpoint. The URL was re-designed to retrieve the referral member holders without providing the campaignId as a path paremeter.
+
+ :param member_id: Unique referral code or its identifier. (required)
+ :type member_id: str
+ :param holder_id: Unique identifier of a redeemable holder. (required)
+ :type holder_id: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._referrals_remove_holder_serialize(
+ member_id=member_id,
+ holder_id=holder_id,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '2XX': None,
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ )
+
+
+ @validate_call
+ def referrals_remove_holder_without_preload_content(
+ self,
+ member_id: Annotated[StrictStr, Field(description="Unique referral code or its identifier.")],
+ holder_id: Annotated[StrictStr, Field(description="Unique identifier of a redeemable holder.")],
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> RESTResponseType:
+ """Remove Referral Card Holder
+
+ Removes the holder from a referral card. You can remove a referee only. To use this endpoint, you must have the following permissions: - Create and modify Customers and Segments (customers.modify) - Publish Voucher (vouchers.publish) 📘 Alternative endpoint This endpoint is an alternative to the Remove Referral Card Holder endpoint. The URL was re-designed to retrieve the referral member holders without providing the campaignId as a path paremeter.
+
+ :param member_id: Unique referral code or its identifier. (required)
+ :type member_id: str
+ :param holder_id: Unique identifier of a redeemable holder. (required)
+ :type holder_id: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._referrals_remove_holder_serialize(
+ member_id=member_id,
+ holder_id=holder_id,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '2XX': None,
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+
+ def _referrals_remove_holder_serialize(
+ self,
+ member_id,
+ holder_id,
+ _request_auth,
+ _content_type,
+ _headers,
+ _host_index,
+ ) -> RequestSerialized:
+
+ _host = None
+
+ _collection_formats: Dict[str, str] = {
+ }
+
+ _path_params: Dict[str, str] = {}
+ _query_params: List[Tuple[str, str]] = []
+ _header_params: Dict[str, Optional[str]] = _headers or {}
+ _form_params: List[Tuple[str, str]] = []
+ _files: Dict[str, Union[str, bytes]] = {}
+ _body_params: Optional[bytes] = None
+
+ # process the path parameters
+ if member_id is not None:
+ _path_params['memberId'] = member_id
+ if holder_id is not None:
+ _path_params['holderId'] = holder_id
+ # process the query parameters
+ # process the header parameters
+ # process the form parameters
+ # process the body parameter
+
+
+
+
+ # authentication setting
+ _auth_settings: List[str] = [
+ 'X-App-Id',
+ 'X-App-Token'
+ ]
+
+ return self.api_client.param_serialize(
+ method='DELETE',
+ resource_path='/v1/referrals/members/{memberId}/holders/{holderId}',
+ path_params=_path_params,
+ query_params=_query_params,
+ header_params=_header_params,
+ body=_body_params,
+ post_params=_form_params,
+ files=_files,
+ auth_settings=_auth_settings,
+ collection_formats=_collection_formats,
+ _host=_host,
+ _request_auth=_request_auth
+ )
+
+
+
+
+ @validate_call
+ def referrals_remove_holder1(
+ self,
+ campaign_id: Annotated[StrictStr, Field(description="Unique identifier of a referral program campaign.")],
+ member_id: Annotated[StrictStr, Field(description="Unique referral code or its identifier.")],
+ holder_id: Annotated[StrictStr, Field(description="Unique identifier of a redeemable holder.")],
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> None:
+ """Remove Referral Card Holder
+
+ Removes the holder from a referral card. You can remove a referee only. To use this endpoint, you must have the following permissions: - Create and modify Customers and Segments (customers.modify) - Publish Voucher (vouchers.publish)
+
+ :param campaign_id: Unique identifier of a referral program campaign. (required)
+ :type campaign_id: str
+ :param member_id: Unique referral code or its identifier. (required)
+ :type member_id: str
+ :param holder_id: Unique identifier of a redeemable holder. (required)
+ :type holder_id: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._referrals_remove_holder1_serialize(
+ campaign_id=campaign_id,
+ member_id=member_id,
+ holder_id=holder_id,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '2XX': None,
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ ).data
+
+
+ @validate_call
+ def referrals_remove_holder1_with_http_info(
+ self,
+ campaign_id: Annotated[StrictStr, Field(description="Unique identifier of a referral program campaign.")],
+ member_id: Annotated[StrictStr, Field(description="Unique referral code or its identifier.")],
+ holder_id: Annotated[StrictStr, Field(description="Unique identifier of a redeemable holder.")],
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> ApiResponse[None]:
+ """Remove Referral Card Holder
+
+ Removes the holder from a referral card. You can remove a referee only. To use this endpoint, you must have the following permissions: - Create and modify Customers and Segments (customers.modify) - Publish Voucher (vouchers.publish)
+
+ :param campaign_id: Unique identifier of a referral program campaign. (required)
+ :type campaign_id: str
+ :param member_id: Unique referral code or its identifier. (required)
+ :type member_id: str
+ :param holder_id: Unique identifier of a redeemable holder. (required)
+ :type holder_id: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._referrals_remove_holder1_serialize(
+ campaign_id=campaign_id,
+ member_id=member_id,
+ holder_id=holder_id,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '2XX': None,
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ )
+
+
+ @validate_call
+ def referrals_remove_holder1_without_preload_content(
+ self,
+ campaign_id: Annotated[StrictStr, Field(description="Unique identifier of a referral program campaign.")],
+ member_id: Annotated[StrictStr, Field(description="Unique referral code or its identifier.")],
+ holder_id: Annotated[StrictStr, Field(description="Unique identifier of a redeemable holder.")],
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> RESTResponseType:
+ """Remove Referral Card Holder
+
+ Removes the holder from a referral card. You can remove a referee only. To use this endpoint, you must have the following permissions: - Create and modify Customers and Segments (customers.modify) - Publish Voucher (vouchers.publish)
+
+ :param campaign_id: Unique identifier of a referral program campaign. (required)
+ :type campaign_id: str
+ :param member_id: Unique referral code or its identifier. (required)
+ :type member_id: str
+ :param holder_id: Unique identifier of a redeemable holder. (required)
+ :type holder_id: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._referrals_remove_holder1_serialize(
+ campaign_id=campaign_id,
+ member_id=member_id,
+ holder_id=holder_id,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '2XX': None,
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+
+ def _referrals_remove_holder1_serialize(
+ self,
+ campaign_id,
+ member_id,
+ holder_id,
+ _request_auth,
+ _content_type,
+ _headers,
+ _host_index,
+ ) -> RequestSerialized:
+
+ _host = None
+
+ _collection_formats: Dict[str, str] = {
+ }
+
+ _path_params: Dict[str, str] = {}
+ _query_params: List[Tuple[str, str]] = []
+ _header_params: Dict[str, Optional[str]] = _headers or {}
+ _form_params: List[Tuple[str, str]] = []
+ _files: Dict[str, Union[str, bytes]] = {}
+ _body_params: Optional[bytes] = None
+
+ # process the path parameters
+ if campaign_id is not None:
+ _path_params['campaignId'] = campaign_id
+ if member_id is not None:
+ _path_params['memberId'] = member_id
+ if holder_id is not None:
+ _path_params['holderId'] = holder_id
+ # process the query parameters
+ # process the header parameters
+ # process the form parameters
+ # process the body parameter
+
+
+
+
+ # authentication setting
+ _auth_settings: List[str] = [
+ 'X-App-Id',
+ 'X-App-Token'
+ ]
+
+ return self.api_client.param_serialize(
+ method='DELETE',
+ resource_path='/v1/referrals/{campaignId}/members/{memberId}/holders/{holderId}',
+ path_params=_path_params,
+ query_params=_query_params,
+ header_params=_header_params,
+ body=_body_params,
+ post_params=_form_params,
+ files=_files,
+ auth_settings=_auth_settings,
+ collection_formats=_collection_formats,
+ _host=_host,
+ _request_auth=_request_auth
+ )
+
+
diff --git a/voucherify/api/templates_api.py b/voucherify/api/templates_api.py
new file mode 100644
index 00000000..0c48f184
--- /dev/null
+++ b/voucherify/api/templates_api.py
@@ -0,0 +1,2031 @@
+# coding: utf-8
+
+"""
+ Voucherify API
+
+ Voucherify promotion engine REST API. Please see https://docs.voucherify.io/docs for more details.
+
+ The version of the OpenAPI document: v2018-08-01
+ Contact: support@voucherify.io
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+import warnings
+from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt
+from typing import Any, Dict, List, Optional, Tuple, Union
+from typing_extensions import Annotated
+
+from pydantic import Field, StrictBool, StrictStr
+from typing import Optional
+from typing_extensions import Annotated
+from voucherify.models.parameter_filters_list_templates import ParameterFiltersListTemplates
+from voucherify.models.parameter_templates_list import ParameterTemplatesList
+from voucherify.models.templates_campaigns_campaign_setup_create_request_body import TemplatesCampaignsCampaignSetupCreateRequestBody
+from voucherify.models.templates_campaigns_campaign_setup_create_response_body import TemplatesCampaignsCampaignSetupCreateResponseBody
+from voucherify.models.templates_campaigns_create_request_body import TemplatesCampaignsCreateRequestBody
+from voucherify.models.templates_campaigns_create_template_response_body import TemplatesCampaignsCreateTemplateResponseBody
+from voucherify.models.templates_campaigns_get_response_body import TemplatesCampaignsGetResponseBody
+from voucherify.models.templates_campaigns_list_response_body import TemplatesCampaignsListResponseBody
+from voucherify.models.templates_campaigns_tier_setup_create_request_body import TemplatesCampaignsTierSetupCreateRequestBody
+from voucherify.models.templates_campaigns_tier_setup_create_response_body import TemplatesCampaignsTierSetupCreateResponseBody
+from voucherify.models.templates_campaigns_update_request_body import TemplatesCampaignsUpdateRequestBody
+from voucherify.models.templates_campaigns_update_response_body import TemplatesCampaignsUpdateResponseBody
+
+from voucherify.api_client import ApiClient, RequestSerialized
+from voucherify.api_response import ApiResponse
+from voucherify.rest import RESTResponseType
+
+
+class TemplatesApi:
+ """NOTE: This class is auto generated by OpenAPI Generator
+ Ref: https://openapi-generator.tech
+
+ Do not edit the class manually.
+ """
+
+ def __init__(self, api_client=None) -> None:
+ if api_client is None:
+ api_client = ApiClient.get_default()
+ self.api_client = api_client
+
+
+ @validate_call
+ def add_tier_from_template(
+ self,
+ campaign_template_id: Annotated[StrictStr, Field(description="Pass the campaign template ID that was assigned by Voucherify.")],
+ templates_campaigns_tier_setup_create_request_body: Annotated[Optional[TemplatesCampaignsTierSetupCreateRequestBody], Field(description="Only name and campaign_id are required. The rest of the fields will overwrite the template configuration.")] = None,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> TemplatesCampaignsTierSetupCreateResponseBody:
+ """Add Promotion Tier From Template
+
+ Creates a promotion tier out of a discount campaign template and adds it to an existing promotion campaign. To add a promotion tier to a campaign, you need to provide the name in the request and the campaign ID. Other fields are optional. If no other fields are sent, the configuration from the template will be used. You can send new values of the fields listed below to replace the settings saved in the template. However, you cannot assign an action or an existing validation rule or create a new one in the request. If the template has a validation rule, a new validation rule is always created for the promotion tier. When the promotion tier has been created, then you can: - Update the validation rule, - Unassign the validation rule, - Assign an existing validation rule. 👍 Promotion Tiers and Campaign Templates You can create a campaign template out of a promotion tier. Promotion tiers are converted to a discount campaign with the DISCOUNT_COUPON type. You can use this template to create: - Discount campaign - Promotion tier 📘 Campaign Templates – Documentation Read the [Campaign Templates documentation](https://support.voucherify.io/article/620-campaign-templates) to learn more about this feature.
+
+ :param campaign_template_id: Pass the campaign template ID that was assigned by Voucherify. (required)
+ :type campaign_template_id: str
+ :param templates_campaigns_tier_setup_create_request_body: Only name and campaign_id are required. The rest of the fields will overwrite the template configuration.
+ :type templates_campaigns_tier_setup_create_request_body: TemplatesCampaignsTierSetupCreateRequestBody
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._add_tier_from_template_serialize(
+ campaign_template_id=campaign_template_id,
+ templates_campaigns_tier_setup_create_request_body=templates_campaigns_tier_setup_create_request_body,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '2XX': "TemplatesCampaignsTierSetupCreateResponseBody",
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ ).data
+
+
+ @validate_call
+ def add_tier_from_template_with_http_info(
+ self,
+ campaign_template_id: Annotated[StrictStr, Field(description="Pass the campaign template ID that was assigned by Voucherify.")],
+ templates_campaigns_tier_setup_create_request_body: Annotated[Optional[TemplatesCampaignsTierSetupCreateRequestBody], Field(description="Only name and campaign_id are required. The rest of the fields will overwrite the template configuration.")] = None,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> ApiResponse[TemplatesCampaignsTierSetupCreateResponseBody]:
+ """Add Promotion Tier From Template
+
+ Creates a promotion tier out of a discount campaign template and adds it to an existing promotion campaign. To add a promotion tier to a campaign, you need to provide the name in the request and the campaign ID. Other fields are optional. If no other fields are sent, the configuration from the template will be used. You can send new values of the fields listed below to replace the settings saved in the template. However, you cannot assign an action or an existing validation rule or create a new one in the request. If the template has a validation rule, a new validation rule is always created for the promotion tier. When the promotion tier has been created, then you can: - Update the validation rule, - Unassign the validation rule, - Assign an existing validation rule. 👍 Promotion Tiers and Campaign Templates You can create a campaign template out of a promotion tier. Promotion tiers are converted to a discount campaign with the DISCOUNT_COUPON type. You can use this template to create: - Discount campaign - Promotion tier 📘 Campaign Templates – Documentation Read the [Campaign Templates documentation](https://support.voucherify.io/article/620-campaign-templates) to learn more about this feature.
+
+ :param campaign_template_id: Pass the campaign template ID that was assigned by Voucherify. (required)
+ :type campaign_template_id: str
+ :param templates_campaigns_tier_setup_create_request_body: Only name and campaign_id are required. The rest of the fields will overwrite the template configuration.
+ :type templates_campaigns_tier_setup_create_request_body: TemplatesCampaignsTierSetupCreateRequestBody
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._add_tier_from_template_serialize(
+ campaign_template_id=campaign_template_id,
+ templates_campaigns_tier_setup_create_request_body=templates_campaigns_tier_setup_create_request_body,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '2XX': "TemplatesCampaignsTierSetupCreateResponseBody",
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ )
+
+
+ @validate_call
+ def add_tier_from_template_without_preload_content(
+ self,
+ campaign_template_id: Annotated[StrictStr, Field(description="Pass the campaign template ID that was assigned by Voucherify.")],
+ templates_campaigns_tier_setup_create_request_body: Annotated[Optional[TemplatesCampaignsTierSetupCreateRequestBody], Field(description="Only name and campaign_id are required. The rest of the fields will overwrite the template configuration.")] = None,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> RESTResponseType:
+ """Add Promotion Tier From Template
+
+ Creates a promotion tier out of a discount campaign template and adds it to an existing promotion campaign. To add a promotion tier to a campaign, you need to provide the name in the request and the campaign ID. Other fields are optional. If no other fields are sent, the configuration from the template will be used. You can send new values of the fields listed below to replace the settings saved in the template. However, you cannot assign an action or an existing validation rule or create a new one in the request. If the template has a validation rule, a new validation rule is always created for the promotion tier. When the promotion tier has been created, then you can: - Update the validation rule, - Unassign the validation rule, - Assign an existing validation rule. 👍 Promotion Tiers and Campaign Templates You can create a campaign template out of a promotion tier. Promotion tiers are converted to a discount campaign with the DISCOUNT_COUPON type. You can use this template to create: - Discount campaign - Promotion tier 📘 Campaign Templates – Documentation Read the [Campaign Templates documentation](https://support.voucherify.io/article/620-campaign-templates) to learn more about this feature.
+
+ :param campaign_template_id: Pass the campaign template ID that was assigned by Voucherify. (required)
+ :type campaign_template_id: str
+ :param templates_campaigns_tier_setup_create_request_body: Only name and campaign_id are required. The rest of the fields will overwrite the template configuration.
+ :type templates_campaigns_tier_setup_create_request_body: TemplatesCampaignsTierSetupCreateRequestBody
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._add_tier_from_template_serialize(
+ campaign_template_id=campaign_template_id,
+ templates_campaigns_tier_setup_create_request_body=templates_campaigns_tier_setup_create_request_body,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '2XX': "TemplatesCampaignsTierSetupCreateResponseBody",
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+
+ def _add_tier_from_template_serialize(
+ self,
+ campaign_template_id,
+ templates_campaigns_tier_setup_create_request_body,
+ _request_auth,
+ _content_type,
+ _headers,
+ _host_index,
+ ) -> RequestSerialized:
+
+ _host = None
+
+ _collection_formats: Dict[str, str] = {
+ }
+
+ _path_params: Dict[str, str] = {}
+ _query_params: List[Tuple[str, str]] = []
+ _header_params: Dict[str, Optional[str]] = _headers or {}
+ _form_params: List[Tuple[str, str]] = []
+ _files: Dict[str, Union[str, bytes]] = {}
+ _body_params: Optional[bytes] = None
+
+ # process the path parameters
+ if campaign_template_id is not None:
+ _path_params['campaignTemplateId'] = campaign_template_id
+ # process the query parameters
+ # process the header parameters
+ # process the form parameters
+ # process the body parameter
+ if templates_campaigns_tier_setup_create_request_body is not None:
+ _body_params = templates_campaigns_tier_setup_create_request_body
+
+
+ # set the HTTP header `Accept`
+ if 'Accept' not in _header_params:
+ _header_params['Accept'] = self.api_client.select_header_accept(
+ [
+ 'application/json'
+ ]
+ )
+
+ # set the HTTP header `Content-Type`
+ if _content_type:
+ _header_params['Content-Type'] = _content_type
+ else:
+ _default_content_type = (
+ self.api_client.select_header_content_type(
+ [
+ 'application/json'
+ ]
+ )
+ )
+ if _default_content_type is not None:
+ _header_params['Content-Type'] = _default_content_type
+
+ # authentication setting
+ _auth_settings: List[str] = [
+ 'X-App-Id',
+ 'X-App-Token'
+ ]
+
+ return self.api_client.param_serialize(
+ method='POST',
+ resource_path='/v1/templates/campaigns/{campaignTemplateId}/tier-setup',
+ path_params=_path_params,
+ query_params=_query_params,
+ header_params=_header_params,
+ body=_body_params,
+ post_params=_form_params,
+ files=_files,
+ auth_settings=_auth_settings,
+ collection_formats=_collection_formats,
+ _host=_host,
+ _request_auth=_request_auth
+ )
+
+
+
+
+ @validate_call
+ def create_campaign_from_template(
+ self,
+ campaign_template_id: Annotated[StrictStr, Field(description="Pass the campaign template ID that was assigned by Voucherify.")],
+ templates_campaigns_campaign_setup_create_request_body: Annotated[Optional[TemplatesCampaignsCampaignSetupCreateRequestBody], Field(description="Only name is required. The rest of the fields will overwrite the template configuration.")] = None,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> TemplatesCampaignsCampaignSetupCreateResponseBody:
+ """Create Campaign From Template
+
+ Creates a campaign out of a campaign template. To create a campaign, you need to provide the name in the request, while other fields are optional. If no other fields are sent, the configuration from the template will be used. You can send new values of the fields listed below to replace the settings saved in the template. However, you cannot assign an existing validation rule or create a new one in the request. If the template has a validation rule, a new validation rule is always created for the campaign. When the campaign has been created, then you can: - Update the validation rule, - Unassign the validation rule, - Assign an existing validation rule. 👍 Promotion Tiers and Campaign Templates You can create a campaign template out of a promotion tier. Promotion tiers are converted to a discount campaign with the DISCOUNT_COUPON type. You can use this template to create: - Discount campaign - Promotion tier 📘 Campaign Templates – Documentation Read the [Campaign Templates documentation](https://support.voucherify.io/article/620-campaign-templates) to learn more about this feature.
+
+ :param campaign_template_id: Pass the campaign template ID that was assigned by Voucherify. (required)
+ :type campaign_template_id: str
+ :param templates_campaigns_campaign_setup_create_request_body: Only name is required. The rest of the fields will overwrite the template configuration.
+ :type templates_campaigns_campaign_setup_create_request_body: TemplatesCampaignsCampaignSetupCreateRequestBody
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._create_campaign_from_template_serialize(
+ campaign_template_id=campaign_template_id,
+ templates_campaigns_campaign_setup_create_request_body=templates_campaigns_campaign_setup_create_request_body,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '2XX': "TemplatesCampaignsCampaignSetupCreateResponseBody",
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ ).data
+
+
+ @validate_call
+ def create_campaign_from_template_with_http_info(
+ self,
+ campaign_template_id: Annotated[StrictStr, Field(description="Pass the campaign template ID that was assigned by Voucherify.")],
+ templates_campaigns_campaign_setup_create_request_body: Annotated[Optional[TemplatesCampaignsCampaignSetupCreateRequestBody], Field(description="Only name is required. The rest of the fields will overwrite the template configuration.")] = None,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> ApiResponse[TemplatesCampaignsCampaignSetupCreateResponseBody]:
+ """Create Campaign From Template
+
+ Creates a campaign out of a campaign template. To create a campaign, you need to provide the name in the request, while other fields are optional. If no other fields are sent, the configuration from the template will be used. You can send new values of the fields listed below to replace the settings saved in the template. However, you cannot assign an existing validation rule or create a new one in the request. If the template has a validation rule, a new validation rule is always created for the campaign. When the campaign has been created, then you can: - Update the validation rule, - Unassign the validation rule, - Assign an existing validation rule. 👍 Promotion Tiers and Campaign Templates You can create a campaign template out of a promotion tier. Promotion tiers are converted to a discount campaign with the DISCOUNT_COUPON type. You can use this template to create: - Discount campaign - Promotion tier 📘 Campaign Templates – Documentation Read the [Campaign Templates documentation](https://support.voucherify.io/article/620-campaign-templates) to learn more about this feature.
+
+ :param campaign_template_id: Pass the campaign template ID that was assigned by Voucherify. (required)
+ :type campaign_template_id: str
+ :param templates_campaigns_campaign_setup_create_request_body: Only name is required. The rest of the fields will overwrite the template configuration.
+ :type templates_campaigns_campaign_setup_create_request_body: TemplatesCampaignsCampaignSetupCreateRequestBody
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._create_campaign_from_template_serialize(
+ campaign_template_id=campaign_template_id,
+ templates_campaigns_campaign_setup_create_request_body=templates_campaigns_campaign_setup_create_request_body,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '2XX': "TemplatesCampaignsCampaignSetupCreateResponseBody",
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ )
+
+
+ @validate_call
+ def create_campaign_from_template_without_preload_content(
+ self,
+ campaign_template_id: Annotated[StrictStr, Field(description="Pass the campaign template ID that was assigned by Voucherify.")],
+ templates_campaigns_campaign_setup_create_request_body: Annotated[Optional[TemplatesCampaignsCampaignSetupCreateRequestBody], Field(description="Only name is required. The rest of the fields will overwrite the template configuration.")] = None,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> RESTResponseType:
+ """Create Campaign From Template
+
+ Creates a campaign out of a campaign template. To create a campaign, you need to provide the name in the request, while other fields are optional. If no other fields are sent, the configuration from the template will be used. You can send new values of the fields listed below to replace the settings saved in the template. However, you cannot assign an existing validation rule or create a new one in the request. If the template has a validation rule, a new validation rule is always created for the campaign. When the campaign has been created, then you can: - Update the validation rule, - Unassign the validation rule, - Assign an existing validation rule. 👍 Promotion Tiers and Campaign Templates You can create a campaign template out of a promotion tier. Promotion tiers are converted to a discount campaign with the DISCOUNT_COUPON type. You can use this template to create: - Discount campaign - Promotion tier 📘 Campaign Templates – Documentation Read the [Campaign Templates documentation](https://support.voucherify.io/article/620-campaign-templates) to learn more about this feature.
+
+ :param campaign_template_id: Pass the campaign template ID that was assigned by Voucherify. (required)
+ :type campaign_template_id: str
+ :param templates_campaigns_campaign_setup_create_request_body: Only name is required. The rest of the fields will overwrite the template configuration.
+ :type templates_campaigns_campaign_setup_create_request_body: TemplatesCampaignsCampaignSetupCreateRequestBody
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._create_campaign_from_template_serialize(
+ campaign_template_id=campaign_template_id,
+ templates_campaigns_campaign_setup_create_request_body=templates_campaigns_campaign_setup_create_request_body,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '2XX': "TemplatesCampaignsCampaignSetupCreateResponseBody",
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+
+ def _create_campaign_from_template_serialize(
+ self,
+ campaign_template_id,
+ templates_campaigns_campaign_setup_create_request_body,
+ _request_auth,
+ _content_type,
+ _headers,
+ _host_index,
+ ) -> RequestSerialized:
+
+ _host = None
+
+ _collection_formats: Dict[str, str] = {
+ }
+
+ _path_params: Dict[str, str] = {}
+ _query_params: List[Tuple[str, str]] = []
+ _header_params: Dict[str, Optional[str]] = _headers or {}
+ _form_params: List[Tuple[str, str]] = []
+ _files: Dict[str, Union[str, bytes]] = {}
+ _body_params: Optional[bytes] = None
+
+ # process the path parameters
+ if campaign_template_id is not None:
+ _path_params['campaignTemplateId'] = campaign_template_id
+ # process the query parameters
+ # process the header parameters
+ # process the form parameters
+ # process the body parameter
+ if templates_campaigns_campaign_setup_create_request_body is not None:
+ _body_params = templates_campaigns_campaign_setup_create_request_body
+
+
+ # set the HTTP header `Accept`
+ if 'Accept' not in _header_params:
+ _header_params['Accept'] = self.api_client.select_header_accept(
+ [
+ 'application/json'
+ ]
+ )
+
+ # set the HTTP header `Content-Type`
+ if _content_type:
+ _header_params['Content-Type'] = _content_type
+ else:
+ _default_content_type = (
+ self.api_client.select_header_content_type(
+ [
+ 'application/json'
+ ]
+ )
+ )
+ if _default_content_type is not None:
+ _header_params['Content-Type'] = _default_content_type
+
+ # authentication setting
+ _auth_settings: List[str] = [
+ 'X-App-Id',
+ 'X-App-Token'
+ ]
+
+ return self.api_client.param_serialize(
+ method='POST',
+ resource_path='/v1/templates/campaigns/{campaignTemplateId}/campaign-setup',
+ path_params=_path_params,
+ query_params=_query_params,
+ header_params=_header_params,
+ body=_body_params,
+ post_params=_form_params,
+ files=_files,
+ auth_settings=_auth_settings,
+ collection_formats=_collection_formats,
+ _host=_host,
+ _request_auth=_request_auth
+ )
+
+
+
+
+ @validate_call
+ def create_campaign_template(
+ self,
+ templates_campaigns_create_request_body: Annotated[Optional[TemplatesCampaignsCreateRequestBody], Field(description="Provide details for a campaign template")] = None,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> TemplatesCampaignsCreateTemplateResponseBody:
+ """Create Campaign Template
+
+ Creates a template for a discount or gift campaign, or a promotion tier. A template stores campaign configuration **without** the following details: - Campaign name - Category - Code count The following elements are not supported by campaign templates: - Redeeming API keys - Redeeming users - Customer loyalty tier - Static segments 👍 Promotion Tiers and Campaign Templates You can create a campaign template out of a promotion tier. Promotion tiers are converted to a discount campaign with the DISCOUNT_COUPON type. You can use this template to create: - Discount campaign, - Promotion tier. 📘 Campaign Templates – Documentation Read the [Campaign Templates documentation](https://support.voucherify.io/article/620-campaign-templates) to learn more about this feature.
+
+ :param templates_campaigns_create_request_body: Provide details for a campaign template
+ :type templates_campaigns_create_request_body: TemplatesCampaignsCreateRequestBody
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._create_campaign_template_serialize(
+ templates_campaigns_create_request_body=templates_campaigns_create_request_body,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '2XX': "TemplatesCampaignsCreateTemplateResponseBody",
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ ).data
+
+
+ @validate_call
+ def create_campaign_template_with_http_info(
+ self,
+ templates_campaigns_create_request_body: Annotated[Optional[TemplatesCampaignsCreateRequestBody], Field(description="Provide details for a campaign template")] = None,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> ApiResponse[TemplatesCampaignsCreateTemplateResponseBody]:
+ """Create Campaign Template
+
+ Creates a template for a discount or gift campaign, or a promotion tier. A template stores campaign configuration **without** the following details: - Campaign name - Category - Code count The following elements are not supported by campaign templates: - Redeeming API keys - Redeeming users - Customer loyalty tier - Static segments 👍 Promotion Tiers and Campaign Templates You can create a campaign template out of a promotion tier. Promotion tiers are converted to a discount campaign with the DISCOUNT_COUPON type. You can use this template to create: - Discount campaign, - Promotion tier. 📘 Campaign Templates – Documentation Read the [Campaign Templates documentation](https://support.voucherify.io/article/620-campaign-templates) to learn more about this feature.
+
+ :param templates_campaigns_create_request_body: Provide details for a campaign template
+ :type templates_campaigns_create_request_body: TemplatesCampaignsCreateRequestBody
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._create_campaign_template_serialize(
+ templates_campaigns_create_request_body=templates_campaigns_create_request_body,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '2XX': "TemplatesCampaignsCreateTemplateResponseBody",
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ )
+
+
+ @validate_call
+ def create_campaign_template_without_preload_content(
+ self,
+ templates_campaigns_create_request_body: Annotated[Optional[TemplatesCampaignsCreateRequestBody], Field(description="Provide details for a campaign template")] = None,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> RESTResponseType:
+ """Create Campaign Template
+
+ Creates a template for a discount or gift campaign, or a promotion tier. A template stores campaign configuration **without** the following details: - Campaign name - Category - Code count The following elements are not supported by campaign templates: - Redeeming API keys - Redeeming users - Customer loyalty tier - Static segments 👍 Promotion Tiers and Campaign Templates You can create a campaign template out of a promotion tier. Promotion tiers are converted to a discount campaign with the DISCOUNT_COUPON type. You can use this template to create: - Discount campaign, - Promotion tier. 📘 Campaign Templates – Documentation Read the [Campaign Templates documentation](https://support.voucherify.io/article/620-campaign-templates) to learn more about this feature.
+
+ :param templates_campaigns_create_request_body: Provide details for a campaign template
+ :type templates_campaigns_create_request_body: TemplatesCampaignsCreateRequestBody
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._create_campaign_template_serialize(
+ templates_campaigns_create_request_body=templates_campaigns_create_request_body,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '2XX': "TemplatesCampaignsCreateTemplateResponseBody",
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+
+ def _create_campaign_template_serialize(
+ self,
+ templates_campaigns_create_request_body,
+ _request_auth,
+ _content_type,
+ _headers,
+ _host_index,
+ ) -> RequestSerialized:
+
+ _host = None
+
+ _collection_formats: Dict[str, str] = {
+ }
+
+ _path_params: Dict[str, str] = {}
+ _query_params: List[Tuple[str, str]] = []
+ _header_params: Dict[str, Optional[str]] = _headers or {}
+ _form_params: List[Tuple[str, str]] = []
+ _files: Dict[str, Union[str, bytes]] = {}
+ _body_params: Optional[bytes] = None
+
+ # process the path parameters
+ # process the query parameters
+ # process the header parameters
+ # process the form parameters
+ # process the body parameter
+ if templates_campaigns_create_request_body is not None:
+ _body_params = templates_campaigns_create_request_body
+
+
+ # set the HTTP header `Accept`
+ if 'Accept' not in _header_params:
+ _header_params['Accept'] = self.api_client.select_header_accept(
+ [
+ 'application/json'
+ ]
+ )
+
+ # set the HTTP header `Content-Type`
+ if _content_type:
+ _header_params['Content-Type'] = _content_type
+ else:
+ _default_content_type = (
+ self.api_client.select_header_content_type(
+ [
+ 'application/json'
+ ]
+ )
+ )
+ if _default_content_type is not None:
+ _header_params['Content-Type'] = _default_content_type
+
+ # authentication setting
+ _auth_settings: List[str] = [
+ 'X-App-Id',
+ 'X-App-Token'
+ ]
+
+ return self.api_client.param_serialize(
+ method='POST',
+ resource_path='/v1/templates/campaigns',
+ path_params=_path_params,
+ query_params=_query_params,
+ header_params=_header_params,
+ body=_body_params,
+ post_params=_form_params,
+ files=_files,
+ auth_settings=_auth_settings,
+ collection_formats=_collection_formats,
+ _host=_host,
+ _request_auth=_request_auth
+ )
+
+
+
+
+ @validate_call
+ def delete_campaign_template(
+ self,
+ campaign_template_id: Annotated[StrictStr, Field(description="Pass the campaign template ID that was assigned by Voucherify.")],
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> None:
+ """Delete Campaign Template
+
+ Deletes the campaign template permanently. 📘 Campaign Templates – Documentation Read the [Campaign Templates documentation](https://support.voucherify.io/article/620-campaign-templates) to learn more about this feature.
+
+ :param campaign_template_id: Pass the campaign template ID that was assigned by Voucherify. (required)
+ :type campaign_template_id: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._delete_campaign_template_serialize(
+ campaign_template_id=campaign_template_id,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '2XX': None,
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ ).data
+
+
+ @validate_call
+ def delete_campaign_template_with_http_info(
+ self,
+ campaign_template_id: Annotated[StrictStr, Field(description="Pass the campaign template ID that was assigned by Voucherify.")],
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> ApiResponse[None]:
+ """Delete Campaign Template
+
+ Deletes the campaign template permanently. 📘 Campaign Templates – Documentation Read the [Campaign Templates documentation](https://support.voucherify.io/article/620-campaign-templates) to learn more about this feature.
+
+ :param campaign_template_id: Pass the campaign template ID that was assigned by Voucherify. (required)
+ :type campaign_template_id: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._delete_campaign_template_serialize(
+ campaign_template_id=campaign_template_id,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '2XX': None,
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ )
+
+
+ @validate_call
+ def delete_campaign_template_without_preload_content(
+ self,
+ campaign_template_id: Annotated[StrictStr, Field(description="Pass the campaign template ID that was assigned by Voucherify.")],
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> RESTResponseType:
+ """Delete Campaign Template
+
+ Deletes the campaign template permanently. 📘 Campaign Templates – Documentation Read the [Campaign Templates documentation](https://support.voucherify.io/article/620-campaign-templates) to learn more about this feature.
+
+ :param campaign_template_id: Pass the campaign template ID that was assigned by Voucherify. (required)
+ :type campaign_template_id: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._delete_campaign_template_serialize(
+ campaign_template_id=campaign_template_id,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '2XX': None,
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+
+ def _delete_campaign_template_serialize(
+ self,
+ campaign_template_id,
+ _request_auth,
+ _content_type,
+ _headers,
+ _host_index,
+ ) -> RequestSerialized:
+
+ _host = None
+
+ _collection_formats: Dict[str, str] = {
+ }
+
+ _path_params: Dict[str, str] = {}
+ _query_params: List[Tuple[str, str]] = []
+ _header_params: Dict[str, Optional[str]] = _headers or {}
+ _form_params: List[Tuple[str, str]] = []
+ _files: Dict[str, Union[str, bytes]] = {}
+ _body_params: Optional[bytes] = None
+
+ # process the path parameters
+ if campaign_template_id is not None:
+ _path_params['campaignTemplateId'] = campaign_template_id
+ # process the query parameters
+ # process the header parameters
+ # process the form parameters
+ # process the body parameter
+
+
+
+
+ # authentication setting
+ _auth_settings: List[str] = [
+ 'X-App-Id',
+ 'X-App-Token'
+ ]
+
+ return self.api_client.param_serialize(
+ method='DELETE',
+ resource_path='/v1/templates/campaigns/{campaignTemplateId}',
+ path_params=_path_params,
+ query_params=_query_params,
+ header_params=_header_params,
+ body=_body_params,
+ post_params=_form_params,
+ files=_files,
+ auth_settings=_auth_settings,
+ collection_formats=_collection_formats,
+ _host=_host,
+ _request_auth=_request_auth
+ )
+
+
+
+
+ @validate_call
+ def get_campaign_template(
+ self,
+ campaign_template_id: Annotated[StrictStr, Field(description="Pass the campaign template ID that was assigned by Voucherify.")],
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> TemplatesCampaignsGetResponseBody:
+ """Get Campaign Template
+
+ Retrieves a campaign template available in the project. 📘 Campaign Templates – Documentation Read the [Campaign Templates documentation](https://support.voucherify.io/article/620-campaign-templates) to learn more about this feature.
+
+ :param campaign_template_id: Pass the campaign template ID that was assigned by Voucherify. (required)
+ :type campaign_template_id: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._get_campaign_template_serialize(
+ campaign_template_id=campaign_template_id,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '2XX': "TemplatesCampaignsGetResponseBody",
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ ).data
+
+
+ @validate_call
+ def get_campaign_template_with_http_info(
+ self,
+ campaign_template_id: Annotated[StrictStr, Field(description="Pass the campaign template ID that was assigned by Voucherify.")],
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> ApiResponse[TemplatesCampaignsGetResponseBody]:
+ """Get Campaign Template
+
+ Retrieves a campaign template available in the project. 📘 Campaign Templates – Documentation Read the [Campaign Templates documentation](https://support.voucherify.io/article/620-campaign-templates) to learn more about this feature.
+
+ :param campaign_template_id: Pass the campaign template ID that was assigned by Voucherify. (required)
+ :type campaign_template_id: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._get_campaign_template_serialize(
+ campaign_template_id=campaign_template_id,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '2XX': "TemplatesCampaignsGetResponseBody",
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ )
+
+
+ @validate_call
+ def get_campaign_template_without_preload_content(
+ self,
+ campaign_template_id: Annotated[StrictStr, Field(description="Pass the campaign template ID that was assigned by Voucherify.")],
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> RESTResponseType:
+ """Get Campaign Template
+
+ Retrieves a campaign template available in the project. 📘 Campaign Templates – Documentation Read the [Campaign Templates documentation](https://support.voucherify.io/article/620-campaign-templates) to learn more about this feature.
+
+ :param campaign_template_id: Pass the campaign template ID that was assigned by Voucherify. (required)
+ :type campaign_template_id: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._get_campaign_template_serialize(
+ campaign_template_id=campaign_template_id,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '2XX': "TemplatesCampaignsGetResponseBody",
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+
+ def _get_campaign_template_serialize(
+ self,
+ campaign_template_id,
+ _request_auth,
+ _content_type,
+ _headers,
+ _host_index,
+ ) -> RequestSerialized:
+
+ _host = None
+
+ _collection_formats: Dict[str, str] = {
+ }
+
+ _path_params: Dict[str, str] = {}
+ _query_params: List[Tuple[str, str]] = []
+ _header_params: Dict[str, Optional[str]] = _headers or {}
+ _form_params: List[Tuple[str, str]] = []
+ _files: Dict[str, Union[str, bytes]] = {}
+ _body_params: Optional[bytes] = None
+
+ # process the path parameters
+ if campaign_template_id is not None:
+ _path_params['campaignTemplateId'] = campaign_template_id
+ # process the query parameters
+ # process the header parameters
+ # process the form parameters
+ # process the body parameter
+
+
+ # set the HTTP header `Accept`
+ if 'Accept' not in _header_params:
+ _header_params['Accept'] = self.api_client.select_header_accept(
+ [
+ 'application/json'
+ ]
+ )
+
+
+ # authentication setting
+ _auth_settings: List[str] = [
+ 'X-App-Id',
+ 'X-App-Token'
+ ]
+
+ return self.api_client.param_serialize(
+ method='GET',
+ resource_path='/v1/templates/campaigns/{campaignTemplateId}',
+ path_params=_path_params,
+ query_params=_query_params,
+ header_params=_header_params,
+ body=_body_params,
+ post_params=_form_params,
+ files=_files,
+ auth_settings=_auth_settings,
+ collection_formats=_collection_formats,
+ _host=_host,
+ _request_auth=_request_auth
+ )
+
+
+
+
+ @validate_call
+ def list_campaign_templates(
+ self,
+ limit: Annotated[Optional[Annotated[int, Field(le=100, strict=True, ge=1)]], Field(description="Limits the number of objects to be returned. The limit can range between 1 and 100 items. If no limit is set, it returns 10 items.")] = None,
+ starting_after_id: Annotated[Optional[StrictStr], Field(description="A cursor for pagination. It retrieves the campaign templates created after a template with the given ID.")] = None,
+ order: Annotated[Optional[ParameterTemplatesList], Field(description="Sorts the results using one of the filtering options, where the dash - preceding a sorting option means sorting in a descending order.")] = None,
+ include_total: Annotated[Optional[StrictBool], Field(description="If set to true, the response returns the number of all campaign templates, regardless of the applied filters or limits. Set to false by default.")] = None,
+ filters: Annotated[Optional[ParameterFiltersListTemplates], Field(description="Filters for listing templates.")] = None,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> TemplatesCampaignsListResponseBody:
+ """List Campaign Templates
+
+ Lists all campaign templates available in the project. 📘 Campaign Templates – Documentation Read the [Campaign Templates documentation](https://support.voucherify.io/article/620-campaign-templates) to learn more about this feature.
+
+ :param limit: Limits the number of objects to be returned. The limit can range between 1 and 100 items. If no limit is set, it returns 10 items.
+ :type limit: int
+ :param starting_after_id: A cursor for pagination. It retrieves the campaign templates created after a template with the given ID.
+ :type starting_after_id: str
+ :param order: Sorts the results using one of the filtering options, where the dash - preceding a sorting option means sorting in a descending order.
+ :type order: ParameterTemplatesList
+ :param include_total: If set to true, the response returns the number of all campaign templates, regardless of the applied filters or limits. Set to false by default.
+ :type include_total: bool
+ :param filters: Filters for listing templates.
+ :type filters: ParameterFiltersListTemplates
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._list_campaign_templates_serialize(
+ limit=limit,
+ starting_after_id=starting_after_id,
+ order=order,
+ include_total=include_total,
+ filters=filters,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '2XX': "TemplatesCampaignsListResponseBody",
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ ).data
+
+
+ @validate_call
+ def list_campaign_templates_with_http_info(
+ self,
+ limit: Annotated[Optional[Annotated[int, Field(le=100, strict=True, ge=1)]], Field(description="Limits the number of objects to be returned. The limit can range between 1 and 100 items. If no limit is set, it returns 10 items.")] = None,
+ starting_after_id: Annotated[Optional[StrictStr], Field(description="A cursor for pagination. It retrieves the campaign templates created after a template with the given ID.")] = None,
+ order: Annotated[Optional[ParameterTemplatesList], Field(description="Sorts the results using one of the filtering options, where the dash - preceding a sorting option means sorting in a descending order.")] = None,
+ include_total: Annotated[Optional[StrictBool], Field(description="If set to true, the response returns the number of all campaign templates, regardless of the applied filters or limits. Set to false by default.")] = None,
+ filters: Annotated[Optional[ParameterFiltersListTemplates], Field(description="Filters for listing templates.")] = None,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> ApiResponse[TemplatesCampaignsListResponseBody]:
+ """List Campaign Templates
+
+ Lists all campaign templates available in the project. 📘 Campaign Templates – Documentation Read the [Campaign Templates documentation](https://support.voucherify.io/article/620-campaign-templates) to learn more about this feature.
+
+ :param limit: Limits the number of objects to be returned. The limit can range between 1 and 100 items. If no limit is set, it returns 10 items.
+ :type limit: int
+ :param starting_after_id: A cursor for pagination. It retrieves the campaign templates created after a template with the given ID.
+ :type starting_after_id: str
+ :param order: Sorts the results using one of the filtering options, where the dash - preceding a sorting option means sorting in a descending order.
+ :type order: ParameterTemplatesList
+ :param include_total: If set to true, the response returns the number of all campaign templates, regardless of the applied filters or limits. Set to false by default.
+ :type include_total: bool
+ :param filters: Filters for listing templates.
+ :type filters: ParameterFiltersListTemplates
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._list_campaign_templates_serialize(
+ limit=limit,
+ starting_after_id=starting_after_id,
+ order=order,
+ include_total=include_total,
+ filters=filters,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '2XX': "TemplatesCampaignsListResponseBody",
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ )
+
+
+ @validate_call
+ def list_campaign_templates_without_preload_content(
+ self,
+ limit: Annotated[Optional[Annotated[int, Field(le=100, strict=True, ge=1)]], Field(description="Limits the number of objects to be returned. The limit can range between 1 and 100 items. If no limit is set, it returns 10 items.")] = None,
+ starting_after_id: Annotated[Optional[StrictStr], Field(description="A cursor for pagination. It retrieves the campaign templates created after a template with the given ID.")] = None,
+ order: Annotated[Optional[ParameterTemplatesList], Field(description="Sorts the results using one of the filtering options, where the dash - preceding a sorting option means sorting in a descending order.")] = None,
+ include_total: Annotated[Optional[StrictBool], Field(description="If set to true, the response returns the number of all campaign templates, regardless of the applied filters or limits. Set to false by default.")] = None,
+ filters: Annotated[Optional[ParameterFiltersListTemplates], Field(description="Filters for listing templates.")] = None,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> RESTResponseType:
+ """List Campaign Templates
+
+ Lists all campaign templates available in the project. 📘 Campaign Templates – Documentation Read the [Campaign Templates documentation](https://support.voucherify.io/article/620-campaign-templates) to learn more about this feature.
+
+ :param limit: Limits the number of objects to be returned. The limit can range between 1 and 100 items. If no limit is set, it returns 10 items.
+ :type limit: int
+ :param starting_after_id: A cursor for pagination. It retrieves the campaign templates created after a template with the given ID.
+ :type starting_after_id: str
+ :param order: Sorts the results using one of the filtering options, where the dash - preceding a sorting option means sorting in a descending order.
+ :type order: ParameterTemplatesList
+ :param include_total: If set to true, the response returns the number of all campaign templates, regardless of the applied filters or limits. Set to false by default.
+ :type include_total: bool
+ :param filters: Filters for listing templates.
+ :type filters: ParameterFiltersListTemplates
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._list_campaign_templates_serialize(
+ limit=limit,
+ starting_after_id=starting_after_id,
+ order=order,
+ include_total=include_total,
+ filters=filters,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '2XX': "TemplatesCampaignsListResponseBody",
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+
+ def _list_campaign_templates_serialize(
+ self,
+ limit,
+ starting_after_id,
+ order,
+ include_total,
+ filters,
+ _request_auth,
+ _content_type,
+ _headers,
+ _host_index,
+ ) -> RequestSerialized:
+
+ _host = None
+
+ _collection_formats: Dict[str, str] = {
+ }
+
+ _path_params: Dict[str, str] = {}
+ _query_params: List[Tuple[str, str]] = []
+ _header_params: Dict[str, Optional[str]] = _headers or {}
+ _form_params: List[Tuple[str, str]] = []
+ _files: Dict[str, Union[str, bytes]] = {}
+ _body_params: Optional[bytes] = None
+
+ # process the path parameters
+ # process the query parameters
+ if limit is not None:
+
+ _query_params.append(('limit', limit))
+
+ if starting_after_id is not None:
+
+ _query_params.append(('starting_after_id', starting_after_id))
+
+ if order is not None:
+
+ _query_params.append(('order', order.value))
+
+ if include_total is not None:
+
+ _query_params.append(('include_total', include_total))
+
+ if filters is not None:
+
+ _query_params.append(('filters', filters))
+
+ # process the header parameters
+ # process the form parameters
+ # process the body parameter
+
+
+ # set the HTTP header `Accept`
+ if 'Accept' not in _header_params:
+ _header_params['Accept'] = self.api_client.select_header_accept(
+ [
+ 'application/json'
+ ]
+ )
+
+
+ # authentication setting
+ _auth_settings: List[str] = [
+ 'X-App-Id',
+ 'X-App-Token'
+ ]
+
+ return self.api_client.param_serialize(
+ method='GET',
+ resource_path='/v1/templates/campaigns',
+ path_params=_path_params,
+ query_params=_query_params,
+ header_params=_header_params,
+ body=_body_params,
+ post_params=_form_params,
+ files=_files,
+ auth_settings=_auth_settings,
+ collection_formats=_collection_formats,
+ _host=_host,
+ _request_auth=_request_auth
+ )
+
+
+
+
+ @validate_call
+ def update_campaign_template(
+ self,
+ campaign_template_id: Annotated[StrictStr, Field(description="Pass the campaign template ID that was assigned by Voucherify.")],
+ templates_campaigns_update_request_body: Annotated[Optional[TemplatesCampaignsUpdateRequestBody], Field(description="Provide the new name or description for the campaign template")] = None,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> TemplatesCampaignsUpdateResponseBody:
+ """Update Campaign Template
+
+ Updates the name or description of the campaign template. 📘 Campaign Templates – Documentation Read the [Campaign Templates documentation](https://support.voucherify.io/article/620-campaign-templates) to learn more about this feature.
+
+ :param campaign_template_id: Pass the campaign template ID that was assigned by Voucherify. (required)
+ :type campaign_template_id: str
+ :param templates_campaigns_update_request_body: Provide the new name or description for the campaign template
+ :type templates_campaigns_update_request_body: TemplatesCampaignsUpdateRequestBody
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._update_campaign_template_serialize(
+ campaign_template_id=campaign_template_id,
+ templates_campaigns_update_request_body=templates_campaigns_update_request_body,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '2XX': "TemplatesCampaignsUpdateResponseBody",
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ ).data
+
+
+ @validate_call
+ def update_campaign_template_with_http_info(
+ self,
+ campaign_template_id: Annotated[StrictStr, Field(description="Pass the campaign template ID that was assigned by Voucherify.")],
+ templates_campaigns_update_request_body: Annotated[Optional[TemplatesCampaignsUpdateRequestBody], Field(description="Provide the new name or description for the campaign template")] = None,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> ApiResponse[TemplatesCampaignsUpdateResponseBody]:
+ """Update Campaign Template
+
+ Updates the name or description of the campaign template. 📘 Campaign Templates – Documentation Read the [Campaign Templates documentation](https://support.voucherify.io/article/620-campaign-templates) to learn more about this feature.
+
+ :param campaign_template_id: Pass the campaign template ID that was assigned by Voucherify. (required)
+ :type campaign_template_id: str
+ :param templates_campaigns_update_request_body: Provide the new name or description for the campaign template
+ :type templates_campaigns_update_request_body: TemplatesCampaignsUpdateRequestBody
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._update_campaign_template_serialize(
+ campaign_template_id=campaign_template_id,
+ templates_campaigns_update_request_body=templates_campaigns_update_request_body,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '2XX': "TemplatesCampaignsUpdateResponseBody",
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ )
+
+
+ @validate_call
+ def update_campaign_template_without_preload_content(
+ self,
+ campaign_template_id: Annotated[StrictStr, Field(description="Pass the campaign template ID that was assigned by Voucherify.")],
+ templates_campaigns_update_request_body: Annotated[Optional[TemplatesCampaignsUpdateRequestBody], Field(description="Provide the new name or description for the campaign template")] = None,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> RESTResponseType:
+ """Update Campaign Template
+
+ Updates the name or description of the campaign template. 📘 Campaign Templates – Documentation Read the [Campaign Templates documentation](https://support.voucherify.io/article/620-campaign-templates) to learn more about this feature.
+
+ :param campaign_template_id: Pass the campaign template ID that was assigned by Voucherify. (required)
+ :type campaign_template_id: str
+ :param templates_campaigns_update_request_body: Provide the new name or description for the campaign template
+ :type templates_campaigns_update_request_body: TemplatesCampaignsUpdateRequestBody
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._update_campaign_template_serialize(
+ campaign_template_id=campaign_template_id,
+ templates_campaigns_update_request_body=templates_campaigns_update_request_body,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '2XX': "TemplatesCampaignsUpdateResponseBody",
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+
+ def _update_campaign_template_serialize(
+ self,
+ campaign_template_id,
+ templates_campaigns_update_request_body,
+ _request_auth,
+ _content_type,
+ _headers,
+ _host_index,
+ ) -> RequestSerialized:
+
+ _host = None
+
+ _collection_formats: Dict[str, str] = {
+ }
+
+ _path_params: Dict[str, str] = {}
+ _query_params: List[Tuple[str, str]] = []
+ _header_params: Dict[str, Optional[str]] = _headers or {}
+ _form_params: List[Tuple[str, str]] = []
+ _files: Dict[str, Union[str, bytes]] = {}
+ _body_params: Optional[bytes] = None
+
+ # process the path parameters
+ if campaign_template_id is not None:
+ _path_params['campaignTemplateId'] = campaign_template_id
+ # process the query parameters
+ # process the header parameters
+ # process the form parameters
+ # process the body parameter
+ if templates_campaigns_update_request_body is not None:
+ _body_params = templates_campaigns_update_request_body
+
+
+ # set the HTTP header `Accept`
+ if 'Accept' not in _header_params:
+ _header_params['Accept'] = self.api_client.select_header_accept(
+ [
+ 'application/json'
+ ]
+ )
+
+ # set the HTTP header `Content-Type`
+ if _content_type:
+ _header_params['Content-Type'] = _content_type
+ else:
+ _default_content_type = (
+ self.api_client.select_header_content_type(
+ [
+ 'application/json'
+ ]
+ )
+ )
+ if _default_content_type is not None:
+ _header_params['Content-Type'] = _default_content_type
+
+ # authentication setting
+ _auth_settings: List[str] = [
+ 'X-App-Id',
+ 'X-App-Token'
+ ]
+
+ return self.api_client.param_serialize(
+ method='PUT',
+ resource_path='/v1/templates/campaigns/{campaignTemplateId}',
+ path_params=_path_params,
+ query_params=_query_params,
+ header_params=_header_params,
+ body=_body_params,
+ post_params=_form_params,
+ files=_files,
+ auth_settings=_auth_settings,
+ collection_formats=_collection_formats,
+ _host=_host,
+ _request_auth=_request_auth
+ )
+
+
diff --git a/voucherify/api_client.py b/voucherify/api_client.py
index b45a02b1..7f76e23c 100644
--- a/voucherify/api_client.py
+++ b/voucherify/api_client.py
@@ -88,13 +88,13 @@ def __init__(
self.rest_client = rest.RESTClientObject(configuration)
self.default_headers = {
"X-Voucherify-Channel": "Python-SDK",
- "User-Agent": "OpenAPI-Python-SDK/3.0.0"
+ "User-Agent": "OpenAPI-Python-SDK/4.0.0"
}
if header_name is not None:
self.default_headers[header_name] = header_value
self.cookie = cookie
# Set default User-Agent.
- self.user_agent = 'OpenAPI-Python-SDK/3.0.0'
+ self.user_agent = 'OpenAPI-Python-SDK/4.0.0'
self.client_side_validation = configuration.client_side_validation
def __enter__(self):
@@ -501,41 +501,25 @@ def parameters_to_tuples(self, params, collection_formats):
return new_params
def parameters_to_url_query(self, params, collection_formats):
- """Get parameters as list of tuples, formatting collections.
-
- :param params: Parameters as dict or list of two-tuples
- :param dict collection_formats: Parameter collection formats
- :return: URL query string (e.g. a=Hello%20World&b=123)
- """
new_params: List[Tuple[str, str]] = []
+
if collection_formats is None:
collection_formats = {}
- for k, v in params.items() if isinstance(params, dict) else params:
- if isinstance(v, bool):
- v = str(v).lower()
- if isinstance(v, (int, float)):
- v = str(v)
- if isinstance(v, dict):
- v = json.dumps(v)
- if k in collection_formats:
- collection_format = collection_formats[k]
- if collection_format == 'multi':
- new_params.extend((k, str(value)) for value in v)
- else:
- if collection_format == 'ssv':
- delimiter = ' '
- elif collection_format == 'tsv':
- delimiter = '\t'
- elif collection_format == 'pipes':
- delimiter = '|'
- else: # csv is the default
- delimiter = ','
- new_params.append(
- (k, delimiter.join(quote(str(value)) for value in v))
- )
+ def flatten_key_value(prefix, value):
+ if isinstance(value, bool):
+ value = str(value).lower()
+ if isinstance(value, (int, float)):
+ value = str(value)
+
+ if isinstance(value, dict):
+ for k, v in value.items():
+ flatten_key_value(f"{prefix}[{k}]", v)
else:
- new_params.append((k, quote(str(v))))
+ new_params.append((prefix, quote(str(value))))
+
+ for k, v in params.items() if isinstance(params, dict) else params:
+ flatten_key_value(k, v)
return "&".join(["=".join(map(str, item)) for item in new_params])
diff --git a/voucherify/configuration.py b/voucherify/configuration.py
index 953a30d7..c276fb34 100644
--- a/voucherify/configuration.py
+++ b/voucherify/configuration.py
@@ -430,6 +430,24 @@ def auth_settings(self):
'X-Client-Application-Id',
),
}
+ if 'X-Management-Id' in self.api_key:
+ auth['X-Management-Id'] = {
+ 'type': 'api_key',
+ 'in': 'header',
+ 'key': 'X-Management-Id',
+ 'value': self.get_api_key_with_prefix(
+ 'X-Management-Id',
+ ),
+ }
+ if 'X-Management-Token' in self.api_key:
+ auth['X-Management-Token'] = {
+ 'type': 'api_key',
+ 'in': 'header',
+ 'key': 'X-Management-Token',
+ 'value': self.get_api_key_with_prefix(
+ 'X-Management-Token',
+ ),
+ }
return auth
def to_debug_report(self):
@@ -441,7 +459,7 @@ def to_debug_report(self):
"OS: {env}\n"\
"Python Version: {pyversion}\n"\
"Version of the API: v2018-08-01\n"\
- "SDK Package Version: 3.0.0".\
+ "SDK Package Version: 4.0.0".\
format(env=sys.platform, pyversion=sys.version)
def get_host_settings(self):
diff --git a/voucherify/models/__init__.py b/voucherify/models/__init__.py
index 3e6f9f50..19751f76 100644
--- a/voucherify/models/__init__.py
+++ b/voucherify/models/__init__.py
@@ -24,11 +24,13 @@
from voucherify.models.async_action_get_response_body import AsyncActionGetResponseBody
from voucherify.models.async_actions_list_response_body import AsyncActionsListResponseBody
from voucherify.models.bus_val_rule_assignment import BusValRuleAssignment
+from voucherify.models.campaign import Campaign
from voucherify.models.campaign_base import CampaignBase
from voucherify.models.campaign_loyalty_card import CampaignLoyaltyCard
from voucherify.models.campaign_loyalty_card_expiration_rules import CampaignLoyaltyCardExpirationRules
from voucherify.models.campaign_loyalty_voucher import CampaignLoyaltyVoucher
from voucherify.models.campaign_loyalty_voucher_redemption import CampaignLoyaltyVoucherRedemption
+from voucherify.models.campaign_template import CampaignTemplate
from voucherify.models.campaign_voucher import CampaignVoucher
from voucherify.models.campaign_voucher_redemption import CampaignVoucherRedemption
from voucherify.models.campaigns_create_request_body import CampaignsCreateRequestBody
@@ -67,6 +69,7 @@
from voucherify.models.categories_update_request_body import CategoriesUpdateRequestBody
from voucherify.models.categories_update_response_body import CategoriesUpdateResponseBody
from voucherify.models.category import Category
+from voucherify.models.category_with_stacking_rules_type import CategoryWithStackingRulesType
from voucherify.models.client_events_create_request_body import ClientEventsCreateRequestBody
from voucherify.models.client_events_create_request_body_loyalty import ClientEventsCreateRequestBodyLoyalty
from voucherify.models.client_events_create_request_body_referral import ClientEventsCreateRequestBodyReferral
@@ -183,6 +186,7 @@
from voucherify.models.exports_get_response_body_result import ExportsGetResponseBodyResult
from voucherify.models.exports_list_response_body import ExportsListResponseBody
from voucherify.models.field_conditions import FieldConditions
+from voucherify.models.filter_conditions_date_time import FilterConditionsDateTime
from voucherify.models.filter_conditions_string import FilterConditionsString
from voucherify.models.filters_condition import FiltersCondition
from voucherify.models.gift import Gift
@@ -190,6 +194,15 @@
from voucherify.models.inapplicable_to_result_list import InapplicableToResultList
from voucherify.models.junction import Junction
from voucherify.models.list_publications_item_voucher import ListPublicationsItemVoucher
+from voucherify.models.location import Location
+from voucherify.models.location_shape import LocationShape
+from voucherify.models.location_shape_distance import LocationShapeDistance
+from voucherify.models.location_shape_geojson import LocationShapeGeojson
+from voucherify.models.locations_get_response_body import LocationsGetResponseBody
+from voucherify.models.locations_get_response_body_shape import LocationsGetResponseBodyShape
+from voucherify.models.locations_get_response_body_shape_distance import LocationsGetResponseBodyShapeDistance
+from voucherify.models.locations_get_response_body_shape_geojson import LocationsGetResponseBodyShapeGeojson
+from voucherify.models.locations_list_response_body import LocationsListResponseBody
from voucherify.models.loyalties_create_campaign_request_body import LoyaltiesCreateCampaignRequestBody
from voucherify.models.loyalties_create_campaign_response_body import LoyaltiesCreateCampaignResponseBody
from voucherify.models.loyalties_delete_response_body import LoyaltiesDeleteResponseBody
@@ -448,8 +461,132 @@
from voucherify.models.loyalty_tiers_expiration_all_expiration_date import LoyaltyTiersExpirationAllExpirationDate
from voucherify.models.loyalty_tiers_expiration_all_expiration_date_rounding import LoyaltyTiersExpirationAllExpirationDateRounding
from voucherify.models.loyalty_tiers_expiration_all_start_date import LoyaltyTiersExpirationAllStartDate
-from voucherify.models.lucky_draw import LuckyDraw
+from voucherify.models.management_project import ManagementProject
+from voucherify.models.management_project_api_usage_notifications import ManagementProjectApiUsageNotifications
+from voucherify.models.management_project_default_code_config import ManagementProjectDefaultCodeConfig
+from voucherify.models.management_project_limits import ManagementProjectLimits
+from voucherify.models.management_project_limits_api_calls_item import ManagementProjectLimitsApiCallsItem
+from voucherify.models.management_project_limits_bulk_api_calls_item import ManagementProjectLimitsBulkApiCallsItem
+from voucherify.models.management_project_webhooks_callout_notifications import ManagementProjectWebhooksCalloutNotifications
+from voucherify.models.management_project_webhooks_callout_notifications_distributions import ManagementProjectWebhooksCalloutNotificationsDistributions
+from voucherify.models.management_project_webhooks_callout_notifications_webhooks import ManagementProjectWebhooksCalloutNotificationsWebhooks
+from voucherify.models.management_projects_branding import ManagementProjectsBranding
+from voucherify.models.management_projects_branding_address import ManagementProjectsBrandingAddress
+from voucherify.models.management_projects_branding_brand import ManagementProjectsBrandingBrand
+from voucherify.models.management_projects_branding_cockpits import ManagementProjectsBrandingCockpits
+from voucherify.models.management_projects_branding_contact import ManagementProjectsBrandingContact
+from voucherify.models.management_projects_branding_create_request_body import ManagementProjectsBrandingCreateRequestBody
+from voucherify.models.management_projects_branding_create_request_body_address import ManagementProjectsBrandingCreateRequestBodyAddress
+from voucherify.models.management_projects_branding_create_request_body_brand import ManagementProjectsBrandingCreateRequestBodyBrand
+from voucherify.models.management_projects_branding_create_request_body_cockpits import ManagementProjectsBrandingCreateRequestBodyCockpits
+from voucherify.models.management_projects_branding_create_request_body_contact import ManagementProjectsBrandingCreateRequestBodyContact
+from voucherify.models.management_projects_branding_create_response_body import ManagementProjectsBrandingCreateResponseBody
+from voucherify.models.management_projects_branding_create_response_body_address import ManagementProjectsBrandingCreateResponseBodyAddress
+from voucherify.models.management_projects_branding_create_response_body_brand import ManagementProjectsBrandingCreateResponseBodyBrand
+from voucherify.models.management_projects_branding_create_response_body_cockpits import ManagementProjectsBrandingCreateResponseBodyCockpits
+from voucherify.models.management_projects_branding_create_response_body_contact import ManagementProjectsBrandingCreateResponseBodyContact
+from voucherify.models.management_projects_branding_get_response_body import ManagementProjectsBrandingGetResponseBody
+from voucherify.models.management_projects_branding_get_response_body_address import ManagementProjectsBrandingGetResponseBodyAddress
+from voucherify.models.management_projects_branding_get_response_body_brand import ManagementProjectsBrandingGetResponseBodyBrand
+from voucherify.models.management_projects_branding_get_response_body_cockpits import ManagementProjectsBrandingGetResponseBodyCockpits
+from voucherify.models.management_projects_branding_get_response_body_contact import ManagementProjectsBrandingGetResponseBodyContact
+from voucherify.models.management_projects_branding_list_response_body import ManagementProjectsBrandingListResponseBody
+from voucherify.models.management_projects_branding_update_request_body import ManagementProjectsBrandingUpdateRequestBody
+from voucherify.models.management_projects_branding_update_request_body_address import ManagementProjectsBrandingUpdateRequestBodyAddress
+from voucherify.models.management_projects_branding_update_request_body_brand import ManagementProjectsBrandingUpdateRequestBodyBrand
+from voucherify.models.management_projects_branding_update_request_body_cockpits import ManagementProjectsBrandingUpdateRequestBodyCockpits
+from voucherify.models.management_projects_branding_update_request_body_contact import ManagementProjectsBrandingUpdateRequestBodyContact
+from voucherify.models.management_projects_branding_update_response_body import ManagementProjectsBrandingUpdateResponseBody
+from voucherify.models.management_projects_branding_update_response_body_address import ManagementProjectsBrandingUpdateResponseBodyAddress
+from voucherify.models.management_projects_branding_update_response_body_brand import ManagementProjectsBrandingUpdateResponseBodyBrand
+from voucherify.models.management_projects_branding_update_response_body_cockpits import ManagementProjectsBrandingUpdateResponseBodyCockpits
+from voucherify.models.management_projects_branding_update_response_body_contact import ManagementProjectsBrandingUpdateResponseBodyContact
+from voucherify.models.management_projects_create_request_body import ManagementProjectsCreateRequestBody
+from voucherify.models.management_projects_create_request_body_api_usage_notifications import ManagementProjectsCreateRequestBodyApiUsageNotifications
+from voucherify.models.management_projects_create_request_body_users_item import ManagementProjectsCreateRequestBodyUsersItem
+from voucherify.models.management_projects_create_request_body_webhooks_callout_notifications import ManagementProjectsCreateRequestBodyWebhooksCalloutNotifications
+from voucherify.models.management_projects_create_request_body_webhooks_callout_notifications_distributions import ManagementProjectsCreateRequestBodyWebhooksCalloutNotificationsDistributions
+from voucherify.models.management_projects_create_request_body_webhooks_callout_notifications_webhooks import ManagementProjectsCreateRequestBodyWebhooksCalloutNotificationsWebhooks
+from voucherify.models.management_projects_create_response_body import ManagementProjectsCreateResponseBody
+from voucherify.models.management_projects_create_response_body_api_usage_notifications import ManagementProjectsCreateResponseBodyApiUsageNotifications
+from voucherify.models.management_projects_create_response_body_client_side_key import ManagementProjectsCreateResponseBodyClientSideKey
+from voucherify.models.management_projects_create_response_body_server_side_key import ManagementProjectsCreateResponseBodyServerSideKey
+from voucherify.models.management_projects_create_response_body_webhooks_callout_notifications import ManagementProjectsCreateResponseBodyWebhooksCalloutNotifications
+from voucherify.models.management_projects_create_response_body_webhooks_callout_notifications_distributions import ManagementProjectsCreateResponseBodyWebhooksCalloutNotificationsDistributions
+from voucherify.models.management_projects_create_response_body_webhooks_callout_notifications_webhooks import ManagementProjectsCreateResponseBodyWebhooksCalloutNotificationsWebhooks
+from voucherify.models.management_projects_custom_event_schema import ManagementProjectsCustomEventSchema
+from voucherify.models.management_projects_custom_event_schema_schema import ManagementProjectsCustomEventSchemaSchema
+from voucherify.models.management_projects_custom_event_schemas_create_request_body import ManagementProjectsCustomEventSchemasCreateRequestBody
+from voucherify.models.management_projects_custom_event_schemas_create_request_body_schema import ManagementProjectsCustomEventSchemasCreateRequestBodySchema
+from voucherify.models.management_projects_custom_event_schemas_create_response_body import ManagementProjectsCustomEventSchemasCreateResponseBody
+from voucherify.models.management_projects_custom_event_schemas_create_response_body_schema import ManagementProjectsCustomEventSchemasCreateResponseBodySchema
+from voucherify.models.management_projects_custom_event_schemas_get_response_body import ManagementProjectsCustomEventSchemasGetResponseBody
+from voucherify.models.management_projects_custom_event_schemas_get_response_body_schema import ManagementProjectsCustomEventSchemasGetResponseBodySchema
+from voucherify.models.management_projects_custom_event_schemas_list_response_body import ManagementProjectsCustomEventSchemasListResponseBody
+from voucherify.models.management_projects_custom_event_schemas_update_request_body import ManagementProjectsCustomEventSchemasUpdateRequestBody
+from voucherify.models.management_projects_custom_event_schemas_update_request_body_schema import ManagementProjectsCustomEventSchemasUpdateRequestBodySchema
+from voucherify.models.management_projects_custom_event_schemas_update_response_body import ManagementProjectsCustomEventSchemasUpdateResponseBody
+from voucherify.models.management_projects_custom_event_schemas_update_response_body_schema import ManagementProjectsCustomEventSchemasUpdateResponseBodySchema
+from voucherify.models.management_projects_get_response_body import ManagementProjectsGetResponseBody
+from voucherify.models.management_projects_get_response_body_api_usage_notifications import ManagementProjectsGetResponseBodyApiUsageNotifications
+from voucherify.models.management_projects_get_response_body_default_code_config import ManagementProjectsGetResponseBodyDefaultCodeConfig
+from voucherify.models.management_projects_get_response_body_limits import ManagementProjectsGetResponseBodyLimits
+from voucherify.models.management_projects_get_response_body_limits_api_calls_item import ManagementProjectsGetResponseBodyLimitsApiCallsItem
+from voucherify.models.management_projects_get_response_body_limits_bulk_api_calls_item import ManagementProjectsGetResponseBodyLimitsBulkApiCallsItem
+from voucherify.models.management_projects_get_response_body_webhooks_callout_notifications import ManagementProjectsGetResponseBodyWebhooksCalloutNotifications
+from voucherify.models.management_projects_get_response_body_webhooks_callout_notifications_distributions import ManagementProjectsGetResponseBodyWebhooksCalloutNotificationsDistributions
+from voucherify.models.management_projects_get_response_body_webhooks_callout_notifications_webhooks import ManagementProjectsGetResponseBodyWebhooksCalloutNotificationsWebhooks
+from voucherify.models.management_projects_list_response_body import ManagementProjectsListResponseBody
+from voucherify.models.management_projects_metadata_schema import ManagementProjectsMetadataSchema
+from voucherify.models.management_projects_metadata_schemas_create_request_body import ManagementProjectsMetadataSchemasCreateRequestBody
+from voucherify.models.management_projects_metadata_schemas_create_response_body import ManagementProjectsMetadataSchemasCreateResponseBody
+from voucherify.models.management_projects_metadata_schemas_get_response_body import ManagementProjectsMetadataSchemasGetResponseBody
+from voucherify.models.management_projects_metadata_schemas_list_response_body import ManagementProjectsMetadataSchemasListResponseBody
+from voucherify.models.management_projects_metadata_schemas_update_request_body import ManagementProjectsMetadataSchemasUpdateRequestBody
+from voucherify.models.management_projects_metadata_schemas_update_response_body import ManagementProjectsMetadataSchemasUpdateResponseBody
+from voucherify.models.management_projects_stacking_rules import ManagementProjectsStackingRules
+from voucherify.models.management_projects_stacking_rules_create_request_body import ManagementProjectsStackingRulesCreateRequestBody
+from voucherify.models.management_projects_stacking_rules_create_response_body import ManagementProjectsStackingRulesCreateResponseBody
+from voucherify.models.management_projects_stacking_rules_get_response_body import ManagementProjectsStackingRulesGetResponseBody
+from voucherify.models.management_projects_stacking_rules_list_response_body import ManagementProjectsStackingRulesListResponseBody
+from voucherify.models.management_projects_stacking_rules_update_request_body import ManagementProjectsStackingRulesUpdateRequestBody
+from voucherify.models.management_projects_stacking_rules_update_response_body import ManagementProjectsStackingRulesUpdateResponseBody
+from voucherify.models.management_projects_templates_campaigns_copy_create_request_body import ManagementProjectsTemplatesCampaignsCopyCreateRequestBody
+from voucherify.models.management_projects_templates_campaigns_copy_create_response_body import ManagementProjectsTemplatesCampaignsCopyCreateResponseBody
+from voucherify.models.management_projects_templates_campaigns_list_response_body import ManagementProjectsTemplatesCampaignsListResponseBody
+from voucherify.models.management_projects_update_request_body import ManagementProjectsUpdateRequestBody
+from voucherify.models.management_projects_update_request_body_api_usage_notifications import ManagementProjectsUpdateRequestBodyApiUsageNotifications
+from voucherify.models.management_projects_update_request_body_default_code_config import ManagementProjectsUpdateRequestBodyDefaultCodeConfig
+from voucherify.models.management_projects_update_request_body_webhooks_callout_notifications import ManagementProjectsUpdateRequestBodyWebhooksCalloutNotifications
+from voucherify.models.management_projects_update_request_body_webhooks_callout_notifications_distributions import ManagementProjectsUpdateRequestBodyWebhooksCalloutNotificationsDistributions
+from voucherify.models.management_projects_update_request_body_webhooks_callout_notifications_webhooks import ManagementProjectsUpdateRequestBodyWebhooksCalloutNotificationsWebhooks
+from voucherify.models.management_projects_update_response_body import ManagementProjectsUpdateResponseBody
+from voucherify.models.management_projects_update_response_body_api_usage_notifications import ManagementProjectsUpdateResponseBodyApiUsageNotifications
+from voucherify.models.management_projects_update_response_body_default_code_config import ManagementProjectsUpdateResponseBodyDefaultCodeConfig
+from voucherify.models.management_projects_update_response_body_limits import ManagementProjectsUpdateResponseBodyLimits
+from voucherify.models.management_projects_update_response_body_limits_api_calls_item import ManagementProjectsUpdateResponseBodyLimitsApiCallsItem
+from voucherify.models.management_projects_update_response_body_limits_bulk_api_calls_item import ManagementProjectsUpdateResponseBodyLimitsBulkApiCallsItem
+from voucherify.models.management_projects_update_response_body_webhooks_callout_notifications import ManagementProjectsUpdateResponseBodyWebhooksCalloutNotifications
+from voucherify.models.management_projects_update_response_body_webhooks_callout_notifications_distributions import ManagementProjectsUpdateResponseBodyWebhooksCalloutNotificationsDistributions
+from voucherify.models.management_projects_update_response_body_webhooks_callout_notifications_webhooks import ManagementProjectsUpdateResponseBodyWebhooksCalloutNotificationsWebhooks
+from voucherify.models.management_projects_users_assign_request_body import ManagementProjectsUsersAssignRequestBody
+from voucherify.models.management_projects_users_assign_response_body import ManagementProjectsUsersAssignResponseBody
+from voucherify.models.management_projects_users_get_user_response_body import ManagementProjectsUsersGetUserResponseBody
+from voucherify.models.management_projects_users_invite_create_request_body import ManagementProjectsUsersInviteCreateRequestBody
+from voucherify.models.management_projects_users_list_response_body import ManagementProjectsUsersListResponseBody
+from voucherify.models.management_projects_users_update_role_request_body import ManagementProjectsUsersUpdateRoleRequestBody
+from voucherify.models.management_projects_users_update_role_response_body import ManagementProjectsUsersUpdateRoleResponseBody
+from voucherify.models.management_projects_webhook import ManagementProjectsWebhook
+from voucherify.models.management_projects_webhooks_create_request_body import ManagementProjectsWebhooksCreateRequestBody
+from voucherify.models.management_projects_webhooks_create_response_body import ManagementProjectsWebhooksCreateResponseBody
+from voucherify.models.management_projects_webhooks_get_response_body import ManagementProjectsWebhooksGetResponseBody
+from voucherify.models.management_projects_webhooks_list_response_body import ManagementProjectsWebhooksListResponseBody
+from voucherify.models.management_projects_webhooks_update_request_body import ManagementProjectsWebhooksUpdateRequestBody
+from voucherify.models.management_projects_webhooks_update_response_body import ManagementProjectsWebhooksUpdateResponseBody
from voucherify.models.member_activity import MemberActivity
+from voucherify.models.metadata_schema_deprecated import MetadataSchemaDeprecated
+from voucherify.models.metadata_schemas_get_response_body import MetadataSchemasGetResponseBody
+from voucherify.models.metadata_schemas_list_response_body import MetadataSchemasListResponseBody
from voucherify.models.order import Order
from voucherify.models.order_calculated import OrderCalculated
from voucherify.models.order_calculated_item import OrderCalculatedItem
@@ -474,12 +611,25 @@
from voucherify.models.parameter_campaign_type import ParameterCampaignType
from voucherify.models.parameter_created_before_after import ParameterCreatedBeforeAfter
from voucherify.models.parameter_expand_list_campaigns import ParameterExpandListCampaigns
+from voucherify.models.parameter_filters_list_bin import ParameterFiltersListBin
+from voucherify.models.parameter_filters_list_bin_id import ParameterFiltersListBinId
+from voucherify.models.parameter_filters_list_bin_resource_id import ParameterFiltersListBinResourceId
+from voucherify.models.parameter_filters_list_bin_resource_name import ParameterFiltersListBinResourceName
+from voucherify.models.parameter_filters_list_bin_resource_type import ParameterFiltersListBinResourceType
+from voucherify.models.parameter_filters_list_bin_resource_type_conditions import ParameterFiltersListBinResourceTypeConditions
+from voucherify.models.parameter_filters_list_campaigns import ParameterFiltersListCampaigns
+from voucherify.models.parameter_filters_list_campaigns_campaign_status import ParameterFiltersListCampaignsCampaignStatus
+from voucherify.models.parameter_filters_list_campaigns_campaign_status_conditions import ParameterFiltersListCampaignsCampaignStatusConditions
+from voucherify.models.parameter_filters_list_campaigns_categories import ParameterFiltersListCampaignsCategories
+from voucherify.models.parameter_filters_list_campaigns_category_ids import ParameterFiltersListCampaignsCategoryIds
+from voucherify.models.parameter_filters_list_campaigns_is_referral_code import ParameterFiltersListCampaignsIsReferralCode
+from voucherify.models.parameter_filters_list_campaigns_validity_timeframe import ParameterFiltersListCampaignsValidityTimeframe
+from voucherify.models.parameter_filters_list_campaigns_voucher_type import ParameterFiltersListCampaignsVoucherType
from voucherify.models.parameter_filters_list_customer_redeemables import ParameterFiltersListCustomerRedeemables
from voucherify.models.parameter_filters_list_customer_redeemables_campaign_id import ParameterFiltersListCustomerRedeemablesCampaignId
from voucherify.models.parameter_filters_list_customer_redeemables_campaign_type import ParameterFiltersListCustomerRedeemablesCampaignType
from voucherify.models.parameter_filters_list_customer_redeemables_campaign_type_conditions import ParameterFiltersListCustomerRedeemablesCampaignTypeConditions
from voucherify.models.parameter_filters_list_customer_redeemables_created_at import ParameterFiltersListCustomerRedeemablesCreatedAt
-from voucherify.models.parameter_filters_list_customer_redeemables_created_at_conditions import ParameterFiltersListCustomerRedeemablesCreatedAtConditions
from voucherify.models.parameter_filters_list_customer_redeemables_holder_role import ParameterFiltersListCustomerRedeemablesHolderRole
from voucherify.models.parameter_filters_list_customer_redeemables_holder_role_conditions import ParameterFiltersListCustomerRedeemablesHolderRoleConditions
from voucherify.models.parameter_filters_list_customer_redeemables_id import ParameterFiltersListCustomerRedeemablesId
@@ -488,6 +638,20 @@
from voucherify.models.parameter_filters_list_customer_redeemables_redeemable_object_conditions import ParameterFiltersListCustomerRedeemablesRedeemableObjectConditions
from voucherify.models.parameter_filters_list_customer_redeemables_voucher_type import ParameterFiltersListCustomerRedeemablesVoucherType
from voucherify.models.parameter_filters_list_customer_redeemables_voucher_type_conditions import ParameterFiltersListCustomerRedeemablesVoucherTypeConditions
+from voucherify.models.parameter_filters_list_locations import ParameterFiltersListLocations
+from voucherify.models.parameter_filters_list_locations_created_at import ParameterFiltersListLocationsCreatedAt
+from voucherify.models.parameter_filters_list_locations_name import ParameterFiltersListLocationsName
+from voucherify.models.parameter_filters_list_locations_updated_at import ParameterFiltersListLocationsUpdatedAt
+from voucherify.models.parameter_filters_list_publications import ParameterFiltersListPublications
+from voucherify.models.parameter_filters_list_publications_campaign_name import ParameterFiltersListPublicationsCampaignName
+from voucherify.models.parameter_filters_list_publications_customer_id import ParameterFiltersListPublicationsCustomerId
+from voucherify.models.parameter_filters_list_publications_failure_code import ParameterFiltersListPublicationsFailureCode
+from voucherify.models.parameter_filters_list_publications_is_referral_code import ParameterFiltersListPublicationsIsReferralCode
+from voucherify.models.parameter_filters_list_publications_parent_object_id import ParameterFiltersListPublicationsParentObjectId
+from voucherify.models.parameter_filters_list_publications_related_object_id import ParameterFiltersListPublicationsRelatedObjectId
+from voucherify.models.parameter_filters_list_publications_result import ParameterFiltersListPublicationsResult
+from voucherify.models.parameter_filters_list_publications_source_id import ParameterFiltersListPublicationsSourceId
+from voucherify.models.parameter_filters_list_publications_voucher_type import ParameterFiltersListPublicationsVoucherType
from voucherify.models.parameter_filters_list_redemptions import ParameterFiltersListRedemptions
from voucherify.models.parameter_filters_list_redemptions_campaign_name import ParameterFiltersListRedemptionsCampaignName
from voucherify.models.parameter_filters_list_redemptions_customer_id import ParameterFiltersListRedemptionsCustomerId
@@ -499,13 +663,26 @@
from voucherify.models.parameter_filters_list_redemptions_result import ParameterFiltersListRedemptionsResult
from voucherify.models.parameter_filters_list_redemptions_user_login import ParameterFiltersListRedemptionsUserLogin
from voucherify.models.parameter_filters_list_redemptions_voucher_code import ParameterFiltersListRedemptionsVoucherCode
+from voucherify.models.parameter_filters_list_referrals_redeemable_holders import ParameterFiltersListReferralsRedeemableHolders
+from voucherify.models.parameter_filters_list_referrals_redeemable_holders_created_at import ParameterFiltersListReferralsRedeemableHoldersCreatedAt
+from voucherify.models.parameter_filters_list_referrals_redeemable_holders_customer_id import ParameterFiltersListReferralsRedeemableHoldersCustomerId
+from voucherify.models.parameter_filters_list_referrals_redeemable_holders_holder_role import ParameterFiltersListReferralsRedeemableHoldersHolderRole
+from voucherify.models.parameter_filters_list_referrals_redeemable_holders_holder_role_conditions import ParameterFiltersListReferralsRedeemableHoldersHolderRoleConditions
+from voucherify.models.parameter_filters_list_referrals_redeemable_holders_id import ParameterFiltersListReferralsRedeemableHoldersId
+from voucherify.models.parameter_filters_list_templates import ParameterFiltersListTemplates
+from voucherify.models.parameter_filters_list_templates_campaign_type import ParameterFiltersListTemplatesCampaignType
+from voucherify.models.parameter_filters_list_templates_campaign_type_conditions import ParameterFiltersListTemplatesCampaignTypeConditions
+from voucherify.models.parameter_filters_list_templates_id import ParameterFiltersListTemplatesId
+from voucherify.models.parameter_filters_list_templates_name import ParameterFiltersListTemplatesName
from voucherify.models.parameter_order import ParameterOrder
from voucherify.models.parameter_order_created_at import ParameterOrderCreatedAt
from voucherify.models.parameter_order_list_all_promotion_stacks import ParameterOrderListAllPromotionStacks
+from voucherify.models.parameter_order_list_bin import ParameterOrderListBin
from voucherify.models.parameter_order_list_campaigns import ParameterOrderListCampaigns
from voucherify.models.parameter_order_list_customers import ParameterOrderListCustomers
from voucherify.models.parameter_order_list_earning_rules import ParameterOrderListEarningRules
from voucherify.models.parameter_order_list_exports import ParameterOrderListExports
+from voucherify.models.parameter_order_list_locations import ParameterOrderListLocations
from voucherify.models.parameter_order_list_loyalty_tiers import ParameterOrderListLoyaltyTiers
from voucherify.models.parameter_order_list_orders import ParameterOrderListOrders
from voucherify.models.parameter_order_list_promotion_tiers import ParameterOrderListPromotionTiers
@@ -518,21 +695,18 @@
from voucherify.models.parameter_order_list_validation_rules import ParameterOrderListValidationRules
from voucherify.models.parameter_order_vouchers import ParameterOrderVouchers
from voucherify.models.parameter_result_list_publications import ParameterResultListPublications
+from voucherify.models.parameter_templates_list import ParameterTemplatesList
from voucherify.models.parameter_updated_before_after import ParameterUpdatedBeforeAfter
from voucherify.models.parameter_voucher_type_list_publications import ParameterVoucherTypeListPublications
from voucherify.models.points_expiration_types import PointsExpirationTypes
from voucherify.models.product import Product
from voucherify.models.product_collections_create_request_body import ProductCollectionsCreateRequestBody
-from voucherify.models.product_collections_create_request_body_filter import ProductCollectionsCreateRequestBodyFilter
from voucherify.models.product_collections_create_request_body_products_item import ProductCollectionsCreateRequestBodyProductsItem
from voucherify.models.product_collections_create_response_body import ProductCollectionsCreateResponseBody
-from voucherify.models.product_collections_create_response_body_filter import ProductCollectionsCreateResponseBodyFilter
from voucherify.models.product_collections_create_response_body_products_item import ProductCollectionsCreateResponseBodyProductsItem
from voucherify.models.product_collections_get_response_body import ProductCollectionsGetResponseBody
-from voucherify.models.product_collections_get_response_body_filter import ProductCollectionsGetResponseBodyFilter
from voucherify.models.product_collections_get_response_body_products_item import ProductCollectionsGetResponseBodyProductsItem
from voucherify.models.product_collections_item import ProductCollectionsItem
-from voucherify.models.product_collections_item_filter import ProductCollectionsItemFilter
from voucherify.models.product_collections_item_products_item import ProductCollectionsItemProductsItem
from voucherify.models.product_collections_list_response_body import ProductCollectionsListResponseBody
from voucherify.models.product_collections_products_list_response_body import ProductCollectionsProductsListResponseBody
@@ -614,8 +788,6 @@
from voucherify.models.promotions_tiers_update_response_body_summary_orders import PromotionsTiersUpdateResponseBodySummaryOrders
from voucherify.models.promotions_tiers_update_response_body_summary_redemptions import PromotionsTiersUpdateResponseBodySummaryRedemptions
from voucherify.models.publications_create_request_body import PublicationsCreateRequestBody
-from voucherify.models.publications_create_request_body_customer import PublicationsCreateRequestBodyCustomer
-from voucherify.models.publications_create_request_body_customer_address import PublicationsCreateRequestBodyCustomerAddress
from voucherify.models.publications_create_response_body import PublicationsCreateResponseBody
from voucherify.models.publications_list_response_body import PublicationsListResponseBody
from voucherify.models.publications_list_response_body_publications_item import PublicationsListResponseBodyPublicationsItem
@@ -636,6 +808,7 @@
from voucherify.models.qualifications_redeemable_base import QualificationsRedeemableBase
from voucherify.models.qualifications_redeemables import QualificationsRedeemables
from voucherify.models.redeemable_gift import RedeemableGift
+from voucherify.models.redeemable_holder import RedeemableHolder
from voucherify.models.redeemable_loyalty_card import RedeemableLoyaltyCard
from voucherify.models.redeemable_result import RedeemableResult
from voucherify.models.redeemable_voucher import RedeemableVoucher
@@ -754,6 +927,9 @@
from voucherify.models.referral_program_custom_event import ReferralProgramCustomEvent
from voucherify.models.referral_program_referee_reward import ReferralProgramRefereeReward
from voucherify.models.referral_program_referee_reward_related_object_parent import ReferralProgramRefereeRewardRelatedObjectParent
+from voucherify.models.referrals_members_holders_create_in_bulk_request_body import ReferralsMembersHoldersCreateInBulkRequestBody
+from voucherify.models.referrals_members_holders_create_in_bulk_response_body import ReferralsMembersHoldersCreateInBulkResponseBody
+from voucherify.models.referrals_members_holders_list_response_body import ReferralsMembersHoldersListResponseBody
from voucherify.models.referrer import Referrer
from voucherify.models.referrer_address import ReferrerAddress
from voucherify.models.referrer_id import ReferrerId
@@ -817,6 +993,24 @@
from voucherify.models.skus_import_csv_create_response_body import SkusImportCsvCreateResponseBody
from voucherify.models.skus_list_for_product import SkusListForProduct
from voucherify.models.stacking_rules import StackingRules
+from voucherify.models.templates_campaigns_campaign_setup_create_request_body import TemplatesCampaignsCampaignSetupCreateRequestBody
+from voucherify.models.templates_campaigns_campaign_setup_create_request_body_voucher import TemplatesCampaignsCampaignSetupCreateRequestBodyVoucher
+from voucherify.models.templates_campaigns_campaign_setup_create_request_body_voucher_redemption import TemplatesCampaignsCampaignSetupCreateRequestBodyVoucherRedemption
+from voucherify.models.templates_campaigns_campaign_setup_create_response_body import TemplatesCampaignsCampaignSetupCreateResponseBody
+from voucherify.models.templates_campaigns_campaign_setup_create_response_body_created_resources_item import TemplatesCampaignsCampaignSetupCreateResponseBodyCreatedResourcesItem
+from voucherify.models.templates_campaigns_create_request_body import TemplatesCampaignsCreateRequestBody
+from voucherify.models.templates_campaigns_create_template_response_body import TemplatesCampaignsCreateTemplateResponseBody
+from voucherify.models.templates_campaigns_get_response_body import TemplatesCampaignsGetResponseBody
+from voucherify.models.templates_campaigns_list_response_body import TemplatesCampaignsListResponseBody
+from voucherify.models.templates_campaigns_tier_setup_create_request_body import TemplatesCampaignsTierSetupCreateRequestBody
+from voucherify.models.templates_campaigns_tier_setup_create_response_body import TemplatesCampaignsTierSetupCreateResponseBody
+from voucherify.models.templates_campaigns_tier_setup_create_response_body_created_resources_item import TemplatesCampaignsTierSetupCreateResponseBodyCreatedResourcesItem
+from voucherify.models.templates_campaigns_update_request_body import TemplatesCampaignsUpdateRequestBody
+from voucherify.models.templates_campaigns_update_response_body import TemplatesCampaignsUpdateResponseBody
+from voucherify.models.trash_bin_item import TrashBinItem
+from voucherify.models.trash_bin_list_response_body import TrashBinListResponseBody
+from voucherify.models.usage_notifications import UsageNotifications
+from voucherify.models.user import User
from voucherify.models.validation_rule import ValidationRule
from voucherify.models.validation_rule_applicable_to import ValidationRuleApplicableTo
from voucherify.models.validation_rule_assignment import ValidationRuleAssignment
diff --git a/voucherify/models/access_settings.py b/voucherify/models/access_settings.py
new file mode 100644
index 00000000..0f5cfaeb
--- /dev/null
+++ b/voucherify/models/access_settings.py
@@ -0,0 +1,108 @@
+# coding: utf-8
+
+"""
+ Voucherify API
+
+ Voucherify promotion engine REST API. Please see https://docs.voucherify.io/docs for more details.
+
+ The version of the OpenAPI document: v2018-08-01
+ Contact: support@voucherify.io
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict
+from typing import Any, ClassVar, Dict, List, Optional
+from voucherify.models.access_settings_assign import AccessSettingsAssign
+from voucherify.models.access_settings_unassign import AccessSettingsUnassign
+from typing import Optional, Set
+from typing_extensions import Self
+
+class AccessSettings(BaseModel):
+ """
+ Assigns or unassigns an area or store to the campaign. **NOTE**: this object can be sent if the Areas and Stores enterprise feature is enabled. Contact [Voucherify Sales](https://www.voucherify.io/contact-sales) to learn more.
+ """ # noqa: E501
+ assign: Optional[AccessSettingsAssign] = None
+ unassign: Optional[AccessSettingsUnassign] = None
+ __properties: ClassVar[List[str]] = ["assign", "unassign"]
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of AccessSettings from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([
+ ])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ # override the default output from pydantic by calling `to_dict()` of assign
+ if self.assign:
+ _dict['assign'] = self.assign.to_dict()
+ # override the default output from pydantic by calling `to_dict()` of unassign
+ if self.unassign:
+ _dict['unassign'] = self.unassign.to_dict()
+ # set to None if assign (nullable) is None
+ # and model_fields_set contains the field
+ if self.assign is None and "assign" in self.model_fields_set:
+ _dict['assign'] = None
+
+ # set to None if unassign (nullable) is None
+ # and model_fields_set contains the field
+ if self.unassign is None and "unassign" in self.model_fields_set:
+ _dict['unassign'] = None
+
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of AccessSettings from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "assign": AccessSettingsAssign.from_dict(obj["assign"]) if obj.get("assign") is not None else None,
+ "unassign": AccessSettingsUnassign.from_dict(obj["unassign"]) if obj.get("unassign") is not None else None
+ })
+ return _obj
+
+
diff --git a/voucherify/models/access_settings_assign.py b/voucherify/models/access_settings_assign.py
new file mode 100644
index 00000000..caf03243
--- /dev/null
+++ b/voucherify/models/access_settings_assign.py
@@ -0,0 +1,100 @@
+# coding: utf-8
+
+"""
+ Voucherify API
+
+ Voucherify promotion engine REST API. Please see https://docs.voucherify.io/docs for more details.
+
+ The version of the OpenAPI document: v2018-08-01
+ Contact: support@voucherify.io
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict, Field, StrictStr
+from typing import Any, ClassVar, Dict, List, Optional
+from typing import Optional, Set
+from typing_extensions import Self
+
+class AccessSettingsAssign(BaseModel):
+ """
+ Assigns the campaign to an area or a store. Provide the area and/or store IDs in the respective arrays. If a campaign changes assignments between areas or stores, unassign it from the area. For example, if a campaign is assigned to Area-01, but it must be now assigned to Store-01 within this area, you have to unassign the campaign from Area-01 and assign to Store-01 only. If you want to assign the campaign to stores only, you do not have to send the area ID.
+ """ # noqa: E501
+ areas_ids: Optional[List[StrictStr]] = Field(default=None, description="List all area IDs to which the campaign will be assigned.")
+ area_stores_ids: Optional[List[StrictStr]] = Field(default=None, description="List all store IDs to which the campaign will be assigned.")
+ __properties: ClassVar[List[str]] = ["areas_ids", "area_stores_ids"]
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of AccessSettingsAssign from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([
+ ])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ # set to None if areas_ids (nullable) is None
+ # and model_fields_set contains the field
+ if self.areas_ids is None and "areas_ids" in self.model_fields_set:
+ _dict['areas_ids'] = None
+
+ # set to None if area_stores_ids (nullable) is None
+ # and model_fields_set contains the field
+ if self.area_stores_ids is None and "area_stores_ids" in self.model_fields_set:
+ _dict['area_stores_ids'] = None
+
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of AccessSettingsAssign from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "areas_ids": obj.get("areas_ids"),
+ "area_stores_ids": obj.get("area_stores_ids")
+ })
+ return _obj
+
+
diff --git a/voucherify/models/access_settings_campaign_assignments_list.py b/voucherify/models/access_settings_campaign_assignments_list.py
index 222b6a0f..24c1b0e8 100644
--- a/voucherify/models/access_settings_campaign_assignments_list.py
+++ b/voucherify/models/access_settings_campaign_assignments_list.py
@@ -27,7 +27,7 @@
class AccessSettingsCampaignAssignmentsList(BaseModel):
"""
- Lists all assignments of the campaign to areas and stores if the Areas and Stores feature is enabled (Enterprise feature).
+ Lists all assignments of the campaign to areas and stores. **NOTE**: This object is returned only if the Areas and Stores enterprise feature is enabled. Contact [Voucherify Sales](https://www.voucherify.io/contact-sales) to learn more.
""" # noqa: E501
object: Optional[StrictStr] = Field(default='list', description="The type of the object represented by JSON. Default is `list`. This object stores information about campaign assignments to areas and stores")
data_ref: Optional[StrictStr] = Field(default='data', description="Identifies the name of the attribute that contains the array of campaign assignments.")
diff --git a/voucherify/models/access_settings_unassign.py b/voucherify/models/access_settings_unassign.py
new file mode 100644
index 00000000..9fd0217f
--- /dev/null
+++ b/voucherify/models/access_settings_unassign.py
@@ -0,0 +1,100 @@
+# coding: utf-8
+
+"""
+ Voucherify API
+
+ Voucherify promotion engine REST API. Please see https://docs.voucherify.io/docs for more details.
+
+ The version of the OpenAPI document: v2018-08-01
+ Contact: support@voucherify.io
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict, Field, StrictStr
+from typing import Any, ClassVar, Dict, List, Optional
+from typing import Optional, Set
+from typing_extensions import Self
+
+class AccessSettingsUnassign(BaseModel):
+ """
+ Unassigns the campaign from an area or a store. Provide the area and/or store IDs in the respective arrays. If a campaign changes assignments between areas or stores, unassign it first. For example, if a campaign is assigned to Area-01, but it must be now assigned to Store-01 within this area, you have to unassign the campaign from Area-01 and assigned to Store-01 only. If you want to assign the campaign to stores only, you do not have to send the area ID.
+ """ # noqa: E501
+ areas_ids: Optional[List[StrictStr]] = Field(default=None, description="List all area IDs from which the campaign will be unassigned.")
+ area_stores_ids: Optional[List[StrictStr]] = Field(default=None, description="List all store IDs to which the campaign will be unassigned.")
+ __properties: ClassVar[List[str]] = ["areas_ids", "area_stores_ids"]
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of AccessSettingsUnassign from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([
+ ])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ # set to None if areas_ids (nullable) is None
+ # and model_fields_set contains the field
+ if self.areas_ids is None and "areas_ids" in self.model_fields_set:
+ _dict['areas_ids'] = None
+
+ # set to None if area_stores_ids (nullable) is None
+ # and model_fields_set contains the field
+ if self.area_stores_ids is None and "area_stores_ids" in self.model_fields_set:
+ _dict['area_stores_ids'] = None
+
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of AccessSettingsUnassign from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "areas_ids": obj.get("areas_ids"),
+ "area_stores_ids": obj.get("area_stores_ids")
+ })
+ return _obj
+
+
diff --git a/voucherify/models/campaign.py b/voucherify/models/campaign.py
new file mode 100644
index 00000000..098d22c4
--- /dev/null
+++ b/voucherify/models/campaign.py
@@ -0,0 +1,364 @@
+# coding: utf-8
+
+"""
+ Voucherify API
+
+ Voucherify promotion engine REST API. Please see https://docs.voucherify.io/docs for more details.
+
+ The version of the OpenAPI document: v2018-08-01
+ Contact: support@voucherify.io
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from datetime import datetime
+from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, StrictStr, field_validator
+from typing import Any, ClassVar, Dict, List, Optional
+from voucherify.models.access_settings_campaign_assignments_list import AccessSettingsCampaignAssignmentsList
+from voucherify.models.campaign_voucher import CampaignVoucher
+from voucherify.models.category import Category
+from voucherify.models.loyalty_tiers_expiration_all import LoyaltyTiersExpirationAll
+from voucherify.models.promotion_tiers_list import PromotionTiersList
+from voucherify.models.referral_program import ReferralProgram
+from voucherify.models.validation_rules_assignments_list import ValidationRulesAssignmentsList
+from voucherify.models.validity_hours import ValidityHours
+from voucherify.models.validity_timeframe import ValidityTimeframe
+from typing import Optional, Set
+from typing_extensions import Self
+
+class Campaign(BaseModel):
+ """
+ Campaign
+ """ # noqa: E501
+ id: Optional[StrictStr] = Field(default=None, description="Unique campaign ID, assigned by Voucherify.")
+ name: Optional[StrictStr] = Field(default=None, description="Campaign name.")
+ description: Optional[StrictStr] = Field(default=None, description="An optional field to keep any extra textual information about the campaign such as a campaign description and details.")
+ campaign_type: Optional[StrictStr] = Field(default=None, description="Type of campaign.")
+ type: Optional[StrictStr] = Field(default=None, description="Defines whether the campaign can be updated with new vouchers after campaign creation. - `AUTO_UPDATE`: the campaign is dynamic, i.e. vouchers will generate based on set criteria - `STATIC`: vouchers need to be manually published")
+ voucher: Optional[CampaignVoucher] = None
+ auto_join: Optional[StrictBool] = Field(default=None, description="Indicates whether customers will be able to auto-join a loyalty campaign if any earning rule is fulfilled.")
+ join_once: Optional[StrictBool] = Field(default=None, description="If this value is set to `true`, customers will be able to join the campaign only once.")
+ use_voucher_metadata_schema: Optional[StrictBool] = Field(default=None, description="Flag indicating whether the campaign is to use the voucher's metadata schema instead of the campaign metadata schema.")
+ validity_timeframe: Optional[ValidityTimeframe] = None
+ validity_day_of_week: Optional[List[StrictInt]] = Field(default=None, description="Integer array corresponding to the particular days of the week in which the voucher is valid. - `0` Sunday - `1` Monday - `2` Tuesday - `3` Wednesday - `4` Thursday - `5` Friday - `6` Saturday")
+ validity_hours: Optional[ValidityHours] = None
+ activity_duration_after_publishing: Optional[StrictStr] = Field(default=None, description="Defines the amount of time the vouchers will be active after publishing. The value is shown in the ISO 8601 format. For example, a voucher with the value of P24D will be valid for a duration of 24 days.")
+ vouchers_count: Optional[StrictInt] = Field(default=None, description="Total number of unique vouchers in campaign.")
+ start_date: Optional[datetime] = Field(default=None, description="Activation timestamp defines when the campaign starts to be active in ISO 8601 format. Campaign is *inactive before* this date. ")
+ expiration_date: Optional[datetime] = Field(default=None, description="Expiration timestamp defines when the campaign expires in ISO 8601 format. Campaign is *inactive after* this date.")
+ active: Optional[StrictBool] = Field(default=None, description="A flag to toggle the campaign on or off. You can disable a campaign even though it's within the active period defined by the `start_date` and `expiration_date`. - `true` indicates an *active* campaign - `false` indicates an *inactive* campaign")
+ metadata: Optional[Dict[str, Any]] = Field(default=None, description="The metadata object stores all custom attributes assigned to the campaign. A set of key/value pairs that you can attach to a campaign object. It can be useful for storing additional information about the campaign in a structured format.")
+ created_at: Optional[datetime] = Field(default=None, description="Timestamp representing the date and time when the campaign was created. The value is shown in the ISO 8601 format.")
+ updated_at: Optional[datetime] = Field(default=None, description="Timestamp representing the date and time when the campaign was last updated in ISO 8601 format.")
+ category: Optional[StrictStr] = Field(default=None, description="Unique category name.")
+ creation_status: Optional[StrictStr] = Field(default=None, description="Indicates the status of the campaign creation.")
+ vouchers_generation_status: Optional[StrictStr] = Field(default=None, description="Indicates the status of the campaign's voucher generation.")
+ readonly: Optional[StrictBool] = Field(default=None, description="Indicates whether the campaign can be only read by a restricted user in the Areas and Stores enterprise feature. It is returned only to restricted users; this field is not returned for users with other roles.")
+ protected: Optional[StrictBool] = Field(default=None, description="Indicates whether the resource can be deleted.")
+ category_id: Optional[StrictStr] = Field(default=None, description="Unique category ID that this campaign belongs to.")
+ categories: Optional[List[Category]] = Field(default=None, description="Contains details about the category.")
+ object: Optional[StrictStr] = Field(default='campaign', description="The type of the object represented by JSON. This object stores information about the campaign.")
+ referral_program: Optional[ReferralProgram] = None
+ loyalty_tiers_expiration: Optional[LoyaltyTiersExpirationAll] = None
+ promotion: Optional[PromotionTiersList] = None
+ validation_rules_assignments: Optional[ValidationRulesAssignmentsList] = None
+ access_settings_assignments: Optional[AccessSettingsCampaignAssignmentsList] = None
+ __properties: ClassVar[List[str]] = ["id", "name", "description", "campaign_type", "type", "voucher", "auto_join", "join_once", "use_voucher_metadata_schema", "validity_timeframe", "validity_day_of_week", "validity_hours", "activity_duration_after_publishing", "vouchers_count", "start_date", "expiration_date", "active", "metadata", "created_at", "updated_at", "category", "creation_status", "vouchers_generation_status", "readonly", "protected", "category_id", "categories", "object", "referral_program", "loyalty_tiers_expiration", "promotion", "validation_rules_assignments", "access_settings_assignments"]
+
+ @field_validator('campaign_type')
+ def campaign_type_validate_enum(cls, value):
+ """Validates the enum"""
+ if value is None:
+ return value
+
+ if value not in set(['LOYALTY_PROGRAM', 'GIFT_VOUCHERS', 'DISCOUNT_COUPONS', 'PROMOTION', 'REFERRAL_PROGRAM']):
+ raise ValueError("must be one of enum values ('LOYALTY_PROGRAM', 'GIFT_VOUCHERS', 'DISCOUNT_COUPONS', 'PROMOTION', 'REFERRAL_PROGRAM')")
+ return value
+
+ @field_validator('type')
+ def type_validate_enum(cls, value):
+ """Validates the enum"""
+ if value is None:
+ return value
+
+ if value not in set(['AUTO_UPDATE', 'STATIC']):
+ raise ValueError("must be one of enum values ('AUTO_UPDATE', 'STATIC')")
+ return value
+
+ @field_validator('validity_day_of_week')
+ def validity_day_of_week_validate_enum(cls, value):
+ """Validates the enum"""
+ if value is None:
+ return value
+
+ for i in value:
+ if i not in set([0, 1, 2, 3, 4, 5, 6]):
+ raise ValueError("each list item must be one of (0, 1, 2, 3, 4, 5, 6)")
+ return value
+
+ @field_validator('creation_status')
+ def creation_status_validate_enum(cls, value):
+ """Validates the enum"""
+ if value is None:
+ return value
+
+ if value not in set(['DONE', 'IN_PROGRESS', 'FAILED', 'DRAFT', 'MODIFYING']):
+ raise ValueError("must be one of enum values ('DONE', 'IN_PROGRESS', 'FAILED', 'DRAFT', 'MODIFYING')")
+ return value
+
+ @field_validator('vouchers_generation_status')
+ def vouchers_generation_status_validate_enum(cls, value):
+ """Validates the enum"""
+ if value is None:
+ return value
+
+ if value not in set(['DONE', 'IN_PROGRESS', 'FAILED', 'DRAFT', 'MODIFYING']):
+ raise ValueError("must be one of enum values ('DONE', 'IN_PROGRESS', 'FAILED', 'DRAFT', 'MODIFYING')")
+ return value
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of Campaign from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([
+ ])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ # override the default output from pydantic by calling `to_dict()` of voucher
+ if self.voucher:
+ _dict['voucher'] = self.voucher.to_dict()
+ # override the default output from pydantic by calling `to_dict()` of validity_timeframe
+ if self.validity_timeframe:
+ _dict['validity_timeframe'] = self.validity_timeframe.to_dict()
+ # override the default output from pydantic by calling `to_dict()` of validity_hours
+ if self.validity_hours:
+ _dict['validity_hours'] = self.validity_hours.to_dict()
+ # override the default output from pydantic by calling `to_dict()` of each item in categories (list)
+ _items = []
+ if self.categories:
+ for _item_categories in self.categories:
+ if _item_categories:
+ _items.append(_item_categories.to_dict())
+ _dict['categories'] = _items
+ # override the default output from pydantic by calling `to_dict()` of referral_program
+ if self.referral_program:
+ _dict['referral_program'] = self.referral_program.to_dict()
+ # override the default output from pydantic by calling `to_dict()` of loyalty_tiers_expiration
+ if self.loyalty_tiers_expiration:
+ _dict['loyalty_tiers_expiration'] = self.loyalty_tiers_expiration.to_dict()
+ # override the default output from pydantic by calling `to_dict()` of promotion
+ if self.promotion:
+ _dict['promotion'] = self.promotion.to_dict()
+ # override the default output from pydantic by calling `to_dict()` of validation_rules_assignments
+ if self.validation_rules_assignments:
+ _dict['validation_rules_assignments'] = self.validation_rules_assignments.to_dict()
+ # override the default output from pydantic by calling `to_dict()` of access_settings_assignments
+ if self.access_settings_assignments:
+ _dict['access_settings_assignments'] = self.access_settings_assignments.to_dict()
+ # set to None if id (nullable) is None
+ # and model_fields_set contains the field
+ if self.id is None and "id" in self.model_fields_set:
+ _dict['id'] = None
+
+ # set to None if name (nullable) is None
+ # and model_fields_set contains the field
+ if self.name is None and "name" in self.model_fields_set:
+ _dict['name'] = None
+
+ # set to None if description (nullable) is None
+ # and model_fields_set contains the field
+ if self.description is None and "description" in self.model_fields_set:
+ _dict['description'] = None
+
+ # set to None if campaign_type (nullable) is None
+ # and model_fields_set contains the field
+ if self.campaign_type is None and "campaign_type" in self.model_fields_set:
+ _dict['campaign_type'] = None
+
+ # set to None if type (nullable) is None
+ # and model_fields_set contains the field
+ if self.type is None and "type" in self.model_fields_set:
+ _dict['type'] = None
+
+ # set to None if auto_join (nullable) is None
+ # and model_fields_set contains the field
+ if self.auto_join is None and "auto_join" in self.model_fields_set:
+ _dict['auto_join'] = None
+
+ # set to None if join_once (nullable) is None
+ # and model_fields_set contains the field
+ if self.join_once is None and "join_once" in self.model_fields_set:
+ _dict['join_once'] = None
+
+ # set to None if use_voucher_metadata_schema (nullable) is None
+ # and model_fields_set contains the field
+ if self.use_voucher_metadata_schema is None and "use_voucher_metadata_schema" in self.model_fields_set:
+ _dict['use_voucher_metadata_schema'] = None
+
+ # set to None if activity_duration_after_publishing (nullable) is None
+ # and model_fields_set contains the field
+ if self.activity_duration_after_publishing is None and "activity_duration_after_publishing" in self.model_fields_set:
+ _dict['activity_duration_after_publishing'] = None
+
+ # set to None if vouchers_count (nullable) is None
+ # and model_fields_set contains the field
+ if self.vouchers_count is None and "vouchers_count" in self.model_fields_set:
+ _dict['vouchers_count'] = None
+
+ # set to None if start_date (nullable) is None
+ # and model_fields_set contains the field
+ if self.start_date is None and "start_date" in self.model_fields_set:
+ _dict['start_date'] = None
+
+ # set to None if expiration_date (nullable) is None
+ # and model_fields_set contains the field
+ if self.expiration_date is None and "expiration_date" in self.model_fields_set:
+ _dict['expiration_date'] = None
+
+ # set to None if active (nullable) is None
+ # and model_fields_set contains the field
+ if self.active is None and "active" in self.model_fields_set:
+ _dict['active'] = None
+
+ # set to None if metadata (nullable) is None
+ # and model_fields_set contains the field
+ if self.metadata is None and "metadata" in self.model_fields_set:
+ _dict['metadata'] = None
+
+ # set to None if created_at (nullable) is None
+ # and model_fields_set contains the field
+ if self.created_at is None and "created_at" in self.model_fields_set:
+ _dict['created_at'] = None
+
+ # set to None if updated_at (nullable) is None
+ # and model_fields_set contains the field
+ if self.updated_at is None and "updated_at" in self.model_fields_set:
+ _dict['updated_at'] = None
+
+ # set to None if category (nullable) is None
+ # and model_fields_set contains the field
+ if self.category is None and "category" in self.model_fields_set:
+ _dict['category'] = None
+
+ # set to None if creation_status (nullable) is None
+ # and model_fields_set contains the field
+ if self.creation_status is None and "creation_status" in self.model_fields_set:
+ _dict['creation_status'] = None
+
+ # set to None if vouchers_generation_status (nullable) is None
+ # and model_fields_set contains the field
+ if self.vouchers_generation_status is None and "vouchers_generation_status" in self.model_fields_set:
+ _dict['vouchers_generation_status'] = None
+
+ # set to None if readonly (nullable) is None
+ # and model_fields_set contains the field
+ if self.readonly is None and "readonly" in self.model_fields_set:
+ _dict['readonly'] = None
+
+ # set to None if protected (nullable) is None
+ # and model_fields_set contains the field
+ if self.protected is None and "protected" in self.model_fields_set:
+ _dict['protected'] = None
+
+ # set to None if category_id (nullable) is None
+ # and model_fields_set contains the field
+ if self.category_id is None and "category_id" in self.model_fields_set:
+ _dict['category_id'] = None
+
+ # set to None if categories (nullable) is None
+ # and model_fields_set contains the field
+ if self.categories is None and "categories" in self.model_fields_set:
+ _dict['categories'] = None
+
+ # set to None if object (nullable) is None
+ # and model_fields_set contains the field
+ if self.object is None and "object" in self.model_fields_set:
+ _dict['object'] = None
+
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of Campaign from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "id": obj.get("id"),
+ "name": obj.get("name"),
+ "description": obj.get("description"),
+ "campaign_type": obj.get("campaign_type"),
+ "type": obj.get("type"),
+ "voucher": CampaignVoucher.from_dict(obj["voucher"]) if obj.get("voucher") is not None else None,
+ "auto_join": obj.get("auto_join"),
+ "join_once": obj.get("join_once"),
+ "use_voucher_metadata_schema": obj.get("use_voucher_metadata_schema"),
+ "validity_timeframe": ValidityTimeframe.from_dict(obj["validity_timeframe"]) if obj.get("validity_timeframe") is not None else None,
+ "validity_day_of_week": obj.get("validity_day_of_week"),
+ "validity_hours": ValidityHours.from_dict(obj["validity_hours"]) if obj.get("validity_hours") is not None else None,
+ "activity_duration_after_publishing": obj.get("activity_duration_after_publishing"),
+ "vouchers_count": obj.get("vouchers_count"),
+ "start_date": obj.get("start_date"),
+ "expiration_date": obj.get("expiration_date"),
+ "active": obj.get("active"),
+ "metadata": obj.get("metadata"),
+ "created_at": obj.get("created_at"),
+ "updated_at": obj.get("updated_at"),
+ "category": obj.get("category"),
+ "creation_status": obj.get("creation_status"),
+ "vouchers_generation_status": obj.get("vouchers_generation_status"),
+ "readonly": obj.get("readonly"),
+ "protected": obj.get("protected"),
+ "category_id": obj.get("category_id"),
+ "categories": [Category.from_dict(_item) for _item in obj["categories"]] if obj.get("categories") is not None else None,
+ "object": obj.get("object") if obj.get("object") is not None else 'campaign',
+ "referral_program": ReferralProgram.from_dict(obj["referral_program"]) if obj.get("referral_program") is not None else None,
+ "loyalty_tiers_expiration": LoyaltyTiersExpirationAll.from_dict(obj["loyalty_tiers_expiration"]) if obj.get("loyalty_tiers_expiration") is not None else None,
+ "promotion": PromotionTiersList.from_dict(obj["promotion"]) if obj.get("promotion") is not None else None,
+ "validation_rules_assignments": ValidationRulesAssignmentsList.from_dict(obj["validation_rules_assignments"]) if obj.get("validation_rules_assignments") is not None else None,
+ "access_settings_assignments": AccessSettingsCampaignAssignmentsList.from_dict(obj["access_settings_assignments"]) if obj.get("access_settings_assignments") is not None else None
+ })
+ return _obj
+
+
diff --git a/voucherify/models/campaign_base.py b/voucherify/models/campaign_base.py
index 23bccc94..9a2607e3 100644
--- a/voucherify/models/campaign_base.py
+++ b/voucherify/models/campaign_base.py
@@ -57,13 +57,14 @@ class CampaignBase(BaseModel):
category: Optional[StrictStr] = Field(default=None, description="Unique category name.")
creation_status: Optional[StrictStr] = Field(default=None, description="Indicates the status of the campaign creation.")
vouchers_generation_status: Optional[StrictStr] = Field(default=None, description="Indicates the status of the campaign's voucher generation.")
+ readonly: Optional[StrictBool] = Field(default=None, description="Indicates whether the campaign can be only read by a restricted user in the Areas and Stores enterprise feature. It is returned only to restricted users; this field is not returned for users with other roles.")
protected: Optional[StrictBool] = Field(default=None, description="Indicates whether the resource can be deleted.")
category_id: Optional[StrictStr] = Field(default=None, description="Unique category ID that this campaign belongs to.")
categories: Optional[List[Category]] = Field(default=None, description="Contains details about the category.")
object: Optional[StrictStr] = Field(default='campaign', description="The type of the object represented by JSON. This object stores information about the campaign.")
referral_program: Optional[ReferralProgram] = None
loyalty_tiers_expiration: Optional[LoyaltyTiersExpirationAll] = None
- __properties: ClassVar[List[str]] = ["id", "name", "description", "campaign_type", "type", "voucher", "auto_join", "join_once", "use_voucher_metadata_schema", "validity_timeframe", "validity_day_of_week", "validity_hours", "activity_duration_after_publishing", "vouchers_count", "start_date", "expiration_date", "active", "metadata", "created_at", "updated_at", "category", "creation_status", "vouchers_generation_status", "protected", "category_id", "categories", "object", "referral_program", "loyalty_tiers_expiration"]
+ __properties: ClassVar[List[str]] = ["id", "name", "description", "campaign_type", "type", "voucher", "auto_join", "join_once", "use_voucher_metadata_schema", "validity_timeframe", "validity_day_of_week", "validity_hours", "activity_duration_after_publishing", "vouchers_count", "start_date", "expiration_date", "active", "metadata", "created_at", "updated_at", "category", "creation_status", "vouchers_generation_status", "readonly", "protected", "category_id", "categories", "object", "referral_program", "loyalty_tiers_expiration"]
@field_validator('campaign_type')
def campaign_type_validate_enum(cls, value):
@@ -71,8 +72,8 @@ def campaign_type_validate_enum(cls, value):
if value is None:
return value
- if value not in set(['LOYALTY_PROGRAM', 'GIFT_VOUCHERS', 'DISCOUNT_COUPONS', 'PROMOTION', 'REFERRAL_PROGRAM', 'LUCKY_DRAW']):
- raise ValueError("must be one of enum values ('LOYALTY_PROGRAM', 'GIFT_VOUCHERS', 'DISCOUNT_COUPONS', 'PROMOTION', 'REFERRAL_PROGRAM', 'LUCKY_DRAW')")
+ if value not in set(['LOYALTY_PROGRAM', 'GIFT_VOUCHERS', 'DISCOUNT_COUPONS', 'PROMOTION', 'REFERRAL_PROGRAM']):
+ raise ValueError("must be one of enum values ('LOYALTY_PROGRAM', 'GIFT_VOUCHERS', 'DISCOUNT_COUPONS', 'PROMOTION', 'REFERRAL_PROGRAM')")
return value
@field_validator('type')
@@ -272,6 +273,11 @@ def to_dict(self) -> Dict[str, Any]:
if self.vouchers_generation_status is None and "vouchers_generation_status" in self.model_fields_set:
_dict['vouchers_generation_status'] = None
+ # set to None if readonly (nullable) is None
+ # and model_fields_set contains the field
+ if self.readonly is None and "readonly" in self.model_fields_set:
+ _dict['readonly'] = None
+
# set to None if protected (nullable) is None
# and model_fields_set contains the field
if self.protected is None and "protected" in self.model_fields_set:
@@ -327,6 +333,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
"category": obj.get("category"),
"creation_status": obj.get("creation_status"),
"vouchers_generation_status": obj.get("vouchers_generation_status"),
+ "readonly": obj.get("readonly"),
"protected": obj.get("protected"),
"category_id": obj.get("category_id"),
"categories": [Category.from_dict(_item) for _item in obj["categories"]] if obj.get("categories") is not None else None,
diff --git a/voucherify/models/campaign_template.py b/voucherify/models/campaign_template.py
new file mode 100644
index 00000000..5ce5507c
--- /dev/null
+++ b/voucherify/models/campaign_template.py
@@ -0,0 +1,156 @@
+# coding: utf-8
+
+"""
+ Voucherify API
+
+ Voucherify promotion engine REST API. Please see https://docs.voucherify.io/docs for more details.
+
+ The version of the OpenAPI document: v2018-08-01
+ Contact: support@voucherify.io
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from datetime import datetime
+from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator
+from typing import Any, ClassVar, Dict, List, Optional
+from typing import Optional, Set
+from typing_extensions import Self
+
+class CampaignTemplate(BaseModel):
+ """
+ CampaignTemplate
+ """ # noqa: E501
+ id: Optional[StrictStr] = Field(default=None, description="Unique identifier of the campaign template. It is assigned by Voucherify.")
+ name: Optional[StrictStr] = Field(default=None, description="User-defined name of the campaign template.")
+ description: Optional[StrictStr] = Field(default=None, description="User-defined description of the campaign template.")
+ campaign_type: Optional[StrictStr] = Field(default=None, description="Type of the campaign used to create the campaign template. Templates created from a promotion tier are converted to `DISCOUNT_COUPONS`.")
+ created_at: Optional[datetime] = Field(default=None, description="Timestamp representing the date and time when the campaign template was created. The value is shown in the ISO 8601 format.")
+ object: Optional[StrictStr] = Field(default='campaign_template', description="The type of the object represented by JSON.")
+ updated_at: Optional[datetime] = Field(default=None, description="Timestamp representing the date and time when the campaign template was last updated. The value is shown in the ISO 8601 format.")
+ __properties: ClassVar[List[str]] = ["id", "name", "description", "campaign_type", "created_at", "object", "updated_at"]
+
+ @field_validator('campaign_type')
+ def campaign_type_validate_enum(cls, value):
+ """Validates the enum"""
+ if value is None:
+ return value
+
+ if value not in set(['DISCOUNT_COUPONS', 'GIFT_VOUCHERS']):
+ raise ValueError("must be one of enum values ('DISCOUNT_COUPONS', 'GIFT_VOUCHERS')")
+ return value
+
+ @field_validator('object')
+ def object_validate_enum(cls, value):
+ """Validates the enum"""
+ if value is None:
+ return value
+
+ if value not in set(['campaign_template']):
+ raise ValueError("must be one of enum values ('campaign_template')")
+ return value
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of CampaignTemplate from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([
+ ])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ # set to None if id (nullable) is None
+ # and model_fields_set contains the field
+ if self.id is None and "id" in self.model_fields_set:
+ _dict['id'] = None
+
+ # set to None if name (nullable) is None
+ # and model_fields_set contains the field
+ if self.name is None and "name" in self.model_fields_set:
+ _dict['name'] = None
+
+ # set to None if description (nullable) is None
+ # and model_fields_set contains the field
+ if self.description is None and "description" in self.model_fields_set:
+ _dict['description'] = None
+
+ # set to None if campaign_type (nullable) is None
+ # and model_fields_set contains the field
+ if self.campaign_type is None and "campaign_type" in self.model_fields_set:
+ _dict['campaign_type'] = None
+
+ # set to None if created_at (nullable) is None
+ # and model_fields_set contains the field
+ if self.created_at is None and "created_at" in self.model_fields_set:
+ _dict['created_at'] = None
+
+ # set to None if object (nullable) is None
+ # and model_fields_set contains the field
+ if self.object is None and "object" in self.model_fields_set:
+ _dict['object'] = None
+
+ # set to None if updated_at (nullable) is None
+ # and model_fields_set contains the field
+ if self.updated_at is None and "updated_at" in self.model_fields_set:
+ _dict['updated_at'] = None
+
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of CampaignTemplate from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "id": obj.get("id"),
+ "name": obj.get("name"),
+ "description": obj.get("description"),
+ "campaign_type": obj.get("campaign_type"),
+ "created_at": obj.get("created_at"),
+ "object": obj.get("object") if obj.get("object") is not None else 'campaign_template',
+ "updated_at": obj.get("updated_at")
+ })
+ return _obj
+
+
diff --git a/voucherify/models/campaigns_create_request_body.py b/voucherify/models/campaigns_create_request_body.py
index b59271a8..77b5dc7e 100644
--- a/voucherify/models/campaigns_create_request_body.py
+++ b/voucherify/models/campaigns_create_request_body.py
@@ -24,7 +24,6 @@
from typing_extensions import Annotated
from voucherify.models.campaigns_create_request_body_promotion import CampaignsCreateRequestBodyPromotion
from voucherify.models.campaigns_create_request_body_voucher import CampaignsCreateRequestBodyVoucher
-from voucherify.models.lucky_draw import LuckyDraw
from voucherify.models.referral_program import ReferralProgram
from voucherify.models.validity_hours import ValidityHours
from voucherify.models.validity_timeframe import ValidityTimeframe
@@ -48,16 +47,15 @@ class CampaignsCreateRequestBody(BaseModel):
validity_day_of_week: Optional[List[StrictInt]] = Field(default=None, description="Integer array corresponding to the particular days of the week in which the voucher is valid. - `0` Sunday - `1` Monday - `2` Tuesday - `3` Wednesday - `4` Thursday - `5` Friday - `6` Saturday")
validity_hours: Optional[ValidityHours] = None
activity_duration_after_publishing: Optional[StrictStr] = Field(default=None, description="Defines the amount of time the vouchers will be active after publishing. The value is shown in the ISO 8601 format. For example, a voucher with the value of P24D will be valid for a duration of 24 days.")
- validation_rules: Optional[Annotated[List[StrictStr], Field(max_length=1)]] = Field(default=None, description="Array containing the ID of the validation rule associated with the promotion tier.")
category_id: Optional[StrictStr] = Field(default=None, description="Unique category ID that this campaign belongs to. Either pass this parameter OR the `category`.")
category: Optional[StrictStr] = Field(default=None, description="The category assigned to the campaign. Either pass this parameter OR the `category_id`.")
metadata: Optional[Dict[str, Any]] = None
+ validation_rules: Optional[Annotated[List[StrictStr], Field(max_length=1)]] = Field(default=None, description="Array containing the ID of the validation rule associated with the promotion tier.")
campaign_type: Optional[StrictStr] = None
voucher: Optional[CampaignsCreateRequestBodyVoucher] = None
referral_program: Optional[ReferralProgram] = None
promotion: Optional[CampaignsCreateRequestBodyPromotion] = None
- lucky_draw: Optional[LuckyDraw] = None
- __properties: ClassVar[List[str]] = ["name", "description", "type", "join_once", "auto_join", "use_voucher_metadata_schema", "vouchers_count", "start_date", "expiration_date", "validity_timeframe", "validity_day_of_week", "validity_hours", "activity_duration_after_publishing", "validation_rules", "category_id", "category", "metadata", "campaign_type", "voucher", "referral_program", "promotion", "lucky_draw"]
+ __properties: ClassVar[List[str]] = ["name", "description", "type", "join_once", "auto_join", "use_voucher_metadata_schema", "vouchers_count", "start_date", "expiration_date", "validity_timeframe", "validity_day_of_week", "validity_hours", "activity_duration_after_publishing", "category_id", "category", "metadata", "validation_rules", "campaign_type", "voucher", "referral_program", "promotion"]
@field_validator('type')
def type_validate_enum(cls, value):
@@ -86,8 +84,8 @@ def campaign_type_validate_enum(cls, value):
if value is None:
return value
- if value not in set(['DISCOUNT_COUPONS', 'REFERRAL_PROGRAM', 'GIFT_VOUCHERS', 'LOYALTY_PROGRAM', 'PROMOTION', 'LUCKY_DRAW']):
- raise ValueError("must be one of enum values ('DISCOUNT_COUPONS', 'REFERRAL_PROGRAM', 'GIFT_VOUCHERS', 'LOYALTY_PROGRAM', 'PROMOTION', 'LUCKY_DRAW')")
+ if value not in set(['DISCOUNT_COUPONS', 'REFERRAL_PROGRAM', 'GIFT_VOUCHERS', 'LOYALTY_PROGRAM', 'PROMOTION']):
+ raise ValueError("must be one of enum values ('DISCOUNT_COUPONS', 'REFERRAL_PROGRAM', 'GIFT_VOUCHERS', 'LOYALTY_PROGRAM', 'PROMOTION')")
return value
model_config = ConfigDict(
@@ -144,9 +142,6 @@ def to_dict(self) -> Dict[str, Any]:
# override the default output from pydantic by calling `to_dict()` of promotion
if self.promotion:
_dict['promotion'] = self.promotion.to_dict()
- # override the default output from pydantic by calling `to_dict()` of lucky_draw
- if self.lucky_draw:
- _dict['lucky_draw'] = self.lucky_draw.to_dict()
# set to None if name (nullable) is None
# and model_fields_set contains the field
if self.name is None and "name" in self.model_fields_set:
@@ -197,11 +192,6 @@ def to_dict(self) -> Dict[str, Any]:
if self.activity_duration_after_publishing is None and "activity_duration_after_publishing" in self.model_fields_set:
_dict['activity_duration_after_publishing'] = None
- # set to None if validation_rules (nullable) is None
- # and model_fields_set contains the field
- if self.validation_rules is None and "validation_rules" in self.model_fields_set:
- _dict['validation_rules'] = None
-
# set to None if category_id (nullable) is None
# and model_fields_set contains the field
if self.category_id is None and "category_id" in self.model_fields_set:
@@ -217,6 +207,11 @@ def to_dict(self) -> Dict[str, Any]:
if self.metadata is None and "metadata" in self.model_fields_set:
_dict['metadata'] = None
+ # set to None if validation_rules (nullable) is None
+ # and model_fields_set contains the field
+ if self.validation_rules is None and "validation_rules" in self.model_fields_set:
+ _dict['validation_rules'] = None
+
# set to None if campaign_type (nullable) is None
# and model_fields_set contains the field
if self.campaign_type is None and "campaign_type" in self.model_fields_set:
@@ -257,15 +252,14 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
"validity_day_of_week": obj.get("validity_day_of_week"),
"validity_hours": ValidityHours.from_dict(obj["validity_hours"]) if obj.get("validity_hours") is not None else None,
"activity_duration_after_publishing": obj.get("activity_duration_after_publishing"),
- "validation_rules": obj.get("validation_rules"),
"category_id": obj.get("category_id"),
"category": obj.get("category"),
"metadata": obj.get("metadata"),
+ "validation_rules": obj.get("validation_rules"),
"campaign_type": obj.get("campaign_type"),
"voucher": CampaignsCreateRequestBodyVoucher.from_dict(obj["voucher"]) if obj.get("voucher") is not None else None,
"referral_program": ReferralProgram.from_dict(obj["referral_program"]) if obj.get("referral_program") is not None else None,
- "promotion": CampaignsCreateRequestBodyPromotion.from_dict(obj["promotion"]) if obj.get("promotion") is not None else None,
- "lucky_draw": LuckyDraw.from_dict(obj["lucky_draw"]) if obj.get("lucky_draw") is not None else None
+ "promotion": CampaignsCreateRequestBodyPromotion.from_dict(obj["promotion"]) if obj.get("promotion") is not None else None
})
return _obj
diff --git a/voucherify/models/campaigns_create_response_body.py b/voucherify/models/campaigns_create_response_body.py
index dece3870..2d1e4385 100644
--- a/voucherify/models/campaigns_create_response_body.py
+++ b/voucherify/models/campaigns_create_response_body.py
@@ -60,6 +60,7 @@ class CampaignsCreateResponseBody(BaseModel):
category: Optional[StrictStr] = Field(default=None, description="Unique category name.")
creation_status: Optional[StrictStr] = Field(default=None, description="Indicates the status of the campaign creation.")
vouchers_generation_status: Optional[StrictStr] = Field(default=None, description="Indicates the status of the campaign's voucher generation.")
+ readonly: Optional[StrictBool] = Field(default=None, description="Indicates whether the campaign can be only read by a restricted user in the Areas and Stores enterprise feature. It is returned only to restricted users; this field is not returned for users with other roles.")
protected: Optional[StrictBool] = Field(default=None, description="Indicates whether the resource can be deleted.")
category_id: Optional[StrictStr] = Field(default=None, description="Unique category ID that this campaign belongs to.")
categories: Optional[List[Category]] = Field(default=None, description="Contains details about the category.")
@@ -69,7 +70,7 @@ class CampaignsCreateResponseBody(BaseModel):
promotion: Optional[PromotionTiersList] = None
validation_rules_assignments: Optional[ValidationRulesAssignmentsList] = None
access_settings_assignments: Optional[AccessSettingsCampaignAssignmentsList] = None
- __properties: ClassVar[List[str]] = ["id", "name", "description", "campaign_type", "type", "voucher", "auto_join", "join_once", "use_voucher_metadata_schema", "validity_timeframe", "validity_day_of_week", "validity_hours", "activity_duration_after_publishing", "vouchers_count", "start_date", "expiration_date", "active", "metadata", "created_at", "updated_at", "category", "creation_status", "vouchers_generation_status", "protected", "category_id", "categories", "object", "referral_program", "loyalty_tiers_expiration", "promotion", "validation_rules_assignments", "access_settings_assignments"]
+ __properties: ClassVar[List[str]] = ["id", "name", "description", "campaign_type", "type", "voucher", "auto_join", "join_once", "use_voucher_metadata_schema", "validity_timeframe", "validity_day_of_week", "validity_hours", "activity_duration_after_publishing", "vouchers_count", "start_date", "expiration_date", "active", "metadata", "created_at", "updated_at", "category", "creation_status", "vouchers_generation_status", "readonly", "protected", "category_id", "categories", "object", "referral_program", "loyalty_tiers_expiration", "promotion", "validation_rules_assignments", "access_settings_assignments"]
@field_validator('campaign_type')
def campaign_type_validate_enum(cls, value):
@@ -77,8 +78,8 @@ def campaign_type_validate_enum(cls, value):
if value is None:
return value
- if value not in set(['LOYALTY_PROGRAM', 'GIFT_VOUCHERS', 'DISCOUNT_COUPONS', 'PROMOTION', 'REFERRAL_PROGRAM', 'LUCKY_DRAW']):
- raise ValueError("must be one of enum values ('LOYALTY_PROGRAM', 'GIFT_VOUCHERS', 'DISCOUNT_COUPONS', 'PROMOTION', 'REFERRAL_PROGRAM', 'LUCKY_DRAW')")
+ if value not in set(['LOYALTY_PROGRAM', 'GIFT_VOUCHERS', 'DISCOUNT_COUPONS', 'PROMOTION', 'REFERRAL_PROGRAM']):
+ raise ValueError("must be one of enum values ('LOYALTY_PROGRAM', 'GIFT_VOUCHERS', 'DISCOUNT_COUPONS', 'PROMOTION', 'REFERRAL_PROGRAM')")
return value
@field_validator('type')
@@ -287,6 +288,11 @@ def to_dict(self) -> Dict[str, Any]:
if self.vouchers_generation_status is None and "vouchers_generation_status" in self.model_fields_set:
_dict['vouchers_generation_status'] = None
+ # set to None if readonly (nullable) is None
+ # and model_fields_set contains the field
+ if self.readonly is None and "readonly" in self.model_fields_set:
+ _dict['readonly'] = None
+
# set to None if protected (nullable) is None
# and model_fields_set contains the field
if self.protected is None and "protected" in self.model_fields_set:
@@ -342,6 +348,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
"category": obj.get("category"),
"creation_status": obj.get("creation_status"),
"vouchers_generation_status": obj.get("vouchers_generation_status"),
+ "readonly": obj.get("readonly"),
"protected": obj.get("protected"),
"category_id": obj.get("category_id"),
"categories": [Category.from_dict(_item) for _item in obj["categories"]] if obj.get("categories") is not None else None,
diff --git a/voucherify/models/campaigns_get_response_body.py b/voucherify/models/campaigns_get_response_body.py
index 174fd48e..9ec80278 100644
--- a/voucherify/models/campaigns_get_response_body.py
+++ b/voucherify/models/campaigns_get_response_body.py
@@ -60,6 +60,7 @@ class CampaignsGetResponseBody(BaseModel):
category: Optional[StrictStr] = Field(default=None, description="Unique category name.")
creation_status: Optional[StrictStr] = Field(default=None, description="Indicates the status of the campaign creation.")
vouchers_generation_status: Optional[StrictStr] = Field(default=None, description="Indicates the status of the campaign's voucher generation.")
+ readonly: Optional[StrictBool] = Field(default=None, description="Indicates whether the campaign can be only read by a restricted user in the Areas and Stores enterprise feature. It is returned only to restricted users; this field is not returned for users with other roles.")
protected: Optional[StrictBool] = Field(default=None, description="Indicates whether the resource can be deleted.")
category_id: Optional[StrictStr] = Field(default=None, description="Unique category ID that this campaign belongs to.")
categories: Optional[List[Category]] = Field(default=None, description="Contains details about the category.")
@@ -69,7 +70,7 @@ class CampaignsGetResponseBody(BaseModel):
promotion: Optional[PromotionTiersList] = None
validation_rules_assignments: Optional[ValidationRulesAssignmentsList] = None
access_settings_assignments: Optional[AccessSettingsCampaignAssignmentsList] = None
- __properties: ClassVar[List[str]] = ["id", "name", "description", "campaign_type", "type", "voucher", "auto_join", "join_once", "use_voucher_metadata_schema", "validity_timeframe", "validity_day_of_week", "validity_hours", "activity_duration_after_publishing", "vouchers_count", "start_date", "expiration_date", "active", "metadata", "created_at", "updated_at", "category", "creation_status", "vouchers_generation_status", "protected", "category_id", "categories", "object", "referral_program", "loyalty_tiers_expiration", "promotion", "validation_rules_assignments", "access_settings_assignments"]
+ __properties: ClassVar[List[str]] = ["id", "name", "description", "campaign_type", "type", "voucher", "auto_join", "join_once", "use_voucher_metadata_schema", "validity_timeframe", "validity_day_of_week", "validity_hours", "activity_duration_after_publishing", "vouchers_count", "start_date", "expiration_date", "active", "metadata", "created_at", "updated_at", "category", "creation_status", "vouchers_generation_status", "readonly", "protected", "category_id", "categories", "object", "referral_program", "loyalty_tiers_expiration", "promotion", "validation_rules_assignments", "access_settings_assignments"]
@field_validator('campaign_type')
def campaign_type_validate_enum(cls, value):
@@ -77,8 +78,8 @@ def campaign_type_validate_enum(cls, value):
if value is None:
return value
- if value not in set(['LOYALTY_PROGRAM', 'GIFT_VOUCHERS', 'DISCOUNT_COUPONS', 'PROMOTION', 'REFERRAL_PROGRAM', 'LUCKY_DRAW']):
- raise ValueError("must be one of enum values ('LOYALTY_PROGRAM', 'GIFT_VOUCHERS', 'DISCOUNT_COUPONS', 'PROMOTION', 'REFERRAL_PROGRAM', 'LUCKY_DRAW')")
+ if value not in set(['LOYALTY_PROGRAM', 'GIFT_VOUCHERS', 'DISCOUNT_COUPONS', 'PROMOTION', 'REFERRAL_PROGRAM']):
+ raise ValueError("must be one of enum values ('LOYALTY_PROGRAM', 'GIFT_VOUCHERS', 'DISCOUNT_COUPONS', 'PROMOTION', 'REFERRAL_PROGRAM')")
return value
@field_validator('type')
@@ -287,6 +288,11 @@ def to_dict(self) -> Dict[str, Any]:
if self.vouchers_generation_status is None and "vouchers_generation_status" in self.model_fields_set:
_dict['vouchers_generation_status'] = None
+ # set to None if readonly (nullable) is None
+ # and model_fields_set contains the field
+ if self.readonly is None and "readonly" in self.model_fields_set:
+ _dict['readonly'] = None
+
# set to None if protected (nullable) is None
# and model_fields_set contains the field
if self.protected is None and "protected" in self.model_fields_set:
@@ -342,6 +348,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
"category": obj.get("category"),
"creation_status": obj.get("creation_status"),
"vouchers_generation_status": obj.get("vouchers_generation_status"),
+ "readonly": obj.get("readonly"),
"protected": obj.get("protected"),
"category_id": obj.get("category_id"),
"categories": [Category.from_dict(_item) for _item in obj["categories"]] if obj.get("categories") is not None else None,
diff --git a/voucherify/models/campaigns_update_request_body.py b/voucherify/models/campaigns_update_request_body.py
index 8e4b4751..32767911 100644
--- a/voucherify/models/campaigns_update_request_body.py
+++ b/voucherify/models/campaigns_update_request_body.py
@@ -21,8 +21,8 @@
from datetime import datetime
from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, StrictStr, field_validator
from typing import Any, ClassVar, Dict, List, Optional
-from typing_extensions import Annotated
from voucherify.models.campaigns_update_request_body_options import CampaignsUpdateRequestBodyOptions
+from voucherify.models.discount import Discount
from voucherify.models.gift import Gift
from voucherify.models.loyalty_tiers_expiration_all import LoyaltyTiersExpirationAll
from voucherify.models.referral_program import ReferralProgram
@@ -49,15 +49,12 @@ class CampaignsUpdateRequestBody(BaseModel):
join_once: Optional[StrictBool] = Field(default=None, description="If this value is set to `true`, customers will be able to join the campaign only once.")
auto_join: Optional[StrictBool] = Field(default=None, description="Indicates whether customers will be able to auto-join a loyalty campaign if any earning rule is fulfilled.")
type: Optional[StrictStr] = Field(default=None, description="Defines whether the campaign can be updated with new vouchers after campaign creation. - `AUTO_UPDATE`: By choosing the auto update option you will create a campaign that can be enhanced by new vouchers after the time of creation (e.g. by publish vouchers method). - `STATIC`: vouchers need to be manually published.")
- discount: Optional[Dict[str, Any]] = None
+ discount: Optional[Discount] = None
referral_program: Optional[ReferralProgram] = None
gift: Optional[Gift] = None
loyalty_tiers_expiration: Optional[LoyaltyTiersExpirationAll] = None
options: Optional[CampaignsUpdateRequestBodyOptions] = None
- winners_count: Optional[Annotated[str, Field(strict=True)]] = Field(default=None, description="It represents the total number of winners in a lucky draw.")
- unique_winners_per_draw: Optional[StrictStr] = Field(default=None, description="It indicates whether each winner in a draw is unique or not.")
- unique_winners: Optional[StrictStr] = Field(default=None, description="Specifies whether each participant can win only once across multiple draws.")
- __properties: ClassVar[List[str]] = ["start_date", "expiration_date", "validity_timeframe", "validity_day_of_week", "validity_hours", "description", "category", "metadata", "unset_metadata_fields", "category_id", "activity_duration_after_publishing", "join_once", "auto_join", "type", "discount", "referral_program", "gift", "loyalty_tiers_expiration", "options", "winners_count", "unique_winners_per_draw", "unique_winners"]
+ __properties: ClassVar[List[str]] = ["start_date", "expiration_date", "validity_timeframe", "validity_day_of_week", "validity_hours", "description", "category", "metadata", "unset_metadata_fields", "category_id", "activity_duration_after_publishing", "join_once", "auto_join", "type", "discount", "referral_program", "gift", "loyalty_tiers_expiration", "options"]
@field_validator('validity_day_of_week')
def validity_day_of_week_validate_enum(cls, value):
@@ -125,6 +122,9 @@ def to_dict(self) -> Dict[str, Any]:
# override the default output from pydantic by calling `to_dict()` of validity_hours
if self.validity_hours:
_dict['validity_hours'] = self.validity_hours.to_dict()
+ # override the default output from pydantic by calling `to_dict()` of discount
+ if self.discount:
+ _dict['discount'] = self.discount.to_dict()
# override the default output from pydantic by calling `to_dict()` of referral_program
if self.referral_program:
_dict['referral_program'] = self.referral_program.to_dict()
@@ -192,31 +192,11 @@ def to_dict(self) -> Dict[str, Any]:
if self.type is None and "type" in self.model_fields_set:
_dict['type'] = None
- # set to None if discount (nullable) is None
- # and model_fields_set contains the field
- if self.discount is None and "discount" in self.model_fields_set:
- _dict['discount'] = None
-
# set to None if options (nullable) is None
# and model_fields_set contains the field
if self.options is None and "options" in self.model_fields_set:
_dict['options'] = None
- # set to None if winners_count (nullable) is None
- # and model_fields_set contains the field
- if self.winners_count is None and "winners_count" in self.model_fields_set:
- _dict['winners_count'] = None
-
- # set to None if unique_winners_per_draw (nullable) is None
- # and model_fields_set contains the field
- if self.unique_winners_per_draw is None and "unique_winners_per_draw" in self.model_fields_set:
- _dict['unique_winners_per_draw'] = None
-
- # set to None if unique_winners (nullable) is None
- # and model_fields_set contains the field
- if self.unique_winners is None and "unique_winners" in self.model_fields_set:
- _dict['unique_winners'] = None
-
return _dict
@classmethod
@@ -243,14 +223,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
"join_once": obj.get("join_once"),
"auto_join": obj.get("auto_join"),
"type": obj.get("type"),
- "discount": obj.get("discount"),
+ "discount": Discount.from_dict(obj["discount"]) if obj.get("discount") is not None else None,
"referral_program": ReferralProgram.from_dict(obj["referral_program"]) if obj.get("referral_program") is not None else None,
"gift": Gift.from_dict(obj["gift"]) if obj.get("gift") is not None else None,
"loyalty_tiers_expiration": LoyaltyTiersExpirationAll.from_dict(obj["loyalty_tiers_expiration"]) if obj.get("loyalty_tiers_expiration") is not None else None,
- "options": CampaignsUpdateRequestBodyOptions.from_dict(obj["options"]) if obj.get("options") is not None else None,
- "winners_count": obj.get("winners_count"),
- "unique_winners_per_draw": obj.get("unique_winners_per_draw"),
- "unique_winners": obj.get("unique_winners")
+ "options": CampaignsUpdateRequestBodyOptions.from_dict(obj["options"]) if obj.get("options") is not None else None
})
return _obj
diff --git a/voucherify/models/campaigns_update_response_body.py b/voucherify/models/campaigns_update_response_body.py
index 066f7517..b66689dc 100644
--- a/voucherify/models/campaigns_update_response_body.py
+++ b/voucherify/models/campaigns_update_response_body.py
@@ -60,6 +60,7 @@ class CampaignsUpdateResponseBody(BaseModel):
category: Optional[StrictStr] = Field(default=None, description="Unique category name.")
creation_status: Optional[StrictStr] = Field(default=None, description="Indicates the status of the campaign creation.")
vouchers_generation_status: Optional[StrictStr] = Field(default=None, description="Indicates the status of the campaign's voucher generation.")
+ readonly: Optional[StrictBool] = Field(default=None, description="Indicates whether the campaign can be only read by a restricted user in the Areas and Stores enterprise feature. It is returned only to restricted users; this field is not returned for users with other roles.")
protected: Optional[StrictBool] = Field(default=None, description="Indicates whether the resource can be deleted.")
category_id: Optional[StrictStr] = Field(default=None, description="Unique category ID that this campaign belongs to.")
categories: Optional[List[Category]] = Field(default=None, description="Contains details about the category.")
@@ -69,7 +70,7 @@ class CampaignsUpdateResponseBody(BaseModel):
promotion: Optional[PromotionTiersList] = None
validation_rules_assignments: Optional[ValidationRulesAssignmentsList] = None
access_settings_assignments: Optional[AccessSettingsCampaignAssignmentsList] = None
- __properties: ClassVar[List[str]] = ["id", "name", "description", "campaign_type", "type", "voucher", "auto_join", "join_once", "use_voucher_metadata_schema", "validity_timeframe", "validity_day_of_week", "validity_hours", "activity_duration_after_publishing", "vouchers_count", "start_date", "expiration_date", "active", "metadata", "created_at", "updated_at", "category", "creation_status", "vouchers_generation_status", "protected", "category_id", "categories", "object", "referral_program", "loyalty_tiers_expiration", "promotion", "validation_rules_assignments", "access_settings_assignments"]
+ __properties: ClassVar[List[str]] = ["id", "name", "description", "campaign_type", "type", "voucher", "auto_join", "join_once", "use_voucher_metadata_schema", "validity_timeframe", "validity_day_of_week", "validity_hours", "activity_duration_after_publishing", "vouchers_count", "start_date", "expiration_date", "active", "metadata", "created_at", "updated_at", "category", "creation_status", "vouchers_generation_status", "readonly", "protected", "category_id", "categories", "object", "referral_program", "loyalty_tiers_expiration", "promotion", "validation_rules_assignments", "access_settings_assignments"]
@field_validator('campaign_type')
def campaign_type_validate_enum(cls, value):
@@ -77,8 +78,8 @@ def campaign_type_validate_enum(cls, value):
if value is None:
return value
- if value not in set(['LOYALTY_PROGRAM', 'GIFT_VOUCHERS', 'DISCOUNT_COUPONS', 'PROMOTION', 'REFERRAL_PROGRAM', 'LUCKY_DRAW']):
- raise ValueError("must be one of enum values ('LOYALTY_PROGRAM', 'GIFT_VOUCHERS', 'DISCOUNT_COUPONS', 'PROMOTION', 'REFERRAL_PROGRAM', 'LUCKY_DRAW')")
+ if value not in set(['LOYALTY_PROGRAM', 'GIFT_VOUCHERS', 'DISCOUNT_COUPONS', 'PROMOTION', 'REFERRAL_PROGRAM']):
+ raise ValueError("must be one of enum values ('LOYALTY_PROGRAM', 'GIFT_VOUCHERS', 'DISCOUNT_COUPONS', 'PROMOTION', 'REFERRAL_PROGRAM')")
return value
@field_validator('type')
@@ -287,6 +288,11 @@ def to_dict(self) -> Dict[str, Any]:
if self.vouchers_generation_status is None and "vouchers_generation_status" in self.model_fields_set:
_dict['vouchers_generation_status'] = None
+ # set to None if readonly (nullable) is None
+ # and model_fields_set contains the field
+ if self.readonly is None and "readonly" in self.model_fields_set:
+ _dict['readonly'] = None
+
# set to None if protected (nullable) is None
# and model_fields_set contains the field
if self.protected is None and "protected" in self.model_fields_set:
@@ -342,6 +348,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
"category": obj.get("category"),
"creation_status": obj.get("creation_status"),
"vouchers_generation_status": obj.get("vouchers_generation_status"),
+ "readonly": obj.get("readonly"),
"protected": obj.get("protected"),
"category_id": obj.get("category_id"),
"categories": [Category.from_dict(_item) for _item in obj["categories"]] if obj.get("categories") is not None else None,
diff --git a/voucherify/models/campaigns_vouchers_create_combined_response_body_publish.py b/voucherify/models/campaigns_vouchers_create_combined_response_body_publish.py
index 5c3ed9ca..ae898d30 100644
--- a/voucherify/models/campaigns_vouchers_create_combined_response_body_publish.py
+++ b/voucherify/models/campaigns_vouchers_create_combined_response_body_publish.py
@@ -29,7 +29,7 @@ class CampaignsVouchersCreateCombinedResponseBodyPublish(BaseModel):
""" # noqa: E501
object: Optional[StrictStr] = Field(default='list', description="The type of the object represented is by default `list`. To get this list, you need to make a call to the endpoint returned in the `url` attribute.")
count: Optional[StrictInt] = Field(default=None, description="Publication events counter.")
- url: Optional[StrictStr] = Field(default=None, description="The endpoint where this list of publications can be accessed using a GET method. `/v1/vouchers/{voucher_code}/publications`")
+ url: Optional[StrictStr] = Field(default=None, description="The endpoint where this list of publications can be accessed using a **GET** method. `/v1/vouchers/{voucher_code}/publications`")
__properties: ClassVar[List[str]] = ["object", "count", "url"]
model_config = ConfigDict(
diff --git a/voucherify/models/campaigns_vouchers_create_combined_response_body_redemption.py b/voucherify/models/campaigns_vouchers_create_combined_response_body_redemption.py
index ba1fbe1f..a11190f7 100644
--- a/voucherify/models/campaigns_vouchers_create_combined_response_body_redemption.py
+++ b/voucherify/models/campaigns_vouchers_create_combined_response_body_redemption.py
@@ -31,7 +31,7 @@ class CampaignsVouchersCreateCombinedResponseBodyRedemption(BaseModel):
redeemed_quantity: Optional[StrictInt] = Field(default=None, description="How many times a voucher has already been redeemed.")
redeemed_points: Optional[StrictInt] = Field(default=None, description="Total loyalty points redeemed.")
object: Optional[StrictStr] = Field(default='list', description="The type of the object represented is by default `list`. To get this list, you need to make a call to the endpoint returned in the url attribute.")
- url: Optional[StrictStr] = Field(default=None, description="The endpoint where this list of redemptions can be accessed using a GET method. `/v1/vouchers/{voucher_code}/redemptions`")
+ url: Optional[StrictStr] = Field(default=None, description="The endpoint where this list of redemptions can be accessed using a **GET** method. `/v1/vouchers/{voucher_code}/redemptions`")
__properties: ClassVar[List[str]] = ["quantity", "redeemed_quantity", "redeemed_points", "object", "url"]
model_config = ConfigDict(
diff --git a/voucherify/models/campaigns_vouchers_create_response_body_publish.py b/voucherify/models/campaigns_vouchers_create_response_body_publish.py
index 9471bddb..55fde2c0 100644
--- a/voucherify/models/campaigns_vouchers_create_response_body_publish.py
+++ b/voucherify/models/campaigns_vouchers_create_response_body_publish.py
@@ -29,7 +29,7 @@ class CampaignsVouchersCreateResponseBodyPublish(BaseModel):
""" # noqa: E501
object: Optional[StrictStr] = Field(default='list', description="The type of the object represented is by default `list`. To get this list, you need to make a call to the endpoint returned in the `url` attribute.")
count: Optional[StrictInt] = Field(default=None, description="Publication events counter.")
- url: Optional[StrictStr] = Field(default=None, description="The endpoint where this list of publications can be accessed using a GET method. `/v1/vouchers/{voucher_code}/publications`")
+ url: Optional[StrictStr] = Field(default=None, description="The endpoint where this list of publications can be accessed using a **GET** method. `/v1/vouchers/{voucher_code}/publications`")
__properties: ClassVar[List[str]] = ["object", "count", "url"]
model_config = ConfigDict(
diff --git a/voucherify/models/campaigns_vouchers_create_response_body_redemption.py b/voucherify/models/campaigns_vouchers_create_response_body_redemption.py
index f4fb1a1a..42d9d126 100644
--- a/voucherify/models/campaigns_vouchers_create_response_body_redemption.py
+++ b/voucherify/models/campaigns_vouchers_create_response_body_redemption.py
@@ -31,7 +31,7 @@ class CampaignsVouchersCreateResponseBodyRedemption(BaseModel):
redeemed_quantity: Optional[StrictInt] = Field(default=None, description="How many times a voucher has already been redeemed.")
redeemed_points: Optional[StrictInt] = Field(default=None, description="Total loyalty points redeemed.")
object: Optional[StrictStr] = Field(default='list', description="The type of the object represented is by default `list`. To get this list, you need to make a call to the endpoint returned in the url attribute.")
- url: Optional[StrictStr] = Field(default=None, description="The endpoint where this list of redemptions can be accessed using a GET method. `/v1/vouchers/{voucher_code}/redemptions`")
+ url: Optional[StrictStr] = Field(default=None, description="The endpoint where this list of redemptions can be accessed using a **GET** method. `/v1/vouchers/{voucher_code}/redemptions`")
__properties: ClassVar[List[str]] = ["quantity", "redeemed_quantity", "redeemed_points", "object", "url"]
model_config = ConfigDict(
diff --git a/voucherify/models/categories_create_request_body.py b/voucherify/models/categories_create_request_body.py
index cfe485b3..9da9c1d7 100644
--- a/voucherify/models/categories_create_request_body.py
+++ b/voucherify/models/categories_create_request_body.py
@@ -18,8 +18,9 @@
import re # noqa: F401
import json
-from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr
+from pydantic import BaseModel, ConfigDict, Field, StrictStr
from typing import Any, ClassVar, Dict, List, Optional
+from typing_extensions import Annotated
from typing import Optional, Set
from typing_extensions import Self
@@ -28,7 +29,7 @@ class CategoriesCreateRequestBody(BaseModel):
Request body schema for **POST** `v1/categories`.
""" # noqa: E501
name: Optional[StrictStr] = Field(default=None, description="Category name.")
- hierarchy: Optional[StrictInt] = Field(default=None, description="Category hierarchy.")
+ hierarchy: Optional[Annotated[int, Field(strict=True, ge=0)]] = Field(default=None, description="Category hierarchy. Categories with lower hierarchy are processed before categories with higher hierarchy value.")
__properties: ClassVar[List[str]] = ["name", "hierarchy"]
model_config = ConfigDict(
diff --git a/voucherify/models/categories_create_response_body.py b/voucherify/models/categories_create_response_body.py
index dd7f5663..966bd379 100644
--- a/voucherify/models/categories_create_response_body.py
+++ b/voucherify/models/categories_create_response_body.py
@@ -19,8 +19,9 @@
import json
from datetime import datetime
-from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr, field_validator
+from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator
from typing import Any, ClassVar, Dict, List, Optional
+from typing_extensions import Annotated
from typing import Optional, Set
from typing_extensions import Self
@@ -30,7 +31,7 @@ class CategoriesCreateResponseBody(BaseModel):
""" # noqa: E501
id: Optional[StrictStr] = Field(default=None, description="Unique category ID assigned by Voucherify.")
name: Optional[StrictStr] = Field(default=None, description="Category name.")
- hierarchy: Optional[StrictInt] = Field(default=None, description="Category hierarchy.")
+ hierarchy: Optional[Annotated[int, Field(strict=True, ge=0)]] = Field(default=None, description="Category hierarchy. Categories with lower hierarchy are processed before categories with higher hierarchy value.")
object: Optional[StrictStr] = 'category'
created_at: Optional[datetime] = Field(default=None, description="Timestamp representing the date and time when the category was created. The value is shown in the ISO 8601 format.")
__properties: ClassVar[List[str]] = ["id", "name", "hierarchy", "object", "created_at"]
diff --git a/voucherify/models/categories_get_response_body.py b/voucherify/models/categories_get_response_body.py
index 2e197db7..784b0312 100644
--- a/voucherify/models/categories_get_response_body.py
+++ b/voucherify/models/categories_get_response_body.py
@@ -19,8 +19,9 @@
import json
from datetime import datetime
-from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr, field_validator
+from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator
from typing import Any, ClassVar, Dict, List, Optional
+from typing_extensions import Annotated
from typing import Optional, Set
from typing_extensions import Self
@@ -30,12 +31,11 @@ class CategoriesGetResponseBody(BaseModel):
""" # noqa: E501
id: Optional[StrictStr] = Field(default=None, description="Unique category ID assigned by Voucherify.")
name: Optional[StrictStr] = Field(default=None, description="Category name.")
- hierarchy: Optional[StrictInt] = Field(default=None, description="Category hierarchy.")
+ hierarchy: Optional[Annotated[int, Field(strict=True, ge=0)]] = Field(default=None, description="Category hierarchy. Categories with lower hierarchy are processed before categories with higher hierarchy value.")
object: Optional[StrictStr] = Field(default='category', description="The type of the object represented by the JSON. This object stores information about the category.")
created_at: Optional[datetime] = Field(default=None, description="Timestamp representing the date and time when the category was created. The value is shown in the ISO 8601 format.")
updated_at: Optional[datetime] = Field(default=None, description="Timestamp representing the date and time when the category was updated. The value is shown in the ISO 8601 format.")
- stacking_rules_type: Optional[StrictStr] = Field(default=None, description="The type of the stacking rule eligibility.")
- __properties: ClassVar[List[str]] = ["id", "name", "hierarchy", "object", "created_at", "updated_at", "stacking_rules_type"]
+ __properties: ClassVar[List[str]] = ["id", "name", "hierarchy", "object", "created_at", "updated_at"]
@field_validator('object')
def object_validate_enum(cls, value):
@@ -47,16 +47,6 @@ def object_validate_enum(cls, value):
raise ValueError("must be one of enum values ('category')")
return value
- @field_validator('stacking_rules_type')
- def stacking_rules_type_validate_enum(cls, value):
- """Validates the enum"""
- if value is None:
- return value
-
- if value not in set(['JOINT', 'EXCLUSIVE']):
- raise ValueError("must be one of enum values ('JOINT', 'EXCLUSIVE')")
- return value
-
model_config = ConfigDict(
populate_by_name=True,
validate_assignment=True,
@@ -126,11 +116,6 @@ def to_dict(self) -> Dict[str, Any]:
if self.updated_at is None and "updated_at" in self.model_fields_set:
_dict['updated_at'] = None
- # set to None if stacking_rules_type (nullable) is None
- # and model_fields_set contains the field
- if self.stacking_rules_type is None and "stacking_rules_type" in self.model_fields_set:
- _dict['stacking_rules_type'] = None
-
return _dict
@classmethod
@@ -148,8 +133,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
"hierarchy": obj.get("hierarchy"),
"object": obj.get("object") if obj.get("object") is not None else 'category',
"created_at": obj.get("created_at"),
- "updated_at": obj.get("updated_at"),
- "stacking_rules_type": obj.get("stacking_rules_type")
+ "updated_at": obj.get("updated_at")
})
return _obj
diff --git a/voucherify/models/categories_update_request_body.py b/voucherify/models/categories_update_request_body.py
index d8bc9f88..8e5ee2d2 100644
--- a/voucherify/models/categories_update_request_body.py
+++ b/voucherify/models/categories_update_request_body.py
@@ -18,8 +18,9 @@
import re # noqa: F401
import json
-from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr
+from pydantic import BaseModel, ConfigDict, Field, StrictStr
from typing import Any, ClassVar, Dict, List, Optional
+from typing_extensions import Annotated
from typing import Optional, Set
from typing_extensions import Self
@@ -28,7 +29,7 @@ class CategoriesUpdateRequestBody(BaseModel):
Request body schema for **PUT** `v1/categories/{categoryId}`.
""" # noqa: E501
name: Optional[StrictStr] = Field(default=None, description="Category name.")
- hierarchy: Optional[StrictInt] = Field(default=None, description="Category hierarchy.")
+ hierarchy: Optional[Annotated[int, Field(strict=True, ge=0)]] = Field(default=None, description="Category hierarchy. Categories with lower hierarchy are processed before categories with higher hierarchy value.")
__properties: ClassVar[List[str]] = ["name", "hierarchy"]
model_config = ConfigDict(
diff --git a/voucherify/models/categories_update_response_body.py b/voucherify/models/categories_update_response_body.py
index fdddec7a..b0b12e78 100644
--- a/voucherify/models/categories_update_response_body.py
+++ b/voucherify/models/categories_update_response_body.py
@@ -19,8 +19,9 @@
import json
from datetime import datetime
-from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr, field_validator
+from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator
from typing import Any, ClassVar, Dict, List, Optional
+from typing_extensions import Annotated
from typing import Optional, Set
from typing_extensions import Self
@@ -30,7 +31,7 @@ class CategoriesUpdateResponseBody(BaseModel):
""" # noqa: E501
id: Optional[StrictStr] = Field(default=None, description="Unique category ID assigned by Voucherify.")
name: Optional[StrictStr] = Field(default=None, description="Category name.")
- hierarchy: Optional[StrictInt] = Field(default=None, description="Category hierarchy.")
+ hierarchy: Optional[Annotated[int, Field(strict=True, ge=0)]] = Field(default=None, description="Category hierarchy. Categories with lower hierarchy are processed before categories with higher hierarchy value.")
object: Optional[StrictStr] = 'category'
created_at: Optional[datetime] = Field(default=None, description="Timestamp representing the date and time when the category was created. The value is shown in the ISO 8601 format.")
updated_at: Optional[datetime] = Field(default=None, description="Timestamp representing the date and time when the category was updated. The value is shown in the ISO 8601 format.")
diff --git a/voucherify/models/category.py b/voucherify/models/category.py
index 92a22d20..23d55a94 100644
--- a/voucherify/models/category.py
+++ b/voucherify/models/category.py
@@ -19,8 +19,9 @@
import json
from datetime import datetime
-from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr, field_validator
+from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator
from typing import Any, ClassVar, Dict, List, Optional
+from typing_extensions import Annotated
from typing import Optional, Set
from typing_extensions import Self
@@ -30,12 +31,11 @@ class Category(BaseModel):
""" # noqa: E501
id: Optional[StrictStr] = Field(default=None, description="Unique category ID assigned by Voucherify.")
name: Optional[StrictStr] = Field(default=None, description="Category name.")
- hierarchy: Optional[StrictInt] = Field(default=None, description="Category hierarchy.")
+ hierarchy: Optional[Annotated[int, Field(strict=True, ge=0)]] = Field(default=None, description="Category hierarchy. Categories with lower hierarchy are processed before categories with higher hierarchy value.")
object: Optional[StrictStr] = Field(default='category', description="The type of the object represented by the JSON. This object stores information about the category.")
created_at: Optional[datetime] = Field(default=None, description="Timestamp representing the date and time when the category was created. The value is shown in the ISO 8601 format.")
updated_at: Optional[datetime] = Field(default=None, description="Timestamp representing the date and time when the category was updated. The value is shown in the ISO 8601 format.")
- stacking_rules_type: Optional[StrictStr] = Field(default=None, description="The type of the stacking rule eligibility.")
- __properties: ClassVar[List[str]] = ["id", "name", "hierarchy", "object", "created_at", "updated_at", "stacking_rules_type"]
+ __properties: ClassVar[List[str]] = ["id", "name", "hierarchy", "object", "created_at", "updated_at"]
@field_validator('object')
def object_validate_enum(cls, value):
@@ -47,16 +47,6 @@ def object_validate_enum(cls, value):
raise ValueError("must be one of enum values ('category')")
return value
- @field_validator('stacking_rules_type')
- def stacking_rules_type_validate_enum(cls, value):
- """Validates the enum"""
- if value is None:
- return value
-
- if value not in set(['JOINT', 'EXCLUSIVE']):
- raise ValueError("must be one of enum values ('JOINT', 'EXCLUSIVE')")
- return value
-
model_config = ConfigDict(
populate_by_name=True,
validate_assignment=True,
@@ -126,11 +116,6 @@ def to_dict(self) -> Dict[str, Any]:
if self.updated_at is None and "updated_at" in self.model_fields_set:
_dict['updated_at'] = None
- # set to None if stacking_rules_type (nullable) is None
- # and model_fields_set contains the field
- if self.stacking_rules_type is None and "stacking_rules_type" in self.model_fields_set:
- _dict['stacking_rules_type'] = None
-
return _dict
@classmethod
@@ -148,8 +133,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
"hierarchy": obj.get("hierarchy"),
"object": obj.get("object") if obj.get("object") is not None else 'category',
"created_at": obj.get("created_at"),
- "updated_at": obj.get("updated_at"),
- "stacking_rules_type": obj.get("stacking_rules_type")
+ "updated_at": obj.get("updated_at")
})
return _obj
diff --git a/voucherify/models/category_with_stacking_rules_type.py b/voucherify/models/category_with_stacking_rules_type.py
new file mode 100644
index 00000000..98e21c26
--- /dev/null
+++ b/voucherify/models/category_with_stacking_rules_type.py
@@ -0,0 +1,157 @@
+# coding: utf-8
+
+"""
+ Voucherify API
+
+ Voucherify promotion engine REST API. Please see https://docs.voucherify.io/docs for more details.
+
+ The version of the OpenAPI document: v2018-08-01
+ Contact: support@voucherify.io
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from datetime import datetime
+from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator
+from typing import Any, ClassVar, Dict, List, Optional
+from typing_extensions import Annotated
+from typing import Optional, Set
+from typing_extensions import Self
+
+class CategoryWithStackingRulesType(BaseModel):
+ """
+ Category object with `stacking_rules_type`
+ """ # noqa: E501
+ id: Optional[StrictStr] = Field(default=None, description="Unique category ID assigned by Voucherify.")
+ name: Optional[StrictStr] = Field(default=None, description="Category name.")
+ hierarchy: Optional[Annotated[int, Field(strict=True, ge=0)]] = Field(default=None, description="Category hierarchy. Categories with lower hierarchy are processed before categories with higher hierarchy value.")
+ object: Optional[StrictStr] = Field(default='category', description="The type of the object represented by the JSON. This object stores information about the category.")
+ created_at: Optional[datetime] = Field(default=None, description="Timestamp representing the date and time when the category was created. The value is shown in the ISO 8601 format.")
+ updated_at: Optional[datetime] = Field(default=None, description="Timestamp representing the date and time when the category was updated. The value is shown in the ISO 8601 format.")
+ stacking_rules_type: Optional[StrictStr] = Field(default=None, description="The type of the stacking rule eligibility.")
+ __properties: ClassVar[List[str]] = ["id", "name", "hierarchy", "object", "created_at", "updated_at", "stacking_rules_type"]
+
+ @field_validator('object')
+ def object_validate_enum(cls, value):
+ """Validates the enum"""
+ if value is None:
+ return value
+
+ if value not in set(['category']):
+ raise ValueError("must be one of enum values ('category')")
+ return value
+
+ @field_validator('stacking_rules_type')
+ def stacking_rules_type_validate_enum(cls, value):
+ """Validates the enum"""
+ if value is None:
+ return value
+
+ if value not in set(['JOINT', 'EXCLUSIVE']):
+ raise ValueError("must be one of enum values ('JOINT', 'EXCLUSIVE')")
+ return value
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of CategoryWithStackingRulesType from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([
+ ])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ # set to None if id (nullable) is None
+ # and model_fields_set contains the field
+ if self.id is None and "id" in self.model_fields_set:
+ _dict['id'] = None
+
+ # set to None if name (nullable) is None
+ # and model_fields_set contains the field
+ if self.name is None and "name" in self.model_fields_set:
+ _dict['name'] = None
+
+ # set to None if hierarchy (nullable) is None
+ # and model_fields_set contains the field
+ if self.hierarchy is None and "hierarchy" in self.model_fields_set:
+ _dict['hierarchy'] = None
+
+ # set to None if object (nullable) is None
+ # and model_fields_set contains the field
+ if self.object is None and "object" in self.model_fields_set:
+ _dict['object'] = None
+
+ # set to None if created_at (nullable) is None
+ # and model_fields_set contains the field
+ if self.created_at is None and "created_at" in self.model_fields_set:
+ _dict['created_at'] = None
+
+ # set to None if updated_at (nullable) is None
+ # and model_fields_set contains the field
+ if self.updated_at is None and "updated_at" in self.model_fields_set:
+ _dict['updated_at'] = None
+
+ # set to None if stacking_rules_type (nullable) is None
+ # and model_fields_set contains the field
+ if self.stacking_rules_type is None and "stacking_rules_type" in self.model_fields_set:
+ _dict['stacking_rules_type'] = None
+
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of CategoryWithStackingRulesType from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "id": obj.get("id"),
+ "name": obj.get("name"),
+ "hierarchy": obj.get("hierarchy"),
+ "object": obj.get("object") if obj.get("object") is not None else 'category',
+ "created_at": obj.get("created_at"),
+ "updated_at": obj.get("updated_at"),
+ "stacking_rules_type": obj.get("stacking_rules_type")
+ })
+ return _obj
+
+
diff --git a/voucherify/models/client_validations_validate_response_body.py b/voucherify/models/client_validations_validate_response_body.py
index 6a542455..303111f3 100644
--- a/voucherify/models/client_validations_validate_response_body.py
+++ b/voucherify/models/client_validations_validate_response_body.py
@@ -31,7 +31,7 @@
class ClientValidationsValidateResponseBody(BaseModel):
"""
- Response body schema for POST `/validations`.
+ Response body schema for **POST** `/validations`.
""" # noqa: E501
valid: Optional[StrictBool] = Field(default=None, description="The result of the validation. It takes all of the redeemables into account and returns a `false` if at least one redeemable is inapplicable. Returns `true` if all redeemables are applicable.")
redeemables: Optional[List[ClientValidationsValidateResponseBodyRedeemablesItem]] = None
diff --git a/voucherify/models/client_validations_validate_response_body_redeemables_item.py b/voucherify/models/client_validations_validate_response_body_redeemables_item.py
index c02db58a..47db7981 100644
--- a/voucherify/models/client_validations_validate_response_body_redeemables_item.py
+++ b/voucherify/models/client_validations_validate_response_body_redeemables_item.py
@@ -21,7 +21,7 @@
from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator
from typing import Any, ClassVar, Dict, List, Optional
from voucherify.models.applicable_to_result_list import ApplicableToResultList
-from voucherify.models.category import Category
+from voucherify.models.category_with_stacking_rules_type import CategoryWithStackingRulesType
from voucherify.models.client_validations_validate_response_body_redeemables_item_result import ClientValidationsValidateResponseBodyRedeemablesItemResult
from voucherify.models.inapplicable_to_result_list import InapplicableToResultList
from voucherify.models.order_calculated import OrderCalculated
@@ -40,7 +40,7 @@ class ClientValidationsValidateResponseBodyRedeemablesItem(BaseModel):
inapplicable_to: Optional[InapplicableToResultList] = None
result: Optional[ClientValidationsValidateResponseBodyRedeemablesItemResult] = None
metadata: Optional[Dict[str, Any]] = None
- categories: Optional[List[Category]] = None
+ categories: Optional[List[CategoryWithStackingRulesType]] = None
__properties: ClassVar[List[str]] = ["status", "id", "object", "order", "applicable_to", "inapplicable_to", "result", "metadata", "categories"]
@field_validator('status')
@@ -156,7 +156,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
"inapplicable_to": InapplicableToResultList.from_dict(obj["inapplicable_to"]) if obj.get("inapplicable_to") is not None else None,
"result": ClientValidationsValidateResponseBodyRedeemablesItemResult.from_dict(obj["result"]) if obj.get("result") is not None else None,
"metadata": obj.get("metadata"),
- "categories": [Category.from_dict(_item) for _item in obj["categories"]] if obj.get("categories") is not None else None
+ "categories": [CategoryWithStackingRulesType.from_dict(_item) for _item in obj["categories"]] if obj.get("categories") is not None else None
})
return _obj
diff --git a/voucherify/models/customer_redeemable.py b/voucherify/models/customer_redeemable.py
index 9e8636d8..a23fde6f 100644
--- a/voucherify/models/customer_redeemable.py
+++ b/voucherify/models/customer_redeemable.py
@@ -57,8 +57,8 @@ def campaign_type_validate_enum(cls, value):
if value is None:
return value
- if value not in set(['LOYALTY_PROGRAM', 'GIFT_VOUCHERS', 'DISCOUNT_COUPONS', 'PROMOTION', 'REFERRAL_PROGRAM', 'LUCKY_DRAW']):
- raise ValueError("must be one of enum values ('LOYALTY_PROGRAM', 'GIFT_VOUCHERS', 'DISCOUNT_COUPONS', 'PROMOTION', 'REFERRAL_PROGRAM', 'LUCKY_DRAW')")
+ if value not in set(['LOYALTY_PROGRAM', 'GIFT_VOUCHERS', 'DISCOUNT_COUPONS', 'PROMOTION', 'REFERRAL_PROGRAM']):
+ raise ValueError("must be one of enum values ('LOYALTY_PROGRAM', 'GIFT_VOUCHERS', 'DISCOUNT_COUPONS', 'PROMOTION', 'REFERRAL_PROGRAM')")
return value
@field_validator('voucher_type')
@@ -67,8 +67,8 @@ def voucher_type_validate_enum(cls, value):
if value is None:
return value
- if value not in set(['GIFT_VOUCHER', 'DISCOUNT_VOUCHER', 'LOYALTY_CARD', 'LUCKY_DRAW_CODE']):
- raise ValueError("must be one of enum values ('GIFT_VOUCHER', 'DISCOUNT_VOUCHER', 'LOYALTY_CARD', 'LUCKY_DRAW_CODE')")
+ if value not in set(['GIFT_VOUCHER', 'DISCOUNT_VOUCHER', 'LOYALTY_CARD']):
+ raise ValueError("must be one of enum values ('GIFT_VOUCHER', 'DISCOUNT_VOUCHER', 'LOYALTY_CARD')")
return value
model_config = ConfigDict(
diff --git a/voucherify/models/filter_conditions_date_time.py b/voucherify/models/filter_conditions_date_time.py
new file mode 100644
index 00000000..03650f5d
--- /dev/null
+++ b/voucherify/models/filter_conditions_date_time.py
@@ -0,0 +1,129 @@
+# coding: utf-8
+
+"""
+ Voucherify API
+
+ Voucherify promotion engine REST API. Please see https://docs.voucherify.io/docs for more details.
+
+ The version of the OpenAPI document: v2018-08-01
+ Contact: support@voucherify.io
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from datetime import datetime
+from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr
+from typing import Any, ClassVar, Dict, List, Optional
+from typing import Optional, Set
+from typing_extensions import Self
+
+class FilterConditionsDateTime(BaseModel):
+ """
+ Data filters used to narrow down the data records to be returned in the result.
+ """ # noqa: E501
+ after: Optional[datetime] = Field(default=None, description="Value is after this date. The value for this parameter is shown in the ISO 8601 format.", alias="$after")
+ before: Optional[datetime] = Field(default=None, description="Value is before this date. The value for this parameter is shown in the ISO 8601 format.", alias="$before")
+ has_value: Optional[StrictStr] = Field(default=None, description="Value is NOT null. The value for this parameter is an empty string.", alias="$has_value")
+ is_unknown: Optional[StrictStr] = Field(default=None, description="Value is null. The value for this parameter is an empty string.", alias="$is_unknown")
+ more_than: Optional[StrictInt] = Field(default=None, description="Value is more days ago before the current date and time, e.g. more than `10` days ago.")
+ less_than: Optional[StrictInt] = Field(default=None, description="Value is less days before the current date and time, e.g. less than `10` days ago.")
+ __properties: ClassVar[List[str]] = ["$after", "$before", "$has_value", "$is_unknown", "more_than", "less_than"]
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of FilterConditionsDateTime from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([
+ ])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ # set to None if after (nullable) is None
+ # and model_fields_set contains the field
+ if self.after is None and "after" in self.model_fields_set:
+ _dict['$after'] = None
+
+ # set to None if before (nullable) is None
+ # and model_fields_set contains the field
+ if self.before is None and "before" in self.model_fields_set:
+ _dict['$before'] = None
+
+ # set to None if has_value (nullable) is None
+ # and model_fields_set contains the field
+ if self.has_value is None and "has_value" in self.model_fields_set:
+ _dict['$has_value'] = None
+
+ # set to None if is_unknown (nullable) is None
+ # and model_fields_set contains the field
+ if self.is_unknown is None and "is_unknown" in self.model_fields_set:
+ _dict['$is_unknown'] = None
+
+ # set to None if more_than (nullable) is None
+ # and model_fields_set contains the field
+ if self.more_than is None and "more_than" in self.model_fields_set:
+ _dict['more_than'] = None
+
+ # set to None if less_than (nullable) is None
+ # and model_fields_set contains the field
+ if self.less_than is None and "less_than" in self.model_fields_set:
+ _dict['less_than'] = None
+
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of FilterConditionsDateTime from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "$after": obj.get("$after"),
+ "$before": obj.get("$before"),
+ "$has_value": obj.get("$has_value"),
+ "$is_unknown": obj.get("$is_unknown"),
+ "more_than": obj.get("more_than"),
+ "less_than": obj.get("less_than")
+ })
+ return _obj
+
+
diff --git a/voucherify/models/filter_conditions_date_time_conditions.py b/voucherify/models/filter_conditions_date_time_conditions.py
new file mode 100644
index 00000000..3e5ea96d
--- /dev/null
+++ b/voucherify/models/filter_conditions_date_time_conditions.py
@@ -0,0 +1,129 @@
+# coding: utf-8
+
+"""
+ Voucherify API
+
+ Voucherify promotion engine REST API. Please see https://docs.voucherify.io/docs for more details.
+
+ The version of the OpenAPI document: v2018-08-01
+ Contact: support@voucherify.io
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from datetime import datetime
+from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr
+from typing import Any, ClassVar, Dict, List, Optional
+from typing import Optional, Set
+from typing_extensions import Self
+
+class FilterConditionsDateTimeConditions(BaseModel):
+ """
+ Data filters used to narrow down the data records to be returned in the result.
+ """ # noqa: E501
+ after: Optional[datetime] = Field(default=None, description="Value is after this date. The value for this parameter is shown in the ISO 8601 format.", alias="$after")
+ before: Optional[datetime] = Field(default=None, description="Value is before this date. The value for this parameter is shown in the ISO 8601 format.", alias="$before")
+ has_value: Optional[StrictStr] = Field(default=None, description="Value is NOT null. The value for this parameter is an empty string.", alias="$has_value")
+ is_unknown: Optional[StrictStr] = Field(default=None, description="Value is null. The value for this parameter is an empty string.", alias="$is_unknown")
+ more_than: Optional[StrictInt] = Field(default=None, description="Value is more days ago before the current date and time, e.g. more than `10` days ago.")
+ less_than: Optional[StrictInt] = Field(default=None, description="Value is less days before the current date and time, e.g. less than `10` days ago.")
+ __properties: ClassVar[List[str]] = ["$after", "$before", "$has_value", "$is_unknown", "more_than", "less_than"]
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of FilterConditionsDateTimeConditions from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([
+ ])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ # set to None if after (nullable) is None
+ # and model_fields_set contains the field
+ if self.after is None and "after" in self.model_fields_set:
+ _dict['$after'] = None
+
+ # set to None if before (nullable) is None
+ # and model_fields_set contains the field
+ if self.before is None and "before" in self.model_fields_set:
+ _dict['$before'] = None
+
+ # set to None if has_value (nullable) is None
+ # and model_fields_set contains the field
+ if self.has_value is None and "has_value" in self.model_fields_set:
+ _dict['$has_value'] = None
+
+ # set to None if is_unknown (nullable) is None
+ # and model_fields_set contains the field
+ if self.is_unknown is None and "is_unknown" in self.model_fields_set:
+ _dict['$is_unknown'] = None
+
+ # set to None if more_than (nullable) is None
+ # and model_fields_set contains the field
+ if self.more_than is None and "more_than" in self.model_fields_set:
+ _dict['more_than'] = None
+
+ # set to None if less_than (nullable) is None
+ # and model_fields_set contains the field
+ if self.less_than is None and "less_than" in self.model_fields_set:
+ _dict['less_than'] = None
+
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of FilterConditionsDateTimeConditions from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "$after": obj.get("$after"),
+ "$before": obj.get("$before"),
+ "$has_value": obj.get("$has_value"),
+ "$is_unknown": obj.get("$is_unknown"),
+ "more_than": obj.get("more_than"),
+ "less_than": obj.get("less_than")
+ })
+ return _obj
+
+
diff --git a/voucherify/models/location.py b/voucherify/models/location.py
new file mode 100644
index 00000000..fa477d52
--- /dev/null
+++ b/voucherify/models/location.py
@@ -0,0 +1,143 @@
+# coding: utf-8
+
+"""
+ Voucherify API
+
+ Voucherify promotion engine REST API. Please see https://docs.voucherify.io/docs for more details.
+
+ The version of the OpenAPI document: v2018-08-01
+ Contact: support@voucherify.io
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from datetime import datetime
+from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator
+from typing import Any, ClassVar, Dict, List, Optional
+from voucherify.models.location_shape import LocationShape
+from typing import Optional, Set
+from typing_extensions import Self
+
+class Location(BaseModel):
+ """
+ This is an object representing a location.
+ """ # noqa: E501
+ id: Optional[StrictStr] = Field(default=None, description="Unique location ID, assigned by the Voucherify API.")
+ object: Optional[StrictStr] = Field(default='location', description="The type of the object represented by JSON. This object stores information about a `location`.")
+ name: Optional[StrictStr] = Field(default=None, description="Location name.")
+ shape: Optional[LocationShape] = None
+ created_at: Optional[datetime] = Field(default=None, description="Timestamp representing the date and time when the location was created. The value is shown in the ISO 8601 format.")
+ updated_at: Optional[datetime] = Field(default=None, description="Timestamp representing the date and time when the location was updated. The value is shown in the ISO 8601 format.")
+ __properties: ClassVar[List[str]] = ["id", "object", "name", "shape", "created_at", "updated_at"]
+
+ @field_validator('object')
+ def object_validate_enum(cls, value):
+ """Validates the enum"""
+ if value is None:
+ return value
+
+ if value not in set(['location']):
+ raise ValueError("must be one of enum values ('location')")
+ return value
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of Location from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([
+ ])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ # override the default output from pydantic by calling `to_dict()` of shape
+ if self.shape:
+ _dict['shape'] = self.shape.to_dict()
+ # set to None if id (nullable) is None
+ # and model_fields_set contains the field
+ if self.id is None and "id" in self.model_fields_set:
+ _dict['id'] = None
+
+ # set to None if object (nullable) is None
+ # and model_fields_set contains the field
+ if self.object is None and "object" in self.model_fields_set:
+ _dict['object'] = None
+
+ # set to None if name (nullable) is None
+ # and model_fields_set contains the field
+ if self.name is None and "name" in self.model_fields_set:
+ _dict['name'] = None
+
+ # set to None if shape (nullable) is None
+ # and model_fields_set contains the field
+ if self.shape is None and "shape" in self.model_fields_set:
+ _dict['shape'] = None
+
+ # set to None if created_at (nullable) is None
+ # and model_fields_set contains the field
+ if self.created_at is None and "created_at" in self.model_fields_set:
+ _dict['created_at'] = None
+
+ # set to None if updated_at (nullable) is None
+ # and model_fields_set contains the field
+ if self.updated_at is None and "updated_at" in self.model_fields_set:
+ _dict['updated_at'] = None
+
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of Location from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "id": obj.get("id"),
+ "object": obj.get("object") if obj.get("object") is not None else 'location',
+ "name": obj.get("name"),
+ "shape": LocationShape.from_dict(obj["shape"]) if obj.get("shape") is not None else None,
+ "created_at": obj.get("created_at"),
+ "updated_at": obj.get("updated_at")
+ })
+ return _obj
+
+
diff --git a/voucherify/models/location_shape.py b/voucherify/models/location_shape.py
new file mode 100644
index 00000000..def138de
--- /dev/null
+++ b/voucherify/models/location_shape.py
@@ -0,0 +1,142 @@
+# coding: utf-8
+
+"""
+ Voucherify API
+
+ Voucherify promotion engine REST API. Please see https://docs.voucherify.io/docs for more details.
+
+ The version of the OpenAPI document: v2018-08-01
+ Contact: support@voucherify.io
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict, StrictStr, field_validator
+from typing import Any, ClassVar, Dict, List, Optional
+from voucherify.models.location_shape_distance import LocationShapeDistance
+from voucherify.models.location_shape_geojson import LocationShapeGeojson
+from typing import Optional, Set
+from typing_extensions import Self
+
+class LocationShape(BaseModel):
+ """
+ LocationShape
+ """ # noqa: E501
+ type: Optional[StrictStr] = None
+ format: Optional[StrictStr] = None
+ distance: Optional[LocationShapeDistance] = None
+ geojson: Optional[LocationShapeGeojson] = None
+ __properties: ClassVar[List[str]] = ["type", "format", "distance", "geojson"]
+
+ @field_validator('type')
+ def type_validate_enum(cls, value):
+ """Validates the enum"""
+ if value is None:
+ return value
+
+ if value not in set(['circle', 'polygon']):
+ raise ValueError("must be one of enum values ('circle', 'polygon')")
+ return value
+
+ @field_validator('format')
+ def format_validate_enum(cls, value):
+ """Validates the enum"""
+ if value is None:
+ return value
+
+ if value not in set(['distance', 'geojson']):
+ raise ValueError("must be one of enum values ('distance', 'geojson')")
+ return value
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of LocationShape from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([
+ ])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ # override the default output from pydantic by calling `to_dict()` of distance
+ if self.distance:
+ _dict['distance'] = self.distance.to_dict()
+ # override the default output from pydantic by calling `to_dict()` of geojson
+ if self.geojson:
+ _dict['geojson'] = self.geojson.to_dict()
+ # set to None if type (nullable) is None
+ # and model_fields_set contains the field
+ if self.type is None and "type" in self.model_fields_set:
+ _dict['type'] = None
+
+ # set to None if format (nullable) is None
+ # and model_fields_set contains the field
+ if self.format is None and "format" in self.model_fields_set:
+ _dict['format'] = None
+
+ # set to None if distance (nullable) is None
+ # and model_fields_set contains the field
+ if self.distance is None and "distance" in self.model_fields_set:
+ _dict['distance'] = None
+
+ # set to None if geojson (nullable) is None
+ # and model_fields_set contains the field
+ if self.geojson is None and "geojson" in self.model_fields_set:
+ _dict['geojson'] = None
+
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of LocationShape from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "type": obj.get("type"),
+ "format": obj.get("format"),
+ "distance": LocationShapeDistance.from_dict(obj["distance"]) if obj.get("distance") is not None else None,
+ "geojson": LocationShapeGeojson.from_dict(obj["geojson"]) if obj.get("geojson") is not None else None
+ })
+ return _obj
+
+
diff --git a/voucherify/models/location_shape_distance.py b/voucherify/models/location_shape_distance.py
new file mode 100644
index 00000000..5f455ce1
--- /dev/null
+++ b/voucherify/models/location_shape_distance.py
@@ -0,0 +1,100 @@
+# coding: utf-8
+
+"""
+ Voucherify API
+
+ Voucherify promotion engine REST API. Please see https://docs.voucherify.io/docs for more details.
+
+ The version of the OpenAPI document: v2018-08-01
+ Contact: support@voucherify.io
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict, Field, StrictStr
+from typing import Any, ClassVar, Dict, List, Optional
+from typing import Optional, Set
+from typing_extensions import Self
+
+class LocationShapeDistance(BaseModel):
+ """
+ Defines the parameters for the circle.
+ """ # noqa: E501
+ center: Optional[StrictStr] = Field(default=None, description="Center of the circle identified by GPS coordinates in decimal degrees.")
+ radius: Optional[StrictStr] = Field(default=None, description="Defines the radius of the circle.")
+ __properties: ClassVar[List[str]] = ["center", "radius"]
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of LocationShapeDistance from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([
+ ])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ # set to None if center (nullable) is None
+ # and model_fields_set contains the field
+ if self.center is None and "center" in self.model_fields_set:
+ _dict['center'] = None
+
+ # set to None if radius (nullable) is None
+ # and model_fields_set contains the field
+ if self.radius is None and "radius" in self.model_fields_set:
+ _dict['radius'] = None
+
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of LocationShapeDistance from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "center": obj.get("center"),
+ "radius": obj.get("radius")
+ })
+ return _obj
+
+
diff --git a/voucherify/models/location_shape_geojson.py b/voucherify/models/location_shape_geojson.py
new file mode 100644
index 00000000..92f3b136
--- /dev/null
+++ b/voucherify/models/location_shape_geojson.py
@@ -0,0 +1,110 @@
+# coding: utf-8
+
+"""
+ Voucherify API
+
+ Voucherify promotion engine REST API. Please see https://docs.voucherify.io/docs for more details.
+
+ The version of the OpenAPI document: v2018-08-01
+ Contact: support@voucherify.io
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict, StrictInt, StrictStr, field_validator
+from typing import Any, ClassVar, Dict, List, Optional
+from typing import Optional, Set
+from typing_extensions import Self
+
+class LocationShapeGeojson(BaseModel):
+ """
+ LocationShapeGeojson
+ """ # noqa: E501
+ type: Optional[StrictStr] = None
+ coordinates: Optional[List[List[StrictInt]]] = None
+ __properties: ClassVar[List[str]] = ["type", "coordinates"]
+
+ @field_validator('type')
+ def type_validate_enum(cls, value):
+ """Validates the enum"""
+ if value is None:
+ return value
+
+ if value not in set(['Polygon', 'MultiPolygon']):
+ raise ValueError("must be one of enum values ('Polygon', 'MultiPolygon')")
+ return value
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of LocationShapeGeojson from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([
+ ])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ # set to None if type (nullable) is None
+ # and model_fields_set contains the field
+ if self.type is None and "type" in self.model_fields_set:
+ _dict['type'] = None
+
+ # set to None if coordinates (nullable) is None
+ # and model_fields_set contains the field
+ if self.coordinates is None and "coordinates" in self.model_fields_set:
+ _dict['coordinates'] = None
+
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of LocationShapeGeojson from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "type": obj.get("type"),
+ "coordinates": obj.get("coordinates")
+ })
+ return _obj
+
+
diff --git a/voucherify/models/locations_get_response_body.py b/voucherify/models/locations_get_response_body.py
new file mode 100644
index 00000000..1295cc3b
--- /dev/null
+++ b/voucherify/models/locations_get_response_body.py
@@ -0,0 +1,143 @@
+# coding: utf-8
+
+"""
+ Voucherify API
+
+ Voucherify promotion engine REST API. Please see https://docs.voucherify.io/docs for more details.
+
+ The version of the OpenAPI document: v2018-08-01
+ Contact: support@voucherify.io
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from datetime import datetime
+from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator
+from typing import Any, ClassVar, Dict, List, Optional
+from voucherify.models.locations_get_response_body_shape import LocationsGetResponseBodyShape
+from typing import Optional, Set
+from typing_extensions import Self
+
+class LocationsGetResponseBody(BaseModel):
+ """
+ Response schema for listing locations using **GET** `/v1/locations/{locationId}`.
+ """ # noqa: E501
+ id: Optional[StrictStr] = Field(default=None, description="Unique location ID, assigned by the Voucherify API.")
+ object: Optional[StrictStr] = Field(default='location', description="The type of the object represented by JSON. This object stores information about a `location`.")
+ name: Optional[StrictStr] = Field(default=None, description="Location name.")
+ shape: Optional[LocationsGetResponseBodyShape] = None
+ created_at: Optional[datetime] = Field(default=None, description="Timestamp representing the date and time when the location was created. The value is shown in the ISO 8601 format.")
+ updated_at: Optional[datetime] = Field(default=None, description="Timestamp representing the date and time when the location was updated. The value is shown in the ISO 8601 format.")
+ __properties: ClassVar[List[str]] = ["id", "object", "name", "shape", "created_at", "updated_at"]
+
+ @field_validator('object')
+ def object_validate_enum(cls, value):
+ """Validates the enum"""
+ if value is None:
+ return value
+
+ if value not in set(['location']):
+ raise ValueError("must be one of enum values ('location')")
+ return value
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of LocationsGetResponseBody from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([
+ ])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ # override the default output from pydantic by calling `to_dict()` of shape
+ if self.shape:
+ _dict['shape'] = self.shape.to_dict()
+ # set to None if id (nullable) is None
+ # and model_fields_set contains the field
+ if self.id is None and "id" in self.model_fields_set:
+ _dict['id'] = None
+
+ # set to None if object (nullable) is None
+ # and model_fields_set contains the field
+ if self.object is None and "object" in self.model_fields_set:
+ _dict['object'] = None
+
+ # set to None if name (nullable) is None
+ # and model_fields_set contains the field
+ if self.name is None and "name" in self.model_fields_set:
+ _dict['name'] = None
+
+ # set to None if shape (nullable) is None
+ # and model_fields_set contains the field
+ if self.shape is None and "shape" in self.model_fields_set:
+ _dict['shape'] = None
+
+ # set to None if created_at (nullable) is None
+ # and model_fields_set contains the field
+ if self.created_at is None and "created_at" in self.model_fields_set:
+ _dict['created_at'] = None
+
+ # set to None if updated_at (nullable) is None
+ # and model_fields_set contains the field
+ if self.updated_at is None and "updated_at" in self.model_fields_set:
+ _dict['updated_at'] = None
+
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of LocationsGetResponseBody from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "id": obj.get("id"),
+ "object": obj.get("object") if obj.get("object") is not None else 'location',
+ "name": obj.get("name"),
+ "shape": LocationsGetResponseBodyShape.from_dict(obj["shape"]) if obj.get("shape") is not None else None,
+ "created_at": obj.get("created_at"),
+ "updated_at": obj.get("updated_at")
+ })
+ return _obj
+
+
diff --git a/voucherify/models/locations_get_response_body_shape.py b/voucherify/models/locations_get_response_body_shape.py
new file mode 100644
index 00000000..27a53ff4
--- /dev/null
+++ b/voucherify/models/locations_get_response_body_shape.py
@@ -0,0 +1,142 @@
+# coding: utf-8
+
+"""
+ Voucherify API
+
+ Voucherify promotion engine REST API. Please see https://docs.voucherify.io/docs for more details.
+
+ The version of the OpenAPI document: v2018-08-01
+ Contact: support@voucherify.io
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict, StrictStr, field_validator
+from typing import Any, ClassVar, Dict, List, Optional
+from voucherify.models.locations_get_response_body_shape_distance import LocationsGetResponseBodyShapeDistance
+from voucherify.models.locations_get_response_body_shape_geojson import LocationsGetResponseBodyShapeGeojson
+from typing import Optional, Set
+from typing_extensions import Self
+
+class LocationsGetResponseBodyShape(BaseModel):
+ """
+ LocationsGetResponseBodyShape
+ """ # noqa: E501
+ type: Optional[StrictStr] = None
+ format: Optional[StrictStr] = None
+ distance: Optional[LocationsGetResponseBodyShapeDistance] = None
+ geojson: Optional[LocationsGetResponseBodyShapeGeojson] = None
+ __properties: ClassVar[List[str]] = ["type", "format", "distance", "geojson"]
+
+ @field_validator('type')
+ def type_validate_enum(cls, value):
+ """Validates the enum"""
+ if value is None:
+ return value
+
+ if value not in set(['circle', 'polygon']):
+ raise ValueError("must be one of enum values ('circle', 'polygon')")
+ return value
+
+ @field_validator('format')
+ def format_validate_enum(cls, value):
+ """Validates the enum"""
+ if value is None:
+ return value
+
+ if value not in set(['distance', 'geojson']):
+ raise ValueError("must be one of enum values ('distance', 'geojson')")
+ return value
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of LocationsGetResponseBodyShape from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([
+ ])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ # override the default output from pydantic by calling `to_dict()` of distance
+ if self.distance:
+ _dict['distance'] = self.distance.to_dict()
+ # override the default output from pydantic by calling `to_dict()` of geojson
+ if self.geojson:
+ _dict['geojson'] = self.geojson.to_dict()
+ # set to None if type (nullable) is None
+ # and model_fields_set contains the field
+ if self.type is None and "type" in self.model_fields_set:
+ _dict['type'] = None
+
+ # set to None if format (nullable) is None
+ # and model_fields_set contains the field
+ if self.format is None and "format" in self.model_fields_set:
+ _dict['format'] = None
+
+ # set to None if distance (nullable) is None
+ # and model_fields_set contains the field
+ if self.distance is None and "distance" in self.model_fields_set:
+ _dict['distance'] = None
+
+ # set to None if geojson (nullable) is None
+ # and model_fields_set contains the field
+ if self.geojson is None and "geojson" in self.model_fields_set:
+ _dict['geojson'] = None
+
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of LocationsGetResponseBodyShape from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "type": obj.get("type"),
+ "format": obj.get("format"),
+ "distance": LocationsGetResponseBodyShapeDistance.from_dict(obj["distance"]) if obj.get("distance") is not None else None,
+ "geojson": LocationsGetResponseBodyShapeGeojson.from_dict(obj["geojson"]) if obj.get("geojson") is not None else None
+ })
+ return _obj
+
+
diff --git a/voucherify/models/locations_get_response_body_shape_distance.py b/voucherify/models/locations_get_response_body_shape_distance.py
new file mode 100644
index 00000000..52304e84
--- /dev/null
+++ b/voucherify/models/locations_get_response_body_shape_distance.py
@@ -0,0 +1,100 @@
+# coding: utf-8
+
+"""
+ Voucherify API
+
+ Voucherify promotion engine REST API. Please see https://docs.voucherify.io/docs for more details.
+
+ The version of the OpenAPI document: v2018-08-01
+ Contact: support@voucherify.io
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict, Field, StrictStr
+from typing import Any, ClassVar, Dict, List, Optional
+from typing import Optional, Set
+from typing_extensions import Self
+
+class LocationsGetResponseBodyShapeDistance(BaseModel):
+ """
+ Defines the parameters for the circle.
+ """ # noqa: E501
+ center: Optional[StrictStr] = Field(default=None, description="Center of the circle identified by GPS coordinates in decimal degrees.")
+ radius: Optional[StrictStr] = Field(default=None, description="Defines the radius of the circle.")
+ __properties: ClassVar[List[str]] = ["center", "radius"]
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of LocationsGetResponseBodyShapeDistance from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([
+ ])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ # set to None if center (nullable) is None
+ # and model_fields_set contains the field
+ if self.center is None and "center" in self.model_fields_set:
+ _dict['center'] = None
+
+ # set to None if radius (nullable) is None
+ # and model_fields_set contains the field
+ if self.radius is None and "radius" in self.model_fields_set:
+ _dict['radius'] = None
+
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of LocationsGetResponseBodyShapeDistance from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "center": obj.get("center"),
+ "radius": obj.get("radius")
+ })
+ return _obj
+
+
diff --git a/voucherify/models/locations_get_response_body_shape_geojson.py b/voucherify/models/locations_get_response_body_shape_geojson.py
new file mode 100644
index 00000000..acd0545b
--- /dev/null
+++ b/voucherify/models/locations_get_response_body_shape_geojson.py
@@ -0,0 +1,110 @@
+# coding: utf-8
+
+"""
+ Voucherify API
+
+ Voucherify promotion engine REST API. Please see https://docs.voucherify.io/docs for more details.
+
+ The version of the OpenAPI document: v2018-08-01
+ Contact: support@voucherify.io
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict, StrictInt, StrictStr, field_validator
+from typing import Any, ClassVar, Dict, List, Optional
+from typing import Optional, Set
+from typing_extensions import Self
+
+class LocationsGetResponseBodyShapeGeojson(BaseModel):
+ """
+ LocationsGetResponseBodyShapeGeojson
+ """ # noqa: E501
+ type: Optional[StrictStr] = None
+ coordinates: Optional[List[List[StrictInt]]] = None
+ __properties: ClassVar[List[str]] = ["type", "coordinates"]
+
+ @field_validator('type')
+ def type_validate_enum(cls, value):
+ """Validates the enum"""
+ if value is None:
+ return value
+
+ if value not in set(['Polygon', 'MultiPolygon']):
+ raise ValueError("must be one of enum values ('Polygon', 'MultiPolygon')")
+ return value
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of LocationsGetResponseBodyShapeGeojson from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([
+ ])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ # set to None if type (nullable) is None
+ # and model_fields_set contains the field
+ if self.type is None and "type" in self.model_fields_set:
+ _dict['type'] = None
+
+ # set to None if coordinates (nullable) is None
+ # and model_fields_set contains the field
+ if self.coordinates is None and "coordinates" in self.model_fields_set:
+ _dict['coordinates'] = None
+
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of LocationsGetResponseBodyShapeGeojson from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "type": obj.get("type"),
+ "coordinates": obj.get("coordinates")
+ })
+ return _obj
+
+
diff --git a/voucherify/models/locations_list_response_body.py b/voucherify/models/locations_list_response_body.py
new file mode 100644
index 00000000..9e8d3f33
--- /dev/null
+++ b/voucherify/models/locations_list_response_body.py
@@ -0,0 +1,129 @@
+# coding: utf-8
+
+"""
+ Voucherify API
+
+ Voucherify promotion engine REST API. Please see https://docs.voucherify.io/docs for more details.
+
+ The version of the OpenAPI document: v2018-08-01
+ Contact: support@voucherify.io
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, StrictStr
+from typing import Any, ClassVar, Dict, List, Optional
+from voucherify.models.location import Location
+from typing import Optional, Set
+from typing_extensions import Self
+
+class LocationsListResponseBody(BaseModel):
+ """
+ Response schema for listing locations using **GET** `v1/locations`.
+ """ # noqa: E501
+ object: Optional[StrictStr] = Field(default='list', description="The type of the object represented by JSON. This object stores information about locations in a dictionary.")
+ data_ref: Optional[StrictStr] = Field(default='data', description="Identifies the name of the attribute that contains the array of metadata schema objects.")
+ data: Optional[List[Location]] = Field(default=None, description="Array of location objects.")
+ total: Optional[StrictInt] = Field(default=None, description="Total number of locations.")
+ has_more: Optional[StrictBool] = Field(default=None, description="As query results are always limited (by the limit parameter), the `has_more` flag indicates if there are more records for given filter parameters. This lets you know if you can run another request (with a different end date filter) to get more records returned in the results.")
+ __properties: ClassVar[List[str]] = ["object", "data_ref", "data", "total", "has_more"]
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of LocationsListResponseBody from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([
+ ])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ # override the default output from pydantic by calling `to_dict()` of each item in data (list)
+ _items = []
+ if self.data:
+ for _item_data in self.data:
+ if _item_data:
+ _items.append(_item_data.to_dict())
+ _dict['data'] = _items
+ # set to None if object (nullable) is None
+ # and model_fields_set contains the field
+ if self.object is None and "object" in self.model_fields_set:
+ _dict['object'] = None
+
+ # set to None if data_ref (nullable) is None
+ # and model_fields_set contains the field
+ if self.data_ref is None and "data_ref" in self.model_fields_set:
+ _dict['data_ref'] = None
+
+ # set to None if data (nullable) is None
+ # and model_fields_set contains the field
+ if self.data is None and "data" in self.model_fields_set:
+ _dict['data'] = None
+
+ # set to None if total (nullable) is None
+ # and model_fields_set contains the field
+ if self.total is None and "total" in self.model_fields_set:
+ _dict['total'] = None
+
+ # set to None if has_more (nullable) is None
+ # and model_fields_set contains the field
+ if self.has_more is None and "has_more" in self.model_fields_set:
+ _dict['has_more'] = None
+
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of LocationsListResponseBody from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "object": obj.get("object") if obj.get("object") is not None else 'list',
+ "data_ref": obj.get("data_ref") if obj.get("data_ref") is not None else 'data',
+ "data": [Location.from_dict(_item) for _item in obj["data"]] if obj.get("data") is not None else None,
+ "total": obj.get("total"),
+ "has_more": obj.get("has_more")
+ })
+ return _obj
+
+
diff --git a/voucherify/models/loyalties_create_campaign_request_body.py b/voucherify/models/loyalties_create_campaign_request_body.py
index 0c85a9ba..a950ca2f 100644
--- a/voucherify/models/loyalties_create_campaign_request_body.py
+++ b/voucherify/models/loyalties_create_campaign_request_body.py
@@ -45,13 +45,13 @@ class LoyaltiesCreateCampaignRequestBody(BaseModel):
validity_day_of_week: Optional[List[StrictInt]] = Field(default=None, description="Integer array corresponding to the particular days of the week in which the voucher is valid. - `0` Sunday - `1` Monday - `2` Tuesday - `3` Wednesday - `4` Thursday - `5` Friday - `6` Saturday")
validity_hours: Optional[ValidityHours] = None
activity_duration_after_publishing: Optional[StrictStr] = Field(default=None, description="Defines the amount of time the vouchers will be active after publishing. The value is shown in the ISO 8601 format. For example, a voucher with the value of P24D will be valid for a duration of 24 days.")
- validation_rules: Optional[Annotated[List[StrictStr], Field(max_length=1)]] = Field(default=None, description="Array containing the ID of the validation rule associated with the promotion tier.")
category_id: Optional[StrictStr] = Field(default=None, description="Unique category ID that this campaign belongs to. Either pass this parameter OR the `category`.")
category: Optional[StrictStr] = Field(default=None, description="The category assigned to the campaign. Either pass this parameter OR the `category_id`.")
metadata: Optional[Dict[str, Any]] = Field(default=None, description="The metadata object stores all custom attributes assigned to the campaign. A set of key/value pairs that you can attach to a campaign object. It can be useful for storing additional information about the campaign in a structured format.")
+ validation_rules: Optional[Annotated[List[StrictStr], Field(max_length=1)]] = Field(default=None, description="Array containing the ID of the validation rule associated with the promotion tier.")
campaign_type: Optional[StrictStr] = Field(default='LOYALTY_PROGRAM', description="Type of campaign.")
voucher: Optional[CampaignLoyaltyVoucher] = None
- __properties: ClassVar[List[str]] = ["name", "description", "type", "join_once", "auto_join", "use_voucher_metadata_schema", "vouchers_count", "start_date", "expiration_date", "validity_timeframe", "validity_day_of_week", "validity_hours", "activity_duration_after_publishing", "validation_rules", "category_id", "category", "metadata", "campaign_type", "voucher"]
+ __properties: ClassVar[List[str]] = ["name", "description", "type", "join_once", "auto_join", "use_voucher_metadata_schema", "vouchers_count", "start_date", "expiration_date", "validity_timeframe", "validity_day_of_week", "validity_hours", "activity_duration_after_publishing", "category_id", "category", "metadata", "validation_rules", "campaign_type", "voucher"]
@field_validator('type')
def type_validate_enum(cls, value):
@@ -182,11 +182,6 @@ def to_dict(self) -> Dict[str, Any]:
if self.activity_duration_after_publishing is None and "activity_duration_after_publishing" in self.model_fields_set:
_dict['activity_duration_after_publishing'] = None
- # set to None if validation_rules (nullable) is None
- # and model_fields_set contains the field
- if self.validation_rules is None and "validation_rules" in self.model_fields_set:
- _dict['validation_rules'] = None
-
# set to None if category_id (nullable) is None
# and model_fields_set contains the field
if self.category_id is None and "category_id" in self.model_fields_set:
@@ -202,6 +197,11 @@ def to_dict(self) -> Dict[str, Any]:
if self.metadata is None and "metadata" in self.model_fields_set:
_dict['metadata'] = None
+ # set to None if validation_rules (nullable) is None
+ # and model_fields_set contains the field
+ if self.validation_rules is None and "validation_rules" in self.model_fields_set:
+ _dict['validation_rules'] = None
+
# set to None if campaign_type (nullable) is None
# and model_fields_set contains the field
if self.campaign_type is None and "campaign_type" in self.model_fields_set:
@@ -232,10 +232,10 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
"validity_day_of_week": obj.get("validity_day_of_week"),
"validity_hours": ValidityHours.from_dict(obj["validity_hours"]) if obj.get("validity_hours") is not None else None,
"activity_duration_after_publishing": obj.get("activity_duration_after_publishing"),
- "validation_rules": obj.get("validation_rules"),
"category_id": obj.get("category_id"),
"category": obj.get("category"),
"metadata": obj.get("metadata"),
+ "validation_rules": obj.get("validation_rules"),
"campaign_type": obj.get("campaign_type") if obj.get("campaign_type") is not None else 'LOYALTY_PROGRAM',
"voucher": CampaignLoyaltyVoucher.from_dict(obj["voucher"]) if obj.get("voucher") is not None else None
})
diff --git a/voucherify/models/loyalties_create_campaign_response_body.py b/voucherify/models/loyalties_create_campaign_response_body.py
index db24e410..f9c72e6a 100644
--- a/voucherify/models/loyalties_create_campaign_response_body.py
+++ b/voucherify/models/loyalties_create_campaign_response_body.py
@@ -58,6 +58,7 @@ class LoyaltiesCreateCampaignResponseBody(BaseModel):
category: Optional[StrictStr] = Field(default=None, description="Unique category name.")
creation_status: Optional[StrictStr] = Field(default=None, description="Indicates the status of the campaign creation.")
vouchers_generation_status: Optional[StrictStr] = Field(default=None, description="Indicates the status of the campaign's voucher generation.")
+ readonly: Optional[StrictBool] = Field(default=None, description="Indicates whether the campaign can be only read by a restricted user in the Areas and Stores enterprise feature. It is returned only to restricted users; this field is not returned for users with other roles.")
protected: Optional[StrictBool] = Field(default=None, description="Indicates whether the resource can be deleted.")
category_id: Optional[StrictStr] = Field(default=None, description="Unique category ID that this campaign belongs to.")
categories: Optional[List[Category]] = Field(default=None, description="Contains details about the category.")
@@ -65,7 +66,7 @@ class LoyaltiesCreateCampaignResponseBody(BaseModel):
loyalty_tiers_expiration: Optional[LoyaltyTiersExpirationAll] = None
validation_rules_assignments: Optional[ValidationRulesAssignmentsList] = None
access_settings_assignments: Optional[AccessSettingsCampaignAssignmentsList] = None
- __properties: ClassVar[List[str]] = ["id", "name", "description", "campaign_type", "type", "voucher", "auto_join", "join_once", "use_voucher_metadata_schema", "validity_timeframe", "validity_day_of_week", "validity_hours", "activity_duration_after_publishing", "vouchers_count", "start_date", "expiration_date", "active", "metadata", "created_at", "updated_at", "category", "creation_status", "vouchers_generation_status", "protected", "category_id", "categories", "object", "loyalty_tiers_expiration", "validation_rules_assignments", "access_settings_assignments"]
+ __properties: ClassVar[List[str]] = ["id", "name", "description", "campaign_type", "type", "voucher", "auto_join", "join_once", "use_voucher_metadata_schema", "validity_timeframe", "validity_day_of_week", "validity_hours", "activity_duration_after_publishing", "vouchers_count", "start_date", "expiration_date", "active", "metadata", "created_at", "updated_at", "category", "creation_status", "vouchers_generation_status", "readonly", "protected", "category_id", "categories", "object", "loyalty_tiers_expiration", "validation_rules_assignments", "access_settings_assignments"]
@field_validator('campaign_type')
def campaign_type_validate_enum(cls, value):
@@ -277,6 +278,11 @@ def to_dict(self) -> Dict[str, Any]:
if self.vouchers_generation_status is None and "vouchers_generation_status" in self.model_fields_set:
_dict['vouchers_generation_status'] = None
+ # set to None if readonly (nullable) is None
+ # and model_fields_set contains the field
+ if self.readonly is None and "readonly" in self.model_fields_set:
+ _dict['readonly'] = None
+
# set to None if protected (nullable) is None
# and model_fields_set contains the field
if self.protected is None and "protected" in self.model_fields_set:
@@ -332,6 +338,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
"category": obj.get("category"),
"creation_status": obj.get("creation_status"),
"vouchers_generation_status": obj.get("vouchers_generation_status"),
+ "readonly": obj.get("readonly"),
"protected": obj.get("protected"),
"category_id": obj.get("category_id"),
"categories": [Category.from_dict(_item) for _item in obj["categories"]] if obj.get("categories") is not None else None,
diff --git a/voucherify/models/loyalties_get_campaign_response_body.py b/voucherify/models/loyalties_get_campaign_response_body.py
index 7ce9849a..ad930b8a 100644
--- a/voucherify/models/loyalties_get_campaign_response_body.py
+++ b/voucherify/models/loyalties_get_campaign_response_body.py
@@ -58,6 +58,7 @@ class LoyaltiesGetCampaignResponseBody(BaseModel):
category: Optional[StrictStr] = Field(default=None, description="Unique category name.")
creation_status: Optional[StrictStr] = Field(default=None, description="Indicates the status of the campaign creation.")
vouchers_generation_status: Optional[StrictStr] = Field(default=None, description="Indicates the status of the campaign's voucher generation.")
+ readonly: Optional[StrictBool] = Field(default=None, description="Indicates whether the campaign can be only read by a restricted user in the Areas and Stores enterprise feature. It is returned only to restricted users; this field is not returned for users with other roles.")
protected: Optional[StrictBool] = Field(default=None, description="Indicates whether the resource can be deleted.")
category_id: Optional[StrictStr] = Field(default=None, description="Unique category ID that this campaign belongs to.")
categories: Optional[List[Category]] = Field(default=None, description="Contains details about the category.")
@@ -65,7 +66,7 @@ class LoyaltiesGetCampaignResponseBody(BaseModel):
loyalty_tiers_expiration: Optional[LoyaltyTiersExpirationAll] = None
validation_rules_assignments: Optional[ValidationRulesAssignmentsList] = None
access_settings_assignments: Optional[AccessSettingsCampaignAssignmentsList] = None
- __properties: ClassVar[List[str]] = ["id", "name", "description", "campaign_type", "type", "voucher", "auto_join", "join_once", "use_voucher_metadata_schema", "validity_timeframe", "validity_day_of_week", "validity_hours", "activity_duration_after_publishing", "vouchers_count", "start_date", "expiration_date", "active", "metadata", "created_at", "updated_at", "category", "creation_status", "vouchers_generation_status", "protected", "category_id", "categories", "object", "loyalty_tiers_expiration", "validation_rules_assignments", "access_settings_assignments"]
+ __properties: ClassVar[List[str]] = ["id", "name", "description", "campaign_type", "type", "voucher", "auto_join", "join_once", "use_voucher_metadata_schema", "validity_timeframe", "validity_day_of_week", "validity_hours", "activity_duration_after_publishing", "vouchers_count", "start_date", "expiration_date", "active", "metadata", "created_at", "updated_at", "category", "creation_status", "vouchers_generation_status", "readonly", "protected", "category_id", "categories", "object", "loyalty_tiers_expiration", "validation_rules_assignments", "access_settings_assignments"]
@field_validator('campaign_type')
def campaign_type_validate_enum(cls, value):
@@ -277,6 +278,11 @@ def to_dict(self) -> Dict[str, Any]:
if self.vouchers_generation_status is None and "vouchers_generation_status" in self.model_fields_set:
_dict['vouchers_generation_status'] = None
+ # set to None if readonly (nullable) is None
+ # and model_fields_set contains the field
+ if self.readonly is None and "readonly" in self.model_fields_set:
+ _dict['readonly'] = None
+
# set to None if protected (nullable) is None
# and model_fields_set contains the field
if self.protected is None and "protected" in self.model_fields_set:
@@ -332,6 +338,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
"category": obj.get("category"),
"creation_status": obj.get("creation_status"),
"vouchers_generation_status": obj.get("vouchers_generation_status"),
+ "readonly": obj.get("readonly"),
"protected": obj.get("protected"),
"category_id": obj.get("category_id"),
"categories": [Category.from_dict(_item) for _item in obj["categories"]] if obj.get("categories") is not None else None,
diff --git a/voucherify/models/loyalties_members_create_response_body_publish.py b/voucherify/models/loyalties_members_create_response_body_publish.py
index db879475..1b55ec68 100644
--- a/voucherify/models/loyalties_members_create_response_body_publish.py
+++ b/voucherify/models/loyalties_members_create_response_body_publish.py
@@ -29,7 +29,7 @@ class LoyaltiesMembersCreateResponseBodyPublish(BaseModel):
""" # noqa: E501
object: Optional[StrictStr] = Field(default='list', description="The type of the object represented is by default `list`. To get this list, you need to make a call to the endpoint returned in the `url` attribute.")
count: Optional[StrictInt] = Field(default=None, description="Publication event counter.")
- url: Optional[StrictStr] = Field(default=None, description="The endpoint where this list of publications can be accessed using a GET method. `/v1/vouchers/{voucher_code}/publications`")
+ url: Optional[StrictStr] = Field(default=None, description="The endpoint where this list of publications can be accessed using a **GET** method. `/v1/vouchers/{voucher_code}/publications`")
__properties: ClassVar[List[str]] = ["object", "count", "url"]
model_config = ConfigDict(
diff --git a/voucherify/models/loyalties_members_create_response_body_redemption.py b/voucherify/models/loyalties_members_create_response_body_redemption.py
index 2397ea6d..3070d958 100644
--- a/voucherify/models/loyalties_members_create_response_body_redemption.py
+++ b/voucherify/models/loyalties_members_create_response_body_redemption.py
@@ -31,7 +31,7 @@ class LoyaltiesMembersCreateResponseBodyRedemption(BaseModel):
redeemed_quantity: Optional[StrictInt] = Field(default=None, description="How many times a voucher has already been redeemed.")
redeemed_points: Optional[StrictInt] = Field(default=None, description="Total loyalty points redeemed.")
object: Optional[StrictStr] = Field(default='list', description="The type of the object represented is by default `list`. To get this list, you need to make a call to the endpoint returned in the url attribute.")
- url: Optional[StrictStr] = Field(default=None, description="The endpoint where this list of redemptions can be accessed using a GET method. `/v1/vouchers/{voucher_code}/redemptions`")
+ url: Optional[StrictStr] = Field(default=None, description="The endpoint where this list of redemptions can be accessed using a **GET** method. `/v1/vouchers/{voucher_code}/redemptions`")
__properties: ClassVar[List[str]] = ["quantity", "redeemed_quantity", "redeemed_points", "object", "url"]
model_config = ConfigDict(
diff --git a/voucherify/models/loyalties_members_get_response_body_publish.py b/voucherify/models/loyalties_members_get_response_body_publish.py
index 576df09d..ca319e3d 100644
--- a/voucherify/models/loyalties_members_get_response_body_publish.py
+++ b/voucherify/models/loyalties_members_get_response_body_publish.py
@@ -29,7 +29,7 @@ class LoyaltiesMembersGetResponseBodyPublish(BaseModel):
""" # noqa: E501
object: Optional[StrictStr] = Field(default='list', description="The type of the object represented is by default `list`. To get this list, you need to make a call to the endpoint returned in the `url` attribute.")
count: Optional[StrictInt] = Field(default=None, description="Publication event counter.")
- url: Optional[StrictStr] = Field(default=None, description="The endpoint where this list of publications can be accessed using a GET method. `/v1/vouchers/{voucher_code}/publications`")
+ url: Optional[StrictStr] = Field(default=None, description="The endpoint where this list of publications can be accessed using a **GET** method. `/v1/vouchers/{voucher_code}/publications`")
__properties: ClassVar[List[str]] = ["object", "count", "url"]
model_config = ConfigDict(
diff --git a/voucherify/models/loyalties_members_get_response_body_redemption.py b/voucherify/models/loyalties_members_get_response_body_redemption.py
index 8f573fe0..6475beeb 100644
--- a/voucherify/models/loyalties_members_get_response_body_redemption.py
+++ b/voucherify/models/loyalties_members_get_response_body_redemption.py
@@ -31,7 +31,7 @@ class LoyaltiesMembersGetResponseBodyRedemption(BaseModel):
redeemed_quantity: Optional[StrictInt] = Field(default=None, description="How many times a voucher has already been redeemed.")
redeemed_points: Optional[StrictInt] = Field(default=None, description="Total loyalty points redeemed.")
object: Optional[StrictStr] = Field(default='list', description="The type of the object represented is by default `list`. To get this list, you need to make a call to the endpoint returned in the url attribute.")
- url: Optional[StrictStr] = Field(default=None, description="The endpoint where this list of redemptions can be accessed using a GET method. `/v1/vouchers/{voucher_code}/redemptions`")
+ url: Optional[StrictStr] = Field(default=None, description="The endpoint where this list of redemptions can be accessed using a **GET** method. `/v1/vouchers/{voucher_code}/redemptions`")
__properties: ClassVar[List[str]] = ["quantity", "redeemed_quantity", "redeemed_points", "object", "url"]
model_config = ConfigDict(
diff --git a/voucherify/models/loyalties_members_redemption_redeem_response_body.py b/voucherify/models/loyalties_members_redemption_redeem_response_body.py
index 4f2cebac..cee676fe 100644
--- a/voucherify/models/loyalties_members_redemption_redeem_response_body.py
+++ b/voucherify/models/loyalties_members_redemption_redeem_response_body.py
@@ -55,12 +55,12 @@ class LoyaltiesMembersRedemptionRedeemResponseBody(BaseModel):
customer: Optional[SimpleCustomer] = None
related_object_type: Optional[StrictStr] = Field(default=None, description="Defines the related object.")
related_object_id: Optional[StrictStr] = Field(default=None, description="Unique related object ID assigned by Voucherify, i.e. v_lfZi4rcEGe0sN9gmnj40bzwK2FH6QUno for a voucher.")
- voucher: Optional[LoyaltiesMembersRedemptionRedeemResponseBodyVoucher] = None
promotion_tier: Optional[PromotionTier] = None
reward: Optional[RedemptionRewardResult] = None
gift: Optional[LoyaltiesMembersRedemptionRedeemResponseBodyGift] = None
loyalty_card: Optional[LoyaltiesMembersRedemptionRedeemResponseBodyLoyaltyCard] = None
- __properties: ClassVar[List[str]] = ["id", "object", "date", "customer_id", "tracking_id", "metadata", "amount", "redemption", "result", "status", "related_redemptions", "failure_code", "failure_message", "order", "channel", "customer", "related_object_type", "related_object_id", "voucher", "promotion_tier", "reward", "gift", "loyalty_card"]
+ voucher: Optional[LoyaltiesMembersRedemptionRedeemResponseBodyVoucher] = None
+ __properties: ClassVar[List[str]] = ["id", "object", "date", "customer_id", "tracking_id", "metadata", "amount", "redemption", "result", "status", "related_redemptions", "failure_code", "failure_message", "order", "channel", "customer", "related_object_type", "related_object_id", "promotion_tier", "reward", "gift", "loyalty_card", "voucher"]
@field_validator('object')
def object_validate_enum(cls, value):
@@ -153,9 +153,6 @@ def to_dict(self) -> Dict[str, Any]:
# override the default output from pydantic by calling `to_dict()` of customer
if self.customer:
_dict['customer'] = self.customer.to_dict()
- # override the default output from pydantic by calling `to_dict()` of voucher
- if self.voucher:
- _dict['voucher'] = self.voucher.to_dict()
# override the default output from pydantic by calling `to_dict()` of promotion_tier
if self.promotion_tier:
_dict['promotion_tier'] = self.promotion_tier.to_dict()
@@ -168,6 +165,9 @@ def to_dict(self) -> Dict[str, Any]:
# override the default output from pydantic by calling `to_dict()` of loyalty_card
if self.loyalty_card:
_dict['loyalty_card'] = self.loyalty_card.to_dict()
+ # override the default output from pydantic by calling `to_dict()` of voucher
+ if self.voucher:
+ _dict['voucher'] = self.voucher.to_dict()
# set to None if id (nullable) is None
# and model_fields_set contains the field
if self.id is None and "id" in self.model_fields_set:
@@ -248,11 +248,6 @@ def to_dict(self) -> Dict[str, Any]:
if self.related_object_id is None and "related_object_id" in self.model_fields_set:
_dict['related_object_id'] = None
- # set to None if voucher (nullable) is None
- # and model_fields_set contains the field
- if self.voucher is None and "voucher" in self.model_fields_set:
- _dict['voucher'] = None
-
# set to None if gift (nullable) is None
# and model_fields_set contains the field
if self.gift is None and "gift" in self.model_fields_set:
@@ -263,6 +258,11 @@ def to_dict(self) -> Dict[str, Any]:
if self.loyalty_card is None and "loyalty_card" in self.model_fields_set:
_dict['loyalty_card'] = None
+ # set to None if voucher (nullable) is None
+ # and model_fields_set contains the field
+ if self.voucher is None and "voucher" in self.model_fields_set:
+ _dict['voucher'] = None
+
return _dict
@classmethod
@@ -293,11 +293,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
"customer": SimpleCustomer.from_dict(obj["customer"]) if obj.get("customer") is not None else None,
"related_object_type": obj.get("related_object_type"),
"related_object_id": obj.get("related_object_id"),
- "voucher": LoyaltiesMembersRedemptionRedeemResponseBodyVoucher.from_dict(obj["voucher"]) if obj.get("voucher") is not None else None,
"promotion_tier": PromotionTier.from_dict(obj["promotion_tier"]) if obj.get("promotion_tier") is not None else None,
"reward": RedemptionRewardResult.from_dict(obj["reward"]) if obj.get("reward") is not None else None,
"gift": LoyaltiesMembersRedemptionRedeemResponseBodyGift.from_dict(obj["gift"]) if obj.get("gift") is not None else None,
- "loyalty_card": LoyaltiesMembersRedemptionRedeemResponseBodyLoyaltyCard.from_dict(obj["loyalty_card"]) if obj.get("loyalty_card") is not None else None
+ "loyalty_card": LoyaltiesMembersRedemptionRedeemResponseBodyLoyaltyCard.from_dict(obj["loyalty_card"]) if obj.get("loyalty_card") is not None else None,
+ "voucher": LoyaltiesMembersRedemptionRedeemResponseBodyVoucher.from_dict(obj["voucher"]) if obj.get("voucher") is not None else None
})
return _obj
diff --git a/voucherify/models/loyalties_members_redemption_redeem_response_body_channel.py b/voucherify/models/loyalties_members_redemption_redeem_response_body_channel.py
index 18414ff9..93f41f4e 100644
--- a/voucherify/models/loyalties_members_redemption_redeem_response_body_channel.py
+++ b/voucherify/models/loyalties_members_redemption_redeem_response_body_channel.py
@@ -27,8 +27,8 @@ class LoyaltiesMembersRedemptionRedeemResponseBodyChannel(BaseModel):
"""
Defines the details of the channel through which the redemption was issued.
""" # noqa: E501
- channel_id: Optional[StrictStr] = Field(default=None, description="Unique channel ID of the user performing the redemption. This is either a user ID from a user using the Voucherify Dashboard or an X-APP-Id of a user using the API.")
- channel_type: Optional[StrictStr] = Field(default=None, description="The source of the channel for the redemption. A `USER` corresponds to the Voucherify Dashboard and an `API` corresponds to the API.")
+ channel_id: Optional[StrictStr] = Field(default=None, description="Unique channel ID of the user performing the redemption. This is either a user ID from a user using the Voucherify Dashboard or an X-APP-Id of a user using the API. For `AUTO_REDEEM`, it is the reward assignment ID.")
+ channel_type: Optional[StrictStr] = Field(default=None, description="The source of the channel for the redemption. A `USER` corresponds to the Voucherify Dashboard, `API` corresponds to the API, and `AUTO_REDEEM` corresponds to a loyalty campaign reward that has been redeemed automatically.")
__properties: ClassVar[List[str]] = ["channel_id", "channel_type"]
@field_validator('channel_type')
@@ -37,8 +37,8 @@ def channel_type_validate_enum(cls, value):
if value is None:
return value
- if value not in set(['USER', 'API']):
- raise ValueError("must be one of enum values ('USER', 'API')")
+ if value not in set(['USER', 'API', 'AUTO_REDEEM']):
+ raise ValueError("must be one of enum values ('USER', 'API', 'AUTO_REDEEM')")
return value
model_config = ConfigDict(
diff --git a/voucherify/models/loyalties_members_redemption_redeem_response_body_voucher.py b/voucherify/models/loyalties_members_redemption_redeem_response_body_voucher.py
index 6d6b49ae..6970ae65 100644
--- a/voucherify/models/loyalties_members_redemption_redeem_response_body_voucher.py
+++ b/voucherify/models/loyalties_members_redemption_redeem_response_body_voucher.py
@@ -21,7 +21,6 @@
from datetime import datetime
from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, StrictStr, field_validator
from typing import Any, ClassVar, Dict, List, Optional
-from voucherify.models.category import Category
from voucherify.models.discount import Discount
from voucherify.models.loyalties_members_redemption_redeem_response_body_voucher_gift import LoyaltiesMembersRedemptionRedeemResponseBodyVoucherGift
from voucherify.models.loyalties_members_redemption_redeem_response_body_voucher_loyalty_card import LoyaltiesMembersRedemptionRedeemResponseBodyVoucherLoyaltyCard
@@ -66,7 +65,7 @@ class LoyaltiesMembersRedemptionRedeemResponseBodyVoucher(BaseModel):
object: Optional[StrictStr] = Field(default='voucher', description="The type of the object represented by JSON. Default is `voucher`.")
publish: Optional[LoyaltiesMembersRedemptionRedeemResponseBodyVoucherPublish] = None
redemption: Optional[LoyaltiesMembersRedemptionRedeemResponseBodyVoucherRedemption] = None
- categories: Optional[List[Category]] = Field(default=None, description="Contains details about the category.")
+ categories: Optional[List[Any]] = Field(default=None, description="Always returns an empty array.")
validation_rules_assignments: Optional[ValidationRulesAssignmentsList] = None
holder: Optional[SimpleCustomer] = None
__properties: ClassVar[List[str]] = ["id", "code", "campaign", "campaign_id", "category", "category_id", "type", "discount", "gift", "loyalty_card", "start_date", "expiration_date", "validity_timeframe", "validity_day_of_week", "validity_hours", "active", "additional_info", "metadata", "assets", "is_referral_code", "created_at", "updated_at", "holder_id", "referrer_id", "object", "publish", "redemption", "categories", "validation_rules_assignments", "holder"]
@@ -155,13 +154,6 @@ def to_dict(self) -> Dict[str, Any]:
# override the default output from pydantic by calling `to_dict()` of redemption
if self.redemption:
_dict['redemption'] = self.redemption.to_dict()
- # override the default output from pydantic by calling `to_dict()` of each item in categories (list)
- _items = []
- if self.categories:
- for _item_categories in self.categories:
- if _item_categories:
- _items.append(_item_categories.to_dict())
- _dict['categories'] = _items
# override the default output from pydantic by calling `to_dict()` of validation_rules_assignments
if self.validation_rules_assignments:
_dict['validation_rules_assignments'] = self.validation_rules_assignments.to_dict()
@@ -322,7 +314,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
"object": obj.get("object") if obj.get("object") is not None else 'voucher',
"publish": LoyaltiesMembersRedemptionRedeemResponseBodyVoucherPublish.from_dict(obj["publish"]) if obj.get("publish") is not None else None,
"redemption": LoyaltiesMembersRedemptionRedeemResponseBodyVoucherRedemption.from_dict(obj["redemption"]) if obj.get("redemption") is not None else None,
- "categories": [Category.from_dict(_item) for _item in obj["categories"]] if obj.get("categories") is not None else None,
+ "categories": obj.get("categories"),
"validation_rules_assignments": ValidationRulesAssignmentsList.from_dict(obj["validation_rules_assignments"]) if obj.get("validation_rules_assignments") is not None else None,
"holder": SimpleCustomer.from_dict(obj["holder"]) if obj.get("holder") is not None else None
})
diff --git a/voucherify/models/loyalties_members_redemption_redeem_response_body_voucher_publish.py b/voucherify/models/loyalties_members_redemption_redeem_response_body_voucher_publish.py
index 0511ba82..71f9c9df 100644
--- a/voucherify/models/loyalties_members_redemption_redeem_response_body_voucher_publish.py
+++ b/voucherify/models/loyalties_members_redemption_redeem_response_body_voucher_publish.py
@@ -29,7 +29,7 @@ class LoyaltiesMembersRedemptionRedeemResponseBodyVoucherPublish(BaseModel):
""" # noqa: E501
object: Optional[StrictStr] = Field(default='list', description="The type of the object represented is by default `list`. To get this list, you need to make a call to the endpoint returned in the `url` attribute.")
count: Optional[StrictInt] = Field(default=None, description="Publication events counter.")
- url: Optional[StrictStr] = Field(default=None, description="The endpoint where this list of publications can be accessed using a GET method. `/v1/vouchers/{voucher_code}/publications`")
+ url: Optional[StrictStr] = Field(default=None, description="The endpoint where this list of publications can be accessed using a **GET** method. `/v1/vouchers/{voucher_code}/publications`")
__properties: ClassVar[List[str]] = ["object", "count", "url"]
model_config = ConfigDict(
diff --git a/voucherify/models/loyalties_members_redemption_redeem_response_body_voucher_redemption.py b/voucherify/models/loyalties_members_redemption_redeem_response_body_voucher_redemption.py
index 2638ba3a..14065357 100644
--- a/voucherify/models/loyalties_members_redemption_redeem_response_body_voucher_redemption.py
+++ b/voucherify/models/loyalties_members_redemption_redeem_response_body_voucher_redemption.py
@@ -31,7 +31,7 @@ class LoyaltiesMembersRedemptionRedeemResponseBodyVoucherRedemption(BaseModel):
redeemed_quantity: Optional[StrictInt] = Field(default=None, description="How many times a voucher has already been redeemed.")
redeemed_points: Optional[StrictInt] = Field(default=None, description="Total loyalty points redeemed.")
object: Optional[StrictStr] = Field(default='list', description="The type of the object represented is by default `list`. To get this list, you need to make a call to the endpoint returned in the url attribute.")
- url: Optional[StrictStr] = Field(default=None, description="The endpoint where this list of redemptions can be accessed using a GET method. `/v1/vouchers/{voucher_code}/redemptions`")
+ url: Optional[StrictStr] = Field(default=None, description="The endpoint where this list of redemptions can be accessed using a **GET** method. `/v1/vouchers/{voucher_code}/redemptions`")
__properties: ClassVar[List[str]] = ["quantity", "redeemed_quantity", "redeemed_points", "object", "url"]
model_config = ConfigDict(
diff --git a/voucherify/models/loyalties_members_transfers_create_response_body_publish.py b/voucherify/models/loyalties_members_transfers_create_response_body_publish.py
index 7250de2e..4f6258e2 100644
--- a/voucherify/models/loyalties_members_transfers_create_response_body_publish.py
+++ b/voucherify/models/loyalties_members_transfers_create_response_body_publish.py
@@ -30,7 +30,7 @@ class LoyaltiesMembersTransfersCreateResponseBodyPublish(BaseModel):
object: Optional[StrictStr] = Field(default='list', description="The type of the object represented is by default list. To get this list, you need to make a call to the endpoint returned in the url attribute.")
count: Optional[StrictInt] = Field(default=None, description="Publication events counter.")
entries: Optional[List[StrictStr]] = None
- url: Optional[StrictStr] = Field(default=None, description="The endpoint where this list of publications can be accessed using a GET method. /v1/vouchers/{voucher_code}/publications")
+ url: Optional[StrictStr] = Field(default=None, description="The endpoint where this list of publications can be accessed using a **GET** method. /v1/vouchers/{voucher_code}/publications")
__properties: ClassVar[List[str]] = ["object", "count", "entries", "url"]
@field_validator('object')
diff --git a/voucherify/models/loyalties_members_transfers_create_response_body_redemption.py b/voucherify/models/loyalties_members_transfers_create_response_body_redemption.py
index 0bbcddb1..d3ac0176 100644
--- a/voucherify/models/loyalties_members_transfers_create_response_body_redemption.py
+++ b/voucherify/models/loyalties_members_transfers_create_response_body_redemption.py
@@ -31,7 +31,7 @@ class LoyaltiesMembersTransfersCreateResponseBodyRedemption(BaseModel):
redeemed_points: Optional[StrictInt] = Field(default=None, description="Total loyalty points redeemed.")
redeemed_quantity: Optional[StrictInt] = Field(default=None, description="How many times a voucher has already been redeemed.")
object: Optional[StrictStr] = Field(default='list', description="The type of the object represented is by default list. To get this list, you need to make a call to the endpoint returned in the url attribute.")
- url: Optional[StrictStr] = Field(default=None, description="The endpoint where this list of redemptions can be accessed using a GET method. /v1/vouchers/{voucher_code}/redemptions")
+ url: Optional[StrictStr] = Field(default=None, description="The endpoint where this list of redemptions can be accessed using a **GET** method. /v1/vouchers/{voucher_code}/redemptions")
__properties: ClassVar[List[str]] = ["quantity", "redeemed_points", "redeemed_quantity", "object", "url"]
@field_validator('object')
diff --git a/voucherify/models/loyalties_reward_assignments_get_response_body_parameters_loyalty.py b/voucherify/models/loyalties_reward_assignments_get_response_body_parameters_loyalty.py
index 1d463bb8..1075d3f1 100644
--- a/voucherify/models/loyalties_reward_assignments_get_response_body_parameters_loyalty.py
+++ b/voucherify/models/loyalties_reward_assignments_get_response_body_parameters_loyalty.py
@@ -18,7 +18,7 @@
import re # noqa: F401
import json
-from pydantic import BaseModel, ConfigDict, Field, StrictInt
+from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt
from typing import Any, ClassVar, Dict, List, Optional
from typing import Optional, Set
from typing_extensions import Self
@@ -28,7 +28,8 @@ class LoyaltiesRewardAssignmentsGetResponseBodyParametersLoyalty(BaseModel):
Defines the equivalent points value of the reward.
""" # noqa: E501
points: Optional[StrictInt] = Field(default=None, description="The number of points required to redeem the reward.")
- __properties: ClassVar[List[str]] = ["points"]
+ auto_redeem: Optional[StrictBool] = Field(default=None, description="Determines if the reward is redeemed automatically when the customer reaches the sufficient number of points to redeem it. Value `true` means that the automatic reward redemption is active. Only one reward can be set to be redeemed automatically in a loyalty campaign, i.e. only one can have the value `true`.")
+ __properties: ClassVar[List[str]] = ["points", "auto_redeem"]
model_config = ConfigDict(
populate_by_name=True,
@@ -74,6 +75,11 @@ def to_dict(self) -> Dict[str, Any]:
if self.points is None and "points" in self.model_fields_set:
_dict['points'] = None
+ # set to None if auto_redeem (nullable) is None
+ # and model_fields_set contains the field
+ if self.auto_redeem is None and "auto_redeem" in self.model_fields_set:
+ _dict['auto_redeem'] = None
+
return _dict
@classmethod
@@ -86,7 +92,8 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
return cls.model_validate(obj)
_obj = cls.model_validate({
- "points": obj.get("points")
+ "points": obj.get("points"),
+ "auto_redeem": obj.get("auto_redeem")
})
return _obj
diff --git a/voucherify/models/loyalties_rewards_create_assignment_response_body_parameters_loyalty.py b/voucherify/models/loyalties_rewards_create_assignment_response_body_parameters_loyalty.py
index 6efe0f55..84a20c07 100644
--- a/voucherify/models/loyalties_rewards_create_assignment_response_body_parameters_loyalty.py
+++ b/voucherify/models/loyalties_rewards_create_assignment_response_body_parameters_loyalty.py
@@ -18,7 +18,7 @@
import re # noqa: F401
import json
-from pydantic import BaseModel, ConfigDict, Field, StrictInt
+from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt
from typing import Any, ClassVar, Dict, List, Optional
from typing import Optional, Set
from typing_extensions import Self
@@ -28,7 +28,8 @@ class LoyaltiesRewardsCreateAssignmentResponseBodyParametersLoyalty(BaseModel):
Defines the equivalent points value of the reward.
""" # noqa: E501
points: Optional[StrictInt] = Field(default=None, description="The number of points required to redeem the reward.")
- __properties: ClassVar[List[str]] = ["points"]
+ auto_redeem: Optional[StrictBool] = Field(default=None, description="Determines if the reward is redeemed automatically when the customer reaches the sufficient number of points to redeem it. Value `true` means that the automatic reward redemption is active. Only one reward can be set to be redeemed automatically in a loyalty campaign, i.e. only one can have the value `true`.")
+ __properties: ClassVar[List[str]] = ["points", "auto_redeem"]
model_config = ConfigDict(
populate_by_name=True,
@@ -74,6 +75,11 @@ def to_dict(self) -> Dict[str, Any]:
if self.points is None and "points" in self.model_fields_set:
_dict['points'] = None
+ # set to None if auto_redeem (nullable) is None
+ # and model_fields_set contains the field
+ if self.auto_redeem is None and "auto_redeem" in self.model_fields_set:
+ _dict['auto_redeem'] = None
+
return _dict
@classmethod
@@ -86,7 +92,8 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
return cls.model_validate(obj)
_obj = cls.model_validate({
- "points": obj.get("points")
+ "points": obj.get("points"),
+ "auto_redeem": obj.get("auto_redeem")
})
return _obj
diff --git a/voucherify/models/loyalties_rewards_get_response_body_parameters_loyalty.py b/voucherify/models/loyalties_rewards_get_response_body_parameters_loyalty.py
index 3e7dabaf..7dfeec43 100644
--- a/voucherify/models/loyalties_rewards_get_response_body_parameters_loyalty.py
+++ b/voucherify/models/loyalties_rewards_get_response_body_parameters_loyalty.py
@@ -18,7 +18,7 @@
import re # noqa: F401
import json
-from pydantic import BaseModel, ConfigDict, Field, StrictInt
+from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt
from typing import Any, ClassVar, Dict, List, Optional
from typing import Optional, Set
from typing_extensions import Self
@@ -28,7 +28,8 @@ class LoyaltiesRewardsGetResponseBodyParametersLoyalty(BaseModel):
Defines the equivalent points value of the reward.
""" # noqa: E501
points: Optional[StrictInt] = Field(default=None, description="The number of points required to redeem the reward.")
- __properties: ClassVar[List[str]] = ["points"]
+ auto_redeem: Optional[StrictBool] = Field(default=None, description="Determines if the reward is redeemed automatically when the customer reaches the sufficient number of points to redeem it. Value `true` means that the automatic reward redemption is active. Only one reward can be set to be redeemed automatically in a loyalty campaign, i.e. only one can have the value `true`.")
+ __properties: ClassVar[List[str]] = ["points", "auto_redeem"]
model_config = ConfigDict(
populate_by_name=True,
@@ -74,6 +75,11 @@ def to_dict(self) -> Dict[str, Any]:
if self.points is None and "points" in self.model_fields_set:
_dict['points'] = None
+ # set to None if auto_redeem (nullable) is None
+ # and model_fields_set contains the field
+ if self.auto_redeem is None and "auto_redeem" in self.model_fields_set:
+ _dict['auto_redeem'] = None
+
return _dict
@classmethod
@@ -86,7 +92,8 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
return cls.model_validate(obj)
_obj = cls.model_validate({
- "points": obj.get("points")
+ "points": obj.get("points"),
+ "auto_redeem": obj.get("auto_redeem")
})
return _obj
diff --git a/voucherify/models/loyalties_rewards_update_assignment_request_body_parameters_loyalty.py b/voucherify/models/loyalties_rewards_update_assignment_request_body_parameters_loyalty.py
index 0fcaac13..4359ba15 100644
--- a/voucherify/models/loyalties_rewards_update_assignment_request_body_parameters_loyalty.py
+++ b/voucherify/models/loyalties_rewards_update_assignment_request_body_parameters_loyalty.py
@@ -18,7 +18,7 @@
import re # noqa: F401
import json
-from pydantic import BaseModel, ConfigDict, Field, StrictInt
+from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt
from typing import Any, ClassVar, Dict, List, Optional
from typing import Optional, Set
from typing_extensions import Self
@@ -28,7 +28,8 @@ class LoyaltiesRewardsUpdateAssignmentRequestBodyParametersLoyalty(BaseModel):
Stores the points parameter.
""" # noqa: E501
points: Optional[StrictInt] = Field(default=None, description="Defines how many points are required to obtain the reward.")
- __properties: ClassVar[List[str]] = ["points"]
+ auto_redeem: Optional[StrictBool] = Field(default=None, description="Determines if the reward is redeemed automatically when the customer reaches the sufficient number of points to redeem it. Value `true` means that the automatic reward redemption is active. Only one reward can be set to be redeemed automatically in a loyalty campaign, i.e. only one can have the value `true`.")
+ __properties: ClassVar[List[str]] = ["points", "auto_redeem"]
model_config = ConfigDict(
populate_by_name=True,
@@ -74,6 +75,11 @@ def to_dict(self) -> Dict[str, Any]:
if self.points is None and "points" in self.model_fields_set:
_dict['points'] = None
+ # set to None if auto_redeem (nullable) is None
+ # and model_fields_set contains the field
+ if self.auto_redeem is None and "auto_redeem" in self.model_fields_set:
+ _dict['auto_redeem'] = None
+
return _dict
@classmethod
@@ -86,7 +92,8 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
return cls.model_validate(obj)
_obj = cls.model_validate({
- "points": obj.get("points")
+ "points": obj.get("points"),
+ "auto_redeem": obj.get("auto_redeem")
})
return _obj
diff --git a/voucherify/models/loyalties_rewards_update_assignment_response_body_parameters_loyalty.py b/voucherify/models/loyalties_rewards_update_assignment_response_body_parameters_loyalty.py
index c1f6e168..25efb797 100644
--- a/voucherify/models/loyalties_rewards_update_assignment_response_body_parameters_loyalty.py
+++ b/voucherify/models/loyalties_rewards_update_assignment_response_body_parameters_loyalty.py
@@ -18,7 +18,7 @@
import re # noqa: F401
import json
-from pydantic import BaseModel, ConfigDict, Field, StrictInt
+from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt
from typing import Any, ClassVar, Dict, List, Optional
from typing import Optional, Set
from typing_extensions import Self
@@ -28,7 +28,8 @@ class LoyaltiesRewardsUpdateAssignmentResponseBodyParametersLoyalty(BaseModel):
Defines the equivalent points value of the reward.
""" # noqa: E501
points: Optional[StrictInt] = Field(default=None, description="The number of points required to redeem the reward.")
- __properties: ClassVar[List[str]] = ["points"]
+ auto_redeem: Optional[StrictBool] = Field(default=None, description="Determines if the reward is redeemed automatically when the customer reaches the sufficient number of points to redeem it. Value `true` means that the automatic reward redemption is active. Only one reward can be set to be redeemed automatically in a loyalty campaign, i.e. only one can have the value `true`.")
+ __properties: ClassVar[List[str]] = ["points", "auto_redeem"]
model_config = ConfigDict(
populate_by_name=True,
@@ -74,6 +75,11 @@ def to_dict(self) -> Dict[str, Any]:
if self.points is None and "points" in self.model_fields_set:
_dict['points'] = None
+ # set to None if auto_redeem (nullable) is None
+ # and model_fields_set contains the field
+ if self.auto_redeem is None and "auto_redeem" in self.model_fields_set:
+ _dict['auto_redeem'] = None
+
return _dict
@classmethod
@@ -86,7 +92,8 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
return cls.model_validate(obj)
_obj = cls.model_validate({
- "points": obj.get("points")
+ "points": obj.get("points"),
+ "auto_redeem": obj.get("auto_redeem")
})
return _obj
diff --git a/voucherify/models/loyalties_update_campaign_response_body.py b/voucherify/models/loyalties_update_campaign_response_body.py
index 87663f9e..31f48ea9 100644
--- a/voucherify/models/loyalties_update_campaign_response_body.py
+++ b/voucherify/models/loyalties_update_campaign_response_body.py
@@ -58,6 +58,7 @@ class LoyaltiesUpdateCampaignResponseBody(BaseModel):
category: Optional[StrictStr] = Field(default=None, description="Unique category name.")
creation_status: Optional[StrictStr] = Field(default=None, description="Indicates the status of the campaign creation.")
vouchers_generation_status: Optional[StrictStr] = Field(default=None, description="Indicates the status of the campaign's voucher generation.")
+ readonly: Optional[StrictBool] = Field(default=None, description="Indicates whether the campaign can be only read by a restricted user in the Areas and Stores enterprise feature. It is returned only to restricted users; this field is not returned for users with other roles.")
protected: Optional[StrictBool] = Field(default=None, description="Indicates whether the resource can be deleted.")
category_id: Optional[StrictStr] = Field(default=None, description="Unique category ID that this campaign belongs to.")
categories: Optional[List[Category]] = Field(default=None, description="Contains details about the category.")
@@ -65,7 +66,7 @@ class LoyaltiesUpdateCampaignResponseBody(BaseModel):
loyalty_tiers_expiration: Optional[LoyaltyTiersExpirationAll] = None
validation_rules_assignments: Optional[ValidationRulesAssignmentsList] = None
access_settings_assignments: Optional[AccessSettingsCampaignAssignmentsList] = None
- __properties: ClassVar[List[str]] = ["id", "name", "description", "campaign_type", "type", "voucher", "auto_join", "join_once", "use_voucher_metadata_schema", "validity_timeframe", "validity_day_of_week", "validity_hours", "activity_duration_after_publishing", "vouchers_count", "start_date", "expiration_date", "active", "metadata", "created_at", "updated_at", "category", "creation_status", "vouchers_generation_status", "protected", "category_id", "categories", "object", "loyalty_tiers_expiration", "validation_rules_assignments", "access_settings_assignments"]
+ __properties: ClassVar[List[str]] = ["id", "name", "description", "campaign_type", "type", "voucher", "auto_join", "join_once", "use_voucher_metadata_schema", "validity_timeframe", "validity_day_of_week", "validity_hours", "activity_duration_after_publishing", "vouchers_count", "start_date", "expiration_date", "active", "metadata", "created_at", "updated_at", "category", "creation_status", "vouchers_generation_status", "readonly", "protected", "category_id", "categories", "object", "loyalty_tiers_expiration", "validation_rules_assignments", "access_settings_assignments"]
@field_validator('campaign_type')
def campaign_type_validate_enum(cls, value):
@@ -277,6 +278,11 @@ def to_dict(self) -> Dict[str, Any]:
if self.vouchers_generation_status is None and "vouchers_generation_status" in self.model_fields_set:
_dict['vouchers_generation_status'] = None
+ # set to None if readonly (nullable) is None
+ # and model_fields_set contains the field
+ if self.readonly is None and "readonly" in self.model_fields_set:
+ _dict['readonly'] = None
+
# set to None if protected (nullable) is None
# and model_fields_set contains the field
if self.protected is None and "protected" in self.model_fields_set:
@@ -332,6 +338,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
"category": obj.get("category"),
"creation_status": obj.get("creation_status"),
"vouchers_generation_status": obj.get("vouchers_generation_status"),
+ "readonly": obj.get("readonly"),
"protected": obj.get("protected"),
"category_id": obj.get("category_id"),
"categories": [Category.from_dict(_item) for _item in obj["categories"]] if obj.get("categories") is not None else None,
diff --git a/voucherify/models/loyalty_campaign.py b/voucherify/models/loyalty_campaign.py
index a3474a76..14844d1c 100644
--- a/voucherify/models/loyalty_campaign.py
+++ b/voucherify/models/loyalty_campaign.py
@@ -58,6 +58,7 @@ class LoyaltyCampaign(BaseModel):
category: Optional[StrictStr] = Field(default=None, description="Unique category name.")
creation_status: Optional[StrictStr] = Field(default=None, description="Indicates the status of the campaign creation.")
vouchers_generation_status: Optional[StrictStr] = Field(default=None, description="Indicates the status of the campaign's voucher generation.")
+ readonly: Optional[StrictBool] = Field(default=None, description="Indicates whether the campaign can be only read by a restricted user in the Areas and Stores enterprise feature. It is returned only to restricted users; this field is not returned for users with other roles.")
protected: Optional[StrictBool] = Field(default=None, description="Indicates whether the resource can be deleted.")
category_id: Optional[StrictStr] = Field(default=None, description="Unique category ID that this campaign belongs to.")
categories: Optional[List[Category]] = Field(default=None, description="Contains details about the category.")
@@ -65,7 +66,7 @@ class LoyaltyCampaign(BaseModel):
loyalty_tiers_expiration: Optional[LoyaltyTiersExpirationAll] = None
validation_rules_assignments: Optional[ValidationRulesAssignmentsList] = None
access_settings_assignments: Optional[AccessSettingsCampaignAssignmentsList] = None
- __properties: ClassVar[List[str]] = ["id", "name", "description", "campaign_type", "type", "voucher", "auto_join", "join_once", "use_voucher_metadata_schema", "validity_timeframe", "validity_day_of_week", "validity_hours", "activity_duration_after_publishing", "vouchers_count", "start_date", "expiration_date", "active", "metadata", "created_at", "updated_at", "category", "creation_status", "vouchers_generation_status", "protected", "category_id", "categories", "object", "loyalty_tiers_expiration", "validation_rules_assignments", "access_settings_assignments"]
+ __properties: ClassVar[List[str]] = ["id", "name", "description", "campaign_type", "type", "voucher", "auto_join", "join_once", "use_voucher_metadata_schema", "validity_timeframe", "validity_day_of_week", "validity_hours", "activity_duration_after_publishing", "vouchers_count", "start_date", "expiration_date", "active", "metadata", "created_at", "updated_at", "category", "creation_status", "vouchers_generation_status", "readonly", "protected", "category_id", "categories", "object", "loyalty_tiers_expiration", "validation_rules_assignments", "access_settings_assignments"]
@field_validator('campaign_type')
def campaign_type_validate_enum(cls, value):
@@ -277,6 +278,11 @@ def to_dict(self) -> Dict[str, Any]:
if self.vouchers_generation_status is None and "vouchers_generation_status" in self.model_fields_set:
_dict['vouchers_generation_status'] = None
+ # set to None if readonly (nullable) is None
+ # and model_fields_set contains the field
+ if self.readonly is None and "readonly" in self.model_fields_set:
+ _dict['readonly'] = None
+
# set to None if protected (nullable) is None
# and model_fields_set contains the field
if self.protected is None and "protected" in self.model_fields_set:
@@ -332,6 +338,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
"category": obj.get("category"),
"creation_status": obj.get("creation_status"),
"vouchers_generation_status": obj.get("vouchers_generation_status"),
+ "readonly": obj.get("readonly"),
"protected": obj.get("protected"),
"category_id": obj.get("category_id"),
"categories": [Category.from_dict(_item) for _item in obj["categories"]] if obj.get("categories") is not None else None,
diff --git a/voucherify/models/loyalty_member_publish.py b/voucherify/models/loyalty_member_publish.py
index 0390afd6..016f0b19 100644
--- a/voucherify/models/loyalty_member_publish.py
+++ b/voucherify/models/loyalty_member_publish.py
@@ -29,7 +29,7 @@ class LoyaltyMemberPublish(BaseModel):
""" # noqa: E501
object: Optional[StrictStr] = Field(default='list', description="The type of the object represented is by default `list`. To get this list, you need to make a call to the endpoint returned in the `url` attribute.")
count: Optional[StrictInt] = Field(default=None, description="Publication event counter.")
- url: Optional[StrictStr] = Field(default=None, description="The endpoint where this list of publications can be accessed using a GET method. `/v1/vouchers/{voucher_code}/publications`")
+ url: Optional[StrictStr] = Field(default=None, description="The endpoint where this list of publications can be accessed using a **GET** method. `/v1/vouchers/{voucher_code}/publications`")
__properties: ClassVar[List[str]] = ["object", "count", "url"]
model_config = ConfigDict(
diff --git a/voucherify/models/loyalty_member_redemption.py b/voucherify/models/loyalty_member_redemption.py
index 80bf4533..8c8de764 100644
--- a/voucherify/models/loyalty_member_redemption.py
+++ b/voucherify/models/loyalty_member_redemption.py
@@ -31,7 +31,7 @@ class LoyaltyMemberRedemption(BaseModel):
redeemed_quantity: Optional[StrictInt] = Field(default=None, description="How many times a voucher has already been redeemed.")
redeemed_points: Optional[StrictInt] = Field(default=None, description="Total loyalty points redeemed.")
object: Optional[StrictStr] = Field(default='list', description="The type of the object represented is by default `list`. To get this list, you need to make a call to the endpoint returned in the url attribute.")
- url: Optional[StrictStr] = Field(default=None, description="The endpoint where this list of redemptions can be accessed using a GET method. `/v1/vouchers/{voucher_code}/redemptions`")
+ url: Optional[StrictStr] = Field(default=None, description="The endpoint where this list of redemptions can be accessed using a **GET** method. `/v1/vouchers/{voucher_code}/redemptions`")
__properties: ClassVar[List[str]] = ["quantity", "redeemed_quantity", "redeemed_points", "object", "url"]
model_config = ConfigDict(
diff --git a/voucherify/models/management_project.py b/voucherify/models/management_project.py
new file mode 100644
index 00000000..83f88c22
--- /dev/null
+++ b/voucherify/models/management_project.py
@@ -0,0 +1,283 @@
+# coding: utf-8
+
+"""
+ Voucherify API
+
+ Voucherify promotion engine REST API. Please see https://docs.voucherify.io/docs for more details.
+
+ The version of the OpenAPI document: v2018-08-01
+ Contact: support@voucherify.io
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr, field_validator
+from typing import Any, ClassVar, Dict, List, Optional
+from voucherify.models.management_project_api_usage_notifications import ManagementProjectApiUsageNotifications
+from voucherify.models.management_project_default_code_config import ManagementProjectDefaultCodeConfig
+from voucherify.models.management_project_limits import ManagementProjectLimits
+from voucherify.models.management_project_webhooks_callout_notifications import ManagementProjectWebhooksCalloutNotifications
+from typing import Optional, Set
+from typing_extensions import Self
+
+class ManagementProject(BaseModel):
+ """
+ ManagementProject
+ """ # noqa: E501
+ id: Optional[StrictStr] = Field(default=None, description="Unique identifier of the project.")
+ name: Optional[StrictStr] = Field(default=None, description="The name of the project.")
+ description: Optional[StrictStr] = Field(default=None, description="A user-defined description of the project, e.g. its purpose, scope, region.")
+ timezone: Optional[StrictStr] = Field(default=None, description="The time zone in which the project is established. It can be in the GMT format or in accordance with IANA time zone database.")
+ currency: Optional[StrictStr] = Field(default=None, description="The currency used in the project. It is equal to a 3-letter ISO 4217 code.")
+ dial_code: Optional[StrictStr] = Field(default=None, description="The country dial code for the project. It is equal to an ITU country code.")
+ webhook_version: Optional[StrictStr] = Field(default='v2024-01-01', description="The webhook version used in the project.")
+ client_trusted_domains: Optional[List[StrictStr]] = Field(default=None, description="An array of URL addresses that allow client requests.")
+ client_redeem_enabled: Optional[StrictBool] = Field(default=None, description="Enables client-side redemption.")
+ client_publish_enabled: Optional[StrictBool] = Field(default=None, description="Enables client-side publication.")
+ client_list_vouchers_enabled: Optional[StrictBool] = Field(default=None, description="Enables client-side listing of vouchers.")
+ client_create_customer_enabled: Optional[StrictBool] = Field(default=None, description="Enables client-side creation of customers.")
+ client_loyalty_events_enabled: Optional[StrictBool] = Field(default=None, description="Enables client-side events for loyalty and referral programs.")
+ client_set_voucher_expiration_date_enabled: Optional[StrictBool] = Field(default=None, description="Enables client-side setting of voucher expiration date.")
+ webhooks_callout_notifications: Optional[ManagementProjectWebhooksCalloutNotifications] = None
+ api_usage_notifications: Optional[ManagementProjectApiUsageNotifications] = None
+ cluster_id: Optional[StrictStr] = Field(default=None, description="The identifier of the cluster where the project will be created.")
+ case_sensitive_codes: Optional[StrictBool] = Field(default=None, description="Determines if the vouchers in the project will be: - case sensitive - if `true`, `C0dE-cfV` is **not** equal to `c0de-cfv`), - case insensitive - if `false`, `C0dE-cfV` is equal to `c0de-cfv`.")
+ api_version: Optional[StrictStr] = Field(default='v2018-08-01', description="The API version used in the project. Currently, the default and only value is `v2018-08-01`.")
+ is_sandbox: Optional[StrictBool] = Field(default=None, description="Determines if the project is a sandbox project.")
+ webhook_token: Optional[StrictStr] = Field(default=None, description="Webhook token used for authentication.")
+ default_code_config: Optional[ManagementProjectDefaultCodeConfig] = None
+ limits: Optional[ManagementProjectLimits] = None
+ __properties: ClassVar[List[str]] = ["id", "name", "description", "timezone", "currency", "dial_code", "webhook_version", "client_trusted_domains", "client_redeem_enabled", "client_publish_enabled", "client_list_vouchers_enabled", "client_create_customer_enabled", "client_loyalty_events_enabled", "client_set_voucher_expiration_date_enabled", "webhooks_callout_notifications", "api_usage_notifications", "cluster_id", "case_sensitive_codes", "api_version", "is_sandbox", "webhook_token", "default_code_config", "limits"]
+
+ @field_validator('webhook_version')
+ def webhook_version_validate_enum(cls, value):
+ """Validates the enum"""
+ if value is None:
+ return value
+
+ if value not in set(['v2024-01-01']):
+ raise ValueError("must be one of enum values ('v2024-01-01')")
+ return value
+
+ @field_validator('api_version')
+ def api_version_validate_enum(cls, value):
+ """Validates the enum"""
+ if value is None:
+ return value
+
+ if value not in set(['v2018-08-01']):
+ raise ValueError("must be one of enum values ('v2018-08-01')")
+ return value
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of ManagementProject from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([
+ ])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ # override the default output from pydantic by calling `to_dict()` of webhooks_callout_notifications
+ if self.webhooks_callout_notifications:
+ _dict['webhooks_callout_notifications'] = self.webhooks_callout_notifications.to_dict()
+ # override the default output from pydantic by calling `to_dict()` of api_usage_notifications
+ if self.api_usage_notifications:
+ _dict['api_usage_notifications'] = self.api_usage_notifications.to_dict()
+ # override the default output from pydantic by calling `to_dict()` of default_code_config
+ if self.default_code_config:
+ _dict['default_code_config'] = self.default_code_config.to_dict()
+ # override the default output from pydantic by calling `to_dict()` of limits
+ if self.limits:
+ _dict['limits'] = self.limits.to_dict()
+ # set to None if id (nullable) is None
+ # and model_fields_set contains the field
+ if self.id is None and "id" in self.model_fields_set:
+ _dict['id'] = None
+
+ # set to None if name (nullable) is None
+ # and model_fields_set contains the field
+ if self.name is None and "name" in self.model_fields_set:
+ _dict['name'] = None
+
+ # set to None if description (nullable) is None
+ # and model_fields_set contains the field
+ if self.description is None and "description" in self.model_fields_set:
+ _dict['description'] = None
+
+ # set to None if timezone (nullable) is None
+ # and model_fields_set contains the field
+ if self.timezone is None and "timezone" in self.model_fields_set:
+ _dict['timezone'] = None
+
+ # set to None if currency (nullable) is None
+ # and model_fields_set contains the field
+ if self.currency is None and "currency" in self.model_fields_set:
+ _dict['currency'] = None
+
+ # set to None if dial_code (nullable) is None
+ # and model_fields_set contains the field
+ if self.dial_code is None and "dial_code" in self.model_fields_set:
+ _dict['dial_code'] = None
+
+ # set to None if webhook_version (nullable) is None
+ # and model_fields_set contains the field
+ if self.webhook_version is None and "webhook_version" in self.model_fields_set:
+ _dict['webhook_version'] = None
+
+ # set to None if client_trusted_domains (nullable) is None
+ # and model_fields_set contains the field
+ if self.client_trusted_domains is None and "client_trusted_domains" in self.model_fields_set:
+ _dict['client_trusted_domains'] = None
+
+ # set to None if client_redeem_enabled (nullable) is None
+ # and model_fields_set contains the field
+ if self.client_redeem_enabled is None and "client_redeem_enabled" in self.model_fields_set:
+ _dict['client_redeem_enabled'] = None
+
+ # set to None if client_publish_enabled (nullable) is None
+ # and model_fields_set contains the field
+ if self.client_publish_enabled is None and "client_publish_enabled" in self.model_fields_set:
+ _dict['client_publish_enabled'] = None
+
+ # set to None if client_list_vouchers_enabled (nullable) is None
+ # and model_fields_set contains the field
+ if self.client_list_vouchers_enabled is None and "client_list_vouchers_enabled" in self.model_fields_set:
+ _dict['client_list_vouchers_enabled'] = None
+
+ # set to None if client_create_customer_enabled (nullable) is None
+ # and model_fields_set contains the field
+ if self.client_create_customer_enabled is None and "client_create_customer_enabled" in self.model_fields_set:
+ _dict['client_create_customer_enabled'] = None
+
+ # set to None if client_loyalty_events_enabled (nullable) is None
+ # and model_fields_set contains the field
+ if self.client_loyalty_events_enabled is None and "client_loyalty_events_enabled" in self.model_fields_set:
+ _dict['client_loyalty_events_enabled'] = None
+
+ # set to None if client_set_voucher_expiration_date_enabled (nullable) is None
+ # and model_fields_set contains the field
+ if self.client_set_voucher_expiration_date_enabled is None and "client_set_voucher_expiration_date_enabled" in self.model_fields_set:
+ _dict['client_set_voucher_expiration_date_enabled'] = None
+
+ # set to None if webhooks_callout_notifications (nullable) is None
+ # and model_fields_set contains the field
+ if self.webhooks_callout_notifications is None and "webhooks_callout_notifications" in self.model_fields_set:
+ _dict['webhooks_callout_notifications'] = None
+
+ # set to None if api_usage_notifications (nullable) is None
+ # and model_fields_set contains the field
+ if self.api_usage_notifications is None and "api_usage_notifications" in self.model_fields_set:
+ _dict['api_usage_notifications'] = None
+
+ # set to None if cluster_id (nullable) is None
+ # and model_fields_set contains the field
+ if self.cluster_id is None and "cluster_id" in self.model_fields_set:
+ _dict['cluster_id'] = None
+
+ # set to None if case_sensitive_codes (nullable) is None
+ # and model_fields_set contains the field
+ if self.case_sensitive_codes is None and "case_sensitive_codes" in self.model_fields_set:
+ _dict['case_sensitive_codes'] = None
+
+ # set to None if api_version (nullable) is None
+ # and model_fields_set contains the field
+ if self.api_version is None and "api_version" in self.model_fields_set:
+ _dict['api_version'] = None
+
+ # set to None if is_sandbox (nullable) is None
+ # and model_fields_set contains the field
+ if self.is_sandbox is None and "is_sandbox" in self.model_fields_set:
+ _dict['is_sandbox'] = None
+
+ # set to None if webhook_token (nullable) is None
+ # and model_fields_set contains the field
+ if self.webhook_token is None and "webhook_token" in self.model_fields_set:
+ _dict['webhook_token'] = None
+
+ # set to None if default_code_config (nullable) is None
+ # and model_fields_set contains the field
+ if self.default_code_config is None and "default_code_config" in self.model_fields_set:
+ _dict['default_code_config'] = None
+
+ # set to None if limits (nullable) is None
+ # and model_fields_set contains the field
+ if self.limits is None and "limits" in self.model_fields_set:
+ _dict['limits'] = None
+
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of ManagementProject from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "id": obj.get("id"),
+ "name": obj.get("name"),
+ "description": obj.get("description"),
+ "timezone": obj.get("timezone"),
+ "currency": obj.get("currency"),
+ "dial_code": obj.get("dial_code"),
+ "webhook_version": obj.get("webhook_version") if obj.get("webhook_version") is not None else 'v2024-01-01',
+ "client_trusted_domains": obj.get("client_trusted_domains"),
+ "client_redeem_enabled": obj.get("client_redeem_enabled"),
+ "client_publish_enabled": obj.get("client_publish_enabled"),
+ "client_list_vouchers_enabled": obj.get("client_list_vouchers_enabled"),
+ "client_create_customer_enabled": obj.get("client_create_customer_enabled"),
+ "client_loyalty_events_enabled": obj.get("client_loyalty_events_enabled"),
+ "client_set_voucher_expiration_date_enabled": obj.get("client_set_voucher_expiration_date_enabled"),
+ "webhooks_callout_notifications": ManagementProjectWebhooksCalloutNotifications.from_dict(obj["webhooks_callout_notifications"]) if obj.get("webhooks_callout_notifications") is not None else None,
+ "api_usage_notifications": ManagementProjectApiUsageNotifications.from_dict(obj["api_usage_notifications"]) if obj.get("api_usage_notifications") is not None else None,
+ "cluster_id": obj.get("cluster_id"),
+ "case_sensitive_codes": obj.get("case_sensitive_codes"),
+ "api_version": obj.get("api_version") if obj.get("api_version") is not None else 'v2018-08-01',
+ "is_sandbox": obj.get("is_sandbox"),
+ "webhook_token": obj.get("webhook_token"),
+ "default_code_config": ManagementProjectDefaultCodeConfig.from_dict(obj["default_code_config"]) if obj.get("default_code_config") is not None else None,
+ "limits": ManagementProjectLimits.from_dict(obj["limits"]) if obj.get("limits") is not None else None
+ })
+ return _obj
+
+
diff --git a/voucherify/models/management_project_api_usage_notifications.py b/voucherify/models/management_project_api_usage_notifications.py
new file mode 100644
index 00000000..9708928f
--- /dev/null
+++ b/voucherify/models/management_project_api_usage_notifications.py
@@ -0,0 +1,117 @@
+# coding: utf-8
+
+"""
+ Voucherify API
+
+ Voucherify promotion engine REST API. Please see https://docs.voucherify.io/docs for more details.
+
+ The version of the OpenAPI document: v2018-08-01
+ Contact: support@voucherify.io
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict
+from typing import Any, ClassVar, Dict, List, Optional
+from voucherify.models.usage_notifications import UsageNotifications
+from typing import Optional, Set
+from typing_extensions import Self
+
+class ManagementProjectApiUsageNotifications(BaseModel):
+ """
+ Determines the notification settings.
+ """ # noqa: E501
+ redemptions: Optional[UsageNotifications] = None
+ messages: Optional[UsageNotifications] = None
+ api_calls: Optional[UsageNotifications] = None
+ bulk_api_calls: Optional[UsageNotifications] = None
+ webhook_calls: Optional[UsageNotifications] = None
+ cycle_calls: Optional[UsageNotifications] = None
+ __properties: ClassVar[List[str]] = ["redemptions", "messages", "api_calls", "bulk_api_calls", "webhook_calls", "cycle_calls"]
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of ManagementProjectApiUsageNotifications from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([
+ ])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ # override the default output from pydantic by calling `to_dict()` of redemptions
+ if self.redemptions:
+ _dict['redemptions'] = self.redemptions.to_dict()
+ # override the default output from pydantic by calling `to_dict()` of messages
+ if self.messages:
+ _dict['messages'] = self.messages.to_dict()
+ # override the default output from pydantic by calling `to_dict()` of api_calls
+ if self.api_calls:
+ _dict['api_calls'] = self.api_calls.to_dict()
+ # override the default output from pydantic by calling `to_dict()` of bulk_api_calls
+ if self.bulk_api_calls:
+ _dict['bulk_api_calls'] = self.bulk_api_calls.to_dict()
+ # override the default output from pydantic by calling `to_dict()` of webhook_calls
+ if self.webhook_calls:
+ _dict['webhook_calls'] = self.webhook_calls.to_dict()
+ # override the default output from pydantic by calling `to_dict()` of cycle_calls
+ if self.cycle_calls:
+ _dict['cycle_calls'] = self.cycle_calls.to_dict()
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of ManagementProjectApiUsageNotifications from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "redemptions": UsageNotifications.from_dict(obj["redemptions"]) if obj.get("redemptions") is not None else None,
+ "messages": UsageNotifications.from_dict(obj["messages"]) if obj.get("messages") is not None else None,
+ "api_calls": UsageNotifications.from_dict(obj["api_calls"]) if obj.get("api_calls") is not None else None,
+ "bulk_api_calls": UsageNotifications.from_dict(obj["bulk_api_calls"]) if obj.get("bulk_api_calls") is not None else None,
+ "webhook_calls": UsageNotifications.from_dict(obj["webhook_calls"]) if obj.get("webhook_calls") is not None else None,
+ "cycle_calls": UsageNotifications.from_dict(obj["cycle_calls"]) if obj.get("cycle_calls") is not None else None
+ })
+ return _obj
+
+
diff --git a/voucherify/models/management_project_default_code_config.py b/voucherify/models/management_project_default_code_config.py
new file mode 100644
index 00000000..1c3d2d8e
--- /dev/null
+++ b/voucherify/models/management_project_default_code_config.py
@@ -0,0 +1,93 @@
+# coding: utf-8
+
+"""
+ Voucherify API
+
+ Voucherify promotion engine REST API. Please see https://docs.voucherify.io/docs for more details.
+
+ The version of the OpenAPI document: v2018-08-01
+ Contact: support@voucherify.io
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict, Field, StrictStr
+from typing import Any, ClassVar, Dict, List, Optional
+from typing import Optional, Set
+from typing_extensions import Self
+
+class ManagementProjectDefaultCodeConfig(BaseModel):
+ """
+ Determines the character set that is used as default for vouchers. It is affected by the `\"case_sensitive_codes\"` setting.
+ """ # noqa: E501
+ charset: Optional[StrictStr] = Field(default=None, description="Lists all characters that are used as default for vouchers")
+ __properties: ClassVar[List[str]] = ["charset"]
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of ManagementProjectDefaultCodeConfig from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([
+ ])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ # set to None if charset (nullable) is None
+ # and model_fields_set contains the field
+ if self.charset is None and "charset" in self.model_fields_set:
+ _dict['charset'] = None
+
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of ManagementProjectDefaultCodeConfig from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "charset": obj.get("charset")
+ })
+ return _obj
+
+
diff --git a/voucherify/models/management_project_limits.py b/voucherify/models/management_project_limits.py
new file mode 100644
index 00000000..05ffadec
--- /dev/null
+++ b/voucherify/models/management_project_limits.py
@@ -0,0 +1,116 @@
+# coding: utf-8
+
+"""
+ Voucherify API
+
+ Voucherify promotion engine REST API. Please see https://docs.voucherify.io/docs for more details.
+
+ The version of the OpenAPI document: v2018-08-01
+ Contact: support@voucherify.io
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict
+from typing import Any, ClassVar, Dict, List, Optional
+from voucherify.models.management_project_limits_api_calls_item import ManagementProjectLimitsApiCallsItem
+from voucherify.models.management_project_limits_bulk_api_calls_item import ManagementProjectLimitsBulkApiCallsItem
+from typing import Optional, Set
+from typing_extensions import Self
+
+class ManagementProjectLimits(BaseModel):
+ """
+ Determines additional limits set on a given project, e.g. the Sandbox project. If no limits are returned, the limits set for the whole organization apply.
+ """ # noqa: E501
+ api_calls: Optional[List[ManagementProjectLimitsApiCallsItem]] = None
+ bulk_api_calls: Optional[List[ManagementProjectLimitsBulkApiCallsItem]] = None
+ __properties: ClassVar[List[str]] = ["api_calls", "bulk_api_calls"]
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of ManagementProjectLimits from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([
+ ])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ # override the default output from pydantic by calling `to_dict()` of each item in api_calls (list)
+ _items = []
+ if self.api_calls:
+ for _item_api_calls in self.api_calls:
+ if _item_api_calls:
+ _items.append(_item_api_calls.to_dict())
+ _dict['api_calls'] = _items
+ # override the default output from pydantic by calling `to_dict()` of each item in bulk_api_calls (list)
+ _items = []
+ if self.bulk_api_calls:
+ for _item_bulk_api_calls in self.bulk_api_calls:
+ if _item_bulk_api_calls:
+ _items.append(_item_bulk_api_calls.to_dict())
+ _dict['bulk_api_calls'] = _items
+ # set to None if api_calls (nullable) is None
+ # and model_fields_set contains the field
+ if self.api_calls is None and "api_calls" in self.model_fields_set:
+ _dict['api_calls'] = None
+
+ # set to None if bulk_api_calls (nullable) is None
+ # and model_fields_set contains the field
+ if self.bulk_api_calls is None and "bulk_api_calls" in self.model_fields_set:
+ _dict['bulk_api_calls'] = None
+
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of ManagementProjectLimits from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "api_calls": [ManagementProjectLimitsApiCallsItem.from_dict(_item) for _item in obj["api_calls"]] if obj.get("api_calls") is not None else None,
+ "bulk_api_calls": [ManagementProjectLimitsBulkApiCallsItem.from_dict(_item) for _item in obj["bulk_api_calls"]] if obj.get("bulk_api_calls") is not None else None
+ })
+ return _obj
+
+
diff --git a/voucherify/models/management_project_limits_api_calls_item.py b/voucherify/models/management_project_limits_api_calls_item.py
new file mode 100644
index 00000000..f12a9e0a
--- /dev/null
+++ b/voucherify/models/management_project_limits_api_calls_item.py
@@ -0,0 +1,90 @@
+# coding: utf-8
+
+"""
+ Voucherify API
+
+ Voucherify promotion engine REST API. Please see https://docs.voucherify.io/docs for more details.
+
+ The version of the OpenAPI document: v2018-08-01
+ Contact: support@voucherify.io
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr
+from typing import Any, ClassVar, Dict, List, Optional
+from typing import Optional, Set
+from typing_extensions import Self
+
+class ManagementProjectLimitsApiCallsItem(BaseModel):
+ """
+ Determines the limit of API calls per given unit time.
+ """ # noqa: E501
+ value: Optional[StrictInt] = Field(default=None, description="Determines the maximum number of API calls per time set in `\"duration\"`.")
+ duration: Optional[StrictStr] = Field(default=None, description="Determines the amount of time during which the calls up to the number specified in the `value` can be made. The duration is presented in the ISO 8601 format, e.g. `PT1H` means one hour.")
+ __properties: ClassVar[List[str]] = ["value", "duration"]
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of ManagementProjectLimitsApiCallsItem from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([
+ ])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of ManagementProjectLimitsApiCallsItem from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "value": obj.get("value"),
+ "duration": obj.get("duration")
+ })
+ return _obj
+
+
diff --git a/voucherify/models/management_project_limits_bulk_api_calls_item.py b/voucherify/models/management_project_limits_bulk_api_calls_item.py
new file mode 100644
index 00000000..c7a3258e
--- /dev/null
+++ b/voucherify/models/management_project_limits_bulk_api_calls_item.py
@@ -0,0 +1,90 @@
+# coding: utf-8
+
+"""
+ Voucherify API
+
+ Voucherify promotion engine REST API. Please see https://docs.voucherify.io/docs for more details.
+
+ The version of the OpenAPI document: v2018-08-01
+ Contact: support@voucherify.io
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr
+from typing import Any, ClassVar, Dict, List, Optional
+from typing import Optional, Set
+from typing_extensions import Self
+
+class ManagementProjectLimitsBulkApiCallsItem(BaseModel):
+ """
+
+ """ # noqa: E501
+ value: Optional[StrictInt] = Field(default=None, description="Determines the maximum number of API calls per time set in `\"duration\"`.")
+ duration: Optional[StrictStr] = Field(default=None, description="Determines the amount of time during which the calls up to the number specified in the `value` can be made. The duration is presented in the ISO 8601 format, e.g. `PT1H` means one hour.")
+ __properties: ClassVar[List[str]] = ["value", "duration"]
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of ManagementProjectLimitsBulkApiCallsItem from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([
+ ])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of ManagementProjectLimitsBulkApiCallsItem from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "value": obj.get("value"),
+ "duration": obj.get("duration")
+ })
+ return _obj
+
+
diff --git a/voucherify/models/management_project_webhooks_callout_notifications.py b/voucherify/models/management_project_webhooks_callout_notifications.py
new file mode 100644
index 00000000..f15fbdf8
--- /dev/null
+++ b/voucherify/models/management_project_webhooks_callout_notifications.py
@@ -0,0 +1,108 @@
+# coding: utf-8
+
+"""
+ Voucherify API
+
+ Voucherify promotion engine REST API. Please see https://docs.voucherify.io/docs for more details.
+
+ The version of the OpenAPI document: v2018-08-01
+ Contact: support@voucherify.io
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict
+from typing import Any, ClassVar, Dict, List, Optional
+from voucherify.models.management_project_webhooks_callout_notifications_distributions import ManagementProjectWebhooksCalloutNotificationsDistributions
+from voucherify.models.management_project_webhooks_callout_notifications_webhooks import ManagementProjectWebhooksCalloutNotificationsWebhooks
+from typing import Optional, Set
+from typing_extensions import Self
+
+class ManagementProjectWebhooksCalloutNotifications(BaseModel):
+ """
+ Determines the notification settings for webhook callouts configured in Distributions and Project settings.
+ """ # noqa: E501
+ distributions: Optional[ManagementProjectWebhooksCalloutNotificationsDistributions] = None
+ webhooks: Optional[ManagementProjectWebhooksCalloutNotificationsWebhooks] = None
+ __properties: ClassVar[List[str]] = ["distributions", "webhooks"]
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of ManagementProjectWebhooksCalloutNotifications from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([
+ ])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ # override the default output from pydantic by calling `to_dict()` of distributions
+ if self.distributions:
+ _dict['distributions'] = self.distributions.to_dict()
+ # override the default output from pydantic by calling `to_dict()` of webhooks
+ if self.webhooks:
+ _dict['webhooks'] = self.webhooks.to_dict()
+ # set to None if distributions (nullable) is None
+ # and model_fields_set contains the field
+ if self.distributions is None and "distributions" in self.model_fields_set:
+ _dict['distributions'] = None
+
+ # set to None if webhooks (nullable) is None
+ # and model_fields_set contains the field
+ if self.webhooks is None and "webhooks" in self.model_fields_set:
+ _dict['webhooks'] = None
+
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of ManagementProjectWebhooksCalloutNotifications from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "distributions": ManagementProjectWebhooksCalloutNotificationsDistributions.from_dict(obj["distributions"]) if obj.get("distributions") is not None else None,
+ "webhooks": ManagementProjectWebhooksCalloutNotificationsWebhooks.from_dict(obj["webhooks"]) if obj.get("webhooks") is not None else None
+ })
+ return _obj
+
+
diff --git a/voucherify/models/management_project_webhooks_callout_notifications_distributions.py b/voucherify/models/management_project_webhooks_callout_notifications_distributions.py
new file mode 100644
index 00000000..12ca0f30
--- /dev/null
+++ b/voucherify/models/management_project_webhooks_callout_notifications_distributions.py
@@ -0,0 +1,107 @@
+# coding: utf-8
+
+"""
+ Voucherify API
+
+ Voucherify promotion engine REST API. Please see https://docs.voucherify.io/docs for more details.
+
+ The version of the OpenAPI document: v2018-08-01
+ Contact: support@voucherify.io
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr
+from typing import Any, ClassVar, Dict, List, Optional
+from typing import Optional, Set
+from typing_extensions import Self
+
+class ManagementProjectWebhooksCalloutNotificationsDistributions(BaseModel):
+ """
+ Determines the notification settings for webhooks sent through Distributions.
+ """ # noqa: E501
+ email: Optional[StrictBool] = Field(default=None, description="Enables the notification through an email.")
+ in_app: Optional[StrictBool] = Field(default=None, description="Enables the notification through an email.")
+ emails: Optional[List[StrictStr]] = Field(default=None, description="An array of email addresses which will receive the notification.")
+ __properties: ClassVar[List[str]] = ["email", "in_app", "emails"]
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of ManagementProjectWebhooksCalloutNotificationsDistributions from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([
+ ])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ # set to None if email (nullable) is None
+ # and model_fields_set contains the field
+ if self.email is None and "email" in self.model_fields_set:
+ _dict['email'] = None
+
+ # set to None if in_app (nullable) is None
+ # and model_fields_set contains the field
+ if self.in_app is None and "in_app" in self.model_fields_set:
+ _dict['in_app'] = None
+
+ # set to None if emails (nullable) is None
+ # and model_fields_set contains the field
+ if self.emails is None and "emails" in self.model_fields_set:
+ _dict['emails'] = None
+
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of ManagementProjectWebhooksCalloutNotificationsDistributions from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "email": obj.get("email"),
+ "in_app": obj.get("in_app"),
+ "emails": obj.get("emails")
+ })
+ return _obj
+
+
diff --git a/voucherify/models/management_project_webhooks_callout_notifications_webhooks.py b/voucherify/models/management_project_webhooks_callout_notifications_webhooks.py
new file mode 100644
index 00000000..477ace11
--- /dev/null
+++ b/voucherify/models/management_project_webhooks_callout_notifications_webhooks.py
@@ -0,0 +1,107 @@
+# coding: utf-8
+
+"""
+ Voucherify API
+
+ Voucherify promotion engine REST API. Please see https://docs.voucherify.io/docs for more details.
+
+ The version of the OpenAPI document: v2018-08-01
+ Contact: support@voucherify.io
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr
+from typing import Any, ClassVar, Dict, List, Optional
+from typing import Optional, Set
+from typing_extensions import Self
+
+class ManagementProjectWebhooksCalloutNotificationsWebhooks(BaseModel):
+ """
+ Determines the notification settings for webhooks sent as set out in the Project settings.
+ """ # noqa: E501
+ email: Optional[StrictBool] = Field(default=None, description="Enables the notification through an email.")
+ in_app: Optional[StrictBool] = Field(default=None, description="Enables the notification through an email.")
+ emails: Optional[List[StrictStr]] = Field(default=None, description="An array of email addresses which will receive the notification.")
+ __properties: ClassVar[List[str]] = ["email", "in_app", "emails"]
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of ManagementProjectWebhooksCalloutNotificationsWebhooks from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([
+ ])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ # set to None if email (nullable) is None
+ # and model_fields_set contains the field
+ if self.email is None and "email" in self.model_fields_set:
+ _dict['email'] = None
+
+ # set to None if in_app (nullable) is None
+ # and model_fields_set contains the field
+ if self.in_app is None and "in_app" in self.model_fields_set:
+ _dict['in_app'] = None
+
+ # set to None if emails (nullable) is None
+ # and model_fields_set contains the field
+ if self.emails is None and "emails" in self.model_fields_set:
+ _dict['emails'] = None
+
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of ManagementProjectWebhooksCalloutNotificationsWebhooks from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "email": obj.get("email"),
+ "in_app": obj.get("in_app"),
+ "emails": obj.get("emails")
+ })
+ return _obj
+
+
diff --git a/voucherify/models/management_projects_branding.py b/voucherify/models/management_projects_branding.py
new file mode 100644
index 00000000..ee850a41
--- /dev/null
+++ b/voucherify/models/management_projects_branding.py
@@ -0,0 +1,137 @@
+# coding: utf-8
+
+"""
+ Voucherify API
+
+ Voucherify promotion engine REST API. Please see https://docs.voucherify.io/docs for more details.
+
+ The version of the OpenAPI document: v2018-08-01
+ Contact: support@voucherify.io
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict, Field, StrictStr
+from typing import Any, ClassVar, Dict, List, Optional
+from voucherify.models.management_projects_branding_address import ManagementProjectsBrandingAddress
+from voucherify.models.management_projects_branding_brand import ManagementProjectsBrandingBrand
+from voucherify.models.management_projects_branding_cockpits import ManagementProjectsBrandingCockpits
+from voucherify.models.management_projects_branding_contact import ManagementProjectsBrandingContact
+from typing import Optional, Set
+from typing_extensions import Self
+
+class ManagementProjectsBranding(BaseModel):
+ """
+ Response brand schema.
+ """ # noqa: E501
+ id: Optional[StrictStr] = Field(default=None, description="Unique identifier of the brand configuration.")
+ brand: Optional[ManagementProjectsBrandingBrand] = None
+ address: Optional[ManagementProjectsBrandingAddress] = None
+ contact: Optional[ManagementProjectsBrandingContact] = None
+ cockpits: Optional[ManagementProjectsBrandingCockpits] = None
+ __properties: ClassVar[List[str]] = ["id", "brand", "address", "contact", "cockpits"]
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of ManagementProjectsBranding from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([
+ ])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ # override the default output from pydantic by calling `to_dict()` of brand
+ if self.brand:
+ _dict['brand'] = self.brand.to_dict()
+ # override the default output from pydantic by calling `to_dict()` of address
+ if self.address:
+ _dict['address'] = self.address.to_dict()
+ # override the default output from pydantic by calling `to_dict()` of contact
+ if self.contact:
+ _dict['contact'] = self.contact.to_dict()
+ # override the default output from pydantic by calling `to_dict()` of cockpits
+ if self.cockpits:
+ _dict['cockpits'] = self.cockpits.to_dict()
+ # set to None if id (nullable) is None
+ # and model_fields_set contains the field
+ if self.id is None and "id" in self.model_fields_set:
+ _dict['id'] = None
+
+ # set to None if brand (nullable) is None
+ # and model_fields_set contains the field
+ if self.brand is None and "brand" in self.model_fields_set:
+ _dict['brand'] = None
+
+ # set to None if address (nullable) is None
+ # and model_fields_set contains the field
+ if self.address is None and "address" in self.model_fields_set:
+ _dict['address'] = None
+
+ # set to None if contact (nullable) is None
+ # and model_fields_set contains the field
+ if self.contact is None and "contact" in self.model_fields_set:
+ _dict['contact'] = None
+
+ # set to None if cockpits (nullable) is None
+ # and model_fields_set contains the field
+ if self.cockpits is None and "cockpits" in self.model_fields_set:
+ _dict['cockpits'] = None
+
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of ManagementProjectsBranding from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "id": obj.get("id"),
+ "brand": ManagementProjectsBrandingBrand.from_dict(obj["brand"]) if obj.get("brand") is not None else None,
+ "address": ManagementProjectsBrandingAddress.from_dict(obj["address"]) if obj.get("address") is not None else None,
+ "contact": ManagementProjectsBrandingContact.from_dict(obj["contact"]) if obj.get("contact") is not None else None,
+ "cockpits": ManagementProjectsBrandingCockpits.from_dict(obj["cockpits"]) if obj.get("cockpits") is not None else None
+ })
+ return _obj
+
+
diff --git a/voucherify/models/management_projects_branding_address.py b/voucherify/models/management_projects_branding_address.py
new file mode 100644
index 00000000..4c27226b
--- /dev/null
+++ b/voucherify/models/management_projects_branding_address.py
@@ -0,0 +1,121 @@
+# coding: utf-8
+
+"""
+ Voucherify API
+
+ Voucherify promotion engine REST API. Please see https://docs.voucherify.io/docs for more details.
+
+ The version of the OpenAPI document: v2018-08-01
+ Contact: support@voucherify.io
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict, Field, StrictStr
+from typing import Any, ClassVar, Dict, List, Optional
+from typing import Optional, Set
+from typing_extensions import Self
+
+class ManagementProjectsBrandingAddress(BaseModel):
+ """
+ Defines the address details.
+ """ # noqa: E501
+ street: Optional[StrictStr] = Field(default=None, description="Defines the brand's street.")
+ city: Optional[StrictStr] = Field(default=None, description="Defines the brand's city.")
+ postal: Optional[StrictStr] = Field(default=None, description="Defines the brand's postal code.")
+ state: Optional[StrictStr] = Field(default=None, description="Defines the brand's state or similar administrative area.")
+ country: Optional[StrictStr] = Field(default=None, description="Defines the brand's country.")
+ __properties: ClassVar[List[str]] = ["street", "city", "postal", "state", "country"]
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of ManagementProjectsBrandingAddress from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([
+ ])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ # set to None if street (nullable) is None
+ # and model_fields_set contains the field
+ if self.street is None and "street" in self.model_fields_set:
+ _dict['street'] = None
+
+ # set to None if city (nullable) is None
+ # and model_fields_set contains the field
+ if self.city is None and "city" in self.model_fields_set:
+ _dict['city'] = None
+
+ # set to None if postal (nullable) is None
+ # and model_fields_set contains the field
+ if self.postal is None and "postal" in self.model_fields_set:
+ _dict['postal'] = None
+
+ # set to None if state (nullable) is None
+ # and model_fields_set contains the field
+ if self.state is None and "state" in self.model_fields_set:
+ _dict['state'] = None
+
+ # set to None if country (nullable) is None
+ # and model_fields_set contains the field
+ if self.country is None and "country" in self.model_fields_set:
+ _dict['country'] = None
+
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of ManagementProjectsBrandingAddress from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "street": obj.get("street"),
+ "city": obj.get("city"),
+ "postal": obj.get("postal"),
+ "state": obj.get("state"),
+ "country": obj.get("country")
+ })
+ return _obj
+
+
diff --git a/voucherify/models/management_projects_branding_brand.py b/voucherify/models/management_projects_branding_brand.py
new file mode 100644
index 00000000..5bfb03c5
--- /dev/null
+++ b/voucherify/models/management_projects_branding_brand.py
@@ -0,0 +1,121 @@
+# coding: utf-8
+
+"""
+ Voucherify API
+
+ Voucherify promotion engine REST API. Please see https://docs.voucherify.io/docs for more details.
+
+ The version of the OpenAPI document: v2018-08-01
+ Contact: support@voucherify.io
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict, Field, StrictStr
+from typing import Any, ClassVar, Dict, List, Optional
+from typing import Optional, Set
+from typing_extensions import Self
+
+class ManagementProjectsBrandingBrand(BaseModel):
+ """
+ Defines basic brand details.
+ """ # noqa: E501
+ name: Optional[StrictStr] = Field(default=None, description="Defines brand name.")
+ privacy_policy_url: Optional[StrictStr] = Field(default=None, description="Defines the URL to the brand's privacy policy. It must be a valid URL format.")
+ terms_of_use_url: Optional[StrictStr] = Field(default=None, description="Defines the URL to the brand's terms of use. It must be a valid URL format.")
+ permission_reminder: Optional[StrictStr] = Field(default=None, description="Defines the message that is displayed to customers who opted in an email newsletter.")
+ website_url: Optional[StrictStr] = Field(default=None, description="Defines the URL to the brand's website. It must be a valid URL format.")
+ __properties: ClassVar[List[str]] = ["name", "privacy_policy_url", "terms_of_use_url", "permission_reminder", "website_url"]
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of ManagementProjectsBrandingBrand from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([
+ ])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ # set to None if name (nullable) is None
+ # and model_fields_set contains the field
+ if self.name is None and "name" in self.model_fields_set:
+ _dict['name'] = None
+
+ # set to None if privacy_policy_url (nullable) is None
+ # and model_fields_set contains the field
+ if self.privacy_policy_url is None and "privacy_policy_url" in self.model_fields_set:
+ _dict['privacy_policy_url'] = None
+
+ # set to None if terms_of_use_url (nullable) is None
+ # and model_fields_set contains the field
+ if self.terms_of_use_url is None and "terms_of_use_url" in self.model_fields_set:
+ _dict['terms_of_use_url'] = None
+
+ # set to None if permission_reminder (nullable) is None
+ # and model_fields_set contains the field
+ if self.permission_reminder is None and "permission_reminder" in self.model_fields_set:
+ _dict['permission_reminder'] = None
+
+ # set to None if website_url (nullable) is None
+ # and model_fields_set contains the field
+ if self.website_url is None and "website_url" in self.model_fields_set:
+ _dict['website_url'] = None
+
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of ManagementProjectsBrandingBrand from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "name": obj.get("name"),
+ "privacy_policy_url": obj.get("privacy_policy_url"),
+ "terms_of_use_url": obj.get("terms_of_use_url"),
+ "permission_reminder": obj.get("permission_reminder"),
+ "website_url": obj.get("website_url")
+ })
+ return _obj
+
+
diff --git a/voucherify/models/management_projects_branding_cockpits.py b/voucherify/models/management_projects_branding_cockpits.py
new file mode 100644
index 00000000..5a943d9a
--- /dev/null
+++ b/voucherify/models/management_projects_branding_cockpits.py
@@ -0,0 +1,152 @@
+# coding: utf-8
+
+"""
+ Voucherify API
+
+ Voucherify promotion engine REST API. Please see https://docs.voucherify.io/docs for more details.
+
+ The version of the OpenAPI document: v2018-08-01
+ Contact: support@voucherify.io
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr, field_validator
+from typing import Any, ClassVar, Dict, List, Optional
+from typing import Optional, Set
+from typing_extensions import Self
+
+class ManagementProjectsBrandingCockpits(BaseModel):
+ """
+ Defines customer cockpit details.
+ """ # noqa: E501
+ campaigns_overview_enabled: Optional[StrictBool] = Field(default=None, description="Enables the campaign overview for customers.")
+ loyalty_enabled: Optional[StrictBool] = Field(default=None, description="Enables the loyalty campaign overview for customers.")
+ gift_cards_enabled: Optional[StrictBool] = Field(default=None, description="Enables the gift card overview for customers.")
+ coupons_enabled: Optional[StrictBool] = Field(default=None, description="Enables the discount coupon overview for customers.")
+ referrals_enabled: Optional[StrictBool] = Field(default=None, description="Enables the referral campaign overview for customers.")
+ theme: Optional[StrictStr] = Field(default=None, description="Determines the color scheme of the customer cockpit.")
+ use_custom_double_opt_in_redirect_url: Optional[StrictBool] = Field(default=None, description="Enables the double opt-in option. It must be a valid URL format.")
+ custom_double_opt_in_redirect_url: Optional[StrictStr] = Field(default=None, description="Defines the URL for the double opt-in consent. It must be a valid URL format.")
+ __properties: ClassVar[List[str]] = ["campaigns_overview_enabled", "loyalty_enabled", "gift_cards_enabled", "coupons_enabled", "referrals_enabled", "theme", "use_custom_double_opt_in_redirect_url", "custom_double_opt_in_redirect_url"]
+
+ @field_validator('theme')
+ def theme_validate_enum(cls, value):
+ """Validates the enum"""
+ if value is None:
+ return value
+
+ if value not in set(['blue', 'dark-green', 'default', 'green', 'grey', 'orange', 'purple', 'red']):
+ raise ValueError("must be one of enum values ('blue', 'dark-green', 'default', 'green', 'grey', 'orange', 'purple', 'red')")
+ return value
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of ManagementProjectsBrandingCockpits from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([
+ ])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ # set to None if campaigns_overview_enabled (nullable) is None
+ # and model_fields_set contains the field
+ if self.campaigns_overview_enabled is None and "campaigns_overview_enabled" in self.model_fields_set:
+ _dict['campaigns_overview_enabled'] = None
+
+ # set to None if loyalty_enabled (nullable) is None
+ # and model_fields_set contains the field
+ if self.loyalty_enabled is None and "loyalty_enabled" in self.model_fields_set:
+ _dict['loyalty_enabled'] = None
+
+ # set to None if gift_cards_enabled (nullable) is None
+ # and model_fields_set contains the field
+ if self.gift_cards_enabled is None and "gift_cards_enabled" in self.model_fields_set:
+ _dict['gift_cards_enabled'] = None
+
+ # set to None if coupons_enabled (nullable) is None
+ # and model_fields_set contains the field
+ if self.coupons_enabled is None and "coupons_enabled" in self.model_fields_set:
+ _dict['coupons_enabled'] = None
+
+ # set to None if referrals_enabled (nullable) is None
+ # and model_fields_set contains the field
+ if self.referrals_enabled is None and "referrals_enabled" in self.model_fields_set:
+ _dict['referrals_enabled'] = None
+
+ # set to None if theme (nullable) is None
+ # and model_fields_set contains the field
+ if self.theme is None and "theme" in self.model_fields_set:
+ _dict['theme'] = None
+
+ # set to None if use_custom_double_opt_in_redirect_url (nullable) is None
+ # and model_fields_set contains the field
+ if self.use_custom_double_opt_in_redirect_url is None and "use_custom_double_opt_in_redirect_url" in self.model_fields_set:
+ _dict['use_custom_double_opt_in_redirect_url'] = None
+
+ # set to None if custom_double_opt_in_redirect_url (nullable) is None
+ # and model_fields_set contains the field
+ if self.custom_double_opt_in_redirect_url is None and "custom_double_opt_in_redirect_url" in self.model_fields_set:
+ _dict['custom_double_opt_in_redirect_url'] = None
+
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of ManagementProjectsBrandingCockpits from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "campaigns_overview_enabled": obj.get("campaigns_overview_enabled"),
+ "loyalty_enabled": obj.get("loyalty_enabled"),
+ "gift_cards_enabled": obj.get("gift_cards_enabled"),
+ "coupons_enabled": obj.get("coupons_enabled"),
+ "referrals_enabled": obj.get("referrals_enabled"),
+ "theme": obj.get("theme"),
+ "use_custom_double_opt_in_redirect_url": obj.get("use_custom_double_opt_in_redirect_url"),
+ "custom_double_opt_in_redirect_url": obj.get("custom_double_opt_in_redirect_url")
+ })
+ return _obj
+
+
diff --git a/voucherify/models/management_projects_branding_contact.py b/voucherify/models/management_projects_branding_contact.py
new file mode 100644
index 00000000..278f9c39
--- /dev/null
+++ b/voucherify/models/management_projects_branding_contact.py
@@ -0,0 +1,100 @@
+# coding: utf-8
+
+"""
+ Voucherify API
+
+ Voucherify promotion engine REST API. Please see https://docs.voucherify.io/docs for more details.
+
+ The version of the OpenAPI document: v2018-08-01
+ Contact: support@voucherify.io
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict, Field, StrictStr
+from typing import Any, ClassVar, Dict, List, Optional
+from typing import Optional, Set
+from typing_extensions import Self
+
+class ManagementProjectsBrandingContact(BaseModel):
+ """
+ Defines contact details.
+ """ # noqa: E501
+ email: Optional[StrictStr] = Field(default=None, description="Defines the brand's email address. It must be a valid email format.")
+ phone: Optional[StrictStr] = Field(default=None, description="Defines the brand's phone number.")
+ __properties: ClassVar[List[str]] = ["email", "phone"]
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of ManagementProjectsBrandingContact from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([
+ ])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ # set to None if email (nullable) is None
+ # and model_fields_set contains the field
+ if self.email is None and "email" in self.model_fields_set:
+ _dict['email'] = None
+
+ # set to None if phone (nullable) is None
+ # and model_fields_set contains the field
+ if self.phone is None and "phone" in self.model_fields_set:
+ _dict['phone'] = None
+
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of ManagementProjectsBrandingContact from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "email": obj.get("email"),
+ "phone": obj.get("phone")
+ })
+ return _obj
+
+
diff --git a/voucherify/models/management_projects_branding_create_request_body.py b/voucherify/models/management_projects_branding_create_request_body.py
new file mode 100644
index 00000000..74b40ee1
--- /dev/null
+++ b/voucherify/models/management_projects_branding_create_request_body.py
@@ -0,0 +1,130 @@
+# coding: utf-8
+
+"""
+ Voucherify API
+
+ Voucherify promotion engine REST API. Please see https://docs.voucherify.io/docs for more details.
+
+ The version of the OpenAPI document: v2018-08-01
+ Contact: support@voucherify.io
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict
+from typing import Any, ClassVar, Dict, List, Optional
+from voucherify.models.management_projects_branding_create_request_body_address import ManagementProjectsBrandingCreateRequestBodyAddress
+from voucherify.models.management_projects_branding_create_request_body_brand import ManagementProjectsBrandingCreateRequestBodyBrand
+from voucherify.models.management_projects_branding_create_request_body_cockpits import ManagementProjectsBrandingCreateRequestBodyCockpits
+from voucherify.models.management_projects_branding_create_request_body_contact import ManagementProjectsBrandingCreateRequestBodyContact
+from typing import Optional, Set
+from typing_extensions import Self
+
+class ManagementProjectsBrandingCreateRequestBody(BaseModel):
+ """
+ Request body schema for **POST** `/management/v1/projects/{projectId}/branding`.
+ """ # noqa: E501
+ brand: Optional[ManagementProjectsBrandingCreateRequestBodyBrand] = None
+ address: Optional[ManagementProjectsBrandingCreateRequestBodyAddress] = None
+ contact: Optional[ManagementProjectsBrandingCreateRequestBodyContact] = None
+ cockpits: Optional[ManagementProjectsBrandingCreateRequestBodyCockpits] = None
+ __properties: ClassVar[List[str]] = ["brand", "address", "contact", "cockpits"]
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of ManagementProjectsBrandingCreateRequestBody from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([
+ ])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ # override the default output from pydantic by calling `to_dict()` of brand
+ if self.brand:
+ _dict['brand'] = self.brand.to_dict()
+ # override the default output from pydantic by calling `to_dict()` of address
+ if self.address:
+ _dict['address'] = self.address.to_dict()
+ # override the default output from pydantic by calling `to_dict()` of contact
+ if self.contact:
+ _dict['contact'] = self.contact.to_dict()
+ # override the default output from pydantic by calling `to_dict()` of cockpits
+ if self.cockpits:
+ _dict['cockpits'] = self.cockpits.to_dict()
+ # set to None if brand (nullable) is None
+ # and model_fields_set contains the field
+ if self.brand is None and "brand" in self.model_fields_set:
+ _dict['brand'] = None
+
+ # set to None if address (nullable) is None
+ # and model_fields_set contains the field
+ if self.address is None and "address" in self.model_fields_set:
+ _dict['address'] = None
+
+ # set to None if contact (nullable) is None
+ # and model_fields_set contains the field
+ if self.contact is None and "contact" in self.model_fields_set:
+ _dict['contact'] = None
+
+ # set to None if cockpits (nullable) is None
+ # and model_fields_set contains the field
+ if self.cockpits is None and "cockpits" in self.model_fields_set:
+ _dict['cockpits'] = None
+
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of ManagementProjectsBrandingCreateRequestBody from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "brand": ManagementProjectsBrandingCreateRequestBodyBrand.from_dict(obj["brand"]) if obj.get("brand") is not None else None,
+ "address": ManagementProjectsBrandingCreateRequestBodyAddress.from_dict(obj["address"]) if obj.get("address") is not None else None,
+ "contact": ManagementProjectsBrandingCreateRequestBodyContact.from_dict(obj["contact"]) if obj.get("contact") is not None else None,
+ "cockpits": ManagementProjectsBrandingCreateRequestBodyCockpits.from_dict(obj["cockpits"]) if obj.get("cockpits") is not None else None
+ })
+ return _obj
+
+
diff --git a/voucherify/models/management_projects_branding_create_request_body_address.py b/voucherify/models/management_projects_branding_create_request_body_address.py
new file mode 100644
index 00000000..cfefe55d
--- /dev/null
+++ b/voucherify/models/management_projects_branding_create_request_body_address.py
@@ -0,0 +1,121 @@
+# coding: utf-8
+
+"""
+ Voucherify API
+
+ Voucherify promotion engine REST API. Please see https://docs.voucherify.io/docs for more details.
+
+ The version of the OpenAPI document: v2018-08-01
+ Contact: support@voucherify.io
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict, Field, StrictStr
+from typing import Any, ClassVar, Dict, List, Optional
+from typing import Optional, Set
+from typing_extensions import Self
+
+class ManagementProjectsBrandingCreateRequestBodyAddress(BaseModel):
+ """
+ Defines the address details.
+ """ # noqa: E501
+ street: Optional[StrictStr] = Field(default=None, description="Defines the brand's street.")
+ city: Optional[StrictStr] = Field(default=None, description="Defines the brand's city.")
+ postal: Optional[StrictStr] = Field(default=None, description="Defines the brand's postal code.")
+ state: Optional[StrictStr] = Field(default=None, description="Defines the brand's state or similar administrative area.")
+ country: Optional[StrictStr] = Field(default=None, description="Defines the brand's country.")
+ __properties: ClassVar[List[str]] = ["street", "city", "postal", "state", "country"]
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of ManagementProjectsBrandingCreateRequestBodyAddress from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([
+ ])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ # set to None if street (nullable) is None
+ # and model_fields_set contains the field
+ if self.street is None and "street" in self.model_fields_set:
+ _dict['street'] = None
+
+ # set to None if city (nullable) is None
+ # and model_fields_set contains the field
+ if self.city is None and "city" in self.model_fields_set:
+ _dict['city'] = None
+
+ # set to None if postal (nullable) is None
+ # and model_fields_set contains the field
+ if self.postal is None and "postal" in self.model_fields_set:
+ _dict['postal'] = None
+
+ # set to None if state (nullable) is None
+ # and model_fields_set contains the field
+ if self.state is None and "state" in self.model_fields_set:
+ _dict['state'] = None
+
+ # set to None if country (nullable) is None
+ # and model_fields_set contains the field
+ if self.country is None and "country" in self.model_fields_set:
+ _dict['country'] = None
+
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of ManagementProjectsBrandingCreateRequestBodyAddress from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "street": obj.get("street"),
+ "city": obj.get("city"),
+ "postal": obj.get("postal"),
+ "state": obj.get("state"),
+ "country": obj.get("country")
+ })
+ return _obj
+
+
diff --git a/voucherify/models/management_projects_branding_create_request_body_brand.py b/voucherify/models/management_projects_branding_create_request_body_brand.py
new file mode 100644
index 00000000..1bd6d424
--- /dev/null
+++ b/voucherify/models/management_projects_branding_create_request_body_brand.py
@@ -0,0 +1,121 @@
+# coding: utf-8
+
+"""
+ Voucherify API
+
+ Voucherify promotion engine REST API. Please see https://docs.voucherify.io/docs for more details.
+
+ The version of the OpenAPI document: v2018-08-01
+ Contact: support@voucherify.io
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict, Field, StrictStr
+from typing import Any, ClassVar, Dict, List, Optional
+from typing import Optional, Set
+from typing_extensions import Self
+
+class ManagementProjectsBrandingCreateRequestBodyBrand(BaseModel):
+ """
+ Defines basic brand details.
+ """ # noqa: E501
+ name: Optional[StrictStr] = Field(default=None, description="Defines brand name.")
+ privacy_policy_url: Optional[StrictStr] = Field(default=None, description="Defines the URL to the brand's privacy policy. It must be a valid URL format.")
+ terms_of_use_url: Optional[StrictStr] = Field(default=None, description="Defines the URL to the brand's terms of use. It must be a valid URL format.")
+ permission_reminder: Optional[StrictStr] = Field(default='You are receiving this email because you opted in at our website.', description="Defines the message that is displayed to customers who opted in an email newsletter.")
+ website_url: Optional[StrictStr] = Field(default=None, description="Defines the URL to the brand's website. It must be a valid URL format.")
+ __properties: ClassVar[List[str]] = ["name", "privacy_policy_url", "terms_of_use_url", "permission_reminder", "website_url"]
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of ManagementProjectsBrandingCreateRequestBodyBrand from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([
+ ])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ # set to None if name (nullable) is None
+ # and model_fields_set contains the field
+ if self.name is None and "name" in self.model_fields_set:
+ _dict['name'] = None
+
+ # set to None if privacy_policy_url (nullable) is None
+ # and model_fields_set contains the field
+ if self.privacy_policy_url is None and "privacy_policy_url" in self.model_fields_set:
+ _dict['privacy_policy_url'] = None
+
+ # set to None if terms_of_use_url (nullable) is None
+ # and model_fields_set contains the field
+ if self.terms_of_use_url is None and "terms_of_use_url" in self.model_fields_set:
+ _dict['terms_of_use_url'] = None
+
+ # set to None if permission_reminder (nullable) is None
+ # and model_fields_set contains the field
+ if self.permission_reminder is None and "permission_reminder" in self.model_fields_set:
+ _dict['permission_reminder'] = None
+
+ # set to None if website_url (nullable) is None
+ # and model_fields_set contains the field
+ if self.website_url is None and "website_url" in self.model_fields_set:
+ _dict['website_url'] = None
+
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of ManagementProjectsBrandingCreateRequestBodyBrand from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "name": obj.get("name"),
+ "privacy_policy_url": obj.get("privacy_policy_url"),
+ "terms_of_use_url": obj.get("terms_of_use_url"),
+ "permission_reminder": obj.get("permission_reminder") if obj.get("permission_reminder") is not None else 'You are receiving this email because you opted in at our website.',
+ "website_url": obj.get("website_url")
+ })
+ return _obj
+
+
diff --git a/voucherify/models/management_projects_branding_create_request_body_cockpits.py b/voucherify/models/management_projects_branding_create_request_body_cockpits.py
new file mode 100644
index 00000000..0786d5bd
--- /dev/null
+++ b/voucherify/models/management_projects_branding_create_request_body_cockpits.py
@@ -0,0 +1,152 @@
+# coding: utf-8
+
+"""
+ Voucherify API
+
+ Voucherify promotion engine REST API. Please see https://docs.voucherify.io/docs for more details.
+
+ The version of the OpenAPI document: v2018-08-01
+ Contact: support@voucherify.io
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr, field_validator
+from typing import Any, ClassVar, Dict, List, Optional
+from typing import Optional, Set
+from typing_extensions import Self
+
+class ManagementProjectsBrandingCreateRequestBodyCockpits(BaseModel):
+ """
+ Defines customer cockpit details.
+ """ # noqa: E501
+ campaigns_overview_enabled: Optional[StrictBool] = Field(default=False, description="Enables the campaign overview for customers.")
+ loyalty_enabled: Optional[StrictBool] = Field(default=True, description="Enables the loyalty campaign overview for customers.")
+ gift_cards_enabled: Optional[StrictBool] = Field(default=True, description="Enables the gift card overview for customers.")
+ coupons_enabled: Optional[StrictBool] = Field(default=True, description="Enables the discount coupon overview for customers.")
+ referrals_enabled: Optional[StrictBool] = Field(default=True, description="Enables the referral campaign overview for customers.")
+ theme: Optional[StrictStr] = Field(default='default', description="Determines the color scheme of the customer cockpit.")
+ use_custom_double_opt_in_redirect_url: Optional[StrictBool] = Field(default=False, description="Enables the double opt-in option. It must be a valid URL format.")
+ custom_double_opt_in_redirect_url: Optional[StrictStr] = Field(default=None, description="Defines the URL for the double opt-in consent. It must be a valid URL format.")
+ __properties: ClassVar[List[str]] = ["campaigns_overview_enabled", "loyalty_enabled", "gift_cards_enabled", "coupons_enabled", "referrals_enabled", "theme", "use_custom_double_opt_in_redirect_url", "custom_double_opt_in_redirect_url"]
+
+ @field_validator('theme')
+ def theme_validate_enum(cls, value):
+ """Validates the enum"""
+ if value is None:
+ return value
+
+ if value not in set(['blue', 'dark-green', 'default', 'green', 'grey', 'orange', 'purple', 'red']):
+ raise ValueError("must be one of enum values ('blue', 'dark-green', 'default', 'green', 'grey', 'orange', 'purple', 'red')")
+ return value
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of ManagementProjectsBrandingCreateRequestBodyCockpits from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([
+ ])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ # set to None if campaigns_overview_enabled (nullable) is None
+ # and model_fields_set contains the field
+ if self.campaigns_overview_enabled is None and "campaigns_overview_enabled" in self.model_fields_set:
+ _dict['campaigns_overview_enabled'] = None
+
+ # set to None if loyalty_enabled (nullable) is None
+ # and model_fields_set contains the field
+ if self.loyalty_enabled is None and "loyalty_enabled" in self.model_fields_set:
+ _dict['loyalty_enabled'] = None
+
+ # set to None if gift_cards_enabled (nullable) is None
+ # and model_fields_set contains the field
+ if self.gift_cards_enabled is None and "gift_cards_enabled" in self.model_fields_set:
+ _dict['gift_cards_enabled'] = None
+
+ # set to None if coupons_enabled (nullable) is None
+ # and model_fields_set contains the field
+ if self.coupons_enabled is None and "coupons_enabled" in self.model_fields_set:
+ _dict['coupons_enabled'] = None
+
+ # set to None if referrals_enabled (nullable) is None
+ # and model_fields_set contains the field
+ if self.referrals_enabled is None and "referrals_enabled" in self.model_fields_set:
+ _dict['referrals_enabled'] = None
+
+ # set to None if theme (nullable) is None
+ # and model_fields_set contains the field
+ if self.theme is None and "theme" in self.model_fields_set:
+ _dict['theme'] = None
+
+ # set to None if use_custom_double_opt_in_redirect_url (nullable) is None
+ # and model_fields_set contains the field
+ if self.use_custom_double_opt_in_redirect_url is None and "use_custom_double_opt_in_redirect_url" in self.model_fields_set:
+ _dict['use_custom_double_opt_in_redirect_url'] = None
+
+ # set to None if custom_double_opt_in_redirect_url (nullable) is None
+ # and model_fields_set contains the field
+ if self.custom_double_opt_in_redirect_url is None and "custom_double_opt_in_redirect_url" in self.model_fields_set:
+ _dict['custom_double_opt_in_redirect_url'] = None
+
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of ManagementProjectsBrandingCreateRequestBodyCockpits from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "campaigns_overview_enabled": obj.get("campaigns_overview_enabled") if obj.get("campaigns_overview_enabled") is not None else False,
+ "loyalty_enabled": obj.get("loyalty_enabled") if obj.get("loyalty_enabled") is not None else True,
+ "gift_cards_enabled": obj.get("gift_cards_enabled") if obj.get("gift_cards_enabled") is not None else True,
+ "coupons_enabled": obj.get("coupons_enabled") if obj.get("coupons_enabled") is not None else True,
+ "referrals_enabled": obj.get("referrals_enabled") if obj.get("referrals_enabled") is not None else True,
+ "theme": obj.get("theme") if obj.get("theme") is not None else 'default',
+ "use_custom_double_opt_in_redirect_url": obj.get("use_custom_double_opt_in_redirect_url") if obj.get("use_custom_double_opt_in_redirect_url") is not None else False,
+ "custom_double_opt_in_redirect_url": obj.get("custom_double_opt_in_redirect_url")
+ })
+ return _obj
+
+
diff --git a/voucherify/models/management_projects_branding_create_request_body_contact.py b/voucherify/models/management_projects_branding_create_request_body_contact.py
new file mode 100644
index 00000000..682d0e3a
--- /dev/null
+++ b/voucherify/models/management_projects_branding_create_request_body_contact.py
@@ -0,0 +1,100 @@
+# coding: utf-8
+
+"""
+ Voucherify API
+
+ Voucherify promotion engine REST API. Please see https://docs.voucherify.io/docs for more details.
+
+ The version of the OpenAPI document: v2018-08-01
+ Contact: support@voucherify.io
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict, Field, StrictStr
+from typing import Any, ClassVar, Dict, List, Optional
+from typing import Optional, Set
+from typing_extensions import Self
+
+class ManagementProjectsBrandingCreateRequestBodyContact(BaseModel):
+ """
+ Defines contact details.
+ """ # noqa: E501
+ email: Optional[StrictStr] = Field(default=None, description="Defines the brand's email address. It must be a valid email format.")
+ phone: Optional[StrictStr] = Field(default=None, description="Defines the brand's phone number.")
+ __properties: ClassVar[List[str]] = ["email", "phone"]
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of ManagementProjectsBrandingCreateRequestBodyContact from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([
+ ])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ # set to None if email (nullable) is None
+ # and model_fields_set contains the field
+ if self.email is None and "email" in self.model_fields_set:
+ _dict['email'] = None
+
+ # set to None if phone (nullable) is None
+ # and model_fields_set contains the field
+ if self.phone is None and "phone" in self.model_fields_set:
+ _dict['phone'] = None
+
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of ManagementProjectsBrandingCreateRequestBodyContact from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "email": obj.get("email"),
+ "phone": obj.get("phone")
+ })
+ return _obj
+
+
diff --git a/voucherify/models/management_projects_branding_create_response_body.py b/voucherify/models/management_projects_branding_create_response_body.py
new file mode 100644
index 00000000..f156cc39
--- /dev/null
+++ b/voucherify/models/management_projects_branding_create_response_body.py
@@ -0,0 +1,137 @@
+# coding: utf-8
+
+"""
+ Voucherify API
+
+ Voucherify promotion engine REST API. Please see https://docs.voucherify.io/docs for more details.
+
+ The version of the OpenAPI document: v2018-08-01
+ Contact: support@voucherify.io
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict, Field, StrictStr
+from typing import Any, ClassVar, Dict, List, Optional
+from voucherify.models.management_projects_branding_create_response_body_address import ManagementProjectsBrandingCreateResponseBodyAddress
+from voucherify.models.management_projects_branding_create_response_body_brand import ManagementProjectsBrandingCreateResponseBodyBrand
+from voucherify.models.management_projects_branding_create_response_body_cockpits import ManagementProjectsBrandingCreateResponseBodyCockpits
+from voucherify.models.management_projects_branding_create_response_body_contact import ManagementProjectsBrandingCreateResponseBodyContact
+from typing import Optional, Set
+from typing_extensions import Self
+
+class ManagementProjectsBrandingCreateResponseBody(BaseModel):
+ """
+ Response body schema for **POST** `/management/v1/projects/{projectId}/branding`.
+ """ # noqa: E501
+ id: Optional[StrictStr] = Field(default=None, description="Unique identifier of the brand configuration.")
+ brand: Optional[ManagementProjectsBrandingCreateResponseBodyBrand] = None
+ address: Optional[ManagementProjectsBrandingCreateResponseBodyAddress] = None
+ contact: Optional[ManagementProjectsBrandingCreateResponseBodyContact] = None
+ cockpits: Optional[ManagementProjectsBrandingCreateResponseBodyCockpits] = None
+ __properties: ClassVar[List[str]] = ["id", "brand", "address", "contact", "cockpits"]
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of ManagementProjectsBrandingCreateResponseBody from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([
+ ])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ # override the default output from pydantic by calling `to_dict()` of brand
+ if self.brand:
+ _dict['brand'] = self.brand.to_dict()
+ # override the default output from pydantic by calling `to_dict()` of address
+ if self.address:
+ _dict['address'] = self.address.to_dict()
+ # override the default output from pydantic by calling `to_dict()` of contact
+ if self.contact:
+ _dict['contact'] = self.contact.to_dict()
+ # override the default output from pydantic by calling `to_dict()` of cockpits
+ if self.cockpits:
+ _dict['cockpits'] = self.cockpits.to_dict()
+ # set to None if id (nullable) is None
+ # and model_fields_set contains the field
+ if self.id is None and "id" in self.model_fields_set:
+ _dict['id'] = None
+
+ # set to None if brand (nullable) is None
+ # and model_fields_set contains the field
+ if self.brand is None and "brand" in self.model_fields_set:
+ _dict['brand'] = None
+
+ # set to None if address (nullable) is None
+ # and model_fields_set contains the field
+ if self.address is None and "address" in self.model_fields_set:
+ _dict['address'] = None
+
+ # set to None if contact (nullable) is None
+ # and model_fields_set contains the field
+ if self.contact is None and "contact" in self.model_fields_set:
+ _dict['contact'] = None
+
+ # set to None if cockpits (nullable) is None
+ # and model_fields_set contains the field
+ if self.cockpits is None and "cockpits" in self.model_fields_set:
+ _dict['cockpits'] = None
+
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of ManagementProjectsBrandingCreateResponseBody from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "id": obj.get("id"),
+ "brand": ManagementProjectsBrandingCreateResponseBodyBrand.from_dict(obj["brand"]) if obj.get("brand") is not None else None,
+ "address": ManagementProjectsBrandingCreateResponseBodyAddress.from_dict(obj["address"]) if obj.get("address") is not None else None,
+ "contact": ManagementProjectsBrandingCreateResponseBodyContact.from_dict(obj["contact"]) if obj.get("contact") is not None else None,
+ "cockpits": ManagementProjectsBrandingCreateResponseBodyCockpits.from_dict(obj["cockpits"]) if obj.get("cockpits") is not None else None
+ })
+ return _obj
+
+
diff --git a/voucherify/models/management_projects_branding_create_response_body_address.py b/voucherify/models/management_projects_branding_create_response_body_address.py
new file mode 100644
index 00000000..8e94770e
--- /dev/null
+++ b/voucherify/models/management_projects_branding_create_response_body_address.py
@@ -0,0 +1,121 @@
+# coding: utf-8
+
+"""
+ Voucherify API
+
+ Voucherify promotion engine REST API. Please see https://docs.voucherify.io/docs for more details.
+
+ The version of the OpenAPI document: v2018-08-01
+ Contact: support@voucherify.io
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict, Field, StrictStr
+from typing import Any, ClassVar, Dict, List, Optional
+from typing import Optional, Set
+from typing_extensions import Self
+
+class ManagementProjectsBrandingCreateResponseBodyAddress(BaseModel):
+ """
+ Defines the address details.
+ """ # noqa: E501
+ street: Optional[StrictStr] = Field(default=None, description="Defines the brand's street.")
+ city: Optional[StrictStr] = Field(default=None, description="Defines the brand's city.")
+ postal: Optional[StrictStr] = Field(default=None, description="Defines the brand's postal code.")
+ state: Optional[StrictStr] = Field(default=None, description="Defines the brand's state or similar administrative area.")
+ country: Optional[StrictStr] = Field(default=None, description="Defines the brand's country.")
+ __properties: ClassVar[List[str]] = ["street", "city", "postal", "state", "country"]
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of ManagementProjectsBrandingCreateResponseBodyAddress from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([
+ ])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ # set to None if street (nullable) is None
+ # and model_fields_set contains the field
+ if self.street is None and "street" in self.model_fields_set:
+ _dict['street'] = None
+
+ # set to None if city (nullable) is None
+ # and model_fields_set contains the field
+ if self.city is None and "city" in self.model_fields_set:
+ _dict['city'] = None
+
+ # set to None if postal (nullable) is None
+ # and model_fields_set contains the field
+ if self.postal is None and "postal" in self.model_fields_set:
+ _dict['postal'] = None
+
+ # set to None if state (nullable) is None
+ # and model_fields_set contains the field
+ if self.state is None and "state" in self.model_fields_set:
+ _dict['state'] = None
+
+ # set to None if country (nullable) is None
+ # and model_fields_set contains the field
+ if self.country is None and "country" in self.model_fields_set:
+ _dict['country'] = None
+
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of ManagementProjectsBrandingCreateResponseBodyAddress from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "street": obj.get("street"),
+ "city": obj.get("city"),
+ "postal": obj.get("postal"),
+ "state": obj.get("state"),
+ "country": obj.get("country")
+ })
+ return _obj
+
+
diff --git a/voucherify/models/management_projects_branding_create_response_body_brand.py b/voucherify/models/management_projects_branding_create_response_body_brand.py
new file mode 100644
index 00000000..0adb8c05
--- /dev/null
+++ b/voucherify/models/management_projects_branding_create_response_body_brand.py
@@ -0,0 +1,121 @@
+# coding: utf-8
+
+"""
+ Voucherify API
+
+ Voucherify promotion engine REST API. Please see https://docs.voucherify.io/docs for more details.
+
+ The version of the OpenAPI document: v2018-08-01
+ Contact: support@voucherify.io
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict, Field, StrictStr
+from typing import Any, ClassVar, Dict, List, Optional
+from typing import Optional, Set
+from typing_extensions import Self
+
+class ManagementProjectsBrandingCreateResponseBodyBrand(BaseModel):
+ """
+ Defines basic brand details.
+ """ # noqa: E501
+ name: Optional[StrictStr] = Field(default=None, description="Defines brand name.")
+ privacy_policy_url: Optional[StrictStr] = Field(default=None, description="Defines the URL to the brand's privacy policy. It must be a valid URL format.")
+ terms_of_use_url: Optional[StrictStr] = Field(default=None, description="Defines the URL to the brand's terms of use. It must be a valid URL format.")
+ permission_reminder: Optional[StrictStr] = Field(default=None, description="Defines the message that is displayed to customers who opted in an email newsletter.")
+ website_url: Optional[StrictStr] = Field(default=None, description="Defines the URL to the brand's website. It must be a valid URL format.")
+ __properties: ClassVar[List[str]] = ["name", "privacy_policy_url", "terms_of_use_url", "permission_reminder", "website_url"]
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of ManagementProjectsBrandingCreateResponseBodyBrand from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([
+ ])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ # set to None if name (nullable) is None
+ # and model_fields_set contains the field
+ if self.name is None and "name" in self.model_fields_set:
+ _dict['name'] = None
+
+ # set to None if privacy_policy_url (nullable) is None
+ # and model_fields_set contains the field
+ if self.privacy_policy_url is None and "privacy_policy_url" in self.model_fields_set:
+ _dict['privacy_policy_url'] = None
+
+ # set to None if terms_of_use_url (nullable) is None
+ # and model_fields_set contains the field
+ if self.terms_of_use_url is None and "terms_of_use_url" in self.model_fields_set:
+ _dict['terms_of_use_url'] = None
+
+ # set to None if permission_reminder (nullable) is None
+ # and model_fields_set contains the field
+ if self.permission_reminder is None and "permission_reminder" in self.model_fields_set:
+ _dict['permission_reminder'] = None
+
+ # set to None if website_url (nullable) is None
+ # and model_fields_set contains the field
+ if self.website_url is None and "website_url" in self.model_fields_set:
+ _dict['website_url'] = None
+
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of ManagementProjectsBrandingCreateResponseBodyBrand from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "name": obj.get("name"),
+ "privacy_policy_url": obj.get("privacy_policy_url"),
+ "terms_of_use_url": obj.get("terms_of_use_url"),
+ "permission_reminder": obj.get("permission_reminder"),
+ "website_url": obj.get("website_url")
+ })
+ return _obj
+
+
diff --git a/voucherify/models/management_projects_branding_create_response_body_cockpits.py b/voucherify/models/management_projects_branding_create_response_body_cockpits.py
new file mode 100644
index 00000000..cce21299
--- /dev/null
+++ b/voucherify/models/management_projects_branding_create_response_body_cockpits.py
@@ -0,0 +1,152 @@
+# coding: utf-8
+
+"""
+ Voucherify API
+
+ Voucherify promotion engine REST API. Please see https://docs.voucherify.io/docs for more details.
+
+ The version of the OpenAPI document: v2018-08-01
+ Contact: support@voucherify.io
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr, field_validator
+from typing import Any, ClassVar, Dict, List, Optional
+from typing import Optional, Set
+from typing_extensions import Self
+
+class ManagementProjectsBrandingCreateResponseBodyCockpits(BaseModel):
+ """
+ Defines customer cockpit details.
+ """ # noqa: E501
+ campaigns_overview_enabled: Optional[StrictBool] = Field(default=None, description="Enables the campaign overview for customers.")
+ loyalty_enabled: Optional[StrictBool] = Field(default=None, description="Enables the loyalty campaign overview for customers.")
+ gift_cards_enabled: Optional[StrictBool] = Field(default=None, description="Enables the gift card overview for customers.")
+ coupons_enabled: Optional[StrictBool] = Field(default=None, description="Enables the discount coupon overview for customers.")
+ referrals_enabled: Optional[StrictBool] = Field(default=None, description="Enables the referral campaign overview for customers.")
+ theme: Optional[StrictStr] = Field(default=None, description="Determines the color scheme of the customer cockpit.")
+ use_custom_double_opt_in_redirect_url: Optional[StrictBool] = Field(default=None, description="Enables the double opt-in option. It must be a valid URL format.")
+ custom_double_opt_in_redirect_url: Optional[StrictStr] = Field(default=None, description="Defines the URL for the double opt-in consent. It must be a valid URL format.")
+ __properties: ClassVar[List[str]] = ["campaigns_overview_enabled", "loyalty_enabled", "gift_cards_enabled", "coupons_enabled", "referrals_enabled", "theme", "use_custom_double_opt_in_redirect_url", "custom_double_opt_in_redirect_url"]
+
+ @field_validator('theme')
+ def theme_validate_enum(cls, value):
+ """Validates the enum"""
+ if value is None:
+ return value
+
+ if value not in set(['blue', 'dark-green', 'default', 'green', 'grey', 'orange', 'purple', 'red']):
+ raise ValueError("must be one of enum values ('blue', 'dark-green', 'default', 'green', 'grey', 'orange', 'purple', 'red')")
+ return value
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of ManagementProjectsBrandingCreateResponseBodyCockpits from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([
+ ])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ # set to None if campaigns_overview_enabled (nullable) is None
+ # and model_fields_set contains the field
+ if self.campaigns_overview_enabled is None and "campaigns_overview_enabled" in self.model_fields_set:
+ _dict['campaigns_overview_enabled'] = None
+
+ # set to None if loyalty_enabled (nullable) is None
+ # and model_fields_set contains the field
+ if self.loyalty_enabled is None and "loyalty_enabled" in self.model_fields_set:
+ _dict['loyalty_enabled'] = None
+
+ # set to None if gift_cards_enabled (nullable) is None
+ # and model_fields_set contains the field
+ if self.gift_cards_enabled is None and "gift_cards_enabled" in self.model_fields_set:
+ _dict['gift_cards_enabled'] = None
+
+ # set to None if coupons_enabled (nullable) is None
+ # and model_fields_set contains the field
+ if self.coupons_enabled is None and "coupons_enabled" in self.model_fields_set:
+ _dict['coupons_enabled'] = None
+
+ # set to None if referrals_enabled (nullable) is None
+ # and model_fields_set contains the field
+ if self.referrals_enabled is None and "referrals_enabled" in self.model_fields_set:
+ _dict['referrals_enabled'] = None
+
+ # set to None if theme (nullable) is None
+ # and model_fields_set contains the field
+ if self.theme is None and "theme" in self.model_fields_set:
+ _dict['theme'] = None
+
+ # set to None if use_custom_double_opt_in_redirect_url (nullable) is None
+ # and model_fields_set contains the field
+ if self.use_custom_double_opt_in_redirect_url is None and "use_custom_double_opt_in_redirect_url" in self.model_fields_set:
+ _dict['use_custom_double_opt_in_redirect_url'] = None
+
+ # set to None if custom_double_opt_in_redirect_url (nullable) is None
+ # and model_fields_set contains the field
+ if self.custom_double_opt_in_redirect_url is None and "custom_double_opt_in_redirect_url" in self.model_fields_set:
+ _dict['custom_double_opt_in_redirect_url'] = None
+
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of ManagementProjectsBrandingCreateResponseBodyCockpits from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "campaigns_overview_enabled": obj.get("campaigns_overview_enabled"),
+ "loyalty_enabled": obj.get("loyalty_enabled"),
+ "gift_cards_enabled": obj.get("gift_cards_enabled"),
+ "coupons_enabled": obj.get("coupons_enabled"),
+ "referrals_enabled": obj.get("referrals_enabled"),
+ "theme": obj.get("theme"),
+ "use_custom_double_opt_in_redirect_url": obj.get("use_custom_double_opt_in_redirect_url"),
+ "custom_double_opt_in_redirect_url": obj.get("custom_double_opt_in_redirect_url")
+ })
+ return _obj
+
+
diff --git a/voucherify/models/management_projects_branding_create_response_body_contact.py b/voucherify/models/management_projects_branding_create_response_body_contact.py
new file mode 100644
index 00000000..fedde81f
--- /dev/null
+++ b/voucherify/models/management_projects_branding_create_response_body_contact.py
@@ -0,0 +1,100 @@
+# coding: utf-8
+
+"""
+ Voucherify API
+
+ Voucherify promotion engine REST API. Please see https://docs.voucherify.io/docs for more details.
+
+ The version of the OpenAPI document: v2018-08-01
+ Contact: support@voucherify.io
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict, Field, StrictStr
+from typing import Any, ClassVar, Dict, List, Optional
+from typing import Optional, Set
+from typing_extensions import Self
+
+class ManagementProjectsBrandingCreateResponseBodyContact(BaseModel):
+ """
+ Defines contact details.
+ """ # noqa: E501
+ email: Optional[StrictStr] = Field(default=None, description="Defines the brand's email address. It must be a valid email format.")
+ phone: Optional[StrictStr] = Field(default=None, description="Defines the brand's phone number.")
+ __properties: ClassVar[List[str]] = ["email", "phone"]
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of ManagementProjectsBrandingCreateResponseBodyContact from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([
+ ])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ # set to None if email (nullable) is None
+ # and model_fields_set contains the field
+ if self.email is None and "email" in self.model_fields_set:
+ _dict['email'] = None
+
+ # set to None if phone (nullable) is None
+ # and model_fields_set contains the field
+ if self.phone is None and "phone" in self.model_fields_set:
+ _dict['phone'] = None
+
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of ManagementProjectsBrandingCreateResponseBodyContact from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "email": obj.get("email"),
+ "phone": obj.get("phone")
+ })
+ return _obj
+
+
diff --git a/voucherify/models/management_projects_branding_get_response_body.py b/voucherify/models/management_projects_branding_get_response_body.py
new file mode 100644
index 00000000..db18a728
--- /dev/null
+++ b/voucherify/models/management_projects_branding_get_response_body.py
@@ -0,0 +1,137 @@
+# coding: utf-8
+
+"""
+ Voucherify API
+
+ Voucherify promotion engine REST API. Please see https://docs.voucherify.io/docs for more details.
+
+ The version of the OpenAPI document: v2018-08-01
+ Contact: support@voucherify.io
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict, Field, StrictStr
+from typing import Any, ClassVar, Dict, List, Optional
+from voucherify.models.management_projects_branding_get_response_body_address import ManagementProjectsBrandingGetResponseBodyAddress
+from voucherify.models.management_projects_branding_get_response_body_brand import ManagementProjectsBrandingGetResponseBodyBrand
+from voucherify.models.management_projects_branding_get_response_body_cockpits import ManagementProjectsBrandingGetResponseBodyCockpits
+from voucherify.models.management_projects_branding_get_response_body_contact import ManagementProjectsBrandingGetResponseBodyContact
+from typing import Optional, Set
+from typing_extensions import Self
+
+class ManagementProjectsBrandingGetResponseBody(BaseModel):
+ """
+ Response body schema for **GET** `/management/v1/projects/{projectId}/branding/{brandingId}`.
+ """ # noqa: E501
+ id: Optional[StrictStr] = Field(default=None, description="Unique identifier of the brand configuration.")
+ brand: Optional[ManagementProjectsBrandingGetResponseBodyBrand] = None
+ address: Optional[ManagementProjectsBrandingGetResponseBodyAddress] = None
+ contact: Optional[ManagementProjectsBrandingGetResponseBodyContact] = None
+ cockpits: Optional[ManagementProjectsBrandingGetResponseBodyCockpits] = None
+ __properties: ClassVar[List[str]] = ["id", "brand", "address", "contact", "cockpits"]
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of ManagementProjectsBrandingGetResponseBody from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([
+ ])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ # override the default output from pydantic by calling `to_dict()` of brand
+ if self.brand:
+ _dict['brand'] = self.brand.to_dict()
+ # override the default output from pydantic by calling `to_dict()` of address
+ if self.address:
+ _dict['address'] = self.address.to_dict()
+ # override the default output from pydantic by calling `to_dict()` of contact
+ if self.contact:
+ _dict['contact'] = self.contact.to_dict()
+ # override the default output from pydantic by calling `to_dict()` of cockpits
+ if self.cockpits:
+ _dict['cockpits'] = self.cockpits.to_dict()
+ # set to None if id (nullable) is None
+ # and model_fields_set contains the field
+ if self.id is None and "id" in self.model_fields_set:
+ _dict['id'] = None
+
+ # set to None if brand (nullable) is None
+ # and model_fields_set contains the field
+ if self.brand is None and "brand" in self.model_fields_set:
+ _dict['brand'] = None
+
+ # set to None if address (nullable) is None
+ # and model_fields_set contains the field
+ if self.address is None and "address" in self.model_fields_set:
+ _dict['address'] = None
+
+ # set to None if contact (nullable) is None
+ # and model_fields_set contains the field
+ if self.contact is None and "contact" in self.model_fields_set:
+ _dict['contact'] = None
+
+ # set to None if cockpits (nullable) is None
+ # and model_fields_set contains the field
+ if self.cockpits is None and "cockpits" in self.model_fields_set:
+ _dict['cockpits'] = None
+
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of ManagementProjectsBrandingGetResponseBody from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "id": obj.get("id"),
+ "brand": ManagementProjectsBrandingGetResponseBodyBrand.from_dict(obj["brand"]) if obj.get("brand") is not None else None,
+ "address": ManagementProjectsBrandingGetResponseBodyAddress.from_dict(obj["address"]) if obj.get("address") is not None else None,
+ "contact": ManagementProjectsBrandingGetResponseBodyContact.from_dict(obj["contact"]) if obj.get("contact") is not None else None,
+ "cockpits": ManagementProjectsBrandingGetResponseBodyCockpits.from_dict(obj["cockpits"]) if obj.get("cockpits") is not None else None
+ })
+ return _obj
+
+
diff --git a/voucherify/models/management_projects_branding_get_response_body_address.py b/voucherify/models/management_projects_branding_get_response_body_address.py
new file mode 100644
index 00000000..b58ef213
--- /dev/null
+++ b/voucherify/models/management_projects_branding_get_response_body_address.py
@@ -0,0 +1,121 @@
+# coding: utf-8
+
+"""
+ Voucherify API
+
+ Voucherify promotion engine REST API. Please see https://docs.voucherify.io/docs for more details.
+
+ The version of the OpenAPI document: v2018-08-01
+ Contact: support@voucherify.io
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict, Field, StrictStr
+from typing import Any, ClassVar, Dict, List, Optional
+from typing import Optional, Set
+from typing_extensions import Self
+
+class ManagementProjectsBrandingGetResponseBodyAddress(BaseModel):
+ """
+ Defines the address details.
+ """ # noqa: E501
+ street: Optional[StrictStr] = Field(default=None, description="Defines the brand's street.")
+ city: Optional[StrictStr] = Field(default=None, description="Defines the brand's city.")
+ postal: Optional[StrictStr] = Field(default=None, description="Defines the brand's postal code.")
+ state: Optional[StrictStr] = Field(default=None, description="Defines the brand's state or similar administrative area.")
+ country: Optional[StrictStr] = Field(default=None, description="Defines the brand's country.")
+ __properties: ClassVar[List[str]] = ["street", "city", "postal", "state", "country"]
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of ManagementProjectsBrandingGetResponseBodyAddress from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([
+ ])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ # set to None if street (nullable) is None
+ # and model_fields_set contains the field
+ if self.street is None and "street" in self.model_fields_set:
+ _dict['street'] = None
+
+ # set to None if city (nullable) is None
+ # and model_fields_set contains the field
+ if self.city is None and "city" in self.model_fields_set:
+ _dict['city'] = None
+
+ # set to None if postal (nullable) is None
+ # and model_fields_set contains the field
+ if self.postal is None and "postal" in self.model_fields_set:
+ _dict['postal'] = None
+
+ # set to None if state (nullable) is None
+ # and model_fields_set contains the field
+ if self.state is None and "state" in self.model_fields_set:
+ _dict['state'] = None
+
+ # set to None if country (nullable) is None
+ # and model_fields_set contains the field
+ if self.country is None and "country" in self.model_fields_set:
+ _dict['country'] = None
+
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of ManagementProjectsBrandingGetResponseBodyAddress from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "street": obj.get("street"),
+ "city": obj.get("city"),
+ "postal": obj.get("postal"),
+ "state": obj.get("state"),
+ "country": obj.get("country")
+ })
+ return _obj
+
+
diff --git a/voucherify/models/management_projects_branding_get_response_body_brand.py b/voucherify/models/management_projects_branding_get_response_body_brand.py
new file mode 100644
index 00000000..dcff12a6
--- /dev/null
+++ b/voucherify/models/management_projects_branding_get_response_body_brand.py
@@ -0,0 +1,121 @@
+# coding: utf-8
+
+"""
+ Voucherify API
+
+ Voucherify promotion engine REST API. Please see https://docs.voucherify.io/docs for more details.
+
+ The version of the OpenAPI document: v2018-08-01
+ Contact: support@voucherify.io
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict, Field, StrictStr
+from typing import Any, ClassVar, Dict, List, Optional
+from typing import Optional, Set
+from typing_extensions import Self
+
+class ManagementProjectsBrandingGetResponseBodyBrand(BaseModel):
+ """
+ Defines basic brand details.
+ """ # noqa: E501
+ name: Optional[StrictStr] = Field(default=None, description="Defines brand name.")
+ privacy_policy_url: Optional[StrictStr] = Field(default=None, description="Defines the URL to the brand's privacy policy. It must be a valid URL format.")
+ terms_of_use_url: Optional[StrictStr] = Field(default=None, description="Defines the URL to the brand's terms of use. It must be a valid URL format.")
+ permission_reminder: Optional[StrictStr] = Field(default=None, description="Defines the message that is displayed to customers who opted in an email newsletter.")
+ website_url: Optional[StrictStr] = Field(default=None, description="Defines the URL to the brand's website. It must be a valid URL format.")
+ __properties: ClassVar[List[str]] = ["name", "privacy_policy_url", "terms_of_use_url", "permission_reminder", "website_url"]
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of ManagementProjectsBrandingGetResponseBodyBrand from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([
+ ])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ # set to None if name (nullable) is None
+ # and model_fields_set contains the field
+ if self.name is None and "name" in self.model_fields_set:
+ _dict['name'] = None
+
+ # set to None if privacy_policy_url (nullable) is None
+ # and model_fields_set contains the field
+ if self.privacy_policy_url is None and "privacy_policy_url" in self.model_fields_set:
+ _dict['privacy_policy_url'] = None
+
+ # set to None if terms_of_use_url (nullable) is None
+ # and model_fields_set contains the field
+ if self.terms_of_use_url is None and "terms_of_use_url" in self.model_fields_set:
+ _dict['terms_of_use_url'] = None
+
+ # set to None if permission_reminder (nullable) is None
+ # and model_fields_set contains the field
+ if self.permission_reminder is None and "permission_reminder" in self.model_fields_set:
+ _dict['permission_reminder'] = None
+
+ # set to None if website_url (nullable) is None
+ # and model_fields_set contains the field
+ if self.website_url is None and "website_url" in self.model_fields_set:
+ _dict['website_url'] = None
+
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of ManagementProjectsBrandingGetResponseBodyBrand from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "name": obj.get("name"),
+ "privacy_policy_url": obj.get("privacy_policy_url"),
+ "terms_of_use_url": obj.get("terms_of_use_url"),
+ "permission_reminder": obj.get("permission_reminder"),
+ "website_url": obj.get("website_url")
+ })
+ return _obj
+
+
diff --git a/voucherify/models/management_projects_branding_get_response_body_cockpits.py b/voucherify/models/management_projects_branding_get_response_body_cockpits.py
new file mode 100644
index 00000000..e5fe0e79
--- /dev/null
+++ b/voucherify/models/management_projects_branding_get_response_body_cockpits.py
@@ -0,0 +1,152 @@
+# coding: utf-8
+
+"""
+ Voucherify API
+
+ Voucherify promotion engine REST API. Please see https://docs.voucherify.io/docs for more details.
+
+ The version of the OpenAPI document: v2018-08-01
+ Contact: support@voucherify.io
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr, field_validator
+from typing import Any, ClassVar, Dict, List, Optional
+from typing import Optional, Set
+from typing_extensions import Self
+
+class ManagementProjectsBrandingGetResponseBodyCockpits(BaseModel):
+ """
+ Defines customer cockpit details.
+ """ # noqa: E501
+ campaigns_overview_enabled: Optional[StrictBool] = Field(default=None, description="Enables the campaign overview for customers.")
+ loyalty_enabled: Optional[StrictBool] = Field(default=None, description="Enables the loyalty campaign overview for customers.")
+ gift_cards_enabled: Optional[StrictBool] = Field(default=None, description="Enables the gift card overview for customers.")
+ coupons_enabled: Optional[StrictBool] = Field(default=None, description="Enables the discount coupon overview for customers.")
+ referrals_enabled: Optional[StrictBool] = Field(default=None, description="Enables the referral campaign overview for customers.")
+ theme: Optional[StrictStr] = Field(default=None, description="Determines the color scheme of the customer cockpit.")
+ use_custom_double_opt_in_redirect_url: Optional[StrictBool] = Field(default=None, description="Enables the double opt-in option. It must be a valid URL format.")
+ custom_double_opt_in_redirect_url: Optional[StrictStr] = Field(default=None, description="Defines the URL for the double opt-in consent. It must be a valid URL format.")
+ __properties: ClassVar[List[str]] = ["campaigns_overview_enabled", "loyalty_enabled", "gift_cards_enabled", "coupons_enabled", "referrals_enabled", "theme", "use_custom_double_opt_in_redirect_url", "custom_double_opt_in_redirect_url"]
+
+ @field_validator('theme')
+ def theme_validate_enum(cls, value):
+ """Validates the enum"""
+ if value is None:
+ return value
+
+ if value not in set(['blue', 'dark-green', 'default', 'green', 'grey', 'orange', 'purple', 'red']):
+ raise ValueError("must be one of enum values ('blue', 'dark-green', 'default', 'green', 'grey', 'orange', 'purple', 'red')")
+ return value
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of ManagementProjectsBrandingGetResponseBodyCockpits from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([
+ ])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ # set to None if campaigns_overview_enabled (nullable) is None
+ # and model_fields_set contains the field
+ if self.campaigns_overview_enabled is None and "campaigns_overview_enabled" in self.model_fields_set:
+ _dict['campaigns_overview_enabled'] = None
+
+ # set to None if loyalty_enabled (nullable) is None
+ # and model_fields_set contains the field
+ if self.loyalty_enabled is None and "loyalty_enabled" in self.model_fields_set:
+ _dict['loyalty_enabled'] = None
+
+ # set to None if gift_cards_enabled (nullable) is None
+ # and model_fields_set contains the field
+ if self.gift_cards_enabled is None and "gift_cards_enabled" in self.model_fields_set:
+ _dict['gift_cards_enabled'] = None
+
+ # set to None if coupons_enabled (nullable) is None
+ # and model_fields_set contains the field
+ if self.coupons_enabled is None and "coupons_enabled" in self.model_fields_set:
+ _dict['coupons_enabled'] = None
+
+ # set to None if referrals_enabled (nullable) is None
+ # and model_fields_set contains the field
+ if self.referrals_enabled is None and "referrals_enabled" in self.model_fields_set:
+ _dict['referrals_enabled'] = None
+
+ # set to None if theme (nullable) is None
+ # and model_fields_set contains the field
+ if self.theme is None and "theme" in self.model_fields_set:
+ _dict['theme'] = None
+
+ # set to None if use_custom_double_opt_in_redirect_url (nullable) is None
+ # and model_fields_set contains the field
+ if self.use_custom_double_opt_in_redirect_url is None and "use_custom_double_opt_in_redirect_url" in self.model_fields_set:
+ _dict['use_custom_double_opt_in_redirect_url'] = None
+
+ # set to None if custom_double_opt_in_redirect_url (nullable) is None
+ # and model_fields_set contains the field
+ if self.custom_double_opt_in_redirect_url is None and "custom_double_opt_in_redirect_url" in self.model_fields_set:
+ _dict['custom_double_opt_in_redirect_url'] = None
+
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of ManagementProjectsBrandingGetResponseBodyCockpits from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "campaigns_overview_enabled": obj.get("campaigns_overview_enabled"),
+ "loyalty_enabled": obj.get("loyalty_enabled"),
+ "gift_cards_enabled": obj.get("gift_cards_enabled"),
+ "coupons_enabled": obj.get("coupons_enabled"),
+ "referrals_enabled": obj.get("referrals_enabled"),
+ "theme": obj.get("theme"),
+ "use_custom_double_opt_in_redirect_url": obj.get("use_custom_double_opt_in_redirect_url"),
+ "custom_double_opt_in_redirect_url": obj.get("custom_double_opt_in_redirect_url")
+ })
+ return _obj
+
+
diff --git a/voucherify/models/management_projects_branding_get_response_body_contact.py b/voucherify/models/management_projects_branding_get_response_body_contact.py
new file mode 100644
index 00000000..7e36a90c
--- /dev/null
+++ b/voucherify/models/management_projects_branding_get_response_body_contact.py
@@ -0,0 +1,100 @@
+# coding: utf-8
+
+"""
+ Voucherify API
+
+ Voucherify promotion engine REST API. Please see https://docs.voucherify.io/docs for more details.
+
+ The version of the OpenAPI document: v2018-08-01
+ Contact: support@voucherify.io
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict, Field, StrictStr
+from typing import Any, ClassVar, Dict, List, Optional
+from typing import Optional, Set
+from typing_extensions import Self
+
+class ManagementProjectsBrandingGetResponseBodyContact(BaseModel):
+ """
+ Defines contact details.
+ """ # noqa: E501
+ email: Optional[StrictStr] = Field(default=None, description="Defines the brand's email address. It must be a valid email format.")
+ phone: Optional[StrictStr] = Field(default=None, description="Defines the brand's phone number.")
+ __properties: ClassVar[List[str]] = ["email", "phone"]
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of ManagementProjectsBrandingGetResponseBodyContact from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([
+ ])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ # set to None if email (nullable) is None
+ # and model_fields_set contains the field
+ if self.email is None and "email" in self.model_fields_set:
+ _dict['email'] = None
+
+ # set to None if phone (nullable) is None
+ # and model_fields_set contains the field
+ if self.phone is None and "phone" in self.model_fields_set:
+ _dict['phone'] = None
+
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of ManagementProjectsBrandingGetResponseBodyContact from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "email": obj.get("email"),
+ "phone": obj.get("phone")
+ })
+ return _obj
+
+
diff --git a/voucherify/models/management_projects_branding_list_response_body.py b/voucherify/models/management_projects_branding_list_response_body.py
new file mode 100644
index 00000000..db6bf807
--- /dev/null
+++ b/voucherify/models/management_projects_branding_list_response_body.py
@@ -0,0 +1,142 @@
+# coding: utf-8
+
+"""
+ Voucherify API
+
+ Voucherify promotion engine REST API. Please see https://docs.voucherify.io/docs for more details.
+
+ The version of the OpenAPI document: v2018-08-01
+ Contact: support@voucherify.io
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr, field_validator
+from typing import Any, ClassVar, Dict, List, Optional
+from voucherify.models.management_projects_branding import ManagementProjectsBranding
+from typing import Optional, Set
+from typing_extensions import Self
+
+class ManagementProjectsBrandingListResponseBody(BaseModel):
+ """
+ Object containing a list of brand configurations. It always contains one item.
+ """ # noqa: E501
+ object: Optional[StrictStr] = Field(default='list', description="The type of the object represented by JSON. This object stores information about the brand in a dictionary.")
+ data_ref: Optional[StrictStr] = Field(default='data', description="Identifies the name of the attribute that contains the array of brand objects.")
+ data: Optional[List[ManagementProjectsBranding]] = Field(default=None, description="Array of brand objects. It contains only one object.")
+ total: Optional[StrictInt] = Field(default=None, description="The total number of brand objects. It is always `1`.")
+ __properties: ClassVar[List[str]] = ["object", "data_ref", "data", "total"]
+
+ @field_validator('object')
+ def object_validate_enum(cls, value):
+ """Validates the enum"""
+ if value is None:
+ return value
+
+ if value not in set(['list']):
+ raise ValueError("must be one of enum values ('list')")
+ return value
+
+ @field_validator('data_ref')
+ def data_ref_validate_enum(cls, value):
+ """Validates the enum"""
+ if value is None:
+ return value
+
+ if value not in set(['data']):
+ raise ValueError("must be one of enum values ('data')")
+ return value
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of ManagementProjectsBrandingListResponseBody from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([
+ ])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ # override the default output from pydantic by calling `to_dict()` of each item in data (list)
+ _items = []
+ if self.data:
+ for _item_data in self.data:
+ if _item_data:
+ _items.append(_item_data.to_dict())
+ _dict['data'] = _items
+ # set to None if object (nullable) is None
+ # and model_fields_set contains the field
+ if self.object is None and "object" in self.model_fields_set:
+ _dict['object'] = None
+
+ # set to None if data_ref (nullable) is None
+ # and model_fields_set contains the field
+ if self.data_ref is None and "data_ref" in self.model_fields_set:
+ _dict['data_ref'] = None
+
+ # set to None if data (nullable) is None
+ # and model_fields_set contains the field
+ if self.data is None and "data" in self.model_fields_set:
+ _dict['data'] = None
+
+ # set to None if total (nullable) is None
+ # and model_fields_set contains the field
+ if self.total is None and "total" in self.model_fields_set:
+ _dict['total'] = None
+
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of ManagementProjectsBrandingListResponseBody from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "object": obj.get("object") if obj.get("object") is not None else 'list',
+ "data_ref": obj.get("data_ref") if obj.get("data_ref") is not None else 'data',
+ "data": [ManagementProjectsBranding.from_dict(_item) for _item in obj["data"]] if obj.get("data") is not None else None,
+ "total": obj.get("total")
+ })
+ return _obj
+
+
diff --git a/voucherify/models/management_projects_branding_update_request_body.py b/voucherify/models/management_projects_branding_update_request_body.py
new file mode 100644
index 00000000..c505144c
--- /dev/null
+++ b/voucherify/models/management_projects_branding_update_request_body.py
@@ -0,0 +1,130 @@
+# coding: utf-8
+
+"""
+ Voucherify API
+
+ Voucherify promotion engine REST API. Please see https://docs.voucherify.io/docs for more details.
+
+ The version of the OpenAPI document: v2018-08-01
+ Contact: support@voucherify.io
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict
+from typing import Any, ClassVar, Dict, List, Optional
+from voucherify.models.management_projects_branding_update_request_body_address import ManagementProjectsBrandingUpdateRequestBodyAddress
+from voucherify.models.management_projects_branding_update_request_body_brand import ManagementProjectsBrandingUpdateRequestBodyBrand
+from voucherify.models.management_projects_branding_update_request_body_cockpits import ManagementProjectsBrandingUpdateRequestBodyCockpits
+from voucherify.models.management_projects_branding_update_request_body_contact import ManagementProjectsBrandingUpdateRequestBodyContact
+from typing import Optional, Set
+from typing_extensions import Self
+
+class ManagementProjectsBrandingUpdateRequestBody(BaseModel):
+ """
+ ManagementProjectsBrandingUpdateRequestBody
+ """ # noqa: E501
+ brand: Optional[ManagementProjectsBrandingUpdateRequestBodyBrand] = None
+ address: Optional[ManagementProjectsBrandingUpdateRequestBodyAddress] = None
+ contact: Optional[ManagementProjectsBrandingUpdateRequestBodyContact] = None
+ cockpits: Optional[ManagementProjectsBrandingUpdateRequestBodyCockpits] = None
+ __properties: ClassVar[List[str]] = ["brand", "address", "contact", "cockpits"]
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of ManagementProjectsBrandingUpdateRequestBody from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([
+ ])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ # override the default output from pydantic by calling `to_dict()` of brand
+ if self.brand:
+ _dict['brand'] = self.brand.to_dict()
+ # override the default output from pydantic by calling `to_dict()` of address
+ if self.address:
+ _dict['address'] = self.address.to_dict()
+ # override the default output from pydantic by calling `to_dict()` of contact
+ if self.contact:
+ _dict['contact'] = self.contact.to_dict()
+ # override the default output from pydantic by calling `to_dict()` of cockpits
+ if self.cockpits:
+ _dict['cockpits'] = self.cockpits.to_dict()
+ # set to None if brand (nullable) is None
+ # and model_fields_set contains the field
+ if self.brand is None and "brand" in self.model_fields_set:
+ _dict['brand'] = None
+
+ # set to None if address (nullable) is None
+ # and model_fields_set contains the field
+ if self.address is None and "address" in self.model_fields_set:
+ _dict['address'] = None
+
+ # set to None if contact (nullable) is None
+ # and model_fields_set contains the field
+ if self.contact is None and "contact" in self.model_fields_set:
+ _dict['contact'] = None
+
+ # set to None if cockpits (nullable) is None
+ # and model_fields_set contains the field
+ if self.cockpits is None and "cockpits" in self.model_fields_set:
+ _dict['cockpits'] = None
+
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of ManagementProjectsBrandingUpdateRequestBody from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "brand": ManagementProjectsBrandingUpdateRequestBodyBrand.from_dict(obj["brand"]) if obj.get("brand") is not None else None,
+ "address": ManagementProjectsBrandingUpdateRequestBodyAddress.from_dict(obj["address"]) if obj.get("address") is not None else None,
+ "contact": ManagementProjectsBrandingUpdateRequestBodyContact.from_dict(obj["contact"]) if obj.get("contact") is not None else None,
+ "cockpits": ManagementProjectsBrandingUpdateRequestBodyCockpits.from_dict(obj["cockpits"]) if obj.get("cockpits") is not None else None
+ })
+ return _obj
+
+
diff --git a/voucherify/models/management_projects_branding_update_request_body_address.py b/voucherify/models/management_projects_branding_update_request_body_address.py
new file mode 100644
index 00000000..e29dd71e
--- /dev/null
+++ b/voucherify/models/management_projects_branding_update_request_body_address.py
@@ -0,0 +1,121 @@
+# coding: utf-8
+
+"""
+ Voucherify API
+
+ Voucherify promotion engine REST API. Please see https://docs.voucherify.io/docs for more details.
+
+ The version of the OpenAPI document: v2018-08-01
+ Contact: support@voucherify.io
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict, Field, StrictStr
+from typing import Any, ClassVar, Dict, List, Optional
+from typing import Optional, Set
+from typing_extensions import Self
+
+class ManagementProjectsBrandingUpdateRequestBodyAddress(BaseModel):
+ """
+ Defines the address details.
+ """ # noqa: E501
+ street: Optional[StrictStr] = Field(default=None, description="Defines the brand's street.")
+ city: Optional[StrictStr] = Field(default=None, description="Defines the brand's city.")
+ postal: Optional[StrictStr] = Field(default=None, description="Defines the brand's postal code")
+ state: Optional[StrictStr] = Field(default=None, description="Defines the brand's state or similar administrative area.")
+ country: Optional[StrictStr] = Field(default=None, description="Defines the brand's country.")
+ __properties: ClassVar[List[str]] = ["street", "city", "postal", "state", "country"]
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of ManagementProjectsBrandingUpdateRequestBodyAddress from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([
+ ])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ # set to None if street (nullable) is None
+ # and model_fields_set contains the field
+ if self.street is None and "street" in self.model_fields_set:
+ _dict['street'] = None
+
+ # set to None if city (nullable) is None
+ # and model_fields_set contains the field
+ if self.city is None and "city" in self.model_fields_set:
+ _dict['city'] = None
+
+ # set to None if postal (nullable) is None
+ # and model_fields_set contains the field
+ if self.postal is None and "postal" in self.model_fields_set:
+ _dict['postal'] = None
+
+ # set to None if state (nullable) is None
+ # and model_fields_set contains the field
+ if self.state is None and "state" in self.model_fields_set:
+ _dict['state'] = None
+
+ # set to None if country (nullable) is None
+ # and model_fields_set contains the field
+ if self.country is None and "country" in self.model_fields_set:
+ _dict['country'] = None
+
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of ManagementProjectsBrandingUpdateRequestBodyAddress from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "street": obj.get("street"),
+ "city": obj.get("city"),
+ "postal": obj.get("postal"),
+ "state": obj.get("state"),
+ "country": obj.get("country")
+ })
+ return _obj
+
+
diff --git a/voucherify/models/management_projects_branding_update_request_body_brand.py b/voucherify/models/management_projects_branding_update_request_body_brand.py
new file mode 100644
index 00000000..ab417eb6
--- /dev/null
+++ b/voucherify/models/management_projects_branding_update_request_body_brand.py
@@ -0,0 +1,121 @@
+# coding: utf-8
+
+"""
+ Voucherify API
+
+ Voucherify promotion engine REST API. Please see https://docs.voucherify.io/docs for more details.
+
+ The version of the OpenAPI document: v2018-08-01
+ Contact: support@voucherify.io
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict, Field, StrictStr
+from typing import Any, ClassVar, Dict, List, Optional
+from typing import Optional, Set
+from typing_extensions import Self
+
+class ManagementProjectsBrandingUpdateRequestBodyBrand(BaseModel):
+ """
+ Defines basic brand details.
+ """ # noqa: E501
+ name: Optional[StrictStr] = Field(default=None, description="Defines brand name.")
+ privacy_policy_url: Optional[StrictStr] = Field(default=None, description="Defines the URL to the brand's privacy policy.")
+ terms_of_use_url: Optional[StrictStr] = Field(default=None, description="Defines the URL to the brand's terms of use.")
+ permission_reminder: Optional[StrictStr] = Field(default=None, description="Defines the message that is displayed to customers who opted in an email newsletter.")
+ website_url: Optional[StrictStr] = Field(default=None, description="Defines the URL to the brand's website.")
+ __properties: ClassVar[List[str]] = ["name", "privacy_policy_url", "terms_of_use_url", "permission_reminder", "website_url"]
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of ManagementProjectsBrandingUpdateRequestBodyBrand from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([
+ ])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ # set to None if name (nullable) is None
+ # and model_fields_set contains the field
+ if self.name is None and "name" in self.model_fields_set:
+ _dict['name'] = None
+
+ # set to None if privacy_policy_url (nullable) is None
+ # and model_fields_set contains the field
+ if self.privacy_policy_url is None and "privacy_policy_url" in self.model_fields_set:
+ _dict['privacy_policy_url'] = None
+
+ # set to None if terms_of_use_url (nullable) is None
+ # and model_fields_set contains the field
+ if self.terms_of_use_url is None and "terms_of_use_url" in self.model_fields_set:
+ _dict['terms_of_use_url'] = None
+
+ # set to None if permission_reminder (nullable) is None
+ # and model_fields_set contains the field
+ if self.permission_reminder is None and "permission_reminder" in self.model_fields_set:
+ _dict['permission_reminder'] = None
+
+ # set to None if website_url (nullable) is None
+ # and model_fields_set contains the field
+ if self.website_url is None and "website_url" in self.model_fields_set:
+ _dict['website_url'] = None
+
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of ManagementProjectsBrandingUpdateRequestBodyBrand from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "name": obj.get("name"),
+ "privacy_policy_url": obj.get("privacy_policy_url"),
+ "terms_of_use_url": obj.get("terms_of_use_url"),
+ "permission_reminder": obj.get("permission_reminder"),
+ "website_url": obj.get("website_url")
+ })
+ return _obj
+
+
diff --git a/voucherify/models/management_projects_branding_update_request_body_cockpits.py b/voucherify/models/management_projects_branding_update_request_body_cockpits.py
new file mode 100644
index 00000000..52b11019
--- /dev/null
+++ b/voucherify/models/management_projects_branding_update_request_body_cockpits.py
@@ -0,0 +1,152 @@
+# coding: utf-8
+
+"""
+ Voucherify API
+
+ Voucherify promotion engine REST API. Please see https://docs.voucherify.io/docs for more details.
+
+ The version of the OpenAPI document: v2018-08-01
+ Contact: support@voucherify.io
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr, field_validator
+from typing import Any, ClassVar, Dict, List, Optional
+from typing import Optional, Set
+from typing_extensions import Self
+
+class ManagementProjectsBrandingUpdateRequestBodyCockpits(BaseModel):
+ """
+ Defines customer cockpit details.
+ """ # noqa: E501
+ campaigns_overview_enabled: Optional[StrictBool] = Field(default=None, description="Indicates if the campaign overview is turned on for customers.")
+ loyalty_enabled: Optional[StrictBool] = Field(default=None, description="Indicates if the loyalty campaign overview is turned on for customers.")
+ gift_cards_enabled: Optional[StrictBool] = Field(default=None, description="Indicates if the gift card overview is turned on for customers.")
+ coupons_enabled: Optional[StrictBool] = Field(default=None, description="Indicates if the discount coupon overview is turned on for customers.")
+ referrals_enabled: Optional[StrictBool] = Field(default=None, description="Indicates if the referral campaign overview is turned on for customers.")
+ theme: Optional[StrictStr] = Field(default=None, description="Determines the color scheme of the customer cockpit.")
+ use_custom_double_opt_in_redirect_url: Optional[StrictBool] = Field(default=None, description="Indicates if the double opt-in option is turned on.")
+ custom_double_opt_in_redirect_url: Optional[StrictStr] = Field(default=None, description="Defines the URL for the double opt-in consent.")
+ __properties: ClassVar[List[str]] = ["campaigns_overview_enabled", "loyalty_enabled", "gift_cards_enabled", "coupons_enabled", "referrals_enabled", "theme", "use_custom_double_opt_in_redirect_url", "custom_double_opt_in_redirect_url"]
+
+ @field_validator('theme')
+ def theme_validate_enum(cls, value):
+ """Validates the enum"""
+ if value is None:
+ return value
+
+ if value not in set(['orange', 'green', 'dark-green', 'blue', 'purple', 'red', 'grey']):
+ raise ValueError("must be one of enum values ('orange', 'green', 'dark-green', 'blue', 'purple', 'red', 'grey')")
+ return value
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of ManagementProjectsBrandingUpdateRequestBodyCockpits from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([
+ ])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ # set to None if campaigns_overview_enabled (nullable) is None
+ # and model_fields_set contains the field
+ if self.campaigns_overview_enabled is None and "campaigns_overview_enabled" in self.model_fields_set:
+ _dict['campaigns_overview_enabled'] = None
+
+ # set to None if loyalty_enabled (nullable) is None
+ # and model_fields_set contains the field
+ if self.loyalty_enabled is None and "loyalty_enabled" in self.model_fields_set:
+ _dict['loyalty_enabled'] = None
+
+ # set to None if gift_cards_enabled (nullable) is None
+ # and model_fields_set contains the field
+ if self.gift_cards_enabled is None and "gift_cards_enabled" in self.model_fields_set:
+ _dict['gift_cards_enabled'] = None
+
+ # set to None if coupons_enabled (nullable) is None
+ # and model_fields_set contains the field
+ if self.coupons_enabled is None and "coupons_enabled" in self.model_fields_set:
+ _dict['coupons_enabled'] = None
+
+ # set to None if referrals_enabled (nullable) is None
+ # and model_fields_set contains the field
+ if self.referrals_enabled is None and "referrals_enabled" in self.model_fields_set:
+ _dict['referrals_enabled'] = None
+
+ # set to None if theme (nullable) is None
+ # and model_fields_set contains the field
+ if self.theme is None and "theme" in self.model_fields_set:
+ _dict['theme'] = None
+
+ # set to None if use_custom_double_opt_in_redirect_url (nullable) is None
+ # and model_fields_set contains the field
+ if self.use_custom_double_opt_in_redirect_url is None and "use_custom_double_opt_in_redirect_url" in self.model_fields_set:
+ _dict['use_custom_double_opt_in_redirect_url'] = None
+
+ # set to None if custom_double_opt_in_redirect_url (nullable) is None
+ # and model_fields_set contains the field
+ if self.custom_double_opt_in_redirect_url is None and "custom_double_opt_in_redirect_url" in self.model_fields_set:
+ _dict['custom_double_opt_in_redirect_url'] = None
+
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of ManagementProjectsBrandingUpdateRequestBodyCockpits from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "campaigns_overview_enabled": obj.get("campaigns_overview_enabled"),
+ "loyalty_enabled": obj.get("loyalty_enabled"),
+ "gift_cards_enabled": obj.get("gift_cards_enabled"),
+ "coupons_enabled": obj.get("coupons_enabled"),
+ "referrals_enabled": obj.get("referrals_enabled"),
+ "theme": obj.get("theme"),
+ "use_custom_double_opt_in_redirect_url": obj.get("use_custom_double_opt_in_redirect_url"),
+ "custom_double_opt_in_redirect_url": obj.get("custom_double_opt_in_redirect_url")
+ })
+ return _obj
+
+
diff --git a/voucherify/models/management_projects_branding_update_request_body_contact.py b/voucherify/models/management_projects_branding_update_request_body_contact.py
new file mode 100644
index 00000000..8e984645
--- /dev/null
+++ b/voucherify/models/management_projects_branding_update_request_body_contact.py
@@ -0,0 +1,100 @@
+# coding: utf-8
+
+"""
+ Voucherify API
+
+ Voucherify promotion engine REST API. Please see https://docs.voucherify.io/docs for more details.
+
+ The version of the OpenAPI document: v2018-08-01
+ Contact: support@voucherify.io
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict, Field, StrictStr
+from typing import Any, ClassVar, Dict, List, Optional
+from typing import Optional, Set
+from typing_extensions import Self
+
+class ManagementProjectsBrandingUpdateRequestBodyContact(BaseModel):
+ """
+ Defines contact details.
+ """ # noqa: E501
+ email: Optional[StrictStr] = Field(default=None, description="Defines the brand's email address. It must be a valid email format.")
+ phone: Optional[StrictStr] = Field(default=None, description="Defines the brand's phone number.")
+ __properties: ClassVar[List[str]] = ["email", "phone"]
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of ManagementProjectsBrandingUpdateRequestBodyContact from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([
+ ])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ # set to None if email (nullable) is None
+ # and model_fields_set contains the field
+ if self.email is None and "email" in self.model_fields_set:
+ _dict['email'] = None
+
+ # set to None if phone (nullable) is None
+ # and model_fields_set contains the field
+ if self.phone is None and "phone" in self.model_fields_set:
+ _dict['phone'] = None
+
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of ManagementProjectsBrandingUpdateRequestBodyContact from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "email": obj.get("email"),
+ "phone": obj.get("phone")
+ })
+ return _obj
+
+
diff --git a/voucherify/models/management_projects_branding_update_response_body.py b/voucherify/models/management_projects_branding_update_response_body.py
new file mode 100644
index 00000000..aa43fb42
--- /dev/null
+++ b/voucherify/models/management_projects_branding_update_response_body.py
@@ -0,0 +1,137 @@
+# coding: utf-8
+
+"""
+ Voucherify API
+
+ Voucherify promotion engine REST API. Please see https://docs.voucherify.io/docs for more details.
+
+ The version of the OpenAPI document: v2018-08-01
+ Contact: support@voucherify.io
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict, Field, StrictStr
+from typing import Any, ClassVar, Dict, List, Optional
+from voucherify.models.management_projects_branding_update_response_body_address import ManagementProjectsBrandingUpdateResponseBodyAddress
+from voucherify.models.management_projects_branding_update_response_body_brand import ManagementProjectsBrandingUpdateResponseBodyBrand
+from voucherify.models.management_projects_branding_update_response_body_cockpits import ManagementProjectsBrandingUpdateResponseBodyCockpits
+from voucherify.models.management_projects_branding_update_response_body_contact import ManagementProjectsBrandingUpdateResponseBodyContact
+from typing import Optional, Set
+from typing_extensions import Self
+
+class ManagementProjectsBrandingUpdateResponseBody(BaseModel):
+ """
+ Response body schema for **PUT** `/management/v1/projects/{projectId}/branding/{brandingId}`.
+ """ # noqa: E501
+ id: Optional[StrictStr] = Field(default=None, description="Unique identifier of the brand configuration.")
+ brand: Optional[ManagementProjectsBrandingUpdateResponseBodyBrand] = None
+ address: Optional[ManagementProjectsBrandingUpdateResponseBodyAddress] = None
+ contact: Optional[ManagementProjectsBrandingUpdateResponseBodyContact] = None
+ cockpits: Optional[ManagementProjectsBrandingUpdateResponseBodyCockpits] = None
+ __properties: ClassVar[List[str]] = ["id", "brand", "address", "contact", "cockpits"]
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of ManagementProjectsBrandingUpdateResponseBody from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([
+ ])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ # override the default output from pydantic by calling `to_dict()` of brand
+ if self.brand:
+ _dict['brand'] = self.brand.to_dict()
+ # override the default output from pydantic by calling `to_dict()` of address
+ if self.address:
+ _dict['address'] = self.address.to_dict()
+ # override the default output from pydantic by calling `to_dict()` of contact
+ if self.contact:
+ _dict['contact'] = self.contact.to_dict()
+ # override the default output from pydantic by calling `to_dict()` of cockpits
+ if self.cockpits:
+ _dict['cockpits'] = self.cockpits.to_dict()
+ # set to None if id (nullable) is None
+ # and model_fields_set contains the field
+ if self.id is None and "id" in self.model_fields_set:
+ _dict['id'] = None
+
+ # set to None if brand (nullable) is None
+ # and model_fields_set contains the field
+ if self.brand is None and "brand" in self.model_fields_set:
+ _dict['brand'] = None
+
+ # set to None if address (nullable) is None
+ # and model_fields_set contains the field
+ if self.address is None and "address" in self.model_fields_set:
+ _dict['address'] = None
+
+ # set to None if contact (nullable) is None
+ # and model_fields_set contains the field
+ if self.contact is None and "contact" in self.model_fields_set:
+ _dict['contact'] = None
+
+ # set to None if cockpits (nullable) is None
+ # and model_fields_set contains the field
+ if self.cockpits is None and "cockpits" in self.model_fields_set:
+ _dict['cockpits'] = None
+
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of ManagementProjectsBrandingUpdateResponseBody from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "id": obj.get("id"),
+ "brand": ManagementProjectsBrandingUpdateResponseBodyBrand.from_dict(obj["brand"]) if obj.get("brand") is not None else None,
+ "address": ManagementProjectsBrandingUpdateResponseBodyAddress.from_dict(obj["address"]) if obj.get("address") is not None else None,
+ "contact": ManagementProjectsBrandingUpdateResponseBodyContact.from_dict(obj["contact"]) if obj.get("contact") is not None else None,
+ "cockpits": ManagementProjectsBrandingUpdateResponseBodyCockpits.from_dict(obj["cockpits"]) if obj.get("cockpits") is not None else None
+ })
+ return _obj
+
+
diff --git a/voucherify/models/management_projects_branding_update_response_body_address.py b/voucherify/models/management_projects_branding_update_response_body_address.py
new file mode 100644
index 00000000..6caeb479
--- /dev/null
+++ b/voucherify/models/management_projects_branding_update_response_body_address.py
@@ -0,0 +1,121 @@
+# coding: utf-8
+
+"""
+ Voucherify API
+
+ Voucherify promotion engine REST API. Please see https://docs.voucherify.io/docs for more details.
+
+ The version of the OpenAPI document: v2018-08-01
+ Contact: support@voucherify.io
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict, Field, StrictStr
+from typing import Any, ClassVar, Dict, List, Optional
+from typing import Optional, Set
+from typing_extensions import Self
+
+class ManagementProjectsBrandingUpdateResponseBodyAddress(BaseModel):
+ """
+ Defines the address details.
+ """ # noqa: E501
+ street: Optional[StrictStr] = Field(default=None, description="Defines the brand's street.")
+ city: Optional[StrictStr] = Field(default=None, description="Defines the brand's city.")
+ postal: Optional[StrictStr] = Field(default=None, description="Defines the brand's postal code.")
+ state: Optional[StrictStr] = Field(default=None, description="Defines the brand's state or similar administrative area.")
+ country: Optional[StrictStr] = Field(default=None, description="Defines the brand's country.")
+ __properties: ClassVar[List[str]] = ["street", "city", "postal", "state", "country"]
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of ManagementProjectsBrandingUpdateResponseBodyAddress from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([
+ ])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ # set to None if street (nullable) is None
+ # and model_fields_set contains the field
+ if self.street is None and "street" in self.model_fields_set:
+ _dict['street'] = None
+
+ # set to None if city (nullable) is None
+ # and model_fields_set contains the field
+ if self.city is None and "city" in self.model_fields_set:
+ _dict['city'] = None
+
+ # set to None if postal (nullable) is None
+ # and model_fields_set contains the field
+ if self.postal is None and "postal" in self.model_fields_set:
+ _dict['postal'] = None
+
+ # set to None if state (nullable) is None
+ # and model_fields_set contains the field
+ if self.state is None and "state" in self.model_fields_set:
+ _dict['state'] = None
+
+ # set to None if country (nullable) is None
+ # and model_fields_set contains the field
+ if self.country is None and "country" in self.model_fields_set:
+ _dict['country'] = None
+
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of ManagementProjectsBrandingUpdateResponseBodyAddress from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "street": obj.get("street"),
+ "city": obj.get("city"),
+ "postal": obj.get("postal"),
+ "state": obj.get("state"),
+ "country": obj.get("country")
+ })
+ return _obj
+
+
diff --git a/voucherify/models/management_projects_branding_update_response_body_brand.py b/voucherify/models/management_projects_branding_update_response_body_brand.py
new file mode 100644
index 00000000..be3a08b0
--- /dev/null
+++ b/voucherify/models/management_projects_branding_update_response_body_brand.py
@@ -0,0 +1,121 @@
+# coding: utf-8
+
+"""
+ Voucherify API
+
+ Voucherify promotion engine REST API. Please see https://docs.voucherify.io/docs for more details.
+
+ The version of the OpenAPI document: v2018-08-01
+ Contact: support@voucherify.io
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict, Field, StrictStr
+from typing import Any, ClassVar, Dict, List, Optional
+from typing import Optional, Set
+from typing_extensions import Self
+
+class ManagementProjectsBrandingUpdateResponseBodyBrand(BaseModel):
+ """
+ Defines basic brand details.
+ """ # noqa: E501
+ name: Optional[StrictStr] = Field(default=None, description="Defines brand name.")
+ privacy_policy_url: Optional[StrictStr] = Field(default=None, description="Defines the URL to the brand's privacy policy. It must be a valid URL format.")
+ terms_of_use_url: Optional[StrictStr] = Field(default=None, description="Defines the URL to the brand's terms of use. It must be a valid URL format.")
+ permission_reminder: Optional[StrictStr] = Field(default=None, description="Defines the message that is displayed to customers who opted in an email newsletter.")
+ website_url: Optional[StrictStr] = Field(default=None, description="Defines the URL to the brand's website. It must be a valid URL format.")
+ __properties: ClassVar[List[str]] = ["name", "privacy_policy_url", "terms_of_use_url", "permission_reminder", "website_url"]
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of ManagementProjectsBrandingUpdateResponseBodyBrand from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([
+ ])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ # set to None if name (nullable) is None
+ # and model_fields_set contains the field
+ if self.name is None and "name" in self.model_fields_set:
+ _dict['name'] = None
+
+ # set to None if privacy_policy_url (nullable) is None
+ # and model_fields_set contains the field
+ if self.privacy_policy_url is None and "privacy_policy_url" in self.model_fields_set:
+ _dict['privacy_policy_url'] = None
+
+ # set to None if terms_of_use_url (nullable) is None
+ # and model_fields_set contains the field
+ if self.terms_of_use_url is None and "terms_of_use_url" in self.model_fields_set:
+ _dict['terms_of_use_url'] = None
+
+ # set to None if permission_reminder (nullable) is None
+ # and model_fields_set contains the field
+ if self.permission_reminder is None and "permission_reminder" in self.model_fields_set:
+ _dict['permission_reminder'] = None
+
+ # set to None if website_url (nullable) is None
+ # and model_fields_set contains the field
+ if self.website_url is None and "website_url" in self.model_fields_set:
+ _dict['website_url'] = None
+
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of ManagementProjectsBrandingUpdateResponseBodyBrand from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "name": obj.get("name"),
+ "privacy_policy_url": obj.get("privacy_policy_url"),
+ "terms_of_use_url": obj.get("terms_of_use_url"),
+ "permission_reminder": obj.get("permission_reminder"),
+ "website_url": obj.get("website_url")
+ })
+ return _obj
+
+
diff --git a/voucherify/models/management_projects_branding_update_response_body_cockpits.py b/voucherify/models/management_projects_branding_update_response_body_cockpits.py
new file mode 100644
index 00000000..3610a112
--- /dev/null
+++ b/voucherify/models/management_projects_branding_update_response_body_cockpits.py
@@ -0,0 +1,152 @@
+# coding: utf-8
+
+"""
+ Voucherify API
+
+ Voucherify promotion engine REST API. Please see https://docs.voucherify.io/docs for more details.
+
+ The version of the OpenAPI document: v2018-08-01
+ Contact: support@voucherify.io
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr, field_validator
+from typing import Any, ClassVar, Dict, List, Optional
+from typing import Optional, Set
+from typing_extensions import Self
+
+class ManagementProjectsBrandingUpdateResponseBodyCockpits(BaseModel):
+ """
+ Defines customer cockpit details.
+ """ # noqa: E501
+ campaigns_overview_enabled: Optional[StrictBool] = Field(default=None, description="Enables the campaign overview for customers.")
+ loyalty_enabled: Optional[StrictBool] = Field(default=None, description="Enables the loyalty campaign overview for customers.")
+ gift_cards_enabled: Optional[StrictBool] = Field(default=None, description="Enables the gift card overview for customers.")
+ coupons_enabled: Optional[StrictBool] = Field(default=None, description="Enables the discount coupon overview for customers.")
+ referrals_enabled: Optional[StrictBool] = Field(default=None, description="Enables the referral campaign overview for customers.")
+ theme: Optional[StrictStr] = Field(default=None, description="Determines the color scheme of the customer cockpit.")
+ use_custom_double_opt_in_redirect_url: Optional[StrictBool] = Field(default=None, description="Enables the double opt-in option. It must be a valid URL format.")
+ custom_double_opt_in_redirect_url: Optional[StrictStr] = Field(default=None, description="Defines the URL for the double opt-in consent. It must be a valid URL format.")
+ __properties: ClassVar[List[str]] = ["campaigns_overview_enabled", "loyalty_enabled", "gift_cards_enabled", "coupons_enabled", "referrals_enabled", "theme", "use_custom_double_opt_in_redirect_url", "custom_double_opt_in_redirect_url"]
+
+ @field_validator('theme')
+ def theme_validate_enum(cls, value):
+ """Validates the enum"""
+ if value is None:
+ return value
+
+ if value not in set(['blue', 'dark-green', 'default', 'green', 'grey', 'orange', 'purple', 'red']):
+ raise ValueError("must be one of enum values ('blue', 'dark-green', 'default', 'green', 'grey', 'orange', 'purple', 'red')")
+ return value
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of ManagementProjectsBrandingUpdateResponseBodyCockpits from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([
+ ])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ # set to None if campaigns_overview_enabled (nullable) is None
+ # and model_fields_set contains the field
+ if self.campaigns_overview_enabled is None and "campaigns_overview_enabled" in self.model_fields_set:
+ _dict['campaigns_overview_enabled'] = None
+
+ # set to None if loyalty_enabled (nullable) is None
+ # and model_fields_set contains the field
+ if self.loyalty_enabled is None and "loyalty_enabled" in self.model_fields_set:
+ _dict['loyalty_enabled'] = None
+
+ # set to None if gift_cards_enabled (nullable) is None
+ # and model_fields_set contains the field
+ if self.gift_cards_enabled is None and "gift_cards_enabled" in self.model_fields_set:
+ _dict['gift_cards_enabled'] = None
+
+ # set to None if coupons_enabled (nullable) is None
+ # and model_fields_set contains the field
+ if self.coupons_enabled is None and "coupons_enabled" in self.model_fields_set:
+ _dict['coupons_enabled'] = None
+
+ # set to None if referrals_enabled (nullable) is None
+ # and model_fields_set contains the field
+ if self.referrals_enabled is None and "referrals_enabled" in self.model_fields_set:
+ _dict['referrals_enabled'] = None
+
+ # set to None if theme (nullable) is None
+ # and model_fields_set contains the field
+ if self.theme is None and "theme" in self.model_fields_set:
+ _dict['theme'] = None
+
+ # set to None if use_custom_double_opt_in_redirect_url (nullable) is None
+ # and model_fields_set contains the field
+ if self.use_custom_double_opt_in_redirect_url is None and "use_custom_double_opt_in_redirect_url" in self.model_fields_set:
+ _dict['use_custom_double_opt_in_redirect_url'] = None
+
+ # set to None if custom_double_opt_in_redirect_url (nullable) is None
+ # and model_fields_set contains the field
+ if self.custom_double_opt_in_redirect_url is None and "custom_double_opt_in_redirect_url" in self.model_fields_set:
+ _dict['custom_double_opt_in_redirect_url'] = None
+
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of ManagementProjectsBrandingUpdateResponseBodyCockpits from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "campaigns_overview_enabled": obj.get("campaigns_overview_enabled"),
+ "loyalty_enabled": obj.get("loyalty_enabled"),
+ "gift_cards_enabled": obj.get("gift_cards_enabled"),
+ "coupons_enabled": obj.get("coupons_enabled"),
+ "referrals_enabled": obj.get("referrals_enabled"),
+ "theme": obj.get("theme"),
+ "use_custom_double_opt_in_redirect_url": obj.get("use_custom_double_opt_in_redirect_url"),
+ "custom_double_opt_in_redirect_url": obj.get("custom_double_opt_in_redirect_url")
+ })
+ return _obj
+
+
diff --git a/voucherify/models/management_projects_branding_update_response_body_contact.py b/voucherify/models/management_projects_branding_update_response_body_contact.py
new file mode 100644
index 00000000..347768de
--- /dev/null
+++ b/voucherify/models/management_projects_branding_update_response_body_contact.py
@@ -0,0 +1,100 @@
+# coding: utf-8
+
+"""
+ Voucherify API
+
+ Voucherify promotion engine REST API. Please see https://docs.voucherify.io/docs for more details.
+
+ The version of the OpenAPI document: v2018-08-01
+ Contact: support@voucherify.io
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict, Field, StrictStr
+from typing import Any, ClassVar, Dict, List, Optional
+from typing import Optional, Set
+from typing_extensions import Self
+
+class ManagementProjectsBrandingUpdateResponseBodyContact(BaseModel):
+ """
+ Defines contact details.
+ """ # noqa: E501
+ email: Optional[StrictStr] = Field(default=None, description="Defines the brand's email address. It must be a valid email format.")
+ phone: Optional[StrictStr] = Field(default=None, description="Defines the brand's phone number.")
+ __properties: ClassVar[List[str]] = ["email", "phone"]
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of ManagementProjectsBrandingUpdateResponseBodyContact from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([
+ ])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ # set to None if email (nullable) is None
+ # and model_fields_set contains the field
+ if self.email is None and "email" in self.model_fields_set:
+ _dict['email'] = None
+
+ # set to None if phone (nullable) is None
+ # and model_fields_set contains the field
+ if self.phone is None and "phone" in self.model_fields_set:
+ _dict['phone'] = None
+
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of ManagementProjectsBrandingUpdateResponseBodyContact from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "email": obj.get("email"),
+ "phone": obj.get("phone")
+ })
+ return _obj
+
+
diff --git a/voucherify/models/management_projects_create_request_body.py b/voucherify/models/management_projects_create_request_body.py
new file mode 100644
index 00000000..c832558a
--- /dev/null
+++ b/voucherify/models/management_projects_create_request_body.py
@@ -0,0 +1,255 @@
+# coding: utf-8
+
+"""
+ Voucherify API
+
+ Voucherify promotion engine REST API. Please see https://docs.voucherify.io/docs for more details.
+
+ The version of the OpenAPI document: v2018-08-01
+ Contact: support@voucherify.io
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr, field_validator
+from typing import Any, ClassVar, Dict, List, Optional
+from voucherify.models.management_projects_create_request_body_api_usage_notifications import ManagementProjectsCreateRequestBodyApiUsageNotifications
+from voucherify.models.management_projects_create_request_body_users_item import ManagementProjectsCreateRequestBodyUsersItem
+from voucherify.models.management_projects_create_request_body_webhooks_callout_notifications import ManagementProjectsCreateRequestBodyWebhooksCalloutNotifications
+from typing import Optional, Set
+from typing_extensions import Self
+
+class ManagementProjectsCreateRequestBody(BaseModel):
+ """
+ Request body schema for **POST** `/management/v1/projects`.
+ """ # noqa: E501
+ case_sensitive_codes: Optional[StrictBool] = Field(default=None, description="Determines if the vouchers in the project will be case sensitive (if `true`, `C0dE-cfV` is not equal to `c0de-cfv`) or case insensitive (if false, `C0dE-cfV` is equal to `c0de-cfv`).")
+ name: Optional[StrictStr] = Field(default=None, description="The name of the project.")
+ description: Optional[StrictStr] = Field(default=None, description="A user-defined description of the project, e.g. its purpose, scope, region.")
+ timezone: Optional[StrictStr] = Field(default=None, description="The time zone in which the project is established. It can be in the GMT format or in accordance with IANA time zone database.")
+ currency: Optional[StrictStr] = Field(default=None, description="The currency used in the project. It is equal to a 3-letter ISO 4217 code.")
+ dial_code: Optional[StrictStr] = Field(default=None, description="The country dial code for the project. It is equal to an ITU country code.")
+ webhook_version: Optional[StrictStr] = Field(default='v2024-01-01', description="The webhook version used in the project.")
+ client_trusted_domains: Optional[List[StrictStr]] = Field(default=None, description="An array of URL addresses that allow client requests.")
+ client_redeem_enabled: Optional[StrictBool] = Field(default=None, description="Enables client-side redemption.")
+ client_publish_enabled: Optional[StrictBool] = Field(default=None, description="Enables client-side publication.")
+ client_list_vouchers_enabled: Optional[StrictBool] = Field(default=None, description="Enables client-side listing of vouchers.")
+ client_create_customer_enabled: Optional[StrictBool] = Field(default=None, description="Enables client-side creation of customers.")
+ client_loyalty_events_enabled: Optional[StrictBool] = Field(default=None, description="Enables client-side events for loyalty and referral programs.")
+ client_set_voucher_expiration_date_enabled: Optional[StrictBool] = Field(default=None, description="Enables client-side setting of voucher expiration date.")
+ webhooks_callout_notifications: Optional[ManagementProjectsCreateRequestBodyWebhooksCalloutNotifications] = None
+ api_usage_notifications: Optional[ManagementProjectsCreateRequestBodyApiUsageNotifications] = None
+ cluster_id: Optional[StrictStr] = Field(default=None, description="The identifier of the cluster where the project will be created. The default cluster is `eu1` unless otherwise configured.")
+ api_version: Optional[StrictStr] = Field(default='v2018-08-01', description="The API version used in the project. Currently, the default and only value is `v2018-08-01`.")
+ users: Optional[List[ManagementProjectsCreateRequestBodyUsersItem]] = Field(default=None, description="The users (their identifiers, logins, and roles) who will be assigned to the project. You can assign only existing Voucherify users. It must be used either in the following combinations: - `id` and `role`, or - `login` and `role`.")
+ __properties: ClassVar[List[str]] = ["case_sensitive_codes", "name", "description", "timezone", "currency", "dial_code", "webhook_version", "client_trusted_domains", "client_redeem_enabled", "client_publish_enabled", "client_list_vouchers_enabled", "client_create_customer_enabled", "client_loyalty_events_enabled", "client_set_voucher_expiration_date_enabled", "webhooks_callout_notifications", "api_usage_notifications", "cluster_id", "api_version", "users"]
+
+ @field_validator('webhook_version')
+ def webhook_version_validate_enum(cls, value):
+ """Validates the enum"""
+ if value is None:
+ return value
+
+ if value not in set(['v2024-01-01']):
+ raise ValueError("must be one of enum values ('v2024-01-01')")
+ return value
+
+ @field_validator('api_version')
+ def api_version_validate_enum(cls, value):
+ """Validates the enum"""
+ if value is None:
+ return value
+
+ if value not in set(['v2018-08-01']):
+ raise ValueError("must be one of enum values ('v2018-08-01')")
+ return value
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of ManagementProjectsCreateRequestBody from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([
+ ])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ # override the default output from pydantic by calling `to_dict()` of webhooks_callout_notifications
+ if self.webhooks_callout_notifications:
+ _dict['webhooks_callout_notifications'] = self.webhooks_callout_notifications.to_dict()
+ # override the default output from pydantic by calling `to_dict()` of api_usage_notifications
+ if self.api_usage_notifications:
+ _dict['api_usage_notifications'] = self.api_usage_notifications.to_dict()
+ # override the default output from pydantic by calling `to_dict()` of each item in users (list)
+ _items = []
+ if self.users:
+ for _item_users in self.users:
+ if _item_users:
+ _items.append(_item_users.to_dict())
+ _dict['users'] = _items
+ # set to None if case_sensitive_codes (nullable) is None
+ # and model_fields_set contains the field
+ if self.case_sensitive_codes is None and "case_sensitive_codes" in self.model_fields_set:
+ _dict['case_sensitive_codes'] = None
+
+ # set to None if name (nullable) is None
+ # and model_fields_set contains the field
+ if self.name is None and "name" in self.model_fields_set:
+ _dict['name'] = None
+
+ # set to None if description (nullable) is None
+ # and model_fields_set contains the field
+ if self.description is None and "description" in self.model_fields_set:
+ _dict['description'] = None
+
+ # set to None if timezone (nullable) is None
+ # and model_fields_set contains the field
+ if self.timezone is None and "timezone" in self.model_fields_set:
+ _dict['timezone'] = None
+
+ # set to None if currency (nullable) is None
+ # and model_fields_set contains the field
+ if self.currency is None and "currency" in self.model_fields_set:
+ _dict['currency'] = None
+
+ # set to None if dial_code (nullable) is None
+ # and model_fields_set contains the field
+ if self.dial_code is None and "dial_code" in self.model_fields_set:
+ _dict['dial_code'] = None
+
+ # set to None if webhook_version (nullable) is None
+ # and model_fields_set contains the field
+ if self.webhook_version is None and "webhook_version" in self.model_fields_set:
+ _dict['webhook_version'] = None
+
+ # set to None if client_trusted_domains (nullable) is None
+ # and model_fields_set contains the field
+ if self.client_trusted_domains is None and "client_trusted_domains" in self.model_fields_set:
+ _dict['client_trusted_domains'] = None
+
+ # set to None if client_redeem_enabled (nullable) is None
+ # and model_fields_set contains the field
+ if self.client_redeem_enabled is None and "client_redeem_enabled" in self.model_fields_set:
+ _dict['client_redeem_enabled'] = None
+
+ # set to None if client_publish_enabled (nullable) is None
+ # and model_fields_set contains the field
+ if self.client_publish_enabled is None and "client_publish_enabled" in self.model_fields_set:
+ _dict['client_publish_enabled'] = None
+
+ # set to None if client_list_vouchers_enabled (nullable) is None
+ # and model_fields_set contains the field
+ if self.client_list_vouchers_enabled is None and "client_list_vouchers_enabled" in self.model_fields_set:
+ _dict['client_list_vouchers_enabled'] = None
+
+ # set to None if client_create_customer_enabled (nullable) is None
+ # and model_fields_set contains the field
+ if self.client_create_customer_enabled is None and "client_create_customer_enabled" in self.model_fields_set:
+ _dict['client_create_customer_enabled'] = None
+
+ # set to None if client_loyalty_events_enabled (nullable) is None
+ # and model_fields_set contains the field
+ if self.client_loyalty_events_enabled is None and "client_loyalty_events_enabled" in self.model_fields_set:
+ _dict['client_loyalty_events_enabled'] = None
+
+ # set to None if client_set_voucher_expiration_date_enabled (nullable) is None
+ # and model_fields_set contains the field
+ if self.client_set_voucher_expiration_date_enabled is None and "client_set_voucher_expiration_date_enabled" in self.model_fields_set:
+ _dict['client_set_voucher_expiration_date_enabled'] = None
+
+ # set to None if webhooks_callout_notifications (nullable) is None
+ # and model_fields_set contains the field
+ if self.webhooks_callout_notifications is None and "webhooks_callout_notifications" in self.model_fields_set:
+ _dict['webhooks_callout_notifications'] = None
+
+ # set to None if api_usage_notifications (nullable) is None
+ # and model_fields_set contains the field
+ if self.api_usage_notifications is None and "api_usage_notifications" in self.model_fields_set:
+ _dict['api_usage_notifications'] = None
+
+ # set to None if cluster_id (nullable) is None
+ # and model_fields_set contains the field
+ if self.cluster_id is None and "cluster_id" in self.model_fields_set:
+ _dict['cluster_id'] = None
+
+ # set to None if api_version (nullable) is None
+ # and model_fields_set contains the field
+ if self.api_version is None and "api_version" in self.model_fields_set:
+ _dict['api_version'] = None
+
+ # set to None if users (nullable) is None
+ # and model_fields_set contains the field
+ if self.users is None and "users" in self.model_fields_set:
+ _dict['users'] = None
+
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of ManagementProjectsCreateRequestBody from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "case_sensitive_codes": obj.get("case_sensitive_codes"),
+ "name": obj.get("name"),
+ "description": obj.get("description"),
+ "timezone": obj.get("timezone"),
+ "currency": obj.get("currency"),
+ "dial_code": obj.get("dial_code"),
+ "webhook_version": obj.get("webhook_version") if obj.get("webhook_version") is not None else 'v2024-01-01',
+ "client_trusted_domains": obj.get("client_trusted_domains"),
+ "client_redeem_enabled": obj.get("client_redeem_enabled"),
+ "client_publish_enabled": obj.get("client_publish_enabled"),
+ "client_list_vouchers_enabled": obj.get("client_list_vouchers_enabled"),
+ "client_create_customer_enabled": obj.get("client_create_customer_enabled"),
+ "client_loyalty_events_enabled": obj.get("client_loyalty_events_enabled"),
+ "client_set_voucher_expiration_date_enabled": obj.get("client_set_voucher_expiration_date_enabled"),
+ "webhooks_callout_notifications": ManagementProjectsCreateRequestBodyWebhooksCalloutNotifications.from_dict(obj["webhooks_callout_notifications"]) if obj.get("webhooks_callout_notifications") is not None else None,
+ "api_usage_notifications": ManagementProjectsCreateRequestBodyApiUsageNotifications.from_dict(obj["api_usage_notifications"]) if obj.get("api_usage_notifications") is not None else None,
+ "cluster_id": obj.get("cluster_id"),
+ "api_version": obj.get("api_version") if obj.get("api_version") is not None else 'v2018-08-01',
+ "users": [ManagementProjectsCreateRequestBodyUsersItem.from_dict(_item) for _item in obj["users"]] if obj.get("users") is not None else None
+ })
+ return _obj
+
+
diff --git a/voucherify/models/management_projects_create_request_body_api_usage_notifications.py b/voucherify/models/management_projects_create_request_body_api_usage_notifications.py
new file mode 100644
index 00000000..0362018c
--- /dev/null
+++ b/voucherify/models/management_projects_create_request_body_api_usage_notifications.py
@@ -0,0 +1,112 @@
+# coding: utf-8
+
+"""
+ Voucherify API
+
+ Voucherify promotion engine REST API. Please see https://docs.voucherify.io/docs for more details.
+
+ The version of the OpenAPI document: v2018-08-01
+ Contact: support@voucherify.io
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict
+from typing import Any, ClassVar, Dict, List, Optional
+from voucherify.models.usage_notifications import UsageNotifications
+from typing import Optional, Set
+from typing_extensions import Self
+
+class ManagementProjectsCreateRequestBodyApiUsageNotifications(BaseModel):
+ """
+ Determines the notification settings.
+ """ # noqa: E501
+ messages: Optional[UsageNotifications] = None
+ api_calls: Optional[UsageNotifications] = None
+ bulk_api_calls: Optional[UsageNotifications] = None
+ webhook_calls: Optional[UsageNotifications] = None
+ cycle_calls: Optional[UsageNotifications] = None
+ __properties: ClassVar[List[str]] = ["messages", "api_calls", "bulk_api_calls", "webhook_calls", "cycle_calls"]
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of ManagementProjectsCreateRequestBodyApiUsageNotifications from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([
+ ])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ # override the default output from pydantic by calling `to_dict()` of messages
+ if self.messages:
+ _dict['messages'] = self.messages.to_dict()
+ # override the default output from pydantic by calling `to_dict()` of api_calls
+ if self.api_calls:
+ _dict['api_calls'] = self.api_calls.to_dict()
+ # override the default output from pydantic by calling `to_dict()` of bulk_api_calls
+ if self.bulk_api_calls:
+ _dict['bulk_api_calls'] = self.bulk_api_calls.to_dict()
+ # override the default output from pydantic by calling `to_dict()` of webhook_calls
+ if self.webhook_calls:
+ _dict['webhook_calls'] = self.webhook_calls.to_dict()
+ # override the default output from pydantic by calling `to_dict()` of cycle_calls
+ if self.cycle_calls:
+ _dict['cycle_calls'] = self.cycle_calls.to_dict()
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of ManagementProjectsCreateRequestBodyApiUsageNotifications from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "messages": UsageNotifications.from_dict(obj["messages"]) if obj.get("messages") is not None else None,
+ "api_calls": UsageNotifications.from_dict(obj["api_calls"]) if obj.get("api_calls") is not None else None,
+ "bulk_api_calls": UsageNotifications.from_dict(obj["bulk_api_calls"]) if obj.get("bulk_api_calls") is not None else None,
+ "webhook_calls": UsageNotifications.from_dict(obj["webhook_calls"]) if obj.get("webhook_calls") is not None else None,
+ "cycle_calls": UsageNotifications.from_dict(obj["cycle_calls"]) if obj.get("cycle_calls") is not None else None
+ })
+ return _obj
+
+
diff --git a/voucherify/models/management_projects_create_request_body_users_item.py b/voucherify/models/management_projects_create_request_body_users_item.py
new file mode 100644
index 00000000..817ca3af
--- /dev/null
+++ b/voucherify/models/management_projects_create_request_body_users_item.py
@@ -0,0 +1,92 @@
+# coding: utf-8
+
+"""
+ Voucherify API
+
+ Voucherify promotion engine REST API. Please see https://docs.voucherify.io/docs for more details.
+
+ The version of the OpenAPI document: v2018-08-01
+ Contact: support@voucherify.io
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict, Field, StrictStr
+from typing import Any, ClassVar, Dict, List, Optional
+from typing import Optional, Set
+from typing_extensions import Self
+
+class ManagementProjectsCreateRequestBodyUsersItem(BaseModel):
+ """
+ Contains details about the users who will be assigned to the project. Only the `id` and `role` or `login` and `role` should be provided in the request.
+ """ # noqa: E501
+ id: Optional[StrictStr] = Field(default=None, description="The unique identifier of the user who will be assigned to the project. It can be found in Team Settings > Team > Edit member. **Required** with the `role` string. Do **not** use with the `login` string.")
+ login: Optional[StrictStr] = Field(default=None, description="The login data of the user who will be assigned to the project. **Required** with the `role` string. Do **not** use with the `id` string.")
+ role: StrictStr = Field(description="The role of the user to be added. It can be one of the following predefined roles: `ADMIN`, `USER`, `VIEWER`, `MERCHANT` or an ID of a custom role.")
+ __properties: ClassVar[List[str]] = ["id", "login", "role"]
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of ManagementProjectsCreateRequestBodyUsersItem from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([
+ ])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of ManagementProjectsCreateRequestBodyUsersItem from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "id": obj.get("id"),
+ "login": obj.get("login"),
+ "role": obj.get("role")
+ })
+ return _obj
+
+
diff --git a/voucherify/models/management_projects_create_request_body_webhooks_callout_notifications.py b/voucherify/models/management_projects_create_request_body_webhooks_callout_notifications.py
new file mode 100644
index 00000000..eb00aa68
--- /dev/null
+++ b/voucherify/models/management_projects_create_request_body_webhooks_callout_notifications.py
@@ -0,0 +1,108 @@
+# coding: utf-8
+
+"""
+ Voucherify API
+
+ Voucherify promotion engine REST API. Please see https://docs.voucherify.io/docs for more details.
+
+ The version of the OpenAPI document: v2018-08-01
+ Contact: support@voucherify.io
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict
+from typing import Any, ClassVar, Dict, List, Optional
+from voucherify.models.management_projects_create_request_body_webhooks_callout_notifications_distributions import ManagementProjectsCreateRequestBodyWebhooksCalloutNotificationsDistributions
+from voucherify.models.management_projects_create_request_body_webhooks_callout_notifications_webhooks import ManagementProjectsCreateRequestBodyWebhooksCalloutNotificationsWebhooks
+from typing import Optional, Set
+from typing_extensions import Self
+
+class ManagementProjectsCreateRequestBodyWebhooksCalloutNotifications(BaseModel):
+ """
+ Determines the notification settings for webhook callouts configured in Distributions and Project settings.
+ """ # noqa: E501
+ distributions: Optional[ManagementProjectsCreateRequestBodyWebhooksCalloutNotificationsDistributions] = None
+ webhooks: Optional[ManagementProjectsCreateRequestBodyWebhooksCalloutNotificationsWebhooks] = None
+ __properties: ClassVar[List[str]] = ["distributions", "webhooks"]
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of ManagementProjectsCreateRequestBodyWebhooksCalloutNotifications from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([
+ ])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ # override the default output from pydantic by calling `to_dict()` of distributions
+ if self.distributions:
+ _dict['distributions'] = self.distributions.to_dict()
+ # override the default output from pydantic by calling `to_dict()` of webhooks
+ if self.webhooks:
+ _dict['webhooks'] = self.webhooks.to_dict()
+ # set to None if distributions (nullable) is None
+ # and model_fields_set contains the field
+ if self.distributions is None and "distributions" in self.model_fields_set:
+ _dict['distributions'] = None
+
+ # set to None if webhooks (nullable) is None
+ # and model_fields_set contains the field
+ if self.webhooks is None and "webhooks" in self.model_fields_set:
+ _dict['webhooks'] = None
+
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of ManagementProjectsCreateRequestBodyWebhooksCalloutNotifications from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "distributions": ManagementProjectsCreateRequestBodyWebhooksCalloutNotificationsDistributions.from_dict(obj["distributions"]) if obj.get("distributions") is not None else None,
+ "webhooks": ManagementProjectsCreateRequestBodyWebhooksCalloutNotificationsWebhooks.from_dict(obj["webhooks"]) if obj.get("webhooks") is not None else None
+ })
+ return _obj
+
+
diff --git a/voucherify/models/management_projects_create_request_body_webhooks_callout_notifications_distributions.py b/voucherify/models/management_projects_create_request_body_webhooks_callout_notifications_distributions.py
new file mode 100644
index 00000000..f6e63adf
--- /dev/null
+++ b/voucherify/models/management_projects_create_request_body_webhooks_callout_notifications_distributions.py
@@ -0,0 +1,107 @@
+# coding: utf-8
+
+"""
+ Voucherify API
+
+ Voucherify promotion engine REST API. Please see https://docs.voucherify.io/docs for more details.
+
+ The version of the OpenAPI document: v2018-08-01
+ Contact: support@voucherify.io
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr
+from typing import Any, ClassVar, Dict, List, Optional
+from typing import Optional, Set
+from typing_extensions import Self
+
+class ManagementProjectsCreateRequestBodyWebhooksCalloutNotificationsDistributions(BaseModel):
+ """
+ Determines the notification settings for webhooks sent through Distributions.
+ """ # noqa: E501
+ email: Optional[StrictBool] = Field(default=None, description="Enables the notification through an email.")
+ in_app: Optional[StrictBool] = Field(default=None, description="Enables the notification through an email.")
+ emails: Optional[List[StrictStr]] = Field(default=None, description="An array of email addresses which will receive the notification.")
+ __properties: ClassVar[List[str]] = ["email", "in_app", "emails"]
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of ManagementProjectsCreateRequestBodyWebhooksCalloutNotificationsDistributions from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([
+ ])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ # set to None if email (nullable) is None
+ # and model_fields_set contains the field
+ if self.email is None and "email" in self.model_fields_set:
+ _dict['email'] = None
+
+ # set to None if in_app (nullable) is None
+ # and model_fields_set contains the field
+ if self.in_app is None and "in_app" in self.model_fields_set:
+ _dict['in_app'] = None
+
+ # set to None if emails (nullable) is None
+ # and model_fields_set contains the field
+ if self.emails is None and "emails" in self.model_fields_set:
+ _dict['emails'] = None
+
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of ManagementProjectsCreateRequestBodyWebhooksCalloutNotificationsDistributions from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "email": obj.get("email"),
+ "in_app": obj.get("in_app"),
+ "emails": obj.get("emails")
+ })
+ return _obj
+
+
diff --git a/voucherify/models/management_projects_create_request_body_webhooks_callout_notifications_webhooks.py b/voucherify/models/management_projects_create_request_body_webhooks_callout_notifications_webhooks.py
new file mode 100644
index 00000000..608d07cf
--- /dev/null
+++ b/voucherify/models/management_projects_create_request_body_webhooks_callout_notifications_webhooks.py
@@ -0,0 +1,107 @@
+# coding: utf-8
+
+"""
+ Voucherify API
+
+ Voucherify promotion engine REST API. Please see https://docs.voucherify.io/docs for more details.
+
+ The version of the OpenAPI document: v2018-08-01
+ Contact: support@voucherify.io
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr
+from typing import Any, ClassVar, Dict, List, Optional
+from typing import Optional, Set
+from typing_extensions import Self
+
+class ManagementProjectsCreateRequestBodyWebhooksCalloutNotificationsWebhooks(BaseModel):
+ """
+ Determines the notification settings for webhooks sent as set out in the Project settings.
+ """ # noqa: E501
+ email: Optional[StrictBool] = Field(default=None, description="Enables the notification through an email.")
+ in_app: Optional[StrictBool] = Field(default=None, description="Enables the notification through an email.")
+ emails: Optional[List[StrictStr]] = Field(default=None, description="An array of email addresses which will receive the notification.")
+ __properties: ClassVar[List[str]] = ["email", "in_app", "emails"]
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of ManagementProjectsCreateRequestBodyWebhooksCalloutNotificationsWebhooks from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([
+ ])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ # set to None if email (nullable) is None
+ # and model_fields_set contains the field
+ if self.email is None and "email" in self.model_fields_set:
+ _dict['email'] = None
+
+ # set to None if in_app (nullable) is None
+ # and model_fields_set contains the field
+ if self.in_app is None and "in_app" in self.model_fields_set:
+ _dict['in_app'] = None
+
+ # set to None if emails (nullable) is None
+ # and model_fields_set contains the field
+ if self.emails is None and "emails" in self.model_fields_set:
+ _dict['emails'] = None
+
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of ManagementProjectsCreateRequestBodyWebhooksCalloutNotificationsWebhooks from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "email": obj.get("email"),
+ "in_app": obj.get("in_app"),
+ "emails": obj.get("emails")
+ })
+ return _obj
+
+
diff --git a/voucherify/models/management_projects_create_response_body.py b/voucherify/models/management_projects_create_response_body.py
new file mode 100644
index 00000000..52ff5f18
--- /dev/null
+++ b/voucherify/models/management_projects_create_response_body.py
@@ -0,0 +1,283 @@
+# coding: utf-8
+
+"""
+ Voucherify API
+
+ Voucherify promotion engine REST API. Please see https://docs.voucherify.io/docs for more details.
+
+ The version of the OpenAPI document: v2018-08-01
+ Contact: support@voucherify.io
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr, field_validator
+from typing import Any, ClassVar, Dict, List, Optional
+from voucherify.models.management_projects_create_response_body_api_usage_notifications import ManagementProjectsCreateResponseBodyApiUsageNotifications
+from voucherify.models.management_projects_create_response_body_client_side_key import ManagementProjectsCreateResponseBodyClientSideKey
+from voucherify.models.management_projects_create_response_body_server_side_key import ManagementProjectsCreateResponseBodyServerSideKey
+from voucherify.models.management_projects_create_response_body_webhooks_callout_notifications import ManagementProjectsCreateResponseBodyWebhooksCalloutNotifications
+from typing import Optional, Set
+from typing_extensions import Self
+
+class ManagementProjectsCreateResponseBody(BaseModel):
+ """
+ Response body schema for **POST** `management/v1/projects`.
+ """ # noqa: E501
+ id: Optional[StrictStr] = Field(default=None, description="Unique identifier of the project.")
+ name: Optional[StrictStr] = Field(default=None, description="The name of the project.")
+ description: Optional[StrictStr] = Field(default=None, description="A user-defined description of the project, e.g. its purpose, scope, region.")
+ timezone: Optional[StrictStr] = Field(default=None, description="The time zone in which the project is established. It can be in the GMT format or in accordance with IANA time zone database.")
+ currency: Optional[StrictStr] = Field(default=None, description="The currency used in the project. It is equal to a 3-letter ISO 4217 code.")
+ dial_code: Optional[StrictStr] = Field(default=None, description="The country dial code for the project. It is equal to an ITU country code.")
+ webhook_version: Optional[StrictStr] = Field(default='v2024-01-01', description="The webhook version used in the project.")
+ client_trusted_domains: Optional[List[StrictStr]] = Field(default=None, description="An array of URL addresses that allow client requests.")
+ client_redeem_enabled: Optional[StrictBool] = Field(default=None, description="Enables client-side redemption.")
+ client_publish_enabled: Optional[StrictBool] = Field(default=None, description="Enables client-side publication.")
+ client_list_vouchers_enabled: Optional[StrictBool] = Field(default=None, description="Enables client-side listing of vouchers.")
+ client_create_customer_enabled: Optional[StrictBool] = Field(default=None, description="Enables client-side creation of customers.")
+ client_loyalty_events_enabled: Optional[StrictBool] = Field(default=None, description="Enables client-side events for loyalty and referral programs.")
+ client_set_voucher_expiration_date_enabled: Optional[StrictBool] = Field(default=None, description="Enables client-side setting of voucher expiration date.")
+ webhooks_callout_notifications: Optional[ManagementProjectsCreateResponseBodyWebhooksCalloutNotifications] = None
+ api_usage_notifications: Optional[ManagementProjectsCreateResponseBodyApiUsageNotifications] = None
+ cluster_id: Optional[StrictStr] = Field(default=None, description="The identifier of the cluster where the project will be created.")
+ case_sensitive_codes: Optional[StrictBool] = Field(default=None, description="Determines if the vouchers in the project will be: - case sensitive - if `true`, `C0dE-cfV` is **not** equal to `c0de-cfv`), - case insensitive - if `false`, `C0dE-cfV` is equal to `c0de-cfv`.")
+ api_version: Optional[StrictStr] = Field(default='v2018-08-01', description="The API version used in the project. Currently, the default and only value is `v2018-08-01`.")
+ is_sandbox: Optional[StrictBool] = Field(default=None, description="Determines if the project is a sandbox project.")
+ webhook_token: Optional[StrictStr] = Field(default=None, description="Webhook token used for authentication.")
+ server_side_key: Optional[ManagementProjectsCreateResponseBodyServerSideKey] = None
+ client_side_key: Optional[ManagementProjectsCreateResponseBodyClientSideKey] = None
+ __properties: ClassVar[List[str]] = ["id", "name", "description", "timezone", "currency", "dial_code", "webhook_version", "client_trusted_domains", "client_redeem_enabled", "client_publish_enabled", "client_list_vouchers_enabled", "client_create_customer_enabled", "client_loyalty_events_enabled", "client_set_voucher_expiration_date_enabled", "webhooks_callout_notifications", "api_usage_notifications", "cluster_id", "case_sensitive_codes", "api_version", "is_sandbox", "webhook_token", "server_side_key", "client_side_key"]
+
+ @field_validator('webhook_version')
+ def webhook_version_validate_enum(cls, value):
+ """Validates the enum"""
+ if value is None:
+ return value
+
+ if value not in set(['v2024-01-01']):
+ raise ValueError("must be one of enum values ('v2024-01-01')")
+ return value
+
+ @field_validator('api_version')
+ def api_version_validate_enum(cls, value):
+ """Validates the enum"""
+ if value is None:
+ return value
+
+ if value not in set(['v2018-08-01']):
+ raise ValueError("must be one of enum values ('v2018-08-01')")
+ return value
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of ManagementProjectsCreateResponseBody from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([
+ ])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ # override the default output from pydantic by calling `to_dict()` of webhooks_callout_notifications
+ if self.webhooks_callout_notifications:
+ _dict['webhooks_callout_notifications'] = self.webhooks_callout_notifications.to_dict()
+ # override the default output from pydantic by calling `to_dict()` of api_usage_notifications
+ if self.api_usage_notifications:
+ _dict['api_usage_notifications'] = self.api_usage_notifications.to_dict()
+ # override the default output from pydantic by calling `to_dict()` of server_side_key
+ if self.server_side_key:
+ _dict['server_side_key'] = self.server_side_key.to_dict()
+ # override the default output from pydantic by calling `to_dict()` of client_side_key
+ if self.client_side_key:
+ _dict['client_side_key'] = self.client_side_key.to_dict()
+ # set to None if id (nullable) is None
+ # and model_fields_set contains the field
+ if self.id is None and "id" in self.model_fields_set:
+ _dict['id'] = None
+
+ # set to None if name (nullable) is None
+ # and model_fields_set contains the field
+ if self.name is None and "name" in self.model_fields_set:
+ _dict['name'] = None
+
+ # set to None if description (nullable) is None
+ # and model_fields_set contains the field
+ if self.description is None and "description" in self.model_fields_set:
+ _dict['description'] = None
+
+ # set to None if timezone (nullable) is None
+ # and model_fields_set contains the field
+ if self.timezone is None and "timezone" in self.model_fields_set:
+ _dict['timezone'] = None
+
+ # set to None if currency (nullable) is None
+ # and model_fields_set contains the field
+ if self.currency is None and "currency" in self.model_fields_set:
+ _dict['currency'] = None
+
+ # set to None if dial_code (nullable) is None
+ # and model_fields_set contains the field
+ if self.dial_code is None and "dial_code" in self.model_fields_set:
+ _dict['dial_code'] = None
+
+ # set to None if webhook_version (nullable) is None
+ # and model_fields_set contains the field
+ if self.webhook_version is None and "webhook_version" in self.model_fields_set:
+ _dict['webhook_version'] = None
+
+ # set to None if client_trusted_domains (nullable) is None
+ # and model_fields_set contains the field
+ if self.client_trusted_domains is None and "client_trusted_domains" in self.model_fields_set:
+ _dict['client_trusted_domains'] = None
+
+ # set to None if client_redeem_enabled (nullable) is None
+ # and model_fields_set contains the field
+ if self.client_redeem_enabled is None and "client_redeem_enabled" in self.model_fields_set:
+ _dict['client_redeem_enabled'] = None
+
+ # set to None if client_publish_enabled (nullable) is None
+ # and model_fields_set contains the field
+ if self.client_publish_enabled is None and "client_publish_enabled" in self.model_fields_set:
+ _dict['client_publish_enabled'] = None
+
+ # set to None if client_list_vouchers_enabled (nullable) is None
+ # and model_fields_set contains the field
+ if self.client_list_vouchers_enabled is None and "client_list_vouchers_enabled" in self.model_fields_set:
+ _dict['client_list_vouchers_enabled'] = None
+
+ # set to None if client_create_customer_enabled (nullable) is None
+ # and model_fields_set contains the field
+ if self.client_create_customer_enabled is None and "client_create_customer_enabled" in self.model_fields_set:
+ _dict['client_create_customer_enabled'] = None
+
+ # set to None if client_loyalty_events_enabled (nullable) is None
+ # and model_fields_set contains the field
+ if self.client_loyalty_events_enabled is None and "client_loyalty_events_enabled" in self.model_fields_set:
+ _dict['client_loyalty_events_enabled'] = None
+
+ # set to None if client_set_voucher_expiration_date_enabled (nullable) is None
+ # and model_fields_set contains the field
+ if self.client_set_voucher_expiration_date_enabled is None and "client_set_voucher_expiration_date_enabled" in self.model_fields_set:
+ _dict['client_set_voucher_expiration_date_enabled'] = None
+
+ # set to None if webhooks_callout_notifications (nullable) is None
+ # and model_fields_set contains the field
+ if self.webhooks_callout_notifications is None and "webhooks_callout_notifications" in self.model_fields_set:
+ _dict['webhooks_callout_notifications'] = None
+
+ # set to None if api_usage_notifications (nullable) is None
+ # and model_fields_set contains the field
+ if self.api_usage_notifications is None and "api_usage_notifications" in self.model_fields_set:
+ _dict['api_usage_notifications'] = None
+
+ # set to None if cluster_id (nullable) is None
+ # and model_fields_set contains the field
+ if self.cluster_id is None and "cluster_id" in self.model_fields_set:
+ _dict['cluster_id'] = None
+
+ # set to None if case_sensitive_codes (nullable) is None
+ # and model_fields_set contains the field
+ if self.case_sensitive_codes is None and "case_sensitive_codes" in self.model_fields_set:
+ _dict['case_sensitive_codes'] = None
+
+ # set to None if api_version (nullable) is None
+ # and model_fields_set contains the field
+ if self.api_version is None and "api_version" in self.model_fields_set:
+ _dict['api_version'] = None
+
+ # set to None if is_sandbox (nullable) is None
+ # and model_fields_set contains the field
+ if self.is_sandbox is None and "is_sandbox" in self.model_fields_set:
+ _dict['is_sandbox'] = None
+
+ # set to None if webhook_token (nullable) is None
+ # and model_fields_set contains the field
+ if self.webhook_token is None and "webhook_token" in self.model_fields_set:
+ _dict['webhook_token'] = None
+
+ # set to None if server_side_key (nullable) is None
+ # and model_fields_set contains the field
+ if self.server_side_key is None and "server_side_key" in self.model_fields_set:
+ _dict['server_side_key'] = None
+
+ # set to None if client_side_key (nullable) is None
+ # and model_fields_set contains the field
+ if self.client_side_key is None and "client_side_key" in self.model_fields_set:
+ _dict['client_side_key'] = None
+
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of ManagementProjectsCreateResponseBody from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "id": obj.get("id"),
+ "name": obj.get("name"),
+ "description": obj.get("description"),
+ "timezone": obj.get("timezone"),
+ "currency": obj.get("currency"),
+ "dial_code": obj.get("dial_code"),
+ "webhook_version": obj.get("webhook_version") if obj.get("webhook_version") is not None else 'v2024-01-01',
+ "client_trusted_domains": obj.get("client_trusted_domains"),
+ "client_redeem_enabled": obj.get("client_redeem_enabled"),
+ "client_publish_enabled": obj.get("client_publish_enabled"),
+ "client_list_vouchers_enabled": obj.get("client_list_vouchers_enabled"),
+ "client_create_customer_enabled": obj.get("client_create_customer_enabled"),
+ "client_loyalty_events_enabled": obj.get("client_loyalty_events_enabled"),
+ "client_set_voucher_expiration_date_enabled": obj.get("client_set_voucher_expiration_date_enabled"),
+ "webhooks_callout_notifications": ManagementProjectsCreateResponseBodyWebhooksCalloutNotifications.from_dict(obj["webhooks_callout_notifications"]) if obj.get("webhooks_callout_notifications") is not None else None,
+ "api_usage_notifications": ManagementProjectsCreateResponseBodyApiUsageNotifications.from_dict(obj["api_usage_notifications"]) if obj.get("api_usage_notifications") is not None else None,
+ "cluster_id": obj.get("cluster_id"),
+ "case_sensitive_codes": obj.get("case_sensitive_codes"),
+ "api_version": obj.get("api_version") if obj.get("api_version") is not None else 'v2018-08-01',
+ "is_sandbox": obj.get("is_sandbox"),
+ "webhook_token": obj.get("webhook_token"),
+ "server_side_key": ManagementProjectsCreateResponseBodyServerSideKey.from_dict(obj["server_side_key"]) if obj.get("server_side_key") is not None else None,
+ "client_side_key": ManagementProjectsCreateResponseBodyClientSideKey.from_dict(obj["client_side_key"]) if obj.get("client_side_key") is not None else None
+ })
+ return _obj
+
+
diff --git a/voucherify/models/management_projects_create_response_body_api_usage_notifications.py b/voucherify/models/management_projects_create_response_body_api_usage_notifications.py
new file mode 100644
index 00000000..ed31f9c7
--- /dev/null
+++ b/voucherify/models/management_projects_create_response_body_api_usage_notifications.py
@@ -0,0 +1,117 @@
+# coding: utf-8
+
+"""
+ Voucherify API
+
+ Voucherify promotion engine REST API. Please see https://docs.voucherify.io/docs for more details.
+
+ The version of the OpenAPI document: v2018-08-01
+ Contact: support@voucherify.io
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict
+from typing import Any, ClassVar, Dict, List, Optional
+from voucherify.models.usage_notifications import UsageNotifications
+from typing import Optional, Set
+from typing_extensions import Self
+
+class ManagementProjectsCreateResponseBodyApiUsageNotifications(BaseModel):
+ """
+ Determines the notification settings.
+ """ # noqa: E501
+ redemptions: Optional[UsageNotifications] = None
+ messages: Optional[UsageNotifications] = None
+ api_calls: Optional[UsageNotifications] = None
+ bulk_api_calls: Optional[UsageNotifications] = None
+ webhook_calls: Optional[UsageNotifications] = None
+ cycle_calls: Optional[UsageNotifications] = None
+ __properties: ClassVar[List[str]] = ["redemptions", "messages", "api_calls", "bulk_api_calls", "webhook_calls", "cycle_calls"]
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of ManagementProjectsCreateResponseBodyApiUsageNotifications from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([
+ ])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ # override the default output from pydantic by calling `to_dict()` of redemptions
+ if self.redemptions:
+ _dict['redemptions'] = self.redemptions.to_dict()
+ # override the default output from pydantic by calling `to_dict()` of messages
+ if self.messages:
+ _dict['messages'] = self.messages.to_dict()
+ # override the default output from pydantic by calling `to_dict()` of api_calls
+ if self.api_calls:
+ _dict['api_calls'] = self.api_calls.to_dict()
+ # override the default output from pydantic by calling `to_dict()` of bulk_api_calls
+ if self.bulk_api_calls:
+ _dict['bulk_api_calls'] = self.bulk_api_calls.to_dict()
+ # override the default output from pydantic by calling `to_dict()` of webhook_calls
+ if self.webhook_calls:
+ _dict['webhook_calls'] = self.webhook_calls.to_dict()
+ # override the default output from pydantic by calling `to_dict()` of cycle_calls
+ if self.cycle_calls:
+ _dict['cycle_calls'] = self.cycle_calls.to_dict()
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of ManagementProjectsCreateResponseBodyApiUsageNotifications from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "redemptions": UsageNotifications.from_dict(obj["redemptions"]) if obj.get("redemptions") is not None else None,
+ "messages": UsageNotifications.from_dict(obj["messages"]) if obj.get("messages") is not None else None,
+ "api_calls": UsageNotifications.from_dict(obj["api_calls"]) if obj.get("api_calls") is not None else None,
+ "bulk_api_calls": UsageNotifications.from_dict(obj["bulk_api_calls"]) if obj.get("bulk_api_calls") is not None else None,
+ "webhook_calls": UsageNotifications.from_dict(obj["webhook_calls"]) if obj.get("webhook_calls") is not None else None,
+ "cycle_calls": UsageNotifications.from_dict(obj["cycle_calls"]) if obj.get("cycle_calls") is not None else None
+ })
+ return _obj
+
+
diff --git a/voucherify/models/management_projects_create_response_body_client_side_key.py b/voucherify/models/management_projects_create_response_body_client_side_key.py
new file mode 100644
index 00000000..34edd30e
--- /dev/null
+++ b/voucherify/models/management_projects_create_response_body_client_side_key.py
@@ -0,0 +1,100 @@
+# coding: utf-8
+
+"""
+ Voucherify API
+
+ Voucherify promotion engine REST API. Please see https://docs.voucherify.io/docs for more details.
+
+ The version of the OpenAPI document: v2018-08-01
+ Contact: support@voucherify.io
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict, Field, StrictStr
+from typing import Any, ClassVar, Dict, List, Optional
+from typing import Optional, Set
+from typing_extensions import Self
+
+class ManagementProjectsCreateResponseBodyClientSideKey(BaseModel):
+ """
+ Contains the `app_id` and `app_token` to authenticate client-side requests.
+ """ # noqa: E501
+ app_id: Optional[StrictStr] = Field(default=None, description="Application ID to be used as `X-App-Id` header in every HTTP request.")
+ app_token: Optional[StrictStr] = Field(default=None, description="Application token to be used as `X-App-Token` header in every HTTP request. The application token (secret key) for the client-side authentication is visible in the Project Settings for 14 days when it is first generated in a newly-created project. Write your application token down and keep it in a safe place.")
+ __properties: ClassVar[List[str]] = ["app_id", "app_token"]
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of ManagementProjectsCreateResponseBodyClientSideKey from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([
+ ])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ # set to None if app_id (nullable) is None
+ # and model_fields_set contains the field
+ if self.app_id is None and "app_id" in self.model_fields_set:
+ _dict['app_id'] = None
+
+ # set to None if app_token (nullable) is None
+ # and model_fields_set contains the field
+ if self.app_token is None and "app_token" in self.model_fields_set:
+ _dict['app_token'] = None
+
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of ManagementProjectsCreateResponseBodyClientSideKey from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "app_id": obj.get("app_id"),
+ "app_token": obj.get("app_token")
+ })
+ return _obj
+
+
diff --git a/voucherify/models/management_projects_create_response_body_server_side_key.py b/voucherify/models/management_projects_create_response_body_server_side_key.py
new file mode 100644
index 00000000..0faa5103
--- /dev/null
+++ b/voucherify/models/management_projects_create_response_body_server_side_key.py
@@ -0,0 +1,100 @@
+# coding: utf-8
+
+"""
+ Voucherify API
+
+ Voucherify promotion engine REST API. Please see https://docs.voucherify.io/docs for more details.
+
+ The version of the OpenAPI document: v2018-08-01
+ Contact: support@voucherify.io
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict, Field, StrictStr
+from typing import Any, ClassVar, Dict, List, Optional
+from typing import Optional, Set
+from typing_extensions import Self
+
+class ManagementProjectsCreateResponseBodyServerSideKey(BaseModel):
+ """
+ Contains the `app_id` and `app_token` to authenticate server-side requests.
+ """ # noqa: E501
+ app_id: Optional[StrictStr] = Field(default=None, description="Application ID to be used as `X-App-Id` header in every HTTP request.")
+ app_token: Optional[StrictStr] = Field(default=None, description="Application token to be used as `X-App-Token` header in every HTTP request. The application token (secret key) for the server-side authentication is visible in the Project Settings for 14 days when it is first generated in a newly-created project. Write your application token down and keep it in a safe place.")
+ __properties: ClassVar[List[str]] = ["app_id", "app_token"]
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of ManagementProjectsCreateResponseBodyServerSideKey from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([
+ ])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ # set to None if app_id (nullable) is None
+ # and model_fields_set contains the field
+ if self.app_id is None and "app_id" in self.model_fields_set:
+ _dict['app_id'] = None
+
+ # set to None if app_token (nullable) is None
+ # and model_fields_set contains the field
+ if self.app_token is None and "app_token" in self.model_fields_set:
+ _dict['app_token'] = None
+
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of ManagementProjectsCreateResponseBodyServerSideKey from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "app_id": obj.get("app_id"),
+ "app_token": obj.get("app_token")
+ })
+ return _obj
+
+
diff --git a/voucherify/models/management_projects_create_response_body_webhooks_callout_notifications.py b/voucherify/models/management_projects_create_response_body_webhooks_callout_notifications.py
new file mode 100644
index 00000000..75d018d0
--- /dev/null
+++ b/voucherify/models/management_projects_create_response_body_webhooks_callout_notifications.py
@@ -0,0 +1,108 @@
+# coding: utf-8
+
+"""
+ Voucherify API
+
+ Voucherify promotion engine REST API. Please see https://docs.voucherify.io/docs for more details.
+
+ The version of the OpenAPI document: v2018-08-01
+ Contact: support@voucherify.io
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict
+from typing import Any, ClassVar, Dict, List, Optional
+from voucherify.models.management_projects_create_response_body_webhooks_callout_notifications_distributions import ManagementProjectsCreateResponseBodyWebhooksCalloutNotificationsDistributions
+from voucherify.models.management_projects_create_response_body_webhooks_callout_notifications_webhooks import ManagementProjectsCreateResponseBodyWebhooksCalloutNotificationsWebhooks
+from typing import Optional, Set
+from typing_extensions import Self
+
+class ManagementProjectsCreateResponseBodyWebhooksCalloutNotifications(BaseModel):
+ """
+ Determines the notification settings for webhook callouts configured in Distributions and Project settings.
+ """ # noqa: E501
+ distributions: Optional[ManagementProjectsCreateResponseBodyWebhooksCalloutNotificationsDistributions] = None
+ webhooks: Optional[ManagementProjectsCreateResponseBodyWebhooksCalloutNotificationsWebhooks] = None
+ __properties: ClassVar[List[str]] = ["distributions", "webhooks"]
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of ManagementProjectsCreateResponseBodyWebhooksCalloutNotifications from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([
+ ])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ # override the default output from pydantic by calling `to_dict()` of distributions
+ if self.distributions:
+ _dict['distributions'] = self.distributions.to_dict()
+ # override the default output from pydantic by calling `to_dict()` of webhooks
+ if self.webhooks:
+ _dict['webhooks'] = self.webhooks.to_dict()
+ # set to None if distributions (nullable) is None
+ # and model_fields_set contains the field
+ if self.distributions is None and "distributions" in self.model_fields_set:
+ _dict['distributions'] = None
+
+ # set to None if webhooks (nullable) is None
+ # and model_fields_set contains the field
+ if self.webhooks is None and "webhooks" in self.model_fields_set:
+ _dict['webhooks'] = None
+
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of ManagementProjectsCreateResponseBodyWebhooksCalloutNotifications from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "distributions": ManagementProjectsCreateResponseBodyWebhooksCalloutNotificationsDistributions.from_dict(obj["distributions"]) if obj.get("distributions") is not None else None,
+ "webhooks": ManagementProjectsCreateResponseBodyWebhooksCalloutNotificationsWebhooks.from_dict(obj["webhooks"]) if obj.get("webhooks") is not None else None
+ })
+ return _obj
+
+
diff --git a/voucherify/models/management_projects_create_response_body_webhooks_callout_notifications_distributions.py b/voucherify/models/management_projects_create_response_body_webhooks_callout_notifications_distributions.py
new file mode 100644
index 00000000..e6745117
--- /dev/null
+++ b/voucherify/models/management_projects_create_response_body_webhooks_callout_notifications_distributions.py
@@ -0,0 +1,107 @@
+# coding: utf-8
+
+"""
+ Voucherify API
+
+ Voucherify promotion engine REST API. Please see https://docs.voucherify.io/docs for more details.
+
+ The version of the OpenAPI document: v2018-08-01
+ Contact: support@voucherify.io
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr
+from typing import Any, ClassVar, Dict, List, Optional
+from typing import Optional, Set
+from typing_extensions import Self
+
+class ManagementProjectsCreateResponseBodyWebhooksCalloutNotificationsDistributions(BaseModel):
+ """
+ Determines the notification settings for webhooks sent through Distributions.
+ """ # noqa: E501
+ email: Optional[StrictBool] = Field(default=None, description="Enables the notification through an email.")
+ in_app: Optional[StrictBool] = Field(default=None, description="Enables the notification through an email.")
+ emails: Optional[List[StrictStr]] = Field(default=None, description="An array of email addresses which will receive the notification.")
+ __properties: ClassVar[List[str]] = ["email", "in_app", "emails"]
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of ManagementProjectsCreateResponseBodyWebhooksCalloutNotificationsDistributions from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([
+ ])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ # set to None if email (nullable) is None
+ # and model_fields_set contains the field
+ if self.email is None and "email" in self.model_fields_set:
+ _dict['email'] = None
+
+ # set to None if in_app (nullable) is None
+ # and model_fields_set contains the field
+ if self.in_app is None and "in_app" in self.model_fields_set:
+ _dict['in_app'] = None
+
+ # set to None if emails (nullable) is None
+ # and model_fields_set contains the field
+ if self.emails is None and "emails" in self.model_fields_set:
+ _dict['emails'] = None
+
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of ManagementProjectsCreateResponseBodyWebhooksCalloutNotificationsDistributions from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "email": obj.get("email"),
+ "in_app": obj.get("in_app"),
+ "emails": obj.get("emails")
+ })
+ return _obj
+
+
diff --git a/voucherify/models/management_projects_create_response_body_webhooks_callout_notifications_webhooks.py b/voucherify/models/management_projects_create_response_body_webhooks_callout_notifications_webhooks.py
new file mode 100644
index 00000000..884e1388
--- /dev/null
+++ b/voucherify/models/management_projects_create_response_body_webhooks_callout_notifications_webhooks.py
@@ -0,0 +1,107 @@
+# coding: utf-8
+
+"""
+ Voucherify API
+
+ Voucherify promotion engine REST API. Please see https://docs.voucherify.io/docs for more details.
+
+ The version of the OpenAPI document: v2018-08-01
+ Contact: support@voucherify.io
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr
+from typing import Any, ClassVar, Dict, List, Optional
+from typing import Optional, Set
+from typing_extensions import Self
+
+class ManagementProjectsCreateResponseBodyWebhooksCalloutNotificationsWebhooks(BaseModel):
+ """
+ Determines the notification settings for webhooks sent as set out in the Project settings.
+ """ # noqa: E501
+ email: Optional[StrictBool] = Field(default=None, description="Enables the notification through an email.")
+ in_app: Optional[StrictBool] = Field(default=None, description="Enables the notification through an email.")
+ emails: Optional[List[StrictStr]] = Field(default=None, description="An array of email addresses which will receive the notification.")
+ __properties: ClassVar[List[str]] = ["email", "in_app", "emails"]
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of ManagementProjectsCreateResponseBodyWebhooksCalloutNotificationsWebhooks from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([
+ ])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ # set to None if email (nullable) is None
+ # and model_fields_set contains the field
+ if self.email is None and "email" in self.model_fields_set:
+ _dict['email'] = None
+
+ # set to None if in_app (nullable) is None
+ # and model_fields_set contains the field
+ if self.in_app is None and "in_app" in self.model_fields_set:
+ _dict['in_app'] = None
+
+ # set to None if emails (nullable) is None
+ # and model_fields_set contains the field
+ if self.emails is None and "emails" in self.model_fields_set:
+ _dict['emails'] = None
+
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of ManagementProjectsCreateResponseBodyWebhooksCalloutNotificationsWebhooks from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "email": obj.get("email"),
+ "in_app": obj.get("in_app"),
+ "emails": obj.get("emails")
+ })
+ return _obj
+
+
diff --git a/voucherify/models/management_projects_custom_event_schema.py b/voucherify/models/management_projects_custom_event_schema.py
new file mode 100644
index 00000000..10cb7cf1
--- /dev/null
+++ b/voucherify/models/management_projects_custom_event_schema.py
@@ -0,0 +1,143 @@
+# coding: utf-8
+
+"""
+ Voucherify API
+
+ Voucherify promotion engine REST API. Please see https://docs.voucherify.io/docs for more details.
+
+ The version of the OpenAPI document: v2018-08-01
+ Contact: support@voucherify.io
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from datetime import datetime
+from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator
+from typing import Any, ClassVar, Dict, List, Optional
+from voucherify.models.management_projects_custom_event_schema_schema import ManagementProjectsCustomEventSchemaSchema
+from typing import Optional, Set
+from typing_extensions import Self
+
+class ManagementProjectsCustomEventSchema(BaseModel):
+ """
+ Object containing the response to creating a custom event schema.
+ """ # noqa: E501
+ id: Optional[StrictStr] = Field(default=None, description="Unique identifier of the custom event schema.")
+ name: Optional[StrictStr] = Field(default=None, description="User-defined name of the custom event. This is also shown in **Project Settings** > **Event Schema** in the Voucherify Dashboard.")
+ var_schema: Optional[ManagementProjectsCustomEventSchemaSchema] = Field(default=None, alias="schema")
+ created_at: Optional[datetime] = Field(default=None, description="Timestamp representing the date and time when the custom event schema was created. The value is shown in the ISO 8601 format.")
+ updated_at: Optional[datetime] = Field(default=None, description="Timestamp representing the date and time when the custom event schema was updated. The value is shown in the ISO 8601 format.")
+ object: Optional[StrictStr] = Field(default='custom-event-schema', description="The type of the object represented by JSON.")
+ __properties: ClassVar[List[str]] = ["id", "name", "schema", "created_at", "updated_at", "object"]
+
+ @field_validator('object')
+ def object_validate_enum(cls, value):
+ """Validates the enum"""
+ if value is None:
+ return value
+
+ if value not in set(['custom-event-schema']):
+ raise ValueError("must be one of enum values ('custom-event-schema')")
+ return value
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of ManagementProjectsCustomEventSchema from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([
+ ])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ # override the default output from pydantic by calling `to_dict()` of var_schema
+ if self.var_schema:
+ _dict['schema'] = self.var_schema.to_dict()
+ # set to None if id (nullable) is None
+ # and model_fields_set contains the field
+ if self.id is None and "id" in self.model_fields_set:
+ _dict['id'] = None
+
+ # set to None if name (nullable) is None
+ # and model_fields_set contains the field
+ if self.name is None and "name" in self.model_fields_set:
+ _dict['name'] = None
+
+ # set to None if var_schema (nullable) is None
+ # and model_fields_set contains the field
+ if self.var_schema is None and "var_schema" in self.model_fields_set:
+ _dict['schema'] = None
+
+ # set to None if created_at (nullable) is None
+ # and model_fields_set contains the field
+ if self.created_at is None and "created_at" in self.model_fields_set:
+ _dict['created_at'] = None
+
+ # set to None if updated_at (nullable) is None
+ # and model_fields_set contains the field
+ if self.updated_at is None and "updated_at" in self.model_fields_set:
+ _dict['updated_at'] = None
+
+ # set to None if object (nullable) is None
+ # and model_fields_set contains the field
+ if self.object is None and "object" in self.model_fields_set:
+ _dict['object'] = None
+
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of ManagementProjectsCustomEventSchema from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "id": obj.get("id"),
+ "name": obj.get("name"),
+ "schema": ManagementProjectsCustomEventSchemaSchema.from_dict(obj["schema"]) if obj.get("schema") is not None else None,
+ "created_at": obj.get("created_at"),
+ "updated_at": obj.get("updated_at"),
+ "object": obj.get("object") if obj.get("object") is not None else 'custom-event-schema'
+ })
+ return _obj
+
+
diff --git a/voucherify/models/management_projects_custom_event_schema_schema.py b/voucherify/models/management_projects_custom_event_schema_schema.py
new file mode 100644
index 00000000..6f9c9e20
--- /dev/null
+++ b/voucherify/models/management_projects_custom_event_schema_schema.py
@@ -0,0 +1,93 @@
+# coding: utf-8
+
+"""
+ Voucherify API
+
+ Voucherify promotion engine REST API. Please see https://docs.voucherify.io/docs for more details.
+
+ The version of the OpenAPI document: v2018-08-01
+ Contact: support@voucherify.io
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict, Field
+from typing import Any, ClassVar, Dict, List, Optional
+from typing import Optional, Set
+from typing_extensions import Self
+
+class ManagementProjectsCustomEventSchemaSchema(BaseModel):
+ """
+ Object containing custom event schema and its custom attributes (metadata).
+ """ # noqa: E501
+ properties: Optional[Dict[str, Any]] = Field(default=None, description="Defines custom event custom attributes (metadata).")
+ __properties: ClassVar[List[str]] = ["properties"]
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of ManagementProjectsCustomEventSchemaSchema from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([
+ ])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ # set to None if properties (nullable) is None
+ # and model_fields_set contains the field
+ if self.properties is None and "properties" in self.model_fields_set:
+ _dict['properties'] = None
+
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of ManagementProjectsCustomEventSchemaSchema from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "properties": obj.get("properties")
+ })
+ return _obj
+
+
diff --git a/voucherify/models/management_projects_custom_event_schemas_create_request_body.py b/voucherify/models/management_projects_custom_event_schemas_create_request_body.py
new file mode 100644
index 00000000..33968973
--- /dev/null
+++ b/voucherify/models/management_projects_custom_event_schemas_create_request_body.py
@@ -0,0 +1,104 @@
+# coding: utf-8
+
+"""
+ Voucherify API
+
+ Voucherify promotion engine REST API. Please see https://docs.voucherify.io/docs for more details.
+
+ The version of the OpenAPI document: v2018-08-01
+ Contact: support@voucherify.io
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict, Field, StrictStr
+from typing import Any, ClassVar, Dict, List, Optional
+from voucherify.models.management_projects_custom_event_schemas_create_request_body_schema import ManagementProjectsCustomEventSchemasCreateRequestBodySchema
+from typing import Optional, Set
+from typing_extensions import Self
+
+class ManagementProjectsCustomEventSchemasCreateRequestBody(BaseModel):
+ """
+ Request body schema for **POST** `/management/v1/projects/{projectId}/custom-event-schema`.
+ """ # noqa: E501
+ name: Optional[StrictStr] = Field(default=None, description="User-defined name of the custom event. This is also shown in **Project Settings** > **Event Schema** in the Voucherify Dashboard.")
+ var_schema: Optional[ManagementProjectsCustomEventSchemasCreateRequestBodySchema] = Field(default=None, alias="schema")
+ __properties: ClassVar[List[str]] = ["name", "schema"]
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of ManagementProjectsCustomEventSchemasCreateRequestBody from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([
+ ])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ # override the default output from pydantic by calling `to_dict()` of var_schema
+ if self.var_schema:
+ _dict['schema'] = self.var_schema.to_dict()
+ # set to None if name (nullable) is None
+ # and model_fields_set contains the field
+ if self.name is None and "name" in self.model_fields_set:
+ _dict['name'] = None
+
+ # set to None if var_schema (nullable) is None
+ # and model_fields_set contains the field
+ if self.var_schema is None and "var_schema" in self.model_fields_set:
+ _dict['schema'] = None
+
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of ManagementProjectsCustomEventSchemasCreateRequestBody from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "name": obj.get("name"),
+ "schema": ManagementProjectsCustomEventSchemasCreateRequestBodySchema.from_dict(obj["schema"]) if obj.get("schema") is not None else None
+ })
+ return _obj
+
+
diff --git a/voucherify/models/management_projects_custom_event_schemas_create_request_body_schema.py b/voucherify/models/management_projects_custom_event_schemas_create_request_body_schema.py
new file mode 100644
index 00000000..571e61dc
--- /dev/null
+++ b/voucherify/models/management_projects_custom_event_schemas_create_request_body_schema.py
@@ -0,0 +1,93 @@
+# coding: utf-8
+
+"""
+ Voucherify API
+
+ Voucherify promotion engine REST API. Please see https://docs.voucherify.io/docs for more details.
+
+ The version of the OpenAPI document: v2018-08-01
+ Contact: support@voucherify.io
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict, Field
+from typing import Any, ClassVar, Dict, List, Optional
+from typing import Optional, Set
+from typing_extensions import Self
+
+class ManagementProjectsCustomEventSchemasCreateRequestBodySchema(BaseModel):
+ """
+ Object containing custom event schema and its custom attributes (metadata).
+ """ # noqa: E501
+ properties: Optional[Dict[str, Any]] = Field(default=None, description="Defines custom event custom attributes (metadata).")
+ __properties: ClassVar[List[str]] = ["properties"]
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of ManagementProjectsCustomEventSchemasCreateRequestBodySchema from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([
+ ])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ # set to None if properties (nullable) is None
+ # and model_fields_set contains the field
+ if self.properties is None and "properties" in self.model_fields_set:
+ _dict['properties'] = None
+
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of ManagementProjectsCustomEventSchemasCreateRequestBodySchema from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "properties": obj.get("properties")
+ })
+ return _obj
+
+
diff --git a/voucherify/models/management_projects_custom_event_schemas_create_response_body.py b/voucherify/models/management_projects_custom_event_schemas_create_response_body.py
new file mode 100644
index 00000000..c798bf9d
--- /dev/null
+++ b/voucherify/models/management_projects_custom_event_schemas_create_response_body.py
@@ -0,0 +1,143 @@
+# coding: utf-8
+
+"""
+ Voucherify API
+
+ Voucherify promotion engine REST API. Please see https://docs.voucherify.io/docs for more details.
+
+ The version of the OpenAPI document: v2018-08-01
+ Contact: support@voucherify.io
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from datetime import datetime
+from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator
+from typing import Any, ClassVar, Dict, List, Optional
+from voucherify.models.management_projects_custom_event_schemas_create_response_body_schema import ManagementProjectsCustomEventSchemasCreateResponseBodySchema
+from typing import Optional, Set
+from typing_extensions import Self
+
+class ManagementProjectsCustomEventSchemasCreateResponseBody(BaseModel):
+ """
+ Response body schema for **POST** `/management/v1/projects/{projectId}/custom-event-schema`.
+ """ # noqa: E501
+ id: Optional[StrictStr] = Field(default=None, description="Unique identifier of the custom event schema.")
+ name: Optional[StrictStr] = Field(default=None, description="User-defined name of the custom event. This is also shown in **Project Settings** > **Event Schema** in the Voucherify Dashboard.")
+ var_schema: Optional[ManagementProjectsCustomEventSchemasCreateResponseBodySchema] = Field(default=None, alias="schema")
+ created_at: Optional[datetime] = Field(default=None, description="Timestamp representing the date and time when the custom event schema was created. The value is shown in the ISO 8601 format.")
+ updated_at: Optional[datetime] = Field(default=None, description="Timestamp representing the date and time when the custom event schema was updated. The value is shown in the ISO 8601 format.")
+ object: Optional[StrictStr] = Field(default='custom-event-schema', description="The type of the object represented by JSON.")
+ __properties: ClassVar[List[str]] = ["id", "name", "schema", "created_at", "updated_at", "object"]
+
+ @field_validator('object')
+ def object_validate_enum(cls, value):
+ """Validates the enum"""
+ if value is None:
+ return value
+
+ if value not in set(['custom-event-schema']):
+ raise ValueError("must be one of enum values ('custom-event-schema')")
+ return value
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of ManagementProjectsCustomEventSchemasCreateResponseBody from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([
+ ])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ # override the default output from pydantic by calling `to_dict()` of var_schema
+ if self.var_schema:
+ _dict['schema'] = self.var_schema.to_dict()
+ # set to None if id (nullable) is None
+ # and model_fields_set contains the field
+ if self.id is None and "id" in self.model_fields_set:
+ _dict['id'] = None
+
+ # set to None if name (nullable) is None
+ # and model_fields_set contains the field
+ if self.name is None and "name" in self.model_fields_set:
+ _dict['name'] = None
+
+ # set to None if var_schema (nullable) is None
+ # and model_fields_set contains the field
+ if self.var_schema is None and "var_schema" in self.model_fields_set:
+ _dict['schema'] = None
+
+ # set to None if created_at (nullable) is None
+ # and model_fields_set contains the field
+ if self.created_at is None and "created_at" in self.model_fields_set:
+ _dict['created_at'] = None
+
+ # set to None if updated_at (nullable) is None
+ # and model_fields_set contains the field
+ if self.updated_at is None and "updated_at" in self.model_fields_set:
+ _dict['updated_at'] = None
+
+ # set to None if object (nullable) is None
+ # and model_fields_set contains the field
+ if self.object is None and "object" in self.model_fields_set:
+ _dict['object'] = None
+
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of ManagementProjectsCustomEventSchemasCreateResponseBody from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "id": obj.get("id"),
+ "name": obj.get("name"),
+ "schema": ManagementProjectsCustomEventSchemasCreateResponseBodySchema.from_dict(obj["schema"]) if obj.get("schema") is not None else None,
+ "created_at": obj.get("created_at"),
+ "updated_at": obj.get("updated_at"),
+ "object": obj.get("object") if obj.get("object") is not None else 'custom-event-schema'
+ })
+ return _obj
+
+
diff --git a/voucherify/models/management_projects_custom_event_schemas_create_response_body_schema.py b/voucherify/models/management_projects_custom_event_schemas_create_response_body_schema.py
new file mode 100644
index 00000000..7d9fa44d
--- /dev/null
+++ b/voucherify/models/management_projects_custom_event_schemas_create_response_body_schema.py
@@ -0,0 +1,93 @@
+# coding: utf-8
+
+"""
+ Voucherify API
+
+ Voucherify promotion engine REST API. Please see https://docs.voucherify.io/docs for more details.
+
+ The version of the OpenAPI document: v2018-08-01
+ Contact: support@voucherify.io
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict, Field
+from typing import Any, ClassVar, Dict, List, Optional
+from typing import Optional, Set
+from typing_extensions import Self
+
+class ManagementProjectsCustomEventSchemasCreateResponseBodySchema(BaseModel):
+ """
+ Object containing custom event schema and its custom attributes (metadata).
+ """ # noqa: E501
+ properties: Optional[Dict[str, Any]] = Field(default=None, description="Defines custom event custom attributes (metadata).")
+ __properties: ClassVar[List[str]] = ["properties"]
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of ManagementProjectsCustomEventSchemasCreateResponseBodySchema from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([
+ ])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ # set to None if properties (nullable) is None
+ # and model_fields_set contains the field
+ if self.properties is None and "properties" in self.model_fields_set:
+ _dict['properties'] = None
+
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of ManagementProjectsCustomEventSchemasCreateResponseBodySchema from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "properties": obj.get("properties")
+ })
+ return _obj
+
+
diff --git a/voucherify/models/management_projects_custom_event_schemas_get_response_body.py b/voucherify/models/management_projects_custom_event_schemas_get_response_body.py
new file mode 100644
index 00000000..ba698959
--- /dev/null
+++ b/voucherify/models/management_projects_custom_event_schemas_get_response_body.py
@@ -0,0 +1,143 @@
+# coding: utf-8
+
+"""
+ Voucherify API
+
+ Voucherify promotion engine REST API. Please see https://docs.voucherify.io/docs for more details.
+
+ The version of the OpenAPI document: v2018-08-01
+ Contact: support@voucherify.io
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from datetime import datetime
+from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator
+from typing import Any, ClassVar, Dict, List, Optional
+from voucherify.models.management_projects_custom_event_schemas_get_response_body_schema import ManagementProjectsCustomEventSchemasGetResponseBodySchema
+from typing import Optional, Set
+from typing_extensions import Self
+
+class ManagementProjectsCustomEventSchemasGetResponseBody(BaseModel):
+ """
+ Response body schema for **GET** `/management/v1/projects/{projectId}/custom-event-schema/{customEventSchemaId}`.
+ """ # noqa: E501
+ id: Optional[StrictStr] = Field(default=None, description="Unique identifier of the custom event schema.")
+ name: Optional[StrictStr] = Field(default=None, description="User-defined name of the custom event. This is also shown in **Project Settings** > **Event Schema** in the Voucherify Dashboard.")
+ var_schema: Optional[ManagementProjectsCustomEventSchemasGetResponseBodySchema] = Field(default=None, alias="schema")
+ created_at: Optional[datetime] = Field(default=None, description="Timestamp representing the date and time when the custom event schema was created. The value is shown in the ISO 8601 format.")
+ updated_at: Optional[datetime] = Field(default=None, description="Timestamp representing the date and time when the custom event schema was updated. The value is shown in the ISO 8601 format.")
+ object: Optional[StrictStr] = Field(default='custom-event-schema', description="The type of the object represented by JSON.")
+ __properties: ClassVar[List[str]] = ["id", "name", "schema", "created_at", "updated_at", "object"]
+
+ @field_validator('object')
+ def object_validate_enum(cls, value):
+ """Validates the enum"""
+ if value is None:
+ return value
+
+ if value not in set(['custom-event-schema']):
+ raise ValueError("must be one of enum values ('custom-event-schema')")
+ return value
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of ManagementProjectsCustomEventSchemasGetResponseBody from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([
+ ])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ # override the default output from pydantic by calling `to_dict()` of var_schema
+ if self.var_schema:
+ _dict['schema'] = self.var_schema.to_dict()
+ # set to None if id (nullable) is None
+ # and model_fields_set contains the field
+ if self.id is None and "id" in self.model_fields_set:
+ _dict['id'] = None
+
+ # set to None if name (nullable) is None
+ # and model_fields_set contains the field
+ if self.name is None and "name" in self.model_fields_set:
+ _dict['name'] = None
+
+ # set to None if var_schema (nullable) is None
+ # and model_fields_set contains the field
+ if self.var_schema is None and "var_schema" in self.model_fields_set:
+ _dict['schema'] = None
+
+ # set to None if created_at (nullable) is None
+ # and model_fields_set contains the field
+ if self.created_at is None and "created_at" in self.model_fields_set:
+ _dict['created_at'] = None
+
+ # set to None if updated_at (nullable) is None
+ # and model_fields_set contains the field
+ if self.updated_at is None and "updated_at" in self.model_fields_set:
+ _dict['updated_at'] = None
+
+ # set to None if object (nullable) is None
+ # and model_fields_set contains the field
+ if self.object is None and "object" in self.model_fields_set:
+ _dict['object'] = None
+
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of ManagementProjectsCustomEventSchemasGetResponseBody from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "id": obj.get("id"),
+ "name": obj.get("name"),
+ "schema": ManagementProjectsCustomEventSchemasGetResponseBodySchema.from_dict(obj["schema"]) if obj.get("schema") is not None else None,
+ "created_at": obj.get("created_at"),
+ "updated_at": obj.get("updated_at"),
+ "object": obj.get("object") if obj.get("object") is not None else 'custom-event-schema'
+ })
+ return _obj
+
+
diff --git a/voucherify/models/management_projects_custom_event_schemas_get_response_body_schema.py b/voucherify/models/management_projects_custom_event_schemas_get_response_body_schema.py
new file mode 100644
index 00000000..06cccac2
--- /dev/null
+++ b/voucherify/models/management_projects_custom_event_schemas_get_response_body_schema.py
@@ -0,0 +1,93 @@
+# coding: utf-8
+
+"""
+ Voucherify API
+
+ Voucherify promotion engine REST API. Please see https://docs.voucherify.io/docs for more details.
+
+ The version of the OpenAPI document: v2018-08-01
+ Contact: support@voucherify.io
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict, Field
+from typing import Any, ClassVar, Dict, List, Optional
+from typing import Optional, Set
+from typing_extensions import Self
+
+class ManagementProjectsCustomEventSchemasGetResponseBodySchema(BaseModel):
+ """
+ Object containing custom event schema and its custom attributes (metadata).
+ """ # noqa: E501
+ properties: Optional[Dict[str, Any]] = Field(default=None, description="Defines custom event custom attributes (metadata).")
+ __properties: ClassVar[List[str]] = ["properties"]
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of ManagementProjectsCustomEventSchemasGetResponseBodySchema from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([
+ ])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ # set to None if properties (nullable) is None
+ # and model_fields_set contains the field
+ if self.properties is None and "properties" in self.model_fields_set:
+ _dict['properties'] = None
+
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of ManagementProjectsCustomEventSchemasGetResponseBodySchema from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "properties": obj.get("properties")
+ })
+ return _obj
+
+
diff --git a/voucherify/models/management_projects_custom_event_schemas_list_response_body.py b/voucherify/models/management_projects_custom_event_schemas_list_response_body.py
new file mode 100644
index 00000000..60786fb0
--- /dev/null
+++ b/voucherify/models/management_projects_custom_event_schemas_list_response_body.py
@@ -0,0 +1,142 @@
+# coding: utf-8
+
+"""
+ Voucherify API
+
+ Voucherify promotion engine REST API. Please see https://docs.voucherify.io/docs for more details.
+
+ The version of the OpenAPI document: v2018-08-01
+ Contact: support@voucherify.io
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr, field_validator
+from typing import Any, ClassVar, Dict, List, Optional
+from voucherify.models.management_projects_custom_event_schema import ManagementProjectsCustomEventSchema
+from typing import Optional, Set
+from typing_extensions import Self
+
+class ManagementProjectsCustomEventSchemasListResponseBody(BaseModel):
+ """
+ Object containing a list of custom event schemas.
+ """ # noqa: E501
+ object: Optional[StrictStr] = Field(default='list', description="The type of the object represented by JSON. This object stores information about the custom event schemas in a dictionary.")
+ data_ref: Optional[StrictStr] = Field(default='data', description="Identifies the name of the attribute that contains the array of custom event schema objects.")
+ data: Optional[List[ManagementProjectsCustomEventSchema]] = Field(default=None, description="Array of custom event schema objects.")
+ total: Optional[StrictInt] = Field(default=None, description="The total number of custom event schema objects.")
+ __properties: ClassVar[List[str]] = ["object", "data_ref", "data", "total"]
+
+ @field_validator('object')
+ def object_validate_enum(cls, value):
+ """Validates the enum"""
+ if value is None:
+ return value
+
+ if value not in set(['list']):
+ raise ValueError("must be one of enum values ('list')")
+ return value
+
+ @field_validator('data_ref')
+ def data_ref_validate_enum(cls, value):
+ """Validates the enum"""
+ if value is None:
+ return value
+
+ if value not in set(['data']):
+ raise ValueError("must be one of enum values ('data')")
+ return value
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of ManagementProjectsCustomEventSchemasListResponseBody from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([
+ ])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ # override the default output from pydantic by calling `to_dict()` of each item in data (list)
+ _items = []
+ if self.data:
+ for _item_data in self.data:
+ if _item_data:
+ _items.append(_item_data.to_dict())
+ _dict['data'] = _items
+ # set to None if object (nullable) is None
+ # and model_fields_set contains the field
+ if self.object is None and "object" in self.model_fields_set:
+ _dict['object'] = None
+
+ # set to None if data_ref (nullable) is None
+ # and model_fields_set contains the field
+ if self.data_ref is None and "data_ref" in self.model_fields_set:
+ _dict['data_ref'] = None
+
+ # set to None if data (nullable) is None
+ # and model_fields_set contains the field
+ if self.data is None and "data" in self.model_fields_set:
+ _dict['data'] = None
+
+ # set to None if total (nullable) is None
+ # and model_fields_set contains the field
+ if self.total is None and "total" in self.model_fields_set:
+ _dict['total'] = None
+
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of ManagementProjectsCustomEventSchemasListResponseBody from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "object": obj.get("object") if obj.get("object") is not None else 'list',
+ "data_ref": obj.get("data_ref") if obj.get("data_ref") is not None else 'data',
+ "data": [ManagementProjectsCustomEventSchema.from_dict(_item) for _item in obj["data"]] if obj.get("data") is not None else None,
+ "total": obj.get("total")
+ })
+ return _obj
+
+
diff --git a/voucherify/models/management_projects_custom_event_schemas_update_request_body.py b/voucherify/models/management_projects_custom_event_schemas_update_request_body.py
new file mode 100644
index 00000000..bb4a5f13
--- /dev/null
+++ b/voucherify/models/management_projects_custom_event_schemas_update_request_body.py
@@ -0,0 +1,97 @@
+# coding: utf-8
+
+"""
+ Voucherify API
+
+ Voucherify promotion engine REST API. Please see https://docs.voucherify.io/docs for more details.
+
+ The version of the OpenAPI document: v2018-08-01
+ Contact: support@voucherify.io
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict, Field
+from typing import Any, ClassVar, Dict, List, Optional
+from voucherify.models.management_projects_custom_event_schemas_update_request_body_schema import ManagementProjectsCustomEventSchemasUpdateRequestBodySchema
+from typing import Optional, Set
+from typing_extensions import Self
+
+class ManagementProjectsCustomEventSchemasUpdateRequestBody(BaseModel):
+ """
+ Request body schema for **POST** `/management/v1/projects/{projectId}/custom-event-schema/{customEventSchemaId}`.
+ """ # noqa: E501
+ var_schema: Optional[ManagementProjectsCustomEventSchemasUpdateRequestBodySchema] = Field(default=None, alias="schema")
+ __properties: ClassVar[List[str]] = ["schema"]
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of ManagementProjectsCustomEventSchemasUpdateRequestBody from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([
+ ])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ # override the default output from pydantic by calling `to_dict()` of var_schema
+ if self.var_schema:
+ _dict['schema'] = self.var_schema.to_dict()
+ # set to None if var_schema (nullable) is None
+ # and model_fields_set contains the field
+ if self.var_schema is None and "var_schema" in self.model_fields_set:
+ _dict['schema'] = None
+
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of ManagementProjectsCustomEventSchemasUpdateRequestBody from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "schema": ManagementProjectsCustomEventSchemasUpdateRequestBodySchema.from_dict(obj["schema"]) if obj.get("schema") is not None else None
+ })
+ return _obj
+
+
diff --git a/voucherify/models/management_projects_custom_event_schemas_update_request_body_schema.py b/voucherify/models/management_projects_custom_event_schemas_update_request_body_schema.py
new file mode 100644
index 00000000..d4966118
--- /dev/null
+++ b/voucherify/models/management_projects_custom_event_schemas_update_request_body_schema.py
@@ -0,0 +1,93 @@
+# coding: utf-8
+
+"""
+ Voucherify API
+
+ Voucherify promotion engine REST API. Please see https://docs.voucherify.io/docs for more details.
+
+ The version of the OpenAPI document: v2018-08-01
+ Contact: support@voucherify.io
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict, Field
+from typing import Any, ClassVar, Dict, List, Optional
+from typing import Optional, Set
+from typing_extensions import Self
+
+class ManagementProjectsCustomEventSchemasUpdateRequestBodySchema(BaseModel):
+ """
+ Object containing custom event schema and its custom attributes (metadata).
+ """ # noqa: E501
+ properties: Optional[Dict[str, Any]] = Field(default=None, description="Defines custom event custom attributes (metadata).")
+ __properties: ClassVar[List[str]] = ["properties"]
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of ManagementProjectsCustomEventSchemasUpdateRequestBodySchema from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([
+ ])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ # set to None if properties (nullable) is None
+ # and model_fields_set contains the field
+ if self.properties is None and "properties" in self.model_fields_set:
+ _dict['properties'] = None
+
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of ManagementProjectsCustomEventSchemasUpdateRequestBodySchema from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "properties": obj.get("properties")
+ })
+ return _obj
+
+
diff --git a/voucherify/models/management_projects_custom_event_schemas_update_response_body.py b/voucherify/models/management_projects_custom_event_schemas_update_response_body.py
new file mode 100644
index 00000000..e1cf1a66
--- /dev/null
+++ b/voucherify/models/management_projects_custom_event_schemas_update_response_body.py
@@ -0,0 +1,143 @@
+# coding: utf-8
+
+"""
+ Voucherify API
+
+ Voucherify promotion engine REST API. Please see https://docs.voucherify.io/docs for more details.
+
+ The version of the OpenAPI document: v2018-08-01
+ Contact: support@voucherify.io
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from datetime import datetime
+from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator
+from typing import Any, ClassVar, Dict, List, Optional
+from voucherify.models.management_projects_custom_event_schemas_update_response_body_schema import ManagementProjectsCustomEventSchemasUpdateResponseBodySchema
+from typing import Optional, Set
+from typing_extensions import Self
+
+class ManagementProjectsCustomEventSchemasUpdateResponseBody(BaseModel):
+ """
+ Response body schema for **POST** `/management/v1/projects/{projectId}/custom-event-schema/{customEventSchemaId}`.
+ """ # noqa: E501
+ id: Optional[StrictStr] = Field(default=None, description="Unique identifier of the custom event schema.")
+ name: Optional[StrictStr] = Field(default=None, description="User-defined name of the custom event. This is also shown in **Project Settings** > **Event Schema** in the Voucherify Dashboard.")
+ var_schema: Optional[ManagementProjectsCustomEventSchemasUpdateResponseBodySchema] = Field(default=None, alias="schema")
+ created_at: Optional[datetime] = Field(default=None, description="Timestamp representing the date and time when the custom event schema was created. The value is shown in the ISO 8601 format.")
+ updated_at: Optional[datetime] = Field(default=None, description="Timestamp representing the date and time when the custom event schema was updated. The value is shown in the ISO 8601 format.")
+ object: Optional[StrictStr] = Field(default='custom-event-schema', description="The type of the object represented by JSON.")
+ __properties: ClassVar[List[str]] = ["id", "name", "schema", "created_at", "updated_at", "object"]
+
+ @field_validator('object')
+ def object_validate_enum(cls, value):
+ """Validates the enum"""
+ if value is None:
+ return value
+
+ if value not in set(['custom-event-schema']):
+ raise ValueError("must be one of enum values ('custom-event-schema')")
+ return value
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of ManagementProjectsCustomEventSchemasUpdateResponseBody from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([
+ ])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ # override the default output from pydantic by calling `to_dict()` of var_schema
+ if self.var_schema:
+ _dict['schema'] = self.var_schema.to_dict()
+ # set to None if id (nullable) is None
+ # and model_fields_set contains the field
+ if self.id is None and "id" in self.model_fields_set:
+ _dict['id'] = None
+
+ # set to None if name (nullable) is None
+ # and model_fields_set contains the field
+ if self.name is None and "name" in self.model_fields_set:
+ _dict['name'] = None
+
+ # set to None if var_schema (nullable) is None
+ # and model_fields_set contains the field
+ if self.var_schema is None and "var_schema" in self.model_fields_set:
+ _dict['schema'] = None
+
+ # set to None if created_at (nullable) is None
+ # and model_fields_set contains the field
+ if self.created_at is None and "created_at" in self.model_fields_set:
+ _dict['created_at'] = None
+
+ # set to None if updated_at (nullable) is None
+ # and model_fields_set contains the field
+ if self.updated_at is None and "updated_at" in self.model_fields_set:
+ _dict['updated_at'] = None
+
+ # set to None if object (nullable) is None
+ # and model_fields_set contains the field
+ if self.object is None and "object" in self.model_fields_set:
+ _dict['object'] = None
+
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of ManagementProjectsCustomEventSchemasUpdateResponseBody from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "id": obj.get("id"),
+ "name": obj.get("name"),
+ "schema": ManagementProjectsCustomEventSchemasUpdateResponseBodySchema.from_dict(obj["schema"]) if obj.get("schema") is not None else None,
+ "created_at": obj.get("created_at"),
+ "updated_at": obj.get("updated_at"),
+ "object": obj.get("object") if obj.get("object") is not None else 'custom-event-schema'
+ })
+ return _obj
+
+
diff --git a/voucherify/models/management_projects_custom_event_schemas_update_response_body_schema.py b/voucherify/models/management_projects_custom_event_schemas_update_response_body_schema.py
new file mode 100644
index 00000000..4b3cbf03
--- /dev/null
+++ b/voucherify/models/management_projects_custom_event_schemas_update_response_body_schema.py
@@ -0,0 +1,93 @@
+# coding: utf-8
+
+"""
+ Voucherify API
+
+ Voucherify promotion engine REST API. Please see https://docs.voucherify.io/docs for more details.
+
+ The version of the OpenAPI document: v2018-08-01
+ Contact: support@voucherify.io
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict, Field
+from typing import Any, ClassVar, Dict, List, Optional
+from typing import Optional, Set
+from typing_extensions import Self
+
+class ManagementProjectsCustomEventSchemasUpdateResponseBodySchema(BaseModel):
+ """
+ Object containing custom event schema and its custom attributes (metadata).
+ """ # noqa: E501
+ properties: Optional[Dict[str, Any]] = Field(default=None, description="Defines custom event custom attributes (metadata).")
+ __properties: ClassVar[List[str]] = ["properties"]
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of ManagementProjectsCustomEventSchemasUpdateResponseBodySchema from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([
+ ])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ # set to None if properties (nullable) is None
+ # and model_fields_set contains the field
+ if self.properties is None and "properties" in self.model_fields_set:
+ _dict['properties'] = None
+
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of ManagementProjectsCustomEventSchemasUpdateResponseBodySchema from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "properties": obj.get("properties")
+ })
+ return _obj
+
+
diff --git a/voucherify/models/management_projects_get_response_body.py b/voucherify/models/management_projects_get_response_body.py
new file mode 100644
index 00000000..15cf2815
--- /dev/null
+++ b/voucherify/models/management_projects_get_response_body.py
@@ -0,0 +1,283 @@
+# coding: utf-8
+
+"""
+ Voucherify API
+
+ Voucherify promotion engine REST API. Please see https://docs.voucherify.io/docs for more details.
+
+ The version of the OpenAPI document: v2018-08-01
+ Contact: support@voucherify.io
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr, field_validator
+from typing import Any, ClassVar, Dict, List, Optional
+from voucherify.models.management_projects_get_response_body_api_usage_notifications import ManagementProjectsGetResponseBodyApiUsageNotifications
+from voucherify.models.management_projects_get_response_body_default_code_config import ManagementProjectsGetResponseBodyDefaultCodeConfig
+from voucherify.models.management_projects_get_response_body_limits import ManagementProjectsGetResponseBodyLimits
+from voucherify.models.management_projects_get_response_body_webhooks_callout_notifications import ManagementProjectsGetResponseBodyWebhooksCalloutNotifications
+from typing import Optional, Set
+from typing_extensions import Self
+
+class ManagementProjectsGetResponseBody(BaseModel):
+ """
+ ManagementProjectsGetResponseBody
+ """ # noqa: E501
+ id: Optional[StrictStr] = Field(default=None, description="Unique identifier of the project.")
+ name: Optional[StrictStr] = Field(default=None, description="The name of the project.")
+ description: Optional[StrictStr] = Field(default=None, description="A user-defined description of the project, e.g. its purpose, scope, region.")
+ timezone: Optional[StrictStr] = Field(default=None, description="The time zone in which the project is established. It can be in the GMT format or in accordance with IANA time zone database.")
+ currency: Optional[StrictStr] = Field(default=None, description="The currency used in the project. It is equal to a 3-letter ISO 4217 code.")
+ dial_code: Optional[StrictStr] = Field(default=None, description="The country dial code for the project. It is equal to an ITU country code.")
+ webhook_version: Optional[StrictStr] = Field(default='v2024-01-01', description="The webhook version used in the project.")
+ client_trusted_domains: Optional[List[StrictStr]] = Field(default=None, description="An array of URL addresses that allow client requests.")
+ client_redeem_enabled: Optional[StrictBool] = Field(default=None, description="Enables client-side redemption.")
+ client_publish_enabled: Optional[StrictBool] = Field(default=None, description="Enables client-side publication.")
+ client_list_vouchers_enabled: Optional[StrictBool] = Field(default=None, description="Enables client-side listing of vouchers.")
+ client_create_customer_enabled: Optional[StrictBool] = Field(default=None, description="Enables client-side creation of customers.")
+ client_loyalty_events_enabled: Optional[StrictBool] = Field(default=None, description="Enables client-side events for loyalty and referral programs.")
+ client_set_voucher_expiration_date_enabled: Optional[StrictBool] = Field(default=None, description="Enables client-side setting of voucher expiration date.")
+ webhooks_callout_notifications: Optional[ManagementProjectsGetResponseBodyWebhooksCalloutNotifications] = None
+ api_usage_notifications: Optional[ManagementProjectsGetResponseBodyApiUsageNotifications] = None
+ cluster_id: Optional[StrictStr] = Field(default=None, description="The identifier of the cluster where the project will be created.")
+ case_sensitive_codes: Optional[StrictBool] = Field(default=None, description="Determines if the vouchers in the project will be: - case sensitive - if `true`, `C0dE-cfV` is **not** equal to `c0de-cfv`), - case insensitive - if `false`, `C0dE-cfV` is equal to `c0de-cfv`.")
+ api_version: Optional[StrictStr] = Field(default='v2018-08-01', description="The API version used in the project. Currently, the default and only value is `v2018-08-01`.")
+ is_sandbox: Optional[StrictBool] = Field(default=None, description="Determines if the project is a sandbox project.")
+ webhook_token: Optional[StrictStr] = Field(default=None, description="Webhook token used for authentication.")
+ default_code_config: Optional[ManagementProjectsGetResponseBodyDefaultCodeConfig] = None
+ limits: Optional[ManagementProjectsGetResponseBodyLimits] = None
+ __properties: ClassVar[List[str]] = ["id", "name", "description", "timezone", "currency", "dial_code", "webhook_version", "client_trusted_domains", "client_redeem_enabled", "client_publish_enabled", "client_list_vouchers_enabled", "client_create_customer_enabled", "client_loyalty_events_enabled", "client_set_voucher_expiration_date_enabled", "webhooks_callout_notifications", "api_usage_notifications", "cluster_id", "case_sensitive_codes", "api_version", "is_sandbox", "webhook_token", "default_code_config", "limits"]
+
+ @field_validator('webhook_version')
+ def webhook_version_validate_enum(cls, value):
+ """Validates the enum"""
+ if value is None:
+ return value
+
+ if value not in set(['v2024-01-01']):
+ raise ValueError("must be one of enum values ('v2024-01-01')")
+ return value
+
+ @field_validator('api_version')
+ def api_version_validate_enum(cls, value):
+ """Validates the enum"""
+ if value is None:
+ return value
+
+ if value not in set(['v2018-08-01']):
+ raise ValueError("must be one of enum values ('v2018-08-01')")
+ return value
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of ManagementProjectsGetResponseBody from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([
+ ])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ # override the default output from pydantic by calling `to_dict()` of webhooks_callout_notifications
+ if self.webhooks_callout_notifications:
+ _dict['webhooks_callout_notifications'] = self.webhooks_callout_notifications.to_dict()
+ # override the default output from pydantic by calling `to_dict()` of api_usage_notifications
+ if self.api_usage_notifications:
+ _dict['api_usage_notifications'] = self.api_usage_notifications.to_dict()
+ # override the default output from pydantic by calling `to_dict()` of default_code_config
+ if self.default_code_config:
+ _dict['default_code_config'] = self.default_code_config.to_dict()
+ # override the default output from pydantic by calling `to_dict()` of limits
+ if self.limits:
+ _dict['limits'] = self.limits.to_dict()
+ # set to None if id (nullable) is None
+ # and model_fields_set contains the field
+ if self.id is None and "id" in self.model_fields_set:
+ _dict['id'] = None
+
+ # set to None if name (nullable) is None
+ # and model_fields_set contains the field
+ if self.name is None and "name" in self.model_fields_set:
+ _dict['name'] = None
+
+ # set to None if description (nullable) is None
+ # and model_fields_set contains the field
+ if self.description is None and "description" in self.model_fields_set:
+ _dict['description'] = None
+
+ # set to None if timezone (nullable) is None
+ # and model_fields_set contains the field
+ if self.timezone is None and "timezone" in self.model_fields_set:
+ _dict['timezone'] = None
+
+ # set to None if currency (nullable) is None
+ # and model_fields_set contains the field
+ if self.currency is None and "currency" in self.model_fields_set:
+ _dict['currency'] = None
+
+ # set to None if dial_code (nullable) is None
+ # and model_fields_set contains the field
+ if self.dial_code is None and "dial_code" in self.model_fields_set:
+ _dict['dial_code'] = None
+
+ # set to None if webhook_version (nullable) is None
+ # and model_fields_set contains the field
+ if self.webhook_version is None and "webhook_version" in self.model_fields_set:
+ _dict['webhook_version'] = None
+
+ # set to None if client_trusted_domains (nullable) is None
+ # and model_fields_set contains the field
+ if self.client_trusted_domains is None and "client_trusted_domains" in self.model_fields_set:
+ _dict['client_trusted_domains'] = None
+
+ # set to None if client_redeem_enabled (nullable) is None
+ # and model_fields_set contains the field
+ if self.client_redeem_enabled is None and "client_redeem_enabled" in self.model_fields_set:
+ _dict['client_redeem_enabled'] = None
+
+ # set to None if client_publish_enabled (nullable) is None
+ # and model_fields_set contains the field
+ if self.client_publish_enabled is None and "client_publish_enabled" in self.model_fields_set:
+ _dict['client_publish_enabled'] = None
+
+ # set to None if client_list_vouchers_enabled (nullable) is None
+ # and model_fields_set contains the field
+ if self.client_list_vouchers_enabled is None and "client_list_vouchers_enabled" in self.model_fields_set:
+ _dict['client_list_vouchers_enabled'] = None
+
+ # set to None if client_create_customer_enabled (nullable) is None
+ # and model_fields_set contains the field
+ if self.client_create_customer_enabled is None and "client_create_customer_enabled" in self.model_fields_set:
+ _dict['client_create_customer_enabled'] = None
+
+ # set to None if client_loyalty_events_enabled (nullable) is None
+ # and model_fields_set contains the field
+ if self.client_loyalty_events_enabled is None and "client_loyalty_events_enabled" in self.model_fields_set:
+ _dict['client_loyalty_events_enabled'] = None
+
+ # set to None if client_set_voucher_expiration_date_enabled (nullable) is None
+ # and model_fields_set contains the field
+ if self.client_set_voucher_expiration_date_enabled is None and "client_set_voucher_expiration_date_enabled" in self.model_fields_set:
+ _dict['client_set_voucher_expiration_date_enabled'] = None
+
+ # set to None if webhooks_callout_notifications (nullable) is None
+ # and model_fields_set contains the field
+ if self.webhooks_callout_notifications is None and "webhooks_callout_notifications" in self.model_fields_set:
+ _dict['webhooks_callout_notifications'] = None
+
+ # set to None if api_usage_notifications (nullable) is None
+ # and model_fields_set contains the field
+ if self.api_usage_notifications is None and "api_usage_notifications" in self.model_fields_set:
+ _dict['api_usage_notifications'] = None
+
+ # set to None if cluster_id (nullable) is None
+ # and model_fields_set contains the field
+ if self.cluster_id is None and "cluster_id" in self.model_fields_set:
+ _dict['cluster_id'] = None
+
+ # set to None if case_sensitive_codes (nullable) is None
+ # and model_fields_set contains the field
+ if self.case_sensitive_codes is None and "case_sensitive_codes" in self.model_fields_set:
+ _dict['case_sensitive_codes'] = None
+
+ # set to None if api_version (nullable) is None
+ # and model_fields_set contains the field
+ if self.api_version is None and "api_version" in self.model_fields_set:
+ _dict['api_version'] = None
+
+ # set to None if is_sandbox (nullable) is None
+ # and model_fields_set contains the field
+ if self.is_sandbox is None and "is_sandbox" in self.model_fields_set:
+ _dict['is_sandbox'] = None
+
+ # set to None if webhook_token (nullable) is None
+ # and model_fields_set contains the field
+ if self.webhook_token is None and "webhook_token" in self.model_fields_set:
+ _dict['webhook_token'] = None
+
+ # set to None if default_code_config (nullable) is None
+ # and model_fields_set contains the field
+ if self.default_code_config is None and "default_code_config" in self.model_fields_set:
+ _dict['default_code_config'] = None
+
+ # set to None if limits (nullable) is None
+ # and model_fields_set contains the field
+ if self.limits is None and "limits" in self.model_fields_set:
+ _dict['limits'] = None
+
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of ManagementProjectsGetResponseBody from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "id": obj.get("id"),
+ "name": obj.get("name"),
+ "description": obj.get("description"),
+ "timezone": obj.get("timezone"),
+ "currency": obj.get("currency"),
+ "dial_code": obj.get("dial_code"),
+ "webhook_version": obj.get("webhook_version") if obj.get("webhook_version") is not None else 'v2024-01-01',
+ "client_trusted_domains": obj.get("client_trusted_domains"),
+ "client_redeem_enabled": obj.get("client_redeem_enabled"),
+ "client_publish_enabled": obj.get("client_publish_enabled"),
+ "client_list_vouchers_enabled": obj.get("client_list_vouchers_enabled"),
+ "client_create_customer_enabled": obj.get("client_create_customer_enabled"),
+ "client_loyalty_events_enabled": obj.get("client_loyalty_events_enabled"),
+ "client_set_voucher_expiration_date_enabled": obj.get("client_set_voucher_expiration_date_enabled"),
+ "webhooks_callout_notifications": ManagementProjectsGetResponseBodyWebhooksCalloutNotifications.from_dict(obj["webhooks_callout_notifications"]) if obj.get("webhooks_callout_notifications") is not None else None,
+ "api_usage_notifications": ManagementProjectsGetResponseBodyApiUsageNotifications.from_dict(obj["api_usage_notifications"]) if obj.get("api_usage_notifications") is not None else None,
+ "cluster_id": obj.get("cluster_id"),
+ "case_sensitive_codes": obj.get("case_sensitive_codes"),
+ "api_version": obj.get("api_version") if obj.get("api_version") is not None else 'v2018-08-01',
+ "is_sandbox": obj.get("is_sandbox"),
+ "webhook_token": obj.get("webhook_token"),
+ "default_code_config": ManagementProjectsGetResponseBodyDefaultCodeConfig.from_dict(obj["default_code_config"]) if obj.get("default_code_config") is not None else None,
+ "limits": ManagementProjectsGetResponseBodyLimits.from_dict(obj["limits"]) if obj.get("limits") is not None else None
+ })
+ return _obj
+
+
diff --git a/voucherify/models/management_projects_get_response_body_api_usage_notifications.py b/voucherify/models/management_projects_get_response_body_api_usage_notifications.py
new file mode 100644
index 00000000..dac628bb
--- /dev/null
+++ b/voucherify/models/management_projects_get_response_body_api_usage_notifications.py
@@ -0,0 +1,117 @@
+# coding: utf-8
+
+"""
+ Voucherify API
+
+ Voucherify promotion engine REST API. Please see https://docs.voucherify.io/docs for more details.
+
+ The version of the OpenAPI document: v2018-08-01
+ Contact: support@voucherify.io
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict
+from typing import Any, ClassVar, Dict, List, Optional
+from voucherify.models.usage_notifications import UsageNotifications
+from typing import Optional, Set
+from typing_extensions import Self
+
+class ManagementProjectsGetResponseBodyApiUsageNotifications(BaseModel):
+ """
+ Determines the notification settings.
+ """ # noqa: E501
+ redemptions: Optional[UsageNotifications] = None
+ messages: Optional[UsageNotifications] = None
+ api_calls: Optional[UsageNotifications] = None
+ bulk_api_calls: Optional[UsageNotifications] = None
+ webhook_calls: Optional[UsageNotifications] = None
+ cycle_calls: Optional[UsageNotifications] = None
+ __properties: ClassVar[List[str]] = ["redemptions", "messages", "api_calls", "bulk_api_calls", "webhook_calls", "cycle_calls"]
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of ManagementProjectsGetResponseBodyApiUsageNotifications from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([
+ ])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ # override the default output from pydantic by calling `to_dict()` of redemptions
+ if self.redemptions:
+ _dict['redemptions'] = self.redemptions.to_dict()
+ # override the default output from pydantic by calling `to_dict()` of messages
+ if self.messages:
+ _dict['messages'] = self.messages.to_dict()
+ # override the default output from pydantic by calling `to_dict()` of api_calls
+ if self.api_calls:
+ _dict['api_calls'] = self.api_calls.to_dict()
+ # override the default output from pydantic by calling `to_dict()` of bulk_api_calls
+ if self.bulk_api_calls:
+ _dict['bulk_api_calls'] = self.bulk_api_calls.to_dict()
+ # override the default output from pydantic by calling `to_dict()` of webhook_calls
+ if self.webhook_calls:
+ _dict['webhook_calls'] = self.webhook_calls.to_dict()
+ # override the default output from pydantic by calling `to_dict()` of cycle_calls
+ if self.cycle_calls:
+ _dict['cycle_calls'] = self.cycle_calls.to_dict()
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of ManagementProjectsGetResponseBodyApiUsageNotifications from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "redemptions": UsageNotifications.from_dict(obj["redemptions"]) if obj.get("redemptions") is not None else None,
+ "messages": UsageNotifications.from_dict(obj["messages"]) if obj.get("messages") is not None else None,
+ "api_calls": UsageNotifications.from_dict(obj["api_calls"]) if obj.get("api_calls") is not None else None,
+ "bulk_api_calls": UsageNotifications.from_dict(obj["bulk_api_calls"]) if obj.get("bulk_api_calls") is not None else None,
+ "webhook_calls": UsageNotifications.from_dict(obj["webhook_calls"]) if obj.get("webhook_calls") is not None else None,
+ "cycle_calls": UsageNotifications.from_dict(obj["cycle_calls"]) if obj.get("cycle_calls") is not None else None
+ })
+ return _obj
+
+
diff --git a/voucherify/models/management_projects_get_response_body_default_code_config.py b/voucherify/models/management_projects_get_response_body_default_code_config.py
new file mode 100644
index 00000000..7a7739df
--- /dev/null
+++ b/voucherify/models/management_projects_get_response_body_default_code_config.py
@@ -0,0 +1,93 @@
+# coding: utf-8
+
+"""
+ Voucherify API
+
+ Voucherify promotion engine REST API. Please see https://docs.voucherify.io/docs for more details.
+
+ The version of the OpenAPI document: v2018-08-01
+ Contact: support@voucherify.io
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict, Field, StrictStr
+from typing import Any, ClassVar, Dict, List, Optional
+from typing import Optional, Set
+from typing_extensions import Self
+
+class ManagementProjectsGetResponseBodyDefaultCodeConfig(BaseModel):
+ """
+ Determines the character set that is used as default for vouchers. It is affected by the `\"case_sensitive_codes\"` setting.
+ """ # noqa: E501
+ charset: Optional[StrictStr] = Field(default=None, description="Lists all characters that are used as default for vouchers")
+ __properties: ClassVar[List[str]] = ["charset"]
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of ManagementProjectsGetResponseBodyDefaultCodeConfig from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([
+ ])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ # set to None if charset (nullable) is None
+ # and model_fields_set contains the field
+ if self.charset is None and "charset" in self.model_fields_set:
+ _dict['charset'] = None
+
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of ManagementProjectsGetResponseBodyDefaultCodeConfig from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "charset": obj.get("charset")
+ })
+ return _obj
+
+
diff --git a/voucherify/models/management_projects_get_response_body_limits.py b/voucherify/models/management_projects_get_response_body_limits.py
new file mode 100644
index 00000000..365d99ab
--- /dev/null
+++ b/voucherify/models/management_projects_get_response_body_limits.py
@@ -0,0 +1,116 @@
+# coding: utf-8
+
+"""
+ Voucherify API
+
+ Voucherify promotion engine REST API. Please see https://docs.voucherify.io/docs for more details.
+
+ The version of the OpenAPI document: v2018-08-01
+ Contact: support@voucherify.io
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict
+from typing import Any, ClassVar, Dict, List, Optional
+from voucherify.models.management_projects_get_response_body_limits_api_calls_item import ManagementProjectsGetResponseBodyLimitsApiCallsItem
+from voucherify.models.management_projects_get_response_body_limits_bulk_api_calls_item import ManagementProjectsGetResponseBodyLimitsBulkApiCallsItem
+from typing import Optional, Set
+from typing_extensions import Self
+
+class ManagementProjectsGetResponseBodyLimits(BaseModel):
+ """
+ Determines additional limits set on a given project, e.g. the Sandbox project. If no limits are returned, the limits set for the whole organization apply.
+ """ # noqa: E501
+ api_calls: Optional[List[ManagementProjectsGetResponseBodyLimitsApiCallsItem]] = None
+ bulk_api_calls: Optional[List[ManagementProjectsGetResponseBodyLimitsBulkApiCallsItem]] = None
+ __properties: ClassVar[List[str]] = ["api_calls", "bulk_api_calls"]
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of ManagementProjectsGetResponseBodyLimits from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([
+ ])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ # override the default output from pydantic by calling `to_dict()` of each item in api_calls (list)
+ _items = []
+ if self.api_calls:
+ for _item_api_calls in self.api_calls:
+ if _item_api_calls:
+ _items.append(_item_api_calls.to_dict())
+ _dict['api_calls'] = _items
+ # override the default output from pydantic by calling `to_dict()` of each item in bulk_api_calls (list)
+ _items = []
+ if self.bulk_api_calls:
+ for _item_bulk_api_calls in self.bulk_api_calls:
+ if _item_bulk_api_calls:
+ _items.append(_item_bulk_api_calls.to_dict())
+ _dict['bulk_api_calls'] = _items
+ # set to None if api_calls (nullable) is None
+ # and model_fields_set contains the field
+ if self.api_calls is None and "api_calls" in self.model_fields_set:
+ _dict['api_calls'] = None
+
+ # set to None if bulk_api_calls (nullable) is None
+ # and model_fields_set contains the field
+ if self.bulk_api_calls is None and "bulk_api_calls" in self.model_fields_set:
+ _dict['bulk_api_calls'] = None
+
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of ManagementProjectsGetResponseBodyLimits from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "api_calls": [ManagementProjectsGetResponseBodyLimitsApiCallsItem.from_dict(_item) for _item in obj["api_calls"]] if obj.get("api_calls") is not None else None,
+ "bulk_api_calls": [ManagementProjectsGetResponseBodyLimitsBulkApiCallsItem.from_dict(_item) for _item in obj["bulk_api_calls"]] if obj.get("bulk_api_calls") is not None else None
+ })
+ return _obj
+
+
diff --git a/voucherify/models/management_projects_get_response_body_limits_api_calls_item.py b/voucherify/models/management_projects_get_response_body_limits_api_calls_item.py
new file mode 100644
index 00000000..15172a61
--- /dev/null
+++ b/voucherify/models/management_projects_get_response_body_limits_api_calls_item.py
@@ -0,0 +1,90 @@
+# coding: utf-8
+
+"""
+ Voucherify API
+
+ Voucherify promotion engine REST API. Please see https://docs.voucherify.io/docs for more details.
+
+ The version of the OpenAPI document: v2018-08-01
+ Contact: support@voucherify.io
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr
+from typing import Any, ClassVar, Dict, List, Optional
+from typing import Optional, Set
+from typing_extensions import Self
+
+class ManagementProjectsGetResponseBodyLimitsApiCallsItem(BaseModel):
+ """
+ Determines the limit of API calls per given unit time.
+ """ # noqa: E501
+ value: Optional[StrictInt] = Field(default=None, description="Determines the maximum number of API calls per time set in `\"duration\"`.")
+ duration: Optional[StrictStr] = Field(default=None, description="Determines the amount of time during which the calls up to the number specified in the `value` can be made. The duration is presented in the ISO 8601 format, e.g. `PT1H` means one hour.")
+ __properties: ClassVar[List[str]] = ["value", "duration"]
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of ManagementProjectsGetResponseBodyLimitsApiCallsItem from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([
+ ])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of ManagementProjectsGetResponseBodyLimitsApiCallsItem from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "value": obj.get("value"),
+ "duration": obj.get("duration")
+ })
+ return _obj
+
+
diff --git a/voucherify/models/management_projects_get_response_body_limits_bulk_api_calls_item.py b/voucherify/models/management_projects_get_response_body_limits_bulk_api_calls_item.py
new file mode 100644
index 00000000..5ecea122
--- /dev/null
+++ b/voucherify/models/management_projects_get_response_body_limits_bulk_api_calls_item.py
@@ -0,0 +1,90 @@
+# coding: utf-8
+
+"""
+ Voucherify API
+
+ Voucherify promotion engine REST API. Please see https://docs.voucherify.io/docs for more details.
+
+ The version of the OpenAPI document: v2018-08-01
+ Contact: support@voucherify.io
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr
+from typing import Any, ClassVar, Dict, List, Optional
+from typing import Optional, Set
+from typing_extensions import Self
+
+class ManagementProjectsGetResponseBodyLimitsBulkApiCallsItem(BaseModel):
+ """
+
+ """ # noqa: E501
+ value: Optional[StrictInt] = Field(default=None, description="Determines the maximum number of API calls per time set in `\"duration\"`.")
+ duration: Optional[StrictStr] = Field(default=None, description="Determines the amount of time during which the calls up to the number specified in the `value` can be made. The duration is presented in the ISO 8601 format, e.g. `PT1H` means one hour.")
+ __properties: ClassVar[List[str]] = ["value", "duration"]
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of ManagementProjectsGetResponseBodyLimitsBulkApiCallsItem from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([
+ ])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of ManagementProjectsGetResponseBodyLimitsBulkApiCallsItem from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "value": obj.get("value"),
+ "duration": obj.get("duration")
+ })
+ return _obj
+
+
diff --git a/voucherify/models/management_projects_get_response_body_webhooks_callout_notifications.py b/voucherify/models/management_projects_get_response_body_webhooks_callout_notifications.py
new file mode 100644
index 00000000..d2f06b61
--- /dev/null
+++ b/voucherify/models/management_projects_get_response_body_webhooks_callout_notifications.py
@@ -0,0 +1,108 @@
+# coding: utf-8
+
+"""
+ Voucherify API
+
+ Voucherify promotion engine REST API. Please see https://docs.voucherify.io/docs for more details.
+
+ The version of the OpenAPI document: v2018-08-01
+ Contact: support@voucherify.io
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict
+from typing import Any, ClassVar, Dict, List, Optional
+from voucherify.models.management_projects_get_response_body_webhooks_callout_notifications_distributions import ManagementProjectsGetResponseBodyWebhooksCalloutNotificationsDistributions
+from voucherify.models.management_projects_get_response_body_webhooks_callout_notifications_webhooks import ManagementProjectsGetResponseBodyWebhooksCalloutNotificationsWebhooks
+from typing import Optional, Set
+from typing_extensions import Self
+
+class ManagementProjectsGetResponseBodyWebhooksCalloutNotifications(BaseModel):
+ """
+ Determines the notification settings for webhook callouts configured in Distributions and Project settings.
+ """ # noqa: E501
+ distributions: Optional[ManagementProjectsGetResponseBodyWebhooksCalloutNotificationsDistributions] = None
+ webhooks: Optional[ManagementProjectsGetResponseBodyWebhooksCalloutNotificationsWebhooks] = None
+ __properties: ClassVar[List[str]] = ["distributions", "webhooks"]
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of ManagementProjectsGetResponseBodyWebhooksCalloutNotifications from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([
+ ])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ # override the default output from pydantic by calling `to_dict()` of distributions
+ if self.distributions:
+ _dict['distributions'] = self.distributions.to_dict()
+ # override the default output from pydantic by calling `to_dict()` of webhooks
+ if self.webhooks:
+ _dict['webhooks'] = self.webhooks.to_dict()
+ # set to None if distributions (nullable) is None
+ # and model_fields_set contains the field
+ if self.distributions is None and "distributions" in self.model_fields_set:
+ _dict['distributions'] = None
+
+ # set to None if webhooks (nullable) is None
+ # and model_fields_set contains the field
+ if self.webhooks is None and "webhooks" in self.model_fields_set:
+ _dict['webhooks'] = None
+
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of ManagementProjectsGetResponseBodyWebhooksCalloutNotifications from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "distributions": ManagementProjectsGetResponseBodyWebhooksCalloutNotificationsDistributions.from_dict(obj["distributions"]) if obj.get("distributions") is not None else None,
+ "webhooks": ManagementProjectsGetResponseBodyWebhooksCalloutNotificationsWebhooks.from_dict(obj["webhooks"]) if obj.get("webhooks") is not None else None
+ })
+ return _obj
+
+
diff --git a/voucherify/models/management_projects_get_response_body_webhooks_callout_notifications_distributions.py b/voucherify/models/management_projects_get_response_body_webhooks_callout_notifications_distributions.py
new file mode 100644
index 00000000..d830a9ef
--- /dev/null
+++ b/voucherify/models/management_projects_get_response_body_webhooks_callout_notifications_distributions.py
@@ -0,0 +1,107 @@
+# coding: utf-8
+
+"""
+ Voucherify API
+
+ Voucherify promotion engine REST API. Please see https://docs.voucherify.io/docs for more details.
+
+ The version of the OpenAPI document: v2018-08-01
+ Contact: support@voucherify.io
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr
+from typing import Any, ClassVar, Dict, List, Optional
+from typing import Optional, Set
+from typing_extensions import Self
+
+class ManagementProjectsGetResponseBodyWebhooksCalloutNotificationsDistributions(BaseModel):
+ """
+ Determines the notification settings for webhooks sent through Distributions.
+ """ # noqa: E501
+ email: Optional[StrictBool] = Field(default=None, description="Enables the notification through an email.")
+ in_app: Optional[StrictBool] = Field(default=None, description="Enables the notification through an email.")
+ emails: Optional[List[StrictStr]] = Field(default=None, description="An array of email addresses which will receive the notification.")
+ __properties: ClassVar[List[str]] = ["email", "in_app", "emails"]
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of ManagementProjectsGetResponseBodyWebhooksCalloutNotificationsDistributions from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([
+ ])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ # set to None if email (nullable) is None
+ # and model_fields_set contains the field
+ if self.email is None and "email" in self.model_fields_set:
+ _dict['email'] = None
+
+ # set to None if in_app (nullable) is None
+ # and model_fields_set contains the field
+ if self.in_app is None and "in_app" in self.model_fields_set:
+ _dict['in_app'] = None
+
+ # set to None if emails (nullable) is None
+ # and model_fields_set contains the field
+ if self.emails is None and "emails" in self.model_fields_set:
+ _dict['emails'] = None
+
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of ManagementProjectsGetResponseBodyWebhooksCalloutNotificationsDistributions from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "email": obj.get("email"),
+ "in_app": obj.get("in_app"),
+ "emails": obj.get("emails")
+ })
+ return _obj
+
+
diff --git a/voucherify/models/management_projects_get_response_body_webhooks_callout_notifications_webhooks.py b/voucherify/models/management_projects_get_response_body_webhooks_callout_notifications_webhooks.py
new file mode 100644
index 00000000..9d15393d
--- /dev/null
+++ b/voucherify/models/management_projects_get_response_body_webhooks_callout_notifications_webhooks.py
@@ -0,0 +1,107 @@
+# coding: utf-8
+
+"""
+ Voucherify API
+
+ Voucherify promotion engine REST API. Please see https://docs.voucherify.io/docs for more details.
+
+ The version of the OpenAPI document: v2018-08-01
+ Contact: support@voucherify.io
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr
+from typing import Any, ClassVar, Dict, List, Optional
+from typing import Optional, Set
+from typing_extensions import Self
+
+class ManagementProjectsGetResponseBodyWebhooksCalloutNotificationsWebhooks(BaseModel):
+ """
+ Determines the notification settings for webhooks sent as set out in the Project settings.
+ """ # noqa: E501
+ email: Optional[StrictBool] = Field(default=None, description="Enables the notification through an email.")
+ in_app: Optional[StrictBool] = Field(default=None, description="Enables the notification through an email.")
+ emails: Optional[List[StrictStr]] = Field(default=None, description="An array of email addresses which will receive the notification.")
+ __properties: ClassVar[List[str]] = ["email", "in_app", "emails"]
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of ManagementProjectsGetResponseBodyWebhooksCalloutNotificationsWebhooks from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([
+ ])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ # set to None if email (nullable) is None
+ # and model_fields_set contains the field
+ if self.email is None and "email" in self.model_fields_set:
+ _dict['email'] = None
+
+ # set to None if in_app (nullable) is None
+ # and model_fields_set contains the field
+ if self.in_app is None and "in_app" in self.model_fields_set:
+ _dict['in_app'] = None
+
+ # set to None if emails (nullable) is None
+ # and model_fields_set contains the field
+ if self.emails is None and "emails" in self.model_fields_set:
+ _dict['emails'] = None
+
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of ManagementProjectsGetResponseBodyWebhooksCalloutNotificationsWebhooks from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "email": obj.get("email"),
+ "in_app": obj.get("in_app"),
+ "emails": obj.get("emails")
+ })
+ return _obj
+
+
diff --git a/voucherify/models/management_projects_list_response_body.py b/voucherify/models/management_projects_list_response_body.py
new file mode 100644
index 00000000..19ca9d17
--- /dev/null
+++ b/voucherify/models/management_projects_list_response_body.py
@@ -0,0 +1,142 @@
+# coding: utf-8
+
+"""
+ Voucherify API
+
+ Voucherify promotion engine REST API. Please see https://docs.voucherify.io/docs for more details.
+
+ The version of the OpenAPI document: v2018-08-01
+ Contact: support@voucherify.io
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr, field_validator
+from typing import Any, ClassVar, Dict, List, Optional
+from voucherify.models.management_project import ManagementProject
+from typing import Optional, Set
+from typing_extensions import Self
+
+class ManagementProjectsListResponseBody(BaseModel):
+ """
+ Schema model for **GET** `managment/v1/projects`.
+ """ # noqa: E501
+ object: Optional[StrictStr] = Field(default='list', description="The type of the object represented by JSON. This object stores information about the projects in a dictionary.")
+ data_ref: Optional[StrictStr] = Field(default='data', description="Identifies the name of the attribute that contains the array of project objects.")
+ data: Optional[List[ManagementProject]] = Field(default=None, description="Array of project objects.")
+ total: Optional[StrictInt] = Field(default=None, description="The total number of projects.")
+ __properties: ClassVar[List[str]] = ["object", "data_ref", "data", "total"]
+
+ @field_validator('object')
+ def object_validate_enum(cls, value):
+ """Validates the enum"""
+ if value is None:
+ return value
+
+ if value not in set(['list']):
+ raise ValueError("must be one of enum values ('list')")
+ return value
+
+ @field_validator('data_ref')
+ def data_ref_validate_enum(cls, value):
+ """Validates the enum"""
+ if value is None:
+ return value
+
+ if value not in set(['data']):
+ raise ValueError("must be one of enum values ('data')")
+ return value
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of ManagementProjectsListResponseBody from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([
+ ])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ # override the default output from pydantic by calling `to_dict()` of each item in data (list)
+ _items = []
+ if self.data:
+ for _item_data in self.data:
+ if _item_data:
+ _items.append(_item_data.to_dict())
+ _dict['data'] = _items
+ # set to None if object (nullable) is None
+ # and model_fields_set contains the field
+ if self.object is None and "object" in self.model_fields_set:
+ _dict['object'] = None
+
+ # set to None if data_ref (nullable) is None
+ # and model_fields_set contains the field
+ if self.data_ref is None and "data_ref" in self.model_fields_set:
+ _dict['data_ref'] = None
+
+ # set to None if data (nullable) is None
+ # and model_fields_set contains the field
+ if self.data is None and "data" in self.model_fields_set:
+ _dict['data'] = None
+
+ # set to None if total (nullable) is None
+ # and model_fields_set contains the field
+ if self.total is None and "total" in self.model_fields_set:
+ _dict['total'] = None
+
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of ManagementProjectsListResponseBody from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "object": obj.get("object") if obj.get("object") is not None else 'list',
+ "data_ref": obj.get("data_ref") if obj.get("data_ref") is not None else 'data',
+ "data": [ManagementProject.from_dict(_item) for _item in obj["data"]] if obj.get("data") is not None else None,
+ "total": obj.get("total")
+ })
+ return _obj
+
+
diff --git a/voucherify/models/management_projects_metadata_schema.py b/voucherify/models/management_projects_metadata_schema.py
new file mode 100644
index 00000000..ab754eb7
--- /dev/null
+++ b/voucherify/models/management_projects_metadata_schema.py
@@ -0,0 +1,136 @@
+# coding: utf-8
+
+"""
+ Voucherify API
+
+ Voucherify promotion engine REST API. Please see https://docs.voucherify.io/docs for more details.
+
+ The version of the OpenAPI document: v2018-08-01
+ Contact: support@voucherify.io
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from datetime import datetime
+from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr
+from typing import Any, ClassVar, Dict, List, Optional
+from typing import Optional, Set
+from typing_extensions import Self
+
+class ManagementProjectsMetadataSchema(BaseModel):
+ """
+ Object representing a metadata schema.
+ """ # noqa: E501
+ id: Optional[StrictStr] = Field(default=None, description="Unique identifier of the metadata schema.")
+ related_object: Optional[StrictStr] = Field(default=None, description="The resource type. You can define custom metadata schemas, which have a custom `\"related_object\"` resource type. The standard metadata schemas are: `\"campaign\"`, `\"customer\"`, `\"earning_rule\"`, `\"loyalty_tier\"`, `\"order\"`, `\"order_item\"`, `\"product\"`, `\"promotion_tier\"`, `\"publication\"`, `\"redemption\"`, `\"reward\"`, `\"voucher\"`.")
+ properties: Optional[Dict[str, Any]] = Field(default=None, description="Contains metadata definitions.")
+ allow_defined_only: Optional[StrictBool] = Field(default=None, description="Restricts the creation of metadata fields when set to `true`. It indicates whether or not you can create new metadata definitions, e.g. in the campaign or publication manager. If set to `true`, then only the defined fields are available for assigning values.")
+ created_at: Optional[datetime] = Field(default=None, description="Timestamp representing the date and time when the metadata schema was created. The value for this parameter is shown in the ISO 8601 format.")
+ updated_at: Optional[datetime] = Field(default=None, description="Timestamp representing the date and time when the metadata schema was updated. The value for this parameter is shown in the ISO 8601 format.")
+ object: Optional[StrictStr] = Field(default='metadata_schema', description="The type of the object represented by the JSON. This object stores information about the metadata schema.")
+ __properties: ClassVar[List[str]] = ["id", "related_object", "properties", "allow_defined_only", "created_at", "updated_at", "object"]
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of ManagementProjectsMetadataSchema from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([
+ ])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ # set to None if id (nullable) is None
+ # and model_fields_set contains the field
+ if self.id is None and "id" in self.model_fields_set:
+ _dict['id'] = None
+
+ # set to None if related_object (nullable) is None
+ # and model_fields_set contains the field
+ if self.related_object is None and "related_object" in self.model_fields_set:
+ _dict['related_object'] = None
+
+ # set to None if properties (nullable) is None
+ # and model_fields_set contains the field
+ if self.properties is None and "properties" in self.model_fields_set:
+ _dict['properties'] = None
+
+ # set to None if allow_defined_only (nullable) is None
+ # and model_fields_set contains the field
+ if self.allow_defined_only is None and "allow_defined_only" in self.model_fields_set:
+ _dict['allow_defined_only'] = None
+
+ # set to None if created_at (nullable) is None
+ # and model_fields_set contains the field
+ if self.created_at is None and "created_at" in self.model_fields_set:
+ _dict['created_at'] = None
+
+ # set to None if updated_at (nullable) is None
+ # and model_fields_set contains the field
+ if self.updated_at is None and "updated_at" in self.model_fields_set:
+ _dict['updated_at'] = None
+
+ # set to None if object (nullable) is None
+ # and model_fields_set contains the field
+ if self.object is None and "object" in self.model_fields_set:
+ _dict['object'] = None
+
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of ManagementProjectsMetadataSchema from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "id": obj.get("id"),
+ "related_object": obj.get("related_object"),
+ "properties": obj.get("properties"),
+ "allow_defined_only": obj.get("allow_defined_only"),
+ "created_at": obj.get("created_at"),
+ "updated_at": obj.get("updated_at"),
+ "object": obj.get("object") if obj.get("object") is not None else 'metadata_schema'
+ })
+ return _obj
+
+
diff --git a/voucherify/models/management_projects_metadata_schemas_create_request_body.py b/voucherify/models/management_projects_metadata_schemas_create_request_body.py
new file mode 100644
index 00000000..4d0b968c
--- /dev/null
+++ b/voucherify/models/management_projects_metadata_schemas_create_request_body.py
@@ -0,0 +1,107 @@
+# coding: utf-8
+
+"""
+ Voucherify API
+
+ Voucherify promotion engine REST API. Please see https://docs.voucherify.io/docs for more details.
+
+ The version of the OpenAPI document: v2018-08-01
+ Contact: support@voucherify.io
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr
+from typing import Any, ClassVar, Dict, List, Optional
+from typing import Optional, Set
+from typing_extensions import Self
+
+class ManagementProjectsMetadataSchemasCreateRequestBody(BaseModel):
+ """
+
+ """ # noqa: E501
+ related_object: Optional[StrictStr] = Field(default=None, description="The resource type. You can define custom metadata schemas, which have a custom `\"related_object\"` resource type, or you can use standard resource types: `\"campaign\"`, `\"customer\"`, `\"earning_rule\"`, `\"loyalty_tier\"`, `\"order\"`, `\"order_item\"`, `\"product\"`, `\"promotion_tier\"`, `\"publication\"`, `\"redemption\"`, `\"reward\"`, `\"voucher\"`.")
+ allow_defined_only: Optional[StrictBool] = Field(default=False, description="Restricts the creation of metadata fields when set to `true`. In other words, it indicates whether or not you are allowed to create new metadata definitions; for example, in the campaign manager or publication manager. If it is set to true, then only the defined fields will be available for assigning values. ")
+ properties: Optional[Dict[str, Any]] = Field(default=None, description="Contains metadata definitions. There can be many properties within this object. Only the properties sent in the request will be created.")
+ __properties: ClassVar[List[str]] = ["related_object", "allow_defined_only", "properties"]
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of ManagementProjectsMetadataSchemasCreateRequestBody from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([
+ ])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ # set to None if related_object (nullable) is None
+ # and model_fields_set contains the field
+ if self.related_object is None and "related_object" in self.model_fields_set:
+ _dict['related_object'] = None
+
+ # set to None if allow_defined_only (nullable) is None
+ # and model_fields_set contains the field
+ if self.allow_defined_only is None and "allow_defined_only" in self.model_fields_set:
+ _dict['allow_defined_only'] = None
+
+ # set to None if properties (nullable) is None
+ # and model_fields_set contains the field
+ if self.properties is None and "properties" in self.model_fields_set:
+ _dict['properties'] = None
+
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of ManagementProjectsMetadataSchemasCreateRequestBody from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "related_object": obj.get("related_object"),
+ "allow_defined_only": obj.get("allow_defined_only") if obj.get("allow_defined_only") is not None else False,
+ "properties": obj.get("properties")
+ })
+ return _obj
+
+
diff --git a/voucherify/models/management_projects_metadata_schemas_create_response_body.py b/voucherify/models/management_projects_metadata_schemas_create_response_body.py
new file mode 100644
index 00000000..d09d7724
--- /dev/null
+++ b/voucherify/models/management_projects_metadata_schemas_create_response_body.py
@@ -0,0 +1,136 @@
+# coding: utf-8
+
+"""
+ Voucherify API
+
+ Voucherify promotion engine REST API. Please see https://docs.voucherify.io/docs for more details.
+
+ The version of the OpenAPI document: v2018-08-01
+ Contact: support@voucherify.io
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from datetime import datetime
+from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr
+from typing import Any, ClassVar, Dict, List, Optional
+from typing import Optional, Set
+from typing_extensions import Self
+
+class ManagementProjectsMetadataSchemasCreateResponseBody(BaseModel):
+ """
+ Response body schema for **POST** `management/v1/projects/{projectId}/metadata-schemas`.
+ """ # noqa: E501
+ id: Optional[StrictStr] = Field(default=None, description="Unique identifier of the metadata schema.")
+ related_object: Optional[StrictStr] = Field(default=None, description="The resource type. You can define custom metadata schemas, which have a custom `\"related_object\"` resource type. The standard metadata schemas are: `\"campaign\"`, `\"customer\"`, `\"earning_rule\"`, `\"loyalty_tier\"`, `\"order\"`, `\"order_item\"`, `\"product\"`, `\"promotion_tier\"`, `\"publication\"`, `\"redemption\"`, `\"reward\"`, `\"voucher\"`.")
+ properties: Optional[Dict[str, Any]] = Field(default=None, description="Contains metadata definitions.")
+ allow_defined_only: Optional[StrictBool] = Field(default=None, description="Restricts the creation of metadata fields when set to `true`. It indicates whether or not you can create new metadata definitions, e.g. in the campaign or publication manager. If set to `true`, then only the defined fields are available for assigning values.")
+ created_at: Optional[datetime] = Field(default=None, description="Timestamp representing the date and time when the metadata schema was created. The value for this parameter is shown in the ISO 8601 format.")
+ updated_at: Optional[datetime] = Field(default=None, description="Timestamp representing the date and time when the metadata schema was updated. The value for this parameter is shown in the ISO 8601 format.")
+ object: Optional[StrictStr] = Field(default='metadata_schema', description="The type of the object represented by the JSON. This object stores information about the metadata schema.")
+ __properties: ClassVar[List[str]] = ["id", "related_object", "properties", "allow_defined_only", "created_at", "updated_at", "object"]
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of ManagementProjectsMetadataSchemasCreateResponseBody from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([
+ ])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ # set to None if id (nullable) is None
+ # and model_fields_set contains the field
+ if self.id is None and "id" in self.model_fields_set:
+ _dict['id'] = None
+
+ # set to None if related_object (nullable) is None
+ # and model_fields_set contains the field
+ if self.related_object is None and "related_object" in self.model_fields_set:
+ _dict['related_object'] = None
+
+ # set to None if properties (nullable) is None
+ # and model_fields_set contains the field
+ if self.properties is None and "properties" in self.model_fields_set:
+ _dict['properties'] = None
+
+ # set to None if allow_defined_only (nullable) is None
+ # and model_fields_set contains the field
+ if self.allow_defined_only is None and "allow_defined_only" in self.model_fields_set:
+ _dict['allow_defined_only'] = None
+
+ # set to None if created_at (nullable) is None
+ # and model_fields_set contains the field
+ if self.created_at is None and "created_at" in self.model_fields_set:
+ _dict['created_at'] = None
+
+ # set to None if updated_at (nullable) is None
+ # and model_fields_set contains the field
+ if self.updated_at is None and "updated_at" in self.model_fields_set:
+ _dict['updated_at'] = None
+
+ # set to None if object (nullable) is None
+ # and model_fields_set contains the field
+ if self.object is None and "object" in self.model_fields_set:
+ _dict['object'] = None
+
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of ManagementProjectsMetadataSchemasCreateResponseBody from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "id": obj.get("id"),
+ "related_object": obj.get("related_object"),
+ "properties": obj.get("properties"),
+ "allow_defined_only": obj.get("allow_defined_only"),
+ "created_at": obj.get("created_at"),
+ "updated_at": obj.get("updated_at"),
+ "object": obj.get("object") if obj.get("object") is not None else 'metadata_schema'
+ })
+ return _obj
+
+
diff --git a/voucherify/models/management_projects_metadata_schemas_get_response_body.py b/voucherify/models/management_projects_metadata_schemas_get_response_body.py
new file mode 100644
index 00000000..7e8cf98e
--- /dev/null
+++ b/voucherify/models/management_projects_metadata_schemas_get_response_body.py
@@ -0,0 +1,136 @@
+# coding: utf-8
+
+"""
+ Voucherify API
+
+ Voucherify promotion engine REST API. Please see https://docs.voucherify.io/docs for more details.
+
+ The version of the OpenAPI document: v2018-08-01
+ Contact: support@voucherify.io
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from datetime import datetime
+from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr
+from typing import Any, ClassVar, Dict, List, Optional
+from typing import Optional, Set
+from typing_extensions import Self
+
+class ManagementProjectsMetadataSchemasGetResponseBody(BaseModel):
+ """
+ Response body schema for **GET** `management/v1/projects/{projectId}/metadata-schemas/{metadataSchemaId}`.
+ """ # noqa: E501
+ id: Optional[StrictStr] = Field(default=None, description="Unique identifier of the metadata schema.")
+ related_object: Optional[StrictStr] = Field(default=None, description="The resource type. You can define custom metadata schemas, which have a custom `\"related_object\"` resource type. The standard metadata schemas are: `\"campaign\"`, `\"customer\"`, `\"earning_rule\"`, `\"loyalty_tier\"`, `\"order\"`, `\"order_item\"`, `\"product\"`, `\"promotion_tier\"`, `\"publication\"`, `\"redemption\"`, `\"reward\"`, `\"voucher\"`.")
+ properties: Optional[Dict[str, Any]] = Field(default=None, description="Contains metadata definitions.")
+ allow_defined_only: Optional[StrictBool] = Field(default=None, description="Restricts the creation of metadata fields when set to `true`. It indicates whether or not you can create new metadata definitions, e.g. in the campaign or publication manager. If set to `true`, then only the defined fields are available for assigning values.")
+ created_at: Optional[datetime] = Field(default=None, description="Timestamp representing the date and time when the metadata schema was created. The value for this parameter is shown in the ISO 8601 format.")
+ updated_at: Optional[datetime] = Field(default=None, description="Timestamp representing the date and time when the metadata schema was updated. The value for this parameter is shown in the ISO 8601 format.")
+ object: Optional[StrictStr] = Field(default='metadata_schema', description="The type of the object represented by the JSON. This object stores information about the metadata schema.")
+ __properties: ClassVar[List[str]] = ["id", "related_object", "properties", "allow_defined_only", "created_at", "updated_at", "object"]
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of ManagementProjectsMetadataSchemasGetResponseBody from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([
+ ])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ # set to None if id (nullable) is None
+ # and model_fields_set contains the field
+ if self.id is None and "id" in self.model_fields_set:
+ _dict['id'] = None
+
+ # set to None if related_object (nullable) is None
+ # and model_fields_set contains the field
+ if self.related_object is None and "related_object" in self.model_fields_set:
+ _dict['related_object'] = None
+
+ # set to None if properties (nullable) is None
+ # and model_fields_set contains the field
+ if self.properties is None and "properties" in self.model_fields_set:
+ _dict['properties'] = None
+
+ # set to None if allow_defined_only (nullable) is None
+ # and model_fields_set contains the field
+ if self.allow_defined_only is None and "allow_defined_only" in self.model_fields_set:
+ _dict['allow_defined_only'] = None
+
+ # set to None if created_at (nullable) is None
+ # and model_fields_set contains the field
+ if self.created_at is None and "created_at" in self.model_fields_set:
+ _dict['created_at'] = None
+
+ # set to None if updated_at (nullable) is None
+ # and model_fields_set contains the field
+ if self.updated_at is None and "updated_at" in self.model_fields_set:
+ _dict['updated_at'] = None
+
+ # set to None if object (nullable) is None
+ # and model_fields_set contains the field
+ if self.object is None and "object" in self.model_fields_set:
+ _dict['object'] = None
+
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of ManagementProjectsMetadataSchemasGetResponseBody from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "id": obj.get("id"),
+ "related_object": obj.get("related_object"),
+ "properties": obj.get("properties"),
+ "allow_defined_only": obj.get("allow_defined_only"),
+ "created_at": obj.get("created_at"),
+ "updated_at": obj.get("updated_at"),
+ "object": obj.get("object") if obj.get("object") is not None else 'metadata_schema'
+ })
+ return _obj
+
+
diff --git a/voucherify/models/management_projects_metadata_schemas_list_response_body.py b/voucherify/models/management_projects_metadata_schemas_list_response_body.py
new file mode 100644
index 00000000..30890387
--- /dev/null
+++ b/voucherify/models/management_projects_metadata_schemas_list_response_body.py
@@ -0,0 +1,142 @@
+# coding: utf-8
+
+"""
+ Voucherify API
+
+ Voucherify promotion engine REST API. Please see https://docs.voucherify.io/docs for more details.
+
+ The version of the OpenAPI document: v2018-08-01
+ Contact: support@voucherify.io
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr, field_validator
+from typing import Any, ClassVar, Dict, List, Optional
+from voucherify.models.management_projects_metadata_schema import ManagementProjectsMetadataSchema
+from typing import Optional, Set
+from typing_extensions import Self
+
+class ManagementProjectsMetadataSchemasListResponseBody(BaseModel):
+ """
+ Object containing a list of metadata schemas.
+ """ # noqa: E501
+ object: Optional[StrictStr] = Field(default='list', description="The type of the object represented by JSON. This object stores information about the metadata schemas in a dictionary.")
+ data_ref: Optional[StrictStr] = Field(default='data', description="Identifies the name of the attribute that contains the array of metadata schema objects.")
+ data: Optional[List[ManagementProjectsMetadataSchema]] = Field(default=None, description="Array of metadata schema objects. The metadata schemas are listed by related object properties.")
+ total: Optional[StrictInt] = Field(default=None, description="The total number of metadata schema objects.")
+ __properties: ClassVar[List[str]] = ["object", "data_ref", "data", "total"]
+
+ @field_validator('object')
+ def object_validate_enum(cls, value):
+ """Validates the enum"""
+ if value is None:
+ return value
+
+ if value not in set(['list']):
+ raise ValueError("must be one of enum values ('list')")
+ return value
+
+ @field_validator('data_ref')
+ def data_ref_validate_enum(cls, value):
+ """Validates the enum"""
+ if value is None:
+ return value
+
+ if value not in set(['data']):
+ raise ValueError("must be one of enum values ('data')")
+ return value
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of ManagementProjectsMetadataSchemasListResponseBody from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([
+ ])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ # override the default output from pydantic by calling `to_dict()` of each item in data (list)
+ _items = []
+ if self.data:
+ for _item_data in self.data:
+ if _item_data:
+ _items.append(_item_data.to_dict())
+ _dict['data'] = _items
+ # set to None if object (nullable) is None
+ # and model_fields_set contains the field
+ if self.object is None and "object" in self.model_fields_set:
+ _dict['object'] = None
+
+ # set to None if data_ref (nullable) is None
+ # and model_fields_set contains the field
+ if self.data_ref is None and "data_ref" in self.model_fields_set:
+ _dict['data_ref'] = None
+
+ # set to None if data (nullable) is None
+ # and model_fields_set contains the field
+ if self.data is None and "data" in self.model_fields_set:
+ _dict['data'] = None
+
+ # set to None if total (nullable) is None
+ # and model_fields_set contains the field
+ if self.total is None and "total" in self.model_fields_set:
+ _dict['total'] = None
+
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of ManagementProjectsMetadataSchemasListResponseBody from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "object": obj.get("object") if obj.get("object") is not None else 'list',
+ "data_ref": obj.get("data_ref") if obj.get("data_ref") is not None else 'data',
+ "data": [ManagementProjectsMetadataSchema.from_dict(_item) for _item in obj["data"]] if obj.get("data") is not None else None,
+ "total": obj.get("total")
+ })
+ return _obj
+
+
diff --git a/voucherify/models/management_projects_metadata_schemas_update_request_body.py b/voucherify/models/management_projects_metadata_schemas_update_request_body.py
new file mode 100644
index 00000000..a1088202
--- /dev/null
+++ b/voucherify/models/management_projects_metadata_schemas_update_request_body.py
@@ -0,0 +1,100 @@
+# coding: utf-8
+
+"""
+ Voucherify API
+
+ Voucherify promotion engine REST API. Please see https://docs.voucherify.io/docs for more details.
+
+ The version of the OpenAPI document: v2018-08-01
+ Contact: support@voucherify.io
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict, Field, StrictBool
+from typing import Any, ClassVar, Dict, List, Optional
+from typing import Optional, Set
+from typing_extensions import Self
+
+class ManagementProjectsMetadataSchemasUpdateRequestBody(BaseModel):
+ """
+
+ """ # noqa: E501
+ allow_defined_only: Optional[StrictBool] = Field(default=None, description="Restricts the creation of metadata fields when set to `true`. In other words, it indicates whether or not you are allowed to create new metadata definitions; for example, in the campaign manager or publication manager. If it is set to true, then only the defined fields will be available for assigning values. ")
+ properties: Optional[Dict[str, Any]] = Field(default=None, description="Contains metadata definitions. There can be many properties within this object. Only the properties sent in the request will be updated. However, if you send a property, all its key-value pairs must be provided - otherwise, they will be overwritten to new values. You cannot change the `\"type\"` property. However, it is required, so you need to add it to the request.")
+ __properties: ClassVar[List[str]] = ["allow_defined_only", "properties"]
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of ManagementProjectsMetadataSchemasUpdateRequestBody from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([
+ ])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ # set to None if allow_defined_only (nullable) is None
+ # and model_fields_set contains the field
+ if self.allow_defined_only is None and "allow_defined_only" in self.model_fields_set:
+ _dict['allow_defined_only'] = None
+
+ # set to None if properties (nullable) is None
+ # and model_fields_set contains the field
+ if self.properties is None and "properties" in self.model_fields_set:
+ _dict['properties'] = None
+
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of ManagementProjectsMetadataSchemasUpdateRequestBody from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "allow_defined_only": obj.get("allow_defined_only"),
+ "properties": obj.get("properties")
+ })
+ return _obj
+
+
diff --git a/voucherify/models/management_projects_metadata_schemas_update_response_body.py b/voucherify/models/management_projects_metadata_schemas_update_response_body.py
new file mode 100644
index 00000000..9ec54f75
--- /dev/null
+++ b/voucherify/models/management_projects_metadata_schemas_update_response_body.py
@@ -0,0 +1,136 @@
+# coding: utf-8
+
+"""
+ Voucherify API
+
+ Voucherify promotion engine REST API. Please see https://docs.voucherify.io/docs for more details.
+
+ The version of the OpenAPI document: v2018-08-01
+ Contact: support@voucherify.io
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from datetime import datetime
+from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr
+from typing import Any, ClassVar, Dict, List, Optional
+from typing import Optional, Set
+from typing_extensions import Self
+
+class ManagementProjectsMetadataSchemasUpdateResponseBody(BaseModel):
+ """
+ Response body schema for **PUT** `management/v1/projects/{projectId}/metadata-schemas/{metadataSchemaId}`.
+ """ # noqa: E501
+ id: Optional[StrictStr] = Field(default=None, description="Unique identifier of the metadata schema.")
+ related_object: Optional[StrictStr] = Field(default=None, description="The resource type. You can define custom metadata schemas, which have a custom `\"related_object\"` resource type. The standard metadata schemas are: `\"campaign\"`, `\"customer\"`, `\"earning_rule\"`, `\"loyalty_tier\"`, `\"order\"`, `\"order_item\"`, `\"product\"`, `\"promotion_tier\"`, `\"publication\"`, `\"redemption\"`, `\"reward\"`, `\"voucher\"`.")
+ properties: Optional[Dict[str, Any]] = Field(default=None, description="Contains metadata definitions.")
+ allow_defined_only: Optional[StrictBool] = Field(default=None, description="Restricts the creation of metadata fields when set to `true`. It indicates whether or not you can create new metadata definitions, e.g. in the campaign or publication manager. If set to `true`, then only the defined fields are available for assigning values.")
+ created_at: Optional[datetime] = Field(default=None, description="Timestamp representing the date and time when the metadata schema was created. The value for this parameter is shown in the ISO 8601 format.")
+ updated_at: Optional[datetime] = Field(default=None, description="Timestamp representing the date and time when the metadata schema was updated. The value for this parameter is shown in the ISO 8601 format.")
+ object: Optional[StrictStr] = Field(default='metadata_schema', description="The type of the object represented by the JSON. This object stores information about the metadata schema.")
+ __properties: ClassVar[List[str]] = ["id", "related_object", "properties", "allow_defined_only", "created_at", "updated_at", "object"]
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of ManagementProjectsMetadataSchemasUpdateResponseBody from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([
+ ])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ # set to None if id (nullable) is None
+ # and model_fields_set contains the field
+ if self.id is None and "id" in self.model_fields_set:
+ _dict['id'] = None
+
+ # set to None if related_object (nullable) is None
+ # and model_fields_set contains the field
+ if self.related_object is None and "related_object" in self.model_fields_set:
+ _dict['related_object'] = None
+
+ # set to None if properties (nullable) is None
+ # and model_fields_set contains the field
+ if self.properties is None and "properties" in self.model_fields_set:
+ _dict['properties'] = None
+
+ # set to None if allow_defined_only (nullable) is None
+ # and model_fields_set contains the field
+ if self.allow_defined_only is None and "allow_defined_only" in self.model_fields_set:
+ _dict['allow_defined_only'] = None
+
+ # set to None if created_at (nullable) is None
+ # and model_fields_set contains the field
+ if self.created_at is None and "created_at" in self.model_fields_set:
+ _dict['created_at'] = None
+
+ # set to None if updated_at (nullable) is None
+ # and model_fields_set contains the field
+ if self.updated_at is None and "updated_at" in self.model_fields_set:
+ _dict['updated_at'] = None
+
+ # set to None if object (nullable) is None
+ # and model_fields_set contains the field
+ if self.object is None and "object" in self.model_fields_set:
+ _dict['object'] = None
+
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of ManagementProjectsMetadataSchemasUpdateResponseBody from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "id": obj.get("id"),
+ "related_object": obj.get("related_object"),
+ "properties": obj.get("properties"),
+ "allow_defined_only": obj.get("allow_defined_only"),
+ "created_at": obj.get("created_at"),
+ "updated_at": obj.get("updated_at"),
+ "object": obj.get("object") if obj.get("object") is not None else 'metadata_schema'
+ })
+ return _obj
+
+
diff --git a/voucherify/models/management_projects_stacking_rules.py b/voucherify/models/management_projects_stacking_rules.py
new file mode 100644
index 00000000..07936ca9
--- /dev/null
+++ b/voucherify/models/management_projects_stacking_rules.py
@@ -0,0 +1,223 @@
+# coding: utf-8
+
+"""
+ Voucherify API
+
+ Voucherify promotion engine REST API. Please see https://docs.voucherify.io/docs for more details.
+
+ The version of the OpenAPI document: v2018-08-01
+ Contact: support@voucherify.io
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from datetime import datetime
+from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr, field_validator
+from typing import Any, ClassVar, Dict, List, Optional
+from typing_extensions import Annotated
+from typing import Optional, Set
+from typing_extensions import Self
+
+class ManagementProjectsStackingRules(BaseModel):
+ """
+ Object representing the details of the stacking rules.
+ """ # noqa: E501
+ id: Optional[StrictStr] = Field(default=None, description="The unique identifier of the stacking rules.")
+ exclusive_categories: Optional[List[StrictStr]] = Field(default=None, description="Lists the IDs of the categories that are exclusive.")
+ joint_categories: Optional[List[StrictStr]] = Field(default=None, description="Lists the IDs of the categories that are joint.")
+ redeemables_limit: Optional[Annotated[int, Field(le=30, strict=True, ge=1)]] = Field(default=None, description="Defines how many redeemables can be sent to Voucherify for validation at the same time.")
+ applicable_redeemables_limit: Optional[Annotated[int, Field(strict=True, ge=1)]] = Field(default=None, description="Defines how many redeemables can be applied at the same time. The number must be less than or equal to `\"redeemables_limit\"`.")
+ applicable_redeemables_per_category_limit: Optional[StrictInt] = Field(default=None, description="Defines how many redeemables with the same category can be applied at the same time. The number must be less than or equal to `\"applicable_redeemables_limit\"`.")
+ applicable_exclusive_redeemables_limit: Optional[Annotated[int, Field(le=5, strict=True, ge=1)]] = Field(default=None, description="Defines how many redeemables with an assigned exclusive category can be applied at the same time.")
+ applicable_exclusive_redeemables_per_category_limit: Optional[StrictInt] = Field(default=None, description="Defines how many exclusive redeemables with the same category can be applied at the same time. The number must be less than or equal to `\"applicable_exclusive_redeemables_limit\"`.")
+ discount_calculation_mode: Optional[StrictStr] = Field(default=None, description="Defines if the discounts are applied by taking into account the initial order amount or the discounted order amount.")
+ initial_amount_mode_categories: Optional[List[StrictStr]] = Field(default=None, description="Lists the IDs of the categories that apply a discount based on the initial amount.")
+ discounted_amount_mode_categories: Optional[List[StrictStr]] = Field(default=None, description="Lists the IDs of the categories that apply a discount based on the discounted amount.")
+ redeemables_application_mode: Optional[StrictStr] = Field(default=None, description="Defines the application mode for redeemables. `\"ALL\"` means that all redeemables must be validated for the redemption to be successful. `\"PARTIAL\"` means that only those redeemables that can be validated will be redeemed. The redeemables that fail validaton will be skipped.")
+ redeemables_sorting_rule: Optional[StrictStr] = Field(default=None, description="Defines the sorting rule for redeemables. `\"CATEGORY_HIERARCHY\"` means that redeemables are applied with the order established by the hierarchy of the categories. `\"REQUESTED_ORDER\"` means that redeemables are applied with the order established in the request.")
+ created_at: Optional[datetime] = Field(default=None, description="Timestamp representing the date and time when the stacking rules were created. The value for this parameter is shown in the ISO 8601 format.")
+ updated_at: Optional[datetime] = Field(default=None, description="Timestamp representing the date and time when the stacking rules were updated. The value for this parameter is shown in the ISO 8601 format.")
+ __properties: ClassVar[List[str]] = ["id", "exclusive_categories", "joint_categories", "redeemables_limit", "applicable_redeemables_limit", "applicable_redeemables_per_category_limit", "applicable_exclusive_redeemables_limit", "applicable_exclusive_redeemables_per_category_limit", "discount_calculation_mode", "initial_amount_mode_categories", "discounted_amount_mode_categories", "redeemables_application_mode", "redeemables_sorting_rule", "created_at", "updated_at"]
+
+ @field_validator('discount_calculation_mode')
+ def discount_calculation_mode_validate_enum(cls, value):
+ """Validates the enum"""
+ if value is None:
+ return value
+
+ if value not in set(['INITIAL_AMOUNT', 'DISCOUNTED_AMOUNT']):
+ raise ValueError("must be one of enum values ('INITIAL_AMOUNT', 'DISCOUNTED_AMOUNT')")
+ return value
+
+ @field_validator('redeemables_application_mode')
+ def redeemables_application_mode_validate_enum(cls, value):
+ """Validates the enum"""
+ if value is None:
+ return value
+
+ if value not in set(['ALL', 'PARTIAL']):
+ raise ValueError("must be one of enum values ('ALL', 'PARTIAL')")
+ return value
+
+ @field_validator('redeemables_sorting_rule')
+ def redeemables_sorting_rule_validate_enum(cls, value):
+ """Validates the enum"""
+ if value is None:
+ return value
+
+ if value not in set(['CATEGORY_HIERARCHY', 'REQUESTED_ORDER']):
+ raise ValueError("must be one of enum values ('CATEGORY_HIERARCHY', 'REQUESTED_ORDER')")
+ return value
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of ManagementProjectsStackingRules from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([
+ ])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ # set to None if id (nullable) is None
+ # and model_fields_set contains the field
+ if self.id is None and "id" in self.model_fields_set:
+ _dict['id'] = None
+
+ # set to None if exclusive_categories (nullable) is None
+ # and model_fields_set contains the field
+ if self.exclusive_categories is None and "exclusive_categories" in self.model_fields_set:
+ _dict['exclusive_categories'] = None
+
+ # set to None if joint_categories (nullable) is None
+ # and model_fields_set contains the field
+ if self.joint_categories is None and "joint_categories" in self.model_fields_set:
+ _dict['joint_categories'] = None
+
+ # set to None if redeemables_limit (nullable) is None
+ # and model_fields_set contains the field
+ if self.redeemables_limit is None and "redeemables_limit" in self.model_fields_set:
+ _dict['redeemables_limit'] = None
+
+ # set to None if applicable_redeemables_limit (nullable) is None
+ # and model_fields_set contains the field
+ if self.applicable_redeemables_limit is None and "applicable_redeemables_limit" in self.model_fields_set:
+ _dict['applicable_redeemables_limit'] = None
+
+ # set to None if applicable_redeemables_per_category_limit (nullable) is None
+ # and model_fields_set contains the field
+ if self.applicable_redeemables_per_category_limit is None and "applicable_redeemables_per_category_limit" in self.model_fields_set:
+ _dict['applicable_redeemables_per_category_limit'] = None
+
+ # set to None if applicable_exclusive_redeemables_limit (nullable) is None
+ # and model_fields_set contains the field
+ if self.applicable_exclusive_redeemables_limit is None and "applicable_exclusive_redeemables_limit" in self.model_fields_set:
+ _dict['applicable_exclusive_redeemables_limit'] = None
+
+ # set to None if applicable_exclusive_redeemables_per_category_limit (nullable) is None
+ # and model_fields_set contains the field
+ if self.applicable_exclusive_redeemables_per_category_limit is None and "applicable_exclusive_redeemables_per_category_limit" in self.model_fields_set:
+ _dict['applicable_exclusive_redeemables_per_category_limit'] = None
+
+ # set to None if discount_calculation_mode (nullable) is None
+ # and model_fields_set contains the field
+ if self.discount_calculation_mode is None and "discount_calculation_mode" in self.model_fields_set:
+ _dict['discount_calculation_mode'] = None
+
+ # set to None if initial_amount_mode_categories (nullable) is None
+ # and model_fields_set contains the field
+ if self.initial_amount_mode_categories is None and "initial_amount_mode_categories" in self.model_fields_set:
+ _dict['initial_amount_mode_categories'] = None
+
+ # set to None if discounted_amount_mode_categories (nullable) is None
+ # and model_fields_set contains the field
+ if self.discounted_amount_mode_categories is None and "discounted_amount_mode_categories" in self.model_fields_set:
+ _dict['discounted_amount_mode_categories'] = None
+
+ # set to None if redeemables_application_mode (nullable) is None
+ # and model_fields_set contains the field
+ if self.redeemables_application_mode is None and "redeemables_application_mode" in self.model_fields_set:
+ _dict['redeemables_application_mode'] = None
+
+ # set to None if redeemables_sorting_rule (nullable) is None
+ # and model_fields_set contains the field
+ if self.redeemables_sorting_rule is None and "redeemables_sorting_rule" in self.model_fields_set:
+ _dict['redeemables_sorting_rule'] = None
+
+ # set to None if created_at (nullable) is None
+ # and model_fields_set contains the field
+ if self.created_at is None and "created_at" in self.model_fields_set:
+ _dict['created_at'] = None
+
+ # set to None if updated_at (nullable) is None
+ # and model_fields_set contains the field
+ if self.updated_at is None and "updated_at" in self.model_fields_set:
+ _dict['updated_at'] = None
+
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of ManagementProjectsStackingRules from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "id": obj.get("id"),
+ "exclusive_categories": obj.get("exclusive_categories"),
+ "joint_categories": obj.get("joint_categories"),
+ "redeemables_limit": obj.get("redeemables_limit"),
+ "applicable_redeemables_limit": obj.get("applicable_redeemables_limit"),
+ "applicable_redeemables_per_category_limit": obj.get("applicable_redeemables_per_category_limit"),
+ "applicable_exclusive_redeemables_limit": obj.get("applicable_exclusive_redeemables_limit"),
+ "applicable_exclusive_redeemables_per_category_limit": obj.get("applicable_exclusive_redeemables_per_category_limit"),
+ "discount_calculation_mode": obj.get("discount_calculation_mode"),
+ "initial_amount_mode_categories": obj.get("initial_amount_mode_categories"),
+ "discounted_amount_mode_categories": obj.get("discounted_amount_mode_categories"),
+ "redeemables_application_mode": obj.get("redeemables_application_mode"),
+ "redeemables_sorting_rule": obj.get("redeemables_sorting_rule"),
+ "created_at": obj.get("created_at"),
+ "updated_at": obj.get("updated_at")
+ })
+ return _obj
+
+
diff --git a/voucherify/models/management_projects_stacking_rules_create_request_body.py b/voucherify/models/management_projects_stacking_rules_create_request_body.py
new file mode 100644
index 00000000..ba93d380
--- /dev/null
+++ b/voucherify/models/management_projects_stacking_rules_create_request_body.py
@@ -0,0 +1,201 @@
+# coding: utf-8
+
+"""
+ Voucherify API
+
+ Voucherify promotion engine REST API. Please see https://docs.voucherify.io/docs for more details.
+
+ The version of the OpenAPI document: v2018-08-01
+ Contact: support@voucherify.io
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr, field_validator
+from typing import Any, ClassVar, Dict, List, Optional
+from typing_extensions import Annotated
+from typing import Optional, Set
+from typing_extensions import Self
+
+class ManagementProjectsStackingRulesCreateRequestBody(BaseModel):
+ """
+ Request body schema for **POST** `/management/v1/projects/{projectId}/stacking-rules`.
+ """ # noqa: E501
+ exclusive_categories: Optional[List[StrictStr]] = Field(default=None, description="Lists the IDs of the categories that are exclusive.")
+ joint_categories: Optional[List[StrictStr]] = Field(default=None, description="Lists the IDs of the categories that are joint.")
+ redeemables_limit: Optional[Annotated[int, Field(le=30, strict=True, ge=1)]] = Field(default=None, description="Defines how many redeemables can be sent to Voucherify for validation at the same time.")
+ applicable_redeemables_limit: Optional[Annotated[int, Field(strict=True, ge=1)]] = Field(default=None, description="Defines how many redeemables can be applied at the same time. The number must be less than or equal to `\"redeemables_limit\"`.")
+ applicable_redeemables_per_category_limit: Optional[StrictInt] = Field(default=None, description="Defines how many redeemables with the same category can be applied at the same time. The number must be less than or equal to `\"applicable_redeemables_limit\"`.")
+ applicable_exclusive_redeemables_limit: Optional[Annotated[int, Field(le=5, strict=True, ge=1)]] = Field(default=None, description="Defines how many redeemables with an assigned exclusive category can be applied at the same time.")
+ applicable_exclusive_redeemables_per_category_limit: Optional[StrictInt] = Field(default=None, description="Defines how many exclusive redeemables with the same category can be applied at the same time. The number must be less than or equal to `\"applicable_exclusive_redeemables_limit\"`.")
+ discount_calculation_mode: Optional[StrictStr] = Field(default=None, description="Defines if the discounts are applied by taking into account the initial order amount or the discounted order amount.")
+ initial_amount_mode_categories: Optional[List[StrictStr]] = Field(default=None, description="Lists the IDs of the categories that apply a discount based on the initial amount.")
+ discounted_amount_mode_categories: Optional[List[StrictStr]] = Field(default=None, description="Lists the IDs of the categories that apply a discount based on the discounted amount.")
+ redeemables_application_mode: Optional[StrictStr] = Field(default=None, description="Defines the application mode for redeemables. `\"ALL\"` means that all redeemables must be validated for the redemption to be successful. `\"PARTIAL\"` means that only those redeemables that can be validated will be redeemed. The redeemables that fail validaton will be skipped.")
+ redeemables_sorting_rule: Optional[StrictStr] = Field(default=None, description="Defines the sorting rule for redeemables. `\"CATEGORY_HIERARCHY\"` means that redeemables are applied with the order established by the hierarchy of the categories. `\"REQUESTED_ORDER\"` means that redeemables are applied with the order established in the request.")
+ __properties: ClassVar[List[str]] = ["exclusive_categories", "joint_categories", "redeemables_limit", "applicable_redeemables_limit", "applicable_redeemables_per_category_limit", "applicable_exclusive_redeemables_limit", "applicable_exclusive_redeemables_per_category_limit", "discount_calculation_mode", "initial_amount_mode_categories", "discounted_amount_mode_categories", "redeemables_application_mode", "redeemables_sorting_rule"]
+
+ @field_validator('discount_calculation_mode')
+ def discount_calculation_mode_validate_enum(cls, value):
+ """Validates the enum"""
+ if value is None:
+ return value
+
+ if value not in set(['INITIAL_AMOUNT', 'DISCOUNTED_AMOUNT']):
+ raise ValueError("must be one of enum values ('INITIAL_AMOUNT', 'DISCOUNTED_AMOUNT')")
+ return value
+
+ @field_validator('redeemables_application_mode')
+ def redeemables_application_mode_validate_enum(cls, value):
+ """Validates the enum"""
+ if value is None:
+ return value
+
+ if value not in set(['ALL', 'PARTIAL']):
+ raise ValueError("must be one of enum values ('ALL', 'PARTIAL')")
+ return value
+
+ @field_validator('redeemables_sorting_rule')
+ def redeemables_sorting_rule_validate_enum(cls, value):
+ """Validates the enum"""
+ if value is None:
+ return value
+
+ if value not in set(['CATEGORY_HIERARCHY', 'REQUESTED_ORDER']):
+ raise ValueError("must be one of enum values ('CATEGORY_HIERARCHY', 'REQUESTED_ORDER')")
+ return value
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of ManagementProjectsStackingRulesCreateRequestBody from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([
+ ])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ # set to None if exclusive_categories (nullable) is None
+ # and model_fields_set contains the field
+ if self.exclusive_categories is None and "exclusive_categories" in self.model_fields_set:
+ _dict['exclusive_categories'] = None
+
+ # set to None if joint_categories (nullable) is None
+ # and model_fields_set contains the field
+ if self.joint_categories is None and "joint_categories" in self.model_fields_set:
+ _dict['joint_categories'] = None
+
+ # set to None if redeemables_limit (nullable) is None
+ # and model_fields_set contains the field
+ if self.redeemables_limit is None and "redeemables_limit" in self.model_fields_set:
+ _dict['redeemables_limit'] = None
+
+ # set to None if applicable_redeemables_limit (nullable) is None
+ # and model_fields_set contains the field
+ if self.applicable_redeemables_limit is None and "applicable_redeemables_limit" in self.model_fields_set:
+ _dict['applicable_redeemables_limit'] = None
+
+ # set to None if applicable_redeemables_per_category_limit (nullable) is None
+ # and model_fields_set contains the field
+ if self.applicable_redeemables_per_category_limit is None and "applicable_redeemables_per_category_limit" in self.model_fields_set:
+ _dict['applicable_redeemables_per_category_limit'] = None
+
+ # set to None if applicable_exclusive_redeemables_limit (nullable) is None
+ # and model_fields_set contains the field
+ if self.applicable_exclusive_redeemables_limit is None and "applicable_exclusive_redeemables_limit" in self.model_fields_set:
+ _dict['applicable_exclusive_redeemables_limit'] = None
+
+ # set to None if applicable_exclusive_redeemables_per_category_limit (nullable) is None
+ # and model_fields_set contains the field
+ if self.applicable_exclusive_redeemables_per_category_limit is None and "applicable_exclusive_redeemables_per_category_limit" in self.model_fields_set:
+ _dict['applicable_exclusive_redeemables_per_category_limit'] = None
+
+ # set to None if discount_calculation_mode (nullable) is None
+ # and model_fields_set contains the field
+ if self.discount_calculation_mode is None and "discount_calculation_mode" in self.model_fields_set:
+ _dict['discount_calculation_mode'] = None
+
+ # set to None if initial_amount_mode_categories (nullable) is None
+ # and model_fields_set contains the field
+ if self.initial_amount_mode_categories is None and "initial_amount_mode_categories" in self.model_fields_set:
+ _dict['initial_amount_mode_categories'] = None
+
+ # set to None if discounted_amount_mode_categories (nullable) is None
+ # and model_fields_set contains the field
+ if self.discounted_amount_mode_categories is None and "discounted_amount_mode_categories" in self.model_fields_set:
+ _dict['discounted_amount_mode_categories'] = None
+
+ # set to None if redeemables_application_mode (nullable) is None
+ # and model_fields_set contains the field
+ if self.redeemables_application_mode is None and "redeemables_application_mode" in self.model_fields_set:
+ _dict['redeemables_application_mode'] = None
+
+ # set to None if redeemables_sorting_rule (nullable) is None
+ # and model_fields_set contains the field
+ if self.redeemables_sorting_rule is None and "redeemables_sorting_rule" in self.model_fields_set:
+ _dict['redeemables_sorting_rule'] = None
+
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of ManagementProjectsStackingRulesCreateRequestBody from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "exclusive_categories": obj.get("exclusive_categories"),
+ "joint_categories": obj.get("joint_categories"),
+ "redeemables_limit": obj.get("redeemables_limit"),
+ "applicable_redeemables_limit": obj.get("applicable_redeemables_limit"),
+ "applicable_redeemables_per_category_limit": obj.get("applicable_redeemables_per_category_limit"),
+ "applicable_exclusive_redeemables_limit": obj.get("applicable_exclusive_redeemables_limit"),
+ "applicable_exclusive_redeemables_per_category_limit": obj.get("applicable_exclusive_redeemables_per_category_limit"),
+ "discount_calculation_mode": obj.get("discount_calculation_mode"),
+ "initial_amount_mode_categories": obj.get("initial_amount_mode_categories"),
+ "discounted_amount_mode_categories": obj.get("discounted_amount_mode_categories"),
+ "redeemables_application_mode": obj.get("redeemables_application_mode"),
+ "redeemables_sorting_rule": obj.get("redeemables_sorting_rule")
+ })
+ return _obj
+
+
diff --git a/voucherify/models/management_projects_stacking_rules_create_response_body.py b/voucherify/models/management_projects_stacking_rules_create_response_body.py
new file mode 100644
index 00000000..636a5643
--- /dev/null
+++ b/voucherify/models/management_projects_stacking_rules_create_response_body.py
@@ -0,0 +1,223 @@
+# coding: utf-8
+
+"""
+ Voucherify API
+
+ Voucherify promotion engine REST API. Please see https://docs.voucherify.io/docs for more details.
+
+ The version of the OpenAPI document: v2018-08-01
+ Contact: support@voucherify.io
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from datetime import datetime
+from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr, field_validator
+from typing import Any, ClassVar, Dict, List, Optional
+from typing_extensions import Annotated
+from typing import Optional, Set
+from typing_extensions import Self
+
+class ManagementProjectsStackingRulesCreateResponseBody(BaseModel):
+ """
+ Response body schema for **POST** `/management/v1/projects/{projectId}/stacking-rules`.
+ """ # noqa: E501
+ id: Optional[StrictStr] = Field(default=None, description="The unique identifier of the stacking rules.")
+ exclusive_categories: Optional[List[StrictStr]] = Field(default=None, description="Lists the IDs of the categories that are exclusive.")
+ joint_categories: Optional[List[StrictStr]] = Field(default=None, description="Lists the IDs of the categories that are joint.")
+ redeemables_limit: Optional[Annotated[int, Field(le=30, strict=True, ge=1)]] = Field(default=None, description="Defines how many redeemables can be sent to Voucherify for validation at the same time.")
+ applicable_redeemables_limit: Optional[Annotated[int, Field(strict=True, ge=1)]] = Field(default=None, description="Defines how many redeemables can be applied at the same time. The number must be less than or equal to `\"redeemables_limit\"`.")
+ applicable_redeemables_per_category_limit: Optional[StrictInt] = Field(default=None, description="Defines how many redeemables with the same category can be applied at the same time. The number must be less than or equal to `\"applicable_redeemables_limit\"`.")
+ applicable_exclusive_redeemables_limit: Optional[Annotated[int, Field(le=5, strict=True, ge=1)]] = Field(default=None, description="Defines how many redeemables with an assigned exclusive category can be applied at the same time.")
+ applicable_exclusive_redeemables_per_category_limit: Optional[StrictInt] = Field(default=None, description="Defines how many exclusive redeemables with the same category can be applied at the same time. The number must be less than or equal to `\"applicable_exclusive_redeemables_limit\"`.")
+ discount_calculation_mode: Optional[StrictStr] = Field(default=None, description="Defines if the discounts are applied by taking into account the initial order amount or the discounted order amount.")
+ initial_amount_mode_categories: Optional[List[StrictStr]] = Field(default=None, description="Lists the IDs of the categories that apply a discount based on the initial amount.")
+ discounted_amount_mode_categories: Optional[List[StrictStr]] = Field(default=None, description="Lists the IDs of the categories that apply a discount based on the discounted amount.")
+ redeemables_application_mode: Optional[StrictStr] = Field(default=None, description="Defines the application mode for redeemables. `\"ALL\"` means that all redeemables must be validated for the redemption to be successful. `\"PARTIAL\"` means that only those redeemables that can be validated will be redeemed. The redeemables that fail validaton will be skipped.")
+ redeemables_sorting_rule: Optional[StrictStr] = Field(default=None, description="Defines the sorting rule for redeemables. `\"CATEGORY_HIERARCHY\"` means that redeemables are applied with the order established by the hierarchy of the categories. `\"REQUESTED_ORDER\"` means that redeemables are applied with the order established in the request.")
+ created_at: Optional[datetime] = Field(default=None, description="Timestamp representing the date and time when the stacking rules were created. The value for this parameter is shown in the ISO 8601 format.")
+ updated_at: Optional[datetime] = Field(default=None, description="Timestamp representing the date and time when the stacking rules were updated. The value for this parameter is shown in the ISO 8601 format.")
+ __properties: ClassVar[List[str]] = ["id", "exclusive_categories", "joint_categories", "redeemables_limit", "applicable_redeemables_limit", "applicable_redeemables_per_category_limit", "applicable_exclusive_redeemables_limit", "applicable_exclusive_redeemables_per_category_limit", "discount_calculation_mode", "initial_amount_mode_categories", "discounted_amount_mode_categories", "redeemables_application_mode", "redeemables_sorting_rule", "created_at", "updated_at"]
+
+ @field_validator('discount_calculation_mode')
+ def discount_calculation_mode_validate_enum(cls, value):
+ """Validates the enum"""
+ if value is None:
+ return value
+
+ if value not in set(['INITIAL_AMOUNT', 'DISCOUNTED_AMOUNT']):
+ raise ValueError("must be one of enum values ('INITIAL_AMOUNT', 'DISCOUNTED_AMOUNT')")
+ return value
+
+ @field_validator('redeemables_application_mode')
+ def redeemables_application_mode_validate_enum(cls, value):
+ """Validates the enum"""
+ if value is None:
+ return value
+
+ if value not in set(['ALL', 'PARTIAL']):
+ raise ValueError("must be one of enum values ('ALL', 'PARTIAL')")
+ return value
+
+ @field_validator('redeemables_sorting_rule')
+ def redeemables_sorting_rule_validate_enum(cls, value):
+ """Validates the enum"""
+ if value is None:
+ return value
+
+ if value not in set(['CATEGORY_HIERARCHY', 'REQUESTED_ORDER']):
+ raise ValueError("must be one of enum values ('CATEGORY_HIERARCHY', 'REQUESTED_ORDER')")
+ return value
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of ManagementProjectsStackingRulesCreateResponseBody from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([
+ ])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ # set to None if id (nullable) is None
+ # and model_fields_set contains the field
+ if self.id is None and "id" in self.model_fields_set:
+ _dict['id'] = None
+
+ # set to None if exclusive_categories (nullable) is None
+ # and model_fields_set contains the field
+ if self.exclusive_categories is None and "exclusive_categories" in self.model_fields_set:
+ _dict['exclusive_categories'] = None
+
+ # set to None if joint_categories (nullable) is None
+ # and model_fields_set contains the field
+ if self.joint_categories is None and "joint_categories" in self.model_fields_set:
+ _dict['joint_categories'] = None
+
+ # set to None if redeemables_limit (nullable) is None
+ # and model_fields_set contains the field
+ if self.redeemables_limit is None and "redeemables_limit" in self.model_fields_set:
+ _dict['redeemables_limit'] = None
+
+ # set to None if applicable_redeemables_limit (nullable) is None
+ # and model_fields_set contains the field
+ if self.applicable_redeemables_limit is None and "applicable_redeemables_limit" in self.model_fields_set:
+ _dict['applicable_redeemables_limit'] = None
+
+ # set to None if applicable_redeemables_per_category_limit (nullable) is None
+ # and model_fields_set contains the field
+ if self.applicable_redeemables_per_category_limit is None and "applicable_redeemables_per_category_limit" in self.model_fields_set:
+ _dict['applicable_redeemables_per_category_limit'] = None
+
+ # set to None if applicable_exclusive_redeemables_limit (nullable) is None
+ # and model_fields_set contains the field
+ if self.applicable_exclusive_redeemables_limit is None and "applicable_exclusive_redeemables_limit" in self.model_fields_set:
+ _dict['applicable_exclusive_redeemables_limit'] = None
+
+ # set to None if applicable_exclusive_redeemables_per_category_limit (nullable) is None
+ # and model_fields_set contains the field
+ if self.applicable_exclusive_redeemables_per_category_limit is None and "applicable_exclusive_redeemables_per_category_limit" in self.model_fields_set:
+ _dict['applicable_exclusive_redeemables_per_category_limit'] = None
+
+ # set to None if discount_calculation_mode (nullable) is None
+ # and model_fields_set contains the field
+ if self.discount_calculation_mode is None and "discount_calculation_mode" in self.model_fields_set:
+ _dict['discount_calculation_mode'] = None
+
+ # set to None if initial_amount_mode_categories (nullable) is None
+ # and model_fields_set contains the field
+ if self.initial_amount_mode_categories is None and "initial_amount_mode_categories" in self.model_fields_set:
+ _dict['initial_amount_mode_categories'] = None
+
+ # set to None if discounted_amount_mode_categories (nullable) is None
+ # and model_fields_set contains the field
+ if self.discounted_amount_mode_categories is None and "discounted_amount_mode_categories" in self.model_fields_set:
+ _dict['discounted_amount_mode_categories'] = None
+
+ # set to None if redeemables_application_mode (nullable) is None
+ # and model_fields_set contains the field
+ if self.redeemables_application_mode is None and "redeemables_application_mode" in self.model_fields_set:
+ _dict['redeemables_application_mode'] = None
+
+ # set to None if redeemables_sorting_rule (nullable) is None
+ # and model_fields_set contains the field
+ if self.redeemables_sorting_rule is None and "redeemables_sorting_rule" in self.model_fields_set:
+ _dict['redeemables_sorting_rule'] = None
+
+ # set to None if created_at (nullable) is None
+ # and model_fields_set contains the field
+ if self.created_at is None and "created_at" in self.model_fields_set:
+ _dict['created_at'] = None
+
+ # set to None if updated_at (nullable) is None
+ # and model_fields_set contains the field
+ if self.updated_at is None and "updated_at" in self.model_fields_set:
+ _dict['updated_at'] = None
+
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of ManagementProjectsStackingRulesCreateResponseBody from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "id": obj.get("id"),
+ "exclusive_categories": obj.get("exclusive_categories"),
+ "joint_categories": obj.get("joint_categories"),
+ "redeemables_limit": obj.get("redeemables_limit"),
+ "applicable_redeemables_limit": obj.get("applicable_redeemables_limit"),
+ "applicable_redeemables_per_category_limit": obj.get("applicable_redeemables_per_category_limit"),
+ "applicable_exclusive_redeemables_limit": obj.get("applicable_exclusive_redeemables_limit"),
+ "applicable_exclusive_redeemables_per_category_limit": obj.get("applicable_exclusive_redeemables_per_category_limit"),
+ "discount_calculation_mode": obj.get("discount_calculation_mode"),
+ "initial_amount_mode_categories": obj.get("initial_amount_mode_categories"),
+ "discounted_amount_mode_categories": obj.get("discounted_amount_mode_categories"),
+ "redeemables_application_mode": obj.get("redeemables_application_mode"),
+ "redeemables_sorting_rule": obj.get("redeemables_sorting_rule"),
+ "created_at": obj.get("created_at"),
+ "updated_at": obj.get("updated_at")
+ })
+ return _obj
+
+
diff --git a/voucherify/models/management_projects_stacking_rules_get_response_body.py b/voucherify/models/management_projects_stacking_rules_get_response_body.py
new file mode 100644
index 00000000..d89f98d5
--- /dev/null
+++ b/voucherify/models/management_projects_stacking_rules_get_response_body.py
@@ -0,0 +1,223 @@
+# coding: utf-8
+
+"""
+ Voucherify API
+
+ Voucherify promotion engine REST API. Please see https://docs.voucherify.io/docs for more details.
+
+ The version of the OpenAPI document: v2018-08-01
+ Contact: support@voucherify.io
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from datetime import datetime
+from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr, field_validator
+from typing import Any, ClassVar, Dict, List, Optional
+from typing_extensions import Annotated
+from typing import Optional, Set
+from typing_extensions import Self
+
+class ManagementProjectsStackingRulesGetResponseBody(BaseModel):
+ """
+ Response body schema for **GET** `/management/v1/projects/{projectId}/stacking-rules/{stackingRulesId}`.
+ """ # noqa: E501
+ id: Optional[StrictStr] = Field(default=None, description="The unique identifier of the stacking rules.")
+ exclusive_categories: Optional[List[StrictStr]] = Field(default=None, description="Lists the IDs of the categories that are exclusive.")
+ joint_categories: Optional[List[StrictStr]] = Field(default=None, description="Lists the IDs of the categories that are joint.")
+ redeemables_limit: Optional[Annotated[int, Field(le=30, strict=True, ge=1)]] = Field(default=None, description="Defines how many redeemables can be sent to Voucherify for validation at the same time.")
+ applicable_redeemables_limit: Optional[Annotated[int, Field(strict=True, ge=1)]] = Field(default=None, description="Defines how many redeemables can be applied at the same time. The number must be less than or equal to `\"redeemables_limit\"`.")
+ applicable_redeemables_per_category_limit: Optional[StrictInt] = Field(default=None, description="Defines how many redeemables with the same category can be applied at the same time. The number must be less than or equal to `\"applicable_redeemables_limit\"`.")
+ applicable_exclusive_redeemables_limit: Optional[Annotated[int, Field(le=5, strict=True, ge=1)]] = Field(default=None, description="Defines how many redeemables with an assigned exclusive category can be applied at the same time.")
+ applicable_exclusive_redeemables_per_category_limit: Optional[StrictInt] = Field(default=None, description="Defines how many exclusive redeemables with the same category can be applied at the same time. The number must be less than or equal to `\"applicable_exclusive_redeemables_limit\"`.")
+ discount_calculation_mode: Optional[StrictStr] = Field(default=None, description="Defines if the discounts are applied by taking into account the initial order amount or the discounted order amount.")
+ initial_amount_mode_categories: Optional[List[StrictStr]] = Field(default=None, description="Lists the IDs of the categories that apply a discount based on the initial amount.")
+ discounted_amount_mode_categories: Optional[List[StrictStr]] = Field(default=None, description="Lists the IDs of the categories that apply a discount based on the discounted amount.")
+ redeemables_application_mode: Optional[StrictStr] = Field(default=None, description="Defines the application mode for redeemables. `\"ALL\"` means that all redeemables must be validated for the redemption to be successful. `\"PARTIAL\"` means that only those redeemables that can be validated will be redeemed. The redeemables that fail validaton will be skipped.")
+ redeemables_sorting_rule: Optional[StrictStr] = Field(default=None, description="Defines the sorting rule for redeemables. `\"CATEGORY_HIERARCHY\"` means that redeemables are applied with the order established by the hierarchy of the categories. `\"REQUESTED_ORDER\"` means that redeemables are applied with the order established in the request.")
+ created_at: Optional[datetime] = Field(default=None, description="Timestamp representing the date and time when the stacking rules were created. The value for this parameter is shown in the ISO 8601 format.")
+ updated_at: Optional[datetime] = Field(default=None, description="Timestamp representing the date and time when the stacking rules were updated. The value for this parameter is shown in the ISO 8601 format.")
+ __properties: ClassVar[List[str]] = ["id", "exclusive_categories", "joint_categories", "redeemables_limit", "applicable_redeemables_limit", "applicable_redeemables_per_category_limit", "applicable_exclusive_redeemables_limit", "applicable_exclusive_redeemables_per_category_limit", "discount_calculation_mode", "initial_amount_mode_categories", "discounted_amount_mode_categories", "redeemables_application_mode", "redeemables_sorting_rule", "created_at", "updated_at"]
+
+ @field_validator('discount_calculation_mode')
+ def discount_calculation_mode_validate_enum(cls, value):
+ """Validates the enum"""
+ if value is None:
+ return value
+
+ if value not in set(['INITIAL_AMOUNT', 'DISCOUNTED_AMOUNT']):
+ raise ValueError("must be one of enum values ('INITIAL_AMOUNT', 'DISCOUNTED_AMOUNT')")
+ return value
+
+ @field_validator('redeemables_application_mode')
+ def redeemables_application_mode_validate_enum(cls, value):
+ """Validates the enum"""
+ if value is None:
+ return value
+
+ if value not in set(['ALL', 'PARTIAL']):
+ raise ValueError("must be one of enum values ('ALL', 'PARTIAL')")
+ return value
+
+ @field_validator('redeemables_sorting_rule')
+ def redeemables_sorting_rule_validate_enum(cls, value):
+ """Validates the enum"""
+ if value is None:
+ return value
+
+ if value not in set(['CATEGORY_HIERARCHY', 'REQUESTED_ORDER']):
+ raise ValueError("must be one of enum values ('CATEGORY_HIERARCHY', 'REQUESTED_ORDER')")
+ return value
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of ManagementProjectsStackingRulesGetResponseBody from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([
+ ])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ # set to None if id (nullable) is None
+ # and model_fields_set contains the field
+ if self.id is None and "id" in self.model_fields_set:
+ _dict['id'] = None
+
+ # set to None if exclusive_categories (nullable) is None
+ # and model_fields_set contains the field
+ if self.exclusive_categories is None and "exclusive_categories" in self.model_fields_set:
+ _dict['exclusive_categories'] = None
+
+ # set to None if joint_categories (nullable) is None
+ # and model_fields_set contains the field
+ if self.joint_categories is None and "joint_categories" in self.model_fields_set:
+ _dict['joint_categories'] = None
+
+ # set to None if redeemables_limit (nullable) is None
+ # and model_fields_set contains the field
+ if self.redeemables_limit is None and "redeemables_limit" in self.model_fields_set:
+ _dict['redeemables_limit'] = None
+
+ # set to None if applicable_redeemables_limit (nullable) is None
+ # and model_fields_set contains the field
+ if self.applicable_redeemables_limit is None and "applicable_redeemables_limit" in self.model_fields_set:
+ _dict['applicable_redeemables_limit'] = None
+
+ # set to None if applicable_redeemables_per_category_limit (nullable) is None
+ # and model_fields_set contains the field
+ if self.applicable_redeemables_per_category_limit is None and "applicable_redeemables_per_category_limit" in self.model_fields_set:
+ _dict['applicable_redeemables_per_category_limit'] = None
+
+ # set to None if applicable_exclusive_redeemables_limit (nullable) is None
+ # and model_fields_set contains the field
+ if self.applicable_exclusive_redeemables_limit is None and "applicable_exclusive_redeemables_limit" in self.model_fields_set:
+ _dict['applicable_exclusive_redeemables_limit'] = None
+
+ # set to None if applicable_exclusive_redeemables_per_category_limit (nullable) is None
+ # and model_fields_set contains the field
+ if self.applicable_exclusive_redeemables_per_category_limit is None and "applicable_exclusive_redeemables_per_category_limit" in self.model_fields_set:
+ _dict['applicable_exclusive_redeemables_per_category_limit'] = None
+
+ # set to None if discount_calculation_mode (nullable) is None
+ # and model_fields_set contains the field
+ if self.discount_calculation_mode is None and "discount_calculation_mode" in self.model_fields_set:
+ _dict['discount_calculation_mode'] = None
+
+ # set to None if initial_amount_mode_categories (nullable) is None
+ # and model_fields_set contains the field
+ if self.initial_amount_mode_categories is None and "initial_amount_mode_categories" in self.model_fields_set:
+ _dict['initial_amount_mode_categories'] = None
+
+ # set to None if discounted_amount_mode_categories (nullable) is None
+ # and model_fields_set contains the field
+ if self.discounted_amount_mode_categories is None and "discounted_amount_mode_categories" in self.model_fields_set:
+ _dict['discounted_amount_mode_categories'] = None
+
+ # set to None if redeemables_application_mode (nullable) is None
+ # and model_fields_set contains the field
+ if self.redeemables_application_mode is None and "redeemables_application_mode" in self.model_fields_set:
+ _dict['redeemables_application_mode'] = None
+
+ # set to None if redeemables_sorting_rule (nullable) is None
+ # and model_fields_set contains the field
+ if self.redeemables_sorting_rule is None and "redeemables_sorting_rule" in self.model_fields_set:
+ _dict['redeemables_sorting_rule'] = None
+
+ # set to None if created_at (nullable) is None
+ # and model_fields_set contains the field
+ if self.created_at is None and "created_at" in self.model_fields_set:
+ _dict['created_at'] = None
+
+ # set to None if updated_at (nullable) is None
+ # and model_fields_set contains the field
+ if self.updated_at is None and "updated_at" in self.model_fields_set:
+ _dict['updated_at'] = None
+
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of ManagementProjectsStackingRulesGetResponseBody from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "id": obj.get("id"),
+ "exclusive_categories": obj.get("exclusive_categories"),
+ "joint_categories": obj.get("joint_categories"),
+ "redeemables_limit": obj.get("redeemables_limit"),
+ "applicable_redeemables_limit": obj.get("applicable_redeemables_limit"),
+ "applicable_redeemables_per_category_limit": obj.get("applicable_redeemables_per_category_limit"),
+ "applicable_exclusive_redeemables_limit": obj.get("applicable_exclusive_redeemables_limit"),
+ "applicable_exclusive_redeemables_per_category_limit": obj.get("applicable_exclusive_redeemables_per_category_limit"),
+ "discount_calculation_mode": obj.get("discount_calculation_mode"),
+ "initial_amount_mode_categories": obj.get("initial_amount_mode_categories"),
+ "discounted_amount_mode_categories": obj.get("discounted_amount_mode_categories"),
+ "redeemables_application_mode": obj.get("redeemables_application_mode"),
+ "redeemables_sorting_rule": obj.get("redeemables_sorting_rule"),
+ "created_at": obj.get("created_at"),
+ "updated_at": obj.get("updated_at")
+ })
+ return _obj
+
+
diff --git a/voucherify/models/management_projects_stacking_rules_list_response_body.py b/voucherify/models/management_projects_stacking_rules_list_response_body.py
new file mode 100644
index 00000000..03e9d6f2
--- /dev/null
+++ b/voucherify/models/management_projects_stacking_rules_list_response_body.py
@@ -0,0 +1,142 @@
+# coding: utf-8
+
+"""
+ Voucherify API
+
+ Voucherify promotion engine REST API. Please see https://docs.voucherify.io/docs for more details.
+
+ The version of the OpenAPI document: v2018-08-01
+ Contact: support@voucherify.io
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr, field_validator
+from typing import Any, ClassVar, Dict, List, Optional
+from voucherify.models.management_projects_stacking_rules import ManagementProjectsStackingRules
+from typing import Optional, Set
+from typing_extensions import Self
+
+class ManagementProjectsStackingRulesListResponseBody(BaseModel):
+ """
+ Response body schema for **GET** `/management/v1/projects/{projectId}/stacking-rules`.
+ """ # noqa: E501
+ object: Optional[StrictStr] = Field(default='list', description="The type of the object represented by JSON. This object stores information about the stacking rules in a dictionary.")
+ data_ref: Optional[StrictStr] = Field(default='data', description="Identifies the name of the attribute that contains the array of stacking rule objects.")
+ data: Optional[List[ManagementProjectsStackingRules]] = Field(default=None, description="Array of only one stacking rule object.")
+ total: Optional[StrictInt] = Field(default=None, description="The total number of stacking rule objects. It is always 1.")
+ __properties: ClassVar[List[str]] = ["object", "data_ref", "data", "total"]
+
+ @field_validator('object')
+ def object_validate_enum(cls, value):
+ """Validates the enum"""
+ if value is None:
+ return value
+
+ if value not in set(['list']):
+ raise ValueError("must be one of enum values ('list')")
+ return value
+
+ @field_validator('data_ref')
+ def data_ref_validate_enum(cls, value):
+ """Validates the enum"""
+ if value is None:
+ return value
+
+ if value not in set(['data']):
+ raise ValueError("must be one of enum values ('data')")
+ return value
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of ManagementProjectsStackingRulesListResponseBody from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([
+ ])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ # override the default output from pydantic by calling `to_dict()` of each item in data (list)
+ _items = []
+ if self.data:
+ for _item_data in self.data:
+ if _item_data:
+ _items.append(_item_data.to_dict())
+ _dict['data'] = _items
+ # set to None if object (nullable) is None
+ # and model_fields_set contains the field
+ if self.object is None and "object" in self.model_fields_set:
+ _dict['object'] = None
+
+ # set to None if data_ref (nullable) is None
+ # and model_fields_set contains the field
+ if self.data_ref is None and "data_ref" in self.model_fields_set:
+ _dict['data_ref'] = None
+
+ # set to None if data (nullable) is None
+ # and model_fields_set contains the field
+ if self.data is None and "data" in self.model_fields_set:
+ _dict['data'] = None
+
+ # set to None if total (nullable) is None
+ # and model_fields_set contains the field
+ if self.total is None and "total" in self.model_fields_set:
+ _dict['total'] = None
+
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of ManagementProjectsStackingRulesListResponseBody from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "object": obj.get("object") if obj.get("object") is not None else 'list',
+ "data_ref": obj.get("data_ref") if obj.get("data_ref") is not None else 'data',
+ "data": [ManagementProjectsStackingRules.from_dict(_item) for _item in obj["data"]] if obj.get("data") is not None else None,
+ "total": obj.get("total")
+ })
+ return _obj
+
+
diff --git a/voucherify/models/management_projects_stacking_rules_update_request_body.py b/voucherify/models/management_projects_stacking_rules_update_request_body.py
new file mode 100644
index 00000000..50eb562c
--- /dev/null
+++ b/voucherify/models/management_projects_stacking_rules_update_request_body.py
@@ -0,0 +1,201 @@
+# coding: utf-8
+
+"""
+ Voucherify API
+
+ Voucherify promotion engine REST API. Please see https://docs.voucherify.io/docs for more details.
+
+ The version of the OpenAPI document: v2018-08-01
+ Contact: support@voucherify.io
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr, field_validator
+from typing import Any, ClassVar, Dict, List, Optional
+from typing_extensions import Annotated
+from typing import Optional, Set
+from typing_extensions import Self
+
+class ManagementProjectsStackingRulesUpdateRequestBody(BaseModel):
+ """
+ Request body schema for **PUT** `/management/v1/projects/{projectId}/stacking-rules/{stackingRulesId}`.
+ """ # noqa: E501
+ exclusive_categories: Optional[List[StrictStr]] = Field(default=None, description="Lists the IDs of the categories that are exclusive.")
+ joint_categories: Optional[List[StrictStr]] = Field(default=None, description="Lists the IDs of the categories that are joint.")
+ redeemables_limit: Optional[Annotated[int, Field(le=30, strict=True, ge=1)]] = Field(default=None, description="Defines how many redeemables can be sent to Voucherify for validation at the same time.")
+ applicable_redeemables_limit: Optional[Annotated[int, Field(strict=True, ge=1)]] = Field(default=None, description="Defines how many redeemables can be applied at the same time. The number must be less than or equal to `\"redeemables_limit\"`.")
+ applicable_redeemables_per_category_limit: Optional[StrictInt] = Field(default=None, description="Defines how many redeemables with the same category can be applied at the same time. The number must be less than or equal to `\"applicable_redeemables_limit\"`.")
+ applicable_exclusive_redeemables_limit: Optional[Annotated[int, Field(le=5, strict=True, ge=1)]] = Field(default=None, description="Defines how many redeemables with an assigned exclusive category can be applied at the same time.")
+ applicable_exclusive_redeemables_per_category_limit: Optional[StrictInt] = Field(default=None, description="Defines how many exclusive redeemables with the same category can be applied at the same time. The number must be less than or equal to `\"applicable_exclusive_redeemables_limit\"`.")
+ discount_calculation_mode: Optional[StrictStr] = Field(default=None, description="Defines if the discounts are applied by taking into account the initial order amount or the discounted order amount.")
+ initial_amount_mode_categories: Optional[List[StrictStr]] = Field(default=None, description="Lists the IDs of the categories that apply a discount based on the initial amount.")
+ discounted_amount_mode_categories: Optional[List[StrictStr]] = Field(default=None, description="Lists the IDs of the categories that apply a discount based on the discounted amount.")
+ redeemables_application_mode: Optional[StrictStr] = Field(default=None, description="Defines the application mode for redeemables. `\"ALL\"` means that all redeemables must be validated for the redemption to be successful. `\"PARTIAL\"` means that only those redeemables that can be validated will be redeemed. The redeemables that fail validaton will be skipped.")
+ redeemables_sorting_rule: Optional[StrictStr] = Field(default=None, description="Defines the sorting rule for redeemables. `\"CATEGORY_HIERARCHY\"` means that redeemables are applied with the order established by the hierarchy of the categories. `\"REQUESTED_ORDER\"` means that redeemables are applied with the order established in the request.")
+ __properties: ClassVar[List[str]] = ["exclusive_categories", "joint_categories", "redeemables_limit", "applicable_redeemables_limit", "applicable_redeemables_per_category_limit", "applicable_exclusive_redeemables_limit", "applicable_exclusive_redeemables_per_category_limit", "discount_calculation_mode", "initial_amount_mode_categories", "discounted_amount_mode_categories", "redeemables_application_mode", "redeemables_sorting_rule"]
+
+ @field_validator('discount_calculation_mode')
+ def discount_calculation_mode_validate_enum(cls, value):
+ """Validates the enum"""
+ if value is None:
+ return value
+
+ if value not in set(['INITIAL_AMOUNT', 'DISCOUNTED_AMOUNT']):
+ raise ValueError("must be one of enum values ('INITIAL_AMOUNT', 'DISCOUNTED_AMOUNT')")
+ return value
+
+ @field_validator('redeemables_application_mode')
+ def redeemables_application_mode_validate_enum(cls, value):
+ """Validates the enum"""
+ if value is None:
+ return value
+
+ if value not in set(['ALL', 'PARTIAL']):
+ raise ValueError("must be one of enum values ('ALL', 'PARTIAL')")
+ return value
+
+ @field_validator('redeemables_sorting_rule')
+ def redeemables_sorting_rule_validate_enum(cls, value):
+ """Validates the enum"""
+ if value is None:
+ return value
+
+ if value not in set(['CATEGORY_HIERARCHY', 'REQUESTED_ORDER']):
+ raise ValueError("must be one of enum values ('CATEGORY_HIERARCHY', 'REQUESTED_ORDER')")
+ return value
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of ManagementProjectsStackingRulesUpdateRequestBody from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([
+ ])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ # set to None if exclusive_categories (nullable) is None
+ # and model_fields_set contains the field
+ if self.exclusive_categories is None and "exclusive_categories" in self.model_fields_set:
+ _dict['exclusive_categories'] = None
+
+ # set to None if joint_categories (nullable) is None
+ # and model_fields_set contains the field
+ if self.joint_categories is None and "joint_categories" in self.model_fields_set:
+ _dict['joint_categories'] = None
+
+ # set to None if redeemables_limit (nullable) is None
+ # and model_fields_set contains the field
+ if self.redeemables_limit is None and "redeemables_limit" in self.model_fields_set:
+ _dict['redeemables_limit'] = None
+
+ # set to None if applicable_redeemables_limit (nullable) is None
+ # and model_fields_set contains the field
+ if self.applicable_redeemables_limit is None and "applicable_redeemables_limit" in self.model_fields_set:
+ _dict['applicable_redeemables_limit'] = None
+
+ # set to None if applicable_redeemables_per_category_limit (nullable) is None
+ # and model_fields_set contains the field
+ if self.applicable_redeemables_per_category_limit is None and "applicable_redeemables_per_category_limit" in self.model_fields_set:
+ _dict['applicable_redeemables_per_category_limit'] = None
+
+ # set to None if applicable_exclusive_redeemables_limit (nullable) is None
+ # and model_fields_set contains the field
+ if self.applicable_exclusive_redeemables_limit is None and "applicable_exclusive_redeemables_limit" in self.model_fields_set:
+ _dict['applicable_exclusive_redeemables_limit'] = None
+
+ # set to None if applicable_exclusive_redeemables_per_category_limit (nullable) is None
+ # and model_fields_set contains the field
+ if self.applicable_exclusive_redeemables_per_category_limit is None and "applicable_exclusive_redeemables_per_category_limit" in self.model_fields_set:
+ _dict['applicable_exclusive_redeemables_per_category_limit'] = None
+
+ # set to None if discount_calculation_mode (nullable) is None
+ # and model_fields_set contains the field
+ if self.discount_calculation_mode is None and "discount_calculation_mode" in self.model_fields_set:
+ _dict['discount_calculation_mode'] = None
+
+ # set to None if initial_amount_mode_categories (nullable) is None
+ # and model_fields_set contains the field
+ if self.initial_amount_mode_categories is None and "initial_amount_mode_categories" in self.model_fields_set:
+ _dict['initial_amount_mode_categories'] = None
+
+ # set to None if discounted_amount_mode_categories (nullable) is None
+ # and model_fields_set contains the field
+ if self.discounted_amount_mode_categories is None and "discounted_amount_mode_categories" in self.model_fields_set:
+ _dict['discounted_amount_mode_categories'] = None
+
+ # set to None if redeemables_application_mode (nullable) is None
+ # and model_fields_set contains the field
+ if self.redeemables_application_mode is None and "redeemables_application_mode" in self.model_fields_set:
+ _dict['redeemables_application_mode'] = None
+
+ # set to None if redeemables_sorting_rule (nullable) is None
+ # and model_fields_set contains the field
+ if self.redeemables_sorting_rule is None and "redeemables_sorting_rule" in self.model_fields_set:
+ _dict['redeemables_sorting_rule'] = None
+
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of ManagementProjectsStackingRulesUpdateRequestBody from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "exclusive_categories": obj.get("exclusive_categories"),
+ "joint_categories": obj.get("joint_categories"),
+ "redeemables_limit": obj.get("redeemables_limit"),
+ "applicable_redeemables_limit": obj.get("applicable_redeemables_limit"),
+ "applicable_redeemables_per_category_limit": obj.get("applicable_redeemables_per_category_limit"),
+ "applicable_exclusive_redeemables_limit": obj.get("applicable_exclusive_redeemables_limit"),
+ "applicable_exclusive_redeemables_per_category_limit": obj.get("applicable_exclusive_redeemables_per_category_limit"),
+ "discount_calculation_mode": obj.get("discount_calculation_mode"),
+ "initial_amount_mode_categories": obj.get("initial_amount_mode_categories"),
+ "discounted_amount_mode_categories": obj.get("discounted_amount_mode_categories"),
+ "redeemables_application_mode": obj.get("redeemables_application_mode"),
+ "redeemables_sorting_rule": obj.get("redeemables_sorting_rule")
+ })
+ return _obj
+
+
diff --git a/voucherify/models/management_projects_stacking_rules_update_response_body.py b/voucherify/models/management_projects_stacking_rules_update_response_body.py
new file mode 100644
index 00000000..9e2e25b5
--- /dev/null
+++ b/voucherify/models/management_projects_stacking_rules_update_response_body.py
@@ -0,0 +1,223 @@
+# coding: utf-8
+
+"""
+ Voucherify API
+
+ Voucherify promotion engine REST API. Please see https://docs.voucherify.io/docs for more details.
+
+ The version of the OpenAPI document: v2018-08-01
+ Contact: support@voucherify.io
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from datetime import datetime
+from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr, field_validator
+from typing import Any, ClassVar, Dict, List, Optional
+from typing_extensions import Annotated
+from typing import Optional, Set
+from typing_extensions import Self
+
+class ManagementProjectsStackingRulesUpdateResponseBody(BaseModel):
+ """
+ Response body schema for **PUT** `/management/v1/projects/{projectId}/stacking-rules/{stackingRulesId}`.
+ """ # noqa: E501
+ id: Optional[StrictStr] = Field(default=None, description="The unique identifier of the stacking rules.")
+ exclusive_categories: Optional[List[StrictStr]] = Field(default=None, description="Lists the IDs of the categories that are exclusive.")
+ joint_categories: Optional[List[StrictStr]] = Field(default=None, description="Lists the IDs of the categories that are joint.")
+ redeemables_limit: Optional[Annotated[int, Field(le=30, strict=True, ge=1)]] = Field(default=None, description="Defines how many redeemables can be sent to Voucherify for validation at the same time.")
+ applicable_redeemables_limit: Optional[Annotated[int, Field(strict=True, ge=1)]] = Field(default=None, description="Defines how many redeemables can be applied at the same time. The number must be less than or equal to `\"redeemables_limit\"`.")
+ applicable_redeemables_per_category_limit: Optional[StrictInt] = Field(default=None, description="Defines how many redeemables with the same category can be applied at the same time. The number must be less than or equal to `\"applicable_redeemables_limit\"`.")
+ applicable_exclusive_redeemables_limit: Optional[Annotated[int, Field(le=5, strict=True, ge=1)]] = Field(default=None, description="Defines how many redeemables with an assigned exclusive category can be applied at the same time.")
+ applicable_exclusive_redeemables_per_category_limit: Optional[StrictInt] = Field(default=None, description="Defines how many exclusive redeemables with the same category can be applied at the same time. The number must be less than or equal to `\"applicable_exclusive_redeemables_limit\"`.")
+ discount_calculation_mode: Optional[StrictStr] = Field(default=None, description="Defines if the discounts are applied by taking into account the initial order amount or the discounted order amount.")
+ initial_amount_mode_categories: Optional[List[StrictStr]] = Field(default=None, description="Lists the IDs of the categories that apply a discount based on the initial amount.")
+ discounted_amount_mode_categories: Optional[List[StrictStr]] = Field(default=None, description="Lists the IDs of the categories that apply a discount based on the discounted amount.")
+ redeemables_application_mode: Optional[StrictStr] = Field(default=None, description="Defines the application mode for redeemables. `\"ALL\"` means that all redeemables must be validated for the redemption to be successful. `\"PARTIAL\"` means that only those redeemables that can be validated will be redeemed. The redeemables that fail validaton will be skipped.")
+ redeemables_sorting_rule: Optional[StrictStr] = Field(default=None, description="Defines the sorting rule for redeemables. `\"CATEGORY_HIERARCHY\"` means that redeemables are applied with the order established by the hierarchy of the categories. `\"REQUESTED_ORDER\"` means that redeemables are applied with the order established in the request.")
+ created_at: Optional[datetime] = Field(default=None, description="Timestamp representing the date and time when the stacking rules were created. The value for this parameter is shown in the ISO 8601 format.")
+ updated_at: Optional[datetime] = Field(default=None, description="Timestamp representing the date and time when the stacking rules were updated. The value for this parameter is shown in the ISO 8601 format.")
+ __properties: ClassVar[List[str]] = ["id", "exclusive_categories", "joint_categories", "redeemables_limit", "applicable_redeemables_limit", "applicable_redeemables_per_category_limit", "applicable_exclusive_redeemables_limit", "applicable_exclusive_redeemables_per_category_limit", "discount_calculation_mode", "initial_amount_mode_categories", "discounted_amount_mode_categories", "redeemables_application_mode", "redeemables_sorting_rule", "created_at", "updated_at"]
+
+ @field_validator('discount_calculation_mode')
+ def discount_calculation_mode_validate_enum(cls, value):
+ """Validates the enum"""
+ if value is None:
+ return value
+
+ if value not in set(['INITIAL_AMOUNT', 'DISCOUNTED_AMOUNT']):
+ raise ValueError("must be one of enum values ('INITIAL_AMOUNT', 'DISCOUNTED_AMOUNT')")
+ return value
+
+ @field_validator('redeemables_application_mode')
+ def redeemables_application_mode_validate_enum(cls, value):
+ """Validates the enum"""
+ if value is None:
+ return value
+
+ if value not in set(['ALL', 'PARTIAL']):
+ raise ValueError("must be one of enum values ('ALL', 'PARTIAL')")
+ return value
+
+ @field_validator('redeemables_sorting_rule')
+ def redeemables_sorting_rule_validate_enum(cls, value):
+ """Validates the enum"""
+ if value is None:
+ return value
+
+ if value not in set(['CATEGORY_HIERARCHY', 'REQUESTED_ORDER']):
+ raise ValueError("must be one of enum values ('CATEGORY_HIERARCHY', 'REQUESTED_ORDER')")
+ return value
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of ManagementProjectsStackingRulesUpdateResponseBody from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([
+ ])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ # set to None if id (nullable) is None
+ # and model_fields_set contains the field
+ if self.id is None and "id" in self.model_fields_set:
+ _dict['id'] = None
+
+ # set to None if exclusive_categories (nullable) is None
+ # and model_fields_set contains the field
+ if self.exclusive_categories is None and "exclusive_categories" in self.model_fields_set:
+ _dict['exclusive_categories'] = None
+
+ # set to None if joint_categories (nullable) is None
+ # and model_fields_set contains the field
+ if self.joint_categories is None and "joint_categories" in self.model_fields_set:
+ _dict['joint_categories'] = None
+
+ # set to None if redeemables_limit (nullable) is None
+ # and model_fields_set contains the field
+ if self.redeemables_limit is None and "redeemables_limit" in self.model_fields_set:
+ _dict['redeemables_limit'] = None
+
+ # set to None if applicable_redeemables_limit (nullable) is None
+ # and model_fields_set contains the field
+ if self.applicable_redeemables_limit is None and "applicable_redeemables_limit" in self.model_fields_set:
+ _dict['applicable_redeemables_limit'] = None
+
+ # set to None if applicable_redeemables_per_category_limit (nullable) is None
+ # and model_fields_set contains the field
+ if self.applicable_redeemables_per_category_limit is None and "applicable_redeemables_per_category_limit" in self.model_fields_set:
+ _dict['applicable_redeemables_per_category_limit'] = None
+
+ # set to None if applicable_exclusive_redeemables_limit (nullable) is None
+ # and model_fields_set contains the field
+ if self.applicable_exclusive_redeemables_limit is None and "applicable_exclusive_redeemables_limit" in self.model_fields_set:
+ _dict['applicable_exclusive_redeemables_limit'] = None
+
+ # set to None if applicable_exclusive_redeemables_per_category_limit (nullable) is None
+ # and model_fields_set contains the field
+ if self.applicable_exclusive_redeemables_per_category_limit is None and "applicable_exclusive_redeemables_per_category_limit" in self.model_fields_set:
+ _dict['applicable_exclusive_redeemables_per_category_limit'] = None
+
+ # set to None if discount_calculation_mode (nullable) is None
+ # and model_fields_set contains the field
+ if self.discount_calculation_mode is None and "discount_calculation_mode" in self.model_fields_set:
+ _dict['discount_calculation_mode'] = None
+
+ # set to None if initial_amount_mode_categories (nullable) is None
+ # and model_fields_set contains the field
+ if self.initial_amount_mode_categories is None and "initial_amount_mode_categories" in self.model_fields_set:
+ _dict['initial_amount_mode_categories'] = None
+
+ # set to None if discounted_amount_mode_categories (nullable) is None
+ # and model_fields_set contains the field
+ if self.discounted_amount_mode_categories is None and "discounted_amount_mode_categories" in self.model_fields_set:
+ _dict['discounted_amount_mode_categories'] = None
+
+ # set to None if redeemables_application_mode (nullable) is None
+ # and model_fields_set contains the field
+ if self.redeemables_application_mode is None and "redeemables_application_mode" in self.model_fields_set:
+ _dict['redeemables_application_mode'] = None
+
+ # set to None if redeemables_sorting_rule (nullable) is None
+ # and model_fields_set contains the field
+ if self.redeemables_sorting_rule is None and "redeemables_sorting_rule" in self.model_fields_set:
+ _dict['redeemables_sorting_rule'] = None
+
+ # set to None if created_at (nullable) is None
+ # and model_fields_set contains the field
+ if self.created_at is None and "created_at" in self.model_fields_set:
+ _dict['created_at'] = None
+
+ # set to None if updated_at (nullable) is None
+ # and model_fields_set contains the field
+ if self.updated_at is None and "updated_at" in self.model_fields_set:
+ _dict['updated_at'] = None
+
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of ManagementProjectsStackingRulesUpdateResponseBody from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "id": obj.get("id"),
+ "exclusive_categories": obj.get("exclusive_categories"),
+ "joint_categories": obj.get("joint_categories"),
+ "redeemables_limit": obj.get("redeemables_limit"),
+ "applicable_redeemables_limit": obj.get("applicable_redeemables_limit"),
+ "applicable_redeemables_per_category_limit": obj.get("applicable_redeemables_per_category_limit"),
+ "applicable_exclusive_redeemables_limit": obj.get("applicable_exclusive_redeemables_limit"),
+ "applicable_exclusive_redeemables_per_category_limit": obj.get("applicable_exclusive_redeemables_per_category_limit"),
+ "discount_calculation_mode": obj.get("discount_calculation_mode"),
+ "initial_amount_mode_categories": obj.get("initial_amount_mode_categories"),
+ "discounted_amount_mode_categories": obj.get("discounted_amount_mode_categories"),
+ "redeemables_application_mode": obj.get("redeemables_application_mode"),
+ "redeemables_sorting_rule": obj.get("redeemables_sorting_rule"),
+ "created_at": obj.get("created_at"),
+ "updated_at": obj.get("updated_at")
+ })
+ return _obj
+
+
diff --git a/voucherify/models/management_projects_templates_campaigns_copy_create_request_body.py b/voucherify/models/management_projects_templates_campaigns_copy_create_request_body.py
new file mode 100644
index 00000000..620788b9
--- /dev/null
+++ b/voucherify/models/management_projects_templates_campaigns_copy_create_request_body.py
@@ -0,0 +1,107 @@
+# coding: utf-8
+
+"""
+ Voucherify API
+
+ Voucherify promotion engine REST API. Please see https://docs.voucherify.io/docs for more details.
+
+ The version of the OpenAPI document: v2018-08-01
+ Contact: support@voucherify.io
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict, Field, StrictStr
+from typing import Any, ClassVar, Dict, List, Optional
+from typing import Optional, Set
+from typing_extensions import Self
+
+class ManagementProjectsTemplatesCampaignsCopyCreateRequestBody(BaseModel):
+ """
+ Response body schema for **POST** `/management/v1/projects/{projectId}/templates/campaigns/{campaignTemplateId}/copy`.
+ """ # noqa: E501
+ name: Optional[StrictStr] = Field(default=None, description="User-defined name of the campaign template. It must be unique.")
+ description: Optional[StrictStr] = Field(default=None, description="User-defined description of the campaign template.")
+ destination_project_id: Optional[StrictStr] = Field(default=None, description="Unique identifier of the project to which the campaign template will be copied.")
+ __properties: ClassVar[List[str]] = ["name", "description", "destination_project_id"]
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of ManagementProjectsTemplatesCampaignsCopyCreateRequestBody from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([
+ ])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ # set to None if name (nullable) is None
+ # and model_fields_set contains the field
+ if self.name is None and "name" in self.model_fields_set:
+ _dict['name'] = None
+
+ # set to None if description (nullable) is None
+ # and model_fields_set contains the field
+ if self.description is None and "description" in self.model_fields_set:
+ _dict['description'] = None
+
+ # set to None if destination_project_id (nullable) is None
+ # and model_fields_set contains the field
+ if self.destination_project_id is None and "destination_project_id" in self.model_fields_set:
+ _dict['destination_project_id'] = None
+
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of ManagementProjectsTemplatesCampaignsCopyCreateRequestBody from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "name": obj.get("name"),
+ "description": obj.get("description"),
+ "destination_project_id": obj.get("destination_project_id")
+ })
+ return _obj
+
+
diff --git a/voucherify/models/management_projects_templates_campaigns_copy_create_response_body.py b/voucherify/models/management_projects_templates_campaigns_copy_create_response_body.py
new file mode 100644
index 00000000..fa329ea4
--- /dev/null
+++ b/voucherify/models/management_projects_templates_campaigns_copy_create_response_body.py
@@ -0,0 +1,149 @@
+# coding: utf-8
+
+"""
+ Voucherify API
+
+ Voucherify promotion engine REST API. Please see https://docs.voucherify.io/docs for more details.
+
+ The version of the OpenAPI document: v2018-08-01
+ Contact: support@voucherify.io
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from datetime import datetime
+from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator
+from typing import Any, ClassVar, Dict, List, Optional
+from typing import Optional, Set
+from typing_extensions import Self
+
+class ManagementProjectsTemplatesCampaignsCopyCreateResponseBody(BaseModel):
+ """
+ Response body schema for **POST** `/management/v1/projects/{projectId}/templates/campaigns/{campaignTemplateId}/copy`.
+ """ # noqa: E501
+ id: Optional[StrictStr] = Field(default=None, description="Unique identifier of the campaign template. It is assigned by Voucherify.")
+ name: Optional[StrictStr] = Field(default=None, description="User-defined name of the campaign template.")
+ description: Optional[StrictStr] = Field(default=None, description="User-defined description of the campaign template.")
+ campaign_type: Optional[StrictStr] = Field(default=None, description="Type of the campaign used to create the campaign template. Templates created from a promotion tier are converted to `DISCOUNT_COUPONS`.")
+ created_at: Optional[datetime] = Field(default=None, description="Timestamp representing the date and time when the campaign template was created. The value is shown in the ISO 8601 format.")
+ object: Optional[StrictStr] = Field(default='campaign_template', description="The type of the object represented by JSON.")
+ __properties: ClassVar[List[str]] = ["id", "name", "description", "campaign_type", "created_at", "object"]
+
+ @field_validator('campaign_type')
+ def campaign_type_validate_enum(cls, value):
+ """Validates the enum"""
+ if value is None:
+ return value
+
+ if value not in set(['DISCOUNT_COUPONS', 'GIFT_VOUCHERS']):
+ raise ValueError("must be one of enum values ('DISCOUNT_COUPONS', 'GIFT_VOUCHERS')")
+ return value
+
+ @field_validator('object')
+ def object_validate_enum(cls, value):
+ """Validates the enum"""
+ if value is None:
+ return value
+
+ if value not in set(['campaign_template']):
+ raise ValueError("must be one of enum values ('campaign_template')")
+ return value
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of ManagementProjectsTemplatesCampaignsCopyCreateResponseBody from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([
+ ])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ # set to None if id (nullable) is None
+ # and model_fields_set contains the field
+ if self.id is None and "id" in self.model_fields_set:
+ _dict['id'] = None
+
+ # set to None if name (nullable) is None
+ # and model_fields_set contains the field
+ if self.name is None and "name" in self.model_fields_set:
+ _dict['name'] = None
+
+ # set to None if description (nullable) is None
+ # and model_fields_set contains the field
+ if self.description is None and "description" in self.model_fields_set:
+ _dict['description'] = None
+
+ # set to None if campaign_type (nullable) is None
+ # and model_fields_set contains the field
+ if self.campaign_type is None and "campaign_type" in self.model_fields_set:
+ _dict['campaign_type'] = None
+
+ # set to None if created_at (nullable) is None
+ # and model_fields_set contains the field
+ if self.created_at is None and "created_at" in self.model_fields_set:
+ _dict['created_at'] = None
+
+ # set to None if object (nullable) is None
+ # and model_fields_set contains the field
+ if self.object is None and "object" in self.model_fields_set:
+ _dict['object'] = None
+
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of ManagementProjectsTemplatesCampaignsCopyCreateResponseBody from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "id": obj.get("id"),
+ "name": obj.get("name"),
+ "description": obj.get("description"),
+ "campaign_type": obj.get("campaign_type"),
+ "created_at": obj.get("created_at"),
+ "object": obj.get("object") if obj.get("object") is not None else 'campaign_template'
+ })
+ return _obj
+
+
diff --git a/voucherify/models/management_projects_templates_campaigns_list_response_body.py b/voucherify/models/management_projects_templates_campaigns_list_response_body.py
new file mode 100644
index 00000000..233f6efa
--- /dev/null
+++ b/voucherify/models/management_projects_templates_campaigns_list_response_body.py
@@ -0,0 +1,156 @@
+# coding: utf-8
+
+"""
+ Voucherify API
+
+ Voucherify promotion engine REST API. Please see https://docs.voucherify.io/docs for more details.
+
+ The version of the OpenAPI document: v2018-08-01
+ Contact: support@voucherify.io
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, StrictStr, field_validator
+from typing import Any, ClassVar, Dict, List, Optional
+from voucherify.models.campaign_template import CampaignTemplate
+from typing import Optional, Set
+from typing_extensions import Self
+
+class ManagementProjectsTemplatesCampaignsListResponseBody(BaseModel):
+ """
+ Response body schema for **GET** `/management/v1/projects/{projectId}/templates/campaigns`.
+ """ # noqa: E501
+ object: Optional[StrictStr] = Field(default='list', description="The type of the object represented by JSON. This object stores information about campaign templates.")
+ data_ref: Optional[StrictStr] = Field(default='data', description="Identifies the name of the JSON property that contains the array of campaign templates.")
+ data: Optional[List[CampaignTemplate]] = Field(default=None, description="Dictionary that contains an array of campaign templates.")
+ total: Optional[StrictInt] = Field(default=None, description="Total number of templates, regardless of the applied query parameters. Displayed only if the `include_total` query paremeter is set to `true`.")
+ has_more: Optional[StrictBool] = Field(default=None, description="As query results are always limited (by the limit parameter), the `has_more` flag indicates if there are more records for given filter parameters. This lets you know if you can run another request to get more records returned in the results.")
+ more_starting_after: Optional[StrictStr] = Field(default=None, description="Returns an ID that can be used to return another page of results. Use the template ID in the `starting_after_id` query parameter to display another page of the results starting after the template with that ID.")
+ __properties: ClassVar[List[str]] = ["object", "data_ref", "data", "total", "has_more", "more_starting_after"]
+
+ @field_validator('object')
+ def object_validate_enum(cls, value):
+ """Validates the enum"""
+ if value is None:
+ return value
+
+ if value not in set(['list']):
+ raise ValueError("must be one of enum values ('list')")
+ return value
+
+ @field_validator('data_ref')
+ def data_ref_validate_enum(cls, value):
+ """Validates the enum"""
+ if value is None:
+ return value
+
+ if value not in set(['data']):
+ raise ValueError("must be one of enum values ('data')")
+ return value
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of ManagementProjectsTemplatesCampaignsListResponseBody from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([
+ ])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ # override the default output from pydantic by calling `to_dict()` of each item in data (list)
+ _items = []
+ if self.data:
+ for _item_data in self.data:
+ if _item_data:
+ _items.append(_item_data.to_dict())
+ _dict['data'] = _items
+ # set to None if object (nullable) is None
+ # and model_fields_set contains the field
+ if self.object is None and "object" in self.model_fields_set:
+ _dict['object'] = None
+
+ # set to None if data_ref (nullable) is None
+ # and model_fields_set contains the field
+ if self.data_ref is None and "data_ref" in self.model_fields_set:
+ _dict['data_ref'] = None
+
+ # set to None if data (nullable) is None
+ # and model_fields_set contains the field
+ if self.data is None and "data" in self.model_fields_set:
+ _dict['data'] = None
+
+ # set to None if total (nullable) is None
+ # and model_fields_set contains the field
+ if self.total is None and "total" in self.model_fields_set:
+ _dict['total'] = None
+
+ # set to None if has_more (nullable) is None
+ # and model_fields_set contains the field
+ if self.has_more is None and "has_more" in self.model_fields_set:
+ _dict['has_more'] = None
+
+ # set to None if more_starting_after (nullable) is None
+ # and model_fields_set contains the field
+ if self.more_starting_after is None and "more_starting_after" in self.model_fields_set:
+ _dict['more_starting_after'] = None
+
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of ManagementProjectsTemplatesCampaignsListResponseBody from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "object": obj.get("object") if obj.get("object") is not None else 'list',
+ "data_ref": obj.get("data_ref") if obj.get("data_ref") is not None else 'data',
+ "data": [CampaignTemplate.from_dict(_item) for _item in obj["data"]] if obj.get("data") is not None else None,
+ "total": obj.get("total"),
+ "has_more": obj.get("has_more"),
+ "more_starting_after": obj.get("more_starting_after")
+ })
+ return _obj
+
+
diff --git a/voucherify/models/management_projects_update_request_body.py b/voucherify/models/management_projects_update_request_body.py
new file mode 100644
index 00000000..6ad57ce4
--- /dev/null
+++ b/voucherify/models/management_projects_update_request_body.py
@@ -0,0 +1,220 @@
+# coding: utf-8
+
+"""
+ Voucherify API
+
+ Voucherify promotion engine REST API. Please see https://docs.voucherify.io/docs for more details.
+
+ The version of the OpenAPI document: v2018-08-01
+ Contact: support@voucherify.io
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr, field_validator
+from typing import Any, ClassVar, Dict, List, Optional
+from voucherify.models.management_projects_update_request_body_api_usage_notifications import ManagementProjectsUpdateRequestBodyApiUsageNotifications
+from voucherify.models.management_projects_update_request_body_default_code_config import ManagementProjectsUpdateRequestBodyDefaultCodeConfig
+from voucherify.models.management_projects_update_request_body_webhooks_callout_notifications import ManagementProjectsUpdateRequestBodyWebhooksCalloutNotifications
+from typing import Optional, Set
+from typing_extensions import Self
+
+class ManagementProjectsUpdateRequestBody(BaseModel):
+ """
+ Request body schema for **PUT** `/management/v1/projects/{projectId}`.
+ """ # noqa: E501
+ name: Optional[StrictStr] = Field(default=None, description="The name of the project.")
+ description: Optional[StrictStr] = Field(default=None, description="A user-defined description of the project, e.g. its purpose, scope, region.")
+ timezone: Optional[StrictStr] = Field(default=None, description="The time zone in which the project is established. It can be in the GMT format or in accordance with IANA time zone database.")
+ currency: Optional[StrictStr] = Field(default=None, description="The currency used in the project. It is equal to a 3-letter ISO 4217 code.")
+ dial_code: Optional[StrictStr] = Field(default=None, description="The country dial code for the project. It is equal to an ITU country code.")
+ webhook_version: Optional[StrictStr] = Field(default='v2024-01-01', description="The webhook version used in the project.")
+ client_trusted_domains: Optional[List[StrictStr]] = Field(default=None, description="An array of URL addresses that allow client requests.")
+ client_redeem_enabled: Optional[StrictBool] = Field(default=None, description="Enables client-side redemption.")
+ client_publish_enabled: Optional[StrictBool] = Field(default=None, description="Enables client-side publication.")
+ client_list_vouchers_enabled: Optional[StrictBool] = Field(default=None, description="Enables client-side listing of vouchers.")
+ client_create_customer_enabled: Optional[StrictBool] = Field(default=None, description="Enables client-side creation of customers.")
+ client_loyalty_events_enabled: Optional[StrictBool] = Field(default=None, description="Enables client-side events for loyalty and referral programs.")
+ client_set_voucher_expiration_date_enabled: Optional[StrictBool] = Field(default=None, description="Enables client-side setting of voucher expiration date.")
+ webhooks_callout_notifications: Optional[ManagementProjectsUpdateRequestBodyWebhooksCalloutNotifications] = None
+ api_usage_notifications: Optional[ManagementProjectsUpdateRequestBodyApiUsageNotifications] = None
+ default_code_config: Optional[ManagementProjectsUpdateRequestBodyDefaultCodeConfig] = None
+ __properties: ClassVar[List[str]] = ["name", "description", "timezone", "currency", "dial_code", "webhook_version", "client_trusted_domains", "client_redeem_enabled", "client_publish_enabled", "client_list_vouchers_enabled", "client_create_customer_enabled", "client_loyalty_events_enabled", "client_set_voucher_expiration_date_enabled", "webhooks_callout_notifications", "api_usage_notifications", "default_code_config"]
+
+ @field_validator('webhook_version')
+ def webhook_version_validate_enum(cls, value):
+ """Validates the enum"""
+ if value is None:
+ return value
+
+ if value not in set(['v2024-01-01']):
+ raise ValueError("must be one of enum values ('v2024-01-01')")
+ return value
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of ManagementProjectsUpdateRequestBody from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([
+ ])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ # override the default output from pydantic by calling `to_dict()` of webhooks_callout_notifications
+ if self.webhooks_callout_notifications:
+ _dict['webhooks_callout_notifications'] = self.webhooks_callout_notifications.to_dict()
+ # override the default output from pydantic by calling `to_dict()` of api_usage_notifications
+ if self.api_usage_notifications:
+ _dict['api_usage_notifications'] = self.api_usage_notifications.to_dict()
+ # override the default output from pydantic by calling `to_dict()` of default_code_config
+ if self.default_code_config:
+ _dict['default_code_config'] = self.default_code_config.to_dict()
+ # set to None if name (nullable) is None
+ # and model_fields_set contains the field
+ if self.name is None and "name" in self.model_fields_set:
+ _dict['name'] = None
+
+ # set to None if description (nullable) is None
+ # and model_fields_set contains the field
+ if self.description is None and "description" in self.model_fields_set:
+ _dict['description'] = None
+
+ # set to None if timezone (nullable) is None
+ # and model_fields_set contains the field
+ if self.timezone is None and "timezone" in self.model_fields_set:
+ _dict['timezone'] = None
+
+ # set to None if currency (nullable) is None
+ # and model_fields_set contains the field
+ if self.currency is None and "currency" in self.model_fields_set:
+ _dict['currency'] = None
+
+ # set to None if dial_code (nullable) is None
+ # and model_fields_set contains the field
+ if self.dial_code is None and "dial_code" in self.model_fields_set:
+ _dict['dial_code'] = None
+
+ # set to None if webhook_version (nullable) is None
+ # and model_fields_set contains the field
+ if self.webhook_version is None and "webhook_version" in self.model_fields_set:
+ _dict['webhook_version'] = None
+
+ # set to None if client_trusted_domains (nullable) is None
+ # and model_fields_set contains the field
+ if self.client_trusted_domains is None and "client_trusted_domains" in self.model_fields_set:
+ _dict['client_trusted_domains'] = None
+
+ # set to None if client_redeem_enabled (nullable) is None
+ # and model_fields_set contains the field
+ if self.client_redeem_enabled is None and "client_redeem_enabled" in self.model_fields_set:
+ _dict['client_redeem_enabled'] = None
+
+ # set to None if client_publish_enabled (nullable) is None
+ # and model_fields_set contains the field
+ if self.client_publish_enabled is None and "client_publish_enabled" in self.model_fields_set:
+ _dict['client_publish_enabled'] = None
+
+ # set to None if client_list_vouchers_enabled (nullable) is None
+ # and model_fields_set contains the field
+ if self.client_list_vouchers_enabled is None and "client_list_vouchers_enabled" in self.model_fields_set:
+ _dict['client_list_vouchers_enabled'] = None
+
+ # set to None if client_create_customer_enabled (nullable) is None
+ # and model_fields_set contains the field
+ if self.client_create_customer_enabled is None and "client_create_customer_enabled" in self.model_fields_set:
+ _dict['client_create_customer_enabled'] = None
+
+ # set to None if client_loyalty_events_enabled (nullable) is None
+ # and model_fields_set contains the field
+ if self.client_loyalty_events_enabled is None and "client_loyalty_events_enabled" in self.model_fields_set:
+ _dict['client_loyalty_events_enabled'] = None
+
+ # set to None if client_set_voucher_expiration_date_enabled (nullable) is None
+ # and model_fields_set contains the field
+ if self.client_set_voucher_expiration_date_enabled is None and "client_set_voucher_expiration_date_enabled" in self.model_fields_set:
+ _dict['client_set_voucher_expiration_date_enabled'] = None
+
+ # set to None if webhooks_callout_notifications (nullable) is None
+ # and model_fields_set contains the field
+ if self.webhooks_callout_notifications is None and "webhooks_callout_notifications" in self.model_fields_set:
+ _dict['webhooks_callout_notifications'] = None
+
+ # set to None if api_usage_notifications (nullable) is None
+ # and model_fields_set contains the field
+ if self.api_usage_notifications is None and "api_usage_notifications" in self.model_fields_set:
+ _dict['api_usage_notifications'] = None
+
+ # set to None if default_code_config (nullable) is None
+ # and model_fields_set contains the field
+ if self.default_code_config is None and "default_code_config" in self.model_fields_set:
+ _dict['default_code_config'] = None
+
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of ManagementProjectsUpdateRequestBody from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "name": obj.get("name"),
+ "description": obj.get("description"),
+ "timezone": obj.get("timezone"),
+ "currency": obj.get("currency"),
+ "dial_code": obj.get("dial_code"),
+ "webhook_version": obj.get("webhook_version") if obj.get("webhook_version") is not None else 'v2024-01-01',
+ "client_trusted_domains": obj.get("client_trusted_domains"),
+ "client_redeem_enabled": obj.get("client_redeem_enabled"),
+ "client_publish_enabled": obj.get("client_publish_enabled"),
+ "client_list_vouchers_enabled": obj.get("client_list_vouchers_enabled"),
+ "client_create_customer_enabled": obj.get("client_create_customer_enabled"),
+ "client_loyalty_events_enabled": obj.get("client_loyalty_events_enabled"),
+ "client_set_voucher_expiration_date_enabled": obj.get("client_set_voucher_expiration_date_enabled"),
+ "webhooks_callout_notifications": ManagementProjectsUpdateRequestBodyWebhooksCalloutNotifications.from_dict(obj["webhooks_callout_notifications"]) if obj.get("webhooks_callout_notifications") is not None else None,
+ "api_usage_notifications": ManagementProjectsUpdateRequestBodyApiUsageNotifications.from_dict(obj["api_usage_notifications"]) if obj.get("api_usage_notifications") is not None else None,
+ "default_code_config": ManagementProjectsUpdateRequestBodyDefaultCodeConfig.from_dict(obj["default_code_config"]) if obj.get("default_code_config") is not None else None
+ })
+ return _obj
+
+
diff --git a/voucherify/models/management_projects_update_request_body_api_usage_notifications.py b/voucherify/models/management_projects_update_request_body_api_usage_notifications.py
new file mode 100644
index 00000000..7bf5b296
--- /dev/null
+++ b/voucherify/models/management_projects_update_request_body_api_usage_notifications.py
@@ -0,0 +1,112 @@
+# coding: utf-8
+
+"""
+ Voucherify API
+
+ Voucherify promotion engine REST API. Please see https://docs.voucherify.io/docs for more details.
+
+ The version of the OpenAPI document: v2018-08-01
+ Contact: support@voucherify.io
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict
+from typing import Any, ClassVar, Dict, List, Optional
+from voucherify.models.usage_notifications import UsageNotifications
+from typing import Optional, Set
+from typing_extensions import Self
+
+class ManagementProjectsUpdateRequestBodyApiUsageNotifications(BaseModel):
+ """
+ Determines the notification settings.
+ """ # noqa: E501
+ messages: Optional[UsageNotifications] = None
+ api_calls: Optional[UsageNotifications] = None
+ bulk_api_calls: Optional[UsageNotifications] = None
+ webhook_calls: Optional[UsageNotifications] = None
+ cycle_calls: Optional[UsageNotifications] = None
+ __properties: ClassVar[List[str]] = ["messages", "api_calls", "bulk_api_calls", "webhook_calls", "cycle_calls"]
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of ManagementProjectsUpdateRequestBodyApiUsageNotifications from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([
+ ])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ # override the default output from pydantic by calling `to_dict()` of messages
+ if self.messages:
+ _dict['messages'] = self.messages.to_dict()
+ # override the default output from pydantic by calling `to_dict()` of api_calls
+ if self.api_calls:
+ _dict['api_calls'] = self.api_calls.to_dict()
+ # override the default output from pydantic by calling `to_dict()` of bulk_api_calls
+ if self.bulk_api_calls:
+ _dict['bulk_api_calls'] = self.bulk_api_calls.to_dict()
+ # override the default output from pydantic by calling `to_dict()` of webhook_calls
+ if self.webhook_calls:
+ _dict['webhook_calls'] = self.webhook_calls.to_dict()
+ # override the default output from pydantic by calling `to_dict()` of cycle_calls
+ if self.cycle_calls:
+ _dict['cycle_calls'] = self.cycle_calls.to_dict()
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of ManagementProjectsUpdateRequestBodyApiUsageNotifications from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "messages": UsageNotifications.from_dict(obj["messages"]) if obj.get("messages") is not None else None,
+ "api_calls": UsageNotifications.from_dict(obj["api_calls"]) if obj.get("api_calls") is not None else None,
+ "bulk_api_calls": UsageNotifications.from_dict(obj["bulk_api_calls"]) if obj.get("bulk_api_calls") is not None else None,
+ "webhook_calls": UsageNotifications.from_dict(obj["webhook_calls"]) if obj.get("webhook_calls") is not None else None,
+ "cycle_calls": UsageNotifications.from_dict(obj["cycle_calls"]) if obj.get("cycle_calls") is not None else None
+ })
+ return _obj
+
+
diff --git a/voucherify/models/management_projects_update_request_body_default_code_config.py b/voucherify/models/management_projects_update_request_body_default_code_config.py
new file mode 100644
index 00000000..0150789c
--- /dev/null
+++ b/voucherify/models/management_projects_update_request_body_default_code_config.py
@@ -0,0 +1,93 @@
+# coding: utf-8
+
+"""
+ Voucherify API
+
+ Voucherify promotion engine REST API. Please see https://docs.voucherify.io/docs for more details.
+
+ The version of the OpenAPI document: v2018-08-01
+ Contact: support@voucherify.io
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict, Field, StrictStr
+from typing import Any, ClassVar, Dict, List, Optional
+from typing import Optional, Set
+from typing_extensions import Self
+
+class ManagementProjectsUpdateRequestBodyDefaultCodeConfig(BaseModel):
+ """
+ Determines the character set that is used as default for vouchers. It is affected by the `\"case_sensitive_codes\"` setting.
+ """ # noqa: E501
+ charset: Optional[StrictStr] = Field(default=None, description="Lists all characters that are used as default for vouchers")
+ __properties: ClassVar[List[str]] = ["charset"]
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of ManagementProjectsUpdateRequestBodyDefaultCodeConfig from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([
+ ])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ # set to None if charset (nullable) is None
+ # and model_fields_set contains the field
+ if self.charset is None and "charset" in self.model_fields_set:
+ _dict['charset'] = None
+
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of ManagementProjectsUpdateRequestBodyDefaultCodeConfig from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "charset": obj.get("charset")
+ })
+ return _obj
+
+
diff --git a/voucherify/models/management_projects_update_request_body_webhooks_callout_notifications.py b/voucherify/models/management_projects_update_request_body_webhooks_callout_notifications.py
new file mode 100644
index 00000000..d926c785
--- /dev/null
+++ b/voucherify/models/management_projects_update_request_body_webhooks_callout_notifications.py
@@ -0,0 +1,108 @@
+# coding: utf-8
+
+"""
+ Voucherify API
+
+ Voucherify promotion engine REST API. Please see https://docs.voucherify.io/docs for more details.
+
+ The version of the OpenAPI document: v2018-08-01
+ Contact: support@voucherify.io
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict
+from typing import Any, ClassVar, Dict, List, Optional
+from voucherify.models.management_projects_update_request_body_webhooks_callout_notifications_distributions import ManagementProjectsUpdateRequestBodyWebhooksCalloutNotificationsDistributions
+from voucherify.models.management_projects_update_request_body_webhooks_callout_notifications_webhooks import ManagementProjectsUpdateRequestBodyWebhooksCalloutNotificationsWebhooks
+from typing import Optional, Set
+from typing_extensions import Self
+
+class ManagementProjectsUpdateRequestBodyWebhooksCalloutNotifications(BaseModel):
+ """
+ Determines the notification settings for webhook callouts configured in Distributions and Project settings.
+ """ # noqa: E501
+ distributions: Optional[ManagementProjectsUpdateRequestBodyWebhooksCalloutNotificationsDistributions] = None
+ webhooks: Optional[ManagementProjectsUpdateRequestBodyWebhooksCalloutNotificationsWebhooks] = None
+ __properties: ClassVar[List[str]] = ["distributions", "webhooks"]
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of ManagementProjectsUpdateRequestBodyWebhooksCalloutNotifications from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([
+ ])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ # override the default output from pydantic by calling `to_dict()` of distributions
+ if self.distributions:
+ _dict['distributions'] = self.distributions.to_dict()
+ # override the default output from pydantic by calling `to_dict()` of webhooks
+ if self.webhooks:
+ _dict['webhooks'] = self.webhooks.to_dict()
+ # set to None if distributions (nullable) is None
+ # and model_fields_set contains the field
+ if self.distributions is None and "distributions" in self.model_fields_set:
+ _dict['distributions'] = None
+
+ # set to None if webhooks (nullable) is None
+ # and model_fields_set contains the field
+ if self.webhooks is None and "webhooks" in self.model_fields_set:
+ _dict['webhooks'] = None
+
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of ManagementProjectsUpdateRequestBodyWebhooksCalloutNotifications from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "distributions": ManagementProjectsUpdateRequestBodyWebhooksCalloutNotificationsDistributions.from_dict(obj["distributions"]) if obj.get("distributions") is not None else None,
+ "webhooks": ManagementProjectsUpdateRequestBodyWebhooksCalloutNotificationsWebhooks.from_dict(obj["webhooks"]) if obj.get("webhooks") is not None else None
+ })
+ return _obj
+
+
diff --git a/voucherify/models/management_projects_update_request_body_webhooks_callout_notifications_distributions.py b/voucherify/models/management_projects_update_request_body_webhooks_callout_notifications_distributions.py
new file mode 100644
index 00000000..e5596d0d
--- /dev/null
+++ b/voucherify/models/management_projects_update_request_body_webhooks_callout_notifications_distributions.py
@@ -0,0 +1,107 @@
+# coding: utf-8
+
+"""
+ Voucherify API
+
+ Voucherify promotion engine REST API. Please see https://docs.voucherify.io/docs for more details.
+
+ The version of the OpenAPI document: v2018-08-01
+ Contact: support@voucherify.io
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr
+from typing import Any, ClassVar, Dict, List, Optional
+from typing import Optional, Set
+from typing_extensions import Self
+
+class ManagementProjectsUpdateRequestBodyWebhooksCalloutNotificationsDistributions(BaseModel):
+ """
+ Determines the notification settings for webhooks sent through Distributions.
+ """ # noqa: E501
+ email: Optional[StrictBool] = Field(default=None, description="Enables the notification through an email.")
+ in_app: Optional[StrictBool] = Field(default=None, description="Enables the notification through an email.")
+ emails: Optional[List[StrictStr]] = Field(default=None, description="An array of email addresses which will receive the notification.")
+ __properties: ClassVar[List[str]] = ["email", "in_app", "emails"]
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of ManagementProjectsUpdateRequestBodyWebhooksCalloutNotificationsDistributions from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([
+ ])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ # set to None if email (nullable) is None
+ # and model_fields_set contains the field
+ if self.email is None and "email" in self.model_fields_set:
+ _dict['email'] = None
+
+ # set to None if in_app (nullable) is None
+ # and model_fields_set contains the field
+ if self.in_app is None and "in_app" in self.model_fields_set:
+ _dict['in_app'] = None
+
+ # set to None if emails (nullable) is None
+ # and model_fields_set contains the field
+ if self.emails is None and "emails" in self.model_fields_set:
+ _dict['emails'] = None
+
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of ManagementProjectsUpdateRequestBodyWebhooksCalloutNotificationsDistributions from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "email": obj.get("email"),
+ "in_app": obj.get("in_app"),
+ "emails": obj.get("emails")
+ })
+ return _obj
+
+
diff --git a/voucherify/models/management_projects_update_request_body_webhooks_callout_notifications_webhooks.py b/voucherify/models/management_projects_update_request_body_webhooks_callout_notifications_webhooks.py
new file mode 100644
index 00000000..bf2721e6
--- /dev/null
+++ b/voucherify/models/management_projects_update_request_body_webhooks_callout_notifications_webhooks.py
@@ -0,0 +1,107 @@
+# coding: utf-8
+
+"""
+ Voucherify API
+
+ Voucherify promotion engine REST API. Please see https://docs.voucherify.io/docs for more details.
+
+ The version of the OpenAPI document: v2018-08-01
+ Contact: support@voucherify.io
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr
+from typing import Any, ClassVar, Dict, List, Optional
+from typing import Optional, Set
+from typing_extensions import Self
+
+class ManagementProjectsUpdateRequestBodyWebhooksCalloutNotificationsWebhooks(BaseModel):
+ """
+ Determines the notification settings for webhooks sent as set out in the Project settings.
+ """ # noqa: E501
+ email: Optional[StrictBool] = Field(default=None, description="Enables the notification through an email.")
+ in_app: Optional[StrictBool] = Field(default=None, description="Enables the notification through an email.")
+ emails: Optional[List[StrictStr]] = Field(default=None, description="An array of email addresses which will receive the notification.")
+ __properties: ClassVar[List[str]] = ["email", "in_app", "emails"]
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of ManagementProjectsUpdateRequestBodyWebhooksCalloutNotificationsWebhooks from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([
+ ])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ # set to None if email (nullable) is None
+ # and model_fields_set contains the field
+ if self.email is None and "email" in self.model_fields_set:
+ _dict['email'] = None
+
+ # set to None if in_app (nullable) is None
+ # and model_fields_set contains the field
+ if self.in_app is None and "in_app" in self.model_fields_set:
+ _dict['in_app'] = None
+
+ # set to None if emails (nullable) is None
+ # and model_fields_set contains the field
+ if self.emails is None and "emails" in self.model_fields_set:
+ _dict['emails'] = None
+
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of ManagementProjectsUpdateRequestBodyWebhooksCalloutNotificationsWebhooks from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "email": obj.get("email"),
+ "in_app": obj.get("in_app"),
+ "emails": obj.get("emails")
+ })
+ return _obj
+
+
diff --git a/voucherify/models/management_projects_update_response_body.py b/voucherify/models/management_projects_update_response_body.py
new file mode 100644
index 00000000..b9c21a1e
--- /dev/null
+++ b/voucherify/models/management_projects_update_response_body.py
@@ -0,0 +1,283 @@
+# coding: utf-8
+
+"""
+ Voucherify API
+
+ Voucherify promotion engine REST API. Please see https://docs.voucherify.io/docs for more details.
+
+ The version of the OpenAPI document: v2018-08-01
+ Contact: support@voucherify.io
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr, field_validator
+from typing import Any, ClassVar, Dict, List, Optional
+from voucherify.models.management_projects_update_response_body_api_usage_notifications import ManagementProjectsUpdateResponseBodyApiUsageNotifications
+from voucherify.models.management_projects_update_response_body_default_code_config import ManagementProjectsUpdateResponseBodyDefaultCodeConfig
+from voucherify.models.management_projects_update_response_body_limits import ManagementProjectsUpdateResponseBodyLimits
+from voucherify.models.management_projects_update_response_body_webhooks_callout_notifications import ManagementProjectsUpdateResponseBodyWebhooksCalloutNotifications
+from typing import Optional, Set
+from typing_extensions import Self
+
+class ManagementProjectsUpdateResponseBody(BaseModel):
+ """
+ ManagementProjectsUpdateResponseBody
+ """ # noqa: E501
+ id: Optional[StrictStr] = Field(default=None, description="Unique identifier of the project.")
+ name: Optional[StrictStr] = Field(default=None, description="The name of the project.")
+ description: Optional[StrictStr] = Field(default=None, description="A user-defined description of the project, e.g. its purpose, scope, region.")
+ timezone: Optional[StrictStr] = Field(default=None, description="The time zone in which the project is established. It can be in the GMT format or in accordance with IANA time zone database.")
+ currency: Optional[StrictStr] = Field(default=None, description="The currency used in the project. It is equal to a 3-letter ISO 4217 code.")
+ dial_code: Optional[StrictStr] = Field(default=None, description="The country dial code for the project. It is equal to an ITU country code.")
+ webhook_version: Optional[StrictStr] = Field(default='v2024-01-01', description="The webhook version used in the project.")
+ client_trusted_domains: Optional[List[StrictStr]] = Field(default=None, description="An array of URL addresses that allow client requests.")
+ client_redeem_enabled: Optional[StrictBool] = Field(default=None, description="Enables client-side redemption.")
+ client_publish_enabled: Optional[StrictBool] = Field(default=None, description="Enables client-side publication.")
+ client_list_vouchers_enabled: Optional[StrictBool] = Field(default=None, description="Enables client-side listing of vouchers.")
+ client_create_customer_enabled: Optional[StrictBool] = Field(default=None, description="Enables client-side creation of customers.")
+ client_loyalty_events_enabled: Optional[StrictBool] = Field(default=None, description="Enables client-side events for loyalty and referral programs.")
+ client_set_voucher_expiration_date_enabled: Optional[StrictBool] = Field(default=None, description="Enables client-side setting of voucher expiration date.")
+ webhooks_callout_notifications: Optional[ManagementProjectsUpdateResponseBodyWebhooksCalloutNotifications] = None
+ api_usage_notifications: Optional[ManagementProjectsUpdateResponseBodyApiUsageNotifications] = None
+ cluster_id: Optional[StrictStr] = Field(default=None, description="The identifier of the cluster where the project will be created.")
+ case_sensitive_codes: Optional[StrictBool] = Field(default=None, description="Determines if the vouchers in the project will be: - case sensitive - if `true`, `C0dE-cfV` is **not** equal to `c0de-cfv`), - case insensitive - if `false`, `C0dE-cfV` is equal to `c0de-cfv`.")
+ api_version: Optional[StrictStr] = Field(default='v2018-08-01', description="The API version used in the project. Currently, the default and only value is `v2018-08-01`.")
+ is_sandbox: Optional[StrictBool] = Field(default=None, description="Determines if the project is a sandbox project.")
+ webhook_token: Optional[StrictStr] = Field(default=None, description="Webhook token used for authentication.")
+ default_code_config: Optional[ManagementProjectsUpdateResponseBodyDefaultCodeConfig] = None
+ limits: Optional[ManagementProjectsUpdateResponseBodyLimits] = None
+ __properties: ClassVar[List[str]] = ["id", "name", "description", "timezone", "currency", "dial_code", "webhook_version", "client_trusted_domains", "client_redeem_enabled", "client_publish_enabled", "client_list_vouchers_enabled", "client_create_customer_enabled", "client_loyalty_events_enabled", "client_set_voucher_expiration_date_enabled", "webhooks_callout_notifications", "api_usage_notifications", "cluster_id", "case_sensitive_codes", "api_version", "is_sandbox", "webhook_token", "default_code_config", "limits"]
+
+ @field_validator('webhook_version')
+ def webhook_version_validate_enum(cls, value):
+ """Validates the enum"""
+ if value is None:
+ return value
+
+ if value not in set(['v2024-01-01']):
+ raise ValueError("must be one of enum values ('v2024-01-01')")
+ return value
+
+ @field_validator('api_version')
+ def api_version_validate_enum(cls, value):
+ """Validates the enum"""
+ if value is None:
+ return value
+
+ if value not in set(['v2018-08-01']):
+ raise ValueError("must be one of enum values ('v2018-08-01')")
+ return value
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of ManagementProjectsUpdateResponseBody from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([
+ ])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ # override the default output from pydantic by calling `to_dict()` of webhooks_callout_notifications
+ if self.webhooks_callout_notifications:
+ _dict['webhooks_callout_notifications'] = self.webhooks_callout_notifications.to_dict()
+ # override the default output from pydantic by calling `to_dict()` of api_usage_notifications
+ if self.api_usage_notifications:
+ _dict['api_usage_notifications'] = self.api_usage_notifications.to_dict()
+ # override the default output from pydantic by calling `to_dict()` of default_code_config
+ if self.default_code_config:
+ _dict['default_code_config'] = self.default_code_config.to_dict()
+ # override the default output from pydantic by calling `to_dict()` of limits
+ if self.limits:
+ _dict['limits'] = self.limits.to_dict()
+ # set to None if id (nullable) is None
+ # and model_fields_set contains the field
+ if self.id is None and "id" in self.model_fields_set:
+ _dict['id'] = None
+
+ # set to None if name (nullable) is None
+ # and model_fields_set contains the field
+ if self.name is None and "name" in self.model_fields_set:
+ _dict['name'] = None
+
+ # set to None if description (nullable) is None
+ # and model_fields_set contains the field
+ if self.description is None and "description" in self.model_fields_set:
+ _dict['description'] = None
+
+ # set to None if timezone (nullable) is None
+ # and model_fields_set contains the field
+ if self.timezone is None and "timezone" in self.model_fields_set:
+ _dict['timezone'] = None
+
+ # set to None if currency (nullable) is None
+ # and model_fields_set contains the field
+ if self.currency is None and "currency" in self.model_fields_set:
+ _dict['currency'] = None
+
+ # set to None if dial_code (nullable) is None
+ # and model_fields_set contains the field
+ if self.dial_code is None and "dial_code" in self.model_fields_set:
+ _dict['dial_code'] = None
+
+ # set to None if webhook_version (nullable) is None
+ # and model_fields_set contains the field
+ if self.webhook_version is None and "webhook_version" in self.model_fields_set:
+ _dict['webhook_version'] = None
+
+ # set to None if client_trusted_domains (nullable) is None
+ # and model_fields_set contains the field
+ if self.client_trusted_domains is None and "client_trusted_domains" in self.model_fields_set:
+ _dict['client_trusted_domains'] = None
+
+ # set to None if client_redeem_enabled (nullable) is None
+ # and model_fields_set contains the field
+ if self.client_redeem_enabled is None and "client_redeem_enabled" in self.model_fields_set:
+ _dict['client_redeem_enabled'] = None
+
+ # set to None if client_publish_enabled (nullable) is None
+ # and model_fields_set contains the field
+ if self.client_publish_enabled is None and "client_publish_enabled" in self.model_fields_set:
+ _dict['client_publish_enabled'] = None
+
+ # set to None if client_list_vouchers_enabled (nullable) is None
+ # and model_fields_set contains the field
+ if self.client_list_vouchers_enabled is None and "client_list_vouchers_enabled" in self.model_fields_set:
+ _dict['client_list_vouchers_enabled'] = None
+
+ # set to None if client_create_customer_enabled (nullable) is None
+ # and model_fields_set contains the field
+ if self.client_create_customer_enabled is None and "client_create_customer_enabled" in self.model_fields_set:
+ _dict['client_create_customer_enabled'] = None
+
+ # set to None if client_loyalty_events_enabled (nullable) is None
+ # and model_fields_set contains the field
+ if self.client_loyalty_events_enabled is None and "client_loyalty_events_enabled" in self.model_fields_set:
+ _dict['client_loyalty_events_enabled'] = None
+
+ # set to None if client_set_voucher_expiration_date_enabled (nullable) is None
+ # and model_fields_set contains the field
+ if self.client_set_voucher_expiration_date_enabled is None and "client_set_voucher_expiration_date_enabled" in self.model_fields_set:
+ _dict['client_set_voucher_expiration_date_enabled'] = None
+
+ # set to None if webhooks_callout_notifications (nullable) is None
+ # and model_fields_set contains the field
+ if self.webhooks_callout_notifications is None and "webhooks_callout_notifications" in self.model_fields_set:
+ _dict['webhooks_callout_notifications'] = None
+
+ # set to None if api_usage_notifications (nullable) is None
+ # and model_fields_set contains the field
+ if self.api_usage_notifications is None and "api_usage_notifications" in self.model_fields_set:
+ _dict['api_usage_notifications'] = None
+
+ # set to None if cluster_id (nullable) is None
+ # and model_fields_set contains the field
+ if self.cluster_id is None and "cluster_id" in self.model_fields_set:
+ _dict['cluster_id'] = None
+
+ # set to None if case_sensitive_codes (nullable) is None
+ # and model_fields_set contains the field
+ if self.case_sensitive_codes is None and "case_sensitive_codes" in self.model_fields_set:
+ _dict['case_sensitive_codes'] = None
+
+ # set to None if api_version (nullable) is None
+ # and model_fields_set contains the field
+ if self.api_version is None and "api_version" in self.model_fields_set:
+ _dict['api_version'] = None
+
+ # set to None if is_sandbox (nullable) is None
+ # and model_fields_set contains the field
+ if self.is_sandbox is None and "is_sandbox" in self.model_fields_set:
+ _dict['is_sandbox'] = None
+
+ # set to None if webhook_token (nullable) is None
+ # and model_fields_set contains the field
+ if self.webhook_token is None and "webhook_token" in self.model_fields_set:
+ _dict['webhook_token'] = None
+
+ # set to None if default_code_config (nullable) is None
+ # and model_fields_set contains the field
+ if self.default_code_config is None and "default_code_config" in self.model_fields_set:
+ _dict['default_code_config'] = None
+
+ # set to None if limits (nullable) is None
+ # and model_fields_set contains the field
+ if self.limits is None and "limits" in self.model_fields_set:
+ _dict['limits'] = None
+
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of ManagementProjectsUpdateResponseBody from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "id": obj.get("id"),
+ "name": obj.get("name"),
+ "description": obj.get("description"),
+ "timezone": obj.get("timezone"),
+ "currency": obj.get("currency"),
+ "dial_code": obj.get("dial_code"),
+ "webhook_version": obj.get("webhook_version") if obj.get("webhook_version") is not None else 'v2024-01-01',
+ "client_trusted_domains": obj.get("client_trusted_domains"),
+ "client_redeem_enabled": obj.get("client_redeem_enabled"),
+ "client_publish_enabled": obj.get("client_publish_enabled"),
+ "client_list_vouchers_enabled": obj.get("client_list_vouchers_enabled"),
+ "client_create_customer_enabled": obj.get("client_create_customer_enabled"),
+ "client_loyalty_events_enabled": obj.get("client_loyalty_events_enabled"),
+ "client_set_voucher_expiration_date_enabled": obj.get("client_set_voucher_expiration_date_enabled"),
+ "webhooks_callout_notifications": ManagementProjectsUpdateResponseBodyWebhooksCalloutNotifications.from_dict(obj["webhooks_callout_notifications"]) if obj.get("webhooks_callout_notifications") is not None else None,
+ "api_usage_notifications": ManagementProjectsUpdateResponseBodyApiUsageNotifications.from_dict(obj["api_usage_notifications"]) if obj.get("api_usage_notifications") is not None else None,
+ "cluster_id": obj.get("cluster_id"),
+ "case_sensitive_codes": obj.get("case_sensitive_codes"),
+ "api_version": obj.get("api_version") if obj.get("api_version") is not None else 'v2018-08-01',
+ "is_sandbox": obj.get("is_sandbox"),
+ "webhook_token": obj.get("webhook_token"),
+ "default_code_config": ManagementProjectsUpdateResponseBodyDefaultCodeConfig.from_dict(obj["default_code_config"]) if obj.get("default_code_config") is not None else None,
+ "limits": ManagementProjectsUpdateResponseBodyLimits.from_dict(obj["limits"]) if obj.get("limits") is not None else None
+ })
+ return _obj
+
+
diff --git a/voucherify/models/management_projects_update_response_body_api_usage_notifications.py b/voucherify/models/management_projects_update_response_body_api_usage_notifications.py
new file mode 100644
index 00000000..968dfa3f
--- /dev/null
+++ b/voucherify/models/management_projects_update_response_body_api_usage_notifications.py
@@ -0,0 +1,117 @@
+# coding: utf-8
+
+"""
+ Voucherify API
+
+ Voucherify promotion engine REST API. Please see https://docs.voucherify.io/docs for more details.
+
+ The version of the OpenAPI document: v2018-08-01
+ Contact: support@voucherify.io
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict
+from typing import Any, ClassVar, Dict, List, Optional
+from voucherify.models.usage_notifications import UsageNotifications
+from typing import Optional, Set
+from typing_extensions import Self
+
+class ManagementProjectsUpdateResponseBodyApiUsageNotifications(BaseModel):
+ """
+ Determines the notification settings.
+ """ # noqa: E501
+ redemptions: Optional[UsageNotifications] = None
+ messages: Optional[UsageNotifications] = None
+ api_calls: Optional[UsageNotifications] = None
+ bulk_api_calls: Optional[UsageNotifications] = None
+ webhook_calls: Optional[UsageNotifications] = None
+ cycle_calls: Optional[UsageNotifications] = None
+ __properties: ClassVar[List[str]] = ["redemptions", "messages", "api_calls", "bulk_api_calls", "webhook_calls", "cycle_calls"]
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of ManagementProjectsUpdateResponseBodyApiUsageNotifications from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([
+ ])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ # override the default output from pydantic by calling `to_dict()` of redemptions
+ if self.redemptions:
+ _dict['redemptions'] = self.redemptions.to_dict()
+ # override the default output from pydantic by calling `to_dict()` of messages
+ if self.messages:
+ _dict['messages'] = self.messages.to_dict()
+ # override the default output from pydantic by calling `to_dict()` of api_calls
+ if self.api_calls:
+ _dict['api_calls'] = self.api_calls.to_dict()
+ # override the default output from pydantic by calling `to_dict()` of bulk_api_calls
+ if self.bulk_api_calls:
+ _dict['bulk_api_calls'] = self.bulk_api_calls.to_dict()
+ # override the default output from pydantic by calling `to_dict()` of webhook_calls
+ if self.webhook_calls:
+ _dict['webhook_calls'] = self.webhook_calls.to_dict()
+ # override the default output from pydantic by calling `to_dict()` of cycle_calls
+ if self.cycle_calls:
+ _dict['cycle_calls'] = self.cycle_calls.to_dict()
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of ManagementProjectsUpdateResponseBodyApiUsageNotifications from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "redemptions": UsageNotifications.from_dict(obj["redemptions"]) if obj.get("redemptions") is not None else None,
+ "messages": UsageNotifications.from_dict(obj["messages"]) if obj.get("messages") is not None else None,
+ "api_calls": UsageNotifications.from_dict(obj["api_calls"]) if obj.get("api_calls") is not None else None,
+ "bulk_api_calls": UsageNotifications.from_dict(obj["bulk_api_calls"]) if obj.get("bulk_api_calls") is not None else None,
+ "webhook_calls": UsageNotifications.from_dict(obj["webhook_calls"]) if obj.get("webhook_calls") is not None else None,
+ "cycle_calls": UsageNotifications.from_dict(obj["cycle_calls"]) if obj.get("cycle_calls") is not None else None
+ })
+ return _obj
+
+
diff --git a/voucherify/models/management_projects_update_response_body_default_code_config.py b/voucherify/models/management_projects_update_response_body_default_code_config.py
new file mode 100644
index 00000000..40224d03
--- /dev/null
+++ b/voucherify/models/management_projects_update_response_body_default_code_config.py
@@ -0,0 +1,93 @@
+# coding: utf-8
+
+"""
+ Voucherify API
+
+ Voucherify promotion engine REST API. Please see https://docs.voucherify.io/docs for more details.
+
+ The version of the OpenAPI document: v2018-08-01
+ Contact: support@voucherify.io
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict, Field, StrictStr
+from typing import Any, ClassVar, Dict, List, Optional
+from typing import Optional, Set
+from typing_extensions import Self
+
+class ManagementProjectsUpdateResponseBodyDefaultCodeConfig(BaseModel):
+ """
+ Determines the character set that is used as default for vouchers. It is affected by the `\"case_sensitive_codes\"` setting.
+ """ # noqa: E501
+ charset: Optional[StrictStr] = Field(default=None, description="Lists all characters that are used as default for vouchers")
+ __properties: ClassVar[List[str]] = ["charset"]
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of ManagementProjectsUpdateResponseBodyDefaultCodeConfig from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([
+ ])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ # set to None if charset (nullable) is None
+ # and model_fields_set contains the field
+ if self.charset is None and "charset" in self.model_fields_set:
+ _dict['charset'] = None
+
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of ManagementProjectsUpdateResponseBodyDefaultCodeConfig from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "charset": obj.get("charset")
+ })
+ return _obj
+
+
diff --git a/voucherify/models/management_projects_update_response_body_limits.py b/voucherify/models/management_projects_update_response_body_limits.py
new file mode 100644
index 00000000..c20cfe98
--- /dev/null
+++ b/voucherify/models/management_projects_update_response_body_limits.py
@@ -0,0 +1,116 @@
+# coding: utf-8
+
+"""
+ Voucherify API
+
+ Voucherify promotion engine REST API. Please see https://docs.voucherify.io/docs for more details.
+
+ The version of the OpenAPI document: v2018-08-01
+ Contact: support@voucherify.io
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict
+from typing import Any, ClassVar, Dict, List, Optional
+from voucherify.models.management_projects_update_response_body_limits_api_calls_item import ManagementProjectsUpdateResponseBodyLimitsApiCallsItem
+from voucherify.models.management_projects_update_response_body_limits_bulk_api_calls_item import ManagementProjectsUpdateResponseBodyLimitsBulkApiCallsItem
+from typing import Optional, Set
+from typing_extensions import Self
+
+class ManagementProjectsUpdateResponseBodyLimits(BaseModel):
+ """
+ Determines additional limits set on a given project, e.g. the Sandbox project. If no limits are returned, the limits set for the whole organization apply.
+ """ # noqa: E501
+ api_calls: Optional[List[ManagementProjectsUpdateResponseBodyLimitsApiCallsItem]] = None
+ bulk_api_calls: Optional[List[ManagementProjectsUpdateResponseBodyLimitsBulkApiCallsItem]] = None
+ __properties: ClassVar[List[str]] = ["api_calls", "bulk_api_calls"]
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of ManagementProjectsUpdateResponseBodyLimits from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([
+ ])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ # override the default output from pydantic by calling `to_dict()` of each item in api_calls (list)
+ _items = []
+ if self.api_calls:
+ for _item_api_calls in self.api_calls:
+ if _item_api_calls:
+ _items.append(_item_api_calls.to_dict())
+ _dict['api_calls'] = _items
+ # override the default output from pydantic by calling `to_dict()` of each item in bulk_api_calls (list)
+ _items = []
+ if self.bulk_api_calls:
+ for _item_bulk_api_calls in self.bulk_api_calls:
+ if _item_bulk_api_calls:
+ _items.append(_item_bulk_api_calls.to_dict())
+ _dict['bulk_api_calls'] = _items
+ # set to None if api_calls (nullable) is None
+ # and model_fields_set contains the field
+ if self.api_calls is None and "api_calls" in self.model_fields_set:
+ _dict['api_calls'] = None
+
+ # set to None if bulk_api_calls (nullable) is None
+ # and model_fields_set contains the field
+ if self.bulk_api_calls is None and "bulk_api_calls" in self.model_fields_set:
+ _dict['bulk_api_calls'] = None
+
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of ManagementProjectsUpdateResponseBodyLimits from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "api_calls": [ManagementProjectsUpdateResponseBodyLimitsApiCallsItem.from_dict(_item) for _item in obj["api_calls"]] if obj.get("api_calls") is not None else None,
+ "bulk_api_calls": [ManagementProjectsUpdateResponseBodyLimitsBulkApiCallsItem.from_dict(_item) for _item in obj["bulk_api_calls"]] if obj.get("bulk_api_calls") is not None else None
+ })
+ return _obj
+
+
diff --git a/voucherify/models/management_projects_update_response_body_limits_api_calls_item.py b/voucherify/models/management_projects_update_response_body_limits_api_calls_item.py
new file mode 100644
index 00000000..1cd2fb73
--- /dev/null
+++ b/voucherify/models/management_projects_update_response_body_limits_api_calls_item.py
@@ -0,0 +1,90 @@
+# coding: utf-8
+
+"""
+ Voucherify API
+
+ Voucherify promotion engine REST API. Please see https://docs.voucherify.io/docs for more details.
+
+ The version of the OpenAPI document: v2018-08-01
+ Contact: support@voucherify.io
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr
+from typing import Any, ClassVar, Dict, List, Optional
+from typing import Optional, Set
+from typing_extensions import Self
+
+class ManagementProjectsUpdateResponseBodyLimitsApiCallsItem(BaseModel):
+ """
+ Determines the limit of API calls per given unit time.
+ """ # noqa: E501
+ value: Optional[StrictInt] = Field(default=None, description="Determines the maximum number of API calls per time set in `\"duration\"`.")
+ duration: Optional[StrictStr] = Field(default=None, description="Determines the amount of time during which the calls up to the number specified in the `value` can be made. The duration is presented in the ISO 8601 format, e.g. `PT1H` means one hour.")
+ __properties: ClassVar[List[str]] = ["value", "duration"]
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of ManagementProjectsUpdateResponseBodyLimitsApiCallsItem from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([
+ ])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of ManagementProjectsUpdateResponseBodyLimitsApiCallsItem from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "value": obj.get("value"),
+ "duration": obj.get("duration")
+ })
+ return _obj
+
+
diff --git a/voucherify/models/management_projects_update_response_body_limits_bulk_api_calls_item.py b/voucherify/models/management_projects_update_response_body_limits_bulk_api_calls_item.py
new file mode 100644
index 00000000..5c79a1df
--- /dev/null
+++ b/voucherify/models/management_projects_update_response_body_limits_bulk_api_calls_item.py
@@ -0,0 +1,90 @@
+# coding: utf-8
+
+"""
+ Voucherify API
+
+ Voucherify promotion engine REST API. Please see https://docs.voucherify.io/docs for more details.
+
+ The version of the OpenAPI document: v2018-08-01
+ Contact: support@voucherify.io
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr
+from typing import Any, ClassVar, Dict, List, Optional
+from typing import Optional, Set
+from typing_extensions import Self
+
+class ManagementProjectsUpdateResponseBodyLimitsBulkApiCallsItem(BaseModel):
+ """
+
+ """ # noqa: E501
+ value: Optional[StrictInt] = Field(default=None, description="Determines the maximum number of API calls per time set in `\"duration\"`.")
+ duration: Optional[StrictStr] = Field(default=None, description="Determines the amount of time during which the calls up to the number specified in the `value` can be made. The duration is presented in the ISO 8601 format, e.g. `PT1H` means one hour.")
+ __properties: ClassVar[List[str]] = ["value", "duration"]
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of ManagementProjectsUpdateResponseBodyLimitsBulkApiCallsItem from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([
+ ])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of ManagementProjectsUpdateResponseBodyLimitsBulkApiCallsItem from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "value": obj.get("value"),
+ "duration": obj.get("duration")
+ })
+ return _obj
+
+
diff --git a/voucherify/models/management_projects_update_response_body_webhooks_callout_notifications.py b/voucherify/models/management_projects_update_response_body_webhooks_callout_notifications.py
new file mode 100644
index 00000000..f1125694
--- /dev/null
+++ b/voucherify/models/management_projects_update_response_body_webhooks_callout_notifications.py
@@ -0,0 +1,108 @@
+# coding: utf-8
+
+"""
+ Voucherify API
+
+ Voucherify promotion engine REST API. Please see https://docs.voucherify.io/docs for more details.
+
+ The version of the OpenAPI document: v2018-08-01
+ Contact: support@voucherify.io
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict
+from typing import Any, ClassVar, Dict, List, Optional
+from voucherify.models.management_projects_update_response_body_webhooks_callout_notifications_distributions import ManagementProjectsUpdateResponseBodyWebhooksCalloutNotificationsDistributions
+from voucherify.models.management_projects_update_response_body_webhooks_callout_notifications_webhooks import ManagementProjectsUpdateResponseBodyWebhooksCalloutNotificationsWebhooks
+from typing import Optional, Set
+from typing_extensions import Self
+
+class ManagementProjectsUpdateResponseBodyWebhooksCalloutNotifications(BaseModel):
+ """
+ Determines the notification settings for webhook callouts configured in Distributions and Project settings.
+ """ # noqa: E501
+ distributions: Optional[ManagementProjectsUpdateResponseBodyWebhooksCalloutNotificationsDistributions] = None
+ webhooks: Optional[ManagementProjectsUpdateResponseBodyWebhooksCalloutNotificationsWebhooks] = None
+ __properties: ClassVar[List[str]] = ["distributions", "webhooks"]
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of ManagementProjectsUpdateResponseBodyWebhooksCalloutNotifications from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([
+ ])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ # override the default output from pydantic by calling `to_dict()` of distributions
+ if self.distributions:
+ _dict['distributions'] = self.distributions.to_dict()
+ # override the default output from pydantic by calling `to_dict()` of webhooks
+ if self.webhooks:
+ _dict['webhooks'] = self.webhooks.to_dict()
+ # set to None if distributions (nullable) is None
+ # and model_fields_set contains the field
+ if self.distributions is None and "distributions" in self.model_fields_set:
+ _dict['distributions'] = None
+
+ # set to None if webhooks (nullable) is None
+ # and model_fields_set contains the field
+ if self.webhooks is None and "webhooks" in self.model_fields_set:
+ _dict['webhooks'] = None
+
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of ManagementProjectsUpdateResponseBodyWebhooksCalloutNotifications from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "distributions": ManagementProjectsUpdateResponseBodyWebhooksCalloutNotificationsDistributions.from_dict(obj["distributions"]) if obj.get("distributions") is not None else None,
+ "webhooks": ManagementProjectsUpdateResponseBodyWebhooksCalloutNotificationsWebhooks.from_dict(obj["webhooks"]) if obj.get("webhooks") is not None else None
+ })
+ return _obj
+
+
diff --git a/voucherify/models/management_projects_update_response_body_webhooks_callout_notifications_distributions.py b/voucherify/models/management_projects_update_response_body_webhooks_callout_notifications_distributions.py
new file mode 100644
index 00000000..ad58de4b
--- /dev/null
+++ b/voucherify/models/management_projects_update_response_body_webhooks_callout_notifications_distributions.py
@@ -0,0 +1,107 @@
+# coding: utf-8
+
+"""
+ Voucherify API
+
+ Voucherify promotion engine REST API. Please see https://docs.voucherify.io/docs for more details.
+
+ The version of the OpenAPI document: v2018-08-01
+ Contact: support@voucherify.io
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr
+from typing import Any, ClassVar, Dict, List, Optional
+from typing import Optional, Set
+from typing_extensions import Self
+
+class ManagementProjectsUpdateResponseBodyWebhooksCalloutNotificationsDistributions(BaseModel):
+ """
+ Determines the notification settings for webhooks sent through Distributions.
+ """ # noqa: E501
+ email: Optional[StrictBool] = Field(default=None, description="Enables the notification through an email.")
+ in_app: Optional[StrictBool] = Field(default=None, description="Enables the notification through an email.")
+ emails: Optional[List[StrictStr]] = Field(default=None, description="An array of email addresses which will receive the notification.")
+ __properties: ClassVar[List[str]] = ["email", "in_app", "emails"]
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of ManagementProjectsUpdateResponseBodyWebhooksCalloutNotificationsDistributions from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([
+ ])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ # set to None if email (nullable) is None
+ # and model_fields_set contains the field
+ if self.email is None and "email" in self.model_fields_set:
+ _dict['email'] = None
+
+ # set to None if in_app (nullable) is None
+ # and model_fields_set contains the field
+ if self.in_app is None and "in_app" in self.model_fields_set:
+ _dict['in_app'] = None
+
+ # set to None if emails (nullable) is None
+ # and model_fields_set contains the field
+ if self.emails is None and "emails" in self.model_fields_set:
+ _dict['emails'] = None
+
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of ManagementProjectsUpdateResponseBodyWebhooksCalloutNotificationsDistributions from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "email": obj.get("email"),
+ "in_app": obj.get("in_app"),
+ "emails": obj.get("emails")
+ })
+ return _obj
+
+
diff --git a/voucherify/models/management_projects_update_response_body_webhooks_callout_notifications_webhooks.py b/voucherify/models/management_projects_update_response_body_webhooks_callout_notifications_webhooks.py
new file mode 100644
index 00000000..10580f94
--- /dev/null
+++ b/voucherify/models/management_projects_update_response_body_webhooks_callout_notifications_webhooks.py
@@ -0,0 +1,107 @@
+# coding: utf-8
+
+"""
+ Voucherify API
+
+ Voucherify promotion engine REST API. Please see https://docs.voucherify.io/docs for more details.
+
+ The version of the OpenAPI document: v2018-08-01
+ Contact: support@voucherify.io
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr
+from typing import Any, ClassVar, Dict, List, Optional
+from typing import Optional, Set
+from typing_extensions import Self
+
+class ManagementProjectsUpdateResponseBodyWebhooksCalloutNotificationsWebhooks(BaseModel):
+ """
+ Determines the notification settings for webhooks sent as set out in the Project settings.
+ """ # noqa: E501
+ email: Optional[StrictBool] = Field(default=None, description="Enables the notification through an email.")
+ in_app: Optional[StrictBool] = Field(default=None, description="Enables the notification through an email.")
+ emails: Optional[List[StrictStr]] = Field(default=None, description="An array of email addresses which will receive the notification.")
+ __properties: ClassVar[List[str]] = ["email", "in_app", "emails"]
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of ManagementProjectsUpdateResponseBodyWebhooksCalloutNotificationsWebhooks from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([
+ ])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ # set to None if email (nullable) is None
+ # and model_fields_set contains the field
+ if self.email is None and "email" in self.model_fields_set:
+ _dict['email'] = None
+
+ # set to None if in_app (nullable) is None
+ # and model_fields_set contains the field
+ if self.in_app is None and "in_app" in self.model_fields_set:
+ _dict['in_app'] = None
+
+ # set to None if emails (nullable) is None
+ # and model_fields_set contains the field
+ if self.emails is None and "emails" in self.model_fields_set:
+ _dict['emails'] = None
+
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of ManagementProjectsUpdateResponseBodyWebhooksCalloutNotificationsWebhooks from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "email": obj.get("email"),
+ "in_app": obj.get("in_app"),
+ "emails": obj.get("emails")
+ })
+ return _obj
+
+
diff --git a/voucherify/models/management_projects_users_assign_request_body.py b/voucherify/models/management_projects_users_assign_request_body.py
new file mode 100644
index 00000000..5890306b
--- /dev/null
+++ b/voucherify/models/management_projects_users_assign_request_body.py
@@ -0,0 +1,107 @@
+# coding: utf-8
+
+"""
+ Voucherify API
+
+ Voucherify promotion engine REST API. Please see https://docs.voucherify.io/docs for more details.
+
+ The version of the OpenAPI document: v2018-08-01
+ Contact: support@voucherify.io
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict, Field, StrictStr
+from typing import Any, ClassVar, Dict, List, Optional
+from typing import Optional, Set
+from typing_extensions import Self
+
+class ManagementProjectsUsersAssignRequestBody(BaseModel):
+ """
+ ManagementProjectsUsersAssignRequestBody
+ """ # noqa: E501
+ id: Optional[StrictStr] = Field(default=None, description="The unique identifier of the user who will be assigned to the project. It can be found in Team Settings > Team > Edit member. **Required** with the `role` string. Do **not** use with the `login` string.")
+ login: Optional[StrictStr] = Field(default=None, description="The login data of the user who will be assigned to the project. **Required** with the `role` string. Do **not** use with the `id` string.")
+ role: Optional[StrictStr] = Field(default=None, description="The role of the user to be added. It can be one of the following predefined roles: `ADMIN`, `USER`, `VIEWER`, `MERCHANT`, or an ID of a custom role.")
+ __properties: ClassVar[List[str]] = ["id", "login", "role"]
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of ManagementProjectsUsersAssignRequestBody from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([
+ ])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ # set to None if id (nullable) is None
+ # and model_fields_set contains the field
+ if self.id is None and "id" in self.model_fields_set:
+ _dict['id'] = None
+
+ # set to None if login (nullable) is None
+ # and model_fields_set contains the field
+ if self.login is None and "login" in self.model_fields_set:
+ _dict['login'] = None
+
+ # set to None if role (nullable) is None
+ # and model_fields_set contains the field
+ if self.role is None and "role" in self.model_fields_set:
+ _dict['role'] = None
+
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of ManagementProjectsUsersAssignRequestBody from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "id": obj.get("id"),
+ "login": obj.get("login"),
+ "role": obj.get("role")
+ })
+ return _obj
+
+
diff --git a/voucherify/models/management_projects_users_assign_response_body.py b/voucherify/models/management_projects_users_assign_response_body.py
new file mode 100644
index 00000000..098eadf4
--- /dev/null
+++ b/voucherify/models/management_projects_users_assign_response_body.py
@@ -0,0 +1,135 @@
+# coding: utf-8
+
+"""
+ Voucherify API
+
+ Voucherify promotion engine REST API. Please see https://docs.voucherify.io/docs for more details.
+
+ The version of the OpenAPI document: v2018-08-01
+ Contact: support@voucherify.io
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr
+from typing import Any, ClassVar, Dict, List, Optional
+from typing import Optional, Set
+from typing_extensions import Self
+
+class ManagementProjectsUsersAssignResponseBody(BaseModel):
+ """
+ Details about the user assigned to the project.
+ """ # noqa: E501
+ id: Optional[StrictStr] = Field(default=None, description="The unique identifier of the user who has been assigned to the project.")
+ login: Optional[StrictStr] = Field(default=None, description="The login data of the user who has been assigned to the project.")
+ email: Optional[StrictStr] = Field(default=None, description="The email address of the user who has been assigned to the project.")
+ first_name: Optional[StrictStr] = Field(default=None, description="The first name of the user who has been assigned to the project.")
+ last_name: Optional[StrictStr] = Field(default=None, description="The last name of the user who has been assigned to the project.")
+ projects: Optional[Dict[str, Any]] = Field(default=None, description="Lists key-value pairs, where the key is the project to which the user is assigned. The value is the role assigned in a given project. The predefined Voucherify roles are: `ADMIN`, `USER`, `VIEWER`, `MERCHANT`, `USER_RESTRICTED` (for the Areas and Stores, an Enterprise feature).")
+ is_owner: Optional[StrictBool] = Field(default=None, description="Determines if the user is the owner for the organization in Voucherify.")
+ __properties: ClassVar[List[str]] = ["id", "login", "email", "first_name", "last_name", "projects", "is_owner"]
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of ManagementProjectsUsersAssignResponseBody from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([
+ ])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ # set to None if id (nullable) is None
+ # and model_fields_set contains the field
+ if self.id is None and "id" in self.model_fields_set:
+ _dict['id'] = None
+
+ # set to None if login (nullable) is None
+ # and model_fields_set contains the field
+ if self.login is None and "login" in self.model_fields_set:
+ _dict['login'] = None
+
+ # set to None if email (nullable) is None
+ # and model_fields_set contains the field
+ if self.email is None and "email" in self.model_fields_set:
+ _dict['email'] = None
+
+ # set to None if first_name (nullable) is None
+ # and model_fields_set contains the field
+ if self.first_name is None and "first_name" in self.model_fields_set:
+ _dict['first_name'] = None
+
+ # set to None if last_name (nullable) is None
+ # and model_fields_set contains the field
+ if self.last_name is None and "last_name" in self.model_fields_set:
+ _dict['last_name'] = None
+
+ # set to None if projects (nullable) is None
+ # and model_fields_set contains the field
+ if self.projects is None and "projects" in self.model_fields_set:
+ _dict['projects'] = None
+
+ # set to None if is_owner (nullable) is None
+ # and model_fields_set contains the field
+ if self.is_owner is None and "is_owner" in self.model_fields_set:
+ _dict['is_owner'] = None
+
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of ManagementProjectsUsersAssignResponseBody from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "id": obj.get("id"),
+ "login": obj.get("login"),
+ "email": obj.get("email"),
+ "first_name": obj.get("first_name"),
+ "last_name": obj.get("last_name"),
+ "projects": obj.get("projects"),
+ "is_owner": obj.get("is_owner")
+ })
+ return _obj
+
+
diff --git a/voucherify/models/management_projects_users_get_user_response_body.py b/voucherify/models/management_projects_users_get_user_response_body.py
new file mode 100644
index 00000000..57f4c5fe
--- /dev/null
+++ b/voucherify/models/management_projects_users_get_user_response_body.py
@@ -0,0 +1,135 @@
+# coding: utf-8
+
+"""
+ Voucherify API
+
+ Voucherify promotion engine REST API. Please see https://docs.voucherify.io/docs for more details.
+
+ The version of the OpenAPI document: v2018-08-01
+ Contact: support@voucherify.io
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr
+from typing import Any, ClassVar, Dict, List, Optional
+from typing import Optional, Set
+from typing_extensions import Self
+
+class ManagementProjectsUsersGetUserResponseBody(BaseModel):
+ """
+ Details about the user assigned to the project.
+ """ # noqa: E501
+ id: Optional[StrictStr] = Field(default=None, description="The unique identifier of the user who has been assigned to the project.")
+ login: Optional[StrictStr] = Field(default=None, description="The login data of the user who has been assigned to the project.")
+ email: Optional[StrictStr] = Field(default=None, description="The email address of the user who has been assigned to the project.")
+ first_name: Optional[StrictStr] = Field(default=None, description="The first name of the user who has been assigned to the project.")
+ last_name: Optional[StrictStr] = Field(default=None, description="The last name of the user who has been assigned to the project.")
+ projects: Optional[Dict[str, Any]] = Field(default=None, description="Lists key-value pairs, where the key is the project to which the user is assigned. The value is the role assigned in a given project. The predefined Voucherify roles are: `ADMIN`, `USER`, `VIEWER`, `MERCHANT`, `USER_RESTRICTED` (for the Areas and Stores, an Enterprise feature).")
+ is_owner: Optional[StrictBool] = Field(default=None, description="Determines if the user is the owner for the organization in Voucherify.")
+ __properties: ClassVar[List[str]] = ["id", "login", "email", "first_name", "last_name", "projects", "is_owner"]
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of ManagementProjectsUsersGetUserResponseBody from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([
+ ])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ # set to None if id (nullable) is None
+ # and model_fields_set contains the field
+ if self.id is None and "id" in self.model_fields_set:
+ _dict['id'] = None
+
+ # set to None if login (nullable) is None
+ # and model_fields_set contains the field
+ if self.login is None and "login" in self.model_fields_set:
+ _dict['login'] = None
+
+ # set to None if email (nullable) is None
+ # and model_fields_set contains the field
+ if self.email is None and "email" in self.model_fields_set:
+ _dict['email'] = None
+
+ # set to None if first_name (nullable) is None
+ # and model_fields_set contains the field
+ if self.first_name is None and "first_name" in self.model_fields_set:
+ _dict['first_name'] = None
+
+ # set to None if last_name (nullable) is None
+ # and model_fields_set contains the field
+ if self.last_name is None and "last_name" in self.model_fields_set:
+ _dict['last_name'] = None
+
+ # set to None if projects (nullable) is None
+ # and model_fields_set contains the field
+ if self.projects is None and "projects" in self.model_fields_set:
+ _dict['projects'] = None
+
+ # set to None if is_owner (nullable) is None
+ # and model_fields_set contains the field
+ if self.is_owner is None and "is_owner" in self.model_fields_set:
+ _dict['is_owner'] = None
+
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of ManagementProjectsUsersGetUserResponseBody from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "id": obj.get("id"),
+ "login": obj.get("login"),
+ "email": obj.get("email"),
+ "first_name": obj.get("first_name"),
+ "last_name": obj.get("last_name"),
+ "projects": obj.get("projects"),
+ "is_owner": obj.get("is_owner")
+ })
+ return _obj
+
+
diff --git a/voucherify/models/management_projects_users_invite_create_request_body.py b/voucherify/models/management_projects_users_invite_create_request_body.py
new file mode 100644
index 00000000..4b668043
--- /dev/null
+++ b/voucherify/models/management_projects_users_invite_create_request_body.py
@@ -0,0 +1,114 @@
+# coding: utf-8
+
+"""
+ Voucherify API
+
+ Voucherify promotion engine REST API. Please see https://docs.voucherify.io/docs for more details.
+
+ The version of the OpenAPI document: v2018-08-01
+ Contact: support@voucherify.io
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict, Field, StrictStr
+from typing import Any, ClassVar, Dict, List, Optional
+from typing import Optional, Set
+from typing_extensions import Self
+
+class ManagementProjectsUsersInviteCreateRequestBody(BaseModel):
+ """
+ Request body schema for **POST** `/management/v1/projects/users/invite`.
+ """ # noqa: E501
+ email: Optional[StrictStr] = Field(default=None, description="Email address to which the invitation will be sent. Must be a valid email address.")
+ first_name: Optional[StrictStr] = Field(default=None, description="First name of the person who will receive the invitation. The name will be used in the user profile.")
+ last_name: Optional[StrictStr] = Field(default=None, description="Last name of the person who will receive the invitation. The name will be used in the user profile.")
+ projects: Optional[Dict[str, Any]] = Field(default=None, description="In the key, provide the project ID to which the new user will be assigned. In the value, provide the role which the user will have in the project. The predefined Voucherify roles are: `ADMIN`, `USER`, `VIEWER`, `MERCHANT`, `USER_RESTRICTED` (for the Areas and Stores, an Enterprise feature). Send a custom role ID (Enterprise feature) to assign a custom role.")
+ __properties: ClassVar[List[str]] = ["email", "first_name", "last_name", "projects"]
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of ManagementProjectsUsersInviteCreateRequestBody from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([
+ ])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ # set to None if email (nullable) is None
+ # and model_fields_set contains the field
+ if self.email is None and "email" in self.model_fields_set:
+ _dict['email'] = None
+
+ # set to None if first_name (nullable) is None
+ # and model_fields_set contains the field
+ if self.first_name is None and "first_name" in self.model_fields_set:
+ _dict['first_name'] = None
+
+ # set to None if last_name (nullable) is None
+ # and model_fields_set contains the field
+ if self.last_name is None and "last_name" in self.model_fields_set:
+ _dict['last_name'] = None
+
+ # set to None if projects (nullable) is None
+ # and model_fields_set contains the field
+ if self.projects is None and "projects" in self.model_fields_set:
+ _dict['projects'] = None
+
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of ManagementProjectsUsersInviteCreateRequestBody from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "email": obj.get("email"),
+ "first_name": obj.get("first_name"),
+ "last_name": obj.get("last_name"),
+ "projects": obj.get("projects")
+ })
+ return _obj
+
+
diff --git a/voucherify/models/management_projects_users_list_response_body.py b/voucherify/models/management_projects_users_list_response_body.py
new file mode 100644
index 00000000..f232ea87
--- /dev/null
+++ b/voucherify/models/management_projects_users_list_response_body.py
@@ -0,0 +1,142 @@
+# coding: utf-8
+
+"""
+ Voucherify API
+
+ Voucherify promotion engine REST API. Please see https://docs.voucherify.io/docs for more details.
+
+ The version of the OpenAPI document: v2018-08-01
+ Contact: support@voucherify.io
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr, field_validator
+from typing import Any, ClassVar, Dict, List, Optional
+from voucherify.models.user import User
+from typing import Optional, Set
+from typing_extensions import Self
+
+class ManagementProjectsUsersListResponseBody(BaseModel):
+ """
+ Object containing a list of users assigned to the project.
+ """ # noqa: E501
+ object: Optional[StrictStr] = Field(default='list', description="The type of the object represented by JSON. This object stores information about the users in a dictionary.")
+ data_ref: Optional[StrictStr] = Field(default='data', description="Identifies the name of the attribute that contains the array of user objects.")
+ data: Optional[List[User]] = Field(default=None, description="Array of user objects.")
+ total: Optional[StrictInt] = Field(default=None, description="The total number of users.")
+ __properties: ClassVar[List[str]] = ["object", "data_ref", "data", "total"]
+
+ @field_validator('object')
+ def object_validate_enum(cls, value):
+ """Validates the enum"""
+ if value is None:
+ return value
+
+ if value not in set(['list']):
+ raise ValueError("must be one of enum values ('list')")
+ return value
+
+ @field_validator('data_ref')
+ def data_ref_validate_enum(cls, value):
+ """Validates the enum"""
+ if value is None:
+ return value
+
+ if value not in set(['data']):
+ raise ValueError("must be one of enum values ('data')")
+ return value
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of ManagementProjectsUsersListResponseBody from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([
+ ])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ # override the default output from pydantic by calling `to_dict()` of each item in data (list)
+ _items = []
+ if self.data:
+ for _item_data in self.data:
+ if _item_data:
+ _items.append(_item_data.to_dict())
+ _dict['data'] = _items
+ # set to None if object (nullable) is None
+ # and model_fields_set contains the field
+ if self.object is None and "object" in self.model_fields_set:
+ _dict['object'] = None
+
+ # set to None if data_ref (nullable) is None
+ # and model_fields_set contains the field
+ if self.data_ref is None and "data_ref" in self.model_fields_set:
+ _dict['data_ref'] = None
+
+ # set to None if data (nullable) is None
+ # and model_fields_set contains the field
+ if self.data is None and "data" in self.model_fields_set:
+ _dict['data'] = None
+
+ # set to None if total (nullable) is None
+ # and model_fields_set contains the field
+ if self.total is None and "total" in self.model_fields_set:
+ _dict['total'] = None
+
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of ManagementProjectsUsersListResponseBody from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "object": obj.get("object") if obj.get("object") is not None else 'list',
+ "data_ref": obj.get("data_ref") if obj.get("data_ref") is not None else 'data',
+ "data": [User.from_dict(_item) for _item in obj["data"]] if obj.get("data") is not None else None,
+ "total": obj.get("total")
+ })
+ return _obj
+
+
diff --git a/voucherify/models/management_projects_users_update_role_request_body.py b/voucherify/models/management_projects_users_update_role_request_body.py
new file mode 100644
index 00000000..d40750bd
--- /dev/null
+++ b/voucherify/models/management_projects_users_update_role_request_body.py
@@ -0,0 +1,93 @@
+# coding: utf-8
+
+"""
+ Voucherify API
+
+ Voucherify promotion engine REST API. Please see https://docs.voucherify.io/docs for more details.
+
+ The version of the OpenAPI document: v2018-08-01
+ Contact: support@voucherify.io
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict, Field, StrictStr
+from typing import Any, ClassVar, Dict, List, Optional
+from typing import Optional, Set
+from typing_extensions import Self
+
+class ManagementProjectsUsersUpdateRoleRequestBody(BaseModel):
+ """
+ ManagementProjectsUsersUpdateRoleRequestBody
+ """ # noqa: E501
+ role: Optional[StrictStr] = Field(default=None, description="The role of the user to be added. It can be a custom role or one of following predefined roles: `ADMIN`, `USER`, `VIEWER`, `MERCHANT` or an ID of a custom role..")
+ __properties: ClassVar[List[str]] = ["role"]
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of ManagementProjectsUsersUpdateRoleRequestBody from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([
+ ])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ # set to None if role (nullable) is None
+ # and model_fields_set contains the field
+ if self.role is None and "role" in self.model_fields_set:
+ _dict['role'] = None
+
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of ManagementProjectsUsersUpdateRoleRequestBody from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "role": obj.get("role")
+ })
+ return _obj
+
+
diff --git a/voucherify/models/management_projects_users_update_role_response_body.py b/voucherify/models/management_projects_users_update_role_response_body.py
new file mode 100644
index 00000000..b157b137
--- /dev/null
+++ b/voucherify/models/management_projects_users_update_role_response_body.py
@@ -0,0 +1,135 @@
+# coding: utf-8
+
+"""
+ Voucherify API
+
+ Voucherify promotion engine REST API. Please see https://docs.voucherify.io/docs for more details.
+
+ The version of the OpenAPI document: v2018-08-01
+ Contact: support@voucherify.io
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr
+from typing import Any, ClassVar, Dict, List, Optional
+from typing import Optional, Set
+from typing_extensions import Self
+
+class ManagementProjectsUsersUpdateRoleResponseBody(BaseModel):
+ """
+ Details about the user assigned to the project.
+ """ # noqa: E501
+ id: Optional[StrictStr] = Field(default=None, description="The unique identifier of the user who has been assigned to the project.")
+ login: Optional[StrictStr] = Field(default=None, description="The login data of the user who has been assigned to the project.")
+ email: Optional[StrictStr] = Field(default=None, description="The email address of the user who has been assigned to the project.")
+ first_name: Optional[StrictStr] = Field(default=None, description="The first name of the user who has been assigned to the project.")
+ last_name: Optional[StrictStr] = Field(default=None, description="The last name of the user who has been assigned to the project.")
+ projects: Optional[Dict[str, Any]] = Field(default=None, description="Lists key-value pairs, where the key is the project to which the user is assigned. The value is the role assigned in a given project. The predefined Voucherify roles are: `ADMIN`, `USER`, `VIEWER`, `MERCHANT`, `USER_RESTRICTED` (for the Areas and Stores, an Enterprise feature).")
+ is_owner: Optional[StrictBool] = Field(default=None, description="Determines if the user is the owner for the organization in Voucherify.")
+ __properties: ClassVar[List[str]] = ["id", "login", "email", "first_name", "last_name", "projects", "is_owner"]
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of ManagementProjectsUsersUpdateRoleResponseBody from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([
+ ])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ # set to None if id (nullable) is None
+ # and model_fields_set contains the field
+ if self.id is None and "id" in self.model_fields_set:
+ _dict['id'] = None
+
+ # set to None if login (nullable) is None
+ # and model_fields_set contains the field
+ if self.login is None and "login" in self.model_fields_set:
+ _dict['login'] = None
+
+ # set to None if email (nullable) is None
+ # and model_fields_set contains the field
+ if self.email is None and "email" in self.model_fields_set:
+ _dict['email'] = None
+
+ # set to None if first_name (nullable) is None
+ # and model_fields_set contains the field
+ if self.first_name is None and "first_name" in self.model_fields_set:
+ _dict['first_name'] = None
+
+ # set to None if last_name (nullable) is None
+ # and model_fields_set contains the field
+ if self.last_name is None and "last_name" in self.model_fields_set:
+ _dict['last_name'] = None
+
+ # set to None if projects (nullable) is None
+ # and model_fields_set contains the field
+ if self.projects is None and "projects" in self.model_fields_set:
+ _dict['projects'] = None
+
+ # set to None if is_owner (nullable) is None
+ # and model_fields_set contains the field
+ if self.is_owner is None and "is_owner" in self.model_fields_set:
+ _dict['is_owner'] = None
+
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of ManagementProjectsUsersUpdateRoleResponseBody from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "id": obj.get("id"),
+ "login": obj.get("login"),
+ "email": obj.get("email"),
+ "first_name": obj.get("first_name"),
+ "last_name": obj.get("last_name"),
+ "projects": obj.get("projects"),
+ "is_owner": obj.get("is_owner")
+ })
+ return _obj
+
+
diff --git a/voucherify/models/management_projects_webhook.py b/voucherify/models/management_projects_webhook.py
new file mode 100644
index 00000000..834e8e3d
--- /dev/null
+++ b/voucherify/models/management_projects_webhook.py
@@ -0,0 +1,150 @@
+# coding: utf-8
+
+"""
+ Voucherify API
+
+ Voucherify promotion engine REST API. Please see https://docs.voucherify.io/docs for more details.
+
+ The version of the OpenAPI document: v2018-08-01
+ Contact: support@voucherify.io
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from datetime import datetime
+from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr, field_validator
+from typing import Any, ClassVar, Dict, List, Optional
+from typing import Optional, Set
+from typing_extensions import Self
+
+class ManagementProjectsWebhook(BaseModel):
+ """
+ Response body schema for webhook endpoints.
+ """ # noqa: E501
+ id: Optional[StrictStr] = Field(default=None, description="Unique identifier of the webhook.")
+ object: Optional[StrictStr] = Field(default='webhook', description="The type of the object represented by JSON.")
+ created_at: Optional[datetime] = Field(default=None, description="Timestamp representing the date and time when the webhook configuration was created. The value for this parameter is shown in the ISO 8601 format.")
+ target_url: Optional[StrictStr] = Field(default=None, description="URL address that receives webhooks.")
+ events: Optional[List[StrictStr]] = Field(default=None, description="Lists the events that trigger webhook sendout.")
+ active: Optional[StrictBool] = Field(default=True, description="Determines if the webhook configuration is active.")
+ __properties: ClassVar[List[str]] = ["id", "object", "created_at", "target_url", "events", "active"]
+
+ @field_validator('object')
+ def object_validate_enum(cls, value):
+ """Validates the enum"""
+ if value is None:
+ return value
+
+ if value not in set(['webhook']):
+ raise ValueError("must be one of enum values ('webhook')")
+ return value
+
+ @field_validator('events')
+ def events_validate_enum(cls, value):
+ """Validates the enum"""
+ if value is None:
+ return value
+
+ for i in value:
+ if i not in set(['redemption.succeeded', 'redemption.failed', 'redemption.rollback.succeeded', 'redemption.rollback.failed', 'publication.succeeded', 'voucher.published', 'voucher.updated', 'voucher.deleted', 'voucher.created', 'voucher.enabled', 'voucher.disabled', 'voucher.loyalty_card.points_added', 'voucher.gift.balance_added', 'campaign.enabled', 'campaign.deleted', 'campaign.created', 'campaign.updated', 'campaign.disabled', 'campaign.vouchers.generation.completed', 'business_validation_rule.assignment.created', 'business_validation_rule.assignment.deleted', 'business_validation_rule.created', 'business_validation_rule.deleted', 'business_validation_rule.updated', 'customer.created', 'customer.deleted', 'customer.rewarded', 'customer.rewarded.loyalty_points']):
+ raise ValueError("each list item must be one of ('redemption.succeeded', 'redemption.failed', 'redemption.rollback.succeeded', 'redemption.rollback.failed', 'publication.succeeded', 'voucher.published', 'voucher.updated', 'voucher.deleted', 'voucher.created', 'voucher.enabled', 'voucher.disabled', 'voucher.loyalty_card.points_added', 'voucher.gift.balance_added', 'campaign.enabled', 'campaign.deleted', 'campaign.created', 'campaign.updated', 'campaign.disabled', 'campaign.vouchers.generation.completed', 'business_validation_rule.assignment.created', 'business_validation_rule.assignment.deleted', 'business_validation_rule.created', 'business_validation_rule.deleted', 'business_validation_rule.updated', 'customer.created', 'customer.deleted', 'customer.rewarded', 'customer.rewarded.loyalty_points')")
+ return value
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of ManagementProjectsWebhook from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([
+ ])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ # set to None if id (nullable) is None
+ # and model_fields_set contains the field
+ if self.id is None and "id" in self.model_fields_set:
+ _dict['id'] = None
+
+ # set to None if object (nullable) is None
+ # and model_fields_set contains the field
+ if self.object is None and "object" in self.model_fields_set:
+ _dict['object'] = None
+
+ # set to None if created_at (nullable) is None
+ # and model_fields_set contains the field
+ if self.created_at is None and "created_at" in self.model_fields_set:
+ _dict['created_at'] = None
+
+ # set to None if target_url (nullable) is None
+ # and model_fields_set contains the field
+ if self.target_url is None and "target_url" in self.model_fields_set:
+ _dict['target_url'] = None
+
+ # set to None if events (nullable) is None
+ # and model_fields_set contains the field
+ if self.events is None and "events" in self.model_fields_set:
+ _dict['events'] = None
+
+ # set to None if active (nullable) is None
+ # and model_fields_set contains the field
+ if self.active is None and "active" in self.model_fields_set:
+ _dict['active'] = None
+
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of ManagementProjectsWebhook from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "id": obj.get("id"),
+ "object": obj.get("object") if obj.get("object") is not None else 'webhook',
+ "created_at": obj.get("created_at"),
+ "target_url": obj.get("target_url"),
+ "events": obj.get("events"),
+ "active": obj.get("active") if obj.get("active") is not None else True
+ })
+ return _obj
+
+
diff --git a/voucherify/models/management_projects_webhooks_create_request_body.py b/voucherify/models/management_projects_webhooks_create_request_body.py
new file mode 100644
index 00000000..31ed9876
--- /dev/null
+++ b/voucherify/models/management_projects_webhooks_create_request_body.py
@@ -0,0 +1,118 @@
+# coding: utf-8
+
+"""
+ Voucherify API
+
+ Voucherify promotion engine REST API. Please see https://docs.voucherify.io/docs for more details.
+
+ The version of the OpenAPI document: v2018-08-01
+ Contact: support@voucherify.io
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr, field_validator
+from typing import Any, ClassVar, Dict, List, Optional
+from typing import Optional, Set
+from typing_extensions import Self
+
+class ManagementProjectsWebhooksCreateRequestBody(BaseModel):
+ """
+ Request body schema for **POST** `/management/v1/projects/{projectId}/webhooks/{webhookId}`.
+ """ # noqa: E501
+ target_url: Optional[StrictStr] = Field(default=None, description="URL address that receives webhooks.")
+ events: Optional[List[StrictStr]] = Field(default=None, description="Lists the events that trigger webhook sendout.")
+ active: Optional[StrictBool] = Field(default=True, description="Determines if the webhook configuration is active.")
+ __properties: ClassVar[List[str]] = ["target_url", "events", "active"]
+
+ @field_validator('events')
+ def events_validate_enum(cls, value):
+ """Validates the enum"""
+ if value is None:
+ return value
+
+ for i in value:
+ if i not in set(['redemption.succeeded', 'redemption.failed', 'redemption.rollback.succeeded', 'redemption.rollback.failed', 'publication.succeeded', 'voucher.published', 'voucher.updated', 'voucher.deleted', 'voucher.created', 'voucher.enabled', 'voucher.disabled', 'voucher.loyalty_card.points_added', 'voucher.gift.balance_added', 'campaign.enabled', 'campaign.deleted', 'campaign.created', 'campaign.updated', 'campaign.disabled', 'campaign.vouchers.generation.completed', 'business_validation_rule.assignment.created', 'business_validation_rule.assignment.deleted', 'business_validation_rule.created', 'business_validation_rule.deleted', 'business_validation_rule.updated', 'customer.created', 'customer.deleted', 'customer.rewarded', 'customer.rewarded.loyalty_points']):
+ raise ValueError("each list item must be one of ('redemption.succeeded', 'redemption.failed', 'redemption.rollback.succeeded', 'redemption.rollback.failed', 'publication.succeeded', 'voucher.published', 'voucher.updated', 'voucher.deleted', 'voucher.created', 'voucher.enabled', 'voucher.disabled', 'voucher.loyalty_card.points_added', 'voucher.gift.balance_added', 'campaign.enabled', 'campaign.deleted', 'campaign.created', 'campaign.updated', 'campaign.disabled', 'campaign.vouchers.generation.completed', 'business_validation_rule.assignment.created', 'business_validation_rule.assignment.deleted', 'business_validation_rule.created', 'business_validation_rule.deleted', 'business_validation_rule.updated', 'customer.created', 'customer.deleted', 'customer.rewarded', 'customer.rewarded.loyalty_points')")
+ return value
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of ManagementProjectsWebhooksCreateRequestBody from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([
+ ])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ # set to None if target_url (nullable) is None
+ # and model_fields_set contains the field
+ if self.target_url is None and "target_url" in self.model_fields_set:
+ _dict['target_url'] = None
+
+ # set to None if events (nullable) is None
+ # and model_fields_set contains the field
+ if self.events is None and "events" in self.model_fields_set:
+ _dict['events'] = None
+
+ # set to None if active (nullable) is None
+ # and model_fields_set contains the field
+ if self.active is None and "active" in self.model_fields_set:
+ _dict['active'] = None
+
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of ManagementProjectsWebhooksCreateRequestBody from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "target_url": obj.get("target_url"),
+ "events": obj.get("events"),
+ "active": obj.get("active") if obj.get("active") is not None else True
+ })
+ return _obj
+
+
diff --git a/voucherify/models/management_projects_webhooks_create_response_body.py b/voucherify/models/management_projects_webhooks_create_response_body.py
new file mode 100644
index 00000000..7d426c25
--- /dev/null
+++ b/voucherify/models/management_projects_webhooks_create_response_body.py
@@ -0,0 +1,150 @@
+# coding: utf-8
+
+"""
+ Voucherify API
+
+ Voucherify promotion engine REST API. Please see https://docs.voucherify.io/docs for more details.
+
+ The version of the OpenAPI document: v2018-08-01
+ Contact: support@voucherify.io
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from datetime import datetime
+from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr, field_validator
+from typing import Any, ClassVar, Dict, List, Optional
+from typing import Optional, Set
+from typing_extensions import Self
+
+class ManagementProjectsWebhooksCreateResponseBody(BaseModel):
+ """
+ Response body schema for **POST** `/management/v1/projects/{projectId}/webhooks`.
+ """ # noqa: E501
+ id: Optional[StrictStr] = Field(default=None, description="Unique identifier of the webhook.")
+ object: Optional[StrictStr] = Field(default='webhook', description="The type of the object represented by JSON.")
+ created_at: Optional[datetime] = Field(default=None, description="Timestamp representing the date and time when the webhook configuration was created. The value for this parameter is shown in the ISO 8601 format.")
+ target_url: Optional[StrictStr] = Field(default=None, description="URL address that receives webhooks.")
+ events: Optional[List[StrictStr]] = Field(default=None, description="Lists the events that trigger webhook sendout.")
+ active: Optional[StrictBool] = Field(default=True, description="Determines if the webhook configuration is active.")
+ __properties: ClassVar[List[str]] = ["id", "object", "created_at", "target_url", "events", "active"]
+
+ @field_validator('object')
+ def object_validate_enum(cls, value):
+ """Validates the enum"""
+ if value is None:
+ return value
+
+ if value not in set(['webhook']):
+ raise ValueError("must be one of enum values ('webhook')")
+ return value
+
+ @field_validator('events')
+ def events_validate_enum(cls, value):
+ """Validates the enum"""
+ if value is None:
+ return value
+
+ for i in value:
+ if i not in set(['redemption.succeeded', 'redemption.failed', 'redemption.rollback.succeeded', 'redemption.rollback.failed', 'publication.succeeded', 'voucher.published', 'voucher.updated', 'voucher.deleted', 'voucher.created', 'voucher.enabled', 'voucher.disabled', 'voucher.loyalty_card.points_added', 'voucher.gift.balance_added', 'campaign.enabled', 'campaign.deleted', 'campaign.created', 'campaign.updated', 'campaign.disabled', 'campaign.vouchers.generation.completed', 'business_validation_rule.assignment.created', 'business_validation_rule.assignment.deleted', 'business_validation_rule.created', 'business_validation_rule.deleted', 'business_validation_rule.updated', 'customer.created', 'customer.deleted', 'customer.rewarded', 'customer.rewarded.loyalty_points']):
+ raise ValueError("each list item must be one of ('redemption.succeeded', 'redemption.failed', 'redemption.rollback.succeeded', 'redemption.rollback.failed', 'publication.succeeded', 'voucher.published', 'voucher.updated', 'voucher.deleted', 'voucher.created', 'voucher.enabled', 'voucher.disabled', 'voucher.loyalty_card.points_added', 'voucher.gift.balance_added', 'campaign.enabled', 'campaign.deleted', 'campaign.created', 'campaign.updated', 'campaign.disabled', 'campaign.vouchers.generation.completed', 'business_validation_rule.assignment.created', 'business_validation_rule.assignment.deleted', 'business_validation_rule.created', 'business_validation_rule.deleted', 'business_validation_rule.updated', 'customer.created', 'customer.deleted', 'customer.rewarded', 'customer.rewarded.loyalty_points')")
+ return value
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of ManagementProjectsWebhooksCreateResponseBody from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([
+ ])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ # set to None if id (nullable) is None
+ # and model_fields_set contains the field
+ if self.id is None and "id" in self.model_fields_set:
+ _dict['id'] = None
+
+ # set to None if object (nullable) is None
+ # and model_fields_set contains the field
+ if self.object is None and "object" in self.model_fields_set:
+ _dict['object'] = None
+
+ # set to None if created_at (nullable) is None
+ # and model_fields_set contains the field
+ if self.created_at is None and "created_at" in self.model_fields_set:
+ _dict['created_at'] = None
+
+ # set to None if target_url (nullable) is None
+ # and model_fields_set contains the field
+ if self.target_url is None and "target_url" in self.model_fields_set:
+ _dict['target_url'] = None
+
+ # set to None if events (nullable) is None
+ # and model_fields_set contains the field
+ if self.events is None and "events" in self.model_fields_set:
+ _dict['events'] = None
+
+ # set to None if active (nullable) is None
+ # and model_fields_set contains the field
+ if self.active is None and "active" in self.model_fields_set:
+ _dict['active'] = None
+
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of ManagementProjectsWebhooksCreateResponseBody from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "id": obj.get("id"),
+ "object": obj.get("object") if obj.get("object") is not None else 'webhook',
+ "created_at": obj.get("created_at"),
+ "target_url": obj.get("target_url"),
+ "events": obj.get("events"),
+ "active": obj.get("active") if obj.get("active") is not None else True
+ })
+ return _obj
+
+
diff --git a/voucherify/models/management_projects_webhooks_get_response_body.py b/voucherify/models/management_projects_webhooks_get_response_body.py
new file mode 100644
index 00000000..0ab3d928
--- /dev/null
+++ b/voucherify/models/management_projects_webhooks_get_response_body.py
@@ -0,0 +1,150 @@
+# coding: utf-8
+
+"""
+ Voucherify API
+
+ Voucherify promotion engine REST API. Please see https://docs.voucherify.io/docs for more details.
+
+ The version of the OpenAPI document: v2018-08-01
+ Contact: support@voucherify.io
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from datetime import datetime
+from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr, field_validator
+from typing import Any, ClassVar, Dict, List, Optional
+from typing import Optional, Set
+from typing_extensions import Self
+
+class ManagementProjectsWebhooksGetResponseBody(BaseModel):
+ """
+ Response body schema for **GET** `/management/v1/projects/{projectId}/webhooks/{webhookId}`.
+ """ # noqa: E501
+ id: Optional[StrictStr] = Field(default=None, description="Unique identifier of the webhook.")
+ object: Optional[StrictStr] = Field(default='webhook', description="The type of the object represented by JSON.")
+ created_at: Optional[datetime] = Field(default=None, description="Timestamp representing the date and time when the webhook configuration was created. The value for this parameter is shown in the ISO 8601 format.")
+ target_url: Optional[StrictStr] = Field(default=None, description="URL address that receives webhooks.")
+ events: Optional[List[StrictStr]] = Field(default=None, description="Lists the events that trigger webhook sendout.")
+ active: Optional[StrictBool] = Field(default=True, description="Determines if the webhook configuration is active.")
+ __properties: ClassVar[List[str]] = ["id", "object", "created_at", "target_url", "events", "active"]
+
+ @field_validator('object')
+ def object_validate_enum(cls, value):
+ """Validates the enum"""
+ if value is None:
+ return value
+
+ if value not in set(['webhook']):
+ raise ValueError("must be one of enum values ('webhook')")
+ return value
+
+ @field_validator('events')
+ def events_validate_enum(cls, value):
+ """Validates the enum"""
+ if value is None:
+ return value
+
+ for i in value:
+ if i not in set(['redemption.succeeded', 'redemption.failed', 'redemption.rollback.succeeded', 'redemption.rollback.failed', 'publication.succeeded', 'voucher.published', 'voucher.updated', 'voucher.deleted', 'voucher.created', 'voucher.enabled', 'voucher.disabled', 'voucher.loyalty_card.points_added', 'voucher.gift.balance_added', 'campaign.enabled', 'campaign.deleted', 'campaign.created', 'campaign.updated', 'campaign.disabled', 'campaign.vouchers.generation.completed', 'business_validation_rule.assignment.created', 'business_validation_rule.assignment.deleted', 'business_validation_rule.created', 'business_validation_rule.deleted', 'business_validation_rule.updated', 'customer.created', 'customer.deleted', 'customer.rewarded', 'customer.rewarded.loyalty_points']):
+ raise ValueError("each list item must be one of ('redemption.succeeded', 'redemption.failed', 'redemption.rollback.succeeded', 'redemption.rollback.failed', 'publication.succeeded', 'voucher.published', 'voucher.updated', 'voucher.deleted', 'voucher.created', 'voucher.enabled', 'voucher.disabled', 'voucher.loyalty_card.points_added', 'voucher.gift.balance_added', 'campaign.enabled', 'campaign.deleted', 'campaign.created', 'campaign.updated', 'campaign.disabled', 'campaign.vouchers.generation.completed', 'business_validation_rule.assignment.created', 'business_validation_rule.assignment.deleted', 'business_validation_rule.created', 'business_validation_rule.deleted', 'business_validation_rule.updated', 'customer.created', 'customer.deleted', 'customer.rewarded', 'customer.rewarded.loyalty_points')")
+ return value
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of ManagementProjectsWebhooksGetResponseBody from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([
+ ])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ # set to None if id (nullable) is None
+ # and model_fields_set contains the field
+ if self.id is None and "id" in self.model_fields_set:
+ _dict['id'] = None
+
+ # set to None if object (nullable) is None
+ # and model_fields_set contains the field
+ if self.object is None and "object" in self.model_fields_set:
+ _dict['object'] = None
+
+ # set to None if created_at (nullable) is None
+ # and model_fields_set contains the field
+ if self.created_at is None and "created_at" in self.model_fields_set:
+ _dict['created_at'] = None
+
+ # set to None if target_url (nullable) is None
+ # and model_fields_set contains the field
+ if self.target_url is None and "target_url" in self.model_fields_set:
+ _dict['target_url'] = None
+
+ # set to None if events (nullable) is None
+ # and model_fields_set contains the field
+ if self.events is None and "events" in self.model_fields_set:
+ _dict['events'] = None
+
+ # set to None if active (nullable) is None
+ # and model_fields_set contains the field
+ if self.active is None and "active" in self.model_fields_set:
+ _dict['active'] = None
+
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of ManagementProjectsWebhooksGetResponseBody from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "id": obj.get("id"),
+ "object": obj.get("object") if obj.get("object") is not None else 'webhook',
+ "created_at": obj.get("created_at"),
+ "target_url": obj.get("target_url"),
+ "events": obj.get("events"),
+ "active": obj.get("active") if obj.get("active") is not None else True
+ })
+ return _obj
+
+
diff --git a/voucherify/models/management_projects_webhooks_list_response_body.py b/voucherify/models/management_projects_webhooks_list_response_body.py
new file mode 100644
index 00000000..fb30bc26
--- /dev/null
+++ b/voucherify/models/management_projects_webhooks_list_response_body.py
@@ -0,0 +1,142 @@
+# coding: utf-8
+
+"""
+ Voucherify API
+
+ Voucherify promotion engine REST API. Please see https://docs.voucherify.io/docs for more details.
+
+ The version of the OpenAPI document: v2018-08-01
+ Contact: support@voucherify.io
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr, field_validator
+from typing import Any, ClassVar, Dict, List, Optional
+from voucherify.models.management_projects_webhook import ManagementProjectsWebhook
+from typing import Optional, Set
+from typing_extensions import Self
+
+class ManagementProjectsWebhooksListResponseBody(BaseModel):
+ """
+ Object containing a list of webhook configurations.
+ """ # noqa: E501
+ object: Optional[StrictStr] = Field(default='list', description="The type of the object represented by JSON. This object stores information about the webhook configurations in a dictionary.")
+ data_ref: Optional[StrictStr] = Field(default='data', description="Identifies the name of the attribute that contains the array of webhook objects.")
+ data: Optional[List[ManagementProjectsWebhook]] = Field(default=None, description="Array of webhook objects.")
+ total: Optional[StrictInt] = Field(default=None, description="The total number of webhook objects.")
+ __properties: ClassVar[List[str]] = ["object", "data_ref", "data", "total"]
+
+ @field_validator('object')
+ def object_validate_enum(cls, value):
+ """Validates the enum"""
+ if value is None:
+ return value
+
+ if value not in set(['list']):
+ raise ValueError("must be one of enum values ('list')")
+ return value
+
+ @field_validator('data_ref')
+ def data_ref_validate_enum(cls, value):
+ """Validates the enum"""
+ if value is None:
+ return value
+
+ if value not in set(['data']):
+ raise ValueError("must be one of enum values ('data')")
+ return value
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of ManagementProjectsWebhooksListResponseBody from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([
+ ])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ # override the default output from pydantic by calling `to_dict()` of each item in data (list)
+ _items = []
+ if self.data:
+ for _item_data in self.data:
+ if _item_data:
+ _items.append(_item_data.to_dict())
+ _dict['data'] = _items
+ # set to None if object (nullable) is None
+ # and model_fields_set contains the field
+ if self.object is None and "object" in self.model_fields_set:
+ _dict['object'] = None
+
+ # set to None if data_ref (nullable) is None
+ # and model_fields_set contains the field
+ if self.data_ref is None and "data_ref" in self.model_fields_set:
+ _dict['data_ref'] = None
+
+ # set to None if data (nullable) is None
+ # and model_fields_set contains the field
+ if self.data is None and "data" in self.model_fields_set:
+ _dict['data'] = None
+
+ # set to None if total (nullable) is None
+ # and model_fields_set contains the field
+ if self.total is None and "total" in self.model_fields_set:
+ _dict['total'] = None
+
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of ManagementProjectsWebhooksListResponseBody from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "object": obj.get("object") if obj.get("object") is not None else 'list',
+ "data_ref": obj.get("data_ref") if obj.get("data_ref") is not None else 'data',
+ "data": [ManagementProjectsWebhook.from_dict(_item) for _item in obj["data"]] if obj.get("data") is not None else None,
+ "total": obj.get("total")
+ })
+ return _obj
+
+
diff --git a/voucherify/models/management_projects_webhooks_update_request_body.py b/voucherify/models/management_projects_webhooks_update_request_body.py
new file mode 100644
index 00000000..37b302c6
--- /dev/null
+++ b/voucherify/models/management_projects_webhooks_update_request_body.py
@@ -0,0 +1,118 @@
+# coding: utf-8
+
+"""
+ Voucherify API
+
+ Voucherify promotion engine REST API. Please see https://docs.voucherify.io/docs for more details.
+
+ The version of the OpenAPI document: v2018-08-01
+ Contact: support@voucherify.io
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr, field_validator
+from typing import Any, ClassVar, Dict, List, Optional
+from typing import Optional, Set
+from typing_extensions import Self
+
+class ManagementProjectsWebhooksUpdateRequestBody(BaseModel):
+ """
+ Request body schema for **PUT** `/management/v1/projects/{projectId}/webhooks`.
+ """ # noqa: E501
+ target_url: Optional[StrictStr] = Field(default=None, description="URL address that receives webhooks.")
+ events: Optional[List[StrictStr]] = Field(default=None, description="Lists the events that trigger webhook sendout.")
+ active: Optional[StrictBool] = Field(default=True, description="Determines if the webhook configuration is active.")
+ __properties: ClassVar[List[str]] = ["target_url", "events", "active"]
+
+ @field_validator('events')
+ def events_validate_enum(cls, value):
+ """Validates the enum"""
+ if value is None:
+ return value
+
+ for i in value:
+ if i not in set(['redemption.succeeded', 'redemption.failed', 'redemption.rollback.succeeded', 'redemption.rollback.failed', 'publication.succeeded', 'voucher.published', 'voucher.updated', 'voucher.deleted', 'voucher.created', 'voucher.enabled', 'voucher.disabled', 'voucher.loyalty_card.points_added', 'voucher.gift.balance_added', 'campaign.enabled', 'campaign.deleted', 'campaign.created', 'campaign.updated', 'campaign.disabled', 'campaign.vouchers.generation.completed', 'business_validation_rule.assignment.created', 'business_validation_rule.assignment.deleted', 'business_validation_rule.created', 'business_validation_rule.deleted', 'business_validation_rule.updated', 'customer.created', 'customer.deleted', 'customer.rewarded', 'customer.rewarded.loyalty_points']):
+ raise ValueError("each list item must be one of ('redemption.succeeded', 'redemption.failed', 'redemption.rollback.succeeded', 'redemption.rollback.failed', 'publication.succeeded', 'voucher.published', 'voucher.updated', 'voucher.deleted', 'voucher.created', 'voucher.enabled', 'voucher.disabled', 'voucher.loyalty_card.points_added', 'voucher.gift.balance_added', 'campaign.enabled', 'campaign.deleted', 'campaign.created', 'campaign.updated', 'campaign.disabled', 'campaign.vouchers.generation.completed', 'business_validation_rule.assignment.created', 'business_validation_rule.assignment.deleted', 'business_validation_rule.created', 'business_validation_rule.deleted', 'business_validation_rule.updated', 'customer.created', 'customer.deleted', 'customer.rewarded', 'customer.rewarded.loyalty_points')")
+ return value
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of ManagementProjectsWebhooksUpdateRequestBody from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([
+ ])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ # set to None if target_url (nullable) is None
+ # and model_fields_set contains the field
+ if self.target_url is None and "target_url" in self.model_fields_set:
+ _dict['target_url'] = None
+
+ # set to None if events (nullable) is None
+ # and model_fields_set contains the field
+ if self.events is None and "events" in self.model_fields_set:
+ _dict['events'] = None
+
+ # set to None if active (nullable) is None
+ # and model_fields_set contains the field
+ if self.active is None and "active" in self.model_fields_set:
+ _dict['active'] = None
+
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of ManagementProjectsWebhooksUpdateRequestBody from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "target_url": obj.get("target_url"),
+ "events": obj.get("events"),
+ "active": obj.get("active") if obj.get("active") is not None else True
+ })
+ return _obj
+
+
diff --git a/voucherify/models/management_projects_webhooks_update_response_body.py b/voucherify/models/management_projects_webhooks_update_response_body.py
new file mode 100644
index 00000000..2892d6d3
--- /dev/null
+++ b/voucherify/models/management_projects_webhooks_update_response_body.py
@@ -0,0 +1,150 @@
+# coding: utf-8
+
+"""
+ Voucherify API
+
+ Voucherify promotion engine REST API. Please see https://docs.voucherify.io/docs for more details.
+
+ The version of the OpenAPI document: v2018-08-01
+ Contact: support@voucherify.io
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from datetime import datetime
+from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr, field_validator
+from typing import Any, ClassVar, Dict, List, Optional
+from typing import Optional, Set
+from typing_extensions import Self
+
+class ManagementProjectsWebhooksUpdateResponseBody(BaseModel):
+ """
+ Response body schema for **PUT** `/management/v1/projects/{projectId}/webhooks/{webhookId}`.
+ """ # noqa: E501
+ id: Optional[StrictStr] = Field(default=None, description="Unique identifier of the webhook.")
+ object: Optional[StrictStr] = Field(default='webhook', description="The type of the object represented by JSON.")
+ created_at: Optional[datetime] = Field(default=None, description="Timestamp representing the date and time when the webhook configuration was created. The value for this parameter is shown in the ISO 8601 format.")
+ target_url: Optional[StrictStr] = Field(default=None, description="URL address that receives webhooks.")
+ events: Optional[List[StrictStr]] = Field(default=None, description="Lists the events that trigger webhook sendout.")
+ active: Optional[StrictBool] = Field(default=True, description="Determines if the webhook configuration is active.")
+ __properties: ClassVar[List[str]] = ["id", "object", "created_at", "target_url", "events", "active"]
+
+ @field_validator('object')
+ def object_validate_enum(cls, value):
+ """Validates the enum"""
+ if value is None:
+ return value
+
+ if value not in set(['webhook']):
+ raise ValueError("must be one of enum values ('webhook')")
+ return value
+
+ @field_validator('events')
+ def events_validate_enum(cls, value):
+ """Validates the enum"""
+ if value is None:
+ return value
+
+ for i in value:
+ if i not in set(['redemption.succeeded', 'redemption.failed', 'redemption.rollback.succeeded', 'redemption.rollback.failed', 'publication.succeeded', 'voucher.published', 'voucher.updated', 'voucher.deleted', 'voucher.created', 'voucher.enabled', 'voucher.disabled', 'voucher.loyalty_card.points_added', 'voucher.gift.balance_added', 'campaign.enabled', 'campaign.deleted', 'campaign.created', 'campaign.updated', 'campaign.disabled', 'campaign.vouchers.generation.completed', 'business_validation_rule.assignment.created', 'business_validation_rule.assignment.deleted', 'business_validation_rule.created', 'business_validation_rule.deleted', 'business_validation_rule.updated', 'customer.created', 'customer.deleted', 'customer.rewarded', 'customer.rewarded.loyalty_points']):
+ raise ValueError("each list item must be one of ('redemption.succeeded', 'redemption.failed', 'redemption.rollback.succeeded', 'redemption.rollback.failed', 'publication.succeeded', 'voucher.published', 'voucher.updated', 'voucher.deleted', 'voucher.created', 'voucher.enabled', 'voucher.disabled', 'voucher.loyalty_card.points_added', 'voucher.gift.balance_added', 'campaign.enabled', 'campaign.deleted', 'campaign.created', 'campaign.updated', 'campaign.disabled', 'campaign.vouchers.generation.completed', 'business_validation_rule.assignment.created', 'business_validation_rule.assignment.deleted', 'business_validation_rule.created', 'business_validation_rule.deleted', 'business_validation_rule.updated', 'customer.created', 'customer.deleted', 'customer.rewarded', 'customer.rewarded.loyalty_points')")
+ return value
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of ManagementProjectsWebhooksUpdateResponseBody from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([
+ ])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ # set to None if id (nullable) is None
+ # and model_fields_set contains the field
+ if self.id is None and "id" in self.model_fields_set:
+ _dict['id'] = None
+
+ # set to None if object (nullable) is None
+ # and model_fields_set contains the field
+ if self.object is None and "object" in self.model_fields_set:
+ _dict['object'] = None
+
+ # set to None if created_at (nullable) is None
+ # and model_fields_set contains the field
+ if self.created_at is None and "created_at" in self.model_fields_set:
+ _dict['created_at'] = None
+
+ # set to None if target_url (nullable) is None
+ # and model_fields_set contains the field
+ if self.target_url is None and "target_url" in self.model_fields_set:
+ _dict['target_url'] = None
+
+ # set to None if events (nullable) is None
+ # and model_fields_set contains the field
+ if self.events is None and "events" in self.model_fields_set:
+ _dict['events'] = None
+
+ # set to None if active (nullable) is None
+ # and model_fields_set contains the field
+ if self.active is None and "active" in self.model_fields_set:
+ _dict['active'] = None
+
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of ManagementProjectsWebhooksUpdateResponseBody from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "id": obj.get("id"),
+ "object": obj.get("object") if obj.get("object") is not None else 'webhook',
+ "created_at": obj.get("created_at"),
+ "target_url": obj.get("target_url"),
+ "events": obj.get("events"),
+ "active": obj.get("active") if obj.get("active") is not None else True
+ })
+ return _obj
+
+
diff --git a/voucherify/models/metadata_schema.py b/voucherify/models/metadata_schema.py
new file mode 100644
index 00000000..9dd8ba91
--- /dev/null
+++ b/voucherify/models/metadata_schema.py
@@ -0,0 +1,136 @@
+# coding: utf-8
+
+"""
+ Voucherify API
+
+ Voucherify promotion engine REST API. Please see https://docs.voucherify.io/docs for more details.
+
+ The version of the OpenAPI document: v2018-08-01
+ Contact: support@voucherify.io
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from datetime import datetime
+from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr
+from typing import Any, ClassVar, Dict, List, Optional
+from typing import Optional, Set
+from typing_extensions import Self
+
+class MetadataSchema(BaseModel):
+ """
+ Object representing a metadata schema.
+ """ # noqa: E501
+ id: Optional[StrictStr] = Field(default=None, description="Unique identifier of the metadata schema.")
+ related_object: Optional[StrictStr] = Field(default=None, description="The resource type. You can define custom metadata schemas, which have a custom `\"related_object\"` resource type. The standard metadata schemas are: `\"campaign\"`, `\"customer\"`, `\"earning_rule\"`, `\"loyalty_tier\"`, `\"order\"`, `\"order_item\"`, `\"product\"`, `\"promotion_tier\"`, `\"publication\"`, `\"redemption\"`, `\"reward\"`, `\"voucher\"`.")
+ properties: Optional[Dict[str, Any]] = Field(default=None, description="Contains metadata definitions.")
+ allow_defined_only: Optional[StrictBool] = Field(default=None, description="Restricts the creation of metadata fields when set to `true`. It indicates whether or not you can create new metadata definitions, e.g. in the campaign or publication manager. If set to `true`, then only the defined fields are available for assigning values.")
+ created_at: Optional[datetime] = Field(default=None, description="Timestamp representing the date and time when the metadata schema was created. The value for this parameter is shown in the ISO 8601 format.")
+ updated_at: Optional[datetime] = Field(default=None, description="Timestamp representing the date and time when the metadata schema was updated. The value for this parameter is shown in the ISO 8601 format.")
+ object: Optional[StrictStr] = Field(default='metadata_schema', description="The type of the object represented by the JSON. This object stores information about the metadata schema.")
+ __properties: ClassVar[List[str]] = ["id", "related_object", "properties", "allow_defined_only", "created_at", "updated_at", "object"]
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of MetadataSchema from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([
+ ])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ # set to None if id (nullable) is None
+ # and model_fields_set contains the field
+ if self.id is None and "id" in self.model_fields_set:
+ _dict['id'] = None
+
+ # set to None if related_object (nullable) is None
+ # and model_fields_set contains the field
+ if self.related_object is None and "related_object" in self.model_fields_set:
+ _dict['related_object'] = None
+
+ # set to None if properties (nullable) is None
+ # and model_fields_set contains the field
+ if self.properties is None and "properties" in self.model_fields_set:
+ _dict['properties'] = None
+
+ # set to None if allow_defined_only (nullable) is None
+ # and model_fields_set contains the field
+ if self.allow_defined_only is None and "allow_defined_only" in self.model_fields_set:
+ _dict['allow_defined_only'] = None
+
+ # set to None if created_at (nullable) is None
+ # and model_fields_set contains the field
+ if self.created_at is None and "created_at" in self.model_fields_set:
+ _dict['created_at'] = None
+
+ # set to None if updated_at (nullable) is None
+ # and model_fields_set contains the field
+ if self.updated_at is None and "updated_at" in self.model_fields_set:
+ _dict['updated_at'] = None
+
+ # set to None if object (nullable) is None
+ # and model_fields_set contains the field
+ if self.object is None and "object" in self.model_fields_set:
+ _dict['object'] = None
+
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of MetadataSchema from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "id": obj.get("id"),
+ "related_object": obj.get("related_object"),
+ "properties": obj.get("properties"),
+ "allow_defined_only": obj.get("allow_defined_only"),
+ "created_at": obj.get("created_at"),
+ "updated_at": obj.get("updated_at"),
+ "object": obj.get("object") if obj.get("object") is not None else 'metadata_schema'
+ })
+ return _obj
+
+
diff --git a/voucherify/models/metadata_schema_deprecated.py b/voucherify/models/metadata_schema_deprecated.py
new file mode 100644
index 00000000..68e55bde
--- /dev/null
+++ b/voucherify/models/metadata_schema_deprecated.py
@@ -0,0 +1,136 @@
+# coding: utf-8
+
+"""
+ Voucherify API
+
+ Voucherify promotion engine REST API. Please see https://docs.voucherify.io/docs for more details.
+
+ The version of the OpenAPI document: v2018-08-01
+ Contact: support@voucherify.io
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from datetime import datetime
+from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr
+from typing import Any, ClassVar, Dict, List, Optional
+from typing import Optional, Set
+from typing_extensions import Self
+
+class MetadataSchemaDeprecated(BaseModel):
+ """
+ Object representing a metadata schema.
+ """ # noqa: E501
+ id: Optional[StrictStr] = Field(default=None, description="Unique identifier of the metadata schema.")
+ related_object: Optional[StrictStr] = Field(default=None, description="The resource type. You can define custom metadata schemas, which have a custom `\"related_object\"` resource type. The standard metadata schemas are: `\"campaign\"`, `\"customer\"`, `\"earning_rule\"`, `\"loyalty_tier\"`, `\"order\"`, `\"order_item\"`, `\"product\"`, `\"promotion_tier\"`, `\"publication\"`, `\"redemption\"`, `\"reward\"`, `\"voucher\"`.")
+ properties: Optional[Dict[str, Any]] = Field(default=None, description="Contains metadata definitions.")
+ allow_defined_only: Optional[StrictBool] = Field(default=None, description="Restricts the creation of metadata fields when set to `true`. It indicates whether or not you can create new metadata definitions, e.g. in the campaign or publication manager. If set to `true`, then only the defined fields are available for assigning values.")
+ created_at: Optional[datetime] = Field(default=None, description="Timestamp representing the date and time when the metadata schema was created. The value for this parameter is shown in the ISO 8601 format.")
+ updated_at: Optional[datetime] = Field(default=None, description="Timestamp representing the date and time when the metadata schema was updated. The value for this parameter is shown in the ISO 8601 format.")
+ object: Optional[StrictStr] = Field(default='metadata_schema', description="The type of the object represented by the JSON. This object stores information about the metadata schema.")
+ __properties: ClassVar[List[str]] = ["id", "related_object", "properties", "allow_defined_only", "created_at", "updated_at", "object"]
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of MetadataSchemaDeprecated from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([
+ ])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ # set to None if id (nullable) is None
+ # and model_fields_set contains the field
+ if self.id is None and "id" in self.model_fields_set:
+ _dict['id'] = None
+
+ # set to None if related_object (nullable) is None
+ # and model_fields_set contains the field
+ if self.related_object is None and "related_object" in self.model_fields_set:
+ _dict['related_object'] = None
+
+ # set to None if properties (nullable) is None
+ # and model_fields_set contains the field
+ if self.properties is None and "properties" in self.model_fields_set:
+ _dict['properties'] = None
+
+ # set to None if allow_defined_only (nullable) is None
+ # and model_fields_set contains the field
+ if self.allow_defined_only is None and "allow_defined_only" in self.model_fields_set:
+ _dict['allow_defined_only'] = None
+
+ # set to None if created_at (nullable) is None
+ # and model_fields_set contains the field
+ if self.created_at is None and "created_at" in self.model_fields_set:
+ _dict['created_at'] = None
+
+ # set to None if updated_at (nullable) is None
+ # and model_fields_set contains the field
+ if self.updated_at is None and "updated_at" in self.model_fields_set:
+ _dict['updated_at'] = None
+
+ # set to None if object (nullable) is None
+ # and model_fields_set contains the field
+ if self.object is None and "object" in self.model_fields_set:
+ _dict['object'] = None
+
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of MetadataSchemaDeprecated from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "id": obj.get("id"),
+ "related_object": obj.get("related_object"),
+ "properties": obj.get("properties"),
+ "allow_defined_only": obj.get("allow_defined_only"),
+ "created_at": obj.get("created_at"),
+ "updated_at": obj.get("updated_at"),
+ "object": obj.get("object") if obj.get("object") is not None else 'metadata_schema'
+ })
+ return _obj
+
+
diff --git a/voucherify/models/metadata_schemas_get_response_body.py b/voucherify/models/metadata_schemas_get_response_body.py
new file mode 100644
index 00000000..07e5ad9a
--- /dev/null
+++ b/voucherify/models/metadata_schemas_get_response_body.py
@@ -0,0 +1,136 @@
+# coding: utf-8
+
+"""
+ Voucherify API
+
+ Voucherify promotion engine REST API. Please see https://docs.voucherify.io/docs for more details.
+
+ The version of the OpenAPI document: v2018-08-01
+ Contact: support@voucherify.io
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from datetime import datetime
+from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr
+from typing import Any, ClassVar, Dict, List, Optional
+from typing import Optional, Set
+from typing_extensions import Self
+
+class MetadataSchemasGetResponseBody(BaseModel):
+ """
+ Response body schema for **GET** `/v1/metadata-schemas/{resource}`.
+ """ # noqa: E501
+ id: Optional[StrictStr] = Field(default=None, description="Unique identifier of the metadata schema.")
+ related_object: Optional[StrictStr] = Field(default=None, description="The resource type. You can define custom metadata schemas, which have a custom `\"related_object\"` resource type. The standard metadata schemas are: `\"campaign\"`, `\"customer\"`, `\"earning_rule\"`, `\"loyalty_tier\"`, `\"order\"`, `\"order_item\"`, `\"product\"`, `\"promotion_tier\"`, `\"publication\"`, `\"redemption\"`, `\"reward\"`, `\"voucher\"`.")
+ properties: Optional[Dict[str, Any]] = Field(default=None, description="Contains metadata definitions.")
+ allow_defined_only: Optional[StrictBool] = Field(default=None, description="Restricts the creation of metadata fields when set to `true`. It indicates whether or not you can create new metadata definitions, e.g. in the campaign or publication manager. If set to `true`, then only the defined fields are available for assigning values.")
+ created_at: Optional[datetime] = Field(default=None, description="Timestamp representing the date and time when the metadata schema was created. The value for this parameter is shown in the ISO 8601 format.")
+ updated_at: Optional[datetime] = Field(default=None, description="Timestamp representing the date and time when the metadata schema was updated. The value for this parameter is shown in the ISO 8601 format.")
+ object: Optional[StrictStr] = Field(default='metadata_schema', description="The type of the object represented by the JSON. This object stores information about the metadata schema.")
+ __properties: ClassVar[List[str]] = ["id", "related_object", "properties", "allow_defined_only", "created_at", "updated_at", "object"]
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of MetadataSchemasGetResponseBody from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([
+ ])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ # set to None if id (nullable) is None
+ # and model_fields_set contains the field
+ if self.id is None and "id" in self.model_fields_set:
+ _dict['id'] = None
+
+ # set to None if related_object (nullable) is None
+ # and model_fields_set contains the field
+ if self.related_object is None and "related_object" in self.model_fields_set:
+ _dict['related_object'] = None
+
+ # set to None if properties (nullable) is None
+ # and model_fields_set contains the field
+ if self.properties is None and "properties" in self.model_fields_set:
+ _dict['properties'] = None
+
+ # set to None if allow_defined_only (nullable) is None
+ # and model_fields_set contains the field
+ if self.allow_defined_only is None and "allow_defined_only" in self.model_fields_set:
+ _dict['allow_defined_only'] = None
+
+ # set to None if created_at (nullable) is None
+ # and model_fields_set contains the field
+ if self.created_at is None and "created_at" in self.model_fields_set:
+ _dict['created_at'] = None
+
+ # set to None if updated_at (nullable) is None
+ # and model_fields_set contains the field
+ if self.updated_at is None and "updated_at" in self.model_fields_set:
+ _dict['updated_at'] = None
+
+ # set to None if object (nullable) is None
+ # and model_fields_set contains the field
+ if self.object is None and "object" in self.model_fields_set:
+ _dict['object'] = None
+
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of MetadataSchemasGetResponseBody from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "id": obj.get("id"),
+ "related_object": obj.get("related_object"),
+ "properties": obj.get("properties"),
+ "allow_defined_only": obj.get("allow_defined_only"),
+ "created_at": obj.get("created_at"),
+ "updated_at": obj.get("updated_at"),
+ "object": obj.get("object") if obj.get("object") is not None else 'metadata_schema'
+ })
+ return _obj
+
+
diff --git a/voucherify/models/metadata_schemas_list_response_body.py b/voucherify/models/metadata_schemas_list_response_body.py
new file mode 100644
index 00000000..ca6aa32d
--- /dev/null
+++ b/voucherify/models/metadata_schemas_list_response_body.py
@@ -0,0 +1,142 @@
+# coding: utf-8
+
+"""
+ Voucherify API
+
+ Voucherify promotion engine REST API. Please see https://docs.voucherify.io/docs for more details.
+
+ The version of the OpenAPI document: v2018-08-01
+ Contact: support@voucherify.io
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr, field_validator
+from typing import Any, ClassVar, Dict, List, Optional
+from voucherify.models.metadata_schema_deprecated import MetadataSchemaDeprecated
+from typing import Optional, Set
+from typing_extensions import Self
+
+class MetadataSchemasListResponseBody(BaseModel):
+ """
+ Object containing a list of metadata schemas.
+ """ # noqa: E501
+ object: Optional[StrictStr] = Field(default='list', description="The type of the object represented by JSON. This object stores information about the metadata schemas in a dictionary.")
+ data_ref: Optional[StrictStr] = Field(default='schemas', description="Identifies the name of the attribute that contains the array of metadata schema objects.")
+ schemas: Optional[List[MetadataSchemaDeprecated]] = Field(default=None, description="Array of metadata schema objects. The metadata schemas are listed by related object properties.")
+ total: Optional[StrictInt] = Field(default=None, description="The total number of metadata schema objects.")
+ __properties: ClassVar[List[str]] = ["object", "data_ref", "schemas", "total"]
+
+ @field_validator('object')
+ def object_validate_enum(cls, value):
+ """Validates the enum"""
+ if value is None:
+ return value
+
+ if value not in set(['list']):
+ raise ValueError("must be one of enum values ('list')")
+ return value
+
+ @field_validator('data_ref')
+ def data_ref_validate_enum(cls, value):
+ """Validates the enum"""
+ if value is None:
+ return value
+
+ if value not in set(['schemas']):
+ raise ValueError("must be one of enum values ('schemas')")
+ return value
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of MetadataSchemasListResponseBody from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([
+ ])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ # override the default output from pydantic by calling `to_dict()` of each item in schemas (list)
+ _items = []
+ if self.schemas:
+ for _item_schemas in self.schemas:
+ if _item_schemas:
+ _items.append(_item_schemas.to_dict())
+ _dict['schemas'] = _items
+ # set to None if object (nullable) is None
+ # and model_fields_set contains the field
+ if self.object is None and "object" in self.model_fields_set:
+ _dict['object'] = None
+
+ # set to None if data_ref (nullable) is None
+ # and model_fields_set contains the field
+ if self.data_ref is None and "data_ref" in self.model_fields_set:
+ _dict['data_ref'] = None
+
+ # set to None if schemas (nullable) is None
+ # and model_fields_set contains the field
+ if self.schemas is None and "schemas" in self.model_fields_set:
+ _dict['schemas'] = None
+
+ # set to None if total (nullable) is None
+ # and model_fields_set contains the field
+ if self.total is None and "total" in self.model_fields_set:
+ _dict['total'] = None
+
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of MetadataSchemasListResponseBody from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "object": obj.get("object") if obj.get("object") is not None else 'list',
+ "data_ref": obj.get("data_ref") if obj.get("data_ref") is not None else 'schemas',
+ "schemas": [MetadataSchemaDeprecated.from_dict(_item) for _item in obj["schemas"]] if obj.get("schemas") is not None else None,
+ "total": obj.get("total")
+ })
+ return _obj
+
+
diff --git a/voucherify/models/order.py b/voucherify/models/order.py
index 1833bebd..07664bbf 100644
--- a/voucherify/models/order.py
+++ b/voucherify/models/order.py
@@ -34,7 +34,7 @@ class Order(BaseModel):
amount: Optional[StrictInt] = Field(default=None, description="A positive integer in the smallest currency unit (e.g. 100 cents for $1.00) representing the total amount of the order. This is the sum of the order items' amounts.")
initial_amount: Optional[StrictInt] = Field(default=None, description="A positive integer in the smallest currency unit (e.g. 100 cents for $1.00) representing the total amount of the order. This is the sum of the order items' amounts.")
discount_amount: Optional[StrictInt] = Field(default=None, description="Sum of all order-level discounts applied to the order.")
- items: Optional[List[OrderItem]] = Field(default=None, description="Array of items applied to the order.")
+ items: Optional[List[OrderItem]] = Field(default=None, description="Array of items applied to the order. It can include up 500 items.")
metadata: Optional[Dict[str, Any]] = Field(default=None, description="A set of custom key/value pairs that you can attach to an order. It can be useful for storing additional information about the order in a structured format.")
__properties: ClassVar[List[str]] = ["id", "source_id", "status", "amount", "initial_amount", "discount_amount", "items", "metadata"]
diff --git a/voucherify/models/order_calculated.py b/voucherify/models/order_calculated.py
index 99e14b4c..29519b4c 100644
--- a/voucherify/models/order_calculated.py
+++ b/voucherify/models/order_calculated.py
@@ -43,7 +43,7 @@ class OrderCalculated(BaseModel):
applied_discount_amount: Optional[StrictInt] = Field(default=None, description="This field shows the order-level discount applied.")
items_applied_discount_amount: Optional[StrictInt] = Field(default=None, description="Sum of all product-specific discounts applied in a particular request. `sum(items, i => i.applied_discount_amount)`")
total_applied_discount_amount: Optional[StrictInt] = Field(default=None, description="Sum of all order-level AND all product-specific discounts applied in a particular request. `total_applied_discount_amount` = `applied_discount_amount` + `items_applied_discount_amount`")
- items: Optional[List[OrderCalculatedItem]] = Field(default=None, description="Array of items applied to the order.")
+ items: Optional[List[OrderCalculatedItem]] = Field(default=None, description="Array of items applied to the order. It can include up 500 items.")
metadata: Optional[Dict[str, Any]] = Field(default=None, description="A set of custom key/value pairs that you can attach to an order. It can be useful for storing additional information about the order in a structured format.")
object: Optional[StrictStr] = Field(default='order', description="The type of the object represented by JSON.")
created_at: Optional[datetime] = Field(default=None, description="Timestamp representing the date and time when the order was created. The value is shown in the ISO 8601 format.")
diff --git a/voucherify/models/order_item_product.py b/voucherify/models/order_item_product.py
index 6787b3d6..51b7c80d 100644
--- a/voucherify/models/order_item_product.py
+++ b/voucherify/models/order_item_product.py
@@ -29,7 +29,7 @@ class OrderItemProduct(BaseModel):
""" # noqa: E501
id: Optional[StrictStr] = Field(default=None, description="A unique identifier that represents the product and is assigned by Voucherify.")
source_id: Optional[StrictStr] = Field(default=None, description="The merchant's product ID (if it is different than Voucherify's product ID). It is really useful in case of integration between multiple systems. It can be an ID from an eCommerce site, a database or a 3rd party service.")
- override: Optional[StrictBool] = Field(default=None, description="The override set to `true` is used to store the product information in the system. If the product does not exist, it will be created with a source_id; if it does exist, the provided values for the name, price, and metadata will replace those already stored in the system.")
+ override: Optional[StrictBool] = Field(default=None, description="The override set to `true` is used to store the product information in the system. If the product does not exist, it will be created with a source_id; if it does exist, the provided values for the name, price, and metadata will replace those already stored in the system. Override works only for endpoints that create an order in the database.")
name: Optional[StrictStr] = Field(default=None, description="Product name.")
metadata: Optional[Dict[str, Any]] = Field(default=None, description="A set of custom key/value pairs that you can attach to a product. It can be useful for storing additional information about the product in a structured format.")
price: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Product price. A positive integer in the smallest currency unit (e.g. 100 cents for $1.00).")
diff --git a/voucherify/models/orders_create_request_body.py b/voucherify/models/orders_create_request_body.py
index 8026d0d5..59c99c93 100644
--- a/voucherify/models/orders_create_request_body.py
+++ b/voucherify/models/orders_create_request_body.py
@@ -37,7 +37,7 @@ class OrdersCreateRequestBody(BaseModel):
amount: Optional[StrictInt] = Field(default=None, description="A positive integer in the smallest currency unit (e.g. 100 cents for $1.00) representing the total amount of the order. This is the sum of the order items' amounts.")
initial_amount: Optional[StrictInt] = Field(default=None, description="A positive integer in the smallest currency unit (e.g. 100 cents for $1.00) representing the total amount of the order. This is the sum of the order items' amounts.")
discount_amount: Optional[StrictInt] = Field(default=None, description="Sum of all order-level discounts applied to the order.")
- items: Optional[List[OrderItem]] = Field(default=None, description="Array of items applied to the order.")
+ items: Optional[List[OrderItem]] = Field(default=None, description="Array of items applied to the order. It can include up 500 items.")
metadata: Optional[Dict[str, Any]] = Field(default=None, description="A set of custom key/value pairs that you can attach to an order. It can be useful for storing additional information about the order in a structured format.")
created_at: Optional[datetime] = Field(default=None, description="Timestamp representing the date and time when the order was created. The value is shown in the ISO 8601 format.")
referrer_id: Optional[StrictStr] = Field(default=None, description="Unique referrer ID.")
diff --git a/voucherify/models/orders_create_response_body.py b/voucherify/models/orders_create_response_body.py
index ecd7a8c2..17f767ae 100644
--- a/voucherify/models/orders_create_response_body.py
+++ b/voucherify/models/orders_create_response_body.py
@@ -43,7 +43,7 @@ class OrdersCreateResponseBody(BaseModel):
applied_discount_amount: Optional[StrictInt] = Field(default=None, description="This field shows the order-level discount applied.")
items_applied_discount_amount: Optional[StrictInt] = Field(default=None, description="Sum of all product-specific discounts applied in a particular request. `sum(items, i => i.applied_discount_amount)`")
total_applied_discount_amount: Optional[StrictInt] = Field(default=None, description="Sum of all order-level AND all product-specific discounts applied in a particular request. `total_applied_discount_amount` = `applied_discount_amount` + `items_applied_discount_amount`")
- items: Optional[List[OrderCalculatedItem]] = Field(default=None, description="Array of items applied to the order.")
+ items: Optional[List[OrderCalculatedItem]] = Field(default=None, description="Array of items applied to the order. It can include up 500 items.")
metadata: Optional[Dict[str, Any]] = Field(default=None, description="A set of custom key/value pairs that you can attach to an order. It can be useful for storing additional information about the order in a structured format.")
object: Optional[StrictStr] = Field(default='order', description="The type of the object represented by JSON.")
created_at: Optional[datetime] = Field(default=None, description="Timestamp representing the date and time when the order was created. The value is shown in the ISO 8601 format.")
diff --git a/voucherify/models/orders_get_response_body.py b/voucherify/models/orders_get_response_body.py
index 1e7eefc8..29ad048e 100644
--- a/voucherify/models/orders_get_response_body.py
+++ b/voucherify/models/orders_get_response_body.py
@@ -43,7 +43,7 @@ class OrdersGetResponseBody(BaseModel):
applied_discount_amount: Optional[StrictInt] = Field(default=None, description="This field shows the order-level discount applied.")
items_applied_discount_amount: Optional[StrictInt] = Field(default=None, description="Sum of all product-specific discounts applied in a particular request. `sum(items, i => i.applied_discount_amount)`")
total_applied_discount_amount: Optional[StrictInt] = Field(default=None, description="Sum of all order-level AND all product-specific discounts applied in a particular request. `total_applied_discount_amount` = `applied_discount_amount` + `items_applied_discount_amount`")
- items: Optional[List[OrderCalculatedItem]] = Field(default=None, description="Array of items applied to the order.")
+ items: Optional[List[OrderCalculatedItem]] = Field(default=None, description="Array of items applied to the order. It can include up 500 items.")
metadata: Optional[Dict[str, Any]] = Field(default=None, description="A set of custom key/value pairs that you can attach to an order. It can be useful for storing additional information about the order in a structured format.")
object: Optional[StrictStr] = Field(default='order', description="The type of the object represented by JSON.")
created_at: Optional[datetime] = Field(default=None, description="Timestamp representing the date and time when the order was created. The value is shown in the ISO 8601 format.")
diff --git a/voucherify/models/orders_import_create_request_body_item.py b/voucherify/models/orders_import_create_request_body_item.py
index a3a1022b..aa8243ee 100644
--- a/voucherify/models/orders_import_create_request_body_item.py
+++ b/voucherify/models/orders_import_create_request_body_item.py
@@ -37,7 +37,7 @@ class OrdersImportCreateRequestBodyItem(BaseModel):
amount: Optional[StrictInt] = Field(default=None, description="A positive integer in the smallest currency unit (e.g. 100 cents for $1.00) representing the total amount of the order. This is the sum of the order items' amounts.")
initial_amount: Optional[StrictInt] = Field(default=None, description="A positive integer in the smallest currency unit (e.g. 100 cents for $1.00) representing the total amount of the order. This is the sum of the order items' amounts.")
discount_amount: Optional[StrictInt] = Field(default=None, description="Sum of all order-level discounts applied to the order.")
- items: Optional[List[OrderItem]] = Field(default=None, description="Array of items applied to the order.")
+ items: Optional[List[OrderItem]] = Field(default=None, description="Array of items applied to the order. It can include up 500 items.")
metadata: Optional[Dict[str, Any]] = Field(default=None, description="A set of custom key/value pairs that you can attach to an order. It can be useful for storing additional information about the order in a structured format.")
created_at: Optional[datetime] = Field(default=None, description="Timestamp representing the date and time when the order was created. The value is shown in the ISO 8601 format.")
referrer_id: Optional[StrictStr] = Field(default=None, description="Unique referrer ID.")
diff --git a/voucherify/models/orders_update_request_body.py b/voucherify/models/orders_update_request_body.py
index af2e9dae..aa0c010f 100644
--- a/voucherify/models/orders_update_request_body.py
+++ b/voucherify/models/orders_update_request_body.py
@@ -36,7 +36,7 @@ class OrdersUpdateRequestBody(BaseModel):
amount: Optional[StrictInt] = Field(default=None, description="A positive integer in the smallest currency unit (e.g. 100 cents for $1.00) representing the total amount of the order. This is the sum of the order items' amounts.")
initial_amount: Optional[StrictInt] = Field(default=None, description="A positive integer in the smallest currency unit (e.g. 100 cents for $1.00) representing the total amount of the order. This is the sum of the order items' amounts.")
discount_amount: Optional[StrictInt] = Field(default=None, description="Sum of all order-level discounts applied to the order.")
- items: Optional[List[OrderItem]] = Field(default=None, description="Array of items applied to the order.")
+ items: Optional[List[OrderItem]] = Field(default=None, description="Array of items applied to the order. It can include up 500 items.")
metadata: Optional[Dict[str, Any]] = Field(default=None, description="A set of custom key/value pairs that you can attach to an order. It can be useful for storing additional information about the order in a structured format.")
created_at: Optional[datetime] = Field(default=None, description="Timestamp representing the date and time when the order was created. The value is shown in the ISO 8601 format.")
referrer_id: Optional[StrictStr] = Field(default=None, description="Unique referrer ID.")
diff --git a/voucherify/models/orders_update_response_body.py b/voucherify/models/orders_update_response_body.py
index 2c07b21d..3d6ff612 100644
--- a/voucherify/models/orders_update_response_body.py
+++ b/voucherify/models/orders_update_response_body.py
@@ -43,7 +43,7 @@ class OrdersUpdateResponseBody(BaseModel):
applied_discount_amount: Optional[StrictInt] = Field(default=None, description="This field shows the order-level discount applied.")
items_applied_discount_amount: Optional[StrictInt] = Field(default=None, description="Sum of all product-specific discounts applied in a particular request. `sum(items, i => i.applied_discount_amount)`")
total_applied_discount_amount: Optional[StrictInt] = Field(default=None, description="Sum of all order-level AND all product-specific discounts applied in a particular request. `total_applied_discount_amount` = `applied_discount_amount` + `items_applied_discount_amount`")
- items: Optional[List[OrderCalculatedItem]] = Field(default=None, description="Array of items applied to the order.")
+ items: Optional[List[OrderCalculatedItem]] = Field(default=None, description="Array of items applied to the order. It can include up 500 items.")
metadata: Optional[Dict[str, Any]] = Field(default=None, description="A set of custom key/value pairs that you can attach to an order. It can be useful for storing additional information about the order in a structured format.")
object: Optional[StrictStr] = Field(default='order', description="The type of the object represented by JSON.")
created_at: Optional[datetime] = Field(default=None, description="Timestamp representing the date and time when the order was created. The value is shown in the ISO 8601 format.")
diff --git a/voucherify/models/parameter_campaign_type.py b/voucherify/models/parameter_campaign_type.py
index 040f3f0f..c70f6406 100644
--- a/voucherify/models/parameter_campaign_type.py
+++ b/voucherify/models/parameter_campaign_type.py
@@ -32,7 +32,6 @@ class ParameterCampaignType(str, Enum):
REFERRAL_PROGRAM = 'REFERRAL_PROGRAM'
DISCOUNT_COUPONS = 'DISCOUNT_COUPONS'
LOYALTY_PROGRAM = 'LOYALTY_PROGRAM'
- LUCKY_DRAW = 'LUCKY_DRAW'
@classmethod
def from_json(cls, json_str: str) -> Self:
diff --git a/voucherify/models/parameter_filters_list_bin.py b/voucherify/models/parameter_filters_list_bin.py
new file mode 100644
index 00000000..0c9039af
--- /dev/null
+++ b/voucherify/models/parameter_filters_list_bin.py
@@ -0,0 +1,133 @@
+# coding: utf-8
+
+"""
+ Voucherify API
+
+ Voucherify promotion engine REST API. Please see https://docs.voucherify.io/docs for more details.
+
+ The version of the OpenAPI document: v2018-08-01
+ Contact: support@voucherify.io
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict
+from typing import Any, ClassVar, Dict, List, Optional
+from voucherify.models.junction import Junction
+from voucherify.models.parameter_filters_list_bin_id import ParameterFiltersListBinId
+from voucherify.models.parameter_filters_list_bin_resource_id import ParameterFiltersListBinResourceId
+from voucherify.models.parameter_filters_list_bin_resource_name import ParameterFiltersListBinResourceName
+from voucherify.models.parameter_filters_list_bin_resource_type import ParameterFiltersListBinResourceType
+from typing import Optional, Set
+from typing_extensions import Self
+
+class ParameterFiltersListBin(BaseModel):
+ """
+ ParameterFiltersListBin
+ """ # noqa: E501
+ junction: Optional[Junction] = None
+ id: Optional[ParameterFiltersListBinId] = None
+ resource_type: Optional[ParameterFiltersListBinResourceType] = None
+ resource_name: Optional[ParameterFiltersListBinResourceName] = None
+ resource_id: Optional[ParameterFiltersListBinResourceId] = None
+ __properties: ClassVar[List[str]] = ["junction", "id", "resource_type", "resource_name", "resource_id"]
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of ParameterFiltersListBin from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([
+ ])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ # override the default output from pydantic by calling `to_dict()` of id
+ if self.id:
+ _dict['id'] = self.id.to_dict()
+ # override the default output from pydantic by calling `to_dict()` of resource_type
+ if self.resource_type:
+ _dict['resource_type'] = self.resource_type.to_dict()
+ # override the default output from pydantic by calling `to_dict()` of resource_name
+ if self.resource_name:
+ _dict['resource_name'] = self.resource_name.to_dict()
+ # override the default output from pydantic by calling `to_dict()` of resource_id
+ if self.resource_id:
+ _dict['resource_id'] = self.resource_id.to_dict()
+ # set to None if id (nullable) is None
+ # and model_fields_set contains the field
+ if self.id is None and "id" in self.model_fields_set:
+ _dict['id'] = None
+
+ # set to None if resource_type (nullable) is None
+ # and model_fields_set contains the field
+ if self.resource_type is None and "resource_type" in self.model_fields_set:
+ _dict['resource_type'] = None
+
+ # set to None if resource_name (nullable) is None
+ # and model_fields_set contains the field
+ if self.resource_name is None and "resource_name" in self.model_fields_set:
+ _dict['resource_name'] = None
+
+ # set to None if resource_id (nullable) is None
+ # and model_fields_set contains the field
+ if self.resource_id is None and "resource_id" in self.model_fields_set:
+ _dict['resource_id'] = None
+
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of ParameterFiltersListBin from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "junction": obj.get("junction"),
+ "id": ParameterFiltersListBinId.from_dict(obj["id"]) if obj.get("id") is not None else None,
+ "resource_type": ParameterFiltersListBinResourceType.from_dict(obj["resource_type"]) if obj.get("resource_type") is not None else None,
+ "resource_name": ParameterFiltersListBinResourceName.from_dict(obj["resource_name"]) if obj.get("resource_name") is not None else None,
+ "resource_id": ParameterFiltersListBinResourceId.from_dict(obj["resource_id"]) if obj.get("resource_id") is not None else None
+ })
+ return _obj
+
+
diff --git a/voucherify/models/parameter_filters_list_bin_id.py b/voucherify/models/parameter_filters_list_bin_id.py
new file mode 100644
index 00000000..72f51f63
--- /dev/null
+++ b/voucherify/models/parameter_filters_list_bin_id.py
@@ -0,0 +1,92 @@
+# coding: utf-8
+
+"""
+ Voucherify API
+
+ Voucherify promotion engine REST API. Please see https://docs.voucherify.io/docs for more details.
+
+ The version of the OpenAPI document: v2018-08-01
+ Contact: support@voucherify.io
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict
+from typing import Any, ClassVar, Dict, List, Optional
+from voucherify.models.filter_conditions_string import FilterConditionsString
+from typing import Optional, Set
+from typing_extensions import Self
+
+class ParameterFiltersListBinId(BaseModel):
+ """
+ Unique identifier of the bin entry.
+ """ # noqa: E501
+ conditions: Optional[FilterConditionsString] = None
+ __properties: ClassVar[List[str]] = ["conditions"]
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of ParameterFiltersListBinId from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([
+ ])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ # override the default output from pydantic by calling `to_dict()` of conditions
+ if self.conditions:
+ _dict['conditions'] = self.conditions.to_dict()
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of ParameterFiltersListBinId from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "conditions": FilterConditionsString.from_dict(obj["conditions"]) if obj.get("conditions") is not None else None
+ })
+ return _obj
+
+
diff --git a/voucherify/models/parameter_filters_list_bin_resource_id.py b/voucherify/models/parameter_filters_list_bin_resource_id.py
new file mode 100644
index 00000000..326f1e25
--- /dev/null
+++ b/voucherify/models/parameter_filters_list_bin_resource_id.py
@@ -0,0 +1,92 @@
+# coding: utf-8
+
+"""
+ Voucherify API
+
+ Voucherify promotion engine REST API. Please see https://docs.voucherify.io/docs for more details.
+
+ The version of the OpenAPI document: v2018-08-01
+ Contact: support@voucherify.io
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict
+from typing import Any, ClassVar, Dict, List, Optional
+from voucherify.models.filter_conditions_string import FilterConditionsString
+from typing import Optional, Set
+from typing_extensions import Self
+
+class ParameterFiltersListBinResourceId(BaseModel):
+ """
+ Unique identifier of the resource moved to the bin.
+ """ # noqa: E501
+ conditions: Optional[FilterConditionsString] = None
+ __properties: ClassVar[List[str]] = ["conditions"]
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of ParameterFiltersListBinResourceId from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([
+ ])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ # override the default output from pydantic by calling `to_dict()` of conditions
+ if self.conditions:
+ _dict['conditions'] = self.conditions.to_dict()
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of ParameterFiltersListBinResourceId from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "conditions": FilterConditionsString.from_dict(obj["conditions"]) if obj.get("conditions") is not None else None
+ })
+ return _obj
+
+
diff --git a/voucherify/models/parameter_filters_list_bin_resource_name.py b/voucherify/models/parameter_filters_list_bin_resource_name.py
new file mode 100644
index 00000000..a6d91ce0
--- /dev/null
+++ b/voucherify/models/parameter_filters_list_bin_resource_name.py
@@ -0,0 +1,92 @@
+# coding: utf-8
+
+"""
+ Voucherify API
+
+ Voucherify promotion engine REST API. Please see https://docs.voucherify.io/docs for more details.
+
+ The version of the OpenAPI document: v2018-08-01
+ Contact: support@voucherify.io
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict
+from typing import Any, ClassVar, Dict, List, Optional
+from voucherify.models.filter_conditions_string import FilterConditionsString
+from typing import Optional, Set
+from typing_extensions import Self
+
+class ParameterFiltersListBinResourceName(BaseModel):
+ """
+ Name of the resource moved to the bin: the name of the campaign, voucher, product, or SKU.
+ """ # noqa: E501
+ conditions: Optional[FilterConditionsString] = None
+ __properties: ClassVar[List[str]] = ["conditions"]
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of ParameterFiltersListBinResourceName from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([
+ ])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ # override the default output from pydantic by calling `to_dict()` of conditions
+ if self.conditions:
+ _dict['conditions'] = self.conditions.to_dict()
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of ParameterFiltersListBinResourceName from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "conditions": FilterConditionsString.from_dict(obj["conditions"]) if obj.get("conditions") is not None else None
+ })
+ return _obj
+
+
diff --git a/voucherify/models/parameter_filters_list_bin_resource_type.py b/voucherify/models/parameter_filters_list_bin_resource_type.py
new file mode 100644
index 00000000..f176bde1
--- /dev/null
+++ b/voucherify/models/parameter_filters_list_bin_resource_type.py
@@ -0,0 +1,92 @@
+# coding: utf-8
+
+"""
+ Voucherify API
+
+ Voucherify promotion engine REST API. Please see https://docs.voucherify.io/docs for more details.
+
+ The version of the OpenAPI document: v2018-08-01
+ Contact: support@voucherify.io
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict
+from typing import Any, ClassVar, Dict, List, Optional
+from voucherify.models.parameter_filters_list_bin_resource_type_conditions import ParameterFiltersListBinResourceTypeConditions
+from typing import Optional, Set
+from typing_extensions import Self
+
+class ParameterFiltersListBinResourceType(BaseModel):
+ """
+ Resource type of the resource moved to the bin.
+ """ # noqa: E501
+ conditions: Optional[ParameterFiltersListBinResourceTypeConditions] = None
+ __properties: ClassVar[List[str]] = ["conditions"]
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of ParameterFiltersListBinResourceType from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([
+ ])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ # override the default output from pydantic by calling `to_dict()` of conditions
+ if self.conditions:
+ _dict['conditions'] = self.conditions.to_dict()
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of ParameterFiltersListBinResourceType from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "conditions": ParameterFiltersListBinResourceTypeConditions.from_dict(obj["conditions"]) if obj.get("conditions") is not None else None
+ })
+ return _obj
+
+
diff --git a/voucherify/models/parameter_filters_list_bin_resource_type_conditions.py b/voucherify/models/parameter_filters_list_bin_resource_type_conditions.py
new file mode 100644
index 00000000..896d62bf
--- /dev/null
+++ b/voucherify/models/parameter_filters_list_bin_resource_type_conditions.py
@@ -0,0 +1,184 @@
+# coding: utf-8
+
+"""
+ Voucherify API
+
+ Voucherify promotion engine REST API. Please see https://docs.voucherify.io/docs for more details.
+
+ The version of the OpenAPI document: v2018-08-01
+ Contact: support@voucherify.io
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator
+from typing import Any, ClassVar, Dict, List, Optional
+from typing import Optional, Set
+from typing_extensions import Self
+
+class ParameterFiltersListBinResourceTypeConditions(BaseModel):
+ """
+ ParameterFiltersListBinResourceTypeConditions
+ """ # noqa: E501
+ var_in: Optional[List[StrictStr]] = Field(default=None, description="Array of resource values that should be included in the results (multiple values).", alias="$in")
+ not_in: Optional[List[StrictStr]] = Field(default=None, description="Array of resource values that should be included in the results (multiple values).", alias="$not_in")
+ var_is: Optional[StrictStr] = Field(default=None, description="Value is exactly this value (single value).", alias="$is")
+ is_not: Optional[StrictStr] = Field(default=None, description="Results omit this value (single value).", alias="$is_not")
+ has_value: Optional[StrictStr] = Field(default=None, description="Value is NOT null. The value for this parameter is an empty string.", alias="$has_value")
+ is_unknown: Optional[StrictStr] = Field(default=None, description="Value is null. The value for this parameter is an empty string.", alias="$is_unknown")
+ starts_with: Optional[StrictStr] = Field(default=None, description="Value starts with the specified string.", alias="$starts_with")
+ ends_with: Optional[StrictStr] = Field(default=None, description="Value ends with the specified string.", alias="$ends_with")
+ __properties: ClassVar[List[str]] = ["$in", "$not_in", "$is", "$is_not", "$has_value", "$is_unknown", "$starts_with", "$ends_with"]
+
+ @field_validator('var_in')
+ def var_in_validate_enum(cls, value):
+ """Validates the enum"""
+ if value is None:
+ return value
+
+ for i in value:
+ if i not in set(['campaign', 'product', 'sku', 'voucher']):
+ raise ValueError("each list item must be one of ('campaign', 'product', 'sku', 'voucher')")
+ return value
+
+ @field_validator('not_in')
+ def not_in_validate_enum(cls, value):
+ """Validates the enum"""
+ if value is None:
+ return value
+
+ for i in value:
+ if i not in set(['campaign', 'product', 'sku', 'voucher']):
+ raise ValueError("each list item must be one of ('campaign', 'product', 'sku', 'voucher')")
+ return value
+
+ @field_validator('var_is')
+ def var_is_validate_enum(cls, value):
+ """Validates the enum"""
+ if value is None:
+ return value
+
+ if value not in set(['campaign', 'product', 'sku', 'voucher']):
+ raise ValueError("must be one of enum values ('campaign', 'product', 'sku', 'voucher')")
+ return value
+
+ @field_validator('is_not')
+ def is_not_validate_enum(cls, value):
+ """Validates the enum"""
+ if value is None:
+ return value
+
+ if value not in set(['campaign', 'product', 'sku', 'voucher']):
+ raise ValueError("must be one of enum values ('campaign', 'product', 'sku', 'voucher')")
+ return value
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of ParameterFiltersListBinResourceTypeConditions from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([
+ ])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ # set to None if var_in (nullable) is None
+ # and model_fields_set contains the field
+ if self.var_in is None and "var_in" in self.model_fields_set:
+ _dict['$in'] = None
+
+ # set to None if not_in (nullable) is None
+ # and model_fields_set contains the field
+ if self.not_in is None and "not_in" in self.model_fields_set:
+ _dict['$not_in'] = None
+
+ # set to None if var_is (nullable) is None
+ # and model_fields_set contains the field
+ if self.var_is is None and "var_is" in self.model_fields_set:
+ _dict['$is'] = None
+
+ # set to None if is_not (nullable) is None
+ # and model_fields_set contains the field
+ if self.is_not is None and "is_not" in self.model_fields_set:
+ _dict['$is_not'] = None
+
+ # set to None if has_value (nullable) is None
+ # and model_fields_set contains the field
+ if self.has_value is None and "has_value" in self.model_fields_set:
+ _dict['$has_value'] = None
+
+ # set to None if is_unknown (nullable) is None
+ # and model_fields_set contains the field
+ if self.is_unknown is None and "is_unknown" in self.model_fields_set:
+ _dict['$is_unknown'] = None
+
+ # set to None if starts_with (nullable) is None
+ # and model_fields_set contains the field
+ if self.starts_with is None and "starts_with" in self.model_fields_set:
+ _dict['$starts_with'] = None
+
+ # set to None if ends_with (nullable) is None
+ # and model_fields_set contains the field
+ if self.ends_with is None and "ends_with" in self.model_fields_set:
+ _dict['$ends_with'] = None
+
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of ParameterFiltersListBinResourceTypeConditions from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "$in": obj.get("$in"),
+ "$not_in": obj.get("$not_in"),
+ "$is": obj.get("$is"),
+ "$is_not": obj.get("$is_not"),
+ "$has_value": obj.get("$has_value"),
+ "$is_unknown": obj.get("$is_unknown"),
+ "$starts_with": obj.get("$starts_with"),
+ "$ends_with": obj.get("$ends_with")
+ })
+ return _obj
+
+
diff --git a/voucherify/models/parameter_filters_list_campaigns.py b/voucherify/models/parameter_filters_list_campaigns.py
new file mode 100644
index 00000000..1c17a12a
--- /dev/null
+++ b/voucherify/models/parameter_filters_list_campaigns.py
@@ -0,0 +1,155 @@
+# coding: utf-8
+
+"""
+ Voucherify API
+
+ Voucherify promotion engine REST API. Please see https://docs.voucherify.io/docs for more details.
+
+ The version of the OpenAPI document: v2018-08-01
+ Contact: support@voucherify.io
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict
+from typing import Any, ClassVar, Dict, List, Optional
+from voucherify.models.junction import Junction
+from voucherify.models.parameter_filters_list_campaigns_campaign_status import ParameterFiltersListCampaignsCampaignStatus
+from voucherify.models.parameter_filters_list_campaigns_categories import ParameterFiltersListCampaignsCategories
+from voucherify.models.parameter_filters_list_campaigns_category_ids import ParameterFiltersListCampaignsCategoryIds
+from voucherify.models.parameter_filters_list_campaigns_is_referral_code import ParameterFiltersListCampaignsIsReferralCode
+from voucherify.models.parameter_filters_list_campaigns_validity_timeframe import ParameterFiltersListCampaignsValidityTimeframe
+from voucherify.models.parameter_filters_list_campaigns_voucher_type import ParameterFiltersListCampaignsVoucherType
+from typing import Optional, Set
+from typing_extensions import Self
+
+class ParameterFiltersListCampaigns(BaseModel):
+ """
+ ParameterFiltersListCampaigns
+ """ # noqa: E501
+ campaign_status: Optional[ParameterFiltersListCampaignsCampaignStatus] = None
+ is_referral_code: Optional[ParameterFiltersListCampaignsIsReferralCode] = None
+ validity_timeframe: Optional[ParameterFiltersListCampaignsValidityTimeframe] = None
+ voucher_type: Optional[ParameterFiltersListCampaignsVoucherType] = None
+ categories: Optional[ParameterFiltersListCampaignsCategories] = None
+ category_ids: Optional[ParameterFiltersListCampaignsCategoryIds] = None
+ junction: Optional[Junction] = None
+ __properties: ClassVar[List[str]] = ["campaign_status", "is_referral_code", "validity_timeframe", "voucher_type", "categories", "category_ids", "junction"]
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of ParameterFiltersListCampaigns from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([
+ ])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ # override the default output from pydantic by calling `to_dict()` of campaign_status
+ if self.campaign_status:
+ _dict['campaign_status'] = self.campaign_status.to_dict()
+ # override the default output from pydantic by calling `to_dict()` of is_referral_code
+ if self.is_referral_code:
+ _dict['is_referral_code'] = self.is_referral_code.to_dict()
+ # override the default output from pydantic by calling `to_dict()` of validity_timeframe
+ if self.validity_timeframe:
+ _dict['validity_timeframe'] = self.validity_timeframe.to_dict()
+ # override the default output from pydantic by calling `to_dict()` of voucher_type
+ if self.voucher_type:
+ _dict['voucher_type'] = self.voucher_type.to_dict()
+ # override the default output from pydantic by calling `to_dict()` of categories
+ if self.categories:
+ _dict['categories'] = self.categories.to_dict()
+ # override the default output from pydantic by calling `to_dict()` of category_ids
+ if self.category_ids:
+ _dict['category_ids'] = self.category_ids.to_dict()
+ # set to None if campaign_status (nullable) is None
+ # and model_fields_set contains the field
+ if self.campaign_status is None and "campaign_status" in self.model_fields_set:
+ _dict['campaign_status'] = None
+
+ # set to None if is_referral_code (nullable) is None
+ # and model_fields_set contains the field
+ if self.is_referral_code is None and "is_referral_code" in self.model_fields_set:
+ _dict['is_referral_code'] = None
+
+ # set to None if validity_timeframe (nullable) is None
+ # and model_fields_set contains the field
+ if self.validity_timeframe is None and "validity_timeframe" in self.model_fields_set:
+ _dict['validity_timeframe'] = None
+
+ # set to None if voucher_type (nullable) is None
+ # and model_fields_set contains the field
+ if self.voucher_type is None and "voucher_type" in self.model_fields_set:
+ _dict['voucher_type'] = None
+
+ # set to None if categories (nullable) is None
+ # and model_fields_set contains the field
+ if self.categories is None and "categories" in self.model_fields_set:
+ _dict['categories'] = None
+
+ # set to None if category_ids (nullable) is None
+ # and model_fields_set contains the field
+ if self.category_ids is None and "category_ids" in self.model_fields_set:
+ _dict['category_ids'] = None
+
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of ParameterFiltersListCampaigns from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "campaign_status": ParameterFiltersListCampaignsCampaignStatus.from_dict(obj["campaign_status"]) if obj.get("campaign_status") is not None else None,
+ "is_referral_code": ParameterFiltersListCampaignsIsReferralCode.from_dict(obj["is_referral_code"]) if obj.get("is_referral_code") is not None else None,
+ "validity_timeframe": ParameterFiltersListCampaignsValidityTimeframe.from_dict(obj["validity_timeframe"]) if obj.get("validity_timeframe") is not None else None,
+ "voucher_type": ParameterFiltersListCampaignsVoucherType.from_dict(obj["voucher_type"]) if obj.get("voucher_type") is not None else None,
+ "categories": ParameterFiltersListCampaignsCategories.from_dict(obj["categories"]) if obj.get("categories") is not None else None,
+ "category_ids": ParameterFiltersListCampaignsCategoryIds.from_dict(obj["category_ids"]) if obj.get("category_ids") is not None else None,
+ "junction": obj.get("junction")
+ })
+ return _obj
+
+
diff --git a/voucherify/models/parameter_filters_list_campaigns_campaign_status.py b/voucherify/models/parameter_filters_list_campaigns_campaign_status.py
new file mode 100644
index 00000000..07a22e27
--- /dev/null
+++ b/voucherify/models/parameter_filters_list_campaigns_campaign_status.py
@@ -0,0 +1,92 @@
+# coding: utf-8
+
+"""
+ Voucherify API
+
+ Voucherify promotion engine REST API. Please see https://docs.voucherify.io/docs for more details.
+
+ The version of the OpenAPI document: v2018-08-01
+ Contact: support@voucherify.io
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict
+from typing import Any, ClassVar, Dict, List, Optional
+from voucherify.models.parameter_filters_list_campaigns_campaign_status_conditions import ParameterFiltersListCampaignsCampaignStatusConditions
+from typing import Optional, Set
+from typing_extensions import Self
+
+class ParameterFiltersListCampaignsCampaignStatus(BaseModel):
+ """
+ Type of the campaign. Allowed values: `DONE`, `IN_PROGRESS`, `DRAFT`, `FAILED` `MODIFYING`
+ """ # noqa: E501
+ conditions: Optional[ParameterFiltersListCampaignsCampaignStatusConditions] = None
+ __properties: ClassVar[List[str]] = ["conditions"]
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of ParameterFiltersListCampaignsCampaignStatus from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([
+ ])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ # override the default output from pydantic by calling `to_dict()` of conditions
+ if self.conditions:
+ _dict['conditions'] = self.conditions.to_dict()
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of ParameterFiltersListCampaignsCampaignStatus from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "conditions": ParameterFiltersListCampaignsCampaignStatusConditions.from_dict(obj["conditions"]) if obj.get("conditions") is not None else None
+ })
+ return _obj
+
+
diff --git a/voucherify/models/parameter_filters_list_campaigns_campaign_status_conditions.py b/voucherify/models/parameter_filters_list_campaigns_campaign_status_conditions.py
new file mode 100644
index 00000000..958db3da
--- /dev/null
+++ b/voucherify/models/parameter_filters_list_campaigns_campaign_status_conditions.py
@@ -0,0 +1,184 @@
+# coding: utf-8
+
+"""
+ Voucherify API
+
+ Voucherify promotion engine REST API. Please see https://docs.voucherify.io/docs for more details.
+
+ The version of the OpenAPI document: v2018-08-01
+ Contact: support@voucherify.io
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator
+from typing import Any, ClassVar, Dict, List, Optional
+from typing import Optional, Set
+from typing_extensions import Self
+
+class ParameterFiltersListCampaignsCampaignStatusConditions(BaseModel):
+ """
+ ParameterFiltersListCampaignsCampaignStatusConditions
+ """ # noqa: E501
+ var_in: Optional[List[StrictStr]] = Field(default=None, description="Array of resource values that should be included in the results (multiple values).", alias="$in")
+ not_in: Optional[List[StrictStr]] = Field(default=None, description="Array of resource values that should be included in the results (multiple values).", alias="$not_in")
+ var_is: Optional[StrictStr] = Field(default=None, description="Value is exactly this value (single value).", alias="$is")
+ is_not: Optional[StrictStr] = Field(default=None, description="Results omit this value (single value).", alias="$is_not")
+ has_value: Optional[StrictStr] = Field(default=None, description="Value is NOT null. The value for this parameter is an empty string.", alias="$has_value")
+ is_unknown: Optional[StrictStr] = Field(default=None, description="Value is null. The value for this parameter is an empty string.", alias="$is_unknown")
+ starts_with: Optional[StrictStr] = Field(default=None, description="Value starts with the specified string.", alias="$starts_with")
+ ends_with: Optional[StrictStr] = Field(default=None, description="Value ends with the specified string.", alias="$ends_with")
+ __properties: ClassVar[List[str]] = ["$in", "$not_in", "$is", "$is_not", "$has_value", "$is_unknown", "$starts_with", "$ends_with"]
+
+ @field_validator('var_in')
+ def var_in_validate_enum(cls, value):
+ """Validates the enum"""
+ if value is None:
+ return value
+
+ for i in value:
+ if i not in set(['DONE', 'IN_PROGRESS', 'FAILED', 'DRAFT', 'MODIFYING']):
+ raise ValueError("each list item must be one of ('DONE', 'IN_PROGRESS', 'FAILED', 'DRAFT', 'MODIFYING')")
+ return value
+
+ @field_validator('not_in')
+ def not_in_validate_enum(cls, value):
+ """Validates the enum"""
+ if value is None:
+ return value
+
+ for i in value:
+ if i not in set(['DONE', 'IN_PROGRESS', 'FAILED', 'DRAFT', 'MODIFYING']):
+ raise ValueError("each list item must be one of ('DONE', 'IN_PROGRESS', 'FAILED', 'DRAFT', 'MODIFYING')")
+ return value
+
+ @field_validator('var_is')
+ def var_is_validate_enum(cls, value):
+ """Validates the enum"""
+ if value is None:
+ return value
+
+ if value not in set(['DONE', 'IN_PROGRESS', 'FAILED', 'DRAFT', 'MODIFYING']):
+ raise ValueError("must be one of enum values ('DONE', 'IN_PROGRESS', 'FAILED', 'DRAFT', 'MODIFYING')")
+ return value
+
+ @field_validator('is_not')
+ def is_not_validate_enum(cls, value):
+ """Validates the enum"""
+ if value is None:
+ return value
+
+ if value not in set(['DONE', 'IN_PROGRESS', 'FAILED', 'DRAFT', 'MODIFYING']):
+ raise ValueError("must be one of enum values ('DONE', 'IN_PROGRESS', 'FAILED', 'DRAFT', 'MODIFYING')")
+ return value
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of ParameterFiltersListCampaignsCampaignStatusConditions from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([
+ ])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ # set to None if var_in (nullable) is None
+ # and model_fields_set contains the field
+ if self.var_in is None and "var_in" in self.model_fields_set:
+ _dict['$in'] = None
+
+ # set to None if not_in (nullable) is None
+ # and model_fields_set contains the field
+ if self.not_in is None and "not_in" in self.model_fields_set:
+ _dict['$not_in'] = None
+
+ # set to None if var_is (nullable) is None
+ # and model_fields_set contains the field
+ if self.var_is is None and "var_is" in self.model_fields_set:
+ _dict['$is'] = None
+
+ # set to None if is_not (nullable) is None
+ # and model_fields_set contains the field
+ if self.is_not is None and "is_not" in self.model_fields_set:
+ _dict['$is_not'] = None
+
+ # set to None if has_value (nullable) is None
+ # and model_fields_set contains the field
+ if self.has_value is None and "has_value" in self.model_fields_set:
+ _dict['$has_value'] = None
+
+ # set to None if is_unknown (nullable) is None
+ # and model_fields_set contains the field
+ if self.is_unknown is None and "is_unknown" in self.model_fields_set:
+ _dict['$is_unknown'] = None
+
+ # set to None if starts_with (nullable) is None
+ # and model_fields_set contains the field
+ if self.starts_with is None and "starts_with" in self.model_fields_set:
+ _dict['$starts_with'] = None
+
+ # set to None if ends_with (nullable) is None
+ # and model_fields_set contains the field
+ if self.ends_with is None and "ends_with" in self.model_fields_set:
+ _dict['$ends_with'] = None
+
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of ParameterFiltersListCampaignsCampaignStatusConditions from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "$in": obj.get("$in"),
+ "$not_in": obj.get("$not_in"),
+ "$is": obj.get("$is"),
+ "$is_not": obj.get("$is_not"),
+ "$has_value": obj.get("$has_value"),
+ "$is_unknown": obj.get("$is_unknown"),
+ "$starts_with": obj.get("$starts_with"),
+ "$ends_with": obj.get("$ends_with")
+ })
+ return _obj
+
+
diff --git a/voucherify/models/parameter_filters_list_campaigns_categories.py b/voucherify/models/parameter_filters_list_campaigns_categories.py
new file mode 100644
index 00000000..3e33a4a9
--- /dev/null
+++ b/voucherify/models/parameter_filters_list_campaigns_categories.py
@@ -0,0 +1,92 @@
+# coding: utf-8
+
+"""
+ Voucherify API
+
+ Voucherify promotion engine REST API. Please see https://docs.voucherify.io/docs for more details.
+
+ The version of the OpenAPI document: v2018-08-01
+ Contact: support@voucherify.io
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict
+from typing import Any, ClassVar, Dict, List, Optional
+from voucherify.models.filter_conditions_string import FilterConditionsString
+from typing import Optional, Set
+from typing_extensions import Self
+
+class ParameterFiltersListCampaignsCategories(BaseModel):
+ """
+ Filter by categories names
+ """ # noqa: E501
+ conditions: Optional[FilterConditionsString] = None
+ __properties: ClassVar[List[str]] = ["conditions"]
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of ParameterFiltersListCampaignsCategories from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([
+ ])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ # override the default output from pydantic by calling `to_dict()` of conditions
+ if self.conditions:
+ _dict['conditions'] = self.conditions.to_dict()
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of ParameterFiltersListCampaignsCategories from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "conditions": FilterConditionsString.from_dict(obj["conditions"]) if obj.get("conditions") is not None else None
+ })
+ return _obj
+
+
diff --git a/voucherify/models/parameter_filters_list_campaigns_category_ids.py b/voucherify/models/parameter_filters_list_campaigns_category_ids.py
new file mode 100644
index 00000000..8f44c217
--- /dev/null
+++ b/voucherify/models/parameter_filters_list_campaigns_category_ids.py
@@ -0,0 +1,92 @@
+# coding: utf-8
+
+"""
+ Voucherify API
+
+ Voucherify promotion engine REST API. Please see https://docs.voucherify.io/docs for more details.
+
+ The version of the OpenAPI document: v2018-08-01
+ Contact: support@voucherify.io
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict
+from typing import Any, ClassVar, Dict, List, Optional
+from voucherify.models.filter_conditions_string import FilterConditionsString
+from typing import Optional, Set
+from typing_extensions import Self
+
+class ParameterFiltersListCampaignsCategoryIds(BaseModel):
+ """
+ Filter by categories ids
+ """ # noqa: E501
+ conditions: Optional[FilterConditionsString] = None
+ __properties: ClassVar[List[str]] = ["conditions"]
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of ParameterFiltersListCampaignsCategoryIds from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([
+ ])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ # override the default output from pydantic by calling `to_dict()` of conditions
+ if self.conditions:
+ _dict['conditions'] = self.conditions.to_dict()
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of ParameterFiltersListCampaignsCategoryIds from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "conditions": FilterConditionsString.from_dict(obj["conditions"]) if obj.get("conditions") is not None else None
+ })
+ return _obj
+
+
diff --git a/voucherify/models/parameter_filters_list_campaigns_is_referral_code.py b/voucherify/models/parameter_filters_list_campaigns_is_referral_code.py
new file mode 100644
index 00000000..0625dfd5
--- /dev/null
+++ b/voucherify/models/parameter_filters_list_campaigns_is_referral_code.py
@@ -0,0 +1,120 @@
+# coding: utf-8
+
+"""
+ Voucherify API
+
+ Voucherify promotion engine REST API. Please see https://docs.voucherify.io/docs for more details.
+
+ The version of the OpenAPI document: v2018-08-01
+ Contact: support@voucherify.io
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator
+from typing import Any, ClassVar, Dict, List, Optional
+from typing import Optional, Set
+from typing_extensions import Self
+
+class ParameterFiltersListCampaignsIsReferralCode(BaseModel):
+ """
+
+ """ # noqa: E501
+ var_is: Optional[StrictStr] = Field(default=None, description="Value is exactly this value (single value).", alias="$is")
+ is_not: Optional[StrictStr] = Field(default=None, description="Results omit this value (single value).", alias="$is_not")
+ __properties: ClassVar[List[str]] = ["$is", "$is_not"]
+
+ @field_validator('var_is')
+ def var_is_validate_enum(cls, value):
+ """Validates the enum"""
+ if value is None:
+ return value
+
+ if value not in set(['TRUE', 'FALSE']):
+ raise ValueError("must be one of enum values ('TRUE', 'FALSE')")
+ return value
+
+ @field_validator('is_not')
+ def is_not_validate_enum(cls, value):
+ """Validates the enum"""
+ if value is None:
+ return value
+
+ if value not in set(['TRUE', 'FALSE']):
+ raise ValueError("must be one of enum values ('TRUE', 'FALSE')")
+ return value
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of ParameterFiltersListCampaignsIsReferralCode from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([
+ ])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ # set to None if var_is (nullable) is None
+ # and model_fields_set contains the field
+ if self.var_is is None and "var_is" in self.model_fields_set:
+ _dict['$is'] = None
+
+ # set to None if is_not (nullable) is None
+ # and model_fields_set contains the field
+ if self.is_not is None and "is_not" in self.model_fields_set:
+ _dict['$is_not'] = None
+
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of ParameterFiltersListCampaignsIsReferralCode from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "$is": obj.get("$is"),
+ "$is_not": obj.get("$is_not")
+ })
+ return _obj
+
+
diff --git a/voucherify/models/parameter_filters_list_campaigns_validity_timeframe.py b/voucherify/models/parameter_filters_list_campaigns_validity_timeframe.py
new file mode 100644
index 00000000..6cb32e6c
--- /dev/null
+++ b/voucherify/models/parameter_filters_list_campaigns_validity_timeframe.py
@@ -0,0 +1,92 @@
+# coding: utf-8
+
+"""
+ Voucherify API
+
+ Voucherify promotion engine REST API. Please see https://docs.voucherify.io/docs for more details.
+
+ The version of the OpenAPI document: v2018-08-01
+ Contact: support@voucherify.io
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict
+from typing import Any, ClassVar, Dict, List, Optional
+from voucherify.models.filter_conditions_date_time import FilterConditionsDateTime
+from typing import Optional, Set
+from typing_extensions import Self
+
+class ParameterFiltersListCampaignsValidityTimeframe(BaseModel):
+ """
+ Filter by validity timeframe
+ """ # noqa: E501
+ conditions: Optional[FilterConditionsDateTime] = None
+ __properties: ClassVar[List[str]] = ["conditions"]
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of ParameterFiltersListCampaignsValidityTimeframe from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([
+ ])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ # override the default output from pydantic by calling `to_dict()` of conditions
+ if self.conditions:
+ _dict['conditions'] = self.conditions.to_dict()
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of ParameterFiltersListCampaignsValidityTimeframe from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "conditions": FilterConditionsDateTime.from_dict(obj["conditions"]) if obj.get("conditions") is not None else None
+ })
+ return _obj
+
+
diff --git a/voucherify/models/parameter_filters_list_campaigns_voucher_type.py b/voucherify/models/parameter_filters_list_campaigns_voucher_type.py
new file mode 100644
index 00000000..d9cbf990
--- /dev/null
+++ b/voucherify/models/parameter_filters_list_campaigns_voucher_type.py
@@ -0,0 +1,92 @@
+# coding: utf-8
+
+"""
+ Voucherify API
+
+ Voucherify promotion engine REST API. Please see https://docs.voucherify.io/docs for more details.
+
+ The version of the OpenAPI document: v2018-08-01
+ Contact: support@voucherify.io
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict
+from typing import Any, ClassVar, Dict, List, Optional
+from voucherify.models.filter_conditions_string import FilterConditionsString
+from typing import Optional, Set
+from typing_extensions import Self
+
+class ParameterFiltersListCampaignsVoucherType(BaseModel):
+ """
+ Filter by voucher type
+ """ # noqa: E501
+ conditions: Optional[FilterConditionsString] = None
+ __properties: ClassVar[List[str]] = ["conditions"]
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of ParameterFiltersListCampaignsVoucherType from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([
+ ])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ # override the default output from pydantic by calling `to_dict()` of conditions
+ if self.conditions:
+ _dict['conditions'] = self.conditions.to_dict()
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of ParameterFiltersListCampaignsVoucherType from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "conditions": FilterConditionsString.from_dict(obj["conditions"]) if obj.get("conditions") is not None else None
+ })
+ return _obj
+
+
diff --git a/voucherify/models/parameter_filters_list_customer_redeemables.py b/voucherify/models/parameter_filters_list_customer_redeemables.py
index da4fef5f..26ce5428 100644
--- a/voucherify/models/parameter_filters_list_customer_redeemables.py
+++ b/voucherify/models/parameter_filters_list_customer_redeemables.py
@@ -20,6 +20,7 @@
from pydantic import BaseModel, ConfigDict
from typing import Any, ClassVar, Dict, List, Optional
+from voucherify.models.junction import Junction
from voucherify.models.parameter_filters_list_customer_redeemables_campaign_id import ParameterFiltersListCustomerRedeemablesCampaignId
from voucherify.models.parameter_filters_list_customer_redeemables_campaign_type import ParameterFiltersListCustomerRedeemablesCampaignType
from voucherify.models.parameter_filters_list_customer_redeemables_created_at import ParameterFiltersListCustomerRedeemablesCreatedAt
@@ -43,7 +44,8 @@ class ParameterFiltersListCustomerRedeemables(BaseModel):
campaign_id: Optional[ParameterFiltersListCustomerRedeemablesCampaignId] = None
campaign_type: Optional[ParameterFiltersListCustomerRedeemablesCampaignType] = None
voucher_type: Optional[ParameterFiltersListCustomerRedeemablesVoucherType] = None
- __properties: ClassVar[List[str]] = ["id", "created_at", "redeemable_id", "redeemable_object", "holder_role", "campaign_id", "campaign_type", "voucher_type"]
+ junction: Optional[Junction] = None
+ __properties: ClassVar[List[str]] = ["id", "created_at", "redeemable_id", "redeemable_object", "holder_role", "campaign_id", "campaign_type", "voucher_type", "junction"]
model_config = ConfigDict(
populate_by_name=True,
@@ -167,7 +169,8 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
"holder_role": ParameterFiltersListCustomerRedeemablesHolderRole.from_dict(obj["holder_role"]) if obj.get("holder_role") is not None else None,
"campaign_id": ParameterFiltersListCustomerRedeemablesCampaignId.from_dict(obj["campaign_id"]) if obj.get("campaign_id") is not None else None,
"campaign_type": ParameterFiltersListCustomerRedeemablesCampaignType.from_dict(obj["campaign_type"]) if obj.get("campaign_type") is not None else None,
- "voucher_type": ParameterFiltersListCustomerRedeemablesVoucherType.from_dict(obj["voucher_type"]) if obj.get("voucher_type") is not None else None
+ "voucher_type": ParameterFiltersListCustomerRedeemablesVoucherType.from_dict(obj["voucher_type"]) if obj.get("voucher_type") is not None else None,
+ "junction": obj.get("junction")
})
return _obj
diff --git a/voucherify/models/parameter_filters_list_customer_redeemables_campaign_id.py b/voucherify/models/parameter_filters_list_customer_redeemables_campaign_id.py
index a82a30f4..666273f9 100644
--- a/voucherify/models/parameter_filters_list_customer_redeemables_campaign_id.py
+++ b/voucherify/models/parameter_filters_list_customer_redeemables_campaign_id.py
@@ -21,7 +21,6 @@
from pydantic import BaseModel, ConfigDict
from typing import Any, ClassVar, Dict, List, Optional
from voucherify.models.filter_conditions_string import FilterConditionsString
-from voucherify.models.junction import Junction
from typing import Optional, Set
from typing_extensions import Self
@@ -30,8 +29,7 @@ class ParameterFiltersListCustomerRedeemablesCampaignId(BaseModel):
Unique campaign identifer, e.g. `camp_bfrwAVsP6Q1EM1ZjgHwheKYr`.
""" # noqa: E501
conditions: Optional[FilterConditionsString] = None
- junction: Optional[Junction] = None
- __properties: ClassVar[List[str]] = ["conditions", "junction"]
+ __properties: ClassVar[List[str]] = ["conditions"]
model_config = ConfigDict(
populate_by_name=True,
@@ -87,8 +85,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
return cls.model_validate(obj)
_obj = cls.model_validate({
- "conditions": FilterConditionsString.from_dict(obj["conditions"]) if obj.get("conditions") is not None else None,
- "junction": obj.get("junction")
+ "conditions": FilterConditionsString.from_dict(obj["conditions"]) if obj.get("conditions") is not None else None
})
return _obj
diff --git a/voucherify/models/parameter_filters_list_customer_redeemables_campaign_type.py b/voucherify/models/parameter_filters_list_customer_redeemables_campaign_type.py
index a41cf1de..d9449032 100644
--- a/voucherify/models/parameter_filters_list_customer_redeemables_campaign_type.py
+++ b/voucherify/models/parameter_filters_list_customer_redeemables_campaign_type.py
@@ -20,7 +20,6 @@
from pydantic import BaseModel, ConfigDict
from typing import Any, ClassVar, Dict, List, Optional
-from voucherify.models.junction import Junction
from voucherify.models.parameter_filters_list_customer_redeemables_campaign_type_conditions import ParameterFiltersListCustomerRedeemablesCampaignTypeConditions
from typing import Optional, Set
from typing_extensions import Self
@@ -30,8 +29,7 @@ class ParameterFiltersListCustomerRedeemablesCampaignType(BaseModel):
Type of the campaign. Allowed values: `DISCOUNT_COUPONS`, `REFERRAL_PROGRAM`, `GIFT_VOUCHERS`, `LOYALTY_PROGRAM`
""" # noqa: E501
conditions: Optional[ParameterFiltersListCustomerRedeemablesCampaignTypeConditions] = None
- junction: Optional[Junction] = None
- __properties: ClassVar[List[str]] = ["conditions", "junction"]
+ __properties: ClassVar[List[str]] = ["conditions"]
model_config = ConfigDict(
populate_by_name=True,
@@ -87,8 +85,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
return cls.model_validate(obj)
_obj = cls.model_validate({
- "conditions": ParameterFiltersListCustomerRedeemablesCampaignTypeConditions.from_dict(obj["conditions"]) if obj.get("conditions") is not None else None,
- "junction": obj.get("junction")
+ "conditions": ParameterFiltersListCustomerRedeemablesCampaignTypeConditions.from_dict(obj["conditions"]) if obj.get("conditions") is not None else None
})
return _obj
diff --git a/voucherify/models/parameter_filters_list_customer_redeemables_created_at.py b/voucherify/models/parameter_filters_list_customer_redeemables_created_at.py
index e241b5f7..52b2b080 100644
--- a/voucherify/models/parameter_filters_list_customer_redeemables_created_at.py
+++ b/voucherify/models/parameter_filters_list_customer_redeemables_created_at.py
@@ -20,8 +20,7 @@
from pydantic import BaseModel, ConfigDict
from typing import Any, ClassVar, Dict, List, Optional
-from voucherify.models.junction import Junction
-from voucherify.models.parameter_filters_list_customer_redeemables_created_at_conditions import ParameterFiltersListCustomerRedeemablesCreatedAtConditions
+from voucherify.models.filter_conditions_date_time import FilterConditionsDateTime
from typing import Optional, Set
from typing_extensions import Self
@@ -29,9 +28,8 @@ class ParameterFiltersListCustomerRedeemablesCreatedAt(BaseModel):
"""
Timestamp representing the date and time when the customer redeemable was created. The value is shown in the ISO 8601 format.
""" # noqa: E501
- conditions: Optional[ParameterFiltersListCustomerRedeemablesCreatedAtConditions] = None
- junction: Optional[Junction] = None
- __properties: ClassVar[List[str]] = ["conditions", "junction"]
+ conditions: Optional[FilterConditionsDateTime] = None
+ __properties: ClassVar[List[str]] = ["conditions"]
model_config = ConfigDict(
populate_by_name=True,
@@ -75,11 +73,6 @@ def to_dict(self) -> Dict[str, Any]:
# override the default output from pydantic by calling `to_dict()` of conditions
if self.conditions:
_dict['conditions'] = self.conditions.to_dict()
- # set to None if conditions (nullable) is None
- # and model_fields_set contains the field
- if self.conditions is None and "conditions" in self.model_fields_set:
- _dict['conditions'] = None
-
return _dict
@classmethod
@@ -92,8 +85,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
return cls.model_validate(obj)
_obj = cls.model_validate({
- "conditions": ParameterFiltersListCustomerRedeemablesCreatedAtConditions.from_dict(obj["conditions"]) if obj.get("conditions") is not None else None,
- "junction": obj.get("junction")
+ "conditions": FilterConditionsDateTime.from_dict(obj["conditions"]) if obj.get("conditions") is not None else None
})
return _obj
diff --git a/voucherify/models/parameter_filters_list_customer_redeemables_holder_role.py b/voucherify/models/parameter_filters_list_customer_redeemables_holder_role.py
index b7fce07a..30598bdb 100644
--- a/voucherify/models/parameter_filters_list_customer_redeemables_holder_role.py
+++ b/voucherify/models/parameter_filters_list_customer_redeemables_holder_role.py
@@ -20,7 +20,6 @@
from pydantic import BaseModel, ConfigDict
from typing import Any, ClassVar, Dict, List, Optional
-from voucherify.models.junction import Junction
from voucherify.models.parameter_filters_list_customer_redeemables_holder_role_conditions import ParameterFiltersListCustomerRedeemablesHolderRoleConditions
from typing import Optional, Set
from typing_extensions import Self
@@ -30,8 +29,7 @@ class ParameterFiltersListCustomerRedeemablesHolderRole(BaseModel):
Holder role of the redeemable. Allowed values: `OWNER`, `REFEREE`, `REFERRER`.
""" # noqa: E501
conditions: Optional[ParameterFiltersListCustomerRedeemablesHolderRoleConditions] = None
- junction: Optional[Junction] = None
- __properties: ClassVar[List[str]] = ["conditions", "junction"]
+ __properties: ClassVar[List[str]] = ["conditions"]
model_config = ConfigDict(
populate_by_name=True,
@@ -87,8 +85,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
return cls.model_validate(obj)
_obj = cls.model_validate({
- "conditions": ParameterFiltersListCustomerRedeemablesHolderRoleConditions.from_dict(obj["conditions"]) if obj.get("conditions") is not None else None,
- "junction": obj.get("junction")
+ "conditions": ParameterFiltersListCustomerRedeemablesHolderRoleConditions.from_dict(obj["conditions"]) if obj.get("conditions") is not None else None
})
return _obj
diff --git a/voucherify/models/parameter_filters_list_customer_redeemables_id.py b/voucherify/models/parameter_filters_list_customer_redeemables_id.py
index f940c0a4..4c1c9dbc 100644
--- a/voucherify/models/parameter_filters_list_customer_redeemables_id.py
+++ b/voucherify/models/parameter_filters_list_customer_redeemables_id.py
@@ -21,7 +21,6 @@
from pydantic import BaseModel, ConfigDict
from typing import Any, ClassVar, Dict, List, Optional
from voucherify.models.filter_conditions_string import FilterConditionsString
-from voucherify.models.junction import Junction
from typing import Optional, Set
from typing_extensions import Self
@@ -30,8 +29,7 @@ class ParameterFiltersListCustomerRedeemablesId(BaseModel):
Unique redeemable holder ID, i.e. `rh_0e77502f84f0f4a6a8`.
""" # noqa: E501
conditions: Optional[FilterConditionsString] = None
- junction: Optional[Junction] = None
- __properties: ClassVar[List[str]] = ["conditions", "junction"]
+ __properties: ClassVar[List[str]] = ["conditions"]
model_config = ConfigDict(
populate_by_name=True,
@@ -87,8 +85,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
return cls.model_validate(obj)
_obj = cls.model_validate({
- "conditions": FilterConditionsString.from_dict(obj["conditions"]) if obj.get("conditions") is not None else None,
- "junction": obj.get("junction")
+ "conditions": FilterConditionsString.from_dict(obj["conditions"]) if obj.get("conditions") is not None else None
})
return _obj
diff --git a/voucherify/models/parameter_filters_list_customer_redeemables_redeemable_id.py b/voucherify/models/parameter_filters_list_customer_redeemables_redeemable_id.py
index 0fa74f66..75afb377 100644
--- a/voucherify/models/parameter_filters_list_customer_redeemables_redeemable_id.py
+++ b/voucherify/models/parameter_filters_list_customer_redeemables_redeemable_id.py
@@ -21,7 +21,6 @@
from pydantic import BaseModel, ConfigDict
from typing import Any, ClassVar, Dict, List, Optional
from voucherify.models.filter_conditions_string import FilterConditionsString
-from voucherify.models.junction import Junction
from typing import Optional, Set
from typing_extensions import Self
@@ -30,8 +29,7 @@ class ParameterFiltersListCustomerRedeemablesRedeemableId(BaseModel):
Unique redeemable ID, e.g. `v_hS8JFl8S6lNcd1L69wLIoXgTio7eWEgk`.
""" # noqa: E501
conditions: Optional[FilterConditionsString] = None
- junction: Optional[Junction] = None
- __properties: ClassVar[List[str]] = ["conditions", "junction"]
+ __properties: ClassVar[List[str]] = ["conditions"]
model_config = ConfigDict(
populate_by_name=True,
@@ -87,8 +85,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
return cls.model_validate(obj)
_obj = cls.model_validate({
- "conditions": FilterConditionsString.from_dict(obj["conditions"]) if obj.get("conditions") is not None else None,
- "junction": obj.get("junction")
+ "conditions": FilterConditionsString.from_dict(obj["conditions"]) if obj.get("conditions") is not None else None
})
return _obj
diff --git a/voucherify/models/parameter_filters_list_customer_redeemables_redeemable_object.py b/voucherify/models/parameter_filters_list_customer_redeemables_redeemable_object.py
index ff1d5417..fb0516c7 100644
--- a/voucherify/models/parameter_filters_list_customer_redeemables_redeemable_object.py
+++ b/voucherify/models/parameter_filters_list_customer_redeemables_redeemable_object.py
@@ -20,7 +20,6 @@
from pydantic import BaseModel, ConfigDict
from typing import Any, ClassVar, Dict, List, Optional
-from voucherify.models.junction import Junction
from voucherify.models.parameter_filters_list_customer_redeemables_redeemable_object_conditions import ParameterFiltersListCustomerRedeemablesRedeemableObjectConditions
from typing import Optional, Set
from typing_extensions import Self
@@ -30,8 +29,7 @@ class ParameterFiltersListCustomerRedeemablesRedeemableObject(BaseModel):
Unique related object, i.e. `voucher`.
""" # noqa: E501
conditions: Optional[ParameterFiltersListCustomerRedeemablesRedeemableObjectConditions] = None
- junction: Optional[Junction] = None
- __properties: ClassVar[List[str]] = ["conditions", "junction"]
+ __properties: ClassVar[List[str]] = ["conditions"]
model_config = ConfigDict(
populate_by_name=True,
@@ -87,8 +85,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
return cls.model_validate(obj)
_obj = cls.model_validate({
- "conditions": ParameterFiltersListCustomerRedeemablesRedeemableObjectConditions.from_dict(obj["conditions"]) if obj.get("conditions") is not None else None,
- "junction": obj.get("junction")
+ "conditions": ParameterFiltersListCustomerRedeemablesRedeemableObjectConditions.from_dict(obj["conditions"]) if obj.get("conditions") is not None else None
})
return _obj
diff --git a/voucherify/models/parameter_filters_list_customer_redeemables_voucher_type.py b/voucherify/models/parameter_filters_list_customer_redeemables_voucher_type.py
index fef821da..41f9f8b9 100644
--- a/voucherify/models/parameter_filters_list_customer_redeemables_voucher_type.py
+++ b/voucherify/models/parameter_filters_list_customer_redeemables_voucher_type.py
@@ -20,7 +20,6 @@
from pydantic import BaseModel, ConfigDict
from typing import Any, ClassVar, Dict, List, Optional
-from voucherify.models.junction import Junction
from voucherify.models.parameter_filters_list_customer_redeemables_voucher_type_conditions import ParameterFiltersListCustomerRedeemablesVoucherTypeConditions
from typing import Optional, Set
from typing_extensions import Self
@@ -30,8 +29,7 @@ class ParameterFiltersListCustomerRedeemablesVoucherType(BaseModel):
Type of the voucher. Allowed values: `DISCOUNT_VOUCHER`, `GIFT_VOUCHER`, `LOYALTY_CARD`.
""" # noqa: E501
conditions: Optional[ParameterFiltersListCustomerRedeemablesVoucherTypeConditions] = None
- junction: Optional[Junction] = None
- __properties: ClassVar[List[str]] = ["conditions", "junction"]
+ __properties: ClassVar[List[str]] = ["conditions"]
model_config = ConfigDict(
populate_by_name=True,
@@ -87,8 +85,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
return cls.model_validate(obj)
_obj = cls.model_validate({
- "conditions": ParameterFiltersListCustomerRedeemablesVoucherTypeConditions.from_dict(obj["conditions"]) if obj.get("conditions") is not None else None,
- "junction": obj.get("junction")
+ "conditions": ParameterFiltersListCustomerRedeemablesVoucherTypeConditions.from_dict(obj["conditions"]) if obj.get("conditions") is not None else None
})
return _obj
diff --git a/voucherify/models/parameter_filters_list_locations.py b/voucherify/models/parameter_filters_list_locations.py
new file mode 100644
index 00000000..8c50f1de
--- /dev/null
+++ b/voucherify/models/parameter_filters_list_locations.py
@@ -0,0 +1,119 @@
+# coding: utf-8
+
+"""
+ Voucherify API
+
+ Voucherify promotion engine REST API. Please see https://docs.voucherify.io/docs for more details.
+
+ The version of the OpenAPI document: v2018-08-01
+ Contact: support@voucherify.io
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict
+from typing import Any, ClassVar, Dict, List, Optional
+from voucherify.models.parameter_filters_list_locations_created_at import ParameterFiltersListLocationsCreatedAt
+from voucherify.models.parameter_filters_list_locations_name import ParameterFiltersListLocationsName
+from voucherify.models.parameter_filters_list_locations_updated_at import ParameterFiltersListLocationsUpdatedAt
+from typing import Optional, Set
+from typing_extensions import Self
+
+class ParameterFiltersListLocations(BaseModel):
+ """
+ ParameterFiltersListLocations
+ """ # noqa: E501
+ name: Optional[ParameterFiltersListLocationsName] = None
+ created_at: Optional[ParameterFiltersListLocationsCreatedAt] = None
+ updated_at: Optional[ParameterFiltersListLocationsUpdatedAt] = None
+ __properties: ClassVar[List[str]] = ["name", "created_at", "updated_at"]
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of ParameterFiltersListLocations from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([
+ ])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ # override the default output from pydantic by calling `to_dict()` of name
+ if self.name:
+ _dict['name'] = self.name.to_dict()
+ # override the default output from pydantic by calling `to_dict()` of created_at
+ if self.created_at:
+ _dict['created_at'] = self.created_at.to_dict()
+ # override the default output from pydantic by calling `to_dict()` of updated_at
+ if self.updated_at:
+ _dict['updated_at'] = self.updated_at.to_dict()
+ # set to None if name (nullable) is None
+ # and model_fields_set contains the field
+ if self.name is None and "name" in self.model_fields_set:
+ _dict['name'] = None
+
+ # set to None if created_at (nullable) is None
+ # and model_fields_set contains the field
+ if self.created_at is None and "created_at" in self.model_fields_set:
+ _dict['created_at'] = None
+
+ # set to None if updated_at (nullable) is None
+ # and model_fields_set contains the field
+ if self.updated_at is None and "updated_at" in self.model_fields_set:
+ _dict['updated_at'] = None
+
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of ParameterFiltersListLocations from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "name": ParameterFiltersListLocationsName.from_dict(obj["name"]) if obj.get("name") is not None else None,
+ "created_at": ParameterFiltersListLocationsCreatedAt.from_dict(obj["created_at"]) if obj.get("created_at") is not None else None,
+ "updated_at": ParameterFiltersListLocationsUpdatedAt.from_dict(obj["updated_at"]) if obj.get("updated_at") is not None else None
+ })
+ return _obj
+
+
diff --git a/voucherify/models/parameter_filters_list_locations_created_at.py b/voucherify/models/parameter_filters_list_locations_created_at.py
new file mode 100644
index 00000000..b1544791
--- /dev/null
+++ b/voucherify/models/parameter_filters_list_locations_created_at.py
@@ -0,0 +1,92 @@
+# coding: utf-8
+
+"""
+ Voucherify API
+
+ Voucherify promotion engine REST API. Please see https://docs.voucherify.io/docs for more details.
+
+ The version of the OpenAPI document: v2018-08-01
+ Contact: support@voucherify.io
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict
+from typing import Any, ClassVar, Dict, List, Optional
+from voucherify.models.filter_conditions_date_time import FilterConditionsDateTime
+from typing import Optional, Set
+from typing_extensions import Self
+
+class ParameterFiltersListLocationsCreatedAt(BaseModel):
+ """
+ Timestamp representing the date and time when the location was created. The value is shown in the ISO 8601 format.
+ """ # noqa: E501
+ conditions: Optional[FilterConditionsDateTime] = None
+ __properties: ClassVar[List[str]] = ["conditions"]
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of ParameterFiltersListLocationsCreatedAt from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([
+ ])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ # override the default output from pydantic by calling `to_dict()` of conditions
+ if self.conditions:
+ _dict['conditions'] = self.conditions.to_dict()
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of ParameterFiltersListLocationsCreatedAt from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "conditions": FilterConditionsDateTime.from_dict(obj["conditions"]) if obj.get("conditions") is not None else None
+ })
+ return _obj
+
+
diff --git a/voucherify/models/parameter_filters_list_locations_name.py b/voucherify/models/parameter_filters_list_locations_name.py
new file mode 100644
index 00000000..17e63192
--- /dev/null
+++ b/voucherify/models/parameter_filters_list_locations_name.py
@@ -0,0 +1,92 @@
+# coding: utf-8
+
+"""
+ Voucherify API
+
+ Voucherify promotion engine REST API. Please see https://docs.voucherify.io/docs for more details.
+
+ The version of the OpenAPI document: v2018-08-01
+ Contact: support@voucherify.io
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict
+from typing import Any, ClassVar, Dict, List, Optional
+from voucherify.models.filter_conditions_string import FilterConditionsString
+from typing import Optional, Set
+from typing_extensions import Self
+
+class ParameterFiltersListLocationsName(BaseModel):
+ """
+ ParameterFiltersListLocationsName
+ """ # noqa: E501
+ conditions: Optional[FilterConditionsString] = None
+ __properties: ClassVar[List[str]] = ["conditions"]
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of ParameterFiltersListLocationsName from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([
+ ])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ # override the default output from pydantic by calling `to_dict()` of conditions
+ if self.conditions:
+ _dict['conditions'] = self.conditions.to_dict()
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of ParameterFiltersListLocationsName from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "conditions": FilterConditionsString.from_dict(obj["conditions"]) if obj.get("conditions") is not None else None
+ })
+ return _obj
+
+
diff --git a/voucherify/models/parameter_filters_list_locations_updated_at.py b/voucherify/models/parameter_filters_list_locations_updated_at.py
new file mode 100644
index 00000000..165e1640
--- /dev/null
+++ b/voucherify/models/parameter_filters_list_locations_updated_at.py
@@ -0,0 +1,92 @@
+# coding: utf-8
+
+"""
+ Voucherify API
+
+ Voucherify promotion engine REST API. Please see https://docs.voucherify.io/docs for more details.
+
+ The version of the OpenAPI document: v2018-08-01
+ Contact: support@voucherify.io
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict
+from typing import Any, ClassVar, Dict, List, Optional
+from voucherify.models.filter_conditions_date_time import FilterConditionsDateTime
+from typing import Optional, Set
+from typing_extensions import Self
+
+class ParameterFiltersListLocationsUpdatedAt(BaseModel):
+ """
+ Timestamp representing the date and time when the location was updated. The value is shown in the ISO 8601 format.
+ """ # noqa: E501
+ conditions: Optional[FilterConditionsDateTime] = None
+ __properties: ClassVar[List[str]] = ["conditions"]
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of ParameterFiltersListLocationsUpdatedAt from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([
+ ])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ # override the default output from pydantic by calling `to_dict()` of conditions
+ if self.conditions:
+ _dict['conditions'] = self.conditions.to_dict()
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of ParameterFiltersListLocationsUpdatedAt from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "conditions": FilterConditionsDateTime.from_dict(obj["conditions"]) if obj.get("conditions") is not None else None
+ })
+ return _obj
+
+
diff --git a/voucherify/models/parameter_filters_list_publications.py b/voucherify/models/parameter_filters_list_publications.py
new file mode 100644
index 00000000..efe5f931
--- /dev/null
+++ b/voucherify/models/parameter_filters_list_publications.py
@@ -0,0 +1,188 @@
+# coding: utf-8
+
+"""
+ Voucherify API
+
+ Voucherify promotion engine REST API. Please see https://docs.voucherify.io/docs for more details.
+
+ The version of the OpenAPI document: v2018-08-01
+ Contact: support@voucherify.io
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict
+from typing import Any, ClassVar, Dict, List, Optional
+from voucherify.models.junction import Junction
+from voucherify.models.parameter_filters_list_publications_campaign_name import ParameterFiltersListPublicationsCampaignName
+from voucherify.models.parameter_filters_list_publications_customer_id import ParameterFiltersListPublicationsCustomerId
+from voucherify.models.parameter_filters_list_publications_failure_code import ParameterFiltersListPublicationsFailureCode
+from voucherify.models.parameter_filters_list_publications_is_referral_code import ParameterFiltersListPublicationsIsReferralCode
+from voucherify.models.parameter_filters_list_publications_parent_object_id import ParameterFiltersListPublicationsParentObjectId
+from voucherify.models.parameter_filters_list_publications_related_object_id import ParameterFiltersListPublicationsRelatedObjectId
+from voucherify.models.parameter_filters_list_publications_result import ParameterFiltersListPublicationsResult
+from voucherify.models.parameter_filters_list_publications_source_id import ParameterFiltersListPublicationsSourceId
+from voucherify.models.parameter_filters_list_publications_voucher_type import ParameterFiltersListPublicationsVoucherType
+from typing import Optional, Set
+from typing_extensions import Self
+
+class ParameterFiltersListPublications(BaseModel):
+ """
+ ParameterFiltersListPublications
+ """ # noqa: E501
+ junction: Optional[Junction] = None
+ failure_code: Optional[ParameterFiltersListPublicationsFailureCode] = None
+ result: Optional[ParameterFiltersListPublicationsResult] = None
+ customer_id: Optional[ParameterFiltersListPublicationsCustomerId] = None
+ campaign_name: Optional[ParameterFiltersListPublicationsCampaignName] = None
+ voucher_type: Optional[ParameterFiltersListPublicationsVoucherType] = None
+ is_referral_code: Optional[ParameterFiltersListPublicationsIsReferralCode] = None
+ parent_object_id: Optional[ParameterFiltersListPublicationsParentObjectId] = None
+ related_object_id: Optional[ParameterFiltersListPublicationsRelatedObjectId] = None
+ source_id: Optional[ParameterFiltersListPublicationsSourceId] = None
+ __properties: ClassVar[List[str]] = ["junction", "failure_code", "result", "customer_id", "campaign_name", "voucher_type", "is_referral_code", "parent_object_id", "related_object_id", "source_id"]
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of ParameterFiltersListPublications from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([
+ ])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ # override the default output from pydantic by calling `to_dict()` of failure_code
+ if self.failure_code:
+ _dict['failure_code'] = self.failure_code.to_dict()
+ # override the default output from pydantic by calling `to_dict()` of result
+ if self.result:
+ _dict['result'] = self.result.to_dict()
+ # override the default output from pydantic by calling `to_dict()` of customer_id
+ if self.customer_id:
+ _dict['customer_id'] = self.customer_id.to_dict()
+ # override the default output from pydantic by calling `to_dict()` of campaign_name
+ if self.campaign_name:
+ _dict['campaign_name'] = self.campaign_name.to_dict()
+ # override the default output from pydantic by calling `to_dict()` of voucher_type
+ if self.voucher_type:
+ _dict['voucher_type'] = self.voucher_type.to_dict()
+ # override the default output from pydantic by calling `to_dict()` of is_referral_code
+ if self.is_referral_code:
+ _dict['is_referral_code'] = self.is_referral_code.to_dict()
+ # override the default output from pydantic by calling `to_dict()` of parent_object_id
+ if self.parent_object_id:
+ _dict['parent_object_id'] = self.parent_object_id.to_dict()
+ # override the default output from pydantic by calling `to_dict()` of related_object_id
+ if self.related_object_id:
+ _dict['related_object_id'] = self.related_object_id.to_dict()
+ # override the default output from pydantic by calling `to_dict()` of source_id
+ if self.source_id:
+ _dict['source_id'] = self.source_id.to_dict()
+ # set to None if failure_code (nullable) is None
+ # and model_fields_set contains the field
+ if self.failure_code is None and "failure_code" in self.model_fields_set:
+ _dict['failure_code'] = None
+
+ # set to None if result (nullable) is None
+ # and model_fields_set contains the field
+ if self.result is None and "result" in self.model_fields_set:
+ _dict['result'] = None
+
+ # set to None if customer_id (nullable) is None
+ # and model_fields_set contains the field
+ if self.customer_id is None and "customer_id" in self.model_fields_set:
+ _dict['customer_id'] = None
+
+ # set to None if campaign_name (nullable) is None
+ # and model_fields_set contains the field
+ if self.campaign_name is None and "campaign_name" in self.model_fields_set:
+ _dict['campaign_name'] = None
+
+ # set to None if voucher_type (nullable) is None
+ # and model_fields_set contains the field
+ if self.voucher_type is None and "voucher_type" in self.model_fields_set:
+ _dict['voucher_type'] = None
+
+ # set to None if is_referral_code (nullable) is None
+ # and model_fields_set contains the field
+ if self.is_referral_code is None and "is_referral_code" in self.model_fields_set:
+ _dict['is_referral_code'] = None
+
+ # set to None if parent_object_id (nullable) is None
+ # and model_fields_set contains the field
+ if self.parent_object_id is None and "parent_object_id" in self.model_fields_set:
+ _dict['parent_object_id'] = None
+
+ # set to None if related_object_id (nullable) is None
+ # and model_fields_set contains the field
+ if self.related_object_id is None and "related_object_id" in self.model_fields_set:
+ _dict['related_object_id'] = None
+
+ # set to None if source_id (nullable) is None
+ # and model_fields_set contains the field
+ if self.source_id is None and "source_id" in self.model_fields_set:
+ _dict['source_id'] = None
+
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of ParameterFiltersListPublications from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "junction": obj.get("junction"),
+ "failure_code": ParameterFiltersListPublicationsFailureCode.from_dict(obj["failure_code"]) if obj.get("failure_code") is not None else None,
+ "result": ParameterFiltersListPublicationsResult.from_dict(obj["result"]) if obj.get("result") is not None else None,
+ "customer_id": ParameterFiltersListPublicationsCustomerId.from_dict(obj["customer_id"]) if obj.get("customer_id") is not None else None,
+ "campaign_name": ParameterFiltersListPublicationsCampaignName.from_dict(obj["campaign_name"]) if obj.get("campaign_name") is not None else None,
+ "voucher_type": ParameterFiltersListPublicationsVoucherType.from_dict(obj["voucher_type"]) if obj.get("voucher_type") is not None else None,
+ "is_referral_code": ParameterFiltersListPublicationsIsReferralCode.from_dict(obj["is_referral_code"]) if obj.get("is_referral_code") is not None else None,
+ "parent_object_id": ParameterFiltersListPublicationsParentObjectId.from_dict(obj["parent_object_id"]) if obj.get("parent_object_id") is not None else None,
+ "related_object_id": ParameterFiltersListPublicationsRelatedObjectId.from_dict(obj["related_object_id"]) if obj.get("related_object_id") is not None else None,
+ "source_id": ParameterFiltersListPublicationsSourceId.from_dict(obj["source_id"]) if obj.get("source_id") is not None else None
+ })
+ return _obj
+
+
diff --git a/voucherify/models/parameter_filters_list_publications_campaign_name.py b/voucherify/models/parameter_filters_list_publications_campaign_name.py
new file mode 100644
index 00000000..c3ac5493
--- /dev/null
+++ b/voucherify/models/parameter_filters_list_publications_campaign_name.py
@@ -0,0 +1,92 @@
+# coding: utf-8
+
+"""
+ Voucherify API
+
+ Voucherify promotion engine REST API. Please see https://docs.voucherify.io/docs for more details.
+
+ The version of the OpenAPI document: v2018-08-01
+ Contact: support@voucherify.io
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict
+from typing import Any, ClassVar, Dict, List, Optional
+from voucherify.models.filter_conditions_string import FilterConditionsString
+from typing import Optional, Set
+from typing_extensions import Self
+
+class ParameterFiltersListPublicationsCampaignName(BaseModel):
+ """
+ Filter publications by campaign names.
+ """ # noqa: E501
+ conditions: Optional[FilterConditionsString] = None
+ __properties: ClassVar[List[str]] = ["conditions"]
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of ParameterFiltersListPublicationsCampaignName from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([
+ ])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ # override the default output from pydantic by calling `to_dict()` of conditions
+ if self.conditions:
+ _dict['conditions'] = self.conditions.to_dict()
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of ParameterFiltersListPublicationsCampaignName from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "conditions": FilterConditionsString.from_dict(obj["conditions"]) if obj.get("conditions") is not None else None
+ })
+ return _obj
+
+
diff --git a/voucherify/models/parameter_filters_list_publications_customer_id.py b/voucherify/models/parameter_filters_list_publications_customer_id.py
new file mode 100644
index 00000000..0ed0e3fe
--- /dev/null
+++ b/voucherify/models/parameter_filters_list_publications_customer_id.py
@@ -0,0 +1,92 @@
+# coding: utf-8
+
+"""
+ Voucherify API
+
+ Voucherify promotion engine REST API. Please see https://docs.voucherify.io/docs for more details.
+
+ The version of the OpenAPI document: v2018-08-01
+ Contact: support@voucherify.io
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict
+from typing import Any, ClassVar, Dict, List, Optional
+from voucherify.models.filter_conditions_string import FilterConditionsString
+from typing import Optional, Set
+from typing_extensions import Self
+
+class ParameterFiltersListPublicationsCustomerId(BaseModel):
+ """
+ Filter publications by customer ids.
+ """ # noqa: E501
+ conditions: Optional[FilterConditionsString] = None
+ __properties: ClassVar[List[str]] = ["conditions"]
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of ParameterFiltersListPublicationsCustomerId from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([
+ ])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ # override the default output from pydantic by calling `to_dict()` of conditions
+ if self.conditions:
+ _dict['conditions'] = self.conditions.to_dict()
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of ParameterFiltersListPublicationsCustomerId from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "conditions": FilterConditionsString.from_dict(obj["conditions"]) if obj.get("conditions") is not None else None
+ })
+ return _obj
+
+
diff --git a/voucherify/models/parameter_filters_list_publications_failure_code.py b/voucherify/models/parameter_filters_list_publications_failure_code.py
new file mode 100644
index 00000000..46fb5e19
--- /dev/null
+++ b/voucherify/models/parameter_filters_list_publications_failure_code.py
@@ -0,0 +1,92 @@
+# coding: utf-8
+
+"""
+ Voucherify API
+
+ Voucherify promotion engine REST API. Please see https://docs.voucherify.io/docs for more details.
+
+ The version of the OpenAPI document: v2018-08-01
+ Contact: support@voucherify.io
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict
+from typing import Any, ClassVar, Dict, List, Optional
+from voucherify.models.filter_conditions_string import FilterConditionsString
+from typing import Optional, Set
+from typing_extensions import Self
+
+class ParameterFiltersListPublicationsFailureCode(BaseModel):
+ """
+ Filter publications by ids.
+ """ # noqa: E501
+ conditions: Optional[FilterConditionsString] = None
+ __properties: ClassVar[List[str]] = ["conditions"]
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of ParameterFiltersListPublicationsFailureCode from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([
+ ])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ # override the default output from pydantic by calling `to_dict()` of conditions
+ if self.conditions:
+ _dict['conditions'] = self.conditions.to_dict()
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of ParameterFiltersListPublicationsFailureCode from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "conditions": FilterConditionsString.from_dict(obj["conditions"]) if obj.get("conditions") is not None else None
+ })
+ return _obj
+
+
diff --git a/voucherify/models/parameter_filters_list_publications_is_referral_code.py b/voucherify/models/parameter_filters_list_publications_is_referral_code.py
new file mode 100644
index 00000000..723de254
--- /dev/null
+++ b/voucherify/models/parameter_filters_list_publications_is_referral_code.py
@@ -0,0 +1,92 @@
+# coding: utf-8
+
+"""
+ Voucherify API
+
+ Voucherify promotion engine REST API. Please see https://docs.voucherify.io/docs for more details.
+
+ The version of the OpenAPI document: v2018-08-01
+ Contact: support@voucherify.io
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict
+from typing import Any, ClassVar, Dict, List, Optional
+from voucherify.models.filter_conditions_string import FilterConditionsString
+from typing import Optional, Set
+from typing_extensions import Self
+
+class ParameterFiltersListPublicationsIsReferralCode(BaseModel):
+ """
+ Filter publications by is referall code.
+ """ # noqa: E501
+ conditions: Optional[FilterConditionsString] = None
+ __properties: ClassVar[List[str]] = ["conditions"]
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of ParameterFiltersListPublicationsIsReferralCode from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([
+ ])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ # override the default output from pydantic by calling `to_dict()` of conditions
+ if self.conditions:
+ _dict['conditions'] = self.conditions.to_dict()
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of ParameterFiltersListPublicationsIsReferralCode from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "conditions": FilterConditionsString.from_dict(obj["conditions"]) if obj.get("conditions") is not None else None
+ })
+ return _obj
+
+
diff --git a/voucherify/models/parameter_filters_list_publications_parent_object_id.py b/voucherify/models/parameter_filters_list_publications_parent_object_id.py
new file mode 100644
index 00000000..40314028
--- /dev/null
+++ b/voucherify/models/parameter_filters_list_publications_parent_object_id.py
@@ -0,0 +1,92 @@
+# coding: utf-8
+
+"""
+ Voucherify API
+
+ Voucherify promotion engine REST API. Please see https://docs.voucherify.io/docs for more details.
+
+ The version of the OpenAPI document: v2018-08-01
+ Contact: support@voucherify.io
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict
+from typing import Any, ClassVar, Dict, List, Optional
+from voucherify.models.filter_conditions_string import FilterConditionsString
+from typing import Optional, Set
+from typing_extensions import Self
+
+class ParameterFiltersListPublicationsParentObjectId(BaseModel):
+ """
+ Filter publications by parent object id.
+ """ # noqa: E501
+ conditions: Optional[FilterConditionsString] = None
+ __properties: ClassVar[List[str]] = ["conditions"]
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of ParameterFiltersListPublicationsParentObjectId from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([
+ ])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ # override the default output from pydantic by calling `to_dict()` of conditions
+ if self.conditions:
+ _dict['conditions'] = self.conditions.to_dict()
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of ParameterFiltersListPublicationsParentObjectId from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "conditions": FilterConditionsString.from_dict(obj["conditions"]) if obj.get("conditions") is not None else None
+ })
+ return _obj
+
+
diff --git a/voucherify/models/parameter_filters_list_publications_related_object_id.py b/voucherify/models/parameter_filters_list_publications_related_object_id.py
new file mode 100644
index 00000000..daac3a34
--- /dev/null
+++ b/voucherify/models/parameter_filters_list_publications_related_object_id.py
@@ -0,0 +1,92 @@
+# coding: utf-8
+
+"""
+ Voucherify API
+
+ Voucherify promotion engine REST API. Please see https://docs.voucherify.io/docs for more details.
+
+ The version of the OpenAPI document: v2018-08-01
+ Contact: support@voucherify.io
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict
+from typing import Any, ClassVar, Dict, List, Optional
+from voucherify.models.filter_conditions_string import FilterConditionsString
+from typing import Optional, Set
+from typing_extensions import Self
+
+class ParameterFiltersListPublicationsRelatedObjectId(BaseModel):
+ """
+ Filter publications by related object id.
+ """ # noqa: E501
+ conditions: Optional[FilterConditionsString] = None
+ __properties: ClassVar[List[str]] = ["conditions"]
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of ParameterFiltersListPublicationsRelatedObjectId from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([
+ ])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ # override the default output from pydantic by calling `to_dict()` of conditions
+ if self.conditions:
+ _dict['conditions'] = self.conditions.to_dict()
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of ParameterFiltersListPublicationsRelatedObjectId from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "conditions": FilterConditionsString.from_dict(obj["conditions"]) if obj.get("conditions") is not None else None
+ })
+ return _obj
+
+
diff --git a/voucherify/models/parameter_filters_list_publications_result.py b/voucherify/models/parameter_filters_list_publications_result.py
new file mode 100644
index 00000000..86bd8b13
--- /dev/null
+++ b/voucherify/models/parameter_filters_list_publications_result.py
@@ -0,0 +1,92 @@
+# coding: utf-8
+
+"""
+ Voucherify API
+
+ Voucherify promotion engine REST API. Please see https://docs.voucherify.io/docs for more details.
+
+ The version of the OpenAPI document: v2018-08-01
+ Contact: support@voucherify.io
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict
+from typing import Any, ClassVar, Dict, List, Optional
+from voucherify.models.filter_conditions_string import FilterConditionsString
+from typing import Optional, Set
+from typing_extensions import Self
+
+class ParameterFiltersListPublicationsResult(BaseModel):
+ """
+ Filter publications by names.
+ """ # noqa: E501
+ conditions: Optional[FilterConditionsString] = None
+ __properties: ClassVar[List[str]] = ["conditions"]
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of ParameterFiltersListPublicationsResult from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([
+ ])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ # override the default output from pydantic by calling `to_dict()` of conditions
+ if self.conditions:
+ _dict['conditions'] = self.conditions.to_dict()
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of ParameterFiltersListPublicationsResult from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "conditions": FilterConditionsString.from_dict(obj["conditions"]) if obj.get("conditions") is not None else None
+ })
+ return _obj
+
+
diff --git a/voucherify/models/parameter_filters_list_publications_source_id.py b/voucherify/models/parameter_filters_list_publications_source_id.py
new file mode 100644
index 00000000..17327b68
--- /dev/null
+++ b/voucherify/models/parameter_filters_list_publications_source_id.py
@@ -0,0 +1,92 @@
+# coding: utf-8
+
+"""
+ Voucherify API
+
+ Voucherify promotion engine REST API. Please see https://docs.voucherify.io/docs for more details.
+
+ The version of the OpenAPI document: v2018-08-01
+ Contact: support@voucherify.io
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict
+from typing import Any, ClassVar, Dict, List, Optional
+from voucherify.models.filter_conditions_string import FilterConditionsString
+from typing import Optional, Set
+from typing_extensions import Self
+
+class ParameterFiltersListPublicationsSourceId(BaseModel):
+ """
+ Filter publications by source id.
+ """ # noqa: E501
+ conditions: Optional[FilterConditionsString] = None
+ __properties: ClassVar[List[str]] = ["conditions"]
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of ParameterFiltersListPublicationsSourceId from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([
+ ])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ # override the default output from pydantic by calling `to_dict()` of conditions
+ if self.conditions:
+ _dict['conditions'] = self.conditions.to_dict()
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of ParameterFiltersListPublicationsSourceId from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "conditions": FilterConditionsString.from_dict(obj["conditions"]) if obj.get("conditions") is not None else None
+ })
+ return _obj
+
+
diff --git a/voucherify/models/parameter_filters_list_publications_voucher_type.py b/voucherify/models/parameter_filters_list_publications_voucher_type.py
new file mode 100644
index 00000000..c83b0a7c
--- /dev/null
+++ b/voucherify/models/parameter_filters_list_publications_voucher_type.py
@@ -0,0 +1,92 @@
+# coding: utf-8
+
+"""
+ Voucherify API
+
+ Voucherify promotion engine REST API. Please see https://docs.voucherify.io/docs for more details.
+
+ The version of the OpenAPI document: v2018-08-01
+ Contact: support@voucherify.io
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict
+from typing import Any, ClassVar, Dict, List, Optional
+from voucherify.models.filter_conditions_string import FilterConditionsString
+from typing import Optional, Set
+from typing_extensions import Self
+
+class ParameterFiltersListPublicationsVoucherType(BaseModel):
+ """
+ Filter publications by voucher types.
+ """ # noqa: E501
+ conditions: Optional[FilterConditionsString] = None
+ __properties: ClassVar[List[str]] = ["conditions"]
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of ParameterFiltersListPublicationsVoucherType from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([
+ ])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ # override the default output from pydantic by calling `to_dict()` of conditions
+ if self.conditions:
+ _dict['conditions'] = self.conditions.to_dict()
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of ParameterFiltersListPublicationsVoucherType from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "conditions": FilterConditionsString.from_dict(obj["conditions"]) if obj.get("conditions") is not None else None
+ })
+ return _obj
+
+
diff --git a/voucherify/models/parameter_filters_list_redemptions.py b/voucherify/models/parameter_filters_list_redemptions.py
index 53dbb7f6..b53ea013 100644
--- a/voucherify/models/parameter_filters_list_redemptions.py
+++ b/voucherify/models/parameter_filters_list_redemptions.py
@@ -20,6 +20,7 @@
from pydantic import BaseModel, ConfigDict
from typing import Any, ClassVar, Dict, List, Optional
+from voucherify.models.junction import Junction
from voucherify.models.parameter_filters_list_redemptions_campaign_name import ParameterFiltersListRedemptionsCampaignName
from voucherify.models.parameter_filters_list_redemptions_customer_id import ParameterFiltersListRedemptionsCustomerId
from voucherify.models.parameter_filters_list_redemptions_failure_code import ParameterFiltersListRedemptionsFailureCode
@@ -47,7 +48,8 @@ class ParameterFiltersListRedemptions(BaseModel):
customer_id: Optional[ParameterFiltersListRedemptionsCustomerId] = None
campaign_name: Optional[ParameterFiltersListRedemptionsCampaignName] = None
user_login: Optional[ParameterFiltersListRedemptionsUserLogin] = None
- __properties: ClassVar[List[str]] = ["voucher_code", "related_object_id", "related_object_parent_id", "parent_redemption_id", "failure_code", "result", "object", "customer_id", "campaign_name", "user_login"]
+ junction: Optional[Junction] = None
+ __properties: ClassVar[List[str]] = ["voucher_code", "related_object_id", "related_object_parent_id", "parent_redemption_id", "failure_code", "result", "object", "customer_id", "campaign_name", "user_login", "junction"]
model_config = ConfigDict(
populate_by_name=True,
@@ -189,7 +191,8 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
"object": ParameterFiltersListRedemptionsObject.from_dict(obj["object"]) if obj.get("object") is not None else None,
"customer_id": ParameterFiltersListRedemptionsCustomerId.from_dict(obj["customer_id"]) if obj.get("customer_id") is not None else None,
"campaign_name": ParameterFiltersListRedemptionsCampaignName.from_dict(obj["campaign_name"]) if obj.get("campaign_name") is not None else None,
- "user_login": ParameterFiltersListRedemptionsUserLogin.from_dict(obj["user_login"]) if obj.get("user_login") is not None else None
+ "user_login": ParameterFiltersListRedemptionsUserLogin.from_dict(obj["user_login"]) if obj.get("user_login") is not None else None,
+ "junction": obj.get("junction")
})
return _obj
diff --git a/voucherify/models/parameter_filters_list_redemptions_campaign_name.py b/voucherify/models/parameter_filters_list_redemptions_campaign_name.py
index 5c99ed09..22d61c14 100644
--- a/voucherify/models/parameter_filters_list_redemptions_campaign_name.py
+++ b/voucherify/models/parameter_filters_list_redemptions_campaign_name.py
@@ -21,7 +21,6 @@
from pydantic import BaseModel, ConfigDict
from typing import Any, ClassVar, Dict, List, Optional
from voucherify.models.filter_conditions_string import FilterConditionsString
-from voucherify.models.junction import Junction
from typing import Optional, Set
from typing_extensions import Self
@@ -30,8 +29,7 @@ class ParameterFiltersListRedemptionsCampaignName(BaseModel):
Campaign name.
""" # noqa: E501
conditions: Optional[FilterConditionsString] = None
- junction: Optional[Junction] = None
- __properties: ClassVar[List[str]] = ["conditions", "junction"]
+ __properties: ClassVar[List[str]] = ["conditions"]
model_config = ConfigDict(
populate_by_name=True,
@@ -87,8 +85,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
return cls.model_validate(obj)
_obj = cls.model_validate({
- "conditions": FilterConditionsString.from_dict(obj["conditions"]) if obj.get("conditions") is not None else None,
- "junction": obj.get("junction")
+ "conditions": FilterConditionsString.from_dict(obj["conditions"]) if obj.get("conditions") is not None else None
})
return _obj
diff --git a/voucherify/models/parameter_filters_list_redemptions_customer_id.py b/voucherify/models/parameter_filters_list_redemptions_customer_id.py
index 411703cb..32e58295 100644
--- a/voucherify/models/parameter_filters_list_redemptions_customer_id.py
+++ b/voucherify/models/parameter_filters_list_redemptions_customer_id.py
@@ -21,7 +21,6 @@
from pydantic import BaseModel, ConfigDict
from typing import Any, ClassVar, Dict, List, Optional
from voucherify.models.filter_conditions_string import FilterConditionsString
-from voucherify.models.junction import Junction
from typing import Optional, Set
from typing_extensions import Self
@@ -30,8 +29,7 @@ class ParameterFiltersListRedemptionsCustomerId(BaseModel):
Unique customer ID, i.e. cust_sehkNIi8Uq2qQuRqSr7xn4Zi.
""" # noqa: E501
conditions: Optional[FilterConditionsString] = None
- junction: Optional[Junction] = None
- __properties: ClassVar[List[str]] = ["conditions", "junction"]
+ __properties: ClassVar[List[str]] = ["conditions"]
model_config = ConfigDict(
populate_by_name=True,
@@ -87,8 +85,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
return cls.model_validate(obj)
_obj = cls.model_validate({
- "conditions": FilterConditionsString.from_dict(obj["conditions"]) if obj.get("conditions") is not None else None,
- "junction": obj.get("junction")
+ "conditions": FilterConditionsString.from_dict(obj["conditions"]) if obj.get("conditions") is not None else None
})
return _obj
diff --git a/voucherify/models/parameter_filters_list_redemptions_failure_code.py b/voucherify/models/parameter_filters_list_redemptions_failure_code.py
index b1757be8..7fa86cce 100644
--- a/voucherify/models/parameter_filters_list_redemptions_failure_code.py
+++ b/voucherify/models/parameter_filters_list_redemptions_failure_code.py
@@ -21,7 +21,6 @@
from pydantic import BaseModel, ConfigDict
from typing import Any, ClassVar, Dict, List, Optional
from voucherify.models.filter_conditions_string import FilterConditionsString
-from voucherify.models.junction import Junction
from typing import Optional, Set
from typing_extensions import Self
@@ -30,8 +29,7 @@ class ParameterFiltersListRedemptionsFailureCode(BaseModel):
Failure code, i.e. quantity_exceeded.
""" # noqa: E501
conditions: Optional[FilterConditionsString] = None
- junction: Optional[Junction] = None
- __properties: ClassVar[List[str]] = ["conditions", "junction"]
+ __properties: ClassVar[List[str]] = ["conditions"]
model_config = ConfigDict(
populate_by_name=True,
@@ -87,8 +85,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
return cls.model_validate(obj)
_obj = cls.model_validate({
- "conditions": FilterConditionsString.from_dict(obj["conditions"]) if obj.get("conditions") is not None else None,
- "junction": obj.get("junction")
+ "conditions": FilterConditionsString.from_dict(obj["conditions"]) if obj.get("conditions") is not None else None
})
return _obj
diff --git a/voucherify/models/parameter_filters_list_redemptions_object.py b/voucherify/models/parameter_filters_list_redemptions_object.py
index 8cc0966e..e19989f2 100644
--- a/voucherify/models/parameter_filters_list_redemptions_object.py
+++ b/voucherify/models/parameter_filters_list_redemptions_object.py
@@ -21,7 +21,6 @@
from pydantic import BaseModel, ConfigDict
from typing import Any, ClassVar, Dict, List, Optional
from voucherify.models.filter_conditions_string import FilterConditionsString
-from voucherify.models.junction import Junction
from typing import Optional, Set
from typing_extensions import Self
@@ -30,8 +29,7 @@ class ParameterFiltersListRedemptionsObject(BaseModel):
Specify which type of object to return, i.e. `redemption` or `redemption_rollback`.
""" # noqa: E501
conditions: Optional[FilterConditionsString] = None
- junction: Optional[Junction] = None
- __properties: ClassVar[List[str]] = ["conditions", "junction"]
+ __properties: ClassVar[List[str]] = ["conditions"]
model_config = ConfigDict(
populate_by_name=True,
@@ -87,8 +85,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
return cls.model_validate(obj)
_obj = cls.model_validate({
- "conditions": FilterConditionsString.from_dict(obj["conditions"]) if obj.get("conditions") is not None else None,
- "junction": obj.get("junction")
+ "conditions": FilterConditionsString.from_dict(obj["conditions"]) if obj.get("conditions") is not None else None
})
return _obj
diff --git a/voucherify/models/parameter_filters_list_redemptions_parent_redemption_id.py b/voucherify/models/parameter_filters_list_redemptions_parent_redemption_id.py
index 80a48994..bc5ee007 100644
--- a/voucherify/models/parameter_filters_list_redemptions_parent_redemption_id.py
+++ b/voucherify/models/parameter_filters_list_redemptions_parent_redemption_id.py
@@ -21,7 +21,6 @@
from pydantic import BaseModel, ConfigDict
from typing import Any, ClassVar, Dict, List, Optional
from voucherify.models.filter_conditions_string import FilterConditionsString
-from voucherify.models.junction import Junction
from typing import Optional, Set
from typing_extensions import Self
@@ -30,8 +29,7 @@ class ParameterFiltersListRedemptionsParentRedemptionId(BaseModel):
Unique parent redemption ID, i.e. r_0c5952900bcbfd54b6.
""" # noqa: E501
conditions: Optional[FilterConditionsString] = None
- junction: Optional[Junction] = None
- __properties: ClassVar[List[str]] = ["conditions", "junction"]
+ __properties: ClassVar[List[str]] = ["conditions"]
model_config = ConfigDict(
populate_by_name=True,
@@ -87,8 +85,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
return cls.model_validate(obj)
_obj = cls.model_validate({
- "conditions": FilterConditionsString.from_dict(obj["conditions"]) if obj.get("conditions") is not None else None,
- "junction": obj.get("junction")
+ "conditions": FilterConditionsString.from_dict(obj["conditions"]) if obj.get("conditions") is not None else None
})
return _obj
diff --git a/voucherify/models/parameter_filters_list_redemptions_related_object_id.py b/voucherify/models/parameter_filters_list_redemptions_related_object_id.py
index 25cb60e6..b10208b1 100644
--- a/voucherify/models/parameter_filters_list_redemptions_related_object_id.py
+++ b/voucherify/models/parameter_filters_list_redemptions_related_object_id.py
@@ -21,7 +21,6 @@
from pydantic import BaseModel, ConfigDict
from typing import Any, ClassVar, Dict, List, Optional
from voucherify.models.filter_conditions_string import FilterConditionsString
-from voucherify.models.junction import Junction
from typing import Optional, Set
from typing_extensions import Self
@@ -30,8 +29,7 @@ class ParameterFiltersListRedemptionsRelatedObjectId(BaseModel):
Unique related object ID, i.e. v_hS8JFl8S6lNcd1L69wLIoXgTio7eWEgk.
""" # noqa: E501
conditions: Optional[FilterConditionsString] = None
- junction: Optional[Junction] = None
- __properties: ClassVar[List[str]] = ["conditions", "junction"]
+ __properties: ClassVar[List[str]] = ["conditions"]
model_config = ConfigDict(
populate_by_name=True,
@@ -87,8 +85,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
return cls.model_validate(obj)
_obj = cls.model_validate({
- "conditions": FilterConditionsString.from_dict(obj["conditions"]) if obj.get("conditions") is not None else None,
- "junction": obj.get("junction")
+ "conditions": FilterConditionsString.from_dict(obj["conditions"]) if obj.get("conditions") is not None else None
})
return _obj
diff --git a/voucherify/models/parameter_filters_list_redemptions_related_object_parent_id.py b/voucherify/models/parameter_filters_list_redemptions_related_object_parent_id.py
index 1b62da4b..0cf453fe 100644
--- a/voucherify/models/parameter_filters_list_redemptions_related_object_parent_id.py
+++ b/voucherify/models/parameter_filters_list_redemptions_related_object_parent_id.py
@@ -21,7 +21,6 @@
from pydantic import BaseModel, ConfigDict
from typing import Any, ClassVar, Dict, List, Optional
from voucherify.models.filter_conditions_string import FilterConditionsString
-from voucherify.models.junction import Junction
from typing import Optional, Set
from typing_extensions import Self
@@ -30,8 +29,7 @@ class ParameterFiltersListRedemptionsRelatedObjectParentId(BaseModel):
Unique related object parent ID, i.e. camp_22noMlhTADb7Fq2UL3vWu3d1.
""" # noqa: E501
conditions: Optional[FilterConditionsString] = None
- junction: Optional[Junction] = None
- __properties: ClassVar[List[str]] = ["conditions", "junction"]
+ __properties: ClassVar[List[str]] = ["conditions"]
model_config = ConfigDict(
populate_by_name=True,
@@ -87,8 +85,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
return cls.model_validate(obj)
_obj = cls.model_validate({
- "conditions": FilterConditionsString.from_dict(obj["conditions"]) if obj.get("conditions") is not None else None,
- "junction": obj.get("junction")
+ "conditions": FilterConditionsString.from_dict(obj["conditions"]) if obj.get("conditions") is not None else None
})
return _obj
diff --git a/voucherify/models/parameter_filters_list_redemptions_result.py b/voucherify/models/parameter_filters_list_redemptions_result.py
index b30e79a7..6ae601d4 100644
--- a/voucherify/models/parameter_filters_list_redemptions_result.py
+++ b/voucherify/models/parameter_filters_list_redemptions_result.py
@@ -21,7 +21,6 @@
from pydantic import BaseModel, ConfigDict
from typing import Any, ClassVar, Dict, List, Optional
from voucherify.models.filter_conditions_string import FilterConditionsString
-from voucherify.models.junction import Junction
from typing import Optional, Set
from typing_extensions import Self
@@ -30,8 +29,7 @@ class ParameterFiltersListRedemptionsResult(BaseModel):
Result, i.e. `SUCCESS` or `FAILURE`.
""" # noqa: E501
conditions: Optional[FilterConditionsString] = None
- junction: Optional[Junction] = None
- __properties: ClassVar[List[str]] = ["conditions", "junction"]
+ __properties: ClassVar[List[str]] = ["conditions"]
model_config = ConfigDict(
populate_by_name=True,
@@ -87,8 +85,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
return cls.model_validate(obj)
_obj = cls.model_validate({
- "conditions": FilterConditionsString.from_dict(obj["conditions"]) if obj.get("conditions") is not None else None,
- "junction": obj.get("junction")
+ "conditions": FilterConditionsString.from_dict(obj["conditions"]) if obj.get("conditions") is not None else None
})
return _obj
diff --git a/voucherify/models/parameter_filters_list_redemptions_user_login.py b/voucherify/models/parameter_filters_list_redemptions_user_login.py
index 322748df..462a46ef 100644
--- a/voucherify/models/parameter_filters_list_redemptions_user_login.py
+++ b/voucherify/models/parameter_filters_list_redemptions_user_login.py
@@ -21,7 +21,6 @@
from pydantic import BaseModel, ConfigDict
from typing import Any, ClassVar, Dict, List, Optional
from voucherify.models.filter_conditions_string import FilterConditionsString
-from voucherify.models.junction import Junction
from typing import Optional, Set
from typing_extensions import Self
@@ -30,8 +29,7 @@ class ParameterFiltersListRedemptionsUserLogin(BaseModel):
User login used to login to Voucherify, i.e. name.lastname@email.com
""" # noqa: E501
conditions: Optional[FilterConditionsString] = None
- junction: Optional[Junction] = None
- __properties: ClassVar[List[str]] = ["conditions", "junction"]
+ __properties: ClassVar[List[str]] = ["conditions"]
model_config = ConfigDict(
populate_by_name=True,
@@ -87,8 +85,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
return cls.model_validate(obj)
_obj = cls.model_validate({
- "conditions": FilterConditionsString.from_dict(obj["conditions"]) if obj.get("conditions") is not None else None,
- "junction": obj.get("junction")
+ "conditions": FilterConditionsString.from_dict(obj["conditions"]) if obj.get("conditions") is not None else None
})
return _obj
diff --git a/voucherify/models/parameter_filters_list_redemptions_voucher_code.py b/voucherify/models/parameter_filters_list_redemptions_voucher_code.py
index fc42e972..75d7eebb 100644
--- a/voucherify/models/parameter_filters_list_redemptions_voucher_code.py
+++ b/voucherify/models/parameter_filters_list_redemptions_voucher_code.py
@@ -21,7 +21,6 @@
from pydantic import BaseModel, ConfigDict
from typing import Any, ClassVar, Dict, List, Optional
from voucherify.models.filter_conditions_string import FilterConditionsString
-from voucherify.models.junction import Junction
from typing import Optional, Set
from typing_extensions import Self
@@ -30,8 +29,7 @@ class ParameterFiltersListRedemptionsVoucherCode(BaseModel):
Unique voucher code.
""" # noqa: E501
conditions: Optional[FilterConditionsString] = None
- junction: Optional[Junction] = None
- __properties: ClassVar[List[str]] = ["conditions", "junction"]
+ __properties: ClassVar[List[str]] = ["conditions"]
model_config = ConfigDict(
populate_by_name=True,
@@ -87,8 +85,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
return cls.model_validate(obj)
_obj = cls.model_validate({
- "conditions": FilterConditionsString.from_dict(obj["conditions"]) if obj.get("conditions") is not None else None,
- "junction": obj.get("junction")
+ "conditions": FilterConditionsString.from_dict(obj["conditions"]) if obj.get("conditions") is not None else None
})
return _obj
diff --git a/voucherify/models/parameter_filters_list_referrals_redeemable_holders.py b/voucherify/models/parameter_filters_list_referrals_redeemable_holders.py
new file mode 100644
index 00000000..523efa3e
--- /dev/null
+++ b/voucherify/models/parameter_filters_list_referrals_redeemable_holders.py
@@ -0,0 +1,133 @@
+# coding: utf-8
+
+"""
+ Voucherify API
+
+ Voucherify promotion engine REST API. Please see https://docs.voucherify.io/docs for more details.
+
+ The version of the OpenAPI document: v2018-08-01
+ Contact: support@voucherify.io
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict
+from typing import Any, ClassVar, Dict, List, Optional
+from voucherify.models.junction import Junction
+from voucherify.models.parameter_filters_list_referrals_redeemable_holders_created_at import ParameterFiltersListReferralsRedeemableHoldersCreatedAt
+from voucherify.models.parameter_filters_list_referrals_redeemable_holders_customer_id import ParameterFiltersListReferralsRedeemableHoldersCustomerId
+from voucherify.models.parameter_filters_list_referrals_redeemable_holders_holder_role import ParameterFiltersListReferralsRedeemableHoldersHolderRole
+from voucherify.models.parameter_filters_list_referrals_redeemable_holders_id import ParameterFiltersListReferralsRedeemableHoldersId
+from typing import Optional, Set
+from typing_extensions import Self
+
+class ParameterFiltersListReferralsRedeemableHolders(BaseModel):
+ """
+ ParameterFiltersListReferralsRedeemableHolders
+ """ # noqa: E501
+ id: Optional[ParameterFiltersListReferralsRedeemableHoldersId] = None
+ created_at: Optional[ParameterFiltersListReferralsRedeemableHoldersCreatedAt] = None
+ holder_role: Optional[ParameterFiltersListReferralsRedeemableHoldersHolderRole] = None
+ customer_id: Optional[ParameterFiltersListReferralsRedeemableHoldersCustomerId] = None
+ junction: Optional[Junction] = None
+ __properties: ClassVar[List[str]] = ["id", "created_at", "holder_role", "customer_id", "junction"]
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of ParameterFiltersListReferralsRedeemableHolders from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([
+ ])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ # override the default output from pydantic by calling `to_dict()` of id
+ if self.id:
+ _dict['id'] = self.id.to_dict()
+ # override the default output from pydantic by calling `to_dict()` of created_at
+ if self.created_at:
+ _dict['created_at'] = self.created_at.to_dict()
+ # override the default output from pydantic by calling `to_dict()` of holder_role
+ if self.holder_role:
+ _dict['holder_role'] = self.holder_role.to_dict()
+ # override the default output from pydantic by calling `to_dict()` of customer_id
+ if self.customer_id:
+ _dict['customer_id'] = self.customer_id.to_dict()
+ # set to None if id (nullable) is None
+ # and model_fields_set contains the field
+ if self.id is None and "id" in self.model_fields_set:
+ _dict['id'] = None
+
+ # set to None if created_at (nullable) is None
+ # and model_fields_set contains the field
+ if self.created_at is None and "created_at" in self.model_fields_set:
+ _dict['created_at'] = None
+
+ # set to None if holder_role (nullable) is None
+ # and model_fields_set contains the field
+ if self.holder_role is None and "holder_role" in self.model_fields_set:
+ _dict['holder_role'] = None
+
+ # set to None if customer_id (nullable) is None
+ # and model_fields_set contains the field
+ if self.customer_id is None and "customer_id" in self.model_fields_set:
+ _dict['customer_id'] = None
+
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of ParameterFiltersListReferralsRedeemableHolders from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "id": ParameterFiltersListReferralsRedeemableHoldersId.from_dict(obj["id"]) if obj.get("id") is not None else None,
+ "created_at": ParameterFiltersListReferralsRedeemableHoldersCreatedAt.from_dict(obj["created_at"]) if obj.get("created_at") is not None else None,
+ "holder_role": ParameterFiltersListReferralsRedeemableHoldersHolderRole.from_dict(obj["holder_role"]) if obj.get("holder_role") is not None else None,
+ "customer_id": ParameterFiltersListReferralsRedeemableHoldersCustomerId.from_dict(obj["customer_id"]) if obj.get("customer_id") is not None else None,
+ "junction": obj.get("junction")
+ })
+ return _obj
+
+
diff --git a/voucherify/models/parameter_filters_list_referrals_redeemable_holders_campaign_id.py b/voucherify/models/parameter_filters_list_referrals_redeemable_holders_campaign_id.py
new file mode 100644
index 00000000..43966de7
--- /dev/null
+++ b/voucherify/models/parameter_filters_list_referrals_redeemable_holders_campaign_id.py
@@ -0,0 +1,92 @@
+# coding: utf-8
+
+"""
+ Voucherify API
+
+ Voucherify promotion engine REST API. Please see https://docs.voucherify.io/docs for more details.
+
+ The version of the OpenAPI document: v2018-08-01
+ Contact: support@voucherify.io
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict
+from typing import Any, ClassVar, Dict, List, Optional
+from voucherify.models.filter_conditions_string import FilterConditionsString
+from typing import Optional, Set
+from typing_extensions import Self
+
+class ParameterFiltersListReferralsRedeemableHoldersCampaignId(BaseModel):
+ """
+ Unique customer ID, i.e. `cust_sehkNIi8Uq2qQuRqSr7xn4Zi`.
+ """ # noqa: E501
+ conditions: Optional[FilterConditionsString] = None
+ __properties: ClassVar[List[str]] = ["conditions"]
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of ParameterFiltersListReferralsRedeemableHoldersCampaignId from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([
+ ])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ # override the default output from pydantic by calling `to_dict()` of conditions
+ if self.conditions:
+ _dict['conditions'] = self.conditions.to_dict()
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of ParameterFiltersListReferralsRedeemableHoldersCampaignId from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "conditions": FilterConditionsString.from_dict(obj["conditions"]) if obj.get("conditions") is not None else None
+ })
+ return _obj
+
+
diff --git a/voucherify/models/parameter_filters_list_referrals_redeemable_holders_campaign_type.py b/voucherify/models/parameter_filters_list_referrals_redeemable_holders_campaign_type.py
new file mode 100644
index 00000000..f5cd4499
--- /dev/null
+++ b/voucherify/models/parameter_filters_list_referrals_redeemable_holders_campaign_type.py
@@ -0,0 +1,92 @@
+# coding: utf-8
+
+"""
+ Voucherify API
+
+ Voucherify promotion engine REST API. Please see https://docs.voucherify.io/docs for more details.
+
+ The version of the OpenAPI document: v2018-08-01
+ Contact: support@voucherify.io
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict
+from typing import Any, ClassVar, Dict, List, Optional
+from voucherify.models.parameter_filters_list_customer_redeemables_campaign_type_conditions import ParameterFiltersListCustomerRedeemablesCampaignTypeConditions
+from typing import Optional, Set
+from typing_extensions import Self
+
+class ParameterFiltersListReferralsRedeemableHoldersCampaignType(BaseModel):
+ """
+ Type of the campaign. Allowed values: `DISCOUNT_COUPONS`, `REFERRAL_PROGRAM`, `GIFT_VOUCHERS`, `LOYALTY_PROGRAM`
+ """ # noqa: E501
+ conditions: Optional[ParameterFiltersListCustomerRedeemablesCampaignTypeConditions] = None
+ __properties: ClassVar[List[str]] = ["conditions"]
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of ParameterFiltersListReferralsRedeemableHoldersCampaignType from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([
+ ])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ # override the default output from pydantic by calling `to_dict()` of conditions
+ if self.conditions:
+ _dict['conditions'] = self.conditions.to_dict()
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of ParameterFiltersListReferralsRedeemableHoldersCampaignType from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "conditions": ParameterFiltersListCustomerRedeemablesCampaignTypeConditions.from_dict(obj["conditions"]) if obj.get("conditions") is not None else None
+ })
+ return _obj
+
+
diff --git a/voucherify/models/parameter_filters_list_referrals_redeemable_holders_created_at.py b/voucherify/models/parameter_filters_list_referrals_redeemable_holders_created_at.py
new file mode 100644
index 00000000..268be74b
--- /dev/null
+++ b/voucherify/models/parameter_filters_list_referrals_redeemable_holders_created_at.py
@@ -0,0 +1,92 @@
+# coding: utf-8
+
+"""
+ Voucherify API
+
+ Voucherify promotion engine REST API. Please see https://docs.voucherify.io/docs for more details.
+
+ The version of the OpenAPI document: v2018-08-01
+ Contact: support@voucherify.io
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict
+from typing import Any, ClassVar, Dict, List, Optional
+from voucherify.models.filter_conditions_date_time import FilterConditionsDateTime
+from typing import Optional, Set
+from typing_extensions import Self
+
+class ParameterFiltersListReferralsRedeemableHoldersCreatedAt(BaseModel):
+ """
+ Timestamp representing the date and time when the redeemable was added to the holder. The value is shown in the ISO 8601 format.
+ """ # noqa: E501
+ conditions: Optional[FilterConditionsDateTime] = None
+ __properties: ClassVar[List[str]] = ["conditions"]
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of ParameterFiltersListReferralsRedeemableHoldersCreatedAt from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([
+ ])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ # override the default output from pydantic by calling `to_dict()` of conditions
+ if self.conditions:
+ _dict['conditions'] = self.conditions.to_dict()
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of ParameterFiltersListReferralsRedeemableHoldersCreatedAt from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "conditions": FilterConditionsDateTime.from_dict(obj["conditions"]) if obj.get("conditions") is not None else None
+ })
+ return _obj
+
+
diff --git a/voucherify/models/parameter_filters_list_referrals_redeemable_holders_customer_id.py b/voucherify/models/parameter_filters_list_referrals_redeemable_holders_customer_id.py
new file mode 100644
index 00000000..6ee66411
--- /dev/null
+++ b/voucherify/models/parameter_filters_list_referrals_redeemable_holders_customer_id.py
@@ -0,0 +1,92 @@
+# coding: utf-8
+
+"""
+ Voucherify API
+
+ Voucherify promotion engine REST API. Please see https://docs.voucherify.io/docs for more details.
+
+ The version of the OpenAPI document: v2018-08-01
+ Contact: support@voucherify.io
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict
+from typing import Any, ClassVar, Dict, List, Optional
+from voucherify.models.filter_conditions_string import FilterConditionsString
+from typing import Optional, Set
+from typing_extensions import Self
+
+class ParameterFiltersListReferralsRedeemableHoldersCustomerId(BaseModel):
+ """
+ Unique customer ID, i.e. `cust_sehkNIi8Uq2qQuRqSr7xn4Zi`.
+ """ # noqa: E501
+ conditions: Optional[FilterConditionsString] = None
+ __properties: ClassVar[List[str]] = ["conditions"]
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of ParameterFiltersListReferralsRedeemableHoldersCustomerId from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([
+ ])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ # override the default output from pydantic by calling `to_dict()` of conditions
+ if self.conditions:
+ _dict['conditions'] = self.conditions.to_dict()
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of ParameterFiltersListReferralsRedeemableHoldersCustomerId from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "conditions": FilterConditionsString.from_dict(obj["conditions"]) if obj.get("conditions") is not None else None
+ })
+ return _obj
+
+
diff --git a/voucherify/models/parameter_filters_list_referrals_redeemable_holders_holder_role.py b/voucherify/models/parameter_filters_list_referrals_redeemable_holders_holder_role.py
new file mode 100644
index 00000000..6b5079cd
--- /dev/null
+++ b/voucherify/models/parameter_filters_list_referrals_redeemable_holders_holder_role.py
@@ -0,0 +1,92 @@
+# coding: utf-8
+
+"""
+ Voucherify API
+
+ Voucherify promotion engine REST API. Please see https://docs.voucherify.io/docs for more details.
+
+ The version of the OpenAPI document: v2018-08-01
+ Contact: support@voucherify.io
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict
+from typing import Any, ClassVar, Dict, List, Optional
+from voucherify.models.parameter_filters_list_referrals_redeemable_holders_holder_role_conditions import ParameterFiltersListReferralsRedeemableHoldersHolderRoleConditions
+from typing import Optional, Set
+from typing_extensions import Self
+
+class ParameterFiltersListReferralsRedeemableHoldersHolderRole(BaseModel):
+ """
+ Holder role of the redeemable. Allowed values: `REFEREE`, `REFERRER`
+ """ # noqa: E501
+ conditions: Optional[ParameterFiltersListReferralsRedeemableHoldersHolderRoleConditions] = None
+ __properties: ClassVar[List[str]] = ["conditions"]
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of ParameterFiltersListReferralsRedeemableHoldersHolderRole from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([
+ ])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ # override the default output from pydantic by calling `to_dict()` of conditions
+ if self.conditions:
+ _dict['conditions'] = self.conditions.to_dict()
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of ParameterFiltersListReferralsRedeemableHoldersHolderRole from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "conditions": ParameterFiltersListReferralsRedeemableHoldersHolderRoleConditions.from_dict(obj["conditions"]) if obj.get("conditions") is not None else None
+ })
+ return _obj
+
+
diff --git a/voucherify/models/parameter_filters_list_referrals_redeemable_holders_holder_role_conditions.py b/voucherify/models/parameter_filters_list_referrals_redeemable_holders_holder_role_conditions.py
new file mode 100644
index 00000000..e9d65d73
--- /dev/null
+++ b/voucherify/models/parameter_filters_list_referrals_redeemable_holders_holder_role_conditions.py
@@ -0,0 +1,184 @@
+# coding: utf-8
+
+"""
+ Voucherify API
+
+ Voucherify promotion engine REST API. Please see https://docs.voucherify.io/docs for more details.
+
+ The version of the OpenAPI document: v2018-08-01
+ Contact: support@voucherify.io
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator
+from typing import Any, ClassVar, Dict, List, Optional
+from typing import Optional, Set
+from typing_extensions import Self
+
+class ParameterFiltersListReferralsRedeemableHoldersHolderRoleConditions(BaseModel):
+ """
+ ParameterFiltersListReferralsRedeemableHoldersHolderRoleConditions
+ """ # noqa: E501
+ var_in: Optional[List[StrictStr]] = Field(default=None, description="Array of resource values that should be included in the results (multiple values).", alias="$in")
+ not_in: Optional[List[StrictStr]] = Field(default=None, description="Array of resource values that should be included in the results (multiple values).", alias="$not_in")
+ var_is: Optional[StrictStr] = Field(default=None, description="Value is exactly this value (single value).", alias="$is")
+ is_not: Optional[StrictStr] = Field(default=None, description="Results omit this value (single value).", alias="$is_not")
+ has_value: Optional[StrictStr] = Field(default=None, description="Value is NOT null. The value for this parameter is an empty string.", alias="$has_value")
+ is_unknown: Optional[StrictStr] = Field(default=None, description="Value is null. The value for this parameter is an empty string.", alias="$is_unknown")
+ starts_with: Optional[StrictStr] = Field(default=None, description="Value starts with the specified string.", alias="$starts_with")
+ ends_with: Optional[StrictStr] = Field(default=None, description="Value ends with the specified string.", alias="$ends_with")
+ __properties: ClassVar[List[str]] = ["$in", "$not_in", "$is", "$is_not", "$has_value", "$is_unknown", "$starts_with", "$ends_with"]
+
+ @field_validator('var_in')
+ def var_in_validate_enum(cls, value):
+ """Validates the enum"""
+ if value is None:
+ return value
+
+ for i in value:
+ if i not in set(['REFEREE', 'REFERRER']):
+ raise ValueError("each list item must be one of ('REFEREE', 'REFERRER')")
+ return value
+
+ @field_validator('not_in')
+ def not_in_validate_enum(cls, value):
+ """Validates the enum"""
+ if value is None:
+ return value
+
+ for i in value:
+ if i not in set(['REFEREE', 'REFERRER']):
+ raise ValueError("each list item must be one of ('REFEREE', 'REFERRER')")
+ return value
+
+ @field_validator('var_is')
+ def var_is_validate_enum(cls, value):
+ """Validates the enum"""
+ if value is None:
+ return value
+
+ if value not in set(['REFEREE', 'REFERRER']):
+ raise ValueError("must be one of enum values ('REFEREE', 'REFERRER')")
+ return value
+
+ @field_validator('is_not')
+ def is_not_validate_enum(cls, value):
+ """Validates the enum"""
+ if value is None:
+ return value
+
+ if value not in set(['REFEREE', 'REFERRER']):
+ raise ValueError("must be one of enum values ('REFEREE', 'REFERRER')")
+ return value
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of ParameterFiltersListReferralsRedeemableHoldersHolderRoleConditions from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([
+ ])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ # set to None if var_in (nullable) is None
+ # and model_fields_set contains the field
+ if self.var_in is None and "var_in" in self.model_fields_set:
+ _dict['$in'] = None
+
+ # set to None if not_in (nullable) is None
+ # and model_fields_set contains the field
+ if self.not_in is None and "not_in" in self.model_fields_set:
+ _dict['$not_in'] = None
+
+ # set to None if var_is (nullable) is None
+ # and model_fields_set contains the field
+ if self.var_is is None and "var_is" in self.model_fields_set:
+ _dict['$is'] = None
+
+ # set to None if is_not (nullable) is None
+ # and model_fields_set contains the field
+ if self.is_not is None and "is_not" in self.model_fields_set:
+ _dict['$is_not'] = None
+
+ # set to None if has_value (nullable) is None
+ # and model_fields_set contains the field
+ if self.has_value is None and "has_value" in self.model_fields_set:
+ _dict['$has_value'] = None
+
+ # set to None if is_unknown (nullable) is None
+ # and model_fields_set contains the field
+ if self.is_unknown is None and "is_unknown" in self.model_fields_set:
+ _dict['$is_unknown'] = None
+
+ # set to None if starts_with (nullable) is None
+ # and model_fields_set contains the field
+ if self.starts_with is None and "starts_with" in self.model_fields_set:
+ _dict['$starts_with'] = None
+
+ # set to None if ends_with (nullable) is None
+ # and model_fields_set contains the field
+ if self.ends_with is None and "ends_with" in self.model_fields_set:
+ _dict['$ends_with'] = None
+
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of ParameterFiltersListReferralsRedeemableHoldersHolderRoleConditions from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "$in": obj.get("$in"),
+ "$not_in": obj.get("$not_in"),
+ "$is": obj.get("$is"),
+ "$is_not": obj.get("$is_not"),
+ "$has_value": obj.get("$has_value"),
+ "$is_unknown": obj.get("$is_unknown"),
+ "$starts_with": obj.get("$starts_with"),
+ "$ends_with": obj.get("$ends_with")
+ })
+ return _obj
+
+
diff --git a/voucherify/models/parameter_filters_list_referrals_redeemable_holders_id.py b/voucherify/models/parameter_filters_list_referrals_redeemable_holders_id.py
new file mode 100644
index 00000000..7685b019
--- /dev/null
+++ b/voucherify/models/parameter_filters_list_referrals_redeemable_holders_id.py
@@ -0,0 +1,92 @@
+# coding: utf-8
+
+"""
+ Voucherify API
+
+ Voucherify promotion engine REST API. Please see https://docs.voucherify.io/docs for more details.
+
+ The version of the OpenAPI document: v2018-08-01
+ Contact: support@voucherify.io
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict
+from typing import Any, ClassVar, Dict, List, Optional
+from voucherify.models.filter_conditions_string import FilterConditionsString
+from typing import Optional, Set
+from typing_extensions import Self
+
+class ParameterFiltersListReferralsRedeemableHoldersId(BaseModel):
+ """
+ Unique redeemable holder ID, i.e. `rh_0e77502f84f0f4a6a8`.
+ """ # noqa: E501
+ conditions: Optional[FilterConditionsString] = None
+ __properties: ClassVar[List[str]] = ["conditions"]
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of ParameterFiltersListReferralsRedeemableHoldersId from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([
+ ])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ # override the default output from pydantic by calling `to_dict()` of conditions
+ if self.conditions:
+ _dict['conditions'] = self.conditions.to_dict()
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of ParameterFiltersListReferralsRedeemableHoldersId from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "conditions": FilterConditionsString.from_dict(obj["conditions"]) if obj.get("conditions") is not None else None
+ })
+ return _obj
+
+
diff --git a/voucherify/models/parameter_filters_list_referrals_redeemable_holders_redeemable_id.py b/voucherify/models/parameter_filters_list_referrals_redeemable_holders_redeemable_id.py
new file mode 100644
index 00000000..7894cdd1
--- /dev/null
+++ b/voucherify/models/parameter_filters_list_referrals_redeemable_holders_redeemable_id.py
@@ -0,0 +1,92 @@
+# coding: utf-8
+
+"""
+ Voucherify API
+
+ Voucherify promotion engine REST API. Please see https://docs.voucherify.io/docs for more details.
+
+ The version of the OpenAPI document: v2018-08-01
+ Contact: support@voucherify.io
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict
+from typing import Any, ClassVar, Dict, List, Optional
+from voucherify.models.filter_conditions_string import FilterConditionsString
+from typing import Optional, Set
+from typing_extensions import Self
+
+class ParameterFiltersListReferralsRedeemableHoldersRedeemableId(BaseModel):
+ """
+ Unique customer ID, i.e. `cust_sehkNIi8Uq2qQuRqSr7xn4Zi`.
+ """ # noqa: E501
+ conditions: Optional[FilterConditionsString] = None
+ __properties: ClassVar[List[str]] = ["conditions"]
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of ParameterFiltersListReferralsRedeemableHoldersRedeemableId from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([
+ ])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ # override the default output from pydantic by calling `to_dict()` of conditions
+ if self.conditions:
+ _dict['conditions'] = self.conditions.to_dict()
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of ParameterFiltersListReferralsRedeemableHoldersRedeemableId from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "conditions": FilterConditionsString.from_dict(obj["conditions"]) if obj.get("conditions") is not None else None
+ })
+ return _obj
+
+
diff --git a/voucherify/models/parameter_filters_list_referrals_redeemable_holders_redeemable_object.py b/voucherify/models/parameter_filters_list_referrals_redeemable_holders_redeemable_object.py
new file mode 100644
index 00000000..3bc59a7c
--- /dev/null
+++ b/voucherify/models/parameter_filters_list_referrals_redeemable_holders_redeemable_object.py
@@ -0,0 +1,92 @@
+# coding: utf-8
+
+"""
+ Voucherify API
+
+ Voucherify promotion engine REST API. Please see https://docs.voucherify.io/docs for more details.
+
+ The version of the OpenAPI document: v2018-08-01
+ Contact: support@voucherify.io
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict
+from typing import Any, ClassVar, Dict, List, Optional
+from voucherify.models.filter_conditions_string import FilterConditionsString
+from typing import Optional, Set
+from typing_extensions import Self
+
+class ParameterFiltersListReferralsRedeemableHoldersRedeemableObject(BaseModel):
+ """
+ Unique customer ID, i.e. `cust_sehkNIi8Uq2qQuRqSr7xn4Zi`.
+ """ # noqa: E501
+ conditions: Optional[FilterConditionsString] = None
+ __properties: ClassVar[List[str]] = ["conditions"]
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of ParameterFiltersListReferralsRedeemableHoldersRedeemableObject from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([
+ ])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ # override the default output from pydantic by calling `to_dict()` of conditions
+ if self.conditions:
+ _dict['conditions'] = self.conditions.to_dict()
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of ParameterFiltersListReferralsRedeemableHoldersRedeemableObject from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "conditions": FilterConditionsString.from_dict(obj["conditions"]) if obj.get("conditions") is not None else None
+ })
+ return _obj
+
+
diff --git a/voucherify/models/parameter_filters_list_referrals_redeemable_holders_voucher_type.py b/voucherify/models/parameter_filters_list_referrals_redeemable_holders_voucher_type.py
new file mode 100644
index 00000000..9e838125
--- /dev/null
+++ b/voucherify/models/parameter_filters_list_referrals_redeemable_holders_voucher_type.py
@@ -0,0 +1,92 @@
+# coding: utf-8
+
+"""
+ Voucherify API
+
+ Voucherify promotion engine REST API. Please see https://docs.voucherify.io/docs for more details.
+
+ The version of the OpenAPI document: v2018-08-01
+ Contact: support@voucherify.io
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict
+from typing import Any, ClassVar, Dict, List, Optional
+from voucherify.models.parameter_filters_list_customer_redeemables_voucher_type_conditions import ParameterFiltersListCustomerRedeemablesVoucherTypeConditions
+from typing import Optional, Set
+from typing_extensions import Self
+
+class ParameterFiltersListReferralsRedeemableHoldersVoucherType(BaseModel):
+ """
+ Type of the voucher. Allowed values: `DISCOUNT_VOUCHER`, `GIFT_VOUCHER`, `LOYALTY_CARD`.
+ """ # noqa: E501
+ conditions: Optional[ParameterFiltersListCustomerRedeemablesVoucherTypeConditions] = None
+ __properties: ClassVar[List[str]] = ["conditions"]
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of ParameterFiltersListReferralsRedeemableHoldersVoucherType from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([
+ ])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ # override the default output from pydantic by calling `to_dict()` of conditions
+ if self.conditions:
+ _dict['conditions'] = self.conditions.to_dict()
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of ParameterFiltersListReferralsRedeemableHoldersVoucherType from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "conditions": ParameterFiltersListCustomerRedeemablesVoucherTypeConditions.from_dict(obj["conditions"]) if obj.get("conditions") is not None else None
+ })
+ return _obj
+
+
diff --git a/voucherify/models/parameter_filters_list_templates.py b/voucherify/models/parameter_filters_list_templates.py
new file mode 100644
index 00000000..8b61db57
--- /dev/null
+++ b/voucherify/models/parameter_filters_list_templates.py
@@ -0,0 +1,122 @@
+# coding: utf-8
+
+"""
+ Voucherify API
+
+ Voucherify promotion engine REST API. Please see https://docs.voucherify.io/docs for more details.
+
+ The version of the OpenAPI document: v2018-08-01
+ Contact: support@voucherify.io
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict
+from typing import Any, ClassVar, Dict, List, Optional
+from voucherify.models.junction import Junction
+from voucherify.models.parameter_filters_list_templates_campaign_type import ParameterFiltersListTemplatesCampaignType
+from voucherify.models.parameter_filters_list_templates_id import ParameterFiltersListTemplatesId
+from voucherify.models.parameter_filters_list_templates_name import ParameterFiltersListTemplatesName
+from typing import Optional, Set
+from typing_extensions import Self
+
+class ParameterFiltersListTemplates(BaseModel):
+ """
+ ParameterFiltersListTemplates
+ """ # noqa: E501
+ junction: Optional[Junction] = None
+ id: Optional[ParameterFiltersListTemplatesId] = None
+ name: Optional[ParameterFiltersListTemplatesName] = None
+ campaign_type: Optional[ParameterFiltersListTemplatesCampaignType] = None
+ __properties: ClassVar[List[str]] = ["junction", "id", "name", "campaign_type"]
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of ParameterFiltersListTemplates from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([
+ ])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ # override the default output from pydantic by calling `to_dict()` of id
+ if self.id:
+ _dict['id'] = self.id.to_dict()
+ # override the default output from pydantic by calling `to_dict()` of name
+ if self.name:
+ _dict['name'] = self.name.to_dict()
+ # override the default output from pydantic by calling `to_dict()` of campaign_type
+ if self.campaign_type:
+ _dict['campaign_type'] = self.campaign_type.to_dict()
+ # set to None if id (nullable) is None
+ # and model_fields_set contains the field
+ if self.id is None and "id" in self.model_fields_set:
+ _dict['id'] = None
+
+ # set to None if name (nullable) is None
+ # and model_fields_set contains the field
+ if self.name is None and "name" in self.model_fields_set:
+ _dict['name'] = None
+
+ # set to None if campaign_type (nullable) is None
+ # and model_fields_set contains the field
+ if self.campaign_type is None and "campaign_type" in self.model_fields_set:
+ _dict['campaign_type'] = None
+
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of ParameterFiltersListTemplates from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "junction": obj.get("junction"),
+ "id": ParameterFiltersListTemplatesId.from_dict(obj["id"]) if obj.get("id") is not None else None,
+ "name": ParameterFiltersListTemplatesName.from_dict(obj["name"]) if obj.get("name") is not None else None,
+ "campaign_type": ParameterFiltersListTemplatesCampaignType.from_dict(obj["campaign_type"]) if obj.get("campaign_type") is not None else None
+ })
+ return _obj
+
+
diff --git a/voucherify/models/parameter_filters_list_templates_campaign_type.py b/voucherify/models/parameter_filters_list_templates_campaign_type.py
new file mode 100644
index 00000000..e13a5c47
--- /dev/null
+++ b/voucherify/models/parameter_filters_list_templates_campaign_type.py
@@ -0,0 +1,97 @@
+# coding: utf-8
+
+"""
+ Voucherify API
+
+ Voucherify promotion engine REST API. Please see https://docs.voucherify.io/docs for more details.
+
+ The version of the OpenAPI document: v2018-08-01
+ Contact: support@voucherify.io
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict
+from typing import Any, ClassVar, Dict, List, Optional
+from voucherify.models.parameter_filters_list_templates_campaign_type_conditions import ParameterFiltersListTemplatesCampaignTypeConditions
+from typing import Optional, Set
+from typing_extensions import Self
+
+class ParameterFiltersListTemplatesCampaignType(BaseModel):
+ """
+ Campaign template campaign type.
+ """ # noqa: E501
+ conditions: Optional[ParameterFiltersListTemplatesCampaignTypeConditions] = None
+ __properties: ClassVar[List[str]] = ["conditions"]
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of ParameterFiltersListTemplatesCampaignType from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([
+ ])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ # override the default output from pydantic by calling `to_dict()` of conditions
+ if self.conditions:
+ _dict['conditions'] = self.conditions.to_dict()
+ # set to None if conditions (nullable) is None
+ # and model_fields_set contains the field
+ if self.conditions is None and "conditions" in self.model_fields_set:
+ _dict['conditions'] = None
+
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of ParameterFiltersListTemplatesCampaignType from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "conditions": ParameterFiltersListTemplatesCampaignTypeConditions.from_dict(obj["conditions"]) if obj.get("conditions") is not None else None
+ })
+ return _obj
+
+
diff --git a/voucherify/models/parameter_filters_list_templates_campaign_type_conditions.py b/voucherify/models/parameter_filters_list_templates_campaign_type_conditions.py
new file mode 100644
index 00000000..122b9365
--- /dev/null
+++ b/voucherify/models/parameter_filters_list_templates_campaign_type_conditions.py
@@ -0,0 +1,184 @@
+# coding: utf-8
+
+"""
+ Voucherify API
+
+ Voucherify promotion engine REST API. Please see https://docs.voucherify.io/docs for more details.
+
+ The version of the OpenAPI document: v2018-08-01
+ Contact: support@voucherify.io
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator
+from typing import Any, ClassVar, Dict, List, Optional
+from typing import Optional, Set
+from typing_extensions import Self
+
+class ParameterFiltersListTemplatesCampaignTypeConditions(BaseModel):
+ """
+ Data filters used to narrow down the data records to be returned in the result.
+ """ # noqa: E501
+ var_in: Optional[List[StrictStr]] = Field(default=None, description="Array of resource values that should be included in the results (multiple values).", alias="$in")
+ not_in: Optional[List[StrictStr]] = Field(default=None, description="Array of resource values that should be included in the results (multiple values).", alias="$not_in")
+ var_is: Optional[StrictStr] = Field(default=None, description="Value is exactly this value (single value).", alias="$is")
+ is_not: Optional[StrictStr] = Field(default=None, description="Results omit this value (single value).", alias="$is_not")
+ has_value: Optional[StrictStr] = Field(default=None, description="Value is NOT null. The value for this parameter is an empty string.", alias="$has_value")
+ is_unknown: Optional[StrictStr] = Field(default=None, description="Value is null. The value for this parameter is an empty string.", alias="$is_unknown")
+ starts_with: Optional[StrictStr] = Field(default=None, description="Value starts with the specified string.", alias="$starts_with")
+ ends_with: Optional[StrictStr] = Field(default=None, description="Value ends with the specified string.", alias="$ends_with")
+ __properties: ClassVar[List[str]] = ["$in", "$not_in", "$is", "$is_not", "$has_value", "$is_unknown", "$starts_with", "$ends_with"]
+
+ @field_validator('var_in')
+ def var_in_validate_enum(cls, value):
+ """Validates the enum"""
+ if value is None:
+ return value
+
+ for i in value:
+ if i not in set(['DISCOUNT_COUPONS', 'GIFT_VOUCHERS']):
+ raise ValueError("each list item must be one of ('DISCOUNT_COUPONS', 'GIFT_VOUCHERS')")
+ return value
+
+ @field_validator('not_in')
+ def not_in_validate_enum(cls, value):
+ """Validates the enum"""
+ if value is None:
+ return value
+
+ for i in value:
+ if i not in set(['DISCOUNT_COUPONS', 'GIFT_VOUCHERS']):
+ raise ValueError("each list item must be one of ('DISCOUNT_COUPONS', 'GIFT_VOUCHERS')")
+ return value
+
+ @field_validator('var_is')
+ def var_is_validate_enum(cls, value):
+ """Validates the enum"""
+ if value is None:
+ return value
+
+ if value not in set(['DISCOUNT_COUPONS', 'GIFT_VOUCHERS']):
+ raise ValueError("must be one of enum values ('DISCOUNT_COUPONS', 'GIFT_VOUCHERS')")
+ return value
+
+ @field_validator('is_not')
+ def is_not_validate_enum(cls, value):
+ """Validates the enum"""
+ if value is None:
+ return value
+
+ if value not in set(['DISCOUNT_COUPONS', 'GIFT_VOUCHERS']):
+ raise ValueError("must be one of enum values ('DISCOUNT_COUPONS', 'GIFT_VOUCHERS')")
+ return value
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of ParameterFiltersListTemplatesCampaignTypeConditions from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([
+ ])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ # set to None if var_in (nullable) is None
+ # and model_fields_set contains the field
+ if self.var_in is None and "var_in" in self.model_fields_set:
+ _dict['$in'] = None
+
+ # set to None if not_in (nullable) is None
+ # and model_fields_set contains the field
+ if self.not_in is None and "not_in" in self.model_fields_set:
+ _dict['$not_in'] = None
+
+ # set to None if var_is (nullable) is None
+ # and model_fields_set contains the field
+ if self.var_is is None and "var_is" in self.model_fields_set:
+ _dict['$is'] = None
+
+ # set to None if is_not (nullable) is None
+ # and model_fields_set contains the field
+ if self.is_not is None and "is_not" in self.model_fields_set:
+ _dict['$is_not'] = None
+
+ # set to None if has_value (nullable) is None
+ # and model_fields_set contains the field
+ if self.has_value is None and "has_value" in self.model_fields_set:
+ _dict['$has_value'] = None
+
+ # set to None if is_unknown (nullable) is None
+ # and model_fields_set contains the field
+ if self.is_unknown is None and "is_unknown" in self.model_fields_set:
+ _dict['$is_unknown'] = None
+
+ # set to None if starts_with (nullable) is None
+ # and model_fields_set contains the field
+ if self.starts_with is None and "starts_with" in self.model_fields_set:
+ _dict['$starts_with'] = None
+
+ # set to None if ends_with (nullable) is None
+ # and model_fields_set contains the field
+ if self.ends_with is None and "ends_with" in self.model_fields_set:
+ _dict['$ends_with'] = None
+
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of ParameterFiltersListTemplatesCampaignTypeConditions from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "$in": obj.get("$in"),
+ "$not_in": obj.get("$not_in"),
+ "$is": obj.get("$is"),
+ "$is_not": obj.get("$is_not"),
+ "$has_value": obj.get("$has_value"),
+ "$is_unknown": obj.get("$is_unknown"),
+ "$starts_with": obj.get("$starts_with"),
+ "$ends_with": obj.get("$ends_with")
+ })
+ return _obj
+
+
diff --git a/voucherify/models/parameter_filters_list_templates_id.py b/voucherify/models/parameter_filters_list_templates_id.py
new file mode 100644
index 00000000..0a46ecee
--- /dev/null
+++ b/voucherify/models/parameter_filters_list_templates_id.py
@@ -0,0 +1,92 @@
+# coding: utf-8
+
+"""
+ Voucherify API
+
+ Voucherify promotion engine REST API. Please see https://docs.voucherify.io/docs for more details.
+
+ The version of the OpenAPI document: v2018-08-01
+ Contact: support@voucherify.io
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict
+from typing import Any, ClassVar, Dict, List, Optional
+from voucherify.models.filter_conditions_string import FilterConditionsString
+from typing import Optional, Set
+from typing_extensions import Self
+
+class ParameterFiltersListTemplatesId(BaseModel):
+ """
+ Unique template ID.
+ """ # noqa: E501
+ conditions: Optional[FilterConditionsString] = None
+ __properties: ClassVar[List[str]] = ["conditions"]
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of ParameterFiltersListTemplatesId from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([
+ ])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ # override the default output from pydantic by calling `to_dict()` of conditions
+ if self.conditions:
+ _dict['conditions'] = self.conditions.to_dict()
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of ParameterFiltersListTemplatesId from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "conditions": FilterConditionsString.from_dict(obj["conditions"]) if obj.get("conditions") is not None else None
+ })
+ return _obj
+
+
diff --git a/voucherify/models/parameter_filters_list_templates_name.py b/voucherify/models/parameter_filters_list_templates_name.py
new file mode 100644
index 00000000..c8840a22
--- /dev/null
+++ b/voucherify/models/parameter_filters_list_templates_name.py
@@ -0,0 +1,92 @@
+# coding: utf-8
+
+"""
+ Voucherify API
+
+ Voucherify promotion engine REST API. Please see https://docs.voucherify.io/docs for more details.
+
+ The version of the OpenAPI document: v2018-08-01
+ Contact: support@voucherify.io
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict
+from typing import Any, ClassVar, Dict, List, Optional
+from voucherify.models.filter_conditions_string import FilterConditionsString
+from typing import Optional, Set
+from typing_extensions import Self
+
+class ParameterFiltersListTemplatesName(BaseModel):
+ """
+ Unique user-defined template name.
+ """ # noqa: E501
+ conditions: Optional[FilterConditionsString] = None
+ __properties: ClassVar[List[str]] = ["conditions"]
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of ParameterFiltersListTemplatesName from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([
+ ])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ # override the default output from pydantic by calling `to_dict()` of conditions
+ if self.conditions:
+ _dict['conditions'] = self.conditions.to_dict()
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of ParameterFiltersListTemplatesName from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "conditions": FilterConditionsString.from_dict(obj["conditions"]) if obj.get("conditions") is not None else None
+ })
+ return _obj
+
+
diff --git a/voucherify/models/parameter_order_list_bin.py b/voucherify/models/parameter_order_list_bin.py
new file mode 100644
index 00000000..9b5b81d1
--- /dev/null
+++ b/voucherify/models/parameter_order_list_bin.py
@@ -0,0 +1,38 @@
+# coding: utf-8
+
+"""
+ Voucherify API
+
+ Voucherify promotion engine REST API. Please see https://docs.voucherify.io/docs for more details.
+
+ The version of the OpenAPI document: v2018-08-01
+ Contact: support@voucherify.io
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import json
+from enum import Enum
+from typing_extensions import Self
+
+
+class ParameterOrderListBin(str, Enum):
+ """
+ ParameterOrderListBin
+ """
+
+ """
+ allowed enum values
+ """
+ ID = 'id'
+ MINUS_ID = '-id'
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Self:
+ """Create an instance of ParameterOrderListBin from a JSON string"""
+ return cls(json.loads(json_str))
+
+
diff --git a/voucherify/models/parameter_order_list_locations.py b/voucherify/models/parameter_order_list_locations.py
new file mode 100644
index 00000000..5b0166f7
--- /dev/null
+++ b/voucherify/models/parameter_order_list_locations.py
@@ -0,0 +1,40 @@
+# coding: utf-8
+
+"""
+ Voucherify API
+
+ Voucherify promotion engine REST API. Please see https://docs.voucherify.io/docs for more details.
+
+ The version of the OpenAPI document: v2018-08-01
+ Contact: support@voucherify.io
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import json
+from enum import Enum
+from typing_extensions import Self
+
+
+class ParameterOrderListLocations(str, Enum):
+ """
+ ParameterOrderListLocations
+ """
+
+ """
+ allowed enum values
+ """
+ CREATED_AT = 'created_at'
+ MINUS_CREATED_AT = '-created_at'
+ UPDATED_AT = 'updated_at'
+ MINUS_UPDATED_AT = '-updated_at'
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Self:
+ """Create an instance of ParameterOrderListLocations from a JSON string"""
+ return cls(json.loads(json_str))
+
+
diff --git a/voucherify/models/parameter_templates_list.py b/voucherify/models/parameter_templates_list.py
new file mode 100644
index 00000000..c20ff780
--- /dev/null
+++ b/voucherify/models/parameter_templates_list.py
@@ -0,0 +1,38 @@
+# coding: utf-8
+
+"""
+ Voucherify API
+
+ Voucherify promotion engine REST API. Please see https://docs.voucherify.io/docs for more details.
+
+ The version of the OpenAPI document: v2018-08-01
+ Contact: support@voucherify.io
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import json
+from enum import Enum
+from typing_extensions import Self
+
+
+class ParameterTemplatesList(str, Enum):
+ """
+ ParameterTemplatesList
+ """
+
+ """
+ allowed enum values
+ """
+ ID = 'id'
+ MINUS_ID = '-id'
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Self:
+ """Create an instance of ParameterTemplatesList from a JSON string"""
+ return cls(json.loads(json_str))
+
+
diff --git a/voucherify/models/parameter_voucher_type_list_publications.py b/voucherify/models/parameter_voucher_type_list_publications.py
index b8b2beab..ab7571f4 100644
--- a/voucherify/models/parameter_voucher_type_list_publications.py
+++ b/voucherify/models/parameter_voucher_type_list_publications.py
@@ -29,7 +29,6 @@ class ParameterVoucherTypeListPublications(str, Enum):
"""
DISCOUNT = 'discount'
LOYALTY = 'loyalty'
- LUCKY_DRAW = 'lucky_draw'
@classmethod
def from_json(cls, json_str: str) -> Self:
diff --git a/voucherify/models/product_collections_create_request_body.py b/voucherify/models/product_collections_create_request_body.py
index aafcab0d..e0c04514 100644
--- a/voucherify/models/product_collections_create_request_body.py
+++ b/voucherify/models/product_collections_create_request_body.py
@@ -20,7 +20,6 @@
from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator
from typing import Any, ClassVar, Dict, List, Optional
-from voucherify.models.product_collections_create_request_body_filter import ProductCollectionsCreateRequestBodyFilter
from voucherify.models.product_collections_create_request_body_products_item import ProductCollectionsCreateRequestBodyProductsItem
from typing import Optional, Set
from typing_extensions import Self
@@ -32,7 +31,7 @@ class ProductCollectionsCreateRequestBody(BaseModel):
type: Optional[StrictStr] = Field(default='STATIC', description="Show that the product collection is static (manually selected products).")
name: Optional[StrictStr] = Field(default=None, description="Unique user-defined product collection name.")
products: Optional[List[ProductCollectionsCreateRequestBodyProductsItem]] = Field(default=None, description="Defines a set of products for a `STATIC` product collection type.")
- filter: Optional[ProductCollectionsCreateRequestBodyFilter] = None
+ filter: Optional[Dict[str, Any]] = Field(default=None, description="Defines a set of criteria and boundary conditions for an `AUTO_UPDATE` product collection type.")
__properties: ClassVar[List[str]] = ["type", "name", "products", "filter"]
@field_validator('type')
@@ -91,9 +90,6 @@ def to_dict(self) -> Dict[str, Any]:
if _item_products:
_items.append(_item_products.to_dict())
_dict['products'] = _items
- # override the default output from pydantic by calling `to_dict()` of filter
- if self.filter:
- _dict['filter'] = self.filter.to_dict()
# set to None if name (nullable) is None
# and model_fields_set contains the field
if self.name is None and "name" in self.model_fields_set:
@@ -124,7 +120,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
"type": obj.get("type") if obj.get("type") is not None else 'STATIC',
"name": obj.get("name"),
"products": [ProductCollectionsCreateRequestBodyProductsItem.from_dict(_item) for _item in obj["products"]] if obj.get("products") is not None else None,
- "filter": ProductCollectionsCreateRequestBodyFilter.from_dict(obj["filter"]) if obj.get("filter") is not None else None
+ "filter": obj.get("filter")
})
return _obj
diff --git a/voucherify/models/product_collections_create_response_body.py b/voucherify/models/product_collections_create_response_body.py
index be3b250c..d96bae2b 100644
--- a/voucherify/models/product_collections_create_response_body.py
+++ b/voucherify/models/product_collections_create_response_body.py
@@ -21,7 +21,6 @@
from datetime import datetime
from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator
from typing import Any, ClassVar, Dict, List, Optional
-from voucherify.models.product_collections_create_response_body_filter import ProductCollectionsCreateResponseBodyFilter
from voucherify.models.product_collections_create_response_body_products_item import ProductCollectionsCreateResponseBodyProductsItem
from typing import Optional, Set
from typing_extensions import Self
@@ -33,7 +32,7 @@ class ProductCollectionsCreateResponseBody(BaseModel):
id: Optional[StrictStr] = Field(default=None, description="Product collection ID.")
name: Optional[StrictStr] = Field(default=None, description="Unique user-defined product collection name.")
type: Optional[StrictStr] = Field(default=None, description="Describes whether the product collection is dynamic (products come in and leave based on set criteria) or static (manually selected products).")
- filter: Optional[ProductCollectionsCreateResponseBodyFilter] = None
+ filter: Optional[Dict[str, Any]] = Field(default=None, description="Defines a set of criteria and boundary conditions for an `AUTO_UPDATE` product collection type.")
products: Optional[List[ProductCollectionsCreateResponseBodyProductsItem]] = Field(default=None, description="Defines a set of products for a `STATIC` product collection type.")
created_at: Optional[datetime] = Field(default=None, description="Timestamp representing the date and time when the product collection was created. The value is shown in the ISO 8601 format.")
object: Optional[StrictStr] = Field(default='products_collection', description="The type of the object represented by JSON. This object stores information about the static product collection.")
@@ -98,9 +97,6 @@ def to_dict(self) -> Dict[str, Any]:
exclude=excluded_fields,
exclude_none=True,
)
- # override the default output from pydantic by calling `to_dict()` of filter
- if self.filter:
- _dict['filter'] = self.filter.to_dict()
# override the default output from pydantic by calling `to_dict()` of each item in products (list)
_items = []
if self.products:
@@ -158,7 +154,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
"id": obj.get("id"),
"name": obj.get("name"),
"type": obj.get("type"),
- "filter": ProductCollectionsCreateResponseBodyFilter.from_dict(obj["filter"]) if obj.get("filter") is not None else None,
+ "filter": obj.get("filter"),
"products": [ProductCollectionsCreateResponseBodyProductsItem.from_dict(_item) for _item in obj["products"]] if obj.get("products") is not None else None,
"created_at": obj.get("created_at"),
"object": obj.get("object") if obj.get("object") is not None else 'products_collection'
diff --git a/voucherify/models/product_collections_get_response_body.py b/voucherify/models/product_collections_get_response_body.py
index 76915901..611167e3 100644
--- a/voucherify/models/product_collections_get_response_body.py
+++ b/voucherify/models/product_collections_get_response_body.py
@@ -21,7 +21,6 @@
from datetime import datetime
from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator
from typing import Any, ClassVar, Dict, List, Optional
-from voucherify.models.product_collections_get_response_body_filter import ProductCollectionsGetResponseBodyFilter
from voucherify.models.product_collections_get_response_body_products_item import ProductCollectionsGetResponseBodyProductsItem
from typing import Optional, Set
from typing_extensions import Self
@@ -33,7 +32,7 @@ class ProductCollectionsGetResponseBody(BaseModel):
id: Optional[StrictStr] = Field(default=None, description="Product collection ID.")
name: Optional[StrictStr] = Field(default=None, description="Unique user-defined product collection name.")
type: Optional[StrictStr] = Field(default=None, description="Describes whether the product collection is dynamic (products come in and leave based on set criteria) or static (manually selected products).")
- filter: Optional[ProductCollectionsGetResponseBodyFilter] = None
+ filter: Optional[Dict[str, Any]] = Field(default=None, description="Defines a set of criteria and boundary conditions for an `AUTO_UPDATE` product collection type.")
products: Optional[List[ProductCollectionsGetResponseBodyProductsItem]] = Field(default=None, description="Defines a set of products for a `STATIC` product collection type.")
created_at: Optional[datetime] = Field(default=None, description="Timestamp representing the date and time when the product collection was created. The value is shown in the ISO 8601 format.")
object: Optional[StrictStr] = Field(default='products_collection', description="The type of the object represented by JSON. This object stores information about the static product collection.")
@@ -98,9 +97,6 @@ def to_dict(self) -> Dict[str, Any]:
exclude=excluded_fields,
exclude_none=True,
)
- # override the default output from pydantic by calling `to_dict()` of filter
- if self.filter:
- _dict['filter'] = self.filter.to_dict()
# override the default output from pydantic by calling `to_dict()` of each item in products (list)
_items = []
if self.products:
@@ -158,7 +154,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
"id": obj.get("id"),
"name": obj.get("name"),
"type": obj.get("type"),
- "filter": ProductCollectionsGetResponseBodyFilter.from_dict(obj["filter"]) if obj.get("filter") is not None else None,
+ "filter": obj.get("filter"),
"products": [ProductCollectionsGetResponseBodyProductsItem.from_dict(_item) for _item in obj["products"]] if obj.get("products") is not None else None,
"created_at": obj.get("created_at"),
"object": obj.get("object") if obj.get("object") is not None else 'products_collection'
diff --git a/voucherify/models/product_collections_item.py b/voucherify/models/product_collections_item.py
index 03962268..24120005 100644
--- a/voucherify/models/product_collections_item.py
+++ b/voucherify/models/product_collections_item.py
@@ -21,7 +21,6 @@
from datetime import datetime
from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator
from typing import Any, ClassVar, Dict, List, Optional
-from voucherify.models.product_collections_item_filter import ProductCollectionsItemFilter
from voucherify.models.product_collections_item_products_item import ProductCollectionsItemProductsItem
from typing import Optional, Set
from typing_extensions import Self
@@ -33,7 +32,7 @@ class ProductCollectionsItem(BaseModel):
id: Optional[StrictStr] = Field(default=None, description="Product collection ID.")
name: Optional[StrictStr] = Field(default=None, description="Unique user-defined product collection name.")
type: Optional[StrictStr] = Field(default=None, description="Describes whether the product collection is dynamic (products come in and leave based on set criteria) or static (manually selected products).")
- filter: Optional[ProductCollectionsItemFilter] = None
+ filter: Optional[Dict[str, Any]] = Field(default=None, description="Defines a set of criteria and boundary conditions for an `AUTO_UPDATE` product collection type.")
products: Optional[List[ProductCollectionsItemProductsItem]] = Field(default=None, description="Defines a set of products for a `STATIC` product collection type.")
created_at: Optional[datetime] = Field(default=None, description="Timestamp representing the date and time when the product collection was created. The value is shown in the ISO 8601 format.")
object: Optional[StrictStr] = Field(default='products_collection', description="The type of the object represented by JSON. This object stores information about the static product collection.")
@@ -98,9 +97,6 @@ def to_dict(self) -> Dict[str, Any]:
exclude=excluded_fields,
exclude_none=True,
)
- # override the default output from pydantic by calling `to_dict()` of filter
- if self.filter:
- _dict['filter'] = self.filter.to_dict()
# override the default output from pydantic by calling `to_dict()` of each item in products (list)
_items = []
if self.products:
@@ -158,7 +154,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
"id": obj.get("id"),
"name": obj.get("name"),
"type": obj.get("type"),
- "filter": ProductCollectionsItemFilter.from_dict(obj["filter"]) if obj.get("filter") is not None else None,
+ "filter": obj.get("filter"),
"products": [ProductCollectionsItemProductsItem.from_dict(_item) for _item in obj["products"]] if obj.get("products") is not None else None,
"created_at": obj.get("created_at"),
"object": obj.get("object") if obj.get("object") is not None else 'products_collection'
diff --git a/voucherify/models/promotions_stacks_update_request_body_tiers.py b/voucherify/models/promotions_stacks_update_request_body_tiers.py
index 51b2c58d..865f58ea 100644
--- a/voucherify/models/promotions_stacks_update_request_body_tiers.py
+++ b/voucherify/models/promotions_stacks_update_request_body_tiers.py
@@ -28,7 +28,7 @@ class PromotionsStacksUpdateRequestBodyTiers(BaseModel):
Contains the tier configuration. A promotion stack can include up to 30 tiers.
""" # noqa: E501
ids: Optional[List[StrictStr]] = Field(default=None, description="Contains the list of tiers in a pre-defined sequence.")
- hierarchy_mode: Optional[StrictStr] = Field(default='MANUAL', description="Category hierarchy.")
+ hierarchy_mode: Optional[StrictStr] = Field(default='MANUAL', description="Category hierarchy. Categories with lower hierarchy are processed before categories with higher hierarchy value.")
__properties: ClassVar[List[str]] = ["ids", "hierarchy_mode"]
@field_validator('hierarchy_mode')
diff --git a/voucherify/models/promotions_tiers_create_request_body.py b/voucherify/models/promotions_tiers_create_request_body.py
index 726e82f0..9c5cb818 100644
--- a/voucherify/models/promotions_tiers_create_request_body.py
+++ b/voucherify/models/promotions_tiers_create_request_body.py
@@ -34,7 +34,6 @@ class PromotionsTiersCreateRequestBody(BaseModel):
""" # noqa: E501
name: Optional[StrictStr] = Field(default=None, description="Name of the promotion tier.")
banner: Optional[StrictStr] = Field(default=None, description="Text to be displayed to your customers on your website.")
- action: Optional[PromotionsTiersCreateRequestBodyAction] = None
metadata: Optional[Dict[str, Any]] = Field(default=None, description="The metadata object stores all custom attributes assigned to the promotion tier. A set of key/value pairs that you can attach to a promotion tier object. It can be useful for storing additional information about the promotion tier in a structured format.")
hierarchy: Optional[StrictInt] = Field(default=None, description="The promotions hierarchy defines the order in which the discounts from different tiers will be applied to a customer's order. If a customer qualifies for discounts from more than one tier, discounts will be applied in the order defined in the hierarchy.")
active: Optional[StrictBool] = Field(default=None, description="A flag to toggle the promotion tier on or off. You can disable a promotion tier even though it's within the active period defined by the `start_date` and `expiration_date`. - `true` indicates an *active* promotion tier - `false` indicates an *inactive* promotion tier")
@@ -43,10 +42,11 @@ class PromotionsTiersCreateRequestBody(BaseModel):
validity_timeframe: Optional[ValidityTimeframe] = None
validity_day_of_week: Optional[List[StrictInt]] = Field(default=None, description="Integer array corresponding to the particular days of the week in which the voucher is valid. - `0` Sunday - `1` Monday - `2` Tuesday - `3` Wednesday - `4` Thursday - `5` Friday - `6` Saturday")
validity_hours: Optional[ValidityHours] = None
- validation_rule_assignments: Optional[ValidationRuleAssignmentsList] = None
category: Optional[StrictStr] = Field(default=None, description="Assign a new or update the promotion tier's category using name.")
category_id: Optional[StrictStr] = Field(default=None, description="Assign a new or update the promotion tier's category using id")
- __properties: ClassVar[List[str]] = ["name", "banner", "action", "metadata", "hierarchy", "active", "start_date", "expiration_date", "validity_timeframe", "validity_day_of_week", "validity_hours", "validation_rule_assignments", "category", "category_id"]
+ action: Optional[PromotionsTiersCreateRequestBodyAction] = None
+ validation_rule_assignments: Optional[ValidationRuleAssignmentsList] = None
+ __properties: ClassVar[List[str]] = ["name", "banner", "metadata", "hierarchy", "active", "start_date", "expiration_date", "validity_timeframe", "validity_day_of_week", "validity_hours", "category", "category_id", "action", "validation_rule_assignments"]
@field_validator('validity_day_of_week')
def validity_day_of_week_validate_enum(cls, value):
@@ -98,15 +98,15 @@ def to_dict(self) -> Dict[str, Any]:
exclude=excluded_fields,
exclude_none=True,
)
- # override the default output from pydantic by calling `to_dict()` of action
- if self.action:
- _dict['action'] = self.action.to_dict()
# override the default output from pydantic by calling `to_dict()` of validity_timeframe
if self.validity_timeframe:
_dict['validity_timeframe'] = self.validity_timeframe.to_dict()
# override the default output from pydantic by calling `to_dict()` of validity_hours
if self.validity_hours:
_dict['validity_hours'] = self.validity_hours.to_dict()
+ # override the default output from pydantic by calling `to_dict()` of action
+ if self.action:
+ _dict['action'] = self.action.to_dict()
# override the default output from pydantic by calling `to_dict()` of validation_rule_assignments
if self.validation_rule_assignments:
_dict['validation_rule_assignments'] = self.validation_rule_assignments.to_dict()
@@ -120,11 +120,6 @@ def to_dict(self) -> Dict[str, Any]:
if self.banner is None and "banner" in self.model_fields_set:
_dict['banner'] = None
- # set to None if action (nullable) is None
- # and model_fields_set contains the field
- if self.action is None and "action" in self.model_fields_set:
- _dict['action'] = None
-
# set to None if metadata (nullable) is None
# and model_fields_set contains the field
if self.metadata is None and "metadata" in self.model_fields_set:
@@ -160,6 +155,11 @@ def to_dict(self) -> Dict[str, Any]:
if self.category_id is None and "category_id" in self.model_fields_set:
_dict['category_id'] = None
+ # set to None if action (nullable) is None
+ # and model_fields_set contains the field
+ if self.action is None and "action" in self.model_fields_set:
+ _dict['action'] = None
+
return _dict
@classmethod
@@ -174,7 +174,6 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
_obj = cls.model_validate({
"name": obj.get("name"),
"banner": obj.get("banner"),
- "action": PromotionsTiersCreateRequestBodyAction.from_dict(obj["action"]) if obj.get("action") is not None else None,
"metadata": obj.get("metadata"),
"hierarchy": obj.get("hierarchy"),
"active": obj.get("active"),
@@ -183,9 +182,10 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
"validity_timeframe": ValidityTimeframe.from_dict(obj["validity_timeframe"]) if obj.get("validity_timeframe") is not None else None,
"validity_day_of_week": obj.get("validity_day_of_week"),
"validity_hours": ValidityHours.from_dict(obj["validity_hours"]) if obj.get("validity_hours") is not None else None,
- "validation_rule_assignments": ValidationRuleAssignmentsList.from_dict(obj["validation_rule_assignments"]) if obj.get("validation_rule_assignments") is not None else None,
"category": obj.get("category"),
- "category_id": obj.get("category_id")
+ "category_id": obj.get("category_id"),
+ "action": PromotionsTiersCreateRequestBodyAction.from_dict(obj["action"]) if obj.get("action") is not None else None,
+ "validation_rule_assignments": ValidationRuleAssignmentsList.from_dict(obj["validation_rule_assignments"]) if obj.get("validation_rule_assignments") is not None else None
})
return _obj
diff --git a/voucherify/models/publications_create_request_body.py b/voucherify/models/publications_create_request_body.py
index 99d3ccc8..87f155f0 100644
--- a/voucherify/models/publications_create_request_body.py
+++ b/voucherify/models/publications_create_request_body.py
@@ -21,7 +21,7 @@
from pydantic import BaseModel, ConfigDict, Field, StrictStr
from typing import Any, ClassVar, Dict, List, Optional
from voucherify.models.create_publication_campaign import CreatePublicationCampaign
-from voucherify.models.publications_create_request_body_customer import PublicationsCreateRequestBodyCustomer
+from voucherify.models.customer import Customer
from typing import Optional, Set
from typing_extensions import Self
@@ -31,7 +31,7 @@ class PublicationsCreateRequestBody(BaseModel):
""" # noqa: E501
voucher: Optional[StrictStr] = Field(default=None, description="Code of the voucher being published.")
source_id: Optional[StrictStr] = Field(default=None, description="The merchant's publication ID if it is different from the Voucherify publication ID. It's an optional tracking identifier of a publication. It is really useful in case of an integration between multiple systems. It can be a publication ID from a CRM system, database or 3rd-party service. If `source_id` is provided only 1 voucher can be published per request.")
- customer: Optional[PublicationsCreateRequestBodyCustomer] = None
+ customer: Optional[Customer] = None
metadata: Optional[Dict[str, Any]] = None
channel: Optional[StrictStr] = Field(default=None, description="Specify the distribution channel.")
campaign: Optional[CreatePublicationCampaign] = None
@@ -92,11 +92,6 @@ def to_dict(self) -> Dict[str, Any]:
if self.source_id is None and "source_id" in self.model_fields_set:
_dict['source_id'] = None
- # set to None if customer (nullable) is None
- # and model_fields_set contains the field
- if self.customer is None and "customer" in self.model_fields_set:
- _dict['customer'] = None
-
# set to None if metadata (nullable) is None
# and model_fields_set contains the field
if self.metadata is None and "metadata" in self.model_fields_set:
@@ -121,7 +116,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
_obj = cls.model_validate({
"voucher": obj.get("voucher"),
"source_id": obj.get("source_id"),
- "customer": PublicationsCreateRequestBodyCustomer.from_dict(obj["customer"]) if obj.get("customer") is not None else None,
+ "customer": Customer.from_dict(obj["customer"]) if obj.get("customer") is not None else None,
"metadata": obj.get("metadata"),
"channel": obj.get("channel"),
"campaign": CreatePublicationCampaign.from_dict(obj["campaign"]) if obj.get("campaign") is not None else None
diff --git a/voucherify/models/qualifications_option.py b/voucherify/models/qualifications_option.py
index 3135e49e..4b2ff4a8 100644
--- a/voucherify/models/qualifications_option.py
+++ b/voucherify/models/qualifications_option.py
@@ -33,7 +33,7 @@ class QualificationsOption(BaseModel):
limit: Optional[Annotated[int, Field(le=100, strict=True)]] = Field(default=None, description="The maximum number of redeemables to be returned in the API request. The actual number of returned redeemables will be determined by the API. The default value is set to 5")
starting_after: Optional[datetime] = Field(default=None, description="Cursor used for paging.")
filters: Optional[QualificationsOptionFilters] = None
- expand: Optional[List[StrictStr]] = Field(default=None, description="The expand array lets you configure the parameters included in the response. Depending on the strings included in the array, the response will contain different details. | **Expand Option** | **Response Body** | |:---|:---| | [\"redeemable\"] | - Returns the redeemables' metadata. | | [\"category\"] | - Returns an expanded `categories` object, showing details about the category. | | [\"validation_rules\"] | - Returns an expanded `validation_rules` object, showing details about the validation rules. |")
+ expand: Optional[List[StrictStr]] = Field(default=None, description="The expand array lets you configure the parameters included in the response. Depending on the strings included in the array, the response will contain different details. | **Expand Option** | **Response Body** | |:---|:---| | [`\"redeemable\"`] | Returns the redeemables':
- metadata
- redeemable name,
- campaign name,
- campaign ID| | [`\"category\"`] | - Returns an expanded `categories` object, showing details about the category. | | [`\"validation_rules\"`] | - Returns an expanded `validation_rules` object, showing details about the validation rules. |")
sorting_rule: Optional[StrictStr] = Field(default=None, description="Is used to determine the order in which data is displayed in the result array. - `DEFAULT` - Sorting descending by `created_at` - `BEST_DEAL` - Sorting descending by `total_applied_discount_amount` - `LEAST_DEAL` - Sorting ascending by `total_applied_discount_amount`")
__properties: ClassVar[List[str]] = ["limit", "starting_after", "filters", "expand", "sorting_rule"]
diff --git a/voucherify/models/qualifications_redeemable.py b/voucherify/models/qualifications_redeemable.py
index 15d2545b..950942c1 100644
--- a/voucherify/models/qualifications_redeemable.py
+++ b/voucherify/models/qualifications_redeemable.py
@@ -22,7 +22,7 @@
from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator
from typing import Any, ClassVar, Dict, List, Optional
from voucherify.models.applicable_to_result_list import ApplicableToResultList
-from voucherify.models.category import Category
+from voucherify.models.category_with_stacking_rules_type import CategoryWithStackingRulesType
from voucherify.models.inapplicable_to_result_list import InapplicableToResultList
from voucherify.models.order_calculated import OrderCalculated
from voucherify.models.qualifications_redeemable_base import QualificationsRedeemableBase
@@ -44,7 +44,7 @@ class QualificationsRedeemable(BaseModel):
applicable_to: Optional[ApplicableToResultList] = None
inapplicable_to: Optional[InapplicableToResultList] = None
metadata: Optional[Dict[str, Any]] = Field(default=None, description="The metadata object stores all custom attributes assigned to the product. A set of key/value pairs that you can attach to a product object. It can be useful for storing additional information about the product in a structured format.")
- categories: Optional[List[Category]] = Field(default=None, description="List of category information.")
+ categories: Optional[List[CategoryWithStackingRulesType]] = Field(default=None, description="List of category information.")
banner: Optional[StrictStr] = Field(default=None, description="Name of the earning rule. This is displayed as a header for the earning rule in the Dashboard.")
name: Optional[StrictStr] = Field(default=None, description="Name of the redeemable.")
campaign_name: Optional[StrictStr] = Field(default=None, description="Name of the campaign associated to the redeemable. This field is available only if object is not `campaign`")
@@ -207,7 +207,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
"applicable_to": ApplicableToResultList.from_dict(obj["applicable_to"]) if obj.get("applicable_to") is not None else None,
"inapplicable_to": InapplicableToResultList.from_dict(obj["inapplicable_to"]) if obj.get("inapplicable_to") is not None else None,
"metadata": obj.get("metadata"),
- "categories": [Category.from_dict(_item) for _item in obj["categories"]] if obj.get("categories") is not None else None,
+ "categories": [CategoryWithStackingRulesType.from_dict(_item) for _item in obj["categories"]] if obj.get("categories") is not None else None,
"banner": obj.get("banner"),
"name": obj.get("name"),
"campaign_name": obj.get("campaign_name"),
diff --git a/voucherify/models/qualifications_redeemable_base.py b/voucherify/models/qualifications_redeemable_base.py
index de34bf5f..d4449dc2 100644
--- a/voucherify/models/qualifications_redeemable_base.py
+++ b/voucherify/models/qualifications_redeemable_base.py
@@ -22,7 +22,7 @@
from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator
from typing import Any, ClassVar, Dict, List, Optional
from voucherify.models.applicable_to_result_list import ApplicableToResultList
-from voucherify.models.category import Category
+from voucherify.models.category_with_stacking_rules_type import CategoryWithStackingRulesType
from voucherify.models.inapplicable_to_result_list import InapplicableToResultList
from voucherify.models.order_calculated import OrderCalculated
from voucherify.models.redeemable_result import RedeemableResult
@@ -43,7 +43,7 @@ class QualificationsRedeemableBase(BaseModel):
applicable_to: Optional[ApplicableToResultList] = None
inapplicable_to: Optional[InapplicableToResultList] = None
metadata: Optional[Dict[str, Any]] = Field(default=None, description="The metadata object stores all custom attributes assigned to the product. A set of key/value pairs that you can attach to a product object. It can be useful for storing additional information about the product in a structured format.")
- categories: Optional[List[Category]] = Field(default=None, description="List of category information.")
+ categories: Optional[List[CategoryWithStackingRulesType]] = Field(default=None, description="List of category information.")
banner: Optional[StrictStr] = Field(default=None, description="Name of the earning rule. This is displayed as a header for the earning rule in the Dashboard.")
name: Optional[StrictStr] = Field(default=None, description="Name of the redeemable.")
campaign_name: Optional[StrictStr] = Field(default=None, description="Name of the campaign associated to the redeemable. This field is available only if object is not `campaign`")
@@ -193,7 +193,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
"applicable_to": ApplicableToResultList.from_dict(obj["applicable_to"]) if obj.get("applicable_to") is not None else None,
"inapplicable_to": InapplicableToResultList.from_dict(obj["inapplicable_to"]) if obj.get("inapplicable_to") is not None else None,
"metadata": obj.get("metadata"),
- "categories": [Category.from_dict(_item) for _item in obj["categories"]] if obj.get("categories") is not None else None,
+ "categories": [CategoryWithStackingRulesType.from_dict(_item) for _item in obj["categories"]] if obj.get("categories") is not None else None,
"banner": obj.get("banner"),
"name": obj.get("name"),
"campaign_name": obj.get("campaign_name"),
diff --git a/voucherify/models/redeemable_holder.py b/voucherify/models/redeemable_holder.py
new file mode 100644
index 00000000..75961a86
--- /dev/null
+++ b/voucherify/models/redeemable_holder.py
@@ -0,0 +1,204 @@
+# coding: utf-8
+
+"""
+ Voucherify API
+
+ Voucherify promotion engine REST API. Please see https://docs.voucherify.io/docs for more details.
+
+ The version of the OpenAPI document: v2018-08-01
+ Contact: support@voucherify.io
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from datetime import datetime
+from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator
+from typing import Any, ClassVar, Dict, List, Optional
+from typing import Optional, Set
+from typing_extensions import Self
+
+class RedeemableHolder(BaseModel):
+ """
+ Single customer's redeemable
+ """ # noqa: E501
+ id: Optional[StrictStr] = Field(default=None, description="Unique identifier of the redeemable holder.")
+ created_at: Optional[datetime] = Field(default=None, description="Timestamp representing the date and time when the redeemable was assigned. The value is shown in the ISO 8601 format.")
+ redeemable_id: Optional[StrictStr] = Field(default=None, description="Identifier of the redeemable item.")
+ redeemable_object: Optional[StrictStr] = Field(default=None, description="Type of the redeemable.")
+ customer_id: Optional[StrictStr] = Field(default=None, description="Unique identifier of the customer.")
+ holder_role: Optional[StrictStr] = Field(default=None, description="Role of the holder.")
+ campaign_id: Optional[StrictStr] = Field(default=None, description="Unique identifier of the campaign as assigned by Voucherify.")
+ campaign_type: Optional[StrictStr] = Field(default='REFERRAL_PROGRAM', description="Defines the type of the campaign.")
+ voucher_type: Optional[StrictStr] = Field(default=None, description="Defines the type of the voucher.")
+ metadata: Optional[Dict[str, Any]] = Field(default=None, description="A set of custom key/value pairs that you can attach to a redeemable holder. The metadata object stores all custom attributes assigned to the `redeemable_holder` object.")
+ object: Optional[StrictStr] = Field(default='redeemable_holder', description="The type of the object represented by JSON.")
+ __properties: ClassVar[List[str]] = ["id", "created_at", "redeemable_id", "redeemable_object", "customer_id", "holder_role", "campaign_id", "campaign_type", "voucher_type", "metadata", "object"]
+
+ @field_validator('holder_role')
+ def holder_role_validate_enum(cls, value):
+ """Validates the enum"""
+ if value is None:
+ return value
+
+ if value not in set(['OWNER', 'REFERRER', 'REFEREE']):
+ raise ValueError("must be one of enum values ('OWNER', 'REFERRER', 'REFEREE')")
+ return value
+
+ @field_validator('campaign_type')
+ def campaign_type_validate_enum(cls, value):
+ """Validates the enum"""
+ if value is None:
+ return value
+
+ if value not in set(['REFERRAL_PROGRAM']):
+ raise ValueError("must be one of enum values ('REFERRAL_PROGRAM')")
+ return value
+
+ @field_validator('voucher_type')
+ def voucher_type_validate_enum(cls, value):
+ """Validates the enum"""
+ if value is None:
+ return value
+
+ if value not in set(['GIFT_VOUCHER', 'DISCOUNT_VOUCHER', 'LOYALTY_CARD']):
+ raise ValueError("must be one of enum values ('GIFT_VOUCHER', 'DISCOUNT_VOUCHER', 'LOYALTY_CARD')")
+ return value
+
+ @field_validator('object')
+ def object_validate_enum(cls, value):
+ """Validates the enum"""
+ if value is None:
+ return value
+
+ if value not in set(['redeemable_holder']):
+ raise ValueError("must be one of enum values ('redeemable_holder')")
+ return value
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of RedeemableHolder from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([
+ ])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ # set to None if id (nullable) is None
+ # and model_fields_set contains the field
+ if self.id is None and "id" in self.model_fields_set:
+ _dict['id'] = None
+
+ # set to None if created_at (nullable) is None
+ # and model_fields_set contains the field
+ if self.created_at is None and "created_at" in self.model_fields_set:
+ _dict['created_at'] = None
+
+ # set to None if redeemable_id (nullable) is None
+ # and model_fields_set contains the field
+ if self.redeemable_id is None and "redeemable_id" in self.model_fields_set:
+ _dict['redeemable_id'] = None
+
+ # set to None if redeemable_object (nullable) is None
+ # and model_fields_set contains the field
+ if self.redeemable_object is None and "redeemable_object" in self.model_fields_set:
+ _dict['redeemable_object'] = None
+
+ # set to None if customer_id (nullable) is None
+ # and model_fields_set contains the field
+ if self.customer_id is None and "customer_id" in self.model_fields_set:
+ _dict['customer_id'] = None
+
+ # set to None if holder_role (nullable) is None
+ # and model_fields_set contains the field
+ if self.holder_role is None and "holder_role" in self.model_fields_set:
+ _dict['holder_role'] = None
+
+ # set to None if campaign_id (nullable) is None
+ # and model_fields_set contains the field
+ if self.campaign_id is None and "campaign_id" in self.model_fields_set:
+ _dict['campaign_id'] = None
+
+ # set to None if campaign_type (nullable) is None
+ # and model_fields_set contains the field
+ if self.campaign_type is None and "campaign_type" in self.model_fields_set:
+ _dict['campaign_type'] = None
+
+ # set to None if voucher_type (nullable) is None
+ # and model_fields_set contains the field
+ if self.voucher_type is None and "voucher_type" in self.model_fields_set:
+ _dict['voucher_type'] = None
+
+ # set to None if metadata (nullable) is None
+ # and model_fields_set contains the field
+ if self.metadata is None and "metadata" in self.model_fields_set:
+ _dict['metadata'] = None
+
+ # set to None if object (nullable) is None
+ # and model_fields_set contains the field
+ if self.object is None and "object" in self.model_fields_set:
+ _dict['object'] = None
+
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of RedeemableHolder from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "id": obj.get("id"),
+ "created_at": obj.get("created_at"),
+ "redeemable_id": obj.get("redeemable_id"),
+ "redeemable_object": obj.get("redeemable_object"),
+ "customer_id": obj.get("customer_id"),
+ "holder_role": obj.get("holder_role"),
+ "campaign_id": obj.get("campaign_id"),
+ "campaign_type": obj.get("campaign_type") if obj.get("campaign_type") is not None else 'REFERRAL_PROGRAM',
+ "voucher_type": obj.get("voucher_type"),
+ "metadata": obj.get("metadata"),
+ "object": obj.get("object") if obj.get("object") is not None else 'redeemable_holder'
+ })
+ return _obj
+
+
diff --git a/voucherify/models/redeemable_voucher_publish.py b/voucherify/models/redeemable_voucher_publish.py
index 5d44c605..2efd11bd 100644
--- a/voucherify/models/redeemable_voucher_publish.py
+++ b/voucherify/models/redeemable_voucher_publish.py
@@ -29,7 +29,7 @@ class RedeemableVoucherPublish(BaseModel):
""" # noqa: E501
object: Optional[StrictStr] = Field(default='list', description="The type of the object represented is by default `list`. To get this list, you need to make a call to the endpoint returned in the `url` attribute.")
count: Optional[StrictInt] = Field(default=None, description="Publication events counter.")
- url: Optional[StrictStr] = Field(default=None, description="The endpoint where this list of publications can be accessed using a GET method. `/v1/vouchers/{voucher_code}/publications`")
+ url: Optional[StrictStr] = Field(default=None, description="The endpoint where this list of publications can be accessed using a **GET** method. `/v1/vouchers/{voucher_code}/publications`")
__properties: ClassVar[List[str]] = ["object", "count", "url"]
model_config = ConfigDict(
diff --git a/voucherify/models/redeemable_voucher_redemption.py b/voucherify/models/redeemable_voucher_redemption.py
index bfc168da..a44ca74f 100644
--- a/voucherify/models/redeemable_voucher_redemption.py
+++ b/voucherify/models/redeemable_voucher_redemption.py
@@ -31,7 +31,7 @@ class RedeemableVoucherRedemption(BaseModel):
redeemed_quantity: Optional[StrictInt] = Field(default=None, description="How many times a voucher has already been redeemed.")
redeemed_points: Optional[StrictInt] = Field(default=None, description="Total loyalty points redeemed.")
object: Optional[StrictStr] = Field(default='list', description="The type of the object represented is by default `list`. To get this list, you need to make a call to the endpoint returned in the url attribute.")
- url: Optional[StrictStr] = Field(default=None, description="The endpoint where this list of redemptions can be accessed using a GET method. `/v1/vouchers/{voucher_code}/redemptions`")
+ url: Optional[StrictStr] = Field(default=None, description="The endpoint where this list of redemptions can be accessed using a **GET** method. `/v1/vouchers/{voucher_code}/redemptions`")
__properties: ClassVar[List[str]] = ["quantity", "redeemed_quantity", "redeemed_points", "object", "url"]
model_config = ConfigDict(
diff --git a/voucherify/models/redemption.py b/voucherify/models/redemption.py
index 531dcbb0..c96f033c 100644
--- a/voucherify/models/redemption.py
+++ b/voucherify/models/redemption.py
@@ -35,7 +35,7 @@
class Redemption(BaseModel):
"""
- This is an object representing a redemption.
+ This is an object representing a redemption for **POST** `v1/redemptions` and **POST** `/client/v1/redemptions`.
""" # noqa: E501
id: Optional[StrictStr] = Field(default=None, description="Unique redemption ID.")
object: Optional[StrictStr] = Field(default='redemption', description="The type of the object represented by the JSON")
@@ -55,12 +55,12 @@ class Redemption(BaseModel):
customer: Optional[SimpleCustomer] = None
related_object_type: Optional[StrictStr] = Field(default=None, description="Defines the related object.")
related_object_id: Optional[StrictStr] = Field(default=None, description="Unique related object ID assigned by Voucherify, i.e. v_lfZi4rcEGe0sN9gmnj40bzwK2FH6QUno for a voucher.")
- voucher: Optional[RedemptionVoucher] = None
promotion_tier: Optional[PromotionTier] = None
reward: Optional[RedemptionRewardResult] = None
gift: Optional[RedemptionGift] = None
loyalty_card: Optional[RedemptionLoyaltyCard] = None
- __properties: ClassVar[List[str]] = ["id", "object", "date", "customer_id", "tracking_id", "metadata", "amount", "redemption", "result", "status", "related_redemptions", "failure_code", "failure_message", "order", "channel", "customer", "related_object_type", "related_object_id", "voucher", "promotion_tier", "reward", "gift", "loyalty_card"]
+ voucher: Optional[RedemptionVoucher] = None
+ __properties: ClassVar[List[str]] = ["id", "object", "date", "customer_id", "tracking_id", "metadata", "amount", "redemption", "result", "status", "related_redemptions", "failure_code", "failure_message", "order", "channel", "customer", "related_object_type", "related_object_id", "promotion_tier", "reward", "gift", "loyalty_card", "voucher"]
@field_validator('object')
def object_validate_enum(cls, value):
@@ -153,9 +153,6 @@ def to_dict(self) -> Dict[str, Any]:
# override the default output from pydantic by calling `to_dict()` of customer
if self.customer:
_dict['customer'] = self.customer.to_dict()
- # override the default output from pydantic by calling `to_dict()` of voucher
- if self.voucher:
- _dict['voucher'] = self.voucher.to_dict()
# override the default output from pydantic by calling `to_dict()` of promotion_tier
if self.promotion_tier:
_dict['promotion_tier'] = self.promotion_tier.to_dict()
@@ -168,6 +165,9 @@ def to_dict(self) -> Dict[str, Any]:
# override the default output from pydantic by calling `to_dict()` of loyalty_card
if self.loyalty_card:
_dict['loyalty_card'] = self.loyalty_card.to_dict()
+ # override the default output from pydantic by calling `to_dict()` of voucher
+ if self.voucher:
+ _dict['voucher'] = self.voucher.to_dict()
# set to None if id (nullable) is None
# and model_fields_set contains the field
if self.id is None and "id" in self.model_fields_set:
@@ -248,11 +248,6 @@ def to_dict(self) -> Dict[str, Any]:
if self.related_object_id is None and "related_object_id" in self.model_fields_set:
_dict['related_object_id'] = None
- # set to None if voucher (nullable) is None
- # and model_fields_set contains the field
- if self.voucher is None and "voucher" in self.model_fields_set:
- _dict['voucher'] = None
-
# set to None if gift (nullable) is None
# and model_fields_set contains the field
if self.gift is None and "gift" in self.model_fields_set:
@@ -263,6 +258,11 @@ def to_dict(self) -> Dict[str, Any]:
if self.loyalty_card is None and "loyalty_card" in self.model_fields_set:
_dict['loyalty_card'] = None
+ # set to None if voucher (nullable) is None
+ # and model_fields_set contains the field
+ if self.voucher is None and "voucher" in self.model_fields_set:
+ _dict['voucher'] = None
+
return _dict
@classmethod
@@ -293,11 +293,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
"customer": SimpleCustomer.from_dict(obj["customer"]) if obj.get("customer") is not None else None,
"related_object_type": obj.get("related_object_type"),
"related_object_id": obj.get("related_object_id"),
- "voucher": RedemptionVoucher.from_dict(obj["voucher"]) if obj.get("voucher") is not None else None,
"promotion_tier": PromotionTier.from_dict(obj["promotion_tier"]) if obj.get("promotion_tier") is not None else None,
"reward": RedemptionRewardResult.from_dict(obj["reward"]) if obj.get("reward") is not None else None,
"gift": RedemptionGift.from_dict(obj["gift"]) if obj.get("gift") is not None else None,
- "loyalty_card": RedemptionLoyaltyCard.from_dict(obj["loyalty_card"]) if obj.get("loyalty_card") is not None else None
+ "loyalty_card": RedemptionLoyaltyCard.from_dict(obj["loyalty_card"]) if obj.get("loyalty_card") is not None else None,
+ "voucher": RedemptionVoucher.from_dict(obj["voucher"]) if obj.get("voucher") is not None else None
})
return _obj
diff --git a/voucherify/models/redemption_channel.py b/voucherify/models/redemption_channel.py
index 38cb0f18..e2929fa8 100644
--- a/voucherify/models/redemption_channel.py
+++ b/voucherify/models/redemption_channel.py
@@ -27,8 +27,8 @@ class RedemptionChannel(BaseModel):
"""
Defines the details of the channel through which the redemption was issued.
""" # noqa: E501
- channel_id: Optional[StrictStr] = Field(default=None, description="Unique channel ID of the user performing the redemption. This is either a user ID from a user using the Voucherify Dashboard or an X-APP-Id of a user using the API.")
- channel_type: Optional[StrictStr] = Field(default=None, description="The source of the channel for the redemption. A `USER` corresponds to the Voucherify Dashboard and an `API` corresponds to the API.")
+ channel_id: Optional[StrictStr] = Field(default=None, description="Unique channel ID of the user performing the redemption. This is either a user ID from a user using the Voucherify Dashboard or an X-APP-Id of a user using the API. For `AUTO_REDEEM`, it is the reward assignment ID.")
+ channel_type: Optional[StrictStr] = Field(default=None, description="The source of the channel for the redemption. A `USER` corresponds to the Voucherify Dashboard, `API` corresponds to the API, and `AUTO_REDEEM` corresponds to a loyalty campaign reward that has been redeemed automatically.")
__properties: ClassVar[List[str]] = ["channel_id", "channel_type"]
@field_validator('channel_type')
@@ -37,8 +37,8 @@ def channel_type_validate_enum(cls, value):
if value is None:
return value
- if value not in set(['USER', 'API']):
- raise ValueError("must be one of enum values ('USER', 'API')")
+ if value not in set(['USER', 'API', 'AUTO_REDEEM']):
+ raise ValueError("must be one of enum values ('USER', 'API', 'AUTO_REDEEM')")
return value
model_config = ConfigDict(
diff --git a/voucherify/models/redemption_entry.py b/voucherify/models/redemption_entry.py
index a954487f..1b1ff3ba 100644
--- a/voucherify/models/redemption_entry.py
+++ b/voucherify/models/redemption_entry.py
@@ -55,13 +55,13 @@ class RedemptionEntry(BaseModel):
customer: Optional[RedemptionEntryCustomer] = None
related_object_type: Optional[StrictStr] = Field(default=None, description="Defines the related object.")
related_object_id: Optional[StrictStr] = None
- voucher: Optional[RedemptionEntryVoucher] = None
promotion_tier: Optional[RedemptionEntryPromotionTier] = None
reward: Optional[RedemptionRewardResult] = None
gift: Optional[RedemptionEntryGift] = None
loyalty_card: Optional[RedemptionEntryLoyaltyCard] = None
+ voucher: Optional[RedemptionEntryVoucher] = None
reason: Optional[StrictStr] = Field(default=None, description="System generated cause for the redemption being invalid in the context of the provided parameters.")
- __properties: ClassVar[List[str]] = ["id", "object", "date", "customer_id", "tracking_id", "metadata", "amount", "redemption", "result", "status", "related_redemptions", "failure_code", "failure_message", "order", "channel", "customer", "related_object_type", "related_object_id", "voucher", "promotion_tier", "reward", "gift", "loyalty_card", "reason"]
+ __properties: ClassVar[List[str]] = ["id", "object", "date", "customer_id", "tracking_id", "metadata", "amount", "redemption", "result", "status", "related_redemptions", "failure_code", "failure_message", "order", "channel", "customer", "related_object_type", "related_object_id", "promotion_tier", "reward", "gift", "loyalty_card", "voucher", "reason"]
@field_validator('object')
def object_validate_enum(cls, value):
@@ -154,9 +154,6 @@ def to_dict(self) -> Dict[str, Any]:
# override the default output from pydantic by calling `to_dict()` of customer
if self.customer:
_dict['customer'] = self.customer.to_dict()
- # override the default output from pydantic by calling `to_dict()` of voucher
- if self.voucher:
- _dict['voucher'] = self.voucher.to_dict()
# override the default output from pydantic by calling `to_dict()` of promotion_tier
if self.promotion_tier:
_dict['promotion_tier'] = self.promotion_tier.to_dict()
@@ -169,6 +166,9 @@ def to_dict(self) -> Dict[str, Any]:
# override the default output from pydantic by calling `to_dict()` of loyalty_card
if self.loyalty_card:
_dict['loyalty_card'] = self.loyalty_card.to_dict()
+ # override the default output from pydantic by calling `to_dict()` of voucher
+ if self.voucher:
+ _dict['voucher'] = self.voucher.to_dict()
# set to None if id (nullable) is None
# and model_fields_set contains the field
if self.id is None and "id" in self.model_fields_set:
@@ -259,11 +259,6 @@ def to_dict(self) -> Dict[str, Any]:
if self.related_object_id is None and "related_object_id" in self.model_fields_set:
_dict['related_object_id'] = None
- # set to None if voucher (nullable) is None
- # and model_fields_set contains the field
- if self.voucher is None and "voucher" in self.model_fields_set:
- _dict['voucher'] = None
-
# set to None if promotion_tier (nullable) is None
# and model_fields_set contains the field
if self.promotion_tier is None and "promotion_tier" in self.model_fields_set:
@@ -279,6 +274,11 @@ def to_dict(self) -> Dict[str, Any]:
if self.loyalty_card is None and "loyalty_card" in self.model_fields_set:
_dict['loyalty_card'] = None
+ # set to None if voucher (nullable) is None
+ # and model_fields_set contains the field
+ if self.voucher is None and "voucher" in self.model_fields_set:
+ _dict['voucher'] = None
+
# set to None if reason (nullable) is None
# and model_fields_set contains the field
if self.reason is None and "reason" in self.model_fields_set:
@@ -314,11 +314,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
"customer": RedemptionEntryCustomer.from_dict(obj["customer"]) if obj.get("customer") is not None else None,
"related_object_type": obj.get("related_object_type"),
"related_object_id": obj.get("related_object_id"),
- "voucher": RedemptionEntryVoucher.from_dict(obj["voucher"]) if obj.get("voucher") is not None else None,
"promotion_tier": RedemptionEntryPromotionTier.from_dict(obj["promotion_tier"]) if obj.get("promotion_tier") is not None else None,
"reward": RedemptionRewardResult.from_dict(obj["reward"]) if obj.get("reward") is not None else None,
"gift": RedemptionEntryGift.from_dict(obj["gift"]) if obj.get("gift") is not None else None,
"loyalty_card": RedemptionEntryLoyaltyCard.from_dict(obj["loyalty_card"]) if obj.get("loyalty_card") is not None else None,
+ "voucher": RedemptionEntryVoucher.from_dict(obj["voucher"]) if obj.get("voucher") is not None else None,
"reason": obj.get("reason")
})
return _obj
diff --git a/voucherify/models/redemption_entry_channel.py b/voucherify/models/redemption_entry_channel.py
index 536b9782..eb258ea3 100644
--- a/voucherify/models/redemption_entry_channel.py
+++ b/voucherify/models/redemption_entry_channel.py
@@ -18,7 +18,7 @@
import re # noqa: F401
import json
-from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator
+from pydantic import BaseModel, ConfigDict, StrictStr, field_validator
from typing import Any, ClassVar, Dict, List, Optional
from typing import Optional, Set
from typing_extensions import Self
@@ -28,7 +28,7 @@ class RedemptionEntryChannel(BaseModel):
RedemptionEntryChannel
""" # noqa: E501
channel_id: Optional[StrictStr] = None
- channel_type: Optional[StrictStr] = Field(default=None, description="The source of the channel for the redemption. A `USER` corresponds to the Voucherify Dashboard and an `API` corresponds to the API.")
+ channel_type: Optional[StrictStr] = None
__properties: ClassVar[List[str]] = ["channel_id", "channel_type"]
@field_validator('channel_type')
@@ -37,8 +37,8 @@ def channel_type_validate_enum(cls, value):
if value is None:
return value
- if value not in set(['USER', 'API']):
- raise ValueError("must be one of enum values ('USER', 'API')")
+ if value not in set(['USER', 'API', 'AUTO_REDEEM']):
+ raise ValueError("must be one of enum values ('USER', 'API', 'AUTO_REDEEM')")
return value
model_config = ConfigDict(
diff --git a/voucherify/models/redemption_entry_order.py b/voucherify/models/redemption_entry_order.py
index 95c9a3b5..6875e6af 100644
--- a/voucherify/models/redemption_entry_order.py
+++ b/voucherify/models/redemption_entry_order.py
@@ -43,7 +43,7 @@ class RedemptionEntryOrder(BaseModel):
applied_discount_amount: Optional[StrictInt] = Field(default=None, description="This field shows the order-level discount applied.")
items_applied_discount_amount: Optional[StrictInt] = Field(default=None, description="Sum of all product-specific discounts applied in a particular request. `sum(items, i => i.applied_discount_amount)`")
total_applied_discount_amount: Optional[StrictInt] = Field(default=None, description="Sum of all order-level AND all product-specific discounts applied in a particular request. `total_applied_discount_amount` = `applied_discount_amount` + `items_applied_discount_amount`")
- items: Optional[List[OrderCalculatedItem]] = Field(default=None, description="Array of items applied to the order.")
+ items: Optional[List[OrderCalculatedItem]] = Field(default=None, description="Array of items applied to the order. It can include up 500 items.")
metadata: Optional[Dict[str, Any]] = None
object: Optional[StrictStr] = Field(default='order', description="The type of the object represented by JSON.")
created_at: Optional[datetime] = Field(default=None, description="Timestamp representing the date and time when the order was created. The value is shown in the ISO 8601 format.")
diff --git a/voucherify/models/redemption_entry_voucher_publish.py b/voucherify/models/redemption_entry_voucher_publish.py
index 4e11e77b..fb0b316e 100644
--- a/voucherify/models/redemption_entry_voucher_publish.py
+++ b/voucherify/models/redemption_entry_voucher_publish.py
@@ -29,7 +29,7 @@ class RedemptionEntryVoucherPublish(BaseModel):
""" # noqa: E501
object: Optional[StrictStr] = Field(default='list', description="The type of the object represented is by default `list`. To get this list, you need to make a call to the endpoint returned in the `url` attribute.")
count: Optional[StrictInt] = Field(default=None, description="Publication events counter.")
- url: Optional[StrictStr] = Field(default=None, description="The endpoint where this list of publications can be accessed using a GET method. `/v1/vouchers/{voucher_code}/publications`")
+ url: Optional[StrictStr] = Field(default=None, description="The endpoint where this list of publications can be accessed using a **GET** method. `/v1/vouchers/{voucher_code}/publications`")
__properties: ClassVar[List[str]] = ["object", "count", "url"]
model_config = ConfigDict(
diff --git a/voucherify/models/redemption_entry_voucher_redemption.py b/voucherify/models/redemption_entry_voucher_redemption.py
index 526b1bf5..a7618208 100644
--- a/voucherify/models/redemption_entry_voucher_redemption.py
+++ b/voucherify/models/redemption_entry_voucher_redemption.py
@@ -31,7 +31,7 @@ class RedemptionEntryVoucherRedemption(BaseModel):
redeemed_quantity: Optional[StrictInt] = Field(default=None, description="How many times a voucher has already been redeemed.")
redeemed_points: Optional[StrictInt] = Field(default=None, description="Total loyalty points redeemed.")
object: Optional[StrictStr] = Field(default='list', description="The type of the object represented is by default `list`. To get this list, you need to make a call to the endpoint returned in the url attribute.")
- url: Optional[StrictStr] = Field(default=None, description="The endpoint where this list of redemptions can be accessed using a GET method. `/v1/vouchers/{voucher_code}/redemptions`")
+ url: Optional[StrictStr] = Field(default=None, description="The endpoint where this list of redemptions can be accessed using a **GET** method. `/v1/vouchers/{voucher_code}/redemptions`")
__properties: ClassVar[List[str]] = ["quantity", "redeemed_quantity", "redeemed_points", "object", "url"]
model_config = ConfigDict(
diff --git a/voucherify/models/redemption_redeem.py b/voucherify/models/redemption_redeem.py
new file mode 100644
index 00000000..bd2dc3bc
--- /dev/null
+++ b/voucherify/models/redemption_redeem.py
@@ -0,0 +1,304 @@
+# coding: utf-8
+
+"""
+ Voucherify API
+
+ Voucherify promotion engine REST API. Please see https://docs.voucherify.io/docs for more details.
+
+ The version of the OpenAPI document: v2018-08-01
+ Contact: support@voucherify.io
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from datetime import datetime
+from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr, field_validator
+from typing import Any, ClassVar, Dict, List, Optional
+from voucherify.models.order_calculated import OrderCalculated
+from voucherify.models.promotion_tier import PromotionTier
+from voucherify.models.redemption_redeem_channel import RedemptionRedeemChannel
+from voucherify.models.redemption_redeem_gift import RedemptionRedeemGift
+from voucherify.models.redemption_redeem_loyalty_card import RedemptionRedeemLoyaltyCard
+from voucherify.models.redemption_redeem_related_redemptions import RedemptionRedeemRelatedRedemptions
+from voucherify.models.redemption_redeem_voucher import RedemptionRedeemVoucher
+from voucherify.models.redemption_reward_result import RedemptionRewardResult
+from voucherify.models.simple_customer import SimpleCustomer
+from typing import Optional, Set
+from typing_extensions import Self
+
+class RedemptionRedeem(BaseModel):
+ """
+ This is an object representing a redemption for **POST** `v1/redemptions`, **POST** `v1/loyalties/{campaignId}/members/{memberId}/redemption`, **POST** `v1/loyalties/members/{memberId}/redemption`, **POST** `/client/v1/redemptions`.
+ """ # noqa: E501
+ id: Optional[StrictStr] = Field(default=None, description="Unique redemption ID.")
+ object: Optional[StrictStr] = Field(default='redemption', description="The type of the object represented by the JSON")
+ var_date: Optional[datetime] = Field(default=None, description="Timestamp representing the date and time when the object was created. The value is shown in the ISO 8601 format.", alias="date")
+ customer_id: Optional[StrictStr] = Field(default=None, description="Unique customer ID of the redeeming customer.")
+ tracking_id: Optional[StrictStr] = Field(default=None, description="Hashed customer source ID.")
+ metadata: Optional[Dict[str, Any]] = Field(default=None, description="The metadata object stores all custom attributes assigned to the redemption.")
+ amount: Optional[StrictInt] = Field(default=None, description="For gift cards, this is a positive integer in the smallest currency unit (e.g. 100 cents for $1.00) representing the number of redeemed credits. For loyalty cards, this is the number of loyalty points used in the transaction.")
+ redemption: Optional[StrictStr] = Field(default=None, description="Unique redemption ID of the parent redemption.")
+ result: Optional[StrictStr] = Field(default=None, description="Redemption result.")
+ status: Optional[StrictStr] = Field(default=None, description="Redemption status.")
+ related_redemptions: Optional[RedemptionRedeemRelatedRedemptions] = None
+ failure_code: Optional[StrictStr] = Field(default=None, description="If the result is `FAILURE`, this parameter will provide a generic reason as to why the redemption failed.")
+ failure_message: Optional[StrictStr] = Field(default=None, description="If the result is `FAILURE`, this parameter will provide a more expanded reason as to why the redemption failed.")
+ order: Optional[OrderCalculated] = None
+ channel: Optional[RedemptionRedeemChannel] = None
+ customer: Optional[SimpleCustomer] = None
+ related_object_type: Optional[StrictStr] = Field(default=None, description="Defines the related object.")
+ related_object_id: Optional[StrictStr] = Field(default=None, description="Unique related object ID assigned by Voucherify, i.e. v_lfZi4rcEGe0sN9gmnj40bzwK2FH6QUno for a voucher.")
+ promotion_tier: Optional[PromotionTier] = None
+ reward: Optional[RedemptionRewardResult] = None
+ gift: Optional[RedemptionRedeemGift] = None
+ loyalty_card: Optional[RedemptionRedeemLoyaltyCard] = None
+ voucher: Optional[RedemptionRedeemVoucher] = None
+ __properties: ClassVar[List[str]] = ["id", "object", "date", "customer_id", "tracking_id", "metadata", "amount", "redemption", "result", "status", "related_redemptions", "failure_code", "failure_message", "order", "channel", "customer", "related_object_type", "related_object_id", "promotion_tier", "reward", "gift", "loyalty_card", "voucher"]
+
+ @field_validator('object')
+ def object_validate_enum(cls, value):
+ """Validates the enum"""
+ if value is None:
+ return value
+
+ if value not in set(['redemption']):
+ raise ValueError("must be one of enum values ('redemption')")
+ return value
+
+ @field_validator('result')
+ def result_validate_enum(cls, value):
+ """Validates the enum"""
+ if value is None:
+ return value
+
+ if value not in set(['SUCCESS', 'FAILURE']):
+ raise ValueError("must be one of enum values ('SUCCESS', 'FAILURE')")
+ return value
+
+ @field_validator('status')
+ def status_validate_enum(cls, value):
+ """Validates the enum"""
+ if value is None:
+ return value
+
+ if value not in set(['SUCCEEDED', 'FAILED', 'ROLLED_BACK']):
+ raise ValueError("must be one of enum values ('SUCCEEDED', 'FAILED', 'ROLLED_BACK')")
+ return value
+
+ @field_validator('related_object_type')
+ def related_object_type_validate_enum(cls, value):
+ """Validates the enum"""
+ if value is None:
+ return value
+
+ if value not in set(['voucher', 'promotion_tier', 'redemption']):
+ raise ValueError("must be one of enum values ('voucher', 'promotion_tier', 'redemption')")
+ return value
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of RedemptionRedeem from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([
+ ])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ # override the default output from pydantic by calling `to_dict()` of related_redemptions
+ if self.related_redemptions:
+ _dict['related_redemptions'] = self.related_redemptions.to_dict()
+ # override the default output from pydantic by calling `to_dict()` of order
+ if self.order:
+ _dict['order'] = self.order.to_dict()
+ # override the default output from pydantic by calling `to_dict()` of channel
+ if self.channel:
+ _dict['channel'] = self.channel.to_dict()
+ # override the default output from pydantic by calling `to_dict()` of customer
+ if self.customer:
+ _dict['customer'] = self.customer.to_dict()
+ # override the default output from pydantic by calling `to_dict()` of promotion_tier
+ if self.promotion_tier:
+ _dict['promotion_tier'] = self.promotion_tier.to_dict()
+ # override the default output from pydantic by calling `to_dict()` of reward
+ if self.reward:
+ _dict['reward'] = self.reward.to_dict()
+ # override the default output from pydantic by calling `to_dict()` of gift
+ if self.gift:
+ _dict['gift'] = self.gift.to_dict()
+ # override the default output from pydantic by calling `to_dict()` of loyalty_card
+ if self.loyalty_card:
+ _dict['loyalty_card'] = self.loyalty_card.to_dict()
+ # override the default output from pydantic by calling `to_dict()` of voucher
+ if self.voucher:
+ _dict['voucher'] = self.voucher.to_dict()
+ # set to None if id (nullable) is None
+ # and model_fields_set contains the field
+ if self.id is None and "id" in self.model_fields_set:
+ _dict['id'] = None
+
+ # set to None if object (nullable) is None
+ # and model_fields_set contains the field
+ if self.object is None and "object" in self.model_fields_set:
+ _dict['object'] = None
+
+ # set to None if var_date (nullable) is None
+ # and model_fields_set contains the field
+ if self.var_date is None and "var_date" in self.model_fields_set:
+ _dict['date'] = None
+
+ # set to None if customer_id (nullable) is None
+ # and model_fields_set contains the field
+ if self.customer_id is None and "customer_id" in self.model_fields_set:
+ _dict['customer_id'] = None
+
+ # set to None if tracking_id (nullable) is None
+ # and model_fields_set contains the field
+ if self.tracking_id is None and "tracking_id" in self.model_fields_set:
+ _dict['tracking_id'] = None
+
+ # set to None if metadata (nullable) is None
+ # and model_fields_set contains the field
+ if self.metadata is None and "metadata" in self.model_fields_set:
+ _dict['metadata'] = None
+
+ # set to None if amount (nullable) is None
+ # and model_fields_set contains the field
+ if self.amount is None and "amount" in self.model_fields_set:
+ _dict['amount'] = None
+
+ # set to None if redemption (nullable) is None
+ # and model_fields_set contains the field
+ if self.redemption is None and "redemption" in self.model_fields_set:
+ _dict['redemption'] = None
+
+ # set to None if result (nullable) is None
+ # and model_fields_set contains the field
+ if self.result is None and "result" in self.model_fields_set:
+ _dict['result'] = None
+
+ # set to None if status (nullable) is None
+ # and model_fields_set contains the field
+ if self.status is None and "status" in self.model_fields_set:
+ _dict['status'] = None
+
+ # set to None if related_redemptions (nullable) is None
+ # and model_fields_set contains the field
+ if self.related_redemptions is None and "related_redemptions" in self.model_fields_set:
+ _dict['related_redemptions'] = None
+
+ # set to None if failure_code (nullable) is None
+ # and model_fields_set contains the field
+ if self.failure_code is None and "failure_code" in self.model_fields_set:
+ _dict['failure_code'] = None
+
+ # set to None if failure_message (nullable) is None
+ # and model_fields_set contains the field
+ if self.failure_message is None and "failure_message" in self.model_fields_set:
+ _dict['failure_message'] = None
+
+ # set to None if channel (nullable) is None
+ # and model_fields_set contains the field
+ if self.channel is None and "channel" in self.model_fields_set:
+ _dict['channel'] = None
+
+ # set to None if related_object_type (nullable) is None
+ # and model_fields_set contains the field
+ if self.related_object_type is None and "related_object_type" in self.model_fields_set:
+ _dict['related_object_type'] = None
+
+ # set to None if related_object_id (nullable) is None
+ # and model_fields_set contains the field
+ if self.related_object_id is None and "related_object_id" in self.model_fields_set:
+ _dict['related_object_id'] = None
+
+ # set to None if gift (nullable) is None
+ # and model_fields_set contains the field
+ if self.gift is None and "gift" in self.model_fields_set:
+ _dict['gift'] = None
+
+ # set to None if loyalty_card (nullable) is None
+ # and model_fields_set contains the field
+ if self.loyalty_card is None and "loyalty_card" in self.model_fields_set:
+ _dict['loyalty_card'] = None
+
+ # set to None if voucher (nullable) is None
+ # and model_fields_set contains the field
+ if self.voucher is None and "voucher" in self.model_fields_set:
+ _dict['voucher'] = None
+
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of RedemptionRedeem from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "id": obj.get("id"),
+ "object": obj.get("object") if obj.get("object") is not None else 'redemption',
+ "date": obj.get("date"),
+ "customer_id": obj.get("customer_id"),
+ "tracking_id": obj.get("tracking_id"),
+ "metadata": obj.get("metadata"),
+ "amount": obj.get("amount"),
+ "redemption": obj.get("redemption"),
+ "result": obj.get("result"),
+ "status": obj.get("status"),
+ "related_redemptions": RedemptionRedeemRelatedRedemptions.from_dict(obj["related_redemptions"]) if obj.get("related_redemptions") is not None else None,
+ "failure_code": obj.get("failure_code"),
+ "failure_message": obj.get("failure_message"),
+ "order": OrderCalculated.from_dict(obj["order"]) if obj.get("order") is not None else None,
+ "channel": RedemptionRedeemChannel.from_dict(obj["channel"]) if obj.get("channel") is not None else None,
+ "customer": SimpleCustomer.from_dict(obj["customer"]) if obj.get("customer") is not None else None,
+ "related_object_type": obj.get("related_object_type"),
+ "related_object_id": obj.get("related_object_id"),
+ "promotion_tier": PromotionTier.from_dict(obj["promotion_tier"]) if obj.get("promotion_tier") is not None else None,
+ "reward": RedemptionRewardResult.from_dict(obj["reward"]) if obj.get("reward") is not None else None,
+ "gift": RedemptionRedeemGift.from_dict(obj["gift"]) if obj.get("gift") is not None else None,
+ "loyalty_card": RedemptionRedeemLoyaltyCard.from_dict(obj["loyalty_card"]) if obj.get("loyalty_card") is not None else None,
+ "voucher": RedemptionRedeemVoucher.from_dict(obj["voucher"]) if obj.get("voucher") is not None else None
+ })
+ return _obj
+
+
diff --git a/voucherify/models/redemption_redeem_channel.py b/voucherify/models/redemption_redeem_channel.py
new file mode 100644
index 00000000..99bd6183
--- /dev/null
+++ b/voucherify/models/redemption_redeem_channel.py
@@ -0,0 +1,110 @@
+# coding: utf-8
+
+"""
+ Voucherify API
+
+ Voucherify promotion engine REST API. Please see https://docs.voucherify.io/docs for more details.
+
+ The version of the OpenAPI document: v2018-08-01
+ Contact: support@voucherify.io
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator
+from typing import Any, ClassVar, Dict, List, Optional
+from typing import Optional, Set
+from typing_extensions import Self
+
+class RedemptionRedeemChannel(BaseModel):
+ """
+ Defines the details of the channel through which the redemption was issued.
+ """ # noqa: E501
+ channel_id: Optional[StrictStr] = Field(default=None, description="Unique channel ID of the user performing the redemption. This is either a user ID from a user using the Voucherify Dashboard or an X-APP-Id of a user using the API.")
+ channel_type: Optional[StrictStr] = Field(default=None, description="The source of the channel for the redemption. A `USER` corresponds to the Voucherify Dashboard and an `API` corresponds to the API.")
+ __properties: ClassVar[List[str]] = ["channel_id", "channel_type"]
+
+ @field_validator('channel_type')
+ def channel_type_validate_enum(cls, value):
+ """Validates the enum"""
+ if value is None:
+ return value
+
+ if value not in set(['USER', 'API']):
+ raise ValueError("must be one of enum values ('USER', 'API')")
+ return value
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of RedemptionRedeemChannel from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([
+ ])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ # set to None if channel_id (nullable) is None
+ # and model_fields_set contains the field
+ if self.channel_id is None and "channel_id" in self.model_fields_set:
+ _dict['channel_id'] = None
+
+ # set to None if channel_type (nullable) is None
+ # and model_fields_set contains the field
+ if self.channel_type is None and "channel_type" in self.model_fields_set:
+ _dict['channel_type'] = None
+
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of RedemptionRedeemChannel from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "channel_id": obj.get("channel_id"),
+ "channel_type": obj.get("channel_type")
+ })
+ return _obj
+
+
diff --git a/voucherify/models/redemption_redeem_gift.py b/voucherify/models/redemption_redeem_gift.py
new file mode 100644
index 00000000..80e7ce88
--- /dev/null
+++ b/voucherify/models/redemption_redeem_gift.py
@@ -0,0 +1,93 @@
+# coding: utf-8
+
+"""
+ Voucherify API
+
+ Voucherify promotion engine REST API. Please see https://docs.voucherify.io/docs for more details.
+
+ The version of the OpenAPI document: v2018-08-01
+ Contact: support@voucherify.io
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict, Field, StrictInt
+from typing import Any, ClassVar, Dict, List, Optional
+from typing import Optional, Set
+from typing_extensions import Self
+
+class RedemptionRedeemGift(BaseModel):
+ """
+ Contains the amount subtracted from the gift card for the redemption.
+ """ # noqa: E501
+ amount: Optional[StrictInt] = Field(default=None, description="Amount subtracted from the gift card as a result of the redemption. The amount is expressed as the smallest currency unit (e.g. 100 cents for $1.00).")
+ __properties: ClassVar[List[str]] = ["amount"]
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of RedemptionRedeemGift from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([
+ ])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ # set to None if amount (nullable) is None
+ # and model_fields_set contains the field
+ if self.amount is None and "amount" in self.model_fields_set:
+ _dict['amount'] = None
+
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of RedemptionRedeemGift from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "amount": obj.get("amount")
+ })
+ return _obj
+
+
diff --git a/voucherify/models/redemption_redeem_loyalty_card.py b/voucherify/models/redemption_redeem_loyalty_card.py
new file mode 100644
index 00000000..b6682ff2
--- /dev/null
+++ b/voucherify/models/redemption_redeem_loyalty_card.py
@@ -0,0 +1,93 @@
+# coding: utf-8
+
+"""
+ Voucherify API
+
+ Voucherify promotion engine REST API. Please see https://docs.voucherify.io/docs for more details.
+
+ The version of the OpenAPI document: v2018-08-01
+ Contact: support@voucherify.io
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict, Field, StrictInt
+from typing import Any, ClassVar, Dict, List, Optional
+from typing import Optional, Set
+from typing_extensions import Self
+
+class RedemptionRedeemLoyaltyCard(BaseModel):
+ """
+ Contains the number of points subtracted from the loyalty card for the redemption.
+ """ # noqa: E501
+ points: Optional[StrictInt] = Field(default=None, description="Number of points subtracted from the loyalty card as a result of the redemption.")
+ __properties: ClassVar[List[str]] = ["points"]
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of RedemptionRedeemLoyaltyCard from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([
+ ])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ # set to None if points (nullable) is None
+ # and model_fields_set contains the field
+ if self.points is None and "points" in self.model_fields_set:
+ _dict['points'] = None
+
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of RedemptionRedeemLoyaltyCard from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "points": obj.get("points")
+ })
+ return _obj
+
+
diff --git a/voucherify/models/redemption_redeem_related_redemptions.py b/voucherify/models/redemption_redeem_related_redemptions.py
new file mode 100644
index 00000000..0b0e1277
--- /dev/null
+++ b/voucherify/models/redemption_redeem_related_redemptions.py
@@ -0,0 +1,116 @@
+# coding: utf-8
+
+"""
+ Voucherify API
+
+ Voucherify promotion engine REST API. Please see https://docs.voucherify.io/docs for more details.
+
+ The version of the OpenAPI document: v2018-08-01
+ Contact: support@voucherify.io
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict
+from typing import Any, ClassVar, Dict, List, Optional
+from voucherify.models.redemption_redeem_related_redemptions_redemptions_item import RedemptionRedeemRelatedRedemptionsRedemptionsItem
+from voucherify.models.redemption_redeem_related_redemptions_rollbacks_item import RedemptionRedeemRelatedRedemptionsRollbacksItem
+from typing import Optional, Set
+from typing_extensions import Self
+
+class RedemptionRedeemRelatedRedemptions(BaseModel):
+ """
+ RedemptionRedeemRelatedRedemptions
+ """ # noqa: E501
+ rollbacks: Optional[List[RedemptionRedeemRelatedRedemptionsRollbacksItem]] = None
+ redemptions: Optional[List[RedemptionRedeemRelatedRedemptionsRedemptionsItem]] = None
+ __properties: ClassVar[List[str]] = ["rollbacks", "redemptions"]
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of RedemptionRedeemRelatedRedemptions from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([
+ ])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ # override the default output from pydantic by calling `to_dict()` of each item in rollbacks (list)
+ _items = []
+ if self.rollbacks:
+ for _item_rollbacks in self.rollbacks:
+ if _item_rollbacks:
+ _items.append(_item_rollbacks.to_dict())
+ _dict['rollbacks'] = _items
+ # override the default output from pydantic by calling `to_dict()` of each item in redemptions (list)
+ _items = []
+ if self.redemptions:
+ for _item_redemptions in self.redemptions:
+ if _item_redemptions:
+ _items.append(_item_redemptions.to_dict())
+ _dict['redemptions'] = _items
+ # set to None if rollbacks (nullable) is None
+ # and model_fields_set contains the field
+ if self.rollbacks is None and "rollbacks" in self.model_fields_set:
+ _dict['rollbacks'] = None
+
+ # set to None if redemptions (nullable) is None
+ # and model_fields_set contains the field
+ if self.redemptions is None and "redemptions" in self.model_fields_set:
+ _dict['redemptions'] = None
+
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of RedemptionRedeemRelatedRedemptions from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "rollbacks": [RedemptionRedeemRelatedRedemptionsRollbacksItem.from_dict(_item) for _item in obj["rollbacks"]] if obj.get("rollbacks") is not None else None,
+ "redemptions": [RedemptionRedeemRelatedRedemptionsRedemptionsItem.from_dict(_item) for _item in obj["redemptions"]] if obj.get("redemptions") is not None else None
+ })
+ return _obj
+
+
diff --git a/voucherify/models/redemption_redeem_related_redemptions_redemptions_item.py b/voucherify/models/redemption_redeem_related_redemptions_redemptions_item.py
new file mode 100644
index 00000000..1e1760c2
--- /dev/null
+++ b/voucherify/models/redemption_redeem_related_redemptions_redemptions_item.py
@@ -0,0 +1,91 @@
+# coding: utf-8
+
+"""
+ Voucherify API
+
+ Voucherify promotion engine REST API. Please see https://docs.voucherify.io/docs for more details.
+
+ The version of the OpenAPI document: v2018-08-01
+ Contact: support@voucherify.io
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from datetime import datetime
+from pydantic import BaseModel, ConfigDict, Field, StrictStr
+from typing import Any, ClassVar, Dict, List, Optional
+from typing import Optional, Set
+from typing_extensions import Self
+
+class RedemptionRedeemRelatedRedemptionsRedemptionsItem(BaseModel):
+ """
+ RedemptionRedeemRelatedRedemptionsRedemptionsItem
+ """ # noqa: E501
+ id: Optional[StrictStr] = Field(default=None, description="Unique redemption ID.")
+ var_date: Optional[datetime] = Field(default=None, description="Timestamp representing the date and time when the object was created. The value is shown in the ISO 8601 format.", alias="date")
+ __properties: ClassVar[List[str]] = ["id", "date"]
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of RedemptionRedeemRelatedRedemptionsRedemptionsItem from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([
+ ])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of RedemptionRedeemRelatedRedemptionsRedemptionsItem from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "id": obj.get("id"),
+ "date": obj.get("date")
+ })
+ return _obj
+
+
diff --git a/voucherify/models/redemption_redeem_related_redemptions_rollbacks_item.py b/voucherify/models/redemption_redeem_related_redemptions_rollbacks_item.py
new file mode 100644
index 00000000..6f27180a
--- /dev/null
+++ b/voucherify/models/redemption_redeem_related_redemptions_rollbacks_item.py
@@ -0,0 +1,91 @@
+# coding: utf-8
+
+"""
+ Voucherify API
+
+ Voucherify promotion engine REST API. Please see https://docs.voucherify.io/docs for more details.
+
+ The version of the OpenAPI document: v2018-08-01
+ Contact: support@voucherify.io
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from datetime import datetime
+from pydantic import BaseModel, ConfigDict, Field, StrictStr
+from typing import Any, ClassVar, Dict, List, Optional
+from typing import Optional, Set
+from typing_extensions import Self
+
+class RedemptionRedeemRelatedRedemptionsRollbacksItem(BaseModel):
+ """
+ RedemptionRedeemRelatedRedemptionsRollbacksItem
+ """ # noqa: E501
+ id: Optional[StrictStr] = Field(default=None, description="Unique rollback redemption ID.")
+ var_date: Optional[datetime] = Field(default=None, description="Timestamp representing the date and time when the object was created. The value is shown in the ISO 8601 format.", alias="date")
+ __properties: ClassVar[List[str]] = ["id", "date"]
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of RedemptionRedeemRelatedRedemptionsRollbacksItem from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([
+ ])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of RedemptionRedeemRelatedRedemptionsRollbacksItem from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "id": obj.get("id"),
+ "date": obj.get("date")
+ })
+ return _obj
+
+
diff --git a/voucherify/models/redemption_redeem_voucher.py b/voucherify/models/redemption_redeem_voucher.py
new file mode 100644
index 00000000..0f8f3bee
--- /dev/null
+++ b/voucherify/models/redemption_redeem_voucher.py
@@ -0,0 +1,331 @@
+# coding: utf-8
+
+"""
+ Voucherify API
+
+ Voucherify promotion engine REST API. Please see https://docs.voucherify.io/docs for more details.
+
+ The version of the OpenAPI document: v2018-08-01
+ Contact: support@voucherify.io
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from datetime import datetime
+from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, StrictStr, field_validator
+from typing import Any, ClassVar, Dict, List, Optional
+from voucherify.models.category_with_stacking_rules_type import CategoryWithStackingRulesType
+from voucherify.models.discount import Discount
+from voucherify.models.redemption_redeem_voucher_gift import RedemptionRedeemVoucherGift
+from voucherify.models.redemption_redeem_voucher_loyalty_card import RedemptionRedeemVoucherLoyaltyCard
+from voucherify.models.redemption_redeem_voucher_publish import RedemptionRedeemVoucherPublish
+from voucherify.models.redemption_redeem_voucher_redemption import RedemptionRedeemVoucherRedemption
+from voucherify.models.simple_customer import SimpleCustomer
+from voucherify.models.validation_rules_assignments_list import ValidationRulesAssignmentsList
+from voucherify.models.validity_hours import ValidityHours
+from voucherify.models.validity_timeframe import ValidityTimeframe
+from voucherify.models.voucher_assets import VoucherAssets
+from typing import Optional, Set
+from typing_extensions import Self
+
+class RedemptionRedeemVoucher(BaseModel):
+ """
+ Defines the details of the voucher being redeemed.
+ """ # noqa: E501
+ id: Optional[StrictStr] = Field(default=None, description="Assigned by the Voucherify API, identifies the voucher.")
+ code: Optional[StrictStr] = Field(default=None, description="A code that identifies a voucher. Pattern can use all letters of the English alphabet, Arabic numerals, and special characters.")
+ campaign: Optional[StrictStr] = Field(default=None, description="A unique campaign name, identifies the voucher's parent campaign.")
+ campaign_id: Optional[StrictStr] = Field(default=None, description="Assigned by the Voucherify API, identifies the voucher's parent campaign.")
+ category: Optional[StrictStr] = Field(default=None, description="Tag defining the category that this voucher belongs to. Useful when listing vouchers using the List Vouchers endpoint.")
+ category_id: Optional[StrictStr] = Field(default=None, description="Unique category ID assigned by Voucherify.")
+ type: Optional[StrictStr] = Field(default=None, description="Defines the type of the voucher. ")
+ discount: Optional[Discount] = None
+ gift: Optional[RedemptionRedeemVoucherGift] = None
+ loyalty_card: Optional[RedemptionRedeemVoucherLoyaltyCard] = None
+ start_date: Optional[datetime] = Field(default=None, description="Activation timestamp defines when the code starts to be active in ISO 8601 format. Voucher is *inactive before* this date. ")
+ expiration_date: Optional[datetime] = Field(default=None, description="Expiration timestamp defines when the code expires in ISO 8601 format. Voucher is *inactive after* this date.")
+ validity_timeframe: Optional[ValidityTimeframe] = None
+ validity_day_of_week: Optional[List[StrictInt]] = Field(default=None, description="Integer array corresponding to the particular days of the week in which the voucher is valid. - `0` Sunday - `1` Monday - `2` Tuesday - `3` Wednesday - `4` Thursday - `5` Friday - `6` Saturday")
+ validity_hours: Optional[ValidityHours] = None
+ active: Optional[StrictBool] = Field(default=None, description="A flag to toggle the voucher on or off. You can disable a voucher even though it's within the active period defined by the `start_date` and `expiration_date`. - `true` indicates an *active* voucher - `false` indicates an *inactive* voucher")
+ additional_info: Optional[StrictStr] = Field(default=None, description="An optional field to keep any extra textual information about the code such as a code description and details.")
+ metadata: Optional[Dict[str, Any]] = Field(default=None, description="The metadata object stores all custom attributes assigned to the code. A set of key/value pairs that you can attach to a voucher object. It can be useful for storing additional information about the voucher in a structured format.")
+ assets: Optional[VoucherAssets] = None
+ is_referral_code: Optional[StrictBool] = Field(default=None, description="Flag indicating whether this voucher is a referral code; `true` for campaign type `REFERRAL_PROGRAM`.")
+ created_at: Optional[datetime] = Field(default=None, description="Timestamp representing the date and time when the voucher was created. The value is shown in the ISO 8601 format.")
+ updated_at: Optional[datetime] = Field(default=None, description="Timestamp representing the date and time when the voucher was last updated in ISO 8601 format.")
+ holder_id: Optional[StrictStr] = Field(default=None, description="Unique customer identifier of the redeemable holder. It equals to the customer ID assigned by Voucherify.")
+ referrer_id: Optional[StrictStr] = Field(default=None, description="Unique identifier of the referring person.")
+ object: Optional[StrictStr] = Field(default='voucher', description="The type of the object represented by JSON. Default is `voucher`.")
+ publish: Optional[RedemptionRedeemVoucherPublish] = None
+ redemption: Optional[RedemptionRedeemVoucherRedemption] = None
+ categories: Optional[List[CategoryWithStackingRulesType]] = Field(default=None, description="Contains details about the category.")
+ validation_rules_assignments: Optional[ValidationRulesAssignmentsList] = None
+ holder: Optional[SimpleCustomer] = None
+ __properties: ClassVar[List[str]] = ["id", "code", "campaign", "campaign_id", "category", "category_id", "type", "discount", "gift", "loyalty_card", "start_date", "expiration_date", "validity_timeframe", "validity_day_of_week", "validity_hours", "active", "additional_info", "metadata", "assets", "is_referral_code", "created_at", "updated_at", "holder_id", "referrer_id", "object", "publish", "redemption", "categories", "validation_rules_assignments", "holder"]
+
+ @field_validator('type')
+ def type_validate_enum(cls, value):
+ """Validates the enum"""
+ if value is None:
+ return value
+
+ if value not in set(['GIFT_VOUCHER', 'DISCOUNT_VOUCHER', 'LOYALTY_CARD']):
+ raise ValueError("must be one of enum values ('GIFT_VOUCHER', 'DISCOUNT_VOUCHER', 'LOYALTY_CARD')")
+ return value
+
+ @field_validator('validity_day_of_week')
+ def validity_day_of_week_validate_enum(cls, value):
+ """Validates the enum"""
+ if value is None:
+ return value
+
+ for i in value:
+ if i not in set([0, 1, 2, 3, 4, 5, 6]):
+ raise ValueError("each list item must be one of (0, 1, 2, 3, 4, 5, 6)")
+ return value
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of RedemptionRedeemVoucher from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([
+ ])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ # override the default output from pydantic by calling `to_dict()` of discount
+ if self.discount:
+ _dict['discount'] = self.discount.to_dict()
+ # override the default output from pydantic by calling `to_dict()` of gift
+ if self.gift:
+ _dict['gift'] = self.gift.to_dict()
+ # override the default output from pydantic by calling `to_dict()` of loyalty_card
+ if self.loyalty_card:
+ _dict['loyalty_card'] = self.loyalty_card.to_dict()
+ # override the default output from pydantic by calling `to_dict()` of validity_timeframe
+ if self.validity_timeframe:
+ _dict['validity_timeframe'] = self.validity_timeframe.to_dict()
+ # override the default output from pydantic by calling `to_dict()` of validity_hours
+ if self.validity_hours:
+ _dict['validity_hours'] = self.validity_hours.to_dict()
+ # override the default output from pydantic by calling `to_dict()` of assets
+ if self.assets:
+ _dict['assets'] = self.assets.to_dict()
+ # override the default output from pydantic by calling `to_dict()` of publish
+ if self.publish:
+ _dict['publish'] = self.publish.to_dict()
+ # override the default output from pydantic by calling `to_dict()` of redemption
+ if self.redemption:
+ _dict['redemption'] = self.redemption.to_dict()
+ # override the default output from pydantic by calling `to_dict()` of each item in categories (list)
+ _items = []
+ if self.categories:
+ for _item_categories in self.categories:
+ if _item_categories:
+ _items.append(_item_categories.to_dict())
+ _dict['categories'] = _items
+ # override the default output from pydantic by calling `to_dict()` of validation_rules_assignments
+ if self.validation_rules_assignments:
+ _dict['validation_rules_assignments'] = self.validation_rules_assignments.to_dict()
+ # override the default output from pydantic by calling `to_dict()` of holder
+ if self.holder:
+ _dict['holder'] = self.holder.to_dict()
+ # set to None if id (nullable) is None
+ # and model_fields_set contains the field
+ if self.id is None and "id" in self.model_fields_set:
+ _dict['id'] = None
+
+ # set to None if code (nullable) is None
+ # and model_fields_set contains the field
+ if self.code is None and "code" in self.model_fields_set:
+ _dict['code'] = None
+
+ # set to None if campaign (nullable) is None
+ # and model_fields_set contains the field
+ if self.campaign is None and "campaign" in self.model_fields_set:
+ _dict['campaign'] = None
+
+ # set to None if campaign_id (nullable) is None
+ # and model_fields_set contains the field
+ if self.campaign_id is None and "campaign_id" in self.model_fields_set:
+ _dict['campaign_id'] = None
+
+ # set to None if category (nullable) is None
+ # and model_fields_set contains the field
+ if self.category is None and "category" in self.model_fields_set:
+ _dict['category'] = None
+
+ # set to None if category_id (nullable) is None
+ # and model_fields_set contains the field
+ if self.category_id is None and "category_id" in self.model_fields_set:
+ _dict['category_id'] = None
+
+ # set to None if type (nullable) is None
+ # and model_fields_set contains the field
+ if self.type is None and "type" in self.model_fields_set:
+ _dict['type'] = None
+
+ # set to None if gift (nullable) is None
+ # and model_fields_set contains the field
+ if self.gift is None and "gift" in self.model_fields_set:
+ _dict['gift'] = None
+
+ # set to None if loyalty_card (nullable) is None
+ # and model_fields_set contains the field
+ if self.loyalty_card is None and "loyalty_card" in self.model_fields_set:
+ _dict['loyalty_card'] = None
+
+ # set to None if start_date (nullable) is None
+ # and model_fields_set contains the field
+ if self.start_date is None and "start_date" in self.model_fields_set:
+ _dict['start_date'] = None
+
+ # set to None if expiration_date (nullable) is None
+ # and model_fields_set contains the field
+ if self.expiration_date is None and "expiration_date" in self.model_fields_set:
+ _dict['expiration_date'] = None
+
+ # set to None if active (nullable) is None
+ # and model_fields_set contains the field
+ if self.active is None and "active" in self.model_fields_set:
+ _dict['active'] = None
+
+ # set to None if additional_info (nullable) is None
+ # and model_fields_set contains the field
+ if self.additional_info is None and "additional_info" in self.model_fields_set:
+ _dict['additional_info'] = None
+
+ # set to None if metadata (nullable) is None
+ # and model_fields_set contains the field
+ if self.metadata is None and "metadata" in self.model_fields_set:
+ _dict['metadata'] = None
+
+ # set to None if is_referral_code (nullable) is None
+ # and model_fields_set contains the field
+ if self.is_referral_code is None and "is_referral_code" in self.model_fields_set:
+ _dict['is_referral_code'] = None
+
+ # set to None if created_at (nullable) is None
+ # and model_fields_set contains the field
+ if self.created_at is None and "created_at" in self.model_fields_set:
+ _dict['created_at'] = None
+
+ # set to None if updated_at (nullable) is None
+ # and model_fields_set contains the field
+ if self.updated_at is None and "updated_at" in self.model_fields_set:
+ _dict['updated_at'] = None
+
+ # set to None if holder_id (nullable) is None
+ # and model_fields_set contains the field
+ if self.holder_id is None and "holder_id" in self.model_fields_set:
+ _dict['holder_id'] = None
+
+ # set to None if referrer_id (nullable) is None
+ # and model_fields_set contains the field
+ if self.referrer_id is None and "referrer_id" in self.model_fields_set:
+ _dict['referrer_id'] = None
+
+ # set to None if object (nullable) is None
+ # and model_fields_set contains the field
+ if self.object is None and "object" in self.model_fields_set:
+ _dict['object'] = None
+
+ # set to None if publish (nullable) is None
+ # and model_fields_set contains the field
+ if self.publish is None and "publish" in self.model_fields_set:
+ _dict['publish'] = None
+
+ # set to None if redemption (nullable) is None
+ # and model_fields_set contains the field
+ if self.redemption is None and "redemption" in self.model_fields_set:
+ _dict['redemption'] = None
+
+ # set to None if categories (nullable) is None
+ # and model_fields_set contains the field
+ if self.categories is None and "categories" in self.model_fields_set:
+ _dict['categories'] = None
+
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of RedemptionRedeemVoucher from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "id": obj.get("id"),
+ "code": obj.get("code"),
+ "campaign": obj.get("campaign"),
+ "campaign_id": obj.get("campaign_id"),
+ "category": obj.get("category"),
+ "category_id": obj.get("category_id"),
+ "type": obj.get("type"),
+ "discount": Discount.from_dict(obj["discount"]) if obj.get("discount") is not None else None,
+ "gift": RedemptionRedeemVoucherGift.from_dict(obj["gift"]) if obj.get("gift") is not None else None,
+ "loyalty_card": RedemptionRedeemVoucherLoyaltyCard.from_dict(obj["loyalty_card"]) if obj.get("loyalty_card") is not None else None,
+ "start_date": obj.get("start_date"),
+ "expiration_date": obj.get("expiration_date"),
+ "validity_timeframe": ValidityTimeframe.from_dict(obj["validity_timeframe"]) if obj.get("validity_timeframe") is not None else None,
+ "validity_day_of_week": obj.get("validity_day_of_week"),
+ "validity_hours": ValidityHours.from_dict(obj["validity_hours"]) if obj.get("validity_hours") is not None else None,
+ "active": obj.get("active"),
+ "additional_info": obj.get("additional_info"),
+ "metadata": obj.get("metadata"),
+ "assets": VoucherAssets.from_dict(obj["assets"]) if obj.get("assets") is not None else None,
+ "is_referral_code": obj.get("is_referral_code"),
+ "created_at": obj.get("created_at"),
+ "updated_at": obj.get("updated_at"),
+ "holder_id": obj.get("holder_id"),
+ "referrer_id": obj.get("referrer_id"),
+ "object": obj.get("object") if obj.get("object") is not None else 'voucher',
+ "publish": RedemptionRedeemVoucherPublish.from_dict(obj["publish"]) if obj.get("publish") is not None else None,
+ "redemption": RedemptionRedeemVoucherRedemption.from_dict(obj["redemption"]) if obj.get("redemption") is not None else None,
+ "categories": [CategoryWithStackingRulesType.from_dict(_item) for _item in obj["categories"]] if obj.get("categories") is not None else None,
+ "validation_rules_assignments": ValidationRulesAssignmentsList.from_dict(obj["validation_rules_assignments"]) if obj.get("validation_rules_assignments") is not None else None,
+ "holder": SimpleCustomer.from_dict(obj["holder"]) if obj.get("holder") is not None else None
+ })
+ return _obj
+
+
diff --git a/voucherify/models/redemption_redeem_voucher_gift.py b/voucherify/models/redemption_redeem_voucher_gift.py
new file mode 100644
index 00000000..1379403a
--- /dev/null
+++ b/voucherify/models/redemption_redeem_voucher_gift.py
@@ -0,0 +1,117 @@
+# coding: utf-8
+
+"""
+ Voucherify API
+
+ Voucherify promotion engine REST API. Please see https://docs.voucherify.io/docs for more details.
+
+ The version of the OpenAPI document: v2018-08-01
+ Contact: support@voucherify.io
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr, field_validator
+from typing import Any, ClassVar, Dict, List, Optional
+from typing import Optional, Set
+from typing_extensions import Self
+
+class RedemptionRedeemVoucherGift(BaseModel):
+ """
+ Object representing gift parameters. Child attributes are present only if `type` is `GIFT_VOUCHER`. Defaults to `null`.
+ """ # noqa: E501
+ amount: Optional[StrictInt] = Field(default=None, description="Total gift card income over the lifetime of the card. Value is multiplied by 100 to precisely represent 2 decimal places. For example, $100 amount is written as 10000.")
+ balance: Optional[StrictInt] = Field(default=None, description="Available funds. Value is multiplied by 100 to precisely represent 2 decimal places. For example, $100 amount is written as 10000.")
+ effect: Optional[StrictStr] = Field(default=None, description="Defines how the credits are applied to the customer's order.")
+ __properties: ClassVar[List[str]] = ["amount", "balance", "effect"]
+
+ @field_validator('effect')
+ def effect_validate_enum(cls, value):
+ """Validates the enum"""
+ if value is None:
+ return value
+
+ if value not in set(['APPLY_TO_ORDER', 'APPLY_TO_ITEMS']):
+ raise ValueError("must be one of enum values ('APPLY_TO_ORDER', 'APPLY_TO_ITEMS')")
+ return value
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of RedemptionRedeemVoucherGift from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([
+ ])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ # set to None if amount (nullable) is None
+ # and model_fields_set contains the field
+ if self.amount is None and "amount" in self.model_fields_set:
+ _dict['amount'] = None
+
+ # set to None if balance (nullable) is None
+ # and model_fields_set contains the field
+ if self.balance is None and "balance" in self.model_fields_set:
+ _dict['balance'] = None
+
+ # set to None if effect (nullable) is None
+ # and model_fields_set contains the field
+ if self.effect is None and "effect" in self.model_fields_set:
+ _dict['effect'] = None
+
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of RedemptionRedeemVoucherGift from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "amount": obj.get("amount"),
+ "balance": obj.get("balance"),
+ "effect": obj.get("effect")
+ })
+ return _obj
+
+
diff --git a/voucherify/models/redemption_redeem_voucher_loyalty_card.py b/voucherify/models/redemption_redeem_voucher_loyalty_card.py
new file mode 100644
index 00000000..89c03aeb
--- /dev/null
+++ b/voucherify/models/redemption_redeem_voucher_loyalty_card.py
@@ -0,0 +1,115 @@
+# coding: utf-8
+
+"""
+ Voucherify API
+
+ Voucherify promotion engine REST API. Please see https://docs.voucherify.io/docs for more details.
+
+ The version of the OpenAPI document: v2018-08-01
+ Contact: support@voucherify.io
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from datetime import date
+from pydantic import BaseModel, ConfigDict, Field, StrictInt
+from typing import Any, ClassVar, Dict, List, Optional
+from typing import Optional, Set
+from typing_extensions import Self
+
+class RedemptionRedeemVoucherLoyaltyCard(BaseModel):
+ """
+ Object representing loyalty card parameters. Child attributes are present only if `type` is `LOYALTY_CARD`. Defaults to `null`.
+ """ # noqa: E501
+ points: Optional[StrictInt] = Field(default=None, description="Total points incurred over the lifespan of the loyalty card.")
+ balance: Optional[StrictInt] = Field(default=None, description="Points available for reward redemption.")
+ next_expiration_date: Optional[date] = Field(default=None, description="The next closest date when the next set of points are due to expire.")
+ next_expiration_points: Optional[StrictInt] = Field(default=None, description="The amount of points that are set to expire next.")
+ __properties: ClassVar[List[str]] = ["points", "balance", "next_expiration_date", "next_expiration_points"]
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of RedemptionRedeemVoucherLoyaltyCard from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([
+ ])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ # set to None if points (nullable) is None
+ # and model_fields_set contains the field
+ if self.points is None and "points" in self.model_fields_set:
+ _dict['points'] = None
+
+ # set to None if balance (nullable) is None
+ # and model_fields_set contains the field
+ if self.balance is None and "balance" in self.model_fields_set:
+ _dict['balance'] = None
+
+ # set to None if next_expiration_date (nullable) is None
+ # and model_fields_set contains the field
+ if self.next_expiration_date is None and "next_expiration_date" in self.model_fields_set:
+ _dict['next_expiration_date'] = None
+
+ # set to None if next_expiration_points (nullable) is None
+ # and model_fields_set contains the field
+ if self.next_expiration_points is None and "next_expiration_points" in self.model_fields_set:
+ _dict['next_expiration_points'] = None
+
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of RedemptionRedeemVoucherLoyaltyCard from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "points": obj.get("points"),
+ "balance": obj.get("balance"),
+ "next_expiration_date": obj.get("next_expiration_date"),
+ "next_expiration_points": obj.get("next_expiration_points")
+ })
+ return _obj
+
+
diff --git a/voucherify/models/redemption_redeem_voucher_publish.py b/voucherify/models/redemption_redeem_voucher_publish.py
new file mode 100644
index 00000000..0a3085b6
--- /dev/null
+++ b/voucherify/models/redemption_redeem_voucher_publish.py
@@ -0,0 +1,107 @@
+# coding: utf-8
+
+"""
+ Voucherify API
+
+ Voucherify promotion engine REST API. Please see https://docs.voucherify.io/docs for more details.
+
+ The version of the OpenAPI document: v2018-08-01
+ Contact: support@voucherify.io
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr
+from typing import Any, ClassVar, Dict, List, Optional
+from typing import Optional, Set
+from typing_extensions import Self
+
+class RedemptionRedeemVoucherPublish(BaseModel):
+ """
+ Stores a summary of publication events: an event counter and endpoint to return details of each event. Publication is an assignment of a code to a customer, e.g. through a distribution.
+ """ # noqa: E501
+ object: Optional[StrictStr] = Field(default='list', description="The type of the object represented is by default `list`. To get this list, you need to make a call to the endpoint returned in the `url` attribute.")
+ count: Optional[StrictInt] = Field(default=None, description="Publication events counter.")
+ url: Optional[StrictStr] = Field(default=None, description="The endpoint where this list of publications can be accessed using a GET method. `/v1/vouchers/{voucher_code}/publications`")
+ __properties: ClassVar[List[str]] = ["object", "count", "url"]
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of RedemptionRedeemVoucherPublish from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([
+ ])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ # set to None if object (nullable) is None
+ # and model_fields_set contains the field
+ if self.object is None and "object" in self.model_fields_set:
+ _dict['object'] = None
+
+ # set to None if count (nullable) is None
+ # and model_fields_set contains the field
+ if self.count is None and "count" in self.model_fields_set:
+ _dict['count'] = None
+
+ # set to None if url (nullable) is None
+ # and model_fields_set contains the field
+ if self.url is None and "url" in self.model_fields_set:
+ _dict['url'] = None
+
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of RedemptionRedeemVoucherPublish from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "object": obj.get("object") if obj.get("object") is not None else 'list',
+ "count": obj.get("count"),
+ "url": obj.get("url")
+ })
+ return _obj
+
+
diff --git a/voucherify/models/redemption_redeem_voucher_redemption.py b/voucherify/models/redemption_redeem_voucher_redemption.py
new file mode 100644
index 00000000..af99a966
--- /dev/null
+++ b/voucherify/models/redemption_redeem_voucher_redemption.py
@@ -0,0 +1,121 @@
+# coding: utf-8
+
+"""
+ Voucherify API
+
+ Voucherify promotion engine REST API. Please see https://docs.voucherify.io/docs for more details.
+
+ The version of the OpenAPI document: v2018-08-01
+ Contact: support@voucherify.io
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr
+from typing import Any, ClassVar, Dict, List, Optional
+from typing import Optional, Set
+from typing_extensions import Self
+
+class RedemptionRedeemVoucherRedemption(BaseModel):
+ """
+ Stores a summary of redemptions that have been applied to the voucher.
+ """ # noqa: E501
+ quantity: Optional[StrictInt] = Field(default=None, description="How many times a voucher can be redeemed. A `null` value means unlimited.")
+ redeemed_quantity: Optional[StrictInt] = Field(default=None, description="How many times a voucher has already been redeemed.")
+ redeemed_points: Optional[StrictInt] = Field(default=None, description="Total loyalty points redeemed.")
+ object: Optional[StrictStr] = Field(default='list', description="The type of the object represented is by default `list`. To get this list, you need to make a call to the endpoint returned in the url attribute.")
+ url: Optional[StrictStr] = Field(default=None, description="The endpoint where this list of redemptions can be accessed using a GET method. `/v1/vouchers/{voucher_code}/redemptions`")
+ __properties: ClassVar[List[str]] = ["quantity", "redeemed_quantity", "redeemed_points", "object", "url"]
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of RedemptionRedeemVoucherRedemption from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([
+ ])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ # set to None if quantity (nullable) is None
+ # and model_fields_set contains the field
+ if self.quantity is None and "quantity" in self.model_fields_set:
+ _dict['quantity'] = None
+
+ # set to None if redeemed_quantity (nullable) is None
+ # and model_fields_set contains the field
+ if self.redeemed_quantity is None and "redeemed_quantity" in self.model_fields_set:
+ _dict['redeemed_quantity'] = None
+
+ # set to None if redeemed_points (nullable) is None
+ # and model_fields_set contains the field
+ if self.redeemed_points is None and "redeemed_points" in self.model_fields_set:
+ _dict['redeemed_points'] = None
+
+ # set to None if object (nullable) is None
+ # and model_fields_set contains the field
+ if self.object is None and "object" in self.model_fields_set:
+ _dict['object'] = None
+
+ # set to None if url (nullable) is None
+ # and model_fields_set contains the field
+ if self.url is None and "url" in self.model_fields_set:
+ _dict['url'] = None
+
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of RedemptionRedeemVoucherRedemption from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "quantity": obj.get("quantity"),
+ "redeemed_quantity": obj.get("redeemed_quantity"),
+ "redeemed_points": obj.get("redeemed_points"),
+ "object": obj.get("object") if obj.get("object") is not None else 'list',
+ "url": obj.get("url")
+ })
+ return _obj
+
+
diff --git a/voucherify/models/redemption_voucher.py b/voucherify/models/redemption_voucher.py
index 44115a95..cc862475 100644
--- a/voucherify/models/redemption_voucher.py
+++ b/voucherify/models/redemption_voucher.py
@@ -21,7 +21,7 @@
from datetime import datetime
from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, StrictStr, field_validator
from typing import Any, ClassVar, Dict, List, Optional
-from voucherify.models.category import Category
+from voucherify.models.category_with_stacking_rules_type import CategoryWithStackingRulesType
from voucherify.models.discount import Discount
from voucherify.models.redemption_voucher_gift import RedemptionVoucherGift
from voucherify.models.redemption_voucher_loyalty_card import RedemptionVoucherLoyaltyCard
@@ -66,7 +66,7 @@ class RedemptionVoucher(BaseModel):
object: Optional[StrictStr] = Field(default='voucher', description="The type of the object represented by JSON. Default is `voucher`.")
publish: Optional[RedemptionVoucherPublish] = None
redemption: Optional[RedemptionVoucherRedemption] = None
- categories: Optional[List[Category]] = Field(default=None, description="Contains details about the category.")
+ categories: Optional[List[CategoryWithStackingRulesType]] = Field(default=None, description="Contains details about the category.")
validation_rules_assignments: Optional[ValidationRulesAssignmentsList] = None
holder: Optional[SimpleCustomer] = None
__properties: ClassVar[List[str]] = ["id", "code", "campaign", "campaign_id", "category", "category_id", "type", "discount", "gift", "loyalty_card", "start_date", "expiration_date", "validity_timeframe", "validity_day_of_week", "validity_hours", "active", "additional_info", "metadata", "assets", "is_referral_code", "created_at", "updated_at", "holder_id", "referrer_id", "object", "publish", "redemption", "categories", "validation_rules_assignments", "holder"]
@@ -322,7 +322,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
"object": obj.get("object") if obj.get("object") is not None else 'voucher',
"publish": RedemptionVoucherPublish.from_dict(obj["publish"]) if obj.get("publish") is not None else None,
"redemption": RedemptionVoucherRedemption.from_dict(obj["redemption"]) if obj.get("redemption") is not None else None,
- "categories": [Category.from_dict(_item) for _item in obj["categories"]] if obj.get("categories") is not None else None,
+ "categories": [CategoryWithStackingRulesType.from_dict(_item) for _item in obj["categories"]] if obj.get("categories") is not None else None,
"validation_rules_assignments": ValidationRulesAssignmentsList.from_dict(obj["validation_rules_assignments"]) if obj.get("validation_rules_assignments") is not None else None,
"holder": SimpleCustomer.from_dict(obj["holder"]) if obj.get("holder") is not None else None
})
diff --git a/voucherify/models/redemption_voucher_publish.py b/voucherify/models/redemption_voucher_publish.py
index d010b0d1..b963f8f1 100644
--- a/voucherify/models/redemption_voucher_publish.py
+++ b/voucherify/models/redemption_voucher_publish.py
@@ -29,7 +29,7 @@ class RedemptionVoucherPublish(BaseModel):
""" # noqa: E501
object: Optional[StrictStr] = Field(default='list', description="The type of the object represented is by default `list`. To get this list, you need to make a call to the endpoint returned in the `url` attribute.")
count: Optional[StrictInt] = Field(default=None, description="Publication events counter.")
- url: Optional[StrictStr] = Field(default=None, description="The endpoint where this list of publications can be accessed using a GET method. `/v1/vouchers/{voucher_code}/publications`")
+ url: Optional[StrictStr] = Field(default=None, description="The endpoint where this list of publications can be accessed using a **GET** method. `/v1/vouchers/{voucher_code}/publications`")
__properties: ClassVar[List[str]] = ["object", "count", "url"]
model_config = ConfigDict(
diff --git a/voucherify/models/redemption_voucher_redemption.py b/voucherify/models/redemption_voucher_redemption.py
index 68d4d5e9..0e7f516f 100644
--- a/voucherify/models/redemption_voucher_redemption.py
+++ b/voucherify/models/redemption_voucher_redemption.py
@@ -31,7 +31,7 @@ class RedemptionVoucherRedemption(BaseModel):
redeemed_quantity: Optional[StrictInt] = Field(default=None, description="How many times a voucher has already been redeemed.")
redeemed_points: Optional[StrictInt] = Field(default=None, description="Total loyalty points redeemed.")
object: Optional[StrictStr] = Field(default='list', description="The type of the object represented is by default `list`. To get this list, you need to make a call to the endpoint returned in the url attribute.")
- url: Optional[StrictStr] = Field(default=None, description="The endpoint where this list of redemptions can be accessed using a GET method. `/v1/vouchers/{voucher_code}/redemptions`")
+ url: Optional[StrictStr] = Field(default=None, description="The endpoint where this list of redemptions can be accessed using a **GET** method. `/v1/vouchers/{voucher_code}/redemptions`")
__properties: ClassVar[List[str]] = ["quantity", "redeemed_quantity", "redeemed_points", "object", "url"]
model_config = ConfigDict(
diff --git a/voucherify/models/redemptions_get_response_body.py b/voucherify/models/redemptions_get_response_body.py
index 207c35e7..93baa788 100644
--- a/voucherify/models/redemptions_get_response_body.py
+++ b/voucherify/models/redemptions_get_response_body.py
@@ -55,13 +55,13 @@ class RedemptionsGetResponseBody(BaseModel):
customer: Optional[RedemptionsGetResponseBodyCustomer] = None
related_object_type: Optional[StrictStr] = Field(default=None, description="Defines the related object.")
related_object_id: Optional[StrictStr] = None
- voucher: Optional[RedemptionsGetResponseBodyVoucher] = None
promotion_tier: Optional[RedemptionsGetResponseBodyPromotionTier] = None
reward: Optional[RedemptionRewardResult] = None
gift: Optional[RedemptionsGetResponseBodyGift] = None
loyalty_card: Optional[RedemptionsGetResponseBodyLoyaltyCard] = None
+ voucher: Optional[RedemptionsGetResponseBodyVoucher] = None
reason: Optional[StrictStr] = Field(default=None, description="System generated cause for the redemption being invalid in the context of the provided parameters.")
- __properties: ClassVar[List[str]] = ["id", "object", "date", "customer_id", "tracking_id", "metadata", "amount", "redemption", "result", "status", "related_redemptions", "failure_code", "failure_message", "order", "channel", "customer", "related_object_type", "related_object_id", "voucher", "promotion_tier", "reward", "gift", "loyalty_card", "reason"]
+ __properties: ClassVar[List[str]] = ["id", "object", "date", "customer_id", "tracking_id", "metadata", "amount", "redemption", "result", "status", "related_redemptions", "failure_code", "failure_message", "order", "channel", "customer", "related_object_type", "related_object_id", "promotion_tier", "reward", "gift", "loyalty_card", "voucher", "reason"]
@field_validator('object')
def object_validate_enum(cls, value):
@@ -154,9 +154,6 @@ def to_dict(self) -> Dict[str, Any]:
# override the default output from pydantic by calling `to_dict()` of customer
if self.customer:
_dict['customer'] = self.customer.to_dict()
- # override the default output from pydantic by calling `to_dict()` of voucher
- if self.voucher:
- _dict['voucher'] = self.voucher.to_dict()
# override the default output from pydantic by calling `to_dict()` of promotion_tier
if self.promotion_tier:
_dict['promotion_tier'] = self.promotion_tier.to_dict()
@@ -169,6 +166,9 @@ def to_dict(self) -> Dict[str, Any]:
# override the default output from pydantic by calling `to_dict()` of loyalty_card
if self.loyalty_card:
_dict['loyalty_card'] = self.loyalty_card.to_dict()
+ # override the default output from pydantic by calling `to_dict()` of voucher
+ if self.voucher:
+ _dict['voucher'] = self.voucher.to_dict()
# set to None if id (nullable) is None
# and model_fields_set contains the field
if self.id is None and "id" in self.model_fields_set:
@@ -259,11 +259,6 @@ def to_dict(self) -> Dict[str, Any]:
if self.related_object_id is None and "related_object_id" in self.model_fields_set:
_dict['related_object_id'] = None
- # set to None if voucher (nullable) is None
- # and model_fields_set contains the field
- if self.voucher is None and "voucher" in self.model_fields_set:
- _dict['voucher'] = None
-
# set to None if promotion_tier (nullable) is None
# and model_fields_set contains the field
if self.promotion_tier is None and "promotion_tier" in self.model_fields_set:
@@ -279,6 +274,11 @@ def to_dict(self) -> Dict[str, Any]:
if self.loyalty_card is None and "loyalty_card" in self.model_fields_set:
_dict['loyalty_card'] = None
+ # set to None if voucher (nullable) is None
+ # and model_fields_set contains the field
+ if self.voucher is None and "voucher" in self.model_fields_set:
+ _dict['voucher'] = None
+
# set to None if reason (nullable) is None
# and model_fields_set contains the field
if self.reason is None and "reason" in self.model_fields_set:
@@ -314,11 +314,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
"customer": RedemptionsGetResponseBodyCustomer.from_dict(obj["customer"]) if obj.get("customer") is not None else None,
"related_object_type": obj.get("related_object_type"),
"related_object_id": obj.get("related_object_id"),
- "voucher": RedemptionsGetResponseBodyVoucher.from_dict(obj["voucher"]) if obj.get("voucher") is not None else None,
"promotion_tier": RedemptionsGetResponseBodyPromotionTier.from_dict(obj["promotion_tier"]) if obj.get("promotion_tier") is not None else None,
"reward": RedemptionRewardResult.from_dict(obj["reward"]) if obj.get("reward") is not None else None,
"gift": RedemptionsGetResponseBodyGift.from_dict(obj["gift"]) if obj.get("gift") is not None else None,
"loyalty_card": RedemptionsGetResponseBodyLoyaltyCard.from_dict(obj["loyalty_card"]) if obj.get("loyalty_card") is not None else None,
+ "voucher": RedemptionsGetResponseBodyVoucher.from_dict(obj["voucher"]) if obj.get("voucher") is not None else None,
"reason": obj.get("reason")
})
return _obj
diff --git a/voucherify/models/redemptions_get_response_body_channel.py b/voucherify/models/redemptions_get_response_body_channel.py
index fa5d8750..c1dab88c 100644
--- a/voucherify/models/redemptions_get_response_body_channel.py
+++ b/voucherify/models/redemptions_get_response_body_channel.py
@@ -18,7 +18,7 @@
import re # noqa: F401
import json
-from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator
+from pydantic import BaseModel, ConfigDict, StrictStr, field_validator
from typing import Any, ClassVar, Dict, List, Optional
from typing import Optional, Set
from typing_extensions import Self
@@ -28,7 +28,7 @@ class RedemptionsGetResponseBodyChannel(BaseModel):
RedemptionsGetResponseBodyChannel
""" # noqa: E501
channel_id: Optional[StrictStr] = None
- channel_type: Optional[StrictStr] = Field(default=None, description="The source of the channel for the redemption. A `USER` corresponds to the Voucherify Dashboard and an `API` corresponds to the API.")
+ channel_type: Optional[StrictStr] = None
__properties: ClassVar[List[str]] = ["channel_id", "channel_type"]
@field_validator('channel_type')
@@ -37,8 +37,8 @@ def channel_type_validate_enum(cls, value):
if value is None:
return value
- if value not in set(['USER', 'API']):
- raise ValueError("must be one of enum values ('USER', 'API')")
+ if value not in set(['USER', 'API', 'AUTO_REDEEM']):
+ raise ValueError("must be one of enum values ('USER', 'API', 'AUTO_REDEEM')")
return value
model_config = ConfigDict(
diff --git a/voucherify/models/redemptions_get_response_body_order.py b/voucherify/models/redemptions_get_response_body_order.py
index 0ad6f40a..f7d78f19 100644
--- a/voucherify/models/redemptions_get_response_body_order.py
+++ b/voucherify/models/redemptions_get_response_body_order.py
@@ -43,7 +43,7 @@ class RedemptionsGetResponseBodyOrder(BaseModel):
applied_discount_amount: Optional[StrictInt] = Field(default=None, description="This field shows the order-level discount applied.")
items_applied_discount_amount: Optional[StrictInt] = Field(default=None, description="Sum of all product-specific discounts applied in a particular request. `sum(items, i => i.applied_discount_amount)`")
total_applied_discount_amount: Optional[StrictInt] = Field(default=None, description="Sum of all order-level AND all product-specific discounts applied in a particular request. `total_applied_discount_amount` = `applied_discount_amount` + `items_applied_discount_amount`")
- items: Optional[List[OrderCalculatedItem]] = Field(default=None, description="Array of items applied to the order.")
+ items: Optional[List[OrderCalculatedItem]] = Field(default=None, description="Array of items applied to the order. It can include up 500 items.")
metadata: Optional[Dict[str, Any]] = None
object: Optional[StrictStr] = Field(default='order', description="The type of the object represented by JSON.")
created_at: Optional[datetime] = Field(default=None, description="Timestamp representing the date and time when the order was created. The value is shown in the ISO 8601 format.")
diff --git a/voucherify/models/redemptions_get_response_body_voucher_publish.py b/voucherify/models/redemptions_get_response_body_voucher_publish.py
index 7902fa5f..f3cfa68b 100644
--- a/voucherify/models/redemptions_get_response_body_voucher_publish.py
+++ b/voucherify/models/redemptions_get_response_body_voucher_publish.py
@@ -29,7 +29,7 @@ class RedemptionsGetResponseBodyVoucherPublish(BaseModel):
""" # noqa: E501
object: Optional[StrictStr] = Field(default='list', description="The type of the object represented is by default `list`. To get this list, you need to make a call to the endpoint returned in the `url` attribute.")
count: Optional[StrictInt] = Field(default=None, description="Publication events counter.")
- url: Optional[StrictStr] = Field(default=None, description="The endpoint where this list of publications can be accessed using a GET method. `/v1/vouchers/{voucher_code}/publications`")
+ url: Optional[StrictStr] = Field(default=None, description="The endpoint where this list of publications can be accessed using a **GET** method. `/v1/vouchers/{voucher_code}/publications`")
__properties: ClassVar[List[str]] = ["object", "count", "url"]
model_config = ConfigDict(
diff --git a/voucherify/models/redemptions_get_response_body_voucher_redemption.py b/voucherify/models/redemptions_get_response_body_voucher_redemption.py
index c7453141..0a54518e 100644
--- a/voucherify/models/redemptions_get_response_body_voucher_redemption.py
+++ b/voucherify/models/redemptions_get_response_body_voucher_redemption.py
@@ -31,7 +31,7 @@ class RedemptionsGetResponseBodyVoucherRedemption(BaseModel):
redeemed_quantity: Optional[StrictInt] = Field(default=None, description="How many times a voucher has already been redeemed.")
redeemed_points: Optional[StrictInt] = Field(default=None, description="Total loyalty points redeemed.")
object: Optional[StrictStr] = Field(default='list', description="The type of the object represented is by default `list`. To get this list, you need to make a call to the endpoint returned in the url attribute.")
- url: Optional[StrictStr] = Field(default=None, description="The endpoint where this list of redemptions can be accessed using a GET method. `/v1/vouchers/{voucher_code}/redemptions`")
+ url: Optional[StrictStr] = Field(default=None, description="The endpoint where this list of redemptions can be accessed using a **GET** method. `/v1/vouchers/{voucher_code}/redemptions`")
__properties: ClassVar[List[str]] = ["quantity", "redeemed_quantity", "redeemed_points", "object", "url"]
model_config = ConfigDict(
diff --git a/voucherify/models/redemptions_list_response_body_redemptions_item.py b/voucherify/models/redemptions_list_response_body_redemptions_item.py
index ad9bb2a7..654e5240 100644
--- a/voucherify/models/redemptions_list_response_body_redemptions_item.py
+++ b/voucherify/models/redemptions_list_response_body_redemptions_item.py
@@ -55,13 +55,13 @@ class RedemptionsListResponseBodyRedemptionsItem(BaseModel):
customer: Optional[RedemptionsListResponseBodyRedemptionsItemCustomer] = None
related_object_type: Optional[StrictStr] = Field(default=None, description="Defines the related object.")
related_object_id: Optional[StrictStr] = None
- voucher: Optional[RedemptionsListResponseBodyRedemptionsItemVoucher] = None
promotion_tier: Optional[RedemptionsListResponseBodyRedemptionsItemPromotionTier] = None
reward: Optional[RedemptionRewardResult] = None
gift: Optional[RedemptionsListResponseBodyRedemptionsItemGift] = None
loyalty_card: Optional[RedemptionsListResponseBodyRedemptionsItemLoyaltyCard] = None
+ voucher: Optional[RedemptionsListResponseBodyRedemptionsItemVoucher] = None
reason: Optional[StrictStr] = Field(default=None, description="System generated cause for the redemption being invalid in the context of the provided parameters.")
- __properties: ClassVar[List[str]] = ["id", "object", "date", "customer_id", "tracking_id", "metadata", "amount", "redemption", "result", "status", "related_redemptions", "failure_code", "failure_message", "order", "channel", "customer", "related_object_type", "related_object_id", "voucher", "promotion_tier", "reward", "gift", "loyalty_card", "reason"]
+ __properties: ClassVar[List[str]] = ["id", "object", "date", "customer_id", "tracking_id", "metadata", "amount", "redemption", "result", "status", "related_redemptions", "failure_code", "failure_message", "order", "channel", "customer", "related_object_type", "related_object_id", "promotion_tier", "reward", "gift", "loyalty_card", "voucher", "reason"]
@field_validator('object')
def object_validate_enum(cls, value):
@@ -154,9 +154,6 @@ def to_dict(self) -> Dict[str, Any]:
# override the default output from pydantic by calling `to_dict()` of customer
if self.customer:
_dict['customer'] = self.customer.to_dict()
- # override the default output from pydantic by calling `to_dict()` of voucher
- if self.voucher:
- _dict['voucher'] = self.voucher.to_dict()
# override the default output from pydantic by calling `to_dict()` of promotion_tier
if self.promotion_tier:
_dict['promotion_tier'] = self.promotion_tier.to_dict()
@@ -169,6 +166,9 @@ def to_dict(self) -> Dict[str, Any]:
# override the default output from pydantic by calling `to_dict()` of loyalty_card
if self.loyalty_card:
_dict['loyalty_card'] = self.loyalty_card.to_dict()
+ # override the default output from pydantic by calling `to_dict()` of voucher
+ if self.voucher:
+ _dict['voucher'] = self.voucher.to_dict()
# set to None if var_date (nullable) is None
# and model_fields_set contains the field
if self.var_date is None and "var_date" in self.model_fields_set:
@@ -244,11 +244,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
"customer": RedemptionsListResponseBodyRedemptionsItemCustomer.from_dict(obj["customer"]) if obj.get("customer") is not None else None,
"related_object_type": obj.get("related_object_type"),
"related_object_id": obj.get("related_object_id"),
- "voucher": RedemptionsListResponseBodyRedemptionsItemVoucher.from_dict(obj["voucher"]) if obj.get("voucher") is not None else None,
"promotion_tier": RedemptionsListResponseBodyRedemptionsItemPromotionTier.from_dict(obj["promotion_tier"]) if obj.get("promotion_tier") is not None else None,
"reward": RedemptionRewardResult.from_dict(obj["reward"]) if obj.get("reward") is not None else None,
"gift": RedemptionsListResponseBodyRedemptionsItemGift.from_dict(obj["gift"]) if obj.get("gift") is not None else None,
"loyalty_card": RedemptionsListResponseBodyRedemptionsItemLoyaltyCard.from_dict(obj["loyalty_card"]) if obj.get("loyalty_card") is not None else None,
+ "voucher": RedemptionsListResponseBodyRedemptionsItemVoucher.from_dict(obj["voucher"]) if obj.get("voucher") is not None else None,
"reason": obj.get("reason")
})
return _obj
diff --git a/voucherify/models/redemptions_list_response_body_redemptions_item_channel.py b/voucherify/models/redemptions_list_response_body_redemptions_item_channel.py
index dd566f08..ae275f1e 100644
--- a/voucherify/models/redemptions_list_response_body_redemptions_item_channel.py
+++ b/voucherify/models/redemptions_list_response_body_redemptions_item_channel.py
@@ -18,7 +18,7 @@
import re # noqa: F401
import json
-from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator
+from pydantic import BaseModel, ConfigDict, StrictStr, field_validator
from typing import Any, ClassVar, Dict, List, Optional
from typing import Optional, Set
from typing_extensions import Self
@@ -28,7 +28,7 @@ class RedemptionsListResponseBodyRedemptionsItemChannel(BaseModel):
RedemptionsListResponseBodyRedemptionsItemChannel
""" # noqa: E501
channel_id: Optional[StrictStr] = None
- channel_type: Optional[StrictStr] = Field(default=None, description="The source of the channel for the redemption. A `USER` corresponds to the Voucherify Dashboard and an `API` corresponds to the API.")
+ channel_type: Optional[StrictStr] = None
__properties: ClassVar[List[str]] = ["channel_id", "channel_type"]
@field_validator('channel_type')
@@ -37,8 +37,8 @@ def channel_type_validate_enum(cls, value):
if value is None:
return value
- if value not in set(['USER', 'API']):
- raise ValueError("must be one of enum values ('USER', 'API')")
+ if value not in set(['USER', 'API', 'AUTO_REDEEM']):
+ raise ValueError("must be one of enum values ('USER', 'API', 'AUTO_REDEEM')")
return value
model_config = ConfigDict(
@@ -80,11 +80,6 @@ def to_dict(self) -> Dict[str, Any]:
exclude=excluded_fields,
exclude_none=True,
)
- # set to None if channel_type (nullable) is None
- # and model_fields_set contains the field
- if self.channel_type is None and "channel_type" in self.model_fields_set:
- _dict['channel_type'] = None
-
return _dict
@classmethod
diff --git a/voucherify/models/redemptions_list_response_body_redemptions_item_order.py b/voucherify/models/redemptions_list_response_body_redemptions_item_order.py
index 509cef32..6ed247f2 100644
--- a/voucherify/models/redemptions_list_response_body_redemptions_item_order.py
+++ b/voucherify/models/redemptions_list_response_body_redemptions_item_order.py
@@ -43,7 +43,7 @@ class RedemptionsListResponseBodyRedemptionsItemOrder(BaseModel):
applied_discount_amount: Optional[StrictInt] = Field(default=None, description="This field shows the order-level discount applied.")
items_applied_discount_amount: Optional[StrictInt] = Field(default=None, description="Sum of all product-specific discounts applied in a particular request. `sum(items, i => i.applied_discount_amount)`")
total_applied_discount_amount: Optional[StrictInt] = Field(default=None, description="Sum of all order-level AND all product-specific discounts applied in a particular request. `total_applied_discount_amount` = `applied_discount_amount` + `items_applied_discount_amount`")
- items: Optional[List[OrderCalculatedItem]] = Field(default=None, description="Array of items applied to the order.")
+ items: Optional[List[OrderCalculatedItem]] = Field(default=None, description="Array of items applied to the order. It can include up 500 items.")
metadata: Optional[Dict[str, Any]] = None
object: Optional[StrictStr] = Field(default='order', description="The type of the object represented by JSON.")
created_at: Optional[datetime] = Field(default=None, description="Timestamp representing the date and time when the order was created. The value is shown in the ISO 8601 format.")
diff --git a/voucherify/models/redemptions_list_response_body_redemptions_item_voucher_publish.py b/voucherify/models/redemptions_list_response_body_redemptions_item_voucher_publish.py
index 0f97fb7e..0db4e2b1 100644
--- a/voucherify/models/redemptions_list_response_body_redemptions_item_voucher_publish.py
+++ b/voucherify/models/redemptions_list_response_body_redemptions_item_voucher_publish.py
@@ -29,7 +29,7 @@ class RedemptionsListResponseBodyRedemptionsItemVoucherPublish(BaseModel):
""" # noqa: E501
object: Optional[StrictStr] = Field(default='list', description="The type of the object represented is by default `list`. To get this list, you need to make a call to the endpoint returned in the `url` attribute.")
count: Optional[StrictInt] = Field(default=None, description="Publication events counter.")
- url: Optional[StrictStr] = Field(default=None, description="The endpoint where this list of publications can be accessed using a GET method. `/v1/vouchers/{voucher_code}/publications`")
+ url: Optional[StrictStr] = Field(default=None, description="The endpoint where this list of publications can be accessed using a **GET** method. `/v1/vouchers/{voucher_code}/publications`")
__properties: ClassVar[List[str]] = ["object", "count", "url"]
model_config = ConfigDict(
diff --git a/voucherify/models/redemptions_list_response_body_redemptions_item_voucher_redemption.py b/voucherify/models/redemptions_list_response_body_redemptions_item_voucher_redemption.py
index 34678a50..2083c9b8 100644
--- a/voucherify/models/redemptions_list_response_body_redemptions_item_voucher_redemption.py
+++ b/voucherify/models/redemptions_list_response_body_redemptions_item_voucher_redemption.py
@@ -31,7 +31,7 @@ class RedemptionsListResponseBodyRedemptionsItemVoucherRedemption(BaseModel):
redeemed_quantity: Optional[StrictInt] = Field(default=None, description="How many times a voucher has already been redeemed.")
redeemed_points: Optional[StrictInt] = Field(default=None, description="Total loyalty points redeemed.")
object: Optional[StrictStr] = Field(default='list', description="The type of the object represented is by default `list`. To get this list, you need to make a call to the endpoint returned in the url attribute.")
- url: Optional[StrictStr] = Field(default=None, description="The endpoint where this list of redemptions can be accessed using a GET method. `/v1/vouchers/{voucher_code}/redemptions`")
+ url: Optional[StrictStr] = Field(default=None, description="The endpoint where this list of redemptions can be accessed using a **GET** method. `/v1/vouchers/{voucher_code}/redemptions`")
__properties: ClassVar[List[str]] = ["quantity", "redeemed_quantity", "redeemed_points", "object", "url"]
model_config = ConfigDict(
diff --git a/voucherify/models/redemptions_rollbacks_create_response_body.py b/voucherify/models/redemptions_rollbacks_create_response_body.py
index 9162768e..5123a618 100644
--- a/voucherify/models/redemptions_rollbacks_create_response_body.py
+++ b/voucherify/models/redemptions_rollbacks_create_response_body.py
@@ -27,7 +27,7 @@
class RedemptionsRollbacksCreateResponseBody(BaseModel):
"""
- Response body schema for POST `/redemptions/{parentRedemptionID}/rollbacks`.
+ Response body schema for **POST** `/redemptions/{parentRedemptionID}/rollbacks`.
""" # noqa: E501
rollbacks: Optional[List[RedemptionRollback]] = Field(default=None, description="Contains the rollback redemption objects of the particular incentives.")
parent_rollback: Optional[RedemptionRollback] = None
diff --git a/voucherify/models/referral_program_referee_reward.py b/voucherify/models/referral_program_referee_reward.py
index 4562b384..a489563e 100644
--- a/voucherify/models/referral_program_referee_reward.py
+++ b/voucherify/models/referral_program_referee_reward.py
@@ -39,8 +39,8 @@ def type_validate_enum(cls, value):
if value is None:
return value
- if value not in set(['DISCOUNT_VOUCHER', 'LOYALTY_CARD', 'GIFT_VOUCHER', 'LUCKY_DRAW_CODE']):
- raise ValueError("must be one of enum values ('DISCOUNT_VOUCHER', 'LOYALTY_CARD', 'GIFT_VOUCHER', 'LUCKY_DRAW_CODE')")
+ if value not in set(['LOYALTY_CARD', 'GIFT_VOUCHER']):
+ raise ValueError("must be one of enum values ('LOYALTY_CARD', 'GIFT_VOUCHER')")
return value
model_config = ConfigDict(
diff --git a/voucherify/models/referrals_members_holders_create_in_bulk_request_body.py b/voucherify/models/referrals_members_holders_create_in_bulk_request_body.py
new file mode 100644
index 00000000..4d696ede
--- /dev/null
+++ b/voucherify/models/referrals_members_holders_create_in_bulk_request_body.py
@@ -0,0 +1,108 @@
+# coding: utf-8
+
+"""
+ Voucherify API
+
+ Voucherify promotion engine REST API. Please see https://docs.voucherify.io/docs for more details.
+
+ The version of the OpenAPI document: v2018-08-01
+ Contact: support@voucherify.io
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict, Field
+from typing import Any, ClassVar, Dict, List, Optional
+from voucherify.models.customer import Customer
+from typing import Optional, Set
+from typing_extensions import Self
+
+class ReferralsMembersHoldersCreateInBulkRequestBody(BaseModel):
+ """
+ Request body schema for **POST** `v1/referrals/{campaignId}/members/{memberId}/holders` and **POST** `v1/referrals/members/{memberId}/holders`.
+ """ # noqa: E501
+ holders: Optional[List[Customer]] = Field(default=None, description="Array of holders to be added to a referral card as referees. You have to send at least one object in the array up to a maximum of 100 objects. You can send either a `source_id` or `id`, or both; however, at least one of them is required. If both are sent, Voucherify checks `id` to upsert that customer's data.")
+ metadata: Optional[Dict[str, Any]] = Field(default=None, description="A set of custom key/value pairs that you can attach to the redeemable holders sent in the array. The value can be a string, number, boolean, date, datetime, image URL, or object. The metadata must meet the metadata schema for publications. The metadata object stores all custom attributes assigned to the redeemable holder.")
+ __properties: ClassVar[List[str]] = ["holders", "metadata"]
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of ReferralsMembersHoldersCreateInBulkRequestBody from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([
+ ])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ # override the default output from pydantic by calling `to_dict()` of each item in holders (list)
+ _items = []
+ if self.holders:
+ for _item_holders in self.holders:
+ if _item_holders:
+ _items.append(_item_holders.to_dict())
+ _dict['holders'] = _items
+ # set to None if holders (nullable) is None
+ # and model_fields_set contains the field
+ if self.holders is None and "holders" in self.model_fields_set:
+ _dict['holders'] = None
+
+ # set to None if metadata (nullable) is None
+ # and model_fields_set contains the field
+ if self.metadata is None and "metadata" in self.model_fields_set:
+ _dict['metadata'] = None
+
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of ReferralsMembersHoldersCreateInBulkRequestBody from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "holders": [Customer.from_dict(_item) for _item in obj["holders"]] if obj.get("holders") is not None else None,
+ "metadata": obj.get("metadata")
+ })
+ return _obj
+
+
diff --git a/voucherify/models/referrals_members_holders_create_in_bulk_response_body.py b/voucherify/models/referrals_members_holders_create_in_bulk_response_body.py
new file mode 100644
index 00000000..216d2476
--- /dev/null
+++ b/voucherify/models/referrals_members_holders_create_in_bulk_response_body.py
@@ -0,0 +1,101 @@
+# coding: utf-8
+
+"""
+ Voucherify API
+
+ Voucherify promotion engine REST API. Please see https://docs.voucherify.io/docs for more details.
+
+ The version of the OpenAPI document: v2018-08-01
+ Contact: support@voucherify.io
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict, Field
+from typing import Any, ClassVar, Dict, List, Optional
+from voucherify.models.redeemable_holder import RedeemableHolder
+from typing import Optional, Set
+from typing_extensions import Self
+
+class ReferralsMembersHoldersCreateInBulkResponseBody(BaseModel):
+ """
+ Response body schema for **POST** `v1/referrals/{campaignId}/members/{memberId}/holders` and **POST** `v1/referrals/members/{memberId}/holders`.
+ """ # noqa: E501
+ holders: Optional[List[RedeemableHolder]] = Field(default=None, description="Contains an array of referral card holders who are the customers sent in the request.")
+ __properties: ClassVar[List[str]] = ["holders"]
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of ReferralsMembersHoldersCreateInBulkResponseBody from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([
+ ])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ # override the default output from pydantic by calling `to_dict()` of each item in holders (list)
+ _items = []
+ if self.holders:
+ for _item_holders in self.holders:
+ if _item_holders:
+ _items.append(_item_holders.to_dict())
+ _dict['holders'] = _items
+ # set to None if holders (nullable) is None
+ # and model_fields_set contains the field
+ if self.holders is None and "holders" in self.model_fields_set:
+ _dict['holders'] = None
+
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of ReferralsMembersHoldersCreateInBulkResponseBody from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "holders": [RedeemableHolder.from_dict(_item) for _item in obj["holders"]] if obj.get("holders") is not None else None
+ })
+ return _obj
+
+
diff --git a/voucherify/models/referrals_members_holders_list_response_body.py b/voucherify/models/referrals_members_holders_list_response_body.py
new file mode 100644
index 00000000..78c5f7bc
--- /dev/null
+++ b/voucherify/models/referrals_members_holders_list_response_body.py
@@ -0,0 +1,136 @@
+# coding: utf-8
+
+"""
+ Voucherify API
+
+ Voucherify promotion engine REST API. Please see https://docs.voucherify.io/docs for more details.
+
+ The version of the OpenAPI document: v2018-08-01
+ Contact: support@voucherify.io
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, StrictStr
+from typing import Any, ClassVar, Dict, List, Optional
+from voucherify.models.redeemable_holder import RedeemableHolder
+from typing import Optional, Set
+from typing_extensions import Self
+
+class ReferralsMembersHoldersListResponseBody(BaseModel):
+ """
+ Response body schema for **GET** `v1/referrals/{campaignId}/members/{memberId}/holders` and for **GET** `v1/referrals/members/{memberId}/holders`
+ """ # noqa: E501
+ object: Optional[StrictStr] = Field(default='list', description="The type of the object represented by JSON. This object stores information about redeemables holders")
+ data_ref: Optional[StrictStr] = Field(default='data', description="Identifies the name of the JSON property that contains the array of holders.")
+ data: Optional[List[RedeemableHolder]] = Field(default=None, description="A dictionary that contains an array of holders.")
+ total: Optional[StrictInt] = Field(default=None, description="Total number of holders assigned to the redeemable.")
+ has_more: Optional[StrictBool] = Field(default=None, description="As query results are always limited (by the limit parameter), the `has_more` flag indicates if there are more records for given filter parameters. This lets you know if you can run another request with a `starting_after_id` query or a different limit to get more records returned in the results.")
+ more_starting_after: Optional[StrictStr] = Field(default=None, description="Returns an ID that can be used to return another page of results. Use the ID in the `starting_after_id` query parameter to display another page of the results occuring after the field with that ID.")
+ __properties: ClassVar[List[str]] = ["object", "data_ref", "data", "total", "has_more", "more_starting_after"]
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of ReferralsMembersHoldersListResponseBody from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([
+ ])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ # override the default output from pydantic by calling `to_dict()` of each item in data (list)
+ _items = []
+ if self.data:
+ for _item_data in self.data:
+ if _item_data:
+ _items.append(_item_data.to_dict())
+ _dict['data'] = _items
+ # set to None if object (nullable) is None
+ # and model_fields_set contains the field
+ if self.object is None and "object" in self.model_fields_set:
+ _dict['object'] = None
+
+ # set to None if data_ref (nullable) is None
+ # and model_fields_set contains the field
+ if self.data_ref is None and "data_ref" in self.model_fields_set:
+ _dict['data_ref'] = None
+
+ # set to None if data (nullable) is None
+ # and model_fields_set contains the field
+ if self.data is None and "data" in self.model_fields_set:
+ _dict['data'] = None
+
+ # set to None if total (nullable) is None
+ # and model_fields_set contains the field
+ if self.total is None and "total" in self.model_fields_set:
+ _dict['total'] = None
+
+ # set to None if has_more (nullable) is None
+ # and model_fields_set contains the field
+ if self.has_more is None and "has_more" in self.model_fields_set:
+ _dict['has_more'] = None
+
+ # set to None if more_starting_after (nullable) is None
+ # and model_fields_set contains the field
+ if self.more_starting_after is None and "more_starting_after" in self.model_fields_set:
+ _dict['more_starting_after'] = None
+
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of ReferralsMembersHoldersListResponseBody from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "object": obj.get("object") if obj.get("object") is not None else 'list',
+ "data_ref": obj.get("data_ref") if obj.get("data_ref") is not None else 'data',
+ "data": [RedeemableHolder.from_dict(_item) for _item in obj["data"]] if obj.get("data") is not None else None,
+ "total": obj.get("total"),
+ "has_more": obj.get("has_more"),
+ "more_starting_after": obj.get("more_starting_after")
+ })
+ return _obj
+
+
diff --git a/voucherify/models/reward_assignment_parameters_loyalty.py b/voucherify/models/reward_assignment_parameters_loyalty.py
index cd6020f4..5094b207 100644
--- a/voucherify/models/reward_assignment_parameters_loyalty.py
+++ b/voucherify/models/reward_assignment_parameters_loyalty.py
@@ -18,7 +18,7 @@
import re # noqa: F401
import json
-from pydantic import BaseModel, ConfigDict, Field, StrictInt
+from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt
from typing import Any, ClassVar, Dict, List, Optional
from typing import Optional, Set
from typing_extensions import Self
@@ -28,7 +28,8 @@ class RewardAssignmentParametersLoyalty(BaseModel):
Defines the equivalent points value of the reward.
""" # noqa: E501
points: Optional[StrictInt] = Field(default=None, description="The number of points required to redeem the reward.")
- __properties: ClassVar[List[str]] = ["points"]
+ auto_redeem: Optional[StrictBool] = Field(default=None, description="Determines if the reward is redeemed automatically when the customer reaches the sufficient number of points to redeem it. Value `true` means that the automatic reward redemption is active. Only one reward can be set to be redeemed automatically in a loyalty campaign, i.e. only one can have the value `true`.")
+ __properties: ClassVar[List[str]] = ["points", "auto_redeem"]
model_config = ConfigDict(
populate_by_name=True,
@@ -74,6 +75,11 @@ def to_dict(self) -> Dict[str, Any]:
if self.points is None and "points" in self.model_fields_set:
_dict['points'] = None
+ # set to None if auto_redeem (nullable) is None
+ # and model_fields_set contains the field
+ if self.auto_redeem is None and "auto_redeem" in self.model_fields_set:
+ _dict['auto_redeem'] = None
+
return _dict
@classmethod
@@ -86,7 +92,8 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
return cls.model_validate(obj)
_obj = cls.model_validate({
- "points": obj.get("points")
+ "points": obj.get("points"),
+ "auto_redeem": obj.get("auto_redeem")
})
return _obj
diff --git a/voucherify/models/rewards_assignments_create_request_body_parameters_loyalty.py b/voucherify/models/rewards_assignments_create_request_body_parameters_loyalty.py
index afd7b918..dc4ba70b 100644
--- a/voucherify/models/rewards_assignments_create_request_body_parameters_loyalty.py
+++ b/voucherify/models/rewards_assignments_create_request_body_parameters_loyalty.py
@@ -18,7 +18,7 @@
import re # noqa: F401
import json
-from pydantic import BaseModel, ConfigDict, Field
+from pydantic import BaseModel, ConfigDict, Field, StrictBool
from typing import Any, ClassVar, Dict, List, Optional
from typing_extensions import Annotated
from typing import Optional, Set
@@ -29,7 +29,8 @@ class RewardsAssignmentsCreateRequestBodyParametersLoyalty(BaseModel):
Defines the equivalent points value of the reward.
""" # noqa: E501
points: Optional[Annotated[int, Field(strict=True, ge=1)]] = Field(default=None, description="Number of points that will be subtracted from the loyalty card points balance if the reward is redeemed. Must be positive integer.")
- __properties: ClassVar[List[str]] = ["points"]
+ auto_redeem: Optional[StrictBool] = Field(default=None, description="Determines if the reward is redeemed automatically when the customer reaches the sufficient number of points to redeem it. Value `true` means that the automatic reward redemption is active. Only one reward can be set to be redeemed automatically in a loyalty campaign, i.e. only one can have the value `true`.")
+ __properties: ClassVar[List[str]] = ["points", "auto_redeem"]
model_config = ConfigDict(
populate_by_name=True,
@@ -75,6 +76,11 @@ def to_dict(self) -> Dict[str, Any]:
if self.points is None and "points" in self.model_fields_set:
_dict['points'] = None
+ # set to None if auto_redeem (nullable) is None
+ # and model_fields_set contains the field
+ if self.auto_redeem is None and "auto_redeem" in self.model_fields_set:
+ _dict['auto_redeem'] = None
+
return _dict
@classmethod
@@ -87,7 +93,8 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
return cls.model_validate(obj)
_obj = cls.model_validate({
- "points": obj.get("points")
+ "points": obj.get("points"),
+ "auto_redeem": obj.get("auto_redeem")
})
return _obj
diff --git a/voucherify/models/rewards_assignments_create_response_body.py b/voucherify/models/rewards_assignments_create_response_body.py
index 10e373cb..b50be43d 100644
--- a/voucherify/models/rewards_assignments_create_response_body.py
+++ b/voucherify/models/rewards_assignments_create_response_body.py
@@ -27,7 +27,7 @@
class RewardsAssignmentsCreateResponseBody(BaseModel):
"""
- Response body schema for **GET** `v1/rewards/{rewardId}/assignments/{assignmentId}`.
+ Response body schema for **POST** `v1/rewards/{rewardId}/assignments/`.
""" # noqa: E501
id: Optional[StrictStr] = Field(default=None, description="Unique reward assignment ID, assigned by Voucherify.")
reward_id: Optional[StrictStr] = Field(default=None, description="Associated reward ID.")
diff --git a/voucherify/models/rewards_assignments_create_response_body_parameters_loyalty.py b/voucherify/models/rewards_assignments_create_response_body_parameters_loyalty.py
index b840486e..f955b378 100644
--- a/voucherify/models/rewards_assignments_create_response_body_parameters_loyalty.py
+++ b/voucherify/models/rewards_assignments_create_response_body_parameters_loyalty.py
@@ -18,7 +18,7 @@
import re # noqa: F401
import json
-from pydantic import BaseModel, ConfigDict, Field, StrictInt
+from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt
from typing import Any, ClassVar, Dict, List, Optional
from typing import Optional, Set
from typing_extensions import Self
@@ -28,7 +28,8 @@ class RewardsAssignmentsCreateResponseBodyParametersLoyalty(BaseModel):
Defines the equivalent points value of the reward.
""" # noqa: E501
points: Optional[StrictInt] = Field(default=None, description="The number of points required to redeem the reward.")
- __properties: ClassVar[List[str]] = ["points"]
+ auto_redeem: Optional[StrictBool] = Field(default=None, description="Determines if the reward is redeemed automatically when the customer reaches the sufficient number of points to redeem it. Value `true` means that the automatic reward redemption is active. Only one reward can be set to be redeemed automatically in a loyalty campaign, i.e. only one can have the value `true`.")
+ __properties: ClassVar[List[str]] = ["points", "auto_redeem"]
model_config = ConfigDict(
populate_by_name=True,
@@ -74,6 +75,11 @@ def to_dict(self) -> Dict[str, Any]:
if self.points is None and "points" in self.model_fields_set:
_dict['points'] = None
+ # set to None if auto_redeem (nullable) is None
+ # and model_fields_set contains the field
+ if self.auto_redeem is None and "auto_redeem" in self.model_fields_set:
+ _dict['auto_redeem'] = None
+
return _dict
@classmethod
@@ -86,7 +92,8 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
return cls.model_validate(obj)
_obj = cls.model_validate({
- "points": obj.get("points")
+ "points": obj.get("points"),
+ "auto_redeem": obj.get("auto_redeem")
})
return _obj
diff --git a/voucherify/models/rewards_assignments_get_response_body_parameters_loyalty.py b/voucherify/models/rewards_assignments_get_response_body_parameters_loyalty.py
index afea0a27..f9e0ed25 100644
--- a/voucherify/models/rewards_assignments_get_response_body_parameters_loyalty.py
+++ b/voucherify/models/rewards_assignments_get_response_body_parameters_loyalty.py
@@ -18,7 +18,7 @@
import re # noqa: F401
import json
-from pydantic import BaseModel, ConfigDict, Field, StrictInt
+from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt
from typing import Any, ClassVar, Dict, List, Optional
from typing import Optional, Set
from typing_extensions import Self
@@ -28,7 +28,8 @@ class RewardsAssignmentsGetResponseBodyParametersLoyalty(BaseModel):
Defines the equivalent points value of the reward.
""" # noqa: E501
points: Optional[StrictInt] = Field(default=None, description="The number of points required to redeem the reward.")
- __properties: ClassVar[List[str]] = ["points"]
+ auto_redeem: Optional[StrictBool] = Field(default=None, description="Determines if the reward is redeemed automatically when the customer reaches the sufficient number of points to redeem it. Value `true` means that the automatic reward redemption is active. Only one reward can be set to be redeemed automatically in a loyalty campaign, i.e. only one can have the value `true`.")
+ __properties: ClassVar[List[str]] = ["points", "auto_redeem"]
model_config = ConfigDict(
populate_by_name=True,
@@ -74,6 +75,11 @@ def to_dict(self) -> Dict[str, Any]:
if self.points is None and "points" in self.model_fields_set:
_dict['points'] = None
+ # set to None if auto_redeem (nullable) is None
+ # and model_fields_set contains the field
+ if self.auto_redeem is None and "auto_redeem" in self.model_fields_set:
+ _dict['auto_redeem'] = None
+
return _dict
@classmethod
@@ -86,7 +92,8 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
return cls.model_validate(obj)
_obj = cls.model_validate({
- "points": obj.get("points")
+ "points": obj.get("points"),
+ "auto_redeem": obj.get("auto_redeem")
})
return _obj
diff --git a/voucherify/models/rewards_assignments_update_request_body_parameters_loyalty.py b/voucherify/models/rewards_assignments_update_request_body_parameters_loyalty.py
index 1943a14e..79c5ca5d 100644
--- a/voucherify/models/rewards_assignments_update_request_body_parameters_loyalty.py
+++ b/voucherify/models/rewards_assignments_update_request_body_parameters_loyalty.py
@@ -18,7 +18,7 @@
import re # noqa: F401
import json
-from pydantic import BaseModel, ConfigDict, Field, StrictInt
+from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt
from typing import Any, ClassVar, Dict, List, Optional
from typing import Optional, Set
from typing_extensions import Self
@@ -28,7 +28,8 @@ class RewardsAssignmentsUpdateRequestBodyParametersLoyalty(BaseModel):
Stores the points parameter.
""" # noqa: E501
points: Optional[StrictInt] = Field(default=None, description="Defines how many points are required to obtain the reward.")
- __properties: ClassVar[List[str]] = ["points"]
+ auto_redeem: Optional[StrictBool] = Field(default=None, description="Determines if the reward is redeemed automatically when the customer reaches the sufficient number of points to redeem it. Value `true` means that the automatic reward redemption is active. Only one reward can be set to be redeemed automatically in a loyalty campaign, i.e. only one can have the value `true`.")
+ __properties: ClassVar[List[str]] = ["points", "auto_redeem"]
model_config = ConfigDict(
populate_by_name=True,
@@ -74,6 +75,11 @@ def to_dict(self) -> Dict[str, Any]:
if self.points is None and "points" in self.model_fields_set:
_dict['points'] = None
+ # set to None if auto_redeem (nullable) is None
+ # and model_fields_set contains the field
+ if self.auto_redeem is None and "auto_redeem" in self.model_fields_set:
+ _dict['auto_redeem'] = None
+
return _dict
@classmethod
@@ -86,7 +92,8 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
return cls.model_validate(obj)
_obj = cls.model_validate({
- "points": obj.get("points")
+ "points": obj.get("points"),
+ "auto_redeem": obj.get("auto_redeem")
})
return _obj
diff --git a/voucherify/models/rewards_assignments_update_response_body.py b/voucherify/models/rewards_assignments_update_response_body.py
index 95977aa2..57cf15a8 100644
--- a/voucherify/models/rewards_assignments_update_response_body.py
+++ b/voucherify/models/rewards_assignments_update_response_body.py
@@ -27,7 +27,7 @@
class RewardsAssignmentsUpdateResponseBody(BaseModel):
"""
- Response body schema for **GET** `v1/rewards/{rewardId}/assignments/{assignmentId}`.
+ Response body schema for **PUT** `v1/rewards/{rewardId}/assignments/{assignmentId}`.
""" # noqa: E501
id: Optional[StrictStr] = Field(default=None, description="Unique reward assignment ID, assigned by Voucherify.")
reward_id: Optional[StrictStr] = Field(default=None, description="Associated reward ID.")
diff --git a/voucherify/models/rewards_assignments_update_response_body_parameters_loyalty.py b/voucherify/models/rewards_assignments_update_response_body_parameters_loyalty.py
index 4135d669..dad11f47 100644
--- a/voucherify/models/rewards_assignments_update_response_body_parameters_loyalty.py
+++ b/voucherify/models/rewards_assignments_update_response_body_parameters_loyalty.py
@@ -18,7 +18,7 @@
import re # noqa: F401
import json
-from pydantic import BaseModel, ConfigDict, Field, StrictInt
+from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt
from typing import Any, ClassVar, Dict, List, Optional
from typing import Optional, Set
from typing_extensions import Self
@@ -28,7 +28,8 @@ class RewardsAssignmentsUpdateResponseBodyParametersLoyalty(BaseModel):
Defines the equivalent points value of the reward.
""" # noqa: E501
points: Optional[StrictInt] = Field(default=None, description="The number of points required to redeem the reward.")
- __properties: ClassVar[List[str]] = ["points"]
+ auto_redeem: Optional[StrictBool] = Field(default=None, description="Determines if the reward is redeemed automatically when the customer reaches the sufficient number of points to redeem it. Value `true` means that the automatic reward redemption is active. Only one reward can be set to be redeemed automatically in a loyalty campaign, i.e. only one can have the value `true`.")
+ __properties: ClassVar[List[str]] = ["points", "auto_redeem"]
model_config = ConfigDict(
populate_by_name=True,
@@ -74,6 +75,11 @@ def to_dict(self) -> Dict[str, Any]:
if self.points is None and "points" in self.model_fields_set:
_dict['points'] = None
+ # set to None if auto_redeem (nullable) is None
+ # and model_fields_set contains the field
+ if self.auto_redeem is None and "auto_redeem" in self.model_fields_set:
+ _dict['auto_redeem'] = None
+
return _dict
@classmethod
@@ -86,7 +92,8 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
return cls.model_validate(obj)
_obj = cls.model_validate({
- "points": obj.get("points")
+ "points": obj.get("points"),
+ "auto_redeem": obj.get("auto_redeem")
})
return _obj
diff --git a/voucherify/models/stacking_rules.py b/voucherify/models/stacking_rules.py
index 002997c8..7ac86c1b 100644
--- a/voucherify/models/stacking_rules.py
+++ b/voucherify/models/stacking_rules.py
@@ -26,7 +26,7 @@
class StackingRules(BaseModel):
"""
- Defines stacking rules for redeemables. Read more in the [Help Center](https://support.voucherify.io/article/604-stacking-rules)
+ Defines stacking rules for redeemables. Read more in the [Stacking Rule Documentation](https://support.voucherify.io/article/604-stacking-rules).
""" # noqa: E501
redeemables_limit: Optional[Annotated[int, Field(le=30, strict=True, ge=1)]] = Field(default=30, description="Defines how many redeemables can be sent in one stacking request (note: more redeemables means more processing time!).")
applicable_redeemables_limit: Optional[Annotated[int, Field(le=30, strict=True, ge=1)]] = Field(default=5, description="Defines how many of the sent redeemables will be applied to the order. For example, a user can select 30 discounts but only 5 will be applied to the order and the remaining will be labelled as SKIPPED.")
diff --git a/voucherify/models/templates_campaigns_campaign_setup_create_request_body.py b/voucherify/models/templates_campaigns_campaign_setup_create_request_body.py
new file mode 100644
index 00000000..34e5ce59
--- /dev/null
+++ b/voucherify/models/templates_campaigns_campaign_setup_create_request_body.py
@@ -0,0 +1,224 @@
+# coding: utf-8
+
+"""
+ Voucherify API
+
+ Voucherify promotion engine REST API. Please see https://docs.voucherify.io/docs for more details.
+
+ The version of the OpenAPI document: v2018-08-01
+ Contact: support@voucherify.io
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from datetime import datetime
+from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, StrictStr, field_validator
+from typing import Any, ClassVar, Dict, List, Optional
+from voucherify.models.templates_campaigns_campaign_setup_create_request_body_voucher import TemplatesCampaignsCampaignSetupCreateRequestBodyVoucher
+from voucherify.models.validity_hours import ValidityHours
+from voucherify.models.validity_timeframe import ValidityTimeframe
+from typing import Optional, Set
+from typing_extensions import Self
+
+class TemplatesCampaignsCampaignSetupCreateRequestBody(BaseModel):
+ """
+ Request body schema for **POST** `/v1/templates/campaigns/{campaignTemplateId}/campaign-setup`.
+ """ # noqa: E501
+ name: Optional[StrictStr] = Field(default=None, description="Campaign name.")
+ description: Optional[StrictStr] = Field(default=None, description="An optional field to keep any extra textual information about the campaign such as a campaign description and details.")
+ type: Optional[StrictStr] = Field(default=None, description="Defines whether the campaign can be updated with new vouchers after campaign creation. - `AUTO_UPDATE`: By choosing the auto update option you will create a campaign that can be enhanced by new vouchers after the time of creation (e.g. by publish vouchers method). - `STATIC`: vouchers need to be manually published.")
+ join_once: Optional[StrictBool] = Field(default=None, description="If this value is set to `true`, customers will be able to join the campaign only once.")
+ auto_join: Optional[StrictBool] = Field(default=None, description="Indicates whether customers will be able to auto-join a loyalty campaign if any earning rule is fulfilled.")
+ use_voucher_metadata_schema: Optional[StrictBool] = Field(default=None, description="Flag indicating whether the campaign is to use the voucher's metadata schema instead of the campaign metadata schema.")
+ vouchers_count: Optional[StrictInt] = Field(default=None, description="Total number of unique vouchers in campaign (size of campaign).")
+ start_date: Optional[datetime] = Field(default=None, description="Activation timestamp defines when the campaign starts to be active in ISO 8601 format. Campaign is *inactive before* this date. ")
+ expiration_date: Optional[datetime] = Field(default=None, description="Expiration timestamp defines when the campaign expires in ISO 8601 format. Campaign is *inactive after* this date.")
+ validity_timeframe: Optional[ValidityTimeframe] = None
+ validity_day_of_week: Optional[List[StrictInt]] = Field(default=None, description="Integer array corresponding to the particular days of the week in which the voucher is valid. - `0` Sunday - `1` Monday - `2` Tuesday - `3` Wednesday - `4` Thursday - `5` Friday - `6` Saturday")
+ validity_hours: Optional[ValidityHours] = None
+ activity_duration_after_publishing: Optional[StrictStr] = Field(default=None, description="Defines the amount of time the vouchers will be active after publishing. The value is shown in the ISO 8601 format. For example, a voucher with the value of P24D will be valid for a duration of 24 days.")
+ category_id: Optional[StrictStr] = Field(default=None, description="Unique category ID that this campaign belongs to. Either pass this parameter OR the `category`.")
+ category: Optional[StrictStr] = Field(default=None, description="The category assigned to the campaign. Either pass this parameter OR the `category_id`.")
+ metadata: Optional[Dict[str, Any]] = Field(default=None, description="The metadata object stores all custom attributes assigned to the campaign. A set of key/value pairs that you can attach to a campaign object. It can be useful for storing additional information about the campaign in a structured format.")
+ voucher: Optional[TemplatesCampaignsCampaignSetupCreateRequestBodyVoucher] = None
+ __properties: ClassVar[List[str]] = ["name", "description", "type", "join_once", "auto_join", "use_voucher_metadata_schema", "vouchers_count", "start_date", "expiration_date", "validity_timeframe", "validity_day_of_week", "validity_hours", "activity_duration_after_publishing", "category_id", "category", "metadata", "voucher"]
+
+ @field_validator('type')
+ def type_validate_enum(cls, value):
+ """Validates the enum"""
+ if value is None:
+ return value
+
+ if value not in set(['AUTO_UPDATE', 'STATIC']):
+ raise ValueError("must be one of enum values ('AUTO_UPDATE', 'STATIC')")
+ return value
+
+ @field_validator('validity_day_of_week')
+ def validity_day_of_week_validate_enum(cls, value):
+ """Validates the enum"""
+ if value is None:
+ return value
+
+ for i in value:
+ if i not in set([0, 1, 2, 3, 4, 5, 6]):
+ raise ValueError("each list item must be one of (0, 1, 2, 3, 4, 5, 6)")
+ return value
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of TemplatesCampaignsCampaignSetupCreateRequestBody from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([
+ ])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ # override the default output from pydantic by calling `to_dict()` of validity_timeframe
+ if self.validity_timeframe:
+ _dict['validity_timeframe'] = self.validity_timeframe.to_dict()
+ # override the default output from pydantic by calling `to_dict()` of validity_hours
+ if self.validity_hours:
+ _dict['validity_hours'] = self.validity_hours.to_dict()
+ # override the default output from pydantic by calling `to_dict()` of voucher
+ if self.voucher:
+ _dict['voucher'] = self.voucher.to_dict()
+ # set to None if name (nullable) is None
+ # and model_fields_set contains the field
+ if self.name is None and "name" in self.model_fields_set:
+ _dict['name'] = None
+
+ # set to None if description (nullable) is None
+ # and model_fields_set contains the field
+ if self.description is None and "description" in self.model_fields_set:
+ _dict['description'] = None
+
+ # set to None if type (nullable) is None
+ # and model_fields_set contains the field
+ if self.type is None and "type" in self.model_fields_set:
+ _dict['type'] = None
+
+ # set to None if join_once (nullable) is None
+ # and model_fields_set contains the field
+ if self.join_once is None and "join_once" in self.model_fields_set:
+ _dict['join_once'] = None
+
+ # set to None if auto_join (nullable) is None
+ # and model_fields_set contains the field
+ if self.auto_join is None and "auto_join" in self.model_fields_set:
+ _dict['auto_join'] = None
+
+ # set to None if use_voucher_metadata_schema (nullable) is None
+ # and model_fields_set contains the field
+ if self.use_voucher_metadata_schema is None and "use_voucher_metadata_schema" in self.model_fields_set:
+ _dict['use_voucher_metadata_schema'] = None
+
+ # set to None if vouchers_count (nullable) is None
+ # and model_fields_set contains the field
+ if self.vouchers_count is None and "vouchers_count" in self.model_fields_set:
+ _dict['vouchers_count'] = None
+
+ # set to None if start_date (nullable) is None
+ # and model_fields_set contains the field
+ if self.start_date is None and "start_date" in self.model_fields_set:
+ _dict['start_date'] = None
+
+ # set to None if expiration_date (nullable) is None
+ # and model_fields_set contains the field
+ if self.expiration_date is None and "expiration_date" in self.model_fields_set:
+ _dict['expiration_date'] = None
+
+ # set to None if activity_duration_after_publishing (nullable) is None
+ # and model_fields_set contains the field
+ if self.activity_duration_after_publishing is None and "activity_duration_after_publishing" in self.model_fields_set:
+ _dict['activity_duration_after_publishing'] = None
+
+ # set to None if category_id (nullable) is None
+ # and model_fields_set contains the field
+ if self.category_id is None and "category_id" in self.model_fields_set:
+ _dict['category_id'] = None
+
+ # set to None if category (nullable) is None
+ # and model_fields_set contains the field
+ if self.category is None and "category" in self.model_fields_set:
+ _dict['category'] = None
+
+ # set to None if metadata (nullable) is None
+ # and model_fields_set contains the field
+ if self.metadata is None and "metadata" in self.model_fields_set:
+ _dict['metadata'] = None
+
+ # set to None if voucher (nullable) is None
+ # and model_fields_set contains the field
+ if self.voucher is None and "voucher" in self.model_fields_set:
+ _dict['voucher'] = None
+
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of TemplatesCampaignsCampaignSetupCreateRequestBody from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "name": obj.get("name"),
+ "description": obj.get("description"),
+ "type": obj.get("type"),
+ "join_once": obj.get("join_once"),
+ "auto_join": obj.get("auto_join"),
+ "use_voucher_metadata_schema": obj.get("use_voucher_metadata_schema"),
+ "vouchers_count": obj.get("vouchers_count"),
+ "start_date": obj.get("start_date"),
+ "expiration_date": obj.get("expiration_date"),
+ "validity_timeframe": ValidityTimeframe.from_dict(obj["validity_timeframe"]) if obj.get("validity_timeframe") is not None else None,
+ "validity_day_of_week": obj.get("validity_day_of_week"),
+ "validity_hours": ValidityHours.from_dict(obj["validity_hours"]) if obj.get("validity_hours") is not None else None,
+ "activity_duration_after_publishing": obj.get("activity_duration_after_publishing"),
+ "category_id": obj.get("category_id"),
+ "category": obj.get("category"),
+ "metadata": obj.get("metadata"),
+ "voucher": TemplatesCampaignsCampaignSetupCreateRequestBodyVoucher.from_dict(obj["voucher"]) if obj.get("voucher") is not None else None
+ })
+ return _obj
+
+
diff --git a/voucherify/models/templates_campaigns_campaign_setup_create_request_body_voucher.py b/voucherify/models/templates_campaigns_campaign_setup_create_request_body_voucher.py
new file mode 100644
index 00000000..b43ff745
--- /dev/null
+++ b/voucherify/models/templates_campaigns_campaign_setup_create_request_body_voucher.py
@@ -0,0 +1,103 @@
+# coding: utf-8
+
+"""
+ Voucherify API
+
+ Voucherify promotion engine REST API. Please see https://docs.voucherify.io/docs for more details.
+
+ The version of the OpenAPI document: v2018-08-01
+ Contact: support@voucherify.io
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict
+from typing import Any, ClassVar, Dict, List, Optional
+from voucherify.models.code_config import CodeConfig
+from voucherify.models.templates_campaigns_campaign_setup_create_request_body_voucher_redemption import TemplatesCampaignsCampaignSetupCreateRequestBodyVoucherRedemption
+from typing import Optional, Set
+from typing_extensions import Self
+
+class TemplatesCampaignsCampaignSetupCreateRequestBodyVoucher(BaseModel):
+ """
+
+ """ # noqa: E501
+ code_config: Optional[CodeConfig] = None
+ redemption: Optional[TemplatesCampaignsCampaignSetupCreateRequestBodyVoucherRedemption] = None
+ __properties: ClassVar[List[str]] = ["code_config", "redemption"]
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of TemplatesCampaignsCampaignSetupCreateRequestBodyVoucher from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([
+ ])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ # override the default output from pydantic by calling `to_dict()` of code_config
+ if self.code_config:
+ _dict['code_config'] = self.code_config.to_dict()
+ # override the default output from pydantic by calling `to_dict()` of redemption
+ if self.redemption:
+ _dict['redemption'] = self.redemption.to_dict()
+ # set to None if redemption (nullable) is None
+ # and model_fields_set contains the field
+ if self.redemption is None and "redemption" in self.model_fields_set:
+ _dict['redemption'] = None
+
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of TemplatesCampaignsCampaignSetupCreateRequestBodyVoucher from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "code_config": CodeConfig.from_dict(obj["code_config"]) if obj.get("code_config") is not None else None,
+ "redemption": TemplatesCampaignsCampaignSetupCreateRequestBodyVoucherRedemption.from_dict(obj["redemption"]) if obj.get("redemption") is not None else None
+ })
+ return _obj
+
+
diff --git a/voucherify/models/templates_campaigns_campaign_setup_create_request_body_voucher_redemption.py b/voucherify/models/templates_campaigns_campaign_setup_create_request_body_voucher_redemption.py
new file mode 100644
index 00000000..20b0eb3d
--- /dev/null
+++ b/voucherify/models/templates_campaigns_campaign_setup_create_request_body_voucher_redemption.py
@@ -0,0 +1,93 @@
+# coding: utf-8
+
+"""
+ Voucherify API
+
+ Voucherify promotion engine REST API. Please see https://docs.voucherify.io/docs for more details.
+
+ The version of the OpenAPI document: v2018-08-01
+ Contact: support@voucherify.io
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict, Field, StrictInt
+from typing import Any, ClassVar, Dict, List, Optional
+from typing import Optional, Set
+from typing_extensions import Self
+
+class TemplatesCampaignsCampaignSetupCreateRequestBodyVoucherRedemption(BaseModel):
+ """
+ Stores the quantity of redemptions that can be applied to the voucher.
+ """ # noqa: E501
+ quantity: Optional[StrictInt] = Field(default=None, description="How many times a voucher can be redeemed. A `null` value means unlimited.")
+ __properties: ClassVar[List[str]] = ["quantity"]
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of TemplatesCampaignsCampaignSetupCreateRequestBodyVoucherRedemption from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([
+ ])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ # set to None if quantity (nullable) is None
+ # and model_fields_set contains the field
+ if self.quantity is None and "quantity" in self.model_fields_set:
+ _dict['quantity'] = None
+
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of TemplatesCampaignsCampaignSetupCreateRequestBodyVoucherRedemption from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "quantity": obj.get("quantity")
+ })
+ return _obj
+
+
diff --git a/voucherify/models/templates_campaigns_campaign_setup_create_response_body.py b/voucherify/models/templates_campaigns_campaign_setup_create_response_body.py
new file mode 100644
index 00000000..533a5461
--- /dev/null
+++ b/voucherify/models/templates_campaigns_campaign_setup_create_response_body.py
@@ -0,0 +1,124 @@
+# coding: utf-8
+
+"""
+ Voucherify API
+
+ Voucherify promotion engine REST API. Please see https://docs.voucherify.io/docs for more details.
+
+ The version of the OpenAPI document: v2018-08-01
+ Contact: support@voucherify.io
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator
+from typing import Any, ClassVar, Dict, List, Optional
+from voucherify.models.campaign import Campaign
+from voucherify.models.templates_campaigns_campaign_setup_create_response_body_created_resources_item import TemplatesCampaignsCampaignSetupCreateResponseBodyCreatedResourcesItem
+from typing import Optional, Set
+from typing_extensions import Self
+
+class TemplatesCampaignsCampaignSetupCreateResponseBody(BaseModel):
+ """
+ Response body schema for **POST** `/v1/templates/campaigns/{campaignTemplateId}/campaign-setup`.
+ """ # noqa: E501
+ created_resources: Optional[List[TemplatesCampaignsCampaignSetupCreateResponseBodyCreatedResourcesItem]] = Field(default=None, description="Contains a list of resources that have been added to the project when the campaign has been created out of the template.")
+ campaign: Campaign
+ object: Optional[StrictStr] = Field(default='campaign_setup', description="The type of the object represented by JSON. This object stores information about the campaign created out of the campaign template.")
+ __properties: ClassVar[List[str]] = ["created_resources", "campaign", "object"]
+
+ @field_validator('object')
+ def object_validate_enum(cls, value):
+ """Validates the enum"""
+ if value is None:
+ return value
+
+ if value not in set(['campaign_setup']):
+ raise ValueError("must be one of enum values ('campaign_setup')")
+ return value
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of TemplatesCampaignsCampaignSetupCreateResponseBody from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([
+ ])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ # override the default output from pydantic by calling `to_dict()` of each item in created_resources (list)
+ _items = []
+ if self.created_resources:
+ for _item_created_resources in self.created_resources:
+ if _item_created_resources:
+ _items.append(_item_created_resources.to_dict())
+ _dict['created_resources'] = _items
+ # override the default output from pydantic by calling `to_dict()` of campaign
+ if self.campaign:
+ _dict['campaign'] = self.campaign.to_dict()
+ # set to None if created_resources (nullable) is None
+ # and model_fields_set contains the field
+ if self.created_resources is None and "created_resources" in self.model_fields_set:
+ _dict['created_resources'] = None
+
+ # set to None if object (nullable) is None
+ # and model_fields_set contains the field
+ if self.object is None and "object" in self.model_fields_set:
+ _dict['object'] = None
+
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of TemplatesCampaignsCampaignSetupCreateResponseBody from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "created_resources": [TemplatesCampaignsCampaignSetupCreateResponseBodyCreatedResourcesItem.from_dict(_item) for _item in obj["created_resources"]] if obj.get("created_resources") is not None else None,
+ "campaign": Campaign.from_dict(obj["campaign"]) if obj.get("campaign") is not None else None,
+ "object": obj.get("object") if obj.get("object") is not None else 'campaign_setup'
+ })
+ return _obj
+
+
diff --git a/voucherify/models/templates_campaigns_campaign_setup_create_response_body_created_resources_item.py b/voucherify/models/templates_campaigns_campaign_setup_create_response_body_created_resources_item.py
new file mode 100644
index 00000000..64cfc985
--- /dev/null
+++ b/voucherify/models/templates_campaigns_campaign_setup_create_response_body_created_resources_item.py
@@ -0,0 +1,100 @@
+# coding: utf-8
+
+"""
+ Voucherify API
+
+ Voucherify promotion engine REST API. Please see https://docs.voucherify.io/docs for more details.
+
+ The version of the OpenAPI document: v2018-08-01
+ Contact: support@voucherify.io
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator
+from typing import Any, ClassVar, Dict, List, Optional
+from typing import Optional, Set
+from typing_extensions import Self
+
+class TemplatesCampaignsCampaignSetupCreateResponseBodyCreatedResourcesItem(BaseModel):
+ """
+ TemplatesCampaignsCampaignSetupCreateResponseBodyCreatedResourcesItem
+ """ # noqa: E501
+ id: Optional[StrictStr] = Field(default=None, description="Unique identifier assigned to the created resource. It is assigned by Voucherify.")
+ object: Optional[StrictStr] = Field(default=None, description="The type of the created resource.")
+ __properties: ClassVar[List[str]] = ["id", "object"]
+
+ @field_validator('object')
+ def object_validate_enum(cls, value):
+ """Validates the enum"""
+ if value is None:
+ return value
+
+ if value not in set(['validation_rules', 'product', 'sku', 'products_collection', 'segments', 'location']):
+ raise ValueError("must be one of enum values ('validation_rules', 'product', 'sku', 'products_collection', 'segments', 'location')")
+ return value
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of TemplatesCampaignsCampaignSetupCreateResponseBodyCreatedResourcesItem from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([
+ ])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of TemplatesCampaignsCampaignSetupCreateResponseBodyCreatedResourcesItem from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "id": obj.get("id"),
+ "object": obj.get("object")
+ })
+ return _obj
+
+
diff --git a/voucherify/models/templates_campaigns_create_request_body.py b/voucherify/models/templates_campaigns_create_request_body.py
new file mode 100644
index 00000000..c809422d
--- /dev/null
+++ b/voucherify/models/templates_campaigns_create_request_body.py
@@ -0,0 +1,114 @@
+# coding: utf-8
+
+"""
+ Voucherify API
+
+ Voucherify promotion engine REST API. Please see https://docs.voucherify.io/docs for more details.
+
+ The version of the OpenAPI document: v2018-08-01
+ Contact: support@voucherify.io
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict, Field, StrictStr
+from typing import Any, ClassVar, Dict, List, Optional
+from typing import Optional, Set
+from typing_extensions import Self
+
+class TemplatesCampaignsCreateRequestBody(BaseModel):
+ """
+ Request body schema for **POST** `/templates/campaign`.
+ """ # noqa: E501
+ campaign_id: Optional[StrictStr] = Field(default=None, description="Unique identifier of the campaign that will create a template. It must be an ID of an existing discount or gift card campaign. It cannot be passed when `promotion_tier_id` has value. Required when the `promotion_tier_id` is not passed or it is `null`.")
+ promotion_tier_id: Optional[StrictStr] = Field(default=None, description="Unique identifier of the promotion tier that will create a template. It cannot be passed when `campaign_id` has value. Required when the `campaign_id` is not passed or it is `null`.")
+ name: Optional[StrictStr] = Field(default=None, description="User-defined name of the campaign template. It must be unique.")
+ description: Optional[StrictStr] = Field(default=None, description="User-defined description of the campaign template.")
+ __properties: ClassVar[List[str]] = ["campaign_id", "promotion_tier_id", "name", "description"]
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of TemplatesCampaignsCreateRequestBody from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([
+ ])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ # set to None if campaign_id (nullable) is None
+ # and model_fields_set contains the field
+ if self.campaign_id is None and "campaign_id" in self.model_fields_set:
+ _dict['campaign_id'] = None
+
+ # set to None if promotion_tier_id (nullable) is None
+ # and model_fields_set contains the field
+ if self.promotion_tier_id is None and "promotion_tier_id" in self.model_fields_set:
+ _dict['promotion_tier_id'] = None
+
+ # set to None if name (nullable) is None
+ # and model_fields_set contains the field
+ if self.name is None and "name" in self.model_fields_set:
+ _dict['name'] = None
+
+ # set to None if description (nullable) is None
+ # and model_fields_set contains the field
+ if self.description is None and "description" in self.model_fields_set:
+ _dict['description'] = None
+
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of TemplatesCampaignsCreateRequestBody from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "campaign_id": obj.get("campaign_id"),
+ "promotion_tier_id": obj.get("promotion_tier_id"),
+ "name": obj.get("name"),
+ "description": obj.get("description")
+ })
+ return _obj
+
+
diff --git a/voucherify/models/templates_campaigns_create_template_response_body.py b/voucherify/models/templates_campaigns_create_template_response_body.py
new file mode 100644
index 00000000..f5c37bd7
--- /dev/null
+++ b/voucherify/models/templates_campaigns_create_template_response_body.py
@@ -0,0 +1,149 @@
+# coding: utf-8
+
+"""
+ Voucherify API
+
+ Voucherify promotion engine REST API. Please see https://docs.voucherify.io/docs for more details.
+
+ The version of the OpenAPI document: v2018-08-01
+ Contact: support@voucherify.io
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from datetime import datetime
+from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator
+from typing import Any, ClassVar, Dict, List, Optional
+from typing import Optional, Set
+from typing_extensions import Self
+
+class TemplatesCampaignsCreateTemplateResponseBody(BaseModel):
+ """
+ Response body schema for **POST** `/v1/templates/campaigns`.
+ """ # noqa: E501
+ id: Optional[StrictStr] = Field(default=None, description="Unique identifier of the campaign template. It is assigned by Voucherify.")
+ name: Optional[StrictStr] = Field(default=None, description="User-defined name of the campaign template.")
+ description: Optional[StrictStr] = Field(default=None, description="User-defined description of the campaign template.")
+ campaign_type: Optional[StrictStr] = Field(default=None, description="Type of the campaign used to create the campaign template. Templates created from a promotion tier are converted to `DISCOUNT_COUPONS`.")
+ created_at: Optional[datetime] = Field(default=None, description="Timestamp representing the date and time when the campaign template was created. The value is shown in the ISO 8601 format.")
+ object: Optional[StrictStr] = Field(default='campaign_template', description="The type of the object represented by JSON.")
+ __properties: ClassVar[List[str]] = ["id", "name", "description", "campaign_type", "created_at", "object"]
+
+ @field_validator('campaign_type')
+ def campaign_type_validate_enum(cls, value):
+ """Validates the enum"""
+ if value is None:
+ return value
+
+ if value not in set(['DISCOUNT_COUPONS', 'GIFT_VOUCHERS']):
+ raise ValueError("must be one of enum values ('DISCOUNT_COUPONS', 'GIFT_VOUCHERS')")
+ return value
+
+ @field_validator('object')
+ def object_validate_enum(cls, value):
+ """Validates the enum"""
+ if value is None:
+ return value
+
+ if value not in set(['campaign_template']):
+ raise ValueError("must be one of enum values ('campaign_template')")
+ return value
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of TemplatesCampaignsCreateTemplateResponseBody from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([
+ ])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ # set to None if id (nullable) is None
+ # and model_fields_set contains the field
+ if self.id is None and "id" in self.model_fields_set:
+ _dict['id'] = None
+
+ # set to None if name (nullable) is None
+ # and model_fields_set contains the field
+ if self.name is None and "name" in self.model_fields_set:
+ _dict['name'] = None
+
+ # set to None if description (nullable) is None
+ # and model_fields_set contains the field
+ if self.description is None and "description" in self.model_fields_set:
+ _dict['description'] = None
+
+ # set to None if campaign_type (nullable) is None
+ # and model_fields_set contains the field
+ if self.campaign_type is None and "campaign_type" in self.model_fields_set:
+ _dict['campaign_type'] = None
+
+ # set to None if created_at (nullable) is None
+ # and model_fields_set contains the field
+ if self.created_at is None and "created_at" in self.model_fields_set:
+ _dict['created_at'] = None
+
+ # set to None if object (nullable) is None
+ # and model_fields_set contains the field
+ if self.object is None and "object" in self.model_fields_set:
+ _dict['object'] = None
+
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of TemplatesCampaignsCreateTemplateResponseBody from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "id": obj.get("id"),
+ "name": obj.get("name"),
+ "description": obj.get("description"),
+ "campaign_type": obj.get("campaign_type"),
+ "created_at": obj.get("created_at"),
+ "object": obj.get("object") if obj.get("object") is not None else 'campaign_template'
+ })
+ return _obj
+
+
diff --git a/voucherify/models/templates_campaigns_get_response_body.py b/voucherify/models/templates_campaigns_get_response_body.py
new file mode 100644
index 00000000..ced81b66
--- /dev/null
+++ b/voucherify/models/templates_campaigns_get_response_body.py
@@ -0,0 +1,156 @@
+# coding: utf-8
+
+"""
+ Voucherify API
+
+ Voucherify promotion engine REST API. Please see https://docs.voucherify.io/docs for more details.
+
+ The version of the OpenAPI document: v2018-08-01
+ Contact: support@voucherify.io
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from datetime import datetime
+from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator
+from typing import Any, ClassVar, Dict, List, Optional
+from typing import Optional, Set
+from typing_extensions import Self
+
+class TemplatesCampaignsGetResponseBody(BaseModel):
+ """
+ Response body schema for **GET** `/v1/templates/campaign/{campaignTemplateId}`.
+ """ # noqa: E501
+ id: Optional[StrictStr] = Field(default=None, description="Unique identifier of the campaign template. It is assigned by Voucherify.")
+ name: Optional[StrictStr] = Field(default=None, description="User-defined name of the campaign template.")
+ description: Optional[StrictStr] = Field(default=None, description="User-defined description of the campaign template.")
+ campaign_type: Optional[StrictStr] = Field(default=None, description="Type of the campaign used to create the campaign template. Templates created from a promotion tier are converted to `DISCOUNT_COUPONS`.")
+ created_at: Optional[datetime] = Field(default=None, description="Timestamp representing the date and time when the campaign template was created. The value is shown in the ISO 8601 format.")
+ object: Optional[StrictStr] = Field(default='campaign_template', description="The type of the object represented by JSON.")
+ updated_at: Optional[datetime] = Field(default=None, description="Timestamp representing the date and time when the campaign template was last updated. The value is shown in the ISO 8601 format.")
+ __properties: ClassVar[List[str]] = ["id", "name", "description", "campaign_type", "created_at", "object", "updated_at"]
+
+ @field_validator('campaign_type')
+ def campaign_type_validate_enum(cls, value):
+ """Validates the enum"""
+ if value is None:
+ return value
+
+ if value not in set(['DISCOUNT_COUPONS', 'GIFT_VOUCHERS']):
+ raise ValueError("must be one of enum values ('DISCOUNT_COUPONS', 'GIFT_VOUCHERS')")
+ return value
+
+ @field_validator('object')
+ def object_validate_enum(cls, value):
+ """Validates the enum"""
+ if value is None:
+ return value
+
+ if value not in set(['campaign_template']):
+ raise ValueError("must be one of enum values ('campaign_template')")
+ return value
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of TemplatesCampaignsGetResponseBody from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([
+ ])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ # set to None if id (nullable) is None
+ # and model_fields_set contains the field
+ if self.id is None and "id" in self.model_fields_set:
+ _dict['id'] = None
+
+ # set to None if name (nullable) is None
+ # and model_fields_set contains the field
+ if self.name is None and "name" in self.model_fields_set:
+ _dict['name'] = None
+
+ # set to None if description (nullable) is None
+ # and model_fields_set contains the field
+ if self.description is None and "description" in self.model_fields_set:
+ _dict['description'] = None
+
+ # set to None if campaign_type (nullable) is None
+ # and model_fields_set contains the field
+ if self.campaign_type is None and "campaign_type" in self.model_fields_set:
+ _dict['campaign_type'] = None
+
+ # set to None if created_at (nullable) is None
+ # and model_fields_set contains the field
+ if self.created_at is None and "created_at" in self.model_fields_set:
+ _dict['created_at'] = None
+
+ # set to None if object (nullable) is None
+ # and model_fields_set contains the field
+ if self.object is None and "object" in self.model_fields_set:
+ _dict['object'] = None
+
+ # set to None if updated_at (nullable) is None
+ # and model_fields_set contains the field
+ if self.updated_at is None and "updated_at" in self.model_fields_set:
+ _dict['updated_at'] = None
+
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of TemplatesCampaignsGetResponseBody from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "id": obj.get("id"),
+ "name": obj.get("name"),
+ "description": obj.get("description"),
+ "campaign_type": obj.get("campaign_type"),
+ "created_at": obj.get("created_at"),
+ "object": obj.get("object") if obj.get("object") is not None else 'campaign_template',
+ "updated_at": obj.get("updated_at")
+ })
+ return _obj
+
+
diff --git a/voucherify/models/templates_campaigns_list_response_body.py b/voucherify/models/templates_campaigns_list_response_body.py
new file mode 100644
index 00000000..50eee98e
--- /dev/null
+++ b/voucherify/models/templates_campaigns_list_response_body.py
@@ -0,0 +1,156 @@
+# coding: utf-8
+
+"""
+ Voucherify API
+
+ Voucherify promotion engine REST API. Please see https://docs.voucherify.io/docs for more details.
+
+ The version of the OpenAPI document: v2018-08-01
+ Contact: support@voucherify.io
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, StrictStr, field_validator
+from typing import Any, ClassVar, Dict, List, Optional
+from voucherify.models.campaign_template import CampaignTemplate
+from typing import Optional, Set
+from typing_extensions import Self
+
+class TemplatesCampaignsListResponseBody(BaseModel):
+ """
+ Response body schema for **GET** `/v1/templates/campaign`.
+ """ # noqa: E501
+ object: Optional[StrictStr] = Field(default='list', description="The type of the object represented by JSON. This object stores information about campaign templates.")
+ data_ref: Optional[StrictStr] = Field(default='data', description="Identifies the name of the JSON property that contains the array of campaign templates.")
+ data: Optional[List[CampaignTemplate]] = Field(default=None, description="Dictionary that contains an array of campaign templates.")
+ total: Optional[StrictInt] = Field(default=None, description="Total number of templates, regardless of the applied query parameters. Displayed only if the `include_total` query paremeter is set to `true`.")
+ has_more: Optional[StrictBool] = Field(default=None, description="As query results are always limited (by the limit parameter), the `has_more` flag indicates if there are more records for given filter parameters. This lets you know if you can run another request to get more records returned in the results.")
+ more_starting_after: Optional[StrictStr] = Field(default=None, description="Returns an ID that can be used to return another page of results. Use the template ID in the `starting_after_id` query parameter to display another page of the results starting after the template with that ID.")
+ __properties: ClassVar[List[str]] = ["object", "data_ref", "data", "total", "has_more", "more_starting_after"]
+
+ @field_validator('object')
+ def object_validate_enum(cls, value):
+ """Validates the enum"""
+ if value is None:
+ return value
+
+ if value not in set(['list']):
+ raise ValueError("must be one of enum values ('list')")
+ return value
+
+ @field_validator('data_ref')
+ def data_ref_validate_enum(cls, value):
+ """Validates the enum"""
+ if value is None:
+ return value
+
+ if value not in set(['data']):
+ raise ValueError("must be one of enum values ('data')")
+ return value
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of TemplatesCampaignsListResponseBody from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([
+ ])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ # override the default output from pydantic by calling `to_dict()` of each item in data (list)
+ _items = []
+ if self.data:
+ for _item_data in self.data:
+ if _item_data:
+ _items.append(_item_data.to_dict())
+ _dict['data'] = _items
+ # set to None if object (nullable) is None
+ # and model_fields_set contains the field
+ if self.object is None and "object" in self.model_fields_set:
+ _dict['object'] = None
+
+ # set to None if data_ref (nullable) is None
+ # and model_fields_set contains the field
+ if self.data_ref is None and "data_ref" in self.model_fields_set:
+ _dict['data_ref'] = None
+
+ # set to None if data (nullable) is None
+ # and model_fields_set contains the field
+ if self.data is None and "data" in self.model_fields_set:
+ _dict['data'] = None
+
+ # set to None if total (nullable) is None
+ # and model_fields_set contains the field
+ if self.total is None and "total" in self.model_fields_set:
+ _dict['total'] = None
+
+ # set to None if has_more (nullable) is None
+ # and model_fields_set contains the field
+ if self.has_more is None and "has_more" in self.model_fields_set:
+ _dict['has_more'] = None
+
+ # set to None if more_starting_after (nullable) is None
+ # and model_fields_set contains the field
+ if self.more_starting_after is None and "more_starting_after" in self.model_fields_set:
+ _dict['more_starting_after'] = None
+
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of TemplatesCampaignsListResponseBody from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "object": obj.get("object") if obj.get("object") is not None else 'list',
+ "data_ref": obj.get("data_ref") if obj.get("data_ref") is not None else 'data',
+ "data": [CampaignTemplate.from_dict(_item) for _item in obj["data"]] if obj.get("data") is not None else None,
+ "total": obj.get("total"),
+ "has_more": obj.get("has_more"),
+ "more_starting_after": obj.get("more_starting_after")
+ })
+ return _obj
+
+
diff --git a/voucherify/models/templates_campaigns_tier_setup_create_request_body.py b/voucherify/models/templates_campaigns_tier_setup_create_request_body.py
new file mode 100644
index 00000000..d3de2aca
--- /dev/null
+++ b/voucherify/models/templates_campaigns_tier_setup_create_request_body.py
@@ -0,0 +1,182 @@
+# coding: utf-8
+
+"""
+ Voucherify API
+
+ Voucherify promotion engine REST API. Please see https://docs.voucherify.io/docs for more details.
+
+ The version of the OpenAPI document: v2018-08-01
+ Contact: support@voucherify.io
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from datetime import datetime
+from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, StrictStr, field_validator
+from typing import Any, ClassVar, Dict, List, Optional
+from voucherify.models.validity_hours import ValidityHours
+from voucherify.models.validity_timeframe import ValidityTimeframe
+from typing import Optional, Set
+from typing_extensions import Self
+
+class TemplatesCampaignsTierSetupCreateRequestBody(BaseModel):
+ """
+ Request body schema for **POST** `/v1/templates/campaigns/{campaignTemplateId}/tier-setup`.
+ """ # noqa: E501
+ campaign_id: Optional[StrictStr] = Field(default=None, description="Unique campaign identifier, assigned by Voucherify. Defines the promotion campaign to which the promotion tier will be added.")
+ name: Optional[StrictStr] = Field(default=None, description="Name of the promotion tier.")
+ banner: Optional[StrictStr] = Field(default=None, description="Text to be displayed to your customers on your website.")
+ metadata: Optional[Dict[str, Any]] = Field(default=None, description="The metadata object stores all custom attributes assigned to the promotion tier. A set of key/value pairs that you can attach to a promotion tier object. It can be useful for storing additional information about the promotion tier in a structured format.")
+ hierarchy: Optional[StrictInt] = Field(default=None, description="The promotions hierarchy defines the order in which the discounts from different tiers will be applied to a customer's order. If a customer qualifies for discounts from more than one tier, discounts will be applied in the order defined in the hierarchy.")
+ active: Optional[StrictBool] = Field(default=None, description="A flag to toggle the promotion tier on or off. You can disable a promotion tier even though it's within the active period defined by the `start_date` and `expiration_date`. - `true` indicates an *active* promotion tier - `false` indicates an *inactive* promotion tier")
+ start_date: Optional[datetime] = Field(default=None, description="Activation timestamp defines when the promotion tier starts to be active in ISO 8601 format. Promotion tier is *inactive before* this date. ")
+ expiration_date: Optional[datetime] = Field(default=None, description="Activation timestamp defines when the promotion tier expires in ISO 8601 format. Promotion tier is *inactive after* this date. ")
+ validity_timeframe: Optional[ValidityTimeframe] = None
+ validity_day_of_week: Optional[List[StrictInt]] = Field(default=None, description="Integer array corresponding to the particular days of the week in which the voucher is valid. - `0` Sunday - `1` Monday - `2` Tuesday - `3` Wednesday - `4` Thursday - `5` Friday - `6` Saturday")
+ validity_hours: Optional[ValidityHours] = None
+ category: Optional[StrictStr] = Field(default=None, description="Assign a new or update the promotion tier's category using name.")
+ category_id: Optional[StrictStr] = Field(default=None, description="Assign a new or update the promotion tier's category using id")
+ __properties: ClassVar[List[str]] = ["campaign_id", "name", "banner", "metadata", "hierarchy", "active", "start_date", "expiration_date", "validity_timeframe", "validity_day_of_week", "validity_hours", "category", "category_id"]
+
+ @field_validator('validity_day_of_week')
+ def validity_day_of_week_validate_enum(cls, value):
+ """Validates the enum"""
+ if value is None:
+ return value
+
+ for i in value:
+ if i not in set([0, 1, 2, 3, 4, 5, 6]):
+ raise ValueError("each list item must be one of (0, 1, 2, 3, 4, 5, 6)")
+ return value
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of TemplatesCampaignsTierSetupCreateRequestBody from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([
+ ])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ # override the default output from pydantic by calling `to_dict()` of validity_timeframe
+ if self.validity_timeframe:
+ _dict['validity_timeframe'] = self.validity_timeframe.to_dict()
+ # override the default output from pydantic by calling `to_dict()` of validity_hours
+ if self.validity_hours:
+ _dict['validity_hours'] = self.validity_hours.to_dict()
+ # set to None if campaign_id (nullable) is None
+ # and model_fields_set contains the field
+ if self.campaign_id is None and "campaign_id" in self.model_fields_set:
+ _dict['campaign_id'] = None
+
+ # set to None if name (nullable) is None
+ # and model_fields_set contains the field
+ if self.name is None and "name" in self.model_fields_set:
+ _dict['name'] = None
+
+ # set to None if banner (nullable) is None
+ # and model_fields_set contains the field
+ if self.banner is None and "banner" in self.model_fields_set:
+ _dict['banner'] = None
+
+ # set to None if metadata (nullable) is None
+ # and model_fields_set contains the field
+ if self.metadata is None and "metadata" in self.model_fields_set:
+ _dict['metadata'] = None
+
+ # set to None if hierarchy (nullable) is None
+ # and model_fields_set contains the field
+ if self.hierarchy is None and "hierarchy" in self.model_fields_set:
+ _dict['hierarchy'] = None
+
+ # set to None if active (nullable) is None
+ # and model_fields_set contains the field
+ if self.active is None and "active" in self.model_fields_set:
+ _dict['active'] = None
+
+ # set to None if start_date (nullable) is None
+ # and model_fields_set contains the field
+ if self.start_date is None and "start_date" in self.model_fields_set:
+ _dict['start_date'] = None
+
+ # set to None if expiration_date (nullable) is None
+ # and model_fields_set contains the field
+ if self.expiration_date is None and "expiration_date" in self.model_fields_set:
+ _dict['expiration_date'] = None
+
+ # set to None if category (nullable) is None
+ # and model_fields_set contains the field
+ if self.category is None and "category" in self.model_fields_set:
+ _dict['category'] = None
+
+ # set to None if category_id (nullable) is None
+ # and model_fields_set contains the field
+ if self.category_id is None and "category_id" in self.model_fields_set:
+ _dict['category_id'] = None
+
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of TemplatesCampaignsTierSetupCreateRequestBody from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "campaign_id": obj.get("campaign_id"),
+ "name": obj.get("name"),
+ "banner": obj.get("banner"),
+ "metadata": obj.get("metadata"),
+ "hierarchy": obj.get("hierarchy"),
+ "active": obj.get("active"),
+ "start_date": obj.get("start_date"),
+ "expiration_date": obj.get("expiration_date"),
+ "validity_timeframe": ValidityTimeframe.from_dict(obj["validity_timeframe"]) if obj.get("validity_timeframe") is not None else None,
+ "validity_day_of_week": obj.get("validity_day_of_week"),
+ "validity_hours": ValidityHours.from_dict(obj["validity_hours"]) if obj.get("validity_hours") is not None else None,
+ "category": obj.get("category"),
+ "category_id": obj.get("category_id")
+ })
+ return _obj
+
+
diff --git a/voucherify/models/templates_campaigns_tier_setup_create_response_body.py b/voucherify/models/templates_campaigns_tier_setup_create_response_body.py
new file mode 100644
index 00000000..0a0f3649
--- /dev/null
+++ b/voucherify/models/templates_campaigns_tier_setup_create_response_body.py
@@ -0,0 +1,124 @@
+# coding: utf-8
+
+"""
+ Voucherify API
+
+ Voucherify promotion engine REST API. Please see https://docs.voucherify.io/docs for more details.
+
+ The version of the OpenAPI document: v2018-08-01
+ Contact: support@voucherify.io
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator
+from typing import Any, ClassVar, Dict, List, Optional
+from voucherify.models.promotion_tier import PromotionTier
+from voucherify.models.templates_campaigns_tier_setup_create_response_body_created_resources_item import TemplatesCampaignsTierSetupCreateResponseBodyCreatedResourcesItem
+from typing import Optional, Set
+from typing_extensions import Self
+
+class TemplatesCampaignsTierSetupCreateResponseBody(BaseModel):
+ """
+ Response body schema for **POST** `/v1/templates/campaigns/{campaignTemplateId}/tier-setup`.
+ """ # noqa: E501
+ created_resources: Optional[List[TemplatesCampaignsTierSetupCreateResponseBodyCreatedResourcesItem]] = Field(default=None, description="Contains a list of resources that have been added to the project when the promotion tier has been created out of the template.")
+ promotion_tier: Optional[PromotionTier] = None
+ object: Optional[StrictStr] = Field(default='promotion_tier_setup', description="The type of the object represented by JSON. This object stores information about the campaign created out of the campaign template.")
+ __properties: ClassVar[List[str]] = ["created_resources", "promotion_tier", "object"]
+
+ @field_validator('object')
+ def object_validate_enum(cls, value):
+ """Validates the enum"""
+ if value is None:
+ return value
+
+ if value not in set(['promotion_tier_setup']):
+ raise ValueError("must be one of enum values ('promotion_tier_setup')")
+ return value
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of TemplatesCampaignsTierSetupCreateResponseBody from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([
+ ])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ # override the default output from pydantic by calling `to_dict()` of each item in created_resources (list)
+ _items = []
+ if self.created_resources:
+ for _item_created_resources in self.created_resources:
+ if _item_created_resources:
+ _items.append(_item_created_resources.to_dict())
+ _dict['created_resources'] = _items
+ # override the default output from pydantic by calling `to_dict()` of promotion_tier
+ if self.promotion_tier:
+ _dict['promotion_tier'] = self.promotion_tier.to_dict()
+ # set to None if created_resources (nullable) is None
+ # and model_fields_set contains the field
+ if self.created_resources is None and "created_resources" in self.model_fields_set:
+ _dict['created_resources'] = None
+
+ # set to None if object (nullable) is None
+ # and model_fields_set contains the field
+ if self.object is None and "object" in self.model_fields_set:
+ _dict['object'] = None
+
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of TemplatesCampaignsTierSetupCreateResponseBody from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "created_resources": [TemplatesCampaignsTierSetupCreateResponseBodyCreatedResourcesItem.from_dict(_item) for _item in obj["created_resources"]] if obj.get("created_resources") is not None else None,
+ "promotion_tier": PromotionTier.from_dict(obj["promotion_tier"]) if obj.get("promotion_tier") is not None else None,
+ "object": obj.get("object") if obj.get("object") is not None else 'promotion_tier_setup'
+ })
+ return _obj
+
+
diff --git a/voucherify/models/templates_campaigns_tier_setup_create_response_body_created_resources_item.py b/voucherify/models/templates_campaigns_tier_setup_create_response_body_created_resources_item.py
new file mode 100644
index 00000000..1dd49411
--- /dev/null
+++ b/voucherify/models/templates_campaigns_tier_setup_create_response_body_created_resources_item.py
@@ -0,0 +1,100 @@
+# coding: utf-8
+
+"""
+ Voucherify API
+
+ Voucherify promotion engine REST API. Please see https://docs.voucherify.io/docs for more details.
+
+ The version of the OpenAPI document: v2018-08-01
+ Contact: support@voucherify.io
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator
+from typing import Any, ClassVar, Dict, List, Optional
+from typing import Optional, Set
+from typing_extensions import Self
+
+class TemplatesCampaignsTierSetupCreateResponseBodyCreatedResourcesItem(BaseModel):
+ """
+ TemplatesCampaignsTierSetupCreateResponseBodyCreatedResourcesItem
+ """ # noqa: E501
+ id: Optional[StrictStr] = Field(default=None, description="Unique identifier assigned to the created resource. It is assigned by Voucherify.")
+ object: Optional[StrictStr] = Field(default=None, description="The type of the created resource.")
+ __properties: ClassVar[List[str]] = ["id", "object"]
+
+ @field_validator('object')
+ def object_validate_enum(cls, value):
+ """Validates the enum"""
+ if value is None:
+ return value
+
+ if value not in set(['validation_rules', 'product', 'sku', 'products_collection', 'segments', 'location']):
+ raise ValueError("must be one of enum values ('validation_rules', 'product', 'sku', 'products_collection', 'segments', 'location')")
+ return value
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of TemplatesCampaignsTierSetupCreateResponseBodyCreatedResourcesItem from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([
+ ])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of TemplatesCampaignsTierSetupCreateResponseBodyCreatedResourcesItem from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "id": obj.get("id"),
+ "object": obj.get("object")
+ })
+ return _obj
+
+
diff --git a/voucherify/models/templates_campaigns_update_request_body.py b/voucherify/models/templates_campaigns_update_request_body.py
new file mode 100644
index 00000000..a16a78a6
--- /dev/null
+++ b/voucherify/models/templates_campaigns_update_request_body.py
@@ -0,0 +1,100 @@
+# coding: utf-8
+
+"""
+ Voucherify API
+
+ Voucherify promotion engine REST API. Please see https://docs.voucherify.io/docs for more details.
+
+ The version of the OpenAPI document: v2018-08-01
+ Contact: support@voucherify.io
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict, Field, StrictStr
+from typing import Any, ClassVar, Dict, List, Optional
+from typing import Optional, Set
+from typing_extensions import Self
+
+class TemplatesCampaignsUpdateRequestBody(BaseModel):
+ """
+ Request body schema for **PUT** `/templates/campaign/{campaignTemplateId}`.
+ """ # noqa: E501
+ name: Optional[StrictStr] = Field(default=None, description="User-defined name of the campaign template. It must be unique.")
+ description: Optional[StrictStr] = Field(default=None, description="User-defined description of the campaign template.")
+ __properties: ClassVar[List[str]] = ["name", "description"]
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of TemplatesCampaignsUpdateRequestBody from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([
+ ])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ # set to None if name (nullable) is None
+ # and model_fields_set contains the field
+ if self.name is None and "name" in self.model_fields_set:
+ _dict['name'] = None
+
+ # set to None if description (nullable) is None
+ # and model_fields_set contains the field
+ if self.description is None and "description" in self.model_fields_set:
+ _dict['description'] = None
+
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of TemplatesCampaignsUpdateRequestBody from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "name": obj.get("name"),
+ "description": obj.get("description")
+ })
+ return _obj
+
+
diff --git a/voucherify/models/templates_campaigns_update_response_body.py b/voucherify/models/templates_campaigns_update_response_body.py
new file mode 100644
index 00000000..10362661
--- /dev/null
+++ b/voucherify/models/templates_campaigns_update_response_body.py
@@ -0,0 +1,156 @@
+# coding: utf-8
+
+"""
+ Voucherify API
+
+ Voucherify promotion engine REST API. Please see https://docs.voucherify.io/docs for more details.
+
+ The version of the OpenAPI document: v2018-08-01
+ Contact: support@voucherify.io
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from datetime import datetime
+from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator
+from typing import Any, ClassVar, Dict, List, Optional
+from typing import Optional, Set
+from typing_extensions import Self
+
+class TemplatesCampaignsUpdateResponseBody(BaseModel):
+ """
+ Request body schema for **PUT** `/templates/campaign/{campaignTemplateId}`.
+ """ # noqa: E501
+ id: Optional[StrictStr] = Field(default=None, description="Unique identifier of the campaign template. It is assigned by Voucherify.")
+ name: Optional[StrictStr] = Field(default=None, description="User-defined name of the campaign template.")
+ description: Optional[StrictStr] = Field(default=None, description="User-defined description of the campaign template.")
+ campaign_type: Optional[StrictStr] = Field(default=None, description="Type of the campaign used to create the campaign template. Templates created from a promotion tier are converted to `DISCOUNT_COUPONS`.")
+ created_at: Optional[datetime] = Field(default=None, description="Timestamp representing the date and time when the campaign template was created. The value is shown in the ISO 8601 format.")
+ object: Optional[StrictStr] = Field(default='campaign_template', description="The type of the object represented by JSON.")
+ updated_at: Optional[datetime] = Field(default=None, description="Timestamp representing the date and time when the campaign template was last updated. The value is shown in the ISO 8601 format.")
+ __properties: ClassVar[List[str]] = ["id", "name", "description", "campaign_type", "created_at", "object", "updated_at"]
+
+ @field_validator('campaign_type')
+ def campaign_type_validate_enum(cls, value):
+ """Validates the enum"""
+ if value is None:
+ return value
+
+ if value not in set(['DISCOUNT_COUPONS', 'GIFT_VOUCHERS']):
+ raise ValueError("must be one of enum values ('DISCOUNT_COUPONS', 'GIFT_VOUCHERS')")
+ return value
+
+ @field_validator('object')
+ def object_validate_enum(cls, value):
+ """Validates the enum"""
+ if value is None:
+ return value
+
+ if value not in set(['campaign_template']):
+ raise ValueError("must be one of enum values ('campaign_template')")
+ return value
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of TemplatesCampaignsUpdateResponseBody from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([
+ ])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ # set to None if id (nullable) is None
+ # and model_fields_set contains the field
+ if self.id is None and "id" in self.model_fields_set:
+ _dict['id'] = None
+
+ # set to None if name (nullable) is None
+ # and model_fields_set contains the field
+ if self.name is None and "name" in self.model_fields_set:
+ _dict['name'] = None
+
+ # set to None if description (nullable) is None
+ # and model_fields_set contains the field
+ if self.description is None and "description" in self.model_fields_set:
+ _dict['description'] = None
+
+ # set to None if campaign_type (nullable) is None
+ # and model_fields_set contains the field
+ if self.campaign_type is None and "campaign_type" in self.model_fields_set:
+ _dict['campaign_type'] = None
+
+ # set to None if created_at (nullable) is None
+ # and model_fields_set contains the field
+ if self.created_at is None and "created_at" in self.model_fields_set:
+ _dict['created_at'] = None
+
+ # set to None if object (nullable) is None
+ # and model_fields_set contains the field
+ if self.object is None and "object" in self.model_fields_set:
+ _dict['object'] = None
+
+ # set to None if updated_at (nullable) is None
+ # and model_fields_set contains the field
+ if self.updated_at is None and "updated_at" in self.model_fields_set:
+ _dict['updated_at'] = None
+
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of TemplatesCampaignsUpdateResponseBody from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "id": obj.get("id"),
+ "name": obj.get("name"),
+ "description": obj.get("description"),
+ "campaign_type": obj.get("campaign_type"),
+ "created_at": obj.get("created_at"),
+ "object": obj.get("object") if obj.get("object") is not None else 'campaign_template',
+ "updated_at": obj.get("updated_at")
+ })
+ return _obj
+
+
diff --git a/voucherify/models/trash_bin_item.py b/voucherify/models/trash_bin_item.py
new file mode 100644
index 00000000..543325b6
--- /dev/null
+++ b/voucherify/models/trash_bin_item.py
@@ -0,0 +1,163 @@
+# coding: utf-8
+
+"""
+ Voucherify API
+
+ Voucherify promotion engine REST API. Please see https://docs.voucherify.io/docs for more details.
+
+ The version of the OpenAPI document: v2018-08-01
+ Contact: support@voucherify.io
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from datetime import datetime
+from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator
+from typing import Any, ClassVar, Dict, List, Optional
+from typing import Optional, Set
+from typing_extensions import Self
+
+class TrashBinItem(BaseModel):
+ """
+ Resource moved to the bin, i.e. a campaign, product, SKU, or voucher.
+ """ # noqa: E501
+ id: Optional[StrictStr] = Field(default=None, description="Unique identifier of the trash bin entry. It should not be confused with the ID of the resource moved to the bin.")
+ created_at: Optional[datetime] = Field(default=None, description="Timestamp representing the date and time when the resource was moved to the bin. The value for this parameter is shown in the ISO 8601 format.")
+ deleted_by_user_id: Optional[StrictStr] = Field(default=None, description="Unique identifier of the user who moved the resource to the bin. It returns a user ID if the resource was moved to the bin through an action in the website. It returns a `null` if the resource was deleted through the API.")
+ resource_id: Optional[StrictStr] = Field(default=None, description="Unique identifier of the resource moved to the bin, i.e. an ID of a campaign, product, SKU, or voucher.")
+ resource_type: Optional[StrictStr] = Field(default=None, description="Type of the resource moved to the bin.")
+ resource_name: Optional[StrictStr] = Field(default=None, description="Name of the resouce moved to the bin. It is the name of the campaign, product or SKU, or the voucher code.")
+ resource_parent_id: Optional[StrictStr] = Field(default=None, description="Unique identifier of the parent resource. For a voucher, it is a campaign ID, except for standalone vouchers. For an SKU, it is the product ID. It returns `null` for campaigns and base products.")
+ object: Optional[StrictStr] = Field(default=None, description="The type of the object represented by JSON. It is equal to the `resource_type`.")
+ __properties: ClassVar[List[str]] = ["id", "created_at", "deleted_by_user_id", "resource_id", "resource_type", "resource_name", "resource_parent_id", "object"]
+
+ @field_validator('resource_type')
+ def resource_type_validate_enum(cls, value):
+ """Validates the enum"""
+ if value is None:
+ return value
+
+ if value not in set(['campaign', 'product', 'sku', 'voucher']):
+ raise ValueError("must be one of enum values ('campaign', 'product', 'sku', 'voucher')")
+ return value
+
+ @field_validator('object')
+ def object_validate_enum(cls, value):
+ """Validates the enum"""
+ if value is None:
+ return value
+
+ if value not in set(['campaign', 'product', 'sku', 'voucher']):
+ raise ValueError("must be one of enum values ('campaign', 'product', 'sku', 'voucher')")
+ return value
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of TrashBinItem from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([
+ ])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ # set to None if id (nullable) is None
+ # and model_fields_set contains the field
+ if self.id is None and "id" in self.model_fields_set:
+ _dict['id'] = None
+
+ # set to None if created_at (nullable) is None
+ # and model_fields_set contains the field
+ if self.created_at is None and "created_at" in self.model_fields_set:
+ _dict['created_at'] = None
+
+ # set to None if deleted_by_user_id (nullable) is None
+ # and model_fields_set contains the field
+ if self.deleted_by_user_id is None and "deleted_by_user_id" in self.model_fields_set:
+ _dict['deleted_by_user_id'] = None
+
+ # set to None if resource_id (nullable) is None
+ # and model_fields_set contains the field
+ if self.resource_id is None and "resource_id" in self.model_fields_set:
+ _dict['resource_id'] = None
+
+ # set to None if resource_type (nullable) is None
+ # and model_fields_set contains the field
+ if self.resource_type is None and "resource_type" in self.model_fields_set:
+ _dict['resource_type'] = None
+
+ # set to None if resource_name (nullable) is None
+ # and model_fields_set contains the field
+ if self.resource_name is None and "resource_name" in self.model_fields_set:
+ _dict['resource_name'] = None
+
+ # set to None if resource_parent_id (nullable) is None
+ # and model_fields_set contains the field
+ if self.resource_parent_id is None and "resource_parent_id" in self.model_fields_set:
+ _dict['resource_parent_id'] = None
+
+ # set to None if object (nullable) is None
+ # and model_fields_set contains the field
+ if self.object is None and "object" in self.model_fields_set:
+ _dict['object'] = None
+
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of TrashBinItem from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "id": obj.get("id"),
+ "created_at": obj.get("created_at"),
+ "deleted_by_user_id": obj.get("deleted_by_user_id"),
+ "resource_id": obj.get("resource_id"),
+ "resource_type": obj.get("resource_type"),
+ "resource_name": obj.get("resource_name"),
+ "resource_parent_id": obj.get("resource_parent_id"),
+ "object": obj.get("object")
+ })
+ return _obj
+
+
diff --git a/voucherify/models/trash_bin_list_response_body.py b/voucherify/models/trash_bin_list_response_body.py
new file mode 100644
index 00000000..3fd99793
--- /dev/null
+++ b/voucherify/models/trash_bin_list_response_body.py
@@ -0,0 +1,156 @@
+# coding: utf-8
+
+"""
+ Voucherify API
+
+ Voucherify promotion engine REST API. Please see https://docs.voucherify.io/docs for more details.
+
+ The version of the OpenAPI document: v2018-08-01
+ Contact: support@voucherify.io
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, StrictStr, field_validator
+from typing import Any, ClassVar, Dict, List, Optional
+from voucherify.models.trash_bin_item import TrashBinItem
+from typing import Optional, Set
+from typing_extensions import Self
+
+class TrashBinListResponseBody(BaseModel):
+ """
+ Retrieves a list of the resources moved the bin.
+ """ # noqa: E501
+ object: Optional[StrictStr] = Field(default='list', description="The type of the object represented by JSON. This object stores information about the bin entries in a dictionary.")
+ data_ref: Optional[StrictStr] = Field(default='data', description="Identifies the name of the attribute that contains the array of bin entry objects.")
+ data: Optional[List[TrashBinItem]] = Field(default=None, description="Array of bin entry objects.")
+ total: Optional[StrictInt] = Field(default=None, description="The total number of bin entries. This is the number of the entries returned in the array, not the number of all matching results or all resources currently moved to the bin.")
+ has_more: Optional[StrictBool] = Field(default=None, description="As query results are always limited (by the limit parameter), the `has_more` flag indicates if there are more records for given filter parameters. This lets you know if you can run another request with a `starting_after_id` query or a different limit to get more records returned in the results.")
+ more_starting_after: Optional[StrictStr] = Field(default=None, description="If `has_more` is `true`, it returns an ID that can be used to return another page of results. Use the ID in the `starting_after_id` query parameter to display another page of the results occuring after the field with that ID.")
+ __properties: ClassVar[List[str]] = ["object", "data_ref", "data", "total", "has_more", "more_starting_after"]
+
+ @field_validator('object')
+ def object_validate_enum(cls, value):
+ """Validates the enum"""
+ if value is None:
+ return value
+
+ if value not in set(['list']):
+ raise ValueError("must be one of enum values ('list')")
+ return value
+
+ @field_validator('data_ref')
+ def data_ref_validate_enum(cls, value):
+ """Validates the enum"""
+ if value is None:
+ return value
+
+ if value not in set(['data']):
+ raise ValueError("must be one of enum values ('data')")
+ return value
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of TrashBinListResponseBody from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([
+ ])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ # override the default output from pydantic by calling `to_dict()` of each item in data (list)
+ _items = []
+ if self.data:
+ for _item_data in self.data:
+ if _item_data:
+ _items.append(_item_data.to_dict())
+ _dict['data'] = _items
+ # set to None if object (nullable) is None
+ # and model_fields_set contains the field
+ if self.object is None and "object" in self.model_fields_set:
+ _dict['object'] = None
+
+ # set to None if data_ref (nullable) is None
+ # and model_fields_set contains the field
+ if self.data_ref is None and "data_ref" in self.model_fields_set:
+ _dict['data_ref'] = None
+
+ # set to None if data (nullable) is None
+ # and model_fields_set contains the field
+ if self.data is None and "data" in self.model_fields_set:
+ _dict['data'] = None
+
+ # set to None if total (nullable) is None
+ # and model_fields_set contains the field
+ if self.total is None and "total" in self.model_fields_set:
+ _dict['total'] = None
+
+ # set to None if has_more (nullable) is None
+ # and model_fields_set contains the field
+ if self.has_more is None and "has_more" in self.model_fields_set:
+ _dict['has_more'] = None
+
+ # set to None if more_starting_after (nullable) is None
+ # and model_fields_set contains the field
+ if self.more_starting_after is None and "more_starting_after" in self.model_fields_set:
+ _dict['more_starting_after'] = None
+
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of TrashBinListResponseBody from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "object": obj.get("object") if obj.get("object") is not None else 'list',
+ "data_ref": obj.get("data_ref") if obj.get("data_ref") is not None else 'data',
+ "data": [TrashBinItem.from_dict(_item) for _item in obj["data"]] if obj.get("data") is not None else None,
+ "total": obj.get("total"),
+ "has_more": obj.get("has_more"),
+ "more_starting_after": obj.get("more_starting_after")
+ })
+ return _obj
+
+
diff --git a/voucherify/models/usage_notifications.py b/voucherify/models/usage_notifications.py
new file mode 100644
index 00000000..e70dfee9
--- /dev/null
+++ b/voucherify/models/usage_notifications.py
@@ -0,0 +1,115 @@
+# coding: utf-8
+
+"""
+ Voucherify API
+
+ Voucherify promotion engine REST API. Please see https://docs.voucherify.io/docs for more details.
+
+ The version of the OpenAPI document: v2018-08-01
+ Contact: support@voucherify.io
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr
+from typing import Any, ClassVar, Dict, List, Optional
+from typing_extensions import Annotated
+from typing import Optional, Set
+from typing_extensions import Self
+
+class UsageNotifications(BaseModel):
+ """
+ UsageNotifications
+ """ # noqa: E501
+ enabled: Optional[StrictBool] = Field(default=None, description="Enables the notification.")
+ value: Optional[Annotated[int, Field(le=90, strict=True, ge=10)]] = Field(default=None, description="The percent value of the limit which, when reached, triggers the notification.")
+ in_app: Optional[StrictBool] = Field(default=None, description="Enables the notification in the application.")
+ emails: Optional[List[StrictStr]] = Field(default=None, description="An array of email addresses which will receive the notification.")
+ __properties: ClassVar[List[str]] = ["enabled", "value", "in_app", "emails"]
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of UsageNotifications from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([
+ ])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ # set to None if enabled (nullable) is None
+ # and model_fields_set contains the field
+ if self.enabled is None and "enabled" in self.model_fields_set:
+ _dict['enabled'] = None
+
+ # set to None if value (nullable) is None
+ # and model_fields_set contains the field
+ if self.value is None and "value" in self.model_fields_set:
+ _dict['value'] = None
+
+ # set to None if in_app (nullable) is None
+ # and model_fields_set contains the field
+ if self.in_app is None and "in_app" in self.model_fields_set:
+ _dict['in_app'] = None
+
+ # set to None if emails (nullable) is None
+ # and model_fields_set contains the field
+ if self.emails is None and "emails" in self.model_fields_set:
+ _dict['emails'] = None
+
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of UsageNotifications from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "enabled": obj.get("enabled"),
+ "value": obj.get("value"),
+ "in_app": obj.get("in_app"),
+ "emails": obj.get("emails")
+ })
+ return _obj
+
+
diff --git a/voucherify/models/user.py b/voucherify/models/user.py
new file mode 100644
index 00000000..4bb5af71
--- /dev/null
+++ b/voucherify/models/user.py
@@ -0,0 +1,135 @@
+# coding: utf-8
+
+"""
+ Voucherify API
+
+ Voucherify promotion engine REST API. Please see https://docs.voucherify.io/docs for more details.
+
+ The version of the OpenAPI document: v2018-08-01
+ Contact: support@voucherify.io
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr
+from typing import Any, ClassVar, Dict, List, Optional
+from typing import Optional, Set
+from typing_extensions import Self
+
+class User(BaseModel):
+ """
+ Details about the user.
+ """ # noqa: E501
+ id: Optional[StrictStr] = Field(default=None, description="The unique identifier of the user who has been assigned to the project.")
+ login: Optional[StrictStr] = Field(default=None, description="The login data of the user who has been assigned to the project.")
+ email: Optional[StrictStr] = Field(default=None, description="The email address of the user who has been assigned to the project.")
+ first_name: Optional[StrictStr] = Field(default=None, description="The first name of the user who has been assigned to the project.")
+ last_name: Optional[StrictStr] = Field(default=None, description="The last name of the user who has been assigned to the project.")
+ projects: Optional[Dict[str, Any]] = Field(default=None, description="Lists key-value pairs, where the key is the project to which the user is assigned. The value is the role assigned in a given project. The predefined Voucherify roles are: `ADMIN`, `USER`, `VIEWER`, `MERCHANT`, `USER_RESTRICTED` (for the Areas and Stores, an Enterprise feature).")
+ is_owner: Optional[StrictBool] = Field(default=None, description="Determines if the user is the owner for the organization in Voucherify.")
+ __properties: ClassVar[List[str]] = ["id", "login", "email", "first_name", "last_name", "projects", "is_owner"]
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of User from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([
+ ])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ # set to None if id (nullable) is None
+ # and model_fields_set contains the field
+ if self.id is None and "id" in self.model_fields_set:
+ _dict['id'] = None
+
+ # set to None if login (nullable) is None
+ # and model_fields_set contains the field
+ if self.login is None and "login" in self.model_fields_set:
+ _dict['login'] = None
+
+ # set to None if email (nullable) is None
+ # and model_fields_set contains the field
+ if self.email is None and "email" in self.model_fields_set:
+ _dict['email'] = None
+
+ # set to None if first_name (nullable) is None
+ # and model_fields_set contains the field
+ if self.first_name is None and "first_name" in self.model_fields_set:
+ _dict['first_name'] = None
+
+ # set to None if last_name (nullable) is None
+ # and model_fields_set contains the field
+ if self.last_name is None and "last_name" in self.model_fields_set:
+ _dict['last_name'] = None
+
+ # set to None if projects (nullable) is None
+ # and model_fields_set contains the field
+ if self.projects is None and "projects" in self.model_fields_set:
+ _dict['projects'] = None
+
+ # set to None if is_owner (nullable) is None
+ # and model_fields_set contains the field
+ if self.is_owner is None and "is_owner" in self.model_fields_set:
+ _dict['is_owner'] = None
+
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of User from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "id": obj.get("id"),
+ "login": obj.get("login"),
+ "email": obj.get("email"),
+ "first_name": obj.get("first_name"),
+ "last_name": obj.get("last_name"),
+ "projects": obj.get("projects"),
+ "is_owner": obj.get("is_owner")
+ })
+ return _obj
+
+
diff --git a/voucherify/models/validation_rule.py b/voucherify/models/validation_rule.py
index c667c7dc..fa1f2dcc 100644
--- a/voucherify/models/validation_rule.py
+++ b/voucherify/models/validation_rule.py
@@ -35,7 +35,7 @@ class ValidationRule(BaseModel):
error: Optional[ValidationRuleError] = None
applicable_to: Optional[ValidationRuleApplicableTo] = None
type: Optional[StrictStr] = Field(default='expression', description="Type of validation rule.")
- context_type: Optional[StrictStr] = Field(default='global', description="Validation rule context type. | **Context Type** | **Definition** | |:---|:---| | earning_rule.order.paid | | | earning_rule.custom_event | | | earning_rule.customer.segment.entered | | | campaign.discount_coupons | | | campaign.discount_coupons.discount.apply_to_order | | | campaign.discount_coupons.discount.apply_to_items | | | campaign.discount_coupons.discount.apply_to_items_proportionally | | | campaign.discount_coupons.discount.apply_to_items_proportionally_by_quantity | | | campaign.discount_coupons.discount.fixed.apply_to_items | | | campaign.gift_vouchers | | | campaign.gift_vouchers.gift.apply_to_order | | | campaign.gift_vouchers.gift.apply_to_items | | | campaign.referral_program | | | campaign.referral_program.discount.apply_to_order | | | campaign.referral_program.discount.apply_to_items | | | campaign.referral_program.discount.apply_to_items_proportionally | | | campaign.referral_program.discount.apply_to_items_proportionally_by_quantity | | | campaign.referral_program.discount.fixed.apply_to_items | | | campaign.promotion | | | campaign.promotion.discount.apply_to_order | | | campaign.promotion.discount.apply_to_items | | | campaign.promotion.discount.apply_to_items_proportionally | | | campaign.promotion.discount.apply_to_items_proportionally_by_quantity | | | campaign.promotion.discount.fixed.apply_to_items | | | campaign.loyalty_program | | | campaign.lucky_draw | | | voucher.discount_voucher | | | voucher.discount_voucher.discount.apply_to_order | | | voucher.discount_voucher.discount.apply_to_items | | | voucher.discount_voucher.discount.apply_to_items_proportionally | | | voucher.discount_voucher.discount.apply_to_items_proportionally_by_quantity | | | voucher.discount_voucher.discount.fixed.apply_to_items | | | voucher.gift_voucher | | | voucher.gift_voucher.gift.apply_to_order | | | voucher.gift_voucher.gift.apply_to_items | | | voucher.loyalty_card | | | voucher.lucky_draw_code | | | distribution.custom_event | | | reward_assignment.pay_with_points | | | global | |")
+ context_type: Optional[StrictStr] = Field(default='global', description="Validation rule context type. | **Context Type** | **Definition** | |:---|:---| | earning_rule.order.paid | | | earning_rule.custom_event | | | earning_rule.customer.segment.entered | | | campaign.discount_coupons | | | campaign.discount_coupons.discount.apply_to_order | | | campaign.discount_coupons.discount.apply_to_items | | | campaign.discount_coupons.discount.apply_to_items_proportionally | | | campaign.discount_coupons.discount.apply_to_items_proportionally_by_quantity | | | campaign.discount_coupons.discount.fixed.apply_to_items | | | campaign.gift_vouchers | | | campaign.gift_vouchers.gift.apply_to_order | | | campaign.gift_vouchers.gift.apply_to_items | | | campaign.referral_program | | | campaign.referral_program.discount.apply_to_order | | | campaign.referral_program.discount.apply_to_items | | | campaign.referral_program.discount.apply_to_items_proportionally | | | campaign.referral_program.discount.apply_to_items_proportionally_by_quantity | | | campaign.referral_program.discount.fixed.apply_to_items | | | campaign.promotion | | | campaign.promotion.discount.apply_to_order | | | campaign.promotion.discount.apply_to_items | | | campaign.promotion.discount.apply_to_items_proportionally | | | campaign.promotion.discount.apply_to_items_proportionally_by_quantity | | | campaign.promotion.discount.fixed.apply_to_items | | | campaign.loyalty_program | | | voucher.discount_voucher | | | voucher.discount_voucher.discount.apply_to_order | | | voucher.discount_voucher.discount.apply_to_items | | | voucher.discount_voucher.discount.apply_to_items_proportionally | | | voucher.discount_voucher.discount.apply_to_items_proportionally_by_quantity | | | voucher.discount_voucher.discount.fixed.apply_to_items | | | voucher.gift_voucher | | | voucher.gift_voucher.gift.apply_to_order | | | voucher.gift_voucher.gift.apply_to_items | | | voucher.loyalty_card | | | distribution.custom_event | | | reward_assignment.pay_with_points | | | global | |")
id: Optional[StrictStr] = Field(default=None, description="Unique validation rule ID.")
created_at: Optional[datetime] = Field(default=None, description="Timestamp representing the date and time when the validation rule was created. The value is shown in the ISO 8601 format.")
updated_at: Optional[datetime] = Field(default=None, description="Timestamp representing the date and time when the validation rule was updated. The value is shown in the ISO 8601 format.")
@@ -59,8 +59,8 @@ def context_type_validate_enum(cls, value):
if value is None:
return value
- if value not in set(['earning_rule.order.paid', 'earning_rule.custom_event', 'earning_rule.customer.segment.entered', 'earning_rule.customer.tier.joined', 'earning_rule.customer.tier.left', 'earning_rule.customer.tier.upgraded', 'earning_rule.customer.tier.downgraded', 'earning_rule.customer.tier.prolonged', 'campaign.discount_coupons', 'campaign.discount_coupons.discount.apply_to_order', 'campaign.discount_coupons.discount.apply_to_items', 'campaign.discount_coupons.discount.apply_to_items_proportionally', 'campaign.discount_coupons.discount.apply_to_items_proportionally_by_quantity', 'campaign.discount_coupons.discount.apply_to_items_by_quantity', 'campaign.discount_coupons.discount.fixed.apply_to_items', 'campaign.discount_coupons.discount.percent.apply_to_items', 'campaign.gift_vouchers', 'campaign.gift_vouchers.gift.apply_to_order', 'campaign.gift_vouchers.gift.apply_to_items', 'campaign.referral_program', 'campaign.referral_program.discount.apply_to_order', 'campaign.referral_program.discount.apply_to_items', 'campaign.referral_program.discount.apply_to_items_proportionally', 'campaign.referral_program.discount.apply_to_items_proportionally_by_quantity', 'campaign.referral_program.discount.apply_to_items_by_quantity', 'campaign.referral_program.discount.fixed.apply_to_items', 'campaign.referral_program.discount.percent.apply_to_items', 'campaign.promotion', 'campaign.promotion.discount.apply_to_order', 'campaign.promotion.discount.apply_to_items', 'campaign.promotion.discount.apply_to_items_proportionally', 'campaign.promotion.discount.apply_to_items_proportionally_by_quantity', 'campaign.promotion.discount.apply_to_items_by_quantity', 'campaign.promotion.discount.fixed.apply_to_items', 'campaign.promotion.discount.percent.apply_to_items', 'campaign.loyalty_program', 'campaign.lucky_draw', 'voucher.discount_voucher', 'voucher.discount_voucher.discount.apply_to_order', 'voucher.discount_voucher.discount.apply_to_items', 'voucher.discount_voucher.discount.apply_to_items_proportionally', 'voucher.discount_voucher.discount.apply_to_items_proportionally_by_quantity', 'voucher.discount_voucher.discount.apply_to_items_by_quantity', 'voucher.discount_voucher.discount.fixed.apply_to_items', 'voucher.discount_voucher.discount.percent.apply_to_items', 'voucher.gift_voucher', 'voucher.gift_voucher.gift.apply_to_order', 'voucher.gift_voucher.gift.apply_to_items', 'voucher.loyalty_card', 'voucher.lucky_draw_code', 'distribution.custom_event', 'distribution.order.paid', 'distribution.order.created', 'distribution.order.canceled', 'distribution.order.updated', 'reward_assignment.pay_with_points', 'global']):
- raise ValueError("must be one of enum values ('earning_rule.order.paid', 'earning_rule.custom_event', 'earning_rule.customer.segment.entered', 'earning_rule.customer.tier.joined', 'earning_rule.customer.tier.left', 'earning_rule.customer.tier.upgraded', 'earning_rule.customer.tier.downgraded', 'earning_rule.customer.tier.prolonged', 'campaign.discount_coupons', 'campaign.discount_coupons.discount.apply_to_order', 'campaign.discount_coupons.discount.apply_to_items', 'campaign.discount_coupons.discount.apply_to_items_proportionally', 'campaign.discount_coupons.discount.apply_to_items_proportionally_by_quantity', 'campaign.discount_coupons.discount.apply_to_items_by_quantity', 'campaign.discount_coupons.discount.fixed.apply_to_items', 'campaign.discount_coupons.discount.percent.apply_to_items', 'campaign.gift_vouchers', 'campaign.gift_vouchers.gift.apply_to_order', 'campaign.gift_vouchers.gift.apply_to_items', 'campaign.referral_program', 'campaign.referral_program.discount.apply_to_order', 'campaign.referral_program.discount.apply_to_items', 'campaign.referral_program.discount.apply_to_items_proportionally', 'campaign.referral_program.discount.apply_to_items_proportionally_by_quantity', 'campaign.referral_program.discount.apply_to_items_by_quantity', 'campaign.referral_program.discount.fixed.apply_to_items', 'campaign.referral_program.discount.percent.apply_to_items', 'campaign.promotion', 'campaign.promotion.discount.apply_to_order', 'campaign.promotion.discount.apply_to_items', 'campaign.promotion.discount.apply_to_items_proportionally', 'campaign.promotion.discount.apply_to_items_proportionally_by_quantity', 'campaign.promotion.discount.apply_to_items_by_quantity', 'campaign.promotion.discount.fixed.apply_to_items', 'campaign.promotion.discount.percent.apply_to_items', 'campaign.loyalty_program', 'campaign.lucky_draw', 'voucher.discount_voucher', 'voucher.discount_voucher.discount.apply_to_order', 'voucher.discount_voucher.discount.apply_to_items', 'voucher.discount_voucher.discount.apply_to_items_proportionally', 'voucher.discount_voucher.discount.apply_to_items_proportionally_by_quantity', 'voucher.discount_voucher.discount.apply_to_items_by_quantity', 'voucher.discount_voucher.discount.fixed.apply_to_items', 'voucher.discount_voucher.discount.percent.apply_to_items', 'voucher.gift_voucher', 'voucher.gift_voucher.gift.apply_to_order', 'voucher.gift_voucher.gift.apply_to_items', 'voucher.loyalty_card', 'voucher.lucky_draw_code', 'distribution.custom_event', 'distribution.order.paid', 'distribution.order.created', 'distribution.order.canceled', 'distribution.order.updated', 'reward_assignment.pay_with_points', 'global')")
+ if value not in set(['earning_rule.order.paid', 'earning_rule.custom_event', 'earning_rule.customer.segment.entered', 'earning_rule.customer.tier.joined', 'earning_rule.customer.tier.left', 'earning_rule.customer.tier.upgraded', 'earning_rule.customer.tier.downgraded', 'earning_rule.customer.tier.prolonged', 'campaign.discount_coupons', 'campaign.discount_coupons.discount.apply_to_order', 'campaign.discount_coupons.discount.apply_to_items', 'campaign.discount_coupons.discount.apply_to_items_proportionally', 'campaign.discount_coupons.discount.apply_to_items_proportionally_by_quantity', 'campaign.discount_coupons.discount.apply_to_items_by_quantity', 'campaign.discount_coupons.discount.fixed.apply_to_items', 'campaign.discount_coupons.discount.percent.apply_to_items', 'campaign.gift_vouchers', 'campaign.gift_vouchers.gift.apply_to_order', 'campaign.gift_vouchers.gift.apply_to_items', 'campaign.referral_program', 'campaign.referral_program.discount.apply_to_order', 'campaign.referral_program.discount.apply_to_items', 'campaign.referral_program.discount.apply_to_items_proportionally', 'campaign.referral_program.discount.apply_to_items_proportionally_by_quantity', 'campaign.referral_program.discount.apply_to_items_by_quantity', 'campaign.referral_program.discount.fixed.apply_to_items', 'campaign.referral_program.discount.percent.apply_to_items', 'campaign.promotion', 'campaign.promotion.discount.apply_to_order', 'campaign.promotion.discount.apply_to_items', 'campaign.promotion.discount.apply_to_items_proportionally', 'campaign.promotion.discount.apply_to_items_proportionally_by_quantity', 'campaign.promotion.discount.apply_to_items_by_quantity', 'campaign.promotion.discount.fixed.apply_to_items', 'campaign.promotion.discount.percent.apply_to_items', 'campaign.loyalty_program', 'voucher.discount_voucher', 'voucher.discount_voucher.discount.apply_to_order', 'voucher.discount_voucher.discount.apply_to_items', 'voucher.discount_voucher.discount.apply_to_items_proportionally', 'voucher.discount_voucher.discount.apply_to_items_proportionally_by_quantity', 'voucher.discount_voucher.discount.apply_to_items_by_quantity', 'voucher.discount_voucher.discount.fixed.apply_to_items', 'voucher.discount_voucher.discount.percent.apply_to_items', 'voucher.gift_voucher', 'voucher.gift_voucher.gift.apply_to_order', 'voucher.gift_voucher.gift.apply_to_items', 'voucher.loyalty_card', 'distribution.custom_event', 'distribution.order.paid', 'distribution.order.created', 'distribution.order.canceled', 'distribution.order.updated', 'reward_assignment.pay_with_points', 'global']):
+ raise ValueError("must be one of enum values ('earning_rule.order.paid', 'earning_rule.custom_event', 'earning_rule.customer.segment.entered', 'earning_rule.customer.tier.joined', 'earning_rule.customer.tier.left', 'earning_rule.customer.tier.upgraded', 'earning_rule.customer.tier.downgraded', 'earning_rule.customer.tier.prolonged', 'campaign.discount_coupons', 'campaign.discount_coupons.discount.apply_to_order', 'campaign.discount_coupons.discount.apply_to_items', 'campaign.discount_coupons.discount.apply_to_items_proportionally', 'campaign.discount_coupons.discount.apply_to_items_proportionally_by_quantity', 'campaign.discount_coupons.discount.apply_to_items_by_quantity', 'campaign.discount_coupons.discount.fixed.apply_to_items', 'campaign.discount_coupons.discount.percent.apply_to_items', 'campaign.gift_vouchers', 'campaign.gift_vouchers.gift.apply_to_order', 'campaign.gift_vouchers.gift.apply_to_items', 'campaign.referral_program', 'campaign.referral_program.discount.apply_to_order', 'campaign.referral_program.discount.apply_to_items', 'campaign.referral_program.discount.apply_to_items_proportionally', 'campaign.referral_program.discount.apply_to_items_proportionally_by_quantity', 'campaign.referral_program.discount.apply_to_items_by_quantity', 'campaign.referral_program.discount.fixed.apply_to_items', 'campaign.referral_program.discount.percent.apply_to_items', 'campaign.promotion', 'campaign.promotion.discount.apply_to_order', 'campaign.promotion.discount.apply_to_items', 'campaign.promotion.discount.apply_to_items_proportionally', 'campaign.promotion.discount.apply_to_items_proportionally_by_quantity', 'campaign.promotion.discount.apply_to_items_by_quantity', 'campaign.promotion.discount.fixed.apply_to_items', 'campaign.promotion.discount.percent.apply_to_items', 'campaign.loyalty_program', 'voucher.discount_voucher', 'voucher.discount_voucher.discount.apply_to_order', 'voucher.discount_voucher.discount.apply_to_items', 'voucher.discount_voucher.discount.apply_to_items_proportionally', 'voucher.discount_voucher.discount.apply_to_items_proportionally_by_quantity', 'voucher.discount_voucher.discount.apply_to_items_by_quantity', 'voucher.discount_voucher.discount.fixed.apply_to_items', 'voucher.discount_voucher.discount.percent.apply_to_items', 'voucher.gift_voucher', 'voucher.gift_voucher.gift.apply_to_order', 'voucher.gift_voucher.gift.apply_to_items', 'voucher.loyalty_card', 'distribution.custom_event', 'distribution.order.paid', 'distribution.order.created', 'distribution.order.canceled', 'distribution.order.updated', 'reward_assignment.pay_with_points', 'global')")
return value
model_config = ConfigDict(
diff --git a/voucherify/models/validation_rules_create_request_body.py b/voucherify/models/validation_rules_create_request_body.py
index 8a39b33a..ee6b6d69 100644
--- a/voucherify/models/validation_rules_create_request_body.py
+++ b/voucherify/models/validation_rules_create_request_body.py
@@ -34,7 +34,7 @@ class ValidationRulesCreateRequestBody(BaseModel):
error: Optional[ValidationRulesCreateRequestBodyError] = None
applicable_to: Optional[ValidationRulesCreateRequestBodyApplicableTo] = None
type: Optional[StrictStr] = Field(default='expression', description="Type of validation rule.")
- context_type: Optional[StrictStr] = Field(default='global', description="Validation rule context type. | **Context Type** | **Definition** | |:---|:---| | earning_rule.order.paid | | | earning_rule.custom_event | | | earning_rule.customer.segment.entered | | | campaign.discount_coupons | | | campaign.discount_coupons.discount.apply_to_order | | | campaign.discount_coupons.discount.apply_to_items | | | campaign.discount_coupons.discount.apply_to_items_proportionally | | | campaign.discount_coupons.discount.apply_to_items_proportionally_by_quantity | | | campaign.discount_coupons.discount.fixed.apply_to_items | | | campaign.gift_vouchers | | | campaign.gift_vouchers.gift.apply_to_order | | | campaign.gift_vouchers.gift.apply_to_items | | | campaign.referral_program | | | campaign.referral_program.discount.apply_to_order | | | campaign.referral_program.discount.apply_to_items | | | campaign.referral_program.discount.apply_to_items_proportionally | | | campaign.referral_program.discount.apply_to_items_proportionally_by_quantity | | | campaign.referral_program.discount.fixed.apply_to_items | | | campaign.promotion | | | campaign.promotion.discount.apply_to_order | | | campaign.promotion.discount.apply_to_items | | | campaign.promotion.discount.apply_to_items_proportionally | | | campaign.promotion.discount.apply_to_items_proportionally_by_quantity | | | campaign.promotion.discount.fixed.apply_to_items | | | campaign.loyalty_program | | | campaign.lucky_draw | | | voucher.discount_voucher | | | voucher.discount_voucher.discount.apply_to_order | | | voucher.discount_voucher.discount.apply_to_items | | | voucher.discount_voucher.discount.apply_to_items_proportionally | | | voucher.discount_voucher.discount.apply_to_items_proportionally_by_quantity | | | voucher.discount_voucher.discount.fixed.apply_to_items | | | voucher.gift_voucher | | | voucher.gift_voucher.gift.apply_to_order | | | voucher.gift_voucher.gift.apply_to_items | | | voucher.loyalty_card | | | voucher.lucky_draw_code | | | distribution.custom_event | | | reward_assignment.pay_with_points | | | global | |")
+ context_type: Optional[StrictStr] = Field(default='global', description="Validation rule context type. | **Context Type** | **Definition** | |:---|:---| | earning_rule.order.paid | | | earning_rule.custom_event | | | earning_rule.customer.segment.entered | | | campaign.discount_coupons | | | campaign.discount_coupons.discount.apply_to_order | | | campaign.discount_coupons.discount.apply_to_items | | | campaign.discount_coupons.discount.apply_to_items_proportionally | | | campaign.discount_coupons.discount.apply_to_items_proportionally_by_quantity | | | campaign.discount_coupons.discount.fixed.apply_to_items | | | campaign.gift_vouchers | | | campaign.gift_vouchers.gift.apply_to_order | | | campaign.gift_vouchers.gift.apply_to_items | | | campaign.referral_program | | | campaign.referral_program.discount.apply_to_order | | | campaign.referral_program.discount.apply_to_items | | | campaign.referral_program.discount.apply_to_items_proportionally | | | campaign.referral_program.discount.apply_to_items_proportionally_by_quantity | | | campaign.referral_program.discount.fixed.apply_to_items | | | campaign.promotion | | | campaign.promotion.discount.apply_to_order | | | campaign.promotion.discount.apply_to_items | | | campaign.promotion.discount.apply_to_items_proportionally | | | campaign.promotion.discount.apply_to_items_proportionally_by_quantity | | | campaign.promotion.discount.fixed.apply_to_items | | | campaign.loyalty_program | | | voucher.discount_voucher | | | voucher.discount_voucher.discount.apply_to_order | | | voucher.discount_voucher.discount.apply_to_items | | | voucher.discount_voucher.discount.apply_to_items_proportionally | | | voucher.discount_voucher.discount.apply_to_items_proportionally_by_quantity | | | voucher.discount_voucher.discount.fixed.apply_to_items | | | voucher.gift_voucher | | | voucher.gift_voucher.gift.apply_to_order | | | voucher.gift_voucher.gift.apply_to_items | | | voucher.loyalty_card | | | distribution.custom_event | | | reward_assignment.pay_with_points | | | global | |")
__properties: ClassVar[List[str]] = ["name", "rules", "error", "applicable_to", "type", "context_type"]
@field_validator('type')
@@ -53,8 +53,8 @@ def context_type_validate_enum(cls, value):
if value is None:
return value
- if value not in set(['earning_rule.order.paid', 'earning_rule.custom_event', 'earning_rule.customer.segment.entered', 'earning_rule.customer.tier.joined', 'earning_rule.customer.tier.left', 'earning_rule.customer.tier.upgraded', 'earning_rule.customer.tier.downgraded', 'earning_rule.customer.tier.prolonged', 'campaign.discount_coupons', 'campaign.discount_coupons.discount.apply_to_order', 'campaign.discount_coupons.discount.apply_to_items', 'campaign.discount_coupons.discount.apply_to_items_proportionally', 'campaign.discount_coupons.discount.apply_to_items_proportionally_by_quantity', 'campaign.discount_coupons.discount.apply_to_items_by_quantity', 'campaign.discount_coupons.discount.fixed.apply_to_items', 'campaign.discount_coupons.discount.percent.apply_to_items', 'campaign.gift_vouchers', 'campaign.gift_vouchers.gift.apply_to_order', 'campaign.gift_vouchers.gift.apply_to_items', 'campaign.referral_program', 'campaign.referral_program.discount.apply_to_order', 'campaign.referral_program.discount.apply_to_items', 'campaign.referral_program.discount.apply_to_items_proportionally', 'campaign.referral_program.discount.apply_to_items_proportionally_by_quantity', 'campaign.referral_program.discount.apply_to_items_by_quantity', 'campaign.referral_program.discount.fixed.apply_to_items', 'campaign.referral_program.discount.percent.apply_to_items', 'campaign.promotion', 'campaign.promotion.discount.apply_to_order', 'campaign.promotion.discount.apply_to_items', 'campaign.promotion.discount.apply_to_items_proportionally', 'campaign.promotion.discount.apply_to_items_proportionally_by_quantity', 'campaign.promotion.discount.apply_to_items_by_quantity', 'campaign.promotion.discount.fixed.apply_to_items', 'campaign.promotion.discount.percent.apply_to_items', 'campaign.loyalty_program', 'campaign.lucky_draw', 'voucher.discount_voucher', 'voucher.discount_voucher.discount.apply_to_order', 'voucher.discount_voucher.discount.apply_to_items', 'voucher.discount_voucher.discount.apply_to_items_proportionally', 'voucher.discount_voucher.discount.apply_to_items_proportionally_by_quantity', 'voucher.discount_voucher.discount.apply_to_items_by_quantity', 'voucher.discount_voucher.discount.fixed.apply_to_items', 'voucher.discount_voucher.discount.percent.apply_to_items', 'voucher.gift_voucher', 'voucher.gift_voucher.gift.apply_to_order', 'voucher.gift_voucher.gift.apply_to_items', 'voucher.loyalty_card', 'voucher.lucky_draw_code', 'distribution.custom_event', 'distribution.order.paid', 'distribution.order.created', 'distribution.order.canceled', 'distribution.order.updated', 'reward_assignment.pay_with_points', 'global']):
- raise ValueError("must be one of enum values ('earning_rule.order.paid', 'earning_rule.custom_event', 'earning_rule.customer.segment.entered', 'earning_rule.customer.tier.joined', 'earning_rule.customer.tier.left', 'earning_rule.customer.tier.upgraded', 'earning_rule.customer.tier.downgraded', 'earning_rule.customer.tier.prolonged', 'campaign.discount_coupons', 'campaign.discount_coupons.discount.apply_to_order', 'campaign.discount_coupons.discount.apply_to_items', 'campaign.discount_coupons.discount.apply_to_items_proportionally', 'campaign.discount_coupons.discount.apply_to_items_proportionally_by_quantity', 'campaign.discount_coupons.discount.apply_to_items_by_quantity', 'campaign.discount_coupons.discount.fixed.apply_to_items', 'campaign.discount_coupons.discount.percent.apply_to_items', 'campaign.gift_vouchers', 'campaign.gift_vouchers.gift.apply_to_order', 'campaign.gift_vouchers.gift.apply_to_items', 'campaign.referral_program', 'campaign.referral_program.discount.apply_to_order', 'campaign.referral_program.discount.apply_to_items', 'campaign.referral_program.discount.apply_to_items_proportionally', 'campaign.referral_program.discount.apply_to_items_proportionally_by_quantity', 'campaign.referral_program.discount.apply_to_items_by_quantity', 'campaign.referral_program.discount.fixed.apply_to_items', 'campaign.referral_program.discount.percent.apply_to_items', 'campaign.promotion', 'campaign.promotion.discount.apply_to_order', 'campaign.promotion.discount.apply_to_items', 'campaign.promotion.discount.apply_to_items_proportionally', 'campaign.promotion.discount.apply_to_items_proportionally_by_quantity', 'campaign.promotion.discount.apply_to_items_by_quantity', 'campaign.promotion.discount.fixed.apply_to_items', 'campaign.promotion.discount.percent.apply_to_items', 'campaign.loyalty_program', 'campaign.lucky_draw', 'voucher.discount_voucher', 'voucher.discount_voucher.discount.apply_to_order', 'voucher.discount_voucher.discount.apply_to_items', 'voucher.discount_voucher.discount.apply_to_items_proportionally', 'voucher.discount_voucher.discount.apply_to_items_proportionally_by_quantity', 'voucher.discount_voucher.discount.apply_to_items_by_quantity', 'voucher.discount_voucher.discount.fixed.apply_to_items', 'voucher.discount_voucher.discount.percent.apply_to_items', 'voucher.gift_voucher', 'voucher.gift_voucher.gift.apply_to_order', 'voucher.gift_voucher.gift.apply_to_items', 'voucher.loyalty_card', 'voucher.lucky_draw_code', 'distribution.custom_event', 'distribution.order.paid', 'distribution.order.created', 'distribution.order.canceled', 'distribution.order.updated', 'reward_assignment.pay_with_points', 'global')")
+ if value not in set(['earning_rule.order.paid', 'earning_rule.custom_event', 'earning_rule.customer.segment.entered', 'earning_rule.customer.tier.joined', 'earning_rule.customer.tier.left', 'earning_rule.customer.tier.upgraded', 'earning_rule.customer.tier.downgraded', 'earning_rule.customer.tier.prolonged', 'campaign.discount_coupons', 'campaign.discount_coupons.discount.apply_to_order', 'campaign.discount_coupons.discount.apply_to_items', 'campaign.discount_coupons.discount.apply_to_items_proportionally', 'campaign.discount_coupons.discount.apply_to_items_proportionally_by_quantity', 'campaign.discount_coupons.discount.apply_to_items_by_quantity', 'campaign.discount_coupons.discount.fixed.apply_to_items', 'campaign.discount_coupons.discount.percent.apply_to_items', 'campaign.gift_vouchers', 'campaign.gift_vouchers.gift.apply_to_order', 'campaign.gift_vouchers.gift.apply_to_items', 'campaign.referral_program', 'campaign.referral_program.discount.apply_to_order', 'campaign.referral_program.discount.apply_to_items', 'campaign.referral_program.discount.apply_to_items_proportionally', 'campaign.referral_program.discount.apply_to_items_proportionally_by_quantity', 'campaign.referral_program.discount.apply_to_items_by_quantity', 'campaign.referral_program.discount.fixed.apply_to_items', 'campaign.referral_program.discount.percent.apply_to_items', 'campaign.promotion', 'campaign.promotion.discount.apply_to_order', 'campaign.promotion.discount.apply_to_items', 'campaign.promotion.discount.apply_to_items_proportionally', 'campaign.promotion.discount.apply_to_items_proportionally_by_quantity', 'campaign.promotion.discount.apply_to_items_by_quantity', 'campaign.promotion.discount.fixed.apply_to_items', 'campaign.promotion.discount.percent.apply_to_items', 'campaign.loyalty_program', 'voucher.discount_voucher', 'voucher.discount_voucher.discount.apply_to_order', 'voucher.discount_voucher.discount.apply_to_items', 'voucher.discount_voucher.discount.apply_to_items_proportionally', 'voucher.discount_voucher.discount.apply_to_items_proportionally_by_quantity', 'voucher.discount_voucher.discount.apply_to_items_by_quantity', 'voucher.discount_voucher.discount.fixed.apply_to_items', 'voucher.discount_voucher.discount.percent.apply_to_items', 'voucher.gift_voucher', 'voucher.gift_voucher.gift.apply_to_order', 'voucher.gift_voucher.gift.apply_to_items', 'voucher.loyalty_card', 'distribution.custom_event', 'distribution.order.paid', 'distribution.order.created', 'distribution.order.canceled', 'distribution.order.updated', 'reward_assignment.pay_with_points', 'global']):
+ raise ValueError("must be one of enum values ('earning_rule.order.paid', 'earning_rule.custom_event', 'earning_rule.customer.segment.entered', 'earning_rule.customer.tier.joined', 'earning_rule.customer.tier.left', 'earning_rule.customer.tier.upgraded', 'earning_rule.customer.tier.downgraded', 'earning_rule.customer.tier.prolonged', 'campaign.discount_coupons', 'campaign.discount_coupons.discount.apply_to_order', 'campaign.discount_coupons.discount.apply_to_items', 'campaign.discount_coupons.discount.apply_to_items_proportionally', 'campaign.discount_coupons.discount.apply_to_items_proportionally_by_quantity', 'campaign.discount_coupons.discount.apply_to_items_by_quantity', 'campaign.discount_coupons.discount.fixed.apply_to_items', 'campaign.discount_coupons.discount.percent.apply_to_items', 'campaign.gift_vouchers', 'campaign.gift_vouchers.gift.apply_to_order', 'campaign.gift_vouchers.gift.apply_to_items', 'campaign.referral_program', 'campaign.referral_program.discount.apply_to_order', 'campaign.referral_program.discount.apply_to_items', 'campaign.referral_program.discount.apply_to_items_proportionally', 'campaign.referral_program.discount.apply_to_items_proportionally_by_quantity', 'campaign.referral_program.discount.apply_to_items_by_quantity', 'campaign.referral_program.discount.fixed.apply_to_items', 'campaign.referral_program.discount.percent.apply_to_items', 'campaign.promotion', 'campaign.promotion.discount.apply_to_order', 'campaign.promotion.discount.apply_to_items', 'campaign.promotion.discount.apply_to_items_proportionally', 'campaign.promotion.discount.apply_to_items_proportionally_by_quantity', 'campaign.promotion.discount.apply_to_items_by_quantity', 'campaign.promotion.discount.fixed.apply_to_items', 'campaign.promotion.discount.percent.apply_to_items', 'campaign.loyalty_program', 'voucher.discount_voucher', 'voucher.discount_voucher.discount.apply_to_order', 'voucher.discount_voucher.discount.apply_to_items', 'voucher.discount_voucher.discount.apply_to_items_proportionally', 'voucher.discount_voucher.discount.apply_to_items_proportionally_by_quantity', 'voucher.discount_voucher.discount.apply_to_items_by_quantity', 'voucher.discount_voucher.discount.fixed.apply_to_items', 'voucher.discount_voucher.discount.percent.apply_to_items', 'voucher.gift_voucher', 'voucher.gift_voucher.gift.apply_to_order', 'voucher.gift_voucher.gift.apply_to_items', 'voucher.loyalty_card', 'distribution.custom_event', 'distribution.order.paid', 'distribution.order.created', 'distribution.order.canceled', 'distribution.order.updated', 'reward_assignment.pay_with_points', 'global')")
return value
model_config = ConfigDict(
diff --git a/voucherify/models/validation_rules_create_response_body.py b/voucherify/models/validation_rules_create_response_body.py
index 130ff2a8..93ce20b2 100644
--- a/voucherify/models/validation_rules_create_response_body.py
+++ b/voucherify/models/validation_rules_create_response_body.py
@@ -35,7 +35,7 @@ class ValidationRulesCreateResponseBody(BaseModel):
error: Optional[ValidationRulesCreateResponseBodyError] = None
applicable_to: Optional[ValidationRulesCreateResponseBodyApplicableTo] = None
type: Optional[StrictStr] = Field(default='expression', description="Type of validation rule.")
- context_type: Optional[StrictStr] = Field(default='global', description="Validation rule context type. | **Context Type** | **Definition** | |:---|:---| | earning_rule.order.paid | | | earning_rule.custom_event | | | earning_rule.customer.segment.entered | | | campaign.discount_coupons | | | campaign.discount_coupons.discount.apply_to_order | | | campaign.discount_coupons.discount.apply_to_items | | | campaign.discount_coupons.discount.apply_to_items_proportionally | | | campaign.discount_coupons.discount.apply_to_items_proportionally_by_quantity | | | campaign.discount_coupons.discount.fixed.apply_to_items | | | campaign.gift_vouchers | | | campaign.gift_vouchers.gift.apply_to_order | | | campaign.gift_vouchers.gift.apply_to_items | | | campaign.referral_program | | | campaign.referral_program.discount.apply_to_order | | | campaign.referral_program.discount.apply_to_items | | | campaign.referral_program.discount.apply_to_items_proportionally | | | campaign.referral_program.discount.apply_to_items_proportionally_by_quantity | | | campaign.referral_program.discount.fixed.apply_to_items | | | campaign.promotion | | | campaign.promotion.discount.apply_to_order | | | campaign.promotion.discount.apply_to_items | | | campaign.promotion.discount.apply_to_items_proportionally | | | campaign.promotion.discount.apply_to_items_proportionally_by_quantity | | | campaign.promotion.discount.fixed.apply_to_items | | | campaign.loyalty_program | | | campaign.lucky_draw | | | voucher.discount_voucher | | | voucher.discount_voucher.discount.apply_to_order | | | voucher.discount_voucher.discount.apply_to_items | | | voucher.discount_voucher.discount.apply_to_items_proportionally | | | voucher.discount_voucher.discount.apply_to_items_proportionally_by_quantity | | | voucher.discount_voucher.discount.fixed.apply_to_items | | | voucher.gift_voucher | | | voucher.gift_voucher.gift.apply_to_order | | | voucher.gift_voucher.gift.apply_to_items | | | voucher.loyalty_card | | | voucher.lucky_draw_code | | | distribution.custom_event | | | reward_assignment.pay_with_points | | | global | |")
+ context_type: Optional[StrictStr] = Field(default='global', description="Validation rule context type. | **Context Type** | **Definition** | |:---|:---| | earning_rule.order.paid | | | earning_rule.custom_event | | | earning_rule.customer.segment.entered | | | campaign.discount_coupons | | | campaign.discount_coupons.discount.apply_to_order | | | campaign.discount_coupons.discount.apply_to_items | | | campaign.discount_coupons.discount.apply_to_items_proportionally | | | campaign.discount_coupons.discount.apply_to_items_proportionally_by_quantity | | | campaign.discount_coupons.discount.fixed.apply_to_items | | | campaign.gift_vouchers | | | campaign.gift_vouchers.gift.apply_to_order | | | campaign.gift_vouchers.gift.apply_to_items | | | campaign.referral_program | | | campaign.referral_program.discount.apply_to_order | | | campaign.referral_program.discount.apply_to_items | | | campaign.referral_program.discount.apply_to_items_proportionally | | | campaign.referral_program.discount.apply_to_items_proportionally_by_quantity | | | campaign.referral_program.discount.fixed.apply_to_items | | | campaign.promotion | | | campaign.promotion.discount.apply_to_order | | | campaign.promotion.discount.apply_to_items | | | campaign.promotion.discount.apply_to_items_proportionally | | | campaign.promotion.discount.apply_to_items_proportionally_by_quantity | | | campaign.promotion.discount.fixed.apply_to_items | | | campaign.loyalty_program | | | voucher.discount_voucher | | | voucher.discount_voucher.discount.apply_to_order | | | voucher.discount_voucher.discount.apply_to_items | | | voucher.discount_voucher.discount.apply_to_items_proportionally | | | voucher.discount_voucher.discount.apply_to_items_proportionally_by_quantity | | | voucher.discount_voucher.discount.fixed.apply_to_items | | | voucher.gift_voucher | | | voucher.gift_voucher.gift.apply_to_order | | | voucher.gift_voucher.gift.apply_to_items | | | voucher.loyalty_card | | | distribution.custom_event | | | reward_assignment.pay_with_points | | | global | |")
id: Optional[StrictStr] = Field(default=None, description="Unique validation rule ID.")
created_at: Optional[datetime] = Field(default=None, description="Timestamp representing the date and time when the validation rule was created. The value is shown in the ISO 8601 format.")
updated_at: Optional[datetime] = Field(default=None, description="Timestamp representing the date and time when the validation rule was updated. The value is shown in the ISO 8601 format.")
@@ -59,8 +59,8 @@ def context_type_validate_enum(cls, value):
if value is None:
return value
- if value not in set(['earning_rule.order.paid', 'earning_rule.custom_event', 'earning_rule.customer.segment.entered', 'earning_rule.customer.tier.joined', 'earning_rule.customer.tier.left', 'earning_rule.customer.tier.upgraded', 'earning_rule.customer.tier.downgraded', 'earning_rule.customer.tier.prolonged', 'campaign.discount_coupons', 'campaign.discount_coupons.discount.apply_to_order', 'campaign.discount_coupons.discount.apply_to_items', 'campaign.discount_coupons.discount.apply_to_items_proportionally', 'campaign.discount_coupons.discount.apply_to_items_proportionally_by_quantity', 'campaign.discount_coupons.discount.apply_to_items_by_quantity', 'campaign.discount_coupons.discount.fixed.apply_to_items', 'campaign.discount_coupons.discount.percent.apply_to_items', 'campaign.gift_vouchers', 'campaign.gift_vouchers.gift.apply_to_order', 'campaign.gift_vouchers.gift.apply_to_items', 'campaign.referral_program', 'campaign.referral_program.discount.apply_to_order', 'campaign.referral_program.discount.apply_to_items', 'campaign.referral_program.discount.apply_to_items_proportionally', 'campaign.referral_program.discount.apply_to_items_proportionally_by_quantity', 'campaign.referral_program.discount.apply_to_items_by_quantity', 'campaign.referral_program.discount.fixed.apply_to_items', 'campaign.referral_program.discount.percent.apply_to_items', 'campaign.promotion', 'campaign.promotion.discount.apply_to_order', 'campaign.promotion.discount.apply_to_items', 'campaign.promotion.discount.apply_to_items_proportionally', 'campaign.promotion.discount.apply_to_items_proportionally_by_quantity', 'campaign.promotion.discount.apply_to_items_by_quantity', 'campaign.promotion.discount.fixed.apply_to_items', 'campaign.promotion.discount.percent.apply_to_items', 'campaign.loyalty_program', 'campaign.lucky_draw', 'voucher.discount_voucher', 'voucher.discount_voucher.discount.apply_to_order', 'voucher.discount_voucher.discount.apply_to_items', 'voucher.discount_voucher.discount.apply_to_items_proportionally', 'voucher.discount_voucher.discount.apply_to_items_proportionally_by_quantity', 'voucher.discount_voucher.discount.apply_to_items_by_quantity', 'voucher.discount_voucher.discount.fixed.apply_to_items', 'voucher.discount_voucher.discount.percent.apply_to_items', 'voucher.gift_voucher', 'voucher.gift_voucher.gift.apply_to_order', 'voucher.gift_voucher.gift.apply_to_items', 'voucher.loyalty_card', 'voucher.lucky_draw_code', 'distribution.custom_event', 'distribution.order.paid', 'distribution.order.created', 'distribution.order.canceled', 'distribution.order.updated', 'reward_assignment.pay_with_points', 'global']):
- raise ValueError("must be one of enum values ('earning_rule.order.paid', 'earning_rule.custom_event', 'earning_rule.customer.segment.entered', 'earning_rule.customer.tier.joined', 'earning_rule.customer.tier.left', 'earning_rule.customer.tier.upgraded', 'earning_rule.customer.tier.downgraded', 'earning_rule.customer.tier.prolonged', 'campaign.discount_coupons', 'campaign.discount_coupons.discount.apply_to_order', 'campaign.discount_coupons.discount.apply_to_items', 'campaign.discount_coupons.discount.apply_to_items_proportionally', 'campaign.discount_coupons.discount.apply_to_items_proportionally_by_quantity', 'campaign.discount_coupons.discount.apply_to_items_by_quantity', 'campaign.discount_coupons.discount.fixed.apply_to_items', 'campaign.discount_coupons.discount.percent.apply_to_items', 'campaign.gift_vouchers', 'campaign.gift_vouchers.gift.apply_to_order', 'campaign.gift_vouchers.gift.apply_to_items', 'campaign.referral_program', 'campaign.referral_program.discount.apply_to_order', 'campaign.referral_program.discount.apply_to_items', 'campaign.referral_program.discount.apply_to_items_proportionally', 'campaign.referral_program.discount.apply_to_items_proportionally_by_quantity', 'campaign.referral_program.discount.apply_to_items_by_quantity', 'campaign.referral_program.discount.fixed.apply_to_items', 'campaign.referral_program.discount.percent.apply_to_items', 'campaign.promotion', 'campaign.promotion.discount.apply_to_order', 'campaign.promotion.discount.apply_to_items', 'campaign.promotion.discount.apply_to_items_proportionally', 'campaign.promotion.discount.apply_to_items_proportionally_by_quantity', 'campaign.promotion.discount.apply_to_items_by_quantity', 'campaign.promotion.discount.fixed.apply_to_items', 'campaign.promotion.discount.percent.apply_to_items', 'campaign.loyalty_program', 'campaign.lucky_draw', 'voucher.discount_voucher', 'voucher.discount_voucher.discount.apply_to_order', 'voucher.discount_voucher.discount.apply_to_items', 'voucher.discount_voucher.discount.apply_to_items_proportionally', 'voucher.discount_voucher.discount.apply_to_items_proportionally_by_quantity', 'voucher.discount_voucher.discount.apply_to_items_by_quantity', 'voucher.discount_voucher.discount.fixed.apply_to_items', 'voucher.discount_voucher.discount.percent.apply_to_items', 'voucher.gift_voucher', 'voucher.gift_voucher.gift.apply_to_order', 'voucher.gift_voucher.gift.apply_to_items', 'voucher.loyalty_card', 'voucher.lucky_draw_code', 'distribution.custom_event', 'distribution.order.paid', 'distribution.order.created', 'distribution.order.canceled', 'distribution.order.updated', 'reward_assignment.pay_with_points', 'global')")
+ if value not in set(['earning_rule.order.paid', 'earning_rule.custom_event', 'earning_rule.customer.segment.entered', 'earning_rule.customer.tier.joined', 'earning_rule.customer.tier.left', 'earning_rule.customer.tier.upgraded', 'earning_rule.customer.tier.downgraded', 'earning_rule.customer.tier.prolonged', 'campaign.discount_coupons', 'campaign.discount_coupons.discount.apply_to_order', 'campaign.discount_coupons.discount.apply_to_items', 'campaign.discount_coupons.discount.apply_to_items_proportionally', 'campaign.discount_coupons.discount.apply_to_items_proportionally_by_quantity', 'campaign.discount_coupons.discount.apply_to_items_by_quantity', 'campaign.discount_coupons.discount.fixed.apply_to_items', 'campaign.discount_coupons.discount.percent.apply_to_items', 'campaign.gift_vouchers', 'campaign.gift_vouchers.gift.apply_to_order', 'campaign.gift_vouchers.gift.apply_to_items', 'campaign.referral_program', 'campaign.referral_program.discount.apply_to_order', 'campaign.referral_program.discount.apply_to_items', 'campaign.referral_program.discount.apply_to_items_proportionally', 'campaign.referral_program.discount.apply_to_items_proportionally_by_quantity', 'campaign.referral_program.discount.apply_to_items_by_quantity', 'campaign.referral_program.discount.fixed.apply_to_items', 'campaign.referral_program.discount.percent.apply_to_items', 'campaign.promotion', 'campaign.promotion.discount.apply_to_order', 'campaign.promotion.discount.apply_to_items', 'campaign.promotion.discount.apply_to_items_proportionally', 'campaign.promotion.discount.apply_to_items_proportionally_by_quantity', 'campaign.promotion.discount.apply_to_items_by_quantity', 'campaign.promotion.discount.fixed.apply_to_items', 'campaign.promotion.discount.percent.apply_to_items', 'campaign.loyalty_program', 'voucher.discount_voucher', 'voucher.discount_voucher.discount.apply_to_order', 'voucher.discount_voucher.discount.apply_to_items', 'voucher.discount_voucher.discount.apply_to_items_proportionally', 'voucher.discount_voucher.discount.apply_to_items_proportionally_by_quantity', 'voucher.discount_voucher.discount.apply_to_items_by_quantity', 'voucher.discount_voucher.discount.fixed.apply_to_items', 'voucher.discount_voucher.discount.percent.apply_to_items', 'voucher.gift_voucher', 'voucher.gift_voucher.gift.apply_to_order', 'voucher.gift_voucher.gift.apply_to_items', 'voucher.loyalty_card', 'distribution.custom_event', 'distribution.order.paid', 'distribution.order.created', 'distribution.order.canceled', 'distribution.order.updated', 'reward_assignment.pay_with_points', 'global']):
+ raise ValueError("must be one of enum values ('earning_rule.order.paid', 'earning_rule.custom_event', 'earning_rule.customer.segment.entered', 'earning_rule.customer.tier.joined', 'earning_rule.customer.tier.left', 'earning_rule.customer.tier.upgraded', 'earning_rule.customer.tier.downgraded', 'earning_rule.customer.tier.prolonged', 'campaign.discount_coupons', 'campaign.discount_coupons.discount.apply_to_order', 'campaign.discount_coupons.discount.apply_to_items', 'campaign.discount_coupons.discount.apply_to_items_proportionally', 'campaign.discount_coupons.discount.apply_to_items_proportionally_by_quantity', 'campaign.discount_coupons.discount.apply_to_items_by_quantity', 'campaign.discount_coupons.discount.fixed.apply_to_items', 'campaign.discount_coupons.discount.percent.apply_to_items', 'campaign.gift_vouchers', 'campaign.gift_vouchers.gift.apply_to_order', 'campaign.gift_vouchers.gift.apply_to_items', 'campaign.referral_program', 'campaign.referral_program.discount.apply_to_order', 'campaign.referral_program.discount.apply_to_items', 'campaign.referral_program.discount.apply_to_items_proportionally', 'campaign.referral_program.discount.apply_to_items_proportionally_by_quantity', 'campaign.referral_program.discount.apply_to_items_by_quantity', 'campaign.referral_program.discount.fixed.apply_to_items', 'campaign.referral_program.discount.percent.apply_to_items', 'campaign.promotion', 'campaign.promotion.discount.apply_to_order', 'campaign.promotion.discount.apply_to_items', 'campaign.promotion.discount.apply_to_items_proportionally', 'campaign.promotion.discount.apply_to_items_proportionally_by_quantity', 'campaign.promotion.discount.apply_to_items_by_quantity', 'campaign.promotion.discount.fixed.apply_to_items', 'campaign.promotion.discount.percent.apply_to_items', 'campaign.loyalty_program', 'voucher.discount_voucher', 'voucher.discount_voucher.discount.apply_to_order', 'voucher.discount_voucher.discount.apply_to_items', 'voucher.discount_voucher.discount.apply_to_items_proportionally', 'voucher.discount_voucher.discount.apply_to_items_proportionally_by_quantity', 'voucher.discount_voucher.discount.apply_to_items_by_quantity', 'voucher.discount_voucher.discount.fixed.apply_to_items', 'voucher.discount_voucher.discount.percent.apply_to_items', 'voucher.gift_voucher', 'voucher.gift_voucher.gift.apply_to_order', 'voucher.gift_voucher.gift.apply_to_items', 'voucher.loyalty_card', 'distribution.custom_event', 'distribution.order.paid', 'distribution.order.created', 'distribution.order.canceled', 'distribution.order.updated', 'reward_assignment.pay_with_points', 'global')")
return value
model_config = ConfigDict(
diff --git a/voucherify/models/validation_rules_get_response_body.py b/voucherify/models/validation_rules_get_response_body.py
index 3ad93fc6..d7b54313 100644
--- a/voucherify/models/validation_rules_get_response_body.py
+++ b/voucherify/models/validation_rules_get_response_body.py
@@ -35,7 +35,7 @@ class ValidationRulesGetResponseBody(BaseModel):
error: Optional[ValidationRulesGetResponseBodyError] = None
applicable_to: Optional[ValidationRulesGetResponseBodyApplicableTo] = None
type: Optional[StrictStr] = Field(default='expression', description="Type of validation rule.")
- context_type: Optional[StrictStr] = Field(default='global', description="Validation rule context type. | **Context Type** | **Definition** | |:---|:---| | earning_rule.order.paid | | | earning_rule.custom_event | | | earning_rule.customer.segment.entered | | | campaign.discount_coupons | | | campaign.discount_coupons.discount.apply_to_order | | | campaign.discount_coupons.discount.apply_to_items | | | campaign.discount_coupons.discount.apply_to_items_proportionally | | | campaign.discount_coupons.discount.apply_to_items_proportionally_by_quantity | | | campaign.discount_coupons.discount.fixed.apply_to_items | | | campaign.gift_vouchers | | | campaign.gift_vouchers.gift.apply_to_order | | | campaign.gift_vouchers.gift.apply_to_items | | | campaign.referral_program | | | campaign.referral_program.discount.apply_to_order | | | campaign.referral_program.discount.apply_to_items | | | campaign.referral_program.discount.apply_to_items_proportionally | | | campaign.referral_program.discount.apply_to_items_proportionally_by_quantity | | | campaign.referral_program.discount.fixed.apply_to_items | | | campaign.promotion | | | campaign.promotion.discount.apply_to_order | | | campaign.promotion.discount.apply_to_items | | | campaign.promotion.discount.apply_to_items_proportionally | | | campaign.promotion.discount.apply_to_items_proportionally_by_quantity | | | campaign.promotion.discount.fixed.apply_to_items | | | campaign.loyalty_program | | | campaign.lucky_draw | | | voucher.discount_voucher | | | voucher.discount_voucher.discount.apply_to_order | | | voucher.discount_voucher.discount.apply_to_items | | | voucher.discount_voucher.discount.apply_to_items_proportionally | | | voucher.discount_voucher.discount.apply_to_items_proportionally_by_quantity | | | voucher.discount_voucher.discount.fixed.apply_to_items | | | voucher.gift_voucher | | | voucher.gift_voucher.gift.apply_to_order | | | voucher.gift_voucher.gift.apply_to_items | | | voucher.loyalty_card | | | voucher.lucky_draw_code | | | distribution.custom_event | | | reward_assignment.pay_with_points | | | global | |")
+ context_type: Optional[StrictStr] = Field(default='global', description="Validation rule context type. | **Context Type** | **Definition** | |:---|:---| | earning_rule.order.paid | | | earning_rule.custom_event | | | earning_rule.customer.segment.entered | | | campaign.discount_coupons | | | campaign.discount_coupons.discount.apply_to_order | | | campaign.discount_coupons.discount.apply_to_items | | | campaign.discount_coupons.discount.apply_to_items_proportionally | | | campaign.discount_coupons.discount.apply_to_items_proportionally_by_quantity | | | campaign.discount_coupons.discount.fixed.apply_to_items | | | campaign.gift_vouchers | | | campaign.gift_vouchers.gift.apply_to_order | | | campaign.gift_vouchers.gift.apply_to_items | | | campaign.referral_program | | | campaign.referral_program.discount.apply_to_order | | | campaign.referral_program.discount.apply_to_items | | | campaign.referral_program.discount.apply_to_items_proportionally | | | campaign.referral_program.discount.apply_to_items_proportionally_by_quantity | | | campaign.referral_program.discount.fixed.apply_to_items | | | campaign.promotion | | | campaign.promotion.discount.apply_to_order | | | campaign.promotion.discount.apply_to_items | | | campaign.promotion.discount.apply_to_items_proportionally | | | campaign.promotion.discount.apply_to_items_proportionally_by_quantity | | | campaign.promotion.discount.fixed.apply_to_items | | | campaign.loyalty_program | | | voucher.discount_voucher | | | voucher.discount_voucher.discount.apply_to_order | | | voucher.discount_voucher.discount.apply_to_items | | | voucher.discount_voucher.discount.apply_to_items_proportionally | | | voucher.discount_voucher.discount.apply_to_items_proportionally_by_quantity | | | voucher.discount_voucher.discount.fixed.apply_to_items | | | voucher.gift_voucher | | | voucher.gift_voucher.gift.apply_to_order | | | voucher.gift_voucher.gift.apply_to_items | | | voucher.loyalty_card | | | distribution.custom_event | | | reward_assignment.pay_with_points | | | global | |")
id: Optional[StrictStr] = Field(default=None, description="Unique validation rule ID.")
created_at: Optional[datetime] = Field(default=None, description="Timestamp representing the date and time when the validation rule was created. The value is shown in the ISO 8601 format.")
updated_at: Optional[datetime] = Field(default=None, description="Timestamp representing the date and time when the validation rule was updated. The value is shown in the ISO 8601 format.")
@@ -59,8 +59,8 @@ def context_type_validate_enum(cls, value):
if value is None:
return value
- if value not in set(['earning_rule.order.paid', 'earning_rule.custom_event', 'earning_rule.customer.segment.entered', 'earning_rule.customer.tier.joined', 'earning_rule.customer.tier.left', 'earning_rule.customer.tier.upgraded', 'earning_rule.customer.tier.downgraded', 'earning_rule.customer.tier.prolonged', 'campaign.discount_coupons', 'campaign.discount_coupons.discount.apply_to_order', 'campaign.discount_coupons.discount.apply_to_items', 'campaign.discount_coupons.discount.apply_to_items_proportionally', 'campaign.discount_coupons.discount.apply_to_items_proportionally_by_quantity', 'campaign.discount_coupons.discount.apply_to_items_by_quantity', 'campaign.discount_coupons.discount.fixed.apply_to_items', 'campaign.discount_coupons.discount.percent.apply_to_items', 'campaign.gift_vouchers', 'campaign.gift_vouchers.gift.apply_to_order', 'campaign.gift_vouchers.gift.apply_to_items', 'campaign.referral_program', 'campaign.referral_program.discount.apply_to_order', 'campaign.referral_program.discount.apply_to_items', 'campaign.referral_program.discount.apply_to_items_proportionally', 'campaign.referral_program.discount.apply_to_items_proportionally_by_quantity', 'campaign.referral_program.discount.apply_to_items_by_quantity', 'campaign.referral_program.discount.fixed.apply_to_items', 'campaign.referral_program.discount.percent.apply_to_items', 'campaign.promotion', 'campaign.promotion.discount.apply_to_order', 'campaign.promotion.discount.apply_to_items', 'campaign.promotion.discount.apply_to_items_proportionally', 'campaign.promotion.discount.apply_to_items_proportionally_by_quantity', 'campaign.promotion.discount.apply_to_items_by_quantity', 'campaign.promotion.discount.fixed.apply_to_items', 'campaign.promotion.discount.percent.apply_to_items', 'campaign.loyalty_program', 'campaign.lucky_draw', 'voucher.discount_voucher', 'voucher.discount_voucher.discount.apply_to_order', 'voucher.discount_voucher.discount.apply_to_items', 'voucher.discount_voucher.discount.apply_to_items_proportionally', 'voucher.discount_voucher.discount.apply_to_items_proportionally_by_quantity', 'voucher.discount_voucher.discount.apply_to_items_by_quantity', 'voucher.discount_voucher.discount.fixed.apply_to_items', 'voucher.discount_voucher.discount.percent.apply_to_items', 'voucher.gift_voucher', 'voucher.gift_voucher.gift.apply_to_order', 'voucher.gift_voucher.gift.apply_to_items', 'voucher.loyalty_card', 'voucher.lucky_draw_code', 'distribution.custom_event', 'distribution.order.paid', 'distribution.order.created', 'distribution.order.canceled', 'distribution.order.updated', 'reward_assignment.pay_with_points', 'global']):
- raise ValueError("must be one of enum values ('earning_rule.order.paid', 'earning_rule.custom_event', 'earning_rule.customer.segment.entered', 'earning_rule.customer.tier.joined', 'earning_rule.customer.tier.left', 'earning_rule.customer.tier.upgraded', 'earning_rule.customer.tier.downgraded', 'earning_rule.customer.tier.prolonged', 'campaign.discount_coupons', 'campaign.discount_coupons.discount.apply_to_order', 'campaign.discount_coupons.discount.apply_to_items', 'campaign.discount_coupons.discount.apply_to_items_proportionally', 'campaign.discount_coupons.discount.apply_to_items_proportionally_by_quantity', 'campaign.discount_coupons.discount.apply_to_items_by_quantity', 'campaign.discount_coupons.discount.fixed.apply_to_items', 'campaign.discount_coupons.discount.percent.apply_to_items', 'campaign.gift_vouchers', 'campaign.gift_vouchers.gift.apply_to_order', 'campaign.gift_vouchers.gift.apply_to_items', 'campaign.referral_program', 'campaign.referral_program.discount.apply_to_order', 'campaign.referral_program.discount.apply_to_items', 'campaign.referral_program.discount.apply_to_items_proportionally', 'campaign.referral_program.discount.apply_to_items_proportionally_by_quantity', 'campaign.referral_program.discount.apply_to_items_by_quantity', 'campaign.referral_program.discount.fixed.apply_to_items', 'campaign.referral_program.discount.percent.apply_to_items', 'campaign.promotion', 'campaign.promotion.discount.apply_to_order', 'campaign.promotion.discount.apply_to_items', 'campaign.promotion.discount.apply_to_items_proportionally', 'campaign.promotion.discount.apply_to_items_proportionally_by_quantity', 'campaign.promotion.discount.apply_to_items_by_quantity', 'campaign.promotion.discount.fixed.apply_to_items', 'campaign.promotion.discount.percent.apply_to_items', 'campaign.loyalty_program', 'campaign.lucky_draw', 'voucher.discount_voucher', 'voucher.discount_voucher.discount.apply_to_order', 'voucher.discount_voucher.discount.apply_to_items', 'voucher.discount_voucher.discount.apply_to_items_proportionally', 'voucher.discount_voucher.discount.apply_to_items_proportionally_by_quantity', 'voucher.discount_voucher.discount.apply_to_items_by_quantity', 'voucher.discount_voucher.discount.fixed.apply_to_items', 'voucher.discount_voucher.discount.percent.apply_to_items', 'voucher.gift_voucher', 'voucher.gift_voucher.gift.apply_to_order', 'voucher.gift_voucher.gift.apply_to_items', 'voucher.loyalty_card', 'voucher.lucky_draw_code', 'distribution.custom_event', 'distribution.order.paid', 'distribution.order.created', 'distribution.order.canceled', 'distribution.order.updated', 'reward_assignment.pay_with_points', 'global')")
+ if value not in set(['earning_rule.order.paid', 'earning_rule.custom_event', 'earning_rule.customer.segment.entered', 'earning_rule.customer.tier.joined', 'earning_rule.customer.tier.left', 'earning_rule.customer.tier.upgraded', 'earning_rule.customer.tier.downgraded', 'earning_rule.customer.tier.prolonged', 'campaign.discount_coupons', 'campaign.discount_coupons.discount.apply_to_order', 'campaign.discount_coupons.discount.apply_to_items', 'campaign.discount_coupons.discount.apply_to_items_proportionally', 'campaign.discount_coupons.discount.apply_to_items_proportionally_by_quantity', 'campaign.discount_coupons.discount.apply_to_items_by_quantity', 'campaign.discount_coupons.discount.fixed.apply_to_items', 'campaign.discount_coupons.discount.percent.apply_to_items', 'campaign.gift_vouchers', 'campaign.gift_vouchers.gift.apply_to_order', 'campaign.gift_vouchers.gift.apply_to_items', 'campaign.referral_program', 'campaign.referral_program.discount.apply_to_order', 'campaign.referral_program.discount.apply_to_items', 'campaign.referral_program.discount.apply_to_items_proportionally', 'campaign.referral_program.discount.apply_to_items_proportionally_by_quantity', 'campaign.referral_program.discount.apply_to_items_by_quantity', 'campaign.referral_program.discount.fixed.apply_to_items', 'campaign.referral_program.discount.percent.apply_to_items', 'campaign.promotion', 'campaign.promotion.discount.apply_to_order', 'campaign.promotion.discount.apply_to_items', 'campaign.promotion.discount.apply_to_items_proportionally', 'campaign.promotion.discount.apply_to_items_proportionally_by_quantity', 'campaign.promotion.discount.apply_to_items_by_quantity', 'campaign.promotion.discount.fixed.apply_to_items', 'campaign.promotion.discount.percent.apply_to_items', 'campaign.loyalty_program', 'voucher.discount_voucher', 'voucher.discount_voucher.discount.apply_to_order', 'voucher.discount_voucher.discount.apply_to_items', 'voucher.discount_voucher.discount.apply_to_items_proportionally', 'voucher.discount_voucher.discount.apply_to_items_proportionally_by_quantity', 'voucher.discount_voucher.discount.apply_to_items_by_quantity', 'voucher.discount_voucher.discount.fixed.apply_to_items', 'voucher.discount_voucher.discount.percent.apply_to_items', 'voucher.gift_voucher', 'voucher.gift_voucher.gift.apply_to_order', 'voucher.gift_voucher.gift.apply_to_items', 'voucher.loyalty_card', 'distribution.custom_event', 'distribution.order.paid', 'distribution.order.created', 'distribution.order.canceled', 'distribution.order.updated', 'reward_assignment.pay_with_points', 'global']):
+ raise ValueError("must be one of enum values ('earning_rule.order.paid', 'earning_rule.custom_event', 'earning_rule.customer.segment.entered', 'earning_rule.customer.tier.joined', 'earning_rule.customer.tier.left', 'earning_rule.customer.tier.upgraded', 'earning_rule.customer.tier.downgraded', 'earning_rule.customer.tier.prolonged', 'campaign.discount_coupons', 'campaign.discount_coupons.discount.apply_to_order', 'campaign.discount_coupons.discount.apply_to_items', 'campaign.discount_coupons.discount.apply_to_items_proportionally', 'campaign.discount_coupons.discount.apply_to_items_proportionally_by_quantity', 'campaign.discount_coupons.discount.apply_to_items_by_quantity', 'campaign.discount_coupons.discount.fixed.apply_to_items', 'campaign.discount_coupons.discount.percent.apply_to_items', 'campaign.gift_vouchers', 'campaign.gift_vouchers.gift.apply_to_order', 'campaign.gift_vouchers.gift.apply_to_items', 'campaign.referral_program', 'campaign.referral_program.discount.apply_to_order', 'campaign.referral_program.discount.apply_to_items', 'campaign.referral_program.discount.apply_to_items_proportionally', 'campaign.referral_program.discount.apply_to_items_proportionally_by_quantity', 'campaign.referral_program.discount.apply_to_items_by_quantity', 'campaign.referral_program.discount.fixed.apply_to_items', 'campaign.referral_program.discount.percent.apply_to_items', 'campaign.promotion', 'campaign.promotion.discount.apply_to_order', 'campaign.promotion.discount.apply_to_items', 'campaign.promotion.discount.apply_to_items_proportionally', 'campaign.promotion.discount.apply_to_items_proportionally_by_quantity', 'campaign.promotion.discount.apply_to_items_by_quantity', 'campaign.promotion.discount.fixed.apply_to_items', 'campaign.promotion.discount.percent.apply_to_items', 'campaign.loyalty_program', 'voucher.discount_voucher', 'voucher.discount_voucher.discount.apply_to_order', 'voucher.discount_voucher.discount.apply_to_items', 'voucher.discount_voucher.discount.apply_to_items_proportionally', 'voucher.discount_voucher.discount.apply_to_items_proportionally_by_quantity', 'voucher.discount_voucher.discount.apply_to_items_by_quantity', 'voucher.discount_voucher.discount.fixed.apply_to_items', 'voucher.discount_voucher.discount.percent.apply_to_items', 'voucher.gift_voucher', 'voucher.gift_voucher.gift.apply_to_order', 'voucher.gift_voucher.gift.apply_to_items', 'voucher.loyalty_card', 'distribution.custom_event', 'distribution.order.paid', 'distribution.order.created', 'distribution.order.canceled', 'distribution.order.updated', 'reward_assignment.pay_with_points', 'global')")
return value
model_config = ConfigDict(
diff --git a/voucherify/models/validation_rules_update_request_body.py b/voucherify/models/validation_rules_update_request_body.py
index 7245966d..93eae92b 100644
--- a/voucherify/models/validation_rules_update_request_body.py
+++ b/voucherify/models/validation_rules_update_request_body.py
@@ -34,7 +34,7 @@ class ValidationRulesUpdateRequestBody(BaseModel):
error: Optional[ValidationRulesUpdateRequestBodyError] = None
applicable_to: Optional[ValidationRulesUpdateRequestBodyApplicableTo] = None
type: Optional[StrictStr] = Field(default='expression', description="Type of validation rule.")
- context_type: Optional[StrictStr] = Field(default='global', description="Validation rule context type. | **Context Type** | **Definition** | |:---|:---| | earning_rule.order.paid | | | earning_rule.custom_event | | | earning_rule.customer.segment.entered | | | campaign.discount_coupons | | | campaign.discount_coupons.discount.apply_to_order | | | campaign.discount_coupons.discount.apply_to_items | | | campaign.discount_coupons.discount.apply_to_items_proportionally | | | campaign.discount_coupons.discount.apply_to_items_proportionally_by_quantity | | | campaign.discount_coupons.discount.fixed.apply_to_items | | | campaign.gift_vouchers | | | campaign.gift_vouchers.gift.apply_to_order | | | campaign.gift_vouchers.gift.apply_to_items | | | campaign.referral_program | | | campaign.referral_program.discount.apply_to_order | | | campaign.referral_program.discount.apply_to_items | | | campaign.referral_program.discount.apply_to_items_proportionally | | | campaign.referral_program.discount.apply_to_items_proportionally_by_quantity | | | campaign.referral_program.discount.fixed.apply_to_items | | | campaign.promotion | | | campaign.promotion.discount.apply_to_order | | | campaign.promotion.discount.apply_to_items | | | campaign.promotion.discount.apply_to_items_proportionally | | | campaign.promotion.discount.apply_to_items_proportionally_by_quantity | | | campaign.promotion.discount.fixed.apply_to_items | | | campaign.loyalty_program | | | campaign.lucky_draw | | | voucher.discount_voucher | | | voucher.discount_voucher.discount.apply_to_order | | | voucher.discount_voucher.discount.apply_to_items | | | voucher.discount_voucher.discount.apply_to_items_proportionally | | | voucher.discount_voucher.discount.apply_to_items_proportionally_by_quantity | | | voucher.discount_voucher.discount.fixed.apply_to_items | | | voucher.gift_voucher | | | voucher.gift_voucher.gift.apply_to_order | | | voucher.gift_voucher.gift.apply_to_items | | | voucher.loyalty_card | | | voucher.lucky_draw_code | | | distribution.custom_event | | | reward_assignment.pay_with_points | | | global | |")
+ context_type: Optional[StrictStr] = Field(default='global', description="Validation rule context type. | **Context Type** | **Definition** | |:---|:---| | earning_rule.order.paid | | | earning_rule.custom_event | | | earning_rule.customer.segment.entered | | | campaign.discount_coupons | | | campaign.discount_coupons.discount.apply_to_order | | | campaign.discount_coupons.discount.apply_to_items | | | campaign.discount_coupons.discount.apply_to_items_proportionally | | | campaign.discount_coupons.discount.apply_to_items_proportionally_by_quantity | | | campaign.discount_coupons.discount.fixed.apply_to_items | | | campaign.gift_vouchers | | | campaign.gift_vouchers.gift.apply_to_order | | | campaign.gift_vouchers.gift.apply_to_items | | | campaign.referral_program | | | campaign.referral_program.discount.apply_to_order | | | campaign.referral_program.discount.apply_to_items | | | campaign.referral_program.discount.apply_to_items_proportionally | | | campaign.referral_program.discount.apply_to_items_proportionally_by_quantity | | | campaign.referral_program.discount.fixed.apply_to_items | | | campaign.promotion | | | campaign.promotion.discount.apply_to_order | | | campaign.promotion.discount.apply_to_items | | | campaign.promotion.discount.apply_to_items_proportionally | | | campaign.promotion.discount.apply_to_items_proportionally_by_quantity | | | campaign.promotion.discount.fixed.apply_to_items | | | campaign.loyalty_program | | | voucher.discount_voucher | | | voucher.discount_voucher.discount.apply_to_order | | | voucher.discount_voucher.discount.apply_to_items | | | voucher.discount_voucher.discount.apply_to_items_proportionally | | | voucher.discount_voucher.discount.apply_to_items_proportionally_by_quantity | | | voucher.discount_voucher.discount.fixed.apply_to_items | | | voucher.gift_voucher | | | voucher.gift_voucher.gift.apply_to_order | | | voucher.gift_voucher.gift.apply_to_items | | | voucher.loyalty_card | | | distribution.custom_event | | | reward_assignment.pay_with_points | | | global | |")
__properties: ClassVar[List[str]] = ["name", "rules", "error", "applicable_to", "type", "context_type"]
@field_validator('type')
@@ -53,8 +53,8 @@ def context_type_validate_enum(cls, value):
if value is None:
return value
- if value not in set(['earning_rule.order.paid', 'earning_rule.custom_event', 'earning_rule.customer.segment.entered', 'earning_rule.customer.tier.joined', 'earning_rule.customer.tier.left', 'earning_rule.customer.tier.upgraded', 'earning_rule.customer.tier.downgraded', 'earning_rule.customer.tier.prolonged', 'campaign.discount_coupons', 'campaign.discount_coupons.discount.apply_to_order', 'campaign.discount_coupons.discount.apply_to_items', 'campaign.discount_coupons.discount.apply_to_items_proportionally', 'campaign.discount_coupons.discount.apply_to_items_proportionally_by_quantity', 'campaign.discount_coupons.discount.apply_to_items_by_quantity', 'campaign.discount_coupons.discount.fixed.apply_to_items', 'campaign.discount_coupons.discount.percent.apply_to_items', 'campaign.gift_vouchers', 'campaign.gift_vouchers.gift.apply_to_order', 'campaign.gift_vouchers.gift.apply_to_items', 'campaign.referral_program', 'campaign.referral_program.discount.apply_to_order', 'campaign.referral_program.discount.apply_to_items', 'campaign.referral_program.discount.apply_to_items_proportionally', 'campaign.referral_program.discount.apply_to_items_proportionally_by_quantity', 'campaign.referral_program.discount.apply_to_items_by_quantity', 'campaign.referral_program.discount.fixed.apply_to_items', 'campaign.referral_program.discount.percent.apply_to_items', 'campaign.promotion', 'campaign.promotion.discount.apply_to_order', 'campaign.promotion.discount.apply_to_items', 'campaign.promotion.discount.apply_to_items_proportionally', 'campaign.promotion.discount.apply_to_items_proportionally_by_quantity', 'campaign.promotion.discount.apply_to_items_by_quantity', 'campaign.promotion.discount.fixed.apply_to_items', 'campaign.promotion.discount.percent.apply_to_items', 'campaign.loyalty_program', 'campaign.lucky_draw', 'voucher.discount_voucher', 'voucher.discount_voucher.discount.apply_to_order', 'voucher.discount_voucher.discount.apply_to_items', 'voucher.discount_voucher.discount.apply_to_items_proportionally', 'voucher.discount_voucher.discount.apply_to_items_proportionally_by_quantity', 'voucher.discount_voucher.discount.apply_to_items_by_quantity', 'voucher.discount_voucher.discount.fixed.apply_to_items', 'voucher.discount_voucher.discount.percent.apply_to_items', 'voucher.gift_voucher', 'voucher.gift_voucher.gift.apply_to_order', 'voucher.gift_voucher.gift.apply_to_items', 'voucher.loyalty_card', 'voucher.lucky_draw_code', 'distribution.custom_event', 'distribution.order.paid', 'distribution.order.created', 'distribution.order.canceled', 'distribution.order.updated', 'reward_assignment.pay_with_points', 'global']):
- raise ValueError("must be one of enum values ('earning_rule.order.paid', 'earning_rule.custom_event', 'earning_rule.customer.segment.entered', 'earning_rule.customer.tier.joined', 'earning_rule.customer.tier.left', 'earning_rule.customer.tier.upgraded', 'earning_rule.customer.tier.downgraded', 'earning_rule.customer.tier.prolonged', 'campaign.discount_coupons', 'campaign.discount_coupons.discount.apply_to_order', 'campaign.discount_coupons.discount.apply_to_items', 'campaign.discount_coupons.discount.apply_to_items_proportionally', 'campaign.discount_coupons.discount.apply_to_items_proportionally_by_quantity', 'campaign.discount_coupons.discount.apply_to_items_by_quantity', 'campaign.discount_coupons.discount.fixed.apply_to_items', 'campaign.discount_coupons.discount.percent.apply_to_items', 'campaign.gift_vouchers', 'campaign.gift_vouchers.gift.apply_to_order', 'campaign.gift_vouchers.gift.apply_to_items', 'campaign.referral_program', 'campaign.referral_program.discount.apply_to_order', 'campaign.referral_program.discount.apply_to_items', 'campaign.referral_program.discount.apply_to_items_proportionally', 'campaign.referral_program.discount.apply_to_items_proportionally_by_quantity', 'campaign.referral_program.discount.apply_to_items_by_quantity', 'campaign.referral_program.discount.fixed.apply_to_items', 'campaign.referral_program.discount.percent.apply_to_items', 'campaign.promotion', 'campaign.promotion.discount.apply_to_order', 'campaign.promotion.discount.apply_to_items', 'campaign.promotion.discount.apply_to_items_proportionally', 'campaign.promotion.discount.apply_to_items_proportionally_by_quantity', 'campaign.promotion.discount.apply_to_items_by_quantity', 'campaign.promotion.discount.fixed.apply_to_items', 'campaign.promotion.discount.percent.apply_to_items', 'campaign.loyalty_program', 'campaign.lucky_draw', 'voucher.discount_voucher', 'voucher.discount_voucher.discount.apply_to_order', 'voucher.discount_voucher.discount.apply_to_items', 'voucher.discount_voucher.discount.apply_to_items_proportionally', 'voucher.discount_voucher.discount.apply_to_items_proportionally_by_quantity', 'voucher.discount_voucher.discount.apply_to_items_by_quantity', 'voucher.discount_voucher.discount.fixed.apply_to_items', 'voucher.discount_voucher.discount.percent.apply_to_items', 'voucher.gift_voucher', 'voucher.gift_voucher.gift.apply_to_order', 'voucher.gift_voucher.gift.apply_to_items', 'voucher.loyalty_card', 'voucher.lucky_draw_code', 'distribution.custom_event', 'distribution.order.paid', 'distribution.order.created', 'distribution.order.canceled', 'distribution.order.updated', 'reward_assignment.pay_with_points', 'global')")
+ if value not in set(['earning_rule.order.paid', 'earning_rule.custom_event', 'earning_rule.customer.segment.entered', 'earning_rule.customer.tier.joined', 'earning_rule.customer.tier.left', 'earning_rule.customer.tier.upgraded', 'earning_rule.customer.tier.downgraded', 'earning_rule.customer.tier.prolonged', 'campaign.discount_coupons', 'campaign.discount_coupons.discount.apply_to_order', 'campaign.discount_coupons.discount.apply_to_items', 'campaign.discount_coupons.discount.apply_to_items_proportionally', 'campaign.discount_coupons.discount.apply_to_items_proportionally_by_quantity', 'campaign.discount_coupons.discount.apply_to_items_by_quantity', 'campaign.discount_coupons.discount.fixed.apply_to_items', 'campaign.discount_coupons.discount.percent.apply_to_items', 'campaign.gift_vouchers', 'campaign.gift_vouchers.gift.apply_to_order', 'campaign.gift_vouchers.gift.apply_to_items', 'campaign.referral_program', 'campaign.referral_program.discount.apply_to_order', 'campaign.referral_program.discount.apply_to_items', 'campaign.referral_program.discount.apply_to_items_proportionally', 'campaign.referral_program.discount.apply_to_items_proportionally_by_quantity', 'campaign.referral_program.discount.apply_to_items_by_quantity', 'campaign.referral_program.discount.fixed.apply_to_items', 'campaign.referral_program.discount.percent.apply_to_items', 'campaign.promotion', 'campaign.promotion.discount.apply_to_order', 'campaign.promotion.discount.apply_to_items', 'campaign.promotion.discount.apply_to_items_proportionally', 'campaign.promotion.discount.apply_to_items_proportionally_by_quantity', 'campaign.promotion.discount.apply_to_items_by_quantity', 'campaign.promotion.discount.fixed.apply_to_items', 'campaign.promotion.discount.percent.apply_to_items', 'campaign.loyalty_program', 'voucher.discount_voucher', 'voucher.discount_voucher.discount.apply_to_order', 'voucher.discount_voucher.discount.apply_to_items', 'voucher.discount_voucher.discount.apply_to_items_proportionally', 'voucher.discount_voucher.discount.apply_to_items_proportionally_by_quantity', 'voucher.discount_voucher.discount.apply_to_items_by_quantity', 'voucher.discount_voucher.discount.fixed.apply_to_items', 'voucher.discount_voucher.discount.percent.apply_to_items', 'voucher.gift_voucher', 'voucher.gift_voucher.gift.apply_to_order', 'voucher.gift_voucher.gift.apply_to_items', 'voucher.loyalty_card', 'distribution.custom_event', 'distribution.order.paid', 'distribution.order.created', 'distribution.order.canceled', 'distribution.order.updated', 'reward_assignment.pay_with_points', 'global']):
+ raise ValueError("must be one of enum values ('earning_rule.order.paid', 'earning_rule.custom_event', 'earning_rule.customer.segment.entered', 'earning_rule.customer.tier.joined', 'earning_rule.customer.tier.left', 'earning_rule.customer.tier.upgraded', 'earning_rule.customer.tier.downgraded', 'earning_rule.customer.tier.prolonged', 'campaign.discount_coupons', 'campaign.discount_coupons.discount.apply_to_order', 'campaign.discount_coupons.discount.apply_to_items', 'campaign.discount_coupons.discount.apply_to_items_proportionally', 'campaign.discount_coupons.discount.apply_to_items_proportionally_by_quantity', 'campaign.discount_coupons.discount.apply_to_items_by_quantity', 'campaign.discount_coupons.discount.fixed.apply_to_items', 'campaign.discount_coupons.discount.percent.apply_to_items', 'campaign.gift_vouchers', 'campaign.gift_vouchers.gift.apply_to_order', 'campaign.gift_vouchers.gift.apply_to_items', 'campaign.referral_program', 'campaign.referral_program.discount.apply_to_order', 'campaign.referral_program.discount.apply_to_items', 'campaign.referral_program.discount.apply_to_items_proportionally', 'campaign.referral_program.discount.apply_to_items_proportionally_by_quantity', 'campaign.referral_program.discount.apply_to_items_by_quantity', 'campaign.referral_program.discount.fixed.apply_to_items', 'campaign.referral_program.discount.percent.apply_to_items', 'campaign.promotion', 'campaign.promotion.discount.apply_to_order', 'campaign.promotion.discount.apply_to_items', 'campaign.promotion.discount.apply_to_items_proportionally', 'campaign.promotion.discount.apply_to_items_proportionally_by_quantity', 'campaign.promotion.discount.apply_to_items_by_quantity', 'campaign.promotion.discount.fixed.apply_to_items', 'campaign.promotion.discount.percent.apply_to_items', 'campaign.loyalty_program', 'voucher.discount_voucher', 'voucher.discount_voucher.discount.apply_to_order', 'voucher.discount_voucher.discount.apply_to_items', 'voucher.discount_voucher.discount.apply_to_items_proportionally', 'voucher.discount_voucher.discount.apply_to_items_proportionally_by_quantity', 'voucher.discount_voucher.discount.apply_to_items_by_quantity', 'voucher.discount_voucher.discount.fixed.apply_to_items', 'voucher.discount_voucher.discount.percent.apply_to_items', 'voucher.gift_voucher', 'voucher.gift_voucher.gift.apply_to_order', 'voucher.gift_voucher.gift.apply_to_items', 'voucher.loyalty_card', 'distribution.custom_event', 'distribution.order.paid', 'distribution.order.created', 'distribution.order.canceled', 'distribution.order.updated', 'reward_assignment.pay_with_points', 'global')")
return value
model_config = ConfigDict(
diff --git a/voucherify/models/validation_rules_update_response_body.py b/voucherify/models/validation_rules_update_response_body.py
index a82aa7db..79e66d7e 100644
--- a/voucherify/models/validation_rules_update_response_body.py
+++ b/voucherify/models/validation_rules_update_response_body.py
@@ -35,7 +35,7 @@ class ValidationRulesUpdateResponseBody(BaseModel):
error: Optional[ValidationRulesUpdateResponseBodyError] = None
applicable_to: Optional[ValidationRulesUpdateResponseBodyApplicableTo] = None
type: Optional[StrictStr] = Field(default='expression', description="Type of validation rule.")
- context_type: Optional[StrictStr] = Field(default='global', description="Validation rule context type. | **Context Type** | **Definition** | |:---|:---| | earning_rule.order.paid | | | earning_rule.custom_event | | | earning_rule.customer.segment.entered | | | campaign.discount_coupons | | | campaign.discount_coupons.discount.apply_to_order | | | campaign.discount_coupons.discount.apply_to_items | | | campaign.discount_coupons.discount.apply_to_items_proportionally | | | campaign.discount_coupons.discount.apply_to_items_proportionally_by_quantity | | | campaign.discount_coupons.discount.fixed.apply_to_items | | | campaign.gift_vouchers | | | campaign.gift_vouchers.gift.apply_to_order | | | campaign.gift_vouchers.gift.apply_to_items | | | campaign.referral_program | | | campaign.referral_program.discount.apply_to_order | | | campaign.referral_program.discount.apply_to_items | | | campaign.referral_program.discount.apply_to_items_proportionally | | | campaign.referral_program.discount.apply_to_items_proportionally_by_quantity | | | campaign.referral_program.discount.fixed.apply_to_items | | | campaign.promotion | | | campaign.promotion.discount.apply_to_order | | | campaign.promotion.discount.apply_to_items | | | campaign.promotion.discount.apply_to_items_proportionally | | | campaign.promotion.discount.apply_to_items_proportionally_by_quantity | | | campaign.promotion.discount.fixed.apply_to_items | | | campaign.loyalty_program | | | campaign.lucky_draw | | | voucher.discount_voucher | | | voucher.discount_voucher.discount.apply_to_order | | | voucher.discount_voucher.discount.apply_to_items | | | voucher.discount_voucher.discount.apply_to_items_proportionally | | | voucher.discount_voucher.discount.apply_to_items_proportionally_by_quantity | | | voucher.discount_voucher.discount.fixed.apply_to_items | | | voucher.gift_voucher | | | voucher.gift_voucher.gift.apply_to_order | | | voucher.gift_voucher.gift.apply_to_items | | | voucher.loyalty_card | | | voucher.lucky_draw_code | | | distribution.custom_event | | | reward_assignment.pay_with_points | | | global | |")
+ context_type: Optional[StrictStr] = Field(default='global', description="Validation rule context type. | **Context Type** | **Definition** | |:---|:---| | earning_rule.order.paid | | | earning_rule.custom_event | | | earning_rule.customer.segment.entered | | | campaign.discount_coupons | | | campaign.discount_coupons.discount.apply_to_order | | | campaign.discount_coupons.discount.apply_to_items | | | campaign.discount_coupons.discount.apply_to_items_proportionally | | | campaign.discount_coupons.discount.apply_to_items_proportionally_by_quantity | | | campaign.discount_coupons.discount.fixed.apply_to_items | | | campaign.gift_vouchers | | | campaign.gift_vouchers.gift.apply_to_order | | | campaign.gift_vouchers.gift.apply_to_items | | | campaign.referral_program | | | campaign.referral_program.discount.apply_to_order | | | campaign.referral_program.discount.apply_to_items | | | campaign.referral_program.discount.apply_to_items_proportionally | | | campaign.referral_program.discount.apply_to_items_proportionally_by_quantity | | | campaign.referral_program.discount.fixed.apply_to_items | | | campaign.promotion | | | campaign.promotion.discount.apply_to_order | | | campaign.promotion.discount.apply_to_items | | | campaign.promotion.discount.apply_to_items_proportionally | | | campaign.promotion.discount.apply_to_items_proportionally_by_quantity | | | campaign.promotion.discount.fixed.apply_to_items | | | campaign.loyalty_program | | | voucher.discount_voucher | | | voucher.discount_voucher.discount.apply_to_order | | | voucher.discount_voucher.discount.apply_to_items | | | voucher.discount_voucher.discount.apply_to_items_proportionally | | | voucher.discount_voucher.discount.apply_to_items_proportionally_by_quantity | | | voucher.discount_voucher.discount.fixed.apply_to_items | | | voucher.gift_voucher | | | voucher.gift_voucher.gift.apply_to_order | | | voucher.gift_voucher.gift.apply_to_items | | | voucher.loyalty_card | | | distribution.custom_event | | | reward_assignment.pay_with_points | | | global | |")
id: Optional[StrictStr] = Field(default=None, description="Unique validation rule ID.")
created_at: Optional[datetime] = Field(default=None, description="Timestamp representing the date and time when the validation rule was created. The value is shown in the ISO 8601 format.")
updated_at: Optional[datetime] = Field(default=None, description="Timestamp representing the date and time when the validation rule was updated. The value is shown in the ISO 8601 format.")
@@ -59,8 +59,8 @@ def context_type_validate_enum(cls, value):
if value is None:
return value
- if value not in set(['earning_rule.order.paid', 'earning_rule.custom_event', 'earning_rule.customer.segment.entered', 'earning_rule.customer.tier.joined', 'earning_rule.customer.tier.left', 'earning_rule.customer.tier.upgraded', 'earning_rule.customer.tier.downgraded', 'earning_rule.customer.tier.prolonged', 'campaign.discount_coupons', 'campaign.discount_coupons.discount.apply_to_order', 'campaign.discount_coupons.discount.apply_to_items', 'campaign.discount_coupons.discount.apply_to_items_proportionally', 'campaign.discount_coupons.discount.apply_to_items_proportionally_by_quantity', 'campaign.discount_coupons.discount.apply_to_items_by_quantity', 'campaign.discount_coupons.discount.fixed.apply_to_items', 'campaign.discount_coupons.discount.percent.apply_to_items', 'campaign.gift_vouchers', 'campaign.gift_vouchers.gift.apply_to_order', 'campaign.gift_vouchers.gift.apply_to_items', 'campaign.referral_program', 'campaign.referral_program.discount.apply_to_order', 'campaign.referral_program.discount.apply_to_items', 'campaign.referral_program.discount.apply_to_items_proportionally', 'campaign.referral_program.discount.apply_to_items_proportionally_by_quantity', 'campaign.referral_program.discount.apply_to_items_by_quantity', 'campaign.referral_program.discount.fixed.apply_to_items', 'campaign.referral_program.discount.percent.apply_to_items', 'campaign.promotion', 'campaign.promotion.discount.apply_to_order', 'campaign.promotion.discount.apply_to_items', 'campaign.promotion.discount.apply_to_items_proportionally', 'campaign.promotion.discount.apply_to_items_proportionally_by_quantity', 'campaign.promotion.discount.apply_to_items_by_quantity', 'campaign.promotion.discount.fixed.apply_to_items', 'campaign.promotion.discount.percent.apply_to_items', 'campaign.loyalty_program', 'campaign.lucky_draw', 'voucher.discount_voucher', 'voucher.discount_voucher.discount.apply_to_order', 'voucher.discount_voucher.discount.apply_to_items', 'voucher.discount_voucher.discount.apply_to_items_proportionally', 'voucher.discount_voucher.discount.apply_to_items_proportionally_by_quantity', 'voucher.discount_voucher.discount.apply_to_items_by_quantity', 'voucher.discount_voucher.discount.fixed.apply_to_items', 'voucher.discount_voucher.discount.percent.apply_to_items', 'voucher.gift_voucher', 'voucher.gift_voucher.gift.apply_to_order', 'voucher.gift_voucher.gift.apply_to_items', 'voucher.loyalty_card', 'voucher.lucky_draw_code', 'distribution.custom_event', 'distribution.order.paid', 'distribution.order.created', 'distribution.order.canceled', 'distribution.order.updated', 'reward_assignment.pay_with_points', 'global']):
- raise ValueError("must be one of enum values ('earning_rule.order.paid', 'earning_rule.custom_event', 'earning_rule.customer.segment.entered', 'earning_rule.customer.tier.joined', 'earning_rule.customer.tier.left', 'earning_rule.customer.tier.upgraded', 'earning_rule.customer.tier.downgraded', 'earning_rule.customer.tier.prolonged', 'campaign.discount_coupons', 'campaign.discount_coupons.discount.apply_to_order', 'campaign.discount_coupons.discount.apply_to_items', 'campaign.discount_coupons.discount.apply_to_items_proportionally', 'campaign.discount_coupons.discount.apply_to_items_proportionally_by_quantity', 'campaign.discount_coupons.discount.apply_to_items_by_quantity', 'campaign.discount_coupons.discount.fixed.apply_to_items', 'campaign.discount_coupons.discount.percent.apply_to_items', 'campaign.gift_vouchers', 'campaign.gift_vouchers.gift.apply_to_order', 'campaign.gift_vouchers.gift.apply_to_items', 'campaign.referral_program', 'campaign.referral_program.discount.apply_to_order', 'campaign.referral_program.discount.apply_to_items', 'campaign.referral_program.discount.apply_to_items_proportionally', 'campaign.referral_program.discount.apply_to_items_proportionally_by_quantity', 'campaign.referral_program.discount.apply_to_items_by_quantity', 'campaign.referral_program.discount.fixed.apply_to_items', 'campaign.referral_program.discount.percent.apply_to_items', 'campaign.promotion', 'campaign.promotion.discount.apply_to_order', 'campaign.promotion.discount.apply_to_items', 'campaign.promotion.discount.apply_to_items_proportionally', 'campaign.promotion.discount.apply_to_items_proportionally_by_quantity', 'campaign.promotion.discount.apply_to_items_by_quantity', 'campaign.promotion.discount.fixed.apply_to_items', 'campaign.promotion.discount.percent.apply_to_items', 'campaign.loyalty_program', 'campaign.lucky_draw', 'voucher.discount_voucher', 'voucher.discount_voucher.discount.apply_to_order', 'voucher.discount_voucher.discount.apply_to_items', 'voucher.discount_voucher.discount.apply_to_items_proportionally', 'voucher.discount_voucher.discount.apply_to_items_proportionally_by_quantity', 'voucher.discount_voucher.discount.apply_to_items_by_quantity', 'voucher.discount_voucher.discount.fixed.apply_to_items', 'voucher.discount_voucher.discount.percent.apply_to_items', 'voucher.gift_voucher', 'voucher.gift_voucher.gift.apply_to_order', 'voucher.gift_voucher.gift.apply_to_items', 'voucher.loyalty_card', 'voucher.lucky_draw_code', 'distribution.custom_event', 'distribution.order.paid', 'distribution.order.created', 'distribution.order.canceled', 'distribution.order.updated', 'reward_assignment.pay_with_points', 'global')")
+ if value not in set(['earning_rule.order.paid', 'earning_rule.custom_event', 'earning_rule.customer.segment.entered', 'earning_rule.customer.tier.joined', 'earning_rule.customer.tier.left', 'earning_rule.customer.tier.upgraded', 'earning_rule.customer.tier.downgraded', 'earning_rule.customer.tier.prolonged', 'campaign.discount_coupons', 'campaign.discount_coupons.discount.apply_to_order', 'campaign.discount_coupons.discount.apply_to_items', 'campaign.discount_coupons.discount.apply_to_items_proportionally', 'campaign.discount_coupons.discount.apply_to_items_proportionally_by_quantity', 'campaign.discount_coupons.discount.apply_to_items_by_quantity', 'campaign.discount_coupons.discount.fixed.apply_to_items', 'campaign.discount_coupons.discount.percent.apply_to_items', 'campaign.gift_vouchers', 'campaign.gift_vouchers.gift.apply_to_order', 'campaign.gift_vouchers.gift.apply_to_items', 'campaign.referral_program', 'campaign.referral_program.discount.apply_to_order', 'campaign.referral_program.discount.apply_to_items', 'campaign.referral_program.discount.apply_to_items_proportionally', 'campaign.referral_program.discount.apply_to_items_proportionally_by_quantity', 'campaign.referral_program.discount.apply_to_items_by_quantity', 'campaign.referral_program.discount.fixed.apply_to_items', 'campaign.referral_program.discount.percent.apply_to_items', 'campaign.promotion', 'campaign.promotion.discount.apply_to_order', 'campaign.promotion.discount.apply_to_items', 'campaign.promotion.discount.apply_to_items_proportionally', 'campaign.promotion.discount.apply_to_items_proportionally_by_quantity', 'campaign.promotion.discount.apply_to_items_by_quantity', 'campaign.promotion.discount.fixed.apply_to_items', 'campaign.promotion.discount.percent.apply_to_items', 'campaign.loyalty_program', 'voucher.discount_voucher', 'voucher.discount_voucher.discount.apply_to_order', 'voucher.discount_voucher.discount.apply_to_items', 'voucher.discount_voucher.discount.apply_to_items_proportionally', 'voucher.discount_voucher.discount.apply_to_items_proportionally_by_quantity', 'voucher.discount_voucher.discount.apply_to_items_by_quantity', 'voucher.discount_voucher.discount.fixed.apply_to_items', 'voucher.discount_voucher.discount.percent.apply_to_items', 'voucher.gift_voucher', 'voucher.gift_voucher.gift.apply_to_order', 'voucher.gift_voucher.gift.apply_to_items', 'voucher.loyalty_card', 'distribution.custom_event', 'distribution.order.paid', 'distribution.order.created', 'distribution.order.canceled', 'distribution.order.updated', 'reward_assignment.pay_with_points', 'global']):
+ raise ValueError("must be one of enum values ('earning_rule.order.paid', 'earning_rule.custom_event', 'earning_rule.customer.segment.entered', 'earning_rule.customer.tier.joined', 'earning_rule.customer.tier.left', 'earning_rule.customer.tier.upgraded', 'earning_rule.customer.tier.downgraded', 'earning_rule.customer.tier.prolonged', 'campaign.discount_coupons', 'campaign.discount_coupons.discount.apply_to_order', 'campaign.discount_coupons.discount.apply_to_items', 'campaign.discount_coupons.discount.apply_to_items_proportionally', 'campaign.discount_coupons.discount.apply_to_items_proportionally_by_quantity', 'campaign.discount_coupons.discount.apply_to_items_by_quantity', 'campaign.discount_coupons.discount.fixed.apply_to_items', 'campaign.discount_coupons.discount.percent.apply_to_items', 'campaign.gift_vouchers', 'campaign.gift_vouchers.gift.apply_to_order', 'campaign.gift_vouchers.gift.apply_to_items', 'campaign.referral_program', 'campaign.referral_program.discount.apply_to_order', 'campaign.referral_program.discount.apply_to_items', 'campaign.referral_program.discount.apply_to_items_proportionally', 'campaign.referral_program.discount.apply_to_items_proportionally_by_quantity', 'campaign.referral_program.discount.apply_to_items_by_quantity', 'campaign.referral_program.discount.fixed.apply_to_items', 'campaign.referral_program.discount.percent.apply_to_items', 'campaign.promotion', 'campaign.promotion.discount.apply_to_order', 'campaign.promotion.discount.apply_to_items', 'campaign.promotion.discount.apply_to_items_proportionally', 'campaign.promotion.discount.apply_to_items_proportionally_by_quantity', 'campaign.promotion.discount.apply_to_items_by_quantity', 'campaign.promotion.discount.fixed.apply_to_items', 'campaign.promotion.discount.percent.apply_to_items', 'campaign.loyalty_program', 'voucher.discount_voucher', 'voucher.discount_voucher.discount.apply_to_order', 'voucher.discount_voucher.discount.apply_to_items', 'voucher.discount_voucher.discount.apply_to_items_proportionally', 'voucher.discount_voucher.discount.apply_to_items_proportionally_by_quantity', 'voucher.discount_voucher.discount.apply_to_items_by_quantity', 'voucher.discount_voucher.discount.fixed.apply_to_items', 'voucher.discount_voucher.discount.percent.apply_to_items', 'voucher.gift_voucher', 'voucher.gift_voucher.gift.apply_to_order', 'voucher.gift_voucher.gift.apply_to_items', 'voucher.loyalty_card', 'distribution.custom_event', 'distribution.order.paid', 'distribution.order.created', 'distribution.order.canceled', 'distribution.order.updated', 'reward_assignment.pay_with_points', 'global')")
return value
model_config = ConfigDict(
diff --git a/voucherify/models/validations_redeemable_inapplicable.py b/voucherify/models/validations_redeemable_inapplicable.py
index 6f12c75c..e5edf2da 100644
--- a/voucherify/models/validations_redeemable_inapplicable.py
+++ b/voucherify/models/validations_redeemable_inapplicable.py
@@ -20,7 +20,7 @@
from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator
from typing import Any, ClassVar, Dict, List, Optional
-from voucherify.models.category import Category
+from voucherify.models.category_with_stacking_rules_type import CategoryWithStackingRulesType
from voucherify.models.validations_redeemable_inapplicable_result import ValidationsRedeemableInapplicableResult
from typing import Optional, Set
from typing_extensions import Self
@@ -34,7 +34,7 @@ class ValidationsRedeemableInapplicable(BaseModel):
object: Optional[StrictStr] = Field(default=None, description="Redeemable's object type.")
result: Optional[ValidationsRedeemableInapplicableResult] = None
metadata: Optional[Dict[str, Any]] = Field(default=None, description="The metadata object stores all custom attributes in the form of key/value pairs assigned to the redeemable.")
- categories: Optional[List[Category]] = None
+ categories: Optional[List[CategoryWithStackingRulesType]] = None
__properties: ClassVar[List[str]] = ["status", "id", "object", "result", "metadata", "categories"]
@field_validator('status')
@@ -153,7 +153,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
"object": obj.get("object"),
"result": ValidationsRedeemableInapplicableResult.from_dict(obj["result"]) if obj.get("result") is not None else None,
"metadata": obj.get("metadata"),
- "categories": [Category.from_dict(_item) for _item in obj["categories"]] if obj.get("categories") is not None else None
+ "categories": [CategoryWithStackingRulesType.from_dict(_item) for _item in obj["categories"]] if obj.get("categories") is not None else None
})
return _obj
diff --git a/voucherify/models/validations_redeemable_skipped.py b/voucherify/models/validations_redeemable_skipped.py
index 69d5af8b..5cee67bc 100644
--- a/voucherify/models/validations_redeemable_skipped.py
+++ b/voucherify/models/validations_redeemable_skipped.py
@@ -20,7 +20,7 @@
from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator
from typing import Any, ClassVar, Dict, List, Optional
-from voucherify.models.category import Category
+from voucherify.models.category_with_stacking_rules_type import CategoryWithStackingRulesType
from voucherify.models.validations_redeemable_skipped_result import ValidationsRedeemableSkippedResult
from typing import Optional, Set
from typing_extensions import Self
@@ -34,7 +34,7 @@ class ValidationsRedeemableSkipped(BaseModel):
object: Optional[StrictStr] = Field(default=None, description="Redeemable's object type.")
result: Optional[ValidationsRedeemableSkippedResult] = None
metadata: Optional[Dict[str, Any]] = Field(default=None, description="The metadata object stores all custom attributes in the form of key/value pairs assigned to the redeemable.")
- categories: Optional[List[Category]] = None
+ categories: Optional[List[CategoryWithStackingRulesType]] = None
__properties: ClassVar[List[str]] = ["status", "id", "object", "result", "metadata", "categories"]
@field_validator('status')
@@ -153,7 +153,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
"object": obj.get("object"),
"result": ValidationsRedeemableSkippedResult.from_dict(obj["result"]) if obj.get("result") is not None else None,
"metadata": obj.get("metadata"),
- "categories": [Category.from_dict(_item) for _item in obj["categories"]] if obj.get("categories") is not None else None
+ "categories": [CategoryWithStackingRulesType.from_dict(_item) for _item in obj["categories"]] if obj.get("categories") is not None else None
})
return _obj
diff --git a/voucherify/models/validations_validate_response_body.py b/voucherify/models/validations_validate_response_body.py
index 973dc877..3e2115d8 100644
--- a/voucherify/models/validations_validate_response_body.py
+++ b/voucherify/models/validations_validate_response_body.py
@@ -31,7 +31,7 @@
class ValidationsValidateResponseBody(BaseModel):
"""
- Response body schema for POST `/validations`.
+ Response body schema for **POST** `v1/validations`.
""" # noqa: E501
valid: Optional[StrictBool] = Field(default=None, description="The result of the validation. It takes all of the redeemables into account and returns a `false` if at least one redeemable is inapplicable. Returns `true` if all redeemables are applicable.")
redeemables: Optional[List[ValidationsValidateResponseBodyRedeemablesItem]] = None
diff --git a/voucherify/models/validations_validate_response_body_redeemables_item.py b/voucherify/models/validations_validate_response_body_redeemables_item.py
index ae64bd3e..15674648 100644
--- a/voucherify/models/validations_validate_response_body_redeemables_item.py
+++ b/voucherify/models/validations_validate_response_body_redeemables_item.py
@@ -21,7 +21,7 @@
from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator
from typing import Any, ClassVar, Dict, List, Optional
from voucherify.models.applicable_to_result_list import ApplicableToResultList
-from voucherify.models.category import Category
+from voucherify.models.category_with_stacking_rules_type import CategoryWithStackingRulesType
from voucherify.models.inapplicable_to_result_list import InapplicableToResultList
from voucherify.models.order_calculated import OrderCalculated
from voucherify.models.validations_validate_response_body_redeemables_item_result import ValidationsValidateResponseBodyRedeemablesItemResult
@@ -40,7 +40,7 @@ class ValidationsValidateResponseBodyRedeemablesItem(BaseModel):
inapplicable_to: Optional[InapplicableToResultList] = None
result: Optional[ValidationsValidateResponseBodyRedeemablesItemResult] = None
metadata: Optional[Dict[str, Any]] = None
- categories: Optional[List[Category]] = None
+ categories: Optional[List[CategoryWithStackingRulesType]] = None
__properties: ClassVar[List[str]] = ["status", "id", "object", "order", "applicable_to", "inapplicable_to", "result", "metadata", "categories"]
@field_validator('status')
@@ -156,7 +156,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
"inapplicable_to": InapplicableToResultList.from_dict(obj["inapplicable_to"]) if obj.get("inapplicable_to") is not None else None,
"result": ValidationsValidateResponseBodyRedeemablesItemResult.from_dict(obj["result"]) if obj.get("result") is not None else None,
"metadata": obj.get("metadata"),
- "categories": [Category.from_dict(_item) for _item in obj["categories"]] if obj.get("categories") is not None else None
+ "categories": [CategoryWithStackingRulesType.from_dict(_item) for _item in obj["categories"]] if obj.get("categories") is not None else None
})
return _obj
diff --git a/voucherify/models/voucher_publish.py b/voucherify/models/voucher_publish.py
index f15df872..12722d3f 100644
--- a/voucherify/models/voucher_publish.py
+++ b/voucherify/models/voucher_publish.py
@@ -29,7 +29,7 @@ class VoucherPublish(BaseModel):
""" # noqa: E501
object: Optional[StrictStr] = Field(default='list', description="The type of the object represented is by default `list`. To get this list, you need to make a call to the endpoint returned in the `url` attribute.")
count: Optional[StrictInt] = Field(default=None, description="Publication events counter.")
- url: Optional[StrictStr] = Field(default=None, description="The endpoint where this list of publications can be accessed using a GET method. `/v1/vouchers/{voucher_code}/publications`")
+ url: Optional[StrictStr] = Field(default=None, description="The endpoint where this list of publications can be accessed using a **GET** method. `/v1/vouchers/{voucher_code}/publications`")
__properties: ClassVar[List[str]] = ["object", "count", "url"]
model_config = ConfigDict(
diff --git a/voucherify/models/voucher_redemption.py b/voucherify/models/voucher_redemption.py
index 3fdd7a43..40b6b96f 100644
--- a/voucherify/models/voucher_redemption.py
+++ b/voucherify/models/voucher_redemption.py
@@ -31,7 +31,7 @@ class VoucherRedemption(BaseModel):
redeemed_quantity: Optional[StrictInt] = Field(default=None, description="How many times a voucher has already been redeemed.")
redeemed_points: Optional[StrictInt] = Field(default=None, description="Total loyalty points redeemed.")
object: Optional[StrictStr] = Field(default='list', description="The type of the object represented is by default `list`. To get this list, you need to make a call to the endpoint returned in the url attribute.")
- url: Optional[StrictStr] = Field(default=None, description="The endpoint where this list of redemptions can be accessed using a GET method. `/v1/vouchers/{voucher_code}/redemptions`")
+ url: Optional[StrictStr] = Field(default=None, description="The endpoint where this list of redemptions can be accessed using a **GET** method. `/v1/vouchers/{voucher_code}/redemptions`")
__properties: ClassVar[List[str]] = ["quantity", "redeemed_quantity", "redeemed_points", "object", "url"]
model_config = ConfigDict(
diff --git a/voucherify/models/voucher_with_categories_publish.py b/voucherify/models/voucher_with_categories_publish.py
index 045adb8e..4688738b 100644
--- a/voucherify/models/voucher_with_categories_publish.py
+++ b/voucherify/models/voucher_with_categories_publish.py
@@ -29,7 +29,7 @@ class VoucherWithCategoriesPublish(BaseModel):
""" # noqa: E501
object: Optional[StrictStr] = Field(default='list', description="The type of the object represented is by default `list`. To get this list, you need to make a call to the endpoint returned in the `url` attribute.")
count: Optional[StrictInt] = Field(default=None, description="Publication events counter.")
- url: Optional[StrictStr] = Field(default=None, description="The endpoint where this list of publications can be accessed using a GET method. `/v1/vouchers/{voucher_code}/publications`")
+ url: Optional[StrictStr] = Field(default=None, description="The endpoint where this list of publications can be accessed using a **GET** method. `/v1/vouchers/{voucher_code}/publications`")
__properties: ClassVar[List[str]] = ["object", "count", "url"]
model_config = ConfigDict(
diff --git a/voucherify/models/voucher_with_categories_redemption.py b/voucherify/models/voucher_with_categories_redemption.py
index d7a1e8fb..d06de717 100644
--- a/voucherify/models/voucher_with_categories_redemption.py
+++ b/voucherify/models/voucher_with_categories_redemption.py
@@ -31,7 +31,7 @@ class VoucherWithCategoriesRedemption(BaseModel):
redeemed_quantity: Optional[StrictInt] = Field(default=None, description="How many times a voucher has already been redeemed.")
redeemed_points: Optional[StrictInt] = Field(default=None, description="Total loyalty points redeemed.")
object: Optional[StrictStr] = Field(default='list', description="The type of the object represented is by default `list`. To get this list, you need to make a call to the endpoint returned in the url attribute.")
- url: Optional[StrictStr] = Field(default=None, description="The endpoint where this list of redemptions can be accessed using a GET method. `/v1/vouchers/{voucher_code}/redemptions`")
+ url: Optional[StrictStr] = Field(default=None, description="The endpoint where this list of redemptions can be accessed using a **GET** method. `/v1/vouchers/{voucher_code}/redemptions`")
__properties: ClassVar[List[str]] = ["quantity", "redeemed_quantity", "redeemed_points", "object", "url"]
model_config = ConfigDict(
diff --git a/voucherify/models/vouchers_create_response_body_publish.py b/voucherify/models/vouchers_create_response_body_publish.py
index 8f0af1ad..79839c1e 100644
--- a/voucherify/models/vouchers_create_response_body_publish.py
+++ b/voucherify/models/vouchers_create_response_body_publish.py
@@ -29,7 +29,7 @@ class VouchersCreateResponseBodyPublish(BaseModel):
""" # noqa: E501
object: Optional[StrictStr] = Field(default='list', description="The type of the object represented is by default `list`. To get this list, you need to make a call to the endpoint returned in the `url` attribute.")
count: Optional[StrictInt] = Field(default=None, description="Publication events counter.")
- url: Optional[StrictStr] = Field(default=None, description="The endpoint where this list of publications can be accessed using a GET method. `/v1/vouchers/{voucher_code}/publications`")
+ url: Optional[StrictStr] = Field(default=None, description="The endpoint where this list of publications can be accessed using a **GET** method. `/v1/vouchers/{voucher_code}/publications`")
__properties: ClassVar[List[str]] = ["object", "count", "url"]
model_config = ConfigDict(
diff --git a/voucherify/models/vouchers_create_response_body_redemption.py b/voucherify/models/vouchers_create_response_body_redemption.py
index eb01e7ef..0ebb2172 100644
--- a/voucherify/models/vouchers_create_response_body_redemption.py
+++ b/voucherify/models/vouchers_create_response_body_redemption.py
@@ -31,7 +31,7 @@ class VouchersCreateResponseBodyRedemption(BaseModel):
redeemed_quantity: Optional[StrictInt] = Field(default=None, description="How many times a voucher has already been redeemed.")
redeemed_points: Optional[StrictInt] = Field(default=None, description="Total loyalty points redeemed.")
object: Optional[StrictStr] = Field(default='list', description="The type of the object represented is by default `list`. To get this list, you need to make a call to the endpoint returned in the url attribute.")
- url: Optional[StrictStr] = Field(default=None, description="The endpoint where this list of redemptions can be accessed using a GET method. `/v1/vouchers/{voucher_code}/redemptions`")
+ url: Optional[StrictStr] = Field(default=None, description="The endpoint where this list of redemptions can be accessed using a **GET** method. `/v1/vouchers/{voucher_code}/redemptions`")
__properties: ClassVar[List[str]] = ["quantity", "redeemed_quantity", "redeemed_points", "object", "url"]
model_config = ConfigDict(
diff --git a/voucherify/models/vouchers_disable_response_body_publish.py b/voucherify/models/vouchers_disable_response_body_publish.py
index 3b0eb286..6f98f281 100644
--- a/voucherify/models/vouchers_disable_response_body_publish.py
+++ b/voucherify/models/vouchers_disable_response_body_publish.py
@@ -29,7 +29,7 @@ class VouchersDisableResponseBodyPublish(BaseModel):
""" # noqa: E501
object: Optional[StrictStr] = Field(default='list', description="The type of the object represented is by default `list`. To get this list, you need to make a call to the endpoint returned in the `url` attribute.")
count: Optional[StrictInt] = Field(default=None, description="Publication events counter.")
- url: Optional[StrictStr] = Field(default=None, description="The endpoint where this list of publications can be accessed using a GET method. `/v1/vouchers/{voucher_code}/publications`")
+ url: Optional[StrictStr] = Field(default=None, description="The endpoint where this list of publications can be accessed using a **GET** method. `/v1/vouchers/{voucher_code}/publications`")
__properties: ClassVar[List[str]] = ["object", "count", "url"]
model_config = ConfigDict(
diff --git a/voucherify/models/vouchers_disable_response_body_redemption.py b/voucherify/models/vouchers_disable_response_body_redemption.py
index e55e3a83..736dfee5 100644
--- a/voucherify/models/vouchers_disable_response_body_redemption.py
+++ b/voucherify/models/vouchers_disable_response_body_redemption.py
@@ -31,7 +31,7 @@ class VouchersDisableResponseBodyRedemption(BaseModel):
redeemed_quantity: Optional[StrictInt] = Field(default=None, description="How many times a voucher has already been redeemed.")
redeemed_points: Optional[StrictInt] = Field(default=None, description="Total loyalty points redeemed.")
object: Optional[StrictStr] = Field(default='list', description="The type of the object represented is by default `list`. To get this list, you need to make a call to the endpoint returned in the url attribute.")
- url: Optional[StrictStr] = Field(default=None, description="The endpoint where this list of redemptions can be accessed using a GET method. `/v1/vouchers/{voucher_code}/redemptions`")
+ url: Optional[StrictStr] = Field(default=None, description="The endpoint where this list of redemptions can be accessed using a **GET** method. `/v1/vouchers/{voucher_code}/redemptions`")
__properties: ClassVar[List[str]] = ["quantity", "redeemed_quantity", "redeemed_points", "object", "url"]
model_config = ConfigDict(
diff --git a/voucherify/models/vouchers_enable_response_body_publish.py b/voucherify/models/vouchers_enable_response_body_publish.py
index b16d4e64..236dfeef 100644
--- a/voucherify/models/vouchers_enable_response_body_publish.py
+++ b/voucherify/models/vouchers_enable_response_body_publish.py
@@ -29,7 +29,7 @@ class VouchersEnableResponseBodyPublish(BaseModel):
""" # noqa: E501
object: Optional[StrictStr] = Field(default='list', description="The type of the object represented is by default `list`. To get this list, you need to make a call to the endpoint returned in the `url` attribute.")
count: Optional[StrictInt] = Field(default=None, description="Publication events counter.")
- url: Optional[StrictStr] = Field(default=None, description="The endpoint where this list of publications can be accessed using a GET method. `/v1/vouchers/{voucher_code}/publications`")
+ url: Optional[StrictStr] = Field(default=None, description="The endpoint where this list of publications can be accessed using a **GET** method. `/v1/vouchers/{voucher_code}/publications`")
__properties: ClassVar[List[str]] = ["object", "count", "url"]
model_config = ConfigDict(
diff --git a/voucherify/models/vouchers_enable_response_body_redemption.py b/voucherify/models/vouchers_enable_response_body_redemption.py
index a9156cca..4feffdea 100644
--- a/voucherify/models/vouchers_enable_response_body_redemption.py
+++ b/voucherify/models/vouchers_enable_response_body_redemption.py
@@ -31,7 +31,7 @@ class VouchersEnableResponseBodyRedemption(BaseModel):
redeemed_quantity: Optional[StrictInt] = Field(default=None, description="How many times a voucher has already been redeemed.")
redeemed_points: Optional[StrictInt] = Field(default=None, description="Total loyalty points redeemed.")
object: Optional[StrictStr] = Field(default='list', description="The type of the object represented is by default `list`. To get this list, you need to make a call to the endpoint returned in the url attribute.")
- url: Optional[StrictStr] = Field(default=None, description="The endpoint where this list of redemptions can be accessed using a GET method. `/v1/vouchers/{voucher_code}/redemptions`")
+ url: Optional[StrictStr] = Field(default=None, description="The endpoint where this list of redemptions can be accessed using a **GET** method. `/v1/vouchers/{voucher_code}/redemptions`")
__properties: ClassVar[List[str]] = ["quantity", "redeemed_quantity", "redeemed_points", "object", "url"]
model_config = ConfigDict(
diff --git a/voucherify/models/vouchers_get_response_body_publish.py b/voucherify/models/vouchers_get_response_body_publish.py
index d271636a..54a3b9de 100644
--- a/voucherify/models/vouchers_get_response_body_publish.py
+++ b/voucherify/models/vouchers_get_response_body_publish.py
@@ -29,7 +29,7 @@ class VouchersGetResponseBodyPublish(BaseModel):
""" # noqa: E501
object: Optional[StrictStr] = Field(default='list', description="The type of the object represented is by default `list`. To get this list, you need to make a call to the endpoint returned in the `url` attribute.")
count: Optional[StrictInt] = Field(default=None, description="Publication events counter.")
- url: Optional[StrictStr] = Field(default=None, description="The endpoint where this list of publications can be accessed using a GET method. `/v1/vouchers/{voucher_code}/publications`")
+ url: Optional[StrictStr] = Field(default=None, description="The endpoint where this list of publications can be accessed using a **GET** method. `/v1/vouchers/{voucher_code}/publications`")
__properties: ClassVar[List[str]] = ["object", "count", "url"]
model_config = ConfigDict(
diff --git a/voucherify/models/vouchers_get_response_body_redemption.py b/voucherify/models/vouchers_get_response_body_redemption.py
index 1f071fae..1206f0c5 100644
--- a/voucherify/models/vouchers_get_response_body_redemption.py
+++ b/voucherify/models/vouchers_get_response_body_redemption.py
@@ -31,7 +31,7 @@ class VouchersGetResponseBodyRedemption(BaseModel):
redeemed_quantity: Optional[StrictInt] = Field(default=None, description="How many times a voucher has already been redeemed.")
redeemed_points: Optional[StrictInt] = Field(default=None, description="Total loyalty points redeemed.")
object: Optional[StrictStr] = Field(default='list', description="The type of the object represented is by default `list`. To get this list, you need to make a call to the endpoint returned in the url attribute.")
- url: Optional[StrictStr] = Field(default=None, description="The endpoint where this list of redemptions can be accessed using a GET method. `/v1/vouchers/{voucher_code}/redemptions`")
+ url: Optional[StrictStr] = Field(default=None, description="The endpoint where this list of redemptions can be accessed using a **GET** method. `/v1/vouchers/{voucher_code}/redemptions`")
__properties: ClassVar[List[str]] = ["quantity", "redeemed_quantity", "redeemed_points", "object", "url"]
model_config = ConfigDict(
diff --git a/voucherify/models/vouchers_update_response_body_publish.py b/voucherify/models/vouchers_update_response_body_publish.py
index fbbfbf2f..e6d0b3b6 100644
--- a/voucherify/models/vouchers_update_response_body_publish.py
+++ b/voucherify/models/vouchers_update_response_body_publish.py
@@ -29,7 +29,7 @@ class VouchersUpdateResponseBodyPublish(BaseModel):
""" # noqa: E501
object: Optional[StrictStr] = Field(default='list', description="The type of the object represented is by default `list`. To get this list, you need to make a call to the endpoint returned in the `url` attribute.")
count: Optional[StrictInt] = Field(default=None, description="Publication events counter.")
- url: Optional[StrictStr] = Field(default=None, description="The endpoint where this list of publications can be accessed using a GET method. `/v1/vouchers/{voucher_code}/publications`")
+ url: Optional[StrictStr] = Field(default=None, description="The endpoint where this list of publications can be accessed using a **GET** method. `/v1/vouchers/{voucher_code}/publications`")
__properties: ClassVar[List[str]] = ["object", "count", "url"]
model_config = ConfigDict(
diff --git a/voucherify/models/vouchers_update_response_body_redemption.py b/voucherify/models/vouchers_update_response_body_redemption.py
index ce7c5c63..4d23e91e 100644
--- a/voucherify/models/vouchers_update_response_body_redemption.py
+++ b/voucherify/models/vouchers_update_response_body_redemption.py
@@ -31,7 +31,7 @@ class VouchersUpdateResponseBodyRedemption(BaseModel):
redeemed_quantity: Optional[StrictInt] = Field(default=None, description="How many times a voucher has already been redeemed.")
redeemed_points: Optional[StrictInt] = Field(default=None, description="Total loyalty points redeemed.")
object: Optional[StrictStr] = Field(default='list', description="The type of the object represented is by default `list`. To get this list, you need to make a call to the endpoint returned in the url attribute.")
- url: Optional[StrictStr] = Field(default=None, description="The endpoint where this list of redemptions can be accessed using a GET method. `/v1/vouchers/{voucher_code}/redemptions`")
+ url: Optional[StrictStr] = Field(default=None, description="The endpoint where this list of redemptions can be accessed using a **GET** method. `/v1/vouchers/{voucher_code}/redemptions`")
__properties: ClassVar[List[str]] = ["quantity", "redeemed_quantity", "redeemed_points", "object", "url"]
model_config = ConfigDict(