Package com.stripe.model
Class TaxRate
java.lang.Object
com.stripe.model.StripeObject
com.stripe.net.ApiResource
com.stripe.model.TaxRate
- All Implemented Interfaces:
HasId
,MetadataStore<TaxRate>
,StripeActiveObject
,StripeObjectInterface
Tax rates can be applied to invoices, subscriptions and Checkout
Sessions to collect tax.
Related guide: Tax rates
-
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, INTERNAL_GSON
Fields inherited from class com.stripe.model.StripeObject
PRETTY_PRINT_GSON
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected boolean
static TaxRate
create
(TaxRateCreateParams params) Creates a new tax rate.static TaxRate
create
(TaxRateCreateParams params, RequestOptions options) Creates a new tax rate.static TaxRate
Creates a new tax rate.static TaxRate
create
(Map<String, Object> params, RequestOptions options) Creates a new tax rate.boolean
Defaults totrue
.Two-letter country code (ISO 3166-1 alpha-2).Time at which the object was created.An arbitrary string attached to the tax rate for your internal use only.The display name of the tax rates as it will appear to your customer on their receipt email, PDF, and the hosted invoice page.Actual/effective tax rate percentage out of 100.getId()
Unique identifier for the object.This specifies if the tax rate is inclusive or exclusive.The jurisdiction for the tax rate.The level of the jurisdiction that imposes this tax rate.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.Tax rate percentage out of 100.getState()
ISO 3166-2 subdivision code, without country prefix.The high-level tax type, such asvat
orsales_tax
.int
hashCode()
static TaxRateCollection
list
(TaxRateListParams params) Returns a list of your tax rates.static TaxRateCollection
list
(TaxRateListParams params, RequestOptions options) Returns a list of your tax rates.static TaxRateCollection
Returns a list of your tax rates.static TaxRateCollection
list
(Map<String, Object> params, RequestOptions options) Returns a list of your tax rates.static TaxRate
Retrieves a tax rate with the given ID.static TaxRate
retrieve
(String taxRate, RequestOptions options) Retrieves a tax rate with the given ID.static TaxRate
retrieve
(String taxRate, TaxRateRetrieveParams params, RequestOptions options) Retrieves a tax rate with the given ID.static TaxRate
Retrieves a tax rate with the given ID.void
Defaults totrue
.void
setCountry
(String country) Two-letter country code (ISO 3166-1 alpha-2).void
setCreated
(Long created) Time at which the object was created.void
setDescription
(String description) An arbitrary string attached to the tax rate for your internal use only.void
setDisplayName
(String displayName) The display name of the tax rates as it will appear to your customer on their receipt email, PDF, and the hosted invoice page.void
setEffectivePercentage
(BigDecimal effectivePercentage) Actual/effective tax rate percentage out of 100.void
Unique identifier for the object.void
setInclusive
(Boolean inclusive) This specifies if the tax rate is inclusive or exclusive.void
setJurisdiction
(String jurisdiction) The jurisdiction for the tax rate.void
setJurisdictionLevel
(String jurisdictionLevel) The level of the jurisdiction that imposes this tax rate.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
setPercentage
(BigDecimal percentage) Tax rate percentage out of 100.void
ISO 3166-2 subdivision code, without country prefix.void
setTaxType
(String taxType) The high-level tax type, such asvat
orsales_tax
.update
(TaxRateUpdateParams params) Updates an existing tax rate.update
(TaxRateUpdateParams params, RequestOptions options) Updates an existing tax rate.Updates an existing tax rate.update
(Map<String, Object> params, RequestOptions options) Updates an existing tax rate.Methods inherited from class com.stripe.net.ApiResource
checkNullTypedParams, getGlobalResponseGetter, getResponseGetter, setExpandableFieldId, setResponseGetter, 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
-
TaxRate
public TaxRate()
-
-
Method Details
-
create
Creates a new tax rate.- Throws:
StripeException
-
create
public static TaxRate create(Map<String, Object> params, RequestOptions options) throws StripeExceptionCreates a new tax rate.- Throws:
StripeException
-
create
Creates a new tax rate.- Throws:
StripeException
-
create
public static TaxRate create(TaxRateCreateParams params, RequestOptions options) throws StripeException Creates a new tax rate.- Throws:
StripeException
-
list
Returns a list of your tax rates. Tax rates are returned sorted by creation date, with the most recently created tax rates appearing first.- Throws:
StripeException
-
list
public static TaxRateCollection list(Map<String, Object> params, RequestOptions options) throws StripeExceptionReturns a list of your tax rates. Tax rates are returned sorted by creation date, with the most recently created tax rates appearing first.- Throws:
StripeException
-
list
Returns a list of your tax rates. Tax rates are returned sorted by creation date, with the most recently created tax rates appearing first.- Throws:
StripeException
-
list
public static TaxRateCollection list(TaxRateListParams params, RequestOptions options) throws StripeException Returns a list of your tax rates. Tax rates are returned sorted by creation date, with the most recently created tax rates appearing first.- Throws:
StripeException
-
retrieve
Retrieves a tax rate with the given ID.- Throws:
StripeException
-
retrieve
Retrieves a tax rate with the given ID.- Throws:
StripeException
-
retrieve
public static TaxRate retrieve(String taxRate, Map<String, Object> params, RequestOptions options) throws StripeExceptionRetrieves a tax rate with the given ID.- Throws:
StripeException
-
retrieve
public static TaxRate retrieve(String taxRate, TaxRateRetrieveParams params, RequestOptions options) throws StripeException Retrieves a tax rate with the given ID.- Throws:
StripeException
-
update
Updates an existing tax rate.- Specified by:
update
in interfaceMetadataStore<TaxRate>
- Throws:
StripeException
-
update
Updates an existing tax rate.- Specified by:
update
in interfaceMetadataStore<TaxRate>
- Throws:
StripeException
-
update
Updates an existing tax rate.- Throws:
StripeException
-
update
Updates an existing tax rate.- Throws:
StripeException
-
getActive
Defaults totrue
. When set tofalse
, this tax rate cannot be used with new applications or Checkout Sessions, but will still work for subscriptions and invoices that already have it set. -
getCountry
Two-letter country code (ISO 3166-1 alpha-2). -
getCreated
Time at which the object was created. Measured in seconds since the Unix epoch. -
getDescription
An arbitrary string attached to the tax rate for your internal use only. It will not be visible to your customers. -
getDisplayName
The display name of the tax rates as it will appear to your customer on their receipt email, PDF, and the hosted invoice page. -
getEffectivePercentage
Actual/effective tax rate percentage out of 100. For tax calculations with automatic_tax[enabled]=true, this percentage reflects the rate actually used to calculate tax based on the product's taxability and whether the user is registered to collect taxes in the corresponding jurisdiction. -
getInclusive
This specifies if the tax rate is inclusive or exclusive. -
getJurisdiction
The jurisdiction for the tax rate. You can use this label field for tax reporting purposes. It also appears on your customer’s invoice. -
getJurisdictionLevel
The level of the jurisdiction that imposes this tax rate. Will benull
for manually defined tax rates.One of
city
,country
,county
,district
,multiple
, orstate
. -
getLivemode
Has the valuetrue
if the object exists in live mode or the valuefalse
if the object exists in test mode. -
getObject
String representing the object's type. Objects of the same type share the same value.Equal to
tax_rate
. -
getPercentage
Tax rate percentage out of 100. For tax calculations with automatic_tax[enabled]=true, this percentage includes the statutory tax rate of non-taxable jurisdictions. -
getState
ISO 3166-2 subdivision code, without country prefix. For example, "NY" for New York, United States. -
getTaxType
The high-level tax type, such asvat
orsales_tax
.One of
amusement_tax
,communications_tax
,gst
,hst
,igst
,jct
,lease_tax
,pst
,qst
,rst
,sales_tax
, orvat
. -
setActive
Defaults totrue
. When set tofalse
, this tax rate cannot be used with new applications or Checkout Sessions, but will still work for subscriptions and invoices that already have it set. -
setCountry
Two-letter country code (ISO 3166-1 alpha-2). -
setCreated
Time at which the object was created. Measured in seconds since the Unix epoch. -
setDescription
An arbitrary string attached to the tax rate for your internal use only. It will not be visible to your customers. -
setDisplayName
The display name of the tax rates as it will appear to your customer on their receipt email, PDF, and the hosted invoice page. -
setEffectivePercentage
Actual/effective tax rate percentage out of 100. For tax calculations with automatic_tax[enabled]=true, this percentage reflects the rate actually used to calculate tax based on the product's taxability and whether the user is registered to collect taxes in the corresponding jurisdiction. -
setId
Unique identifier for the object. -
setInclusive
This specifies if the tax rate is inclusive or exclusive. -
setJurisdiction
The jurisdiction for the tax rate. You can use this label field for tax reporting purposes. It also appears on your customer’s invoice. -
setJurisdictionLevel
The level of the jurisdiction that imposes this tax rate. Will benull
for manually defined tax rates.One of
city
,country
,county
,district
,multiple
, orstate
. -
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_rate
. -
setPercentage
Tax rate percentage out of 100. For tax calculations with automatic_tax[enabled]=true, this percentage includes the statutory tax rate of non-taxable jurisdictions. -
setState
ISO 3166-2 subdivision code, without country prefix. For example, "NY" for New York, United States. -
setTaxType
The high-level tax type, such asvat
orsales_tax
.One of
amusement_tax
,communications_tax
,gst
,hst
,igst
,jct
,lease_tax
,pst
,qst
,rst
,sales_tax
, orvat
. -
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<TaxRate>
-