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 Topupcancel()Cancels a top-up.Topupcancel(RequestOptions options)Cancels a top-up.Topupcancel(TopupCancelParams params)Cancels a top-up.Topupcancel(TopupCancelParams params, RequestOptions options)Cancels a top-up.Topupcancel(java.util.Map<java.lang.String,java.lang.Object> params)Cancels a top-up.Topupcancel(java.util.Map<java.lang.String,java.lang.Object> params, RequestOptions options)Cancels a top-up.protected booleancanEqual(java.lang.Object other)static Topupcreate(TopupCreateParams params)Top up the balance of an account.static Topupcreate(TopupCreateParams params, RequestOptions options)Top up the balance of an account.static Topupcreate(java.util.Map<java.lang.String,java.lang.Object> params)Top up the balance of an account.static Topupcreate(java.util.Map<java.lang.String,java.lang.Object> params, RequestOptions options)Top up the balance of an account.booleanequals(java.lang.Object o)java.lang.LonggetAmount()Amount transferred.java.lang.StringgetBalanceTransaction()Get ID of expandablebalanceTransactionobject.BalanceTransactiongetBalanceTransactionObject()Get expandedbalanceTransaction.java.lang.LonggetCreated()Time at which the object was created.java.lang.StringgetCurrency()Three-letter ISO currency code, in lowercase.java.lang.StringgetDescription()An arbitrary string attached to the object.java.lang.LonggetExpectedAvailabilityDate()Date the funds are expected to arrive in your Stripe account for payouts.java.lang.StringgetFailureCode()Error code explaining reason for top-up failure if available (see the errors section for a list of codes).java.lang.StringgetFailureMessage()Message to user further explaining reason for top-up failure if available.java.lang.StringgetId()Unique identifier for the object.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.java.lang.StringgetObject()String representing the object's type.SourcegetSource()Sourceobjects allow you to accept a variety of payment methods.java.lang.StringgetStatementDescriptor()Extra information about a top-up.java.lang.StringgetStatus()The status of the top-up is eithercanceled,failed,pending,reversed, orsucceeded.java.lang.StringgetTransferGroup()A string that identifies this top-up as part of a group.inthashCode()static TopupCollectionlist(TopupListParams params)Returns a list of top-ups.static TopupCollectionlist(TopupListParams params, RequestOptions options)Returns a list of top-ups.static TopupCollectionlist(java.util.Map<java.lang.String,java.lang.Object> params)Returns a list of top-ups.static TopupCollectionlist(java.util.Map<java.lang.String,java.lang.Object> params, RequestOptions options)Returns a list of top-ups.static Topupretrieve(java.lang.String topup)Retrieves the details of a top-up that has previously been created.static Topupretrieve(java.lang.String topup, RequestOptions options)Retrieves the details of a top-up that has previously been created.static Topupretrieve(java.lang.String topup, TopupRetrieveParams params, RequestOptions options)Retrieves the details of a top-up that has previously been created.static Topupretrieve(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.voidsetAmount(java.lang.Long amount)Amount transferred.voidsetBalanceTransaction(java.lang.String id)voidsetBalanceTransactionObject(BalanceTransaction expandableObject)voidsetCreated(java.lang.Long created)Time at which the object was created.voidsetCurrency(java.lang.String currency)Three-letter ISO currency code, in lowercase.voidsetDescription(java.lang.String description)An arbitrary string attached to the object.voidsetExpectedAvailabilityDate(java.lang.Long expectedAvailabilityDate)Date the funds are expected to arrive in your Stripe account for payouts.voidsetFailureCode(java.lang.String failureCode)Error code explaining reason for top-up failure if available (see the errors section for a list of codes).voidsetFailureMessage(java.lang.String failureMessage)Message to user further explaining reason for top-up failure if available.voidsetId(java.lang.String id)Unique identifier for the object.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.voidsetObject(java.lang.String object)String representing the object's type.voidsetSource(Source source)Sourceobjects allow you to accept a variety of payment methods.voidsetStatementDescriptor(java.lang.String statementDescriptor)Extra information about a top-up.voidsetStatus(java.lang.String status)The status of the top-up is eithercanceled,failed,pending,reversed, orsucceeded.voidsetTransferGroup(java.lang.String transferGroup)A string that identifies this top-up as part of a group.Topupupdate(TopupUpdateParams params)Updates the metadata of a top-up.Topupupdate(TopupUpdateParams params, RequestOptions options)Updates the metadata of a top-up.Topupupdate(java.util.Map<java.lang.String,java.lang.Object> params)Updates the metadata of a top-up.Topupupdate(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, 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 expandablebalanceTransactionobject.
-
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:
updatein 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:
updatein 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 valuetrueif the object exists in live mode or the valuefalseif 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()
Sourceobjects 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 aCardobject: 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 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.
-
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)
Sourceobjects 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 aCardobject: 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:
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<Topup>
-
-