Class Card
- java.lang.Object
-
- com.stripe.model.StripeObject
-
- com.stripe.net.ApiResource
-
- com.stripe.model.Card
-
- All Implemented Interfaces:
ExternalAccount
,HasId
,MetadataStore<Card>
,PaymentSource
,StripeObjectInterface
public class Card extends ApiResource implements MetadataStore<Card>, 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 Card()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected boolean
canEqual(java.lang.Object other)
Card
delete()
Delete a specified external account for a given account.Card
delete(RequestOptions options)
Delete a specified external account for a given account.Card
delete(java.util.Map<java.lang.String,java.lang.Object> params)
Delete a specified external account for a given account.Card
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.Account
getAccountObject()
Get expandedaccount
.java.lang.String
getAddressCity()
City/District/Suburb/Town/Village.java.lang.String
getAddressCountry()
Billing address country, if provided when creating card.java.lang.String
getAddressLine1()
Address line 1 (Street address/PO Box/Company name).java.lang.String
getAddressLine1Check()
Ifaddress_line1
was provided, results of the check:pass
,fail
,unavailable
, orunchecked
.java.lang.String
getAddressLine2()
Address line 2 (Apartment/Suite/Unit/Building).java.lang.String
getAddressState()
State/County/Province/Region.java.lang.String
getAddressZip()
ZIP or postal code.java.lang.String
getAddressZipCheck()
Ifaddress_zip
was provided, results of the check:pass
,fail
,unavailable
, orunchecked
.java.util.List<java.lang.String>
getAvailablePayoutMethods()
A set of available payout methods for this card.java.lang.String
getBrand()
Card brand.java.lang.String
getCountry()
Two-letter ISO code representing the country of the card.java.lang.String
getCurrency()
Three-letter ISO code for currency.java.lang.String
getCustomer()
Get ID of expandablecustomer
object.Customer
getCustomerObject()
Get expandedcustomer
.java.lang.String
getCvcCheck()
If a CVC was provided, results of the check:pass
,fail
,unavailable
, orunchecked
.java.lang.Boolean
getDefaultForCurrency()
Whether this card is the default external account for its currency.java.lang.Boolean
getDeleted()
Always true for a deleted object.java.lang.String
getDescription()
A high-level description of the type of cards issued in this range.java.lang.String
getDynamicLast4()
(For tokenized numbers only.) The last four digits of the device account number.java.lang.Long
getExpMonth()
Two-digit number representing the card's expiration month.java.lang.Long
getExpYear()
Four-digit number representing the card's expiration year.java.lang.String
getFingerprint()
Uniquely identifies this particular card number.java.lang.String
getFunding()
Card funding type.java.lang.String
getId()
Unique identifier for the object.java.lang.String
getIin()
Issuer identification number of the card.java.lang.String
getIssuer()
The name of the card's issuing bank.java.lang.String
getLast4()
The last four digits of the card.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
getName()
Cardholder name.java.lang.String
getObject()
String representing the object's type.java.lang.String
getRecipient()
Get ID of expandablerecipient
object.Recipient
getRecipientObject()
Get expandedrecipient
.java.lang.String
getTokenizationMethod()
If the card number is tokenized, this is the method that was used.int
hashCode()
void
setAccount(java.lang.String id)
void
setAccountObject(Account expandableObject)
void
setAddressCity(java.lang.String addressCity)
City/District/Suburb/Town/Village.void
setAddressCountry(java.lang.String addressCountry)
Billing address country, if provided when creating card.void
setAddressLine1(java.lang.String addressLine1)
Address line 1 (Street address/PO Box/Company name).void
setAddressLine1Check(java.lang.String addressLine1Check)
Ifaddress_line1
was provided, results of the check:pass
,fail
,unavailable
, orunchecked
.void
setAddressLine2(java.lang.String addressLine2)
Address line 2 (Apartment/Suite/Unit/Building).void
setAddressState(java.lang.String addressState)
State/County/Province/Region.void
setAddressZip(java.lang.String addressZip)
ZIP or postal code.void
setAddressZipCheck(java.lang.String addressZipCheck)
Ifaddress_zip
was provided, results of the check:pass
,fail
,unavailable
, orunchecked
.void
setAvailablePayoutMethods(java.util.List<java.lang.String> availablePayoutMethods)
A set of available payout methods for this card.void
setBrand(java.lang.String brand)
Card brand.void
setCountry(java.lang.String country)
Two-letter ISO code representing the country of the card.void
setCurrency(java.lang.String currency)
Three-letter ISO code for currency.void
setCustomer(java.lang.String id)
void
setCustomerObject(Customer expandableObject)
void
setCvcCheck(java.lang.String cvcCheck)
If a CVC was provided, results of the check:pass
,fail
,unavailable
, orunchecked
.void
setDefaultForCurrency(java.lang.Boolean defaultForCurrency)
Whether this card is the default external account for its currency.void
setDeleted(java.lang.Boolean deleted)
Always true for a deleted object.void
setDescription(java.lang.String description)
A high-level description of the type of cards issued in this range.void
setDynamicLast4(java.lang.String dynamicLast4)
(For tokenized numbers only.) The last four digits of the device account number.void
setExpMonth(java.lang.Long expMonth)
Two-digit number representing the card's expiration month.void
setExpYear(java.lang.Long expYear)
Four-digit number representing the card's expiration year.void
setFingerprint(java.lang.String fingerprint)
Uniquely identifies this particular card number.void
setFunding(java.lang.String funding)
Card funding type.void
setId(java.lang.String id)
Unique identifier for the object.void
setIin(java.lang.String iin)
Issuer identification number of the card.void
setIssuer(java.lang.String issuer)
The name of the card's issuing bank.void
setLast4(java.lang.String last4)
The last four digits of the card.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
setName(java.lang.String name)
Cardholder name.void
setObject(java.lang.String object)
String representing the object's type.void
setRecipient(java.lang.String id)
void
setRecipientObject(Recipient expandableObject)
void
setTokenizationMethod(java.lang.String tokenizationMethod)
If the card number is tokenized, this is the method that was used.Card
update(CardUpdateOnAccountParams params)
If you need to update only some card details, like the billing address or expiration date, you can do so without having to re-enter the full card details.Card
update(CardUpdateOnAccountParams params, RequestOptions options)
If you need to update only some card details, like the billing address or expiration date, you can do so without having to re-enter the full card details.Card
update(CardUpdateOnCustomerParams params)
If you need to update only some card details, like the billing address or expiration date, you can do so without having to re-enter the full card details.Card
update(CardUpdateOnCustomerParams params, RequestOptions options)
If you need to update only some card details, like the billing address or expiration date, you can do so without having to re-enter the full card details.Card
update(java.util.Map<java.lang.String,java.lang.Object> params)
If you need to update only some card details, like the billing address or expiration date, you can do so without having to re-enter the full card details.Card
update(java.util.Map<java.lang.String,java.lang.Object> params, RequestOptions options)
If you need to update only some card details, like the billing address or expiration date, you can do so without having to re-enter the full card details.-
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)
-
getRecipient
public java.lang.String getRecipient()
Get ID of expandablerecipient
object.
-
setRecipient
public void setRecipient(java.lang.String id)
-
getRecipientObject
public Recipient getRecipientObject()
Get expandedrecipient
.
-
setRecipientObject
public void setRecipientObject(Recipient expandableObject)
-
update
public Card update(java.util.Map<java.lang.String,java.lang.Object> params) throws StripeException
If you need to update only some card details, like the billing address or expiration date, you can do so without having to re-enter the full card details. Stripe also works directly with card networks so that your customers can continue using your service without interruption.Updates a specified card for a given customer.
- Specified by:
update
in interfaceExternalAccount
- Specified by:
update
in interfaceMetadataStore<Card>
- Throws:
StripeException
-
update
public Card update(java.util.Map<java.lang.String,java.lang.Object> params, RequestOptions options) throws StripeException
If you need to update only some card details, like the billing address or expiration date, you can do so without having to re-enter the full card details. Stripe also works directly with card networks so that your customers can continue using your service without interruption.Updates a specified card for a given customer.
- Specified by:
update
in interfaceExternalAccount
- Specified by:
update
in interfaceMetadataStore<Card>
- Throws:
StripeException
-
update
public Card update(CardUpdateOnAccountParams params) throws StripeException
If you need to update only some card details, like the billing address or expiration date, you can do so without having to re-enter the full card details. Stripe also works directly with card networks so that your customers can continue using your service without interruption.Updates a specified card for a given customer.
- Throws:
StripeException
-
update
public Card update(CardUpdateOnAccountParams params, RequestOptions options) throws StripeException
If you need to update only some card details, like the billing address or expiration date, you can do so without having to re-enter the full card details. Stripe also works directly with card networks so that your customers can continue using your service without interruption.Updates a specified card for a given customer.
- Throws:
StripeException
-
update
public Card update(CardUpdateOnCustomerParams params) throws StripeException
If you need to update only some card details, like the billing address or expiration date, you can do so without having to re-enter the full card details. Stripe also works directly with card networks so that your customers can continue using your service without interruption.Updates a specified card for a given customer.
- Throws:
StripeException
-
update
public Card update(CardUpdateOnCustomerParams params, RequestOptions options) throws StripeException
If you need to update only some card details, like the billing address or expiration date, you can do so without having to re-enter the full card details. Stripe also works directly with card networks so that your customers can continue using your service without interruption.Updates a specified card for a given customer.
- Throws:
StripeException
-
delete
public Card 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 Card 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 Card 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 Card 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
-
getAddressCity
public java.lang.String getAddressCity()
City/District/Suburb/Town/Village.
-
getAddressCountry
public java.lang.String getAddressCountry()
Billing address country, if provided when creating card.
-
getAddressLine1
public java.lang.String getAddressLine1()
Address line 1 (Street address/PO Box/Company name).
-
getAddressLine1Check
public java.lang.String getAddressLine1Check()
Ifaddress_line1
was provided, results of the check:pass
,fail
,unavailable
, orunchecked
.
-
getAddressLine2
public java.lang.String getAddressLine2()
Address line 2 (Apartment/Suite/Unit/Building).
-
getAddressState
public java.lang.String getAddressState()
State/County/Province/Region.
-
getAddressZip
public java.lang.String getAddressZip()
ZIP or postal code.
-
getAddressZipCheck
public java.lang.String getAddressZipCheck()
Ifaddress_zip
was provided, results of the check:pass
,fail
,unavailable
, orunchecked
.
-
getAvailablePayoutMethods
public java.util.List<java.lang.String> getAvailablePayoutMethods()
A set of available payout methods for this card. Only values from this set should be passed as themethod
when creating a payout.
-
getBrand
public java.lang.String getBrand()
Card brand. Can beAmerican Express
,Diners Club
,Discover
,JCB
,MasterCard
,UnionPay
,Visa
, orUnknown
.
-
getCountry
public java.lang.String getCountry()
Two-letter ISO code representing the country of the card. You could use this attribute to get a sense of the international breakdown of cards you've collected.
-
getCurrency
public java.lang.String getCurrency()
Three-letter ISO code for currency. Only applicable on accounts (not customers or recipients). The card can be used as a transfer destination for funds in this currency.
-
getCvcCheck
public java.lang.String getCvcCheck()
If a CVC was provided, results of the check:pass
,fail
,unavailable
, orunchecked
. A result of unchecked indicates that CVC was provided but hasn't been checked yet. Checks are typically performed when attaching a card to a Customer object, or when creating a charge. For more details, see Check if a card is valid without a charge.
-
getDefaultForCurrency
public java.lang.Boolean getDefaultForCurrency()
Whether this card is the default external account for its currency.
-
getDeleted
public java.lang.Boolean getDeleted()
Always true for a deleted object.
-
getDescription
public java.lang.String getDescription()
A high-level description of the type of cards issued in this range. (For internal use only and not typically available in standard API requests.)
-
getDynamicLast4
public java.lang.String getDynamicLast4()
(For tokenized numbers only.) The last four digits of the device account number.
-
getExpMonth
public java.lang.Long getExpMonth()
Two-digit number representing the card's expiration month.
-
getExpYear
public java.lang.Long getExpYear()
Four-digit number representing the card's expiration year.
-
getFingerprint
public java.lang.String getFingerprint()
Uniquely identifies this particular card number. You can use this attribute to check whether two customers who’ve signed up with you are using the same card number, for example. For payment methods that tokenize card information (Apple Pay, Google Pay), the tokenized number might be provided instead of the underlying card number.Starting May 1, 2021, card fingerprint in India for Connect will change to allow two fingerprints for the same card --- one for India and one for the rest of the world.
-
getFunding
public java.lang.String getFunding()
Card funding type. Can becredit
,debit
,prepaid
, orunknown
.
-
getIin
public java.lang.String getIin()
Issuer identification number of the card. (For internal use only and not typically available in standard API requests.)
-
getIssuer
public java.lang.String getIssuer()
The name of the card's issuing bank. (For internal use only and not typically available in standard API requests.)
-
getLast4
public java.lang.String getLast4()
The last four digits of the card.
-
getName
public java.lang.String getName()
Cardholder name.
-
getObject
public java.lang.String getObject()
String representing the object's type. Objects of the same type share the same value.Equal to
card
.
-
getTokenizationMethod
public java.lang.String getTokenizationMethod()
If the card number is tokenized, this is the method that was used. Can beandroid_pay
(includes Google Pay),apple_pay
,masterpass
,visa_checkout
, or null.
-
setAddressCity
public void setAddressCity(java.lang.String addressCity)
City/District/Suburb/Town/Village.
-
setAddressCountry
public void setAddressCountry(java.lang.String addressCountry)
Billing address country, if provided when creating card.
-
setAddressLine1
public void setAddressLine1(java.lang.String addressLine1)
Address line 1 (Street address/PO Box/Company name).
-
setAddressLine1Check
public void setAddressLine1Check(java.lang.String addressLine1Check)
Ifaddress_line1
was provided, results of the check:pass
,fail
,unavailable
, orunchecked
.
-
setAddressLine2
public void setAddressLine2(java.lang.String addressLine2)
Address line 2 (Apartment/Suite/Unit/Building).
-
setAddressState
public void setAddressState(java.lang.String addressState)
State/County/Province/Region.
-
setAddressZip
public void setAddressZip(java.lang.String addressZip)
ZIP or postal code.
-
setAddressZipCheck
public void setAddressZipCheck(java.lang.String addressZipCheck)
Ifaddress_zip
was provided, results of the check:pass
,fail
,unavailable
, orunchecked
.
-
setAvailablePayoutMethods
public void setAvailablePayoutMethods(java.util.List<java.lang.String> availablePayoutMethods)
A set of available payout methods for this card. Only values from this set should be passed as themethod
when creating a payout.
-
setBrand
public void setBrand(java.lang.String brand)
Card brand. Can beAmerican Express
,Diners Club
,Discover
,JCB
,MasterCard
,UnionPay
,Visa
, orUnknown
.
-
setCountry
public void setCountry(java.lang.String country)
Two-letter ISO code representing the country of the card. You could use this attribute to get a sense of the international breakdown of cards you've collected.
-
setCurrency
public void setCurrency(java.lang.String currency)
Three-letter ISO code for currency. Only applicable on accounts (not customers or recipients). The card can be used as a transfer destination for funds in this currency.
-
setCvcCheck
public void setCvcCheck(java.lang.String cvcCheck)
If a CVC was provided, results of the check:pass
,fail
,unavailable
, orunchecked
. A result of unchecked indicates that CVC was provided but hasn't been checked yet. Checks are typically performed when attaching a card to a Customer object, or when creating a charge. For more details, see Check if a card is valid without a charge.
-
setDefaultForCurrency
public void setDefaultForCurrency(java.lang.Boolean defaultForCurrency)
Whether this card is the default external account for its currency.
-
setDeleted
public void setDeleted(java.lang.Boolean deleted)
Always true for a deleted object.
-
setDescription
public void setDescription(java.lang.String description)
A high-level description of the type of cards issued in this range. (For internal use only and not typically available in standard API requests.)
-
setDynamicLast4
public void setDynamicLast4(java.lang.String dynamicLast4)
(For tokenized numbers only.) The last four digits of the device account number.
-
setExpMonth
public void setExpMonth(java.lang.Long expMonth)
Two-digit number representing the card's expiration month.
-
setExpYear
public void setExpYear(java.lang.Long expYear)
Four-digit number representing the card's expiration year.
-
setFingerprint
public void setFingerprint(java.lang.String fingerprint)
Uniquely identifies this particular card number. You can use this attribute to check whether two customers who’ve signed up with you are using the same card number, for example. For payment methods that tokenize card information (Apple Pay, Google Pay), the tokenized number might be provided instead of the underlying card number.Starting May 1, 2021, card fingerprint in India for Connect will change to allow two fingerprints for the same card --- one for India and one for the rest of the world.
-
setFunding
public void setFunding(java.lang.String funding)
Card funding type. Can becredit
,debit
,prepaid
, orunknown
.
-
setId
public void setId(java.lang.String id)
Unique identifier for the object.
-
setIin
public void setIin(java.lang.String iin)
Issuer identification number of the card. (For internal use only and not typically available in standard API requests.)
-
setIssuer
public void setIssuer(java.lang.String issuer)
The name of the card's issuing bank. (For internal use only and not typically available in standard API requests.)
-
setLast4
public void setLast4(java.lang.String last4)
The last four digits of the card.
-
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.
-
setName
public void setName(java.lang.String name)
Cardholder name.
-
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
card
.
-
setTokenizationMethod
public void setTokenizationMethod(java.lang.String tokenizationMethod)
If the card number is tokenized, this is the method that was used. Can beandroid_pay
(includes Google Pay),apple_pay
,masterpass
,visa_checkout
, or null.
-
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<Card>
-
-