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 classSource.AchCreditTransferstatic classSource.AchDebitstatic classSource.AcssDebitstatic classSource.Alipaystatic classSource.AuBecsDebitstatic classSource.Bancontactstatic classSource.Cardstatic classSource.CardPresentstatic classSource.CodeVerificationFlowstatic classSource.Epsstatic classSource.Giropaystatic classSource.Idealstatic classSource.Klarnastatic classSource.Multibancostatic classSource.Orderstatic classSource.OrderItemstatic classSource.Ownerstatic classSource.P24static classSource.ReceiverFlowstatic classSource.RedirectFlowstatic classSource.SepaCreditTransferstatic classSource.SepaDebitstatic classSource.Sofortstatic classSource.ThreeDSecurestatic classSource.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 booleancanEqual(java.lang.Object other)static Sourcecreate(SourceCreateParams params)Creates a new source object.static Sourcecreate(SourceCreateParams params, RequestOptions options)Creates a new source object.static Sourcecreate(java.util.Map<java.lang.String,java.lang.Object> params)Creates a new source object.static Sourcecreate(java.util.Map<java.lang.String,java.lang.Object> params, RequestOptions options)Creates a new source object.Sourcedetach()Delete a specified source for a given customer.Sourcedetach(SourceDetachParams params)Delete a specified source for a given customer.Sourcedetach(SourceDetachParams params, RequestOptions options)Delete a specified source for a given customer.Sourcedetach(java.util.Map<java.lang.String,java.lang.Object> params)Delete a specified source for a given customer.Sourcedetach(java.util.Map<java.lang.String,java.lang.Object> params, RequestOptions options)Delete a specified source for a given customer.booleanequals(java.lang.Object o)Source.AchCreditTransfergetAchCreditTransfer()Source.AchDebitgetAchDebit()Source.AcssDebitgetAcssDebit()Source.AlipaygetAlipay()java.lang.LonggetAmount()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.AuBecsDebitgetAuBecsDebit()Source.BancontactgetBancontact()Source.CardgetCard()Source.CardPresentgetCardPresent()java.lang.StringgetClientSecret()The client secret of the source.Source.CodeVerificationFlowgetCodeVerification()java.lang.LonggetCreated()Time at which the object was created.java.lang.StringgetCurrency()Three-letter ISO code for the currency associated with the source.java.lang.StringgetCustomer()The ID of the customer to which this source is attached.Source.EpsgetEps()java.lang.StringgetFlow()The authenticationflowof the source.Source.GiropaygetGiropay()java.lang.StringgetId()Unique identifier for the object.Source.IdealgetIdeal()Source.KlarnagetKlarna()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.Source.MultibancogetMultibanco()java.lang.StringgetObject()String representing the object's type.Source.OwnergetOwner()Information about the owner of the payment instrument that may be used or required by particular source types.Source.P24getP24()Source.ReceiverFlowgetReceiver()Source.RedirectFlowgetRedirect()Source.SepaCreditTransfergetSepaCreditTransfer()Source.SepaDebitgetSepaDebit()Source.SofortgetSofort()Source.OrdergetSourceOrder()java.lang.StringgetStatementDescriptor()Extra information about a source.java.lang.StringgetStatus()The status of the source, one ofcanceled,chargeable,consumed,failed, orpending.Source.ThreeDSecuregetThreeDSecure()java.lang.StringgetType()Thetypeof the source.java.lang.StringgetUsage()Eitherreusableorsingle_use.Source.WechatgetWechat()inthashCode()static Sourceretrieve(java.lang.String source)Retrieves an existing source object.static Sourceretrieve(java.lang.String source, RequestOptions options)Retrieves an existing source object.static Sourceretrieve(java.lang.String source, SourceRetrieveParams params, RequestOptions options)Retrieves an existing source object.static Sourceretrieve(java.lang.String source, java.util.Map<java.lang.String,java.lang.Object> params, RequestOptions options)Retrieves an existing source object.voidsetAchCreditTransfer(Source.AchCreditTransfer achCreditTransfer)voidsetAchDebit(Source.AchDebit achDebit)voidsetAcssDebit(Source.AcssDebit acssDebit)voidsetAlipay(Source.Alipay alipay)voidsetAmount(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.voidsetAuBecsDebit(Source.AuBecsDebit auBecsDebit)voidsetBancontact(Source.Bancontact bancontact)voidsetCard(Source.Card card)voidsetCardPresent(Source.CardPresent cardPresent)voidsetClientSecret(java.lang.String clientSecret)The client secret of the source.voidsetCodeVerification(Source.CodeVerificationFlow codeVerification)voidsetCreated(java.lang.Long created)Time at which the object was created.voidsetCurrency(java.lang.String currency)Three-letter ISO code for the currency associated with the source.voidsetCustomer(java.lang.String customer)The ID of the customer to which this source is attached.voidsetEps(Source.Eps eps)voidsetFlow(java.lang.String flow)The authenticationflowof the source.voidsetGiropay(Source.Giropay giropay)voidsetId(java.lang.String id)Unique identifier for the object.voidsetIdeal(Source.Ideal ideal)voidsetKlarna(Source.Klarna klarna)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.voidsetMultibanco(Source.Multibanco multibanco)voidsetObject(java.lang.String object)String representing the object's type.voidsetOwner(Source.Owner owner)Information about the owner of the payment instrument that may be used or required by particular source types.voidsetP24(Source.P24 p24)voidsetReceiver(Source.ReceiverFlow receiver)voidsetRedirect(Source.RedirectFlow redirect)voidsetSepaCreditTransfer(Source.SepaCreditTransfer sepaCreditTransfer)voidsetSepaDebit(Source.SepaDebit sepaDebit)voidsetSofort(Source.Sofort sofort)voidsetSourceOrder(Source.Order sourceOrder)voidsetStatementDescriptor(java.lang.String statementDescriptor)Extra information about a source.voidsetStatus(java.lang.String status)The status of the source, one ofcanceled,chargeable,consumed,failed, orpending.voidsetThreeDSecure(Source.ThreeDSecure threeDSecure)voidsetType(java.lang.String type)Thetypeof the source.voidsetUsage(java.lang.String usage)Eitherreusableorsingle_use.voidsetWechat(Source.Wechat wechat)SourceTransactionCollectionsourceTransactions()List source transactions for a given source.SourceTransactionCollectionsourceTransactions(SourceSourceTransactionsParams params)List source transactions for a given source.SourceTransactionCollectionsourceTransactions(SourceSourceTransactionsParams params, RequestOptions options)List source transactions for a given source.SourceTransactionCollectionsourceTransactions(java.util.Map<java.lang.String,java.lang.Object> params)List source transactions for a given source.SourceTransactionCollectionsourceTransactions(java.util.Map<java.lang.String,java.lang.Object> params, RequestOptions options)List source transactions for a given source.Sourceupdate(SourceUpdateParams params)Updates the specified source by setting the values of the parameters passed.Sourceupdate(SourceUpdateParams params, RequestOptions options)Updates the specified source by setting the values of the parameters passed.Sourceupdate(java.util.Map<java.lang.String,java.lang.Object> params)Updates the specified source by setting the values of the parameters passed.Sourceupdate(java.util.Map<java.lang.String,java.lang.Object> params, RequestOptions options)Updates the specified source by setting the values of the parameters passed.Sourceverify(SourceVerifyParams params)Verify a given source.Sourceverify(SourceVerifyParams params, RequestOptions options)Verify a given source.Sourceverify(java.util.Map<java.lang.String,java.lang.Object> params)Verify a given source.Sourceverify(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, 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
metadataandowneras 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:
updatein 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
metadataandowneras 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:
updatein 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
metadataandowneras 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
metadataandowneras 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_usesources.
-
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_usesources.
-
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 authenticationflowof the source.flowis 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 valuetrueif the object exists in live mode or the valuefalseif 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. Onlychargeablesources can be used to create a charge.
-
getThreeDSecure
public Source.ThreeDSecure getThreeDSecure()
-
getType
public java.lang.String getType()
Thetypeof the source. Thetypeis 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()
Eitherreusableorsingle_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_usesources.
-
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_usesources.
-
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 authenticationflowof the source.flowis 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 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.
-
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. Onlychargeablesources can be used to create a charge.
-
setThreeDSecure
public void setThreeDSecure(Source.ThreeDSecure threeDSecure)
-
setType
public void setType(java.lang.String type)
Thetypeof the source. Thetypeis 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)
Eitherreusableorsingle_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:
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<Source>
-
-