public final class DefaultLoyaltyApi extends BaseApi implements LoyaltyApi
BaseApi.RequestExecutor, BaseApi.RequestSupplier, BaseApi.ResponseHandler<T>authManagers, config, httpCallback, internalUserAgent| Constructor and Description |
|---|
DefaultLoyaltyApi(Configuration config,
HttpClient httpClient,
Map<String,AuthManager> authManagers)
Initializes the controller.
|
DefaultLoyaltyApi(Configuration config,
HttpClient httpClient,
Map<String,AuthManager> authManagers,
HttpCallback httpCallback)
Initializes the controller with HTTPCallback.
|
getClientInstance, getHttpCallback, makeHttpCallAsync, validateResponsepublic DefaultLoyaltyApi(Configuration config, HttpClient httpClient, Map<String,AuthManager> authManagers)
config - Configurations added in client.httpClient - Send HTTP requests and read the responses.authManagers - Apply authorization to requests.public DefaultLoyaltyApi(Configuration config, HttpClient httpClient, Map<String,AuthManager> authManagers, HttpCallback httpCallback)
config - Configurations added in client.httpClient - Send HTTP requests and read the responses.authManagers - Apply authorization to requests.httpCallback - Callback to be called before and after the HTTP call.public CreateLoyaltyAccountResponse createLoyaltyAccount(CreateLoyaltyAccountRequest body) throws ApiException, IOException
createLoyaltyAccount in interface LoyaltyApibody - 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.public CompletableFuture<CreateLoyaltyAccountResponse> createLoyaltyAccountAsync(CreateLoyaltyAccountRequest body)
createLoyaltyAccountAsync in interface LoyaltyApibody - Required parameter: An object containing the fields to POST for the request.
See the corresponding object definition for field details.public SearchLoyaltyAccountsResponse searchLoyaltyAccounts(SearchLoyaltyAccountsRequest body) throws ApiException, IOException
searchLoyaltyAccounts in interface LoyaltyApibody - 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.public CompletableFuture<SearchLoyaltyAccountsResponse> searchLoyaltyAccountsAsync(SearchLoyaltyAccountsRequest body)
searchLoyaltyAccountsAsync in interface LoyaltyApibody - Required parameter: An object containing the fields to POST for the request.
See the corresponding object definition for field details.public RetrieveLoyaltyAccountResponse retrieveLoyaltyAccount(String accountId) throws ApiException, IOException
retrieveLoyaltyAccount in interface LoyaltyApiaccountId - Required parameter: The ID of the [loyalty account]($m/LoyaltyAccount) to
retrieve.ApiException - Represents error response from the server.IOException - Signals that an I/O exception of some sort has occurred.public CompletableFuture<RetrieveLoyaltyAccountResponse> retrieveLoyaltyAccountAsync(String accountId)
retrieveLoyaltyAccountAsync in interface LoyaltyApiaccountId - Required parameter: The ID of the [loyalty account]($m/LoyaltyAccount) to
retrieve.public AccumulateLoyaltyPointsResponse accumulateLoyaltyPoints(String accountId, AccumulateLoyaltyPointsRequest body) throws ApiException, IOException
accumulateLoyaltyPoints in interface LoyaltyApiaccountId - Required parameter: The [loyalty account]($m/LoyaltyAccount) ID to which
to add the 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.public CompletableFuture<AccumulateLoyaltyPointsResponse> accumulateLoyaltyPointsAsync(String accountId, AccumulateLoyaltyPointsRequest body)
accumulateLoyaltyPointsAsync in interface LoyaltyApiaccountId - Required parameter: The [loyalty account]($m/LoyaltyAccount) ID to which
to add the points.body - Required parameter: An object containing the fields to POST for the request.
See the corresponding object definition for field details.public AdjustLoyaltyPointsResponse adjustLoyaltyPoints(String accountId, AdjustLoyaltyPointsRequest body) throws ApiException, IOException
adjustLoyaltyPoints in interface LoyaltyApiaccountId - Required parameter: The ID of the [loyalty account]($m/LoyaltyAccount) in
which to adjust the 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.public CompletableFuture<AdjustLoyaltyPointsResponse> adjustLoyaltyPointsAsync(String accountId, AdjustLoyaltyPointsRequest body)
adjustLoyaltyPointsAsync in interface LoyaltyApiaccountId - Required parameter: The ID of the [loyalty account]($m/LoyaltyAccount) in
which to adjust the points.body - Required parameter: An object containing the fields to POST for the request.
See the corresponding object definition for field details.public SearchLoyaltyEventsResponse searchLoyaltyEvents(SearchLoyaltyEventsRequest body) throws ApiException, IOException
searchLoyaltyEvents in interface LoyaltyApibody - 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.public CompletableFuture<SearchLoyaltyEventsResponse> searchLoyaltyEventsAsync(SearchLoyaltyEventsRequest body)
searchLoyaltyEventsAsync in interface LoyaltyApibody - Required parameter: An object containing the fields to POST for the request.
See the corresponding object definition for field details.@Deprecated public ListLoyaltyProgramsResponse listLoyaltyPrograms() throws ApiException, IOException
listLoyaltyPrograms in interface LoyaltyApiApiException - Represents error response from the server.IOException - Signals that an I/O exception of some sort has occurred.@Deprecated public CompletableFuture<ListLoyaltyProgramsResponse> listLoyaltyProgramsAsync()
listLoyaltyProgramsAsync in interface LoyaltyApipublic RetrieveLoyaltyProgramResponse retrieveLoyaltyProgram(String programId) throws ApiException, IOException
retrieveLoyaltyProgram in interface LoyaltyApiprogramId - 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.public CompletableFuture<RetrieveLoyaltyProgramResponse> retrieveLoyaltyProgramAsync(String programId)
retrieveLoyaltyProgramAsync in interface LoyaltyApiprogramId - 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.public CalculateLoyaltyPointsResponse calculateLoyaltyPoints(String programId, CalculateLoyaltyPointsRequest body) throws ApiException, IOException
calculateLoyaltyPoints in interface LoyaltyApiprogramId - Required parameter: The [loyalty program]($m/LoyaltyProgram) ID, 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.public CompletableFuture<CalculateLoyaltyPointsResponse> calculateLoyaltyPointsAsync(String programId, CalculateLoyaltyPointsRequest body)
calculateLoyaltyPointsAsync in interface LoyaltyApiprogramId - Required parameter: The [loyalty program]($m/LoyaltyProgram) ID, 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.public CreateLoyaltyRewardResponse createLoyaltyReward(CreateLoyaltyRewardRequest body) throws ApiException, IOException
createLoyaltyReward in interface LoyaltyApibody - 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.public CompletableFuture<CreateLoyaltyRewardResponse> createLoyaltyRewardAsync(CreateLoyaltyRewardRequest body)
createLoyaltyRewardAsync in interface LoyaltyApibody - Required parameter: An object containing the fields to POST for the request.
See the corresponding object definition for field details.public SearchLoyaltyRewardsResponse searchLoyaltyRewards(SearchLoyaltyRewardsRequest body) throws ApiException, IOException
searchLoyaltyRewards in interface LoyaltyApibody - 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.public CompletableFuture<SearchLoyaltyRewardsResponse> searchLoyaltyRewardsAsync(SearchLoyaltyRewardsRequest body)
searchLoyaltyRewardsAsync in interface LoyaltyApibody - Required parameter: An object containing the fields to POST for the request.
See the corresponding object definition for field details.public DeleteLoyaltyRewardResponse deleteLoyaltyReward(String rewardId) throws ApiException, IOException
deleteLoyaltyReward in interface LoyaltyApirewardId - Required parameter: The ID of the [loyalty reward]($m/LoyaltyReward) to
delete.ApiException - Represents error response from the server.IOException - Signals that an I/O exception of some sort has occurred.public CompletableFuture<DeleteLoyaltyRewardResponse> deleteLoyaltyRewardAsync(String rewardId)
deleteLoyaltyRewardAsync in interface LoyaltyApirewardId - Required parameter: The ID of the [loyalty reward]($m/LoyaltyReward) to
delete.public RetrieveLoyaltyRewardResponse retrieveLoyaltyReward(String rewardId) throws ApiException, IOException
retrieveLoyaltyReward in interface LoyaltyApirewardId - Required parameter: The ID of the [loyalty reward]($m/LoyaltyReward) to
retrieve.ApiException - Represents error response from the server.IOException - Signals that an I/O exception of some sort has occurred.public CompletableFuture<RetrieveLoyaltyRewardResponse> retrieveLoyaltyRewardAsync(String rewardId)
retrieveLoyaltyRewardAsync in interface LoyaltyApirewardId - Required parameter: The ID of the [loyalty reward]($m/LoyaltyReward) to
retrieve.public RedeemLoyaltyRewardResponse redeemLoyaltyReward(String rewardId, RedeemLoyaltyRewardRequest body) throws ApiException, IOException
redeemLoyaltyReward in interface LoyaltyApirewardId - Required parameter: The ID of the [loyalty reward]($m/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.public CompletableFuture<RedeemLoyaltyRewardResponse> redeemLoyaltyRewardAsync(String rewardId, RedeemLoyaltyRewardRequest body)
redeemLoyaltyRewardAsync in interface LoyaltyApirewardId - Required parameter: The ID of the [loyalty reward]($m/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 © 2022. All rights reserved.