All Downloads are FREE. Search and download functionalities are using the official Maven repository.

net.accelbyte.sdk.api.platform.wrappers.Fulfillment Maven / Gradle / Ivy

/*
 * Copyright (c) 2022 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.platform.wrappers;

import java.util.*;
import net.accelbyte.sdk.api.platform.models.*;
import net.accelbyte.sdk.api.platform.operations.fulfillment.*;
import net.accelbyte.sdk.core.HttpResponse;
import net.accelbyte.sdk.core.RequestRunner;

public class Fulfillment {

  private RequestRunner sdk;

  public Fulfillment(RequestRunner sdk) {
    this.sdk = sdk;
  }

  /**
   * @see QueryFulfillmentHistories
   */
  public FulfillmentHistoryPagingSlicedResult queryFulfillmentHistories(
      QueryFulfillmentHistories input) throws Exception {
    final HttpResponse httpResponse = sdk.runRequest(input);
    return input.parseResponse(
        httpResponse.getCode(), httpResponse.getContentType(), httpResponse.getPayload());
  }

  /**
   * @see FulfillItem
   */
  public FulfillmentResult fulfillItem(FulfillItem input) throws Exception {
    final HttpResponse httpResponse = sdk.runRequest(input);
    return input.parseResponse(
        httpResponse.getCode(), httpResponse.getContentType(), httpResponse.getPayload());
  }

  /**
   * @see RedeemCode
   */
  public FulfillmentResult redeemCode(RedeemCode input) throws Exception {
    final HttpResponse httpResponse = sdk.runRequest(input);
    return input.parseResponse(
        httpResponse.getCode(), httpResponse.getContentType(), httpResponse.getPayload());
  }

  /**
   * @see PreCheckFulfillItem
   */
  public List preCheckFulfillItem(PreCheckFulfillItem input) throws Exception {
    final HttpResponse httpResponse = sdk.runRequest(input);
    return input.parseResponse(
        httpResponse.getCode(), httpResponse.getContentType(), httpResponse.getPayload());
  }

  /**
   * @see FulfillRewards
   */
  public void fulfillRewards(FulfillRewards input) throws Exception {
    final HttpResponse httpResponse = sdk.runRequest(input);
    input.handleEmptyResponse(
        httpResponse.getCode(), httpResponse.getContentType(), httpResponse.getPayload());
  }

  /**
   * @see PublicRedeemCode
   */
  public FulfillmentResult publicRedeemCode(PublicRedeemCode input) throws Exception {
    final HttpResponse httpResponse = sdk.runRequest(input);
    return input.parseResponse(
        httpResponse.getCode(), httpResponse.getContentType(), httpResponse.getPayload());
  }

  /**
   * @see FulfillRewardsV2
   */
  public FulfillmentResult fulfillRewardsV2(FulfillRewardsV2 input) throws Exception {
    final HttpResponse httpResponse = sdk.runRequest(input);
    return input.parseResponse(
        httpResponse.getCode(), httpResponse.getContentType(), httpResponse.getPayload());
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy