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>,StripeObjectInterface
public class TaxRate extends ApiResource implements HasId, MetadataStore<TaxRate>
-
-
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 TaxRate()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected booleancanEqual(java.lang.Object other)static TaxRatecreate(TaxRateCreateParams params)Creates a new tax rate.static TaxRatecreate(TaxRateCreateParams params, RequestOptions options)Creates a new tax rate.static TaxRatecreate(java.util.Map<java.lang.String,java.lang.Object> params)Creates a new tax rate.static TaxRatecreate(java.util.Map<java.lang.String,java.lang.Object> params, RequestOptions options)Creates a new tax rate.booleanequals(java.lang.Object o)java.lang.BooleangetActive()Defaults totrue.java.lang.StringgetCountry()Two-letter country code (ISO 3166-1 alpha-2).java.lang.LonggetCreated()Time at which the object was created.java.lang.StringgetDescription()An arbitrary string attached to the tax rate for your internal use only.java.lang.StringgetDisplayName()The display name of the tax rates as it will appear to your customer on their receipt email, PDF, and the hosted invoice page.java.lang.StringgetId()Unique identifier for the object.java.lang.BooleangetInclusive()This specifies if the tax rate is inclusive or exclusive.java.lang.StringgetJurisdiction()The jurisdiction for the tax rate.java.lang.BooleangetLivemode()Has the valuetrueif the object exists in live mode or the valuefalseif the object exists in test mode.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.math.BigDecimalgetPercentage()This represents the tax rate percent out of 100.java.lang.StringgetState()ISO 3166-2 subdivision code, without country prefix.java.lang.StringgetTaxType()The high-level tax type, such asvatorsales_tax.inthashCode()static TaxRateCollectionlist(TaxRateListParams params)Returns a list of your tax rates.static TaxRateCollectionlist(TaxRateListParams params, RequestOptions options)Returns a list of your tax rates.static TaxRateCollectionlist(java.util.Map<java.lang.String,java.lang.Object> params)Returns a list of your tax rates.static TaxRateCollectionlist(java.util.Map<java.lang.String,java.lang.Object> params, RequestOptions options)Returns a list of your tax rates.static TaxRateretrieve(java.lang.String taxRate)Retrieves a tax rate with the given ID.static TaxRateretrieve(java.lang.String taxRate, RequestOptions options)Retrieves a tax rate with the given ID.static TaxRateretrieve(java.lang.String taxRate, TaxRateRetrieveParams params, RequestOptions options)Retrieves a tax rate with the given ID.static TaxRateretrieve(java.lang.String taxRate, java.util.Map<java.lang.String,java.lang.Object> params, RequestOptions options)Retrieves a tax rate with the given ID.voidsetActive(java.lang.Boolean active)Defaults totrue.voidsetCountry(java.lang.String country)Two-letter country code (ISO 3166-1 alpha-2).voidsetCreated(java.lang.Long created)Time at which the object was created.voidsetDescription(java.lang.String description)An arbitrary string attached to the tax rate for your internal use only.voidsetDisplayName(java.lang.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.voidsetId(java.lang.String id)Unique identifier for the object.voidsetInclusive(java.lang.Boolean inclusive)This specifies if the tax rate is inclusive or exclusive.voidsetJurisdiction(java.lang.String jurisdiction)The jurisdiction for the tax rate.voidsetLivemode(java.lang.Boolean livemode)Has the valuetrueif the object exists in live mode or the valuefalseif the object exists in test mode.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.voidsetPercentage(java.math.BigDecimal percentage)This represents the tax rate percent out of 100.voidsetState(java.lang.String state)ISO 3166-2 subdivision code, without country prefix.voidsetTaxType(java.lang.String taxType)The high-level tax type, such asvatorsales_tax.TaxRateupdate(TaxRateUpdateParams params)Updates an existing tax rate.TaxRateupdate(TaxRateUpdateParams params, RequestOptions options)Updates an existing tax rate.TaxRateupdate(java.util.Map<java.lang.String,java.lang.Object> params)Updates an existing tax rate.TaxRateupdate(java.util.Map<java.lang.String,java.lang.Object> params, RequestOptions options)Updates an existing tax rate.-
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
-
-
-
-
Method Detail
-
list
public static TaxRateCollection list(java.util.Map<java.lang.String,java.lang.Object> params) 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
-
list
public static TaxRateCollection list(java.util.Map<java.lang.String,java.lang.Object> 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
-
list
public static TaxRateCollection list(TaxRateListParams params) 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
-
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
public static TaxRate retrieve(java.lang.String taxRate) throws StripeException
Retrieves a tax rate with the given ID.- Throws:
StripeException
-
retrieve
public static TaxRate retrieve(java.lang.String taxRate, RequestOptions options) throws StripeException
Retrieves a tax rate with the given ID.- Throws:
StripeException
-
retrieve
public static TaxRate retrieve(java.lang.String taxRate, java.util.Map<java.lang.String,java.lang.Object> params, RequestOptions options) throws StripeException
Retrieves a tax rate with the given ID.- Throws:
StripeException
-
retrieve
public static TaxRate retrieve(java.lang.String taxRate, TaxRateRetrieveParams params, RequestOptions options) throws StripeException
Retrieves a tax rate with the given ID.- Throws:
StripeException
-
create
public static TaxRate create(java.util.Map<java.lang.String,java.lang.Object> params) throws StripeException
Creates a new tax rate.- Throws:
StripeException
-
create
public static TaxRate create(java.util.Map<java.lang.String,java.lang.Object> params, RequestOptions options) throws StripeException
Creates a new tax rate.- Throws:
StripeException
-
create
public static TaxRate create(TaxRateCreateParams params) throws StripeException
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
-
update
public TaxRate update(java.util.Map<java.lang.String,java.lang.Object> params) throws StripeException
Updates an existing tax rate.- Specified by:
updatein interfaceMetadataStore<TaxRate>- Throws:
StripeException
-
update
public TaxRate update(java.util.Map<java.lang.String,java.lang.Object> params, RequestOptions options) throws StripeException
Updates an existing tax rate.- Specified by:
updatein interfaceMetadataStore<TaxRate>- Throws:
StripeException
-
update
public TaxRate update(TaxRateUpdateParams params) throws StripeException
Updates an existing tax rate.- Throws:
StripeException
-
update
public TaxRate update(TaxRateUpdateParams params, RequestOptions options) throws StripeException
Updates an existing tax rate.- Throws:
StripeException
-
getActive
public java.lang.Boolean 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
public java.lang.String getCountry()
Two-letter country code (ISO 3166-1 alpha-2).
-
getCreated
public java.lang.Long getCreated()
Time at which the object was created. Measured in seconds since the Unix epoch.
-
getDescription
public java.lang.String getDescription()
An arbitrary string attached to the tax rate for your internal use only. It will not be visible to your customers.
-
getDisplayName
public java.lang.String 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.
-
getInclusive
public java.lang.Boolean getInclusive()
This specifies if the tax rate is inclusive or exclusive.
-
getJurisdiction
public java.lang.String 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.
-
getLivemode
public java.lang.Boolean getLivemode()
Has the valuetrueif the object exists in live mode or the valuefalseif the object exists in test mode.
-
getObject
public java.lang.String getObject()
String representing the object's type. Objects of the same type share the same value.Equal to
tax_rate.
-
getPercentage
public java.math.BigDecimal getPercentage()
This represents the tax rate percent out of 100.
-
getState
public java.lang.String getState()
ISO 3166-2 subdivision code, without country prefix. For example, "NY" for New York, United States.
-
getTaxType
public java.lang.String getTaxType()
The high-level tax type, such asvatorsales_tax.One of
gst,hst,pst,qst,sales_tax, orvat.
-
setActive
public void setActive(java.lang.Boolean active)
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
public void setCountry(java.lang.String country)
Two-letter country code (ISO 3166-1 alpha-2).
-
setCreated
public void setCreated(java.lang.Long created)
Time at which the object was created. Measured in seconds since the Unix epoch.
-
setDescription
public void setDescription(java.lang.String description)
An arbitrary string attached to the tax rate for your internal use only. It will not be visible to your customers.
-
setDisplayName
public void setDisplayName(java.lang.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.
-
setId
public void setId(java.lang.String id)
Unique identifier for the object.
-
setInclusive
public void setInclusive(java.lang.Boolean inclusive)
This specifies if the tax rate is inclusive or exclusive.
-
setJurisdiction
public void setJurisdiction(java.lang.String jurisdiction)
The jurisdiction for the tax rate. You can use this label field for tax reporting purposes. It also appears on your customer’s invoice.
-
setLivemode
public void setLivemode(java.lang.Boolean livemode)
Has the valuetrueif the object exists in live mode or the valuefalseif the object exists in test mode.
-
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
tax_rate.
-
setPercentage
public void setPercentage(java.math.BigDecimal percentage)
This represents the tax rate percent out of 100.
-
setState
public void setState(java.lang.String state)
ISO 3166-2 subdivision code, without country prefix. For example, "NY" for New York, United States.
-
setTaxType
public void setTaxType(java.lang.String taxType)
The high-level tax type, such asvatorsales_tax.One of
gst,hst,pst,qst,sales_tax, orvat.
-
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<TaxRate>
-
-