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 boolean
canEqual(java.lang.Object other)
static TaxRate
create(TaxRateCreateParams params)
Creates a new tax rate.static TaxRate
create(TaxRateCreateParams params, RequestOptions options)
Creates a new tax rate.static TaxRate
create(java.util.Map<java.lang.String,java.lang.Object> params)
Creates a new tax rate.static TaxRate
create(java.util.Map<java.lang.String,java.lang.Object> params, RequestOptions options)
Creates a new tax rate.boolean
equals(java.lang.Object o)
java.lang.Boolean
getActive()
Defaults totrue
.java.lang.String
getCountry()
Two-letter country code (ISO 3166-1 alpha-2).java.lang.Long
getCreated()
Time at which the object was created.java.lang.String
getDescription()
An arbitrary string attached to the tax rate for your internal use only.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.java.lang.String
getId()
Unique identifier for the object.java.lang.Boolean
getInclusive()
This specifies if the tax rate is inclusive or exclusive.java.lang.String
getJurisdiction()
The jurisdiction for the tax rate.java.lang.Boolean
getLivemode()
Has the valuetrue
if the object exists in live mode or the valuefalse
if 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.String
getObject()
String representing the object's type.java.math.BigDecimal
getPercentage()
This represents the tax rate percent out of 100.java.lang.String
getState()
ISO 3166-2 subdivision code, without country prefix.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
list(java.util.Map<java.lang.String,java.lang.Object> params)
Returns a list of your tax rates.static TaxRateCollection
list(java.util.Map<java.lang.String,java.lang.Object> params, RequestOptions options)
Returns a list of your tax rates.static TaxRate
retrieve(java.lang.String taxRate)
Retrieves a tax rate with the given ID.static TaxRate
retrieve(java.lang.String taxRate, RequestOptions options)
Retrieves a tax rate with the given ID.static TaxRate
retrieve(java.lang.String taxRate, TaxRateRetrieveParams params, RequestOptions options)
Retrieves a tax rate with the given ID.static TaxRate
retrieve(java.lang.String taxRate, java.util.Map<java.lang.String,java.lang.Object> params, RequestOptions options)
Retrieves a tax rate with the given ID.void
setActive(java.lang.Boolean active)
Defaults totrue
.void
setCountry(java.lang.String country)
Two-letter country code (ISO 3166-1 alpha-2).void
setCreated(java.lang.Long created)
Time at which the object was created.void
setDescription(java.lang.String description)
An arbitrary string attached to the tax rate for your internal use only.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.void
setId(java.lang.String id)
Unique identifier for the object.void
setInclusive(java.lang.Boolean inclusive)
This specifies if the tax rate is inclusive or exclusive.void
setJurisdiction(java.lang.String jurisdiction)
The jurisdiction for the tax rate.void
setLivemode(java.lang.Boolean livemode)
Has the valuetrue
if the object exists in live mode or the valuefalse
if the object exists in test mode.void
setMetadata(java.util.Map<java.lang.String,java.lang.String> metadata)
Set of key-value pairs that you can attach to an object.void
setObject(java.lang.String object)
String representing the object's type.void
setPercentage(java.math.BigDecimal percentage)
This represents the tax rate percent out of 100.void
setState(java.lang.String state)
ISO 3166-2 subdivision code, without country prefix.TaxRate
update(TaxRateUpdateParams params)
Updates an existing tax rate.TaxRate
update(TaxRateUpdateParams params, RequestOptions options)
Updates an existing tax rate.TaxRate
update(java.util.Map<java.lang.String,java.lang.Object> params)
Updates an existing tax rate.TaxRate
update(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:
update
in 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:
update
in 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 valuetrue
if the object exists in live mode or the valuefalse
if 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.
-
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 valuetrue
if the object exists in live mode or the valuefalse
if 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.
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equals
in classjava.lang.Object
-
canEqual
protected boolean canEqual(java.lang.Object other)
-
hashCode
public int hashCode()
- Overrides:
hashCode
in 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:
getMetadata
in interfaceMetadataStore<TaxRate>
-
-