Package com.stripe.model
Class Refund
- java.lang.Object
-
- com.stripe.model.StripeObject
-
- com.stripe.net.ApiResource
-
- com.stripe.model.Refund
-
- All Implemented Interfaces:
BalanceTransactionSource
,HasId
,MetadataStore<Refund>
,StripeObjectInterface
public class Refund extends ApiResource implements MetadataStore<Refund>, 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 Refund()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected boolean
canEqual(java.lang.Object other)
static Refund
create(RefundCreateParams params)
Create a refund.static Refund
create(RefundCreateParams params, RequestOptions options)
Create a refund.static Refund
create(java.util.Map<java.lang.String,java.lang.Object> params)
Create a refund.static Refund
create(java.util.Map<java.lang.String,java.lang.Object> params, RequestOptions options)
Create a refund.boolean
equals(java.lang.Object o)
java.lang.Long
getAmount()
Amount, in %s.java.lang.String
getBalanceTransaction()
Get ID of expandablebalanceTransaction
object.BalanceTransaction
getBalanceTransactionObject()
Get expandedbalanceTransaction
.java.lang.String
getCharge()
Get ID of expandablecharge
object.Charge
getChargeObject()
Get expandedcharge
.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.String
getFailureBalanceTransaction()
Get ID of expandablefailureBalanceTransaction
object.BalanceTransaction
getFailureBalanceTransactionObject()
Get expandedfailureBalanceTransaction
.java.lang.String
getFailureReason()
If the refund failed, the reason for refund failure if known.java.lang.String
getId()
Unique identifier for the object.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.java.lang.String
getPaymentIntent()
Get ID of expandablepaymentIntent
object.PaymentIntent
getPaymentIntentObject()
Get expandedpaymentIntent
.java.lang.String
getReason()
Reason for the refund, either user-provided (duplicate
,fraudulent
, orrequested_by_customer
) or generated by Stripe internally (expired_uncaptured_charge
).java.lang.String
getReceiptNumber()
This is the transaction number that appears on email receipts sent for this refund.java.lang.String
getSourceTransferReversal()
Get ID of expandablesourceTransferReversal
object.TransferReversal
getSourceTransferReversalObject()
Get expandedsourceTransferReversal
.java.lang.String
getStatus()
Status of the refund.java.lang.String
getTransferReversal()
Get ID of expandabletransferReversal
object.TransferReversal
getTransferReversalObject()
Get expandedtransferReversal
.int
hashCode()
static RefundCollection
list(RefundListParams params)
Returns a list of all refunds you’ve previously created.static RefundCollection
list(RefundListParams params, RequestOptions options)
Returns a list of all refunds you’ve previously created.static RefundCollection
list(java.util.Map<java.lang.String,java.lang.Object> params)
Returns a list of all refunds you’ve previously created.static RefundCollection
list(java.util.Map<java.lang.String,java.lang.Object> params, RequestOptions options)
Returns a list of all refunds you’ve previously created.static Refund
retrieve(java.lang.String refund)
Retrieves the details of an existing refund.static Refund
retrieve(java.lang.String refund, RequestOptions options)
Retrieves the details of an existing refund.static Refund
retrieve(java.lang.String refund, RefundRetrieveParams params, RequestOptions options)
Retrieves the details of an existing refund.static Refund
retrieve(java.lang.String refund, java.util.Map<java.lang.String,java.lang.Object> params, RequestOptions options)
Retrieves the details of an existing refund.void
setAmount(java.lang.Long amount)
Amount, in %s.void
setBalanceTransaction(java.lang.String id)
void
setBalanceTransactionObject(BalanceTransaction expandableObject)
void
setCharge(java.lang.String id)
void
setChargeObject(Charge 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
setFailureBalanceTransaction(java.lang.String id)
void
setFailureBalanceTransactionObject(BalanceTransaction expandableObject)
void
setFailureReason(java.lang.String failureReason)
If the refund failed, the reason for refund failure if known.void
setId(java.lang.String id)
Unique identifier for the object.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
setPaymentIntent(java.lang.String id)
void
setPaymentIntentObject(PaymentIntent expandableObject)
void
setReason(java.lang.String reason)
Reason for the refund, either user-provided (duplicate
,fraudulent
, orrequested_by_customer
) or generated by Stripe internally (expired_uncaptured_charge
).void
setReceiptNumber(java.lang.String receiptNumber)
This is the transaction number that appears on email receipts sent for this refund.void
setSourceTransferReversal(java.lang.String id)
void
setSourceTransferReversalObject(TransferReversal expandableObject)
void
setStatus(java.lang.String status)
Status of the refund.void
setTransferReversal(java.lang.String id)
void
setTransferReversalObject(TransferReversal expandableObject)
Refund
update(RefundUpdateParams params)
Updates the specified refund by setting the values of the parameters passed.Refund
update(RefundUpdateParams params, RequestOptions options)
Updates the specified refund by setting the values of the parameters passed.Refund
update(java.util.Map<java.lang.String,java.lang.Object> params)
Updates the specified refund by setting the values of the parameters passed.Refund
update(java.util.Map<java.lang.String,java.lang.Object> params, RequestOptions options)
Updates the specified refund 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, 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)
-
getCharge
public java.lang.String getCharge()
Get ID of expandablecharge
object.
-
setCharge
public void setCharge(java.lang.String id)
-
getChargeObject
public Charge getChargeObject()
Get expandedcharge
.
-
setChargeObject
public void setChargeObject(Charge expandableObject)
-
getFailureBalanceTransaction
public java.lang.String getFailureBalanceTransaction()
Get ID of expandablefailureBalanceTransaction
object.
-
setFailureBalanceTransaction
public void setFailureBalanceTransaction(java.lang.String id)
-
getFailureBalanceTransactionObject
public BalanceTransaction getFailureBalanceTransactionObject()
Get expandedfailureBalanceTransaction
.
-
setFailureBalanceTransactionObject
public void setFailureBalanceTransactionObject(BalanceTransaction expandableObject)
-
getPaymentIntent
public java.lang.String getPaymentIntent()
Get ID of expandablepaymentIntent
object.
-
setPaymentIntent
public void setPaymentIntent(java.lang.String id)
-
getPaymentIntentObject
public PaymentIntent getPaymentIntentObject()
Get expandedpaymentIntent
.
-
setPaymentIntentObject
public void setPaymentIntentObject(PaymentIntent expandableObject)
-
getSourceTransferReversal
public java.lang.String getSourceTransferReversal()
Get ID of expandablesourceTransferReversal
object.
-
setSourceTransferReversal
public void setSourceTransferReversal(java.lang.String id)
-
getSourceTransferReversalObject
public TransferReversal getSourceTransferReversalObject()
Get expandedsourceTransferReversal
.
-
setSourceTransferReversalObject
public void setSourceTransferReversalObject(TransferReversal expandableObject)
-
getTransferReversal
public java.lang.String getTransferReversal()
Get ID of expandabletransferReversal
object.
-
setTransferReversal
public void setTransferReversal(java.lang.String id)
-
getTransferReversalObject
public TransferReversal getTransferReversalObject()
Get expandedtransferReversal
.
-
setTransferReversalObject
public void setTransferReversalObject(TransferReversal expandableObject)
-
list
public static RefundCollection list(java.util.Map<java.lang.String,java.lang.Object> params) throws StripeException
Returns a list of all refunds you’ve previously created. The refunds are returned in sorted order, with the most recent refunds appearing first. For convenience, the 10 most recent refunds are always available by default on the charge object.- Throws:
StripeException
-
list
public static RefundCollection list(java.util.Map<java.lang.String,java.lang.Object> params, RequestOptions options) throws StripeException
Returns a list of all refunds you’ve previously created. The refunds are returned in sorted order, with the most recent refunds appearing first. For convenience, the 10 most recent refunds are always available by default on the charge object.- Throws:
StripeException
-
list
public static RefundCollection list(RefundListParams params) throws StripeException
Returns a list of all refunds you’ve previously created. The refunds are returned in sorted order, with the most recent refunds appearing first. For convenience, the 10 most recent refunds are always available by default on the charge object.- Throws:
StripeException
-
list
public static RefundCollection list(RefundListParams params, RequestOptions options) throws StripeException
Returns a list of all refunds you’ve previously created. The refunds are returned in sorted order, with the most recent refunds appearing first. For convenience, the 10 most recent refunds are always available by default on the charge object.- Throws:
StripeException
-
create
public static Refund create(java.util.Map<java.lang.String,java.lang.Object> params) throws StripeException
Create a refund.- Throws:
StripeException
-
create
public static Refund create(java.util.Map<java.lang.String,java.lang.Object> params, RequestOptions options) throws StripeException
Create a refund.- Throws:
StripeException
-
create
public static Refund create(RefundCreateParams params) throws StripeException
Create a refund.- Throws:
StripeException
-
create
public static Refund create(RefundCreateParams params, RequestOptions options) throws StripeException
Create a refund.- Throws:
StripeException
-
retrieve
public static Refund retrieve(java.lang.String refund) throws StripeException
Retrieves the details of an existing refund.- Throws:
StripeException
-
retrieve
public static Refund retrieve(java.lang.String refund, RequestOptions options) throws StripeException
Retrieves the details of an existing refund.- Throws:
StripeException
-
retrieve
public static Refund retrieve(java.lang.String refund, java.util.Map<java.lang.String,java.lang.Object> params, RequestOptions options) throws StripeException
Retrieves the details of an existing refund.- Throws:
StripeException
-
retrieve
public static Refund retrieve(java.lang.String refund, RefundRetrieveParams params, RequestOptions options) throws StripeException
Retrieves the details of an existing refund.- Throws:
StripeException
-
update
public Refund update(java.util.Map<java.lang.String,java.lang.Object> params) throws StripeException
Updates the specified refund by setting the values of the parameters passed. Any parameters not provided will be left unchanged.This request only accepts
metadata
as an argument.- Specified by:
update
in interfaceMetadataStore<Refund>
- Throws:
StripeException
-
update
public Refund update(java.util.Map<java.lang.String,java.lang.Object> params, RequestOptions options) throws StripeException
Updates the specified refund by setting the values of the parameters passed. Any parameters not provided will be left unchanged.This request only accepts
metadata
as an argument.- Specified by:
update
in interfaceMetadataStore<Refund>
- Throws:
StripeException
-
update
public Refund update(RefundUpdateParams params) throws StripeException
Updates the specified refund by setting the values of the parameters passed. Any parameters not provided will be left unchanged.This request only accepts
metadata
as an argument.- Throws:
StripeException
-
update
public Refund update(RefundUpdateParams params, RequestOptions options) throws StripeException
Updates the specified refund by setting the values of the parameters passed. Any parameters not provided will be left unchanged.This request only accepts
metadata
as an argument.- Throws:
StripeException
-
getAmount
public java.lang.Long getAmount()
Amount, in %s.
-
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. (Available on non-card refunds only)
-
getFailureReason
public java.lang.String getFailureReason()
If the refund failed, the reason for refund failure if known. Possible values arelost_or_stolen_card
,expired_or_canceled_card
, orunknown
.
-
getObject
public java.lang.String getObject()
String representing the object's type. Objects of the same type share the same value.Equal to
refund
.
-
getReason
public java.lang.String getReason()
Reason for the refund, either user-provided (duplicate
,fraudulent
, orrequested_by_customer
) or generated by Stripe internally (expired_uncaptured_charge
).
-
getReceiptNumber
public java.lang.String getReceiptNumber()
This is the transaction number that appears on email receipts sent for this refund.
-
getStatus
public java.lang.String getStatus()
Status of the refund. For credit card refunds, this can bepending
,succeeded
, orfailed
. For other types of refunds, it can bepending
,succeeded
,failed
, orcanceled
. Refer to our refunds documentation for more details.
-
setAmount
public void setAmount(java.lang.Long amount)
Amount, in %s.
-
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. (Available on non-card refunds only)
-
setFailureReason
public void setFailureReason(java.lang.String failureReason)
If the refund failed, the reason for refund failure if known. Possible values arelost_or_stolen_card
,expired_or_canceled_card
, orunknown
.
-
setId
public void setId(java.lang.String id)
Unique identifier for the object.
-
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
refund
.
-
setReason
public void setReason(java.lang.String reason)
Reason for the refund, either user-provided (duplicate
,fraudulent
, orrequested_by_customer
) or generated by Stripe internally (expired_uncaptured_charge
).
-
setReceiptNumber
public void setReceiptNumber(java.lang.String receiptNumber)
This is the transaction number that appears on email receipts sent for this refund.
-
setStatus
public void setStatus(java.lang.String status)
Status of the refund. For credit card refunds, this can bepending
,succeeded
, orfailed
. For other types of refunds, it can bepending
,succeeded
,failed
, orcanceled
. Refer to our refunds documentation for more 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<Refund>
-
-