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

com.adyen.model.transfers.Transfer Maven / Gradle / Ivy

There is a newer version: 38.1.0
Show newest version
/*
 * Transfers API
 *
 * The version of the OpenAPI document: 4
 * 
 *
 * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
 * https://openapi-generator.tech
 * Do not edit the class manually.
 */


package com.adyen.model.transfers;

import java.util.Objects;
import java.util.Map;
import java.util.HashMap;
import com.adyen.model.transfers.Amount;
import com.adyen.model.transfers.CounterpartyV3;
import com.adyen.model.transfers.DirectDebitInformation;
import com.adyen.model.transfers.PaymentInstrument;
import com.adyen.model.transfers.ResourceReference;
import com.adyen.model.transfers.TransferCategoryData;
import com.adyen.model.transfers.TransferReview;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonTypeName;
import com.fasterxml.jackson.annotation.JsonValue;
import java.time.OffsetDateTime;
import java.util.Arrays;
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
import com.fasterxml.jackson.core.JsonProcessingException;


/**
 * Transfer
 */
@JsonPropertyOrder({
  Transfer.JSON_PROPERTY_ACCOUNT_HOLDER,
  Transfer.JSON_PROPERTY_AMOUNT,
  Transfer.JSON_PROPERTY_BALANCE_ACCOUNT,
  Transfer.JSON_PROPERTY_CATEGORY,
  Transfer.JSON_PROPERTY_CATEGORY_DATA,
  Transfer.JSON_PROPERTY_COUNTERPARTY,
  Transfer.JSON_PROPERTY_CREATION_DATE,
  Transfer.JSON_PROPERTY_DESCRIPTION,
  Transfer.JSON_PROPERTY_DIRECT_DEBIT_INFORMATION,
  Transfer.JSON_PROPERTY_DIRECTION,
  Transfer.JSON_PROPERTY_ID,
  Transfer.JSON_PROPERTY_PAYMENT_INSTRUMENT,
  Transfer.JSON_PROPERTY_REASON,
  Transfer.JSON_PROPERTY_REFERENCE,
  Transfer.JSON_PROPERTY_REFERENCE_FOR_BENEFICIARY,
  Transfer.JSON_PROPERTY_REVIEW,
  Transfer.JSON_PROPERTY_STATUS,
  Transfer.JSON_PROPERTY_TYPE
})

public class Transfer {
  public static final String JSON_PROPERTY_ACCOUNT_HOLDER = "accountHolder";
  private ResourceReference accountHolder;

  public static final String JSON_PROPERTY_AMOUNT = "amount";
  private Amount amount;

  public static final String JSON_PROPERTY_BALANCE_ACCOUNT = "balanceAccount";
  private ResourceReference balanceAccount;

  /**
   * The category of the transfer.  Possible values:   - **bank**: a transfer involving a [transfer instrument](https://docs.adyen.com/api-explorer/#/legalentity/latest/post/transferInstruments__resParam_id) or a bank account.  - **card**: a transfer involving a third-party card.  - **internal**: a transfer between [balance accounts](https://docs.adyen.com/api-explorer/#/balanceplatform/latest/post/balanceAccounts__resParam_id) within your platform.  - **issuedCard**: a transfer initiated by a Adyen-issued card.  - **platformPayment**: funds movements related to payments that are acquired for your users.  - **topUp**: an incoming transfer initiated by your user to top up their balance account.
   */
  public enum CategoryEnum {
    BANK(String.valueOf("bank")),
    
    CARD(String.valueOf("card")),
    
    INTERNAL(String.valueOf("internal")),
    
    ISSUEDCARD(String.valueOf("issuedCard")),
    
    PLATFORMPAYMENT(String.valueOf("platformPayment")),
    
    TOPUP(String.valueOf("topUp"));

    private String value;

    CategoryEnum(String value) {
      this.value = value;
    }

    @JsonValue
    public String getValue() {
      return value;
    }

    @Override
    public String toString() {
      return String.valueOf(value);
    }

    @JsonCreator
    public static CategoryEnum fromValue(String value) {
      for (CategoryEnum b : CategoryEnum.values()) {
        if (b.value.equals(value)) {
          return b;
        }
      }
      throw new IllegalArgumentException("Unexpected value '" + value + "'");
    }
  }

  public static final String JSON_PROPERTY_CATEGORY = "category";
  private CategoryEnum category;

  public static final String JSON_PROPERTY_CATEGORY_DATA = "categoryData";
  private TransferCategoryData categoryData;

  public static final String JSON_PROPERTY_COUNTERPARTY = "counterparty";
  private CounterpartyV3 counterparty;

  public static final String JSON_PROPERTY_CREATION_DATE = "creationDate";
  private OffsetDateTime creationDate;

  public static final String JSON_PROPERTY_DESCRIPTION = "description";
  private String description;

  public static final String JSON_PROPERTY_DIRECT_DEBIT_INFORMATION = "directDebitInformation";
  private DirectDebitInformation directDebitInformation;

  /**
   * The direction of the transfer.  Possible values: **incoming**, **outgoing**.
   */
  public enum DirectionEnum {
    INCOMING(String.valueOf("incoming")),
    
    OUTGOING(String.valueOf("outgoing"));

    private String value;

    DirectionEnum(String value) {
      this.value = value;
    }

    @JsonValue
    public String getValue() {
      return value;
    }

    @Override
    public String toString() {
      return String.valueOf(value);
    }

    @JsonCreator
    public static DirectionEnum fromValue(String value) {
      for (DirectionEnum b : DirectionEnum.values()) {
        if (b.value.equals(value)) {
          return b;
        }
      }
      throw new IllegalArgumentException("Unexpected value '" + value + "'");
    }
  }

  public static final String JSON_PROPERTY_DIRECTION = "direction";
  private DirectionEnum direction;

  public static final String JSON_PROPERTY_ID = "id";
  private String id;

  public static final String JSON_PROPERTY_PAYMENT_INSTRUMENT = "paymentInstrument";
  private PaymentInstrument paymentInstrument;

  /**
   * Additional information about the status of the transfer.
   */
  public enum ReasonEnum {
    ACCOUNTHIERARCHYNOTACTIVE(String.valueOf("accountHierarchyNotActive")),
    
    AMOUNTLIMITEXCEEDED(String.valueOf("amountLimitExceeded")),
    
    APPROVED(String.valueOf("approved")),
    
    BALANCEACCOUNTTEMPORARILYBLOCKEDBYTRANSACTIONRULE(String.valueOf("balanceAccountTemporarilyBlockedByTransactionRule")),
    
    COUNTERPARTYACCOUNTBLOCKED(String.valueOf("counterpartyAccountBlocked")),
    
    COUNTERPARTYACCOUNTCLOSED(String.valueOf("counterpartyAccountClosed")),
    
    COUNTERPARTYACCOUNTNOTFOUND(String.valueOf("counterpartyAccountNotFound")),
    
    COUNTERPARTYADDRESSREQUIRED(String.valueOf("counterpartyAddressRequired")),
    
    COUNTERPARTYBANKTIMEDOUT(String.valueOf("counterpartyBankTimedOut")),
    
    COUNTERPARTYBANKUNAVAILABLE(String.valueOf("counterpartyBankUnavailable")),
    
    DECLINED(String.valueOf("declined")),
    
    DECLINEDBYTRANSACTIONRULE(String.valueOf("declinedByTransactionRule")),
    
    DIRECTDEBITNOTSUPPORTED(String.valueOf("directDebitNotSupported")),
    
    ERROR(String.valueOf("error")),
    
    NOTENOUGHBALANCE(String.valueOf("notEnoughBalance")),
    
    PENDING(String.valueOf("pending")),
    
    PENDINGAPPROVAL(String.valueOf("pendingApproval")),
    
    PENDINGEXECUTION(String.valueOf("pendingExecution")),
    
    REFUSEDBYCOUNTERPARTYBANK(String.valueOf("refusedByCounterpartyBank")),
    
    REFUSEDBYCUSTOMER(String.valueOf("refusedByCustomer")),
    
    ROUTENOTFOUND(String.valueOf("routeNotFound")),
    
    SCAFAILED(String.valueOf("scaFailed")),
    
    TRANSFERINSTRUMENTDOESNOTEXIST(String.valueOf("transferInstrumentDoesNotExist")),
    
    UNKNOWN(String.valueOf("unknown"));

    private String value;

    ReasonEnum(String value) {
      this.value = value;
    }

    @JsonValue
    public String getValue() {
      return value;
    }

    @Override
    public String toString() {
      return String.valueOf(value);
    }

    @JsonCreator
    public static ReasonEnum fromValue(String value) {
      for (ReasonEnum b : ReasonEnum.values()) {
        if (b.value.equals(value)) {
          return b;
        }
      }
      throw new IllegalArgumentException("Unexpected value '" + value + "'");
    }
  }

  public static final String JSON_PROPERTY_REASON = "reason";
  private ReasonEnum reason;

  public static final String JSON_PROPERTY_REFERENCE = "reference";
  private String reference;

  public static final String JSON_PROPERTY_REFERENCE_FOR_BENEFICIARY = "referenceForBeneficiary";
  private String referenceForBeneficiary;

  public static final String JSON_PROPERTY_REVIEW = "review";
  private TransferReview review;

  /**
   * The result of the transfer.   For example, **authorised**, **refused**, or **error**.
   */
  public enum StatusEnum {
    APPROVALPENDING(String.valueOf("approvalPending")),
    
    ATMWITHDRAWAL(String.valueOf("atmWithdrawal")),
    
    ATMWITHDRAWALREVERSALPENDING(String.valueOf("atmWithdrawalReversalPending")),
    
    ATMWITHDRAWALREVERSED(String.valueOf("atmWithdrawalReversed")),
    
    AUTHADJUSTMENTAUTHORISED(String.valueOf("authAdjustmentAuthorised")),
    
    AUTHADJUSTMENTERROR(String.valueOf("authAdjustmentError")),
    
    AUTHADJUSTMENTREFUSED(String.valueOf("authAdjustmentRefused")),
    
    AUTHORISED(String.valueOf("authorised")),
    
    BANKTRANSFER(String.valueOf("bankTransfer")),
    
    BANKTRANSFERPENDING(String.valueOf("bankTransferPending")),
    
    BOOKED(String.valueOf("booked")),
    
    BOOKINGPENDING(String.valueOf("bookingPending")),
    
    CANCELLED(String.valueOf("cancelled")),
    
    CAPTUREPENDING(String.valueOf("capturePending")),
    
    CAPTUREREVERSALPENDING(String.valueOf("captureReversalPending")),
    
    CAPTUREREVERSED(String.valueOf("captureReversed")),
    
    CAPTURED(String.valueOf("captured")),
    
    CAPTUREDEXTERNALLY(String.valueOf("capturedExternally")),
    
    CHARGEBACK(String.valueOf("chargeback")),
    
    CHARGEBACKEXTERNALLY(String.valueOf("chargebackExternally")),
    
    CHARGEBACKPENDING(String.valueOf("chargebackPending")),
    
    CHARGEBACKREVERSALPENDING(String.valueOf("chargebackReversalPending")),
    
    CHARGEBACKREVERSED(String.valueOf("chargebackReversed")),
    
    CREDITED(String.valueOf("credited")),
    
    DEPOSITCORRECTION(String.valueOf("depositCorrection")),
    
    DEPOSITCORRECTIONPENDING(String.valueOf("depositCorrectionPending")),
    
    DISPUTE(String.valueOf("dispute")),
    
    DISPUTECLOSED(String.valueOf("disputeClosed")),
    
    DISPUTEEXPIRED(String.valueOf("disputeExpired")),
    
    DISPUTENEEDSREVIEW(String.valueOf("disputeNeedsReview")),
    
    ERROR(String.valueOf("error")),
    
    EXPIRED(String.valueOf("expired")),
    
    FAILED(String.valueOf("failed")),
    
    FEE(String.valueOf("fee")),
    
    FEEPENDING(String.valueOf("feePending")),
    
    INTERNALTRANSFER(String.valueOf("internalTransfer")),
    
    INTERNALTRANSFERPENDING(String.valueOf("internalTransferPending")),
    
    INVOICEDEDUCTION(String.valueOf("invoiceDeduction")),
    
    INVOICEDEDUCTIONPENDING(String.valueOf("invoiceDeductionPending")),
    
    MANUALCORRECTIONPENDING(String.valueOf("manualCorrectionPending")),
    
    MANUALLYCORRECTED(String.valueOf("manuallyCorrected")),
    
    MATCHEDSTATEMENT(String.valueOf("matchedStatement")),
    
    MATCHEDSTATEMENTPENDING(String.valueOf("matchedStatementPending")),
    
    MERCHANTPAYIN(String.valueOf("merchantPayin")),
    
    MERCHANTPAYINPENDING(String.valueOf("merchantPayinPending")),
    
    MERCHANTPAYINREVERSED(String.valueOf("merchantPayinReversed")),
    
    MERCHANTPAYINREVERSEDPENDING(String.valueOf("merchantPayinReversedPending")),
    
    MISCCOST(String.valueOf("miscCost")),
    
    MISCCOSTPENDING(String.valueOf("miscCostPending")),
    
    PAYMENTCOST(String.valueOf("paymentCost")),
    
    PAYMENTCOSTPENDING(String.valueOf("paymentCostPending")),
    
    PENDINGAPPROVAL(String.valueOf("pendingApproval")),
    
    PENDINGEXECUTION(String.valueOf("pendingExecution")),
    
    RECEIVED(String.valueOf("received")),
    
    REFUNDPENDING(String.valueOf("refundPending")),
    
    REFUNDREVERSALPENDING(String.valueOf("refundReversalPending")),
    
    REFUNDREVERSED(String.valueOf("refundReversed")),
    
    REFUNDED(String.valueOf("refunded")),
    
    REFUNDEDEXTERNALLY(String.valueOf("refundedExternally")),
    
    REFUSED(String.valueOf("refused")),
    
    REJECTED(String.valueOf("rejected")),
    
    RESERVEADJUSTMENT(String.valueOf("reserveAdjustment")),
    
    RESERVEADJUSTMENTPENDING(String.valueOf("reserveAdjustmentPending")),
    
    RETURNED(String.valueOf("returned")),
    
    SECONDCHARGEBACK(String.valueOf("secondChargeback")),
    
    SECONDCHARGEBACKPENDING(String.valueOf("secondChargebackPending")),
    
    UNDEFINED(String.valueOf("undefined"));

    private String value;

    StatusEnum(String value) {
      this.value = value;
    }

    @JsonValue
    public String getValue() {
      return value;
    }

    @Override
    public String toString() {
      return String.valueOf(value);
    }

    @JsonCreator
    public static StatusEnum fromValue(String value) {
      for (StatusEnum b : StatusEnum.values()) {
        if (b.value.equals(value)) {
          return b;
        }
      }
      throw new IllegalArgumentException("Unexpected value '" + value + "'");
    }
  }

  public static final String JSON_PROPERTY_STATUS = "status";
  private StatusEnum status;

  /**
   * The type of transfer or transaction. For example, **refund**, **payment**, **internalTransfer**, **bankTransfer**.
   */
  public enum TypeEnum {
    PAYMENT(String.valueOf("payment")),
    
    CAPTURE(String.valueOf("capture")),
    
    CAPTUREREVERSAL(String.valueOf("captureReversal")),
    
    REFUND(String.valueOf("refund")),
    
    REFUNDREVERSAL(String.valueOf("refundReversal")),
    
    CHARGEBACK(String.valueOf("chargeback")),
    
    CHARGEBACKCORRECTION(String.valueOf("chargebackCorrection")),
    
    CHARGEBACKREVERSAL(String.valueOf("chargebackReversal")),
    
    CHARGEBACKREVERSALCORRECTION(String.valueOf("chargebackReversalCorrection")),
    
    SECONDCHARGEBACK(String.valueOf("secondChargeback")),
    
    SECONDCHARGEBACKCORRECTION(String.valueOf("secondChargebackCorrection")),
    
    ATMWITHDRAWAL(String.valueOf("atmWithdrawal")),
    
    ATMWITHDRAWALREVERSAL(String.valueOf("atmWithdrawalReversal")),
    
    INTERNALTRANSFER(String.valueOf("internalTransfer")),
    
    INTERNALDIRECTDEBIT(String.valueOf("internalDirectDebit")),
    
    MANUALCORRECTION(String.valueOf("manualCorrection")),
    
    INVOICEDEDUCTION(String.valueOf("invoiceDeduction")),
    
    DEPOSITCORRECTION(String.valueOf("depositCorrection")),
    
    RESERVEADJUSTMENT(String.valueOf("reserveAdjustment")),
    
    BANKTRANSFER(String.valueOf("bankTransfer")),
    
    BANKDIRECTDEBIT(String.valueOf("bankDirectDebit")),
    
    CARDTRANSFER(String.valueOf("cardTransfer")),
    
    MISCCOST(String.valueOf("miscCost")),
    
    PAYMENTCOST(String.valueOf("paymentCost")),
    
    FEE(String.valueOf("fee")),
    
    LEFTOVER(String.valueOf("leftover")),
    
    GRANT(String.valueOf("grant")),
    
    CAPITALFUNDSCOLLECTION(String.valueOf("capitalFundsCollection")),
    
    CASHOUTINSTRUCTION(String.valueOf("cashOutInstruction")),
    
    CASHOUTFEE(String.valueOf("cashoutFee")),
    
    CASHOUTREPAYMENT(String.valueOf("cashoutRepayment")),
    
    CASHOUTFUNDING(String.valueOf("cashoutFunding")),
    
    REPAYMENT(String.valueOf("repayment")),
    
    INSTALLMENT(String.valueOf("installment")),
    
    INSTALLMENTREVERSAL(String.valueOf("installmentReversal")),
    
    BALANCEADJUSTMENT(String.valueOf("balanceAdjustment")),
    
    BALANCEROLLOVER(String.valueOf("balanceRollover")),
    
    BALANCEMIGRATION(String.valueOf("balanceMigration"));

    private String value;

    TypeEnum(String value) {
      this.value = value;
    }

    @JsonValue
    public String getValue() {
      return value;
    }

    @Override
    public String toString() {
      return String.valueOf(value);
    }

    @JsonCreator
    public static TypeEnum fromValue(String value) {
      for (TypeEnum b : TypeEnum.values()) {
        if (b.value.equals(value)) {
          return b;
        }
      }
      throw new IllegalArgumentException("Unexpected value '" + value + "'");
    }
  }

  public static final String JSON_PROPERTY_TYPE = "type";
  private TypeEnum type;

  public Transfer() { 
  }

  /**
   * accountHolder
   *
   * @param accountHolder 
   * @return the current {@code Transfer} instance, allowing for method chaining
   */
  public Transfer accountHolder(ResourceReference accountHolder) {
    this.accountHolder = accountHolder;
    return this;
  }

  /**
   * Get accountHolder
   * @return accountHolder 
   */
  @JsonProperty(JSON_PROPERTY_ACCOUNT_HOLDER)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public ResourceReference getAccountHolder() {
    return accountHolder;
  }

  /**
   * accountHolder
   *
   * @param accountHolder 
   */
  @JsonProperty(JSON_PROPERTY_ACCOUNT_HOLDER)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public void setAccountHolder(ResourceReference accountHolder) {
    this.accountHolder = accountHolder;
  }

  /**
   * amount
   *
   * @param amount 
   * @return the current {@code Transfer} instance, allowing for method chaining
   */
  public Transfer amount(Amount amount) {
    this.amount = amount;
    return this;
  }

  /**
   * Get amount
   * @return amount 
   */
  @JsonProperty(JSON_PROPERTY_AMOUNT)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public Amount getAmount() {
    return amount;
  }

  /**
   * amount
   *
   * @param amount 
   */
  @JsonProperty(JSON_PROPERTY_AMOUNT)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public void setAmount(Amount amount) {
    this.amount = amount;
  }

  /**
   * balanceAccount
   *
   * @param balanceAccount 
   * @return the current {@code Transfer} instance, allowing for method chaining
   */
  public Transfer balanceAccount(ResourceReference balanceAccount) {
    this.balanceAccount = balanceAccount;
    return this;
  }

  /**
   * Get balanceAccount
   * @return balanceAccount 
   */
  @JsonProperty(JSON_PROPERTY_BALANCE_ACCOUNT)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public ResourceReference getBalanceAccount() {
    return balanceAccount;
  }

  /**
   * balanceAccount
   *
   * @param balanceAccount 
   */
  @JsonProperty(JSON_PROPERTY_BALANCE_ACCOUNT)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public void setBalanceAccount(ResourceReference balanceAccount) {
    this.balanceAccount = balanceAccount;
  }

  /**
   * The category of the transfer.  Possible values:   - **bank**: a transfer involving a [transfer instrument](https://docs.adyen.com/api-explorer/#/legalentity/latest/post/transferInstruments__resParam_id) or a bank account.  - **card**: a transfer involving a third-party card.  - **internal**: a transfer between [balance accounts](https://docs.adyen.com/api-explorer/#/balanceplatform/latest/post/balanceAccounts__resParam_id) within your platform.  - **issuedCard**: a transfer initiated by a Adyen-issued card.  - **platformPayment**: funds movements related to payments that are acquired for your users.  - **topUp**: an incoming transfer initiated by your user to top up their balance account.
   *
   * @param category The category of the transfer.  Possible values:   - **bank**: a transfer involving a [transfer instrument](https://docs.adyen.com/api-explorer/#/legalentity/latest/post/transferInstruments__resParam_id) or a bank account.  - **card**: a transfer involving a third-party card.  - **internal**: a transfer between [balance accounts](https://docs.adyen.com/api-explorer/#/balanceplatform/latest/post/balanceAccounts__resParam_id) within your platform.  - **issuedCard**: a transfer initiated by a Adyen-issued card.  - **platformPayment**: funds movements related to payments that are acquired for your users.  - **topUp**: an incoming transfer initiated by your user to top up their balance account.
   * @return the current {@code Transfer} instance, allowing for method chaining
   */
  public Transfer category(CategoryEnum category) {
    this.category = category;
    return this;
  }

  /**
   * The category of the transfer.  Possible values:   - **bank**: a transfer involving a [transfer instrument](https://docs.adyen.com/api-explorer/#/legalentity/latest/post/transferInstruments__resParam_id) or a bank account.  - **card**: a transfer involving a third-party card.  - **internal**: a transfer between [balance accounts](https://docs.adyen.com/api-explorer/#/balanceplatform/latest/post/balanceAccounts__resParam_id) within your platform.  - **issuedCard**: a transfer initiated by a Adyen-issued card.  - **platformPayment**: funds movements related to payments that are acquired for your users.  - **topUp**: an incoming transfer initiated by your user to top up their balance account.
   * @return category The category of the transfer.  Possible values:   - **bank**: a transfer involving a [transfer instrument](https://docs.adyen.com/api-explorer/#/legalentity/latest/post/transferInstruments__resParam_id) or a bank account.  - **card**: a transfer involving a third-party card.  - **internal**: a transfer between [balance accounts](https://docs.adyen.com/api-explorer/#/balanceplatform/latest/post/balanceAccounts__resParam_id) within your platform.  - **issuedCard**: a transfer initiated by a Adyen-issued card.  - **platformPayment**: funds movements related to payments that are acquired for your users.  - **topUp**: an incoming transfer initiated by your user to top up their balance account.
   */
  @JsonProperty(JSON_PROPERTY_CATEGORY)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public CategoryEnum getCategory() {
    return category;
  }

  /**
   * The category of the transfer.  Possible values:   - **bank**: a transfer involving a [transfer instrument](https://docs.adyen.com/api-explorer/#/legalentity/latest/post/transferInstruments__resParam_id) or a bank account.  - **card**: a transfer involving a third-party card.  - **internal**: a transfer between [balance accounts](https://docs.adyen.com/api-explorer/#/balanceplatform/latest/post/balanceAccounts__resParam_id) within your platform.  - **issuedCard**: a transfer initiated by a Adyen-issued card.  - **platformPayment**: funds movements related to payments that are acquired for your users.  - **topUp**: an incoming transfer initiated by your user to top up their balance account.
   *
   * @param category The category of the transfer.  Possible values:   - **bank**: a transfer involving a [transfer instrument](https://docs.adyen.com/api-explorer/#/legalentity/latest/post/transferInstruments__resParam_id) or a bank account.  - **card**: a transfer involving a third-party card.  - **internal**: a transfer between [balance accounts](https://docs.adyen.com/api-explorer/#/balanceplatform/latest/post/balanceAccounts__resParam_id) within your platform.  - **issuedCard**: a transfer initiated by a Adyen-issued card.  - **platformPayment**: funds movements related to payments that are acquired for your users.  - **topUp**: an incoming transfer initiated by your user to top up their balance account.
   */
  @JsonProperty(JSON_PROPERTY_CATEGORY)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public void setCategory(CategoryEnum category) {
    this.category = category;
  }

  /**
   * categoryData
   *
   * @param categoryData 
   * @return the current {@code Transfer} instance, allowing for method chaining
   */
  public Transfer categoryData(TransferCategoryData categoryData) {
    this.categoryData = categoryData;
    return this;
  }

  /**
   * Get categoryData
   * @return categoryData 
   */
  @JsonProperty(JSON_PROPERTY_CATEGORY_DATA)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public TransferCategoryData getCategoryData() {
    return categoryData;
  }

  /**
   * categoryData
   *
   * @param categoryData 
   */
  @JsonProperty(JSON_PROPERTY_CATEGORY_DATA)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public void setCategoryData(TransferCategoryData categoryData) {
    this.categoryData = categoryData;
  }

  /**
   * counterparty
   *
   * @param counterparty 
   * @return the current {@code Transfer} instance, allowing for method chaining
   */
  public Transfer counterparty(CounterpartyV3 counterparty) {
    this.counterparty = counterparty;
    return this;
  }

  /**
   * Get counterparty
   * @return counterparty 
   */
  @JsonProperty(JSON_PROPERTY_COUNTERPARTY)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public CounterpartyV3 getCounterparty() {
    return counterparty;
  }

  /**
   * counterparty
   *
   * @param counterparty 
   */
  @JsonProperty(JSON_PROPERTY_COUNTERPARTY)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public void setCounterparty(CounterpartyV3 counterparty) {
    this.counterparty = counterparty;
  }

  /**
   * The date and time when the event was triggered, in ISO 8601 extended format. For example, **2020-12-18T10:15:30+01:00**.
   *
   * @param creationDate The date and time when the event was triggered, in ISO 8601 extended format. For example, **2020-12-18T10:15:30+01:00**.
   * @return the current {@code Transfer} instance, allowing for method chaining
   */
  public Transfer creationDate(OffsetDateTime creationDate) {
    this.creationDate = creationDate;
    return this;
  }

  /**
   * The date and time when the event was triggered, in ISO 8601 extended format. For example, **2020-12-18T10:15:30+01:00**.
   * @return creationDate The date and time when the event was triggered, in ISO 8601 extended format. For example, **2020-12-18T10:15:30+01:00**.
   */
  @JsonProperty(JSON_PROPERTY_CREATION_DATE)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public OffsetDateTime getCreationDate() {
    return creationDate;
  }

  /**
   * The date and time when the event was triggered, in ISO 8601 extended format. For example, **2020-12-18T10:15:30+01:00**.
   *
   * @param creationDate The date and time when the event was triggered, in ISO 8601 extended format. For example, **2020-12-18T10:15:30+01:00**.
   */
  @JsonProperty(JSON_PROPERTY_CREATION_DATE)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public void setCreationDate(OffsetDateTime creationDate) {
    this.creationDate = creationDate;
  }

  /**
   * Your description for the transfer. It is used by most banks as the transfer description. We recommend sending a maximum of 140 characters, otherwise the description may be truncated.  Supported characters: **[a-z] [A-Z] [0-9] / - ?** **: ( ) . , ' + Space**  Supported characters for **regular** and **fast** transfers to a US counterparty: **[a-z] [A-Z] [0-9] & $ % # @** **~ = + - _ ' \" ! ?**
   *
   * @param description Your description for the transfer. It is used by most banks as the transfer description. We recommend sending a maximum of 140 characters, otherwise the description may be truncated.  Supported characters: **[a-z] [A-Z] [0-9] / - ?** **: ( ) . , ' + Space**  Supported characters for **regular** and **fast** transfers to a US counterparty: **[a-z] [A-Z] [0-9] & $ % # @** **~ = + - _ ' \" ! ?**
   * @return the current {@code Transfer} instance, allowing for method chaining
   */
  public Transfer description(String description) {
    this.description = description;
    return this;
  }

  /**
   * Your description for the transfer. It is used by most banks as the transfer description. We recommend sending a maximum of 140 characters, otherwise the description may be truncated.  Supported characters: **[a-z] [A-Z] [0-9] / - ?** **: ( ) . , ' + Space**  Supported characters for **regular** and **fast** transfers to a US counterparty: **[a-z] [A-Z] [0-9] & $ % # @** **~ = + - _ ' \" ! ?**
   * @return description Your description for the transfer. It is used by most banks as the transfer description. We recommend sending a maximum of 140 characters, otherwise the description may be truncated.  Supported characters: **[a-z] [A-Z] [0-9] / - ?** **: ( ) . , ' + Space**  Supported characters for **regular** and **fast** transfers to a US counterparty: **[a-z] [A-Z] [0-9] & $ % # @** **~ = + - _ ' \" ! ?**
   */
  @JsonProperty(JSON_PROPERTY_DESCRIPTION)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public String getDescription() {
    return description;
  }

  /**
   * Your description for the transfer. It is used by most banks as the transfer description. We recommend sending a maximum of 140 characters, otherwise the description may be truncated.  Supported characters: **[a-z] [A-Z] [0-9] / - ?** **: ( ) . , ' + Space**  Supported characters for **regular** and **fast** transfers to a US counterparty: **[a-z] [A-Z] [0-9] & $ % # @** **~ = + - _ ' \" ! ?**
   *
   * @param description Your description for the transfer. It is used by most banks as the transfer description. We recommend sending a maximum of 140 characters, otherwise the description may be truncated.  Supported characters: **[a-z] [A-Z] [0-9] / - ?** **: ( ) . , ' + Space**  Supported characters for **regular** and **fast** transfers to a US counterparty: **[a-z] [A-Z] [0-9] & $ % # @** **~ = + - _ ' \" ! ?**
   */
  @JsonProperty(JSON_PROPERTY_DESCRIPTION)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public void setDescription(String description) {
    this.description = description;
  }

  /**
   * directDebitInformation
   *
   * @param directDebitInformation 
   * @return the current {@code Transfer} instance, allowing for method chaining
   */
  public Transfer directDebitInformation(DirectDebitInformation directDebitInformation) {
    this.directDebitInformation = directDebitInformation;
    return this;
  }

  /**
   * Get directDebitInformation
   * @return directDebitInformation 
   */
  @JsonProperty(JSON_PROPERTY_DIRECT_DEBIT_INFORMATION)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public DirectDebitInformation getDirectDebitInformation() {
    return directDebitInformation;
  }

  /**
   * directDebitInformation
   *
   * @param directDebitInformation 
   */
  @JsonProperty(JSON_PROPERTY_DIRECT_DEBIT_INFORMATION)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public void setDirectDebitInformation(DirectDebitInformation directDebitInformation) {
    this.directDebitInformation = directDebitInformation;
  }

  /**
   * The direction of the transfer.  Possible values: **incoming**, **outgoing**.
   *
   * @param direction The direction of the transfer.  Possible values: **incoming**, **outgoing**.
   * @return the current {@code Transfer} instance, allowing for method chaining
   */
  public Transfer direction(DirectionEnum direction) {
    this.direction = direction;
    return this;
  }

  /**
   * The direction of the transfer.  Possible values: **incoming**, **outgoing**.
   * @return direction The direction of the transfer.  Possible values: **incoming**, **outgoing**.
   */
  @JsonProperty(JSON_PROPERTY_DIRECTION)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public DirectionEnum getDirection() {
    return direction;
  }

  /**
   * The direction of the transfer.  Possible values: **incoming**, **outgoing**.
   *
   * @param direction The direction of the transfer.  Possible values: **incoming**, **outgoing**.
   */
  @JsonProperty(JSON_PROPERTY_DIRECTION)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public void setDirection(DirectionEnum direction) {
    this.direction = direction;
  }

  /**
   * The ID of the resource.
   *
   * @param id The ID of the resource.
   * @return the current {@code Transfer} instance, allowing for method chaining
   */
  public Transfer id(String id) {
    this.id = id;
    return this;
  }

  /**
   * The ID of the resource.
   * @return id The ID of the resource.
   */
  @JsonProperty(JSON_PROPERTY_ID)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public String getId() {
    return id;
  }

  /**
   * The ID of the resource.
   *
   * @param id The ID of the resource.
   */
  @JsonProperty(JSON_PROPERTY_ID)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public void setId(String id) {
    this.id = id;
  }

  /**
   * paymentInstrument
   *
   * @param paymentInstrument 
   * @return the current {@code Transfer} instance, allowing for method chaining
   */
  public Transfer paymentInstrument(PaymentInstrument paymentInstrument) {
    this.paymentInstrument = paymentInstrument;
    return this;
  }

  /**
   * Get paymentInstrument
   * @return paymentInstrument 
   */
  @JsonProperty(JSON_PROPERTY_PAYMENT_INSTRUMENT)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public PaymentInstrument getPaymentInstrument() {
    return paymentInstrument;
  }

  /**
   * paymentInstrument
   *
   * @param paymentInstrument 
   */
  @JsonProperty(JSON_PROPERTY_PAYMENT_INSTRUMENT)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public void setPaymentInstrument(PaymentInstrument paymentInstrument) {
    this.paymentInstrument = paymentInstrument;
  }

  /**
   * Additional information about the status of the transfer.
   *
   * @param reason Additional information about the status of the transfer.
   * @return the current {@code Transfer} instance, allowing for method chaining
   */
  public Transfer reason(ReasonEnum reason) {
    this.reason = reason;
    return this;
  }

  /**
   * Additional information about the status of the transfer.
   * @return reason Additional information about the status of the transfer.
   */
  @JsonProperty(JSON_PROPERTY_REASON)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public ReasonEnum getReason() {
    return reason;
  }

  /**
   * Additional information about the status of the transfer.
   *
   * @param reason Additional information about the status of the transfer.
   */
  @JsonProperty(JSON_PROPERTY_REASON)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public void setReason(ReasonEnum reason) {
    this.reason = reason;
  }

  /**
   * Your reference for the transfer, used internally within your platform. If you don't provide this in the request, Adyen generates a unique reference.
   *
   * @param reference Your reference for the transfer, used internally within your platform. If you don't provide this in the request, Adyen generates a unique reference.
   * @return the current {@code Transfer} instance, allowing for method chaining
   */
  public Transfer reference(String reference) {
    this.reference = reference;
    return this;
  }

  /**
   * Your reference for the transfer, used internally within your platform. If you don't provide this in the request, Adyen generates a unique reference.
   * @return reference Your reference for the transfer, used internally within your platform. If you don't provide this in the request, Adyen generates a unique reference.
   */
  @JsonProperty(JSON_PROPERTY_REFERENCE)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public String getReference() {
    return reference;
  }

  /**
   * Your reference for the transfer, used internally within your platform. If you don't provide this in the request, Adyen generates a unique reference.
   *
   * @param reference Your reference for the transfer, used internally within your platform. If you don't provide this in the request, Adyen generates a unique reference.
   */
  @JsonProperty(JSON_PROPERTY_REFERENCE)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public void setReference(String reference) {
    this.reference = reference;
  }

  /**
   *  A reference that is sent to the recipient. This reference is also sent in all webhooks related to the transfer, so you can use it to track statuses for both the source and recipient of funds.   Supported characters: **a-z**, **A-Z**, **0-9**.The maximum length depends on the `category`.   - **internal**: 80 characters  - **bank**: 35 characters when transferring to an IBAN, 15 characters for others.
   *
   * @param referenceForBeneficiary  A reference that is sent to the recipient. This reference is also sent in all webhooks related to the transfer, so you can use it to track statuses for both the source and recipient of funds.   Supported characters: **a-z**, **A-Z**, **0-9**.The maximum length depends on the `category`.   - **internal**: 80 characters  - **bank**: 35 characters when transferring to an IBAN, 15 characters for others.
   * @return the current {@code Transfer} instance, allowing for method chaining
   */
  public Transfer referenceForBeneficiary(String referenceForBeneficiary) {
    this.referenceForBeneficiary = referenceForBeneficiary;
    return this;
  }

  /**
   *  A reference that is sent to the recipient. This reference is also sent in all webhooks related to the transfer, so you can use it to track statuses for both the source and recipient of funds.   Supported characters: **a-z**, **A-Z**, **0-9**.The maximum length depends on the `category`.   - **internal**: 80 characters  - **bank**: 35 characters when transferring to an IBAN, 15 characters for others.
   * @return referenceForBeneficiary  A reference that is sent to the recipient. This reference is also sent in all webhooks related to the transfer, so you can use it to track statuses for both the source and recipient of funds.   Supported characters: **a-z**, **A-Z**, **0-9**.The maximum length depends on the `category`.   - **internal**: 80 characters  - **bank**: 35 characters when transferring to an IBAN, 15 characters for others.
   */
  @JsonProperty(JSON_PROPERTY_REFERENCE_FOR_BENEFICIARY)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public String getReferenceForBeneficiary() {
    return referenceForBeneficiary;
  }

  /**
   *  A reference that is sent to the recipient. This reference is also sent in all webhooks related to the transfer, so you can use it to track statuses for both the source and recipient of funds.   Supported characters: **a-z**, **A-Z**, **0-9**.The maximum length depends on the `category`.   - **internal**: 80 characters  - **bank**: 35 characters when transferring to an IBAN, 15 characters for others.
   *
   * @param referenceForBeneficiary  A reference that is sent to the recipient. This reference is also sent in all webhooks related to the transfer, so you can use it to track statuses for both the source and recipient of funds.   Supported characters: **a-z**, **A-Z**, **0-9**.The maximum length depends on the `category`.   - **internal**: 80 characters  - **bank**: 35 characters when transferring to an IBAN, 15 characters for others.
   */
  @JsonProperty(JSON_PROPERTY_REFERENCE_FOR_BENEFICIARY)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public void setReferenceForBeneficiary(String referenceForBeneficiary) {
    this.referenceForBeneficiary = referenceForBeneficiary;
  }

  /**
   * review
   *
   * @param review 
   * @return the current {@code Transfer} instance, allowing for method chaining
   */
  public Transfer review(TransferReview review) {
    this.review = review;
    return this;
  }

  /**
   * Get review
   * @return review 
   */
  @JsonProperty(JSON_PROPERTY_REVIEW)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public TransferReview getReview() {
    return review;
  }

  /**
   * review
   *
   * @param review 
   */
  @JsonProperty(JSON_PROPERTY_REVIEW)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public void setReview(TransferReview review) {
    this.review = review;
  }

  /**
   * The result of the transfer.   For example, **authorised**, **refused**, or **error**.
   *
   * @param status The result of the transfer.   For example, **authorised**, **refused**, or **error**.
   * @return the current {@code Transfer} instance, allowing for method chaining
   */
  public Transfer status(StatusEnum status) {
    this.status = status;
    return this;
  }

  /**
   * The result of the transfer.   For example, **authorised**, **refused**, or **error**.
   * @return status The result of the transfer.   For example, **authorised**, **refused**, or **error**.
   */
  @JsonProperty(JSON_PROPERTY_STATUS)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public StatusEnum getStatus() {
    return status;
  }

  /**
   * The result of the transfer.   For example, **authorised**, **refused**, or **error**.
   *
   * @param status The result of the transfer.   For example, **authorised**, **refused**, or **error**.
   */
  @JsonProperty(JSON_PROPERTY_STATUS)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public void setStatus(StatusEnum status) {
    this.status = status;
  }

  /**
   * The type of transfer or transaction. For example, **refund**, **payment**, **internalTransfer**, **bankTransfer**.
   *
   * @param type The type of transfer or transaction. For example, **refund**, **payment**, **internalTransfer**, **bankTransfer**.
   * @return the current {@code Transfer} instance, allowing for method chaining
   */
  public Transfer type(TypeEnum type) {
    this.type = type;
    return this;
  }

  /**
   * The type of transfer or transaction. For example, **refund**, **payment**, **internalTransfer**, **bankTransfer**.
   * @return type The type of transfer or transaction. For example, **refund**, **payment**, **internalTransfer**, **bankTransfer**.
   */
  @JsonProperty(JSON_PROPERTY_TYPE)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public TypeEnum getType() {
    return type;
  }

  /**
   * The type of transfer or transaction. For example, **refund**, **payment**, **internalTransfer**, **bankTransfer**.
   *
   * @param type The type of transfer or transaction. For example, **refund**, **payment**, **internalTransfer**, **bankTransfer**.
   */
  @JsonProperty(JSON_PROPERTY_TYPE)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public void setType(TypeEnum type) {
    this.type = type;
  }

  /**
   * Return true if this Transfer object is equal to o.
   */
  @Override
  public boolean equals(Object o) {
    if (this == o) {
      return true;
    }
    if (o == null || getClass() != o.getClass()) {
      return false;
    }
    Transfer transfer = (Transfer) o;
    return Objects.equals(this.accountHolder, transfer.accountHolder) &&
        Objects.equals(this.amount, transfer.amount) &&
        Objects.equals(this.balanceAccount, transfer.balanceAccount) &&
        Objects.equals(this.category, transfer.category) &&
        Objects.equals(this.categoryData, transfer.categoryData) &&
        Objects.equals(this.counterparty, transfer.counterparty) &&
        Objects.equals(this.creationDate, transfer.creationDate) &&
        Objects.equals(this.description, transfer.description) &&
        Objects.equals(this.directDebitInformation, transfer.directDebitInformation) &&
        Objects.equals(this.direction, transfer.direction) &&
        Objects.equals(this.id, transfer.id) &&
        Objects.equals(this.paymentInstrument, transfer.paymentInstrument) &&
        Objects.equals(this.reason, transfer.reason) &&
        Objects.equals(this.reference, transfer.reference) &&
        Objects.equals(this.referenceForBeneficiary, transfer.referenceForBeneficiary) &&
        Objects.equals(this.review, transfer.review) &&
        Objects.equals(this.status, transfer.status) &&
        Objects.equals(this.type, transfer.type);
  }

  @Override
  public int hashCode() {
    return Objects.hash(accountHolder, amount, balanceAccount, category, categoryData, counterparty, creationDate, description, directDebitInformation, direction, id, paymentInstrument, reason, reference, referenceForBeneficiary, review, status, type);
  }

  @Override
  public String toString() {
    StringBuilder sb = new StringBuilder();
    sb.append("class Transfer {\n");
    sb.append("    accountHolder: ").append(toIndentedString(accountHolder)).append("\n");
    sb.append("    amount: ").append(toIndentedString(amount)).append("\n");
    sb.append("    balanceAccount: ").append(toIndentedString(balanceAccount)).append("\n");
    sb.append("    category: ").append(toIndentedString(category)).append("\n");
    sb.append("    categoryData: ").append(toIndentedString(categoryData)).append("\n");
    sb.append("    counterparty: ").append(toIndentedString(counterparty)).append("\n");
    sb.append("    creationDate: ").append(toIndentedString(creationDate)).append("\n");
    sb.append("    description: ").append(toIndentedString(description)).append("\n");
    sb.append("    directDebitInformation: ").append(toIndentedString(directDebitInformation)).append("\n");
    sb.append("    direction: ").append(toIndentedString(direction)).append("\n");
    sb.append("    id: ").append(toIndentedString(id)).append("\n");
    sb.append("    paymentInstrument: ").append(toIndentedString(paymentInstrument)).append("\n");
    sb.append("    reason: ").append(toIndentedString(reason)).append("\n");
    sb.append("    reference: ").append(toIndentedString(reference)).append("\n");
    sb.append("    referenceForBeneficiary: ").append(toIndentedString(referenceForBeneficiary)).append("\n");
    sb.append("    review: ").append(toIndentedString(review)).append("\n");
    sb.append("    status: ").append(toIndentedString(status)).append("\n");
    sb.append("    type: ").append(toIndentedString(type)).append("\n");
    sb.append("}");
    return sb.toString();
  }

  /**
   * Convert the given object to string with each line indented by 4 spaces
   * (except the first line).
   */
  private String toIndentedString(Object o) {
    if (o == null) {
      return "null";
    }
    return o.toString().replace("\n", "\n    ");
  }

/**
   * Create an instance of Transfer given an JSON string
   *
   * @param jsonString JSON string
   * @return An instance of Transfer
   * @throws JsonProcessingException if the JSON string is invalid with respect to Transfer
   */
  public static Transfer fromJson(String jsonString) throws JsonProcessingException {
    return JSON.getMapper().readValue(jsonString, Transfer.class);
  }
/**
  * Convert an instance of Transfer to an JSON string
  *
  * @return JSON string
  */
  public String toJson() throws JsonProcessingException {
    return JSON.getMapper().writeValueAsString(this);
  }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy