Class AccountTransfer
-
- All Implemented Interfaces:
public final class AccountTransferAccount transfers move funds between your own accounts at Increase (accounting systems often refer to these as Book Transfers). Account Transfers are free and synchronous. Upon creation they create two Transactions, one negative on the originating account and one positive on the destination account (unless the transfer requires approval, in which case the Transactions will be created when the transfer is approved).
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public final classAccountTransfer.BuilderA builder for AccountTransfer.
public final classAccountTransfer.ApprovalIf your account requires approvals for transfers and the transfer was approved, this will contain details of the approval.
public final classAccountTransfer.CancellationIf your account requires approvals for transfers and the transfer was not approved, this will contain details of the cancellation.
public final classAccountTransfer.CreatedByWhat object created the transfer, either via the API or the dashboard.
public final classAccountTransfer.CurrencyThe ISO 4217 code for the transfer's currency.
public final classAccountTransfer.StatusThe lifecycle status of the transfer.
public final classAccountTransfer.TypeA constant representing the object's type. For this resource it will always be
account_transfer.
-
Method Summary
Modifier and Type Method Description final Stringid()The Account Transfer's identifier. final StringaccountId()The Account from which the transfer originated. final Longamount()The transfer amount in cents. final Optional<AccountTransfer.Approval>approval()If your account requires approvals for transfers and the transfer was approved, this will contain details of the approval. final Optional<AccountTransfer.Cancellation>cancellation()If your account requires approvals for transfers and the transfer was not approved, this will contain details of the cancellation. final OffsetDateTimecreatedAt()The ISO 8601 date and time at which the transfer was created. final Optional<AccountTransfer.CreatedBy>createdBy()What object created the transfer, either via the API or the dashboard. final AccountTransfer.Currencycurrency()The ISO 4217 code for the transfer's currency. final Stringdescription()An internal-facing description for the transfer for display in the API and dashboard. final StringdestinationAccountId()The destination Account's identifier. final Optional<String>destinationTransactionId()The identifier of the Transaction on the destination Account representing the received funds. final Optional<String>idempotencyKey()The idempotency key you chose for this object. final Optional<String>pendingTransactionId()The ID for the pending transaction representing the transfer. final AccountTransfer.Statusstatus()The lifecycle status of the transfer. final Optional<String>transactionId()The identifier of the Transaction on the originating account representing the transferred funds. final AccountTransfer.Typetype()A constant representing the object's type. final JsonField<String>_id()Returns the raw JSON value of id. final JsonField<String>_accountId()Returns the raw JSON value of accountId. final JsonField<Long>_amount()Returns the raw JSON value of amount. final JsonField<AccountTransfer.Approval>_approval()Returns the raw JSON value of approval. final JsonField<AccountTransfer.Cancellation>_cancellation()Returns the raw JSON value of cancellation. final JsonField<OffsetDateTime>_createdAt()Returns the raw JSON value of createdAt. final JsonField<AccountTransfer.CreatedBy>_createdBy()Returns the raw JSON value of createdBy. final JsonField<AccountTransfer.Currency>_currency()Returns the raw JSON value of currency. final JsonField<String>_description()Returns the raw JSON value of description. final JsonField<String>_destinationAccountId()Returns the raw JSON value of destinationAccountId. final JsonField<String>_destinationTransactionId()Returns the raw JSON value of destinationTransactionId. final JsonField<String>_idempotencyKey()Returns the raw JSON value of idempotencyKey. final JsonField<String>_pendingTransactionId()Returns the raw JSON value of pendingTransactionId. final JsonField<AccountTransfer.Status>_status()Returns the raw JSON value of status. final JsonField<String>_transactionId()Returns the raw JSON value of transactionId. final JsonField<AccountTransfer.Type>_type()Returns the raw JSON value of type. final Map<String, JsonValue>_additionalProperties()final AccountTransfer.BuildertoBuilder()final AccountTransfervalidate()final BooleanisValid()Booleanequals(Object other)IntegerhashCode()StringtoString()final static AccountTransfer.Builderbuilder()Returns a mutable builder for constructing an instance of AccountTransfer. -
-
Method Detail
-
amount
final Long amount()
The transfer amount in cents. This will always be positive and indicates the amount of money leaving the originating account.
-
approval
final Optional<AccountTransfer.Approval> approval()
If your account requires approvals for transfers and the transfer was approved, this will contain details of the approval.
-
cancellation
final Optional<AccountTransfer.Cancellation> cancellation()
If your account requires approvals for transfers and the transfer was not approved, this will contain details of the cancellation.
-
createdAt
final OffsetDateTime createdAt()
The ISO 8601 date and time at which the transfer was created.
-
createdBy
final Optional<AccountTransfer.CreatedBy> createdBy()
What object created the transfer, either via the API or the dashboard.
-
currency
final AccountTransfer.Currency currency()
The ISO 4217 code for the transfer's currency.
-
description
final String description()
An internal-facing description for the transfer for display in the API and dashboard. This will also show in the description of the created Transactions.
-
destinationAccountId
final String destinationAccountId()
The destination Account's identifier.
-
destinationTransactionId
final Optional<String> destinationTransactionId()
The identifier of the Transaction on the destination Account representing the received funds.
-
idempotencyKey
final Optional<String> idempotencyKey()
The idempotency key you chose for this object. This value is unique across Increase and is used to ensure that a request is only processed once. Learn more about idempotency.
-
pendingTransactionId
final Optional<String> pendingTransactionId()
The ID for the pending transaction representing the transfer. A pending transaction is created when the transfer requires approval by someone else in your organization.
-
status
final AccountTransfer.Status status()
The lifecycle status of the transfer.
-
transactionId
final Optional<String> transactionId()
The identifier of the Transaction on the originating account representing the transferred funds.
-
type
final AccountTransfer.Type type()
A constant representing the object's type. For this resource it will always be
account_transfer.
-
_id
final JsonField<String> _id()
Returns the raw JSON value of id.
Unlike id, this method doesn't throw if the JSON field has an unexpected type.
-
_accountId
final JsonField<String> _accountId()
Returns the raw JSON value of accountId.
Unlike accountId, this method doesn't throw if the JSON field has an unexpected type.
-
_amount
final JsonField<Long> _amount()
Returns the raw JSON value of amount.
Unlike amount, this method doesn't throw if the JSON field has an unexpected type.
-
_approval
final JsonField<AccountTransfer.Approval> _approval()
Returns the raw JSON value of approval.
Unlike approval, this method doesn't throw if the JSON field has an unexpected type.
-
_cancellation
final JsonField<AccountTransfer.Cancellation> _cancellation()
Returns the raw JSON value of cancellation.
Unlike cancellation, this method doesn't throw if the JSON field has an unexpected type.
-
_createdAt
final JsonField<OffsetDateTime> _createdAt()
Returns the raw JSON value of createdAt.
Unlike createdAt, this method doesn't throw if the JSON field has an unexpected type.
-
_createdBy
final JsonField<AccountTransfer.CreatedBy> _createdBy()
Returns the raw JSON value of createdBy.
Unlike createdBy, this method doesn't throw if the JSON field has an unexpected type.
-
_currency
final JsonField<AccountTransfer.Currency> _currency()
Returns the raw JSON value of currency.
Unlike currency, this method doesn't throw if the JSON field has an unexpected type.
-
_description
final JsonField<String> _description()
Returns the raw JSON value of description.
Unlike description, this method doesn't throw if the JSON field has an unexpected type.
-
_destinationAccountId
final JsonField<String> _destinationAccountId()
Returns the raw JSON value of destinationAccountId.
Unlike destinationAccountId, this method doesn't throw if the JSON field has an unexpected type.
-
_destinationTransactionId
final JsonField<String> _destinationTransactionId()
Returns the raw JSON value of destinationTransactionId.
Unlike destinationTransactionId, this method doesn't throw if the JSON field has an unexpected type.
-
_idempotencyKey
final JsonField<String> _idempotencyKey()
Returns the raw JSON value of idempotencyKey.
Unlike idempotencyKey, this method doesn't throw if the JSON field has an unexpected type.
-
_pendingTransactionId
final JsonField<String> _pendingTransactionId()
Returns the raw JSON value of pendingTransactionId.
Unlike pendingTransactionId, this method doesn't throw if the JSON field has an unexpected type.
-
_status
final JsonField<AccountTransfer.Status> _status()
Returns the raw JSON value of status.
Unlike status, this method doesn't throw if the JSON field has an unexpected type.
-
_transactionId
final JsonField<String> _transactionId()
Returns the raw JSON value of transactionId.
Unlike transactionId, this method doesn't throw if the JSON field has an unexpected type.
-
_type
final JsonField<AccountTransfer.Type> _type()
Returns the raw JSON value of type.
Unlike type, this method doesn't throw if the JSON field has an unexpected type.
-
_additionalProperties
final Map<String, JsonValue> _additionalProperties()
-
toBuilder
final AccountTransfer.Builder toBuilder()
-
validate
final AccountTransfer validate()
-
builder
final static AccountTransfer.Builder builder()
Returns a mutable builder for constructing an instance of AccountTransfer.
The following fields are required:
.id() .accountId() .amount() .approval() .cancellation() .createdAt() .createdBy() .currency() .description() .destinationAccountId() .destinationTransactionId() .idempotencyKey() .pendingTransactionId() .status() .transactionId() .type()
-
-
-
-