Package com.stripe.model
Class Topup
- java.lang.Object
-
- com.stripe.model.StripeObject
-
- com.stripe.net.ApiResource
-
- com.stripe.model.Topup
-
- All Implemented Interfaces:
BalanceTransactionSource
,HasId
,MetadataStore<Topup>
,StripeObjectInterface
public class Topup extends ApiResource implements MetadataStore<Topup>, BalanceTransactionSource
-
-
Nested Class Summary
-
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 Topup()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description Topup
cancel()
Cancels a top-up.Topup
cancel(RequestOptions options)
Cancels a top-up.Topup
cancel(TopupCancelParams params)
Cancels a top-up.Topup
cancel(TopupCancelParams params, RequestOptions options)
Cancels a top-up.Topup
cancel(java.util.Map<java.lang.String,java.lang.Object> params)
Cancels a top-up.Topup
cancel(java.util.Map<java.lang.String,java.lang.Object> params, RequestOptions options)
Cancels a top-up.protected boolean
canEqual(java.lang.Object other)
static Topup
create(TopupCreateParams params)
Top up the balance of an account.static Topup
create(TopupCreateParams params, RequestOptions options)
Top up the balance of an account.static Topup
create(java.util.Map<java.lang.String,java.lang.Object> params)
Top up the balance of an account.static Topup
create(java.util.Map<java.lang.String,java.lang.Object> params, RequestOptions options)
Top up the balance of an account.boolean
equals(java.lang.Object o)
java.lang.Long
getAmount()
Amount transferred.java.lang.String
getBalanceTransaction()
Get ID of expandablebalanceTransaction
object.BalanceTransaction
getBalanceTransactionObject()
Get expandedbalanceTransaction
.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
getDescription()
An arbitrary string attached to the object.java.lang.Long
getExpectedAvailabilityDate()
Date the funds are expected to arrive in your Stripe account for payouts.java.lang.String
getFailureCode()
Error code explaining reason for top-up failure if available (see the errors section for a list of codes).java.lang.String
getFailureMessage()
Message to user further explaining reason for top-up failure if available.java.lang.String
getId()
Unique identifier for the object.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
getObject()
String representing the object's type.Source
getSource()
Source
objects allow you to accept a variety of payment methods.java.lang.String
getStatementDescriptor()
Extra information about a top-up.java.lang.String
getStatus()
The status of the top-up is eithercanceled
,failed
,pending
,reversed
, orsucceeded
.java.lang.String
getTransferGroup()
A string that identifies this top-up as part of a group.int
hashCode()
static TopupCollection
list(TopupListParams params)
Returns a list of top-ups.static TopupCollection
list(TopupListParams params, RequestOptions options)
Returns a list of top-ups.static TopupCollection
list(java.util.Map<java.lang.String,java.lang.Object> params)
Returns a list of top-ups.static TopupCollection
list(java.util.Map<java.lang.String,java.lang.Object> params, RequestOptions options)
Returns a list of top-ups.static Topup
retrieve(java.lang.String topup)
Retrieves the details of a top-up that has previously been created.static Topup
retrieve(java.lang.String topup, RequestOptions options)
Retrieves the details of a top-up that has previously been created.static Topup
retrieve(java.lang.String topup, TopupRetrieveParams params, RequestOptions options)
Retrieves the details of a top-up that has previously been created.static Topup
retrieve(java.lang.String topup, java.util.Map<java.lang.String,java.lang.Object> params, RequestOptions options)
Retrieves the details of a top-up that has previously been created.void
setAmount(java.lang.Long amount)
Amount transferred.void
setBalanceTransaction(java.lang.String id)
void
setBalanceTransactionObject(BalanceTransaction expandableObject)
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
setDescription(java.lang.String description)
An arbitrary string attached to the object.void
setExpectedAvailabilityDate(java.lang.Long expectedAvailabilityDate)
Date the funds are expected to arrive in your Stripe account for payouts.void
setFailureCode(java.lang.String failureCode)
Error code explaining reason for top-up failure if available (see the errors section for a list of codes).void
setFailureMessage(java.lang.String failureMessage)
Message to user further explaining reason for top-up failure if available.void
setId(java.lang.String id)
Unique identifier for the object.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
setObject(java.lang.String object)
String representing the object's type.void
setSource(Source source)
Source
objects allow you to accept a variety of payment methods.void
setStatementDescriptor(java.lang.String statementDescriptor)
Extra information about a top-up.void
setStatus(java.lang.String status)
The status of the top-up is eithercanceled
,failed
,pending
,reversed
, orsucceeded
.void
setTransferGroup(java.lang.String transferGroup)
A string that identifies this top-up as part of a group.Topup
update(TopupUpdateParams params)
Updates the metadata of a top-up.Topup
update(TopupUpdateParams params, RequestOptions options)
Updates the metadata of a top-up.Topup
update(java.util.Map<java.lang.String,java.lang.Object> params)
Updates the metadata of a top-up.Topup
update(java.util.Map<java.lang.String,java.lang.Object> params, RequestOptions options)
Updates the metadata of a top-up.-
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
-
getBalanceTransaction
public java.lang.String getBalanceTransaction()
Get ID of expandablebalanceTransaction
object.
-
setBalanceTransaction
public void setBalanceTransaction(java.lang.String id)
-
getBalanceTransactionObject
public BalanceTransaction getBalanceTransactionObject()
Get expandedbalanceTransaction
.
-
setBalanceTransactionObject
public void setBalanceTransactionObject(BalanceTransaction expandableObject)
-
create
public static Topup create(java.util.Map<java.lang.String,java.lang.Object> params) throws StripeException
Top up the balance of an account.- Throws:
StripeException
-
create
public static Topup create(java.util.Map<java.lang.String,java.lang.Object> params, RequestOptions options) throws StripeException
Top up the balance of an account.- Throws:
StripeException
-
create
public static Topup create(TopupCreateParams params) throws StripeException
Top up the balance of an account.- Throws:
StripeException
-
create
public static Topup create(TopupCreateParams params, RequestOptions options) throws StripeException
Top up the balance of an account.- Throws:
StripeException
-
list
public static TopupCollection list(java.util.Map<java.lang.String,java.lang.Object> params) throws StripeException
Returns a list of top-ups.- Throws:
StripeException
-
list
public static TopupCollection list(java.util.Map<java.lang.String,java.lang.Object> params, RequestOptions options) throws StripeException
Returns a list of top-ups.- Throws:
StripeException
-
list
public static TopupCollection list(TopupListParams params) throws StripeException
Returns a list of top-ups.- Throws:
StripeException
-
list
public static TopupCollection list(TopupListParams params, RequestOptions options) throws StripeException
Returns a list of top-ups.- Throws:
StripeException
-
retrieve
public static Topup retrieve(java.lang.String topup) throws StripeException
Retrieves the details of a top-up that has previously been created. Supply the unique top-up ID that was returned from your previous request, and Stripe will return the corresponding top-up information.- Throws:
StripeException
-
retrieve
public static Topup retrieve(java.lang.String topup, RequestOptions options) throws StripeException
Retrieves the details of a top-up that has previously been created. Supply the unique top-up ID that was returned from your previous request, and Stripe will return the corresponding top-up information.- Throws:
StripeException
-
retrieve
public static Topup retrieve(java.lang.String topup, java.util.Map<java.lang.String,java.lang.Object> params, RequestOptions options) throws StripeException
Retrieves the details of a top-up that has previously been created. Supply the unique top-up ID that was returned from your previous request, and Stripe will return the corresponding top-up information.- Throws:
StripeException
-
retrieve
public static Topup retrieve(java.lang.String topup, TopupRetrieveParams params, RequestOptions options) throws StripeException
Retrieves the details of a top-up that has previously been created. Supply the unique top-up ID that was returned from your previous request, and Stripe will return the corresponding top-up information.- Throws:
StripeException
-
update
public Topup update(java.util.Map<java.lang.String,java.lang.Object> params) throws StripeException
Updates the metadata of a top-up. Other top-up details are not editable by design.- Specified by:
update
in interfaceMetadataStore<Topup>
- Throws:
StripeException
-
update
public Topup update(java.util.Map<java.lang.String,java.lang.Object> params, RequestOptions options) throws StripeException
Updates the metadata of a top-up. Other top-up details are not editable by design.- Specified by:
update
in interfaceMetadataStore<Topup>
- Throws:
StripeException
-
update
public Topup update(TopupUpdateParams params) throws StripeException
Updates the metadata of a top-up. Other top-up details are not editable by design.- Throws:
StripeException
-
update
public Topup update(TopupUpdateParams params, RequestOptions options) throws StripeException
Updates the metadata of a top-up. Other top-up details are not editable by design.- Throws:
StripeException
-
cancel
public Topup cancel() throws StripeException
Cancels a top-up. Only pending top-ups can be canceled.- Throws:
StripeException
-
cancel
public Topup cancel(RequestOptions options) throws StripeException
Cancels a top-up. Only pending top-ups can be canceled.- Throws:
StripeException
-
cancel
public Topup cancel(java.util.Map<java.lang.String,java.lang.Object> params) throws StripeException
Cancels a top-up. Only pending top-ups can be canceled.- Throws:
StripeException
-
cancel
public Topup cancel(java.util.Map<java.lang.String,java.lang.Object> params, RequestOptions options) throws StripeException
Cancels a top-up. Only pending top-ups can be canceled.- Throws:
StripeException
-
cancel
public Topup cancel(TopupCancelParams params) throws StripeException
Cancels a top-up. Only pending top-ups can be canceled.- Throws:
StripeException
-
cancel
public Topup cancel(TopupCancelParams params, RequestOptions options) throws StripeException
Cancels a top-up. Only pending top-ups can be canceled.- Throws:
StripeException
-
getAmount
public java.lang.Long getAmount()
Amount transferred.
-
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.
-
getDescription
public java.lang.String getDescription()
An arbitrary string attached to the object. Often useful for displaying to users.
-
getExpectedAvailabilityDate
public java.lang.Long getExpectedAvailabilityDate()
Date the funds are expected to arrive in your Stripe account for payouts. This factors in delays like weekends or bank holidays. May not be specified depending on status of top-up.
-
getFailureCode
public java.lang.String getFailureCode()
Error code explaining reason for top-up failure if available (see the errors section for a list of codes).
-
getFailureMessage
public java.lang.String getFailureMessage()
Message to user further explaining reason for top-up failure if available.
-
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.
-
getObject
public java.lang.String getObject()
String representing the object's type. Objects of the same type share the same value.Equal to
topup
.
-
getSource
public Source getSource()
Source
objects allow you to accept a variety of payment methods. They represent a customer's payment instrument, and can be used with the Stripe API just like aCard
object: once chargeable, they can be charged, or can be attached to customers.Related guides: Sources API and Sources & Customers.
-
getStatementDescriptor
public java.lang.String getStatementDescriptor()
Extra information about a top-up. This will appear on your source's bank statement. It must contain at least one letter.
-
getStatus
public java.lang.String getStatus()
The status of the top-up is eithercanceled
,failed
,pending
,reversed
, orsucceeded
.One of
canceled
,failed
,pending
,reversed
, orsucceeded
.
-
getTransferGroup
public java.lang.String getTransferGroup()
A string that identifies this top-up as part of a group.
-
setAmount
public void setAmount(java.lang.Long amount)
Amount transferred.
-
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.
-
setDescription
public void setDescription(java.lang.String description)
An arbitrary string attached to the object. Often useful for displaying to users.
-
setExpectedAvailabilityDate
public void setExpectedAvailabilityDate(java.lang.Long expectedAvailabilityDate)
Date the funds are expected to arrive in your Stripe account for payouts. This factors in delays like weekends or bank holidays. May not be specified depending on status of top-up.
-
setFailureCode
public void setFailureCode(java.lang.String failureCode)
Error code explaining reason for top-up failure if available (see the errors section for a list of codes).
-
setFailureMessage
public void setFailureMessage(java.lang.String failureMessage)
Message to user further explaining reason for top-up failure if available.
-
setId
public void setId(java.lang.String id)
Unique identifier for the object.
-
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.
-
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
topup
.
-
setSource
public void setSource(Source source)
Source
objects allow you to accept a variety of payment methods. They represent a customer's payment instrument, and can be used with the Stripe API just like aCard
object: once chargeable, they can be charged, or can be attached to customers.Related guides: Sources API and Sources & Customers.
-
setStatementDescriptor
public void setStatementDescriptor(java.lang.String statementDescriptor)
Extra information about a top-up. This will appear on your source's bank statement. It must contain at least one letter.
-
setStatus
public void setStatus(java.lang.String status)
The status of the top-up is eithercanceled
,failed
,pending
,reversed
, orsucceeded
.One of
canceled
,failed
,pending
,reversed
, orsucceeded
.
-
setTransferGroup
public void setTransferGroup(java.lang.String transferGroup)
A string that identifies this top-up as part of a group.
-
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<Topup>
-
-