Mundipagg API
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.
- Open the command line interface or the terminal and navigate to the folder containing the source code.
- Run
gem build mundi_api.gemspec
to build the gem. - Once built, the gem can be installed on the current work environment using
gem install mundi_api-0.13.7.gem
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.
Close any existing projects in RubyMine™ by selecting File -> Close Project
. Next, click on Create New Project
to create a new project from scratch.
Next, provide TestApp
as the project name, choose Rails Application
as the project type, and click OK
.
In the next dialog make sure that correct Ruby SDK is being used (minimum 2.0.0) and click OK
.
This will create a new Rails Application project with an existing set of files and folder.
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', '~> 0.13.7'
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...
.
Selecting the said option will popup a small window where the generator names are displayed. Here, select the controller
template.
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
.
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.
You can test the generated SDK and the server with automatically generated test cases as follows:
- From terminal/cmd navigate to the root directory of the SDK.
- Invoke:
bundle exec rake
In order to setup authentication and initialization of the API client, you need the following information.
Parameter | 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
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(
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'
.
- SubscriptionsController
- OrdersController
- PlansController
- InvoicesController
- CustomersController
- ChargesController
- RecipientsController
- TokensController
- SellersController
The singleton instance of the SubscriptionsController
class can be accessed from the API Client.
subscriptions_controller = client.subscriptions
Updates the billing date from a subscription
def update_subscription_billing_date(subscription_id,
request); end
Parameter | Tags | Description |
---|---|---|
subscription_id | Required |
The subscription id |
request | Required |
Request for updating the subscription billing date |
subscription_id = 'subscription_id'
request = UpdateSubscriptionBillingDateRequest.new
result = subscriptions_controller.update_subscription_billing_date(subscription_id, request)
Updates the credit card from a subscription
def update_subscription_card(subscription_id,
request); end
Parameter | Tags | Description |
---|---|---|
subscription_id | Required |
Subscription id |
request | Required |
Request for updating a card |
subscription_id = 'subscription_id'
request = UpdateSubscriptionCardRequest.new
result = subscriptions_controller.update_subscription_card(subscription_id, request)
Updates a subscription item
def update_subscription_item(subscription_id,
item_id,
body); end
Parameter | Tags | Description |
---|---|---|
subscription_id | Required |
Subscription Id |
item_id | Required |
Item id |
body | Required |
Request for updating a subscription item |
subscription_id = 'subscription_id'
item_id = 'item_id'
body = UpdateSubscriptionItemRequest.new
result = subscriptions_controller.update_subscription_item(subscription_id, item_id, body)
Creates a usage
def create_usage(subscription_id,
item_id,
body); end
Parameter | Tags | Description |
---|---|---|
subscription_id | Required |
Subscription Id |
item_id | Required |
Item id |
body | Required |
Request for creating a usage |
subscription_id = 'subscription_id'
item_id = 'item_id'
body = CreateUsageRequest.new
result = subscriptions_controller.create_usage(subscription_id, item_id, body)
Gets a subscription
def get_subscription(subscription_id); end
Parameter | Tags | Description |
---|---|---|
subscription_id | Required |
Subscription id |
subscription_id = 'subscription_id'
result = subscriptions_controller.get_subscription(subscription_id)
Updates the payment method from a subscription
def update_subscription_payment_method(subscription_id,
request); end
Parameter | Tags | Description |
---|---|---|
subscription_id | Required |
Subscription id |
request | Required |
Request for updating the paymentmethod from a subscription |
subscription_id = 'subscription_id'
request = UpdateSubscriptionPaymentMethodRequest.new
result = subscriptions_controller.update_subscription_payment_method(subscription_id, request)
Creates a new subscription
def create_subscription(body); end
Parameter | Tags | Description |
---|---|---|
body | Required |
Request for creating a subscription |
body = CreateSubscriptionRequest.new
result = subscriptions_controller.create_subscription(body)
Creates a new Subscription item
def create_subscription_item(subscription_id,
request); end
Parameter | Tags | Description |
---|---|---|
subscription_id | Required |
Subscription id |
request | Required |
Request for creating a subscription item |
subscription_id = 'subscription_id'
request = CreateSubscriptionItemRequest.new
result = subscriptions_controller.create_subscription_item(subscription_id, request)
Creates a discount
def create_discount(subscription_id,
request); end
Parameter | Tags | Description |
---|---|---|
subscription_id | Required |
Subscription id |
request | Required |
Request for creating a discount |
subscription_id = 'subscription_id'
request = CreateDiscountRequest.new
result = subscriptions_controller.create_discount(subscription_id, request)
Get Subscription Item
def get_subscription_item(subscription_id,
item_id); end
Parameter | Tags | Description |
---|---|---|
subscription_id | Required |
Subscription Id |
item_id | Required |
Item id |
subscription_id = 'subscription_id'
item_id = 'item_id'
result = subscriptions_controller.get_subscription_item(subscription_id, item_id)
Get Subscription Itens
def get_subscription_items(subscription_id,
status,
description); end
Parameter | Tags | Description |
---|---|---|
subscription_id | Required |
Subscription Id |
status | Required |
Status |
description | Required |
Description |
subscription_id = 'subscription_id'
status = 'status'
description = 'description'
result = subscriptions_controller.get_subscription_items(subscription_id, status, description)
TODO: Add a method description
def update_subscription_affiliation_id(subscription_id,
request); end
Parameter | Tags | Description |
---|---|---|
subscription_id | Required |
TODO: Add a parameter description |
request | Required |
Request for updating a subscription affiliation id |
subscription_id = 'subscription_id'
request = UpdateSubscriptionAffiliationIdRequest.new
result = subscriptions_controller.update_subscription_affiliation_id(subscription_id, request)
Create Usage
def create_an_usage(subscription_id,
item_id); end
Parameter | Tags | Description |
---|---|---|
subscription_id | Required |
Subscription id |
item_id | Required |
Item id |
subscription_id = 'subscription_id'
item_id = 'item_id'
result = subscriptions_controller.create_an_usage(subscription_id, item_id)
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
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 |
page = 43
size = 43
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)
Updates the metadata from a subscription
def update_subscription_metadata(subscription_id,
request); end
Parameter | Tags | Description |
---|---|---|
subscription_id | Required |
The subscription id |
request | Required |
Request for updating the subscrption metadata |
subscription_id = 'subscription_id'
request = UpdateMetadataRequest.new
result = subscriptions_controller.update_subscription_metadata(subscription_id, request)
Deletes a subscription item
def delete_subscription_item(subscription_id,
subscription_item_id); end
Parameter | Tags | Description |
---|---|---|
subscription_id | Required |
Subscription id |
subscription_item_id | Required |
Subscription item id |
subscription_id = 'subscription_id'
subscription_item_id = 'subscription_item_id'
result = subscriptions_controller.delete_subscription_item(subscription_id, subscription_item_id)
Deletes a usage
def delete_usage(subscription_id,
item_id,
usage_id); end
Parameter | Tags | Description |
---|---|---|
subscription_id | Required |
The subscription id |
item_id | Required |
The subscription item id |
usage_id | Required |
The usage id |
subscription_id = 'subscription_id'
item_id = 'item_id'
usage_id = 'usage_id'
result = subscriptions_controller.delete_usage(subscription_id, item_id, usage_id)
Lists all usages from a subscription item
def get_usages(subscription_id,
item_id,
page = nil,
size = nil); end
Parameter | Tags | Description |
---|---|---|
subscription_id | Required |
The subscription id |
item_id | Required |
The subscription item id |
page | Optional |
Page number |
size | Optional |
Page size |
subscription_id = 'subscription_id'
item_id = 'item_id'
page = 43
size = 43
result = subscriptions_controller.get_usages(subscription_id, item_id, page, size)
Deletes a discount
def delete_discount(subscription_id,
discount_id); end
Parameter | Tags | Description |
---|---|---|
subscription_id | Required |
Subscription id |
discount_id | Required |
Discount Id |
subscription_id = 'subscription_id'
discount_id = 'discount_id'
result = subscriptions_controller.delete_discount(subscription_id, discount_id)
Cancels a subscription
def cancel_subscription(subscription_id,
request = nil); end
Parameter | Tags | Description |
---|---|---|
subscription_id | Required |
Subscription id |
request | Optional |
Request for cancelling a subscription |
subscription_id = 'subscription_id'
request = CreateCancelSubscriptionRequest.new
result = subscriptions_controller.cancel_subscription(subscription_id, request)
TODO: Add a method description
def get_discount_by_id(subscription_id,
discount_id); end
Parameter | Tags | Description |
---|---|---|
subscription_id | Required |
TODO: Add a parameter description |
discount_id | Required |
TODO: Add a parameter description |
subscription_id = 'subscription_id'
discount_id = 'discountId'
result = subscriptions_controller.get_discount_by_id(subscription_id, discount_id)
The singleton instance of the OrdersController
class can be accessed from the API Client.
orders_controller = client.orders
Gets an order
def get_order(order_id); end
Parameter | Tags | Description |
---|---|---|
order_id | Required |
Order id |
order_id = 'order_id'
result = orders_controller.get_order(order_id)
Creates a new Order
def create_order(body); end
Parameter | Tags | Description |
---|---|---|
body | Required |
Request for creating an order |
body = CreateOrderRequest.new
result = orders_controller.create_order(body)
Gets all orders
def get_orders(page = nil,
size = nil,
code = nil,
status = nil,
created_since = nil,
created_until = nil,
customer_id = nil); end
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 |
page = 43
size = 43
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)
Updates the metadata from an order
def update_order_metadata(order_id,
request); end
Parameter | Tags | Description |
---|---|---|
order_id | Required |
The order id |
request | Required |
Request for updating the order metadata |
order_id = 'order_id'
request = UpdateMetadataRequest.new
result = orders_controller.update_order_metadata(order_id, request)
TODO: Add a method description
def delete_all_order_items(order_id); end
Parameter | Tags | Description |
---|---|---|
order_id | Required |
Order Id |
order_id = 'orderId'
result = orders_controller.delete_all_order_items(order_id)
TODO: Add a method description
def update_order_item(order_id,
item_id,
request); end
Parameter | Tags | Description |
---|---|---|
order_id | Required |
Order Id |
item_id | Required |
Item Id |
request | Required |
Item Model |
order_id = 'orderId'
item_id = 'itemId'
request = UpdateOrderItemRequest.new
result = orders_controller.update_order_item(order_id, item_id, request)
TODO: Add a method description
def delete_order_item(order_id,
item_id); end
Parameter | Tags | Description |
---|---|---|
order_id | Required |
Order Id |
item_id | Required |
Item Id |
order_id = 'orderId'
item_id = 'itemId'
result = orders_controller.delete_order_item(order_id, item_id)
TODO: Add a method description
def create_order_item(order_id,
request); end
Parameter | Tags | Description |
---|---|---|
order_id | Required |
Order Id |
request | Required |
Order Item Model |
order_id = 'orderId'
request = CreateOrderItemRequest.new
result = orders_controller.create_order_item(order_id, request)
TODO: Add a method description
def get_order_item(order_id,
item_id); end
Parameter | Tags | Description |
---|---|---|
order_id | Required |
Order Id |
item_id | Required |
Item Id |
order_id = 'orderId'
item_id = 'itemId'
result = orders_controller.get_order_item(order_id, item_id)
TODO: Add a method description
def update_order_status(id,
request); end
Parameter | Tags | Description |
---|---|---|
id | Required |
Order Id |
request | Required |
Update Order Model |
id = 'id'
request = UpdateOrderStatusRequest.new
result = orders_controller.update_order_status(id, request)
The singleton instance of the PlansController
class can be accessed from the API Client.
plans_controller = client.plans
Adds a new item to a plan
def create_plan_item(plan_id,
request); end
Parameter | Tags | Description |
---|---|---|
plan_id | Required |
Plan id |
request | Required |
Request for creating a plan item |
plan_id = 'plan_id'
request = CreatePlanItemRequest.new
result = plans_controller.create_plan_item(plan_id, request)
Updates a plan item
def update_plan_item(plan_id,
plan_item_id,
body); end
Parameter | Tags | Description |
---|---|---|
plan_id | Required |
Plan id |
plan_item_id | Required |
Plan item id |
body | Required |
Request for updating the plan item |
plan_id = 'plan_id'
plan_item_id = 'plan_item_id'
body = UpdatePlanItemRequest.new
result = plans_controller.update_plan_item(plan_id, plan_item_id, body)
Gets a plan
def get_plan(plan_id); end
Parameter | Tags | Description |
---|---|---|
plan_id | Required |
Plan id |
plan_id = 'plan_id'
result = plans_controller.get_plan(plan_id)
Deletes a plan
def delete_plan(plan_id); end
Parameter | Tags | Description |
---|---|---|
plan_id | Required |
Plan id |
plan_id = 'plan_id'
result = plans_controller.delete_plan(plan_id)
Updates a plan
def update_plan(plan_id,
request); end
Parameter | Tags | Description |
---|---|---|
plan_id | Required |
Plan id |
request | Required |
Request for updating a plan |
plan_id = 'plan_id'
request = UpdatePlanRequest.new
result = plans_controller.update_plan(plan_id, request)
Creates a new plan
def create_plan(body); end
Parameter | Tags | Description |
---|---|---|
body | Required |
Request for creating a plan |
body = CreatePlanRequest.new
result = plans_controller.create_plan(body)
Gets all plans
def get_plans(page = nil,
size = nil,
name = nil,
status = nil,
billing_type = nil,
created_since = nil,
created_until = nil); end
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 |
page = 135
size = 135
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)
Updates the metadata from a plan
def update_plan_metadata(plan_id,
request); end
Parameter | Tags | Description |
---|---|---|
plan_id | Required |
The plan id |
request | Required |
Request for updating the plan metadata |
plan_id = 'plan_id'
request = UpdateMetadataRequest.new
result = plans_controller.update_plan_metadata(plan_id, request)
Gets a plan item
def get_plan_item(plan_id,
plan_item_id); end
Parameter | Tags | Description |
---|---|---|
plan_id | Required |
Plan id |
plan_item_id | Required |
Plan item id |
plan_id = 'plan_id'
plan_item_id = 'plan_item_id'
result = plans_controller.get_plan_item(plan_id, plan_item_id)
Removes an item from a plan
def delete_plan_item(plan_id,
plan_item_id); end
Parameter | Tags | Description |
---|---|---|
plan_id | Required |
Plan id |
plan_item_id | Required |
Plan item id |
plan_id = 'plan_id'
plan_item_id = 'plan_item_id'
result = plans_controller.delete_plan_item(plan_id, plan_item_id)
The singleton instance of the InvoicesController
class can be accessed from the API Client.
invoices_controller = client.invoices
Cancels an invoice
def cancel_invoice(invoice_id); end
Parameter | Tags | Description |
---|---|---|
invoice_id | Required |
Invoice id |
invoice_id = 'invoice_id'
result = invoices_controller.cancel_invoice(invoice_id)
Gets an invoice
def get_invoice(invoice_id); end
Parameter | Tags | Description |
---|---|---|
invoice_id | Required |
Invoice Id |
invoice_id = 'invoice_id'
result = invoices_controller.get_invoice(invoice_id)
Create an Invoice
def create_invoice(subscription_id,
cycle_id); end
Parameter | Tags | Description |
---|---|---|
subscription_id | Required |
Subscription Id |
cycle_id | Required |
Cycle Id |
subscription_id = 'subscription_id'
cycle_id = 'cycle_id'
result = invoices_controller.create_invoice(subscription_id, cycle_id)
Updates the status from an invoice
def update_invoice_status(invoice_id,
request); end
Parameter | Tags | Description |
---|---|---|
invoice_id | Required |
Invoice Id |
request | Required |
Request for updating an invoice's status |
invoice_id = 'invoice_id'
request = UpdateInvoiceStatusRequest.new
result = invoices_controller.update_invoice_status(invoice_id, request)
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); end
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 |
page = 135
size = 135
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
result = invoices_controller.get_invoices(page, size, code, customer_id, subscription_id, created_since, created_until, status, due_since, due_until)
Updates the metadata from an invoice
def update_invoice_metadata(invoice_id,
request); end
Parameter | Tags | Description |
---|---|---|
invoice_id | Required |
The invoice id |
request | Required |
Request for updating the invoice metadata |
invoice_id = 'invoice_id'
request = UpdateMetadataRequest.new
result = invoices_controller.update_invoice_metadata(invoice_id, request)
The singleton instance of the CustomersController
class can be accessed from the API Client.
customers_controller = client.customers
Updates a card
def update_card(customer_id,
card_id,
request); end
Parameter | Tags | Description |
---|---|---|
customer_id | Required |
Customer Id |
card_id | Required |
Card id |
request | Required |
Request for updating a card |
customer_id = 'customer_id'
card_id = 'card_id'
request = UpdateCardRequest.new
result = customers_controller.update_card(customer_id, card_id, request)
Updates an address
def update_address(customer_id,
address_id,
request); end
Parameter | Tags | Description |
---|---|---|
customer_id | Required |
Customer Id |
address_id | Required |
Address Id |
request | Required |
Request for updating an address |
customer_id = 'customer_id'
address_id = 'address_id'
request = UpdateAddressRequest.new
result = customers_controller.update_address(customer_id, address_id, request)
Creates a new customer
def create_customer(request); end
Parameter | Tags | Description |
---|---|---|
request | Required |
Request for creating a customer |
request = CreateCustomerRequest.new
result = customers_controller.create_customer(request)
Get a customer
def get_customer(customer_id); end
Parameter | Tags | Description |
---|---|---|
customer_id | Required |
Customer Id |
customer_id = 'customer_id'
result = customers_controller.get_customer(customer_id)
Get all access tokens from a customer
def get_access_tokens(customer_id,
page = nil,
size = nil); end
Parameter | Tags | Description |
---|---|---|
customer_id | Required |
Customer Id |
page | Optional |
Page number |
size | Optional |
Page size |
customer_id = 'customer_id'
page = 135
size = 135
result = customers_controller.get_access_tokens(customer_id, page, size)
Gets all adressess from a customer
def get_addresses(customer_id,
page = nil,
size = nil); end
Parameter | Tags | Description |
---|---|---|
customer_id | Required |
Customer id |
page | Optional |
Page number |
size | Optional |
Page size |
customer_id = 'customer_id'
page = 135
size = 135
result = customers_controller.get_addresses(customer_id, page, size)
Get all cards from a customer
def get_cards(customer_id,
page = nil,
size = nil); end
Parameter | Tags | Description |
---|---|---|
customer_id | Required |
Customer Id |
page | Optional |
Page number |
size | Optional |
Page size |
customer_id = 'customer_id'
page = 135
size = 135
result = customers_controller.get_cards(customer_id, page, size)
Delete a Customer's access tokens
def delete_access_tokens(customer_id); end
Parameter | Tags | Description |
---|---|---|
customer_id | Required |
Customer Id |
customer_id = 'customer_id'
result = customers_controller.delete_access_tokens(customer_id)
Get a Customer's access token
def get_access_token(customer_id,
token_id); end
Parameter | Tags | Description |
---|---|---|
customer_id | Required |
Customer Id |
token_id | Required |
Token Id |
customer_id = 'customer_id'
token_id = 'token_id'
result = customers_controller.get_access_token(customer_id, token_id)
Creates a access token for a customer
def create_access_token(customer_id,
request); end
Parameter | Tags | Description |
---|---|---|
customer_id | Required |
Customer Id |
request | Required |
Request for creating a access token |
customer_id = 'customer_id'
request = CreateAccessTokenRequest.new
result = customers_controller.create_access_token(customer_id, request)
Delete a customer's access token
def delete_access_token(customer_id,
token_id); end
Parameter | Tags | Description |
---|---|---|
customer_id | Required |
Customer Id |
token_id | Required |
Token Id |
customer_id = 'customer_id'
token_id = 'token_id'
result = customers_controller.delete_access_token(customer_id, token_id)
Updates the metadata a customer
def update_customer_metadata(customer_id,
request); end
Parameter | Tags | Description |
---|---|---|
customer_id | Required |
The customer id |
request | Required |
Request for updating the customer metadata |
customer_id = 'customer_id'
request = UpdateMetadataRequest.new
result = customers_controller.update_customer_metadata(customer_id, request)
Updates a customer
def update_customer(customer_id,
request); end
Parameter | Tags | Description |
---|---|---|
customer_id | Required |
Customer id |
request | Required |
Request for updating a customer |
customer_id = 'customer_id'
request = UpdateCustomerRequest.new
result = customers_controller.update_customer(customer_id, request)
Get a customer's address
def get_address(customer_id,
address_id); end
Parameter | Tags | Description |
---|---|---|
customer_id | Required |
Customer id |
address_id | Required |
Address Id |
customer_id = 'customer_id'
address_id = 'address_id'
result = customers_controller.get_address(customer_id, address_id)
Delete a Customer's address
def delete_address(customer_id,
address_id); end
Parameter | Tags | Description |
---|---|---|
customer_id | Required |
Customer Id |
address_id | Required |
Address Id |
customer_id = 'customer_id'
address_id = 'address_id'
result = customers_controller.delete_address(customer_id, address_id)
Delete a customer's card
def delete_card(customer_id,
card_id); end
Parameter | Tags | Description |
---|---|---|
customer_id | Required |
Customer Id |
card_id | Required |
Card Id |
customer_id = 'customer_id'
card_id = 'card_id'
result = customers_controller.delete_card(customer_id, card_id)
Creates a new address for a customer
def create_address(customer_id,
request); end
Parameter | Tags | Description |
---|---|---|
customer_id | Required |
Customer Id |
request | Required |
Request for creating an address |
customer_id = 'customer_id'
request = CreateAddressRequest.new
result = customers_controller.create_address(customer_id, request)
Get a customer's card
def get_card(customer_id,
card_id); end
Parameter | Tags | Description |
---|---|---|
customer_id | Required |
Customer id |
card_id | Required |
Card id |
customer_id = 'customer_id'
card_id = 'card_id'
result = customers_controller.get_card(customer_id, card_id)
Creates a new card for a customer
def create_card(customer_id,
request); end
Parameter | Tags | Description |
---|---|---|
customer_id | Required |
Customer id |
request | Required |
Request for creating a card |
customer_id = 'customer_id'
request = CreateCardRequest.new
result = customers_controller.create_card(customer_id, request)
Get all Customers
def get_customers(code,
name = nil,
document = nil,
page = 1,
size = 10,
email = nil); end
Parameter | Tags | Description |
---|---|---|
code | Required |
Customer's code |
name | Optional |
Name of the Customer |
document | Optional |
Document of the Customer |
page | Optional DefaultValue |
Current page the the search |
size | Optional DefaultValue |
Quantity pages of the search |
Optional |
Customer's email |
code = 'Code'
name = 'name'
document = 'document'
page = 1
size = 10
email = 'email'
result = customers_controller.get_customers(code, name, document, page, size, email)
The singleton instance of the ChargesController
class can be accessed from the API Client.
charges_controller = client.charges
Updates the card from a charge
def update_charge_card(charge_id,
request); end
Parameter | Tags | Description |
---|---|---|
charge_id | Required |
Charge id |
request | Required |
Request for updating a charge's card |
charge_id = 'charge_id'
request = UpdateChargeCardRequest.new
result = charges_controller.update_charge_card(charge_id, request)
Updates a charge's payment method
def update_charge_payment_method(charge_id,
request); end
Parameter | Tags | Description |
---|---|---|
charge_id | Required |
Charge id |
request | Required |
Request for updating the payment method from a charge |
charge_id = 'charge_id'
request = UpdateChargePaymentMethodRequest.new
result = charges_controller.update_charge_payment_method(charge_id, request)
Creates a new charge
def create_charge(request); end
Parameter | Tags | Description |
---|---|---|
request | Required |
Request for creating a charge |
request = CreateChargeRequest.new
result = charges_controller.create_charge(request)
Get a charge from its id
def get_charge(charge_id); end
Parameter | Tags | Description |
---|---|---|
charge_id | Required |
Charge id |
charge_id = 'charge_id'
result = charges_controller.get_charge(charge_id)
Retries a charge
def retry_charge(charge_id); end
Parameter | Tags | Description |
---|---|---|
charge_id | Required |
Charge id |
charge_id = 'charge_id'
result = charges_controller.retry_charge(charge_id)
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
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 |
page = 93
size = 93
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)
Updates the metadata from a charge
def update_charge_metadata(charge_id,
request); end
Parameter | Tags | Description |
---|---|---|
charge_id | Required |
The charge id |
request | Required |
Request for updating the charge metadata |
charge_id = 'charge_id'
request = UpdateMetadataRequest.new
result = charges_controller.update_charge_metadata(charge_id, request)
Cancel a charge
def cancel_charge(charge_id,
request = nil); end
Parameter | Tags | Description |
---|---|---|
charge_id | Required |
Charge id |
request | Optional |
Request for cancelling a charge |
charge_id = 'charge_id'
request = CreateCancelChargeRequest.new
result = charges_controller.cancel_charge(charge_id, request)
Captures a charge
def capture_charge(charge_id,
request = nil); end
Parameter | Tags | Description |
---|---|---|
charge_id | Required |
Charge id |
request | Optional |
Request for capturing a charge |
charge_id = 'charge_id'
request = CreateCaptureChargeRequest.new
result = charges_controller.capture_charge(charge_id, request)
Updates the due date from a charge
def update_charge_due_date(charge_id,
request); end
Parameter | Tags | Description |
---|---|---|
charge_id | Required |
Charge Id |
request | Required |
Request for updating the due date |
charge_id = 'charge_id'
request = UpdateChargeDueDateRequest.new
result = charges_controller.update_charge_due_date(charge_id, request)
The singleton instance of the RecipientsController
class can be accessed from the API Client.
recipients_controller = client.recipients
Updates recipient metadata
def update_recipient_metadata(recipient_id,
request); end
Parameter | Tags | Description |
---|---|---|
recipient_id | Required |
Recipient id |
request | Required |
Metadata |
recipient_id = 'recipient_id'
request = UpdateMetadataRequest.new
result = recipients_controller.update_recipient_metadata(recipient_id, request)
Gets a transfer
def get_transfer(recipient_id,
transfer_id); end
Parameter | Tags | Description |
---|---|---|
recipient_id | Required |
Recipient id |
transfer_id | Required |
Transfer id |
recipient_id = 'recipient_id'
transfer_id = 'transfer_id'
result = recipients_controller.get_transfer(recipient_id, transfer_id)
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
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 |
recipient_id = 'recipient_id'
page = 93
size = 93
status = 'status'
created_since = DateTime.now
created_until = DateTime.now
result = recipients_controller.get_transfers(recipient_id, page, size, status, created_since, created_until)
Creates an anticipation
def create_anticipation(recipient_id,
request); end
Parameter | Tags | Description |
---|---|---|
recipient_id | Required |
Recipient id |
request | Required |
Anticipation data |
recipient_id = 'recipient_id'
request = CreateAnticipationRequest.new
result = recipients_controller.create_anticipation(recipient_id, request)
Gets an anticipation
def get_anticipation(recipient_id,
anticipation_id); end
Parameter | Tags | Description |
---|---|---|
recipient_id | Required |
Recipient id |
anticipation_id | Required |
Anticipation id |
recipient_id = 'recipient_id'
anticipation_id = 'anticipation_id'
result = recipients_controller.get_anticipation(recipient_id, anticipation_id)
Gets the anticipation limits for a recipient
def get_anticipation_limits(recipient_id,
timeframe,
payment_date); end
Parameter | Tags | Description |
---|---|---|
recipient_id | Required |
Recipient id |
timeframe | Required |
Timeframe |
payment_date | Required |
Anticipation payment date |
recipient_id = 'recipient_id'
timeframe = 'timeframe'
payment_date = DateTime.now
result = recipients_controller.get_anticipation_limits(recipient_id, timeframe, payment_date)
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
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 |
recipient_id = 'recipient_id'
page = 184
size = 184
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)
Updates a recipient
def update_recipient(recipient_id,
request); end
Parameter | Tags | Description |
---|---|---|
recipient_id | Required |
Recipient id |
request | Required |
Recipient data |
recipient_id = 'recipient_id'
request = UpdateRecipientRequest.new
result = recipients_controller.update_recipient(recipient_id, request)
Updates the default bank account from a recipient
def update_recipient_default_bank_account(recipient_id,
request); end
Parameter | Tags | Description |
---|---|---|
recipient_id | Required |
Recipient id |
request | Required |
Bank account data |
recipient_id = 'recipient_id'
request = UpdateRecipientBankAccountRequest.new
result = recipients_controller.update_recipient_default_bank_account(recipient_id, request)
Retrieves recipient information
def get_recipient(recipient_id); end
Parameter | Tags | Description |
---|---|---|
recipient_id | Required |
Recipiend id |
recipient_id = 'recipient_id'
result = recipients_controller.get_recipient(recipient_id)
Retrieves paginated recipients information
def get_recipients(page = nil,
size = nil); end
Parameter | Tags | Description |
---|---|---|
page | Optional |
Page number |
size | Optional |
Page size |
page = 184
size = 184
result = recipients_controller.get_recipients(page, size)
Get balance information for a recipient
def get_balance(recipient_id); end
Parameter | Tags | Description |
---|---|---|
recipient_id | Required |
Recipient id |
recipient_id = 'recipient_id'
result = recipients_controller.get_balance(recipient_id)
Creates a transfer for a recipient
def create_transfer(recipient_id,
request); end
Parameter | Tags | Description |
---|---|---|
recipient_id | Required |
Recipient Id |
request | Required |
Transfer data |
recipient_id = 'recipient_id'
request = CreateTransferRequest.new
result = recipients_controller.create_transfer(recipient_id, request)
Creates a new recipient
def create_recipient(request); end
Parameter | Tags | Description |
---|---|---|
request | Required |
Recipient data |
request = CreateRecipientRequest.new
result = recipients_controller.create_recipient(request)
The singleton instance of the TokensController
class can be accessed from the API Client.
tokens_controller = client.tokens
Tags:
Skips Authentication
Gets a token from its id
def get_token(id,
public_key); end
Parameter | Tags | Description |
---|---|---|
id | Required |
Token id |
public_key | Required |
Public key |
id = 'id'
public_key = 'public_key'
result = tokens_controller.get_token(id, public_key)
Tags:
Skips Authentication
TODO: Add a method description
def create_token(public_key,
request); end
Parameter | Tags | Description |
---|---|---|
public_key | Required |
Public key |
request | Required |
Request for creating a token |
public_key = 'public_key'
request = CreateTokenRequest.new
result = tokens_controller.create_token(public_key, request)
The singleton instance of the SellersController
class can be accessed from the API Client.
sellers_controller = client.sellers
TODO: Add a method description
def get_seller_by_id(id); end
Parameter | Tags | Description |
---|---|---|
id | Required |
Seller Id |
id = 'id'
result = sellers_controller.get_seller_by_id(id)
TODO: Add a method description
def delete_seller(seller_id); end
Parameter | Tags | Description |
---|---|---|
seller_id | Required |
Seller Id |
seller_id = 'sellerId'
result = sellers_controller.delete_seller(seller_id)
TODO: Add a method description
def create_seller(request); end
Parameter | Tags | Description |
---|---|---|
request | Required |
Seller Model |
request = CreateSellerRequest.new
result = sellers_controller.create_seller(request)
TODO: Add a method description
def get_sellers(page = nil,
size = nil,
name = nil,
document = nil,
code = nil,
status = nil,
type = nil,
created_since = nil,
created_until = nil); end
Parameter | Tags | Description |
---|---|---|
page | Optional |
Page number |
size | Optional |
Page size |
name | Optional |
TODO: Add a parameter description |
document | Optional |
TODO: Add a parameter description |
code | Optional |
TODO: Add a parameter description |
status | Optional |
TODO: Add a parameter description |
type | Optional |
TODO: Add a parameter description |
created_since | Optional |
TODO: Add a parameter description |
created_until | Optional |
TODO: Add a parameter description |
page = 184
size = 184
name = 'name'
document = 'document'
code = 'code'
status = 'status'
type = 'type'
created_since = DateTime.now
created_until = DateTime.now
result = sellers_controller.get_sellers(page, size, name, document, code, status, type, created_since, created_until)
TODO: Add a method description
def update_seller(id,
request); end
Parameter | Tags | Description |
---|---|---|
id | Required |
TODO: Add a parameter description |
request | Required |
Update Seller model |
id = 'id'
request = UpdateSellerRequest.new
result = sellers_controller.update_seller(id, request)
TODO: Add a method description
def update_seller_metadata(seller_id,
request); end
Parameter | Tags | Description |
---|---|---|
seller_id | Required |
Seller Id |
request | Required |
Request for updating the charge metadata |
seller_id = 'seller_id'
request = UpdateMetadataRequest.new
result = sellers_controller.update_seller_metadata(seller_id, request)