Package com.stripe.model
Class Transfer
java.lang.Object
com.stripe.model.StripeObject
com.stripe.net.ApiResource
com.stripe.model.Transfer
- All Implemented Interfaces:
BalanceTransactionSource
,HasId
,MetadataStore<Transfer>
,StripeObjectInterface
public class Transfer extends ApiResource implements MetadataStore<Transfer>, BalanceTransactionSource
-
Nested Class Summary
-
Field Summary
-
Constructor Summary
Constructors Constructor Description Transfer()
-
Method Summary
Modifier and Type Method Description protected boolean
canEqual(java.lang.Object other)
static Transfer
create(TransferCreateParams params)
To send funds from your Stripe account to a connected account, you create a new transfer object.static Transfer
create(TransferCreateParams params, RequestOptions options)
To send funds from your Stripe account to a connected account, you create a new transfer object.static Transfer
create(java.util.Map<java.lang.String,java.lang.Object> params)
To send funds from your Stripe account to a connected account, you create a new transfer object.static Transfer
create(java.util.Map<java.lang.String,java.lang.Object> params, RequestOptions options)
To send funds from your Stripe account to a connected account, you create a new transfer object.boolean
equals(java.lang.Object o)
java.lang.Long
getAmount()
Amount in %s to be transferred.java.lang.Long
getAmountReversed()
Amount in %s reversed (can be less than the amount attribute on the transfer if a partial reversal was issued).java.lang.String
getBalanceTransaction()
Get id of expandable `balanceTransaction` object.BalanceTransaction
getBalanceTransactionObject()
Get expanded `balanceTransaction`.java.lang.Long
getCreated()
Time that this record of the transfer was first created.java.lang.String
getCurrency()
Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase.java.lang.String
getDescription()
An arbitrary string attached to the object.java.lang.String
getDestination()
Get id of expandable `destination` object.Account
getDestinationObject()
Get expanded `destination`.java.lang.String
getDestinationPayment()
Get id of expandable `destinationPayment` object.Charge
getDestinationPaymentObject()
Get expanded `destinationPayment`.java.lang.String
getId()
Unique identifier for the object.java.lang.Boolean
getLivemode()
Has the value `true` if the object exists in live mode or the value `false` 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.TransferReversalCollection
getReversals()
A list of reversals that have been applied to the transfer.java.lang.Boolean
getReversed()
Whether the transfer has been fully reversed.java.lang.String
getSourceTransaction()
Get id of expandable `sourceTransaction` object.Charge
getSourceTransactionObject()
Get expanded `sourceTransaction`.java.lang.String
getSourceType()
The source balance this transfer came from.java.lang.String
getTransferGroup()
A string that identifies this transaction as part of a group.int
hashCode()
static TransferCollection
list(TransferListParams params)
Returns a list of existing transfers sent to connected accounts.static TransferCollection
list(TransferListParams params, RequestOptions options)
Returns a list of existing transfers sent to connected accounts.static TransferCollection
list(java.util.Map<java.lang.String,java.lang.Object> params)
Returns a list of existing transfers sent to connected accounts.static TransferCollection
list(java.util.Map<java.lang.String,java.lang.Object> params, RequestOptions options)
Returns a list of existing transfers sent to connected accounts.static Transfer
retrieve(java.lang.String transfer)
Retrieves the details of an existing transfer.static Transfer
retrieve(java.lang.String transfer, RequestOptions options)
Retrieves the details of an existing transfer.static Transfer
retrieve(java.lang.String transfer, TransferRetrieveParams params, RequestOptions options)
Retrieves the details of an existing transfer.static Transfer
retrieve(java.lang.String transfer, java.util.Map<java.lang.String,java.lang.Object> params, RequestOptions options)
Retrieves the details of an existing transfer.void
setAmount(java.lang.Long amount)
Amount in %s to be transferred.void
setAmountReversed(java.lang.Long amountReversed)
Amount in %s reversed (can be less than the amount attribute on the transfer if a partial reversal was issued).void
setBalanceTransaction(java.lang.String id)
void
setBalanceTransactionObject(BalanceTransaction expandableObject)
void
setCreated(java.lang.Long created)
Time that this record of the transfer was first created.void
setCurrency(java.lang.String currency)
Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase.void
setDescription(java.lang.String description)
An arbitrary string attached to the object.void
setDestination(java.lang.String id)
void
setDestinationObject(Account expandableObject)
void
setDestinationPayment(java.lang.String id)
void
setDestinationPaymentObject(Charge expandableObject)
void
setId(java.lang.String id)
Unique identifier for the object.void
setLivemode(java.lang.Boolean livemode)
Has the value `true` if the object exists in live mode or the value `false` 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
setReversals(TransferReversalCollection reversals)
A list of reversals that have been applied to the transfer.void
setReversed(java.lang.Boolean reversed)
Whether the transfer has been fully reversed.void
setSourceTransaction(java.lang.String id)
void
setSourceTransactionObject(Charge expandableObject)
void
setSourceType(java.lang.String sourceType)
The source balance this transfer came from.void
setTransferGroup(java.lang.String transferGroup)
A string that identifies this transaction as part of a group.Transfer
update(TransferUpdateParams params)
Updates the specified transfer by setting the values of the parameters passed.Transfer
update(TransferUpdateParams params, RequestOptions options)
Updates the specified transfer by setting the values of the parameters passed.Transfer
update(java.util.Map<java.lang.String,java.lang.Object> params)
Updates the specified transfer by setting the values of the parameters passed.Transfer
update(java.util.Map<java.lang.String,java.lang.Object> params, RequestOptions options)
Updates the specified transfer by setting the values of the parameters passed.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
-
Constructor Details
-
Transfer
public Transfer()
-
-
Method Details
-
getBalanceTransaction
public java.lang.String getBalanceTransaction()Get id of expandable `balanceTransaction` object. -
setBalanceTransaction
public void setBalanceTransaction(java.lang.String id) -
getBalanceTransactionObject
Get expanded `balanceTransaction`. -
setBalanceTransactionObject
-
getDestination
public java.lang.String getDestination()Get id of expandable `destination` object. -
setDestination
public void setDestination(java.lang.String id) -
getDestinationObject
Get expanded `destination`. -
setDestinationObject
-
getDestinationPayment
public java.lang.String getDestinationPayment()Get id of expandable `destinationPayment` object. -
setDestinationPayment
public void setDestinationPayment(java.lang.String id) -
getDestinationPaymentObject
Get expanded `destinationPayment`. -
setDestinationPaymentObject
-
getSourceTransaction
public java.lang.String getSourceTransaction()Get id of expandable `sourceTransaction` object. -
setSourceTransaction
public void setSourceTransaction(java.lang.String id) -
getSourceTransactionObject
Get expanded `sourceTransaction`. -
setSourceTransactionObject
-
create
public static Transfer create(java.util.Map<java.lang.String,java.lang.Object> params) throws StripeExceptionTo send funds from your Stripe account to a connected account, you create a new transfer object. Your Stripe balance must be able to cover the transfer amount, or you’ll receive an “Insufficient Funds” error.- Throws:
StripeException
-
create
public static Transfer create(java.util.Map<java.lang.String,java.lang.Object> params, RequestOptions options) throws StripeExceptionTo send funds from your Stripe account to a connected account, you create a new transfer object. Your Stripe balance must be able to cover the transfer amount, or you’ll receive an “Insufficient Funds” error.- Throws:
StripeException
-
create
To send funds from your Stripe account to a connected account, you create a new transfer object. Your Stripe balance must be able to cover the transfer amount, or you’ll receive an “Insufficient Funds” error.- Throws:
StripeException
-
create
public static Transfer create(TransferCreateParams params, RequestOptions options) throws StripeExceptionTo send funds from your Stripe account to a connected account, you create a new transfer object. Your Stripe balance must be able to cover the transfer amount, or you’ll receive an “Insufficient Funds” error.- Throws:
StripeException
-
list
public static TransferCollection list(java.util.Map<java.lang.String,java.lang.Object> params) throws StripeExceptionReturns a list of existing transfers sent to connected accounts. The transfers are returned in sorted order, with the most recently created transfers appearing first.- Throws:
StripeException
-
list
public static TransferCollection list(java.util.Map<java.lang.String,java.lang.Object> params, RequestOptions options) throws StripeExceptionReturns a list of existing transfers sent to connected accounts. The transfers are returned in sorted order, with the most recently created transfers appearing first.- Throws:
StripeException
-
list
Returns a list of existing transfers sent to connected accounts. The transfers are returned in sorted order, with the most recently created transfers appearing first.- Throws:
StripeException
-
list
public static TransferCollection list(TransferListParams params, RequestOptions options) throws StripeExceptionReturns a list of existing transfers sent to connected accounts. The transfers are returned in sorted order, with the most recently created transfers appearing first.- Throws:
StripeException
-
retrieve
Retrieves the details of an existing transfer. Supply the unique transfer ID from either a transfer creation request or the transfer list, and Stripe will return the corresponding transfer information.- Throws:
StripeException
-
retrieve
public static Transfer retrieve(java.lang.String transfer, RequestOptions options) throws StripeExceptionRetrieves the details of an existing transfer. Supply the unique transfer ID from either a transfer creation request or the transfer list, and Stripe will return the corresponding transfer information.- Throws:
StripeException
-
retrieve
public static Transfer retrieve(java.lang.String transfer, java.util.Map<java.lang.String,java.lang.Object> params, RequestOptions options) throws StripeExceptionRetrieves the details of an existing transfer. Supply the unique transfer ID from either a transfer creation request or the transfer list, and Stripe will return the corresponding transfer information.- Throws:
StripeException
-
retrieve
public static Transfer retrieve(java.lang.String transfer, TransferRetrieveParams params, RequestOptions options) throws StripeExceptionRetrieves the details of an existing transfer. Supply the unique transfer ID from either a transfer creation request or the transfer list, and Stripe will return the corresponding transfer information.- Throws:
StripeException
-
update
public Transfer update(java.util.Map<java.lang.String,java.lang.Object> params) throws StripeExceptionUpdates the specified transfer by setting the values of the parameters passed. Any parameters not provided will be left unchanged.This request accepts only metadata as an argument.
- Specified by:
update
in interfaceMetadataStore<Transfer>
- Throws:
StripeException
-
update
public Transfer update(java.util.Map<java.lang.String,java.lang.Object> params, RequestOptions options) throws StripeExceptionUpdates the specified transfer by setting the values of the parameters passed. Any parameters not provided will be left unchanged.This request accepts only metadata as an argument.
- Specified by:
update
in interfaceMetadataStore<Transfer>
- Throws:
StripeException
-
update
Updates the specified transfer by setting the values of the parameters passed. Any parameters not provided will be left unchanged.This request accepts only metadata as an argument.
- Throws:
StripeException
-
update
Updates the specified transfer by setting the values of the parameters passed. Any parameters not provided will be left unchanged.This request accepts only metadata as an argument.
- Throws:
StripeException
-
getAmount
public java.lang.Long getAmount()Amount in %s to be transferred. -
getAmountReversed
public java.lang.Long getAmountReversed()Amount in %s reversed (can be less than the amount attribute on the transfer if a partial reversal was issued). -
getCreated
public java.lang.Long getCreated()Time that this record of the transfer was first created. -
getCurrency
public java.lang.String getCurrency()Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). -
getDescription
public java.lang.String getDescription()An arbitrary string attached to the object. Often useful for displaying to users. -
getLivemode
public java.lang.Boolean getLivemode()Has the value `true` if the object exists in live mode or the value `false` 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 `transfer`.
-
getReversals
A list of reversals that have been applied to the transfer. -
getReversed
public java.lang.Boolean getReversed()Whether the transfer has been fully reversed. If the transfer is only partially reversed, this attribute will still be false. -
getSourceType
public java.lang.String getSourceType()The source balance this transfer came from. One of `card` or `bank_account`. -
getTransferGroup
public java.lang.String getTransferGroup()A string that identifies this transaction as part of a group. See the [Connect documentation](https://stripe.com/docs/connect/charges-transfers#grouping-transactions) for details. -
setAmount
public void setAmount(java.lang.Long amount)Amount in %s to be transferred. -
setAmountReversed
public void setAmountReversed(java.lang.Long amountReversed)Amount in %s reversed (can be less than the amount attribute on the transfer if a partial reversal was issued). -
setCreated
public void setCreated(java.lang.Long created)Time that this record of the transfer was first created. -
setCurrency
public void setCurrency(java.lang.String currency)Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). -
setDescription
public void setDescription(java.lang.String description)An arbitrary string attached to the object. Often useful for displaying to users. -
setId
public void setId(java.lang.String id)Unique identifier for the object. -
setLivemode
public void setLivemode(java.lang.Boolean livemode)Has the value `true` if the object exists in live mode or the value `false` 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 `transfer`.
-
setReversals
A list of reversals that have been applied to the transfer. -
setReversed
public void setReversed(java.lang.Boolean reversed)Whether the transfer has been fully reversed. If the transfer is only partially reversed, this attribute will still be false. -
setSourceType
public void setSourceType(java.lang.String sourceType)The source balance this transfer came from. One of `card` or `bank_account`. -
setTransferGroup
public void setTransferGroup(java.lang.String transferGroup)A string that identifies this transaction as part of a group. See the [Connect documentation](https://stripe.com/docs/connect/charges-transfers#grouping-transactions) for details. -
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<Transfer>
-