Skip to content

lucciani/pagarme-core-api-java

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Getting started

Pagarme API

How to Build

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.

Importing SDK into Eclipse - Step 1

  • In the import dialog, select Existing Java Project and click Next.

Importing SDK into Eclipse - Step 2

  • Browse to locate the folder containing the source code. Select the detected location of the project and click Finish.

Importing SDK into Eclipse - Step 3

  • Upon successful import, the project will be automatically built by Eclipse after automatically resolving the dependencies.

Importing SDK into Eclipse - Step 4

How to Use

The following section explains how to use the PagarmeCoreApi library in a new console project.

1. Starting a new project

For starting a new project, click the menu command File > New > Project.

Add a new project in Eclipse

Next, choose Maven > Maven Projectand click Next.

Create a new Maven Project - Step 1

Here, make sure to use the current workspace by choosing Use default Workspace location, as shown in the picture below and click Next.

Create a new Maven Project - Step 2

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.

Create a new Maven Project - Step 3

In the last step, provide a Group Id and Artifact Id as shown in the picture below and click Finish.

Create a new Maven Project - Step 4

2. Add reference of the library project

The created Maven project manages its dependencies using its pom.xml file. In order to add a dependency on the PagarmeCoreApiLib 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.

Adding dependency to the client library - Step 1

Clicking the Add button will open a dialog where you need to specify PagarmeCoreApi in Group Id and PagarmeCoreApiLib in the Artifact Id fields. Once added click OK. Save the pom.xml file.

Adding dependency to the client library - Step 2

3. Write sample code

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.

Adding dependency to the client library - Step 2

How to Test

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:

  1. Select the project PagarmeCoreApiLib from the package explorer.
  2. Select "Run -> Run as -> JUnit Test" or use "Alt + Shift + X" followed by "T" to run the Tests.

Initialization

Authentication

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

PagarmeCoreApiClient client = new PagarmeCoreApiClient(basicAuthUserName, basicAuthPassword);

Class Reference

List of Controllers

Class: PlansController

Get singleton instance

The singleton instance of the PlansController class can be accessed from the API Client.

PlansController plans = client.getPlans();

Method: getPlanAsync

Gets a plan

void getPlanAsync(
        final String planId,
        final APICallBack<GetPlanResponse> callBack)

Parameters

Parameter Tags Description
planId Required Plan id

Example Usage

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
    }
});

Method: deletePlanAsync

Deletes a plan

void deletePlanAsync(
        final String planId,
        final String idempotencyKey,
        final APICallBack<GetPlanResponse> callBack)

Parameters

Parameter Tags Description
planId Required Plan id
idempotencyKey Optional TODO: Add a parameter description

Example Usage

String planId = "plan_id";
String idempotencyKey = "idempotency-key";
// Invoking the API call with sample inputs
plans.deletePlanAsync(planId, idempotencyKey, 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
    }
});

Method: updatePlanMetadataAsync

Updates the metadata from a plan

void updatePlanMetadataAsync(
        final String planId,
        final UpdateMetadataRequest request,
        final String idempotencyKey,
        final APICallBack<GetPlanResponse> callBack)

Parameters

Parameter Tags Description
planId Required The plan id
request Required Request for updating the plan metadata
idempotencyKey Optional TODO: Add a parameter description

Example Usage

try {
    String planId = "plan_id";
    UpdateMetadataRequest request = new UpdateMetadataRequest();
    String idempotencyKey = "idempotency-key";
    // Invoking the API call with sample inputs
    plans.updatePlanMetadataAsync(planId, request, idempotencyKey, 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();
}

Method: updatePlanItemAsync

Updates a plan item

void updatePlanItemAsync(
        final String planId,
        final String planItemId,
        final UpdatePlanItemRequest body,
        final String idempotencyKey,
        final APICallBack<GetPlanItemResponse> callBack)

Parameters

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

Example Usage

try {
    String planId = "plan_id";
    String planItemId = "plan_item_id";
    UpdatePlanItemRequest body = new UpdatePlanItemRequest();
    String idempotencyKey = "idempotency-key";
    // Invoking the API call with sample inputs
    plans.updatePlanItemAsync(planId, planItemId, body, idempotencyKey, 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();
}

Method: createPlanItemAsync

Adds a new item to a plan

void createPlanItemAsync(
        final String planId,
        final CreatePlanItemRequest request,
        final String idempotencyKey,
        final APICallBack<GetPlanItemResponse> callBack)

Parameters

Parameter Tags Description
planId Required Plan id
request Required Request for creating a plan item
idempotencyKey Optional TODO: Add a parameter description

Example Usage

try {
    String planId = "plan_id";
    CreatePlanItemRequest request = new CreatePlanItemRequest();
    String idempotencyKey = "idempotency-key";
    // Invoking the API call with sample inputs
    plans.createPlanItemAsync(planId, request, idempotencyKey, 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();
}

Method: getPlanItemAsync

Gets a plan item

void getPlanItemAsync(
        final String planId,
        final String planItemId,
        final APICallBack<GetPlanItemResponse> callBack)

Parameters

Parameter Tags Description
planId Required Plan id
planItemId Required Plan item id

Example Usage

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
    }
});

Method: createPlanAsync

Creates a new plan

void createPlanAsync(
        final CreatePlanRequest body,
        final String idempotencyKey,
        final APICallBack<GetPlanResponse> callBack)

Parameters

Parameter Tags Description
body Required Request for creating a plan
idempotencyKey Optional TODO: Add a parameter description

Example Usage

try {
    CreatePlanRequest body = new CreatePlanRequest();
    String idempotencyKey = "idempotency-key";
    // Invoking the API call with sample inputs
    plans.createPlanAsync(body, idempotencyKey, 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();
}

Method: deletePlanItemAsync

Removes an item from a plan

void deletePlanItemAsync(
        final String planId,
        final String planItemId,
        final String idempotencyKey,
        final APICallBack<GetPlanItemResponse> callBack)

Parameters

Parameter Tags Description
planId Required Plan id
planItemId Required Plan item id
idempotencyKey Optional TODO: Add a parameter description

Example Usage

String planId = "plan_id";
String planItemId = "plan_item_id";
String idempotencyKey = "idempotency-key";
// Invoking the API call with sample inputs
plans.deletePlanItemAsync(planId, planItemId, idempotencyKey, 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
    }
});

Method: getPlansAsync

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)

Parameters

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

Example Usage

Integer page = 32;
Integer size = 32;
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
    }
});

Method: updatePlanAsync

Updates a plan

void updatePlanAsync(
        final String planId,
        final UpdatePlanRequest request,
        final String idempotencyKey,
        final APICallBack<GetPlanResponse> callBack)

Parameters

Parameter Tags Description
planId Required Plan id
request Required Request for updating a plan
idempotencyKey Optional TODO: Add a parameter description

Example Usage

try {
    String planId = "plan_id";
    UpdatePlanRequest request = new UpdatePlanRequest();
    String idempotencyKey = "idempotency-key";
    // Invoking the API call with sample inputs
    plans.updatePlanAsync(planId, request, idempotencyKey, 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();
}

Back to List of Controllers

Class: SubscriptionsController

Get singleton instance

The singleton instance of the SubscriptionsController class can be accessed from the API Client.

SubscriptionsController subscriptions = client.getSubscriptions();

Method: renewSubscriptionAsync

TODO: Add a method description

void renewSubscriptionAsync(
        final String subscriptionId,
        final String idempotencyKey,
        final APICallBack<GetPeriodResponse> callBack)

Parameters

Parameter Tags Description
subscriptionId Required TODO: Add a parameter description
idempotencyKey Optional TODO: Add a parameter description

Example Usage

String subscriptionId = "subscription_id";
String idempotencyKey = "idempotency-key";
// Invoking the API call with sample inputs
subscriptions.renewSubscriptionAsync(subscriptionId, idempotencyKey, new APICallBack<GetPeriodResponse>() {
    public void onSuccess(HttpContext context, GetPeriodResponse response) {
        // TODO success callback handler
    }
    public void onFailure(HttpContext context, Throwable error) {
        // TODO failure callback handler
    }
});

Method: updateSubscriptionCardAsync

Updates the credit card from a subscription

void updateSubscriptionCardAsync(
        final String subscriptionId,
        final UpdateSubscriptionCardRequest request,
        final String idempotencyKey,
        final APICallBack<GetSubscriptionResponse> callBack)

Parameters

Parameter Tags Description
subscriptionId Required Subscription id
request Required Request for updating a card
idempotencyKey Optional TODO: Add a parameter description

Example Usage

try {
    String subscriptionId = "subscription_id";
    UpdateSubscriptionCardRequest request = new UpdateSubscriptionCardRequest();
    String idempotencyKey = "idempotency-key";
    // Invoking the API call with sample inputs
    subscriptions.updateSubscriptionCardAsync(subscriptionId, request, idempotencyKey, 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();
}

Method: deleteUsageAsync

Deletes a usage

void deleteUsageAsync(
        final String subscriptionId,
        final String itemId,
        final String usageId,
        final String idempotencyKey,
        final APICallBack<GetUsageResponse> callBack)

Parameters

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

Example Usage

String subscriptionId = "subscription_id";
String itemId = "item_id";
String usageId = "usage_id";
String idempotencyKey = "idempotency-key";
// Invoking the API call with sample inputs
subscriptions.deleteUsageAsync(subscriptionId, itemId, usageId, idempotencyKey, 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
    }
});

Method: createDiscountAsync

Creates a discount

void createDiscountAsync(
        final String subscriptionId,
        final CreateDiscountRequest request,
        final String idempotencyKey,
        final APICallBack<GetDiscountResponse> callBack)

Parameters

Parameter Tags Description
subscriptionId Required Subscription id
request Required Request for creating a discount
idempotencyKey Optional TODO: Add a parameter description

Example Usage

try {
    String subscriptionId = "subscription_id";
    CreateDiscountRequest request = new CreateDiscountRequest();
    String idempotencyKey = "idempotency-key";
    // Invoking the API call with sample inputs
    subscriptions.createDiscountAsync(subscriptionId, request, idempotencyKey, 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();
}

Method: createAnUsageAsync

Create Usage

void createAnUsageAsync(
        final String subscriptionId,
        final String itemId,
        final String idempotencyKey,
        final APICallBack<GetUsageResponse> callBack)

Parameters

Parameter Tags Description
subscriptionId Required Subscription id
itemId Required Item id
idempotencyKey Optional TODO: Add a parameter description

Example Usage

String subscriptionId = "subscription_id";
String itemId = "item_id";
String idempotencyKey = "idempotency-key";
// Invoking the API call with sample inputs
subscriptions.createAnUsageAsync(subscriptionId, itemId, idempotencyKey, 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
    }
});

Method: updateCurrentCycleStatusAsync

TODO: Add a method description

void updateCurrentCycleStatusAsync(
        final String subscriptionId,
        final UpdateCurrentCycleStatusRequest request,
        final String idempotencyKey,
        final APICallBack<Object> callBack)

Parameters

Parameter Tags Description
subscriptionId Required Subscription Id
request Required Request for updating the end date of the subscription current status
idempotencyKey Optional TODO: Add a parameter description

Example Usage

try {
    String subscriptionId = "subscription_id";
    UpdateCurrentCycleStatusRequest request = new UpdateCurrentCycleStatusRequest();
    String idempotencyKey = "idempotency-key";
    // Invoking the API call with sample inputs
    subscriptions.updateCurrentCycleStatusAsync(subscriptionId, request, idempotencyKey, new APICallBack<void>() {
        public void onSuccess(HttpContext context, void 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();
}

Method: deleteDiscountAsync

Deletes a discount

void deleteDiscountAsync(
        final String subscriptionId,
        final String discountId,
        final String idempotencyKey,
        final APICallBack<GetDiscountResponse> callBack)

Parameters

Parameter Tags Description
subscriptionId Required Subscription id
discountId Required Discount Id
idempotencyKey Optional TODO: Add a parameter description

Example Usage

String subscriptionId = "subscription_id";
String discountId = "discount_id";
String idempotencyKey = "idempotency-key";
// Invoking the API call with sample inputs
subscriptions.deleteDiscountAsync(subscriptionId, discountId, idempotencyKey, 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
    }
});

Method: getSubscriptionItemsAsync

Get Subscription Items

void getSubscriptionItemsAsync(
        final String subscriptionId,
        final Integer page,
        final Integer size,
        final String name,
        final String code,
        final String status,
        final String description,
        final String createdSince,
        final String createdUntil,
        final APICallBack<ListSubscriptionItemsResponse> callBack)

Parameters

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

Example Usage

String subscriptionId = "subscription_id";
Integer page = 82;
Integer size = 82;
String name = "name";
String code = "code";
String status = "status";
String description = "description";
String createdSince = "created_since";
String createdUntil = "created_until";
// Invoking the API call with sample inputs
subscriptions.getSubscriptionItemsAsync(subscriptionId, page, size, name, code, status, description, createdSince, createdUntil, new APICallBack<ListSubscriptionItemsResponse>() {
    public void onSuccess(HttpContext context, ListSubscriptionItemsResponse response) {
        // TODO success callback handler
    }
    public void onFailure(HttpContext context, Throwable error) {
        // TODO failure callback handler
    }
});

Method: updateSubscriptionPaymentMethodAsync

Updates the payment method from a subscription

void updateSubscriptionPaymentMethodAsync(
        final String subscriptionId,
        final UpdateSubscriptionPaymentMethodRequest request,
        final String idempotencyKey,
        final APICallBack<GetSubscriptionResponse> callBack)

Parameters

Parameter Tags Description
subscriptionId Required Subscription id
request Required Request for updating the paymentmethod from a subscription
idempotencyKey Optional TODO: Add a parameter description

Example Usage

try {
    String subscriptionId = "subscription_id";
    UpdateSubscriptionPaymentMethodRequest request = new UpdateSubscriptionPaymentMethodRequest();
    String idempotencyKey = "idempotency-key";
    // Invoking the API call with sample inputs
    subscriptions.updateSubscriptionPaymentMethodAsync(subscriptionId, request, idempotencyKey, 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();
}

Method: getSubscriptionItemAsync

Get Subscription Item

void getSubscriptionItemAsync(
        final String subscriptionId,
        final String itemId,
        final APICallBack<GetSubscriptionItemResponse> callBack)

Parameters

Parameter Tags Description
subscriptionId Required Subscription Id
itemId Required Item id

Example Usage

String subscriptionId = "subscription_id";
String itemId = "item_id";
// Invoking the API call with sample inputs
subscriptions.getSubscriptionItemAsync(subscriptionId, itemId, 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
    }
});

Method: getSubscriptionsAsync

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)

Parameters

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

Example Usage

Integer page = 82;
Integer size = 82;
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
    }
});

Method: cancelSubscriptionAsync

Cancels a subscription

void cancelSubscriptionAsync(
        final String subscriptionId,
        final CreateCancelSubscriptionRequest request,
        final String idempotencyKey,
        final APICallBack<GetSubscriptionResponse> callBack)

Parameters

Parameter Tags Description
subscriptionId Required Subscription id
request Optional Request for cancelling a subscription
idempotencyKey Optional TODO: Add a parameter description

Example Usage

try {
    String subscriptionId = "subscription_id";
    CreateCancelSubscriptionRequest request = new CreateCancelSubscriptionRequest();
    String idempotencyKey = "idempotency-key";
    // Invoking the API call with sample inputs
    subscriptions.cancelSubscriptionAsync(subscriptionId, request, idempotencyKey, 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();
}

Method: createIncrementAsync

Creates a increment

void createIncrementAsync(
        final String subscriptionId,
        final CreateIncrementRequest request,
        final String idempotencyKey,
        final APICallBack<GetIncrementResponse> callBack)

Parameters

Parameter Tags Description
subscriptionId Required Subscription id
request Required Request for creating a increment
idempotencyKey Optional TODO: Add a parameter description

Example Usage

try {
    String subscriptionId = "subscription_id";
    CreateIncrementRequest request = new CreateIncrementRequest();
    String idempotencyKey = "idempotency-key";
    // Invoking the API call with sample inputs
    subscriptions.createIncrementAsync(subscriptionId, request, idempotencyKey, new APICallBack<GetIncrementResponse>() {
        public void onSuccess(HttpContext context, GetIncrementResponse 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();
}

Method: createUsageAsync

Creates a usage

void createUsageAsync(
        final String subscriptionId,
        final String itemId,
        final CreateUsageRequest body,
        final String idempotencyKey,
        final APICallBack<GetUsageResponse> callBack)

Parameters

Parameter Tags Description
subscriptionId Required Subscription Id
itemId Required Item id
body Required Request for creating a usage
idempotencyKey Optional TODO: Add a parameter description

Example Usage

try {
    String subscriptionId = "subscription_id";
    String itemId = "item_id";
    CreateUsageRequest body = new CreateUsageRequest();
    String idempotencyKey = "idempotency-key";
    // Invoking the API call with sample inputs
    subscriptions.createUsageAsync(subscriptionId, itemId, body, idempotencyKey, 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();
}

Method: getDiscountByIdAsync

TODO: Add a method description

void getDiscountByIdAsync(
        final String subscriptionId,
        final String discountId,
        final APICallBack<GetDiscountResponse> callBack)

Parameters

Parameter Tags Description
subscriptionId Required The subscription id
discountId Required TODO: Add a parameter description

Example Usage

String subscriptionId = "subscription_id";
String discountId = "discountId";
// Invoking the API call with sample inputs
subscriptions.getDiscountByIdAsync(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
    }
});

Method: createSubscriptionAsync

Creates a new subscription

void createSubscriptionAsync(
        final CreateSubscriptionRequest body,
        final String idempotencyKey,
        final APICallBack<GetSubscriptionResponse> callBack)

Parameters

Parameter Tags Description
body Required Request for creating a subscription
idempotencyKey Optional TODO: Add a parameter description

Example Usage

try {
    CreateSubscriptionRequest body = new CreateSubscriptionRequest();
    String idempotencyKey = "idempotency-key";
    // Invoking the API call with sample inputs
    subscriptions.createSubscriptionAsync(body, idempotencyKey, 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();
}

Method: getIncrementByIdAsync

TODO: Add a method description

void getIncrementByIdAsync(
        final String subscriptionId,
        final String incrementId,
        final APICallBack<GetIncrementResponse> callBack)

Parameters

Parameter Tags Description
subscriptionId Required The subscription Id
incrementId Required The increment Id

Example Usage

String subscriptionId = "subscription_id";
String incrementId = "increment_id";
// Invoking the API call with sample inputs
subscriptions.getIncrementByIdAsync(subscriptionId, incrementId, new APICallBack<GetIncrementResponse>() {
    public void onSuccess(HttpContext context, GetIncrementResponse response) {
        // TODO success callback handler
    }
    public void onFailure(HttpContext context, Throwable error) {
        // TODO failure callback handler
    }
});

Method: updateSubscriptionAffiliationIdAsync

TODO: Add a method description

void updateSubscriptionAffiliationIdAsync(
        final String subscriptionId,
        final UpdateSubscriptionAffiliationIdRequest request,
        final String idempotencyKey,
        final APICallBack<GetSubscriptionResponse> callBack)

Parameters

Parameter Tags Description
subscriptionId Required TODO: Add a parameter description
request Required Request for updating a subscription affiliation id
idempotencyKey Optional TODO: Add a parameter description

Example Usage

try {
    String subscriptionId = "subscription_id";
    UpdateSubscriptionAffiliationIdRequest request = new UpdateSubscriptionAffiliationIdRequest();
    String idempotencyKey = "idempotency-key";
    // Invoking the API call with sample inputs
    subscriptions.updateSubscriptionAffiliationIdAsync(subscriptionId, request, idempotencyKey, 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();
}

Method: updateSubscriptionMetadataAsync

Updates the metadata from a subscription

void updateSubscriptionMetadataAsync(
        final String subscriptionId,
        final UpdateMetadataRequest request,
        final String idempotencyKey,
        final APICallBack<GetSubscriptionResponse> callBack)

Parameters

Parameter Tags Description
subscriptionId Required The subscription id
request Required Request for updating the subscrption metadata
idempotencyKey Optional TODO: Add a parameter description

Example Usage

try {
    String subscriptionId = "subscription_id";
    UpdateMetadataRequest request = new UpdateMetadataRequest();
    String idempotencyKey = "idempotency-key";
    // Invoking the API call with sample inputs
    subscriptions.updateSubscriptionMetadataAsync(subscriptionId, request, idempotencyKey, 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();
}

Method: deleteIncrementAsync

Deletes a increment

void deleteIncrementAsync(
        final String subscriptionId,
        final String incrementId,
        final String idempotencyKey,
        final APICallBack<GetIncrementResponse> callBack)

Parameters

Parameter Tags Description
subscriptionId Required Subscription id
incrementId Required Increment id
idempotencyKey Optional TODO: Add a parameter description

Example Usage

String subscriptionId = "subscription_id";
String incrementId = "increment_id";
String idempotencyKey = "idempotency-key";
// Invoking the API call with sample inputs
subscriptions.deleteIncrementAsync(subscriptionId, incrementId, idempotencyKey, new APICallBack<GetIncrementResponse>() {
    public void onSuccess(HttpContext context, GetIncrementResponse response) {
        // TODO success callback handler
    }
    public void onFailure(HttpContext context, Throwable error) {
        // TODO failure callback handler
    }
});

Method: getSubscriptionCyclesAsync

TODO: Add a method description

void getSubscriptionCyclesAsync(
        final String subscriptionId,
        final String page,
        final String size,
        final APICallBack<ListCyclesResponse> callBack)

Parameters

Parameter Tags Description
subscriptionId Required Subscription Id
page Required Page number
size Required Page size

Example Usage

String subscriptionId = "subscription_id";
String page = "page";
String size = "size";
// Invoking the API call with sample inputs
subscriptions.getSubscriptionCyclesAsync(subscriptionId, page, size, new APICallBack<ListCyclesResponse>() {
    public void onSuccess(HttpContext context, ListCyclesResponse response) {
        // TODO success callback handler
    }
    public void onFailure(HttpContext context, Throwable error) {
        // TODO failure callback handler
    }
});

Method: getDiscountsAsync

TODO: Add a method description

void getDiscountsAsync(
        final String subscriptionId,
        final int page,
        final int size,
        final APICallBack<ListDiscountsResponse> callBack)

Parameters

Parameter Tags Description
subscriptionId Required The subscription id
page Required Page number
size Required Page size

Example Usage

String subscriptionId = "subscription_id";
int page = 82;
int size = 82;
// Invoking the API call with sample inputs
subscriptions.getDiscountsAsync(subscriptionId, page, size, new APICallBack<ListDiscountsResponse>() {
    public void onSuccess(HttpContext context, ListDiscountsResponse response) {
        // TODO success callback handler
    }
    public void onFailure(HttpContext context, Throwable error) {
        // TODO failure callback handler
    }
});

Method: updateSubscriptionBillingDateAsync

Updates the billing date from a subscription

void updateSubscriptionBillingDateAsync(
        final String subscriptionId,
        final UpdateSubscriptionBillingDateRequest request,
        final String idempotencyKey,
        final APICallBack<GetSubscriptionResponse> callBack)

Parameters

Parameter Tags Description
subscriptionId Required The subscription id
request Required Request for updating the subscription billing date
idempotencyKey Optional TODO: Add a parameter description

Example Usage

try {
    String subscriptionId = "subscription_id";
    UpdateSubscriptionBillingDateRequest request = new UpdateSubscriptionBillingDateRequest();
    String idempotencyKey = "idempotency-key";
    // Invoking the API call with sample inputs
    subscriptions.updateSubscriptionBillingDateAsync(subscriptionId, request, idempotencyKey, 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();
}

Method: deleteSubscriptionItemAsync

Deletes a subscription item

void deleteSubscriptionItemAsync(
        final String subscriptionId,
        final String subscriptionItemId,
        final String idempotencyKey,
        final APICallBack<GetSubscriptionItemResponse> callBack)

Parameters

Parameter Tags Description
subscriptionId Required Subscription id
subscriptionItemId Required Subscription item id
idempotencyKey Optional TODO: Add a parameter description

Example Usage

String subscriptionId = "subscription_id";
String subscriptionItemId = "subscription_item_id";
String idempotencyKey = "idempotency-key";
// Invoking the API call with sample inputs
subscriptions.deleteSubscriptionItemAsync(subscriptionId, subscriptionItemId, idempotencyKey, 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
    }
});

Method: getIncrementsAsync

TODO: Add a method description

void getIncrementsAsync(
        final String subscriptionId,
        final Integer page,
        final Integer size,
        final APICallBack<ListIncrementsResponse> callBack)

Parameters

Parameter Tags Description
subscriptionId Required The subscription id
page Optional Page number
size Optional Page size

Example Usage

String subscriptionId = "subscription_id";
Integer page = 82;
Integer size = 82;
// Invoking the API call with sample inputs
subscriptions.getIncrementsAsync(subscriptionId, page, size, new APICallBack<ListIncrementsResponse>() {
    public void onSuccess(HttpContext context, ListIncrementsResponse response) {
        // TODO success callback handler
    }
    public void onFailure(HttpContext context, Throwable error) {
        // TODO failure callback handler
    }
});

Method: updateSubscriptionDueDaysAsync

Updates the boleto due days from a subscription

void updateSubscriptionDueDaysAsync(
        final String subscriptionId,
        final UpdateSubscriptionDueDaysRequest request,
        final String idempotencyKey,
        final APICallBack<GetSubscriptionResponse> callBack)

Parameters

Parameter Tags Description
subscriptionId Required Subscription Id
request Required TODO: Add a parameter description
idempotencyKey Optional TODO: Add a parameter description

Example Usage

try {
    String subscriptionId = "subscription_id";
    UpdateSubscriptionDueDaysRequest request = new UpdateSubscriptionDueDaysRequest();
    String idempotencyKey = "idempotency-key";
    // Invoking the API call with sample inputs
    subscriptions.updateSubscriptionDueDaysAsync(subscriptionId, request, idempotencyKey, 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();
}

Method: updateSubscriptionStartAtAsync

Updates the start at date from a subscription

void updateSubscriptionStartAtAsync(
        final String subscriptionId,
        final UpdateSubscriptionStartAtRequest request,
        final String idempotencyKey,
        final APICallBack<GetSubscriptionResponse> callBack)

Parameters

Parameter Tags Description
subscriptionId Required The subscription id
request Required Request for updating the subscription start date
idempotencyKey Optional TODO: Add a parameter description

Example Usage

try {
    String subscriptionId = "subscription_id";
    UpdateSubscriptionStartAtRequest request = new UpdateSubscriptionStartAtRequest();
    String idempotencyKey = "idempotency-key";
    // Invoking the API call with sample inputs
    subscriptions.updateSubscriptionStartAtAsync(subscriptionId, request, idempotencyKey, 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();
}

Method: updateSubscriptionItemAsync

Updates a subscription item

void updateSubscriptionItemAsync(
        final String subscriptionId,
        final String itemId,
        final UpdateSubscriptionItemRequest body,
        final String idempotencyKey,
        final APICallBack<GetSubscriptionItemResponse> callBack)

Parameters

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

Example Usage

try {
    String subscriptionId = "subscription_id";
    String itemId = "item_id";
    UpdateSubscriptionItemRequest body = new UpdateSubscriptionItemRequest();
    String idempotencyKey = "idempotency-key";
    // Invoking the API call with sample inputs
    subscriptions.updateSubscriptionItemAsync(subscriptionId, itemId, body, idempotencyKey, 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();
}

Method: createSubscriptionItemAsync

Creates a new Subscription item

void createSubscriptionItemAsync(
        final String subscriptionId,
        final CreateSubscriptionItemRequest request,
        final String idempotencyKey,
        final APICallBack<GetSubscriptionItemResponse> callBack)

Parameters

Parameter Tags Description
subscriptionId Required Subscription id
request Required Request for creating a subscription item
idempotencyKey Optional TODO: Add a parameter description

Example Usage

try {
    String subscriptionId = "subscription_id";
    CreateSubscriptionItemRequest request = new CreateSubscriptionItemRequest();
    String idempotencyKey = "idempotency-key";
    // Invoking the API call with sample inputs
    subscriptions.createSubscriptionItemAsync(subscriptionId, request, idempotencyKey, 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();
}

Method: getSubscriptionAsync

Gets a subscription

void getSubscriptionAsync(
        final String subscriptionId,
        final APICallBack<GetSubscriptionResponse> callBack)

Parameters

Parameter Tags Description
subscriptionId Required Subscription id

Example Usage

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
    }
});

Method: getUsagesAsync

Lists all usages from a subscription item

void getUsagesAsync(
        final String subscriptionId,
        final String itemId,
        final Integer page,
        final Integer size,
        final String code,
        final String group,
        final DateTime usedSince,
        final DateTime usedUntil,
        final APICallBack<ListUsagesResponse> callBack)

Parameters

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

Example Usage

String subscriptionId = "subscription_id";
String itemId = "item_id";
Integer page = 82;
Integer size = 82;
String code = "code";
String group = "group";
DateTime usedSince = new Date();
DateTime usedUntil = new Date();
// Invoking the API call with sample inputs
subscriptions.getUsagesAsync(subscriptionId, itemId, page, size, code, group, usedSince, usedUntil, 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
    }
});

Method: updateLatestPeriodEndAtAsync

TODO: Add a method description

void updateLatestPeriodEndAtAsync(
        final String subscriptionId,
        final UpdateCurrentCycleEndDateRequest request,
        final String idempotencyKey,
        final APICallBack<GetSubscriptionResponse> callBack)

Parameters

Parameter Tags Description
subscriptionId Required TODO: Add a parameter description
request Required Request for updating the end date of the current signature cycle
idempotencyKey Optional TODO: Add a parameter description

Example Usage

try {
    String subscriptionId = "subscription_id";
    UpdateCurrentCycleEndDateRequest request = new UpdateCurrentCycleEndDateRequest();
    String idempotencyKey = "idempotency-key";
    // Invoking the API call with sample inputs
    subscriptions.updateLatestPeriodEndAtAsync(subscriptionId, request, idempotencyKey, 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();
}

Method: updateSubscriptionMiniumPriceAsync

Atualização do valor mínimo da assinatura

void updateSubscriptionMiniumPriceAsync(
        final String subscriptionId,
        final UpdateSubscriptionMinimumPriceRequest request,
        final String idempotencyKey,
        final APICallBack<GetSubscriptionResponse> callBack)

Parameters

Parameter Tags Description
subscriptionId Required Subscription Id
request Required Request da requisição com o valor mínimo que será configurado
idempotencyKey Optional TODO: Add a parameter description

Example Usage

try {
    String subscriptionId = "subscription_id";
    UpdateSubscriptionMinimumPriceRequest request = new UpdateSubscriptionMinimumPriceRequest();
    String idempotencyKey = "idempotency-key";
    // Invoking the API call with sample inputs
    subscriptions.updateSubscriptionMiniumPriceAsync(subscriptionId, request, idempotencyKey, 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();
}

Method: getSubscriptionCycleByIdAsync

TODO: Add a method description

void getSubscriptionCycleByIdAsync(
        final String subscriptionId,
        final String cycleId,
        final APICallBack<GetPeriodResponse> callBack)

Parameters

Parameter Tags Description
subscriptionId Required The subscription id
cycleId Required TODO: Add a parameter description

Example Usage

String subscriptionId = "subscription_id";
String cycleId = "cycleId";
// Invoking the API call with sample inputs
subscriptions.getSubscriptionCycleByIdAsync(subscriptionId, cycleId, new APICallBack<GetPeriodResponse>() {
    public void onSuccess(HttpContext context, GetPeriodResponse response) {
        // TODO success callback handler
    }
    public void onFailure(HttpContext context, Throwable error) {
        // TODO failure callback handler
    }
});

Method: getUsageReportAsync

TODO: Add a method description

void getUsageReportAsync(
        final String subscriptionId,
        final String periodId,
        final APICallBack<GetUsageReportResponse> callBack)

Parameters

Parameter Tags Description
subscriptionId Required The subscription Id
periodId Required The period Id

Example Usage

String subscriptionId = "subscription_id";
String periodId = "period_id";
// Invoking the API call with sample inputs
subscriptions.getUsageReportAsync(subscriptionId, periodId, new APICallBack<GetUsageReportResponse>() {
    public void onSuccess(HttpContext context, GetUsageReportResponse response) {
        // TODO success callback handler
    }
    public void onFailure(HttpContext context, Throwable error) {
        // TODO failure callback handler
    }
});

Method: updateSplitSubscriptionAsync

TODO: Add a method description

void updateSplitSubscriptionAsync(
        final String id,
        final UpdateSubscriptionSplitRequest request,
        final APICallBack<GetSubscriptionResponse> callBack)

Parameters

Parameter Tags Description
id Required Subscription's id
request Required TODO: Add a parameter description

Example Usage

try {
    String id = "id";
    UpdateSubscriptionSplitRequest request = new UpdateSubscriptionSplitRequest();
    // Invoking the API call with sample inputs
    subscriptions.updateSplitSubscriptionAsync(id, 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();
}

Back to List of Controllers

Class: InvoicesController

Get singleton instance

The singleton instance of the InvoicesController class can be accessed from the API Client.

InvoicesController invoices = client.getInvoices();

Method: updateInvoiceMetadataAsync

Updates the metadata from an invoice

void updateInvoiceMetadataAsync(
        final String invoiceId,
        final UpdateMetadataRequest request,
        final String idempotencyKey,
        final APICallBack<GetInvoiceResponse> callBack)

Parameters

Parameter Tags Description
invoiceId Required The invoice id
request Required Request for updating the invoice metadata
idempotencyKey Optional TODO: Add a parameter description

Example Usage

try {
    String invoiceId = "invoice_id";
    UpdateMetadataRequest request = new UpdateMetadataRequest();
    String idempotencyKey = "idempotency-key";
    // Invoking the API call with sample inputs
    invoices.updateInvoiceMetadataAsync(invoiceId, request, idempotencyKey, 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();
}

Method: getPartialInvoiceAsync

TODO: Add a method description

void getPartialInvoiceAsync(
        final String subscriptionId,
        final APICallBack<GetInvoiceResponse> callBack)

Parameters

Parameter Tags Description
subscriptionId Required Subscription Id

Example Usage

String subscriptionId = "subscription_id";
// Invoking the API call with sample inputs
invoices.getPartialInvoiceAsync(subscriptionId, 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
    }
});

Method: cancelInvoiceAsync

Cancels an invoice

void cancelInvoiceAsync(
        final String invoiceId,
        final String idempotencyKey,
        final APICallBack<GetInvoiceResponse> callBack)

Parameters

Parameter Tags Description
invoiceId Required Invoice id
idempotencyKey Optional TODO: Add a parameter description

Example Usage

String invoiceId = "invoice_id";
String idempotencyKey = "idempotency-key";
// Invoking the API call with sample inputs
invoices.cancelInvoiceAsync(invoiceId, idempotencyKey, 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
    }
});

Method: createInvoiceAsync

Create an Invoice

void createInvoiceAsync(
        final String subscriptionId,
        final String cycleId,
        final CreateInvoiceRequest request,
        final String idempotencyKey,
        final APICallBack<GetInvoiceResponse> callBack)

Parameters

Parameter Tags Description
subscriptionId Required Subscription Id
cycleId Required Cycle Id
request Optional TODO: Add a parameter description
idempotencyKey Optional TODO: Add a parameter description

Example Usage

try {
    String subscriptionId = "subscription_id";
    String cycleId = "cycle_id";
    CreateInvoiceRequest request = new CreateInvoiceRequest();
    String idempotencyKey = "idempotency-key";
    // Invoking the API call with sample inputs
    invoices.createInvoiceAsync(subscriptionId, cycleId, request, idempotencyKey, 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();
}

Method: getInvoicesAsync

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 String customerDocument,
        final APICallBack<ListInvoicesResponse> callBack)

Parameters

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 TODO: Add a parameter description

Example Usage

Integer page = 82;
Integer size = 82;
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();
String customerDocument = "customer_document";
// Invoking the API call with sample inputs
invoices.getInvoicesAsync(page, size, code, customerId, subscriptionId, createdSince, createdUntil, status, dueSince, dueUntil, customerDocument, 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
    }
});

Method: getInvoiceAsync

Gets an invoice

void getInvoiceAsync(
        final String invoiceId,
        final APICallBack<GetInvoiceResponse> callBack)

Parameters

Parameter Tags Description
invoiceId Required Invoice Id

Example Usage

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
    }
});

Method: updateInvoiceStatusAsync

Updates the status from an invoice

void updateInvoiceStatusAsync(
        final String invoiceId,
        final UpdateInvoiceStatusRequest request,
        final String idempotencyKey,
        final APICallBack<GetInvoiceResponse> callBack)

Parameters

Parameter Tags Description
invoiceId Required Invoice Id
request Required Request for updating an invoice's status
idempotencyKey Optional TODO: Add a parameter description

Example Usage

try {
    String invoiceId = "invoice_id";
    UpdateInvoiceStatusRequest request = new UpdateInvoiceStatusRequest();
    String idempotencyKey = "idempotency-key";
    // Invoking the API call with sample inputs
    invoices.updateInvoiceStatusAsync(invoiceId, request, idempotencyKey, 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();
}

Back to List of Controllers

Class: OrdersController

Get singleton instance

The singleton instance of the OrdersController class can be accessed from the API Client.

OrdersController orders = client.getOrders();

Method: getOrdersAsync

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)

Parameters

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

Example Usage

Integer page = 82;
Integer size = 82;
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
    }
});

Method: updateOrderItemAsync

TODO: Add a method description

void updateOrderItemAsync(
        final String orderId,
        final String itemId,
        final UpdateOrderItemRequest request,
        final String idempotencyKey,
        final APICallBack<GetOrderItemResponse> callBack)

Parameters

Parameter Tags Description
orderId Required Order Id
itemId Required Item Id
request Required Item Model
idempotencyKey Optional TODO: Add a parameter description

Example Usage

try {
    String orderId = "orderId";
    String itemId = "itemId";
    UpdateOrderItemRequest request = new UpdateOrderItemRequest();
    String idempotencyKey = "idempotency-key";
    // Invoking the API call with sample inputs
    orders.updateOrderItemAsync(orderId, itemId, request, idempotencyKey, new APICallBack<GetOrderItemResponse>() {
        public void onSuccess(HttpContext context, GetOrderItemResponse 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();
}

Method: deleteAllOrderItemsAsync

TODO: Add a method description

void deleteAllOrderItemsAsync(
        final String orderId,
        final String idempotencyKey,
        final APICallBack<GetOrderResponse> callBack)

Parameters

Parameter Tags Description
orderId Required Order Id
idempotencyKey Optional TODO: Add a parameter description

Example Usage

String orderId = "orderId";
String idempotencyKey = "idempotency-key";
// Invoking the API call with sample inputs
orders.deleteAllOrderItemsAsync(orderId, idempotencyKey, 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
    }
});

Method: deleteOrderItemAsync

TODO: Add a method description

void deleteOrderItemAsync(
        final String orderId,
        final String itemId,
        final String idempotencyKey,
        final APICallBack<GetOrderItemResponse> callBack)

Parameters

Parameter Tags Description
orderId Required Order Id
itemId Required Item Id
idempotencyKey Optional TODO: Add a parameter description

Example Usage

String orderId = "orderId";
String itemId = "itemId";
String idempotencyKey = "idempotency-key";
// Invoking the API call with sample inputs
orders.deleteOrderItemAsync(orderId, itemId, idempotencyKey, new APICallBack<GetOrderItemResponse>() {
    public void onSuccess(HttpContext context, GetOrderItemResponse response) {
        // TODO success callback handler
    }
    public void onFailure(HttpContext context, Throwable error) {
        // TODO failure callback handler
    }
});

Method: closeOrderAsync

TODO: Add a method description

void closeOrderAsync(
        final String id,
        final UpdateOrderStatusRequest request,
        final String idempotencyKey,
        final APICallBack<GetOrderResponse> callBack)

Parameters

Parameter Tags Description
id Required Order Id
request Required Update Order Model
idempotencyKey Optional TODO: Add a parameter description

Example Usage

try {
    String id = "id";
    UpdateOrderStatusRequest request = new UpdateOrderStatusRequest();
    String idempotencyKey = "idempotency-key";
    // Invoking the API call with sample inputs
    orders.closeOrderAsync(id, request, idempotencyKey, 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();
}

Method: createOrderAsync

Creates a new Order

void createOrderAsync(
        final CreateOrderRequest body,
        final String idempotencyKey,
        final APICallBack<GetOrderResponse> callBack)

Parameters

Parameter Tags Description
body Required Request for creating an order
idempotencyKey Optional TODO: Add a parameter description

Example Usage

try {
    CreateOrderRequest body = new CreateOrderRequest();
    String idempotencyKey = "idempotency-key";
    // Invoking the API call with sample inputs
    orders.createOrderAsync(body, idempotencyKey, 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();
}

Method: createOrderItemAsync

TODO: Add a method description

void createOrderItemAsync(
        final String orderId,
        final CreateOrderItemRequest request,
        final String idempotencyKey,
        final APICallBack<GetOrderItemResponse> callBack)

Parameters

Parameter Tags Description
orderId Required Order Id
request Required Order Item Model
idempotencyKey Optional TODO: Add a parameter description

Example Usage

try {
    String orderId = "orderId";
    CreateOrderItemRequest request = new CreateOrderItemRequest();
    String idempotencyKey = "idempotency-key";
    // Invoking the API call with sample inputs
    orders.createOrderItemAsync(orderId, request, idempotencyKey, new APICallBack<GetOrderItemResponse>() {
        public void onSuccess(HttpContext context, GetOrderItemResponse 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();
}

Method: getOrderItemAsync

TODO: Add a method description

void getOrderItemAsync(
        final String orderId,
        final String itemId,
        final APICallBack<GetOrderItemResponse> callBack)

Parameters

Parameter Tags Description
orderId Required Order Id
itemId Required Item Id

Example Usage

String orderId = "orderId";
String itemId = "itemId";
// Invoking the API call with sample inputs
orders.getOrderItemAsync(orderId, itemId, new APICallBack<GetOrderItemResponse>() {
    public void onSuccess(HttpContext context, GetOrderItemResponse response) {
        // TODO success callback handler
    }
    public void onFailure(HttpContext context, Throwable error) {
        // TODO failure callback handler
    }
});

Method: updateOrderMetadataAsync

Updates the metadata from an order

void updateOrderMetadataAsync(
        final String orderId,
        final UpdateMetadataRequest request,
        final String idempotencyKey,
        final APICallBack<GetOrderResponse> callBack)

Parameters

Parameter Tags Description
orderId Required The order id
request Required Request for updating the order metadata
idempotencyKey Optional TODO: Add a parameter description

Example Usage

try {
    String orderId = "order_id";
    UpdateMetadataRequest request = new UpdateMetadataRequest();
    String idempotencyKey = "idempotency-key";
    // Invoking the API call with sample inputs
    orders.updateOrderMetadataAsync(orderId, request, idempotencyKey, 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();
}

Method: getOrderAsync

Gets an order

void getOrderAsync(
        final String orderId,
        final APICallBack<GetOrderResponse> callBack)

Parameters

Parameter Tags Description
orderId Required Order id

Example Usage

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
    }
});

Back to List of Controllers

Class: CustomersController

Get singleton instance

The singleton instance of the CustomersController class can be accessed from the API Client.

CustomersController customers = client.getCustomers();

Method: updateCardAsync

Updates a card

void updateCardAsync(
        final String customerId,
        final String cardId,
        final UpdateCardRequest request,
        final String idempotencyKey,
        final APICallBack<GetCardResponse> callBack)

Parameters

Parameter Tags Description
customerId Required Customer Id
cardId Required Card id
request Required Request for updating a card
idempotencyKey Optional TODO: Add a parameter description

Example Usage

try {
    String customerId = "customer_id";
    String cardId = "card_id";
    UpdateCardRequest request = new UpdateCardRequest();
    String idempotencyKey = "idempotency-key";
    // Invoking the API call with sample inputs
    customers.updateCardAsync(customerId, cardId, request, idempotencyKey, 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();
}

Method: updateAddressAsync

Updates an address

void updateAddressAsync(
        final String customerId,
        final String addressId,
        final UpdateAddressRequest request,
        final String idempotencyKey,
        final APICallBack<GetAddressResponse> callBack)

Parameters

Parameter Tags Description
customerId Required Customer Id
addressId Required Address Id
request Required Request for updating an address
idempotencyKey Optional TODO: Add a parameter description

Example Usage

try {
    String customerId = "customer_id";
    String addressId = "address_id";
    UpdateAddressRequest request = new UpdateAddressRequest();
    String idempotencyKey = "idempotency-key";
    // Invoking the API call with sample inputs
    customers.updateAddressAsync(customerId, addressId, request, idempotencyKey, 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();
}

Method: deleteAccessTokenAsync

Delete a customer's access token

void deleteAccessTokenAsync(
        final String customerId,
        final String tokenId,
        final String idempotencyKey,
        final APICallBack<GetAccessTokenResponse> callBack)

Parameters

Parameter Tags Description
customerId Required Customer Id
tokenId Required Token Id
idempotencyKey Optional TODO: Add a parameter description

Example Usage

String customerId = "customer_id";
String tokenId = "token_id";
String idempotencyKey = "idempotency-key";
// Invoking the API call with sample inputs
customers.deleteAccessTokenAsync(customerId, tokenId, idempotencyKey, 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
    }
});

Method: createCustomerAsync

Creates a new customer

void createCustomerAsync(
        final CreateCustomerRequest request,
        final String idempotencyKey,
        final APICallBack<GetCustomerResponse> callBack)

Parameters

Parameter Tags Description
request Required Request for creating a customer
idempotencyKey Optional TODO: Add a parameter description

Example Usage

try {
    CreateCustomerRequest request = new CreateCustomerRequest();
    String idempotencyKey = "idempotency-key";
    // Invoking the API call with sample inputs
    customers.createCustomerAsync(request, idempotencyKey, 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();
}

Method: createAddressAsync

Creates a new address for a customer

void createAddressAsync(
        final String customerId,
        final CreateAddressRequest request,
        final String idempotencyKey,
        final APICallBack<GetAddressResponse> callBack)

Parameters

Parameter Tags Description
customerId Required Customer Id
request Required Request for creating an address
idempotencyKey Optional TODO: Add a parameter description

Example Usage

try {
    String customerId = "customer_id";
    CreateAddressRequest request = new CreateAddressRequest();
    String idempotencyKey = "idempotency-key";
    // Invoking the API call with sample inputs
    customers.createAddressAsync(customerId, request, idempotencyKey, 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();
}

Method: deleteAccessTokensAsync

Delete a Customer's access tokens

void deleteAccessTokensAsync(
        final String customerId,
        final APICallBack<ListAccessTokensResponse> callBack)

Parameters

Parameter Tags Description
customerId Required Customer Id

Example Usage

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
    }
});

Method: getAddressAsync

Get a customer's address

void getAddressAsync(
        final String customerId,
        final String addressId,
        final APICallBack<GetAddressResponse> callBack)

Parameters

Parameter Tags Description
customerId Required Customer id
addressId Required Address Id

Example Usage

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
    }
});

Method: deleteAddressAsync

Delete a Customer's address

void deleteAddressAsync(
        final String customerId,
        final String addressId,
        final String idempotencyKey,
        final APICallBack<GetAddressResponse> callBack)

Parameters

Parameter Tags Description
customerId Required Customer Id
addressId Required Address Id
idempotencyKey Optional TODO: Add a parameter description

Example Usage

String customerId = "customer_id";
String addressId = "address_id";
String idempotencyKey = "idempotency-key";
// Invoking the API call with sample inputs
customers.deleteAddressAsync(customerId, addressId, idempotencyKey, 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
    }
});

Method: createCardAsync

Creates a new card for a customer

void createCardAsync(
        final String customerId,
        final CreateCardRequest request,
        final String idempotencyKey,
        final APICallBack<GetCardResponse> callBack)

Parameters

Parameter Tags Description
customerId Required Customer id
request Required Request for creating a card
idempotencyKey Optional TODO: Add a parameter description

Example Usage

try {
    String customerId = "customer_id";
    CreateCardRequest request = new CreateCardRequest();
    String idempotencyKey = "idempotency-key";
    // Invoking the API call with sample inputs
    customers.createCardAsync(customerId, request, idempotencyKey, 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();
}

Method: getCustomersAsync

Get all Customers

void getCustomersAsync(
        final String name,
        final String document,
        final Integer page,
        final Integer size,
        final String email,
        final String code,
        final APICallBack<ListCustomersResponse> callBack)

Parameters

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
email Optional Customer's email
code Optional Customer's code

Example Usage

String name = "name";
String document = "document";
Integer page = 1;
Integer size = 10;
String email = "email";
String code = "Code";
// Invoking the API call with sample inputs
customers.getCustomersAsync(name, document, page, size, email, code, 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
    }
});

Method: updateCustomerAsync

Updates a customer

void updateCustomerAsync(
        final String customerId,
        final UpdateCustomerRequest request,
        final String idempotencyKey,
        final APICallBack<GetCustomerResponse> callBack)

Parameters

Parameter Tags Description
customerId Required Customer id
request Required Request for updating a customer
idempotencyKey Optional TODO: Add a parameter description

Example Usage

try {
    String customerId = "customer_id";
    UpdateCustomerRequest request = new UpdateCustomerRequest();
    String idempotencyKey = "idempotency-key";
    // Invoking the API call with sample inputs
    customers.updateCustomerAsync(customerId, request, idempotencyKey, 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();
}

Method: createAccessTokenAsync

Creates a access token for a customer

void createAccessTokenAsync(
        final String customerId,
        final CreateAccessTokenRequest request,
        final String idempotencyKey,
        final APICallBack<GetAccessTokenResponse> callBack)

Parameters

Parameter Tags Description
customerId Required Customer Id
request Required Request for creating a access token
idempotencyKey Optional TODO: Add a parameter description

Example Usage

try {
    String customerId = "customer_id";
    CreateAccessTokenRequest request = new CreateAccessTokenRequest();
    String idempotencyKey = "idempotency-key";
    // Invoking the API call with sample inputs
    customers.createAccessTokenAsync(customerId, request, idempotencyKey, 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();
}

Method: getAccessTokensAsync

Get all access tokens from a customer

void getAccessTokensAsync(
        final String customerId,
        final Integer page,
        final Integer size,
        final APICallBack<ListAccessTokensResponse> callBack)

Parameters

Parameter Tags Description
customerId Required Customer Id
page Optional Page number
size Optional Page size

Example Usage

String customerId = "customer_id";
Integer page = 173;
Integer size = 173;
// 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
    }
});

Method: getCardsAsync

Get all cards from a customer

void getCardsAsync(
        final String customerId,
        final Integer page,
        final Integer size,
        final APICallBack<ListCardsResponse> callBack)

Parameters

Parameter Tags Description
customerId Required Customer Id
page Optional Page number
size Optional Page size

Example Usage

String customerId = "customer_id";
Integer page = 173;
Integer size = 173;
// 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
    }
});

Method: renewCardAsync

Renew a card

void renewCardAsync(
        final String customerId,
        final String cardId,
        final String idempotencyKey,
        final APICallBack<GetCardResponse> callBack)

Parameters

Parameter Tags Description
customerId Required Customer id
cardId Required Card Id
idempotencyKey Optional TODO: Add a parameter description

Example Usage

String customerId = "customer_id";
String cardId = "card_id";
String idempotencyKey = "idempotency-key";
// Invoking the API call with sample inputs
customers.renewCardAsync(customerId, cardId, idempotencyKey, 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
    }
});

Method: getAccessTokenAsync

Get a Customer's access token

void getAccessTokenAsync(
        final String customerId,
        final String tokenId,
        final APICallBack<GetAccessTokenResponse> callBack)

Parameters

Parameter Tags Description
customerId Required Customer Id
tokenId Required Token Id

Example Usage

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
    }
});

Method: updateCustomerMetadataAsync

Updates the metadata a customer

void updateCustomerMetadataAsync(
        final String customerId,
        final UpdateMetadataRequest request,
        final String idempotencyKey,
        final APICallBack<GetCustomerResponse> callBack)

Parameters

Parameter Tags Description
customerId Required The customer id
request Required Request for updating the customer metadata
idempotencyKey Optional TODO: Add a parameter description

Example Usage

try {
    String customerId = "customer_id";
    UpdateMetadataRequest request = new UpdateMetadataRequest();
    String idempotencyKey = "idempotency-key";
    // Invoking the API call with sample inputs
    customers.updateCustomerMetadataAsync(customerId, request, idempotencyKey, 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();
}

Method: deleteCardAsync

Delete a customer's card

void deleteCardAsync(
        final String customerId,
        final String cardId,
        final String idempotencyKey,
        final APICallBack<GetCardResponse> callBack)

Parameters

Parameter Tags Description
customerId Required Customer Id
cardId Required Card Id
idempotencyKey Optional TODO: Add a parameter description

Example Usage

String customerId = "customer_id";
String cardId = "card_id";
String idempotencyKey = "idempotency-key";
// Invoking the API call with sample inputs
customers.deleteCardAsync(customerId, cardId, idempotencyKey, 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
    }
});

Method: getAddressesAsync

Gets all adressess from a customer

void getAddressesAsync(
        final String customerId,
        final Integer page,
        final Integer size,
        final APICallBack<ListAddressesResponse> callBack)

Parameters

Parameter Tags Description
customerId Required Customer id
page Optional Page number
size Optional Page size

Example Usage

String customerId = "customer_id";
Integer page = 173;
Integer size = 173;
// 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
    }
});

Method: getCustomerAsync

Get a customer

void getCustomerAsync(
        final String customerId,
        final APICallBack<GetCustomerResponse> callBack)

Parameters

Parameter Tags Description
customerId Required Customer Id

Example Usage

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
    }
});

Method: getCardAsync

Get a customer's card

void getCardAsync(
        final String customerId,
        final String cardId,
        final APICallBack<GetCardResponse> callBack)

Parameters

Parameter Tags Description
customerId Required Customer id
cardId Required Card id

Example Usage

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
    }
});

Back to List of Controllers

Class: RecipientsController

Get singleton instance

The singleton instance of the RecipientsController class can be accessed from the API Client.

RecipientsController recipients = client.getRecipients();

Method: updateRecipientAsync

Updates a recipient

void updateRecipientAsync(
        final String recipientId,
        final UpdateRecipientRequest request,
        final String idempotencyKey,
        final APICallBack<GetRecipientResponse> callBack)

Parameters

Parameter Tags Description
recipientId Required Recipient id
request Required Recipient data
idempotencyKey Optional TODO: Add a parameter description

Example Usage

try {
    String recipientId = "recipient_id";
    UpdateRecipientRequest request = new UpdateRecipientRequest();
    String idempotencyKey = "idempotency-key";
    // Invoking the API call with sample inputs
    recipients.updateRecipientAsync(recipientId, request, idempotencyKey, 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();
}

Method: createAnticipationAsync

Creates an anticipation

void createAnticipationAsync(
        final String recipientId,
        final CreateAnticipationRequest request,
        final String idempotencyKey,
        final APICallBack<GetAnticipationResponse> callBack)

Parameters

Parameter Tags Description
recipientId Required Recipient id
request Required Anticipation data
idempotencyKey Optional TODO: Add a parameter description

Example Usage

try {
    String recipientId = "recipient_id";
    CreateAnticipationRequest request = new CreateAnticipationRequest();
    String idempotencyKey = "idempotency-key";
    // Invoking the API call with sample inputs
    recipients.createAnticipationAsync(recipientId, request, idempotencyKey, 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();
}

Method: getAnticipationLimitsAsync

Gets the anticipation limits for a recipient

void getAnticipationLimitsAsync(
        final String recipientId,
        final String timeframe,
        final DateTime paymentDate,
        final APICallBack<GetAnticipationLimitResponse> callBack)

Parameters

Parameter Tags Description
recipientId Required Recipient id
timeframe Required Timeframe
paymentDate Required Anticipation payment date

Example Usage

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
    }
});

Method: getRecipientsAsync

Retrieves paginated recipients information

void getRecipientsAsync(
        final Integer page,
        final Integer size,
        final APICallBack<ListRecipientResponse> callBack)

Parameters

Parameter Tags Description
page Optional Page number
size Optional Page size

Example Usage

Integer page = 173;
Integer size = 173;
// 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
    }
});

Method: getWithdrawByIdAsync

TODO: Add a method description

void getWithdrawByIdAsync(
        final String recipientId,
        final String withdrawalId,
        final APICallBack<GetWithdrawResponse> callBack)

Parameters

Parameter Tags Description
recipientId Required TODO: Add a parameter description
withdrawalId Required TODO: Add a parameter description

Example Usage

String recipientId = "recipient_id";
String withdrawalId = "withdrawal_id";
// Invoking the API call with sample inputs
recipients.getWithdrawByIdAsync(recipientId, withdrawalId, new APICallBack<GetWithdrawResponse>() {
    public void onSuccess(HttpContext context, GetWithdrawResponse response) {
        // TODO success callback handler
    }
    public void onFailure(HttpContext context, Throwable error) {
        // TODO failure callback handler
    }
});

Method: updateRecipientDefaultBankAccountAsync

Updates the default bank account from a recipient

void updateRecipientDefaultBankAccountAsync(
        final String recipientId,
        final UpdateRecipientBankAccountRequest request,
        final String idempotencyKey,
        final APICallBack<GetRecipientResponse> callBack)

Parameters

Parameter Tags Description
recipientId Required Recipient id
request Required Bank account data
idempotencyKey Optional TODO: Add a parameter description

Example Usage

try {
    String recipientId = "recipient_id";
    UpdateRecipientBankAccountRequest request = new UpdateRecipientBankAccountRequest();
    String idempotencyKey = "idempotency-key";
    // Invoking the API call with sample inputs
    recipients.updateRecipientDefaultBankAccountAsync(recipientId, request, idempotencyKey, 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();
}

Method: updateRecipientMetadataAsync

Updates recipient metadata

void updateRecipientMetadataAsync(
        final String recipientId,
        final UpdateMetadataRequest request,
        final String idempotencyKey,
        final APICallBack<GetRecipientResponse> callBack)

Parameters

Parameter Tags Description
recipientId Required Recipient id
request Required Metadata
idempotencyKey Optional TODO: Add a parameter description

Example Usage

try {
    String recipientId = "recipient_id";
    UpdateMetadataRequest request = new UpdateMetadataRequest();
    String idempotencyKey = "idempotency-key";
    // Invoking the API call with sample inputs
    recipients.updateRecipientMetadataAsync(recipientId, request, idempotencyKey, 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();
}

Method: getTransfersAsync

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)

Parameters

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

Example Usage

String recipientId = "recipient_id";
Integer page = 173;
Integer size = 173;
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
    }
});

Method: getTransferAsync

Gets a transfer

void getTransferAsync(
        final String recipientId,
        final String transferId,
        final APICallBack<GetTransferResponse> callBack)

Parameters

Parameter Tags Description
recipientId Required Recipient id
transferId Required Transfer id

Example Usage

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
    }
});

Method: createWithdrawAsync

TODO: Add a method description

void createWithdrawAsync(
        final String recipientId,
        final CreateWithdrawRequest request,
        final APICallBack<GetWithdrawResponse> callBack)

Parameters

Parameter Tags Description
recipientId Required TODO: Add a parameter description
request Required TODO: Add a parameter description

Example Usage

try {
    String recipientId = "recipient_id";
    CreateWithdrawRequest request = new CreateWithdrawRequest();
    // Invoking the API call with sample inputs
    recipients.createWithdrawAsync(recipientId, request, new APICallBack<GetWithdrawResponse>() {
        public void onSuccess(HttpContext context, GetWithdrawResponse 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();
}

Method: updateAutomaticAnticipationSettingsAsync

Updates recipient metadata

void updateAutomaticAnticipationSettingsAsync(
        final String recipientId,
        final UpdateAutomaticAnticipationSettingsRequest request,
        final String idempotencyKey,
        final APICallBack<GetRecipientResponse> callBack)

Parameters

Parameter Tags Description
recipientId Required Recipient id
request Required Metadata
idempotencyKey Optional TODO: Add a parameter description

Example Usage

try {
    String recipientId = "recipient_id";
    UpdateAutomaticAnticipationSettingsRequest request = new UpdateAutomaticAnticipationSettingsRequest();
    String idempotencyKey = "idempotency-key";
    // Invoking the API call with sample inputs
    recipients.updateAutomaticAnticipationSettingsAsync(recipientId, request, idempotencyKey, 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();
}

Method: getAnticipationAsync

Gets an anticipation

void getAnticipationAsync(
        final String recipientId,
        final String anticipationId,
        final APICallBack<GetAnticipationResponse> callBack)

Parameters

Parameter Tags Description
recipientId Required Recipient id
anticipationId Required Anticipation id

Example Usage

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
    }
});

Method: updateRecipientTransferSettingsAsync

TODO: Add a method description

void updateRecipientTransferSettingsAsync(
        final String recipientId,
        final UpdateTransferSettingsRequest request,
        final String idempotencyKey,
        final APICallBack<GetRecipientResponse> callBack)

Parameters

Parameter Tags Description
recipientId Required Recipient Identificator
request Required TODO: Add a parameter description
idempotencyKey Optional TODO: Add a parameter description

Example Usage

try {
    String recipientId = "recipient_id";
    UpdateTransferSettingsRequest request = new UpdateTransferSettingsRequest();
    String idempotencyKey = "idempotency-key";
    // Invoking the API call with sample inputs
    recipients.updateRecipientTransferSettingsAsync(recipientId, request, idempotencyKey, 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();
}

Method: getAnticipationsAsync

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)

Parameters

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

Example Usage

String recipientId = "recipient_id";
Integer page = 173;
Integer size = 173;
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
    }
});

Method: getRecipientAsync

Retrieves recipient information

void getRecipientAsync(
        final String recipientId,
        final APICallBack<GetRecipientResponse> callBack)

Parameters

Parameter Tags Description
recipientId Required Recipiend id

Example Usage

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
    }
});

Method: getBalanceAsync

Get balance information for a recipient

void getBalanceAsync(
        final String recipientId,
        final APICallBack<GetBalanceResponse> callBack)

Parameters

Parameter Tags Description
recipientId Required Recipient id

Example Usage

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
    }
});

Method: getWithdrawalsAsync

Gets a paginated list of transfers for the recipient

void getWithdrawalsAsync(
        final String recipientId,
        final Integer page,
        final Integer size,
        final String status,
        final DateTime createdSince,
        final DateTime createdUntil,
        final APICallBack<ListWithdrawals> callBack)

Parameters

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

Example Usage

String recipientId = "recipient_id";
Integer page = 173;
Integer size = 173;
String status = "status";
DateTime createdSince = new Date();
DateTime createdUntil = new Date();
// Invoking the API call with sample inputs
recipients.getWithdrawalsAsync(recipientId, page, size, status, createdSince, createdUntil, new APICallBack<ListWithdrawals>() {
    public void onSuccess(HttpContext context, ListWithdrawals response) {
        // TODO success callback handler
    }
    public void onFailure(HttpContext context, Throwable error) {
        // TODO failure callback handler
    }
});

Method: createTransferAsync

Creates a transfer for a recipient

void createTransferAsync(
        final String recipientId,
        final CreateTransferRequest request,
        final String idempotencyKey,
        final APICallBack<GetTransferResponse> callBack)

Parameters

Parameter Tags Description
recipientId Required Recipient Id
request Required Transfer data
idempotencyKey Optional TODO: Add a parameter description

Example Usage

try {
    String recipientId = "recipient_id";
    CreateTransferRequest request = new CreateTransferRequest();
    String idempotencyKey = "idempotency-key";
    // Invoking the API call with sample inputs
    recipients.createTransferAsync(recipientId, request, idempotencyKey, 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();
}

Method: createRecipientAsync

Creates a new recipient

void createRecipientAsync(
        final CreateRecipientRequest request,
        final String idempotencyKey,
        final APICallBack<GetRecipientResponse> callBack)

Parameters

Parameter Tags Description
request Required Recipient data
idempotencyKey Optional TODO: Add a parameter description

Example Usage

try {
    CreateRecipientRequest request = new CreateRecipientRequest();
    String idempotencyKey = "idempotency-key";
    // Invoking the API call with sample inputs
    recipients.createRecipientAsync(request, idempotencyKey, 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();
}

Method: getRecipientByCodeAsync

Retrieves recipient information

void getRecipientByCodeAsync(
        final String code,
        final APICallBack<GetRecipientResponse> callBack)

Parameters

Parameter Tags Description
code Required Recipient code

Example Usage

String code = "code";
// Invoking the API call with sample inputs
recipients.getRecipientByCodeAsync(code, 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
    }
});

Method: getDefaultRecipientAsync

TODO: Add a method description

void getDefaultRecipientAsync(final APICallBack<GetRecipientResponse> callBack)

Example Usage

// Invoking the API call with sample inputs
recipients.getDefaultRecipientAsync(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
    }
});

Back to List of Controllers

Class: ChargesController

Get singleton instance

The singleton instance of the ChargesController class can be accessed from the API Client.

ChargesController charges = client.getCharges();

Method: updateChargeMetadataAsync

Updates the metadata from a charge

void updateChargeMetadataAsync(
        final String chargeId,
        final UpdateMetadataRequest request,
        final String idempotencyKey,
        final APICallBack<GetChargeResponse> callBack)

Parameters

Parameter Tags Description
chargeId Required The charge id
request Required Request for updating the charge metadata
idempotencyKey Optional TODO: Add a parameter description

Example Usage

try {
    String chargeId = "charge_id";
    UpdateMetadataRequest request = new UpdateMetadataRequest();
    String idempotencyKey = "idempotency-key";
    // Invoking the API call with sample inputs
    charges.updateChargeMetadataAsync(chargeId, request, idempotencyKey, 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();
}

Method: updateChargePaymentMethodAsync

Updates a charge's payment method

void updateChargePaymentMethodAsync(
        final String chargeId,
        final UpdateChargePaymentMethodRequest request,
        final String idempotencyKey,
        final APICallBack<GetChargeResponse> callBack)

Parameters

Parameter Tags Description
chargeId Required Charge id
request Required Request for updating the payment method from a charge
idempotencyKey Optional TODO: Add a parameter description

Example Usage

try {
    String chargeId = "charge_id";
    UpdateChargePaymentMethodRequest request = new UpdateChargePaymentMethodRequest();
    String idempotencyKey = "idempotency-key";
    // Invoking the API call with sample inputs
    charges.updateChargePaymentMethodAsync(chargeId, request, idempotencyKey, 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();
}

Method: getChargeTransactionsAsync

TODO: Add a method description

void getChargeTransactionsAsync(
        final String chargeId,
        final Integer page,
        final Integer size,
        final APICallBack<ListChargeTransactionsResponse> callBack)

Parameters

Parameter Tags Description
chargeId Required Charge Id
page Optional Page number
size Optional Page size

Example Usage

String chargeId = "charge_id";
Integer page = 173;
Integer size = 173;
// Invoking the API call with sample inputs
charges.getChargeTransactionsAsync(chargeId, page, size, new APICallBack<ListChargeTransactionsResponse>() {
    public void onSuccess(HttpContext context, ListChargeTransactionsResponse response) {
        // TODO success callback handler
    }
    public void onFailure(HttpContext context, Throwable error) {
        // TODO failure callback handler
    }
});

Method: updateChargeDueDateAsync

Updates the due date from a charge

void updateChargeDueDateAsync(
        final String chargeId,
        final UpdateChargeDueDateRequest request,
        final String idempotencyKey,
        final APICallBack<GetChargeResponse> callBack)

Parameters

Parameter Tags Description
chargeId Required Charge Id
request Required Request for updating the due date
idempotencyKey Optional TODO: Add a parameter description

Example Usage

try {
    String chargeId = "charge_id";
    UpdateChargeDueDateRequest request = new UpdateChargeDueDateRequest();
    String idempotencyKey = "idempotency-key";
    // Invoking the API call with sample inputs
    charges.updateChargeDueDateAsync(chargeId, request, idempotencyKey, 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();
}

Method: getChargesAsync

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)

Parameters

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

Example Usage

Integer page = 173;
Integer size = 173;
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
    }
});

Method: captureChargeAsync

Captures a charge

void captureChargeAsync(
        final String chargeId,
        final CreateCaptureChargeRequest request,
        final String idempotencyKey,
        final APICallBack<GetChargeResponse> callBack)

Parameters

Parameter Tags Description
chargeId Required Charge id
request Optional Request for capturing a charge
idempotencyKey Optional TODO: Add a parameter description

Example Usage

try {
    String chargeId = "charge_id";
    CreateCaptureChargeRequest request = new CreateCaptureChargeRequest();
    String idempotencyKey = "idempotency-key";
    // Invoking the API call with sample inputs
    charges.captureChargeAsync(chargeId, request, idempotencyKey, 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();
}

Method: updateChargeCardAsync

Updates the card from a charge

void updateChargeCardAsync(
        final String chargeId,
        final UpdateChargeCardRequest request,
        final String idempotencyKey,
        final APICallBack<GetChargeResponse> callBack)

Parameters

Parameter Tags Description
chargeId Required Charge id
request Required Request for updating a charge's card
idempotencyKey Optional TODO: Add a parameter description

Example Usage

try {
    String chargeId = "charge_id";
    UpdateChargeCardRequest request = new UpdateChargeCardRequest();
    String idempotencyKey = "idempotency-key";
    // Invoking the API call with sample inputs
    charges.updateChargeCardAsync(chargeId, request, idempotencyKey, 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();
}

Method: getChargeAsync

Get a charge from its id

void getChargeAsync(
        final String chargeId,
        final APICallBack<GetChargeResponse> callBack)

Parameters

Parameter Tags Description
chargeId Required Charge id

Example Usage

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
    }
});

Method: getChargesSummaryAsync

TODO: Add a method description

void getChargesSummaryAsync(
        final String status,
        final DateTime createdSince,
        final DateTime createdUntil,
        final APICallBack<GetChargesSummaryResponse> callBack)

Parameters

Parameter Tags Description
status Required TODO: Add a parameter description
createdSince Optional TODO: Add a parameter description
createdUntil Optional TODO: Add a parameter description

Example Usage

String status = "status";
DateTime createdSince = new Date();
DateTime createdUntil = new Date();
// Invoking the API call with sample inputs
charges.getChargesSummaryAsync(status, createdSince, createdUntil, new APICallBack<GetChargesSummaryResponse>() {
    public void onSuccess(HttpContext context, GetChargesSummaryResponse response) {
        // TODO success callback handler
    }
    public void onFailure(HttpContext context, Throwable error) {
        // TODO failure callback handler
    }
});

Method: retryChargeAsync

Retries a charge

void retryChargeAsync(
        final String chargeId,
        final String idempotencyKey,
        final APICallBack<GetChargeResponse> callBack)

Parameters

Parameter Tags Description
chargeId Required Charge id
idempotencyKey Optional TODO: Add a parameter description

Example Usage

String chargeId = "charge_id";
String idempotencyKey = "idempotency-key";
// Invoking the API call with sample inputs
charges.retryChargeAsync(chargeId, idempotencyKey, 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
    }
});

Method: cancelChargeAsync

Cancel a charge

void cancelChargeAsync(
        final String chargeId,
        final CreateCancelChargeRequest request,
        final String idempotencyKey,
        final APICallBack<GetChargeResponse> callBack)

Parameters

Parameter Tags Description
chargeId Required Charge id
request Optional Request for cancelling a charge
idempotencyKey Optional TODO: Add a parameter description

Example Usage

try {
    String chargeId = "charge_id";
    CreateCancelChargeRequest request = new CreateCancelChargeRequest();
    String idempotencyKey = "idempotency-key";
    // Invoking the API call with sample inputs
    charges.cancelChargeAsync(chargeId, request, idempotencyKey, 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();
}

Method: createChargeAsync

Creates a new charge

void createChargeAsync(
        final CreateChargeRequest request,
        final String idempotencyKey,
        final APICallBack<GetChargeResponse> callBack)

Parameters

Parameter Tags Description
request Required Request for creating a charge
idempotencyKey Optional TODO: Add a parameter description

Example Usage

try {
    CreateChargeRequest request = new CreateChargeRequest();
    String idempotencyKey = "idempotency-key";
    // Invoking the API call with sample inputs
    charges.createChargeAsync(request, idempotencyKey, 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();
}

Method: confirmPaymentAsync

TODO: Add a method description

void confirmPaymentAsync(
        final String chargeId,
        final CreateConfirmPaymentRequest request,
        final String idempotencyKey,
        final APICallBack<GetChargeResponse> callBack)

Parameters

Parameter Tags Description
chargeId Required TODO: Add a parameter description
request Optional Request for confirm payment
idempotencyKey Optional TODO: Add a parameter description

Example Usage

try {
    String chargeId = "charge_id";
    CreateConfirmPaymentRequest request = new CreateConfirmPaymentRequest();
    String idempotencyKey = "idempotency-key";
    // Invoking the API call with sample inputs
    charges.confirmPaymentAsync(chargeId, request, idempotencyKey, 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();
}

Back to List of Controllers

Class: TransfersController

Get singleton instance

The singleton instance of the TransfersController class can be accessed from the API Client.

TransfersController transfers = client.getTransfers();

Method: getTransferByIdAsync

TODO: Add a method description

void getTransferByIdAsync(
        final String transferId,
        final APICallBack<GetTransfer> callBack)

Parameters

Parameter Tags Description
transferId Required TODO: Add a parameter description

Example Usage

String transferId = "transfer_id";
// Invoking the API call with sample inputs
transfers.getTransferByIdAsync(transferId, new APICallBack<GetTransfer>() {
    public void onSuccess(HttpContext context, GetTransfer response) {
        // TODO success callback handler
    }
    public void onFailure(HttpContext context, Throwable error) {
        // TODO failure callback handler
    }
});

Method: createTransferAsync

TODO: Add a method description

void createTransferAsync(
        final CreateTransfer request,
        final APICallBack<GetTransfer> callBack)

Parameters

Parameter Tags Description
request Required TODO: Add a parameter description

Example Usage

try {
    CreateTransfer request = new CreateTransfer();
    // Invoking the API call with sample inputs
    transfers.createTransferAsync(request, new APICallBack<GetTransfer>() {
        public void onSuccess(HttpContext context, GetTransfer 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();
}

Method: getTransfersAsync

Gets all transfers

void getTransfersAsync(final APICallBack<ListTransfers> callBack)

Example Usage

// Invoking the API call with sample inputs
transfers.getTransfersAsync(new APICallBack<ListTransfers>() {
    public void onSuccess(HttpContext context, ListTransfers response) {
        // TODO success callback handler
    }
    public void onFailure(HttpContext context, Throwable error) {
        // TODO failure callback handler
    }
});

Back to List of Controllers

Class: TokensController

Get singleton instance

The singleton instance of the TokensController class can be accessed from the API Client.

TokensController tokens = client.getTokens();

Method: createTokenAsync

Tags: Skips Authentication

TODO: Add a method description

void createTokenAsync(
        final String publicKey,
        final CreateTokenRequest request,
        final String idempotencyKey,
        final APICallBack<GetTokenResponse> callBack)

Parameters

Parameter Tags Description
publicKey Required Public key
request Required Request for creating a token
idempotencyKey Optional TODO: Add a parameter description

Example Usage

try {
    String publicKey = "public_key";
    CreateTokenRequest request = new CreateTokenRequest();
    String idempotencyKey = "idempotency-key";
    // Invoking the API call with sample inputs
    tokens.createTokenAsync(publicKey, request, idempotencyKey, 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();
}

Method: getTokenAsync

Tags: Skips Authentication

Gets a token from its id

void getTokenAsync(
        final String id,
        final String publicKey,
        final APICallBack<GetTokenResponse> callBack)

Parameters

Parameter Tags Description
id Required Token id
publicKey Required Public key

Example Usage

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
    }
});

Back to List of Controllers

Class: TransactionsController

Get singleton instance

The singleton instance of the TransactionsController class can be accessed from the API Client.

TransactionsController transactions = client.getTransactions();

Method: getTransactionAsync

TODO: Add a method description

void getTransactionAsync(
        final String transactionId,
        final APICallBack<GetTransactionResponse> callBack)

Parameters

Parameter Tags Description
transactionId Required TODO: Add a parameter description

Example Usage

String transactionId = "transaction_id";
// Invoking the API call with sample inputs
transactions.getTransactionAsync(transactionId, new APICallBack<GetTransactionResponse>() {
    public void onSuccess(HttpContext context, GetTransactionResponse response) {
        // TODO success callback handler
    }
    public void onFailure(HttpContext context, Throwable error) {
        // TODO failure callback handler
    }
});

Back to List of Controllers

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Java 100.0%