Returns a single Tax Rate by its ID. See api docs.
Required token: Bearer token
Success response schema: Success schema
Failure response schema: Error schema
Example:
const response = await client.taxRates.show({
bearer_token: '7381273269536713689562374856'
id: '1'
})
Creates a new Tax Rate and returns its attributes. See api docs.
Required token: Bearer token
Success response schema: Success schema
Failure response schema: Error schema
Example:
const response = await client.taxRates.create({
bearer_token: '7381273269536713689562374856',
tax_rate: {
amount: 0.05,
zone_id: '2',
tax_category_id: '1',
included_in_price: true,
name: 'California',
show_rate_in_label: false,
calculator_attributes: {
type: 'Spree::Calculator::FlatRate',
preferences: {
amount: 0,
currency: 'USD'
}
}
}
})
Update selected Tax Rate. See api docs.
Required token: Bearer token
Success response schema: Success schema
Failure response schema: Error schema
Example:
const response = await client.taxRates.update({
bearer_token: '7381273269536713689562374856',
id: '1',
tax_rate: {
amount: 0.05,
zone_id: '2',
tax_category_id: '1',
included_in_price: true,
name: 'California',
show_rate_in_label: false,
calculator_attributes: {
type: 'Spree::Calculator::FlatRate',
preferences: {
amount: 0,
currency: 'USD'
}
}
}
})
This endpoint removes the specified Tax Rate. See api docs.
Required token: Bearer token
Success response schema: Success schema
Failure response schema: Error schema
Example:
const response = await client.taxRates.remove({
bearer_token: '7381273269536713689562374856',
id: '1'
})
Protected
spreeOptional
tokens: ITokenOptional
params: anyOptional
responseParsing: ResponseParsingProtected
classifyProtected
processProtected
processProtected
spreeGenerated using TypeDoc
Returns a list Tax Rates. See api docs.
Required token: Bearer token
Success response schema: Success schema
Failure response schema: Error schema
Example: