Class Transaction
-
- All Implemented Interfaces:
public final class TransactionTransactions are the immutable additions and removals of money from your bank account. They're the equivalent of line items on your bank statement. To learn more, see /documentation/transactions-transfers.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public final classTransaction.BuilderA builder for Transaction.
public final classTransaction.CurrencyThe ISO 4217 code for the Transaction's currency. This will match the currency on the Transaction's Account.
public final classTransaction.RouteTypeThe type of the route this Transaction came through.
public final classTransaction.SourceThis is an object giving more details on the network-level event that caused the Transaction. Note that for backwards compatibility reasons, additional undocumented keys may appear in this object. These should be treated as deprecated and will be removed in the future.
public final classTransaction.TypeA constant representing the object's type. For this resource it will always be
transaction.
-
Method Summary
Modifier and Type Method Description final Stringid()The Transaction identifier. final StringaccountId()The identifier for the Account the Transaction belongs to. final Longamount()The Transaction amount in the minor unit of its currency. final OffsetDateTimecreatedAt()The ISO 8601 date on which the Transaction occurred. final Transaction.Currencycurrency()The ISO 4217 code for the Transaction's currency. final Stringdescription()An informational message describing this transaction. final Optional<String>routeId()The identifier for the route this Transaction came through. final Optional<Transaction.RouteType>routeType()The type of the route this Transaction came through. final Transaction.Sourcesource()This is an object giving more details on the network-level event that caused the Transaction. final Transaction.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<OffsetDateTime>_createdAt()Returns the raw JSON value of createdAt. final JsonField<Transaction.Currency>_currency()Returns the raw JSON value of currency. final JsonField<String>_description()Returns the raw JSON value of description. final JsonField<String>_routeId()Returns the raw JSON value of routeId. final JsonField<Transaction.RouteType>_routeType()Returns the raw JSON value of routeType. final JsonField<Transaction.Source>_source()Returns the raw JSON value of source. final JsonField<Transaction.Type>_type()Returns the raw JSON value of type. final Map<String, JsonValue>_additionalProperties()final Transaction.BuildertoBuilder()final Transactionvalidate()Validates that the types of all values in this object match their expected types recursively. final BooleanisValid()Booleanequals(Object other)IntegerhashCode()StringtoString()final static Transaction.Builderbuilder()Returns a mutable builder for constructing an instance of Transaction. -
-
Method Detail
-
amount
final Long amount()
The Transaction amount in the minor unit of its currency. For dollars, for example, this is cents.
-
createdAt
final OffsetDateTime createdAt()
The ISO 8601 date on which the Transaction occurred.
-
currency
final Transaction.Currency currency()
The ISO 4217 code for the Transaction's currency. This will match the currency on the Transaction's Account.
-
description
final String description()
An informational message describing this transaction. Use the fields in
sourceto get more detailed information. This field appears as the line-item on the statement.
-
routeId
final Optional<String> routeId()
The identifier for the route this Transaction came through. Routes are things like cards and ACH details.
-
routeType
final Optional<Transaction.RouteType> routeType()
The type of the route this Transaction came through.
-
source
final Transaction.Source source()
This is an object giving more details on the network-level event that caused the Transaction. Note that for backwards compatibility reasons, additional undocumented keys may appear in this object. These should be treated as deprecated and will be removed in the future.
-
type
final Transaction.Type type()
A constant representing the object's type. For this resource it will always be
transaction.
-
_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.
-
_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.
-
_currency
final JsonField<Transaction.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.
-
_routeId
final JsonField<String> _routeId()
Returns the raw JSON value of routeId.
Unlike routeId, this method doesn't throw if the JSON field has an unexpected type.
-
_routeType
final JsonField<Transaction.RouteType> _routeType()
Returns the raw JSON value of routeType.
Unlike routeType, this method doesn't throw if the JSON field has an unexpected type.
-
_source
final JsonField<Transaction.Source> _source()
Returns the raw JSON value of source.
Unlike source, this method doesn't throw if the JSON field has an unexpected type.
-
_type
final JsonField<Transaction.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 Transaction.Builder toBuilder()
-
validate
final Transaction validate()
Validates that the types of all values in this object match their expected types recursively.
This method is not forwards compatible with new types from the API for existing fields.
-
builder
final static Transaction.Builder builder()
Returns a mutable builder for constructing an instance of Transaction.
The following fields are required:
.id() .accountId() .amount() .createdAt() .currency() .description() .routeId() .routeType() .source() .type()
-
-
-
-