Class Source
- java.lang.Object
-
- com.stripe.model.StripeObject
-
- com.stripe.net.ApiResource
-
- com.stripe.model.Source
-
- All Implemented Interfaces:
HasId
,MetadataStore<Source>
,PaymentSource
,StripeObjectInterface
public class Source extends ApiResource implements MetadataStore<Source>, PaymentSource
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
Source.AchCreditTransfer
static class
Source.AchDebit
static class
Source.AcssDebit
static class
Source.Alipay
static class
Source.AuBecsDebit
static class
Source.Bancontact
static class
Source.Card
static class
Source.CardPresent
static class
Source.CodeVerificationFlow
static class
Source.Eps
static class
Source.Giropay
static class
Source.Ideal
static class
Source.Klarna
static class
Source.Multibanco
static class
Source.Order
static class
Source.OrderItem
static class
Source.Owner
static class
Source.P24
static class
Source.ReceiverFlow
static class
Source.RedirectFlow
static class
Source.SepaCreditTransfer
static class
Source.SepaDebit
static class
Source.Sofort
static class
Source.ThreeDSecure
static class
Source.Wechat
-
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 Source()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected boolean
canEqual(java.lang.Object other)
static Source
create(SourceCreateParams params)
Creates a new source object.static Source
create(SourceCreateParams params, RequestOptions options)
Creates a new source object.static Source
create(java.util.Map<java.lang.String,java.lang.Object> params)
Creates a new source object.static Source
create(java.util.Map<java.lang.String,java.lang.Object> params, RequestOptions options)
Creates a new source object.Source
detach()
Delete a specified source for a given customer.Source
detach(SourceDetachParams params)
Delete a specified source for a given customer.Source
detach(SourceDetachParams params, RequestOptions options)
Delete a specified source for a given customer.Source
detach(java.util.Map<java.lang.String,java.lang.Object> params)
Delete a specified source for a given customer.Source
detach(java.util.Map<java.lang.String,java.lang.Object> params, RequestOptions options)
Delete a specified source for a given customer.boolean
equals(java.lang.Object o)
Source.AchCreditTransfer
getAchCreditTransfer()
Source.AchDebit
getAchDebit()
Source.AcssDebit
getAcssDebit()
Source.Alipay
getAlipay()
java.lang.Long
getAmount()
A positive integer in the smallest currency unit (that is, 100 cents for $1.00, or 1 for ¥1, Japanese Yen being a zero-decimal currency) representing the total amount associated with the source.Source.AuBecsDebit
getAuBecsDebit()
Source.Bancontact
getBancontact()
Source.Card
getCard()
Source.CardPresent
getCardPresent()
java.lang.String
getClientSecret()
The client secret of the source.Source.CodeVerificationFlow
getCodeVerification()
java.lang.Long
getCreated()
Time at which the object was created.java.lang.String
getCurrency()
Three-letter ISO code for the currency associated with the source.java.lang.String
getCustomer()
The ID of the customer to which this source is attached.Source.Eps
getEps()
java.lang.String
getFlow()
The authenticationflow
of the source.Source.Giropay
getGiropay()
java.lang.String
getId()
Unique identifier for the object.Source.Ideal
getIdeal()
Source.Klarna
getKlarna()
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.Source.Multibanco
getMultibanco()
java.lang.String
getObject()
String representing the object's type.Source.Owner
getOwner()
Information about the owner of the payment instrument that may be used or required by particular source types.Source.P24
getP24()
Source.ReceiverFlow
getReceiver()
Source.RedirectFlow
getRedirect()
Source.SepaCreditTransfer
getSepaCreditTransfer()
Source.SepaDebit
getSepaDebit()
Source.Sofort
getSofort()
Source.Order
getSourceOrder()
java.lang.String
getStatementDescriptor()
Extra information about a source.java.lang.String
getStatus()
The status of the source, one ofcanceled
,chargeable
,consumed
,failed
, orpending
.Source.ThreeDSecure
getThreeDSecure()
java.lang.String
getType()
Thetype
of the source.java.lang.String
getUsage()
Eitherreusable
orsingle_use
.Source.Wechat
getWechat()
int
hashCode()
static Source
retrieve(java.lang.String source)
Retrieves an existing source object.static Source
retrieve(java.lang.String source, RequestOptions options)
Retrieves an existing source object.static Source
retrieve(java.lang.String source, SourceRetrieveParams params, RequestOptions options)
Retrieves an existing source object.static Source
retrieve(java.lang.String source, java.util.Map<java.lang.String,java.lang.Object> params, RequestOptions options)
Retrieves an existing source object.void
setAchCreditTransfer(Source.AchCreditTransfer achCreditTransfer)
void
setAchDebit(Source.AchDebit achDebit)
void
setAcssDebit(Source.AcssDebit acssDebit)
void
setAlipay(Source.Alipay alipay)
void
setAmount(java.lang.Long amount)
A positive integer in the smallest currency unit (that is, 100 cents for $1.00, or 1 for ¥1, Japanese Yen being a zero-decimal currency) representing the total amount associated with the source.void
setAuBecsDebit(Source.AuBecsDebit auBecsDebit)
void
setBancontact(Source.Bancontact bancontact)
void
setCard(Source.Card card)
void
setCardPresent(Source.CardPresent cardPresent)
void
setClientSecret(java.lang.String clientSecret)
The client secret of the source.void
setCodeVerification(Source.CodeVerificationFlow codeVerification)
void
setCreated(java.lang.Long created)
Time at which the object was created.void
setCurrency(java.lang.String currency)
Three-letter ISO code for the currency associated with the source.void
setCustomer(java.lang.String customer)
The ID of the customer to which this source is attached.void
setEps(Source.Eps eps)
void
setFlow(java.lang.String flow)
The authenticationflow
of the source.void
setGiropay(Source.Giropay giropay)
void
setId(java.lang.String id)
Unique identifier for the object.void
setIdeal(Source.Ideal ideal)
void
setKlarna(Source.Klarna klarna)
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
setMultibanco(Source.Multibanco multibanco)
void
setObject(java.lang.String object)
String representing the object's type.void
setOwner(Source.Owner owner)
Information about the owner of the payment instrument that may be used or required by particular source types.void
setP24(Source.P24 p24)
void
setReceiver(Source.ReceiverFlow receiver)
void
setRedirect(Source.RedirectFlow redirect)
void
setSepaCreditTransfer(Source.SepaCreditTransfer sepaCreditTransfer)
void
setSepaDebit(Source.SepaDebit sepaDebit)
void
setSofort(Source.Sofort sofort)
void
setSourceOrder(Source.Order sourceOrder)
void
setStatementDescriptor(java.lang.String statementDescriptor)
Extra information about a source.void
setStatus(java.lang.String status)
The status of the source, one ofcanceled
,chargeable
,consumed
,failed
, orpending
.void
setThreeDSecure(Source.ThreeDSecure threeDSecure)
void
setType(java.lang.String type)
Thetype
of the source.void
setUsage(java.lang.String usage)
Eitherreusable
orsingle_use
.void
setWechat(Source.Wechat wechat)
SourceTransactionCollection
sourceTransactions()
List source transactions for a given source.SourceTransactionCollection
sourceTransactions(SourceSourceTransactionsParams params)
List source transactions for a given source.SourceTransactionCollection
sourceTransactions(SourceSourceTransactionsParams params, RequestOptions options)
List source transactions for a given source.SourceTransactionCollection
sourceTransactions(java.util.Map<java.lang.String,java.lang.Object> params)
List source transactions for a given source.SourceTransactionCollection
sourceTransactions(java.util.Map<java.lang.String,java.lang.Object> params, RequestOptions options)
List source transactions for a given source.Source
update(SourceUpdateParams params)
Updates the specified source by setting the values of the parameters passed.Source
update(SourceUpdateParams params, RequestOptions options)
Updates the specified source by setting the values of the parameters passed.Source
update(java.util.Map<java.lang.String,java.lang.Object> params)
Updates the specified source by setting the values of the parameters passed.Source
update(java.util.Map<java.lang.String,java.lang.Object> params, RequestOptions options)
Updates the specified source by setting the values of the parameters passed.Source
verify(SourceVerifyParams params)
Verify a given source.Source
verify(SourceVerifyParams params, RequestOptions options)
Verify a given source.Source
verify(java.util.Map<java.lang.String,java.lang.Object> params)
Verify a given source.Source
verify(java.util.Map<java.lang.String,java.lang.Object> params, RequestOptions options)
Verify a given source.-
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
-
detach
public Source detach() throws StripeException
Delete a specified source for a given customer.- Throws:
StripeException
-
detach
public Source detach(java.util.Map<java.lang.String,java.lang.Object> params) throws StripeException
Delete a specified source for a given customer.- Throws:
StripeException
-
detach
public Source detach(java.util.Map<java.lang.String,java.lang.Object> params, RequestOptions options) throws StripeException
Delete a specified source for a given customer.- Throws:
StripeException
-
detach
public Source detach(SourceDetachParams params) throws StripeException
Delete a specified source for a given customer.- Throws:
StripeException
-
detach
public Source detach(SourceDetachParams params, RequestOptions options) throws StripeException
Delete a specified source for a given customer.- Throws:
StripeException
-
retrieve
public static Source retrieve(java.lang.String source) throws StripeException
Retrieves an existing source object. Supply the unique source ID from a source creation request and Stripe will return the corresponding up-to-date source object information.- Throws:
StripeException
-
retrieve
public static Source retrieve(java.lang.String source, RequestOptions options) throws StripeException
Retrieves an existing source object. Supply the unique source ID from a source creation request and Stripe will return the corresponding up-to-date source object information.- Throws:
StripeException
-
retrieve
public static Source retrieve(java.lang.String source, java.util.Map<java.lang.String,java.lang.Object> params, RequestOptions options) throws StripeException
Retrieves an existing source object. Supply the unique source ID from a source creation request and Stripe will return the corresponding up-to-date source object information.- Throws:
StripeException
-
retrieve
public static Source retrieve(java.lang.String source, SourceRetrieveParams params, RequestOptions options) throws StripeException
Retrieves an existing source object. Supply the unique source ID from a source creation request and Stripe will return the corresponding up-to-date source object information.- Throws:
StripeException
-
create
public static Source create(java.util.Map<java.lang.String,java.lang.Object> params) throws StripeException
Creates a new source object.- Throws:
StripeException
-
create
public static Source create(java.util.Map<java.lang.String,java.lang.Object> params, RequestOptions options) throws StripeException
Creates a new source object.- Throws:
StripeException
-
create
public static Source create(SourceCreateParams params) throws StripeException
Creates a new source object.- Throws:
StripeException
-
create
public static Source create(SourceCreateParams params, RequestOptions options) throws StripeException
Creates a new source object.- Throws:
StripeException
-
update
public Source update(java.util.Map<java.lang.String,java.lang.Object> params) throws StripeException
Updates the specified source by setting the values of the parameters passed. Any parameters not provided will be left unchanged.This request accepts the
metadata
andowner
as arguments. It is also possible to update type specific information for selected payment methods. Please refer to our payment method guides for more detail.- Specified by:
update
in interfaceMetadataStore<Source>
- Throws:
StripeException
-
update
public Source update(java.util.Map<java.lang.String,java.lang.Object> params, RequestOptions options) throws StripeException
Updates the specified source by setting the values of the parameters passed. Any parameters not provided will be left unchanged.This request accepts the
metadata
andowner
as arguments. It is also possible to update type specific information for selected payment methods. Please refer to our payment method guides for more detail.- Specified by:
update
in interfaceMetadataStore<Source>
- Throws:
StripeException
-
update
public Source update(SourceUpdateParams params) throws StripeException
Updates the specified source by setting the values of the parameters passed. Any parameters not provided will be left unchanged.This request accepts the
metadata
andowner
as arguments. It is also possible to update type specific information for selected payment methods. Please refer to our payment method guides for more detail.- Throws:
StripeException
-
update
public Source update(SourceUpdateParams params, RequestOptions options) throws StripeException
Updates the specified source by setting the values of the parameters passed. Any parameters not provided will be left unchanged.This request accepts the
metadata
andowner
as arguments. It is also possible to update type specific information for selected payment methods. Please refer to our payment method guides for more detail.- Throws:
StripeException
-
verify
public Source verify(java.util.Map<java.lang.String,java.lang.Object> params) throws StripeException
Verify a given source.- Throws:
StripeException
-
verify
public Source verify(java.util.Map<java.lang.String,java.lang.Object> params, RequestOptions options) throws StripeException
Verify a given source.- Throws:
StripeException
-
verify
public Source verify(SourceVerifyParams params) throws StripeException
Verify a given source.- Throws:
StripeException
-
verify
public Source verify(SourceVerifyParams params, RequestOptions options) throws StripeException
Verify a given source.- Throws:
StripeException
-
sourceTransactions
public SourceTransactionCollection sourceTransactions() throws StripeException
List source transactions for a given source.- Throws:
StripeException
-
sourceTransactions
public SourceTransactionCollection sourceTransactions(java.util.Map<java.lang.String,java.lang.Object> params) throws StripeException
List source transactions for a given source.- Throws:
StripeException
-
sourceTransactions
public SourceTransactionCollection sourceTransactions(java.util.Map<java.lang.String,java.lang.Object> params, RequestOptions options) throws StripeException
List source transactions for a given source.- Throws:
StripeException
-
sourceTransactions
public SourceTransactionCollection sourceTransactions(SourceSourceTransactionsParams params) throws StripeException
List source transactions for a given source.- Throws:
StripeException
-
sourceTransactions
public SourceTransactionCollection sourceTransactions(SourceSourceTransactionsParams params, RequestOptions options) throws StripeException
List source transactions for a given source.- Throws:
StripeException
-
getAchCreditTransfer
public Source.AchCreditTransfer getAchCreditTransfer()
-
getAchDebit
public Source.AchDebit getAchDebit()
-
getAcssDebit
public Source.AcssDebit getAcssDebit()
-
getAlipay
public Source.Alipay getAlipay()
-
getAmount
public java.lang.Long getAmount()
A positive integer in the smallest currency unit (that is, 100 cents for $1.00, or 1 for ¥1, Japanese Yen being a zero-decimal currency) representing the total amount associated with the source. This is the amount for which the source will be chargeable once ready. Required forsingle_use
sources.
-
getAuBecsDebit
public Source.AuBecsDebit getAuBecsDebit()
-
getBancontact
public Source.Bancontact getBancontact()
-
getCard
public Source.Card getCard()
-
getCardPresent
public Source.CardPresent getCardPresent()
-
getClientSecret
public java.lang.String getClientSecret()
The client secret of the source. Used for client-side retrieval using a publishable key.
-
getCodeVerification
public Source.CodeVerificationFlow getCodeVerification()
-
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 code for the currency associated with the source. This is the currency for which the source will be chargeable once ready. Required forsingle_use
sources.
-
getCustomer
public java.lang.String getCustomer()
The ID of the customer to which this source is attached. This will not be present when the source has not been attached to a customer.
-
getEps
public Source.Eps getEps()
-
getFlow
public java.lang.String getFlow()
The authenticationflow
of the source.flow
is one ofredirect
,receiver
,code_verification
,none
.
-
getGiropay
public Source.Giropay getGiropay()
-
getIdeal
public Source.Ideal getIdeal()
-
getKlarna
public Source.Klarna getKlarna()
-
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.
-
getMultibanco
public Source.Multibanco getMultibanco()
-
getObject
public java.lang.String getObject()
String representing the object's type. Objects of the same type share the same value.Equal to
source
.
-
getOwner
public Source.Owner getOwner()
Information about the owner of the payment instrument that may be used or required by particular source types.
-
getP24
public Source.P24 getP24()
-
getReceiver
public Source.ReceiverFlow getReceiver()
-
getRedirect
public Source.RedirectFlow getRedirect()
-
getSepaCreditTransfer
public Source.SepaCreditTransfer getSepaCreditTransfer()
-
getSepaDebit
public Source.SepaDebit getSepaDebit()
-
getSofort
public Source.Sofort getSofort()
-
getSourceOrder
public Source.Order getSourceOrder()
-
getStatementDescriptor
public java.lang.String getStatementDescriptor()
Extra information about a source. This will appear on your customer's statement every time you charge the source.
-
getStatus
public java.lang.String getStatus()
The status of the source, one ofcanceled
,chargeable
,consumed
,failed
, orpending
. Onlychargeable
sources can be used to create a charge.
-
getThreeDSecure
public Source.ThreeDSecure getThreeDSecure()
-
getType
public java.lang.String getType()
Thetype
of the source. Thetype
is a payment method, one ofach_credit_transfer
,ach_debit
,alipay
,bancontact
,card
,card_present
,eps
,giropay
,ideal
,multibanco
,klarna
,p24
,sepa_debit
,sofort
,three_d_secure
, orwechat
. An additional hash is included on the source with a name matching this value. It contains additional information specific to the payment method used.
-
getUsage
public java.lang.String getUsage()
Eitherreusable
orsingle_use
. Whether this source should be reusable or not. Some source types may or may not be reusable by construction, while others may leave the option at creation. If an incompatible value is passed, an error will be returned.
-
getWechat
public Source.Wechat getWechat()
-
setAchCreditTransfer
public void setAchCreditTransfer(Source.AchCreditTransfer achCreditTransfer)
-
setAchDebit
public void setAchDebit(Source.AchDebit achDebit)
-
setAcssDebit
public void setAcssDebit(Source.AcssDebit acssDebit)
-
setAlipay
public void setAlipay(Source.Alipay alipay)
-
setAmount
public void setAmount(java.lang.Long amount)
A positive integer in the smallest currency unit (that is, 100 cents for $1.00, or 1 for ¥1, Japanese Yen being a zero-decimal currency) representing the total amount associated with the source. This is the amount for which the source will be chargeable once ready. Required forsingle_use
sources.
-
setAuBecsDebit
public void setAuBecsDebit(Source.AuBecsDebit auBecsDebit)
-
setBancontact
public void setBancontact(Source.Bancontact bancontact)
-
setCard
public void setCard(Source.Card card)
-
setCardPresent
public void setCardPresent(Source.CardPresent cardPresent)
-
setClientSecret
public void setClientSecret(java.lang.String clientSecret)
The client secret of the source. Used for client-side retrieval using a publishable key.
-
setCodeVerification
public void setCodeVerification(Source.CodeVerificationFlow codeVerification)
-
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 code for the currency associated with the source. This is the currency for which the source will be chargeable once ready. Required forsingle_use
sources.
-
setCustomer
public void setCustomer(java.lang.String customer)
The ID of the customer to which this source is attached. This will not be present when the source has not been attached to a customer.
-
setEps
public void setEps(Source.Eps eps)
-
setFlow
public void setFlow(java.lang.String flow)
The authenticationflow
of the source.flow
is one ofredirect
,receiver
,code_verification
,none
.
-
setGiropay
public void setGiropay(Source.Giropay giropay)
-
setId
public void setId(java.lang.String id)
Unique identifier for the object.
-
setIdeal
public void setIdeal(Source.Ideal ideal)
-
setKlarna
public void setKlarna(Source.Klarna klarna)
-
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.
-
setMultibanco
public void setMultibanco(Source.Multibanco multibanco)
-
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
source
.
-
setOwner
public void setOwner(Source.Owner owner)
Information about the owner of the payment instrument that may be used or required by particular source types.
-
setP24
public void setP24(Source.P24 p24)
-
setReceiver
public void setReceiver(Source.ReceiverFlow receiver)
-
setRedirect
public void setRedirect(Source.RedirectFlow redirect)
-
setSepaCreditTransfer
public void setSepaCreditTransfer(Source.SepaCreditTransfer sepaCreditTransfer)
-
setSepaDebit
public void setSepaDebit(Source.SepaDebit sepaDebit)
-
setSofort
public void setSofort(Source.Sofort sofort)
-
setSourceOrder
public void setSourceOrder(Source.Order sourceOrder)
-
setStatementDescriptor
public void setStatementDescriptor(java.lang.String statementDescriptor)
Extra information about a source. This will appear on your customer's statement every time you charge the source.
-
setStatus
public void setStatus(java.lang.String status)
The status of the source, one ofcanceled
,chargeable
,consumed
,failed
, orpending
. Onlychargeable
sources can be used to create a charge.
-
setThreeDSecure
public void setThreeDSecure(Source.ThreeDSecure threeDSecure)
-
setType
public void setType(java.lang.String type)
Thetype
of the source. Thetype
is a payment method, one ofach_credit_transfer
,ach_debit
,alipay
,bancontact
,card
,card_present
,eps
,giropay
,ideal
,multibanco
,klarna
,p24
,sepa_debit
,sofort
,three_d_secure
, orwechat
. An additional hash is included on the source with a name matching this value. It contains additional information specific to the payment method used.
-
setUsage
public void setUsage(java.lang.String usage)
Eitherreusable
orsingle_use
. Whether this source should be reusable or not. Some source types may or may not be reusable by construction, while others may leave the option at creation. If an incompatible value is passed, an error will be returned.
-
setWechat
public void setWechat(Source.Wechat wechat)
-
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<Source>
-
-