Mundipagg API
The generated code uses a few Maven dependencies e.g., Jackson, UniRest, and Apache HttpClient. The reference to these dependencies is already added in the pom.xml file will be installed automatically. Therefore, you will need internet access for a successful build.
- In order to open the client library in Eclipse click on
File -> Import
.
- In the import dialog, select
Existing Java Project
and clickNext
.
- Browse to locate the folder containing the source code. Select the detected location of the project and click
Finish
.
- Upon successful import, the project will be automatically built by Eclipse after automatically resolving the dependencies.
The following section explains how to use the MundiAPI library in a new console project.
For starting a new project, click the menu command File > New > Project
.
Next, choose Maven > Maven Project
and click Next
.
Here, make sure to use the current workspace by choosing Use default Workspace location
, as shown in the picture below and click Next
.
Following this, select the quick start project type to create a simple project with an existing class and a main
method. To do this, choose maven-archetype-quickstart
item from the list and click Next
.
In the last step, provide a Group Id
and Artifact Id
as shown in the picture below and click Finish
.
The created Maven project manages its dependencies using its pom.xml
file. In order to add a dependency on the MundiAPILib client library, double click on the pom.xml
file in the Package Explorer
. Opening the pom.xml
file will render a graphical view on the cavas. Here, switch to the Dependencies
tab and click the Add
button as shown in the picture below.
Clicking the Add
button will open a dialog where you need to specify MundiAPI in Group Id
and MundiAPILib in the Artifact Id
fields. Once added click OK
. Save the pom.xml
file.
Once the SimpleConsoleApp
is created, a file named App.java
will be visible in the Package Explorer with a main
method. This is the entry point for the execution of the created project.
Here, you can add code to initialize the client library and instantiate a Controller class. Sample code to initialize the client library and using controller methods is given in the subsequent sections.
The generated code and the server can be tested using automatically generated test cases. JUnit is used as the testing framework and test runner.
In Eclipse, for running the tests do the following:
- Select the project MundiAPILib from the package explorer.
- Select "Run -> Run as -> JUnit Test" or use "Alt + Shift + X" followed by "T" to run the Tests.
In order to setup authentication and initialization of the API client, you need the following information.
Parameter | Description |
---|---|
basicAuthUserName | The username to use with basic authentication |
basicAuthPassword | The password to use with basic authentication |
API client can be initialized as following.
// Configuration parameters and credentials
String basicAuthUserName = "basicAuthUserName"; // The username to use with basic authentication
String basicAuthPassword = "basicAuthPassword"; // The password to use with basic authentication
MundiAPIClient client = new MundiAPIClient(basicAuthUserName, basicAuthPassword);
- ChargesController
- CustomersController
- InvoicesController
- PlansController
- SubscriptionsController
- OrdersController
- TokensController
- RecipientsController
The singleton instance of the ChargesController
class can be accessed from the API Client.
ChargesController charges = client.getCharges();
Get a charge from its id
void getChargeAsync(
final String chargeId,
final APICallBack<GetChargeResponse> callBack)
Parameter | Tags | Description |
---|---|---|
chargeId | Required |
Charge id |
String chargeId = "charge_id";
// Invoking the API call with sample inputs
charges.getChargeAsync(chargeId, new APICallBack<GetChargeResponse>() {
public void onSuccess(HttpContext context, GetChargeResponse response) {
// TODO success callback handler
}
public void onFailure(HttpContext context, Throwable error) {
// TODO failure callback handler
}
});
Retries a charge
void retryChargeAsync(
final String chargeId,
final APICallBack<GetChargeResponse> callBack)
Parameter | Tags | Description |
---|---|---|
chargeId | Required |
Charge id |
String chargeId = "charge_id";
// Invoking the API call with sample inputs
charges.retryChargeAsync(chargeId, new APICallBack<GetChargeResponse>() {
public void onSuccess(HttpContext context, GetChargeResponse response) {
// TODO success callback handler
}
public void onFailure(HttpContext context, Throwable error) {
// TODO failure callback handler
}
});
Creates a new charge
void createChargeAsync(
final CreateChargeRequest request,
final APICallBack<GetChargeResponse> callBack)
Parameter | Tags | Description |
---|---|---|
request | Required |
Request for creating a charge |
try {
CreateChargeRequest request = new CreateChargeRequest();
// Invoking the API call with sample inputs
charges.createChargeAsync(request, new APICallBack<GetChargeResponse>() {
public void onSuccess(HttpContext context, GetChargeResponse response) {
// TODO success callback handler
}
public void onFailure(HttpContext context, Throwable error) {
// TODO failure callback handler
}
});
} catch(JsonProcessingException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
Updates the card from a charge
void updateChargeCardAsync(
final String chargeId,
final UpdateChargeCardRequest request,
final APICallBack<GetChargeResponse> callBack)
Parameter | Tags | Description |
---|---|---|
chargeId | Required |
Charge id |
request | Required |
Request for updating a charge's card |
try {
String chargeId = "charge_id";
UpdateChargeCardRequest request = new UpdateChargeCardRequest();
// Invoking the API call with sample inputs
charges.updateChargeCardAsync(chargeId, request, new APICallBack<GetChargeResponse>() {
public void onSuccess(HttpContext context, GetChargeResponse response) {
// TODO success callback handler
}
public void onFailure(HttpContext context, Throwable error) {
// TODO failure callback handler
}
});
} catch(JsonProcessingException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
Updates a charge's payment method
void updateChargePaymentMethodAsync(
final String chargeId,
final UpdateChargePaymentMethodRequest request,
final APICallBack<GetChargeResponse> callBack)
Parameter | Tags | Description |
---|---|---|
chargeId | Required |
Charge id |
request | Required |
Request for updating the payment method from a charge |
try {
String chargeId = "charge_id";
UpdateChargePaymentMethodRequest request = new UpdateChargePaymentMethodRequest();
// Invoking the API call with sample inputs
charges.updateChargePaymentMethodAsync(chargeId, request, new APICallBack<GetChargeResponse>() {
public void onSuccess(HttpContext context, GetChargeResponse response) {
// TODO success callback handler
}
public void onFailure(HttpContext context, Throwable error) {
// TODO failure callback handler
}
});
} catch(JsonProcessingException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
Cancel a charge
void cancelChargeAsync(
final String chargeId,
final CreateCancelChargeRequest request,
final APICallBack<GetChargeResponse> callBack)
Parameter | Tags | Description |
---|---|---|
chargeId | Required |
Charge id |
request | Optional |
Request for cancelling a charge |
try {
String chargeId = "charge_id";
CreateCancelChargeRequest request = new CreateCancelChargeRequest();
// Invoking the API call with sample inputs
charges.cancelChargeAsync(chargeId, request, new APICallBack<GetChargeResponse>() {
public void onSuccess(HttpContext context, GetChargeResponse response) {
// TODO success callback handler
}
public void onFailure(HttpContext context, Throwable error) {
// TODO failure callback handler
}
});
} catch(JsonProcessingException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
Captures a charge
void captureChargeAsync(
final String chargeId,
final CreateCaptureChargeRequest request,
final APICallBack<GetChargeResponse> callBack)
Parameter | Tags | Description |
---|---|---|
chargeId | Required |
Charge id |
request | Optional |
Request for capturing a charge |
try {
String chargeId = "charge_id";
CreateCaptureChargeRequest request = new CreateCaptureChargeRequest();
// Invoking the API call with sample inputs
charges.captureChargeAsync(chargeId, request, new APICallBack<GetChargeResponse>() {
public void onSuccess(HttpContext context, GetChargeResponse response) {
// TODO success callback handler
}
public void onFailure(HttpContext context, Throwable error) {
// TODO failure callback handler
}
});
} catch(JsonProcessingException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
Updates the metadata from a charge
void updateChargeMetadataAsync(
final String chargeId,
final UpdateMetadataRequest request,
final APICallBack<GetChargeResponse> callBack)
Parameter | Tags | Description |
---|---|---|
chargeId | Required |
The charge id |
request | Required |
Request for updating the charge metadata |
try {
String chargeId = "charge_id";
UpdateMetadataRequest request = new UpdateMetadataRequest();
// Invoking the API call with sample inputs
charges.updateChargeMetadataAsync(chargeId, request, new APICallBack<GetChargeResponse>() {
public void onSuccess(HttpContext context, GetChargeResponse response) {
// TODO success callback handler
}
public void onFailure(HttpContext context, Throwable error) {
// TODO failure callback handler
}
});
} catch(JsonProcessingException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
Lists all charges
void getChargesAsync(
final Integer page,
final Integer size,
final String code,
final String status,
final String paymentMethod,
final String customerId,
final String orderId,
final DateTime createdSince,
final DateTime createdUntil,
final APICallBack<ListChargesResponse> 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 |
Integer page = 144;
Integer size = 144;
String code = "code";
String status = "status";
String paymentMethod = "payment_method";
String customerId = "customer_id";
String orderId = "order_id";
DateTime createdSince = new Date();
DateTime createdUntil = new Date();
// Invoking the API call with sample inputs
charges.getChargesAsync(page, size, code, status, paymentMethod, customerId, orderId, createdSince, createdUntil, new APICallBack<ListChargesResponse>() {
public void onSuccess(HttpContext context, ListChargesResponse response) {
// TODO success callback handler
}
public void onFailure(HttpContext context, Throwable error) {
// TODO failure callback handler
}
});
The singleton instance of the CustomersController
class can be accessed from the API Client.
CustomersController customers = client.getCustomers();
Creates a new customer
void createCustomerAsync(
final CreateCustomerRequest request,
final APICallBack<GetCustomerResponse> callBack)
Parameter | Tags | Description |
---|---|---|
request | Required |
Request for creating a customer |
try {
CreateCustomerRequest request = new CreateCustomerRequest();
// Invoking the API call with sample inputs
customers.createCustomerAsync(request, new APICallBack<GetCustomerResponse>() {
public void onSuccess(HttpContext context, GetCustomerResponse response) {
// TODO success callback handler
}
public void onFailure(HttpContext context, Throwable error) {
// TODO failure callback handler
}
});
} catch(JsonProcessingException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
Get a customer
void getCustomerAsync(
final String customerId,
final APICallBack<GetCustomerResponse> callBack)
Parameter | Tags | Description |
---|---|---|
customerId | Required |
Customer Id |
String customerId = "customer_id";
// Invoking the API call with sample inputs
customers.getCustomerAsync(customerId, new APICallBack<GetCustomerResponse>() {
public void onSuccess(HttpContext context, GetCustomerResponse response) {
// TODO success callback handler
}
public void onFailure(HttpContext context, Throwable error) {
// TODO failure callback handler
}
});
Updates a card
void updateCardAsync(
final String customerId,
final String cardId,
final UpdateCardRequest request,
final APICallBack<GetCardResponse> callBack)
Parameter | Tags | Description |
---|---|---|
customerId | Required |
Customer Id |
cardId | Required |
Card id |
request | Required |
Request for updating a card |
try {
String customerId = "customer_id";
String cardId = "card_id";
UpdateCardRequest request = new UpdateCardRequest();
// Invoking the API call with sample inputs
customers.updateCardAsync(customerId, cardId, request, new APICallBack<GetCardResponse>() {
public void onSuccess(HttpContext context, GetCardResponse response) {
// TODO success callback handler
}
public void onFailure(HttpContext context, Throwable error) {
// TODO failure callback handler
}
});
} catch(JsonProcessingException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
Updates an address
void updateAddressAsync(
final String customerId,
final String addressId,
final UpdateAddressRequest request,
final APICallBack<GetAddressResponse> callBack)
Parameter | Tags | Description |
---|---|---|
customerId | Required |
Customer Id |
addressId | Required |
Address Id |
request | Required |
Request for updating an address |
try {
String customerId = "customer_id";
String addressId = "address_id";
UpdateAddressRequest request = new UpdateAddressRequest();
// Invoking the API call with sample inputs
customers.updateAddressAsync(customerId, addressId, request, new APICallBack<GetAddressResponse>() {
public void onSuccess(HttpContext context, GetAddressResponse response) {
// TODO success callback handler
}
public void onFailure(HttpContext context, Throwable error) {
// TODO failure callback handler
}
});
} catch(JsonProcessingException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
Get a customer's address
void getAddressAsync(
final String customerId,
final String addressId,
final APICallBack<GetAddressResponse> callBack)
Parameter | Tags | Description |
---|---|---|
customerId | Required |
Customer id |
addressId | Required |
Address Id |
String customerId = "customer_id";
String addressId = "address_id";
// Invoking the API call with sample inputs
customers.getAddressAsync(customerId, addressId, new APICallBack<GetAddressResponse>() {
public void onSuccess(HttpContext context, GetAddressResponse response) {
// TODO success callback handler
}
public void onFailure(HttpContext context, Throwable error) {
// TODO failure callback handler
}
});
Delete a Customer's address
void deleteAddressAsync(
final String customerId,
final String addressId,
final APICallBack<GetAddressResponse> callBack)
Parameter | Tags | Description |
---|---|---|
customerId | Required |
Customer Id |
addressId | Required |
Address Id |
String customerId = "customer_id";
String addressId = "address_id";
// Invoking the API call with sample inputs
customers.deleteAddressAsync(customerId, addressId, new APICallBack<GetAddressResponse>() {
public void onSuccess(HttpContext context, GetAddressResponse response) {
// TODO success callback handler
}
public void onFailure(HttpContext context, Throwable error) {
// TODO failure callback handler
}
});
Delete a customer's card
void deleteCardAsync(
final String customerId,
final String cardId,
final APICallBack<GetCardResponse> callBack)
Parameter | Tags | Description |
---|---|---|
customerId | Required |
Customer Id |
cardId | Required |
Card Id |
String customerId = "customer_id";
String cardId = "card_id";
// Invoking the API call with sample inputs
customers.deleteCardAsync(customerId, cardId, new APICallBack<GetCardResponse>() {
public void onSuccess(HttpContext context, GetCardResponse response) {
// TODO success callback handler
}
public void onFailure(HttpContext context, Throwable error) {
// TODO failure callback handler
}
});
Creates a new address for a customer
void createAddressAsync(
final String customerId,
final CreateAddressRequest request,
final APICallBack<GetAddressResponse> callBack)
Parameter | Tags | Description |
---|---|---|
customerId | Required |
Customer Id |
request | Required |
Request for creating an address |
try {
String customerId = "customer_id";
CreateAddressRequest request = new CreateAddressRequest();
// Invoking the API call with sample inputs
customers.createAddressAsync(customerId, request, new APICallBack<GetAddressResponse>() {
public void onSuccess(HttpContext context, GetAddressResponse response) {
// TODO success callback handler
}
public void onFailure(HttpContext context, Throwable error) {
// TODO failure callback handler
}
});
} catch(JsonProcessingException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
Get a customer's card
void getCardAsync(
final String customerId,
final String cardId,
final APICallBack<GetCardResponse> callBack)
Parameter | Tags | Description |
---|---|---|
customerId | Required |
Customer id |
cardId | Required |
Card id |
String customerId = "customer_id";
String cardId = "card_id";
// Invoking the API call with sample inputs
customers.getCardAsync(customerId, cardId, new APICallBack<GetCardResponse>() {
public void onSuccess(HttpContext context, GetCardResponse response) {
// TODO success callback handler
}
public void onFailure(HttpContext context, Throwable error) {
// TODO failure callback handler
}
});
Creates a new card for a customer
void createCardAsync(
final String customerId,
final CreateCardRequest request,
final APICallBack<GetCardResponse> callBack)
Parameter | Tags | Description |
---|---|---|
customerId | Required |
Customer id |
request | Required |
Request for creating a card |
try {
String customerId = "customer_id";
CreateCardRequest request = new CreateCardRequest();
// Invoking the API call with sample inputs
customers.createCardAsync(customerId, request, new APICallBack<GetCardResponse>() {
public void onSuccess(HttpContext context, GetCardResponse response) {
// TODO success callback handler
}
public void onFailure(HttpContext context, Throwable error) {
// TODO failure callback handler
}
});
} catch(JsonProcessingException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
Updates a customer
void updateCustomerAsync(
final String customerId,
final UpdateCustomerRequest request,
final APICallBack<GetCustomerResponse> callBack)
Parameter | Tags | Description |
---|---|---|
customerId | Required |
Customer id |
request | Required |
Request for updating a customer |
try {
String customerId = "customer_id";
UpdateCustomerRequest request = new UpdateCustomerRequest();
// Invoking the API call with sample inputs
customers.updateCustomerAsync(customerId, request, new APICallBack<GetCustomerResponse>() {
public void onSuccess(HttpContext context, GetCustomerResponse response) {
// TODO success callback handler
}
public void onFailure(HttpContext context, Throwable error) {
// TODO failure callback handler
}
});
} catch(JsonProcessingException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
Delete a Customer's access tokens
void deleteAccessTokensAsync(
final String customerId,
final APICallBack<ListAccessTokensResponse> callBack)
Parameter | Tags | Description |
---|---|---|
customerId | Required |
Customer Id |
String customerId = "customer_id";
// Invoking the API call with sample inputs
customers.deleteAccessTokensAsync(customerId, new APICallBack<ListAccessTokensResponse>() {
public void onSuccess(HttpContext context, ListAccessTokensResponse response) {
// TODO success callback handler
}
public void onFailure(HttpContext context, Throwable error) {
// TODO failure callback handler
}
});
Get all Customers
void getCustomersAsync(
final String name,
final String document,
final Integer page,
final Integer size,
final String email,
final APICallBack<ListCustomersResponse> 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 |
String name = "name";
String document = "document";
Integer page = 1;
Integer size = 10;
String email = "email";
// Invoking the API call with sample inputs
customers.getCustomersAsync(name, document, page, size, email, new APICallBack<ListCustomersResponse>() {
public void onSuccess(HttpContext context, ListCustomersResponse response) {
// TODO success callback handler
}
public void onFailure(HttpContext context, Throwable error) {
// TODO failure callback handler
}
});
Get a Customer's access token
void getAccessTokenAsync(
final String customerId,
final String tokenId,
final APICallBack<GetAccessTokenResponse> callBack)
Parameter | Tags | Description |
---|---|---|
customerId | Required |
Customer Id |
tokenId | Required |
Token Id |
String customerId = "customer_id";
String tokenId = "token_id";
// Invoking the API call with sample inputs
customers.getAccessTokenAsync(customerId, tokenId, new APICallBack<GetAccessTokenResponse>() {
public void onSuccess(HttpContext context, GetAccessTokenResponse response) {
// TODO success callback handler
}
public void onFailure(HttpContext context, Throwable error) {
// TODO failure callback handler
}
});
Creates a access token for a customer
void createAccessTokenAsync(
final String customerId,
final CreateAccessTokenRequest request,
final APICallBack<GetAccessTokenResponse> callBack)
Parameter | Tags | Description |
---|---|---|
customerId | Required |
Customer Id |
request | Required |
Request for creating a access token |
try {
String customerId = "customer_id";
CreateAccessTokenRequest request = new CreateAccessTokenRequest();
// Invoking the API call with sample inputs
customers.createAccessTokenAsync(customerId, request, new APICallBack<GetAccessTokenResponse>() {
public void onSuccess(HttpContext context, GetAccessTokenResponse response) {
// TODO success callback handler
}
public void onFailure(HttpContext context, Throwable error) {
// TODO failure callback handler
}
});
} catch(JsonProcessingException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
Delete a customer's access token
void deleteAccessTokenAsync(
final String customerId,
final String tokenId,
final APICallBack<GetAccessTokenResponse> callBack)
Parameter | Tags | Description |
---|---|---|
customerId | Required |
Customer Id |
tokenId | Required |
Token Id |
String customerId = "customer_id";
String tokenId = "token_id";
// Invoking the API call with sample inputs
customers.deleteAccessTokenAsync(customerId, tokenId, new APICallBack<GetAccessTokenResponse>() {
public void onSuccess(HttpContext context, GetAccessTokenResponse response) {
// TODO success callback handler
}
public void onFailure(HttpContext context, Throwable error) {
// TODO failure callback handler
}
});
Updates the metadata a customer
void updateCustomerMetadataAsync(
final String customerId,
final UpdateMetadataRequest request,
final APICallBack<GetCustomerResponse> callBack)
Parameter | Tags | Description |
---|---|---|
customerId | Required |
The customer id |
request | Required |
Request for updating the customer metadata |
try {
String customerId = "customer_id";
UpdateMetadataRequest request = new UpdateMetadataRequest();
// Invoking the API call with sample inputs
customers.updateCustomerMetadataAsync(customerId, request, new APICallBack<GetCustomerResponse>() {
public void onSuccess(HttpContext context, GetCustomerResponse response) {
// TODO success callback handler
}
public void onFailure(HttpContext context, Throwable error) {
// TODO failure callback handler
}
});
} catch(JsonProcessingException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
Get all access tokens from a customer
void getAccessTokensAsync(
final String customerId,
final Integer page,
final Integer size,
final APICallBack<ListAccessTokensResponse> callBack)
Parameter | Tags | Description |
---|---|---|
customerId | Required |
Customer Id |
page | Optional |
Page number |
size | Optional |
Page size |
String customerId = "customer_id";
Integer page = 144;
Integer size = 144;
// Invoking the API call with sample inputs
customers.getAccessTokensAsync(customerId, page, size, new APICallBack<ListAccessTokensResponse>() {
public void onSuccess(HttpContext context, ListAccessTokensResponse response) {
// TODO success callback handler
}
public void onFailure(HttpContext context, Throwable error) {
// TODO failure callback handler
}
});
Gets all adressess from a customer
void getAddressesAsync(
final String customerId,
final Integer page,
final Integer size,
final APICallBack<ListAddressesResponse> callBack)
Parameter | Tags | Description |
---|---|---|
customerId | Required |
Customer id |
page | Optional |
Page number |
size | Optional |
Page size |
String customerId = "customer_id";
Integer page = 144;
Integer size = 144;
// Invoking the API call with sample inputs
customers.getAddressesAsync(customerId, page, size, new APICallBack<ListAddressesResponse>() {
public void onSuccess(HttpContext context, ListAddressesResponse response) {
// TODO success callback handler
}
public void onFailure(HttpContext context, Throwable error) {
// TODO failure callback handler
}
});
Get all cards from a customer
void getCardsAsync(
final String customerId,
final Integer page,
final Integer size,
final APICallBack<ListCardsResponse> callBack)
Parameter | Tags | Description |
---|---|---|
customerId | Required |
Customer Id |
page | Optional |
Page number |
size | Optional |
Page size |
String customerId = "customer_id";
Integer page = 144;
Integer size = 144;
// Invoking the API call with sample inputs
customers.getCardsAsync(customerId, page, size, new APICallBack<ListCardsResponse>() {
public void onSuccess(HttpContext context, ListCardsResponse response) {
// TODO success callback handler
}
public void onFailure(HttpContext context, Throwable error) {
// TODO failure callback handler
}
});
The singleton instance of the InvoicesController
class can be accessed from the API Client.
InvoicesController invoices = client.getInvoices();
Gets an invoice
void getInvoiceAsync(
final String invoiceId,
final APICallBack<GetInvoiceResponse> callBack)
Parameter | Tags | Description |
---|---|---|
invoiceId | Required |
Invoice Id |
String invoiceId = "invoice_id";
// Invoking the API call with sample inputs
invoices.getInvoiceAsync(invoiceId, new APICallBack<GetInvoiceResponse>() {
public void onSuccess(HttpContext context, GetInvoiceResponse response) {
// TODO success callback handler
}
public void onFailure(HttpContext context, Throwable error) {
// TODO failure callback handler
}
});
Cancels an invoice
void cancelInvoiceAsync(
final String invoiceId,
final APICallBack<GetInvoiceResponse> callBack)
Parameter | Tags | Description |
---|---|---|
invoiceId | Required |
Invoice id |
String invoiceId = "invoice_id";
// Invoking the API call with sample inputs
invoices.cancelInvoiceAsync(invoiceId, new APICallBack<GetInvoiceResponse>() {
public void onSuccess(HttpContext context, GetInvoiceResponse response) {
// TODO success callback handler
}
public void onFailure(HttpContext context, Throwable error) {
// TODO failure callback handler
}
});
Updates the metadata from an invoice
void updateInvoiceMetadataAsync(
final String invoiceId,
final UpdateMetadataRequest request,
final APICallBack<GetInvoiceResponse> callBack)
Parameter | Tags | Description |
---|---|---|
invoiceId | Required |
The invoice id |
request | Required |
Request for updating the invoice metadata |
try {
String invoiceId = "invoice_id";
UpdateMetadataRequest request = new UpdateMetadataRequest();
// Invoking the API call with sample inputs
invoices.updateInvoiceMetadataAsync(invoiceId, request, new APICallBack<GetInvoiceResponse>() {
public void onSuccess(HttpContext context, GetInvoiceResponse response) {
// TODO success callback handler
}
public void onFailure(HttpContext context, Throwable error) {
// TODO failure callback handler
}
});
} catch(JsonProcessingException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
Gets all invoices
void getInvoicesAsync(
final Integer page,
final Integer size,
final String code,
final String customerId,
final String subscriptionId,
final DateTime createdSince,
final DateTime createdUntil,
final String status,
final DateTime dueSince,
final DateTime dueUntil,
final APICallBack<ListInvoicesResponse> 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 |
Integer page = 144;
Integer size = 144;
String code = "code";
String customerId = "customer_id";
String subscriptionId = "subscription_id";
DateTime createdSince = new Date();
DateTime createdUntil = new Date();
String status = "status";
DateTime dueSince = new Date();
DateTime dueUntil = new Date();
// Invoking the API call with sample inputs
invoices.getInvoicesAsync(page, size, code, customerId, subscriptionId, createdSince, createdUntil, status, dueSince, dueUntil, new APICallBack<ListInvoicesResponse>() {
public void onSuccess(HttpContext context, ListInvoicesResponse response) {
// TODO success callback handler
}
public void onFailure(HttpContext context, Throwable error) {
// TODO failure callback handler
}
});
The singleton instance of the PlansController
class can be accessed from the API Client.
PlansController plans = client.getPlans();
Updates a plan item
void updatePlanItemAsync(
final String planId,
final String planItemId,
final UpdatePlanItemRequest body,
final APICallBack<GetPlanItemResponse> callBack)
Parameter | Tags | Description |
---|---|---|
planId | Required |
Plan id |
planItemId | Required |
Plan item id |
body | Required |
Request for updating the plan item |
try {
String planId = "plan_id";
String planItemId = "plan_item_id";
UpdatePlanItemRequest body = new UpdatePlanItemRequest();
// Invoking the API call with sample inputs
plans.updatePlanItemAsync(planId, planItemId, body, new APICallBack<GetPlanItemResponse>() {
public void onSuccess(HttpContext context, GetPlanItemResponse response) {
// TODO success callback handler
}
public void onFailure(HttpContext context, Throwable error) {
// TODO failure callback handler
}
});
} catch(JsonProcessingException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
Gets a plan
void getPlanAsync(
final String planId,
final APICallBack<GetPlanResponse> callBack)
Parameter | Tags | Description |
---|---|---|
planId | Required |
Plan id |
String planId = "plan_id";
// Invoking the API call with sample inputs
plans.getPlanAsync(planId, new APICallBack<GetPlanResponse>() {
public void onSuccess(HttpContext context, GetPlanResponse response) {
// TODO success callback handler
}
public void onFailure(HttpContext context, Throwable error) {
// TODO failure callback handler
}
});
Adds a new item to a plan
void createPlanItemAsync(
final String planId,
final CreatePlanItemRequest request,
final APICallBack<GetPlanItemResponse> callBack)
Parameter | Tags | Description |
---|---|---|
planId | Required |
Plan id |
request | Required |
Request for creating a plan item |
try {
String planId = "plan_id";
CreatePlanItemRequest request = new CreatePlanItemRequest();
// Invoking the API call with sample inputs
plans.createPlanItemAsync(planId, request, new APICallBack<GetPlanItemResponse>() {
public void onSuccess(HttpContext context, GetPlanItemResponse response) {
// TODO success callback handler
}
public void onFailure(HttpContext context, Throwable error) {
// TODO failure callback handler
}
});
} catch(JsonProcessingException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
Updates a plan
void updatePlanAsync(
final String planId,
final UpdatePlanRequest request,
final APICallBack<GetPlanResponse> callBack)
Parameter | Tags | Description |
---|---|---|
planId | Required |
Plan id |
request | Required |
Request for updating a plan |
try {
String planId = "plan_id";
UpdatePlanRequest request = new UpdatePlanRequest();
// Invoking the API call with sample inputs
plans.updatePlanAsync(planId, request, new APICallBack<GetPlanResponse>() {
public void onSuccess(HttpContext context, GetPlanResponse response) {
// TODO success callback handler
}
public void onFailure(HttpContext context, Throwable error) {
// TODO failure callback handler
}
});
} catch(JsonProcessingException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
Creates a new plan
void createPlanAsync(
final CreatePlanRequest body,
final APICallBack<GetPlanResponse> callBack)
Parameter | Tags | Description |
---|---|---|
body | Required |
Request for creating a plan |
try {
CreatePlanRequest body = new CreatePlanRequest();
// Invoking the API call with sample inputs
plans.createPlanAsync(body, new APICallBack<GetPlanResponse>() {
public void onSuccess(HttpContext context, GetPlanResponse response) {
// TODO success callback handler
}
public void onFailure(HttpContext context, Throwable error) {
// TODO failure callback handler
}
});
} catch(JsonProcessingException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
Deletes a plan
void deletePlanAsync(
final String planId,
final APICallBack<GetPlanResponse> callBack)
Parameter | Tags | Description |
---|---|---|
planId | Required |
Plan id |
String planId = "plan_id";
// Invoking the API call with sample inputs
plans.deletePlanAsync(planId, new APICallBack<GetPlanResponse>() {
public void onSuccess(HttpContext context, GetPlanResponse response) {
// TODO success callback handler
}
public void onFailure(HttpContext context, Throwable error) {
// TODO failure callback handler
}
});
Gets a plan item
void getPlanItemAsync(
final String planId,
final String planItemId,
final APICallBack<GetPlanItemResponse> callBack)
Parameter | Tags | Description |
---|---|---|
planId | Required |
Plan id |
planItemId | Required |
Plan item id |
String planId = "plan_id";
String planItemId = "plan_item_id";
// Invoking the API call with sample inputs
plans.getPlanItemAsync(planId, planItemId, new APICallBack<GetPlanItemResponse>() {
public void onSuccess(HttpContext context, GetPlanItemResponse response) {
// TODO success callback handler
}
public void onFailure(HttpContext context, Throwable error) {
// TODO failure callback handler
}
});
Removes an item from a plan
void deletePlanItemAsync(
final String planId,
final String planItemId,
final APICallBack<GetPlanItemResponse> callBack)
Parameter | Tags | Description |
---|---|---|
planId | Required |
Plan id |
planItemId | Required |
Plan item id |
String planId = "plan_id";
String planItemId = "plan_item_id";
// Invoking the API call with sample inputs
plans.deletePlanItemAsync(planId, planItemId, new APICallBack<GetPlanItemResponse>() {
public void onSuccess(HttpContext context, GetPlanItemResponse response) {
// TODO success callback handler
}
public void onFailure(HttpContext context, Throwable error) {
// TODO failure callback handler
}
});
Updates the metadata from a plan
void updatePlanMetadataAsync(
final String planId,
final UpdateMetadataRequest request,
final APICallBack<GetPlanResponse> callBack)
Parameter | Tags | Description |
---|---|---|
planId | Required |
The plan id |
request | Required |
Request for updating the plan metadata |
try {
String planId = "plan_id";
UpdateMetadataRequest request = new UpdateMetadataRequest();
// Invoking the API call with sample inputs
plans.updatePlanMetadataAsync(planId, request, new APICallBack<GetPlanResponse>() {
public void onSuccess(HttpContext context, GetPlanResponse response) {
// TODO success callback handler
}
public void onFailure(HttpContext context, Throwable error) {
// TODO failure callback handler
}
});
} catch(JsonProcessingException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
Gets all plans
void getPlansAsync(
final Integer page,
final Integer size,
final String name,
final String status,
final String billingType,
final DateTime createdSince,
final DateTime createdUntil,
final APICallBack<ListPlansResponse> 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 |
Integer page = 144;
Integer size = 144;
String name = "name";
String status = "status";
String billingType = "billing_type";
DateTime createdSince = new Date();
DateTime createdUntil = new Date();
// Invoking the API call with sample inputs
plans.getPlansAsync(page, size, name, status, billingType, createdSince, createdUntil, new APICallBack<ListPlansResponse>() {
public void onSuccess(HttpContext context, ListPlansResponse response) {
// TODO success callback handler
}
public void onFailure(HttpContext context, Throwable error) {
// TODO failure callback handler
}
});
The singleton instance of the SubscriptionsController
class can be accessed from the API Client.
SubscriptionsController subscriptions = client.getSubscriptions();
Updates a subscription item
void updateSubscriptionItemAsync(
final String subscriptionId,
final String itemId,
final UpdateSubscriptionItemRequest body,
final APICallBack<GetSubscriptionItemResponse> callBack)
Parameter | Tags | Description |
---|---|---|
subscriptionId | Required |
Subscription Id |
itemId | Required |
Item id |
body | Required |
Request for updating a subscription item |
try {
String subscriptionId = "subscription_id";
String itemId = "item_id";
UpdateSubscriptionItemRequest body = new UpdateSubscriptionItemRequest();
// Invoking the API call with sample inputs
subscriptions.updateSubscriptionItemAsync(subscriptionId, itemId, body, new APICallBack<GetSubscriptionItemResponse>() {
public void onSuccess(HttpContext context, GetSubscriptionItemResponse response) {
// TODO success callback handler
}
public void onFailure(HttpContext context, Throwable error) {
// TODO failure callback handler
}
});
} catch(JsonProcessingException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
Creates a usage
void createUsageAsync(
final String subscriptionId,
final String itemId,
final CreateUsageRequest body,
final APICallBack<GetUsageResponse> callBack)
Parameter | Tags | Description |
---|---|---|
subscriptionId | Required |
Subscription Id |
itemId | Required |
Item id |
body | Required |
Request for creating a usage |
try {
String subscriptionId = "subscription_id";
String itemId = "item_id";
CreateUsageRequest body = new CreateUsageRequest();
// Invoking the API call with sample inputs
subscriptions.createUsageAsync(subscriptionId, itemId, body, new APICallBack<GetUsageResponse>() {
public void onSuccess(HttpContext context, GetUsageResponse response) {
// TODO success callback handler
}
public void onFailure(HttpContext context, Throwable error) {
// TODO failure callback handler
}
});
} catch(JsonProcessingException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
Updates the billing date from a subscription
void updateSubscriptionBillingDateAsync(
final String subscriptionId,
final UpdateSubscriptionBillingDateRequest request,
final APICallBack<GetSubscriptionResponse> callBack)
Parameter | Tags | Description |
---|---|---|
subscriptionId | Required |
The subscription id |
request | Required |
Request for updating the subscription billing date |
try {
String subscriptionId = "subscription_id";
UpdateSubscriptionBillingDateRequest request = new UpdateSubscriptionBillingDateRequest();
// Invoking the API call with sample inputs
subscriptions.updateSubscriptionBillingDateAsync(subscriptionId, request, new APICallBack<GetSubscriptionResponse>() {
public void onSuccess(HttpContext context, GetSubscriptionResponse response) {
// TODO success callback handler
}
public void onFailure(HttpContext context, Throwable error) {
// TODO failure callback handler
}
});
} catch(JsonProcessingException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
Updates the credit card from a subscription
void updateSubscriptionCardAsync(
final String subscriptionId,
final UpdateSubscriptionCardRequest request,
final APICallBack<GetSubscriptionResponse> callBack)
Parameter | Tags | Description |
---|---|---|
subscriptionId | Required |
Subscription id |
request | Required |
Request for updating a card |
try {
String subscriptionId = "subscription_id";
UpdateSubscriptionCardRequest request = new UpdateSubscriptionCardRequest();
// Invoking the API call with sample inputs
subscriptions.updateSubscriptionCardAsync(subscriptionId, request, new APICallBack<GetSubscriptionResponse>() {
public void onSuccess(HttpContext context, GetSubscriptionResponse response) {
// TODO success callback handler
}
public void onFailure(HttpContext context, Throwable error) {
// TODO failure callback handler
}
});
} catch(JsonProcessingException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
Creates a new subscription
void createSubscriptionAsync(
final CreateSubscriptionRequest body,
final APICallBack<GetSubscriptionResponse> callBack)
Parameter | Tags | Description |
---|---|---|
body | Required |
Request for creating a subscription |
try {
CreateSubscriptionRequest body = new CreateSubscriptionRequest();
// Invoking the API call with sample inputs
subscriptions.createSubscriptionAsync(body, new APICallBack<GetSubscriptionResponse>() {
public void onSuccess(HttpContext context, GetSubscriptionResponse response) {
// TODO success callback handler
}
public void onFailure(HttpContext context, Throwable error) {
// TODO failure callback handler
}
});
} catch(JsonProcessingException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
Creates a new Subscription item
void createSubscriptionItemAsync(
final String subscriptionId,
final CreateSubscriptionItemRequest request,
final APICallBack<GetSubscriptionItemResponse> callBack)
Parameter | Tags | Description |
---|---|---|
subscriptionId | Required |
Subscription id |
request | Required |
Request for creating a subscription item |
try {
String subscriptionId = "subscription_id";
CreateSubscriptionItemRequest request = new CreateSubscriptionItemRequest();
// Invoking the API call with sample inputs
subscriptions.createSubscriptionItemAsync(subscriptionId, request, new APICallBack<GetSubscriptionItemResponse>() {
public void onSuccess(HttpContext context, GetSubscriptionItemResponse response) {
// TODO success callback handler
}
public void onFailure(HttpContext context, Throwable error) {
// TODO failure callback handler
}
});
} catch(JsonProcessingException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
Creates a discount
void createDiscountAsync(
final String subscriptionId,
final CreateDiscountRequest request,
final APICallBack<GetDiscountResponse> callBack)
Parameter | Tags | Description |
---|---|---|
subscriptionId | Required |
Subscription id |
request | Required |
Request for creating a discount |
try {
String subscriptionId = "subscription_id";
CreateDiscountRequest request = new CreateDiscountRequest();
// Invoking the API call with sample inputs
subscriptions.createDiscountAsync(subscriptionId, request, new APICallBack<GetDiscountResponse>() {
public void onSuccess(HttpContext context, GetDiscountResponse response) {
// TODO success callback handler
}
public void onFailure(HttpContext context, Throwable error) {
// TODO failure callback handler
}
});
} catch(JsonProcessingException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
Gets a subscription
void getSubscriptionAsync(
final String subscriptionId,
final APICallBack<GetSubscriptionResponse> callBack)
Parameter | Tags | Description |
---|---|---|
subscriptionId | Required |
Subscription id |
String subscriptionId = "subscription_id";
// Invoking the API call with sample inputs
subscriptions.getSubscriptionAsync(subscriptionId, new APICallBack<GetSubscriptionResponse>() {
public void onSuccess(HttpContext context, GetSubscriptionResponse response) {
// TODO success callback handler
}
public void onFailure(HttpContext context, Throwable error) {
// TODO failure callback handler
}
});
Updates the payment method from a subscription
void updateSubscriptionPaymentMethodAsync(
final String subscriptionId,
final UpdateSubscriptionPaymentMethodRequest request,
final APICallBack<GetSubscriptionResponse> callBack)
Parameter | Tags | Description |
---|---|---|
subscriptionId | Required |
Subscription id |
request | Required |
Request for updating the paymentmethod from a subscription |
try {
String subscriptionId = "subscription_id";
UpdateSubscriptionPaymentMethodRequest request = new UpdateSubscriptionPaymentMethodRequest();
// Invoking the API call with sample inputs
subscriptions.updateSubscriptionPaymentMethodAsync(subscriptionId, request, new APICallBack<GetSubscriptionResponse>() {
public void onSuccess(HttpContext context, GetSubscriptionResponse response) {
// TODO success callback handler
}
public void onFailure(HttpContext context, Throwable error) {
// TODO failure callback handler
}
});
} catch(JsonProcessingException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
Deletes a discount
void deleteDiscountAsync(
final String subscriptionId,
final String discountId,
final APICallBack<GetDiscountResponse> callBack)
Parameter | Tags | Description |
---|---|---|
subscriptionId | Required |
Subscription id |
discountId | Required |
Discount Id |
String subscriptionId = "subscription_id";
String discountId = "discount_id";
// Invoking the API call with sample inputs
subscriptions.deleteDiscountAsync(subscriptionId, discountId, new APICallBack<GetDiscountResponse>() {
public void onSuccess(HttpContext context, GetDiscountResponse response) {
// TODO success callback handler
}
public void onFailure(HttpContext context, Throwable error) {
// TODO failure callback handler
}
});
Cancels a subscription
void cancelSubscriptionAsync(
final String subscriptionId,
final CreateCancelSubscriptionRequest request,
final APICallBack<GetSubscriptionResponse> callBack)
Parameter | Tags | Description |
---|---|---|
subscriptionId | Required |
Subscription id |
request | Optional |
Request for cancelling a subscription |
try {
String subscriptionId = "subscription_id";
CreateCancelSubscriptionRequest request = new CreateCancelSubscriptionRequest();
// Invoking the API call with sample inputs
subscriptions.cancelSubscriptionAsync(subscriptionId, request, new APICallBack<GetSubscriptionResponse>() {
public void onSuccess(HttpContext context, GetSubscriptionResponse response) {
// TODO success callback handler
}
public void onFailure(HttpContext context, Throwable error) {
// TODO failure callback handler
}
});
} catch(JsonProcessingException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
Deletes a subscription item
void deleteSubscriptionItemAsync(
final String subscriptionId,
final String subscriptionItemId,
final APICallBack<GetSubscriptionItemResponse> callBack)
Parameter | Tags | Description |
---|---|---|
subscriptionId | Required |
Subscription id |
subscriptionItemId | Required |
Subscription item id |
String subscriptionId = "subscription_id";
String subscriptionItemId = "subscription_item_id";
// Invoking the API call with sample inputs
subscriptions.deleteSubscriptionItemAsync(subscriptionId, subscriptionItemId, new APICallBack<GetSubscriptionItemResponse>() {
public void onSuccess(HttpContext context, GetSubscriptionItemResponse response) {
// TODO success callback handler
}
public void onFailure(HttpContext context, Throwable error) {
// TODO failure callback handler
}
});
Deletes a usage
void deleteUsageAsync(
final String subscriptionId,
final String itemId,
final String usageId,
final APICallBack<GetUsageResponse> callBack)
Parameter | Tags | Description |
---|---|---|
subscriptionId | Required |
The subscription id |
itemId | Required |
The subscription item id |
usageId | Required |
The usage id |
String subscriptionId = "subscription_id";
String itemId = "item_id";
String usageId = "usage_id";
// Invoking the API call with sample inputs
subscriptions.deleteUsageAsync(subscriptionId, itemId, usageId, new APICallBack<GetUsageResponse>() {
public void onSuccess(HttpContext context, GetUsageResponse response) {
// TODO success callback handler
}
public void onFailure(HttpContext context, Throwable error) {
// TODO failure callback handler
}
});
Lists all usages from a subscription item
void getUsagesAsync(
final String subscriptionId,
final String itemId,
final Integer page,
final Integer size,
final APICallBack<ListUsagesResponse> callBack)
Parameter | Tags | Description |
---|---|---|
subscriptionId | Required |
The subscription id |
itemId | Required |
The subscription item id |
page | Optional |
Page number |
size | Optional |
Page size |
String subscriptionId = "subscription_id";
String itemId = "item_id";
Integer page = 236;
Integer size = 236;
// Invoking the API call with sample inputs
subscriptions.getUsagesAsync(subscriptionId, itemId, page, size, new APICallBack<ListUsagesResponse>() {
public void onSuccess(HttpContext context, ListUsagesResponse response) {
// TODO success callback handler
}
public void onFailure(HttpContext context, Throwable error) {
// TODO failure callback handler
}
});
Updates the metadata from a subscription
void updateSubscriptionMetadataAsync(
final String subscriptionId,
final UpdateMetadataRequest request,
final APICallBack<GetSubscriptionResponse> callBack)
Parameter | Tags | Description |
---|---|---|
subscriptionId | Required |
The subscription id |
request | Required |
Request for updating the subscrption metadata |
try {
String subscriptionId = "subscription_id";
UpdateMetadataRequest request = new UpdateMetadataRequest();
// Invoking the API call with sample inputs
subscriptions.updateSubscriptionMetadataAsync(subscriptionId, request, new APICallBack<GetSubscriptionResponse>() {
public void onSuccess(HttpContext context, GetSubscriptionResponse response) {
// TODO success callback handler
}
public void onFailure(HttpContext context, Throwable error) {
// TODO failure callback handler
}
});
} catch(JsonProcessingException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
Gets all subscriptions
void getSubscriptionsAsync(
final Integer page,
final Integer size,
final String code,
final String billingType,
final String customerId,
final String planId,
final String cardId,
final String status,
final DateTime nextBillingSince,
final DateTime nextBillingUntil,
final DateTime createdSince,
final DateTime createdUntil,
final APICallBack<ListSubscriptionsResponse> 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 |
Integer page = 236;
Integer size = 236;
String code = "code";
String billingType = "billing_type";
String customerId = "customer_id";
String planId = "plan_id";
String cardId = "card_id";
String status = "status";
DateTime nextBillingSince = new Date();
DateTime nextBillingUntil = new Date();
DateTime createdSince = new Date();
DateTime createdUntil = new Date();
// Invoking the API call with sample inputs
subscriptions.getSubscriptionsAsync(page, size, code, billingType, customerId, planId, cardId, status, nextBillingSince, nextBillingUntil, createdSince, createdUntil, new APICallBack<ListSubscriptionsResponse>() {
public void onSuccess(HttpContext context, ListSubscriptionsResponse response) {
// TODO success callback handler
}
public void onFailure(HttpContext context, Throwable error) {
// TODO failure callback handler
}
});
The singleton instance of the OrdersController
class can be accessed from the API Client.
OrdersController orders = client.getOrders();
Gets an order
void getOrderAsync(
final String orderId,
final APICallBack<GetOrderResponse> callBack)
Parameter | Tags | Description |
---|---|---|
orderId | Required |
Order id |
String orderId = "order_id";
// Invoking the API call with sample inputs
orders.getOrderAsync(orderId, new APICallBack<GetOrderResponse>() {
public void onSuccess(HttpContext context, GetOrderResponse response) {
// TODO success callback handler
}
public void onFailure(HttpContext context, Throwable error) {
// TODO failure callback handler
}
});
Creates a new Order
void createOrderAsync(
final CreateOrderRequest body,
final APICallBack<GetOrderResponse> callBack)
Parameter | Tags | Description |
---|---|---|
body | Required |
Request for creating an order |
try {
CreateOrderRequest body = new CreateOrderRequest();
// Invoking the API call with sample inputs
orders.createOrderAsync(body, new APICallBack<GetOrderResponse>() {
public void onSuccess(HttpContext context, GetOrderResponse response) {
// TODO success callback handler
}
public void onFailure(HttpContext context, Throwable error) {
// TODO failure callback handler
}
});
} catch(JsonProcessingException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
Updates the metadata from an order
void updateOrderMetadataAsync(
final String orderId,
final UpdateMetadataRequest request,
final APICallBack<GetOrderResponse> callBack)
Parameter | Tags | Description |
---|---|---|
orderId | Required |
The order id |
request | Required |
Request for updating the order metadata |
try {
String orderId = "order_id";
UpdateMetadataRequest request = new UpdateMetadataRequest();
// Invoking the API call with sample inputs
orders.updateOrderMetadataAsync(orderId, request, new APICallBack<GetOrderResponse>() {
public void onSuccess(HttpContext context, GetOrderResponse response) {
// TODO success callback handler
}
public void onFailure(HttpContext context, Throwable error) {
// TODO failure callback handler
}
});
} catch(JsonProcessingException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
Gets all orders
void getOrdersAsync(
final Integer page,
final Integer size,
final String code,
final String status,
final DateTime createdSince,
final DateTime createdUntil,
final String customerId,
final APICallBack<ListOrderResponse> 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 |
Integer page = 236;
Integer size = 236;
String code = "code";
String status = "status";
DateTime createdSince = new Date();
DateTime createdUntil = new Date();
String customerId = "customer_id";
// Invoking the API call with sample inputs
orders.getOrdersAsync(page, size, code, status, createdSince, createdUntil, customerId, new APICallBack<ListOrderResponse>() {
public void onSuccess(HttpContext context, ListOrderResponse response) {
// TODO success callback handler
}
public void onFailure(HttpContext context, Throwable error) {
// TODO failure callback handler
}
});
The singleton instance of the TokensController
class can be accessed from the API Client.
TokensController tokens = client.getTokens();
Tags:
Skips Authentication
Gets a token from its id
void getTokenAsync(
final String id,
final String publicKey,
final APICallBack<GetTokenResponse> callBack)
Parameter | Tags | Description |
---|---|---|
id | Required |
Token id |
publicKey | Required |
Public key |
String id = "id";
String publicKey = "public_key";
// Invoking the API call with sample inputs
tokens.getTokenAsync(id, publicKey, new APICallBack<GetTokenResponse>() {
public void onSuccess(HttpContext context, GetTokenResponse response) {
// TODO success callback handler
}
public void onFailure(HttpContext context, Throwable error) {
// TODO failure callback handler
}
});
Tags:
Skips Authentication
TODO: Add a method description
void createTokenAsync(
final String publicKey,
final CreateTokenRequest request,
final APICallBack<GetTokenResponse> callBack)
Parameter | Tags | Description |
---|---|---|
publicKey | Required |
Public key |
request | Required |
Request for creating a token |
try {
String publicKey = "public_key";
CreateTokenRequest request = new CreateTokenRequest();
// Invoking the API call with sample inputs
tokens.createTokenAsync(publicKey, request, new APICallBack<GetTokenResponse>() {
public void onSuccess(HttpContext context, GetTokenResponse response) {
// TODO success callback handler
}
public void onFailure(HttpContext context, Throwable error) {
// TODO failure callback handler
}
});
} catch(JsonProcessingException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
The singleton instance of the RecipientsController
class can be accessed from the API Client.
RecipientsController recipients = client.getRecipients();
Creates a new recipient
void createRecipientAsync(
final CreateRecipientRequest request,
final APICallBack<GetRecipientResponse> callBack)
Parameter | Tags | Description |
---|---|---|
request | Required |
Recipient data |
try {
CreateRecipientRequest request = new CreateRecipientRequest();
// Invoking the API call with sample inputs
recipients.createRecipientAsync(request, new APICallBack<GetRecipientResponse>() {
public void onSuccess(HttpContext context, GetRecipientResponse response) {
// TODO success callback handler
}
public void onFailure(HttpContext context, Throwable error) {
// TODO failure callback handler
}
});
} catch(JsonProcessingException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
Updates a recipient
void updateRecipientAsync(
final String recipientId,
final UpdateRecipientRequest request,
final APICallBack<GetRecipientResponse> callBack)
Parameter | Tags | Description |
---|---|---|
recipientId | Required |
Recipient id |
request | Required |
Recipient data |
try {
String recipientId = "recipient_id";
UpdateRecipientRequest request = new UpdateRecipientRequest();
// Invoking the API call with sample inputs
recipients.updateRecipientAsync(recipientId, request, new APICallBack<GetRecipientResponse>() {
public void onSuccess(HttpContext context, GetRecipientResponse response) {
// TODO success callback handler
}
public void onFailure(HttpContext context, Throwable error) {
// TODO failure callback handler
}
});
} catch(JsonProcessingException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
Updates the default bank account from a recipient
void updateRecipientDefaultBankAccountAsync(
final String recipientId,
final UpdateRecipientBankAccountRequest request,
final APICallBack<GetRecipientResponse> callBack)
Parameter | Tags | Description |
---|---|---|
recipientId | Required |
Recipient id |
request | Required |
Bank account data |
try {
String recipientId = "recipient_id";
UpdateRecipientBankAccountRequest request = new UpdateRecipientBankAccountRequest();
// Invoking the API call with sample inputs
recipients.updateRecipientDefaultBankAccountAsync(recipientId, request, new APICallBack<GetRecipientResponse>() {
public void onSuccess(HttpContext context, GetRecipientResponse response) {
// TODO success callback handler
}
public void onFailure(HttpContext context, Throwable error) {
// TODO failure callback handler
}
});
} catch(JsonProcessingException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
Retrieves recipient information
void getRecipientAsync(
final String recipientId,
final APICallBack<GetRecipientResponse> callBack)
Parameter | Tags | Description |
---|---|---|
recipientId | Required |
Recipiend id |
String recipientId = "recipient_id";
// Invoking the API call with sample inputs
recipients.getRecipientAsync(recipientId, new APICallBack<GetRecipientResponse>() {
public void onSuccess(HttpContext context, GetRecipientResponse response) {
// TODO success callback handler
}
public void onFailure(HttpContext context, Throwable error) {
// TODO failure callback handler
}
});
Retrieves paginated recipients information
void getRecipientsAsync(
final Integer page,
final Integer size,
final APICallBack<ListRecipientResponse> callBack)
Parameter | Tags | Description |
---|---|---|
page | Optional |
Page number |
size | Optional |
Page size |
Integer page = 236;
Integer size = 236;
// Invoking the API call with sample inputs
recipients.getRecipientsAsync(page, size, new APICallBack<ListRecipientResponse>() {
public void onSuccess(HttpContext context, ListRecipientResponse response) {
// TODO success callback handler
}
public void onFailure(HttpContext context, Throwable error) {
// TODO failure callback handler
}
});
Get balance information for a recipient
void getBalanceAsync(
final String recipientId,
final APICallBack<GetBalanceResponse> callBack)
Parameter | Tags | Description |
---|---|---|
recipientId | Required |
Recipient id |
String recipientId = "recipient_id";
// Invoking the API call with sample inputs
recipients.getBalanceAsync(recipientId, new APICallBack<GetBalanceResponse>() {
public void onSuccess(HttpContext context, GetBalanceResponse response) {
// TODO success callback handler
}
public void onFailure(HttpContext context, Throwable error) {
// TODO failure callback handler
}
});
Creates a transfer for a recipient
void createTransferAsync(
final String recipientId,
final CreateTransferRequest request,
final APICallBack<GetTransferResponse> callBack)
Parameter | Tags | Description |
---|---|---|
recipientId | Required |
Recipient Id |
request | Required |
Transfer data |
try {
String recipientId = "recipient_id";
CreateTransferRequest request = new CreateTransferRequest();
// Invoking the API call with sample inputs
recipients.createTransferAsync(recipientId, request, new APICallBack<GetTransferResponse>() {
public void onSuccess(HttpContext context, GetTransferResponse response) {
// TODO success callback handler
}
public void onFailure(HttpContext context, Throwable error) {
// TODO failure callback handler
}
});
} catch(JsonProcessingException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
Gets a transfer
void getTransferAsync(
final String recipientId,
final String transferId,
final APICallBack<GetTransferResponse> callBack)
Parameter | Tags | Description |
---|---|---|
recipientId | Required |
Recipient id |
transferId | Required |
Transfer id |
String recipientId = "recipient_id";
String transferId = "transfer_id";
// Invoking the API call with sample inputs
recipients.getTransferAsync(recipientId, transferId, new APICallBack<GetTransferResponse>() {
public void onSuccess(HttpContext context, GetTransferResponse response) {
// TODO success callback handler
}
public void onFailure(HttpContext context, Throwable error) {
// TODO failure callback handler
}
});
Gets a paginated list of transfers for the recipient
void getTransfersAsync(
final String recipientId,
final Integer page,
final Integer size,
final String status,
final DateTime createdSince,
final DateTime createdUntil,
final APICallBack<ListTransferResponse> 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 |
String recipientId = "recipient_id";
Integer page = 236;
Integer size = 236;
String status = "status";
DateTime createdSince = new Date();
DateTime createdUntil = new Date();
// Invoking the API call with sample inputs
recipients.getTransfersAsync(recipientId, page, size, status, createdSince, createdUntil, new APICallBack<ListTransferResponse>() {
public void onSuccess(HttpContext context, ListTransferResponse response) {
// TODO success callback handler
}
public void onFailure(HttpContext context, Throwable error) {
// TODO failure callback handler
}
});
Creates an anticipation
void createAnticipationAsync(
final String recipientId,
final CreateAnticipationRequest request,
final APICallBack<GetAnticipationResponse> callBack)
Parameter | Tags | Description |
---|---|---|
recipientId | Required |
Recipient id |
request | Required |
Anticipation data |
try {
String recipientId = "recipient_id";
CreateAnticipationRequest request = new CreateAnticipationRequest();
// Invoking the API call with sample inputs
recipients.createAnticipationAsync(recipientId, request, new APICallBack<GetAnticipationResponse>() {
public void onSuccess(HttpContext context, GetAnticipationResponse response) {
// TODO success callback handler
}
public void onFailure(HttpContext context, Throwable error) {
// TODO failure callback handler
}
});
} catch(JsonProcessingException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
Gets an anticipation
void getAnticipationAsync(
final String recipientId,
final String anticipationId,
final APICallBack<GetAnticipationResponse> callBack)
Parameter | Tags | Description |
---|---|---|
recipientId | Required |
Recipient id |
anticipationId | Required |
Anticipation id |
String recipientId = "recipient_id";
String anticipationId = "anticipation_id";
// Invoking the API call with sample inputs
recipients.getAnticipationAsync(recipientId, anticipationId, new APICallBack<GetAnticipationResponse>() {
public void onSuccess(HttpContext context, GetAnticipationResponse response) {
// TODO success callback handler
}
public void onFailure(HttpContext context, Throwable error) {
// TODO failure callback handler
}
});
Gets the anticipation limits for a recipient
void getAnticipationLimitsAsync(
final String recipientId,
final String timeframe,
final DateTime paymentDate,
final APICallBack<GetAnticipationLimitResponse> callBack)
Parameter | Tags | Description |
---|---|---|
recipientId | Required |
Recipient id |
timeframe | Required |
Timeframe |
paymentDate | Required |
Anticipation payment date |
String recipientId = "recipient_id";
String timeframe = "timeframe";
DateTime paymentDate = new Date();
// Invoking the API call with sample inputs
recipients.getAnticipationLimitsAsync(recipientId, timeframe, paymentDate, new APICallBack<GetAnticipationLimitResponse>() {
public void onSuccess(HttpContext context, GetAnticipationLimitResponse response) {
// TODO success callback handler
}
public void onFailure(HttpContext context, Throwable error) {
// TODO failure callback handler
}
});
Retrieves a paginated list of anticipations from a recipient
void getAnticipationsAsync(
final String recipientId,
final Integer page,
final Integer size,
final String status,
final String timeframe,
final DateTime paymentDateSince,
final DateTime paymentDateUntil,
final DateTime createdSince,
final DateTime createdUntil,
final APICallBack<ListAnticipationResponse> 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 |
String recipientId = "recipient_id";
Integer page = 236;
Integer size = 236;
String status = "status";
String timeframe = "timeframe";
DateTime paymentDateSince = new Date();
DateTime paymentDateUntil = new Date();
DateTime createdSince = new Date();
DateTime createdUntil = new Date();
// Invoking the API call with sample inputs
recipients.getAnticipationsAsync(recipientId, page, size, status, timeframe, paymentDateSince, paymentDateUntil, createdSince, createdUntil, new APICallBack<ListAnticipationResponse>() {
public void onSuccess(HttpContext context, ListAnticipationResponse response) {
// TODO success callback handler
}
public void onFailure(HttpContext context, Throwable error) {
// TODO failure callback handler
}
});
Updates recipient metadata
void updateRecipientMetadataAsync(
final String recipientId,
final UpdateMetadataRequest request,
final APICallBack<GetRecipientResponse> callBack)
Parameter | Tags | Description |
---|---|---|
recipientId | Required |
Recipient id |
request | Required |
Metadata |
try {
String recipientId = "recipient_id";
UpdateMetadataRequest request = new UpdateMetadataRequest();
// Invoking the API call with sample inputs
recipients.updateRecipientMetadataAsync(recipientId, request, new APICallBack<GetRecipientResponse>() {
public void onSuccess(HttpContext context, GetRecipientResponse response) {
// TODO success callback handler
}
public void onFailure(HttpContext context, Throwable error) {
// TODO failure callback handler
}
});
} catch(JsonProcessingException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}