Package com.stripe.model.issuing
Class Card
- java.lang.Object
-
- com.stripe.model.StripeObject
-
- com.stripe.net.ApiResource
-
- com.stripe.model.issuing.Card
-
- All Implemented Interfaces:
HasId,MetadataStore<Card>,StripeObjectInterface
public class Card extends ApiResource implements HasId, MetadataStore<Card>
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classCard.Shippingstatic classCard.SpendingControls-
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 Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected booleancanEqual(java.lang.Object other)static Cardcreate(CardCreateParams params)Creates an IssuingCardobject.static Cardcreate(CardCreateParams params, RequestOptions options)Creates an IssuingCardobject.static Cardcreate(java.util.Map<java.lang.String,java.lang.Object> params)Creates an IssuingCardobject.static Cardcreate(java.util.Map<java.lang.String,java.lang.Object> params, RequestOptions options)Creates an IssuingCardobject.booleanequals(java.lang.Object o)java.lang.StringgetBrand()The brand of the card.java.lang.StringgetCancellationReason()The reason why the card was canceled.CardholdergetCardholder()An IssuingCardholderobject represents an individual or business entity who is issued cards.java.lang.LonggetCreated()Time at which the object was created.java.lang.StringgetCurrency()Three-letter ISO currency code, in lowercase.java.lang.StringgetCvc()The card's CVC.java.lang.LonggetExpMonth()The expiration month of the card.java.lang.LonggetExpYear()The expiration year of the card.java.lang.StringgetId()Unique identifier for the object.java.lang.StringgetLast4()The last 4 digits of the card number.java.lang.BooleangetLivemode()Has the valuetrueif the object exists in live mode or the valuefalseif the object exists in test mode.java.util.Map<java.lang.String,java.lang.String>getMetadata()Set of key-value pairs that you can attach to an object.java.lang.StringgetNumber()The full unredacted card number.java.lang.StringgetObject()String representing the object's type.java.lang.StringgetReplacedBy()Get ID of expandablereplacedByobject.CardgetReplacedByObject()Get expandedreplacedBy.java.lang.StringgetReplacementFor()Get ID of expandablereplacementForobject.CardgetReplacementForObject()Get expandedreplacementFor.java.lang.StringgetReplacementReason()The reason why the previous card needed to be replaced.Card.ShippinggetShipping()Where and how the card will be shipped.Card.SpendingControlsgetSpendingControls()java.lang.StringgetStatus()Whether authorizations can be approved on this card.java.lang.StringgetType()The type of the card.inthashCode()static CardCollectionlist(CardListParams params)Returns a list of IssuingCardobjects.static CardCollectionlist(CardListParams params, RequestOptions options)Returns a list of IssuingCardobjects.static CardCollectionlist(java.util.Map<java.lang.String,java.lang.Object> params)Returns a list of IssuingCardobjects.static CardCollectionlist(java.util.Map<java.lang.String,java.lang.Object> params, RequestOptions options)Returns a list of IssuingCardobjects.static Cardretrieve(java.lang.String card)Retrieves an IssuingCardobject.static Cardretrieve(java.lang.String card, RequestOptions options)Retrieves an IssuingCardobject.static Cardretrieve(java.lang.String card, CardRetrieveParams params, RequestOptions options)Retrieves an IssuingCardobject.static Cardretrieve(java.lang.String card, java.util.Map<java.lang.String,java.lang.Object> params, RequestOptions options)Retrieves an IssuingCardobject.voidsetBrand(java.lang.String brand)The brand of the card.voidsetCancellationReason(java.lang.String cancellationReason)The reason why the card was canceled.voidsetCardholder(Cardholder cardholder)An IssuingCardholderobject represents an individual or business entity who is issued cards.voidsetCreated(java.lang.Long created)Time at which the object was created.voidsetCurrency(java.lang.String currency)Three-letter ISO currency code, in lowercase.voidsetCvc(java.lang.String cvc)The card's CVC.voidsetExpMonth(java.lang.Long expMonth)The expiration month of the card.voidsetExpYear(java.lang.Long expYear)The expiration year of the card.voidsetId(java.lang.String id)Unique identifier for the object.voidsetLast4(java.lang.String last4)The last 4 digits of the card number.voidsetLivemode(java.lang.Boolean livemode)Has the valuetrueif the object exists in live mode or the valuefalseif the object exists in test mode.voidsetMetadata(java.util.Map<java.lang.String,java.lang.String> metadata)Set of key-value pairs that you can attach to an object.voidsetNumber(java.lang.String number)The full unredacted card number.voidsetObject(java.lang.String object)String representing the object's type.voidsetReplacedBy(java.lang.String id)voidsetReplacedByObject(Card expandableObject)voidsetReplacementFor(java.lang.String id)voidsetReplacementForObject(Card expandableObject)voidsetReplacementReason(java.lang.String replacementReason)The reason why the previous card needed to be replaced.voidsetShipping(Card.Shipping shipping)Where and how the card will be shipped.voidsetSpendingControls(Card.SpendingControls spendingControls)voidsetStatus(java.lang.String status)Whether authorizations can be approved on this card.voidsetType(java.lang.String type)The type of the card.Cardupdate(CardUpdateParams params)Updates the specified IssuingCardobject by setting the values of the parameters passed.Cardupdate(CardUpdateParams params, RequestOptions options)Updates the specified IssuingCardobject by setting the values of the parameters passed.Cardupdate(java.util.Map<java.lang.String,java.lang.Object> params)Updates the specified IssuingCardobject by setting the values of the parameters passed.Cardupdate(java.util.Map<java.lang.String,java.lang.Object> params, RequestOptions options)Updates the specified IssuingCardobject by setting the values of the parameters passed.-
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
-
-
-
-
Method Detail
-
getReplacedBy
public java.lang.String getReplacedBy()
Get ID of expandablereplacedByobject.
-
setReplacedBy
public void setReplacedBy(java.lang.String id)
-
getReplacedByObject
public Card getReplacedByObject()
Get expandedreplacedBy.
-
setReplacedByObject
public void setReplacedByObject(Card expandableObject)
-
getReplacementFor
public java.lang.String getReplacementFor()
Get ID of expandablereplacementForobject.
-
setReplacementFor
public void setReplacementFor(java.lang.String id)
-
getReplacementForObject
public Card getReplacementForObject()
Get expandedreplacementFor.
-
setReplacementForObject
public void setReplacementForObject(Card expandableObject)
-
list
public static CardCollection list(java.util.Map<java.lang.String,java.lang.Object> params) throws StripeException
Returns a list of IssuingCardobjects. The objects are sorted in descending order by creation date, with the most recently created object appearing first.- Throws:
StripeException
-
list
public static CardCollection list(java.util.Map<java.lang.String,java.lang.Object> params, RequestOptions options) throws StripeException
Returns a list of IssuingCardobjects. The objects are sorted in descending order by creation date, with the most recently created object appearing first.- Throws:
StripeException
-
list
public static CardCollection list(CardListParams params) throws StripeException
Returns a list of IssuingCardobjects. The objects are sorted in descending order by creation date, with the most recently created object appearing first.- Throws:
StripeException
-
list
public static CardCollection list(CardListParams params, RequestOptions options) throws StripeException
Returns a list of IssuingCardobjects. The objects are sorted in descending order by creation date, with the most recently created object appearing first.- Throws:
StripeException
-
create
public static Card create(java.util.Map<java.lang.String,java.lang.Object> params) throws StripeException
Creates an IssuingCardobject.- Throws:
StripeException
-
create
public static Card create(java.util.Map<java.lang.String,java.lang.Object> params, RequestOptions options) throws StripeException
Creates an IssuingCardobject.- Throws:
StripeException
-
create
public static Card create(CardCreateParams params) throws StripeException
Creates an IssuingCardobject.- Throws:
StripeException
-
create
public static Card create(CardCreateParams params, RequestOptions options) throws StripeException
Creates an IssuingCardobject.- Throws:
StripeException
-
retrieve
public static Card retrieve(java.lang.String card) throws StripeException
Retrieves an IssuingCardobject.- Throws:
StripeException
-
retrieve
public static Card retrieve(java.lang.String card, RequestOptions options) throws StripeException
Retrieves an IssuingCardobject.- Throws:
StripeException
-
retrieve
public static Card retrieve(java.lang.String card, java.util.Map<java.lang.String,java.lang.Object> params, RequestOptions options) throws StripeException
Retrieves an IssuingCardobject.- Throws:
StripeException
-
retrieve
public static Card retrieve(java.lang.String card, CardRetrieveParams params, RequestOptions options) throws StripeException
Retrieves an IssuingCardobject.- Throws:
StripeException
-
update
public Card update(java.util.Map<java.lang.String,java.lang.Object> params) throws StripeException
Updates the specified IssuingCardobject by setting the values of the parameters passed. Any parameters not provided will be left unchanged.- 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
Updates the specified IssuingCardobject by setting the values of the parameters passed. Any parameters not provided will be left unchanged.- Specified by:
updatein interfaceMetadataStore<Card>- Throws:
StripeException
-
update
public Card update(CardUpdateParams params) throws StripeException
Updates the specified IssuingCardobject by setting the values of the parameters passed. Any parameters not provided will be left unchanged.- Throws:
StripeException
-
update
public Card update(CardUpdateParams params, RequestOptions options) throws StripeException
Updates the specified IssuingCardobject by setting the values of the parameters passed. Any parameters not provided will be left unchanged.- Throws:
StripeException
-
getBrand
public java.lang.String getBrand()
The brand of the card.
-
getCancellationReason
public java.lang.String getCancellationReason()
The reason why the card was canceled.One of
lost, orstolen.
-
getCardholder
public Cardholder getCardholder()
An IssuingCardholderobject represents an individual or business entity who is issued cards.Related guide: How to create a Cardholder
-
getCreated
public java.lang.Long getCreated()
Time at which the object was created. Measured in seconds since the Unix epoch.
-
getCurrency
public java.lang.String getCurrency()
Three-letter ISO currency code, in lowercase. Must be a supported currency.
-
getCvc
public java.lang.String getCvc()
The card's CVC. For security reasons, this is only available for virtual cards, and will be omitted unless you explicitly request it with theexpandparameter. Additionally, it's only available via the "Retrieve a card" endpoint, not via "List all cards" or any other endpoint.
-
getExpMonth
public java.lang.Long getExpMonth()
The expiration month of the card.
-
getExpYear
public java.lang.Long getExpYear()
The expiration year of the card.
-
getLast4
public java.lang.String getLast4()
The last 4 digits of the card number.
-
getLivemode
public java.lang.Boolean getLivemode()
Has the valuetrueif the object exists in live mode or the valuefalseif the object exists in test mode.
-
getNumber
public java.lang.String getNumber()
The full unredacted card number. For security reasons, this is only available for virtual cards, and will be omitted unless you explicitly request it with theexpandparameter. Additionally, it's only available via the "Retrieve a card" endpoint, not via "List all cards" or any other endpoint.
-
getObject
public java.lang.String getObject()
String representing the object's type. Objects of the same type share the same value.Equal to
issuing.card.
-
getReplacementReason
public java.lang.String getReplacementReason()
The reason why the previous card needed to be replaced.One of
damaged,expired,lost, orstolen.
-
getShipping
public Card.Shipping getShipping()
Where and how the card will be shipped.
-
getSpendingControls
public Card.SpendingControls getSpendingControls()
-
getStatus
public java.lang.String getStatus()
Whether authorizations can be approved on this card.One of
active,canceled, orinactive.
-
getType
public java.lang.String getType()
The type of the card.One of
physical, orvirtual.
-
setBrand
public void setBrand(java.lang.String brand)
The brand of the card.
-
setCancellationReason
public void setCancellationReason(java.lang.String cancellationReason)
The reason why the card was canceled.One of
lost, orstolen.
-
setCardholder
public void setCardholder(Cardholder cardholder)
An IssuingCardholderobject represents an individual or business entity who is issued cards.Related guide: How to create a Cardholder
-
setCreated
public void setCreated(java.lang.Long created)
Time at which the object was created. Measured in seconds since the Unix epoch.
-
setCurrency
public void setCurrency(java.lang.String currency)
Three-letter ISO currency code, in lowercase. Must be a supported currency.
-
setCvc
public void setCvc(java.lang.String cvc)
The card's CVC. For security reasons, this is only available for virtual cards, and will be omitted unless you explicitly request it with theexpandparameter. Additionally, it's only available via the "Retrieve a card" endpoint, not via "List all cards" or any other endpoint.
-
setExpMonth
public void setExpMonth(java.lang.Long expMonth)
The expiration month of the card.
-
setExpYear
public void setExpYear(java.lang.Long expYear)
The expiration year of the card.
-
setId
public void setId(java.lang.String id)
Unique identifier for the object.
-
setLast4
public void setLast4(java.lang.String last4)
The last 4 digits of the card number.
-
setLivemode
public void setLivemode(java.lang.Boolean livemode)
Has the valuetrueif the object exists in live mode or the valuefalseif the object exists in test mode.
-
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.
-
setNumber
public void setNumber(java.lang.String number)
The full unredacted card number. For security reasons, this is only available for virtual cards, and will be omitted unless you explicitly request it with theexpandparameter. Additionally, it's only available via the "Retrieve a card" endpoint, not via "List all cards" or any other endpoint.
-
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
issuing.card.
-
setReplacementReason
public void setReplacementReason(java.lang.String replacementReason)
The reason why the previous card needed to be replaced.One of
damaged,expired,lost, orstolen.
-
setShipping
public void setShipping(Card.Shipping shipping)
Where and how the card will be shipped.
-
setSpendingControls
public void setSpendingControls(Card.SpendingControls spendingControls)
-
setStatus
public void setStatus(java.lang.String status)
Whether authorizations can be approved on this card.One of
active,canceled, orinactive.
-
setType
public void setType(java.lang.String type)
The type of the card.One of
physical, orvirtual.
-
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>
-
-