Invoice

Invoice

An Invoice is the representation of an electronic invoice, that can be received or sent, by a business or an individual and has been uploaded to the fiscal institution website.

Constructor

new Invoice()

Source:

Extends

Methods

(async) delete(id) → {boolean}

Delete specific record.

Overrides:
Source:
Parameters:
Name Type Description
id string

UUID4 representation of the resource Id.

Returns:
Type:
boolean

When the record is successfuly deleted returns true, otherwise false.

(async) detail(id) → {object}

Get specific record details.

Overrides:
Source:
Parameters:
Name Type Description
id string

UUID4 representation of the resource Id.

Throws:
Returns:
Type:
object

(async) list(params) → {array}

Get a list of resources.

Overrides:
Source:
Parameters:
Name Type Description
params Object

Receives two parameters.

Name Type Attributes Default Description
limit number <optional>
100

Maximum number of results.

filters Object <optional>
{}

Filters to get custom results.

Throws:
Returns:
Type:
array

List of results.

(async) resume(session, token, link) → {object}

Resume a "pending" session that requires an OTP token. Use this function to resume sessions that returned HTTP 428 status code.

Overrides:
Source:
Parameters:
Name Type Description
session string

UUID4 representation of a "pending" session.

token string

OTP token.

link string

UUID4 representation of the link being used.

Throws:
Returns:
Type:
object

Response.

(async) retrieve(link, dateFrom, dateTo, type, options) → {object}

Retrieve invoices information from a specific fiscal link. You can ask for a maximum of 1 year of invoices per request, if you need more you need to do multiple requests.

Source:
Parameters:
Name Type Description
link string

UUID4 representation of a link Id.

dateFrom string

Required date from, format is YYYY-MM-DD.

dateTo string

Required date to, format is YYYY-MM-DD.

type string

Required type, it can be 'INFLOW' or 'OUTFLOW'.

options object

Optional parameters (token, saveData, attachXML)

Throws:
Returns:
Type:
object

Response

(async) retrieve(link, dateFrom, dateTo, type, options) → {object}

Retrieve invoices information from a specific fiscal link. You can ask for a maximum of 1 year of invoices per request, if you need more you need to do multiple requests.

Source:
Parameters:
Name Type Description
link string

UUID4 representation of a link Id.

dateFrom string

Required date from, format is YYYY-MM-DD.

dateTo string

Required date to, format is YYYY-MM-DD.

type string

Required type, it can be 'INFLOW' or 'OUTFLOW'.

options object

Optional parameters (token, saveData, attachXML)

Throws:
Returns:
Type:
object

Response

Invoice

An Invoice is the representation of an electronic invoice, that can be received or sent, by a business or an individual and has been uploaded to the fiscal institution website.

Constructor

new Invoice()

Source:

Extends

Methods

(async) delete(id) → {boolean}

Delete specific record.

Overrides:
Source:
Parameters:
Name Type Description
id string

UUID4 representation of the resource Id.

Returns:
Type:
boolean

When the record is successfuly deleted returns true, otherwise false.

(async) detail(id) → {object}

Get specific record details.

Overrides:
Source:
Parameters:
Name Type Description
id string

UUID4 representation of the resource Id.

Throws:
Returns:
Type:
object

(async) list(params) → {array}

Get a list of resources.

Overrides:
Source:
Parameters:
Name Type Description
params Object

Receives two parameters.

Name Type Attributes Default Description
limit number <optional>
100

Maximum number of results.

filters Object <optional>
{}

Filters to get custom results.

Throws:
Returns:
Type:
array

List of results.

(async) resume(session, token, link) → {object}

Resume a "pending" session that requires an OTP token. Use this function to resume sessions that returned HTTP 428 status code.

Overrides:
Source:
Parameters:
Name Type Description
session string

UUID4 representation of a "pending" session.

token string

OTP token.

link string

UUID4 representation of the link being used.

Throws:
Returns:
Type:
object

Response.

(async) retrieve(link, dateFrom, dateTo, type, options) → {object}

Retrieve invoices information from a specific fiscal link. You can ask for a maximum of 1 year of invoices per request, if you need more you need to do multiple requests.

Source:
Parameters:
Name Type Description
link string

UUID4 representation of a link Id.

dateFrom string

Required date from, format is YYYY-MM-DD.

dateTo string

Required date to, format is YYYY-MM-DD.

type string

Required type, it can be 'INFLOW' or 'OUTFLOW'.

options object

Optional parameters (token, saveData, attachXML)

Throws:
Returns:
Type:
object

Response

(async) retrieve(link, dateFrom, dateTo, type, options) → {object}

Retrieve invoices information from a specific fiscal link. You can ask for a maximum of 1 year of invoices per request, if you need more you need to do multiple requests.

Source:
Parameters:
Name Type Description
link string

UUID4 representation of a link Id.

dateFrom string

Required date from, format is YYYY-MM-DD.

dateTo string

Required date to, format is YYYY-MM-DD.

type string

Required type, it can be 'INFLOW' or 'OUTFLOW'.

options object

Optional parameters (token, saveData, attachXML)

Throws:
Returns:
Type:
object

Response