Package com.stripe.model
Class Source
- java.lang.Object
-
- com.stripe.model.StripeObject
-
- com.stripe.net.ApiResource
-
- com.stripe.model.ExternalAccount
-
- com.stripe.model.Source
-
- All Implemented Interfaces:
HasId
,HasSourceTypeData
,MetadataStore<ExternalAccount>
public class Source extends ExternalAccount implements HasSourceTypeData
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
Source.CodeVerificationFlow
static class
Source.Owner
static class
Source.ReceiverFlow
static class
Source.RedirectFlow
-
Nested classes/interfaces inherited from class com.stripe.net.ApiResource
ApiResource.RequestMethod, ApiResource.RequestType
-
-
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(java.util.Map<java.lang.String,java.lang.Object> params)
Create a source.static Source
create(java.util.Map<java.lang.String,java.lang.Object> params, RequestOptions options)
Create a source.Source
delete(RequestOptions options)
Source objects cannot be deleted.Source
detach()
Detach a source.Source
detach(java.util.Map<java.lang.String,java.lang.Object> params)
Detach a source.Source
detach(java.util.Map<java.lang.String,java.lang.Object> params, RequestOptions options)
Detach a source.boolean
equals(java.lang.Object o)
java.lang.Long
getAmount()
java.lang.String
getClientSecret()
Source.CodeVerificationFlow
getCodeVerification()
java.lang.Long
getCreated()
java.lang.String
getCurrency()
java.lang.String
getFlow()
java.lang.Boolean
getLivemode()
Source.Owner
getOwner()
Source.ReceiverFlow
getReceiver()
Source.RedirectFlow
getRedirect()
java.lang.String
getSourceInstanceUrl()
java.lang.String
getStatementDescriptor()
java.lang.String
getStatus()
java.lang.String
getType()
java.util.Map<java.lang.String,java.lang.String>
getTypeData()
java.lang.String
getUsage()
int
hashCode()
static Source
retrieve(java.lang.String id)
Retrieve a source.static Source
retrieve(java.lang.String id, RequestOptions options)
Retrieve a source.static Source
retrieve(java.lang.String id, java.util.Map<java.lang.String,java.lang.Object> params, RequestOptions options)
Retrieve a source.void
setAmount(java.lang.Long amount)
void
setClientSecret(java.lang.String clientSecret)
void
setCodeVerification(Source.CodeVerificationFlow codeVerification)
void
setCreated(java.lang.Long created)
void
setCurrency(java.lang.String currency)
void
setFlow(java.lang.String flow)
void
setLivemode(java.lang.Boolean livemode)
void
setOwner(Source.Owner owner)
void
setReceiver(Source.ReceiverFlow receiver)
void
setRedirect(Source.RedirectFlow redirect)
void
setStatementDescriptor(java.lang.String statementDescriptor)
void
setStatus(java.lang.String status)
void
setType(java.lang.String type)
void
setTypeData(java.util.Map<java.lang.String,java.lang.String> typeData)
void
setUsage(java.lang.String usage)
SourceTransactionCollection
sourceTransactions(java.util.Map<java.lang.String,java.lang.Object> params)
Retrieve a source's transactions.SourceTransactionCollection
sourceTransactions(java.util.Map<java.lang.String,java.lang.Object> params, RequestOptions options)
Retrieve a source's transactions.Source
update(java.util.Map<java.lang.String,java.lang.Object> params)
Update a source.Source
update(java.util.Map<java.lang.String,java.lang.Object> params, RequestOptions options)
Update a source.Source
verify(java.util.Map<java.lang.String,java.lang.Object> params)
Verify a source.Source
verify(java.util.Map<java.lang.String,java.lang.Object> params, RequestOptions options)
Verify a source.-
Methods inherited from class com.stripe.model.ExternalAccount
delete, getAccount, getCustomer, getId, getInstanceUrl, getMetadata, getObject, setAccount, setCustomer, setId, setMetadata, setObject
-
Methods inherited from class com.stripe.net.ApiResource
classUrl, classUrl, instanceUrl, instanceUrl, multipartRequest, request, requestCollection, setExpandableFieldId, setStripeResponseGetter, singleClassUrl, singleClassUrl, subresourceUrl, urlEncode
-
Methods inherited from class com.stripe.model.StripeObject
equals, getLastResponse, setLastResponse, toJson, toString
-
-
-
-
Method Detail
-
getSourceInstanceUrl
public java.lang.String getSourceInstanceUrl() throws InvalidRequestException
- Throws:
InvalidRequestException
-
create
public static Source create(java.util.Map<java.lang.String,java.lang.Object> params) throws StripeException
Create a source.- Throws:
StripeException
-
create
public static Source create(java.util.Map<java.lang.String,java.lang.Object> params, RequestOptions options) throws StripeException
Create a source.- Throws:
StripeException
-
delete
public Source delete(RequestOptions options) throws StripeException
Source objects cannot be deleted. Calling this method will raise anInvalidRequestException
. Calldetach()
to detach the source from a customer object.- Overrides:
delete
in classExternalAccount
- Throws:
StripeException
-
detach
public Source detach() throws StripeException
Detach a source.- Throws:
StripeException
-
detach
public Source detach(java.util.Map<java.lang.String,java.lang.Object> params) throws StripeException
Detach a source.- Throws:
StripeException
-
detach
public Source detach(java.util.Map<java.lang.String,java.lang.Object> params, RequestOptions options) throws StripeException
Detach a source.- Throws:
StripeException
-
retrieve
public static Source retrieve(java.lang.String id) throws StripeException
Retrieve a source.- Throws:
StripeException
-
retrieve
public static Source retrieve(java.lang.String id, RequestOptions options) throws StripeException
Retrieve a source.- Throws:
StripeException
-
retrieve
public static Source retrieve(java.lang.String id, java.util.Map<java.lang.String,java.lang.Object> params, RequestOptions options) throws StripeException
Retrieve a source.- Throws:
StripeException
-
sourceTransactions
public SourceTransactionCollection sourceTransactions(java.util.Map<java.lang.String,java.lang.Object> params) throws StripeException
Retrieve a source's transactions.- Throws:
StripeException
-
sourceTransactions
public SourceTransactionCollection sourceTransactions(java.util.Map<java.lang.String,java.lang.Object> params, RequestOptions options) throws StripeException
Retrieve a source's transactions.- Throws:
StripeException
-
update
public Source update(java.util.Map<java.lang.String,java.lang.Object> params) throws StripeException
Update a source.- Specified by:
update
in interfaceMetadataStore<ExternalAccount>
- Overrides:
update
in classExternalAccount
- Throws:
StripeException
-
update
public Source update(java.util.Map<java.lang.String,java.lang.Object> params, RequestOptions options) throws StripeException
Update a source.- Specified by:
update
in interfaceMetadataStore<ExternalAccount>
- Overrides:
update
in classExternalAccount
- Throws:
StripeException
-
verify
public Source verify(java.util.Map<java.lang.String,java.lang.Object> params) throws StripeException
Verify a source.- Overrides:
verify
in classExternalAccount
- Throws:
StripeException
-
verify
public Source verify(java.util.Map<java.lang.String,java.lang.Object> params, RequestOptions options) throws StripeException
Verify a source.- Overrides:
verify
in classExternalAccount
- Parameters:
params
- request parametersoptions
- request options- Returns:
- the verified bank account
- Throws:
StripeException
-
getAmount
public java.lang.Long getAmount()
-
getClientSecret
public java.lang.String getClientSecret()
-
getCodeVerification
public Source.CodeVerificationFlow getCodeVerification()
-
getCreated
public java.lang.Long getCreated()
-
getCurrency
public java.lang.String getCurrency()
-
getFlow
public java.lang.String getFlow()
-
getLivemode
public java.lang.Boolean getLivemode()
-
getOwner
public Source.Owner getOwner()
-
getReceiver
public Source.ReceiverFlow getReceiver()
-
getRedirect
public Source.RedirectFlow getRedirect()
-
getStatementDescriptor
public java.lang.String getStatementDescriptor()
-
getStatus
public java.lang.String getStatus()
-
getType
public java.lang.String getType()
-
getUsage
public java.lang.String getUsage()
-
setAmount
public void setAmount(java.lang.Long amount)
-
setClientSecret
public void setClientSecret(java.lang.String clientSecret)
-
setCodeVerification
public void setCodeVerification(Source.CodeVerificationFlow codeVerification)
-
setCreated
public void setCreated(java.lang.Long created)
-
setCurrency
public void setCurrency(java.lang.String currency)
-
setFlow
public void setFlow(java.lang.String flow)
-
setLivemode
public void setLivemode(java.lang.Boolean livemode)
-
setOwner
public void setOwner(Source.Owner owner)
-
setReceiver
public void setReceiver(Source.ReceiverFlow receiver)
-
setRedirect
public void setRedirect(Source.RedirectFlow redirect)
-
setStatementDescriptor
public void setStatementDescriptor(java.lang.String statementDescriptor)
-
setStatus
public void setStatus(java.lang.String status)
-
setType
public void setType(java.lang.String type)
-
setUsage
public void setUsage(java.lang.String usage)
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equals
in classExternalAccount
-
canEqual
protected boolean canEqual(java.lang.Object other)
- Overrides:
canEqual
in classExternalAccount
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classExternalAccount
-
getTypeData
public java.util.Map<java.lang.String,java.lang.String> getTypeData()
- Specified by:
getTypeData
in interfaceHasSourceTypeData
-
setTypeData
public void setTypeData(java.util.Map<java.lang.String,java.lang.String> typeData)
- Specified by:
setTypeData
in interfaceHasSourceTypeData
-
-