Package com.stripe.model.giftcards
Class Transaction
java.lang.Object
com.stripe.model.StripeObject
com.stripe.net.ApiResource
com.stripe.model.giftcards.Transaction
- All Implemented Interfaces:
HasId
,MetadataStore<Transaction>
,StripeActiveObject
,StripeObjectInterface
A gift card transaction represents a single transaction on a referenced gift card. A transaction
is in one of three states,
confirmed
, held
or canceled
. A
confirmed
transaction is one that has added/deducted funds. A held
transaction has
created a temporary hold on funds, which can then be cancelled or confirmed. A held
transaction can be confirmed into a confirmed
transaction, or canceled into a
canceled
transaction. A canceled
transaction has no effect on a gift card's balance.-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from class com.stripe.net.ApiResource
ApiResource.RequestMethod
-
Field Summary
Fields inherited from class com.stripe.net.ApiResource
CHARSET, GSON, INTERNAL_GSON
Fields inherited from class com.stripe.model.StripeObject
PRETTY_PRINT_GSON
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncancel()
Cancel a gift card transaction.cancel
(RequestOptions options) Cancel a gift card transaction.cancel
(TransactionCancelParams params) Cancel a gift card transaction.cancel
(TransactionCancelParams params, RequestOptions options) Cancel a gift card transaction.Cancel a gift card transaction.cancel
(Map<String, Object> params, RequestOptions options) Cancel a gift card transaction.protected boolean
confirm()
Confirm a gift card transaction.confirm
(RequestOptions options) Confirm a gift card transaction.confirm
(TransactionConfirmParams params) Confirm a gift card transaction.confirm
(TransactionConfirmParams params, RequestOptions options) Confirm a gift card transaction.Confirm a gift card transaction.confirm
(Map<String, Object> params, RequestOptions options) Confirm a gift card transaction.static Transaction
create
(TransactionCreateParams params) Create a gift card transaction.static Transaction
create
(TransactionCreateParams params, RequestOptions options) Create a gift card transaction.static Transaction
Create a gift card transaction.static Transaction
create
(Map<String, Object> params, RequestOptions options) Create a gift card transaction.boolean
The amount of this transaction.Time at which the transaction was confirmed.Time at which the object was created.The related Stripe objects that created this gift card transaction.Three-letter ISO currency code, in lowercase.An arbitrary string attached to the object.The gift card that this transaction occurred on.getId()
Unique identifier for the object.Set of key-value pairs that you can attach to an object.String representing the object's type.Status of this transaction, one ofheld
,confirmed
, orcanceled
.A string that identifies this transaction as part of a group.int
hashCode()
static TransactionCollection
list
(TransactionListParams params) List gift card transactions for a gift card.static TransactionCollection
list
(TransactionListParams params, RequestOptions options) List gift card transactions for a gift card.static TransactionCollection
List gift card transactions for a gift card.static TransactionCollection
list
(Map<String, Object> params, RequestOptions options) List gift card transactions for a gift card.static Transaction
Retrieves the gift card transaction.static Transaction
retrieve
(String id, RequestOptions options) Retrieves the gift card transaction.static Transaction
retrieve
(String id, TransactionRetrieveParams params, RequestOptions options) Retrieves the gift card transaction.static Transaction
Retrieves the gift card transaction.void
The amount of this transaction.void
setConfirmedAt
(Long confirmedAt) Time at which the transaction was confirmed.void
setCreated
(Long created) Time at which the object was created.void
setCreatedBy
(Transaction.CreatedBy createdBy) The related Stripe objects that created this gift card transaction.void
setCurrency
(String currency) Three-letter ISO currency code, in lowercase.void
setDescription
(String description) An arbitrary string attached to the object.void
setGiftCard
(String giftCard) The gift card that this transaction occurred on.void
Unique identifier for the object.void
setMetadata
(Map<String, String> metadata) Set of key-value pairs that you can attach to an object.void
String representing the object's type.void
setResponseGetter
(StripeResponseGetter responseGetter) The PaymentIntent that created this object.void
Status of this transaction, one ofheld
,confirmed
, orcanceled
.void
setTransferGroup
(String transferGroup) A string that identifies this transaction as part of a group.update
(TransactionUpdateParams params) Update a gift card transaction.update
(TransactionUpdateParams params, RequestOptions options) Update a gift card transaction.Update a gift card transaction.update
(Map<String, Object> params, RequestOptions options) Update a gift card transaction.Methods inherited from class com.stripe.net.ApiResource
checkNullTypedParams, getGlobalResponseGetter, getResponseGetter, rawRequest, setExpandableFieldId, setStripeResponseGetter, urlEncode, urlEncodeId
Methods inherited from class com.stripe.model.StripeObject
deserializeStripeObject, deserializeStripeObject, deserializeStripeObject, deserializeStripeObject, 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.StripeActiveObject
trySetResponseGetter
-
Constructor Details
-
Transaction
public Transaction()
-
-
Method Details
-
cancel
Cancel a gift card transaction.- Throws:
StripeException
-
cancel
Cancel a gift card transaction.- Throws:
StripeException
-
cancel
Cancel a gift card transaction.- Throws:
StripeException
-
cancel
Cancel a gift card transaction.- Throws:
StripeException
-
cancel
Cancel a gift card transaction.- Throws:
StripeException
-
cancel
public Transaction cancel(TransactionCancelParams params, RequestOptions options) throws StripeException Cancel a gift card transaction.- Throws:
StripeException
-
confirm
Confirm a gift card transaction.- Throws:
StripeException
-
confirm
Confirm a gift card transaction.- Throws:
StripeException
-
confirm
Confirm a gift card transaction.- Throws:
StripeException
-
confirm
public Transaction confirm(Map<String, Object> params, RequestOptions options) throws StripeExceptionConfirm a gift card transaction.- Throws:
StripeException
-
confirm
Confirm a gift card transaction.- Throws:
StripeException
-
confirm
public Transaction confirm(TransactionConfirmParams params, RequestOptions options) throws StripeException Confirm a gift card transaction.- Throws:
StripeException
-
create
Create a gift card transaction.- Throws:
StripeException
-
create
public static Transaction create(Map<String, Object> params, RequestOptions options) throws StripeExceptionCreate a gift card transaction.- Throws:
StripeException
-
create
Create a gift card transaction.- Throws:
StripeException
-
create
public static Transaction create(TransactionCreateParams params, RequestOptions options) throws StripeException Create a gift card transaction.- Throws:
StripeException
-
list
List gift card transactions for a gift card.- Throws:
StripeException
-
list
public static TransactionCollection list(Map<String, Object> params, RequestOptions options) throws StripeExceptionList gift card transactions for a gift card.- Throws:
StripeException
-
list
List gift card transactions for a gift card.- Throws:
StripeException
-
list
public static TransactionCollection list(TransactionListParams params, RequestOptions options) throws StripeException List gift card transactions for a gift card.- Throws:
StripeException
-
retrieve
Retrieves the gift card transaction.- Throws:
StripeException
-
retrieve
Retrieves the gift card transaction.- Throws:
StripeException
-
retrieve
public static Transaction retrieve(String id, Map<String, Object> params, RequestOptions options) throws StripeExceptionRetrieves the gift card transaction.- Throws:
StripeException
-
retrieve
public static Transaction retrieve(String id, TransactionRetrieveParams params, RequestOptions options) throws StripeException Retrieves the gift card transaction.- Throws:
StripeException
-
update
Update a gift card transaction.- Specified by:
update
in interfaceMetadataStore<Transaction>
- Throws:
StripeException
-
update
Update a gift card transaction.- Specified by:
update
in interfaceMetadataStore<Transaction>
- Throws:
StripeException
-
update
Update a gift card transaction.- Throws:
StripeException
-
update
public Transaction update(TransactionUpdateParams params, RequestOptions options) throws StripeException Update a gift card transaction.- Throws:
StripeException
-
setResponseGetter
The PaymentIntent that created this object.- Specified by:
setResponseGetter
in interfaceStripeActiveObject
- Overrides:
setResponseGetter
in classApiResource
- Parameters:
responseGetter
- theStripeResponseGetter
instance to use for making further requests.
-
getAmount
The amount of this transaction. A positive value indicates that funds were added to the gift card. A negative value indicates that funds were removed from the gift card. -
getConfirmedAt
Time at which the transaction was confirmed. Measured in seconds since the Unix epoch. -
getCreated
Time at which the object was created. Measured in seconds since the Unix epoch. -
getCreatedBy
The related Stripe objects that created this gift card transaction. -
getCurrency
Three-letter ISO currency code, in lowercase. Must be a supported currency. -
getDescription
An arbitrary string attached to the object. Often useful for displaying to users. -
getGiftCard
The gift card that this transaction occurred on. -
getObject
String representing the object's type. Objects of the same type share the same value.Equal to
gift_cards.transaction
. -
getStatus
Status of this transaction, one ofheld
,confirmed
, orcanceled
. -
getTransferGroup
A string that identifies this transaction as part of a group. See the Connect documentation for details. -
setAmount
The amount of this transaction. A positive value indicates that funds were added to the gift card. A negative value indicates that funds were removed from the gift card. -
setConfirmedAt
Time at which the transaction was confirmed. Measured in seconds since the Unix epoch. -
setCreated
Time at which the object was created. Measured in seconds since the Unix epoch. -
setCreatedBy
The related Stripe objects that created this gift card transaction. -
setCurrency
Three-letter ISO currency code, in lowercase. Must be a supported currency. -
setDescription
An arbitrary string attached to the object. Often useful for displaying to users. -
setGiftCard
The gift card that this transaction occurred on. -
setId
Unique identifier for the object. -
setMetadata
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
String representing the object's type. Objects of the same type share the same value.Equal to
gift_cards.transaction
. -
setStatus
Status of this transaction, one ofheld
,confirmed
, orcanceled
. -
setTransferGroup
A string that identifies this transaction as part of a group. See the Connect documentation for details. -
equals
-
canEqual
-
hashCode
public int hashCode() -
getId
Unique identifier for the object. -
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<Transaction>
-