Class RewardsApi

java.lang.Object
io.voucherify.client.api.RewardsApi

public class RewardsApi extends Object
  • Constructor Details

    • RewardsApi

      public RewardsApi()
    • RewardsApi

      public RewardsApi(ApiClient apiClient)
  • Method Details

    • getApiClient

      public ApiClient getApiClient()
    • setApiClient

      public void setApiClient(ApiClient apiClient)
    • getHostIndex

      public int getHostIndex()
    • setHostIndex

      public void setHostIndex(int hostIndex)
    • getCustomBaseUrl

      public String getCustomBaseUrl()
    • setCustomBaseUrl

      public void setCustomBaseUrl(String customBaseUrl)
    • createRewardCall

      public okhttp3.Call createRewardCall(RewardsCreateRequestBody rewardsCreateRequestBody, ApiCallback _callback) throws ApiException
      Build call for createReward
      Parameters:
      rewardsCreateRequestBody - Define parameters of the new reward. (optional)
      _callback - Callback for upload/download progress
      Returns:
      Call to execute
      Throws:
      ApiException - If fail to serialize the request body object
    • createReward

      public RewardsCreateResponseBody createReward(RewardsCreateRequestBody rewardsCreateRequestBody) throws ApiException
      Create Reward Create a new reward.
      Parameters:
      rewardsCreateRequestBody - Define parameters of the new reward. (optional)
      Returns:
      RewardsCreateResponseBody
      Throws:
      ApiException - If fail to call the API, e.g. server error or cannot deserialize the response body
    • createRewardWithHttpInfo

      public ApiResponse<RewardsCreateResponseBody> createRewardWithHttpInfo(RewardsCreateRequestBody rewardsCreateRequestBody) throws ApiException
      Create Reward Create a new reward.
      Parameters:
      rewardsCreateRequestBody - Define parameters of the new reward. (optional)
      Returns:
      ApiResponse<RewardsCreateResponseBody>
      Throws:
      ApiException - If fail to call the API, e.g. server error or cannot deserialize the response body
    • createRewardAsync

      public okhttp3.Call createRewardAsync(RewardsCreateRequestBody rewardsCreateRequestBody, ApiCallback<RewardsCreateResponseBody> _callback) throws ApiException
      Create Reward (asynchronously) Create a new reward.
      Parameters:
      rewardsCreateRequestBody - Define parameters of the new reward. (optional)
      _callback - The callback to be executed when the API call finishes
      Returns:
      The request call
      Throws:
      ApiException - If fail to process the API call, e.g. serializing the request body object
    • createRewardAssignmentCall

      public okhttp3.Call createRewardAssignmentCall(String rewardId, RewardsAssignmentsCreateRequestBody rewardsAssignmentsCreateRequestBody, ApiCallback _callback) throws ApiException
      Build call for createRewardAssignment
      Parameters:
      rewardId - A unique reward ID. (required)
      rewardsAssignmentsCreateRequestBody - Provide the campaign ID of the campaign to which the reward is to be assigned and define the cost of the reward in terms of loyalty points. (optional)
      _callback - Callback for upload/download progress
      Returns:
      Call to execute
      Throws:
      ApiException - If fail to serialize the request body object
    • createRewardAssignment

      public RewardsAssignmentsCreateResponseBody createRewardAssignment(String rewardId, RewardsAssignmentsCreateRequestBody rewardsAssignmentsCreateRequestBody) throws ApiException
      Create Reward Assignment Assigns a reward to a specified loyalty campaign.
      Parameters:
      rewardId - A unique reward ID. (required)
      rewardsAssignmentsCreateRequestBody - Provide the campaign ID of the campaign to which the reward is to be assigned and define the cost of the reward in terms of loyalty points. (optional)
      Returns:
      RewardsAssignmentsCreateResponseBody
      Throws:
      ApiException - If fail to call the API, e.g. server error or cannot deserialize the response body
    • createRewardAssignmentWithHttpInfo

      public ApiResponse<RewardsAssignmentsCreateResponseBody> createRewardAssignmentWithHttpInfo(String rewardId, RewardsAssignmentsCreateRequestBody rewardsAssignmentsCreateRequestBody) throws ApiException
      Create Reward Assignment Assigns a reward to a specified loyalty campaign.
      Parameters:
      rewardId - A unique reward ID. (required)
      rewardsAssignmentsCreateRequestBody - Provide the campaign ID of the campaign to which the reward is to be assigned and define the cost of the reward in terms of loyalty points. (optional)
      Returns:
      ApiResponse<RewardsAssignmentsCreateResponseBody>
      Throws:
      ApiException - If fail to call the API, e.g. server error or cannot deserialize the response body
    • createRewardAssignmentAsync

      public okhttp3.Call createRewardAssignmentAsync(String rewardId, RewardsAssignmentsCreateRequestBody rewardsAssignmentsCreateRequestBody, ApiCallback<RewardsAssignmentsCreateResponseBody> _callback) throws ApiException
      Create Reward Assignment (asynchronously) Assigns a reward to a specified loyalty campaign.
      Parameters:
      rewardId - A unique reward ID. (required)
      rewardsAssignmentsCreateRequestBody - Provide the campaign ID of the campaign to which the reward is to be assigned and define the cost of the reward in terms of loyalty points. (optional)
      _callback - The callback to be executed when the API call finishes
      Returns:
      The request call
      Throws:
      ApiException - If fail to process the API call, e.g. serializing the request body object
    • deleteRewardCall

      public okhttp3.Call deleteRewardCall(String rewardId, ApiCallback _callback) throws ApiException
      Build call for deleteReward
      Parameters:
      rewardId - A unique reward ID. (required)
      _callback - Callback for upload/download progress
      Returns:
      Call to execute
      Throws:
      ApiException - If fail to serialize the request body object
    • deleteReward

      public void deleteReward(String rewardId) throws ApiException
      Delete Reward Delete a reward.
      Parameters:
      rewardId - A unique reward ID. (required)
      Throws:
      ApiException - If fail to call the API, e.g. server error or cannot deserialize the response body
    • deleteRewardWithHttpInfo

      public ApiResponse<Void> deleteRewardWithHttpInfo(String rewardId) throws ApiException
      Delete Reward Delete a reward.
      Parameters:
      rewardId - A unique reward ID. (required)
      Returns:
      ApiResponse<Void>
      Throws:
      ApiException - If fail to call the API, e.g. server error or cannot deserialize the response body
    • deleteRewardAsync

      public okhttp3.Call deleteRewardAsync(String rewardId, ApiCallback<Void> _callback) throws ApiException
      Delete Reward (asynchronously) Delete a reward.
      Parameters:
      rewardId - A unique reward ID. (required)
      _callback - The callback to be executed when the API call finishes
      Returns:
      The request call
      Throws:
      ApiException - If fail to process the API call, e.g. serializing the request body object
    • deleteRewardAssignmentCall

      public okhttp3.Call deleteRewardAssignmentCall(String rewardId, String assignmentId, ApiCallback _callback) throws ApiException
      Build call for deleteRewardAssignment
      Parameters:
      rewardId - A unique reward ID. (required)
      assignmentId - A unique reward assignment ID. (required)
      _callback - Callback for upload/download progress
      Returns:
      Call to execute
      Throws:
      ApiException - If fail to serialize the request body object
    • deleteRewardAssignment

      public void deleteRewardAssignment(String rewardId, String assignmentId) throws ApiException
      Delete Reward Assignment This method deletes a reward assignment for a particular reward.
      Parameters:
      rewardId - A unique reward ID. (required)
      assignmentId - A unique reward assignment ID. (required)
      Throws:
      ApiException - If fail to call the API, e.g. server error or cannot deserialize the response body
    • deleteRewardAssignmentWithHttpInfo

      public ApiResponse<Void> deleteRewardAssignmentWithHttpInfo(String rewardId, String assignmentId) throws ApiException
      Delete Reward Assignment This method deletes a reward assignment for a particular reward.
      Parameters:
      rewardId - A unique reward ID. (required)
      assignmentId - A unique reward assignment ID. (required)
      Returns:
      ApiResponse<Void>
      Throws:
      ApiException - If fail to call the API, e.g. server error or cannot deserialize the response body
    • deleteRewardAssignmentAsync

      public okhttp3.Call deleteRewardAssignmentAsync(String rewardId, String assignmentId, ApiCallback<Void> _callback) throws ApiException
      Delete Reward Assignment (asynchronously) This method deletes a reward assignment for a particular reward.
      Parameters:
      rewardId - A unique reward ID. (required)
      assignmentId - A unique reward assignment ID. (required)
      _callback - The callback to be executed when the API call finishes
      Returns:
      The request call
      Throws:
      ApiException - If fail to process the API call, e.g. serializing the request body object
    • getRewardCall

      public okhttp3.Call getRewardCall(String rewardId, ApiCallback _callback) throws ApiException
      Build call for getReward
      Parameters:
      rewardId - A unique reward ID. (required)
      _callback - Callback for upload/download progress
      Returns:
      Call to execute
      Throws:
      ApiException - If fail to serialize the request body object
    • getReward

      public Reward getReward(String rewardId) throws ApiException
      Get Reward Retrieve a reward by the reward ID.
      Parameters:
      rewardId - A unique reward ID. (required)
      Returns:
      Reward
      Throws:
      ApiException - If fail to call the API, e.g. server error or cannot deserialize the response body
    • getRewardWithHttpInfo

      public ApiResponse<Reward> getRewardWithHttpInfo(String rewardId) throws ApiException
      Get Reward Retrieve a reward by the reward ID.
      Parameters:
      rewardId - A unique reward ID. (required)
      Returns:
      ApiResponse<Reward>
      Throws:
      ApiException - If fail to call the API, e.g. server error or cannot deserialize the response body
    • getRewardAsync

      public okhttp3.Call getRewardAsync(String rewardId, ApiCallback<Reward> _callback) throws ApiException
      Get Reward (asynchronously) Retrieve a reward by the reward ID.
      Parameters:
      rewardId - A unique reward ID. (required)
      _callback - The callback to be executed when the API call finishes
      Returns:
      The request call
      Throws:
      ApiException - If fail to process the API call, e.g. serializing the request body object
    • getRewardAssignmentCall

      public okhttp3.Call getRewardAssignmentCall(String rewardId, String assignmentId, ApiCallback _callback) throws ApiException
      Build call for getRewardAssignment
      Parameters:
      rewardId - A unique reward ID. (required)
      assignmentId - A unique reward assignment ID. (required)
      _callback - Callback for upload/download progress
      Returns:
      Call to execute
      Throws:
      ApiException - If fail to serialize the request body object
    • getRewardAssignment

      public RewardsAssignmentsGetResponseBody getRewardAssignment(String rewardId, String assignmentId) throws ApiException
      Get Reward Assignment Retrieve a reward assignment.
      Parameters:
      rewardId - A unique reward ID. (required)
      assignmentId - A unique reward assignment ID. (required)
      Returns:
      RewardsAssignmentsGetResponseBody
      Throws:
      ApiException - If fail to call the API, e.g. server error or cannot deserialize the response body
    • getRewardAssignmentWithHttpInfo

      public ApiResponse<RewardsAssignmentsGetResponseBody> getRewardAssignmentWithHttpInfo(String rewardId, String assignmentId) throws ApiException
      Get Reward Assignment Retrieve a reward assignment.
      Parameters:
      rewardId - A unique reward ID. (required)
      assignmentId - A unique reward assignment ID. (required)
      Returns:
      ApiResponse<RewardsAssignmentsGetResponseBody>
      Throws:
      ApiException - If fail to call the API, e.g. server error or cannot deserialize the response body
    • getRewardAssignmentAsync

      public okhttp3.Call getRewardAssignmentAsync(String rewardId, String assignmentId, ApiCallback<RewardsAssignmentsGetResponseBody> _callback) throws ApiException
      Get Reward Assignment (asynchronously) Retrieve a reward assignment.
      Parameters:
      rewardId - A unique reward ID. (required)
      assignmentId - A unique reward assignment ID. (required)
      _callback - The callback to be executed when the API call finishes
      Returns:
      The request call
      Throws:
      ApiException - If fail to process the API call, e.g. serializing the request body object
    • listRewardAssignmentsCall

      public okhttp3.Call listRewardAssignmentsCall(String rewardId, Integer limit, Integer page, ApiCallback _callback) throws ApiException
      Build call for listRewardAssignments
      Parameters:
      rewardId - A unique reward ID. (required)
      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. (optional)
      page - Which page of results to return. The lowest value is 1. (optional)
      _callback - Callback for upload/download progress
      Returns:
      Call to execute
      Throws:
      ApiException - If fail to serialize the request body object
    • listRewardAssignments

      public RewardsAssignmentsListResponseBody listRewardAssignments(String rewardId, Integer limit, Integer page) throws ApiException
      List Reward Assignments Retrieve reward assignments by the reward ID.
      Parameters:
      rewardId - A unique reward ID. (required)
      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. (optional)
      page - Which page of results to return. The lowest value is 1. (optional)
      Returns:
      RewardsAssignmentsListResponseBody
      Throws:
      ApiException - If fail to call the API, e.g. server error or cannot deserialize the response body
    • listRewardAssignmentsWithHttpInfo

      public ApiResponse<RewardsAssignmentsListResponseBody> listRewardAssignmentsWithHttpInfo(String rewardId, Integer limit, Integer page) throws ApiException
      List Reward Assignments Retrieve reward assignments by the reward ID.
      Parameters:
      rewardId - A unique reward ID. (required)
      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. (optional)
      page - Which page of results to return. The lowest value is 1. (optional)
      Returns:
      ApiResponse<RewardsAssignmentsListResponseBody>
      Throws:
      ApiException - If fail to call the API, e.g. server error or cannot deserialize the response body
    • listRewardAssignmentsAsync

      public okhttp3.Call listRewardAssignmentsAsync(String rewardId, Integer limit, Integer page, ApiCallback<RewardsAssignmentsListResponseBody> _callback) throws ApiException
      List Reward Assignments (asynchronously) Retrieve reward assignments by the reward ID.
      Parameters:
      rewardId - A unique reward ID. (required)
      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. (optional)
      page - Which page of results to return. The lowest value is 1. (optional)
      _callback - The callback to be executed when the API call finishes
      Returns:
      The request call
      Throws:
      ApiException - If fail to process the API call, e.g. serializing the request body object
    • listRewardsCall

      public okhttp3.Call listRewardsCall(Integer limit, Integer page, String assignmentId, ApiCallback _callback) throws ApiException
      Build call for listRewards
      Parameters:
      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. (optional)
      page - Which page of results to return. The lowest value is 1. (optional)
      assignmentId - A unique reward assignment ID. Use this parameter to get the reward details in the context of an assignment ID. (optional)
      _callback - Callback for upload/download progress
      Returns:
      Call to execute
      Throws:
      ApiException - If fail to serialize the request body object
    • listRewards

      public RewardsListResponseBody listRewards(Integer limit, Integer page, String assignmentId) throws ApiException
      List Rewards Retrieve rewards.
      Parameters:
      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. (optional)
      page - Which page of results to return. The lowest value is 1. (optional)
      assignmentId - A unique reward assignment ID. Use this parameter to get the reward details in the context of an assignment ID. (optional)
      Returns:
      RewardsListResponseBody
      Throws:
      ApiException - If fail to call the API, e.g. server error or cannot deserialize the response body
    • listRewardsWithHttpInfo

      public ApiResponse<RewardsListResponseBody> listRewardsWithHttpInfo(Integer limit, Integer page, String assignmentId) throws ApiException
      List Rewards Retrieve rewards.
      Parameters:
      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. (optional)
      page - Which page of results to return. The lowest value is 1. (optional)
      assignmentId - A unique reward assignment ID. Use this parameter to get the reward details in the context of an assignment ID. (optional)
      Returns:
      ApiResponse<RewardsListResponseBody>
      Throws:
      ApiException - If fail to call the API, e.g. server error or cannot deserialize the response body
    • listRewardsAsync

      public okhttp3.Call listRewardsAsync(Integer limit, Integer page, String assignmentId, ApiCallback<RewardsListResponseBody> _callback) throws ApiException
      List Rewards (asynchronously) Retrieve rewards.
      Parameters:
      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. (optional)
      page - Which page of results to return. The lowest value is 1. (optional)
      assignmentId - A unique reward assignment ID. Use this parameter to get the reward details in the context of an assignment ID. (optional)
      _callback - The callback to be executed when the API call finishes
      Returns:
      The request call
      Throws:
      ApiException - If fail to process the API call, e.g. serializing the request body object
    • updateRewardCall

      public okhttp3.Call updateRewardCall(String rewardId, RewardsUpdateRequestBody rewardsUpdateRequestBody, ApiCallback _callback) throws ApiException
      Build call for updateReward
      Parameters:
      rewardId - A unique reward ID. (required)
      rewardsUpdateRequestBody - Define the parameters to be updated for the reward. (optional)
      _callback - Callback for upload/download progress
      Returns:
      Call to execute
      Throws:
      ApiException - If fail to serialize the request body object
    • updateReward

      public RewardsUpdateResponseBody updateReward(String rewardId, RewardsUpdateRequestBody rewardsUpdateRequestBody) throws ApiException
      Update Reward Update the details of a reward.
      Parameters:
      rewardId - A unique reward ID. (required)
      rewardsUpdateRequestBody - Define the parameters to be updated for the reward. (optional)
      Returns:
      RewardsUpdateResponseBody
      Throws:
      ApiException - If fail to call the API, e.g. server error or cannot deserialize the response body
    • updateRewardWithHttpInfo

      public ApiResponse<RewardsUpdateResponseBody> updateRewardWithHttpInfo(String rewardId, RewardsUpdateRequestBody rewardsUpdateRequestBody) throws ApiException
      Update Reward Update the details of a reward.
      Parameters:
      rewardId - A unique reward ID. (required)
      rewardsUpdateRequestBody - Define the parameters to be updated for the reward. (optional)
      Returns:
      ApiResponse<RewardsUpdateResponseBody>
      Throws:
      ApiException - If fail to call the API, e.g. server error or cannot deserialize the response body
    • updateRewardAsync

      public okhttp3.Call updateRewardAsync(String rewardId, RewardsUpdateRequestBody rewardsUpdateRequestBody, ApiCallback<RewardsUpdateResponseBody> _callback) throws ApiException
      Update Reward (asynchronously) Update the details of a reward.
      Parameters:
      rewardId - A unique reward ID. (required)
      rewardsUpdateRequestBody - Define the parameters to be updated for the reward. (optional)
      _callback - The callback to be executed when the API call finishes
      Returns:
      The request call
      Throws:
      ApiException - If fail to process the API call, e.g. serializing the request body object
    • updateRewardAssignmentCall

      public okhttp3.Call updateRewardAssignmentCall(String rewardId, String assignmentId, RewardsAssignmentsUpdateRequestBody rewardsAssignmentsUpdateRequestBody, ApiCallback _callback) throws ApiException
      Build call for updateRewardAssignment
      Parameters:
      rewardId - A unique reward ID. (required)
      assignmentId - A unique reward assignment ID. (required)
      rewardsAssignmentsUpdateRequestBody - Define the number of points required to exchange for the reward. (optional)
      _callback - Callback for upload/download progress
      Returns:
      Call to execute
      Throws:
      ApiException - If fail to serialize the request body object
    • updateRewardAssignment

      public RewardsAssignmentsUpdateResponseBody updateRewardAssignment(String rewardId, String assignmentId, RewardsAssignmentsUpdateRequestBody rewardsAssignmentsUpdateRequestBody) throws ApiException
      Update Reward Assignment Update the number of points needed to successfully redeem the reward.
      Parameters:
      rewardId - A unique reward ID. (required)
      assignmentId - A unique reward assignment ID. (required)
      rewardsAssignmentsUpdateRequestBody - Define the number of points required to exchange for the reward. (optional)
      Returns:
      RewardsAssignmentsUpdateResponseBody
      Throws:
      ApiException - If fail to call the API, e.g. server error or cannot deserialize the response body
    • updateRewardAssignmentWithHttpInfo

      public ApiResponse<RewardsAssignmentsUpdateResponseBody> updateRewardAssignmentWithHttpInfo(String rewardId, String assignmentId, RewardsAssignmentsUpdateRequestBody rewardsAssignmentsUpdateRequestBody) throws ApiException
      Update Reward Assignment Update the number of points needed to successfully redeem the reward.
      Parameters:
      rewardId - A unique reward ID. (required)
      assignmentId - A unique reward assignment ID. (required)
      rewardsAssignmentsUpdateRequestBody - Define the number of points required to exchange for the reward. (optional)
      Returns:
      ApiResponse<RewardsAssignmentsUpdateResponseBody>
      Throws:
      ApiException - If fail to call the API, e.g. server error or cannot deserialize the response body
    • updateRewardAssignmentAsync

      public okhttp3.Call updateRewardAssignmentAsync(String rewardId, String assignmentId, RewardsAssignmentsUpdateRequestBody rewardsAssignmentsUpdateRequestBody, ApiCallback<RewardsAssignmentsUpdateResponseBody> _callback) throws ApiException
      Update Reward Assignment (asynchronously) Update the number of points needed to successfully redeem the reward.
      Parameters:
      rewardId - A unique reward ID. (required)
      assignmentId - A unique reward assignment ID. (required)
      rewardsAssignmentsUpdateRequestBody - Define the number of points required to exchange for the reward. (optional)
      _callback - The callback to be executed when the API call finishes
      Returns:
      The request call
      Throws:
      ApiException - If fail to process the API call, e.g. serializing the request body object