Mundipagg API
The generated SDK relies on Node Package Manager (NPM) being available to resolve dependencies. If you don't already have NPM installed, please go ahead and follow instructions to install NPM from here. The SDK also requires Node to be installed. If Node isn't already installed, please install it from here
NPM is installed by default when Node is installed
To check if node and npm have been successfully installed, write the following commands in command prompt:
node --version
npm -version
Now use npm to resolve all dependencies by running the following command in the root directory (of the SDK folder):
npm install
This will install all dependencies in the node_modules
folder.
Once dependencies are resolved, you will need to move the folder MundiAPILib
in to your node_modules
folder.
The following section explains how to use the library in a new project.
Open an IDE/Text Editor for JavaScript like Sublime Text. The basic workflow presented here is also applicable if you prefer using a different editor or IDE.
Click on File
and select Open Folder
.
Select the folder of your SDK and click on Select Folder
to open it up in Sublime Text. The folder will become visible in the bar on the left.
Now right click on the folder name and select the New File
option to create a new test file. Save it as index.js
Now import the generated NodeJS library using the following lines of code:
var lib = require('lib');
Save changes.
To run the index.js
file, open up the command prompt and navigate to the Path where the SDK folder resides. Type the following command to run the file:
node index.js
These tests use Mocha framework for testing, coupled with Chai for assertions. These dependencies need to be installed for tests to run. Tests can be run in a number of ways:
- Navigate to the root directory of the SDK folder from command prompt.
- Type
mocha --recursive
to run all the tests.
- Navigate to the
../test/Controllers/
directory from command prompt. - Type
mocha *
to run all the tests.
- Navigate to the
../test/Controllers/
directory from command prompt. - Type
mocha MundiAPIController
to run all the tests in that controller file.
To increase mocha's default timeout, you can change the
TEST_TIMEOUT
parameter's value inTestBootstrap.js
.
In order to setup authentication in the API client, you need the following information.
Parameter | Description |
---|---|
serviceRefererName | TODO: add a description |
basicAuthUserName | The username to use with basic authentication |
basicAuthPassword | The password to use with basic authentication |
API client can be initialized as following:
const lib = require('lib');
// Configuration parameters and credentials
lib.Configuration.serviceRefererName = "serviceRefererName";
lib.Configuration.basicAuthUserName = "basicAuthUserName"; // The username to use with basic authentication
lib.Configuration.basicAuthPassword = "basicAuthPassword"; // The password to use with basic authentication
- SubscriptionsController
- OrdersController
- PlansController
- InvoicesController
- CustomersController
- ChargesController
- RecipientsController
- TokensController
- TransactionsController
- TransfersController
The singleton instance of the SubscriptionsController
class can be accessed from the API Client.
var controller = lib.SubscriptionsController;
Creates a discount
function createDiscount(subscriptionId, body, idempotencyKey, callback)
Parameter | Tags | Description |
---|---|---|
subscriptionId | Required |
Subscription id |
body | Required |
Request for creating a discount |
idempotencyKey | Optional |
TODO: Add a parameter description |
var subscriptionId = subscription_id;
var body = new SubscriptionsDiscountsRequest({"key":"value"});
var idempotencyKey = 'idempotency-key';
controller.createDiscount(subscriptionId, body, idempotencyKey, function(error, response, context) {
});
Error Code | Error Description |
---|---|
400 | Invalid request |
401 | Invalid API key |
404 | An informed resource was not found |
412 | Business validation error |
422 | Contract validation error |
500 | Internal server error |
Get Subscription Item
function getSubscriptionItem(subscriptionId, itemId, callback)
Parameter | Tags | Description |
---|---|---|
subscriptionId | Required |
Subscription Id |
itemId | Required |
Item id |
var subscriptionId = subscription_id;
var itemId = item_id;
controller.getSubscriptionItem(subscriptionId, itemId, function(error, response, context) {
});
Error Code | Error Description |
---|---|
400 | Invalid request |
401 | Invalid API key |
404 | An informed resource was not found |
412 | Business validation error |
422 | Contract validation error |
500 | Internal server error |
Updates a subscription item
function updateSubscriptionItem(subscriptionId, itemId, body, idempotencyKey, callback)
Parameter | Tags | Description |
---|---|---|
subscriptionId | Required |
Subscription Id |
itemId | Required |
Item id |
body | Required |
Request for updating a subscription item |
idempotencyKey | Optional |
TODO: Add a parameter description |
var subscriptionId = subscription_id;
var itemId = item_id;
var body = new SubscriptionsItemsRequest({"key":"value"});
var idempotencyKey = 'idempotency-key';
controller.updateSubscriptionItem(subscriptionId, itemId, body, idempotencyKey, function(error, response, context) {
});
Error Code | Error Description |
---|---|
400 | Invalid request |
401 | Invalid API key |
404 | An informed resource was not found |
412 | Business validation error |
422 | Contract validation error |
500 | Internal server error |
Deletes a usage
function deleteUsage(subscriptionId, itemId, usageId, idempotencyKey, callback)
Parameter | Tags | Description |
---|---|---|
subscriptionId | Required |
The subscription id |
itemId | Required |
The subscription item id |
usageId | Required |
The usage id |
idempotencyKey | Optional |
TODO: Add a parameter description |
var subscriptionId = subscription_id;
var itemId = item_id;
var usageId = usage_id;
var idempotencyKey = 'idempotency-key';
controller.deleteUsage(subscriptionId, itemId, usageId, idempotencyKey, function(error, response, context) {
});
Error Code | Error Description |
---|---|
400 | Invalid request |
401 | Invalid API key |
404 | An informed resource was not found |
412 | Business validation error |
422 | Contract validation error |
500 | Internal server error |
Cancels a subscription
function cancelSubscription(subscriptionId, idempotencyKey, body, callback)
Parameter | Tags | Description |
---|---|---|
subscriptionId | Required |
Subscription id |
idempotencyKey | Optional |
TODO: Add a parameter description |
body | Optional |
Request for cancelling a subscription |
var subscriptionId = subscription_id;
var idempotencyKey = 'idempotency-key';
var body = new SubscriptionsRequest({"key":"value"});
controller.cancelSubscription(subscriptionId, idempotencyKey, body, function(error, response, context) {
});
Error Code | Error Description |
---|---|
400 | Invalid request |
401 | Invalid API key |
404 | An informed resource was not found |
412 | Business validation error |
422 | Contract validation error |
500 | Internal server error |
Gets a subscription
function getSubscription(subscriptionId, callback)
Parameter | Tags | Description |
---|---|---|
subscriptionId | Required |
Subscription id |
var subscriptionId = subscription_id;
controller.getSubscription(subscriptionId, function(error, response, context) {
});
Error Code | Error Description |
---|---|
400 | Invalid request |
401 | Invalid API key |
404 | An informed resource was not found |
412 | Business validation error |
422 | Contract validation error |
500 | Internal server error |
Deletes a increment
function deleteIncrement(subscriptionId, incrementId, idempotencyKey, callback)
Parameter | Tags | Description |
---|---|---|
subscriptionId | Required |
Subscription id |
incrementId | Required |
Increment id |
idempotencyKey | Optional |
TODO: Add a parameter description |
var subscriptionId = subscription_id;
var incrementId = increment_id;
var idempotencyKey = 'idempotency-key';
controller.deleteIncrement(subscriptionId, incrementId, idempotencyKey, function(error, response, context) {
});
Error Code | Error Description |
---|---|
400 | Invalid request |
401 | Invalid API key |
404 | An informed resource was not found |
412 | Business validation error |
422 | Contract validation error |
500 | Internal server error |
GetIncrementById
function getIncrementById(subscriptionId, incrementId, callback)
Parameter | Tags | Description |
---|---|---|
subscriptionId | Required |
The subscription Id |
incrementId | Required |
The increment Id |
var subscriptionId = subscription_id;
var incrementId = increment_id;
controller.getIncrementById(subscriptionId, incrementId, function(error, response, context) {
});
Error Code | Error Description |
---|---|
400 | Invalid request |
401 | Invalid API key |
404 | An informed resource was not found |
412 | Business validation error |
422 | Contract validation error |
500 | Internal server error |
GetSubscriptionCycleById
function getSubscriptionCycleById(subscriptionId, cycleId, callback)
Parameter | Tags | Description |
---|---|---|
subscriptionId | Required |
The subscription id |
cycleId | Required |
TODO: Add a parameter description |
var subscriptionId = subscription_id;
var cycleId = 'cycleId';
controller.getSubscriptionCycleById(subscriptionId, cycleId, function(error, response, context) {
});
Error Code | Error Description |
---|---|
400 | Invalid request |
401 | Invalid API key |
404 | An informed resource was not found |
412 | Business validation error |
422 | Contract validation error |
500 | Internal server error |
Updates the start at date from a subscription
function updateSubscriptionStartAt(subscriptionId, body, idempotencyKey, callback)
Parameter | Tags | Description |
---|---|---|
subscriptionId | Required |
The subscription id |
body | Required |
Request for updating the subscription start date |
idempotencyKey | Optional |
TODO: Add a parameter description |
var subscriptionId = subscription_id;
var body = new SubscriptionsStartAtRequest({"key":"value"});
var idempotencyKey = 'idempotency-key';
controller.updateSubscriptionStartAt(subscriptionId, body, idempotencyKey, function(error, response, context) {
});
Error Code | Error Description |
---|---|
400 | Invalid request |
401 | Invalid API key |
404 | An informed resource was not found |
412 | Business validation error |
422 | Contract validation error |
500 | Internal server error |
Updates the payment method from a subscription
function updateSubscriptionPaymentMethod(subscriptionId, body, idempotencyKey, callback)
Parameter | Tags | Description |
---|---|---|
subscriptionId | Required |
Subscription id |
body | Required |
Request for updating the paymentmethod from a subscription |
idempotencyKey | Optional |
TODO: Add a parameter description |
var subscriptionId = subscription_id;
var body = new SubscriptionsPaymentMethodRequest({"key":"value"});
var idempotencyKey = 'idempotency-key';
controller.updateSubscriptionPaymentMethod(subscriptionId, body, idempotencyKey, function(error, response, context) {
});
Error Code | Error Description |
---|---|
400 | Invalid request |
401 | Invalid API key |
404 | An informed resource was not found |
412 | Business validation error |
422 | Contract validation error |
500 | Internal server error |
UpdateCurrentCycleStatus
function updateCurrentCycleStatus(subscriptionId, body, idempotencyKey, callback)
Parameter | Tags | Description |
---|---|---|
subscriptionId | Required |
Subscription Id |
body | Required |
Request for updating the end date of the subscription current status |
idempotencyKey | Optional |
TODO: Add a parameter description |
var subscriptionId = subscription_id;
var body = new UpdateCurrentCycleStatusRequest({"key":"value"});
var idempotencyKey = 'idempotency-key';
controller.updateCurrentCycleStatus(subscriptionId, body, idempotencyKey, function(error, response, context) {
});
Error Code | Error Description |
---|---|
400 | Invalid request |
401 | Invalid API key |
404 | An informed resource was not found |
412 | Business validation error |
422 | Contract validation error |
500 | Internal server error |
Creates a new subscription
function createSubscription(body, idempotencyKey, callback)
Parameter | Tags | Description |
---|---|---|
body | Required |
Request for creating a subscription |
idempotencyKey | Optional |
TODO: Add a parameter description |
var body = new SubscriptionsRequest1({"key":"value"});
var idempotencyKey = 'idempotency-key';
controller.createSubscription(body, idempotencyKey, function(error, response, context) {
});
Error Code | Error Description |
---|---|
400 | Invalid request |
401 | Invalid API key |
404 | An informed resource was not found |
412 | Business validation error |
422 | Contract validation error |
500 | Internal server error |
Gets all subscriptions
function getSubscriptions(page, size, code, billingType, customerId, planId, cardId, status, nextBillingSince, nextBillingUntil, createdSince, createdUntil, callback)
Parameter | Tags | Description |
---|---|---|
page | Optional |
Page number |
size | Optional |
Page size |
code | Optional |
Filter for subscription's code |
billingType | Optional |
Filter for subscription's billing type |
customerId | Optional |
Filter for subscription's customer id |
planId | Optional |
Filter for subscription's plan id |
cardId | Optional |
Filter for subscription's card id |
status | Optional |
Filter for subscription's status |
nextBillingSince | Optional |
Filter for subscription's next billing date start range |
nextBillingUntil | Optional |
Filter for subscription's next billing date end range |
createdSince | Optional |
Filter for subscription's creation date start range |
createdUntil | Optional |
Filter for subscriptions creation date end range |
var page = 238;
var size = 238;
var code = 'code';
var billingType = billing_type;
var customerId = customer_id;
var planId = plan_id;
var cardId = card_id;
var status = 'status';
var nextBillingSince = date("D M d, Y G:i");
var nextBillingUntil = date("D M d, Y G:i");
var createdSince = date("D M d, Y G:i");
var createdUntil = date("D M d, Y G:i");
controller.getSubscriptions(page, size, code, billingType, customerId, planId, cardId, status, nextBillingSince, nextBillingUntil, createdSince, createdUntil, function(error, response, context) {
});
Error Code | Error Description |
---|---|
400 | Invalid request |
401 | Invalid API key |
404 | An informed resource was not found |
412 | Business validation error |
422 | Contract validation error |
500 | Internal server error |
GetUsagesDetails
function getUsagesDetails(subscriptionId, cycleId, size, page, itemId, group, callback)
Parameter | Tags | Description |
---|---|---|
subscriptionId | Required |
Subscription Identifier |
cycleId | Optional |
Cycle id |
size | Optional |
Page size |
page | Optional |
Page number |
itemId | Optional |
Identificador do item |
group | Optional |
identificador da loja (account) de cada item |
var subscriptionId = subscription_id;
var cycleId = cycle_id;
var size = 238;
var page = 238;
var itemId = item_id;
var group = 'group';
controller.getUsagesDetails(subscriptionId, cycleId, size, page, itemId, group, function(error, response, context) {
});
Error Code | Error Description |
---|---|
400 | Invalid request |
401 | Invalid API key |
404 | An informed resource was not found |
412 | Business validation error |
422 | Contract validation error |
500 | Internal server error |
RenewSubscription
function renewSubscription(subscriptionId, idempotencyKey, callback)
Parameter | Tags | Description |
---|---|---|
subscriptionId | Required |
TODO: Add a parameter description |
idempotencyKey | Optional |
TODO: Add a parameter description |
var subscriptionId = subscription_id;
var idempotencyKey = 'idempotency-key';
controller.renewSubscription(subscriptionId, idempotencyKey, function(error, response, context) {
});
Error Code | Error Description |
---|---|
400 | Invalid request |
401 | Invalid API key |
404 | An informed resource was not found |
412 | Business validation error |
422 | Contract validation error |
500 | Internal server error |
GetSubscriptionCycles
function getSubscriptionCycles(subscriptionId, page, size, callback)
Parameter | Tags | Description |
---|---|---|
subscriptionId | Required |
Subscription Id |
page | Required |
Page number |
size | Required |
Page size |
var subscriptionId = subscription_id;
var page = 'page';
var size = 'size';
controller.getSubscriptionCycles(subscriptionId, page, size, function(error, response, context) {
});
Error Code | Error Description |
---|---|
400 | Invalid request |
401 | Invalid API key |
404 | An informed resource was not found |
412 | Business validation error |
422 | Contract validation error |
500 | Internal server error |
Create Usage
function createAnUsage(subscriptionId, itemId, idempotencyKey, callback)
Parameter | Tags | Description |
---|---|---|
subscriptionId | Required |
Subscription id |
itemId | Required |
Item id |
idempotencyKey | Optional |
TODO: Add a parameter description |
var subscriptionId = subscription_id;
var itemId = item_id;
var idempotencyKey = 'idempotency-key';
controller.createAnUsage(subscriptionId, itemId, idempotencyKey, function(error, response, context) {
});
Error Code | Error Description |
---|---|
400 | Invalid request |
401 | Invalid API key |
404 | An informed resource was not found |
412 | Business validation error |
422 | Contract validation error |
500 | Internal server error |
Lists all usages from a subscription item
function getUsages(subscriptionId, itemId, page, size, code, group, usedSince, usedUntil, callback)
Parameter | Tags | Description |
---|---|---|
subscriptionId | Required |
The subscription id |
itemId | Required |
The subscription item id |
page | Optional |
Page number |
size | Optional |
Page size |
code | Optional |
Identification code in the client system |
group | Optional |
Identification group in the client system |
usedSince | Optional |
TODO: Add a parameter description |
usedUntil | Optional |
TODO: Add a parameter description |
var subscriptionId = subscription_id;
var itemId = item_id;
var page = 238;
var size = 238;
var code = 'code';
var group = 'group';
var usedSince = date("D M d, Y G:i");
var usedUntil = date("D M d, Y G:i");
controller.getUsages(subscriptionId, itemId, page, size, code, group, usedSince, usedUntil, function(error, response, context) {
});
Error Code | Error Description |
---|---|
400 | Invalid request |
401 | Invalid API key |
404 | An informed resource was not found |
412 | Business validation error |
422 | Contract validation error |
500 | Internal server error |
Deletes a discount
function deleteDiscount(subscriptionId, discountId, idempotencyKey, callback)
Parameter | Tags | Description |
---|---|---|
subscriptionId | Required |
Subscription id |
discountId | Required |
Discount Id |
idempotencyKey | Optional |
TODO: Add a parameter description |
var subscriptionId = subscription_id;
var discountId = discount_id;
var idempotencyKey = 'idempotency-key';
controller.deleteDiscount(subscriptionId, discountId, idempotencyKey, function(error, response, context) {
});
Error Code | Error Description |
---|---|
400 | Invalid request |
401 | Invalid API key |
404 | An informed resource was not found |
412 | Business validation error |
422 | Contract validation error |
500 | Internal server error |
GetIncrements
function getIncrements(subscriptionId, page, size, callback)
Parameter | Tags | Description |
---|---|---|
subscriptionId | Required |
The subscription id |
page | Optional |
Page number |
size | Optional |
Page size |
var subscriptionId = subscription_id;
var page = 238;
var size = 238;
controller.getIncrements(subscriptionId, page, size, function(error, response, context) {
});
Error Code | Error Description |
---|---|
400 | Invalid request |
401 | Invalid API key |
404 | An informed resource was not found |
412 | Business validation error |
422 | Contract validation error |
500 | Internal server error |
Creates a new Subscription item
function createSubscriptionItem(subscriptionId, body, idempotencyKey, callback)
Parameter | Tags | Description |
---|---|---|
subscriptionId | Required |
Subscription id |
body | Required |
Request for creating a subscription item |
idempotencyKey | Optional |
TODO: Add a parameter description |
var subscriptionId = subscription_id;
var body = new SubscriptionsItemsRequest1({"key":"value"});
var idempotencyKey = 'idempotency-key';
controller.createSubscriptionItem(subscriptionId, body, idempotencyKey, function(error, response, context) {
});
Error Code | Error Description |
---|---|
400 | Invalid request |
401 | Invalid API key |
404 | An informed resource was not found |
412 | Business validation error |
422 | Contract validation error |
500 | Internal server error |
Get Subscription Items
function getSubscriptionItems(subscriptionId, page, size, name, code, status, description, createdSince, createdUntil, callback)
Parameter | Tags | Description |
---|---|---|
subscriptionId | Required |
The subscription id |
page | Optional |
Page number |
size | Optional |
Page size |
name | Optional |
The item name |
code | Optional |
Identification code in the client system |
status | Optional |
The item statis |
description | Optional |
The item description |
createdSince | Optional |
Filter for item's creation date start range |
createdUntil | Optional |
Filter for item's creation date end range |
var subscriptionId = subscription_id;
var page = 74;
var size = 74;
var name = 'name';
var code = 'code';
var status = 'status';
var description = 'description';
var createdSince = created_since;
var createdUntil = created_until;
controller.getSubscriptionItems(subscriptionId, page, size, name, code, status, description, createdSince, createdUntil, function(error, response, context) {
});
Error Code | Error Description |
---|---|
400 | Invalid request |
401 | Invalid API key |
404 | An informed resource was not found |
412 | Business validation error |
422 | Contract validation error |
500 | Internal server error |
Updates the billing date from a subscription
function updateSubscriptionBillingDate(subscriptionId, body, idempotencyKey, callback)
Parameter | Tags | Description |
---|---|---|
subscriptionId | Required |
The subscription id |
body | Required |
Request for updating the subscription billing date |
idempotencyKey | Optional |
TODO: Add a parameter description |
var subscriptionId = subscription_id;
var body = new SubscriptionsBillingDateRequest({"key":"value"});
var idempotencyKey = 'idempotency-key';
controller.updateSubscriptionBillingDate(subscriptionId, body, idempotencyKey, function(error, response, context) {
});
Error Code | Error Description |
---|---|
400 | Invalid request |
401 | Invalid API key |
404 | An informed resource was not found |
412 | Business validation error |
422 | Contract validation error |
500 | Internal server error |
UpdateLatestPeriodEndAt
function updateLatestPeriodEndAt(subscriptionId, body, idempotencyKey, callback)
Parameter | Tags | Description |
---|---|---|
subscriptionId | Required |
TODO: Add a parameter description |
body | Required |
Request for updating the end date of the current signature cycle |
idempotencyKey | Optional |
TODO: Add a parameter description |
var subscriptionId = subscription_id;
var body = new SubscriptionsPeriodsLatestEndAtRequest({"key":"value"});
var idempotencyKey = 'idempotency-key';
controller.updateLatestPeriodEndAt(subscriptionId, body, idempotencyKey, function(error, response, context) {
});
Error Code | Error Description |
---|---|
400 | Invalid request |
401 | Invalid API key |
404 | An informed resource was not found |
412 | Business validation error |
422 | Contract validation error |
500 | Internal server error |
UpdateSubscriptionAffiliationId
function updateSubscriptionAffiliationId(subscriptionId, body, idempotencyKey, callback)
Parameter | Tags | Description |
---|---|---|
subscriptionId | Required |
TODO: Add a parameter description |
body | Required |
Request for updating a subscription affiliation id |
idempotencyKey | Optional |
TODO: Add a parameter description |
var subscriptionId = subscription_id;
var body = new SubscriptionsGatewayAffiliationIdRequest({"key":"value"});
var idempotencyKey = 'idempotency-key';
controller.updateSubscriptionAffiliationId(subscriptionId, body, idempotencyKey, function(error, response, context) {
});
Error Code | Error Description |
---|---|
400 | Invalid request |
401 | Invalid API key |
404 | An informed resource was not found |
412 | Business validation error |
422 | Contract validation error |
500 | Internal server error |
Deletes a subscription item
function deleteSubscriptionItem(subscriptionId, subscriptionItemId, idempotencyKey, callback)
Parameter | Tags | Description |
---|---|---|
subscriptionId | Required |
Subscription id |
subscriptionItemId | Required |
Subscription item id |
idempotencyKey | Optional |
TODO: Add a parameter description |
var subscriptionId = subscription_id;
var subscriptionItemId = subscription_item_id;
var idempotencyKey = 'idempotency-key';
controller.deleteSubscriptionItem(subscriptionId, subscriptionItemId, idempotencyKey, function(error, response, context) {
});
Error Code | Error Description |
---|---|
400 | Invalid request |
401 | Invalid API key |
404 | An informed resource was not found |
412 | Business validation error |
422 | Contract validation error |
500 | Internal server error |
Updates the credit card from a subscription
function updateSubscriptionCard(subscriptionId, body, idempotencyKey, callback)
Parameter | Tags | Description |
---|---|---|
subscriptionId | Required |
Subscription id |
body | Required |
Request for updating a card |
idempotencyKey | Optional |
TODO: Add a parameter description |
var subscriptionId = subscription_id;
var body = new SubscriptionsCardRequest({"key":"value"});
var idempotencyKey = 'idempotency-key';
controller.updateSubscriptionCard(subscriptionId, body, idempotencyKey, function(error, response, context) {
});
Error Code | Error Description |
---|---|
400 | Invalid request |
401 | Invalid API key |
404 | An informed resource was not found |
412 | Business validation error |
422 | Contract validation error |
500 | Internal server error |
Updates the metadata from a subscription
function updateSubscriptionMetadata(subscriptionId, body, idempotencyKey, callback)
Parameter | Tags | Description |
---|---|---|
subscriptionId | Required |
The subscription id |
body | Required |
Request for updating the subscrption metadata |
idempotencyKey | Optional |
TODO: Add a parameter description |
var subscriptionId = subscription_id;
var body = new SubscriptionsMetadataRequest({"key":"value"});
var idempotencyKey = 'idempotency-key';
controller.updateSubscriptionMetadata(subscriptionId, body, idempotencyKey, function(error, response, context) {
});
Error Code | Error Description |
---|---|
400 | Invalid request |
401 | Invalid API key |
404 | An informed resource was not found |
412 | Business validation error |
422 | Contract validation error |
500 | Internal server error |
Updates the boleto due days from a subscription
function updateSubscriptionDueDays(subscriptionId, body, idempotencyKey, callback)
Parameter | Tags | Description |
---|---|---|
subscriptionId | Required |
Subscription Id |
body | Required |
TODO: Add a parameter description |
idempotencyKey | Optional |
TODO: Add a parameter description |
var subscriptionId = subscription_id;
var body = new UpdateSubscriptionDueDaysRequest({"key":"value"});
var idempotencyKey = 'idempotency-key';
controller.updateSubscriptionDueDays(subscriptionId, body, idempotencyKey, function(error, response, context) {
});
Error Code | Error Description |
---|---|
400 | Invalid request |
401 | Invalid API key |
404 | An informed resource was not found |
412 | Business validation error |
422 | Contract validation error |
500 | Internal server error |
GetDiscounts
function getDiscounts(subscriptionId, page, size, callback)
Parameter | Tags | Description |
---|---|---|
subscriptionId | Required |
The subscription id |
page | Required |
Page number |
size | Required |
Page size |
var subscriptionId = subscription_id;
var page = 74;
var size = 74;
controller.getDiscounts(subscriptionId, page, size, function(error, response, context) {
});
Error Code | Error Description |
---|---|
400 | Invalid request |
401 | Invalid API key |
404 | An informed resource was not found |
412 | Business validation error |
422 | Contract validation error |
500 | Internal server error |
Creates a increment
function createIncrement(subscriptionId, body, idempotencyKey, callback)
Parameter | Tags | Description |
---|---|---|
subscriptionId | Required |
Subscription id |
body | Required |
Request for creating a increment |
idempotencyKey | Optional |
TODO: Add a parameter description |
var subscriptionId = subscription_id;
var body = new SubscriptionsIncrementsRequest({"key":"value"});
var idempotencyKey = 'idempotency-key';
controller.createIncrement(subscriptionId, body, idempotencyKey, function(error, response, context) {
});
Error Code | Error Description |
---|---|
400 | Invalid request |
401 | Invalid API key |
404 | An informed resource was not found |
412 | Business validation error |
422 | Contract validation error |
500 | Internal server error |
GetDiscountById
function getDiscountById(subscriptionId, discountId, callback)
Parameter | Tags | Description |
---|---|---|
subscriptionId | Required |
The subscription id |
discountId | Required |
TODO: Add a parameter description |
var subscriptionId = subscription_id;
var discountId = 'discountId';
controller.getDiscountById(subscriptionId, discountId, function(error, response, context) {
});
Error Code | Error Description |
---|---|
400 | Invalid request |
401 | Invalid API key |
404 | An informed resource was not found |
412 | Business validation error |
422 | Contract validation error |
500 | Internal server error |
Atualização do valor mĂnimo da assinatura
function updateSubscriptionMiniumPrice(subscriptionId, body, idempotencyKey, callback)
Parameter | Tags | Description |
---|---|---|
subscriptionId | Required |
Subscription Id |
body | Required |
Request da requisição com o valor mĂnimo que será configurado |
idempotencyKey | Optional |
TODO: Add a parameter description |
var subscriptionId = subscription_id;
var body = new SubscriptionsMinimumPriceRequest({"key":"value"});
var idempotencyKey = 'idempotency-key';
controller.updateSubscriptionMiniumPrice(subscriptionId, body, idempotencyKey, function(error, response, context) {
});
Error Code | Error Description |
---|---|
400 | Invalid request |
401 | Invalid API key |
404 | An informed resource was not found |
412 | Business validation error |
422 | Contract validation error |
500 | Internal server error |
GetUsageReport
function getUsageReport(subscriptionId, periodId, callback)
Parameter | Tags | Description |
---|---|---|
subscriptionId | Required |
The subscription Id |
periodId | Required |
The period Id |
var subscriptionId = subscription_id;
var periodId = period_id;
controller.getUsageReport(subscriptionId, periodId, function(error, response, context) {
});
Error Code | Error Description |
---|---|
400 | Invalid request |
401 | Invalid API key |
404 | An informed resource was not found |
412 | Business validation error |
422 | Contract validation error |
500 | Internal server error |
UpdateSplitSubscription
function updateSplitSubscription(id, body, callback)
Parameter | Tags | Description |
---|---|---|
id | Required |
Subscription's id |
body | Required |
TODO: Add a parameter description |
var id = 'id';
var body = new UpdateSubscriptionSplitRequest({"key":"value"});
controller.updateSplitSubscription(id, body, function(error, response, context) {
});
Error Code | Error Description |
---|---|
400 | Invalid request |
401 | Invalid API key |
404 | An informed resource was not found |
412 | Business validation error |
422 | Contract validation error |
500 | Internal server error |
The singleton instance of the OrdersController
class can be accessed from the API Client.
var controller = lib.OrdersController;
UpdateOrderStatus
function updateOrderStatus(id, body, idempotencyKey, callback)
Parameter | Tags | Description |
---|---|---|
id | Required |
Order Id |
body | Required |
Update Order Model |
idempotencyKey | Optional |
TODO: Add a parameter description |
var id = 'id';
var body = new UpdateOrderStatusRequest({"key":"value"});
var idempotencyKey = 'idempotency-key';
controller.updateOrderStatus(id, body, idempotencyKey, function(error, response, context) {
});
Error Code | Error Description |
---|---|
400 | Invalid request |
401 | Invalid API key |
404 | An informed resource was not found |
412 | Business validation error |
422 | Contract validation error |
500 | Internal server error |
DeleteAllOrderItems
function deleteAllOrderItems(orderId, idempotencyKey, callback)
Parameter | Tags | Description |
---|---|---|
orderId | Required |
Order Id |
idempotencyKey | Optional |
TODO: Add a parameter description |
var orderId = 'orderId';
var idempotencyKey = 'idempotency-key';
controller.deleteAllOrderItems(orderId, idempotencyKey, function(error, response, context) {
});
Error Code | Error Description |
---|---|
400 | Invalid request |
401 | Invalid API key |
404 | An informed resource was not found |
412 | Business validation error |
422 | Contract validation error |
500 | Internal server error |
CreateOrderItem
function createOrderItem(orderId, body, idempotencyKey, callback)
Parameter | Tags | Description |
---|---|---|
orderId | Required |
Order Id |
body | Required |
Order Item Model |
idempotencyKey | Optional |
TODO: Add a parameter description |
var orderId = 'orderId';
var body = new OrdersItemsRequest({"key":"value"});
var idempotencyKey = 'idempotency-key';
controller.createOrderItem(orderId, body, idempotencyKey, function(error, response, context) {
});
Error Code | Error Description |
---|---|
400 | Invalid request |
401 | Invalid API key |
404 | An informed resource was not found |
412 | Business validation error |
422 | Contract validation error |
500 | Internal server error |
Updates the metadata from an order
function updateOrderMetadata(orderId, body, idempotencyKey, callback)
Parameter | Tags | Description |
---|---|---|
orderId | Required |
The order id |
body | Required |
Request for updating the order metadata |
idempotencyKey | Optional |
TODO: Add a parameter description |
var orderId = order_id;
var body = new OrdersMetadataRequest({"key":"value"});
var idempotencyKey = 'idempotency-key';
controller.updateOrderMetadata(orderId, body, idempotencyKey, function(error, response, context) {
});
Error Code | Error Description |
---|---|
400 | Invalid request |
401 | Invalid API key |
404 | An informed resource was not found |
412 | Business validation error |
422 | Contract validation error |
500 | Internal server error |
Gets all orders
function getOrders(page, size, code, status, createdSince, createdUntil, customerId, callback)
Parameter | Tags | Description |
---|---|---|
page | Optional |
Page number |
size | Optional |
Page size |
code | Optional |
Filter for order's code |
status | Optional |
Filter for order's status |
createdSince | Optional |
Filter for order's creation date start range |
createdUntil | Optional |
Filter for order's creation date end range |
customerId | Optional |
Filter for order's customer id |
var page = 74;
var size = 74;
var code = 'code';
var status = 'status';
var createdSince = date("D M d, Y G:i");
var createdUntil = date("D M d, Y G:i");
var customerId = customer_id;
controller.getOrders(page, size, code, status, createdSince, createdUntil, customerId, function(error, response, context) {
});
Error Code | Error Description |
---|---|
400 | Invalid request |
401 | Invalid API key |
404 | An informed resource was not found |
412 | Business validation error |
422 | Contract validation error |
500 | Internal server error |
Creates a new Order
function createOrder(body, idempotencyKey, callback)
Parameter | Tags | Description |
---|---|---|
body | Required |
Request for creating an order |
idempotencyKey | Optional |
TODO: Add a parameter description |
var body = new OrdersRequest({"key":"value"});
var idempotencyKey = 'idempotency-key';
controller.createOrder(body, idempotencyKey, function(error, response, context) {
});
Error Code | Error Description |
---|---|
400 | Invalid request |
401 | Invalid API key |
404 | An informed resource was not found |
412 | Business validation error |
422 | Contract validation error |
500 | Internal server error |
DeleteOrderItem
function deleteOrderItem(orderId, itemId, idempotencyKey, callback)
Parameter | Tags | Description |
---|---|---|
orderId | Required |
Order Id |
itemId | Required |
Item Id |
idempotencyKey | Optional |
TODO: Add a parameter description |
var orderId = 'orderId';
var itemId = 'itemId';
var idempotencyKey = 'idempotency-key';
controller.deleteOrderItem(orderId, itemId, idempotencyKey, function(error, response, context) {
});
Error Code | Error Description |
---|---|
400 | Invalid request |
401 | Invalid API key |
404 | An informed resource was not found |
412 | Business validation error |
422 | Contract validation error |
500 | Internal server error |
GetOrderItem
function getOrderItem(orderId, itemId, callback)
Parameter | Tags | Description |
---|---|---|
orderId | Required |
Order Id |
itemId | Required |
Item Id |
var orderId = 'orderId';
var itemId = 'itemId';
controller.getOrderItem(orderId, itemId, function(error, response, context) {
});
Error Code | Error Description |
---|---|
400 | Invalid request |
401 | Invalid API key |
404 | An informed resource was not found |
412 | Business validation error |
422 | Contract validation error |
500 | Internal server error |
UpdateOrderItem
function updateOrderItem(orderId, itemId, body, idempotencyKey, callback)
Parameter | Tags | Description |
---|---|---|
orderId | Required |
Order Id |
itemId | Required |
Item Id |
body | Required |
Item Model |
idempotencyKey | Optional |
TODO: Add a parameter description |
var orderId = 'orderId';
var itemId = 'itemId';
var body = new OrdersItemsRequest1({"key":"value"});
var idempotencyKey = 'idempotency-key';
controller.updateOrderItem(orderId, itemId, body, idempotencyKey, function(error, response, context) {
});
Error Code | Error Description |
---|---|
400 | Invalid request |
401 | Invalid API key |
404 | An informed resource was not found |
412 | Business validation error |
422 | Contract validation error |
500 | Internal server error |
Gets an order
function getOrder(orderId, callback)
Parameter | Tags | Description |
---|---|---|
orderId | Required |
Order id |
var orderId = order_id;
controller.getOrder(orderId, function(error, response, context) {
});
Error Code | Error Description |
---|---|
400 | Invalid request |
401 | Invalid API key |
404 | An informed resource was not found |
412 | Business validation error |
422 | Contract validation error |
500 | Internal server error |
The singleton instance of the PlansController
class can be accessed from the API Client.
var controller = lib.PlansController;
Updates a plan item
function updatePlanItem(planId, planItemId, body, idempotencyKey, callback)
Parameter | Tags | Description |
---|---|---|
planId | Required |
Plan id |
planItemId | Required |
Plan item id |
body | Required |
Request for updating the plan item |
idempotencyKey | Optional |
TODO: Add a parameter description |
var planId = plan_id;
var planItemId = plan_item_id;
var body = new PlansItemsRequest({"key":"value"});
var idempotencyKey = 'idempotency-key';
controller.updatePlanItem(planId, planItemId, body, idempotencyKey, function(error, response, context) {
});
Error Code | Error Description |
---|---|
400 | Invalid request |
401 | Invalid API key |
404 | An informed resource was not found |
412 | Business validation error |
422 | Contract validation error |
500 | Internal server error |
Removes an item from a plan
function deletePlanItem(planId, planItemId, idempotencyKey, callback)
Parameter | Tags | Description |
---|---|---|
planId | Required |
Plan id |
planItemId | Required |
Plan item id |
idempotencyKey | Optional |
TODO: Add a parameter description |
var planId = plan_id;
var planItemId = plan_item_id;
var idempotencyKey = 'idempotency-key';
controller.deletePlanItem(planId, planItemId, idempotencyKey, function(error, response, context) {
});
Error Code | Error Description |
---|---|
400 | Invalid request |
401 | Invalid API key |
404 | An informed resource was not found |
412 | Business validation error |
422 | Contract validation error |
500 | Internal server error |
Gets a plan item
function getPlanItem(planId, planItemId, callback)
Parameter | Tags | Description |
---|---|---|
planId | Required |
Plan id |
planItemId | Required |
Plan item id |
var planId = plan_id;
var planItemId = plan_item_id;
controller.getPlanItem(planId, planItemId, function(error, response, context) {
});
Error Code | Error Description |
---|---|
400 | Invalid request |
401 | Invalid API key |
404 | An informed resource was not found |
412 | Business validation error |
422 | Contract validation error |
500 | Internal server error |
Adds a new item to a plan
function createPlanItem(planId, body, idempotencyKey, callback)
Parameter | Tags | Description |
---|---|---|
planId | Required |
Plan id |
body | Required |
Request for creating a plan item |
idempotencyKey | Optional |
TODO: Add a parameter description |
var planId = plan_id;
var body = new PlansItemsRequest1({"key":"value"});
var idempotencyKey = 'idempotency-key';
controller.createPlanItem(planId, body, idempotencyKey, function(error, response, context) {
});
Error Code | Error Description |
---|---|
400 | Invalid request |
401 | Invalid API key |
404 | An informed resource was not found |
412 | Business validation error |
422 | Contract validation error |
500 | Internal server error |
Gets all plans
function getPlans(page, size, name, status, billingType, createdSince, createdUntil, callback)
Parameter | Tags | Description |
---|---|---|
page | Optional |
Page number |
size | Optional |
Page size |
name | Optional |
Filter for Plan's name |
status | Optional |
Filter for Plan's status |
billingType | Optional |
Filter for plan's billing type |
createdSince | Optional |
Filter for plan's creation date start range |
createdUntil | Optional |
Filter for plan's creation date end range |
var page = 74;
var size = 74;
var name = 'name';
var status = 'status';
var billingType = billing_type;
var createdSince = date("D M d, Y G:i");
var createdUntil = date("D M d, Y G:i");
controller.getPlans(page, size, name, status, billingType, createdSince, createdUntil, function(error, response, context) {
});
Error Code | Error Description |
---|---|
400 | Invalid request |
401 | Invalid API key |
404 | An informed resource was not found |
412 | Business validation error |
422 | Contract validation error |
500 | Internal server error |
Creates a new plan
function createPlan(body, idempotencyKey, callback)
Parameter | Tags | Description |
---|---|---|
body | Required |
Request for creating a plan |
idempotencyKey | Optional |
TODO: Add a parameter description |
var body = new PlansRequest({"key":"value"});
var idempotencyKey = 'idempotency-key';
controller.createPlan(body, idempotencyKey, function(error, response, context) {
});
Error Code | Error Description |
---|---|
400 | Invalid request |
401 | Invalid API key |
404 | An informed resource was not found |
412 | Business validation error |
422 | Contract validation error |
500 | Internal server error |
Gets a plan
function getPlan(planId, callback)
Parameter | Tags | Description |
---|---|---|
planId | Required |
Plan id |
var planId = plan_id;
controller.getPlan(planId, function(error, response, context) {
});
Error Code | Error Description |
---|---|
400 | Invalid request |
401 | Invalid API key |
404 | An informed resource was not found |
412 | Business validation error |
422 | Contract validation error |
500 | Internal server error |
Updates a plan
function updatePlan(planId, body, idempotencyKey, callback)
Parameter | Tags | Description |
---|---|---|
planId | Required |
Plan id |
body | Required |
Request for updating a plan |
idempotencyKey | Optional |
TODO: Add a parameter description |
var planId = plan_id;
var body = new PlansRequest1({"key":"value"});
var idempotencyKey = 'idempotency-key';
controller.updatePlan(planId, body, idempotencyKey, function(error, response, context) {
});
Error Code | Error Description |
---|---|
400 | Invalid request |
401 | Invalid API key |
404 | An informed resource was not found |
412 | Business validation error |
422 | Contract validation error |
500 | Internal server error |
Deletes a plan
function deletePlan(planId, idempotencyKey, callback)
Parameter | Tags | Description |
---|---|---|
planId | Required |
Plan id |
idempotencyKey | Optional |
TODO: Add a parameter description |
var planId = plan_id;
var idempotencyKey = 'idempotency-key';
controller.deletePlan(planId, idempotencyKey, function(error, response, context) {
});
Error Code | Error Description |
---|---|
400 | Invalid request |
401 | Invalid API key |
404 | An informed resource was not found |
412 | Business validation error |
422 | Contract validation error |
500 | Internal server error |
Updates the metadata from a plan
function updatePlanMetadata(planId, body, idempotencyKey, callback)
Parameter | Tags | Description |
---|---|---|
planId | Required |
The plan id |
body | Required |
Request for updating the plan metadata |
idempotencyKey | Optional |
TODO: Add a parameter description |
var planId = plan_id;
var body = new PlansMetadataRequest({"key":"value"});
var idempotencyKey = 'idempotency-key';
controller.updatePlanMetadata(planId, body, idempotencyKey, function(error, response, context) {
});
Error Code | Error Description |
---|---|
400 | Invalid request |
401 | Invalid API key |
404 | An informed resource was not found |
412 | Business validation error |
422 | Contract validation error |
500 | Internal server error |
The singleton instance of the InvoicesController
class can be accessed from the API Client.
var controller = lib.InvoicesController;
Create an Invoice
function createInvoice(subscriptionId, cycleId, idempotencyKey, body, callback)
Parameter | Tags | Description |
---|---|---|
subscriptionId | Required |
Subscription Id |
cycleId | Required |
Cycle Id |
idempotencyKey | Optional |
TODO: Add a parameter description |
body | Optional |
TODO: Add a parameter description |
var subscriptionId = subscription_id;
var cycleId = cycle_id;
var idempotencyKey = 'idempotency-key';
var body = new SubscriptionsCyclesPayRequest({"key":"value"});
controller.createInvoice(subscriptionId, cycleId, idempotencyKey, body, function(error, response, context) {
});
Error Code | Error Description |
---|---|
400 | Invalid request |
401 | Invalid API key |
404 | An informed resource was not found |
412 | Business validation error |
422 | Contract validation error |
500 | Internal server error |
GetPartialInvoice
function getPartialInvoice(subscriptionId, callback)
Parameter | Tags | Description |
---|---|---|
subscriptionId | Required |
Subscription Id |
var subscriptionId = subscription_id;
controller.getPartialInvoice(subscriptionId, function(error, response, context) {
});
Error Code | Error Description |
---|---|
400 | Invalid request |
401 | Invalid API key |
404 | An informed resource was not found |
412 | Business validation error |
422 | Contract validation error |
500 | Internal server error |
Updates the status from an invoice
function updateInvoiceStatus(invoiceId, body, idempotencyKey, callback)
Parameter | Tags | Description |
---|---|---|
invoiceId | Required |
Invoice Id |
body | Required |
Request for updating an invoice's status |
idempotencyKey | Optional |
TODO: Add a parameter description |
var invoiceId = invoice_id;
var body = new UpdateCurrentCycleStatusRequest({"key":"value"});
var idempotencyKey = 'idempotency-key';
controller.updateInvoiceStatus(invoiceId, body, idempotencyKey, function(error, response, context) {
});
Error Code | Error Description |
---|---|
400 | Invalid request |
401 | Invalid API key |
404 | An informed resource was not found |
412 | Business validation error |
422 | Contract validation error |
500 | Internal server error |
Gets an invoice
function getInvoice(invoiceId, callback)
Parameter | Tags | Description |
---|---|---|
invoiceId | Required |
Invoice Id |
var invoiceId = invoice_id;
controller.getInvoice(invoiceId, function(error, response, context) {
});
Error Code | Error Description |
---|---|
400 | Invalid request |
401 | Invalid API key |
404 | An informed resource was not found |
412 | Business validation error |
422 | Contract validation error |
500 | Internal server error |
Cancels an invoice
function cancelInvoice(invoiceId, idempotencyKey, callback)
Parameter | Tags | Description |
---|---|---|
invoiceId | Required |
Invoice id |
idempotencyKey | Optional |
TODO: Add a parameter description |
var invoiceId = invoice_id;
var idempotencyKey = 'idempotency-key';
controller.cancelInvoice(invoiceId, idempotencyKey, function(error, response, context) {
});
Error Code | Error Description |
---|---|
400 | Invalid request |
401 | Invalid API key |
404 | An informed resource was not found |
412 | Business validation error |
422 | Contract validation error |
500 | Internal server error |
Updates the metadata from an invoice
function updateInvoiceMetadata(invoiceId, body, idempotencyKey, callback)
Parameter | Tags | Description |
---|---|---|
invoiceId | Required |
The invoice id |
body | Required |
Request for updating the invoice metadata |
idempotencyKey | Optional |
TODO: Add a parameter description |
var invoiceId = invoice_id;
var body = new InvoicesMetadataRequest({"key":"value"});
var idempotencyKey = 'idempotency-key';
controller.updateInvoiceMetadata(invoiceId, body, idempotencyKey, function(error, response, context) {
});
Error Code | Error Description |
---|---|
400 | Invalid request |
401 | Invalid API key |
404 | An informed resource was not found |
412 | Business validation error |
422 | Contract validation error |
500 | Internal server error |
Gets all invoices
function getInvoices(page, size, code, customerId, subscriptionId, createdSince, createdUntil, status, dueSince, dueUntil, customerDocument, callback)
Parameter | Tags | Description |
---|---|---|
page | Optional |
Page number |
size | Optional |
Page size |
code | Optional |
Filter for Invoice's code |
customerId | Optional |
Filter for Invoice's customer id |
subscriptionId | Optional |
Filter for Invoice's subscription id |
createdSince | Optional |
Filter for Invoice's creation date start range |
createdUntil | Optional |
Filter for Invoices creation date end range |
status | Optional |
Filter for Invoice's status |
dueSince | Optional |
Filter for Invoice's due date start range |
dueUntil | Optional |
Filter for Invoice's due date end range |
customerDocument | Optional |
Fillter for invoice's document |
var page = 74;
var size = 74;
var code = 'code';
var customerId = customer_id;
var subscriptionId = subscription_id;
var createdSince = date("D M d, Y G:i");
var createdUntil = date("D M d, Y G:i");
var status = 'status';
var dueSince = date("D M d, Y G:i");
var dueUntil = date("D M d, Y G:i");
var customerDocument = customer_document;
controller.getInvoices(page, size, code, customerId, subscriptionId, createdSince, createdUntil, status, dueSince, dueUntil, customerDocument, function(error, response, context) {
});
Error Code | Error Description |
---|---|
400 | Invalid request |
401 | Invalid API key |
404 | An informed resource was not found |
412 | Business validation error |
422 | Contract validation error |
500 | Internal server error |
The singleton instance of the CustomersController
class can be accessed from the API Client.
var controller = lib.CustomersController;
Creates a access token for a customer
function createAccessToken(customerId, body, idempotencyKey, callback)
Parameter | Tags | Description |
---|---|---|
customerId | Required |
Customer Id |
body | Required |
Request for creating a access token |
idempotencyKey | Optional |
TODO: Add a parameter description |
var customerId = customer_id;
var body = new CustomersAccessTokensRequest({"key":"value"});
var idempotencyKey = 'idempotency-key';
controller.createAccessToken(customerId, body, idempotencyKey, function(error, response, context) {
});
Error Code | Error Description |
---|---|
400 | Invalid request |
401 | Invalid API key |
404 | An informed resource was not found |
412 | Business validation error |
422 | Contract validation error |
500 | Internal server error |
Get all access tokens from a customer
function getAccessTokens(customerId, page, size, callback)
Parameter | Tags | Description |
---|---|---|
customerId | Required |
Customer Id |
page | Optional |
Page number |
size | Optional |
Page size |
var customerId = customer_id;
var page = 74;
var size = 74;
controller.getAccessTokens(customerId, page, size, function(error, response, context) {
});
Error Code | Error Description |
---|---|
400 | Invalid request |
401 | Invalid API key |
404 | An informed resource was not found |
412 | Business validation error |
422 | Contract validation error |
500 | Internal server error |
Updates a customer
function updateCustomer(customerId, body, idempotencyKey, callback)
Parameter | Tags | Description |
---|---|---|
customerId | Required |
Customer id |
body | Required |
Request for updating a customer |
idempotencyKey | Optional |
TODO: Add a parameter description |
var customerId = customer_id;
var body = new CustomersRequest({"key":"value"});
var idempotencyKey = 'idempotency-key';
controller.updateCustomer(customerId, body, idempotencyKey, function(error, response, context) {
});
Error Code | Error Description |
---|---|
400 | Invalid request |
401 | Invalid API key |
404 | An informed resource was not found |
412 | Business validation error |
422 | Contract validation error |
500 | Internal server error |
Get a customer
function getCustomer(customerId, callback)
Parameter | Tags | Description |
---|---|---|
customerId | Required |
Customer Id |
var customerId = customer_id;
controller.getCustomer(customerId, function(error, response, context) {
});
Error Code | Error Description |
---|---|
400 | Invalid request |
401 | Invalid API key |
404 | An informed resource was not found |
412 | Business validation error |
422 | Contract validation error |
500 | Internal server error |
Delete a Customer's access tokens
function deleteAccessTokens(customerId, callback)
Parameter | Tags | Description |
---|---|---|
customerId | Required |
Customer Id |
var customerId = customer_id;
controller.deleteAccessTokens(customerId, function(error, response, context) {
});
Error Code | Error Description |
---|---|
400 | Invalid request |
401 | Invalid API key |
404 | An informed resource was not found |
412 | Business validation error |
422 | Contract validation error |
500 | Internal server error |
Gets all adressess from a customer
function getAddresses(customerId, page, size, callback)
Parameter | Tags | Description |
---|---|---|
customerId | Required |
Customer id |
page | Optional |
Page number |
size | Optional |
Page size |
var customerId = customer_id;
var page = 74;
var size = 74;
controller.getAddresses(customerId, page, size, function(error, response, context) {
});
Error Code | Error Description |
---|---|
400 | Invalid request |
401 | Invalid API key |
404 | An informed resource was not found |
412 | Business validation error |
422 | Contract validation error |
500 | Internal server error |
Creates a new address for a customer
function createAddress(customerId, body, idempotencyKey, callback)
Parameter | Tags | Description |
---|---|---|
customerId | Required |
Customer Id |
body | Required |
Request for creating an address |
idempotencyKey | Optional |
TODO: Add a parameter description |
var customerId = customer_id;
var body = new CustomersAddressesRequest({"key":"value"});
var idempotencyKey = 'idempotency-key';
controller.createAddress(customerId, body, idempotencyKey, function(error, response, context) {
});
Error Code | Error Description |
---|---|
400 | Invalid request |
401 | Invalid API key |
404 | An informed resource was not found |
412 | Business validation error |
422 | Contract validation error |
500 | Internal server error |
Get a Customer's access token
function getAccessToken(customerId, tokenId, callback)
Parameter | Tags | Description |
---|---|---|
customerId | Required |
Customer Id |
tokenId | Required |
Token Id |
var customerId = customer_id;
var tokenId = token_id;
controller.getAccessToken(customerId, tokenId, function(error, response, context) {
});
Error Code | Error Description |
---|---|
400 | Invalid request |
401 | Invalid API key |
404 | An informed resource was not found |
412 | Business validation error |
422 | Contract validation error |
500 | Internal server error |
Delete a customer's access token
function deleteAccessToken(customerId, tokenId, idempotencyKey, callback)
Parameter | Tags | Description |
---|---|---|
customerId | Required |
Customer Id |
tokenId | Required |
Token Id |
idempotencyKey | Optional |
TODO: Add a parameter description |
var customerId = customer_id;
var tokenId = token_id;
var idempotencyKey = 'idempotency-key';
controller.deleteAccessToken(customerId, tokenId, idempotencyKey, function(error, response, context) {
});
Error Code | Error Description |
---|---|
400 | Invalid request |
401 | Invalid API key |
404 | An informed resource was not found |
412 | Business validation error |
422 | Contract validation error |
500 | Internal server error |
Get a customer's address
function getAddress(customerId, addressId, callback)
Parameter | Tags | Description |
---|---|---|
customerId | Required |
Customer id |
addressId | Required |
Address Id |
var customerId = customer_id;
var addressId = address_id;
controller.getAddress(customerId, addressId, function(error, response, context) {
});
Error Code | Error Description |
---|---|
400 | Invalid request |
401 | Invalid API key |
404 | An informed resource was not found |
412 | Business validation error |
422 | Contract validation error |
500 | Internal server error |
Updates an address
function updateAddress(customerId, addressId, body, idempotencyKey, callback)
Parameter | Tags | Description |
---|---|---|
customerId | Required |
Customer Id |
addressId | Required |
Address Id |
body | Required |
Request for updating an address |
idempotencyKey | Optional |
TODO: Add a parameter description |
var customerId = customer_id;
var addressId = address_id;
var body = new CustomersAddressesRequest1({"key":"value"});
var idempotencyKey = 'idempotency-key';
controller.updateAddress(customerId, addressId, body, idempotencyKey, function(error, response, context) {
});
Error Code | Error Description |
---|---|
400 | Invalid request |
401 | Invalid API key |
404 | An informed resource was not found |
412 | Business validation error |
422 | Contract validation error |
500 | Internal server error |
Delete a Customer's address
function deleteAddress(customerId, addressId, idempotencyKey, callback)
Parameter | Tags | Description |
---|---|---|
customerId | Required |
Customer Id |
addressId | Required |
Address Id |
idempotencyKey | Optional |
TODO: Add a parameter description |
var customerId = customer_id;
var addressId = address_id;
var idempotencyKey = 'idempotency-key';
controller.deleteAddress(customerId, addressId, idempotencyKey, function(error, response, context) {
});
Error Code | Error Description |
---|---|
400 | Invalid request |
401 | Invalid API key |
404 | An informed resource was not found |
412 | Business validation error |
422 | Contract validation error |
500 | Internal server error |
Creates a new card for a customer
function createCard(customerId, body, idempotencyKey, callback)
Parameter | Tags | Description |
---|---|---|
customerId | Required |
Customer id |
body | Required |
Request for creating a card |
idempotencyKey | Optional |
TODO: Add a parameter description |
var customerId = customer_id;
var body = new CustomersCardsRequest({"key":"value"});
var idempotencyKey = 'idempotency-key';
controller.createCard(customerId, body, idempotencyKey, function(error, response, context) {
});
Error Code | Error Description |
---|---|
400 | Invalid request |
401 | Invalid API key |
404 | An informed resource was not found |
412 | Business validation error |
422 | Contract validation error |
500 | Internal server error |
Get all cards from a customer
function getCards(customerId, page, size, callback)
Parameter | Tags | Description |
---|---|---|
customerId | Required |
Customer Id |
page | Optional |
Page number |
size | Optional |
Page size |
var customerId = customer_id;
var page = 74;
var size = 74;
controller.getCards(customerId, page, size, function(error, response, context) {
});
Error Code | Error Description |
---|---|
400 | Invalid request |
401 | Invalid API key |
404 | An informed resource was not found |
412 | Business validation error |
422 | Contract validation error |
500 | Internal server error |
Renew a card
function renewCard(customerId, cardId, idempotencyKey, callback)
Parameter | Tags | Description |
---|---|---|
customerId | Required |
Customer id |
cardId | Required |
Card Id |
idempotencyKey | Optional |
TODO: Add a parameter description |
var customerId = customer_id;
var cardId = card_id;
var idempotencyKey = 'idempotency-key';
controller.renewCard(customerId, cardId, idempotencyKey, function(error, response, context) {
});
Error Code | Error Description |
---|---|
400 | Invalid request |
401 | Invalid API key |
404 | An informed resource was not found |
412 | Business validation error |
422 | Contract validation error |
500 | Internal server error |
Creates a new customer
function createCustomer(body, idempotencyKey, callback)
Parameter | Tags | Description |
---|---|---|
body | Required |
Request for creating a customer |
idempotencyKey | Optional |
TODO: Add a parameter description |
var body = new CustomersRequest1({"key":"value"});
var idempotencyKey = 'idempotency-key';
controller.createCustomer(body, idempotencyKey, function(error, response, context) {
});
Error Code | Error Description |
---|---|
400 | Invalid request |
401 | Invalid API key |
404 | An informed resource was not found |
412 | Business validation error |
422 | Contract validation error |
500 | Internal server error |
Get all Customers
function getCustomers(name, document, page, size, email, code, callback)
Parameter | Tags | Description |
---|---|---|
name | Optional |
Name of the Customer |
document | Optional |
Document of the Customer |
page | Optional DefaultValue |
Current page the the search |
size | Optional DefaultValue |
Quantity pages of the search |
Optional |
Customer's email | |
code | Optional |
Customer's code |
var name = 'name';
var document = 'document';
var page = 1;
var size = 10;
var email = 'email';
var code = 'Code';
controller.getCustomers(name, document, page, size, email, code, function(error, response, context) {
});
Error Code | Error Description |
---|---|
400 | Invalid request |
401 | Invalid API key |
404 | An informed resource was not found |
412 | Business validation error |
422 | Contract validation error |
500 | Internal server error |
Updates the metadata a customer
function updateCustomerMetadata(customerId, body, idempotencyKey, callback)
Parameter | Tags | Description |
---|---|---|
customerId | Required |
The customer id |
body | Required |
Request for updating the customer metadata |
idempotencyKey | Optional |
TODO: Add a parameter description |
var customerId = customer_id;
var body = new CustomersMetadataRequest({"key":"value"});
var idempotencyKey = 'idempotency-key';
controller.updateCustomerMetadata(customerId, body, idempotencyKey, function(error, response, context) {
});
Error Code | Error Description |
---|---|
400 | Invalid request |
401 | Invalid API key |
404 | An informed resource was not found |
412 | Business validation error |
422 | Contract validation error |
500 | Internal server error |
Updates a card
function updateCard(customerId, cardId, body, idempotencyKey, callback)
Parameter | Tags | Description |
---|---|---|
customerId | Required |
Customer Id |
cardId | Required |
Card id |
body | Required |
Request for updating a card |
idempotencyKey | Optional |
TODO: Add a parameter description |
var customerId = customer_id;
var cardId = card_id;
var body = new CustomersCardsRequest1({"key":"value"});
var idempotencyKey = 'idempotency-key';
controller.updateCard(customerId, cardId, body, idempotencyKey, function(error, response, context) {
});
Error Code | Error Description |
---|---|
400 | Invalid request |
401 | Invalid API key |
404 | An informed resource was not found |
412 | Business validation error |
422 | Contract validation error |
500 | Internal server error |
Delete a customer's card
function deleteCard(customerId, cardId, idempotencyKey, callback)
Parameter | Tags | Description |
---|---|---|
customerId | Required |
Customer Id |
cardId | Required |
Card Id |
idempotencyKey | Optional |
TODO: Add a parameter description |
var customerId = customer_id;
var cardId = card_id;
var idempotencyKey = 'idempotency-key';
controller.deleteCard(customerId, cardId, idempotencyKey, function(error, response, context) {
});
Error Code | Error Description |
---|---|
400 | Invalid request |
401 | Invalid API key |
404 | An informed resource was not found |
412 | Business validation error |
422 | Contract validation error |
500 | Internal server error |
Get a customer's card
function getCard(customerId, cardId, callback)
Parameter | Tags | Description |
---|---|---|
customerId | Required |
Customer id |
cardId | Required |
Card id |
var customerId = customer_id;
var cardId = card_id;
controller.getCard(customerId, cardId, function(error, response, context) {
});
Error Code | Error Description |
---|---|
400 | Invalid request |
401 | Invalid API key |
404 | An informed resource was not found |
412 | Business validation error |
422 | Contract validation error |
500 | Internal server error |
The singleton instance of the ChargesController
class can be accessed from the API Client.
var controller = lib.ChargesController;
Get a charge from its id
function getCharge(chargeId, callback)
Parameter | Tags | Description |
---|---|---|
chargeId | Required |
Charge id |
var chargeId = charge_id;
controller.getCharge(chargeId, function(error, response, context) {
});
Error Code | Error Description |
---|---|
400 | Invalid request |
401 | Invalid API key |
404 | An informed resource was not found |
412 | Business validation error |
422 | Contract validation error |
500 | Internal server error |
Cancel a charge
function cancelCharge(chargeId, idempotencyKey, body, callback)
Parameter | Tags | Description |
---|---|---|
chargeId | Required |
Charge id |
idempotencyKey | Optional |
TODO: Add a parameter description |
body | Optional |
Request for cancelling a charge |
var chargeId = charge_id;
var idempotencyKey = 'idempotency-key';
var body = new ChargesRequest({"key":"value"});
controller.cancelCharge(chargeId, idempotencyKey, body, function(error, response, context) {
});
Error Code | Error Description |
---|---|
400 | Invalid request |
401 | Invalid API key |
404 | An informed resource was not found |
412 | Business validation error |
422 | Contract validation error |
500 | Internal server error |
ConfirmPayment
function confirmPayment(chargeId, idempotencyKey, body, callback)
Parameter | Tags | Description |
---|---|---|
chargeId | Required |
TODO: Add a parameter description |
idempotencyKey | Optional |
TODO: Add a parameter description |
body | Optional |
Request for confirm payment |
var chargeId = charge_id;
var idempotencyKey = 'idempotency-key';
var body = new CreateConfirmPaymentRequest({"key":"value"});
controller.confirmPayment(chargeId, idempotencyKey, body, function(error, response, context) {
});
Error Code | Error Description |
---|---|
400 | Invalid request |
401 | Invalid API key |
404 | An informed resource was not found |
412 | Business validation error |
422 | Contract validation error |
500 | Internal server error |
Updates the card from a charge
function updateChargeCard(chargeId, body, idempotencyKey, callback)
Parameter | Tags | Description |
---|---|---|
chargeId | Required |
Charge id |
body | Required |
Request for updating a charge's card |
idempotencyKey | Optional |
TODO: Add a parameter description |
var chargeId = charge_id;
var body = new ChargesCardRequest({"key":"value"});
var idempotencyKey = 'idempotency-key';
controller.updateChargeCard(chargeId, body, idempotencyKey, function(error, response, context) {
});
Error Code | Error Description |
---|---|
400 | Invalid request |
401 | Invalid API key |
404 | An informed resource was not found |
412 | Business validation error |
422 | Contract validation error |
500 | Internal server error |
Lists all charges
function getCharges(page, size, code, status, paymentMethod, customerId, orderId, createdSince, createdUntil, callback)
Parameter | Tags | Description |
---|---|---|
page | Optional |
Page number |
size | Optional |
Page size |
code | Optional |
Filter for charge's code |
status | Optional |
Filter for charge's status |
paymentMethod | Optional |
Filter for charge's payment method |
customerId | Optional |
Filter for charge's customer id |
orderId | Optional |
Filter for charge's order id |
createdSince | Optional |
Filter for the beginning of the range for charge's creation |
createdUntil | Optional |
Filter for the end of the range for charge's creation |
var page = 74;
var size = 74;
var code = 'code';
var status = 'status';
var paymentMethod = payment_method;
var customerId = customer_id;
var orderId = order_id;
var createdSince = date("D M d, Y G:i");
var createdUntil = date("D M d, Y G:i");
controller.getCharges(page, size, code, status, paymentMethod, customerId, orderId, createdSince, createdUntil, function(error, response, context) {
});
Error Code | Error Description |
---|---|
400 | Invalid request |
401 | Invalid API key |
404 | An informed resource was not found |
412 | Business validation error |
422 | Contract validation error |
500 | Internal server error |
Retries a charge
function retryCharge(chargeId, idempotencyKey, callback)
Parameter | Tags | Description |
---|---|---|
chargeId | Required |
Charge id |
idempotencyKey | Optional |
TODO: Add a parameter description |
var chargeId = charge_id;
var idempotencyKey = 'idempotency-key';
controller.retryCharge(chargeId, idempotencyKey, function(error, response, context) {
});
Error Code | Error Description |
---|---|
400 | Invalid request |
401 | Invalid API key |
404 | An informed resource was not found |
412 | Business validation error |
422 | Contract validation error |
500 | Internal server error |
Updates a charge's payment method
function updateChargePaymentMethod(chargeId, body, idempotencyKey, callback)
Parameter | Tags | Description |
---|---|---|
chargeId | Required |
Charge id |
body | Required |
Request for updating the payment method from a charge |
idempotencyKey | Optional |
TODO: Add a parameter description |
var chargeId = charge_id;
var body = new ChargesPaymentMethodRequest({"key":"value"});
var idempotencyKey = 'idempotency-key';
controller.updateChargePaymentMethod(chargeId, body, idempotencyKey, function(error, response, context) {
});
Error Code | Error Description |
---|---|
400 | Invalid request |
401 | Invalid API key |
404 | An informed resource was not found |
412 | Business validation error |
422 | Contract validation error |
500 | Internal server error |
Updates the metadata from a charge
function updateChargeMetadata(chargeId, body, idempotencyKey, callback)
Parameter | Tags | Description |
---|---|---|
chargeId | Required |
The charge id |
body | Required |
Request for updating the charge metadata |
idempotencyKey | Optional |
TODO: Add a parameter description |
var chargeId = charge_id;
var body = new ChargesMetadataRequest({"key":"value"});
var idempotencyKey = 'idempotency-key';
controller.updateChargeMetadata(chargeId, body, idempotencyKey, function(error, response, context) {
});
Error Code | Error Description |
---|---|
400 | Invalid request |
401 | Invalid API key |
404 | An informed resource was not found |
412 | Business validation error |
422 | Contract validation error |
500 | Internal server error |
Captures a charge
function captureCharge(chargeId, idempotencyKey, body, callback)
Parameter | Tags | Description |
---|---|---|
chargeId | Required |
Charge id |
idempotencyKey | Optional |
TODO: Add a parameter description |
body | Optional |
Request for capturing a charge |
var chargeId = charge_id;
var idempotencyKey = 'idempotency-key';
var body = new ChargesCaptureRequest({"key":"value"});
controller.captureCharge(chargeId, idempotencyKey, body, function(error, response, context) {
});
Error Code | Error Description |
---|---|
400 | Invalid request |
401 | Invalid API key |
404 | An informed resource was not found |
412 | Business validation error |
422 | Contract validation error |
500 | Internal server error |
Updates the due date from a charge
function updateChargeDueDate(chargeId, body, idempotencyKey, callback)
Parameter | Tags | Description |
---|---|---|
chargeId | Required |
Charge Id |
body | Required |
Request for updating the due date |
idempotencyKey | Optional |
TODO: Add a parameter description |
var chargeId = charge_id;
var body = new ChargesDueDateRequest({"key":"value"});
var idempotencyKey = 'idempotency-key';
controller.updateChargeDueDate(chargeId, body, idempotencyKey, function(error, response, context) {
});
Error Code | Error Description |
---|---|
400 | Invalid request |
401 | Invalid API key |
404 | An informed resource was not found |
412 | Business validation error |
422 | Contract validation error |
500 | Internal server error |
Creates a new charge
function createCharge(body, idempotencyKey, callback)
Parameter | Tags | Description |
---|---|---|
body | Required |
Request for creating a charge |
idempotencyKey | Optional |
TODO: Add a parameter description |
var body = new ChargesRequest1({"key":"value"});
var idempotencyKey = 'idempotency-key';
controller.createCharge(body, idempotencyKey, function(error, response, context) {
});
Error Code | Error Description |
---|---|
400 | Invalid request |
401 | Invalid API key |
404 | An informed resource was not found |
412 | Business validation error |
422 | Contract validation error |
500 | Internal server error |
GetChargeTransactions
function getChargeTransactions(chargeId, page, size, callback)
Parameter | Tags | Description |
---|---|---|
chargeId | Required |
Charge Id |
page | Optional |
Page number |
size | Optional |
Page size |
var chargeId = charge_id;
var page = 74;
var size = 74;
controller.getChargeTransactions(chargeId, page, size, function(error, response, context) {
});
Error Code | Error Description |
---|---|
400 | Invalid request |
401 | Invalid API key |
404 | An informed resource was not found |
412 | Business validation error |
422 | Contract validation error |
500 | Internal server error |
GetChargesSummary
function getChargesSummary(status, createdSince, createdUntil, callback)
Parameter | Tags | Description |
---|---|---|
status | Required |
TODO: Add a parameter description |
createdSince | Optional |
TODO: Add a parameter description |
createdUntil | Optional |
TODO: Add a parameter description |
var status = 'status';
var createdSince = date("D M d, Y G:i");
var createdUntil = date("D M d, Y G:i");
controller.getChargesSummary(status, createdSince, createdUntil, function(error, response, context) {
});
Error Code | Error Description |
---|---|
400 | Invalid request |
401 | Invalid API key |
404 | An informed resource was not found |
412 | Business validation error |
422 | Contract validation error |
500 | Internal server error |
The singleton instance of the RecipientsController
class can be accessed from the API Client.
var controller = lib.RecipientsController;
Updates recipient metadata
function updateRecipientMetadata(recipientId, body, idempotencyKey, callback)
Parameter | Tags | Description |
---|---|---|
recipientId | Required |
Recipient id |
body | Required |
Metadata |
idempotencyKey | Optional |
TODO: Add a parameter description |
var recipientId = recipient_id;
var body = new RecipientsMetadataRequest({"key":"value"});
var idempotencyKey = 'idempotency-key';
controller.updateRecipientMetadata(recipientId, body, idempotencyKey, function(error, response, context) {
});
Error Code | Error Description |
---|---|
400 | Invalid request |
401 | Invalid API key |
404 | An informed resource was not found |
412 | Business validation error |
422 | Contract validation error |
500 | Internal server error |
UpdateRecipientTransferSettings
function updateRecipientTransferSettings(recipientId, body, idempotencyKey, callback)
Parameter | Tags | Description |
---|---|---|
recipientId | Required |
Recipient Identificator |
body | Required |
TODO: Add a parameter description |
idempotencyKey | Optional |
TODO: Add a parameter description |
var recipientId = recipient_id;
var body = new UpdateTransferSettingsRequest({"key":"value"});
var idempotencyKey = 'idempotency-key';
controller.updateRecipientTransferSettings(recipientId, body, idempotencyKey, function(error, response, context) {
});
Error Code | Error Description |
---|---|
400 | Invalid request |
401 | Invalid API key |
404 | An informed resource was not found |
412 | Business validation error |
422 | Contract validation error |
500 | Internal server error |
Gets an anticipation
function getAnticipation(recipientId, anticipationId, callback)
Parameter | Tags | Description |
---|---|---|
recipientId | Required |
Recipient id |
anticipationId | Required |
Anticipation id |
var recipientId = recipient_id;
var anticipationId = anticipation_id;
controller.getAnticipation(recipientId, anticipationId, function(error, response, context) {
});
Error Code | Error Description |
---|---|
400 | Invalid request |
401 | Invalid API key |
404 | An informed resource was not found |
412 | Business validation error |
422 | Contract validation error |
500 | Internal server error |
Retrieves paginated recipients information
function getRecipients(page, size, callback)
Parameter | Tags | Description |
---|---|---|
page | Optional |
Page number |
size | Optional |
Page size |
var page = 33;
var size = 33;
controller.getRecipients(page, size, function(error, response, context) {
});
Error Code | Error Description |
---|---|
400 | Invalid request |
401 | Invalid API key |
404 | An informed resource was not found |
412 | Business validation error |
422 | Contract validation error |
500 | Internal server error |
Creates a new recipient
function createRecipient(body, idempotencyKey, callback)
Parameter | Tags | Description |
---|---|---|
body | Required |
Recipient data |
idempotencyKey | Optional |
TODO: Add a parameter description |
var body = new RecipientsRequest({"key":"value"});
var idempotencyKey = 'idempotency-key';
controller.createRecipient(body, idempotencyKey, function(error, response, context) {
});
Error Code | Error Description |
---|---|
400 | Invalid request |
401 | Invalid API key |
404 | An informed resource was not found |
412 | Business validation error |
422 | Contract validation error |
500 | Internal server error |
Get balance information for a recipient
function getBalance(recipientId, callback)
Parameter | Tags | Description |
---|---|---|
recipientId | Required |
Recipient id |
var recipientId = recipient_id;
controller.getBalance(recipientId, function(error, response, context) {
});
Error Code | Error Description |
---|---|
400 | Invalid request |
401 | Invalid API key |
404 | An informed resource was not found |
412 | Business validation error |
422 | Contract validation error |
500 | Internal server error |
Retrieves a paginated list of anticipations from a recipient
function getAnticipations(recipientId, page, size, status, timeframe, paymentDateSince, paymentDateUntil, createdSince, createdUntil, callback)
Parameter | Tags | Description |
---|---|---|
recipientId | Required |
Recipient id |
page | Optional |
Page number |
size | Optional |
Page size |
status | Optional |
Filter for anticipation status |
timeframe | Optional |
Filter for anticipation timeframe |
paymentDateSince | Optional |
Filter for start range for anticipation payment date |
paymentDateUntil | Optional |
Filter for end range for anticipation payment date |
createdSince | Optional |
Filter for start range for anticipation creation date |
createdUntil | Optional |
Filter for end range for anticipation creation date |
var recipientId = recipient_id;
var page = 33;
var size = 33;
var status = 'status';
var timeframe = 'timeframe';
var paymentDateSince = date("D M d, Y G:i");
var paymentDateUntil = date("D M d, Y G:i");
var createdSince = date("D M d, Y G:i");
var createdUntil = date("D M d, Y G:i");
controller.getAnticipations(recipientId, page, size, status, timeframe, paymentDateSince, paymentDateUntil, createdSince, createdUntil, function(error, response, context) {
});
Error Code | Error Description |
---|---|
400 | Invalid request |
401 | Invalid API key |
404 | An informed resource was not found |
412 | Business validation error |
422 | Contract validation error |
500 | Internal server error |
Creates an anticipation
function createAnticipation(recipientId, body, idempotencyKey, callback)
Parameter | Tags | Description |
---|---|---|
recipientId | Required |
Recipient id |
body | Required |
Anticipation data |
idempotencyKey | Optional |
TODO: Add a parameter description |
var recipientId = recipient_id;
var body = new RecipientsAnticipationsRequest({"key":"value"});
var idempotencyKey = 'idempotency-key';
controller.createAnticipation(recipientId, body, idempotencyKey, function(error, response, context) {
});
Error Code | Error Description |
---|---|
400 | Invalid request |
401 | Invalid API key |
404 | An informed resource was not found |
412 | Business validation error |
422 | Contract validation error |
500 | Internal server error |
Updates the default bank account from a recipient
function updateRecipientDefaultBankAccount(recipientId, body, idempotencyKey, callback)
Parameter | Tags | Description |
---|---|---|
recipientId | Required |
Recipient id |
body | Required |
Bank account data |
idempotencyKey | Optional |
TODO: Add a parameter description |
var recipientId = recipient_id;
var body = new RecipientsDefaultBankAccountRequest({"key":"value"});
var idempotencyKey = 'idempotency-key';
controller.updateRecipientDefaultBankAccount(recipientId, body, idempotencyKey, function(error, response, context) {
});
Error Code | Error Description |
---|---|
400 | Invalid request |
401 | Invalid API key |
404 | An informed resource was not found |
412 | Business validation error |
422 | Contract validation error |
500 | Internal server error |
Retrieves recipient information
function getRecipient(recipientId, callback)
Parameter | Tags | Description |
---|---|---|
recipientId | Required |
Recipiend id |
var recipientId = recipient_id;
controller.getRecipient(recipientId, function(error, response, context) {
});
Error Code | Error Description |
---|---|
400 | Invalid request |
401 | Invalid API key |
404 | An informed resource was not found |
412 | Business validation error |
422 | Contract validation error |
500 | Internal server error |
Updates a recipient
function updateRecipient(recipientId, body, idempotencyKey, callback)
Parameter | Tags | Description |
---|---|---|
recipientId | Required |
Recipient id |
body | Required |
Recipient data |
idempotencyKey | Optional |
TODO: Add a parameter description |
var recipientId = recipient_id;
var body = new RecipientsRequest1({"key":"value"});
var idempotencyKey = 'idempotency-key';
controller.updateRecipient(recipientId, body, idempotencyKey, function(error, response, context) {
});
Error Code | Error Description |
---|---|
400 | Invalid request |
401 | Invalid API key |
404 | An informed resource was not found |
412 | Business validation error |
422 | Contract validation error |
500 | Internal server error |
Gets a transfer
function getTransfer(recipientId, transferId, callback)
Parameter | Tags | Description |
---|---|---|
recipientId | Required |
Recipient id |
transferId | Required |
Transfer id |
var recipientId = recipient_id;
var transferId = transfer_id;
controller.getTransfer(recipientId, transferId, function(error, response, context) {
});
Error Code | Error Description |
---|---|
400 | Invalid request |
401 | Invalid API key |
404 | An informed resource was not found |
412 | Business validation error |
422 | Contract validation error |
500 | Internal server error |
Gets a paginated list of transfers for the recipient
function getTransfers(recipientId, page, size, status, createdSince, createdUntil, callback)
Parameter | Tags | Description |
---|---|---|
recipientId | Required |
Recipient id |
page | Optional |
Page number |
size | Optional |
Page size |
status | Optional |
Filter for transfer status |
createdSince | Optional |
Filter for start range of transfer creation date |
createdUntil | Optional |
Filter for end range of transfer creation date |
var recipientId = recipient_id;
var page = 33;
var size = 33;
var status = 'status';
var createdSince = date("D M d, Y G:i");
var createdUntil = date("D M d, Y G:i");
controller.getTransfers(recipientId, page, size, status, createdSince, createdUntil, function(error, response, context) {
});
Error Code | Error Description |
---|---|
400 | Invalid request |
401 | Invalid API key |
404 | An informed resource was not found |
412 | Business validation error |
422 | Contract validation error |
500 | Internal server error |
Creates a transfer for a recipient
function createTransfer(recipientId, body, idempotencyKey, callback)
Parameter | Tags | Description |
---|---|---|
recipientId | Required |
Recipient Id |
body | Required |
Transfer data |
idempotencyKey | Optional |
TODO: Add a parameter description |
var recipientId = recipient_id;
var body = new RecipientsTransfersRequest({"key":"value"});
var idempotencyKey = 'idempotency-key';
controller.createTransfer(recipientId, body, idempotencyKey, function(error, response, context) {
});
Error Code | Error Description |
---|---|
400 | Invalid request |
401 | Invalid API key |
404 | An informed resource was not found |
412 | Business validation error |
422 | Contract validation error |
500 | Internal server error |
Gets the anticipation limits for a recipient
function getAnticipationLimits(recipientId, timeframe, paymentDate, callback)
Parameter | Tags | Description |
---|---|---|
recipientId | Required |
Recipient id |
timeframe | Required |
Timeframe |
paymentDate | Required |
Anticipation payment date |
var recipientId = recipient_id;
var timeframe = 'timeframe';
var paymentDate = date("D M d, Y G:i");
controller.getAnticipationLimits(recipientId, timeframe, paymentDate, function(error, response, context) {
});
Error Code | Error Description |
---|---|
400 | Invalid request |
401 | Invalid API key |
404 | An informed resource was not found |
412 | Business validation error |
422 | Contract validation error |
500 | Internal server error |
CreateWithdraw
function createWithdraw(recipientId, body, callback)
Parameter | Tags | Description |
---|---|---|
recipientId | Required |
TODO: Add a parameter description |
body | Required |
TODO: Add a parameter description |
var recipientId = recipient_id;
var body = new CreateWithdrawRequest({"key":"value"});
controller.createWithdraw(recipientId, body, function(error, response, context) {
});
Error Code | Error Description |
---|---|
400 | Invalid request |
401 | Invalid API key |
404 | An informed resource was not found |
412 | Business validation error |
422 | Contract validation error |
500 | Internal server error |
Gets a paginated list of transfers for the recipient
function getWithdrawals(recipientId, page, size, status, createdSince, createdUntil, callback)
Parameter | Tags | Description |
---|---|---|
recipientId | Required |
TODO: Add a parameter description |
page | Optional |
TODO: Add a parameter description |
size | Optional |
TODO: Add a parameter description |
status | Optional |
TODO: Add a parameter description |
createdSince | Optional |
TODO: Add a parameter description |
createdUntil | Optional |
TODO: Add a parameter description |
var recipientId = recipient_id;
var page = 33;
var size = 33;
var status = 'status';
var createdSince = date("D M d, Y G:i");
var createdUntil = date("D M d, Y G:i");
controller.getWithdrawals(recipientId, page, size, status, createdSince, createdUntil, function(error, response, context) {
});
Error Code | Error Description |
---|---|
400 | Invalid request |
401 | Invalid API key |
404 | An informed resource was not found |
412 | Business validation error |
422 | Contract validation error |
500 | Internal server error |
GetWithdrawById
function getWithdrawById(recipientId, withdrawalId, callback)
Parameter | Tags | Description |
---|---|---|
recipientId | Required |
TODO: Add a parameter description |
withdrawalId | Required |
TODO: Add a parameter description |
var recipientId = recipient_id;
var withdrawalId = withdrawal_id;
controller.getWithdrawById(recipientId, withdrawalId, function(error, response, context) {
});
Error Code | Error Description |
---|---|
400 | Invalid request |
401 | Invalid API key |
404 | An informed resource was not found |
412 | Business validation error |
422 | Contract validation error |
500 | Internal server error |
Updates recipient metadata
function updateAutomaticAnticipationSettings(recipientId, body, idempotencyKey, callback)
Parameter | Tags | Description |
---|---|---|
recipientId | Required |
Recipient id |
body | Required |
Metadata |
idempotencyKey | Optional |
TODO: Add a parameter description |
var recipientId = recipient_id;
var body = new UpdateAutomaticAnticipationSettingsRequest({"key":"value"});
var idempotencyKey = 'idempotency-key';
controller.updateAutomaticAnticipationSettings(recipientId, body, idempotencyKey, function(error, response, context) {
});
Error Code | Error Description |
---|---|
400 | Invalid request |
401 | Invalid API key |
404 | An informed resource was not found |
412 | Business validation error |
422 | Contract validation error |
500 | Internal server error |
Retrieves recipient information
function getRecipientByCode(code, callback)
Parameter | Tags | Description |
---|---|---|
code | Required |
Recipient code |
var code = 'code';
controller.getRecipientByCode(code, function(error, response, context) {
});
Error Code | Error Description |
---|---|
400 | Invalid request |
401 | Invalid API key |
404 | An informed resource was not found |
412 | Business validation error |
422 | Contract validation error |
500 | Internal server error |
The singleton instance of the TokensController
class can be accessed from the API Client.
var controller = lib.TokensController;
Tags:
Skips Authentication
CreateToken
function createToken(publicKey, body, idempotencyKey, appId, callback)
Parameter | Tags | Description |
---|---|---|
publicKey | Required |
Public key |
body | Required |
Request for creating a token |
idempotencyKey | Optional |
TODO: Add a parameter description |
appId | Optional |
TODO: Add a parameter description |
var publicKey = public_key;
var body = new TokensRequest({"key":"value"});
var idempotencyKey = 'idempotency-key';
var appId = 'appId';
controller.createToken(publicKey, body, idempotencyKey, appId, function(error, response, context) {
});
Error Code | Error Description |
---|---|
400 | Invalid request |
401 | Invalid API key |
404 | An informed resource was not found |
412 | Business validation error |
422 | Contract validation error |
500 | Internal server error |
Tags:
Skips Authentication
Gets a token from its id
function getToken(id, publicKey, appId, callback)
Parameter | Tags | Description |
---|---|---|
id | Required |
Token id |
publicKey | Required |
Public key |
appId | Optional |
TODO: Add a parameter description |
var id = 'id';
var publicKey = public_key;
var appId = 'appId';
controller.getToken(id, publicKey, appId, function(error, response, context) {
});
Error Code | Error Description |
---|---|
400 | Invalid request |
401 | Invalid API key |
404 | An informed resource was not found |
412 | Business validation error |
422 | Contract validation error |
500 | Internal server error |
The singleton instance of the TransactionsController
class can be accessed from the API Client.
var controller = lib.TransactionsController;
GetTransaction
function getTransaction(transactionId, callback)
Parameter | Tags | Description |
---|---|---|
transactionId | Required |
TODO: Add a parameter description |
var transactionId = transaction_id;
controller.getTransaction(transactionId, function(error, response, context) {
});
Error Code | Error Description |
---|---|
400 | Invalid request |
401 | Invalid API key |
404 | An informed resource was not found |
412 | Business validation error |
422 | Contract validation error |
500 | Internal server error |
The singleton instance of the TransfersController
class can be accessed from the API Client.
var controller = lib.TransfersController;
CreateTransfer
function postCreateTransfer(body, callback)
Parameter | Tags | Description |
---|---|---|
body | Required |
TODO: Add a parameter description |
var body = new CreateTransfer({"key":"value"});
controller.postCreateTransfer(body, function(error, response, context) {
});
Error Code | Error Description |
---|---|
400 | Invalid request |
401 | Invalid API key |
404 | An informed resource was not found |
412 | Business validation error |
422 | Contract validation error |
500 | Internal server error |
GetTransferById
function getTransferById(transferId, callback)
Parameter | Tags | Description |
---|---|---|
transferId | Required |
TODO: Add a parameter description |
var transferId = transfer_id;
controller.getTransferById(transferId, function(error, response, context) {
});
Error Code | Error Description |
---|---|
400 | Invalid request |
401 | Invalid API key |
404 | An informed resource was not found |
412 | Business validation error |
422 | Contract validation error |
500 | Internal server error |
Gets all transfers
function getTransfers1(callback)
controller.getTransfers1(function(error, response, context) {
});
Error Code | Error Description |
---|---|
400 | Invalid request |
401 | Invalid API key |
404 | An informed resource was not found |
412 | Business validation error |
422 | Contract validation error |
500 | Internal server error |