java.lang.Object
com.ringcentral.paths.restapi.v2.accounts.phonenumbers.Index

public class Index extends Object
  • Field Details

  • Constructor Details

    • Index

      public Index(Index parent, String phoneNumberId)
  • Method Details

    • path

      public String path(Boolean withParameter)
    • path

      public String path()
    • get

      Returns the list of phone numbers assigned to RingCentral customer account. Both company-level and extension-level numbers are returned. Conferencing numbers, hot desk and ELIN numbers are not returned.

      HTTP Method: get Endpoint: /restapi/v2/accounts/{accountId}/phone-numbers Rate Limit Group: Heavy App Permission: ReadAccounts User Permission: ReadCompanyPhoneNumbers

      Throws:
      RestException
      IOException
    • get

      Throws:
      RestException
      IOException
    • delete

      public DeletePhoneNumbersResponse delete(DeletePhoneNumbersRequest deletePhoneNumbersRequest) throws RestException, IOException
      This method can only delete numbers that meet one of the following requirements: - numbers that have `"usageType": "Inventory"` - `"Forwarded"` numbers - `"Forwarded Company"` numbers

      In other words, this method will not delete numbers which are in use on the account - extension direct numbers, main number, etc. It is possible to indicate phone numbers to be deleted using their IDs or exact string values in e.164 format. However, the same lookup method (by ID or by value) must be used for all numbers within the same API call.

      HTTP Method: delete Endpoint: /restapi/v2/accounts/{accountId}/phone-numbers Rate Limit Group: Medium App Permission: EditAccounts User Permission: EditCompanyPhoneNumbers

      Throws:
      RestException
      IOException
    • patch

      public AccountPhoneNumberInfo patch(AssignPhoneNumberRequest assignPhoneNumberRequest) throws RestException, IOException
      Assigns or reassigns a phone number as a company or extension number.

      Assign scenarios supported: - from Inventory to a company number; - from Inventory to an extension number.

      Reassign scenarios supported: - from an extension to another extension; - from an extension to a company number; - from a company number to an extension.

      HTTP Method: patch Endpoint: /restapi/v2/accounts/{accountId}/phone-numbers/{phoneNumberId} Rate Limit Group: Medium App Permission: EditAccounts User Permission: EditCompanyPhoneNumbers

      Throws:
      RestException
      IOException
    • replace

      public Index replace()
    • bulkAdd

      public Index bulkAdd()
    • bulkAdd

      public Index bulkAdd(String taskId)