Class BankAccount
- java.lang.Object
-
- com.stripe.model.StripeObject
-
- com.stripe.net.ApiResource
-
- com.stripe.model.BankAccount
-
- All Implemented Interfaces:
ExternalAccount
,HasId
,MetadataStore<BankAccount>
,PaymentSource
,StripeObjectInterface
public class BankAccount extends ApiResource implements MetadataStore<BankAccount>, ExternalAccount, PaymentSource
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class com.stripe.net.ApiResource
ApiResource.RequestMethod
-
-
Field Summary
-
Fields inherited from class com.stripe.net.ApiResource
CHARSET, GSON
-
Fields inherited from class com.stripe.model.StripeObject
PRETTY_PRINT_GSON
-
-
Constructor Summary
Constructors Constructor Description BankAccount()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected boolean
canEqual(java.lang.Object other)
BankAccount
delete()
Delete a specified external account for a given account.BankAccount
delete(RequestOptions options)
Delete a specified external account for a given account.BankAccount
delete(java.util.Map<java.lang.String,java.lang.Object> params)
Delete a specified external account for a given account.BankAccount
delete(java.util.Map<java.lang.String,java.lang.Object> params, RequestOptions options)
Delete a specified external account for a given account.boolean
equals(java.lang.Object o)
java.lang.String
getAccount()
Get ID of expandableaccount
object.java.lang.String
getAccountHolderName()
The name of the person or business that owns the bank account.java.lang.String
getAccountHolderType()
The type of entity that holds the account.Account
getAccountObject()
Get expandedaccount
.java.lang.String
getAccountType()
The bank account type.java.util.List<java.lang.String>
getAvailablePayoutMethods()
A set of available payout methods for this bank account.java.lang.String
getBankName()
Name of the bank associated with the routing number (e.g.,WELLS FARGO
).java.lang.String
getCountry()
Two-letter ISO code representing the country the bank account is located in.java.lang.String
getCurrency()
Three-letter ISO code for the currency paid out to the bank account.java.lang.String
getCustomer()
Get ID of expandablecustomer
object.Customer
getCustomerObject()
Get expandedcustomer
.java.lang.Boolean
getDefaultForCurrency()
Whether this bank account is the default external account for its currency.java.lang.Boolean
getDeleted()
Always true for a deleted object.java.lang.String
getFingerprint()
Uniquely identifies this particular bank account.java.lang.String
getId()
Unique identifier for the object.java.lang.String
getLast4()
The last four digits of the bank account number.java.util.Map<java.lang.String,java.lang.String>
getMetadata()
Set of key-value pairs that you can attach to an object.java.lang.String
getObject()
String representing the object's type.java.lang.String
getRoutingNumber()
The routing transit number for the bank account.java.lang.String
getStatus()
For bank accounts, possible values arenew
,validated
,verified
,verification_failed
, orerrored
.int
hashCode()
void
setAccount(java.lang.String id)
void
setAccountHolderName(java.lang.String accountHolderName)
The name of the person or business that owns the bank account.void
setAccountHolderType(java.lang.String accountHolderType)
The type of entity that holds the account.void
setAccountObject(Account expandableObject)
void
setAccountType(java.lang.String accountType)
The bank account type.void
setAvailablePayoutMethods(java.util.List<java.lang.String> availablePayoutMethods)
A set of available payout methods for this bank account.void
setBankName(java.lang.String bankName)
Name of the bank associated with the routing number (e.g.,WELLS FARGO
).void
setCountry(java.lang.String country)
Two-letter ISO code representing the country the bank account is located in.void
setCurrency(java.lang.String currency)
Three-letter ISO code for the currency paid out to the bank account.void
setCustomer(java.lang.String id)
void
setCustomerObject(Customer expandableObject)
void
setDefaultForCurrency(java.lang.Boolean defaultForCurrency)
Whether this bank account is the default external account for its currency.void
setDeleted(java.lang.Boolean deleted)
Always true for a deleted object.void
setFingerprint(java.lang.String fingerprint)
Uniquely identifies this particular bank account.void
setId(java.lang.String id)
Unique identifier for the object.void
setLast4(java.lang.String last4)
The last four digits of the bank account number.void
setMetadata(java.util.Map<java.lang.String,java.lang.String> metadata)
Set of key-value pairs that you can attach to an object.void
setObject(java.lang.String object)
String representing the object's type.void
setRoutingNumber(java.lang.String routingNumber)
The routing transit number for the bank account.void
setStatus(java.lang.String status)
For bank accounts, possible values arenew
,validated
,verified
,verification_failed
, orerrored
.BankAccount
update(BankAccountUpdateOnAccountParams params)
Updates the metadata, account holder name, and account holder type of a bank account belonging to a Custom account, and optionally sets it as the default for its currency.BankAccount
update(BankAccountUpdateOnAccountParams params, RequestOptions options)
Updates the metadata, account holder name, and account holder type of a bank account belonging to a Custom account, and optionally sets it as the default for its currency.BankAccount
update(BankAccountUpdateOnCustomerParams params)
Updates the metadata, account holder name, and account holder type of a bank account belonging to a Custom account, and optionally sets it as the default for its currency.BankAccount
update(BankAccountUpdateOnCustomerParams params, RequestOptions options)
Updates the metadata, account holder name, and account holder type of a bank account belonging to a Custom account, and optionally sets it as the default for its currency.BankAccount
update(java.util.Map<java.lang.String,java.lang.Object> params)
Updates the metadata, account holder name, and account holder type of a bank account belonging to a Custom account, and optionally sets it as the default for its currency.BankAccount
update(java.util.Map<java.lang.String,java.lang.Object> params, RequestOptions options)
Updates the metadata, account holder name, and account holder type of a bank account belonging to a Custom account, and optionally sets it as the default for its currency.BankAccount
verify()
Verify a specified bank account for a given customer.BankAccount
verify(RequestOptions options)
Verify a specified bank account for a given customer.BankAccount
verify(BankAccountVerifyParams params)
Verify a specified bank account for a given customer.BankAccount
verify(BankAccountVerifyParams params, RequestOptions options)
Verify a specified bank account for a given customer.BankAccount
verify(java.util.Map<java.lang.String,java.lang.Object> params)
Verify a specified bank account for a given customer.BankAccount
verify(java.util.Map<java.lang.String,java.lang.Object> params, RequestOptions options)
Verify a specified bank account for a given customer.-
Methods inherited from class com.stripe.net.ApiResource
checkNullTypedParams, classUrl, classUrl, instanceUrl, instanceUrl, request, request, requestCollection, requestCollection, requestSearchResult, requestSearchResult, requestStream, requestStream, setExpandableFieldId, setStripeResponseGetter, singleClassUrl, singleClassUrl, subresourceUrl, urlEncode, urlEncodeId
-
Methods inherited from class com.stripe.model.StripeObject
equals, getLastResponse, getRawJsonObject, setLastResponse, toJson, toString
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface com.stripe.model.StripeObjectInterface
getLastResponse, setLastResponse
-
-
-
-
Method Detail
-
getAccount
public java.lang.String getAccount()
Get ID of expandableaccount
object.
-
setAccount
public void setAccount(java.lang.String id)
-
getAccountObject
public Account getAccountObject()
Get expandedaccount
.
-
setAccountObject
public void setAccountObject(Account expandableObject)
-
getCustomer
public java.lang.String getCustomer()
Get ID of expandablecustomer
object.
-
setCustomer
public void setCustomer(java.lang.String id)
-
getCustomerObject
public Customer getCustomerObject()
Get expandedcustomer
.
-
setCustomerObject
public void setCustomerObject(Customer expandableObject)
-
verify
public BankAccount verify() throws StripeException
Verify a specified bank account for a given customer.- Throws:
StripeException
-
verify
public BankAccount verify(RequestOptions options) throws StripeException
Verify a specified bank account for a given customer.- Throws:
StripeException
-
verify
public BankAccount verify(java.util.Map<java.lang.String,java.lang.Object> params) throws StripeException
Verify a specified bank account for a given customer.- Throws:
StripeException
-
verify
public BankAccount verify(java.util.Map<java.lang.String,java.lang.Object> params, RequestOptions options) throws StripeException
Verify a specified bank account for a given customer.- Throws:
StripeException
-
verify
public BankAccount verify(BankAccountVerifyParams params) throws StripeException
Verify a specified bank account for a given customer.- Throws:
StripeException
-
verify
public BankAccount verify(BankAccountVerifyParams params, RequestOptions options) throws StripeException
Verify a specified bank account for a given customer.- Throws:
StripeException
-
update
public BankAccount update(java.util.Map<java.lang.String,java.lang.Object> params) throws StripeException
Updates the metadata, account holder name, and account holder type of a bank account belonging to a Custom account, and optionally sets it as the default for its currency. Other bank account details are not editable by design.You can re-enable a disabled bank account by performing an update call without providing any arguments or changes.
Updates the
account_holder_name
,account_holder_type
, andmetadata
of a bank account belonging to a customer. Other bank account details are not editable, by design.- Specified by:
update
in interfaceExternalAccount
- Specified by:
update
in interfaceMetadataStore<BankAccount>
- Throws:
StripeException
-
update
public BankAccount update(java.util.Map<java.lang.String,java.lang.Object> params, RequestOptions options) throws StripeException
Updates the metadata, account holder name, and account holder type of a bank account belonging to a Custom account, and optionally sets it as the default for its currency. Other bank account details are not editable by design.You can re-enable a disabled bank account by performing an update call without providing any arguments or changes.
Updates the
account_holder_name
,account_holder_type
, andmetadata
of a bank account belonging to a customer. Other bank account details are not editable, by design.- Specified by:
update
in interfaceExternalAccount
- Specified by:
update
in interfaceMetadataStore<BankAccount>
- Throws:
StripeException
-
update
public BankAccount update(BankAccountUpdateOnAccountParams params) throws StripeException
Updates the metadata, account holder name, and account holder type of a bank account belonging to a Custom account, and optionally sets it as the default for its currency. Other bank account details are not editable by design.You can re-enable a disabled bank account by performing an update call without providing any arguments or changes.
Updates the
account_holder_name
,account_holder_type
, andmetadata
of a bank account belonging to a customer. Other bank account details are not editable, by design.- Throws:
StripeException
-
update
public BankAccount update(BankAccountUpdateOnAccountParams params, RequestOptions options) throws StripeException
Updates the metadata, account holder name, and account holder type of a bank account belonging to a Custom account, and optionally sets it as the default for its currency. Other bank account details are not editable by design.You can re-enable a disabled bank account by performing an update call without providing any arguments or changes.
Updates the
account_holder_name
,account_holder_type
, andmetadata
of a bank account belonging to a customer. Other bank account details are not editable, by design.- Throws:
StripeException
-
update
public BankAccount update(BankAccountUpdateOnCustomerParams params) throws StripeException
Updates the metadata, account holder name, and account holder type of a bank account belonging to a Custom account, and optionally sets it as the default for its currency. Other bank account details are not editable by design.You can re-enable a disabled bank account by performing an update call without providing any arguments or changes.
Updates the
account_holder_name
,account_holder_type
, andmetadata
of a bank account belonging to a customer. Other bank account details are not editable, by design.- Throws:
StripeException
-
update
public BankAccount update(BankAccountUpdateOnCustomerParams params, RequestOptions options) throws StripeException
Updates the metadata, account holder name, and account holder type of a bank account belonging to a Custom account, and optionally sets it as the default for its currency. Other bank account details are not editable by design.You can re-enable a disabled bank account by performing an update call without providing any arguments or changes.
Updates the
account_holder_name
,account_holder_type
, andmetadata
of a bank account belonging to a customer. Other bank account details are not editable, by design.- Throws:
StripeException
-
delete
public BankAccount delete() throws StripeException
Delete a specified external account for a given account.Delete a specified source for a given customer.
- Specified by:
delete
in interfaceExternalAccount
- Throws:
StripeException
-
delete
public BankAccount delete(RequestOptions options) throws StripeException
Delete a specified external account for a given account.Delete a specified source for a given customer.
- Specified by:
delete
in interfaceExternalAccount
- Throws:
StripeException
-
delete
public BankAccount delete(java.util.Map<java.lang.String,java.lang.Object> params) throws StripeException
Delete a specified external account for a given account.Delete a specified source for a given customer.
- Specified by:
delete
in interfaceExternalAccount
- Throws:
StripeException
-
delete
public BankAccount delete(java.util.Map<java.lang.String,java.lang.Object> params, RequestOptions options) throws StripeException
Delete a specified external account for a given account.Delete a specified source for a given customer.
- Specified by:
delete
in interfaceExternalAccount
- Throws:
StripeException
-
getAccountHolderName
public java.lang.String getAccountHolderName()
The name of the person or business that owns the bank account.
-
getAccountHolderType
public java.lang.String getAccountHolderType()
The type of entity that holds the account. This can be eitherindividual
orcompany
.
-
getAccountType
public java.lang.String getAccountType()
The bank account type. This can only bechecking
orsavings
in most countries. In Japan, this can only befutsu
ortoza
.
-
getAvailablePayoutMethods
public java.util.List<java.lang.String> getAvailablePayoutMethods()
A set of available payout methods for this bank account. Only values from this set should be passed as themethod
when creating a payout.
-
getBankName
public java.lang.String getBankName()
Name of the bank associated with the routing number (e.g.,WELLS FARGO
).
-
getCountry
public java.lang.String getCountry()
Two-letter ISO code representing the country the bank account is located in.
-
getCurrency
public java.lang.String getCurrency()
Three-letter ISO code for the currency paid out to the bank account.
-
getDefaultForCurrency
public java.lang.Boolean getDefaultForCurrency()
Whether this bank account is the default external account for its currency.
-
getDeleted
public java.lang.Boolean getDeleted()
Always true for a deleted object.
-
getFingerprint
public java.lang.String getFingerprint()
Uniquely identifies this particular bank account. You can use this attribute to check whether two bank accounts are the same.
-
getLast4
public java.lang.String getLast4()
The last four digits of the bank account number.
-
getObject
public java.lang.String getObject()
String representing the object's type. Objects of the same type share the same value.Equal to
bank_account
.
-
getRoutingNumber
public java.lang.String getRoutingNumber()
The routing transit number for the bank account.
-
getStatus
public java.lang.String getStatus()
For bank accounts, possible values arenew
,validated
,verified
,verification_failed
, orerrored
. A bank account that hasn't had any activity or validation performed isnew
. If Stripe can determine that the bank account exists, its status will bevalidated
. Note that there often isn’t enough information to know (e.g., for smaller credit unions), and the validation is not always run. If customer bank account verification has succeeded, the bank account status will beverified
. If the verification failed for any reason, such as microdeposit failure, the status will beverification_failed
. If a transfer sent to this bank account fails, we'll set the status toerrored
and will not continue to send transfers until the bank details are updated.For external accounts, possible values are
new
anderrored
. Validations aren't run against external accounts because they're only used for payouts. This means the other statuses don't apply. If a transfer fails, the status is set toerrored
and transfers are stopped until account details are updated.
-
setAccountHolderName
public void setAccountHolderName(java.lang.String accountHolderName)
The name of the person or business that owns the bank account.
-
setAccountHolderType
public void setAccountHolderType(java.lang.String accountHolderType)
The type of entity that holds the account. This can be eitherindividual
orcompany
.
-
setAccountType
public void setAccountType(java.lang.String accountType)
The bank account type. This can only bechecking
orsavings
in most countries. In Japan, this can only befutsu
ortoza
.
-
setAvailablePayoutMethods
public void setAvailablePayoutMethods(java.util.List<java.lang.String> availablePayoutMethods)
A set of available payout methods for this bank account. Only values from this set should be passed as themethod
when creating a payout.
-
setBankName
public void setBankName(java.lang.String bankName)
Name of the bank associated with the routing number (e.g.,WELLS FARGO
).
-
setCountry
public void setCountry(java.lang.String country)
Two-letter ISO code representing the country the bank account is located in.
-
setCurrency
public void setCurrency(java.lang.String currency)
Three-letter ISO code for the currency paid out to the bank account.
-
setDefaultForCurrency
public void setDefaultForCurrency(java.lang.Boolean defaultForCurrency)
Whether this bank account is the default external account for its currency.
-
setDeleted
public void setDeleted(java.lang.Boolean deleted)
Always true for a deleted object.
-
setFingerprint
public void setFingerprint(java.lang.String fingerprint)
Uniquely identifies this particular bank account. You can use this attribute to check whether two bank accounts are the same.
-
setId
public void setId(java.lang.String id)
Unique identifier for the object.
-
setLast4
public void setLast4(java.lang.String last4)
The last four digits of the bank account number.
-
setMetadata
public void setMetadata(java.util.Map<java.lang.String,java.lang.String> metadata)
Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format.
-
setObject
public void setObject(java.lang.String object)
String representing the object's type. Objects of the same type share the same value.Equal to
bank_account
.
-
setRoutingNumber
public void setRoutingNumber(java.lang.String routingNumber)
The routing transit number for the bank account.
-
setStatus
public void setStatus(java.lang.String status)
For bank accounts, possible values arenew
,validated
,verified
,verification_failed
, orerrored
. A bank account that hasn't had any activity or validation performed isnew
. If Stripe can determine that the bank account exists, its status will bevalidated
. Note that there often isn’t enough information to know (e.g., for smaller credit unions), and the validation is not always run. If customer bank account verification has succeeded, the bank account status will beverified
. If the verification failed for any reason, such as microdeposit failure, the status will beverification_failed
. If a transfer sent to this bank account fails, we'll set the status toerrored
and will not continue to send transfers until the bank details are updated.For external accounts, possible values are
new
anderrored
. Validations aren't run against external accounts because they're only used for payouts. This means the other statuses don't apply. If a transfer fails, the status is set toerrored
and transfers are stopped until account details are updated.
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equals
in classjava.lang.Object
-
canEqual
protected boolean canEqual(java.lang.Object other)
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
getId
public java.lang.String getId()
Unique identifier for the object.
-
getMetadata
public java.util.Map<java.lang.String,java.lang.String> getMetadata()
Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format.- Specified by:
getMetadata
in interfaceMetadataStore<BankAccount>
-
-