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 booleancanEqual(java.lang.Object other)static Refundcreate(RefundCreateParams params)Create a refund.static Refundcreate(RefundCreateParams params, RequestOptions options)Create a refund.static Refundcreate(java.util.Map<java.lang.String,java.lang.Object> params)Create a refund.static Refundcreate(java.util.Map<java.lang.String,java.lang.Object> params, RequestOptions options)Create a refund.booleanequals(java.lang.Object o)java.lang.LonggetAmount()Amount, in %s.java.lang.StringgetBalanceTransaction()Get ID of expandablebalanceTransactionobject.BalanceTransactiongetBalanceTransactionObject()Get expandedbalanceTransaction.java.lang.StringgetCharge()Get ID of expandablechargeobject.ChargegetChargeObject()Get expandedcharge.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.StringgetFailureBalanceTransaction()Get ID of expandablefailureBalanceTransactionobject.BalanceTransactiongetFailureBalanceTransactionObject()Get expandedfailureBalanceTransaction.java.lang.StringgetFailureReason()If the refund failed, the reason for refund failure if known.java.lang.StringgetId()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.StringgetObject()String representing the object's type.java.lang.StringgetPaymentIntent()Get ID of expandablepaymentIntentobject.PaymentIntentgetPaymentIntentObject()Get expandedpaymentIntent.java.lang.StringgetReason()Reason for the refund, either user-provided (duplicate,fraudulent, orrequested_by_customer) or generated by Stripe internally (expired_uncaptured_charge).java.lang.StringgetReceiptNumber()This is the transaction number that appears on email receipts sent for this refund.java.lang.StringgetSourceTransferReversal()Get ID of expandablesourceTransferReversalobject.TransferReversalgetSourceTransferReversalObject()Get expandedsourceTransferReversal.java.lang.StringgetStatus()Status of the refund.java.lang.StringgetTransferReversal()Get ID of expandabletransferReversalobject.TransferReversalgetTransferReversalObject()Get expandedtransferReversal.inthashCode()static RefundCollectionlist(RefundListParams params)Returns a list of all refunds you’ve previously created.static RefundCollectionlist(RefundListParams params, RequestOptions options)Returns a list of all refunds you’ve previously created.static RefundCollectionlist(java.util.Map<java.lang.String,java.lang.Object> params)Returns a list of all refunds you’ve previously created.static RefundCollectionlist(java.util.Map<java.lang.String,java.lang.Object> params, RequestOptions options)Returns a list of all refunds you’ve previously created.static Refundretrieve(java.lang.String refund)Retrieves the details of an existing refund.static Refundretrieve(java.lang.String refund, RequestOptions options)Retrieves the details of an existing refund.static Refundretrieve(java.lang.String refund, RefundRetrieveParams params, RequestOptions options)Retrieves the details of an existing refund.static Refundretrieve(java.lang.String refund, java.util.Map<java.lang.String,java.lang.Object> params, RequestOptions options)Retrieves the details of an existing refund.voidsetAmount(java.lang.Long amount)Amount, in %s.voidsetBalanceTransaction(java.lang.String id)voidsetBalanceTransactionObject(BalanceTransaction expandableObject)voidsetCharge(java.lang.String id)voidsetChargeObject(Charge 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.voidsetFailureBalanceTransaction(java.lang.String id)voidsetFailureBalanceTransactionObject(BalanceTransaction expandableObject)voidsetFailureReason(java.lang.String failureReason)If the refund failed, the reason for refund failure if known.voidsetId(java.lang.String id)Unique identifier for the object.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.voidsetPaymentIntent(java.lang.String id)voidsetPaymentIntentObject(PaymentIntent expandableObject)voidsetReason(java.lang.String reason)Reason for the refund, either user-provided (duplicate,fraudulent, orrequested_by_customer) or generated by Stripe internally (expired_uncaptured_charge).voidsetReceiptNumber(java.lang.String receiptNumber)This is the transaction number that appears on email receipts sent for this refund.voidsetSourceTransferReversal(java.lang.String id)voidsetSourceTransferReversalObject(TransferReversal expandableObject)voidsetStatus(java.lang.String status)Status of the refund.voidsetTransferReversal(java.lang.String id)voidsetTransferReversalObject(TransferReversal expandableObject)Refundupdate(RefundUpdateParams params)Updates the specified refund by setting the values of the parameters passed.Refundupdate(RefundUpdateParams params, RequestOptions options)Updates the specified refund by setting the values of the parameters passed.Refundupdate(java.util.Map<java.lang.String,java.lang.Object> params)Updates the specified refund by setting the values of the parameters passed.Refundupdate(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, 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)
-
getCharge
public java.lang.String getCharge()
Get ID of expandablechargeobject.
-
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 expandablefailureBalanceTransactionobject.
-
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 expandablepaymentIntentobject.
-
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 expandablesourceTransferReversalobject.
-
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 expandabletransferReversalobject.
-
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
metadataas an argument.- Specified by:
updatein 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
metadataas an argument.- Specified by:
updatein 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
metadataas 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
metadataas 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:
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<Refund>
-
-