0.0
No release in over a year
A ruby client library for Togai APIs
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 3.6, >= 3.6.0

Runtime

~> 1.0, >= 1.0.1
 Project Readme

togai_client

TogaiClient - the Ruby gem for the Togai Apis

Togai is an end to end pricing infrastructure that enable you with metering, aggregating, pricing and billing for your application.

This is an official Ruby client library for using Togai APIs.

  • API version: 1.0
  • Package version: 1.0.1

Installation

Add this line to your application's Gemfile:

gem 'togai_client'

And then execute:

$ bundle

Or install it yourself as:

$ gem install togai_client

Getting Started

To get started with the library, you need to create a api token from your Togai Account Please follow the installation procedure and then run the following code:

# Load the gem
require 'togai_client'

# Setup authorization
TogaiClient.configure do |config|
  # Configure Bearer authorization (Bearer <credential>): bearerAuth
  config.access_token = 'YOUR_BEARER_TOKEN'
end

api_instance = TogaiClient::AccountsApi.new
customer_id = 'customer_id_example' # String | 
account_id = 'account_id_example' # String | 
add_account_aliases_request = TogaiClient::AddAccountAliasesRequest.new # AddAccountAliasesRequest | Payload to add aliases to account

begin
  #Add Aliases to account
  result = api_instance.add_aliases(customer_id, account_id, add_account_aliases_request)
  p result
rescue TogaiClient::ApiError => e
  puts "Exception when calling AccountsApi->add_aliases: #{e}"
end