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 booleancanEqual(java.lang.Object other)Carddelete()Delete a specified external account for a given account.Carddelete(RequestOptions options)Delete a specified external account for a given account.Carddelete(java.util.Map<java.lang.String,java.lang.Object> params)Delete a specified external account for a given account.Carddelete(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.AccountgetAccountObject()Get expandedaccount.java.lang.StringgetAddressCity()City/District/Suburb/Town/Village.java.lang.StringgetAddressCountry()Billing address country, if provided when creating card.java.lang.StringgetAddressLine1()Address line 1 (Street address/PO Box/Company name).java.lang.StringgetAddressLine1Check()Ifaddress_line1was provided, results of the check:pass,fail,unavailable, orunchecked.java.lang.StringgetAddressLine2()Address line 2 (Apartment/Suite/Unit/Building).java.lang.StringgetAddressState()State/County/Province/Region.java.lang.StringgetAddressZip()ZIP or postal code.java.lang.StringgetAddressZipCheck()Ifaddress_zipwas 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.StringgetBrand()Card brand.java.lang.StringgetCountry()Two-letter ISO code representing the country of the card.java.lang.StringgetCurrency()Three-letter ISO code for currency.java.lang.StringgetCustomer()Get ID of expandablecustomerobject.CustomergetCustomerObject()Get expandedcustomer.java.lang.StringgetCvcCheck()If a CVC was provided, results of the check:pass,fail,unavailable, orunchecked.java.lang.BooleangetDefaultForCurrency()Whether this card is the default external account for its currency.java.lang.BooleangetDeleted()Always true for a deleted object.java.lang.StringgetDescription()A high-level description of the type of cards issued in this range.java.lang.StringgetDynamicLast4()(For tokenized numbers only.) The last four digits of the device account number.java.lang.LonggetExpMonth()Two-digit number representing the card's expiration month.java.lang.LonggetExpYear()Four-digit number representing the card's expiration year.java.lang.StringgetFingerprint()Uniquely identifies this particular card number.java.lang.StringgetFunding()Card funding type.java.lang.StringgetId()Unique identifier for the object.java.lang.StringgetIin()Issuer identification number of the card.java.lang.StringgetIssuer()The name of the card's issuing bank.java.lang.StringgetLast4()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.StringgetName()Cardholder name.java.lang.StringgetObject()String representing the object's type.java.lang.StringgetRecipient()Get ID of expandablerecipientobject.RecipientgetRecipientObject()Get expandedrecipient.java.lang.StringgetTokenizationMethod()If the card number is tokenized, this is the method that was used.inthashCode()voidsetAccount(java.lang.String id)voidsetAccountObject(Account expandableObject)voidsetAddressCity(java.lang.String addressCity)City/District/Suburb/Town/Village.voidsetAddressCountry(java.lang.String addressCountry)Billing address country, if provided when creating card.voidsetAddressLine1(java.lang.String addressLine1)Address line 1 (Street address/PO Box/Company name).voidsetAddressLine1Check(java.lang.String addressLine1Check)Ifaddress_line1was provided, results of the check:pass,fail,unavailable, orunchecked.voidsetAddressLine2(java.lang.String addressLine2)Address line 2 (Apartment/Suite/Unit/Building).voidsetAddressState(java.lang.String addressState)State/County/Province/Region.voidsetAddressZip(java.lang.String addressZip)ZIP or postal code.voidsetAddressZipCheck(java.lang.String addressZipCheck)Ifaddress_zipwas provided, results of the check:pass,fail,unavailable, orunchecked.voidsetAvailablePayoutMethods(java.util.List<java.lang.String> availablePayoutMethods)A set of available payout methods for this card.voidsetBrand(java.lang.String brand)Card brand.voidsetCountry(java.lang.String country)Two-letter ISO code representing the country of the card.voidsetCurrency(java.lang.String currency)Three-letter ISO code for currency.voidsetCustomer(java.lang.String id)voidsetCustomerObject(Customer expandableObject)voidsetCvcCheck(java.lang.String cvcCheck)If a CVC was provided, results of the check:pass,fail,unavailable, orunchecked.voidsetDefaultForCurrency(java.lang.Boolean defaultForCurrency)Whether this card is the default external account for its currency.voidsetDeleted(java.lang.Boolean deleted)Always true for a deleted object.voidsetDescription(java.lang.String description)A high-level description of the type of cards issued in this range.voidsetDynamicLast4(java.lang.String dynamicLast4)(For tokenized numbers only.) The last four digits of the device account number.voidsetExpMonth(java.lang.Long expMonth)Two-digit number representing the card's expiration month.voidsetExpYear(java.lang.Long expYear)Four-digit number representing the card's expiration year.voidsetFingerprint(java.lang.String fingerprint)Uniquely identifies this particular card number.voidsetFunding(java.lang.String funding)Card funding type.voidsetId(java.lang.String id)Unique identifier for the object.voidsetIin(java.lang.String iin)Issuer identification number of the card.voidsetIssuer(java.lang.String issuer)The name of the card's issuing bank.voidsetLast4(java.lang.String last4)The last four digits of the card.voidsetMetadata(java.util.Map<java.lang.String,java.lang.String> metadata)Set of key-value pairs that you can attach to an object.voidsetName(java.lang.String name)Cardholder name.voidsetObject(java.lang.String object)String representing the object's type.voidsetRecipient(java.lang.String id)voidsetRecipientObject(Recipient expandableObject)voidsetTokenizationMethod(java.lang.String tokenizationMethod)If the card number is tokenized, this is the method that was used.Cardupdate(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.Cardupdate(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.Cardupdate(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.Cardupdate(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.Cardupdate(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.Cardupdate(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, 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)
-
getRecipient
public java.lang.String getRecipient()
Get ID of expandablerecipientobject.
-
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:
updatein interfaceExternalAccount- Specified by:
updatein 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:
updatein interfaceExternalAccount- Specified by:
updatein 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:
deletein 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:
deletein 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:
deletein 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:
deletein 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_line1was 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_zipwas 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 themethodwhen 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_line1was 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_zipwas 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 themethodwhen 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:
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<Card>
-
-