PhoneNumberClient Class
- java.
lang. Object - com.
azure. communication. administration. PhoneNumberClient
- com.
public final class PhoneNumberClient
Synchronous client for Communication service phone number operations
Method Summary
Methods inherited from java.lang.Object
Method Details
beginCreateReservation
public SyncPoller<PhoneNumberReservation,PhoneNumberReservation> beginCreateReservation(CreateReservationOptions options, Duration pollInterval)
Initiates a reservation and returns a PhoneNumberReservation usable by other functions This function returns a Long Running Operation poller.
Parameters:
Returns:
beginPurchaseReservation
public SyncPoller<Void,Void> beginPurchaseReservation(String reservationId, Duration pollInterval)
Initiates a purchase process and polls until a terminal state is reached This function returns a Long Running Operation poller
Parameters:
Returns:
beginReleasePhoneNumbers
public SyncPoller<PhoneNumberRelease,PhoneNumberRelease> beginReleasePhoneNumbers(List<PhoneNumber> phoneNumbers, Duration pollInterval)
Releases the given phone numbers. This function returns a Long Running Operation poller
Parameters:
Returns:
cancelReservation
public void cancelReservation(String reservationId)
Cancels the reservation. This means existing numbers in the reservation will be made available.
Parameters:
cancelReservationWithResponse
public Response<Void> cancelReservationWithResponse(String reservationId, Context context)
Cancels the reservation. This means existing numbers in the reservation will be made available.
Parameters:
Returns:
configureNumber
public void configureNumber(PhoneNumber phoneNumber, PstnConfiguration pstnConfiguration)
Associates a phone number with a PSTN Configuration.
Parameters:
configureNumberWithResponse
public Response<Void> configureNumberWithResponse(PhoneNumber phoneNumber, PstnConfiguration pstnConfiguration, Context context)
Associates a phone number with a PSTN Configuration.
Parameters:
Returns:
getAllAreaCodes
public AreaCodes getAllAreaCodes(String locationType, String countryCode, String phonePlanId, List<LocationOptionsQuery> locationOptions)
Gets a list of the supported area codes.
Parameters:
Returns:
getAllAreaCodesWithResponse
public Response<AreaCodes> getAllAreaCodesWithResponse(String locationType, String countryCode, String phonePlanId, List<LocationOptionsQuery> locationOptions, Context context)
Gets a list of the supported area codes.
Parameters:
Returns:
getCapabilitiesUpdate
public UpdatePhoneNumberCapabilitiesResponse getCapabilitiesUpdate(String capabilitiesId)
Gets the information for a phone number capabilities update
Parameters:
Returns:
getCapabilitiesUpdateWithResponse
public Response<UpdatePhoneNumberCapabilitiesResponse> getCapabilitiesUpdateWithResponse(String capabilitiesId, Context context)
Gets the information for a phone number capabilities update
Parameters:
Returns:
getNumberConfiguration
public NumberConfigurationResponse getNumberConfiguration(PhoneNumber phoneNumber)
Gets the configuration of a given phone number.
Parameters:
Returns:
getNumberConfigurationWithResponse
public Response<NumberConfigurationResponse> getNumberConfigurationWithResponse(PhoneNumber phoneNumber, Context context)
Gets the configuration of a given phone number.
Parameters:
Returns:
getPhonePlanLocationOptions
public LocationOptionsResponse getPhonePlanLocationOptions(String countryCode, String phonePlanGroupId, String phonePlanId, String locale)
Gets the location options for a phone plan.
Parameters:
Returns:
getPhonePlanLocationOptionsWithResponse
public Response<LocationOptionsResponse> getPhonePlanLocationOptionsWithResponse(String countryCode, String phonePlanGroupId, String phonePlanId, String locale, Context context)
Gets the location options for a phone plan.
Parameters:
Returns:
getReleaseById
public PhoneNumberRelease getReleaseById(String releaseId)
Gets a release by ID.
Parameters:
Returns:
getReleaseByIdWithResponse
public Response<PhoneNumberRelease> getReleaseByIdWithResponse(String releaseId, Context context)
Gets a release by ID.
Parameters:
Returns:
getReservationById
public PhoneNumberReservation getReservationById(String reservationId)
Gets a reservation by ID.
Parameters:
Returns:
getReservationByIdWithResponse
public Response<PhoneNumberReservation> getReservationByIdWithResponse(String reservationId, Context context)
Gets a reservation by ID.
Parameters:
Returns:
listAllPhoneNumbers
public PagedIterable<AcquiredPhoneNumber> listAllPhoneNumbers(String locale)
Gets the list of the acquired phone numbers.
Parameters:
Returns:
listAllPhoneNumbers
public PagedIterable<AcquiredPhoneNumber> listAllPhoneNumbers(String locale, Context context)
Gets the list of the acquired phone numbers.
Parameters:
Returns:
listAllReleases
public PagedIterable<PhoneNumberEntity> listAllReleases()
Gets the list of all releases
Returns:
listAllReleases
public PagedIterable<PhoneNumberEntity> listAllReleases(Context context)
Gets the list of all releases
Parameters:
Returns:
listAllReservations
public PagedIterable<PhoneNumberEntity> listAllReservations()
Gets the list of all reservations
Returns:
listAllReservations
public PagedIterable<PhoneNumberEntity> listAllReservations(Context context)
Gets the list of all reservationes
Parameters:
Returns:
listAllSupportedCountries
public PagedIterable<PhoneNumberCountry> listAllSupportedCountries(String locale)
Gets a list of supported countries.
Parameters:
Returns:
listAllSupportedCountries
public PagedIterable<PhoneNumberCountry> listAllSupportedCountries(String locale, Context context)
Gets a list of supported countries.
Parameters:
Returns:
listPhonePlanGroups
public PagedIterable<PhonePlanGroup> listPhonePlanGroups(String countryCode, String locale, Boolean includeRateInformation)
Gets a list of phone plan groups for the given country.
Parameters:
Returns:
listPhonePlanGroups
public PagedIterable<PhonePlanGroup> listPhonePlanGroups(String countryCode, String locale, Boolean includeRateInformation, Context context)
Gets a list of phone plan groups for the given country.
Parameters:
Returns:
listPhonePlans
public PagedIterable<PhonePlan> listPhonePlans(String countryCode, String phonePlanGroupId, String locale)
Gets a list of phone plans for a phone plan group
Parameters:
Returns:
listPhonePlans
public PagedIterable<PhonePlan> listPhonePlans(String countryCode, String phonePlanGroupId, String locale, Context context)
Gets a list of phone plans for a phone plan group
Parameters:
Returns:
unconfigureNumber
public void unconfigureNumber(PhoneNumber phoneNumber)
Removes the PSTN Configuration from a phone number.
Parameters:
unconfigureNumberWithResponse
public Response<Void> unconfigureNumberWithResponse(PhoneNumber phoneNumber, Context context)
Removes the PSTN Configuration from a phone number.
Parameters:
Returns:
updateCapabilities
public UpdateNumberCapabilitiesResponse updateCapabilities(Map<PhoneNumber,NumberUpdateCapabilities> phoneNumberCapabilitiesUpdate)
Adds or removes phone number capabilities.
Parameters:
Returns:
updateCapabilitiesWithResponse
public Response<UpdateNumberCapabilitiesResponse> updateCapabilitiesWithResponse(Map<PhoneNumber,NumberUpdateCapabilities> phoneNumberCapabilitiesUpdate, Context context)
Adds or removes phone number capabilities.
Parameters:
Returns: