Skip to content

phonedotcom/API-SDK-csharp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

IO.Swagger - the C# library for the Phone.com API

This is a Phone.com api Swagger definition

This C# SDK is automatically generated by the Swagger Codegen project:

  • API version: 1.0.0
  • SDK version: 1.0.0
  • Build package: io.swagger.codegen.languages.CSharpClientCodegen

Frameworks supported

  • .NET 4.0 or later
  • Windows Phone 7.1 (Mango)

Dependencies

The DLLs included in the package may not be the latest version. We recommend using [NuGet] (https://docs.nuget.org/consume/installing-nuget) to obtain the latest version of the packages:

Install-Package RestSharp
Install-Package Newtonsoft.Json

NOTE: RestSharp versions greater than 105.1.0 have a bug which causes file uploads to fail. See RestSharp#742

Installation

Run the following command to generate the DLL

  • [Mac/Linux] /bin/sh build.sh
  • [Windows] build.bat

Then include the DLL (under the bin folder) in the C# project, and use the namespaces:

using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

Packaging

A .nuspec is included with the project. You can follow the Nuget quickstart to create and publish packages.

This .nuspec uses placeholders from the .csproj, so build the .csproj directly:

nuget pack -Build -OutputDirectory out IO.Swagger.csproj

Then, publish to a local feed or other host and consume the new package via Nuget as usual.

Getting Started

using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class Example
    {
        public void main()
        {

            // Configure API key authorization: apiKey
            Configuration.Default.ApiKey.Add("Authorization", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("Authorization", "Bearer");

            var apiInstance = new AccountsApi();
            var accountId = 56;  // int? | Account ID

            try
            {
                // Retrieve details of an individual account
                AccountFull result = apiInstance.GetAccount(accountId);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling AccountsApi.GetAccount: " + e.Message );
            }

        }
    }
}

Documentation for API Endpoints

All URIs are relative to https://api.phone.com/v4

Class Method HTTP request Description
AccountsApi GetAccount GET /accounts/{account_id} Retrieve details of an individual account
AccountsApi ListAccounts GET /accounts Get a list of accounts visible to the authenticated user or client.
ApplicationsApi GetAccountApplication GET /accounts/{account_id}/applications/{application_id} Show details of an individual Application on a given account.
ApplicationsApi ListAccountApplications GET /accounts/{account_id}/applications This service lists the Applications on a given account
AvailablenumbersApi ListAvailablePhoneNumbers GET /phone-numbers/available
CalleridsApi GetCallerIds GET /accounts/{account_id}/extensions/{extension_id}/caller-ids Show the Caller ID options a given extension can use.
CalllogsApi GetAccountCallLogs GET /accounts/{account_id}/call-logs/{call_id} Show details of an individual Call Log entry
CalllogsApi ListAccountCallLogs GET /accounts/{account_id}/call-logs Get a list of call details associated with your account
CallsApi CreateAccountCall POST /accounts/{account_id}/calls Make a phone call
ContactsApi CreateAccountExtensionContact POST /accounts/{account_id}/extensions/{extension_id}/contacts Add a new address book contact for an extension.
ContactsApi DeleteAccountExtensionContact DELETE /accounts/{account_id}/extensions/{extension_id}/contacts/{contact_id} Delete a contact from the address book.
ContactsApi GetAccountExtensionContact GET /accounts/{account_id}/extensions/{extension_id}/contacts/{contact_id} Retrieve the details of an address book contact.
ContactsApi ListAccountExtensionContacts GET /accounts/{account_id}/extensions/{extension_id}/contacts Show the Caller ID options a given extension can use.
ContactsApi ReplaceAccountExtensionContact PUT /accounts/{account_id}/extensions/{extension_id}/contacts/{contact_id} Update the info of a contact in the address book.
DefaultApi Ping GET /ping The default API command
DevicesApi CreateAccountDevice POST /accounts/{account_id}/devices Register a generic VoIP device.
DevicesApi DeleteAccountDevice DELETE /accounts/{account_id}/devices/{device_id} Delete a VoIP device.
DevicesApi GetAccountDevice GET /accounts/{account_id}/devices/{device_id} Show details of an individual VoIP device.
DevicesApi ListAccountDevices GET /accounts/{account_id}/devices Get a list of VoIP devices associated with your account.
DevicesApi ReplaceAccountDevice PUT /accounts/{account_id}/devices/{device_id} Update the details of an individual VoIP device.
ExpressservicecodesApi GetAccountExpressSrvCode GET /accounts/{account_id}/express-service-codes/{code_id} Show details of an account Express Service Code
ExpressservicecodesApi ListAccountExpressSrvCodes GET /accounts/{account_id}/express-service-codes Get the Express Service Code associated with your account in list format.
ExtensionsApi CreateAccountExtension POST /accounts/{account_id}/extensions Create an individual extension.
ExtensionsApi GetAccountExtension GET /accounts/{account_id}/extensions/{extension_id} Show details of an individual extension.
ExtensionsApi ListAccountExtensions GET /accounts/{account_id}/extensions Get a list of extensions visible to the authenticated user or client.
ExtensionsApi ReplaceAccountExtension PUT /accounts/{account_id}/extensions/{extension_id} Replace an individual extension.
GroupsApi CreateAccountExtensionContactGroup POST /accounts/{account_id}/extensions/{extension_id}/contact-groups Add a new contact group to an account extension.
GroupsApi DeleteAccountExtensionContactGroup DELETE /accounts/{account_id}/extensions/{extension_id}/contact-groups/{group_id} Delete a contact group from the address book.
GroupsApi GetAccountExtensionContactGroup GET /accounts/{account_id}/extensions/{extension_id}/contact-groups/{group_id} Retrieve the information of a contact group.
GroupsApi ListAccountExtensionContactGroups GET /accounts/{account_id}/extensions/{extension_id}/contact-groups Show a list of contact groups belonging to an extension.
GroupsApi ReplaceAccountExtensionContactGroup PUT /accounts/{account_id}/extensions/{extension_id}/contact-groups/{group_id} Update the information of a contact group.
ListenersApi CreateAccountListener POST /accounts/{account_id}/listeners Add a listener object to your account that can be used to subscribe an event.
ListenersApi DeleteAccountListener DELETE /accounts/{account_id}/listeners/{listener_id} Delete an individual event listener.
ListenersApi GetAccountListener GET /accounts/{account_id}/listeners/{listener_id} Show details of an individual listener.
ListenersApi ListAccountListeners GET /accounts/{account_id}/listeners Get a list of listeners for an account.
ListenersApi ReplaceAccountListener PUT /accounts/{account_id}/listeners/{listener_id} Update the settings of an individual event listener.
MediaApi CreateAccountMediaFiles 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)
MediaApi CreateAccountMediaTts 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)
MediaApi DeleteAccountMedia DELETE /accounts/{account_id}/media/{media_id} Delete an individual media record
MediaApi GetAccountMedia GET /accounts/{account_id}/media/{media_id} Show details of an individual media recording (Greeting or Hold Music)
MediaApi ListAccountMedia GET /accounts/{account_id}/media Get a list of media recordings for an account.
MediaApi ReplaceAccountMediaFiles 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.
MediaApi ReplaceAccountMediaTts PUT /accounts/{account_id}/media/tts/{media_id} Update a media object to your account.
MenusApi CreateAccountMenu POST /accounts/{account_id}/menus Create an individual menu.
MenusApi DeleteAccountMenu DELETE /accounts/{account_id}/menus/{menu_id} Delete an individual menu.
MenusApi GetAccountMenu GET /accounts/{account_id}/menus/{menu_id} Show details of an individual menu.
MenusApi ListAccountMenus GET /accounts/{account_id}/menus Get a list of menus for an account.
MenusApi ReplaceAccountMenu PUT /accounts/{account_id}/menus/{menu_id} Replace an individual menu.
NumberregionsApi ListAvailablePhoneNumberRegions GET /phone-numbers/available/regions
OauthApi CreateOauthAccessToken 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.
OauthApi CreateOauthAuthorization GET /oauth/authorization Create Authorization Code or Access Token.
OauthApi GetOauthAccessToken GET /oauth/access-token Retrieve details of an access token, such as scope, expiration and extension ID.
OauthclientsApi DeleteAccountOauthClient DELETE /accounts/{account_id}/oauth/clients/{client_id} Delete an individual OAuth client.
OauthclientsApi GetAccountOauthClient GET /accounts/{account_id}/oauth/clients/{client_id} Show details of an individual OAuth client.
OauthclientsApi ListAccountOauthClients GET /accounts/{account_id}/oauth/clients Get a list of OAuth clients for an account.
OauthclientsredirecturisApi CreateAccountOauthClientsRedirectUri POST /accounts/{account_id}/oauth/clients/{client_id}/redirect-uris Create an OAuth Client Redirect URI record.
OauthclientsredirecturisApi DeleteAccountOauthClientsRedirectUri DELETE /accounts/{account_id}/oauth/clients/{client_id}/redirect-uris/{uri_id} Delete an OAuth Client Redirect URI record.
OauthclientsredirecturisApi GetAccountOauthClientsRedirectUri GET /accounts/{account_id}/oauth/clients/{client_id}/redirect-uris/{uri_id} Get details of an OAuth Client Redirect URI record.
OauthclientsredirecturisApi ListAccountOauthClientsRedirectUris GET /accounts/{account_id}/oauth/clients/{client_id}/redirect-uris Get a list of OAuth Client Redirect URIs for an account.
PaymentmethodsApi CreateAccountPaymentMethod POST /accounts/{account_id}/payment-methods Create an individual payment method.
PaymentmethodsApi DeleteAccountPaymentMethod DELETE /accounts/{account_id}/payment-methods/{pm_id} Delete an individual payment method.
PaymentmethodsApi GetAccountPaymentMethod GET /accounts/{account_id}/payment-methods/{pm_id} Show details of an individual payment method.
PaymentmethodsApi ListAccountPaymentMethods GET /accounts/{account_id}/payment-methods Get a list of payment methods for an account.
PaymentmethodsApi PatchAccountPaymentMethod PATCH /accounts/{account_id}/payment-methods/{pm_id} Replace the status of an individual payment method.
PhonenumbersApi CreateAccountPhoneNumber POST /accounts/{account_id}/phone-numbers Add a phone number to an account.
PhonenumbersApi GetAccountPhoneNumber GET /accounts/{account_id}/phone-numbers/{number_id} Show details of an individual phone number.
PhonenumbersApi ListAccountPhoneNumbers GET /accounts/{account_id}/phone-numbers Get a list of phone numbers registered to an account.
PhonenumbersApi ReplaceAccountPhoneNumber PUT /accounts/{account_id}/phone-numbers/{number_id} Update the settings for an existing phone number on your account.
QueuesApi CreateAccountQueue POST /accounts/{account_id}/queues Create a queue.
QueuesApi DeleteAccountQueue DELETE /accounts/{account_id}/queues/{queue_id} Delete a queue.
QueuesApi GetAccountQueue GET /accounts/{account_id}/queues/{queue_id} Show details of an individual queue.
QueuesApi ListAccountQueues GET /accounts/{account_id}/queues Get a list of queues for an account.
QueuesApi ReplaceAccountQueue PUT /accounts/{account_id}/queues/{queue_id} Replace a queue.
RoutesApi CreateRoute POST /accounts/{account_id}/routes Add a new route to the account.
RoutesApi DeleteAccountRoute DELETE /accounts/{account_id}/routes/{route_id} Delete a route from the account.
RoutesApi GetAccountRoute GET /accounts/{account_id}/routes/{route_id} Show details of an individual route.
RoutesApi ListAccountRoutes GET /accounts/{account_id}/routes Get a list of routes for an account.
RoutesApi ReplaceAccountRoute PUT /accounts/{account_id}/routes/{route_id} Update the information of a route.
SchedulesApi GetAccountSchedule GET /accounts/{account_id}/schedules/{schedule_id} Show details of an individual schedule
SchedulesApi ListAccountSchedules GET /accounts/{account_id}/schedules Get a list of schedules for an account
SmsApi CreateAccountSms POST /accounts/{account_id}/sms Send a SMS to one or a group of recipients.
SmsApi GetAccountSms GET /accounts/{account_id}/sms/{sms_id} This service shows the details of an individual SMS.
SmsApi ListAccountSms GET /accounts/{account_id}/sms Get a list of SMS messages for an account.
SmsApi PatchAccountSms PATCH /accounts/{account_id}/sms/{sms_id} Update the is_new parameter in a sms record.
SubaccountpricingApi CreateAccountSubaccountPricing POST /accounts/{account_id}/subaccounts/{subaccount_id}/pricing Add a pricing plan to a subaccount.
SubaccountpricingApi DeleteAccountSubaccountPricing DELETE /accounts/{account_id}/subaccounts/{subaccount_id}/pricing/{pricing_id} Delete a pricing plan from a subaccount.
SubaccountpricingApi GetAccountSubaccountPricing GET /accounts/{account_id}/subaccounts/{subaccount_id}/pricing/{pricing_id} Get the details of a pricing plan for a subaccount.
SubaccountpricingApi ListAccountSubaccountPricing GET /accounts/{account_id}/subaccounts/{subaccount_id}/pricing Get a list of pricing plans for a subaccount.
SubaccountsApi CreateAccountSubaccount POST /accounts/{account_id}/subaccounts Add a subaccount for the authenticated user or client
SubaccountsApi ListAccountSubaccounts GET /accounts/{account_id}/subaccounts Get a list of subaccounts for the authenticated user or client
TrunksApi CreateAccountTrunk POST /accounts/{account_id}/trunks Add a trunk record with SIP information.
TrunksApi DeleteAccountTrunk DELETE /accounts/{account_id}/trunks/{trunk_id} Delete a trunk from account.
TrunksApi GetAccountTrunk GET /accounts/{account_id}/trunks/{trunk_id} Show details of an individual trunk.
TrunksApi ListAccountTrunks GET /accounts/{account_id}/trunks Get a list of trunks for an account.
TrunksApi ReplaceAccountTrunk PUT /accounts/{account_id}/trunks/{trunk_id} Replace parameters in a trunk.
VoicemailApi GetAccountVoicemail GET /accounts/{account_id}/voicemail/{voicemail_id} This service shows the details of an individual voicemail.
VoicemailApi ListAccountVoicemail GET /accounts/{account_id}/voicemail Get a list of voicemail messages for an account.
VoicemailApi PatchAccountVoicemail PATCH /accounts/{account_id}/voicemail/{voicemail_id} Update the is_new parameter in a voicemail record.

Documentation for Models

Documentation for Authorization

apiKey

  • Type: API key
  • API key parameter name: Authorization
  • Location: HTTP header

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages