Class VoucherifyClient
java.lang.Object
org.bhn.promotion.voucherify.engine.VoucherifyClient
This class contains all the api calls made to Voucherify service
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionio.voucherify.client.model.PromotionsTiersCreateResponseBodyaddPromotionTiersToCampaign(String campaignId, io.voucherify.client.model.PromotionsTiersCreateRequestBody promotionsTiersCreateRequestBody) Creates promotion tiers and adds them to a specific campaign.io.voucherify.client.model.PromotionsTiersCreateResponseBodyaddPromotionTierToCampaign(String campaignId, io.voucherify.client.model.PromotionsTiersCreateRequestBody requestBody) This method invokes voucherify api and Adds Promotion Tier to campaignio.voucherify.client.model.ManagementProjectsUsersAssignResponseBodyassignUser(String projectId, io.voucherify.client.model.ManagementProjectsUsersAssignRequestBody assignRequest) This method invokes the Voucherify Management API to assign a user to a project.checkEligibility(CheckPromotionEligibilityRequestDto requestBody) This method invokes voucherify api and Checks promotion eligibility with retry mechanismio.voucherify.client.model.CampaignsCreateResponseBodycreateCampaign(io.voucherify.client.model.CampaignsCreateRequestBody requestBody) This method invokes voucherify api and Creates campaignio.voucherify.client.model.ExportsCreateResponseBodycreateExport(io.voucherify.client.model.ExportsCreateRequestBody requestBody) Creates a new export using the provided request body.io.voucherify.client.model.ProductsCreateResponseBodycreateProduct(io.voucherify.client.model.ProductsCreateRequestBody requestBody) This method invokes voucherify api and Creates Productio.voucherify.client.model.ProductCollectionsCreateResponseBodycreateProductCollection(io.voucherify.client.model.ProductCollectionsCreateRequestBody productCollectionsCreateRequestBody) Creates promotion tiers by invoking the Product Collections API.io.voucherify.client.model.ProductsSkusCreateResponseBodyThis method invokes voucherify api and Creates Product SKUio.voucherify.client.model.ValidationRulesCreateResponseBodycreateValidationRule(io.voucherify.client.model.ValidationRulesCreateRequestBody requestBody) Creates a new validation rule by calling the underlying validation rules API.io.voucherify.client.model.ValidationRulesAssignmentsCreateResponseBodycreateValidationRuleAssignment(String validationRuleId, Boolean force, io.voucherify.client.model.ValidationRulesAssignmentsCreateRequestBody assignmentsCreateRequestBody) Creates a new validation rule assignment by calling the underlying validation rules API.io.voucherify.client.model.VouchersCreateResponseBodycreateVoucher(String code, io.voucherify.client.model.VouchersCreateWithSpecificCodeRequestBody requestBody) This method invokes voucherify api and Creates campaignio.voucherify.client.model.CampaignsDeleteResponseBodydeleteCampaign(String campaignId, boolean force) This method invokes voucherify api and Deletes campaignvoiddeleteProduct(String productId, Boolean force) This method invokes voucherify api and delete ProductvoiddeletePromotionTier(String promotionId) This method invokes voucherify api and Deletes Promotion TiervoiddeleteValidationRule(String validationRuleId) Deletes a validation rule by its ID.voiddeleteValidationRuleAssignment(String validationRuleId, String assignmentId) Deletes the assignment of a validation rule.voiddeleteVoucher(String voucherId, boolean force) This method invokes voucherify api and Deletes voucherio.voucherify.client.model.CampaignsGetResponseBodygetCampaign(String campaignId) This method invokes voucherify api and Gets campaignio.voucherify.client.model.ExportsGetResponseBodyRetrieves the details of an existing export using the specified export ID.io.voucherify.client.model.ManagementProjectsMetadataSchemasListResponseBodygetMetadataSchema(String projectId) This method invokes the Voucherify Management API to retrieve the metadata schemas for a project.io.voucherify.client.model.ProductsGetResponseBodygetProduct(String productId) This method invokes voucherify api and Gets productio.voucherify.client.model.ProductCollectionsGetResponseBodygetProductCollection(String productCollectionId) This method retrieves the product collection for the given product collection ID.io.voucherify.client.model.PromotionsTiersGetResponseBodygetPromotionTier(String promotionId) This method invokes voucherify api and Gets promotion tierio.voucherify.client.model.ManagementProjectsUsersGetUserResponseBodyGets a user's details from Voucherify.io.voucherify.client.model.ValidationRulesGetResponseBodygetValidationRule(String ruleId) This method invokes voucherify api and Gets Validation Rulesio.voucherify.client.model.VouchersGetResponseBodygetVoucher(String voucherId) This method invokes voucherify api and Gets voucherio.voucherify.client.model.VouchersListResponseBodygetVouchers(Integer limit, Integer page, String category, String campaignId, String customer, String campaign, io.voucherify.client.model.ParameterCreatedBeforeAfter createdAt, io.voucherify.client.model.ParameterUpdatedBeforeAfter updatedAt, io.voucherify.client.model.ParameterOrderVouchers order, String code, List<String> ids) Fetches a list of vouchers based on the provided filters and parameters.voidinviteUser(io.voucherify.client.model.ManagementProjectsUsersInviteCreateRequestBody requestBody) This method invokes the Voucherify Management API to invite a user to a project.redeemStackedDiscounts(RedeemPromotionRequestDto requestBody) This method invokes voucherify api and Redeems promotion with retry mechanismrollbackStackedRedemptions(String redemptionId, String reason, RedemptionRollbackRequestDto body) This method invokes voucherify api and Rollbacks promotionvoidunassignUser(String projectId, String userId) This method invokes the Voucherify Management API to unassign a user from a project.io.voucherify.client.model.CampaignsUpdateResponseBodyupdateCampaign(String campaignId, io.voucherify.client.model.CampaignsUpdateRequestBody requestBody) This method invokes voucherify api and Updates campaignio.voucherify.client.model.ManagementProjectsMetadataSchemasUpdateResponseBodyupdateMetadataSchema(String projectId, String metadataSchemaId, io.voucherify.client.model.ManagementProjectsMetadataSchemasUpdateRequestBody metadataSchemasUpdateRequestBody) This method invokes the Voucherify Management API to update the metadata schema for a project.io.voucherify.client.model.ProductsUpdateResponseBodyupdateProduct(String productId, io.voucherify.client.model.ProductsUpdateRequestBody requestBody) This method invokes voucherify api and Updates Productio.voucherify.client.model.PromotionsTiersUpdateResponseBodyupdatePromotionTier(String promotionId, io.voucherify.client.model.PromotionsTiersUpdateRequestBody requestBody) This method invokes voucherify api and Updates Promotion Tierio.voucherify.client.model.ManagementProjectsUsersUpdateRoleResponseBodyupdateUser(String projectId, String userId, io.voucherify.client.model.ManagementProjectsUsersUpdateRoleRequestBody requestBody) This method invokes the Voucherify Management API to update a user's role in a project.io.voucherify.client.model.ValidationRulesUpdateResponseBodyupdateValidationRuleAssignment(String validationRuleId, io.voucherify.client.model.ValidationRulesUpdateRequestBody validationRulesUpdateRequestBody) Updates the validation rule assignment in Voucherify using the provided validation rule ID and the update request body.io.voucherify.client.model.VouchersUpdateResponseBodyupdateVoucher(String voucherCode, io.voucherify.client.model.VouchersUpdateRequestBody vouchersUpdateRequestBody) This method invokes voucherify api and update vouchervalidateStackedDiscounts(ValidationRequestDto requestBody) This method invokes voucherify api and Validates promotion with retry mechanism
-
Constructor Details
-
VoucherifyClient
public VoucherifyClient()
-
-
Method Details
-
validateStackedDiscounts
public ValidationResponseDto validateStackedDiscounts(ValidationRequestDto requestBody) throws Exception This method invokes voucherify api and Validates promotion with retry mechanism- Parameters:
requestBody-ValidationRequestDtoValidation Request- Returns:
ValidationResponseDtoValidations Response- Throws:
Exception- throw exception in case of execution issue
-
checkEligibility
public CheckPromotionEligibilityResponseDto checkEligibility(CheckPromotionEligibilityRequestDto requestBody) throws Exception This method invokes voucherify api and Checks promotion eligibility with retry mechanism- Parameters:
requestBody-CheckPromotionEligibilityRequestDtoQualification Request- Returns:
CheckPromotionEligibilityResponseDtoQualification Response- Throws:
Exception- throw exception in case of execution issue
-
redeemStackedDiscounts
public RedeemPromotionResponseDto redeemStackedDiscounts(RedeemPromotionRequestDto requestBody) throws Exception This method invokes voucherify api and Redeems promotion with retry mechanism- Parameters:
requestBody-RedeemPromotionRequestDtoRedemption Request- Returns:
RedeemPromotionResponseDtoRedemption Response- Throws:
Exception- throw exception in case of execution issue
-
inviteUser
public void inviteUser(io.voucherify.client.model.ManagementProjectsUsersInviteCreateRequestBody requestBody) throws io.voucherify.client.ApiException This method invokes the Voucherify Management API to invite a user to a project.- Parameters:
requestBody-ManagementProjectsUsersInviteCreateRequestBodythe request containing user invitation details- Throws:
io.voucherify.client.ApiException- if an error occurs during the API call
-
updateUser
public io.voucherify.client.model.ManagementProjectsUsersUpdateRoleResponseBody updateUser(String projectId, String userId, io.voucherify.client.model.ManagementProjectsUsersUpdateRoleRequestBody requestBody) throws io.voucherify.client.ApiException This method invokes the Voucherify Management API to update a user's role in a project.- Parameters:
projectId- the project identifieruserId- the user identifier (can be user ID or email)requestBody-ManagementProjectsUsersUpdateRoleRequestBodythe request containing the new role- Throws:
io.voucherify.client.ApiException- if an error occurs during the API call
-
getUser
public io.voucherify.client.model.ManagementProjectsUsersGetUserResponseBody getUser(String projectId, String userId) throws io.voucherify.client.ApiException Gets a user's details from Voucherify.- Parameters:
projectId- the project IDuserId- the user ID or email- Returns:
- ManagementProjectsUsersGetUserResponseBody containing user details
- Throws:
io.voucherify.client.ApiException- if the API call fails
-
unassignUser
This method invokes the Voucherify Management API to unassign a user from a project.- Parameters:
projectId- the project identifieruserId- the user identifier (can be user ID or email)- Throws:
io.voucherify.client.ApiException- if an error occurs during the API call
-
assignUser
public io.voucherify.client.model.ManagementProjectsUsersAssignResponseBody assignUser(String projectId, io.voucherify.client.model.ManagementProjectsUsersAssignRequestBody assignRequest) throws io.voucherify.client.ApiException This method invokes the Voucherify Management API to assign a user to a project.- Parameters:
projectId- the project identifierassignRequest- the request body containing user login and role- Returns:
- the response from the API
- Throws:
io.voucherify.client.ApiException- if an error occurs during the API call
-
rollbackStackedRedemptions
public RedemptionRollbackResponseDto rollbackStackedRedemptions(String redemptionId, String reason, RedemptionRollbackRequestDto body) throws Exception This method invokes voucherify api and Rollbacks promotion- Parameters:
redemptionId-StringRedemption IDreason-StringRollback Reasonbody-RedemptionRollbackRequestDtoContains metadata for the rollback- Returns:
RedemptionRollbackResponseDtoRollback Response- Throws:
io.voucherify.client.ApiException- throw exception in case of execution issueException
-
createCampaign
public io.voucherify.client.model.CampaignsCreateResponseBody createCampaign(io.voucherify.client.model.CampaignsCreateRequestBody requestBody) throws io.voucherify.client.ApiException This method invokes voucherify api and Creates campaign- Parameters:
requestBody-CampaignsCreateRequestBodyCreate Campaign Request- Returns:
CampaignsCreateResponseBodyCreate Campaign Response- Throws:
io.voucherify.client.ApiException- throw exception in case of execution issue
-
deleteCampaign
public io.voucherify.client.model.CampaignsDeleteResponseBody deleteCampaign(String campaignId, boolean force) throws io.voucherify.client.ApiException This method invokes voucherify api and Deletes campaign- Parameters:
campaignId-StringCampaign Idforce-booleanForce Delete Flag- Returns:
CampaignsDeleteResponseBodyDelete Campaign Response- Throws:
io.voucherify.client.ApiException- throw exception in case of execution issue
-
getCampaign
public io.voucherify.client.model.CampaignsGetResponseBody getCampaign(String campaignId) throws io.voucherify.client.ApiException This method invokes voucherify api and Gets campaign- Parameters:
campaignId-StringCampaign Id- Returns:
CampaignsGetResponseBodyGet Campaign Response- Throws:
io.voucherify.client.ApiException- throw exception in case of execution issue
-
updateCampaign
public io.voucherify.client.model.CampaignsUpdateResponseBody updateCampaign(String campaignId, io.voucherify.client.model.CampaignsUpdateRequestBody requestBody) throws io.voucherify.client.ApiException This method invokes voucherify api and Updates campaign- Parameters:
campaignId-StringCampaign IdrequestBody-CampaignsUpdateRequestBodyUpdate Campaign Request- Returns:
CampaignsUpdateResponseBodyUpdate Campaign Response- Throws:
io.voucherify.client.ApiException- throw exception in case of execution issue
-
getPromotionTier
public io.voucherify.client.model.PromotionsTiersGetResponseBody getPromotionTier(String promotionId) throws io.voucherify.client.ApiException This method invokes voucherify api and Gets promotion tier- Parameters:
promotionId-StringPromotion ID- Returns:
PromotionsTiersGetResponseBodyGet Promotion Tier Response- Throws:
io.voucherify.client.ApiException- throw exception in case of execution issue
-
deletePromotionTier
This method invokes voucherify api and Deletes Promotion Tier- Parameters:
promotionId-StringPromotion ID- Throws:
io.voucherify.client.ApiException- throw exception in case of execution issue
-
addPromotionTierToCampaign
public io.voucherify.client.model.PromotionsTiersCreateResponseBody addPromotionTierToCampaign(String campaignId, io.voucherify.client.model.PromotionsTiersCreateRequestBody requestBody) throws io.voucherify.client.ApiException This method invokes voucherify api and Adds Promotion Tier to campaign- Parameters:
campaignId-StringCampaign IdrequestBody-PromotionsTiersCreateRequestBodyAdd Promotion Tier Request- Returns:
PromotionsTiersCreateResponseBodyAdd Promotion Tier Response- Throws:
io.voucherify.client.ApiException- throw exception in case of execution issue
-
updatePromotionTier
public io.voucherify.client.model.PromotionsTiersUpdateResponseBody updatePromotionTier(String promotionId, io.voucherify.client.model.PromotionsTiersUpdateRequestBody requestBody) throws io.voucherify.client.ApiException This method invokes voucherify api and Updates Promotion Tier- Parameters:
promotionId-StringPromotion IDrequestBody-PromotionsTiersUpdateRequestBodyUpdate Promotion Tier Request- Returns:
PromotionsTiersUpdateResponseBodyUpdate Promotion Tier Response- Throws:
io.voucherify.client.ApiException- throw exception in case of execution issue
-
getVoucher
public io.voucherify.client.model.VouchersGetResponseBody getVoucher(String voucherId) throws io.voucherify.client.ApiException This method invokes voucherify api and Gets voucher- Parameters:
voucherId-StringVoucher Id- Returns:
VouchersGetResponseBodyGet Voucher Response- Throws:
io.voucherify.client.ApiException- throw exception in case of execution issue
-
deleteVoucher
This method invokes voucherify api and Deletes voucher- Parameters:
voucherId-StringVoucher Idforce-booleanForce Delete Flag- Throws:
io.voucherify.client.ApiException- throw exception in case of execution issue
-
getVouchers
public io.voucherify.client.model.VouchersListResponseBody getVouchers(Integer limit, Integer page, String category, String campaignId, String customer, String campaign, io.voucherify.client.model.ParameterCreatedBeforeAfter createdAt, io.voucherify.client.model.ParameterUpdatedBeforeAfter updatedAt, io.voucherify.client.model.ParameterOrderVouchers order, String code, List<String> ids) throws io.voucherify.client.ApiException Fetches a list of vouchers based on the provided filters and parameters.- Parameters:
limit- The maximum number of vouchers to return in the response. (Optional)page- The page number to retrieve. (Optional)category- The category of vouchers to filter by. (Optional)campaignId- The ID of the campaign to filter vouchers by. (Optional)customer- The customer ID to filter vouchers by. (Optional)campaign- The name of the campaign to filter vouchers by. (Optional)createdAt- The creation date filter for vouchers. Accepts before or after parameters. (Optional)updatedAt- The last updated date filter for vouchers. Accepts before or after parameters. (Optional)order- The order in which to return the vouchers (e.g., ascending or descending). (Optional)code- A specific voucher code to search for. (Optional)ids- A list of voucher IDs to filter by. (Optional)- Returns:
- A
VouchersListResponseBodycontaining the list of vouchers and associated metadata. - Throws:
io.voucherify.client.ApiException- If an error occurs while fetching the vouchers from the API.
-
getValidationRule
public io.voucherify.client.model.ValidationRulesGetResponseBody getValidationRule(String ruleId) throws io.voucherify.client.ApiException This method invokes voucherify api and Gets Validation Rules- Parameters:
ruleId-StringRuleId- Returns:
ValidationRulesGetResponseBodyGet Validation Rules Response- Throws:
io.voucherify.client.ApiException- throw exception in case of execution issue
-
createProduct
public io.voucherify.client.model.ProductsCreateResponseBody createProduct(io.voucherify.client.model.ProductsCreateRequestBody requestBody) throws io.voucherify.client.ApiException This method invokes voucherify api and Creates Product- Parameters:
requestBody-ProductsCreateRequestBodyRuleId- Returns:
ProductsCreateResponseBodyCreate Product Response- Throws:
io.voucherify.client.ApiException- throw exception in case of execution issue
-
deleteProduct
This method invokes voucherify api and delete Product- Parameters:
productId-force-- Throws:
io.voucherify.client.ApiException
-
updateProduct
public io.voucherify.client.model.ProductsUpdateResponseBody updateProduct(String productId, io.voucherify.client.model.ProductsUpdateRequestBody requestBody) throws io.voucherify.client.ApiException This method invokes voucherify api and Updates Product- Parameters:
productId-StringProduct IDrequestBody-ProductsUpdateRequestBodyUpdate Product Request- Returns:
ProductsUpdateResponseBodyUpdate Product Response- Throws:
io.voucherify.client.ApiException- throw exception in case of execution issue
-
createSku
public io.voucherify.client.model.ProductsSkusCreateResponseBody createSku(String productId, io.voucherify.client.model.ProductsSkusCreateRequestBody requestBody) throws io.voucherify.client.ApiException This method invokes voucherify api and Creates Product SKU- Parameters:
productId-StringProduct IDrequestBody-ProductsSkusCreateRequestBodyCreate Product SKU Request- Returns:
ProductsSkusCreateResponseBodyCreate Product SKU Response- Throws:
io.voucherify.client.ApiException- throw exception in case of execution issue
-
getProduct
public io.voucherify.client.model.ProductsGetResponseBody getProduct(String productId) throws io.voucherify.client.ApiException This method invokes voucherify api and Gets product- Parameters:
productId-StringProduct ID- Returns:
ProductsGetResponseBodyGet Product Response- Throws:
io.voucherify.client.ApiException- throw exception in case of execution issue
-
createExport
public io.voucherify.client.model.ExportsCreateResponseBody createExport(io.voucherify.client.model.ExportsCreateRequestBody requestBody) throws io.voucherify.client.ApiException Creates a new export using the provided request body.- Parameters:
requestBody- the request body containing the export details.- Returns:
- an
ExportsCreateResponseBodyrepresenting the response from the export creation request. - Throws:
io.voucherify.client.ApiException- if an error occurs during the API call to create the export.
-
getExport
public io.voucherify.client.model.ExportsGetResponseBody getExport(String exportId) throws io.voucherify.client.ApiException Retrieves the details of an existing export using the specified export ID.- Parameters:
exportId- the ID of the export to retrieve.- Returns:
- an
ExportsGetResponseBodycontaining the details of the requested export. - Throws:
io.voucherify.client.ApiException- if an error occurs during the API call to fetch the export details.
-
getProductCollection
public io.voucherify.client.model.ProductCollectionsGetResponseBody getProductCollection(String productCollectionId) throws io.voucherify.client.ApiException This method retrieves the product collection for the given product collection ID.- Parameters:
productCollectionId- The unique identifier of the product collection.- Returns:
- A
ProductCollectionsGetResponseBodyobject containing the details of the product collection. - Throws:
io.voucherify.client.ApiException- if there is an error when trying to retrieve the product collection.
-
createVoucher
public io.voucherify.client.model.VouchersCreateResponseBody createVoucher(String code, io.voucherify.client.model.VouchersCreateWithSpecificCodeRequestBody requestBody) throws io.voucherify.client.ApiException This method invokes voucherify api and Creates campaign- Parameters:
requestBody-VouchersCreateWithSpecificCodeRequestBodyCreate Campaign Request- Returns:
VouchersCreateResponseBodyCreate Campaign Response- Throws:
io.voucherify.client.ApiException- throw exception in case of execution issue
-
createValidationRule
public io.voucherify.client.model.ValidationRulesCreateResponseBody createValidationRule(io.voucherify.client.model.ValidationRulesCreateRequestBody requestBody) throws io.voucherify.client.ApiException Creates a new validation rule by calling the underlying validation rules API.- Parameters:
requestBody- the request body containing the details of the validation rule to be created.- Returns:
- a
ValidationRulesCreateResponseBodyobject containing the response details of the created validation rule. - Throws:
io.voucherify.client.ApiException- if an error occurs while creating the validation rule.
-
createValidationRuleAssignment
public io.voucherify.client.model.ValidationRulesAssignmentsCreateResponseBody createValidationRuleAssignment(String validationRuleId, Boolean force, io.voucherify.client.model.ValidationRulesAssignmentsCreateRequestBody assignmentsCreateRequestBody) throws io.voucherify.client.ApiException Creates a new validation rule assignment by calling the underlying validation rules API.- Parameters:
validationRuleId- the ID of the validation rule to be assigned.force- a boolean indicating whether to force the creation of the assignment, even if conflicts occur.assignmentsCreateRequestBody- the request body containing the assignment details.- Returns:
- a
ValidationRulesAssignmentsCreateResponseBodyobject containing the response details of the created validation rule assignment. - Throws:
io.voucherify.client.ApiException- if an error occurs while creating the validation rule assignment.
-
addPromotionTiersToCampaign
public io.voucherify.client.model.PromotionsTiersCreateResponseBody addPromotionTiersToCampaign(String campaignId, io.voucherify.client.model.PromotionsTiersCreateRequestBody promotionsTiersCreateRequestBody) throws io.voucherify.client.ApiException Creates promotion tiers and adds them to a specific campaign.This method interacts with the external promotions API to add promotion tiers to the specified campaign. The request body contains the details for the tiers to be added, and the method returns a response containing the result of the operation.
- Parameters:
campaignId- The ID of the campaign to which the promotion tiers will be added.promotionsTiersCreateRequestBody- The request body containing the details of the promotion tiers.- Returns:
PromotionsTiersCreateResponseBodyThe response body containing the details of the created promotion tiers.- Throws:
io.voucherify.client.ApiException- If there is an error while interacting with the API or if the API returns an error response.
-
createProductCollection
public io.voucherify.client.model.ProductCollectionsCreateResponseBody createProductCollection(io.voucherify.client.model.ProductCollectionsCreateRequestBody productCollectionsCreateRequestBody) throws io.voucherify.client.ApiException Creates promotion tiers by invoking the Product Collections API.- Parameters:
productCollectionsCreateRequestBody- the request body containing details for creating product collections and promotion tiers.- Returns:
- a
ProductCollectionsCreateResponseBodyobject containing the response details from the Product Collections API. - Throws:
io.voucherify.client.ApiException- if an error occurs while invoking the API.
-
deleteValidationRule
Deletes a validation rule by its ID.This method interacts with the
validationRulesApito delete a validation rule specified by the providedvalidationRuleId. If the operation fails, anApiExceptionis thrown.- Parameters:
validationRuleId- the unique identifier of the validation rule to be deleted- Throws:
io.voucherify.client.ApiException- if an error occurs during the deletion process
-
deleteValidationRuleAssignment
public void deleteValidationRuleAssignment(String validationRuleId, String assignmentId) throws io.voucherify.client.ApiException Deletes the assignment of a validation rule.This method removes the association between a validation rule and an assignment by invoking the appropriate API. If the deletion fails, an
ApiExceptionis thrown to indicate the error.- Parameters:
validationRuleId- the unique identifier of the validation rule to be deletedassignmentId- the unique identifier of the assignment to be removed- Throws:
io.voucherify.client.ApiException- if an error occurs during the deletion process
-
updateValidationRuleAssignment
public io.voucherify.client.model.ValidationRulesUpdateResponseBody updateValidationRuleAssignment(String validationRuleId, io.voucherify.client.model.ValidationRulesUpdateRequestBody validationRulesUpdateRequestBody) throws io.voucherify.client.ApiException Updates the validation rule assignment in Voucherify using the provided validation rule ID and the update request body. It calls the underlying API method to perform the update.- Parameters:
validationRuleId- The ID of the validation rule to update.validationRulesUpdateRequestBody- The request body containing the updated validation rule data.- Returns:
- The response from the API containing the updated validation rule data.
- Throws:
io.voucherify.client.ApiException- If there is an error while making the API call.
-
updateVoucher
public io.voucherify.client.model.VouchersUpdateResponseBody updateVoucher(String voucherCode, io.voucherify.client.model.VouchersUpdateRequestBody vouchersUpdateRequestBody) throws io.voucherify.client.ApiException This method invokes voucherify api and update voucher- Parameters:
voucherCode-StringVoucher CodevouchersUpdateRequestBody-VouchersUpdateRequestBodyUpdate Voucher Request- Returns:
VouchersUpdateResponseBodyUpdate Voucher Response- Throws:
io.voucherify.client.ApiException- throw exception in case of execution issue
-
getMetadataSchema
public io.voucherify.client.model.ManagementProjectsMetadataSchemasListResponseBody getMetadataSchema(String projectId) throws io.voucherify.client.ApiException This method invokes the Voucherify Management API to retrieve the metadata schemas for a project.- Parameters:
projectId- the project identifier- Returns:
- the response body containing the list of metadata schemas
- Throws:
io.voucherify.client.ApiException- if an error occurs during the API call
-
updateMetadataSchema
public io.voucherify.client.model.ManagementProjectsMetadataSchemasUpdateResponseBody updateMetadataSchema(String projectId, String metadataSchemaId, io.voucherify.client.model.ManagementProjectsMetadataSchemasUpdateRequestBody metadataSchemasUpdateRequestBody) throws io.voucherify.client.ApiException This method invokes the Voucherify Management API to update the metadata schema for a project.- Parameters:
projectId- the project identifiermetadataSchemaId- the metadata schema identifiermetadataSchemasUpdateRequestBody- the request body containing the updated metadata schema details- Returns:
- the response body containing the updated metadata schema details
- Throws:
io.voucherify.client.ApiException- if an error occurs during the API call
-