Simplify Node.js API Docs

API Docs for:
Show:

Tax Class

Defined in: simplify.js:2296

This is a Simplify domain object. In order to get access to a domain object, a client needs to be created. The client is then used to invoke the different methods e.g.

var client = Simplify.getClient({
                            publicKey: 'YOUR_PUBLIC_API_KEY',
                            privateKey: 'YOUR_PRIVATE_API_KEY'
                        });
                        
                        client.tax.METHOD_NAME(params, function(error, data){
                            if(error){
                                // handle the error
                            }
                        
                            // Awesome...no error, handle the data
                        });
                        

Constructor

Tax

(
  • appKeys
)

Defined in simplify.js:2296

Parameters:

  • appKeys Object

    Object containing the public & private API keys

Item Index

Methods

create

(
  • params
  • callback
)

Defined in simplify.js:2322

Function to create a Tax object.

Parameters:

  • params Object

    A map of parameters in which to create the Tax from.

    Valid parameters include:

    • label : The label of the tax object. [max length: 255] (REQUIRED)
    • rate : The tax rate. Decimal value up three decimal places. e.g 12.501. [max length: 6] (REQUIRED)

    NOTE: Any parameters with a sub-parameter (e.g. param.subParam) need to be nested when passed as an argument in e.g.

    {
                                                        param: {
                                                        subParam1: 'value', 
                                                        subParam2: 'value'
                                                    }
                                                }
  • callback Function

    A function to handle success/error responses from the API.
    The function takes 2 parameters, the first is an error object. This is null if no error occurs. The second parameter is the response data. This is null if an error occurs.

delete

(
  • A
  • callback
)

Defined in simplify.js:2349

Function to delete a Tax object.

Parameters:

  • A Object

    string ID of the Tax to delete.

  • callback Function

    A function to handle success/error responses from the API.
    The function takes 2 parameters, the first is an error object. This is null if no error occurs. The second parameter is the response data. This is null if an error occurs.

find

(
  • id
  • callback
)

Defined in simplify.js:2395

Function to retrieve a Tax object from the API.

Parameters:

  • id String

    The ID of the Tax to retrieve

  • callback Function

    A function to handle success/error responses from the API.
    The function takes 2 parameters, the first is an error object. This is null if no error occurs. The second parameter is the response data. This is null if an error occurs.

list

(
  • params
  • callback
)

Defined in simplify.js:2366

Function to retrieve a list Tax objects.

Parameters:

  • params Object

    A map of parameters in which to define the Tax list from.

    Valid parameters include:

    • filter :
      filter.idFilter by the Id of the tax
      filter.labelFilter by the label(name) of the tax
    • max : Allows up to a max of 50 list items to return. [min value: 0, max value: 50, default: 20]
    • offset : Used in paging of the list. This is the start offset of the page. [min value: 0, default: 0]
    • sorting : Allows for ascending or descending sorting of the list. The value maps properties to the sort direction (either 'asc' for ascending or 'desc' for descending).
      Sortable properties are:
      • id
      • label

    NOTE: Any parameters with a sub-parameter (e.g. param.subParam) need to be nested when passed as an argument in e.g.

    {
                                                        param: {
                                                        subParam1: 'value', 
                                                        subParam2: 'value'
                                                    }
                                                }
  • callback Function

    A function to handle success/error responses from the API.
    The function takes 2 parameters, the first is an error object. This is null if no error occurs. The second parameter is the response data. This is null if an error occurs.