Class VoucherifyManagementService

java.lang.Object
org.bhn.promotion.voucherify.service.VoucherifyManagementService

@Service public class VoucherifyManagementService extends Object
Service class for managing metadata schemas in a Voucherify project.

This class uses the VoucherifyClient to interact with Voucherify APIs, providing functionalities to retrieve and update metadata schemas for a specific project.

  • Field Details

  • Constructor Details

    • VoucherifyManagementService

      public VoucherifyManagementService()
  • Method Details

    • getMetadataSchema

      public io.voucherify.client.model.ManagementProjectsMetadataSchemasListResponseBody getMetadataSchema() throws VoucherifyApiException
      Get metadata schema for a specific project.
      Returns:
      the metadata schema
      Throws:
      VoucherifyApiException - if an error occurs while fetching the metadata schema
    • updateTenantNameInMetadataSchema

      public io.voucherify.client.model.ManagementProjectsMetadataSchemasUpdateResponseBody updateTenantNameInMetadataSchema(String metadataSchemaId, List<Object> tenantNames, boolean isOptional) throws VoucherifyApiException
      Update tenant names in metadata schema for a specific project.
      Parameters:
      metadataSchemaId - the ID of the metadata schema
      tenantNames - the list of tenant names to update
      Returns:
      the updated metadata schema
      Throws:
      VoucherifyApiException - if an error occurs while updating the metadata schema