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 class
Card.Shipping
static class
Card.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 boolean
canEqual(java.lang.Object other)
static Card
create(CardCreateParams params)
Creates an IssuingCard
object.static Card
create(CardCreateParams params, RequestOptions options)
Creates an IssuingCard
object.static Card
create(java.util.Map<java.lang.String,java.lang.Object> params)
Creates an IssuingCard
object.static Card
create(java.util.Map<java.lang.String,java.lang.Object> params, RequestOptions options)
Creates an IssuingCard
object.boolean
equals(java.lang.Object o)
java.lang.String
getBrand()
The brand of the card.java.lang.String
getCancellationReason()
The reason why the card was canceled.Cardholder
getCardholder()
An IssuingCardholder
object represents an individual or business entity who is issued cards.java.lang.Long
getCreated()
Time at which the object was created.java.lang.String
getCurrency()
Three-letter ISO currency code, in lowercase.java.lang.String
getCvc()
The card's CVC.java.lang.Long
getExpMonth()
The expiration month of the card.java.lang.Long
getExpYear()
The expiration year of the card.java.lang.String
getId()
Unique identifier for the object.java.lang.String
getLast4()
The last 4 digits of the card number.java.lang.Boolean
getLivemode()
Has the valuetrue
if the object exists in live mode or the valuefalse
if 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.String
getNumber()
The full unredacted card number.java.lang.String
getObject()
String representing the object's type.java.lang.String
getReplacedBy()
Get ID of expandablereplacedBy
object.Card
getReplacedByObject()
Get expandedreplacedBy
.java.lang.String
getReplacementFor()
Get ID of expandablereplacementFor
object.Card
getReplacementForObject()
Get expandedreplacementFor
.java.lang.String
getReplacementReason()
The reason why the previous card needed to be replaced.Card.Shipping
getShipping()
Where and how the card will be shipped.Card.SpendingControls
getSpendingControls()
java.lang.String
getStatus()
Whether authorizations can be approved on this card.java.lang.String
getType()
The type of the card.int
hashCode()
static CardCollection
list(CardListParams params)
Returns a list of IssuingCard
objects.static CardCollection
list(CardListParams params, RequestOptions options)
Returns a list of IssuingCard
objects.static CardCollection
list(java.util.Map<java.lang.String,java.lang.Object> params)
Returns a list of IssuingCard
objects.static CardCollection
list(java.util.Map<java.lang.String,java.lang.Object> params, RequestOptions options)
Returns a list of IssuingCard
objects.static Card
retrieve(java.lang.String card)
Retrieves an IssuingCard
object.static Card
retrieve(java.lang.String card, RequestOptions options)
Retrieves an IssuingCard
object.static Card
retrieve(java.lang.String card, CardRetrieveParams params, RequestOptions options)
Retrieves an IssuingCard
object.static Card
retrieve(java.lang.String card, java.util.Map<java.lang.String,java.lang.Object> params, RequestOptions options)
Retrieves an IssuingCard
object.void
setBrand(java.lang.String brand)
The brand of the card.void
setCancellationReason(java.lang.String cancellationReason)
The reason why the card was canceled.void
setCardholder(Cardholder cardholder)
An IssuingCardholder
object represents an individual or business entity who is issued cards.void
setCreated(java.lang.Long created)
Time at which the object was created.void
setCurrency(java.lang.String currency)
Three-letter ISO currency code, in lowercase.void
setCvc(java.lang.String cvc)
The card's CVC.void
setExpMonth(java.lang.Long expMonth)
The expiration month of the card.void
setExpYear(java.lang.Long expYear)
The expiration year of the card.void
setId(java.lang.String id)
Unique identifier for the object.void
setLast4(java.lang.String last4)
The last 4 digits of the card number.void
setLivemode(java.lang.Boolean livemode)
Has the valuetrue
if the object exists in live mode or the valuefalse
if the object exists in test mode.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
setNumber(java.lang.String number)
The full unredacted card number.void
setObject(java.lang.String object)
String representing the object's type.void
setReplacedBy(java.lang.String id)
void
setReplacedByObject(Card expandableObject)
void
setReplacementFor(java.lang.String id)
void
setReplacementForObject(Card expandableObject)
void
setReplacementReason(java.lang.String replacementReason)
The reason why the previous card needed to be replaced.void
setShipping(Card.Shipping shipping)
Where and how the card will be shipped.void
setSpendingControls(Card.SpendingControls spendingControls)
void
setStatus(java.lang.String status)
Whether authorizations can be approved on this card.void
setType(java.lang.String type)
The type of the card.Card
update(CardUpdateParams params)
Updates the specified IssuingCard
object by setting the values of the parameters passed.Card
update(CardUpdateParams params, RequestOptions options)
Updates the specified IssuingCard
object by setting the values of the parameters passed.Card
update(java.util.Map<java.lang.String,java.lang.Object> params)
Updates the specified IssuingCard
object by setting the values of the parameters passed.Card
update(java.util.Map<java.lang.String,java.lang.Object> params, RequestOptions options)
Updates the specified IssuingCard
object 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 expandablereplacedBy
object.
-
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 expandablereplacementFor
object.
-
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 IssuingCard
objects. 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 IssuingCard
objects. 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 IssuingCard
objects. 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 IssuingCard
objects. 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 IssuingCard
object.- Throws:
StripeException
-
create
public static Card create(java.util.Map<java.lang.String,java.lang.Object> params, RequestOptions options) throws StripeException
Creates an IssuingCard
object.- Throws:
StripeException
-
create
public static Card create(CardCreateParams params) throws StripeException
Creates an IssuingCard
object.- Throws:
StripeException
-
create
public static Card create(CardCreateParams params, RequestOptions options) throws StripeException
Creates an IssuingCard
object.- Throws:
StripeException
-
retrieve
public static Card retrieve(java.lang.String card) throws StripeException
Retrieves an IssuingCard
object.- Throws:
StripeException
-
retrieve
public static Card retrieve(java.lang.String card, RequestOptions options) throws StripeException
Retrieves an IssuingCard
object.- 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 IssuingCard
object.- Throws:
StripeException
-
retrieve
public static Card retrieve(java.lang.String card, CardRetrieveParams params, RequestOptions options) throws StripeException
Retrieves an IssuingCard
object.- Throws:
StripeException
-
update
public Card update(java.util.Map<java.lang.String,java.lang.Object> params) throws StripeException
Updates the specified IssuingCard
object by setting the values of the parameters passed. Any parameters not provided will be left unchanged.- 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
Updates the specified IssuingCard
object by setting the values of the parameters passed. Any parameters not provided will be left unchanged.- Specified by:
update
in interfaceMetadataStore<Card>
- Throws:
StripeException
-
update
public Card update(CardUpdateParams params) throws StripeException
Updates the specified IssuingCard
object 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 IssuingCard
object 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 IssuingCardholder
object 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 theexpand
parameter. 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 valuetrue
if the object exists in live mode or the valuefalse
if 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 theexpand
parameter. 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 IssuingCardholder
object 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 theexpand
parameter. 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 valuetrue
if the object exists in live mode or the valuefalse
if 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 theexpand
parameter. 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:
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>
-
-