SwaggerClient - the Ruby gem for the Phone.com API
This is a Phone.com api Swagger definition
This SDK is automatically generated by the Swagger Codegen project:
- API version: 1.0.0
- Package version: 1.0.0
- Build package: io.swagger.codegen.languages.RubyClientCodegen
To build the Ruby code into a gem:
gem build swagger_client.gemspecThen either install the gem locally:
gem install ./swagger_client-1.0.0.gem(for development, run gem install --dev ./swagger_client-1.0.0.gem to install the development dependencies)
or publish the gem to a gem hosting service, e.g. RubyGems.
Finally add this to the Gemfile:
gem 'swagger_client', '~> 1.0.0'
If the Ruby gem is hosted at a git repository: https://github.com/GIT_USER_ID/GIT_REPO_ID, then add the following in the Gemfile:
gem 'swagger_client', :git => 'https://github.com/GIT_USER_ID/GIT_REPO_ID.git'
Include the Ruby code directly using -I as follows:
ruby -Ilib script.rbPlease follow the installation procedure and then run the following code:
# Load the gem
require 'swagger_client'
# Setup authorization
SwaggerClient.configure do |config|
# Configure API key authorization: apiKey
config.api_key['Authorization'] = 'YOUR API KEY'
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
#config.api_key_prefix['Authorization'] = 'Bearer'
end
api_instance = SwaggerClient::AccountsApi.new
account_id = 56 # Integer | Account ID
begin
#Retrieve details of an individual account
result = api_instance.get_account(account_id, )
p result
rescue SwaggerClient::ApiError => e
puts "Exception when calling AccountsApi->get_account: #{e}"
endAll URIs are relative to https://api.phone.com/v4
| Class | Method | HTTP request | Description |
|---|---|---|---|
| SwaggerClient::AccountsApi | get_account | GET /accounts/{account_id} | Retrieve details of an individual account |
| SwaggerClient::AccountsApi | list_accounts | GET /accounts | Get a list of accounts visible to the authenticated user or client. |
| SwaggerClient::ApplicationsApi | get_account_application | GET /accounts/{account_id}/applications/{application_id} | Show details of an individual Application on a given account. |
| SwaggerClient::ApplicationsApi | list_account_applications | GET /accounts/{account_id}/applications | This service lists the Applications on a given account |
| SwaggerClient::AvailablenumbersApi | list_available_phone_numbers | GET /phone-numbers/available | |
| SwaggerClient::CalleridsApi | get_caller_ids | GET /accounts/{account_id}/extensions/{extension_id}/caller-ids | Show the Caller ID options a given extension can use. |
| SwaggerClient::CalllogsApi | get_account_call_logs | GET /accounts/{account_id}/call-logs/{call_id} | Show details of an individual Call Log entry |
| SwaggerClient::CalllogsApi | list_account_call_logs | GET /accounts/{account_id}/call-logs | Get a list of call details associated with your account |
| SwaggerClient::CallsApi | create_account_call | POST /accounts/{account_id}/calls | Make a phone call |
| SwaggerClient::ContactsApi | create_account_extension_contact | POST /accounts/{account_id}/extensions/{extension_id}/contacts | Add a new address book contact for an extension. |
| SwaggerClient::ContactsApi | delete_account_extension_contact | DELETE /accounts/{account_id}/extensions/{extension_id}/contacts/{contact_id} | Delete a contact from the address book. |
| SwaggerClient::ContactsApi | get_account_extension_contact | GET /accounts/{account_id}/extensions/{extension_id}/contacts/{contact_id} | Retrieve the details of an address book contact. |
| SwaggerClient::ContactsApi | list_account_extension_contacts | GET /accounts/{account_id}/extensions/{extension_id}/contacts | Show the Caller ID options a given extension can use. |
| SwaggerClient::ContactsApi | replace_account_extension_contact | PUT /accounts/{account_id}/extensions/{extension_id}/contacts/{contact_id} | Update the info of a contact in the address book. |
| SwaggerClient::DefaultApi | ping | GET /ping | The default API command |
| SwaggerClient::DevicesApi | create_account_device | POST /accounts/{account_id}/devices | Register a generic VoIP device. |
| SwaggerClient::DevicesApi | delete_account_device | DELETE /accounts/{account_id}/devices/{device_id} | Delete a VoIP device. |
| SwaggerClient::DevicesApi | get_account_device | GET /accounts/{account_id}/devices/{device_id} | Show details of an individual VoIP device. |
| SwaggerClient::DevicesApi | list_account_devices | GET /accounts/{account_id}/devices | Get a list of VoIP devices associated with your account. |
| SwaggerClient::DevicesApi | replace_account_device | PUT /accounts/{account_id}/devices/{device_id} | Update the details of an individual VoIP device. |
| SwaggerClient::ExpressservicecodesApi | get_account_express_srv_code | GET /accounts/{account_id}/express-service-codes/{code_id} | Show details of an account Express Service Code |
| SwaggerClient::ExpressservicecodesApi | list_account_express_srv_codes | GET /accounts/{account_id}/express-service-codes | Get the Express Service Code associated with your account in list format. |
| SwaggerClient::ExtensionsApi | create_account_extension | POST /accounts/{account_id}/extensions | Create an individual extension. |
| SwaggerClient::ExtensionsApi | get_account_extension | GET /accounts/{account_id}/extensions/{extension_id} | Show details of an individual extension. |
| SwaggerClient::ExtensionsApi | list_account_extensions | GET /accounts/{account_id}/extensions | Get a list of extensions visible to the authenticated user or client. |
| SwaggerClient::ExtensionsApi | replace_account_extension | PUT /accounts/{account_id}/extensions/{extension_id} | Replace an individual extension. |
| SwaggerClient::GroupsApi | create_account_extension_contact_group | POST /accounts/{account_id}/extensions/{extension_id}/contact-groups | Add a new contact group to an account extension. |
| SwaggerClient::GroupsApi | delete_account_extension_contact_group | DELETE /accounts/{account_id}/extensions/{extension_id}/contact-groups/{group_id} | Delete a contact group from the address book. |
| SwaggerClient::GroupsApi | get_account_extension_contact_group | GET /accounts/{account_id}/extensions/{extension_id}/contact-groups/{group_id} | Retrieve the information of a contact group. |
| SwaggerClient::GroupsApi | list_account_extension_contact_groups | GET /accounts/{account_id}/extensions/{extension_id}/contact-groups | Show a list of contact groups belonging to an extension. |
| SwaggerClient::GroupsApi | replace_account_extension_contact_group | PUT /accounts/{account_id}/extensions/{extension_id}/contact-groups/{group_id} | Update the information of a contact group. |
| SwaggerClient::ListenersApi | create_account_listener | POST /accounts/{account_id}/listeners | Add a listener object to your account that can be used to subscribe an event. |
| SwaggerClient::ListenersApi | delete_account_listener | DELETE /accounts/{account_id}/listeners/{listener_id} | Delete an individual event listener. |
| SwaggerClient::ListenersApi | get_account_listener | GET /accounts/{account_id}/listeners/{listener_id} | Show details of an individual listener. |
| SwaggerClient::ListenersApi | list_account_listeners | GET /accounts/{account_id}/listeners | Get a list of listeners for an account. |
| SwaggerClient::ListenersApi | replace_account_listener | PUT /accounts/{account_id}/listeners/{listener_id} | Update the settings of an individual event listener. |
| SwaggerClient::MediaApi | create_account_media_files | POST /accounts/{account_id}/media/files | Add a media object to your account that can be used as a greeting or hold music. Users may create a media by using the built-in Text-to-speech (TTS) facility or upload a file of their choice. (Note: The maximum size for media files or JSON objects included with a POST or PUT request is 10 MB) |
| SwaggerClient::MediaApi | create_account_media_tts | POST /accounts/{account_id}/media/tts | Add a media object to your account that can be used as a greeting or hold music. Users may create a media by using the built-in Text-to-speech (TTS) facility or upload a file of their choice. (Note: The maximum size for media files or JSON objects included with a POST or PUT request is 10 MB) |
| SwaggerClient::MediaApi | delete_account_media | DELETE /accounts/{account_id}/media/{media_id} | Delete an individual media record |
| SwaggerClient::MediaApi | get_account_media | GET /accounts/{account_id}/media/{media_id} | Show details of an individual media recording (Greeting or Hold Music) |
| SwaggerClient::MediaApi | list_account_media | GET /accounts/{account_id}/media | Get a list of media recordings for an account. |
| SwaggerClient::MediaApi | replace_account_media_files | PUT /accounts/{account_id}/media/files/{media_id} | Update a media object to your account. Note: The maximum size for media files or JSON objects included with a POST or PUT request is 10 MB. |
| SwaggerClient::MediaApi | replace_account_media_tts | PUT /accounts/{account_id}/media/tts/{media_id} | Update a media object to your account. |
| SwaggerClient::MenusApi | create_account_menu | POST /accounts/{account_id}/menus | Create an individual menu. |
| SwaggerClient::MenusApi | delete_account_menu | DELETE /accounts/{account_id}/menus/{menu_id} | Delete an individual menu. |
| SwaggerClient::MenusApi | get_account_menu | GET /accounts/{account_id}/menus/{menu_id} | Show details of an individual menu. |
| SwaggerClient::MenusApi | list_account_menus | GET /accounts/{account_id}/menus | Get a list of menus for an account. |
| SwaggerClient::MenusApi | replace_account_menu | PUT /accounts/{account_id}/menus/{menu_id} | Replace an individual menu. |
| SwaggerClient::NumberregionsApi | list_available_phone_number_regions | GET /phone-numbers/available/regions | |
| SwaggerClient::OauthApi | create_oauth_access_token | POST /oauth/access-token | To create an access token via the /oauth/access-token API, an API user may choose any one of the grant types it supports: Authorization Code Grant, Client Credential Grant, Password Credential Grant or Refresh Token Grant. |
| SwaggerClient::OauthApi | create_oauth_authorization | GET /oauth/authorization | Create Authorization Code or Access Token. |
| SwaggerClient::OauthApi | get_oauth_access_token | GET /oauth/access-token | Retrieve details of an access token, such as scope, expiration and extension ID. |
| SwaggerClient::OauthclientsApi | delete_account_oauth_client | DELETE /accounts/{account_id}/oauth/clients/{client_id} | Delete an individual OAuth client. |
| SwaggerClient::OauthclientsApi | get_account_oauth_client | GET /accounts/{account_id}/oauth/clients/{client_id} | Show details of an individual OAuth client. |
| SwaggerClient::OauthclientsApi | list_account_oauth_clients | GET /accounts/{account_id}/oauth/clients | Get a list of OAuth clients for an account. |
| SwaggerClient::OauthclientsredirecturisApi | create_account_oauth_clients_redirect_uri | POST /accounts/{account_id}/oauth/clients/{client_id}/redirect-uris | Create an OAuth Client Redirect URI record. |
| SwaggerClient::OauthclientsredirecturisApi | delete_account_oauth_clients_redirect_uri | DELETE /accounts/{account_id}/oauth/clients/{client_id}/redirect-uris/{uri_id} | Delete an OAuth Client Redirect URI record. |
| SwaggerClient::OauthclientsredirecturisApi | get_account_oauth_clients_redirect_uri | GET /accounts/{account_id}/oauth/clients/{client_id}/redirect-uris/{uri_id} | Get details of an OAuth Client Redirect URI record. |
| SwaggerClient::OauthclientsredirecturisApi | list_account_oauth_clients_redirect_uris | GET /accounts/{account_id}/oauth/clients/{client_id}/redirect-uris | Get a list of OAuth Client Redirect URIs for an account. |
| SwaggerClient::PaymentmethodsApi | create_account_payment_method | POST /accounts/{account_id}/payment-methods | Create an individual payment method. |
| SwaggerClient::PaymentmethodsApi | delete_account_payment_method | DELETE /accounts/{account_id}/payment-methods/{pm_id} | Delete an individual payment method. |
| SwaggerClient::PaymentmethodsApi | get_account_payment_method | GET /accounts/{account_id}/payment-methods/{pm_id} | Show details of an individual payment method. |
| SwaggerClient::PaymentmethodsApi | list_account_payment_methods | GET /accounts/{account_id}/payment-methods | Get a list of payment methods for an account. |
| SwaggerClient::PaymentmethodsApi | patch_account_payment_method | PATCH /accounts/{account_id}/payment-methods/{pm_id} | Replace the status of an individual payment method. |
| SwaggerClient::PhonenumbersApi | create_account_phone_number | POST /accounts/{account_id}/phone-numbers | Add a phone number to an account. |
| SwaggerClient::PhonenumbersApi | get_account_phone_number | GET /accounts/{account_id}/phone-numbers/{number_id} | Show details of an individual phone number. |
| SwaggerClient::PhonenumbersApi | list_account_phone_numbers | GET /accounts/{account_id}/phone-numbers | Get a list of phone numbers registered to an account. |
| SwaggerClient::PhonenumbersApi | replace_account_phone_number | PUT /accounts/{account_id}/phone-numbers/{number_id} | Update the settings for an existing phone number on your account. |
| SwaggerClient::QueuesApi | create_account_queue | POST /accounts/{account_id}/queues | Create a queue. |
| SwaggerClient::QueuesApi | delete_account_queue | DELETE /accounts/{account_id}/queues/{queue_id} | Delete a queue. |
| SwaggerClient::QueuesApi | get_account_queue | GET /accounts/{account_id}/queues/{queue_id} | Show details of an individual queue. |
| SwaggerClient::QueuesApi | list_account_queues | GET /accounts/{account_id}/queues | Get a list of queues for an account. |
| SwaggerClient::QueuesApi | replace_account_queue | PUT /accounts/{account_id}/queues/{queue_id} | Replace a queue. |
| SwaggerClient::RoutesApi | create_route | POST /accounts/{account_id}/routes | Add a new route to the account. |
| SwaggerClient::RoutesApi | delete_account_route | DELETE /accounts/{account_id}/routes/{route_id} | Delete a route from the account. |
| SwaggerClient::RoutesApi | get_account_route | GET /accounts/{account_id}/routes/{route_id} | Show details of an individual route. |
| SwaggerClient::RoutesApi | list_account_routes | GET /accounts/{account_id}/routes | Get a list of routes for an account. |
| SwaggerClient::RoutesApi | replace_account_route | PUT /accounts/{account_id}/routes/{route_id} | Update the information of a route. |
| SwaggerClient::SchedulesApi | get_account_schedule | GET /accounts/{account_id}/schedules/{schedule_id} | Show details of an individual schedule |
| SwaggerClient::SchedulesApi | list_account_schedules | GET /accounts/{account_id}/schedules | Get a list of schedules for an account |
| SwaggerClient::SmsApi | create_account_sms | POST /accounts/{account_id}/sms | Send a SMS to one or a group of recipients. |
| SwaggerClient::SmsApi | get_account_sms | GET /accounts/{account_id}/sms/{sms_id} | This service shows the details of an individual SMS. |
| SwaggerClient::SmsApi | list_account_sms | GET /accounts/{account_id}/sms | Get a list of SMS messages for an account. |
| SwaggerClient::SmsApi | patch_account_sms | PATCH /accounts/{account_id}/sms/{sms_id} | Update the is_new parameter in a sms record. |
| SwaggerClient::SubaccountpricingApi | create_account_subaccount_pricing | POST /accounts/{account_id}/subaccounts/{subaccount_id}/pricing | Add a pricing plan to a subaccount. |
| SwaggerClient::SubaccountpricingApi | delete_account_subaccount_pricing | DELETE /accounts/{account_id}/subaccounts/{subaccount_id}/pricing/{pricing_id} | Delete a pricing plan from a subaccount. |
| SwaggerClient::SubaccountpricingApi | get_account_subaccount_pricing | GET /accounts/{account_id}/subaccounts/{subaccount_id}/pricing/{pricing_id} | Get the details of a pricing plan for a subaccount. |
| SwaggerClient::SubaccountpricingApi | list_account_subaccount_pricing | GET /accounts/{account_id}/subaccounts/{subaccount_id}/pricing | Get a list of pricing plans for a subaccount. |
| SwaggerClient::SubaccountsApi | create_account_subaccount | POST /accounts/{account_id}/subaccounts | Add a subaccount for the authenticated user or client |
| SwaggerClient::SubaccountsApi | list_account_subaccounts | GET /accounts/{account_id}/subaccounts | Get a list of subaccounts for the authenticated user or client |
| SwaggerClient::TrunksApi | create_account_trunk | POST /accounts/{account_id}/trunks | Add a trunk record with SIP information. |
| SwaggerClient::TrunksApi | delete_account_trunk | DELETE /accounts/{account_id}/trunks/{trunk_id} | Delete a trunk from account. |
| SwaggerClient::TrunksApi | get_account_trunk | GET /accounts/{account_id}/trunks/{trunk_id} | Show details of an individual trunk. |
| SwaggerClient::TrunksApi | list_account_trunks | GET /accounts/{account_id}/trunks | Get a list of trunks for an account. |
| SwaggerClient::TrunksApi | replace_account_trunk | PUT /accounts/{account_id}/trunks/{trunk_id} | Replace parameters in a trunk. |
| SwaggerClient::VoicemailApi | get_account_voicemail | GET /accounts/{account_id}/voicemail/{voicemail_id} | This service shows the details of an individual voicemail. |
| SwaggerClient::VoicemailApi | list_account_voicemail | GET /accounts/{account_id}/voicemail | Get a list of voicemail messages for an account. |
| SwaggerClient::VoicemailApi | patch_account_voicemail | PATCH /accounts/{account_id}/voicemail/{voicemail_id} | Update the is_new parameter in a voicemail record. |
- SwaggerClient::AccountFull
- SwaggerClient::AccountSummary
- SwaggerClient::Address
- SwaggerClient::AddressListContacts
- SwaggerClient::ApplicationFull
- SwaggerClient::ApplicationSummary
- SwaggerClient::AvailableNumbersFull
- SwaggerClient::CallDetails
- SwaggerClient::CallFull
- SwaggerClient::CallLogFull
- SwaggerClient::CallNotifications
- SwaggerClient::CallbackObject
- SwaggerClient::CallerIdFull
- SwaggerClient::CallerIdPhoneNumber
- SwaggerClient::ContactAccount
- SwaggerClient::ContactFull
- SwaggerClient::ContactResponse
- SwaggerClient::ContactSummary
- SwaggerClient::CreateCallParams
- SwaggerClient::CreateContactParams
- SwaggerClient::CreateDeviceParams
- SwaggerClient::CreateExtensionParams
- SwaggerClient::CreateGroupParams
- SwaggerClient::CreateListenerParams
- SwaggerClient::CreateMediaParams
- SwaggerClient::CreateMenuParams
- SwaggerClient::CreateOauthParams
- SwaggerClient::CreatePaymentParams
- SwaggerClient::CreatePhoneNumberParams
- SwaggerClient::CreatePricingParams
- SwaggerClient::CreateQueueParams
- SwaggerClient::CreateRedirectUriParams
- SwaggerClient::CreateRouteParams
- SwaggerClient::CreateSmsParams
- SwaggerClient::CreateSubaccountParams
- SwaggerClient::CreateTrunkParams
- SwaggerClient::DeleteEntry
- SwaggerClient::DeviceFull
- SwaggerClient::DeviceMembership
- SwaggerClient::DeviceSummary
- SwaggerClient::Email
- SwaggerClient::ExpressServiceCodeFull
- SwaggerClient::ExtensionFull
- SwaggerClient::ExtensionSummary
- SwaggerClient::FilterCallLogs
- SwaggerClient::FilterIdArray
- SwaggerClient::FilterIdDirectionFrom
- SwaggerClient::FilterIdExtensionNameArray
- SwaggerClient::FilterIdGroupIdUpdatedAtArray
- SwaggerClient::FilterIdNameArray
- SwaggerClient::FilterIdNamePhoneNumberArray
- SwaggerClient::FilterListAvailableNumbers
- SwaggerClient::FilterListPhoneNumbersRegions
- SwaggerClient::FilterNameNumberArray
- SwaggerClient::FilterVoicemailArray
- SwaggerClient::FromObject
- SwaggerClient::GetOauthAccessToken
- SwaggerClient::Greeting
- SwaggerClient::GreetingInput
- SwaggerClient::GroupFull
- SwaggerClient::GroupListContacts
- SwaggerClient::GroupSummary
- SwaggerClient::HoldMusic
- SwaggerClient::Line
- SwaggerClient::ListAccounts
- SwaggerClient::ListApplications
- SwaggerClient::ListAvailableNumbers
- SwaggerClient::ListCallLogs
- SwaggerClient::ListCallerIds
- SwaggerClient::ListContacts
- SwaggerClient::ListDevices
- SwaggerClient::ListExpressServiceCodes
- SwaggerClient::ListExtensions
- SwaggerClient::ListGroups
- SwaggerClient::ListListeners
- SwaggerClient::ListMedia
- SwaggerClient::ListMenus
- SwaggerClient::ListOauthClients
- SwaggerClient::ListOauthClientsRedirectUris
- SwaggerClient::ListPaymentMethods
- SwaggerClient::ListPhoneNumbers
- SwaggerClient::ListPhoneNumbersRegions
- SwaggerClient::ListPricings
- SwaggerClient::ListQueues
- SwaggerClient::ListRoutes
- SwaggerClient::ListSchedules
- SwaggerClient::ListSms
- SwaggerClient::ListTrunks
- SwaggerClient::ListVoicemail
- SwaggerClient::ListenerFull
- SwaggerClient::MediaFull
- SwaggerClient::MediaSummary
- SwaggerClient::Member
- SwaggerClient::MenuFull
- SwaggerClient::MenuSummary
- SwaggerClient::Notification
- SwaggerClient::OauthAccessToken
- SwaggerClient::OauthClientFull
- SwaggerClient::OauthClientRedirectUriFull
- SwaggerClient::Option
- SwaggerClient::PatchPaymentParams
- SwaggerClient::PatchSmsParams
- SwaggerClient::PatchVoicemailParams
- SwaggerClient::PaymentFull
- SwaggerClient::PaymentSummary
- SwaggerClient::PhoneNumberContact
- SwaggerClient::PhoneNumberFull
- SwaggerClient::PhoneNumbersRegionFull
- SwaggerClient::PingResponse
- SwaggerClient::PricingFull
- SwaggerClient::PricingObject
- SwaggerClient::QueueFull
- SwaggerClient::QueueSummary
- SwaggerClient::Recipient
- SwaggerClient::RedirectUriFull
- SwaggerClient::ReplaceExtensionParams
- SwaggerClient::ReplaceMenuParams
- SwaggerClient::ReplacePhoneNumberParams
- SwaggerClient::RouteFull
- SwaggerClient::RouteSummary
- SwaggerClient::RuleSet
- SwaggerClient::RuleSetAction
- SwaggerClient::RuleSetFilter
- SwaggerClient::RuleSetForwardItem
- SwaggerClient::ScheduleFull
- SwaggerClient::ScheduleSummary
- SwaggerClient::ScopeDetails
- SwaggerClient::SipAuthentication
- SwaggerClient::SmsForwarding
- SwaggerClient::SmsForwardingParams
- SwaggerClient::SmsFull
- SwaggerClient::SortCallLogs
- SwaggerClient::SortId
- SwaggerClient::SortIdCreatedAt
- SwaggerClient::SortIdExtensionName
- SwaggerClient::SortIdName
- SwaggerClient::SortIdNamePhoneNumber
- SwaggerClient::SortIdUpdatedAt
- SwaggerClient::SortListAvailableNumbers
- SwaggerClient::SortListPhoneNumbersRegions
- SwaggerClient::SortNameNumber
- SwaggerClient::TrunkFull
- SwaggerClient::TrunkSummary
- SwaggerClient::Voicemail
- SwaggerClient::VoicemailFull
- SwaggerClient::VoicemailInput
- Type: API key
- API key parameter name: Authorization
- Location: HTTP header