Sha256: 404edd6c1a437a8d1bc497ec6668ad4dec95c4bdb6f33f814df7d133f9255535

Contents?: true

Size: 1.11 KB

Versions: 2

Compression:

Stored size: 1.11 KB

Contents

.. module:: restcomm.rest.resources

=================
Caller Ids
=================


Validate a Phone Number
-----------------------

Validating a phone number is quick and easy.

.. code-block:: ruby

    require 'restcomm-ruby'

    # To find these visit https://www.restcomm.com/user/account
    account_sid = "ACXXXXXXXXXXXXXXXXX"
    auth_token = "YYYYYYYYYYYYYYYYYY"

    @client = Restcomm::REST::Client.new account_sid, auth_token
    @response = @client.outgoing_caller_ids.create(
      phone_number: "+44 9876543212"
    )
    puts @response.validation_code

Restcomm will call the provided number and wait for the validation code to be
entered.

Delete a Phone Number
---------------------

Deleting a phone number is quick and easy.

.. code-block:: ruby

    require 'restcomm-ruby'

    # To find these visit https://www.restcomm.com/user/account
    account_sid = "ACXXXXXXXXXXXXXXXXX"
    auth_token = "YYYYYYYYYYYYYYYYYY"

    @client = Restcomm::REST::Client.new account_sid, auth_token

    @response = @client.outgoing_caller_ids.list(phone_number: "+15555555555")
    @callerid = response[0]
    @callerid.delete()

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
restcomm-ruby-1.2.1 docs/usage/caller-ids.rst
restcomm-ruby-1.2.0 docs/usage/caller-ids.rst