Package com.stripe.model.tax
Class Transaction
java.lang.Object
com.stripe.model.StripeObject
com.stripe.net.ApiResource
com.stripe.model.tax.Transaction
- All Implemented Interfaces:
HasId
,StripeActiveObject
,StripeObjectInterface
A Tax Transaction records the tax collected from or refunded to your customer.
Related guide: Calculate tax in your custom payment flow
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
static class
The value of the tax ID.static class
static class
State/province as an ISO 3166-2 subdivision code, without country prefix.Nested 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
-
Method Summary
Modifier and TypeMethodDescriptionprotected boolean
static Transaction
Creates a Tax Transaction from a calculation, if that calculation hasn’t expired.static Transaction
createFromCalculation
(TransactionCreateFromCalculationParams params, RequestOptions options) Creates a Tax Transaction from a calculation, if that calculation hasn’t expired.static Transaction
createFromCalculation
(Map<String, Object> params) Creates a Tax Transaction from a calculation, if that calculation hasn’t expired.static Transaction
createFromCalculation
(Map<String, Object> params, RequestOptions options) Creates a Tax Transaction from a calculation, if that calculation hasn’t expired.static Transaction
Partially or fully reverses a previously createdTransaction
.static Transaction
createReversal
(TransactionCreateReversalParams params, RequestOptions options) Partially or fully reverses a previously createdTransaction
.static Transaction
createReversal
(Map<String, Object> params) Partially or fully reverses a previously createdTransaction
.static Transaction
createReversal
(Map<String, Object> params, RequestOptions options) Partially or fully reverses a previously createdTransaction
.boolean
Time at which the object was created.Three-letter ISO currency code, in lowercase.The ID of an existing Customer used for the resource.getId()
Unique identifier for the transaction.The tax collected or refunded, by line item.Has the valuetrue
if the object exists in live mode or the valuefalse
if the object exists in test mode.Set of key-value pairs that you can attach to an object.String representing the object's type.The Unix timestamp representing when the tax liability is assumed or reduced.A custom unique identifier, such as 'myOrder_123'.Iftype=reversal
, contains information about what was reversed.The details of the ship from location, such as the address.The shipping cost details for the transaction.Timestamp of date at which the tax rules and rates in effect applies for the calculation.getType()
Ifreversal
, this transaction reverses an earlier transaction.int
hashCode()
Retrieves the line items of a committed standalone transaction as a collection.Retrieves the line items of a committed standalone transaction as a collection.listLineItems
(TransactionListLineItemsParams params, RequestOptions options) Retrieves the line items of a committed standalone transaction as a collection.listLineItems
(Map<String, Object> params) Retrieves the line items of a committed standalone transaction as a collection.listLineItems
(Map<String, Object> params, RequestOptions options) Retrieves the line items of a committed standalone transaction as a collection.static Transaction
Retrieves a TaxTransaction
object.static Transaction
retrieve
(String transaction, RequestOptions options) Retrieves a TaxTransaction
object.static Transaction
retrieve
(String transaction, TransactionRetrieveParams params, RequestOptions options) Retrieves a TaxTransaction
object.static Transaction
Retrieves a TaxTransaction
object.void
setCreated
(Long created) Time at which the object was created.void
setCurrency
(String currency) Three-letter ISO currency code, in lowercase.void
setCustomer
(String customer) The ID of an existing Customer used for the resource.void
setCustomerDetails
(Transaction.CustomerDetails customerDetails) void
Unique identifier for the transaction.void
setLineItems
(TransactionLineItemCollection lineItems) The tax collected or refunded, by line item.void
setLivemode
(Boolean livemode) Has the valuetrue
if the object exists in live mode or the valuefalse
if the object exists in test mode.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
setPostedAt
(Long postedAt) The Unix timestamp representing when the tax liability is assumed or reduced.void
setReference
(String reference) A custom unique identifier, such as 'myOrder_123'.void
setResponseGetter
(StripeResponseGetter responseGetter) The tax type, such asvat
orsales_tax
.void
setReversal
(Transaction.Reversal reversal) Iftype=reversal
, contains information about what was reversed.void
setShipFromDetails
(Transaction.ShipFromDetails shipFromDetails) The details of the ship from location, such as the address.void
setShippingCost
(Transaction.ShippingCost shippingCost) The shipping cost details for the transaction.void
setTaxDate
(Long taxDate) Timestamp of date at which the tax rules and rates in effect applies for the calculation.void
Ifreversal
, this transaction reverses an earlier transaction.Methods inherited from class com.stripe.net.ApiResource
checkNullTypedParams, getGlobalResponseGetter, getResponseGetter, setExpandableFieldId, setStripeResponseGetter, urlEncode, urlEncodeId
Methods inherited from class com.stripe.model.StripeObject
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
-
createFromCalculation
Creates a Tax Transaction from a calculation, if that calculation hasn’t expired. Calculations expire after 90 days.- Throws:
StripeException
-
createFromCalculation
public static Transaction createFromCalculation(Map<String, Object> params, RequestOptions options) throws StripeExceptionCreates a Tax Transaction from a calculation, if that calculation hasn’t expired. Calculations expire after 90 days.- Throws:
StripeException
-
createFromCalculation
public static Transaction createFromCalculation(TransactionCreateFromCalculationParams params) throws StripeException Creates a Tax Transaction from a calculation, if that calculation hasn’t expired. Calculations expire after 90 days.- Throws:
StripeException
-
createFromCalculation
public static Transaction createFromCalculation(TransactionCreateFromCalculationParams params, RequestOptions options) throws StripeException Creates a Tax Transaction from a calculation, if that calculation hasn’t expired. Calculations expire after 90 days.- Throws:
StripeException
-
createReversal
Partially or fully reverses a previously createdTransaction
.- Throws:
StripeException
-
createReversal
public static Transaction createReversal(Map<String, Object> params, RequestOptions options) throws StripeExceptionPartially or fully reverses a previously createdTransaction
.- Throws:
StripeException
-
createReversal
public static Transaction createReversal(TransactionCreateReversalParams params) throws StripeException Partially or fully reverses a previously createdTransaction
.- Throws:
StripeException
-
createReversal
public static Transaction createReversal(TransactionCreateReversalParams params, RequestOptions options) throws StripeException Partially or fully reverses a previously createdTransaction
.- Throws:
StripeException
-
listLineItems
Retrieves the line items of a committed standalone transaction as a collection.- Throws:
StripeException
-
listLineItems
public TransactionLineItemCollection listLineItems(Map<String, Object> params) throws StripeExceptionRetrieves the line items of a committed standalone transaction as a collection.- Throws:
StripeException
-
listLineItems
public TransactionLineItemCollection listLineItems(Map<String, Object> params, RequestOptions options) throws StripeExceptionRetrieves the line items of a committed standalone transaction as a collection.- Throws:
StripeException
-
listLineItems
public TransactionLineItemCollection listLineItems(TransactionListLineItemsParams params) throws StripeException Retrieves the line items of a committed standalone transaction as a collection.- Throws:
StripeException
-
listLineItems
public TransactionLineItemCollection listLineItems(TransactionListLineItemsParams params, RequestOptions options) throws StripeException Retrieves the line items of a committed standalone transaction as a collection.- Throws:
StripeException
-
retrieve
Retrieves a TaxTransaction
object.- Throws:
StripeException
-
retrieve
public static Transaction retrieve(String transaction, RequestOptions options) throws StripeException Retrieves a TaxTransaction
object.- Throws:
StripeException
-
retrieve
public static Transaction retrieve(String transaction, Map<String, Object> params, RequestOptions options) throws StripeExceptionRetrieves a TaxTransaction
object.- Throws:
StripeException
-
retrieve
public static Transaction retrieve(String transaction, TransactionRetrieveParams params, RequestOptions options) throws StripeException Retrieves a TaxTransaction
object.- Throws:
StripeException
-
setResponseGetter
The tax type, such asvat
orsales_tax
.One of
amusement_tax
,communications_tax
,gst
,hst
,igst
,jct
,lease_tax
,pst
,qst
,rst
,sales_tax
, orvat
.- Specified by:
setResponseGetter
in interfaceStripeActiveObject
- Overrides:
setResponseGetter
in classApiResource
- Parameters:
responseGetter
- theStripeResponseGetter
instance to use for making further requests.
-
getCreated
Time at which the object was created. Measured in seconds since the Unix epoch. -
getCurrency
Three-letter ISO currency code, in lowercase. Must be a supported currency. -
getCustomer
The ID of an existing Customer used for the resource. -
getCustomerDetails
-
getLineItems
The tax collected or refunded, by line item. -
getLivemode
Has the valuetrue
if the object exists in live mode or the valuefalse
if the object exists in test mode. -
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. -
getObject
String representing the object's type. Objects of the same type share the same value.Equal to
tax.transaction
. -
getPostedAt
The Unix timestamp representing when the tax liability is assumed or reduced. -
getReference
A custom unique identifier, such as 'myOrder_123'. -
getReversal
Iftype=reversal
, contains information about what was reversed. -
getShipFromDetails
The details of the ship from location, such as the address. -
getShippingCost
The shipping cost details for the transaction. -
getTaxDate
Timestamp of date at which the tax rules and rates in effect applies for the calculation. -
getType
Ifreversal
, this transaction reverses an earlier transaction.One of
reversal
, ortransaction
. -
setCreated
Time at which the object was created. Measured in seconds since the Unix epoch. -
setCurrency
Three-letter ISO currency code, in lowercase. Must be a supported currency. -
setCustomer
The ID of an existing Customer used for the resource. -
setCustomerDetails
-
setId
Unique identifier for the transaction. -
setLineItems
The tax collected or refunded, by line item. -
setLivemode
Has the valuetrue
if the object exists in live mode or the valuefalse
if the object exists in test mode. -
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
tax.transaction
. -
setPostedAt
The Unix timestamp representing when the tax liability is assumed or reduced. -
setReference
A custom unique identifier, such as 'myOrder_123'. -
setReversal
Iftype=reversal
, contains information about what was reversed. -
setShipFromDetails
The details of the ship from location, such as the address. -
setShippingCost
The shipping cost details for the transaction. -
setTaxDate
Timestamp of date at which the tax rules and rates in effect applies for the calculation. -
setType
Ifreversal
, this transaction reverses an earlier transaction.One of
reversal
, ortransaction
. -
equals
-
canEqual
-
hashCode
public int hashCode() -
getId
Unique identifier for the transaction.
-