Skip to content

mundipagg/MundiAPI-RUBY

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Getting started

Mundipagg API

How to Build

This client library is a Ruby gem which can be compiled and used in your Ruby and Ruby on Rails project. This library requires a few gems from the RubyGems repository.

  1. Open the command line interface or the terminal and navigate to the folder containing the source code.
  2. Run gem build mundi_api.gemspec to build the gem.
  3. Once built, the gem can be installed on the current work environment using gem install mundi_api-2.4.5.gem

Building Gem

How to Use

The following section explains how to use the MundiApi Ruby Gem in a new Rails project using RubyMine™. The basic workflow presented here is also applicable if you prefer using a different editor or IDE.

1. Starting a new project

Close any existing projects in RubyMine™ by selecting File -> Close Project. Next, click on Create New Project to create a new project from scratch.

Create a new project in RubyMine

Next, provide TestApp as the project name, choose Rails Application as the project type, and click OK.

Create a new Rails Application in RubyMine - step 1

In the next dialog make sure that correct Ruby SDK is being used (minimum 2.0.0) and click OK.

Create a new Rails Application in RubyMine - step 2

This will create a new Rails Application project with an existing set of files and folder.

2. Add reference of the gem

In order to use the MundiApi gem in the new project we must add a gem reference. Locate the Gemfile in the Project Explorer window under the TestApp project node. The file contains references to all gems being used in the project. Here, add the reference to the library gem by adding the following line: gem 'mundi_api', '~> 2.4.5'

Add references of the Gemfile

3. Adding a new Rails Controller

Once the TestApp project is created, a folder named controllers will be visible in the Project Explorer under the following path: TestApp > app > controllers. Right click on this folder and select New -> Run Rails Generator....

Run Rails Generator on Controllers Folder

Selecting the said option will popup a small window where the generator names are displayed. Here, select the controller template.

Create a new Controller

Next, a popup window will ask you for a Controller name and included Actions. For controller name provide Hello and include an action named Index and click OK.

Add a new Controller

A new controller class anmed HelloController will be created in a file named hello_controller.rb containing a method named Index. In this method, add code for initialization and a sample for its usage.

Initialize the library

How to Test

You can test the generated SDK and the server with automatically generated test cases as follows:

  1. From terminal/cmd navigate to the root directory of the SDK.
  2. Invoke: bundle exec rake

Initialization

Authentication

In order to setup authentication and initialization of the API client, you need the following information.

Parameter Description
service_referer_name TODO: add a description
basic_auth_user_name The username to use with basic authentication
basic_auth_password The password to use with basic authentication

API client can be initialized as following.

# Configuration parameters and credentials
service_referer_name = 'service_referer_name'
basic_auth_user_name = 'basic_auth_user_name' # The username to use with basic authentication
basic_auth_password = 'basic_auth_password' # The password to use with basic authentication

client = MundiApi::MundiApiClient.new(
  service_referer_name: service_referer_name,
  basic_auth_user_name: basic_auth_user_name,
  basic_auth_password: basic_auth_password
)

The added initlization code can be debugged by putting a breakpoint in the Index method and running the project in debug mode by selecting Run -> Debug 'Development: TestApp'.

Debug the TestApp

Class Reference

List of Controllers

Class: SubscriptionsController

Get singleton instance

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

subscriptions_controller = client.subscriptions

Method: create_discount

Creates a discount

def create_discount(subscription_id,
                        body,
                        idempotency_key = nil); end

Parameters

Parameter Tags Description
subscription_id Required Subscription id
body Required Request for creating a discount
idempotency_key Optional TODO: Add a parameter description

Example Usage

subscription_id = 'subscription_id'
body = SubscriptionsDiscountsRequest.new
idempotency_key = 'idempotency-key'

result = subscriptions_controller.create_discount(subscription_id, body, idempotency_key)

Errors

Error Code Error Description
400 Invalid request
401 Invalid API key
404 An informed resource was not found
412 Business validation error
422 Contract validation error
500 Internal server error

Method: get_subscription_item

Get Subscription Item

def get_subscription_item(subscription_id,
                              item_id); end

Parameters

Parameter Tags Description
subscription_id Required Subscription Id
item_id Required Item id

Example Usage

subscription_id = 'subscription_id'
item_id = 'item_id'

result = subscriptions_controller.get_subscription_item(subscription_id, item_id)

Errors

Error Code Error Description
400 Invalid request
401 Invalid API key
404 An informed resource was not found
412 Business validation error
422 Contract validation error
500 Internal server error

Method: update_subscription_item

Updates a subscription item

def update_subscription_item(subscription_id,
                                 item_id,
                                 body,
                                 idempotency_key = nil); end

Parameters

Parameter Tags Description
subscription_id Required Subscription Id
item_id Required Item id
body Required Request for updating a subscription item
idempotency_key Optional TODO: Add a parameter description

Example Usage

subscription_id = 'subscription_id'
item_id = 'item_id'
body = SubscriptionsItemsRequest.new
idempotency_key = 'idempotency-key'

result = subscriptions_controller.update_subscription_item(subscription_id, item_id, body, idempotency_key)

Errors

Error Code Error Description
400 Invalid request
401 Invalid API key
404 An informed resource was not found
412 Business validation error
422 Contract validation error
500 Internal server error

Method: delete_usage

Deletes a usage

def delete_usage(subscription_id,
                     item_id,
                     usage_id,
                     idempotency_key = nil); end

Parameters

Parameter Tags Description
subscription_id Required The subscription id
item_id Required The subscription item id
usage_id Required The usage id
idempotency_key Optional TODO: Add a parameter description

Example Usage

subscription_id = 'subscription_id'
item_id = 'item_id'
usage_id = 'usage_id'
idempotency_key = 'idempotency-key'

result = subscriptions_controller.delete_usage(subscription_id, item_id, usage_id, idempotency_key)

Errors

Error Code Error Description
400 Invalid request
401 Invalid API key
404 An informed resource was not found
412 Business validation error
422 Contract validation error
500 Internal server error

Method: cancel_subscription

Cancels a subscription

def cancel_subscription(subscription_id,
                            idempotency_key = nil,
                            body = nil); end

Parameters

Parameter Tags Description
subscription_id Required Subscription id
idempotency_key Optional TODO: Add a parameter description
body Optional Request for cancelling a subscription

Example Usage

subscription_id = 'subscription_id'
idempotency_key = 'idempotency-key'
body = SubscriptionsRequest.new

result = subscriptions_controller.cancel_subscription(subscription_id, idempotency_key, body)

Errors

Error Code Error Description
400 Invalid request
401 Invalid API key
404 An informed resource was not found
412 Business validation error
422 Contract validation error
500 Internal server error

Method: get_subscription

Gets a subscription

def get_subscription(subscription_id); end

Parameters

Parameter Tags Description
subscription_id Required Subscription id

Example Usage

subscription_id = 'subscription_id'

result = subscriptions_controller.get_subscription(subscription_id)

Errors

Error Code Error Description
400 Invalid request
401 Invalid API key
404 An informed resource was not found
412 Business validation error
422 Contract validation error
500 Internal server error

Method: delete_increment

Deletes a increment

def delete_increment(subscription_id,
                         increment_id,
                         idempotency_key = nil); end

Parameters

Parameter Tags Description
subscription_id Required Subscription id
increment_id Required Increment id
idempotency_key Optional TODO: Add a parameter description

Example Usage

subscription_id = 'subscription_id'
increment_id = 'increment_id'
idempotency_key = 'idempotency-key'

result = subscriptions_controller.delete_increment(subscription_id, increment_id, idempotency_key)

Errors

Error Code Error Description
400 Invalid request
401 Invalid API key
404 An informed resource was not found
412 Business validation error
422 Contract validation error
500 Internal server error

Method: get_increment_by_id

GetIncrementById

def get_increment_by_id(subscription_id,
                            increment_id); end

Parameters

Parameter Tags Description
subscription_id Required The subscription Id
increment_id Required The increment Id

Example Usage

subscription_id = 'subscription_id'
increment_id = 'increment_id'

result = subscriptions_controller.get_increment_by_id(subscription_id, increment_id)

Errors

Error Code Error Description
400 Invalid request
401 Invalid API key
404 An informed resource was not found
412 Business validation error
422 Contract validation error
500 Internal server error

Method: get_subscription_cycle_by_id

GetSubscriptionCycleById

def get_subscription_cycle_by_id(subscription_id,
                                     cycle_id); end

Parameters

Parameter Tags Description
subscription_id Required The subscription id
cycle_id Required TODO: Add a parameter description

Example Usage

subscription_id = 'subscription_id'
cycle_id = 'cycleId'

result = subscriptions_controller.get_subscription_cycle_by_id(subscription_id, cycle_id)

Errors

Error Code Error Description
400 Invalid request
401 Invalid API key
404 An informed resource was not found
412 Business validation error
422 Contract validation error
500 Internal server error

Method: update_subscription_start_at

Updates the start at date from a subscription

def update_subscription_start_at(subscription_id,
                                     body,
                                     idempotency_key = nil); end

Parameters

Parameter Tags Description
subscription_id Required The subscription id
body Required Request for updating the subscription start date
idempotency_key Optional TODO: Add a parameter description

Example Usage

subscription_id = 'subscription_id'
body = SubscriptionsStartAtRequest.new
idempotency_key = 'idempotency-key'

result = subscriptions_controller.update_subscription_start_at(subscription_id, body, idempotency_key)

Errors

Error Code Error Description
400 Invalid request
401 Invalid API key
404 An informed resource was not found
412 Business validation error
422 Contract validation error
500 Internal server error

Method: update_subscription_payment_method

Updates the payment method from a subscription

def update_subscription_payment_method(subscription_id,
                                           body,
                                           idempotency_key = nil); end

Parameters

Parameter Tags Description
subscription_id Required Subscription id
body Required Request for updating the paymentmethod from a subscription
idempotency_key Optional TODO: Add a parameter description

Example Usage

subscription_id = 'subscription_id'
body = SubscriptionsPaymentMethodRequest.new
idempotency_key = 'idempotency-key'

result = subscriptions_controller.update_subscription_payment_method(subscription_id, body, idempotency_key)

Errors

Error Code Error Description
400 Invalid request
401 Invalid API key
404 An informed resource was not found
412 Business validation error
422 Contract validation error
500 Internal server error

Method: update_current_cycle_status

UpdateCurrentCycleStatus

def update_current_cycle_status(subscription_id,
                                    body,
                                    idempotency_key = nil); end

Parameters

Parameter Tags Description
subscription_id Required Subscription Id
body Required Request for updating the end date of the subscription current status
idempotency_key Optional TODO: Add a parameter description

Example Usage

subscription_id = 'subscription_id'
body = UpdateCurrentCycleStatusRequest.new
idempotency_key = 'idempotency-key'

subscriptions_controller.update_current_cycle_status(subscription_id, body, idempotency_key)

Errors

Error Code Error Description
400 Invalid request
401 Invalid API key
404 An informed resource was not found
412 Business validation error
422 Contract validation error
500 Internal server error

Method: create_subscription

Creates a new subscription

def create_subscription(body,
                            idempotency_key = nil); end

Parameters

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

Example Usage

body = SubscriptionsRequest1.new
idempotency_key = 'idempotency-key'

result = subscriptions_controller.create_subscription(body, idempotency_key)

Errors

Error Code Error Description
400 Invalid request
401 Invalid API key
404 An informed resource was not found
412 Business validation error
422 Contract validation error
500 Internal server error

Method: get_subscriptions

Gets all subscriptions

def get_subscriptions(page = nil,
                          size = nil,
                          code = nil,
                          billing_type = nil,
                          customer_id = nil,
                          plan_id = nil,
                          card_id = nil,
                          status = nil,
                          next_billing_since = nil,
                          next_billing_until = nil,
                          created_since = nil,
                          created_until = nil); end

Parameters

Parameter Tags Description
page Optional Page number
size Optional Page size
code Optional Filter for subscription's code
billing_type Optional Filter for subscription's billing type
customer_id Optional Filter for subscription's customer id
plan_id Optional Filter for subscription's plan id
card_id Optional Filter for subscription's card id
status Optional Filter for subscription's status
next_billing_since Optional Filter for subscription's next billing date start range
next_billing_until Optional Filter for subscription's next billing date end range
created_since Optional Filter for subscription's creation date start range
created_until Optional Filter for subscriptions creation date end range

Example Usage

page = 143
size = 143
code = 'code'
billing_type = 'billing_type'
customer_id = 'customer_id'
plan_id = 'plan_id'
card_id = 'card_id'
status = 'status'
next_billing_since = DateTime.now
next_billing_until = DateTime.now
created_since = DateTime.now
created_until = DateTime.now

result = subscriptions_controller.get_subscriptions(page, size, code, billing_type, customer_id, plan_id, card_id, status, next_billing_since, next_billing_until, created_since, created_until)

Errors

Error Code Error Description
400 Invalid request
401 Invalid API key
404 An informed resource was not found
412 Business validation error
422 Contract validation error
500 Internal server error

Method: get_usages_details

GetUsagesDetails

def get_usages_details(subscription_id,
                           cycle_id = nil,
                           size = nil,
                           page = nil,
                           item_id = nil,
                           group = nil); end

Parameters

Parameter Tags Description
subscription_id Required Subscription Identifier
cycle_id Optional Cycle id
size Optional Page size
page Optional Page number
item_id Optional Identificador do item
group Optional identificador da loja (account) de cada item

Example Usage

subscription_id = 'subscription_id'
cycle_id = 'cycle_id'
size = 143
page = 143
item_id = 'item_id'
group = 'group'

result = subscriptions_controller.get_usages_details(subscription_id, cycle_id, size, page, item_id, group)

Errors

Error Code Error Description
400 Invalid request
401 Invalid API key
404 An informed resource was not found
412 Business validation error
422 Contract validation error
500 Internal server error

Method: renew_subscription

RenewSubscription

def renew_subscription(subscription_id,
                           idempotency_key = nil); end

Parameters

Parameter Tags Description
subscription_id Required TODO: Add a parameter description
idempotency_key Optional TODO: Add a parameter description

Example Usage

subscription_id = 'subscription_id'
idempotency_key = 'idempotency-key'

result = subscriptions_controller.renew_subscription(subscription_id, idempotency_key)

Errors

Error Code Error Description
400 Invalid request
401 Invalid API key
404 An informed resource was not found
412 Business validation error
422 Contract validation error
500 Internal server error

Method: get_subscription_cycles

GetSubscriptionCycles

def get_subscription_cycles(subscription_id,
                                page,
                                size); end

Parameters

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

Example Usage

subscription_id = 'subscription_id'
page = 'page'
size = 'size'

result = subscriptions_controller.get_subscription_cycles(subscription_id, page, size)

Errors

Error Code Error Description
400 Invalid request
401 Invalid API key
404 An informed resource was not found
412 Business validation error
422 Contract validation error
500 Internal server error

Method: create_an_usage

Create Usage

def create_an_usage(subscription_id,
                        item_id,
                        idempotency_key = nil); end

Parameters

Parameter Tags Description
subscription_id Required Subscription id
item_id Required Item id
idempotency_key Optional TODO: Add a parameter description

Example Usage

subscription_id = 'subscription_id'
item_id = 'item_id'
idempotency_key = 'idempotency-key'

result = subscriptions_controller.create_an_usage(subscription_id, item_id, idempotency_key)

Errors

Error Code Error Description
400 Invalid request
401 Invalid API key
404 An informed resource was not found
412 Business validation error
422 Contract validation error
500 Internal server error

Method: get_usages

Lists all usages from a subscription item

def get_usages(subscription_id,
                   item_id,
                   page = nil,
                   size = nil,
                   code = nil,
                   group = nil,
                   used_since = nil,
                   used_until = nil); end

Parameters

Parameter Tags Description
subscription_id Required The subscription id
item_id 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
used_since Optional TODO: Add a parameter description
used_until Optional TODO: Add a parameter description

Example Usage

subscription_id = 'subscription_id'
item_id = 'item_id'
page = 143
size = 143
code = 'code'
group = 'group'
used_since = DateTime.now
used_until = DateTime.now

result = subscriptions_controller.get_usages(subscription_id, item_id, page, size, code, group, used_since, used_until)

Errors

Error Code Error Description
400 Invalid request
401 Invalid API key
404 An informed resource was not found
412 Business validation error
422 Contract validation error
500 Internal server error

Method: delete_discount

Deletes a discount

def delete_discount(subscription_id,
                        discount_id,
                        idempotency_key = nil); end

Parameters

Parameter Tags Description
subscription_id Required Subscription id
discount_id Required Discount Id
idempotency_key Optional TODO: Add a parameter description

Example Usage

subscription_id = 'subscription_id'
discount_id = 'discount_id'
idempotency_key = 'idempotency-key'

result = subscriptions_controller.delete_discount(subscription_id, discount_id, idempotency_key)

Errors

Error Code Error Description
400 Invalid request
401 Invalid API key
404 An informed resource was not found
412 Business validation error
422 Contract validation error
500 Internal server error

Method: get_increments

GetIncrements

def get_increments(subscription_id,
                       page = nil,
                       size = nil); end

Parameters

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

Example Usage

subscription_id = 'subscription_id'
page = 143
size = 143

result = subscriptions_controller.get_increments(subscription_id, page, size)

Errors

Error Code Error Description
400 Invalid request
401 Invalid API key
404 An informed resource was not found
412 Business validation error
422 Contract validation error
500 Internal server error

Method: create_subscription_item

Creates a new Subscription item

def create_subscription_item(subscription_id,
                                 body,
                                 idempotency_key = nil); end

Parameters

Parameter Tags Description
subscription_id Required Subscription id
body Required Request for creating a subscription item
idempotency_key Optional TODO: Add a parameter description

Example Usage

subscription_id = 'subscription_id'
body = SubscriptionsItemsRequest1.new
idempotency_key = 'idempotency-key'

result = subscriptions_controller.create_subscription_item(subscription_id, body, idempotency_key)

Errors

Error Code Error Description
400 Invalid request
401 Invalid API key
404 An informed resource was not found
412 Business validation error
422 Contract validation error
500 Internal server error

Method: get_subscription_items

Get Subscription Items

def get_subscription_items(subscription_id,
                               page = nil,
                               size = nil,
                               name = nil,
                               code = nil,
                               status = nil,
                               description = nil,
                               created_since = nil,
                               created_until = nil); end

Parameters

Parameter Tags Description
subscription_id 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
created_since Optional Filter for item's creation date start range
created_until Optional Filter for item's creation date end range

Example Usage

subscription_id = 'subscription_id'
page = 143
size = 143
name = 'name'
code = 'code'
status = 'status'
description = 'description'
created_since = 'created_since'
created_until = 'created_until'

result = subscriptions_controller.get_subscription_items(subscription_id, page, size, name, code, status, description, created_since, created_until)

Errors

Error Code Error Description
400 Invalid request
401 Invalid API key
404 An informed resource was not found
412 Business validation error
422 Contract validation error
500 Internal server error

Method: update_subscription_billing_date

Updates the billing date from a subscription

def update_subscription_billing_date(subscription_id,
                                         body,
                                         idempotency_key = nil); end

Parameters

Parameter Tags Description
subscription_id Required The subscription id
body Required Request for updating the subscription billing date
idempotency_key Optional TODO: Add a parameter description

Example Usage

subscription_id = 'subscription_id'
body = SubscriptionsBillingDateRequest.new
idempotency_key = 'idempotency-key'

result = subscriptions_controller.update_subscription_billing_date(subscription_id, body, idempotency_key)

Errors

Error Code Error Description
400 Invalid request
401 Invalid API key
404 An informed resource was not found
412 Business validation error
422 Contract validation error
500 Internal server error

Method: update_latest_period_end_at

UpdateLatestPeriodEndAt

def update_latest_period_end_at(subscription_id,
                                    body,
                                    idempotency_key = nil); end

Parameters

Parameter Tags Description
subscription_id Required TODO: Add a parameter description
body Required Request for updating the end date of the current signature cycle
idempotency_key Optional TODO: Add a parameter description

Example Usage

subscription_id = 'subscription_id'
body = SubscriptionsPeriodsLatestEndAtRequest.new
idempotency_key = 'idempotency-key'

result = subscriptions_controller.update_latest_period_end_at(subscription_id, body, idempotency_key)

Errors

Error Code Error Description
400 Invalid request
401 Invalid API key
404 An informed resource was not found
412 Business validation error
422 Contract validation error
500 Internal server error

Method: update_subscription_affiliation_id

UpdateSubscriptionAffiliationId

def update_subscription_affiliation_id(subscription_id,
                                           body,
                                           idempotency_key = nil); end

Parameters

Parameter Tags Description
subscription_id Required TODO: Add a parameter description
body Required Request for updating a subscription affiliation id
idempotency_key Optional TODO: Add a parameter description

Example Usage

subscription_id = 'subscription_id'
body = SubscriptionsGatewayAffiliationIdRequest.new
idempotency_key = 'idempotency-key'

result = subscriptions_controller.update_subscription_affiliation_id(subscription_id, body, idempotency_key)

Errors

Error Code Error Description
400 Invalid request
401 Invalid API key
404 An informed resource was not found
412 Business validation error
422 Contract validation error
500 Internal server error

Method: delete_subscription_item

Deletes a subscription item

def delete_subscription_item(subscription_id,
                                 subscription_item_id,
                                 idempotency_key = nil); end

Parameters

Parameter Tags Description
subscription_id Required Subscription id
subscription_item_id Required Subscription item id
idempotency_key Optional TODO: Add a parameter description

Example Usage

subscription_id = 'subscription_id'
subscription_item_id = 'subscription_item_id'
idempotency_key = 'idempotency-key'

result = subscriptions_controller.delete_subscription_item(subscription_id, subscription_item_id, idempotency_key)

Errors

Error Code Error Description
400 Invalid request
401 Invalid API key
404 An informed resource was not found
412 Business validation error
422 Contract validation error
500 Internal server error

Method: update_subscription_card

Updates the credit card from a subscription

def update_subscription_card(subscription_id,
                                 body,
                                 idempotency_key = nil); end

Parameters

Parameter Tags Description
subscription_id Required Subscription id
body Required Request for updating a card
idempotency_key Optional TODO: Add a parameter description

Example Usage

subscription_id = 'subscription_id'
body = SubscriptionsCardRequest.new
idempotency_key = 'idempotency-key'

result = subscriptions_controller.update_subscription_card(subscription_id, body, idempotency_key)

Errors

Error Code Error Description
400 Invalid request
401 Invalid API key
404 An informed resource was not found
412 Business validation error
422 Contract validation error
500 Internal server error

Method: update_subscription_metadata

Updates the metadata from a subscription

def update_subscription_metadata(subscription_id,
                                     body,
                                     idempotency_key = nil); end

Parameters

Parameter Tags Description
subscription_id Required The subscription id
body Required Request for updating the subscrption metadata
idempotency_key Optional TODO: Add a parameter description

Example Usage

subscription_id = 'subscription_id'
body = SubscriptionsMetadataRequest.new
idempotency_key = 'idempotency-key'

result = subscriptions_controller.update_subscription_metadata(subscription_id, body, idempotency_key)

Errors

Error Code Error Description
400 Invalid request
401 Invalid API key
404 An informed resource was not found
412 Business validation error
422 Contract validation error
500 Internal server error

Method: update_subscription_due_days

Updates the boleto due days from a subscription

def update_subscription_due_days(subscription_id,
                                     body,
                                     idempotency_key = nil); end

Parameters

Parameter Tags Description
subscription_id Required Subscription Id
body Required TODO: Add a parameter description
idempotency_key Optional TODO: Add a parameter description

Example Usage

subscription_id = 'subscription_id'
body = UpdateSubscriptionDueDaysRequest.new
idempotency_key = 'idempotency-key'

result = subscriptions_controller.update_subscription_due_days(subscription_id, body, idempotency_key)

Errors

Error Code Error Description
400 Invalid request
401 Invalid API key
404 An informed resource was not found
412 Business validation error
422 Contract validation error
500 Internal server error

Method: get_discounts

GetDiscounts

def get_discounts(subscription_id,
                      page,
                      size); end

Parameters

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

Example Usage

subscription_id = 'subscription_id'
page = 235
size = 235

result = subscriptions_controller.get_discounts(subscription_id, page, size)

Errors

Error Code Error Description
400 Invalid request
401 Invalid API key
404 An informed resource was not found
412 Business validation error
422 Contract validation error
500 Internal server error

Method: create_increment

Creates a increment

def create_increment(subscription_id,
                         body,
                         idempotency_key = nil); end

Parameters

Parameter Tags Description
subscription_id Required Subscription id
body Required Request for creating a increment
idempotency_key Optional TODO: Add a parameter description

Example Usage

subscription_id = 'subscription_id'
body = SubscriptionsIncrementsRequest.new
idempotency_key = 'idempotency-key'

result = subscriptions_controller.create_increment(subscription_id, body, idempotency_key)

Errors

Error Code Error Description
400 Invalid request
401 Invalid API key
404 An informed resource was not found
412 Business validation error
422 Contract validation error
500 Internal server error

Method: get_discount_by_id

GetDiscountById

def get_discount_by_id(subscription_id,
                           discount_id); end

Parameters

Parameter Tags Description
subscription_id Required The subscription id
discount_id Required TODO: Add a parameter description

Example Usage

subscription_id = 'subscription_id'
discount_id = 'discountId'

result = subscriptions_controller.get_discount_by_id(subscription_id, discount_id)

Errors

Error Code Error Description
400 Invalid request
401 Invalid API key
404 An informed resource was not found
412 Business validation error
422 Contract validation error
500 Internal server error

Method: update_subscription_minium_price

Atualização do valor mínimo da assinatura

def update_subscription_minium_price(subscription_id,
                                         body,
                                         idempotency_key = nil); end

Parameters

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

Example Usage

subscription_id = 'subscription_id'
body = SubscriptionsMinimumPriceRequest.new
idempotency_key = 'idempotency-key'

result = subscriptions_controller.update_subscription_minium_price(subscription_id, body, idempotency_key)

Errors

Error Code Error Description
400 Invalid request
401 Invalid API key
404 An informed resource was not found
412 Business validation error
422 Contract validation error
500 Internal server error

Method: get_usage_report

GetUsageReport

def get_usage_report(subscription_id,
                         period_id); end

Parameters

Parameter Tags Description
subscription_id Required The subscription Id
period_id Required The period Id

Example Usage

subscription_id = 'subscription_id'
period_id = 'period_id'

result = subscriptions_controller.get_usage_report(subscription_id, period_id)

Errors

Error Code Error Description
400 Invalid request
401 Invalid API key
404 An informed resource was not found
412 Business validation error
422 Contract validation error
500 Internal server error

Method: update_split_subscription

UpdateSplitSubscription

def update_split_subscription(id,
                                  body); end

Parameters

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

Example Usage

id = 'id'
body = UpdateSubscriptionSplitRequest.new

result = subscriptions_controller.update_split_subscription(id, body)

Errors

Error Code Error Description
400 Invalid request
401 Invalid API key
404 An informed resource was not found
412 Business validation error
422 Contract validation error
500 Internal server error

Back to List of Controllers

Class: OrdersController

Get singleton instance

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

orders_controller = client.orders

Method: update_order_status

UpdateOrderStatus

def update_order_status(id,
                            body,
                            idempotency_key = nil); end

Parameters

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

Example Usage

id = 'id'
body = UpdateOrderStatusRequest.new
idempotency_key = 'idempotency-key'

result = orders_controller.update_order_status(id, body, idempotency_key)

Errors

Error Code Error Description
400 Invalid request
401 Invalid API key
404 An informed resource was not found
412 Business validation error
422 Contract validation error
500 Internal server error

Method: delete_all_order_items

DeleteAllOrderItems

def delete_all_order_items(order_id,
                               idempotency_key = nil); end

Parameters

Parameter Tags Description
order_id Required Order Id
idempotency_key Optional TODO: Add a parameter description

Example Usage

order_id = 'orderId'
idempotency_key = 'idempotency-key'

result = orders_controller.delete_all_order_items(order_id, idempotency_key)

Errors

Error Code Error Description
400 Invalid request
401 Invalid API key
404 An informed resource was not found
412 Business validation error
422 Contract validation error
500 Internal server error

Method: create_order_item

CreateOrderItem

def create_order_item(order_id,
                          body,
                          idempotency_key = nil); end

Parameters

Parameter Tags Description
order_id Required Order Id
body Required Order Item Model
idempotency_key Optional TODO: Add a parameter description

Example Usage

order_id = 'orderId'
body = OrdersItemsRequest.new
idempotency_key = 'idempotency-key'

result = orders_controller.create_order_item(order_id, body, idempotency_key)

Errors

Error Code Error Description
400 Invalid request
401 Invalid API key
404 An informed resource was not found
412 Business validation error
422 Contract validation error
500 Internal server error

Method: update_order_metadata

Updates the metadata from an order

def update_order_metadata(order_id,
                              body,
                              idempotency_key = nil); end

Parameters

Parameter Tags Description
order_id Required The order id
body Required Request for updating the order metadata
idempotency_key Optional TODO: Add a parameter description

Example Usage

order_id = 'order_id'
body = OrdersMetadataRequest.new
idempotency_key = 'idempotency-key'

result = orders_controller.update_order_metadata(order_id, body, idempotency_key)

Errors

Error Code Error Description
400 Invalid request
401 Invalid API key
404 An informed resource was not found
412 Business validation error
422 Contract validation error
500 Internal server error

Method: get_orders

Gets all orders

def get_orders(page = nil,
                   size = nil,
                   code = nil,
                   status = nil,
                   created_since = nil,
                   created_until = nil,
                   customer_id = nil); end

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
created_since Optional Filter for order's creation date start range
created_until Optional Filter for order's creation date end range
customer_id Optional Filter for order's customer id

Example Usage

page = 235
size = 235
code = 'code'
status = 'status'
created_since = DateTime.now
created_until = DateTime.now
customer_id = 'customer_id'

result = orders_controller.get_orders(page, size, code, status, created_since, created_until, customer_id)

Errors

Error Code Error Description
400 Invalid request
401 Invalid API key
404 An informed resource was not found
412 Business validation error
422 Contract validation error
500 Internal server error

Method: create_order

Creates a new Order

def create_order(body,
                     idempotency_key = nil); end

Parameters

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

Example Usage

body = OrdersRequest.new
idempotency_key = 'idempotency-key'

result = orders_controller.create_order(body, idempotency_key)

Errors

Error Code Error Description
400 Invalid request
401 Invalid API key
404 An informed resource was not found
412 Business validation error
422 Contract validation error
500 Internal server error

Method: delete_order_item

DeleteOrderItem

def delete_order_item(order_id,
                          item_id,
                          idempotency_key = nil); end

Parameters

Parameter Tags Description
order_id Required Order Id
item_id Required Item Id
idempotency_key Optional TODO: Add a parameter description

Example Usage

order_id = 'orderId'
item_id = 'itemId'
idempotency_key = 'idempotency-key'

result = orders_controller.delete_order_item(order_id, item_id, idempotency_key)

Errors

Error Code Error Description
400 Invalid request
401 Invalid API key
404 An informed resource was not found
412 Business validation error
422 Contract validation error
500 Internal server error

Method: get_order_item

GetOrderItem

def get_order_item(order_id,
                       item_id); end

Parameters

Parameter Tags Description
order_id Required Order Id
item_id Required Item Id

Example Usage

order_id = 'orderId'
item_id = 'itemId'

result = orders_controller.get_order_item(order_id, item_id)

Errors

Error Code Error Description
400 Invalid request
401 Invalid API key
404 An informed resource was not found
412 Business validation error
422 Contract validation error
500 Internal server error

Method: update_order_item

UpdateOrderItem

def update_order_item(order_id,
                          item_id,
                          body,
                          idempotency_key = nil); end

Parameters

Parameter Tags Description
order_id Required Order Id
item_id Required Item Id
body Required Item Model
idempotency_key Optional TODO: Add a parameter description

Example Usage

order_id = 'orderId'
item_id = 'itemId'
body = OrdersItemsRequest1.new
idempotency_key = 'idempotency-key'

result = orders_controller.update_order_item(order_id, item_id, body, idempotency_key)

Errors

Error Code Error Description
400 Invalid request
401 Invalid API key
404 An informed resource was not found
412 Business validation error
422 Contract validation error
500 Internal server error

Method: get_order

Gets an order

def get_order(order_id); end

Parameters

Parameter Tags Description
order_id Required Order id

Example Usage

order_id = 'order_id'

result = orders_controller.get_order(order_id)

Errors

Error Code Error Description
400 Invalid request
401 Invalid API key
404 An informed resource was not found
412 Business validation error
422 Contract validation error
500 Internal server error

Back to List of Controllers

Class: PlansController

Get singleton instance

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

plans_controller = client.plans

Method: update_plan_item

Updates a plan item

def update_plan_item(plan_id,
                         plan_item_id,
                         body,
                         idempotency_key = nil); end

Parameters

Parameter Tags Description
plan_id Required Plan id
plan_item_id Required Plan item id
body Required Request for updating the plan item
idempotency_key Optional TODO: Add a parameter description

Example Usage

plan_id = 'plan_id'
plan_item_id = 'plan_item_id'
body = PlansItemsRequest.new
idempotency_key = 'idempotency-key'

result = plans_controller.update_plan_item(plan_id, plan_item_id, body, idempotency_key)

Errors

Error Code Error Description
400 Invalid request
401 Invalid API key
404 An informed resource was not found
412 Business validation error
422 Contract validation error
500 Internal server error

Method: delete_plan_item

Removes an item from a plan

def delete_plan_item(plan_id,
                         plan_item_id,
                         idempotency_key = nil); end

Parameters

Parameter Tags Description
plan_id Required Plan id
plan_item_id Required Plan item id
idempotency_key Optional TODO: Add a parameter description

Example Usage

plan_id = 'plan_id'
plan_item_id = 'plan_item_id'
idempotency_key = 'idempotency-key'

result = plans_controller.delete_plan_item(plan_id, plan_item_id, idempotency_key)

Errors

Error Code Error Description
400 Invalid request
401 Invalid API key
404 An informed resource was not found
412 Business validation error
422 Contract validation error
500 Internal server error

Method: get_plan_item

Gets a plan item

def get_plan_item(plan_id,
                      plan_item_id); end

Parameters

Parameter Tags Description
plan_id Required Plan id
plan_item_id Required Plan item id

Example Usage

plan_id = 'plan_id'
plan_item_id = 'plan_item_id'

result = plans_controller.get_plan_item(plan_id, plan_item_id)

Errors

Error Code Error Description
400 Invalid request
401 Invalid API key
404 An informed resource was not found
412 Business validation error
422 Contract validation error
500 Internal server error

Method: create_plan_item

Adds a new item to a plan

def create_plan_item(plan_id,
                         body,
                         idempotency_key = nil); end

Parameters

Parameter Tags Description
plan_id Required Plan id
body Required Request for creating a plan item
idempotency_key Optional TODO: Add a parameter description

Example Usage

plan_id = 'plan_id'
body = PlansItemsRequest1.new
idempotency_key = 'idempotency-key'

result = plans_controller.create_plan_item(plan_id, body, idempotency_key)

Errors

Error Code Error Description
400 Invalid request
401 Invalid API key
404 An informed resource was not found
412 Business validation error
422 Contract validation error
500 Internal server error

Method: get_plans

Gets all plans

def get_plans(page = nil,
                  size = nil,
                  name = nil,
                  status = nil,
                  billing_type = nil,
                  created_since = nil,
                  created_until = nil); end

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
billing_type Optional Filter for plan's billing type
created_since Optional Filter for plan's creation date start range
created_until Optional Filter for plan's creation date end range

Example Usage

page = 235
size = 235
name = 'name'
status = 'status'
billing_type = 'billing_type'
created_since = DateTime.now
created_until = DateTime.now

result = plans_controller.get_plans(page, size, name, status, billing_type, created_since, created_until)

Errors

Error Code Error Description
400 Invalid request
401 Invalid API key
404 An informed resource was not found
412 Business validation error
422 Contract validation error
500 Internal server error

Method: create_plan

Creates a new plan

def create_plan(body,
                    idempotency_key = nil); end

Parameters

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

Example Usage

body = PlansRequest.new
idempotency_key = 'idempotency-key'

result = plans_controller.create_plan(body, idempotency_key)

Errors

Error Code Error Description
400 Invalid request
401 Invalid API key
404 An informed resource was not found
412 Business validation error
422 Contract validation error
500 Internal server error

Method: get_plan

Gets a plan

def get_plan(plan_id); end

Parameters

Parameter Tags Description
plan_id Required Plan id

Example Usage

plan_id = 'plan_id'

result = plans_controller.get_plan(plan_id)

Errors

Error Code Error Description
400 Invalid request
401 Invalid API key
404 An informed resource was not found
412 Business validation error
422 Contract validation error
500 Internal server error

Method: update_plan

Updates a plan

def update_plan(plan_id,
                    body,
                    idempotency_key = nil); end

Parameters

Parameter Tags Description
plan_id Required Plan id
body Required Request for updating a plan
idempotency_key Optional TODO: Add a parameter description

Example Usage

plan_id = 'plan_id'
body = PlansRequest1.new
idempotency_key = 'idempotency-key'

result = plans_controller.update_plan(plan_id, body, idempotency_key)

Errors

Error Code Error Description
400 Invalid request
401 Invalid API key
404 An informed resource was not found
412 Business validation error
422 Contract validation error
500 Internal server error

Method: delete_plan

Deletes a plan

def delete_plan(plan_id,
                    idempotency_key = nil); end

Parameters

Parameter Tags Description
plan_id Required Plan id
idempotency_key Optional TODO: Add a parameter description

Example Usage

plan_id = 'plan_id'
idempotency_key = 'idempotency-key'

result = plans_controller.delete_plan(plan_id, idempotency_key)

Errors

Error Code Error Description
400 Invalid request
401 Invalid API key
404 An informed resource was not found
412 Business validation error
422 Contract validation error
500 Internal server error

Method: update_plan_metadata

Updates the metadata from a plan

def update_plan_metadata(plan_id,
                             body,
                             idempotency_key = nil); end

Parameters

Parameter Tags Description
plan_id Required The plan id
body Required Request for updating the plan metadata
idempotency_key Optional TODO: Add a parameter description

Example Usage

plan_id = 'plan_id'
body = PlansMetadataRequest.new
idempotency_key = 'idempotency-key'

result = plans_controller.update_plan_metadata(plan_id, body, idempotency_key)

Errors

Error Code Error Description
400 Invalid request
401 Invalid API key
404 An informed resource was not found
412 Business validation error
422 Contract validation error
500 Internal server error

Back to List of Controllers

Class: InvoicesController

Get singleton instance

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

invoices_controller = client.invoices

Method: create_invoice

Create an Invoice

def create_invoice(subscription_id,
                       cycle_id,
                       idempotency_key = nil,
                       body = nil); end

Parameters

Parameter Tags Description
subscription_id Required Subscription Id
cycle_id Required Cycle Id
idempotency_key Optional TODO: Add a parameter description
body Optional TODO: Add a parameter description

Example Usage

subscription_id = 'subscription_id'
cycle_id = 'cycle_id'
idempotency_key = 'idempotency-key'
body = SubscriptionsCyclesPayRequest.new

result = invoices_controller.create_invoice(subscription_id, cycle_id, idempotency_key, body)

Errors

Error Code Error Description
400 Invalid request
401 Invalid API key
404 An informed resource was not found
412 Business validation error
422 Contract validation error
500 Internal server error

Method: get_partial_invoice

GetPartialInvoice

def get_partial_invoice(subscription_id); end

Parameters

Parameter Tags Description
subscription_id Required Subscription Id

Example Usage

subscription_id = 'subscription_id'

result = invoices_controller.get_partial_invoice(subscription_id)

Errors

Error Code Error Description
400 Invalid request
401 Invalid API key
404 An informed resource was not found
412 Business validation error
422 Contract validation error
500 Internal server error

Method: update_invoice_status

Updates the status from an invoice

def update_invoice_status(invoice_id,
                              body,
                              idempotency_key = nil); end

Parameters

Parameter Tags Description
invoice_id Required Invoice Id
body Required Request for updating an invoice's status
idempotency_key Optional TODO: Add a parameter description

Example Usage

invoice_id = 'invoice_id'
body = UpdateCurrentCycleStatusRequest.new
idempotency_key = 'idempotency-key'

result = invoices_controller.update_invoice_status(invoice_id, body, idempotency_key)

Errors

Error Code Error Description
400 Invalid request
401 Invalid API key
404 An informed resource was not found
412 Business validation error
422 Contract validation error
500 Internal server error

Method: get_invoice

Gets an invoice

def get_invoice(invoice_id); end

Parameters

Parameter Tags Description
invoice_id Required Invoice Id

Example Usage

invoice_id = 'invoice_id'

result = invoices_controller.get_invoice(invoice_id)

Errors

Error Code Error Description
400 Invalid request
401 Invalid API key
404 An informed resource was not found
412 Business validation error
422 Contract validation error
500 Internal server error

Method: cancel_invoice

Cancels an invoice

def cancel_invoice(invoice_id,
                       idempotency_key = nil); end

Parameters

Parameter Tags Description
invoice_id Required Invoice id
idempotency_key Optional TODO: Add a parameter description

Example Usage

invoice_id = 'invoice_id'
idempotency_key = 'idempotency-key'

result = invoices_controller.cancel_invoice(invoice_id, idempotency_key)

Errors

Error Code Error Description
400 Invalid request
401 Invalid API key
404 An informed resource was not found
412 Business validation error
422 Contract validation error
500 Internal server error

Method: update_invoice_metadata

Updates the metadata from an invoice

def update_invoice_metadata(invoice_id,
                                body,
                                idempotency_key = nil); end

Parameters

Parameter Tags Description
invoice_id Required The invoice id
body Required Request for updating the invoice metadata
idempotency_key Optional TODO: Add a parameter description

Example Usage

invoice_id = 'invoice_id'
body = InvoicesMetadataRequest.new
idempotency_key = 'idempotency-key'

result = invoices_controller.update_invoice_metadata(invoice_id, body, idempotency_key)

Errors

Error Code Error Description
400 Invalid request
401 Invalid API key
404 An informed resource was not found
412 Business validation error
422 Contract validation error
500 Internal server error

Method: get_invoices

Gets all invoices

def get_invoices(page = nil,
                     size = nil,
                     code = nil,
                     customer_id = nil,
                     subscription_id = nil,
                     created_since = nil,
                     created_until = nil,
                     status = nil,
                     due_since = nil,
                     due_until = nil,
                     customer_document = nil); end

Parameters

Parameter Tags Description
page Optional Page number
size Optional Page size
code Optional Filter for Invoice's code
customer_id Optional Filter for Invoice's customer id
subscription_id Optional Filter for Invoice's subscription id
created_since Optional Filter for Invoice's creation date start range
created_until Optional Filter for Invoices creation date end range
status Optional Filter for Invoice's status
due_since Optional Filter for Invoice's due date start range
due_until Optional Filter for Invoice's due date end range
customer_document Optional Fillter for invoice's document

Example Usage

page = 71
size = 71
code = 'code'
customer_id = 'customer_id'
subscription_id = 'subscription_id'
created_since = DateTime.now
created_until = DateTime.now
status = 'status'
due_since = DateTime.now
due_until = DateTime.now
customer_document = 'customer_document'

result = invoices_controller.get_invoices(page, size, code, customer_id, subscription_id, created_since, created_until, status, due_since, due_until, customer_document)

Errors

Error Code Error Description
400 Invalid request
401 Invalid API key
404 An informed resource was not found
412 Business validation error
422 Contract validation error
500 Internal server error

Back to List of Controllers

Class: CustomersController

Get singleton instance

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

customers_controller = client.customers

Method: create_access_token

Creates a access token for a customer

def create_access_token(customer_id,
                            body,
                            idempotency_key = nil); end

Parameters

Parameter Tags Description
customer_id Required Customer Id
body Required Request for creating a access token
idempotency_key Optional TODO: Add a parameter description

Example Usage

customer_id = 'customer_id'
body = CustomersAccessTokensRequest.new
idempotency_key = 'idempotency-key'

result = customers_controller.create_access_token(customer_id, body, idempotency_key)

Errors

Error Code Error Description
400 Invalid request
401 Invalid API key
404 An informed resource was not found
412 Business validation error
422 Contract validation error
500 Internal server error

Method: get_access_tokens

Get all access tokens from a customer

def get_access_tokens(customer_id,
                          page = nil,
                          size = nil); end

Parameters

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

Example Usage

customer_id = 'customer_id'
page = 71
size = 71

result = customers_controller.get_access_tokens(customer_id, page, size)

Errors

Error Code Error Description
400 Invalid request
401 Invalid API key
404 An informed resource was not found
412 Business validation error
422 Contract validation error
500 Internal server error

Method: update_customer

Updates a customer

def update_customer(customer_id,
                        body,
                        idempotency_key = nil); end

Parameters

Parameter Tags Description
customer_id Required Customer id
body Required Request for updating a customer
idempotency_key Optional TODO: Add a parameter description

Example Usage

customer_id = 'customer_id'
body = CustomersRequest.new
idempotency_key = 'idempotency-key'

result = customers_controller.update_customer(customer_id, body, idempotency_key)

Errors

Error Code Error Description
400 Invalid request
401 Invalid API key
404 An informed resource was not found
412 Business validation error
422 Contract validation error
500 Internal server error

Method: get_customer

Get a customer

def get_customer(customer_id); end

Parameters

Parameter Tags Description
customer_id Required Customer Id

Example Usage

customer_id = 'customer_id'

result = customers_controller.get_customer(customer_id)

Errors

Error Code Error Description
400 Invalid request
401 Invalid API key
404 An informed resource was not found
412 Business validation error
422 Contract validation error
500 Internal server error

Method: delete_access_tokens

Delete a Customer's access tokens

def delete_access_tokens(customer_id); end

Parameters

Parameter Tags Description
customer_id Required Customer Id

Example Usage

customer_id = 'customer_id'

result = customers_controller.delete_access_tokens(customer_id)

Errors

Error Code Error Description
400 Invalid request
401 Invalid API key
404 An informed resource was not found
412 Business validation error
422 Contract validation error
500 Internal server error

Method: get_addresses

Gets all adressess from a customer

def get_addresses(customer_id,
                      page = nil,
                      size = nil); end

Parameters

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

Example Usage

customer_id = 'customer_id'
page = 71
size = 71

result = customers_controller.get_addresses(customer_id, page, size)

Errors

Error Code Error Description
400 Invalid request
401 Invalid API key
404 An informed resource was not found
412 Business validation error
422 Contract validation error
500 Internal server error

Method: create_address

Creates a new address for a customer

def create_address(customer_id,
                       body,
                       idempotency_key = nil); end

Parameters

Parameter Tags Description
customer_id Required Customer Id
body Required Request for creating an address
idempotency_key Optional TODO: Add a parameter description

Example Usage

customer_id = 'customer_id'
body = CustomersAddressesRequest.new
idempotency_key = 'idempotency-key'

result = customers_controller.create_address(customer_id, body, idempotency_key)

Errors

Error Code Error Description
400 Invalid request
401 Invalid API key
404 An informed resource was not found
412 Business validation error
422 Contract validation error
500 Internal server error

Method: get_access_token

Get a Customer's access token

def get_access_token(customer_id,
                         token_id); end

Parameters

Parameter Tags Description
customer_id Required Customer Id
token_id Required Token Id

Example Usage

customer_id = 'customer_id'
token_id = 'token_id'

result = customers_controller.get_access_token(customer_id, token_id)

Errors

Error Code Error Description
400 Invalid request
401 Invalid API key
404 An informed resource was not found
412 Business validation error
422 Contract validation error
500 Internal server error

Method: delete_access_token

Delete a customer's access token

def delete_access_token(customer_id,
                            token_id,
                            idempotency_key = nil); end

Parameters

Parameter Tags Description
customer_id Required Customer Id
token_id Required Token Id
idempotency_key Optional TODO: Add a parameter description

Example Usage

customer_id = 'customer_id'
token_id = 'token_id'
idempotency_key = 'idempotency-key'

result = customers_controller.delete_access_token(customer_id, token_id, idempotency_key)

Errors

Error Code Error Description
400 Invalid request
401 Invalid API key
404 An informed resource was not found
412 Business validation error
422 Contract validation error
500 Internal server error

Method: get_address

Get a customer's address

def get_address(customer_id,
                    address_id); end

Parameters

Parameter Tags Description
customer_id Required Customer id
address_id Required Address Id

Example Usage

customer_id = 'customer_id'
address_id = 'address_id'

result = customers_controller.get_address(customer_id, address_id)

Errors

Error Code Error Description
400 Invalid request
401 Invalid API key
404 An informed resource was not found
412 Business validation error
422 Contract validation error
500 Internal server error

Method: update_address

Updates an address

def update_address(customer_id,
                       address_id,
                       body,
                       idempotency_key = nil); end

Parameters

Parameter Tags Description
customer_id Required Customer Id
address_id Required Address Id
body Required Request for updating an address
idempotency_key Optional TODO: Add a parameter description

Example Usage

customer_id = 'customer_id'
address_id = 'address_id'
body = CustomersAddressesRequest1.new
idempotency_key = 'idempotency-key'

result = customers_controller.update_address(customer_id, address_id, body, idempotency_key)

Errors

Error Code Error Description
400 Invalid request
401 Invalid API key
404 An informed resource was not found
412 Business validation error
422 Contract validation error
500 Internal server error

Method: delete_address

Delete a Customer's address

def delete_address(customer_id,
                       address_id,
                       idempotency_key = nil); end

Parameters

Parameter Tags Description
customer_id Required Customer Id
address_id Required Address Id
idempotency_key Optional TODO: Add a parameter description

Example Usage

customer_id = 'customer_id'
address_id = 'address_id'
idempotency_key = 'idempotency-key'

result = customers_controller.delete_address(customer_id, address_id, idempotency_key)

Errors

Error Code Error Description
400 Invalid request
401 Invalid API key
404 An informed resource was not found
412 Business validation error
422 Contract validation error
500 Internal server error

Method: create_card

Creates a new card for a customer

def create_card(customer_id,
                    body,
                    idempotency_key = nil); end

Parameters

Parameter Tags Description
customer_id Required Customer id
body Required Request for creating a card
idempotency_key Optional TODO: Add a parameter description

Example Usage

customer_id = 'customer_id'
body = CustomersCardsRequest.new
idempotency_key = 'idempotency-key'

result = customers_controller.create_card(customer_id, body, idempotency_key)

Errors

Error Code Error Description
400 Invalid request
401 Invalid API key
404 An informed resource was not found
412 Business validation error
422 Contract validation error
500 Internal server error

Method: get_cards

Get all cards from a customer

def get_cards(customer_id,
                  page = nil,
                  size = nil); end

Parameters

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

Example Usage

customer_id = 'customer_id'
page = 71
size = 71

result = customers_controller.get_cards(customer_id, page, size)

Errors

Error Code Error Description
400 Invalid request
401 Invalid API key
404 An informed resource was not found
412 Business validation error
422 Contract validation error
500 Internal server error

Method: renew_card

Renew a card

def renew_card(customer_id,
                   card_id,
                   idempotency_key = nil); end

Parameters

Parameter Tags Description
customer_id Required Customer id
card_id Required Card Id
idempotency_key Optional TODO: Add a parameter description

Example Usage

customer_id = 'customer_id'
card_id = 'card_id'
idempotency_key = 'idempotency-key'

result = customers_controller.renew_card(customer_id, card_id, idempotency_key)

Errors

Error Code Error Description
400 Invalid request
401 Invalid API key
404 An informed resource was not found
412 Business validation error
422 Contract validation error
500 Internal server error

Method: create_customer

Creates a new customer

def create_customer(body,
                        idempotency_key = nil); end

Parameters

Parameter Tags Description
body Required Request for creating a customer
idempotency_key Optional TODO: Add a parameter description

Example Usage

body = CustomersRequest1.new
idempotency_key = 'idempotency-key'

result = customers_controller.create_customer(body, idempotency_key)

Errors

Error Code Error Description
400 Invalid request
401 Invalid API key
404 An informed resource was not found
412 Business validation error
422 Contract validation error
500 Internal server error

Method: get_customers

Get all Customers

def get_customers(name = nil,
                      document = nil,
                      page = 1,
                      size = 10,
                      email = nil,
                      code = nil); end

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

name = 'name'
document = 'document'
page = 1
size = 10
email = 'email'
code = 'Code'

result = customers_controller.get_customers(name, document, page, size, email, code)

Errors

Error Code Error Description
400 Invalid request
401 Invalid API key
404 An informed resource was not found
412 Business validation error
422 Contract validation error
500 Internal server error

Method: update_customer_metadata

Updates the metadata a customer

def update_customer_metadata(customer_id,
                                 body,
                                 idempotency_key = nil); end

Parameters

Parameter Tags Description
customer_id Required The customer id
body Required Request for updating the customer metadata
idempotency_key Optional TODO: Add a parameter description

Example Usage

customer_id = 'customer_id'
body = CustomersMetadataRequest.new
idempotency_key = 'idempotency-key'

result = customers_controller.update_customer_metadata(customer_id, body, idempotency_key)

Errors

Error Code Error Description
400 Invalid request
401 Invalid API key
404 An informed resource was not found
412 Business validation error
422 Contract validation error
500 Internal server error

Method: update_card

Updates a card

def update_card(customer_id,
                    card_id,
                    body,
                    idempotency_key = nil); end

Parameters

Parameter Tags Description
customer_id Required Customer Id
card_id Required Card id
body Required Request for updating a card
idempotency_key Optional TODO: Add a parameter description

Example Usage

customer_id = 'customer_id'
card_id = 'card_id'
body = CustomersCardsRequest1.new
idempotency_key = 'idempotency-key'

result = customers_controller.update_card(customer_id, card_id, body, idempotency_key)

Errors

Error Code Error Description
400 Invalid request
401 Invalid API key
404 An informed resource was not found
412 Business validation error
422 Contract validation error
500 Internal server error

Method: delete_card

Delete a customer's card

def delete_card(customer_id,
                    card_id,
                    idempotency_key = nil); end

Parameters

Parameter Tags Description
customer_id Required Customer Id
card_id Required Card Id
idempotency_key Optional TODO: Add a parameter description

Example Usage

customer_id = 'customer_id'
card_id = 'card_id'
idempotency_key = 'idempotency-key'

result = customers_controller.delete_card(customer_id, card_id, idempotency_key)

Errors

Error Code Error Description
400 Invalid request
401 Invalid API key
404 An informed resource was not found
412 Business validation error
422 Contract validation error
500 Internal server error

Method: get_card

Get a customer's card

def get_card(customer_id,
                 card_id); end

Parameters

Parameter Tags Description
customer_id Required Customer id
card_id Required Card id

Example Usage

customer_id = 'customer_id'
card_id = 'card_id'

result = customers_controller.get_card(customer_id, card_id)

Errors

Error Code Error Description
400 Invalid request
401 Invalid API key
404 An informed resource was not found
412 Business validation error
422 Contract validation error
500 Internal server error

Back to List of Controllers

Class: ChargesController

Get singleton instance

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

charges_controller = client.charges

Method: get_charge

Get a charge from its id

def get_charge(charge_id); end

Parameters

Parameter Tags Description
charge_id Required Charge id

Example Usage

charge_id = 'charge_id'

result = charges_controller.get_charge(charge_id)

Errors

Error Code Error Description
400 Invalid request
401 Invalid API key
404 An informed resource was not found
412 Business validation error
422 Contract validation error
500 Internal server error

Method: cancel_charge

Cancel a charge

def cancel_charge(charge_id,
                      idempotency_key = nil,
                      body = nil); end

Parameters

Parameter Tags Description
charge_id Required Charge id
idempotency_key Optional TODO: Add a parameter description
body Optional Request for cancelling a charge

Example Usage

charge_id = 'charge_id'
idempotency_key = 'idempotency-key'
body = ChargesRequest.new

result = charges_controller.cancel_charge(charge_id, idempotency_key, body)

Errors

Error Code Error Description
400 Invalid request
401 Invalid API key
404 An informed resource was not found
412 Business validation error
422 Contract validation error
500 Internal server error

Method: confirm_payment

ConfirmPayment

def confirm_payment(charge_id,
                        idempotency_key = nil,
                        body = nil); end

Parameters

Parameter Tags Description
charge_id Required TODO: Add a parameter description
idempotency_key Optional TODO: Add a parameter description
body Optional Request for confirm payment

Example Usage

charge_id = 'charge_id'
idempotency_key = 'idempotency-key'
body = CreateConfirmPaymentRequest.new

result = charges_controller.confirm_payment(charge_id, idempotency_key, body)

Errors

Error Code Error Description
400 Invalid request
401 Invalid API key
404 An informed resource was not found
412 Business validation error
422 Contract validation error
500 Internal server error

Method: update_charge_card

Updates the card from a charge

def update_charge_card(charge_id,
                           body,
                           idempotency_key = nil); end

Parameters

Parameter Tags Description
charge_id Required Charge id
body Required Request for updating a charge's card
idempotency_key Optional TODO: Add a parameter description

Example Usage

charge_id = 'charge_id'
body = ChargesCardRequest.new
idempotency_key = 'idempotency-key'

result = charges_controller.update_charge_card(charge_id, body, idempotency_key)

Errors

Error Code Error Description
400 Invalid request
401 Invalid API key
404 An informed resource was not found
412 Business validation error
422 Contract validation error
500 Internal server error

Method: get_charges

Lists all charges

def get_charges(page = nil,
                    size = nil,
                    code = nil,
                    status = nil,
                    payment_method = nil,
                    customer_id = nil,
                    order_id = nil,
                    created_since = nil,
                    created_until = nil); end

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
payment_method Optional Filter for charge's payment method
customer_id Optional Filter for charge's customer id
order_id Optional Filter for charge's order id
created_since Optional Filter for the beginning of the range for charge's creation
created_until Optional Filter for the end of the range for charge's creation

Example Usage

page = 71
size = 71
code = 'code'
status = 'status'
payment_method = 'payment_method'
customer_id = 'customer_id'
order_id = 'order_id'
created_since = DateTime.now
created_until = DateTime.now

result = charges_controller.get_charges(page, size, code, status, payment_method, customer_id, order_id, created_since, created_until)

Errors

Error Code Error Description
400 Invalid request
401 Invalid API key
404 An informed resource was not found
412 Business validation error
422 Contract validation error
500 Internal server error

Method: retry_charge

Retries a charge

def retry_charge(charge_id,
                     idempotency_key = nil); end

Parameters

Parameter Tags Description
charge_id Required Charge id
idempotency_key Optional TODO: Add a parameter description

Example Usage

charge_id = 'charge_id'
idempotency_key = 'idempotency-key'

result = charges_controller.retry_charge(charge_id, idempotency_key)

Errors

Error Code Error Description
400 Invalid request
401 Invalid API key
404 An informed resource was not found
412 Business validation error
422 Contract validation error
500 Internal server error

Method: update_charge_payment_method

Updates a charge's payment method

def update_charge_payment_method(charge_id,
                                     body,
                                     idempotency_key = nil); end

Parameters

Parameter Tags Description
charge_id Required Charge id
body Required Request for updating the payment method from a charge
idempotency_key Optional TODO: Add a parameter description

Example Usage

charge_id = 'charge_id'
body = ChargesPaymentMethodRequest.new
idempotency_key = 'idempotency-key'

result = charges_controller.update_charge_payment_method(charge_id, body, idempotency_key)

Errors

Error Code Error Description
400 Invalid request
401 Invalid API key
404 An informed resource was not found
412 Business validation error
422 Contract validation error
500 Internal server error

Method: update_charge_metadata

Updates the metadata from a charge

def update_charge_metadata(charge_id,
                               body,
                               idempotency_key = nil); end

Parameters

Parameter Tags Description
charge_id Required The charge id
body Required Request for updating the charge metadata
idempotency_key Optional TODO: Add a parameter description

Example Usage

charge_id = 'charge_id'
body = ChargesMetadataRequest.new
idempotency_key = 'idempotency-key'

result = charges_controller.update_charge_metadata(charge_id, body, idempotency_key)

Errors

Error Code Error Description
400 Invalid request
401 Invalid API key
404 An informed resource was not found
412 Business validation error
422 Contract validation error
500 Internal server error

Method: capture_charge

Captures a charge

def capture_charge(charge_id,
                       idempotency_key = nil,
                       body = nil); end

Parameters

Parameter Tags Description
charge_id Required Charge id
idempotency_key Optional TODO: Add a parameter description
body Optional Request for capturing a charge

Example Usage

charge_id = 'charge_id'
idempotency_key = 'idempotency-key'
body = ChargesCaptureRequest.new

result = charges_controller.capture_charge(charge_id, idempotency_key, body)

Errors

Error Code Error Description
400 Invalid request
401 Invalid API key
404 An informed resource was not found
412 Business validation error
422 Contract validation error
500 Internal server error

Method: update_charge_due_date

Updates the due date from a charge

def update_charge_due_date(charge_id,
                               body,
                               idempotency_key = nil); end

Parameters

Parameter Tags Description
charge_id Required Charge Id
body Required Request for updating the due date
idempotency_key Optional TODO: Add a parameter description

Example Usage

charge_id = 'charge_id'
body = ChargesDueDateRequest.new
idempotency_key = 'idempotency-key'

result = charges_controller.update_charge_due_date(charge_id, body, idempotency_key)

Errors

Error Code Error Description
400 Invalid request
401 Invalid API key
404 An informed resource was not found
412 Business validation error
422 Contract validation error
500 Internal server error

Method: create_charge

Creates a new charge

def create_charge(body,
                      idempotency_key = nil); end

Parameters

Parameter Tags Description
body Required Request for creating a charge
idempotency_key Optional TODO: Add a parameter description

Example Usage

body = ChargesRequest1.new
idempotency_key = 'idempotency-key'

result = charges_controller.create_charge(body, idempotency_key)

Errors

Error Code Error Description
400 Invalid request
401 Invalid API key
404 An informed resource was not found
412 Business validation error
422 Contract validation error
500 Internal server error

Method: get_charge_transactions

GetChargeTransactions

def get_charge_transactions(charge_id,
                                page = nil,
                                size = nil); end

Parameters

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

Example Usage

charge_id = 'charge_id'
page = 30
size = 30

result = charges_controller.get_charge_transactions(charge_id, page, size)

Errors

Error Code Error Description
400 Invalid request
401 Invalid API key
404 An informed resource was not found
412 Business validation error
422 Contract validation error
500 Internal server error

Method: get_charges_summary

GetChargesSummary

def get_charges_summary(status,
                            created_since = nil,
                            created_until = nil); end

Parameters

Parameter Tags Description
status Required TODO: Add a parameter description
created_since Optional TODO: Add a parameter description
created_until Optional TODO: Add a parameter description

Example Usage

status = 'status'
created_since = DateTime.now
created_until = DateTime.now

result = charges_controller.get_charges_summary(status, created_since, created_until)

Errors

Error Code Error Description
400 Invalid request
401 Invalid API key
404 An informed resource was not found
412 Business validation error
422 Contract validation error
500 Internal server error

Back to List of Controllers

Class: RecipientsController

Get singleton instance

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

recipients_controller = client.recipients

Method: update_recipient_metadata

Updates recipient metadata

def update_recipient_metadata(recipient_id,
                                  body,
                                  idempotency_key = nil); end

Parameters

Parameter Tags Description
recipient_id Required Recipient id
body Required Metadata
idempotency_key Optional TODO: Add a parameter description

Example Usage

recipient_id = 'recipient_id'
body = RecipientsMetadataRequest.new
idempotency_key = 'idempotency-key'

result = recipients_controller.update_recipient_metadata(recipient_id, body, idempotency_key)

Errors

Error Code Error Description
400 Invalid request
401 Invalid API key
404 An informed resource was not found
412 Business validation error
422 Contract validation error
500 Internal server error

Method: update_recipient_transfer_settings

UpdateRecipientTransferSettings

def update_recipient_transfer_settings(recipient_id,
                                           body,
                                           idempotency_key = nil); end

Parameters

Parameter Tags Description
recipient_id Required Recipient Identificator
body Required TODO: Add a parameter description
idempotency_key Optional TODO: Add a parameter description

Example Usage

recipient_id = 'recipient_id'
body = UpdateTransferSettingsRequest.new
idempotency_key = 'idempotency-key'

result = recipients_controller.update_recipient_transfer_settings(recipient_id, body, idempotency_key)

Errors

Error Code Error Description
400 Invalid request
401 Invalid API key
404 An informed resource was not found
412 Business validation error
422 Contract validation error
500 Internal server error

Method: get_anticipation

Gets an anticipation

def get_anticipation(recipient_id,
                         anticipation_id); end

Parameters

Parameter Tags Description
recipient_id Required Recipient id
anticipation_id Required Anticipation id

Example Usage

recipient_id = 'recipient_id'
anticipation_id = 'anticipation_id'

result = recipients_controller.get_anticipation(recipient_id, anticipation_id)

Errors

Error Code Error Description
400 Invalid request
401 Invalid API key
404 An informed resource was not found
412 Business validation error
422 Contract validation error
500 Internal server error

Method: get_recipients

Retrieves paginated recipients information

def get_recipients(page = nil,
                       size = nil); end

Parameters

Parameter Tags Description
page Optional Page number
size Optional Page size

Example Usage

page = 30
size = 30

result = recipients_controller.get_recipients(page, size)

Errors

Error Code Error Description
400 Invalid request
401 Invalid API key
404 An informed resource was not found
412 Business validation error
422 Contract validation error
500 Internal server error

Method: create_recipient

Creates a new recipient

def create_recipient(body,
                         idempotency_key = nil); end

Parameters

Parameter Tags Description
body Required Recipient data
idempotency_key Optional TODO: Add a parameter description

Example Usage

body = RecipientsRequest.new
idempotency_key = 'idempotency-key'

result = recipients_controller.create_recipient(body, idempotency_key)

Errors

Error Code Error Description
400 Invalid request
401 Invalid API key
404 An informed resource was not found
412 Business validation error
422 Contract validation error
500 Internal server error

Method: get_balance

Get balance information for a recipient

def get_balance(recipient_id); end

Parameters

Parameter Tags Description
recipient_id Required Recipient id

Example Usage

recipient_id = 'recipient_id'

result = recipients_controller.get_balance(recipient_id)

Errors

Error Code Error Description
400 Invalid request
401 Invalid API key
404 An informed resource was not found
412 Business validation error
422 Contract validation error
500 Internal server error

Method: get_anticipations

Retrieves a paginated list of anticipations from a recipient

def get_anticipations(recipient_id,
                          page = nil,
                          size = nil,
                          status = nil,
                          timeframe = nil,
                          payment_date_since = nil,
                          payment_date_until = nil,
                          created_since = nil,
                          created_until = nil); end

Parameters

Parameter Tags Description
recipient_id Required Recipient id
page Optional Page number
size Optional Page size
status Optional Filter for anticipation status
timeframe Optional Filter for anticipation timeframe
payment_date_since Optional Filter for start range for anticipation payment date
payment_date_until Optional Filter for end range for anticipation payment date
created_since Optional Filter for start range for anticipation creation date
created_until Optional Filter for end range for anticipation creation date

Example Usage

recipient_id = 'recipient_id'
page = 30
size = 30
status = 'status'
timeframe = 'timeframe'
payment_date_since = DateTime.now
payment_date_until = DateTime.now
created_since = DateTime.now
created_until = DateTime.now

result = recipients_controller.get_anticipations(recipient_id, page, size, status, timeframe, payment_date_since, payment_date_until, created_since, created_until)

Errors

Error Code Error Description
400 Invalid request
401 Invalid API key
404 An informed resource was not found
412 Business validation error
422 Contract validation error
500 Internal server error

Method: create_anticipation

Creates an anticipation

def create_anticipation(recipient_id,
                            body,
                            idempotency_key = nil); end

Parameters

Parameter Tags Description
recipient_id Required Recipient id
body Required Anticipation data
idempotency_key Optional TODO: Add a parameter description

Example Usage

recipient_id = 'recipient_id'
body = RecipientsAnticipationsRequest.new
idempotency_key = 'idempotency-key'

result = recipients_controller.create_anticipation(recipient_id, body, idempotency_key)

Errors

Error Code Error Description
400 Invalid request
401 Invalid API key
404 An informed resource was not found
412 Business validation error
422 Contract validation error
500 Internal server error

Method: update_recipient_default_bank_account

Updates the default bank account from a recipient

def update_recipient_default_bank_account(recipient_id,
                                              body,
                                              idempotency_key = nil); end

Parameters

Parameter Tags Description
recipient_id Required Recipient id
body Required Bank account data
idempotency_key Optional TODO: Add a parameter description

Example Usage

recipient_id = 'recipient_id'
body = RecipientsDefaultBankAccountRequest.new
idempotency_key = 'idempotency-key'

result = recipients_controller.update_recipient_default_bank_account(recipient_id, body, idempotency_key)

Errors

Error Code Error Description
400 Invalid request
401 Invalid API key
404 An informed resource was not found
412 Business validation error
422 Contract validation error
500 Internal server error

Method: get_recipient

Retrieves recipient information

def get_recipient(recipient_id); end

Parameters

Parameter Tags Description
recipient_id Required Recipiend id

Example Usage

recipient_id = 'recipient_id'

result = recipients_controller.get_recipient(recipient_id)

Errors

Error Code Error Description
400 Invalid request
401 Invalid API key
404 An informed resource was not found
412 Business validation error
422 Contract validation error
500 Internal server error

Method: update_recipient

Updates a recipient

def update_recipient(recipient_id,
                         body,
                         idempotency_key = nil); end

Parameters

Parameter Tags Description
recipient_id Required Recipient id
body Required Recipient data
idempotency_key Optional TODO: Add a parameter description

Example Usage

recipient_id = 'recipient_id'
body = RecipientsRequest1.new
idempotency_key = 'idempotency-key'

result = recipients_controller.update_recipient(recipient_id, body, idempotency_key)

Errors

Error Code Error Description
400 Invalid request
401 Invalid API key
404 An informed resource was not found
412 Business validation error
422 Contract validation error
500 Internal server error

Method: get_transfer

Gets a transfer

def get_transfer(recipient_id,
                     transfer_id); end

Parameters

Parameter Tags Description
recipient_id Required Recipient id
transfer_id Required Transfer id

Example Usage

recipient_id = 'recipient_id'
transfer_id = 'transfer_id'

result = recipients_controller.get_transfer(recipient_id, transfer_id)

Errors

Error Code Error Description
400 Invalid request
401 Invalid API key
404 An informed resource was not found
412 Business validation error
422 Contract validation error
500 Internal server error

Method: get_transfers

Gets a paginated list of transfers for the recipient

def get_transfers(recipient_id,
                      page = nil,
                      size = nil,
                      status = nil,
                      created_since = nil,
                      created_until = nil); end

Parameters

Parameter Tags Description
recipient_id Required Recipient id
page Optional Page number
size Optional Page size
status Optional Filter for transfer status
created_since Optional Filter for start range of transfer creation date
created_until Optional Filter for end range of transfer creation date

Example Usage

recipient_id = 'recipient_id'
page = 30
size = 30
status = 'status'
created_since = DateTime.now
created_until = DateTime.now

result = recipients_controller.get_transfers(recipient_id, page, size, status, created_since, created_until)

Errors

Error Code Error Description
400 Invalid request
401 Invalid API key
404 An informed resource was not found
412 Business validation error
422 Contract validation error
500 Internal server error

Method: create_transfer

Creates a transfer for a recipient

def create_transfer(recipient_id,
                        body,
                        idempotency_key = nil); end

Parameters

Parameter Tags Description
recipient_id Required Recipient Id
body Required Transfer data
idempotency_key Optional TODO: Add a parameter description

Example Usage

recipient_id = 'recipient_id'
body = RecipientsTransfersRequest.new
idempotency_key = 'idempotency-key'

result = recipients_controller.create_transfer(recipient_id, body, idempotency_key)

Errors

Error Code Error Description
400 Invalid request
401 Invalid API key
404 An informed resource was not found
412 Business validation error
422 Contract validation error
500 Internal server error

Method: get_anticipation_limits

Gets the anticipation limits for a recipient

def get_anticipation_limits(recipient_id,
                                timeframe,
                                payment_date); end

Parameters

Parameter Tags Description
recipient_id Required Recipient id
timeframe Required Timeframe
payment_date Required Anticipation payment date

Example Usage

recipient_id = 'recipient_id'
timeframe = 'timeframe'
payment_date = DateTime.now

result = recipients_controller.get_anticipation_limits(recipient_id, timeframe, payment_date)

Errors

Error Code Error Description
400 Invalid request
401 Invalid API key
404 An informed resource was not found
412 Business validation error
422 Contract validation error
500 Internal server error

Method: create_withdraw

CreateWithdraw

def create_withdraw(recipient_id,
                        body); end

Parameters

Parameter Tags Description
recipient_id Required TODO: Add a parameter description
body Required TODO: Add a parameter description

Example Usage

recipient_id = 'recipient_id'
body = CreateWithdrawRequest.new

result = recipients_controller.create_withdraw(recipient_id, body)

Errors

Error Code Error Description
400 Invalid request
401 Invalid API key
404 An informed resource was not found
412 Business validation error
422 Contract validation error
500 Internal server error

Method: get_withdrawals

Gets a paginated list of transfers for the recipient

def get_withdrawals(recipient_id,
                        page = nil,
                        size = nil,
                        status = nil,
                        created_since = nil,
                        created_until = nil); end

Parameters

Parameter Tags Description
recipient_id 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
created_since Optional TODO: Add a parameter description
created_until Optional TODO: Add a parameter description

Example Usage

recipient_id = 'recipient_id'
page = 30
size = 30
status = 'status'
created_since = DateTime.now
created_until = DateTime.now

result = recipients_controller.get_withdrawals(recipient_id, page, size, status, created_since, created_until)

Errors

Error Code Error Description
400 Invalid request
401 Invalid API key
404 An informed resource was not found
412 Business validation error
422 Contract validation error
500 Internal server error

Method: get_withdraw_by_id

GetWithdrawById

def get_withdraw_by_id(recipient_id,
                           withdrawal_id); end

Parameters

Parameter Tags Description
recipient_id Required TODO: Add a parameter description
withdrawal_id Required TODO: Add a parameter description

Example Usage

recipient_id = 'recipient_id'
withdrawal_id = 'withdrawal_id'

result = recipients_controller.get_withdraw_by_id(recipient_id, withdrawal_id)

Errors

Error Code Error Description
400 Invalid request
401 Invalid API key
404 An informed resource was not found
412 Business validation error
422 Contract validation error
500 Internal server error

Method: update_automatic_anticipation_settings

Updates recipient metadata

def update_automatic_anticipation_settings(recipient_id,
                                               body,
                                               idempotency_key = nil); end

Parameters

Parameter Tags Description
recipient_id Required Recipient id
body Required Metadata
idempotency_key Optional TODO: Add a parameter description

Example Usage

recipient_id = 'recipient_id'
body = UpdateAutomaticAnticipationSettingsRequest.new
idempotency_key = 'idempotency-key'

result = recipients_controller.update_automatic_anticipation_settings(recipient_id, body, idempotency_key)

Errors

Error Code Error Description
400 Invalid request
401 Invalid API key
404 An informed resource was not found
412 Business validation error
422 Contract validation error
500 Internal server error

Method: get_recipient_by_code

Retrieves recipient information

def get_recipient_by_code(code); end

Parameters

Parameter Tags Description
code Required Recipient code

Example Usage

code = 'code'

result = recipients_controller.get_recipient_by_code(code)

Errors

Error Code Error Description
400 Invalid request
401 Invalid API key
404 An informed resource was not found
412 Business validation error
422 Contract validation error
500 Internal server error

Back to List of Controllers

Class: TokensController

Get singleton instance

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

tokens_controller = client.tokens

Method: create_token

Tags: Skips Authentication

CreateToken

def create_token(public_key,
                     body,
                     idempotency_key = nil,
                     app_id = nil); end

Parameters

Parameter Tags Description
public_key Required Public key
body Required Request for creating a token
idempotency_key Optional TODO: Add a parameter description
app_id Optional TODO: Add a parameter description

Example Usage

public_key = 'public_key'
body = TokensRequest.new
idempotency_key = 'idempotency-key'
app_id = 'appId'

result = tokens_controller.create_token(public_key, body, idempotency_key, app_id)

Errors

Error Code Error Description
400 Invalid request
401 Invalid API key
404 An informed resource was not found
412 Business validation error
422 Contract validation error
500 Internal server error

Method: get_token

Tags: Skips Authentication

Gets a token from its id

def get_token(id,
                  public_key,
                  app_id = nil); end

Parameters

Parameter Tags Description
id Required Token id
public_key Required Public key
app_id Optional TODO: Add a parameter description

Example Usage

id = 'id'
public_key = 'public_key'
app_id = 'appId'

result = tokens_controller.get_token(id, public_key, app_id)

Errors

Error Code Error Description
400 Invalid request
401 Invalid API key
404 An informed resource was not found
412 Business validation error
422 Contract validation error
500 Internal server error

Back to List of Controllers

Class: TransactionsController

Get singleton instance

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

transactions_controller = client.transactions

Method: get_transaction

GetTransaction

def get_transaction(transaction_id); end

Parameters

Parameter Tags Description
transaction_id Required TODO: Add a parameter description

Example Usage

transaction_id = 'transaction_id'

result = transactions_controller.get_transaction(transaction_id)

Errors

Error Code Error Description
400 Invalid request
401 Invalid API key
404 An informed resource was not found
412 Business validation error
422 Contract validation error
500 Internal server error

Back to List of Controllers

Class: TransfersController

Get singleton instance

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

transfers_controller = client.transfers

Method: post_create_transfer

CreateTransfer

def post_create_transfer(body); end

Parameters

Parameter Tags Description
body Required TODO: Add a parameter description

Example Usage

body = CreateTransfer.new

result = transfers_controller.post_create_transfer(body)

Errors

Error Code Error Description
400 Invalid request
401 Invalid API key
404 An informed resource was not found
412 Business validation error
422 Contract validation error
500 Internal server error

Method: get_transfer_by_id

GetTransferById

def get_transfer_by_id(transfer_id); end

Parameters

Parameter Tags Description
transfer_id Required TODO: Add a parameter description

Example Usage

transfer_id = 'transfer_id'

result = transfers_controller.get_transfer_by_id(transfer_id)

Errors

Error Code Error Description
400 Invalid request
401 Invalid API key
404 An informed resource was not found
412 Business validation error
422 Contract validation error
500 Internal server error

Method: get_transfers1

Gets all transfers

def get_transfers1; end

Example Usage

result = transfers_controller.get_transfers1()

Errors

Error Code Error Description
400 Invalid request
401 Invalid API key
404 An informed resource was not found
412 Business validation error
422 Contract validation error
500 Internal server error

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