net.accelbyte.sdk.api.inventory.wrappers.AdminItems 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.inventory.wrappers;
import java.util.*;
import net.accelbyte.sdk.api.inventory.models.*;
import net.accelbyte.sdk.api.inventory.operations.admin_items.*;
import net.accelbyte.sdk.core.HttpResponse;
import net.accelbyte.sdk.core.RequestRunner;
public class AdminItems {
private RequestRunner sdk;
private String customBasePath = "";
public AdminItems(RequestRunner sdk) {
this.sdk = sdk;
String configCustomBasePath =
sdk.getSdkConfiguration().getConfigRepository().getCustomServiceBasePath("inventory");
if (!configCustomBasePath.equals("")) {
this.customBasePath = configCustomBasePath;
}
}
public AdminItems(RequestRunner sdk, String customBasePath) {
this.sdk = sdk;
this.customBasePath = customBasePath;
}
/**
* @see AdminListItems
*/
public ApimodelsListItemResp adminListItems(AdminListItems 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 AdminGetInventoryItem
*/
public ApimodelsItemResp adminGetInventoryItem(AdminGetInventoryItem 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 AdminConsumeUserItem
*/
public ApimodelsItemResp adminConsumeUserItem(AdminConsumeUserItem 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 AdminBulkUpdateMyItems
*/
public List adminBulkUpdateMyItems(AdminBulkUpdateMyItems 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 AdminSaveItemToInventory
*/
public ApimodelsItemResp adminSaveItemToInventory(AdminSaveItemToInventory 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 AdminBulkRemoveItems
*/
public List adminBulkRemoveItems(AdminBulkRemoveItems 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 AdminBulkSaveItemToInventory
*/
public List adminBulkSaveItemToInventory(
AdminBulkSaveItemToInventory 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 AdminSaveItem
*/
public ApimodelsItemResp adminSaveItem(AdminSaveItem 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 AdminBulkSaveItem
*/
public List adminBulkSaveItem(AdminBulkSaveItem 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 AdminSyncUserEntitlements
*/
public void adminSyncUserEntitlements(AdminSyncUserEntitlements 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());
}
}