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

com.recurly.v3.resources.GiftCard Maven / Gradle / Ivy

There is a newer version: 4.58.0
Show newest version
/**
 * This file is automatically created by Recurly's OpenAPI generation process and thus any edits you
 * make by hand will be lost. If you wish to make a change to this file, please create a Github
 * issue explaining the changes you need and we will usher them to the appropriate places.
 */
package com.recurly.v3.resources;

import com.google.gson.annotations.Expose;
import com.google.gson.annotations.SerializedName;
import com.recurly.v3.Resource;
import java.math.BigDecimal;
import org.joda.time.DateTime;

public class GiftCard extends Resource {

  /**
   * The remaining credit on the recipient account associated with this gift card. Only has a value
   * once the gift card has been redeemed. Can be used to create gift card balance displays for your
   * customers.
   */
  @SerializedName("balance")
  @Expose
  private BigDecimal balance;

  /** When the gift card was canceled. */
  @SerializedName("canceled_at")
  @Expose
  private DateTime canceledAt;

  /** Created at */
  @SerializedName("created_at")
  @Expose
  private DateTime createdAt;

  /** 3-letter ISO 4217 currency code. */
  @SerializedName("currency")
  @Expose
  private String currency;

  /**
   * When the gift card was sent to the recipient by Recurly via email, if method was email and the
   * "Gift Card Delivery" email template was enabled. This will be empty for post delivery or email
   * delivery where the email template was disabled.
   */
  @SerializedName("delivered_at")
  @Expose
  private DateTime deliveredAt;

  /** The delivery details for the gift card. */
  @SerializedName("delivery")
  @Expose
  private GiftCardDelivery delivery;

  /** The ID of the account that purchased the gift card. */
  @SerializedName("gifter_account_id")
  @Expose
  private String gifterAccountId;

  /** Gift card ID */
  @SerializedName("id")
  @Expose
  private String id;

  /** Object type */
  @SerializedName("object")
  @Expose
  private String object;

  /** The product code or SKU of the gift card product. */
  @SerializedName("product_code")
  @Expose
  private String productCode;

  /** The ID of the invoice for the gift card purchase made by the gifter. */
  @SerializedName("purchase_invoice_id")
  @Expose
  private String purchaseInvoiceId;

  /**
   * The ID of the account that redeemed the gift card redemption code. Does not have a value until
   * gift card is redeemed.
   */
  @SerializedName("recipient_account_id")
  @Expose
  private String recipientAccountId;

  /** When the gift card was redeemed by the recipient. */
  @SerializedName("redeemed_at")
  @Expose
  private DateTime redeemedAt;

  /**
   * The unique redemption code for the gift card, generated by Recurly. Will be 16 characters,
   * alphanumeric, displayed uppercase, but accepted in any case at redemption. Used by the
   * recipient account to create a credit in the amount of the `unit_amount` on their account.
   */
  @SerializedName("redemption_code")
  @Expose
  private String redemptionCode;

  /**
   * The ID of the invoice for the gift card redemption made by the recipient. Does not have a value
   * until gift card is redeemed.
   */
  @SerializedName("redemption_invoice_id")
  @Expose
  private String redemptionInvoiceId;

  /**
   * The amount of the gift card, which is the amount of the charge to the gifter account and the
   * amount of credit that is applied to the recipient account upon successful redemption.
   */
  @SerializedName("unit_amount")
  @Expose
  private BigDecimal unitAmount;

  /** Last updated at */
  @SerializedName("updated_at")
  @Expose
  private DateTime updatedAt;

  /**
   * The remaining credit on the recipient account associated with this gift card. Only has a value
   * once the gift card has been redeemed. Can be used to create gift card balance displays for your
   * customers.
   */
  public BigDecimal getBalance() {
    return this.balance;
  }

  /**
   * @param balance The remaining credit on the recipient account associated with this gift card.
   *     Only has a value once the gift card has been redeemed. Can be used to create gift card
   *     balance displays for your customers.
   */
  public void setBalance(final BigDecimal balance) {
    this.balance = balance;
  }

  /** When the gift card was canceled. */
  public DateTime getCanceledAt() {
    return this.canceledAt;
  }

  /** @param canceledAt When the gift card was canceled. */
  public void setCanceledAt(final DateTime canceledAt) {
    this.canceledAt = canceledAt;
  }

  /** Created at */
  public DateTime getCreatedAt() {
    return this.createdAt;
  }

  /** @param createdAt Created at */
  public void setCreatedAt(final DateTime createdAt) {
    this.createdAt = createdAt;
  }

  /** 3-letter ISO 4217 currency code. */
  public String getCurrency() {
    return this.currency;
  }

  /** @param currency 3-letter ISO 4217 currency code. */
  public void setCurrency(final String currency) {
    this.currency = currency;
  }

  /**
   * When the gift card was sent to the recipient by Recurly via email, if method was email and the
   * "Gift Card Delivery" email template was enabled. This will be empty for post delivery or email
   * delivery where the email template was disabled.
   */
  public DateTime getDeliveredAt() {
    return this.deliveredAt;
  }

  /**
   * @param deliveredAt When the gift card was sent to the recipient by Recurly via email, if method
   *     was email and the "Gift Card Delivery" email template was enabled. This will be empty for
   *     post delivery or email delivery where the email template was disabled.
   */
  public void setDeliveredAt(final DateTime deliveredAt) {
    this.deliveredAt = deliveredAt;
  }

  /** The delivery details for the gift card. */
  public GiftCardDelivery getDelivery() {
    return this.delivery;
  }

  /** @param delivery The delivery details for the gift card. */
  public void setDelivery(final GiftCardDelivery delivery) {
    this.delivery = delivery;
  }

  /** The ID of the account that purchased the gift card. */
  public String getGifterAccountId() {
    return this.gifterAccountId;
  }

  /** @param gifterAccountId The ID of the account that purchased the gift card. */
  public void setGifterAccountId(final String gifterAccountId) {
    this.gifterAccountId = gifterAccountId;
  }

  /** Gift card ID */
  public String getId() {
    return this.id;
  }

  /** @param id Gift card ID */
  public void setId(final String id) {
    this.id = id;
  }

  /** Object type */
  public String getObject() {
    return this.object;
  }

  /** @param object Object type */
  public void setObject(final String object) {
    this.object = object;
  }

  /** The product code or SKU of the gift card product. */
  public String getProductCode() {
    return this.productCode;
  }

  /** @param productCode The product code or SKU of the gift card product. */
  public void setProductCode(final String productCode) {
    this.productCode = productCode;
  }

  /** The ID of the invoice for the gift card purchase made by the gifter. */
  public String getPurchaseInvoiceId() {
    return this.purchaseInvoiceId;
  }

  /**
   * @param purchaseInvoiceId The ID of the invoice for the gift card purchase made by the gifter.
   */
  public void setPurchaseInvoiceId(final String purchaseInvoiceId) {
    this.purchaseInvoiceId = purchaseInvoiceId;
  }

  /**
   * The ID of the account that redeemed the gift card redemption code. Does not have a value until
   * gift card is redeemed.
   */
  public String getRecipientAccountId() {
    return this.recipientAccountId;
  }

  /**
   * @param recipientAccountId The ID of the account that redeemed the gift card redemption code.
   *     Does not have a value until gift card is redeemed.
   */
  public void setRecipientAccountId(final String recipientAccountId) {
    this.recipientAccountId = recipientAccountId;
  }

  /** When the gift card was redeemed by the recipient. */
  public DateTime getRedeemedAt() {
    return this.redeemedAt;
  }

  /** @param redeemedAt When the gift card was redeemed by the recipient. */
  public void setRedeemedAt(final DateTime redeemedAt) {
    this.redeemedAt = redeemedAt;
  }

  /**
   * The unique redemption code for the gift card, generated by Recurly. Will be 16 characters,
   * alphanumeric, displayed uppercase, but accepted in any case at redemption. Used by the
   * recipient account to create a credit in the amount of the `unit_amount` on their account.
   */
  public String getRedemptionCode() {
    return this.redemptionCode;
  }

  /**
   * @param redemptionCode The unique redemption code for the gift card, generated by Recurly. Will
   *     be 16 characters, alphanumeric, displayed uppercase, but accepted in any case at
   *     redemption. Used by the recipient account to create a credit in the amount of the
   *     `unit_amount` on their account.
   */
  public void setRedemptionCode(final String redemptionCode) {
    this.redemptionCode = redemptionCode;
  }

  /**
   * The ID of the invoice for the gift card redemption made by the recipient. Does not have a value
   * until gift card is redeemed.
   */
  public String getRedemptionInvoiceId() {
    return this.redemptionInvoiceId;
  }

  /**
   * @param redemptionInvoiceId The ID of the invoice for the gift card redemption made by the
   *     recipient. Does not have a value until gift card is redeemed.
   */
  public void setRedemptionInvoiceId(final String redemptionInvoiceId) {
    this.redemptionInvoiceId = redemptionInvoiceId;
  }

  /**
   * The amount of the gift card, which is the amount of the charge to the gifter account and the
   * amount of credit that is applied to the recipient account upon successful redemption.
   */
  public BigDecimal getUnitAmount() {
    return this.unitAmount;
  }

  /**
   * @param unitAmount The amount of the gift card, which is the amount of the charge to the gifter
   *     account and the amount of credit that is applied to the recipient account upon successful
   *     redemption.
   */
  public void setUnitAmount(final BigDecimal unitAmount) {
    this.unitAmount = unitAmount;
  }

  /** Last updated at */
  public DateTime getUpdatedAt() {
    return this.updatedAt;
  }

  /** @param updatedAt Last updated at */
  public void setUpdatedAt(final DateTime updatedAt) {
    this.updatedAt = updatedAt;
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy