Class TierApi

java.lang.Object
software.xdev.brevo.client.BaseApi
software.xdev.brevo.api.TierApi

public class TierApi extends BaseApi
  • Constructor Details

    • TierApi

      public TierApi()
    • TierApi

      public TierApi(ApiClient apiClient)
  • Method Details

    • addSubscriptionToTier

      public TierForContact addSubscriptionToTier(@Nonnull UUID pid, @Nonnull UUID cid, @Nonnull UUID tid) throws ApiException
      Assign a tier Manually assigns a tier to a specific membership.
      Parameters:
      pid - Loyalty Program ID (required)
      cid - Contact ID (required)
      tid - Tier ID (required)
      Returns:
      TierForContact
      Throws:
      ApiException - if fails to make API call
    • addSubscriptionToTier

      public TierForContact addSubscriptionToTier(@Nonnull UUID pid, @Nonnull UUID cid, @Nonnull UUID tid, Map<String,String> additionalHeaders) throws ApiException
      Assign a tier Manually assigns a tier to a specific membership.
      Parameters:
      pid - Loyalty Program ID (required)
      cid - Contact ID (required)
      tid - Tier ID (required)
      additionalHeaders - additionalHeaders for this call
      Returns:
      TierForContact
      Throws:
      ApiException - if fails to make API call
    • createTierForTierGroup

      public Tier createTierForTierGroup(@Nonnull UUID pid, @Nonnull UUID gid, @Nonnull TierRequest tierRequest) throws ApiException
      Create a tier Creates a new tier in a loyalty program tier group. *(The changes will take effect with the next publication of the loyalty program)*
      Parameters:
      pid - Loyalty Program ID (required)
      gid - Tier group ID (required)
      tierRequest - (required)
      Returns:
      Tier
      Throws:
      ApiException - if fails to make API call
    • createTierForTierGroup

      public Tier createTierForTierGroup(@Nonnull UUID pid, @Nonnull UUID gid, @Nonnull TierRequest tierRequest, Map<String,String> additionalHeaders) throws ApiException
      Create a tier Creates a new tier in a loyalty program tier group. *(The changes will take effect with the next publication of the loyalty program)*
      Parameters:
      pid - Loyalty Program ID (required)
      gid - Tier group ID (required)
      tierRequest - (required)
      additionalHeaders - additionalHeaders for this call
      Returns:
      Tier
      Throws:
      ApiException - if fails to make API call
    • createTierGroup

      public TierGroup createTierGroup(@Nonnull UUID pid, @Nonnull CreateTierGroupRequest createTierGroupRequest) throws ApiException
      Create a tier group Creates a new tier group in a loyalty program. *(The changes will take effect with the next publication of the loyalty program)*
      Parameters:
      pid - Loyalty Program ID (required)
      createTierGroupRequest - Tier group creation payload (required)
      Returns:
      TierGroup
      Throws:
      ApiException - if fails to make API call
    • createTierGroup

      public TierGroup createTierGroup(@Nonnull UUID pid, @Nonnull CreateTierGroupRequest createTierGroupRequest, Map<String,String> additionalHeaders) throws ApiException
      Create a tier group Creates a new tier group in a loyalty program. *(The changes will take effect with the next publication of the loyalty program)*
      Parameters:
      pid - Loyalty Program ID (required)
      createTierGroupRequest - Tier group creation payload (required)
      additionalHeaders - additionalHeaders for this call
      Returns:
      TierGroup
      Throws:
      ApiException - if fails to make API call
    • deleteTier

      public String deleteTier(@Nonnull UUID pid, @Nonnull UUID tid) throws ApiException
      Delete tier Deletes a tier from a loyalty program tier group. *(The changes will take effect with the next publication of the loyalty program)*
      Parameters:
      pid - Loyalty Program ID (required)
      tid - Tier ID (required)
      Returns:
      String
      Throws:
      ApiException - if fails to make API call
    • deleteTier

      public String deleteTier(@Nonnull UUID pid, @Nonnull UUID tid, Map<String,String> additionalHeaders) throws ApiException
      Delete tier Deletes a tier from a loyalty program tier group. *(The changes will take effect with the next publication of the loyalty program)*
      Parameters:
      pid - Loyalty Program ID (required)
      tid - Tier ID (required)
      additionalHeaders - additionalHeaders for this call
      Returns:
      String
      Throws:
      ApiException - if fails to make API call
    • deleteTierGroup

      public String deleteTierGroup(@Nonnull UUID pid, @Nonnull UUID gid) throws ApiException
      Delete tier group Deletes a tier group from a loyalty program. *(The changes will take effect with the next publication of the loyalty program)*
      Parameters:
      pid - Loyalty Program ID (required)
      gid - Tier group ID (required)
      Returns:
      String
      Throws:
      ApiException - if fails to make API call
    • deleteTierGroup

      public String deleteTierGroup(@Nonnull UUID pid, @Nonnull UUID gid, Map<String,String> additionalHeaders) throws ApiException
      Delete tier group Deletes a tier group from a loyalty program. *(The changes will take effect with the next publication of the loyalty program)*
      Parameters:
      pid - Loyalty Program ID (required)
      gid - Tier group ID (required)
      additionalHeaders - additionalHeaders for this call
      Returns:
      String
      Throws:
      ApiException - if fails to make API call
    • getListOfTierGroups

      public TierGroupPage getListOfTierGroups(@Nonnull UUID pid, @Nullable String version) throws ApiException
      List tier groups Returns the list of tier groups defined within the loyalty program.
      Parameters:
      pid - Loyalty Program ID (required)
      version - Select 'active' to retrieve list of all tier groups which are live for clients. Select draft to retrieve list of all non deleted tier groups. (optional, default to draft)
      Returns:
      TierGroupPage
      Throws:
      ApiException - if fails to make API call
    • getListOfTierGroups

      public TierGroupPage getListOfTierGroups(@Nonnull UUID pid, @Nullable String version, Map<String,String> additionalHeaders) throws ApiException
      List tier groups Returns the list of tier groups defined within the loyalty program.
      Parameters:
      pid - Loyalty Program ID (required)
      version - Select 'active' to retrieve list of all tier groups which are live for clients. Select draft to retrieve list of all non deleted tier groups. (optional, default to draft)
      additionalHeaders - additionalHeaders for this call
      Returns:
      TierGroupPage
      Throws:
      ApiException - if fails to make API call
    • getLoyaltyProgramTier

      public LoyaltyTierPage getLoyaltyProgramTier(@Nonnull UUID pid, @Nullable String version) throws ApiException
      List tiers Returns the list of tiers defined within the loyalty program.
      Parameters:
      pid - Loyalty Program ID (required)
      version - Select 'active' to retrieve list of all tiers which are live for clients. Select draft to retrieve list of all non deleted tiers. (optional, default to draft)
      Returns:
      LoyaltyTierPage
      Throws:
      ApiException - if fails to make API call
    • getLoyaltyProgramTier

      public LoyaltyTierPage getLoyaltyProgramTier(@Nonnull UUID pid, @Nullable String version, Map<String,String> additionalHeaders) throws ApiException
      List tiers Returns the list of tiers defined within the loyalty program.
      Parameters:
      pid - Loyalty Program ID (required)
      version - Select 'active' to retrieve list of all tiers which are live for clients. Select draft to retrieve list of all non deleted tiers. (optional, default to draft)
      additionalHeaders - additionalHeaders for this call
      Returns:
      LoyaltyTierPage
      Throws:
      ApiException - if fails to make API call
    • getTierGroup

      public TierGroup getTierGroup(@Nonnull UUID pid, @Nonnull UUID gid, @Nullable String version) throws ApiException
      Get tier group Returns tier group information.
      Parameters:
      pid - Loyalty Program ID (required)
      gid - Tier group ID (required)
      version - Select active to retrieve active version of tier group. Select draft to retrieve latest changes in tier group. (optional, default to draft)
      Returns:
      TierGroup
      Throws:
      ApiException - if fails to make API call
    • getTierGroup

      public TierGroup getTierGroup(@Nonnull UUID pid, @Nonnull UUID gid, @Nullable String version, Map<String,String> additionalHeaders) throws ApiException
      Get tier group Returns tier group information.
      Parameters:
      pid - Loyalty Program ID (required)
      gid - Tier group ID (required)
      version - Select active to retrieve active version of tier group. Select draft to retrieve latest changes in tier group. (optional, default to draft)
      additionalHeaders - additionalHeaders for this call
      Returns:
      TierGroup
      Throws:
      ApiException - if fails to make API call
    • updateTier

      public Tier updateTier(@Nonnull UUID pid, @Nonnull UUID tid, @Nonnull TierRequestPutPayload tierRequestPutPayload) throws ApiException
      Update tier Modifies an existing tier for the specified tier group *(The changes will take effect with the next publication of the loyalty program)*
      Parameters:
      pid - Loyalty Program ID (required)
      tid - Tier ID (required)
      tierRequestPutPayload - (required)
      Returns:
      Tier
      Throws:
      ApiException - if fails to make API call
    • updateTier

      public Tier updateTier(@Nonnull UUID pid, @Nonnull UUID tid, @Nonnull TierRequestPutPayload tierRequestPutPayload, Map<String,String> additionalHeaders) throws ApiException
      Update tier Modifies an existing tier for the specified tier group *(The changes will take effect with the next publication of the loyalty program)*
      Parameters:
      pid - Loyalty Program ID (required)
      tid - Tier ID (required)
      tierRequestPutPayload - (required)
      additionalHeaders - additionalHeaders for this call
      Returns:
      Tier
      Throws:
      ApiException - if fails to make API call
    • updateTierGroup

      public TierGroup updateTierGroup(@Nonnull UUID pid, @Nonnull UUID gid, @Nonnull UpdateTierGroupRequest updateTierGroupRequest) throws ApiException
      Update tier group Updates a tier group from a loyalty program. *(The changes will take effect with the next publication of the loyalty program)*
      Parameters:
      pid - Loyalty Program ID (required)
      gid - Tier group ID (required)
      updateTierGroupRequest - Tier group update payload (required)
      Returns:
      TierGroup
      Throws:
      ApiException - if fails to make API call
    • updateTierGroup

      public TierGroup updateTierGroup(@Nonnull UUID pid, @Nonnull UUID gid, @Nonnull UpdateTierGroupRequest updateTierGroupRequest, Map<String,String> additionalHeaders) throws ApiException
      Update tier group Updates a tier group from a loyalty program. *(The changes will take effect with the next publication of the loyalty program)*
      Parameters:
      pid - Loyalty Program ID (required)
      gid - Tier group ID (required)
      updateTierGroupRequest - Tier group update payload (required)
      additionalHeaders - additionalHeaders for this call
      Returns:
      TierGroup
      Throws:
      ApiException - if fails to make API call
    • invokeAPI

      public <T> T invokeAPI(String url, String method, Object request, com.fasterxml.jackson.core.type.TypeReference<T> returnType, Map<String,String> additionalHeaders) throws ApiException
      Description copied from class: BaseApi
      Directly invoke the API for the given URL. Useful if the API returns direct links/URLs for subsequent requests.
      Specified by:
      invokeAPI in class BaseApi
      Parameters:
      url - The URL for the request, either full URL or only the path.
      method - The HTTP method for the request.
      request - The request object.
      returnType - The return type.
      additionalHeaders - Additional headers for the request.
      Returns:
      The API response in the specified type.
      Throws:
      ApiException - if fails to make API call.