commercetools.TaxCategoryRate
Explore with Pulumi AI
Tax rate for Tax Category.
See also Tax Rate API Documentation
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as commercetools from "@pulumi/commercetools";
const my_tax_category = new commercetools.TaxCategory("my-tax-category", {
    key: "my-tax-category",
    description: "Example category",
});
const standard_tax_category_DE = new commercetools.TaxCategoryRate("standard-tax-category-DE", {
    key: "standard-tax-category-DE",
    taxCategoryId: my_tax_category.taxCategoryId,
    amount: 0.19,
    includedInPrice: false,
    country: "DE",
    subRates: [{
        name: "example",
        amount: 0.19,
    }],
});
const standard_tax_category_NL = new commercetools.TaxCategoryRate("standard-tax-category-NL", {
    key: "standard-tax-category-NL",
    taxCategoryId: my_tax_category.taxCategoryId,
    amount: 0.21,
    includedInPrice: true,
    country: "NL",
});
import pulumi
import pulumi_commercetools as commercetools
my_tax_category = commercetools.TaxCategory("my-tax-category",
    key="my-tax-category",
    description="Example category")
standard_tax_category__de = commercetools.TaxCategoryRate("standard-tax-category-DE",
    key="standard-tax-category-DE",
    tax_category_id=my_tax_category.tax_category_id,
    amount=0.19,
    included_in_price=False,
    country="DE",
    sub_rates=[{
        "name": "example",
        "amount": 0.19,
    }])
standard_tax_category__nl = commercetools.TaxCategoryRate("standard-tax-category-NL",
    key="standard-tax-category-NL",
    tax_category_id=my_tax_category.tax_category_id,
    amount=0.21,
    included_in_price=True,
    country="NL")
package main
import (
	"github.com/pulumi/pulumi-terraform-provider/sdks/go/commercetools/commercetools"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := commercetools.NewTaxCategory(ctx, "my-tax-category", &commercetools.TaxCategoryArgs{
			Key:         pulumi.String("my-tax-category"),
			Description: pulumi.String("Example category"),
		})
		if err != nil {
			return err
		}
		_, err = commercetools.NewTaxCategoryRate(ctx, "standard-tax-category-DE", &commercetools.TaxCategoryRateArgs{
			Key:             pulumi.String("standard-tax-category-DE"),
			TaxCategoryId:   my_tax_category.TaxCategoryId,
			Amount:          pulumi.Float64(0.19),
			IncludedInPrice: pulumi.Bool(false),
			Country:         pulumi.String("DE"),
			SubRates: commercetools.TaxCategoryRateSubRateArray{
				&commercetools.TaxCategoryRateSubRateArgs{
					Name:   pulumi.String("example"),
					Amount: pulumi.Float64(0.19),
				},
			},
		})
		if err != nil {
			return err
		}
		_, err = commercetools.NewTaxCategoryRate(ctx, "standard-tax-category-NL", &commercetools.TaxCategoryRateArgs{
			Key:             pulumi.String("standard-tax-category-NL"),
			TaxCategoryId:   my_tax_category.TaxCategoryId,
			Amount:          pulumi.Float64(0.21),
			IncludedInPrice: pulumi.Bool(true),
			Country:         pulumi.String("NL"),
		})
		if err != nil {
			return err
		}
		return nil
	})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Commercetools = Pulumi.Commercetools;
return await Deployment.RunAsync(() => 
{
    var my_tax_category = new Commercetools.TaxCategory("my-tax-category", new()
    {
        Key = "my-tax-category",
        Description = "Example category",
    });
    var standard_tax_category_DE = new Commercetools.TaxCategoryRate("standard-tax-category-DE", new()
    {
        Key = "standard-tax-category-DE",
        TaxCategoryId = my_tax_category.TaxCategoryId,
        Amount = 0.19,
        IncludedInPrice = false,
        Country = "DE",
        SubRates = new[]
        {
            new Commercetools.Inputs.TaxCategoryRateSubRateArgs
            {
                Name = "example",
                Amount = 0.19,
            },
        },
    });
    var standard_tax_category_NL = new Commercetools.TaxCategoryRate("standard-tax-category-NL", new()
    {
        Key = "standard-tax-category-NL",
        TaxCategoryId = my_tax_category.TaxCategoryId,
        Amount = 0.21,
        IncludedInPrice = true,
        Country = "NL",
    });
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.commercetools.TaxCategory;
import com.pulumi.commercetools.TaxCategoryArgs;
import com.pulumi.commercetools.TaxCategoryRate;
import com.pulumi.commercetools.TaxCategoryRateArgs;
import com.pulumi.commercetools.inputs.TaxCategoryRateSubRateArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
    public static void main(String[] args) {
        Pulumi.run(App::stack);
    }
    public static void stack(Context ctx) {
        var my_tax_category = new TaxCategory("my-tax-category", TaxCategoryArgs.builder()
            .key("my-tax-category")
            .description("Example category")
            .build());
        var standard_tax_category_DE = new TaxCategoryRate("standard-tax-category-DE", TaxCategoryRateArgs.builder()
            .key("standard-tax-category-DE")
            .taxCategoryId(my_tax_category.taxCategoryId())
            .amount(0.19)
            .includedInPrice(false)
            .country("DE")
            .subRates(TaxCategoryRateSubRateArgs.builder()
                .name("example")
                .amount(0.19)
                .build())
            .build());
        var standard_tax_category_NL = new TaxCategoryRate("standard-tax-category-NL", TaxCategoryRateArgs.builder()
            .key("standard-tax-category-NL")
            .taxCategoryId(my_tax_category.taxCategoryId())
            .amount(0.21)
            .includedInPrice(true)
            .country("NL")
            .build());
    }
}
resources:
  my-tax-category:
    type: commercetools:TaxCategory
    properties:
      key: my-tax-category
      description: Example category
  standard-tax-category-DE:
    type: commercetools:TaxCategoryRate
    properties:
      key: standard-tax-category-DE
      taxCategoryId: ${["my-tax-category"].taxCategoryId}
      amount: 0.19
      includedInPrice: false
      country: DE
      subRates:
        - name: example
          amount: 0.19
  standard-tax-category-NL:
    type: commercetools:TaxCategoryRate
    properties:
      key: standard-tax-category-NL
      taxCategoryId: ${["my-tax-category"].taxCategoryId}
      amount: 0.21
      includedInPrice: true
      country: NL
Create TaxCategoryRate Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new TaxCategoryRate(name: string, args: TaxCategoryRateArgs, opts?: CustomResourceOptions);@overload
def TaxCategoryRate(resource_name: str,
                    args: TaxCategoryRateArgs,
                    opts: Optional[ResourceOptions] = None)
@overload
def TaxCategoryRate(resource_name: str,
                    opts: Optional[ResourceOptions] = None,
                    country: Optional[str] = None,
                    included_in_price: Optional[bool] = None,
                    tax_category_id: Optional[str] = None,
                    amount: Optional[float] = None,
                    key: Optional[str] = None,
                    name: Optional[str] = None,
                    state: Optional[str] = None,
                    sub_rates: Optional[Sequence[TaxCategoryRateSubRateArgs]] = None,
                    tax_category_rate_id: Optional[str] = None)func NewTaxCategoryRate(ctx *Context, name string, args TaxCategoryRateArgs, opts ...ResourceOption) (*TaxCategoryRate, error)public TaxCategoryRate(string name, TaxCategoryRateArgs args, CustomResourceOptions? opts = null)
public TaxCategoryRate(String name, TaxCategoryRateArgs args)
public TaxCategoryRate(String name, TaxCategoryRateArgs args, CustomResourceOptions options)
type: commercetools:TaxCategoryRate
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
Parameters
- name string
- The unique name of the resource.
- args TaxCategoryRateArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- args TaxCategoryRateArgs
- The arguments to resource properties.
- opts ResourceOptions
- Bag of options to control resource's behavior.
- ctx Context
- Context object for the current deployment.
- name string
- The unique name of the resource.
- args TaxCategoryRateArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args TaxCategoryRateArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args TaxCategoryRateArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
Constructor example
The following reference example uses placeholder values for all input properties.
var taxCategoryRateResource = new Commercetools.TaxCategoryRate("taxCategoryRateResource", new()
{
    Country = "string",
    IncludedInPrice = false,
    TaxCategoryId = "string",
    Amount = 0,
    Key = "string",
    Name = "string",
    State = "string",
    SubRates = new[]
    {
        new Commercetools.Inputs.TaxCategoryRateSubRateArgs
        {
            Amount = 0,
            Name = "string",
        },
    },
    TaxCategoryRateId = "string",
});
example, err := commercetools.NewTaxCategoryRate(ctx, "taxCategoryRateResource", &commercetools.TaxCategoryRateArgs{
Country: pulumi.String("string"),
IncludedInPrice: pulumi.Bool(false),
TaxCategoryId: pulumi.String("string"),
Amount: pulumi.Float64(0),
Key: pulumi.String("string"),
Name: pulumi.String("string"),
State: pulumi.String("string"),
SubRates: .TaxCategoryRateSubRateArray{
&.TaxCategoryRateSubRateArgs{
Amount: pulumi.Float64(0),
Name: pulumi.String("string"),
},
},
TaxCategoryRateId: pulumi.String("string"),
})
var taxCategoryRateResource = new TaxCategoryRate("taxCategoryRateResource", TaxCategoryRateArgs.builder()
    .country("string")
    .includedInPrice(false)
    .taxCategoryId("string")
    .amount(0)
    .key("string")
    .name("string")
    .state("string")
    .subRates(TaxCategoryRateSubRateArgs.builder()
        .amount(0)
        .name("string")
        .build())
    .taxCategoryRateId("string")
    .build());
tax_category_rate_resource = commercetools.TaxCategoryRate("taxCategoryRateResource",
    country="string",
    included_in_price=False,
    tax_category_id="string",
    amount=0,
    key="string",
    name="string",
    state="string",
    sub_rates=[{
        "amount": 0,
        "name": "string",
    }],
    tax_category_rate_id="string")
const taxCategoryRateResource = new commercetools.TaxCategoryRate("taxCategoryRateResource", {
    country: "string",
    includedInPrice: false,
    taxCategoryId: "string",
    amount: 0,
    key: "string",
    name: "string",
    state: "string",
    subRates: [{
        amount: 0,
        name: "string",
    }],
    taxCategoryRateId: "string",
});
type: commercetools:TaxCategoryRate
properties:
    amount: 0
    country: string
    includedInPrice: false
    key: string
    name: string
    state: string
    subRates:
        - amount: 0
          name: string
    taxCategoryId: string
    taxCategoryRateId: string
TaxCategoryRate Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.
The TaxCategoryRate resource accepts the following input properties:
- Country string
- A two-digit country code as per ISO 3166-1 alpha-2
- IncludedIn boolPrice 
- TaxCategory stringId 
- Amount double
- Number Percentage in the range of [0..1]. The sum of the amounts of all subRates, if there are any
- Key string
- User-specific unique identifier for the tax category rate
- Name string
- State string
- The state in the country
- SubRates List<TaxCategory Rate Sub Rate> 
- For countries (for example the US) where the total tax is a combination of multiple taxes (for example state and local taxes)
- TaxCategory stringRate Id 
- The ID of this resource.
- Country string
- A two-digit country code as per ISO 3166-1 alpha-2
- IncludedIn boolPrice 
- TaxCategory stringId 
- Amount float64
- Number Percentage in the range of [0..1]. The sum of the amounts of all subRates, if there are any
- Key string
- User-specific unique identifier for the tax category rate
- Name string
- State string
- The state in the country
- SubRates []TaxCategory Rate Sub Rate Args 
- For countries (for example the US) where the total tax is a combination of multiple taxes (for example state and local taxes)
- TaxCategory stringRate Id 
- The ID of this resource.
- country String
- A two-digit country code as per ISO 3166-1 alpha-2
- includedIn BooleanPrice 
- taxCategory StringId 
- amount Double
- Number Percentage in the range of [0..1]. The sum of the amounts of all subRates, if there are any
- key String
- User-specific unique identifier for the tax category rate
- name String
- state String
- The state in the country
- subRates List<TaxCategory Rate Sub Rate> 
- For countries (for example the US) where the total tax is a combination of multiple taxes (for example state and local taxes)
- taxCategory StringRate Id 
- The ID of this resource.
- country string
- A two-digit country code as per ISO 3166-1 alpha-2
- includedIn booleanPrice 
- taxCategory stringId 
- amount number
- Number Percentage in the range of [0..1]. The sum of the amounts of all subRates, if there are any
- key string
- User-specific unique identifier for the tax category rate
- name string
- state string
- The state in the country
- subRates TaxCategory Rate Sub Rate[] 
- For countries (for example the US) where the total tax is a combination of multiple taxes (for example state and local taxes)
- taxCategory stringRate Id 
- The ID of this resource.
- country str
- A two-digit country code as per ISO 3166-1 alpha-2
- included_in_ boolprice 
- tax_category_ strid 
- amount float
- Number Percentage in the range of [0..1]. The sum of the amounts of all subRates, if there are any
- key str
- User-specific unique identifier for the tax category rate
- name str
- state str
- The state in the country
- sub_rates Sequence[TaxCategory Rate Sub Rate Args] 
- For countries (for example the US) where the total tax is a combination of multiple taxes (for example state and local taxes)
- tax_category_ strrate_ id 
- The ID of this resource.
- country String
- A two-digit country code as per ISO 3166-1 alpha-2
- includedIn BooleanPrice 
- taxCategory StringId 
- amount Number
- Number Percentage in the range of [0..1]. The sum of the amounts of all subRates, if there are any
- key String
- User-specific unique identifier for the tax category rate
- name String
- state String
- The state in the country
- subRates List<Property Map>
- For countries (for example the US) where the total tax is a combination of multiple taxes (for example state and local taxes)
- taxCategory StringRate Id 
- The ID of this resource.
Outputs
All input properties are implicitly available as output properties. Additionally, the TaxCategoryRate resource produces the following output properties:
- Id string
- The provider-assigned unique ID for this managed resource.
- Id string
- The provider-assigned unique ID for this managed resource.
- id String
- The provider-assigned unique ID for this managed resource.
- id string
- The provider-assigned unique ID for this managed resource.
- id str
- The provider-assigned unique ID for this managed resource.
- id String
- The provider-assigned unique ID for this managed resource.
Look up Existing TaxCategoryRate Resource
Get an existing TaxCategoryRate resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.
public static get(name: string, id: Input<ID>, state?: TaxCategoryRateState, opts?: CustomResourceOptions): TaxCategoryRate@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        amount: Optional[float] = None,
        country: Optional[str] = None,
        included_in_price: Optional[bool] = None,
        key: Optional[str] = None,
        name: Optional[str] = None,
        state: Optional[str] = None,
        sub_rates: Optional[Sequence[TaxCategoryRateSubRateArgs]] = None,
        tax_category_id: Optional[str] = None,
        tax_category_rate_id: Optional[str] = None) -> TaxCategoryRatefunc GetTaxCategoryRate(ctx *Context, name string, id IDInput, state *TaxCategoryRateState, opts ...ResourceOption) (*TaxCategoryRate, error)public static TaxCategoryRate Get(string name, Input<string> id, TaxCategoryRateState? state, CustomResourceOptions? opts = null)public static TaxCategoryRate get(String name, Output<String> id, TaxCategoryRateState state, CustomResourceOptions options)resources:  _:    type: commercetools:TaxCategoryRate    get:      id: ${id}- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- resource_name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- Amount double
- Number Percentage in the range of [0..1]. The sum of the amounts of all subRates, if there are any
- Country string
- A two-digit country code as per ISO 3166-1 alpha-2
- IncludedIn boolPrice 
- Key string
- User-specific unique identifier for the tax category rate
- Name string
- State string
- The state in the country
- SubRates List<TaxCategory Rate Sub Rate> 
- For countries (for example the US) where the total tax is a combination of multiple taxes (for example state and local taxes)
- TaxCategory stringId 
- TaxCategory stringRate Id 
- The ID of this resource.
- Amount float64
- Number Percentage in the range of [0..1]. The sum of the amounts of all subRates, if there are any
- Country string
- A two-digit country code as per ISO 3166-1 alpha-2
- IncludedIn boolPrice 
- Key string
- User-specific unique identifier for the tax category rate
- Name string
- State string
- The state in the country
- SubRates []TaxCategory Rate Sub Rate Args 
- For countries (for example the US) where the total tax is a combination of multiple taxes (for example state and local taxes)
- TaxCategory stringId 
- TaxCategory stringRate Id 
- The ID of this resource.
- amount Double
- Number Percentage in the range of [0..1]. The sum of the amounts of all subRates, if there are any
- country String
- A two-digit country code as per ISO 3166-1 alpha-2
- includedIn BooleanPrice 
- key String
- User-specific unique identifier for the tax category rate
- name String
- state String
- The state in the country
- subRates List<TaxCategory Rate Sub Rate> 
- For countries (for example the US) where the total tax is a combination of multiple taxes (for example state and local taxes)
- taxCategory StringId 
- taxCategory StringRate Id 
- The ID of this resource.
- amount number
- Number Percentage in the range of [0..1]. The sum of the amounts of all subRates, if there are any
- country string
- A two-digit country code as per ISO 3166-1 alpha-2
- includedIn booleanPrice 
- key string
- User-specific unique identifier for the tax category rate
- name string
- state string
- The state in the country
- subRates TaxCategory Rate Sub Rate[] 
- For countries (for example the US) where the total tax is a combination of multiple taxes (for example state and local taxes)
- taxCategory stringId 
- taxCategory stringRate Id 
- The ID of this resource.
- amount float
- Number Percentage in the range of [0..1]. The sum of the amounts of all subRates, if there are any
- country str
- A two-digit country code as per ISO 3166-1 alpha-2
- included_in_ boolprice 
- key str
- User-specific unique identifier for the tax category rate
- name str
- state str
- The state in the country
- sub_rates Sequence[TaxCategory Rate Sub Rate Args] 
- For countries (for example the US) where the total tax is a combination of multiple taxes (for example state and local taxes)
- tax_category_ strid 
- tax_category_ strrate_ id 
- The ID of this resource.
- amount Number
- Number Percentage in the range of [0..1]. The sum of the amounts of all subRates, if there are any
- country String
- A two-digit country code as per ISO 3166-1 alpha-2
- includedIn BooleanPrice 
- key String
- User-specific unique identifier for the tax category rate
- name String
- state String
- The state in the country
- subRates List<Property Map>
- For countries (for example the US) where the total tax is a combination of multiple taxes (for example state and local taxes)
- taxCategory StringId 
- taxCategory StringRate Id 
- The ID of this resource.
Supporting Types
TaxCategoryRateSubRate, TaxCategoryRateSubRateArgs          
Package Details
- Repository
- commercetools labd/terraform-provider-commercetools
- License
- Notes
- This Pulumi package is based on the commercetoolsTerraform Provider.