Tenios API Client ☎️
Ruby client for Tenios API.
Installation
Add this line to your application's Gemfile:
gem 'tenios-api'
Usage
require 'tenios-api'
client = Tenios::API::Client.new(access_key: ENV['TENIOS_ACCESS_KEY'])
Call Detail Records
Retrive
client.call_detail_records.retrieve(Time.utc(2019, 2, 1)..Time.utc(2019, 2, 2))
# returns lazy Enumerator with the records
Number Order
Verification
# check Tenios documentation for verification options
verification_id = client.verification.create(options)['verification_id']
Order
order_id = client.number.order(verification_id: verification_id)['order_id']
Cancel
client.number.cancel(phone_number: '+49888888')
Record Call
Start
recording_uuid = client.record_call.start(
call_uuid: '9315b018-86bd-424f-a086-7095ce427130'
)['recording_uuid']
Stop
client.record_call.stop(
call_uuid: '9315b018-86bd-424f-a086-7095ce427130',
recording_uuid: recording_uuid
)
Transfer Call
Transfer
client.transfer_call(
call_uuid: '9315b018-86bd-424f-a086-7095ce427130',
destination: '+441234567890'
)
Contributing
Bug reports and pull requests are welcome on GitHub at https://github.com/carwow/tenios-api-ruby.
License
The gem is available as open source under the terms of the MIT License.