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
Nested ClassesModifier and TypeClassDescriptionstatic classFor more details about CustomerDetails, please refer to the API Reference.static classFor more details about Reversal, please refer to the API Reference.static classFor more details about ShipFromDetails, please refer to the API Reference.static classFor more details about ShippingCost, please refer to the API Reference.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_GSONFields inherited from class com.stripe.model.StripeObject
PRETTY_PRINT_GSON -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected booleanstatic TransactionCreates a Tax Transaction from a calculation, if that calculation hasn’t expired.static TransactioncreateFromCalculation(TransactionCreateFromCalculationParams params, RequestOptions options) Creates a Tax Transaction from a calculation, if that calculation hasn’t expired.static TransactioncreateFromCalculation(Map<String, Object> params) Creates a Tax Transaction from a calculation, if that calculation hasn’t expired.static TransactioncreateFromCalculation(Map<String, Object> params, RequestOptions options) Creates a Tax Transaction from a calculation, if that calculation hasn’t expired.static TransactionPartially or fully reverses a previously createdTransaction.static TransactioncreateReversal(TransactionCreateReversalParams params, RequestOptions options) Partially or fully reverses a previously createdTransaction.static TransactioncreateReversal(Map<String, Object> params) Partially or fully reverses a previously createdTransaction.static TransactioncreateReversal(Map<String, Object> params, RequestOptions options) Partially or fully reverses a previously createdTransaction.booleanTime 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 valuetrueif the object exists in live mode or the valuefalseif 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.inthashCode()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 TransactionRetrieves a TaxTransactionobject.static Transactionretrieve(String transaction, RequestOptions options) Retrieves a TaxTransactionobject.static Transactionretrieve(String transaction, TransactionRetrieveParams params, RequestOptions options) Retrieves a TaxTransactionobject.static TransactionRetrieves a TaxTransactionobject.voidsetCreated(Long created) Time at which the object was created.voidsetCurrency(String currency) Three-letter ISO currency code, in lowercase.voidsetCustomer(String customer) The ID of an existing Customer used for the resource.voidsetCustomerDetails(Transaction.CustomerDetails customerDetails) voidUnique identifier for the transaction.voidsetLineItems(TransactionLineItemCollection lineItems) The tax collected or refunded, by line item.voidsetLivemode(Boolean livemode) Has the valuetrueif the object exists in live mode or the valuefalseif the object exists in test mode.voidsetMetadata(Map<String, String> metadata) Set of key-value pairs that you can attach to an object.voidString representing the object's type.voidsetPostedAt(Long postedAt) The Unix timestamp representing when the tax liability is assumed or reduced.voidsetReference(String reference) A custom unique identifier, such as 'myOrder_123'.voidsetResponseGetter(StripeResponseGetter responseGetter) The tax type, such asvatorsales_tax.voidsetReversal(Transaction.Reversal reversal) Iftype=reversal, contains information about what was reversed.voidsetShipFromDetails(Transaction.ShipFromDetails shipFromDetails) The details of the ship from location, such as the address.voidsetShippingCost(Transaction.ShippingCost shippingCost) The shipping cost details for the transaction.voidsetTaxDate(Long taxDate) Timestamp of date at which the tax rules and rates in effect applies for the calculation.voidIfreversal, this transaction reverses an earlier transaction.Methods inherited from class com.stripe.net.ApiResource
checkNullTypedParams, getGlobalResponseGetter, getResponseGetter, setExpandableFieldId, setGlobalResponseGetter, urlEncode, urlEncodeIdMethods inherited from class com.stripe.model.StripeObject
deserializeStripeObject, deserializeStripeObject, deserializeStripeObject, deserializeStripeObject, equals, getLastResponse, getRawJsonObject, setLastResponse, toJson, toStringMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods 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 TaxTransactionobject.- Throws:
StripeException
-
retrieve
public static Transaction retrieve(String transaction, RequestOptions options) throws StripeException Retrieves a TaxTransactionobject.- Throws:
StripeException
-
retrieve
public static Transaction retrieve(String transaction, Map<String, Object> params, RequestOptions options) throws StripeExceptionRetrieves a TaxTransactionobject.- Throws:
StripeException
-
retrieve
public static Transaction retrieve(String transaction, TransactionRetrieveParams params, RequestOptions options) throws StripeException Retrieves a TaxTransactionobject.- Throws:
StripeException
-
setResponseGetter
The tax type, such asvatorsales_tax.One of
amusement_tax,communications_tax,gst,hst,igst,jct,lease_tax,pst,qst,retail_delivery_fee,rst,sales_tax,service_tax, orvat.- Specified by:
setResponseGetterin interfaceStripeActiveObject- Overrides:
setResponseGetterin classApiResource- Parameters:
responseGetter- theStripeResponseGetterinstance 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 valuetrueif the object exists in live mode or the valuefalseif 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 valuetrueif the object exists in live mode or the valuefalseif 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.
-