public interface LoyaltyApi
CreateLoyaltyAccountResponse createLoyaltyAccount(CreateLoyaltyAccountRequest body) throws ApiException, IOException
body - Required parameter: An object containing the fields to POST for the request.
See the corresponding object definition for field details.ApiException - Represents error response from the server.IOException - Signals that an I/O exception of some sort has occurred.CompletableFuture<CreateLoyaltyAccountResponse> createLoyaltyAccountAsync(CreateLoyaltyAccountRequest body)
body - Required parameter: An object containing the fields to POST for the request.
See the corresponding object definition for field details.SearchLoyaltyAccountsResponse searchLoyaltyAccounts(SearchLoyaltyAccountsRequest body) throws ApiException, IOException
body - Required parameter: An object containing the fields to POST for the request.
See the corresponding object definition for field details.ApiException - Represents error response from the server.IOException - Signals that an I/O exception of some sort has occurred.CompletableFuture<SearchLoyaltyAccountsResponse> searchLoyaltyAccountsAsync(SearchLoyaltyAccountsRequest body)
body - Required parameter: An object containing the fields to POST for the request.
See the corresponding object definition for field details.RetrieveLoyaltyAccountResponse retrieveLoyaltyAccount(String accountId) throws ApiException, IOException
accountId - Required parameter: The ID of the [loyalty account](entity:LoyaltyAccount)
to retrieve.ApiException - Represents error response from the server.IOException - Signals that an I/O exception of some sort has occurred.CompletableFuture<RetrieveLoyaltyAccountResponse> retrieveLoyaltyAccountAsync(String accountId)
accountId - Required parameter: The ID of the [loyalty account](entity:LoyaltyAccount)
to retrieve.AccumulateLoyaltyPointsResponse accumulateLoyaltyPoints(String accountId, AccumulateLoyaltyPointsRequest body) throws ApiException, IOException
accountId - Required parameter: The ID of the target [loyalty
account](entity:LoyaltyAccount).body - Required parameter: An object containing the fields to POST for the request.
See the corresponding object definition for field details.ApiException - Represents error response from the server.IOException - Signals that an I/O exception of some sort has occurred.CompletableFuture<AccumulateLoyaltyPointsResponse> accumulateLoyaltyPointsAsync(String accountId, AccumulateLoyaltyPointsRequest body)
accountId - Required parameter: The ID of the target [loyalty
account](entity:LoyaltyAccount).body - Required parameter: An object containing the fields to POST for the request.
See the corresponding object definition for field details.AdjustLoyaltyPointsResponse adjustLoyaltyPoints(String accountId, AdjustLoyaltyPointsRequest body) throws ApiException, IOException
accountId - Required parameter: The ID of the target [loyalty
account](entity:LoyaltyAccount).body - Required parameter: An object containing the fields to POST for the request.
See the corresponding object definition for field details.ApiException - Represents error response from the server.IOException - Signals that an I/O exception of some sort has occurred.CompletableFuture<AdjustLoyaltyPointsResponse> adjustLoyaltyPointsAsync(String accountId, AdjustLoyaltyPointsRequest body)
accountId - Required parameter: The ID of the target [loyalty
account](entity:LoyaltyAccount).body - Required parameter: An object containing the fields to POST for the request.
See the corresponding object definition for field details.SearchLoyaltyEventsResponse searchLoyaltyEvents(SearchLoyaltyEventsRequest body) throws ApiException, IOException
body - Required parameter: An object containing the fields to POST for the request.
See the corresponding object definition for field details.ApiException - Represents error response from the server.IOException - Signals that an I/O exception of some sort has occurred.CompletableFuture<SearchLoyaltyEventsResponse> searchLoyaltyEventsAsync(SearchLoyaltyEventsRequest body)
body - Required parameter: An object containing the fields to POST for the request.
See the corresponding object definition for field details.@Deprecated ListLoyaltyProgramsResponse listLoyaltyPrograms() throws ApiException, IOException
ApiException - Represents error response from the server.IOException - Signals that an I/O exception of some sort has occurred.@Deprecated CompletableFuture<ListLoyaltyProgramsResponse> listLoyaltyProgramsAsync()
RetrieveLoyaltyProgramResponse retrieveLoyaltyProgram(String programId) throws ApiException, IOException
programId - Required parameter: The ID of the loyalty program or the keyword `main`.
Either value can be used to retrieve the single loyalty program that belongs to the
seller.ApiException - Represents error response from the server.IOException - Signals that an I/O exception of some sort has occurred.CompletableFuture<RetrieveLoyaltyProgramResponse> retrieveLoyaltyProgramAsync(String programId)
programId - Required parameter: The ID of the loyalty program or the keyword `main`.
Either value can be used to retrieve the single loyalty program that belongs to the
seller.CalculateLoyaltyPointsResponse calculateLoyaltyPoints(String programId, CalculateLoyaltyPointsRequest body) throws ApiException, IOException
programId - Required parameter: The ID of the [loyalty
program](entity:LoyaltyProgram), which defines the rules for accruing points.body - Required parameter: An object containing the fields to POST for the request.
See the corresponding object definition for field details.ApiException - Represents error response from the server.IOException - Signals that an I/O exception of some sort has occurred.CompletableFuture<CalculateLoyaltyPointsResponse> calculateLoyaltyPointsAsync(String programId, CalculateLoyaltyPointsRequest body)
programId - Required parameter: The ID of the [loyalty
program](entity:LoyaltyProgram), which defines the rules for accruing points.body - Required parameter: An object containing the fields to POST for the request.
See the corresponding object definition for field details.ListLoyaltyPromotionsResponse listLoyaltyPromotions(String programId, String status, String cursor, Integer limit) throws ApiException, IOException
programId - Required parameter: The ID of the base [loyalty
program](entity:LoyaltyProgram). To get the program ID, call
[RetrieveLoyaltyProgram](api-endpoint:Loyalty-RetrieveLoyaltyProgram) using the
`main` keyword.status - Optional parameter: The status to filter the results by. If a status is
provided, only loyalty promotions with the specified status are returned. Otherwise,
all loyalty promotions associated with the loyalty program are returned.cursor - Optional parameter: The cursor returned in the paged response from the
previous call to this endpoint. Provide this cursor to retrieve the next page of
results for your original request. For more information, see
[Pagination](https://developer.squareup.com/docs/build-basics/common-api-patterns/pagination).limit - Optional parameter: The maximum number of results to return in a single paged
response. The minimum value is 1 and the maximum value is 30. The default value is
30. For more information, see
[Pagination](https://developer.squareup.com/docs/build-basics/common-api-patterns/pagination).ApiException - Represents error response from the server.IOException - Signals that an I/O exception of some sort has occurred.CompletableFuture<ListLoyaltyPromotionsResponse> listLoyaltyPromotionsAsync(String programId, String status, String cursor, Integer limit)
programId - Required parameter: The ID of the base [loyalty
program](entity:LoyaltyProgram). To get the program ID, call
[RetrieveLoyaltyProgram](api-endpoint:Loyalty-RetrieveLoyaltyProgram) using the
`main` keyword.status - Optional parameter: The status to filter the results by. If a status is
provided, only loyalty promotions with the specified status are returned. Otherwise,
all loyalty promotions associated with the loyalty program are returned.cursor - Optional parameter: The cursor returned in the paged response from the
previous call to this endpoint. Provide this cursor to retrieve the next page of
results for your original request. For more information, see
[Pagination](https://developer.squareup.com/docs/build-basics/common-api-patterns/pagination).limit - Optional parameter: The maximum number of results to return in a single paged
response. The minimum value is 1 and the maximum value is 30. The default value is
30. For more information, see
[Pagination](https://developer.squareup.com/docs/build-basics/common-api-patterns/pagination).CreateLoyaltyPromotionResponse createLoyaltyPromotion(String programId, CreateLoyaltyPromotionRequest body) throws ApiException, IOException
programId - Required parameter: The ID of the [loyalty program](entity:LoyaltyProgram)
to associate with the promotion. To get the program ID, call
[RetrieveLoyaltyProgram](api-endpoint:Loyalty-RetrieveLoyaltyProgram) using the
`main` keyword.body - Required parameter: An object containing the fields to POST for the request.
See the corresponding object definition for field details.ApiException - Represents error response from the server.IOException - Signals that an I/O exception of some sort has occurred.CompletableFuture<CreateLoyaltyPromotionResponse> createLoyaltyPromotionAsync(String programId, CreateLoyaltyPromotionRequest body)
programId - Required parameter: The ID of the [loyalty program](entity:LoyaltyProgram)
to associate with the promotion. To get the program ID, call
[RetrieveLoyaltyProgram](api-endpoint:Loyalty-RetrieveLoyaltyProgram) using the
`main` keyword.body - Required parameter: An object containing the fields to POST for the request.
See the corresponding object definition for field details.RetrieveLoyaltyPromotionResponse retrieveLoyaltyPromotion(String promotionId, String programId) throws ApiException, IOException
promotionId - Required parameter: The ID of the [loyalty
promotion](entity:LoyaltyPromotion) to retrieve.programId - Required parameter: The ID of the base [loyalty
program](entity:LoyaltyProgram). To get the program ID, call
[RetrieveLoyaltyProgram](api-endpoint:Loyalty-RetrieveLoyaltyProgram) using the
`main` keyword.ApiException - Represents error response from the server.IOException - Signals that an I/O exception of some sort has occurred.CompletableFuture<RetrieveLoyaltyPromotionResponse> retrieveLoyaltyPromotionAsync(String promotionId, String programId)
promotionId - Required parameter: The ID of the [loyalty
promotion](entity:LoyaltyPromotion) to retrieve.programId - Required parameter: The ID of the base [loyalty
program](entity:LoyaltyProgram). To get the program ID, call
[RetrieveLoyaltyProgram](api-endpoint:Loyalty-RetrieveLoyaltyProgram) using the
`main` keyword.CancelLoyaltyPromotionResponse cancelLoyaltyPromotion(String promotionId, String programId) throws ApiException, IOException
promotionId - Required parameter: The ID of the [loyalty
promotion](entity:LoyaltyPromotion) to cancel. You can cancel a promotion that has an
`ACTIVE` or `SCHEDULED` status.programId - Required parameter: The ID of the base [loyalty
program](entity:LoyaltyProgram).ApiException - Represents error response from the server.IOException - Signals that an I/O exception of some sort has occurred.CompletableFuture<CancelLoyaltyPromotionResponse> cancelLoyaltyPromotionAsync(String promotionId, String programId)
promotionId - Required parameter: The ID of the [loyalty
promotion](entity:LoyaltyPromotion) to cancel. You can cancel a promotion that has an
`ACTIVE` or `SCHEDULED` status.programId - Required parameter: The ID of the base [loyalty
program](entity:LoyaltyProgram).CreateLoyaltyRewardResponse createLoyaltyReward(CreateLoyaltyRewardRequest body) throws ApiException, IOException
body - Required parameter: An object containing the fields to POST for the request.
See the corresponding object definition for field details.ApiException - Represents error response from the server.IOException - Signals that an I/O exception of some sort has occurred.CompletableFuture<CreateLoyaltyRewardResponse> createLoyaltyRewardAsync(CreateLoyaltyRewardRequest body)
body - Required parameter: An object containing the fields to POST for the request.
See the corresponding object definition for field details.SearchLoyaltyRewardsResponse searchLoyaltyRewards(SearchLoyaltyRewardsRequest body) throws ApiException, IOException
body - Required parameter: An object containing the fields to POST for the request.
See the corresponding object definition for field details.ApiException - Represents error response from the server.IOException - Signals that an I/O exception of some sort has occurred.CompletableFuture<SearchLoyaltyRewardsResponse> searchLoyaltyRewardsAsync(SearchLoyaltyRewardsRequest body)
body - Required parameter: An object containing the fields to POST for the request.
See the corresponding object definition for field details.DeleteLoyaltyRewardResponse deleteLoyaltyReward(String rewardId) throws ApiException, IOException
rewardId - Required parameter: The ID of the [loyalty reward](entity:LoyaltyReward) to
delete.ApiException - Represents error response from the server.IOException - Signals that an I/O exception of some sort has occurred.CompletableFuture<DeleteLoyaltyRewardResponse> deleteLoyaltyRewardAsync(String rewardId)
rewardId - Required parameter: The ID of the [loyalty reward](entity:LoyaltyReward) to
delete.RetrieveLoyaltyRewardResponse retrieveLoyaltyReward(String rewardId) throws ApiException, IOException
rewardId - Required parameter: The ID of the [loyalty reward](entity:LoyaltyReward) to
retrieve.ApiException - Represents error response from the server.IOException - Signals that an I/O exception of some sort has occurred.CompletableFuture<RetrieveLoyaltyRewardResponse> retrieveLoyaltyRewardAsync(String rewardId)
rewardId - Required parameter: The ID of the [loyalty reward](entity:LoyaltyReward) to
retrieve.RedeemLoyaltyRewardResponse redeemLoyaltyReward(String rewardId, RedeemLoyaltyRewardRequest body) throws ApiException, IOException
rewardId - Required parameter: The ID of the [loyalty reward](entity:LoyaltyReward) to
redeem.body - Required parameter: An object containing the fields to POST for the request.
See the corresponding object definition for field details.ApiException - Represents error response from the server.IOException - Signals that an I/O exception of some sort has occurred.CompletableFuture<RedeemLoyaltyRewardResponse> redeemLoyaltyRewardAsync(String rewardId, RedeemLoyaltyRewardRequest body)
rewardId - Required parameter: The ID of the [loyalty reward](entity:LoyaltyReward) to
redeem.body - Required parameter: An object containing the fields to POST for the request.
See the corresponding object definition for field details.Copyright © 2023. All rights reserved.