Interface ActiveNumberService
- All Known Subinterfaces:
NumbersService
-
Method Summary
Modifier and TypeMethodDescriptionvoiddeprovisionEmergencyAddress(String phoneNumber) Remove the emergency address for a number.Retrieve an active phone numbergetEmergencyAddress(String phoneNumber) Get the emergency address for a numberlist()Lists active numbers for a project (using default parameters)list(ActiveNumbersListQueryParameters queryParameter) Lists active numbers for a projectprovisionEmergencyAddress(String phoneNumber, EmergencyAddressRequest emergencyAddressRequest) Add a emergency address for a numberRelease an active number from the projectupdate(String phoneNumber, ActiveNumberUpdateRequest activeNumberUpdateRequest) Update an active phone numbervalidateEmergencyAddress(String phoneNumber, EmergencyAddressRequest emergencyAddressRequest) Validate the emergency address for a number.
-
Method Details
-
list
Lists active numbers for a project (using default parameters)Lists all active numbers for a project.
- Returns:
- ActiveNumbersListResponse
- Throws:
ApiException- if fails to make API call
-
list
Lists active numbers for a projectLists all active numbers for a project.
- Parameters:
queryParameter- (optional)- Returns:
- ActiveNumbersListResponse
- Throws:
ApiException- if fails to make API call
-
deprovisionEmergencyAddress
Remove the emergency address for a number.With this endpoint, you can deprovision the emergency address associated with this number.
- Parameters:
phoneNumber- Output only. The phone number in [E.164](https://community.sinch.com/t5/Glossary/E-164/ta-p/7537) format with leading `+`. (required)- Throws:
ApiException- if fails to make API call
-
get
Retrieve an active phone numberRetrieve a specific active phone number.
- Parameters:
phoneNumber- Output only. The phone number in [E.164](https://community.sinch.com/t5/Glossary/E-164/ta-p/7537) format with leading `+`. (required)- Returns:
- ActiveNumber
- Throws:
ApiException- if fails to make API call
-
getEmergencyAddress
Get the emergency address for a numberWith this endpoint, you can retrieve the emergency address associated with this number.
- Parameters:
phoneNumber- Output only. The phone number in [E.164](https://community.sinch.com/t5/Glossary/E-164/ta-p/7537) format with leading `+`. (required)- Returns:
- EmergencyAddress
- Throws:
ApiException- if fails to make API call
-
provisionEmergencyAddress
EmergencyAddress provisionEmergencyAddress(String phoneNumber, EmergencyAddressRequest emergencyAddressRequest) throws ApiException Add a emergency address for a numberWith this endpoint, you can provision an emergency address associated with this number.
- Parameters:
phoneNumber- Output only. The phone number in [E.164](https://community.sinch.com/t5/Glossary/E-164/ta-p/7537) format with leading `+`. (required)emergencyAddressRequest- Request to provision an emergency address for a number. (optional)- Returns:
- EmergencyAddress
- Throws:
ApiException- if fails to make API call
-
release
Release an active number from the projectWith this endpoint, you can cancel your subscription for a specific phone number.
- Parameters:
phoneNumber- Output only. The phone number in [E.164](https://community.sinch.com/t5/Glossary/E-164/ta-p/7537) format with leading `+`. (required)- Returns:
- ActiveNumber
- Throws:
ApiException- if fails to make API call
-
update
ActiveNumber update(String phoneNumber, ActiveNumberUpdateRequest activeNumberUpdateRequest) throws ApiException Update an active phone numberUpdate an active phone number. You can perform the following updates: * Update the name that displays for a customer by modifying the `displayName` parameter. * Unlink the number from an SMS service or campaign by updating the `smsConfiguration` configuration object. To unlink a number, submit the request with an empty string (`””`) in the service plan ID or campaign ID fields. * Before linking a number to a new service or campaign, it must be unlinked from any existing service or campaign. Then, link the number to a new SMS service or campaign by updating the service plan ID or campaign ID with the new desired value. * Update the Voice app to which the number is assigned by using the voiceConfiguration object. You can update both SMS and Voice in the same object by including both configuration objects. If you only need to update either Voice or SMS, simply omit the other object. If you pass an empty configuration object, the request will fail.
- Parameters:
phoneNumber- Output only. The phone number in [E.164](https://community.sinch.com/t5/Glossary/E-164/ta-p/7537) format with leading `+`. (required)activeNumberUpdateRequest- The number body to be updated. (optional)- Returns:
- ActiveNumber
- Throws:
ApiException- if fails to make API call
-
validateEmergencyAddress
ValidateAddressResponse validateEmergencyAddress(String phoneNumber, EmergencyAddressRequest emergencyAddressRequest) throws ApiException Validate the emergency address for a number.With this endpoint, you can validate the emergency address associated with this number.
- Parameters:
phoneNumber- Output only. The phone number in [E.164](https://community.sinch.com/t5/Glossary/E-164/ta-p/7537) format with leading `+`. (required)emergencyAddressRequest- Request to validate an emergency address for a number. (optional)- Returns:
- ValidateAddressResponse
- Throws:
ApiException- if fails to make API call
-