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 booleancanEqual(java.lang.Object other)BankAccountdelete()Delete a specified external account for a given account.BankAccountdelete(RequestOptions options)Delete a specified external account for a given account.BankAccountdelete(java.util.Map<java.lang.String,java.lang.Object> params)Delete a specified external account for a given account.BankAccountdelete(java.util.Map<java.lang.String,java.lang.Object> params, RequestOptions options)Delete a specified external account for a given account.booleanequals(java.lang.Object o)java.lang.StringgetAccount()Get ID of expandableaccountobject.java.lang.StringgetAccountHolderName()The name of the person or business that owns the bank account.java.lang.StringgetAccountHolderType()The type of entity that holds the account.AccountgetAccountObject()Get expandedaccount.java.util.List<java.lang.String>getAvailablePayoutMethods()A set of available payout methods for this bank account.java.lang.StringgetBankName()Name of the bank associated with the routing number (e.g.,WELLS FARGO).java.lang.StringgetCountry()Two-letter ISO code representing the country the bank account is located in.java.lang.StringgetCurrency()Three-letter ISO code for the currency paid out to the bank account.java.lang.StringgetCustomer()Get ID of expandablecustomerobject.CustomergetCustomerObject()Get expandedcustomer.java.lang.BooleangetDefaultForCurrency()Whether this bank account is the default external account for its currency.java.lang.BooleangetDeleted()Always true for a deleted object.java.lang.StringgetFingerprint()Uniquely identifies this particular bank account.java.lang.StringgetId()Unique identifier for the object.java.lang.StringgetLast4()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.StringgetObject()String representing the object's type.java.lang.StringgetRoutingNumber()The routing transit number for the bank account.java.lang.StringgetStatus()For bank accounts, possible values arenew,validated,verified,verification_failed, orerrored.inthashCode()voidsetAccount(java.lang.String id)voidsetAccountHolderName(java.lang.String accountHolderName)The name of the person or business that owns the bank account.voidsetAccountHolderType(java.lang.String accountHolderType)The type of entity that holds the account.voidsetAccountObject(Account expandableObject)voidsetAvailablePayoutMethods(java.util.List<java.lang.String> availablePayoutMethods)A set of available payout methods for this bank account.voidsetBankName(java.lang.String bankName)Name of the bank associated with the routing number (e.g.,WELLS FARGO).voidsetCountry(java.lang.String country)Two-letter ISO code representing the country the bank account is located in.voidsetCurrency(java.lang.String currency)Three-letter ISO code for the currency paid out to the bank account.voidsetCustomer(java.lang.String id)voidsetCustomerObject(Customer expandableObject)voidsetDefaultForCurrency(java.lang.Boolean defaultForCurrency)Whether this bank account is the default external account for its currency.voidsetDeleted(java.lang.Boolean deleted)Always true for a deleted object.voidsetFingerprint(java.lang.String fingerprint)Uniquely identifies this particular bank account.voidsetId(java.lang.String id)Unique identifier for the object.voidsetLast4(java.lang.String last4)The last four digits of the bank account number.voidsetMetadata(java.util.Map<java.lang.String,java.lang.String> metadata)Set of key-value pairs that you can attach to an object.voidsetObject(java.lang.String object)String representing the object's type.voidsetRoutingNumber(java.lang.String routingNumber)The routing transit number for the bank account.voidsetStatus(java.lang.String status)For bank accounts, possible values arenew,validated,verified,verification_failed, orerrored.BankAccountupdate(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.BankAccountupdate(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.BankAccountupdate(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.BankAccountupdate(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.BankAccountupdate(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.BankAccountupdate(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.BankAccountverify()Verify a specified bank account for a given customer.BankAccountverify(RequestOptions options)Verify a specified bank account for a given customer.BankAccountverify(BankAccountVerifyParams params)Verify a specified bank account for a given customer.BankAccountverify(BankAccountVerifyParams params, RequestOptions options)Verify a specified bank account for a given customer.BankAccountverify(java.util.Map<java.lang.String,java.lang.Object> params)Verify a specified bank account for a given customer.BankAccountverify(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, 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 expandableaccountobject.
-
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 expandablecustomerobject.
-
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, andmetadataof a bank account belonging to a customer. Other bank account details are not editable, by design.- Specified by:
updatein interfaceExternalAccount- Specified by:
updatein 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, andmetadataof a bank account belonging to a customer. Other bank account details are not editable, by design.- Specified by:
updatein interfaceExternalAccount- Specified by:
updatein 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, andmetadataof 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, andmetadataof 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, andmetadataof 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, andmetadataof 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:
deletein 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:
deletein 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:
deletein 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:
deletein 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 eitherindividualorcompany.
-
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 themethodwhen 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 toerroredand will not continue to send transfers until the bank details are updated.For external accounts, possible values are
newanderrored. 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 toerroredand 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 eitherindividualorcompany.
-
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 themethodwhen 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 toerroredand will not continue to send transfers until the bank details are updated.For external accounts, possible values are
newanderrored. 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 toerroredand transfers are stopped until account details are updated.
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equalsin classjava.lang.Object
-
canEqual
protected boolean canEqual(java.lang.Object other)
-
hashCode
public int hashCode()
- Overrides:
hashCodein 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:
getMetadatain interfaceMetadataStore<BankAccount>
-
-