mojatax@1.0.13
This adaptor exports the following from common:
- cursor()
- dataPath()
- dataValue()
- dateFns
- each()
- field()
- fields()
- fn()
- lastReferenceValue()
- merge()
- sourceValue()
Functions
post
post(path, data, options, [callback]) ⇒ Operation
Make a POST request to any Mojatax endpoint.
Param | Type | Description |
---|---|---|
path | string | Path to resource |
data | object | Object which will be attached to the request body |
options | MojataxRequestOptions | Optional request options |
[callback] | function | Optional callback to handle the response |
This operation writes the following keys to state:
State Key | Description |
---|---|
data | The response body (as JSON) |
response | The HTTP response from the Mojatax server (excluding the body) |
references | An array of all previous data objects used in the Job |
Example: Make a POST request to create an invoice
post("CreateInvoice", {
invoice_id: 'PID092',
customerId: '102',
items: [],
});
request
request(method, path, data, options, [callback]) ⇒ Operation
Make a general HTTP request against the Mojatax server.
Param | Type | Description |
---|---|---|
method | string | HTTP method to use |
path | string | Path to resource |
data | object | Object which will be attached to the POST body |
options | MojataxRequestOptions | Optional request options |
[callback] | function | Optional callback to handle the response |
This operation writes the following keys to state:
State Key | Description |
---|---|
data | The response body (as JSON) |
response | The HTTP response from the Mojatax server (excluding the body) |
references | An array of all previous data objects used in the Job |
Example: Make a POST request to create an invoice
request("POST", "/client/CreateInvoice", {
invoice_id: 'PID092',
customerId: '102',
items: [],
});