net.accelbyte.sdk.api.seasonpass.wrappers.Reward Maven / Gradle / Ivy
/*
* Copyright (c) 2024 AccelByte Inc. All Rights Reserved
* This is licensed software from AccelByte Inc, for limitations
* and restrictions contact your company contract manager.
*
* Code generated. DO NOT EDIT.
*/
package net.accelbyte.sdk.api.seasonpass.wrappers;
import java.util.*;
import net.accelbyte.sdk.api.seasonpass.models.*;
import net.accelbyte.sdk.api.seasonpass.operations.reward.*;
import net.accelbyte.sdk.core.HttpResponse;
import net.accelbyte.sdk.core.RequestRunner;
public class Reward {
private RequestRunner sdk;
private String customBasePath = "";
public Reward(RequestRunner sdk) {
this.sdk = sdk;
String configCustomBasePath =
sdk.getSdkConfiguration().getConfigRepository().getCustomServiceBasePath("seasonpass");
if (!configCustomBasePath.equals("")) {
this.customBasePath = configCustomBasePath;
}
}
public Reward(RequestRunner sdk, String customBasePath) {
this.sdk = sdk;
this.customBasePath = customBasePath;
}
/**
* @see QueryRewards
*/
public List queryRewards(QueryRewards input) throws Exception {
if (input.getCustomBasePath().equals("") && !customBasePath.equals("")) {
input.setCustomBasePath(customBasePath);
}
final HttpResponse httpResponse = sdk.runRequest(input);
return input.parseResponse(
httpResponse.getCode(), httpResponse.getContentType(), httpResponse.getPayload());
}
/**
* @see CreateReward
*/
public RewardInfo createReward(CreateReward input) throws Exception {
if (input.getCustomBasePath().equals("") && !customBasePath.equals("")) {
input.setCustomBasePath(customBasePath);
}
final HttpResponse httpResponse = sdk.runRequest(input);
return input.parseResponse(
httpResponse.getCode(), httpResponse.getContentType(), httpResponse.getPayload());
}
/**
* @see GetReward
*/
public RewardInfo getReward(GetReward input) throws Exception {
if (input.getCustomBasePath().equals("") && !customBasePath.equals("")) {
input.setCustomBasePath(customBasePath);
}
final HttpResponse httpResponse = sdk.runRequest(input);
return input.parseResponse(
httpResponse.getCode(), httpResponse.getContentType(), httpResponse.getPayload());
}
/**
* @see DeleteReward
*/
public void deleteReward(DeleteReward input) throws Exception {
if (input.getCustomBasePath().equals("") && !customBasePath.equals("")) {
input.setCustomBasePath(customBasePath);
}
final HttpResponse httpResponse = sdk.runRequest(input);
input.handleEmptyResponse(
httpResponse.getCode(), httpResponse.getContentType(), httpResponse.getPayload());
}
/**
* @see UpdateReward
*/
public RewardInfo updateReward(UpdateReward input) throws Exception {
if (input.getCustomBasePath().equals("") && !customBasePath.equals("")) {
input.setCustomBasePath(customBasePath);
}
final HttpResponse httpResponse = sdk.runRequest(input);
return input.parseResponse(
httpResponse.getCode(), httpResponse.getContentType(), httpResponse.getPayload());
}
/**
* @see PublicClaimUserReward
*/
public ClaimableRewards publicClaimUserReward(PublicClaimUserReward input) throws Exception {
if (input.getCustomBasePath().equals("") && !customBasePath.equals("")) {
input.setCustomBasePath(customBasePath);
}
final HttpResponse httpResponse = sdk.runRequest(input);
return input.parseResponse(
httpResponse.getCode(), httpResponse.getContentType(), httpResponse.getPayload());
}
/**
* @see PublicBulkClaimUserRewards
*/
public ClaimableRewards publicBulkClaimUserRewards(PublicBulkClaimUserRewards input)
throws Exception {
if (input.getCustomBasePath().equals("") && !customBasePath.equals("")) {
input.setCustomBasePath(customBasePath);
}
final HttpResponse httpResponse = sdk.runRequest(input);
return input.parseResponse(
httpResponse.getCode(), httpResponse.getContentType(), httpResponse.getPayload());
}
}