Package com.stripe.model
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
-
Field Summary
-
Constructor Summary
Constructors Constructor Description Card()
-
Method Summary
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 expandable `account` object.Account
getAccountObject()
Get expanded `account`.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()
If `address_line1` was provided, results of the check: `pass`, `fail`, `unavailable`, or `unchecked`.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()
If `address_zip` was provided, results of the check: `pass`, `fail`, `unavailable`, or `unchecked`.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 currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase.java.lang.String
getCustomer()
Get id of expandable `customer` object.Customer
getCustomerObject()
Get expanded `customer`.java.lang.String
getCvcCheck()
If a CVC was provided, results of the check: `pass`, `fail`, `unavailable`, or `unchecked`.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()
Card description.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()
Issuer bank name of the card.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 expandable `recipient` object.Recipient
getRecipientObject()
Get expanded `recipient`.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)
If `address_line1` was provided, results of the check: `pass`, `fail`, `unavailable`, or `unchecked`.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)
If `address_zip` was provided, results of the check: `pass`, `fail`, `unavailable`, or `unchecked`.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 currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase.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`, or `unchecked`.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)
Card description.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)
Issuer bank name of the card.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, 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
-
Constructor Details
-
Card
public Card()
-
-
Method Details
-
getAccount
public java.lang.String getAccount()Get id of expandable `account` object. -
setAccount
public void setAccount(java.lang.String id) -
getAccountObject
Get expanded `account`. -
setAccountObject
-
getCustomer
public java.lang.String getCustomer()Get id of expandable `customer` object. -
setCustomer
public void setCustomer(java.lang.String id) -
getCustomerObject
Get expanded `customer`. -
setCustomerObject
-
getRecipient
public java.lang.String getRecipient()Get id of expandable `recipient` object. -
setRecipient
public void setRecipient(java.lang.String id) -
getRecipientObject
Get expanded `recipient`. -
setRecipientObject
-
update
public Card update(java.util.Map<java.lang.String,java.lang.Object> params) throws StripeExceptionIf 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 StripeExceptionIf 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
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 StripeExceptionIf 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
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 StripeExceptionIf 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
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
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 StripeExceptionDelete 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 StripeExceptionDelete 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()If `address_line1` was provided, results of the check: `pass`, `fail`, `unavailable`, or `unchecked`. -
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()If `address_zip` was provided, results of the check: `pass`, `fail`, `unavailable`, or `unchecked`. -
getAvailablePayoutMethods
public java.util.List<java.lang.String> getAvailablePayoutMethods()A set of available payout methods for this card. Will be either `["standard"]` or `["standard", "instant"]`. Only values from this set should be passed as the `method` when creating a transfer. -
getBrand
public java.lang.String getBrand()Card brand. Can be `American Express`, `Diners Club`, `Discover`, `JCB`, `MasterCard`, `UnionPay`, `Visa`, or `Unknown`. -
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 currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). -
getCvcCheck
public java.lang.String getCvcCheck()If a CVC was provided, results of the check: `pass`, `fail`, `unavailable`, or `unchecked`. -
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()Card description. (Only 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. -
getFunding
public java.lang.String getFunding()Card funding type. Can be `credit`, `debit`, `prepaid`, or `unknown`. -
getIin
public java.lang.String getIin()Issuer identification number of the card. (Only for internal use only and not typically available in standard API requests.) -
getIssuer
public java.lang.String getIssuer()Issuer bank name of the card. (Only 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 be `apple_pay` or `google_pay`. -
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)If `address_line1` was provided, results of the check: `pass`, `fail`, `unavailable`, or `unchecked`. -
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)If `address_zip` was provided, results of the check: `pass`, `fail`, `unavailable`, or `unchecked`. -
setAvailablePayoutMethods
public void setAvailablePayoutMethods(java.util.List<java.lang.String> availablePayoutMethods)A set of available payout methods for this card. Will be either `["standard"]` or `["standard", "instant"]`. Only values from this set should be passed as the `method` when creating a transfer. -
setBrand
public void setBrand(java.lang.String brand)Card brand. Can be `American Express`, `Diners Club`, `Discover`, `JCB`, `MasterCard`, `UnionPay`, `Visa`, or `Unknown`. -
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 currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). -
setCvcCheck
public void setCvcCheck(java.lang.String cvcCheck)If a CVC was provided, results of the check: `pass`, `fail`, `unavailable`, or `unchecked`. -
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)Card description. (Only 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. -
setFunding
public void setFunding(java.lang.String funding)Card funding type. Can be `credit`, `debit`, `prepaid`, or `unknown`. -
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. (Only for internal use only and not typically available in standard API requests.) -
setIssuer
public void setIssuer(java.lang.String issuer)Issuer bank name of the card. (Only 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 be `apple_pay` or `google_pay`. -
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>
-