Simplify Node.js API Docs

API Docs for:
Show:

InvoiceItem Class

Defined in: simplify.js:1420

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.invoiceitem.METHOD_NAME(params, function(error, data){
                            if(error){
                                // handle the error
                            }
                        
                            // Awesome...no error, handle the data
                        });
                        

Constructor

InvoiceItem

(
  • appKeys
)

Defined in simplify.js:1420

Parameters:

  • appKeys Object

    Object containing the public & private API keys

Item Index

Methods

create

(
  • params
  • callback
)

Defined in simplify.js:1446

Function to create a InvoiceItem object.

Parameters:

  • params Object

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

    Valid parameters include:

    • amount : Amount of the invoice item in the smallest unit of your currency. Example: 100 = $1.00 (REQUIRED)
    • description : Individual items of an invoice [max length: 1024]
    • invoice : The ID of the invoice this item belongs to.
    • product : Product ID this item relates to.
    • quantity : Quantity of the item. This total amount of the invoice item is the amount * quantity. [min value: 1, max value: 999999, default: 1]
    • reference : User defined reference field. [max length: 255]
    • tax : The tax ID of the tax charge in the invoice item.

    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:1478

Function to delete a InvoiceItem object.

Parameters:

  • A Object

    string ID of the InvoiceItem 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:1495

Function to retrieve a InvoiceItem object from the API.

Parameters:

  • id String

    The ID of the InvoiceItem 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.

update

(
  • params
  • callback
)

Defined in simplify.js:1512

Function to update a InvoiceItem object.

Parameters:

  • params Object

    A map of parameters on which to update the InvoiceItem object.

    Valid parameters include:

    • id : A string ID of the InvoiceItem object to update
    • amount : Amount of the invoice item in the smallest unit of your currency. Example: 100 = $1.00 [min value: 1]
    • description : Individual items of an invoice
    • quantity : Quantity of the item. This total amount of the invoice item is the amount * quantity. [min value: 1, max value: 999999]
    • reference : User defined reference field.
    • tax : The tax ID of the tax charge in the invoice item.

    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.