From bdead65fc8187c4aa9c446c7fd599010390959ea Mon Sep 17 00:00:00 2001 From: minnieliu Date: Fri, 12 Mar 2021 16:28:04 -0800 Subject: [PATCH] [ COmmunication] - Phone Numbers - Address Api View Comments (#19822) * Phone Numbers Address Api View Comments * Update changelog and code coverage requirements * Address review comments * Address comments Co-authored-by: Minnie Liu --- .../CHANGELOG.md | 8 + .../azure-communication-phonenumbers/pom.xml | 4 +- .../phonenumbers/PhoneNumbersAsyncClient.java | 16 + .../phonenumbers/PhoneNumbersClient.java | 84 ++- .../models/PhoneNumberSearchOptions.java | 2 +- .../models/PurchasedPhoneNumber.java | 109 +-- ...honeNumbersAsyncClientIntegrationTest.java | 32 +- .../PhoneNumbersClientIntegrationTest.java | 82 ++- ...eandReleasePhoneNumbersWithoutContext.json | 627 ++++++++++++++++++ ...chAvailablePhoneNumbersWithoutContext.json | 130 ++++ ...chAvailablePhoneNumbersWithoutOptions.json | 130 ++++ ...PhoneNumberCapabilitiesWithoutContext.json | 247 +++++++ ...stPurchasedPhoneNumbersWithoutContext.json | 23 + .../swagger/README.md | 3 +- 14 files changed, 1370 insertions(+), 127 deletions(-) create mode 100644 sdk/communication/azure-communication-phonenumbers/src/test/resources/session-records/beginPurchaseandReleasePhoneNumbersWithoutContext.json create mode 100644 sdk/communication/azure-communication-phonenumbers/src/test/resources/session-records/beginSearchAvailablePhoneNumbersWithoutContext.json create mode 100644 sdk/communication/azure-communication-phonenumbers/src/test/resources/session-records/beginSearchAvailablePhoneNumbersWithoutOptions.json create mode 100644 sdk/communication/azure-communication-phonenumbers/src/test/resources/session-records/beginUpdatePhoneNumberCapabilitiesWithoutContext.json create mode 100644 sdk/communication/azure-communication-phonenumbers/src/test/resources/session-records/listPurchasedPhoneNumbersWithoutContext.json diff --git a/sdk/communication/azure-communication-phonenumbers/CHANGELOG.md b/sdk/communication/azure-communication-phonenumbers/CHANGELOG.md index c53fd89982c28..09dbad3bcedae 100644 --- a/sdk/communication/azure-communication-phonenumbers/CHANGELOG.md +++ b/sdk/communication/azure-communication-phonenumbers/CHANGELOG.md @@ -1,6 +1,14 @@ # Release History ## 1.0.0-beta.7 (Unreleased) +### Added +- Added `PollerFlux beginSearchAvailablePhoneNumbers(String countryCode, PhoneNumberType phoneNumberType, PhoneNumberAssignmentType assignmentType, PhoneNumberCapabilities capabilities)` in PhoneNumbersAsyncClient. +- Added `PagedIterable listPurchasedPhoneNumbers()` in PhoneNumbersClient. +- Added `SyncPoller beginSearchAvailablePhoneNumbers(String countryCode, PhoneNumberType phoneNumberType, PhoneNumberAssignmentType assignmentType, PhoneNumberCapabilities capabilities)` in PhoneNumbersClient. +- Added `SyncPoller beginPurchasePhoneNumbers(String searchId)` in PhoneNumbersClient. +- Added `SyncPoller beginReleasePhoneNumber(String phoneNumber)` in PhoneNumbersClient. +- Added `SyncPoller beginUpdatePhoneNumberCapabilities(String phoneNumber, PhoneNumberCapabilitiesRequest capabilitiesUpdateRequest)` in PhoneNumbersClient. + ### Breaking Changes - Renamed AcquiredPhoneNumber to PurchasedPhoneNumber. - Renamed PhoneNumbersAsyncClient.getPhoneNumber and PhoneNumbersClient.getPhoneNumber to PhoneNumbersAsyncClient.getPurchasedPhoneNumber and PhoneNumbersClient.getPurchasedPhoneNumber. diff --git a/sdk/communication/azure-communication-phonenumbers/pom.xml b/sdk/communication/azure-communication-phonenumbers/pom.xml index ae41d754762c6..be14710a9c0fe 100644 --- a/sdk/communication/azure-communication-phonenumbers/pom.xml +++ b/sdk/communication/azure-communication-phonenumbers/pom.xml @@ -49,8 +49,8 @@ src/main src/test - 0.40 - 0.50 + 0.64 + 0.68 diff --git a/sdk/communication/azure-communication-phonenumbers/src/main/java/com/azure/communication/phonenumbers/PhoneNumbersAsyncClient.java b/sdk/communication/azure-communication-phonenumbers/src/main/java/com/azure/communication/phonenumbers/PhoneNumbersAsyncClient.java index 6377ed99244ad..8bc5b43dfdb71 100644 --- a/sdk/communication/azure-communication-phonenumbers/src/main/java/com/azure/communication/phonenumbers/PhoneNumbersAsyncClient.java +++ b/sdk/communication/azure-communication-phonenumbers/src/main/java/com/azure/communication/phonenumbers/PhoneNumbersAsyncClient.java @@ -98,6 +98,22 @@ public PagedFlux listPurchasedPhoneNumbers() { } } + /** + * Starts the search for available phone numbers to purchase. + * + * @param countryCode The ISO 3166-2 country code. + * @param phoneNumberType {@link PhoneNumberType} The phone number type. + * @param assignmentType {@link PhoneNumberAssignmentType} The phone number assignment type. + * @param capabilities {@link PhoneNumberCapabilities} The phone number capabilities. + * @return A {@link PollerFlux} object with the reservation result. + * @throws NullPointerException if {@code countryCode} or {@code searchRequest} is null. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public PollerFlux beginSearchAvailablePhoneNumbers( + String countryCode, PhoneNumberType phoneNumberType, PhoneNumberAssignmentType assignmentType, PhoneNumberCapabilities capabilities) { + return beginSearchAvailablePhoneNumbers(countryCode, phoneNumberType, assignmentType, capabilities, null, null); + } + /** * Starts the search for available phone numbers to purchase. * diff --git a/sdk/communication/azure-communication-phonenumbers/src/main/java/com/azure/communication/phonenumbers/PhoneNumbersClient.java b/sdk/communication/azure-communication-phonenumbers/src/main/java/com/azure/communication/phonenumbers/PhoneNumbersClient.java index 7543253a4ef64..26959e6e1018c 100644 --- a/sdk/communication/azure-communication-phonenumbers/src/main/java/com/azure/communication/phonenumbers/PhoneNumbersClient.java +++ b/sdk/communication/azure-communication-phonenumbers/src/main/java/com/azure/communication/phonenumbers/PhoneNumbersClient.java @@ -66,6 +66,16 @@ public Response getPurchasedPhoneNumberWithResponse(String return client.getByNumberWithResponseAsync(phoneNumber, context).block(); } + /** + * Gets the list of the purchased phone numbers. + * + * @return A {@link PagedIterable} of {@link PurchasedPhoneNumber} instances representing purchased telephone numbers. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listPurchasedPhoneNumbers() { + return this.listPurchasedPhoneNumbers(null); + } + /** * Gets the list of the purchased phone numbers with context. * @@ -78,6 +88,25 @@ public PagedIterable listPurchasedPhoneNumbers(Context con return client.listPhoneNumbers(null, null, context); } + /** + * Starts the search for available phone numbers to purchase. + * + * This function returns a Long Running Operation poller that allows you to wait indefinitely until the + * operation is complete. + * + * @param countryCode The ISO 3166-2 country code. + * @param phoneNumberType {@link PhoneNumberType} The phone number type. + * @param assignmentType {@link PhoneNumberAssignmentType} The phone number assignment type. + * @param capabilities {@link PhoneNumberCapabilities} The phone number capabilities. + * @return A {@link SyncPoller} object with the reservation result. + * @throws NullPointerException if {@code countryCode} or {@code searchRequest} is null. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public SyncPoller beginSearchAvailablePhoneNumbers( + String countryCode, PhoneNumberType phoneNumberType, PhoneNumberAssignmentType assignmentType, PhoneNumberCapabilities capabilities) { + return asyncClient.beginSearchAvailablePhoneNumbers(countryCode, phoneNumberType, assignmentType, capabilities).getSyncPoller(); + } + /** * Starts the search for available phone numbers to purchase. * @@ -100,6 +129,21 @@ public SyncPoller beginSearchAvai return asyncClient.beginSearchAvailablePhoneNumbers(countryCode, phoneNumberType, assignmentType, capabilities, searchOptions, context).getSyncPoller(); } + /** + * Starts the purchase of the phone number(s) in the search result associated with a given id. + * + * This function returns a Long Running Operation poller that allows you to wait indefinitely until the + * operation is complete. + * + * @param searchId ID of the search + * @return A {@link SyncPoller} object with Void. + * @throws NullPointerException if {@code searchId} is null. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public SyncPoller beginPurchasePhoneNumbers(String searchId) { + return asyncClient.beginPurchasePhoneNumbers(searchId).getSyncPoller(); + } + /** * Starts the purchase of the phone number(s) in the search result associated with a given id. * @@ -108,7 +152,7 @@ public SyncPoller beginSearchAvai * * @param searchId ID of the search * @param context A {@link Context} representing the request context. - * @return A {@link SyncPoller} object. + * @return A {@link SyncPoller} object with Void. * @throws NullPointerException if {@code searchId} is null. */ @ServiceMethod(returns = ReturnType.SINGLE) @@ -116,6 +160,22 @@ public SyncPoller beginPurchasePhoneNumbers(String s return asyncClient.beginPurchasePhoneNumbers(searchId, context).getSyncPoller(); } + /** + * Starts the update of capabilities for a purchased phone number. + * + * This function returns a Long Running Operation poller that allows you to wait indefinitely until the + * operation is complete. + * + * @param phoneNumber The phone number id in E.164 format. The leading plus can be either + or encoded + * as %2B. + * @return A {@link SyncPoller} object with Void. + * @throws NullPointerException if {@code phoneNumber} is null. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public SyncPoller beginReleasePhoneNumber(String phoneNumber) { + return asyncClient.beginReleasePhoneNumber(phoneNumber).getSyncPoller(); + } + /** * Starts the update of capabilities for a purchased phone number. * @@ -126,12 +186,28 @@ public SyncPoller beginPurchasePhoneNumbers(String s * @param phoneNumber The phone number id in E.164 format. The leading plus can be either + or encoded * as %2B. * @param context A {@link Context} representing the request context. - * @return A {@link SyncPoller} object. + * @return A {@link SyncPoller} object with Void. * @throws NullPointerException if {@code phoneNumber} is null. */ @ServiceMethod(returns = ReturnType.SINGLE) public SyncPoller beginReleasePhoneNumber(String phoneNumber, Context context) { - return asyncClient.beginReleasePhoneNumber(phoneNumber).getSyncPoller(); + return asyncClient.beginReleasePhoneNumber(phoneNumber, context).getSyncPoller(); + } + + /** + * Update capabilities of a purchased phone number. + * + * This function returns a Long Running Operation poller that allows you to wait indefinitely until the + * operation is complete. + * @param phoneNumber The phone number id in E.164 format. The leading plus can be either + or encoded + * as %2B. + * @param capabilitiesUpdateRequest Update capabilities of a purchased phone number. + * @return A {@link SyncPoller} object with purchased phone number. + * @throws NullPointerException if {@code phoneNumber} or {@code capabilitiesUpdateRequest} is null. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public SyncPoller beginUpdatePhoneNumberCapabilities(String phoneNumber, PhoneNumberCapabilitiesRequest capabilitiesUpdateRequest) { + return asyncClient.beginUpdatePhoneNumberCapabilities(phoneNumber, capabilitiesUpdateRequest).getSyncPoller(); } /** @@ -143,7 +219,7 @@ public SyncPoller beginReleasePhoneNumber(String pho * as %2B. * @param capabilitiesUpdateRequest Update capabilities of a purchased phone number. * @param context A {@link Context} representing the request context. - * @return A {@link SyncPoller} object + * @return A {@link SyncPoller} object with purchased phone number. * @throws NullPointerException if {@code phoneNumber} or {@code capabilitiesUpdateRequest} is null. */ @ServiceMethod(returns = ReturnType.SINGLE) diff --git a/sdk/communication/azure-communication-phonenumbers/src/main/java/com/azure/communication/phonenumbers/models/PhoneNumberSearchOptions.java b/sdk/communication/azure-communication-phonenumbers/src/main/java/com/azure/communication/phonenumbers/models/PhoneNumberSearchOptions.java index 0dcc5896fcba8..cd8f4710e2c69 100644 --- a/sdk/communication/azure-communication-phonenumbers/src/main/java/com/azure/communication/phonenumbers/models/PhoneNumberSearchOptions.java +++ b/sdk/communication/azure-communication-phonenumbers/src/main/java/com/azure/communication/phonenumbers/models/PhoneNumberSearchOptions.java @@ -6,7 +6,7 @@ /** The PhoneNumberSearchOptions model. */ @Fluent -public class PhoneNumberSearchOptions { +public final class PhoneNumberSearchOptions { private String areaCode; private Integer quantity; diff --git a/sdk/communication/azure-communication-phonenumbers/src/main/java/com/azure/communication/phonenumbers/models/PurchasedPhoneNumber.java b/sdk/communication/azure-communication-phonenumbers/src/main/java/com/azure/communication/phonenumbers/models/PurchasedPhoneNumber.java index 6c112c74a0f4c..1788165c5a594 100644 --- a/sdk/communication/azure-communication-phonenumbers/src/main/java/com/azure/communication/phonenumbers/models/PurchasedPhoneNumber.java +++ b/sdk/communication/azure-communication-phonenumbers/src/main/java/com/azure/communication/phonenumbers/models/PurchasedPhoneNumber.java @@ -4,60 +4,60 @@ package com.azure.communication.phonenumbers.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.fasterxml.jackson.annotation.JsonProperty; import java.time.OffsetDateTime; /** The PurchasedPhoneNumber model. */ -@Fluent +@Immutable public final class PurchasedPhoneNumber { /* * The id of the phone number, e.g. 11234567890. */ - @JsonProperty(value = "id", required = true) + @JsonProperty(value = "id", required = true, access = JsonProperty.Access.WRITE_ONLY) private String id; /* * String of the E.164 format of the phone number, e.g. +11234567890. */ - @JsonProperty(value = "phoneNumber", required = true) + @JsonProperty(value = "phoneNumber", required = true, access = JsonProperty.Access.WRITE_ONLY) private String phoneNumber; /* * The ISO 3166-2 code of the phone number's country, e.g. US. */ - @JsonProperty(value = "countryCode", required = true) + @JsonProperty(value = "countryCode", required = true, access = JsonProperty.Access.WRITE_ONLY) private String countryCode; /* * The phone number's type, e.g. Geographic, TollFree. */ - @JsonProperty(value = "phoneNumberType", required = true) + @JsonProperty(value = "phoneNumberType", required = true, access = JsonProperty.Access.WRITE_ONLY) private PhoneNumberType phoneNumberType; /* * Capabilities of a phone number. */ - @JsonProperty(value = "capabilities", required = true) + @JsonProperty(value = "capabilities", required = true, access = JsonProperty.Access.WRITE_ONLY) private PhoneNumberCapabilities capabilities; /* * The assignment type of the phone number. A phone number can be assigned * to a person, or to an application. */ - @JsonProperty(value = "assignmentType", required = true) + @JsonProperty(value = "assignmentType", required = true, access = JsonProperty.Access.WRITE_ONLY) private PhoneNumberAssignmentType assignmentType; /* * The date and time that the phone number was purchased. */ - @JsonProperty(value = "purchaseDate", required = true) + @JsonProperty(value = "purchaseDate", required = true, access = JsonProperty.Access.WRITE_ONLY) private OffsetDateTime purchaseDate; /* * The incurred cost for a single phone number. */ - @JsonProperty(value = "cost", required = true) + @JsonProperty(value = "cost", required = true, access = JsonProperty.Access.WRITE_ONLY) private PhoneNumberCost cost; /** @@ -69,17 +69,6 @@ public String getId() { return this.id; } - /** - * Set the id property: The id of the phone number, e.g. 11234567890. - * - * @param id the id value to set. - * @return the PurchasedPhoneNumber object itself. - */ - public PurchasedPhoneNumber setId(String id) { - this.id = id; - return this; - } - /** * Get the phoneNumber property: String of the E.164 format of the phone number, e.g. +11234567890. * @@ -89,17 +78,6 @@ public String getPhoneNumber() { return this.phoneNumber; } - /** - * Set the phoneNumber property: String of the E.164 format of the phone number, e.g. +11234567890. - * - * @param phoneNumber the phoneNumber value to set. - * @return the PurchasedPhoneNumber object itself. - */ - public PurchasedPhoneNumber setPhoneNumber(String phoneNumber) { - this.phoneNumber = phoneNumber; - return this; - } - /** * Get the countryCode property: The ISO 3166-2 code of the phone number's country, e.g. US. * @@ -109,17 +87,6 @@ public String getCountryCode() { return this.countryCode; } - /** - * Set the countryCode property: The ISO 3166-2 code of the phone number's country, e.g. US. - * - * @param countryCode the countryCode value to set. - * @return the PurchasedPhoneNumber object itself. - */ - public PurchasedPhoneNumber setCountryCode(String countryCode) { - this.countryCode = countryCode; - return this; - } - /** * Get the phoneNumberType property: The phone number's type, e.g. Geographic, TollFree. * @@ -129,17 +96,6 @@ public PhoneNumberType getPhoneNumberType() { return this.phoneNumberType; } - /** - * Set the phoneNumberType property: The phone number's type, e.g. Geographic, TollFree. - * - * @param phoneNumberType the phoneNumberType value to set. - * @return the PurchasedPhoneNumber object itself. - */ - public PurchasedPhoneNumber setPhoneNumberType(PhoneNumberType phoneNumberType) { - this.phoneNumberType = phoneNumberType; - return this; - } - /** * Get the capabilities property: Capabilities of a phone number. * @@ -149,17 +105,6 @@ public PhoneNumberCapabilities getCapabilities() { return this.capabilities; } - /** - * Set the capabilities property: Capabilities of a phone number. - * - * @param capabilities the capabilities value to set. - * @return the PurchasedPhoneNumber object itself. - */ - public PurchasedPhoneNumber setCapabilities(PhoneNumberCapabilities capabilities) { - this.capabilities = capabilities; - return this; - } - /** * Get the assignmentType property: The assignment type of the phone number. A phone number can be assigned to a * person, or to an application. @@ -170,18 +115,6 @@ public PhoneNumberAssignmentType getAssignmentType() { return this.assignmentType; } - /** - * Set the assignmentType property: The assignment type of the phone number. A phone number can be assigned to a - * person, or to an application. - * - * @param assignmentType the assignmentType value to set. - * @return the PurchasedPhoneNumber object itself. - */ - public PurchasedPhoneNumber setAssignmentType(PhoneNumberAssignmentType assignmentType) { - this.assignmentType = assignmentType; - return this; - } - /** * Get the purchaseDate property: The date and time that the phone number was purchased. * @@ -191,17 +124,6 @@ public OffsetDateTime getPurchaseDate() { return this.purchaseDate; } - /** - * Set the purchaseDate property: The date and time that the phone number was purchased. - * - * @param purchaseDate the purchaseDate value to set. - * @return the PurchasedPhoneNumber object itself. - */ - public PurchasedPhoneNumber setPurchaseDate(OffsetDateTime purchaseDate) { - this.purchaseDate = purchaseDate; - return this; - } - /** * Get the cost property: The incurred cost for a single phone number. * @@ -210,15 +132,4 @@ public PurchasedPhoneNumber setPurchaseDate(OffsetDateTime purchaseDate) { public PhoneNumberCost getCost() { return this.cost; } - - /** - * Set the cost property: The incurred cost for a single phone number. - * - * @param cost the cost value to set. - * @return the PurchasedPhoneNumber object itself. - */ - public PurchasedPhoneNumber setCost(PhoneNumberCost cost) { - this.cost = cost; - return this; - } } diff --git a/sdk/communication/azure-communication-phonenumbers/src/test/java/com/azure/communication/phonenumbers/PhoneNumbersAsyncClientIntegrationTest.java b/sdk/communication/azure-communication-phonenumbers/src/test/java/com/azure/communication/phonenumbers/PhoneNumbersAsyncClientIntegrationTest.java index 790209edd2197..84fe3a9d301f3 100644 --- a/sdk/communication/azure-communication-phonenumbers/src/test/java/com/azure/communication/phonenumbers/PhoneNumbersAsyncClientIntegrationTest.java +++ b/sdk/communication/azure-communication-phonenumbers/src/test/java/com/azure/communication/phonenumbers/PhoneNumbersAsyncClientIntegrationTest.java @@ -89,7 +89,22 @@ public void listPurchasedPhoneNumbers(HttpClient httpClient) { @MethodSource("com.azure.core.test.TestBase#getHttpClients") public void beginSearchAvailablePhoneNumbers(HttpClient httpClient) { StepVerifier.create( - beginSearchAvailablePhoneNumbersHelper(httpClient, "beginSearchAvailablePhoneNumbers").last() + beginSearchAvailablePhoneNumbersHelper(httpClient, "beginSearchAvailablePhoneNumbers", true).last() + .flatMap((AsyncPollResponse result) -> { + return result.getFinalResult(); + }) + ).assertNext((PhoneNumberSearchResult searchResult) -> { + assertEquals(searchResult.getPhoneNumbers().size(), 1); + assertNotNull(searchResult.getSearchId()); + }) + .verifyComplete(); + } + + @ParameterizedTest + @MethodSource("com.azure.core.test.TestBase#getHttpClients") + public void beginSearchAvailablePhoneNumbersWithoutOptions(HttpClient httpClient) { + StepVerifier.create( + beginSearchAvailablePhoneNumbersHelper(httpClient, "beginSearchAvailablePhoneNumbersWithoutOptions", false).last() .flatMap((AsyncPollResponse result) -> { return result.getFinalResult(); }) @@ -107,7 +122,7 @@ public void beginSearchAvailablePhoneNumbers(HttpClient httpClient) { matches = "(?i)(true)") public void beginPurchaseandReleasePhoneNumbers(HttpClient httpClient) { StepVerifier.create( - beginSearchAvailablePhoneNumbersHelper(httpClient, "beginSearchAvailablePhoneNumbers").last() + beginSearchAvailablePhoneNumbersHelper(httpClient, "beginSearchAvailablePhoneNumbers", true).last() .flatMap((AsyncPollResponse result) -> { return result.getFinalResult() .flatMap((PhoneNumberSearchResult searchResult) -> { @@ -181,13 +196,14 @@ public void beginUpdatePhoneNumberCapabilitiesNullPhoneNumber(HttpClient httpCli .verifyError(); } - private PollerFlux beginSearchAvailablePhoneNumbersHelper(HttpClient httpClient, String testName) { + private PollerFlux beginSearchAvailablePhoneNumbersHelper(HttpClient httpClient, String testName, boolean withOptions) { PhoneNumberCapabilities capabilities = new PhoneNumberCapabilities(); capabilities.setCalling(PhoneNumberCapabilityType.INBOUND); capabilities.setSms(PhoneNumberCapabilityType.INBOUND_OUTBOUND); PhoneNumberSearchOptions searchOptions = new PhoneNumberSearchOptions().setAreaCode(AREA_CODE).setQuantity(1); - return setPollInterval(this.getClientWithConnectionString(httpClient, testName) + if (withOptions) { + return setPollInterval(this.getClientWithConnectionString(httpClient, testName) .beginSearchAvailablePhoneNumbers( COUNTRY_CODE, PhoneNumberType.TOLL_FREE, @@ -195,6 +211,14 @@ private PollerFlux beginSearchAva capabilities, searchOptions )); + } + return setPollInterval(this.getClientWithConnectionString(httpClient, testName) + .beginSearchAvailablePhoneNumbers( + COUNTRY_CODE, + PhoneNumberType.TOLL_FREE, + PhoneNumberAssignmentType.APPLICATION, + capabilities + )); } private PollerFlux beginPurchasePhoneNumbersHelper(HttpClient httpClient, String searchId, String testName) { diff --git a/sdk/communication/azure-communication-phonenumbers/src/test/java/com/azure/communication/phonenumbers/PhoneNumbersClientIntegrationTest.java b/sdk/communication/azure-communication-phonenumbers/src/test/java/com/azure/communication/phonenumbers/PhoneNumbersClientIntegrationTest.java index d45d47514c6a8..d4510b2389485 100644 --- a/sdk/communication/azure-communication-phonenumbers/src/test/java/com/azure/communication/phonenumbers/PhoneNumbersClientIntegrationTest.java +++ b/sdk/communication/azure-communication-phonenumbers/src/test/java/com/azure/communication/phonenumbers/PhoneNumbersClientIntegrationTest.java @@ -69,71 +69,123 @@ public void listPurchasedPhoneNumbers(HttpClient httpClient) { assertEquals(COUNTRY_CODE, number.getCountryCode()); } + @ParameterizedTest + @MethodSource("com.azure.core.test.TestBase#getHttpClients") + public void listPurchasedPhoneNumbersWithoutContext(HttpClient httpClient) { + PagedIterable numbers = this.getClientWithConnectionString(httpClient, "listPurchasedPhoneNumbersSync").listPurchasedPhoneNumbers(); + PurchasedPhoneNumber number = numbers.iterator().next(); + assertNotNull(number.getPhoneNumber()); + assertEquals(COUNTRY_CODE, number.getCountryCode()); + } + @ParameterizedTest @MethodSource("com.azure.core.test.TestBase#getHttpClients") public void beginSearchAvailablePhoneNumbers(HttpClient httpClient) { - PhoneNumberSearchResult searchResult = beginSearchAvailablePhoneNumbersHelper(httpClient, "beginSearchAvailablePhoneNumbersSync").getFinalResult(); + PhoneNumberSearchResult searchResult = beginSearchAvailablePhoneNumbersHelper(httpClient, "beginSearchAvailablePhoneNumbersSync", true).getFinalResult(); assertEquals(searchResult.getPhoneNumbers().size(), 1); assertNotNull(searchResult.getSearchId()); } + @ParameterizedTest + @MethodSource("com.azure.core.test.TestBase#getHttpClients") + @DisabledIfEnvironmentVariable( + named = "SKIP_LIVE_TEST", + matches = "(?i)(true)") + public void beginPurchaseandReleasePhoneNumbersWithoutContext(HttpClient httpClient) { + PhoneNumberSearchResult searchResult = beginSearchAvailablePhoneNumbersHelper(httpClient, "beginPurchaseandReleasePhoneNumbers_beginSearchAvailablePhoneNumbersWithoutContextSync", false).getFinalResult(); + String phoneNumber = getTestPhoneNumber(searchResult.getPhoneNumbers().get(0)); + PollResponse purchaseOperationResponse = beginPurchasePhoneNumbersHelper(httpClient, searchResult.getSearchId(), "beginPurchasePhoneNumbersWithoutContextSync", false).waitForCompletion(); + assertEquals(LongRunningOperationStatus.SUCCESSFULLY_COMPLETED, purchaseOperationResponse.getStatus()); + PollResponse releaseOperationResponse = beginReleasePhoneNumberHelper(httpClient, phoneNumber, "beginReleasePhoneNumberWithoutContextSync", false).waitForCompletion(); + assertEquals(LongRunningOperationStatus.SUCCESSFULLY_COMPLETED, releaseOperationResponse.getStatus()); + } + @ParameterizedTest @MethodSource("com.azure.core.test.TestBase#getHttpClients") @DisabledIfEnvironmentVariable( named = "SKIP_LIVE_TEST", matches = "(?i)(true)") public void beginPurchaseandReleasePhoneNumbers(HttpClient httpClient) { - PhoneNumberSearchResult searchResult = beginSearchAvailablePhoneNumbersHelper(httpClient, "beginPurchaseandReleasePhoneNumbers_beginSearchAvailablePhoneNumbersSync").getFinalResult(); + PhoneNumberSearchResult searchResult = beginSearchAvailablePhoneNumbersHelper(httpClient, "beginPurchaseandReleasePhoneNumbers_beginSearchAvailablePhoneNumbersSync", true).getFinalResult(); String phoneNumber = getTestPhoneNumber(searchResult.getPhoneNumbers().get(0)); - PollResponse purchaseOperationResponse = beginPurchasePhoneNumbersHelper(httpClient, searchResult.getSearchId(), "beginPurchasePhoneNumbersSync").waitForCompletion(); + PollResponse purchaseOperationResponse = beginPurchasePhoneNumbersHelper(httpClient, searchResult.getSearchId(), "beginPurchasePhoneNumbersSync", true).waitForCompletion(); assertEquals(LongRunningOperationStatus.SUCCESSFULLY_COMPLETED, purchaseOperationResponse.getStatus()); - PollResponse releaseOperationResponse = beginReleasePhoneNumberHelper(httpClient, phoneNumber, "beginReleasePhoneNumberSunc").waitForCompletion(); + PollResponse releaseOperationResponse = beginReleasePhoneNumberHelper(httpClient, phoneNumber, "beginReleasePhoneNumberSync", true).waitForCompletion(); assertEquals(LongRunningOperationStatus.SUCCESSFULLY_COMPLETED, releaseOperationResponse.getStatus()); } + @ParameterizedTest + @MethodSource("com.azure.core.test.TestBase#getHttpClients") + public void beginUpdatePhoneNumberCapabilitiesWithoutContext(HttpClient httpClient) { + String phoneNumber = getTestPhoneNumber(PHONE_NUMBER); + PurchasedPhoneNumber acquiredPhoneNumber = beginUpdatePhoneNumberCapabilitiesHelper(httpClient, phoneNumber, "beginUpdatePhoneNumberCapabilitiesWithoutContextSync", false).getFinalResult(); + assertEquals(PhoneNumberCapabilityType.INBOUND_OUTBOUND, acquiredPhoneNumber.getCapabilities().getSms()); + assertEquals(PhoneNumberCapabilityType.INBOUND, acquiredPhoneNumber.getCapabilities().getCalling()); + } + @ParameterizedTest @MethodSource("com.azure.core.test.TestBase#getHttpClients") public void beginUpdatePhoneNumberCapabilities(HttpClient httpClient) { String phoneNumber = getTestPhoneNumber(PHONE_NUMBER); - PurchasedPhoneNumber acquiredPhoneNumber = beginUpdatePhoneNumberCapabilitiesHelper(httpClient, phoneNumber, "beginUpdatePhoneNumberCapabilitiesSync").getFinalResult(); + PurchasedPhoneNumber acquiredPhoneNumber = beginUpdatePhoneNumberCapabilitiesHelper(httpClient, phoneNumber, "beginUpdatePhoneNumberCapabilitiesSync", true).getFinalResult(); assertEquals(PhoneNumberCapabilityType.INBOUND_OUTBOUND, acquiredPhoneNumber.getCapabilities().getSms()); assertEquals(PhoneNumberCapabilityType.INBOUND, acquiredPhoneNumber.getCapabilities().getCalling()); } - private SyncPoller beginSearchAvailablePhoneNumbersHelper(HttpClient httpClient, String testName) { + private SyncPoller beginSearchAvailablePhoneNumbersHelper(HttpClient httpClient, String testName, boolean withContext) { PhoneNumberCapabilities capabilities = new PhoneNumberCapabilities(); capabilities.setCalling(PhoneNumberCapabilityType.INBOUND); capabilities.setSms(PhoneNumberCapabilityType.INBOUND_OUTBOUND); PhoneNumberSearchOptions searchOptions = new PhoneNumberSearchOptions().setAreaCode(AREA_CODE).setQuantity(1); + if (withContext) { + return setPollInterval(getClientWithConnectionString(httpClient, testName).beginSearchAvailablePhoneNumbers( + COUNTRY_CODE, + PhoneNumberType.TOLL_FREE, + PhoneNumberAssignmentType.APPLICATION, + capabilities, + searchOptions, + Context.NONE)); + } return setPollInterval(getClientWithConnectionString(httpClient, testName).beginSearchAvailablePhoneNumbers( COUNTRY_CODE, PhoneNumberType.TOLL_FREE, PhoneNumberAssignmentType.APPLICATION, - capabilities, - searchOptions, - Context.NONE)); + capabilities)); } - private SyncPoller beginPurchasePhoneNumbersHelper(HttpClient httpClient, String searchId, String testName) { - return setPollInterval(this.getClientWithConnectionString(httpClient, testName) + private SyncPoller beginPurchasePhoneNumbersHelper(HttpClient httpClient, String searchId, String testName, boolean withContext) { + if (withContext) { + return setPollInterval(this.getClientWithConnectionString(httpClient, testName) .beginPurchasePhoneNumbers(searchId, Context.NONE)); + } + return setPollInterval(this.getClientWithConnectionString(httpClient, testName) + .beginPurchasePhoneNumbers(searchId)); } - private SyncPoller beginReleasePhoneNumberHelper(HttpClient httpClient, String phoneNumber, String testName) { + private SyncPoller beginReleasePhoneNumberHelper(HttpClient httpClient, String phoneNumber, String testName, boolean withContext) { if (getTestMode() == TestMode.PLAYBACK) { phoneNumber = "+REDACTED"; } - return setPollInterval(this.getClientWithConnectionString(httpClient, testName) + if (withContext) { + return setPollInterval(this.getClientWithConnectionString(httpClient, testName) .beginReleasePhoneNumber(phoneNumber, Context.NONE)); + } + return setPollInterval(this.getClientWithConnectionString(httpClient, testName) + .beginReleasePhoneNumber(phoneNumber)); } - private SyncPoller beginUpdatePhoneNumberCapabilitiesHelper(HttpClient httpClient, String phoneNumber, String testName) { + private SyncPoller + beginUpdatePhoneNumberCapabilitiesHelper(HttpClient httpClient, String phoneNumber, String testName, boolean withContext) { PhoneNumberCapabilitiesRequest capabilitiesUpdateRequest = new PhoneNumberCapabilitiesRequest(); capabilitiesUpdateRequest.setCalling(PhoneNumberCapabilityType.INBOUND); capabilitiesUpdateRequest.setSms(PhoneNumberCapabilityType.INBOUND_OUTBOUND); - return setPollInterval(this.getClientWithConnectionString(httpClient, testName) + if (withContext) { + return setPollInterval(this.getClientWithConnectionString(httpClient, testName) .beginUpdatePhoneNumberCapabilities(phoneNumber, capabilitiesUpdateRequest, Context.NONE)); + } + return setPollInterval(this.getClientWithConnectionString(httpClient, testName) + .beginUpdatePhoneNumberCapabilities(phoneNumber, capabilitiesUpdateRequest)); } private SyncPoller setPollInterval(SyncPoller syncPoller) { diff --git a/sdk/communication/azure-communication-phonenumbers/src/test/resources/session-records/beginPurchaseandReleasePhoneNumbersWithoutContext.json b/sdk/communication/azure-communication-phonenumbers/src/test/resources/session-records/beginPurchaseandReleasePhoneNumbersWithoutContext.json new file mode 100644 index 0000000000000..9ef5691809b3d --- /dev/null +++ b/sdk/communication/azure-communication-phonenumbers/src/test/resources/session-records/beginPurchaseandReleasePhoneNumbersWithoutContext.json @@ -0,0 +1,627 @@ +{ + "networkCallRecords" : [ { + "Method" : "POST", + "Uri" : "https://REDACTED.communication.azure.com/availablePhoneNumbers/countries/US/:search?api-version=2021-03-07", + "Headers" : { + "User-Agent" : "azsdk-java-azure-communication-phonenumbers/1.0.0-beta.5 (11.0.8; Windows 10; 10.0)", + "Content-Type" : "application/json" + }, + "Response" : { + "X-Processing-Time" : "1545ms", + "MS-CV" : "Snf4MO9cHEWkFUfm+4Ly4A.0", + "operation-id" : "search_9dcfff9e-0826-46ba-af4e-6e364a4d64d9", + "retry-after" : "0", + "search-id" : "9dcfff9e-0826-46ba-af4e-6e364a4d64d9", + "X-Azure-Ref" : "0AqslYAAAAABaJq8zOh5ZRqAh67E3EeO3WVZSMzBFREdFMDQxOAA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=", + "Content-Length" : "0", + "StatusCode" : "202", + "Operation-Location" : "/phoneNumbers/operations/search_9dcfff9e-0826-46ba-af4e-6e364a4d64d9?api-version=2021-03-07", + "Date" : "Thu, 11 Feb 2021 22:09:07 GMT", + "Location" : "/availablePhoneNumbers/searchResults/9dcfff9e-0826-46ba-af4e-6e364a4d64d9?api-version=2021-03-07", + "Request-Context" : "appId=" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://REDACTED.communication.azure.com/phoneNumbers/operations/search_9dcfff9e-0826-46ba-af4e-6e364a4d64d9?api-version=2021-03-07", + "Headers" : { + "User-Agent" : "azsdk-java-azure-communication-phonenumbers/1.0.0-beta.5 (11.0.8; Windows 10; 10.0)" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "X-Processing-Time" : "632ms", + "MS-CV" : "dLZ9/hPq10WslpTryP+kkQ.0", + "retry-after" : "0", + "X-Azure-Ref" : "0B6slYAAAAACD3KNc2gpHSLXZZVxMELljWVZSMzBFREdFMDQxMAA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=", + "StatusCode" : "200", + "Body" : "{\"status\":\"Running\",\"resourceLocation\":null,\"createdDateTime\":\"2021-02-11T22:09:07.280174+00:00\",\"id\":\"REDACTED\",\"operationType\":\"Search\",\"lastActionDateTime\":\"0001-01-01T00:00:00+00:00\"}", + "Date" : "Thu, 11 Feb 2021 22:09:11 GMT", + "Content-Type" : "application/json; charset=utf-8", + "Location" : "/availablePhoneNumbers/searchResults/9dcfff9e-0826-46ba-af4e-6e364a4d64d9?api-version=2021-03-07", + "Request-Context" : "appId=" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://REDACTED.communication.azure.com/phoneNumbers/operations/search_9dcfff9e-0826-46ba-af4e-6e364a4d64d9?api-version=2021-03-07", + "Headers" : { + "User-Agent" : "azsdk-java-azure-communication-phonenumbers/1.0.0-beta.5 (11.0.8; Windows 10; 10.0)" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "X-Processing-Time" : "400ms", + "MS-CV" : "9mT8kthrQEiWRWz/bDrPjw.0", + "retry-after" : "0", + "X-Azure-Ref" : "0CaslYAAAAABNYwdoJEyrQphU/mlAqfKwWVZSMzBFREdFMDQxOAA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=", + "StatusCode" : "200", + "Body" : "{\"status\":\"Running\",\"resourceLocation\":null,\"createdDateTime\":\"2021-02-11T22:09:07.280174+00:00\",\"id\":\"REDACTED\",\"operationType\":\"Search\",\"lastActionDateTime\":\"0001-01-01T00:00:00+00:00\"}", + "Date" : "Thu, 11 Feb 2021 22:09:13 GMT", + "Content-Type" : "application/json; charset=utf-8", + "Location" : "/availablePhoneNumbers/searchResults/9dcfff9e-0826-46ba-af4e-6e364a4d64d9?api-version=2021-03-07", + "Request-Context" : "appId=" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://REDACTED.communication.azure.com/phoneNumbers/operations/search_9dcfff9e-0826-46ba-af4e-6e364a4d64d9?api-version=2021-03-07", + "Headers" : { + "User-Agent" : "azsdk-java-azure-communication-phonenumbers/1.0.0-beta.5 (11.0.8; Windows 10; 10.0)" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "X-Processing-Time" : "710ms", + "MS-CV" : "4i8SGz4AKkG8O+wv3AI7VQ.0", + "retry-after" : "0", + "X-Azure-Ref" : "0D6slYAAAAABOVQytOjqARbV8Syrd1+viWVZSMzBFREdFMDQxMAA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=", + "StatusCode" : "200", + "Body" : "{\"status\":\"Succeeded\",\"resourceLocation\":null,\"createdDateTime\":\"2021-02-11T22:09:07.280174+00:00\",\"id\":\"REDACTED\",\"operationType\":\"Search\",\"lastActionDateTime\":\"0001-01-01T00:00:00+00:00\"}", + "Date" : "Thu, 11 Feb 2021 22:09:19 GMT", + "Content-Type" : "application/json; charset=utf-8", + "Location" : "/availablePhoneNumbers/searchResults/9dcfff9e-0826-46ba-af4e-6e364a4d64d9?api-version=2021-03-07", + "Request-Context" : "appId=" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://REDACTED.communication.azure.com/availablePhoneNumbers/searchResults/9dcfff9e-0826-46ba-af4e-6e364a4d64d9?api-version=2021-03-07", + "Headers" : { + "User-Agent" : "azsdk-java-azure-communication-phonenumbers/1.0.0-beta.5 (11.0.8; Windows 10; 10.0)" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "X-Processing-Time" : "475ms", + "MS-CV" : "MQjWulmwb0SAW2DpfrApZw.0", + "retry-after" : "0", + "X-Azure-Ref" : "0EKslYAAAAABsLWKy64d0Q7mmZCq82J0/WVZSMzBFREdFMDQxOAA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=", + "StatusCode" : "200", + "Body" : "{\"searchId\":\"9dcfff9e-0826-46ba-af4e-6e364a4d64d9\",\"phoneNumbers\":[\"+REDACTED\"],\"phoneNumberType\":\"TollFree\",\"assignmentType\":\"Application\",\"capabilities\":{\"calling\":\"inbound\",\"sms\":\"inbound+outbound\"},\"cost\":{\"amount\":0.0,\"currencyCode\":\"USD\",\"billingFrequency\":\"Monthly\"},\"searchExpiresBy\":\"2021-02-11T22:25:13.5400685+00:00\"}", + "Date" : "Thu, 11 Feb 2021 22:09:20 GMT", + "Content-Type" : "application/json; charset=utf-8", + "Request-Context" : "appId=" + }, + "Exception" : null + }, { + "Method" : "POST", + "Uri" : "https://REDACTED.communication.azure.com/availablePhoneNumbers/:purchase?api-version=2021-03-07", + "Headers" : { + "User-Agent" : "azsdk-java-azure-communication-phonenumbers/1.0.0-beta.5 (11.0.8; Windows 10; 10.0)", + "Content-Type" : "application/json" + }, + "Response" : { + "X-Processing-Time" : "1033ms", + "MS-CV" : "OHCEEDWsz0ipzdkCaP/Jig.0", + "operation-id" : "purchase_9dcfff9e-0826-46ba-af4e-6e364a4d64d9", + "purchase-id" : "9dcfff9e-0826-46ba-af4e-6e364a4d64d9", + "retry-after" : "0", + "X-Azure-Ref" : "0EaslYAAAAACI1Eye1tXJTqRUAvOpm8nUWVZSMzBFREdFMDQxMAA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=", + "Content-Length" : "0", + "StatusCode" : "202", + "Operation-Location" : "/phoneNumbers/operations/purchase_9dcfff9e-0826-46ba-af4e-6e364a4d64d9?api-version=2021-03-07", + "Date" : "Thu, 11 Feb 2021 22:09:21 GMT", + "Location" : "/availablePhoneNumbers/searchResults/9dcfff9e-0826-46ba-af4e-6e364a4d64d9?api-version=2021-03-07", + "Request-Context" : "appId=" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://REDACTED.communication.azure.com/phoneNumbers/operations/purchase_9dcfff9e-0826-46ba-af4e-6e364a4d64d9?api-version=2021-03-07", + "Headers" : { + "User-Agent" : "azsdk-java-azure-communication-phonenumbers/1.0.0-beta.5 (11.0.8; Windows 10; 10.0)" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "X-Processing-Time" : "462ms", + "MS-CV" : "UCVJMgRZPkmQe6UMBaY8ng.0", + "retry-after" : "0", + "X-Azure-Ref" : "0EqslYAAAAADRMCYNaPBsRrUxYK6+k3z4WVZSMzBFREdFMDQxOAA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=", + "StatusCode" : "200", + "Body" : "{\"status\":\"Running\",\"resourceLocation\":null,\"createdDateTime\":\"2021-02-11T22:09:07.280174+00:00\",\"id\":\"REDACTED\",\"operationType\":\"Purchase\",\"lastActionDateTime\":\"0001-01-01T00:00:00+00:00\"}", + "Date" : "Thu, 11 Feb 2021 22:09:22 GMT", + "Content-Type" : "application/json; charset=utf-8", + "Location" : "/availablePhoneNumbers/searchResults/9dcfff9e-0826-46ba-af4e-6e364a4d64d9?api-version=2021-03-07", + "Request-Context" : "appId=" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://REDACTED.communication.azure.com/phoneNumbers/operations/purchase_9dcfff9e-0826-46ba-af4e-6e364a4d64d9?api-version=2021-03-07", + "Headers" : { + "User-Agent" : "azsdk-java-azure-communication-phonenumbers/1.0.0-beta.5 (11.0.8; Windows 10; 10.0)" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "X-Processing-Time" : "554ms", + "MS-CV" : "KzZKbi4Pk0uqb+ISaETtRA.0", + "retry-after" : "0", + "X-Azure-Ref" : "0E6slYAAAAAAj4c6ilxJEQLjwD3oCnZXOWVZSMzBFREdFMDQxMAA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=", + "StatusCode" : "200", + "Body" : "{\"status\":\"Running\",\"resourceLocation\":null,\"createdDateTime\":\"2021-02-11T22:09:07.280174+00:00\",\"id\":\"REDACTED\",\"operationType\":\"Purchase\",\"lastActionDateTime\":\"0001-01-01T00:00:00+00:00\"}", + "Date" : "Thu, 11 Feb 2021 22:09:23 GMT", + "Content-Type" : "application/json; charset=utf-8", + "Location" : "/availablePhoneNumbers/searchResults/9dcfff9e-0826-46ba-af4e-6e364a4d64d9?api-version=2021-03-07", + "Request-Context" : "appId=" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://REDACTED.communication.azure.com/phoneNumbers/operations/purchase_9dcfff9e-0826-46ba-af4e-6e364a4d64d9?api-version=2021-03-07", + "Headers" : { + "User-Agent" : "azsdk-java-azure-communication-phonenumbers/1.0.0-beta.5 (11.0.8; Windows 10; 10.0)" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "X-Processing-Time" : "529ms", + "MS-CV" : "ODlqmnc6gk6HI+0kUR38/g.0", + "retry-after" : "0", + "X-Azure-Ref" : "0IKslYAAAAAAljmRssHtjSawRpv+PxhnaWVZSMzBFREdFMDQxOAA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=", + "StatusCode" : "200", + "Body" : "{\"status\":\"NotStarted\",\"resourceLocation\":null,\"createdDateTime\":\"2021-02-11T22:09:07.280174+00:00\",\"id\":\"REDACTED\",\"operationType\":\"Purchase\",\"lastActionDateTime\":\"0001-01-01T00:00:00+00:00\"}", + "Date" : "Thu, 11 Feb 2021 22:09:36 GMT", + "Content-Type" : "application/json; charset=utf-8", + "Location" : "/availablePhoneNumbers/searchResults/9dcfff9e-0826-46ba-af4e-6e364a4d64d9?api-version=2021-03-07", + "Request-Context" : "appId=" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://REDACTED.communication.azure.com/phoneNumbers/operations/purchase_9dcfff9e-0826-46ba-af4e-6e364a4d64d9?api-version=2021-03-07", + "Headers" : { + "User-Agent" : "azsdk-java-azure-communication-phonenumbers/1.0.0-beta.5 (11.0.8; Windows 10; 10.0)" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "X-Processing-Time" : "421ms", + "MS-CV" : "B+p02viCAkKKS22oJ0O+dw.0", + "retry-after" : "0", + "X-Azure-Ref" : "0JKslYAAAAAC5ZNAODfzOQaYuPjLOxOgaWVZSMzBFREdFMDQxMAA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=", + "StatusCode" : "200", + "Body" : "{\"status\":\"NotStarted\",\"resourceLocation\":null,\"createdDateTime\":\"2021-02-11T22:09:07.280174+00:00\",\"id\":\"REDACTED\",\"operationType\":\"Purchase\",\"lastActionDateTime\":\"0001-01-01T00:00:00+00:00\"}", + "Date" : "Thu, 11 Feb 2021 22:09:40 GMT", + "Content-Type" : "application/json; charset=utf-8", + "Location" : "/availablePhoneNumbers/searchResults/9dcfff9e-0826-46ba-af4e-6e364a4d64d9?api-version=2021-03-07", + "Request-Context" : "appId=" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://REDACTED.communication.azure.com/phoneNumbers/operations/purchase_9dcfff9e-0826-46ba-af4e-6e364a4d64d9?api-version=2021-03-07", + "Headers" : { + "User-Agent" : "azsdk-java-azure-communication-phonenumbers/1.0.0-beta.5 (11.0.8; Windows 10; 10.0)" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "X-Processing-Time" : "666ms", + "MS-CV" : "z1TP7ntDo0COEzztrR0cHA.0", + "retry-after" : "0", + "X-Azure-Ref" : "0J6slYAAAAADKEBPsTL47R5sMm6KHUZPgWVZSMzBFREdFMDQxOAA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=", + "StatusCode" : "200", + "Body" : "{\"status\":\"NotStarted\",\"resourceLocation\":null,\"createdDateTime\":\"2021-02-11T22:09:07.280174+00:00\",\"id\":\"REDACTED\",\"operationType\":\"Purchase\",\"lastActionDateTime\":\"0001-01-01T00:00:00+00:00\"}", + "Date" : "Thu, 11 Feb 2021 22:09:43 GMT", + "Content-Type" : "application/json; charset=utf-8", + "Location" : "/availablePhoneNumbers/searchResults/9dcfff9e-0826-46ba-af4e-6e364a4d64d9?api-version=2021-03-07", + "Request-Context" : "appId=" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://REDACTED.communication.azure.com/phoneNumbers/operations/purchase_9dcfff9e-0826-46ba-af4e-6e364a4d64d9?api-version=2021-03-07", + "Headers" : { + "User-Agent" : "azsdk-java-azure-communication-phonenumbers/1.0.0-beta.5 (11.0.8; Windows 10; 10.0)" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "X-Processing-Time" : "1475ms", + "MS-CV" : "LGXVi7qVBUab3qGoYrO68g.0", + "retry-after" : "0", + "X-Azure-Ref" : "0KqslYAAAAADqeP06q6SnTJWFw3Pi+dEZWVZSMzBFREdFMDQxMAA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=", + "StatusCode" : "200", + "Body" : "{\"status\":\"NotStarted\",\"resourceLocation\":null,\"createdDateTime\":\"2021-02-11T22:09:07.280174+00:00\",\"id\":\"REDACTED\",\"operationType\":\"Purchase\",\"lastActionDateTime\":\"0001-01-01T00:00:00+00:00\"}", + "Date" : "Thu, 11 Feb 2021 22:09:47 GMT", + "Content-Type" : "application/json; charset=utf-8", + "Location" : "/availablePhoneNumbers/searchResults/9dcfff9e-0826-46ba-af4e-6e364a4d64d9?api-version=2021-03-07", + "Request-Context" : "appId=" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://REDACTED.communication.azure.com/phoneNumbers/operations/purchase_9dcfff9e-0826-46ba-af4e-6e364a4d64d9?api-version=2021-03-07", + "Headers" : { + "User-Agent" : "azsdk-java-azure-communication-phonenumbers/1.0.0-beta.5 (11.0.8; Windows 10; 10.0)" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "X-Processing-Time" : "402ms", + "MS-CV" : "4PnlzbzaEUm7xsiwEaySKA.0", + "retry-after" : "0", + "X-Azure-Ref" : "0MKslYAAAAADGf7p0gHAvTqLmC82ApQHoWVZSMzBFREdFMDQxOAA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=", + "StatusCode" : "200", + "Body" : "{\"status\":\"Succeeded\",\"resourceLocation\":null,\"createdDateTime\":\"2021-02-11T22:09:07.280174+00:00\",\"id\":\"REDACTED\",\"operationType\":\"Purchase\",\"lastActionDateTime\":\"0001-01-01T00:00:00+00:00\"}", + "Date" : "Thu, 11 Feb 2021 22:09:51 GMT", + "Content-Type" : "application/json; charset=utf-8", + "Location" : "/availablePhoneNumbers/searchResults/9dcfff9e-0826-46ba-af4e-6e364a4d64d9?api-version=2021-03-07", + "Request-Context" : "appId=" + }, + "Exception" : null + }, { + "Method" : "DELETE", + "Uri" : "https://REDACTED.communication.azure.com/phoneNumbers/+REDACTED?api-version=2021-03-07", + "Headers" : { + "User-Agent" : "azsdk-java-azure-communication-phonenumbers/1.0.0-beta.5 (11.0.8; Windows 10; 10.0)" + }, + "Response" : { + "release-id" : "7daef158-fe12-48f3-adcf-ae63349e5dbd", + "X-Processing-Time" : "681ms", + "MS-CV" : "JZFpBAl8B0uhlD3OmM47Sg.0", + "operation-id" : "release_7daef158-fe12-48f3-adcf-ae63349e5dbd", + "retry-after" : "0", + "X-Azure-Ref" : "0NaslYAAAAADhRpIx1uqWTJByEc3+Qq0hWVZSMzBFREdFMDQxMAA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=", + "StatusCode" : "202", + "Operation-Location" : "/phoneNumbers/operations/release_7daef158-fe12-48f3-adcf-ae63349e5dbd?api-version=2021-03-07", + "Date" : "Thu, 11 Feb 2021 22:09:57 GMT", + "Location" : "/phoneNumbers/+REDACTED?api-version=2021-03-07", + "Request-Context" : "appId=" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://REDACTED.communication.azure.com/phoneNumbers/operations/release_7daef158-fe12-48f3-adcf-ae63349e5dbd?api-version=2021-03-07", + "Headers" : { + "User-Agent" : "azsdk-java-azure-communication-phonenumbers/1.0.0-beta.5 (11.0.8; Windows 10; 10.0)" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "X-Processing-Time" : "284ms", + "MS-CV" : "DfTdxsc+QU2hDEQ1rI3nUQ.0", + "retry-after" : "0", + "X-Azure-Ref" : "0N6slYAAAAAB+73TOSmgHR5Mp7F9S0WJ4WVZSMzBFREdFMDQxOAA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=", + "StatusCode" : "200", + "Body" : "{\"status\":\"NotStarted\",\"resourceLocation\":null,\"createdDateTime\":\"2021-02-11T22:09:57.7859205+00:00\",\"id\":\"REDACTED\",\"operationType\":\"ReleasePhoneNumber\",\"lastActionDateTime\":\"0001-01-01T00:00:00+00:00\"}", + "Date" : "Thu, 11 Feb 2021 22:09:59 GMT", + "Content-Type" : "application/json; charset=utf-8", + "Location" : "/phoneNumbers/+REDACTED?api-version=2021-03-07", + "Request-Context" : "appId=" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://REDACTED.communication.azure.com/phoneNumbers/operations/release_7daef158-fe12-48f3-adcf-ae63349e5dbd?api-version=2021-03-07", + "Headers" : { + "User-Agent" : "azsdk-java-azure-communication-phonenumbers/1.0.0-beta.5 (11.0.8; Windows 10; 10.0)" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "X-Processing-Time" : "264ms", + "MS-CV" : "rfPYVuWcckSdFdbxO86sYQ.0", + "retry-after" : "0", + "X-Azure-Ref" : "0OKslYAAAAAB/IATQ2FtTQ6sE5JXLZbPWWVZSMzBFREdFMDQxMAA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=", + "StatusCode" : "200", + "Body" : "{\"status\":\"Running\",\"resourceLocation\":null,\"createdDateTime\":\"2021-02-11T22:09:57.7859205+00:00\",\"id\":\"REDACTED\",\"operationType\":\"ReleasePhoneNumber\",\"lastActionDateTime\":\"0001-01-01T00:00:00+00:00\"}", + "Date" : "Thu, 11 Feb 2021 22:10:00 GMT", + "Content-Type" : "application/json; charset=utf-8", + "Location" : "/phoneNumbers/+REDACTED?api-version=2021-03-07", + "Request-Context" : "appId=" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://REDACTED.communication.azure.com/phoneNumbers/operations/release_7daef158-fe12-48f3-adcf-ae63349e5dbd?api-version=2021-03-07", + "Headers" : { + "User-Agent" : "azsdk-java-azure-communication-phonenumbers/1.0.0-beta.5 (11.0.8; Windows 10; 10.0)" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "X-Processing-Time" : "272ms", + "MS-CV" : "dE01gU2CWUqvxhFxavGwWQ.0", + "retry-after" : "0", + "X-Azure-Ref" : "0OqslYAAAAABxS82bXDSUTZEshS7sUbCmWVZSMzBFREdFMDQxOAA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=", + "StatusCode" : "200", + "Body" : "{\"status\":\"Running\",\"resourceLocation\":null,\"createdDateTime\":\"2021-02-11T22:09:57.7859205+00:00\",\"id\":\"REDACTED\",\"operationType\":\"ReleasePhoneNumber\",\"lastActionDateTime\":\"0001-01-01T00:00:00+00:00\"}", + "Date" : "Thu, 11 Feb 2021 22:10:02 GMT", + "Content-Type" : "application/json; charset=utf-8", + "Location" : "/phoneNumbers/+REDACTED?api-version=2021-03-07", + "Request-Context" : "appId=" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://REDACTED.communication.azure.com/phoneNumbers/operations/release_7daef158-fe12-48f3-adcf-ae63349e5dbd?api-version=2021-03-07", + "Headers" : { + "User-Agent" : "azsdk-java-azure-communication-phonenumbers/1.0.0-beta.5 (11.0.8; Windows 10; 10.0)" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "X-Processing-Time" : "266ms", + "MS-CV" : "mW78CTP39UewVmYTX0Mm7w.0", + "retry-after" : "0", + "X-Azure-Ref" : "0O6slYAAAAACYYJ9v23YnR4pNUfd4+eNmWVZSMzBFREdFMDQxMAA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=", + "StatusCode" : "200", + "Body" : "{\"status\":\"Running\",\"resourceLocation\":null,\"createdDateTime\":\"2021-02-11T22:09:57.7859205+00:00\",\"id\":\"REDACTED\",\"operationType\":\"ReleasePhoneNumber\",\"lastActionDateTime\":\"0001-01-01T00:00:00+00:00\"}", + "Date" : "Thu, 11 Feb 2021 22:10:02 GMT", + "Content-Type" : "application/json; charset=utf-8", + "Location" : "/phoneNumbers/+REDACTED?api-version=2021-03-07", + "Request-Context" : "appId=" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://REDACTED.communication.azure.com/phoneNumbers/operations/release_7daef158-fe12-48f3-adcf-ae63349e5dbd?api-version=2021-03-07", + "Headers" : { + "User-Agent" : "azsdk-java-azure-communication-phonenumbers/1.0.0-beta.5 (11.0.8; Windows 10; 10.0)" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "X-Processing-Time" : "304ms", + "MS-CV" : "CuRjilFduUyleSiZE/aq2A.0", + "retry-after" : "0", + "X-Azure-Ref" : "0PKslYAAAAADukoF2eWwUSqR4WgyjqHlpWVZSMzBFREdFMDQxOAA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=", + "StatusCode" : "200", + "Body" : "{\"status\":\"Running\",\"resourceLocation\":null,\"createdDateTime\":\"2021-02-11T22:09:57.7859205+00:00\",\"id\":\"REDACTED\",\"operationType\":\"ReleasePhoneNumber\",\"lastActionDateTime\":\"0001-01-01T00:00:00+00:00\"}", + "Date" : "Thu, 11 Feb 2021 22:10:04 GMT", + "Content-Type" : "application/json; charset=utf-8", + "Location" : "/phoneNumbers/+REDACTED?api-version=2021-03-07", + "Request-Context" : "appId=" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://REDACTED.communication.azure.com/phoneNumbers/operations/release_7daef158-fe12-48f3-adcf-ae63349e5dbd?api-version=2021-03-07", + "Headers" : { + "User-Agent" : "azsdk-java-azure-communication-phonenumbers/1.0.0-beta.5 (11.0.8; Windows 10; 10.0)" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "X-Processing-Time" : "267ms", + "MS-CV" : "LeLpHedDKUGJSJKX+vassg.0", + "retry-after" : "0", + "X-Azure-Ref" : "0PqslYAAAAADRd3XQFJ6aTpLHo//+GJkWWVZSMzBFREdFMDQxMAA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=", + "StatusCode" : "200", + "Body" : "{\"status\":\"Running\",\"resourceLocation\":null,\"createdDateTime\":\"2021-02-11T22:09:57.7859205+00:00\",\"id\":\"REDACTED\",\"operationType\":\"ReleasePhoneNumber\",\"lastActionDateTime\":\"0001-01-01T00:00:00+00:00\"}", + "Date" : "Thu, 11 Feb 2021 22:10:05 GMT", + "Content-Type" : "application/json; charset=utf-8", + "Location" : "/phoneNumbers/+REDACTED?api-version=2021-03-07", + "Request-Context" : "appId=" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://REDACTED.communication.azure.com/phoneNumbers/operations/release_7daef158-fe12-48f3-adcf-ae63349e5dbd?api-version=2021-03-07", + "Headers" : { + "User-Agent" : "azsdk-java-azure-communication-phonenumbers/1.0.0-beta.5 (11.0.8; Windows 10; 10.0)" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "X-Processing-Time" : "258ms", + "MS-CV" : "3G50u5szYkKY+Sgn5hRBwQ.0", + "retry-after" : "0", + "X-Azure-Ref" : "0P6slYAAAAAC4GbND5vRHQJCPGz77Q1auWVZSMzBFREdFMDQxOAA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=", + "StatusCode" : "200", + "Body" : "{\"status\":\"Running\",\"resourceLocation\":null,\"createdDateTime\":\"2021-02-11T22:09:57.7859205+00:00\",\"id\":\"REDACTED\",\"operationType\":\"ReleasePhoneNumber\",\"lastActionDateTime\":\"0001-01-01T00:00:00+00:00\"}", + "Date" : "Thu, 11 Feb 2021 22:10:07 GMT", + "Content-Type" : "application/json; charset=utf-8", + "Location" : "/phoneNumbers/+REDACTED?api-version=2021-03-07", + "Request-Context" : "appId=" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://REDACTED.communication.azure.com/phoneNumbers/operations/release_7daef158-fe12-48f3-adcf-ae63349e5dbd?api-version=2021-03-07", + "Headers" : { + "User-Agent" : "azsdk-java-azure-communication-phonenumbers/1.0.0-beta.5 (11.0.8; Windows 10; 10.0)" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "X-Processing-Time" : "557ms", + "MS-CV" : "8FBzdBGyq02pfuI4uEiPsQ.0", + "retry-after" : "0", + "X-Azure-Ref" : "0QKslYAAAAAAUihbgQyMnQryKcwnqjjlKWVZSMzBFREdFMDQxMAA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=", + "StatusCode" : "200", + "Body" : "{\"status\":\"Running\",\"resourceLocation\":null,\"createdDateTime\":\"2021-02-11T22:09:57.7859205+00:00\",\"id\":\"REDACTED\",\"operationType\":\"ReleasePhoneNumber\",\"lastActionDateTime\":\"0001-01-01T00:00:00+00:00\"}", + "Date" : "Thu, 11 Feb 2021 22:10:09 GMT", + "Content-Type" : "application/json; charset=utf-8", + "Location" : "/phoneNumbers/+REDACTED?api-version=2021-03-07", + "Request-Context" : "appId=" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://REDACTED.communication.azure.com/phoneNumbers/operations/release_7daef158-fe12-48f3-adcf-ae63349e5dbd?api-version=2021-03-07", + "Headers" : { + "User-Agent" : "azsdk-java-azure-communication-phonenumbers/1.0.0-beta.5 (11.0.8; Windows 10; 10.0)" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "X-Processing-Time" : "278ms", + "MS-CV" : "i4yJl+6Q+0qJvkfDD7wjCg.0", + "retry-after" : "0", + "X-Azure-Ref" : "0QqslYAAAAABIx/EzujlZQ7hAKvicgTVnWVZSMzBFREdFMDQxOAA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=", + "StatusCode" : "200", + "Body" : "{\"status\":\"Running\",\"resourceLocation\":null,\"createdDateTime\":\"2021-02-11T22:09:57.7859205+00:00\",\"id\":\"REDACTED\",\"operationType\":\"ReleasePhoneNumber\",\"lastActionDateTime\":\"0001-01-01T00:00:00+00:00\"}", + "Date" : "Thu, 11 Feb 2021 22:10:10 GMT", + "Content-Type" : "application/json; charset=utf-8", + "Location" : "/phoneNumbers/+REDACTED?api-version=2021-03-07", + "Request-Context" : "appId=" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://REDACTED.communication.azure.com/phoneNumbers/operations/release_7daef158-fe12-48f3-adcf-ae63349e5dbd?api-version=2021-03-07", + "Headers" : { + "User-Agent" : "azsdk-java-azure-communication-phonenumbers/1.0.0-beta.5 (11.0.8; Windows 10; 10.0)" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "X-Processing-Time" : "256ms", + "MS-CV" : "ezx3Pvs9uk2QsHBbGEGZpQ.0", + "retry-after" : "0", + "X-Azure-Ref" : "0Q6slYAAAAAD681+D5zx6TZw7Y3L1TtnWWVZSMzBFREdFMDQxMAA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=", + "StatusCode" : "200", + "Body" : "{\"status\":\"Running\",\"resourceLocation\":null,\"createdDateTime\":\"2021-02-11T22:09:57.7859205+00:00\",\"id\":\"REDACTED\",\"operationType\":\"ReleasePhoneNumber\",\"lastActionDateTime\":\"0001-01-01T00:00:00+00:00\"}", + "Date" : "Thu, 11 Feb 2021 22:10:11 GMT", + "Content-Type" : "application/json; charset=utf-8", + "Location" : "/phoneNumbers/+REDACTED?api-version=2021-03-07", + "Request-Context" : "appId=" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://REDACTED.communication.azure.com/phoneNumbers/operations/release_7daef158-fe12-48f3-adcf-ae63349e5dbd?api-version=2021-03-07", + "Headers" : { + "User-Agent" : "azsdk-java-azure-communication-phonenumbers/1.0.0-beta.5 (11.0.8; Windows 10; 10.0)" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "X-Processing-Time" : "1391ms", + "MS-CV" : "eXCIYJcCJE6RcgOmyWBmTA.0", + "retry-after" : "0", + "X-Azure-Ref" : "0RKslYAAAAADLSiU3WDf9Sbo3qtpGVWWxWVZSMzBFREdFMDQxOAA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=", + "StatusCode" : "200", + "Body" : "{\"status\":\"Running\",\"resourceLocation\":null,\"createdDateTime\":\"2021-02-11T22:09:57.7859205+00:00\",\"id\":\"REDACTED\",\"operationType\":\"ReleasePhoneNumber\",\"lastActionDateTime\":\"0001-01-01T00:00:00+00:00\"}", + "Date" : "Thu, 11 Feb 2021 22:10:14 GMT", + "Content-Type" : "application/json; charset=utf-8", + "Location" : "/phoneNumbers/+REDACTED?api-version=2021-03-07", + "Request-Context" : "appId=" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://REDACTED.communication.azure.com/phoneNumbers/operations/release_7daef158-fe12-48f3-adcf-ae63349e5dbd?api-version=2021-03-07", + "Headers" : { + "User-Agent" : "azsdk-java-azure-communication-phonenumbers/1.0.0-beta.5 (11.0.8; Windows 10; 10.0)" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "X-Processing-Time" : "274ms", + "MS-CV" : "oc/SaQOlZk2FmuhumRJi7A.0", + "retry-after" : "0", + "X-Azure-Ref" : "0R6slYAAAAACQ4uKeQzBCQ5nBl5jp8QhpWVZSMzBFREdFMDQxMAA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=", + "StatusCode" : "200", + "Body" : "{\"status\":\"Running\",\"resourceLocation\":null,\"createdDateTime\":\"2021-02-11T22:09:57.7859205+00:00\",\"id\":\"REDACTED\",\"operationType\":\"ReleasePhoneNumber\",\"lastActionDateTime\":\"0001-01-01T00:00:00+00:00\"}", + "Date" : "Thu, 11 Feb 2021 22:10:15 GMT", + "Content-Type" : "application/json; charset=utf-8", + "Location" : "/phoneNumbers/+REDACTED?api-version=2021-03-07", + "Request-Context" : "appId=" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://REDACTED.communication.azure.com/phoneNumbers/operations/release_7daef158-fe12-48f3-adcf-ae63349e5dbd?api-version=2021-03-07", + "Headers" : { + "User-Agent" : "azsdk-java-azure-communication-phonenumbers/1.0.0-beta.5 (11.0.8; Windows 10; 10.0)" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "X-Processing-Time" : "283ms", + "MS-CV" : "Ru6w6ycQO0260LkFx1UkQw.0", + "retry-after" : "0", + "X-Azure-Ref" : "0SKslYAAAAAAVj0OYybI8Rb7hUlP8sopIWVZSMzBFREdFMDQxOAA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=", + "StatusCode" : "200", + "Body" : "{\"status\":\"Running\",\"resourceLocation\":null,\"createdDateTime\":\"2021-02-11T22:09:57.7859205+00:00\",\"id\":\"REDACTED\",\"operationType\":\"ReleasePhoneNumber\",\"lastActionDateTime\":\"0001-01-01T00:00:00+00:00\"}", + "Date" : "Thu, 11 Feb 2021 22:10:16 GMT", + "Content-Type" : "application/json; charset=utf-8", + "Location" : "/phoneNumbers/+REDACTED?api-version=2021-03-07", + "Request-Context" : "appId=" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://REDACTED.communication.azure.com/phoneNumbers/operations/release_7daef158-fe12-48f3-adcf-ae63349e5dbd?api-version=2021-03-07", + "Headers" : { + "User-Agent" : "azsdk-java-azure-communication-phonenumbers/1.0.0-beta.5 (11.0.8; Windows 10; 10.0)" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "X-Processing-Time" : "259ms", + "MS-CV" : "xRPlOSQenUaoY/a3AyFqcg.0", + "retry-after" : "0", + "X-Azure-Ref" : "0SqslYAAAAAA1QIP2uwUDQZRsa2Cu4LkMWVZSMzBFREdFMDQxMAA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=", + "StatusCode" : "200", + "Body" : "{\"status\":\"Running\",\"resourceLocation\":null,\"createdDateTime\":\"2021-02-11T22:09:57.7859205+00:00\",\"id\":\"REDACTED\",\"operationType\":\"ReleasePhoneNumber\",\"lastActionDateTime\":\"0001-01-01T00:00:00+00:00\"}", + "Date" : "Thu, 11 Feb 2021 22:10:18 GMT", + "Content-Type" : "application/json; charset=utf-8", + "Location" : "/phoneNumbers/+REDACTED?api-version=2021-03-07", + "Request-Context" : "appId=" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://REDACTED.communication.azure.com/phoneNumbers/operations/release_7daef158-fe12-48f3-adcf-ae63349e5dbd?api-version=2021-03-07", + "Headers" : { + "User-Agent" : "azsdk-java-azure-communication-phonenumbers/1.0.0-beta.5 (11.0.8; Windows 10; 10.0)" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "X-Processing-Time" : "260ms", + "MS-CV" : "agQ7vmjoNUWZsdBMa1CDFw.0", + "retry-after" : "0", + "X-Azure-Ref" : "0S6slYAAAAACKSJgdLXE4TKIsjWYx0qZKWVZSMzBFREdFMDQxOAA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=", + "StatusCode" : "200", + "Body" : "{\"status\":\"Running\",\"resourceLocation\":null,\"createdDateTime\":\"2021-02-11T22:09:57.7859205+00:00\",\"id\":\"REDACTED\",\"operationType\":\"ReleasePhoneNumber\",\"lastActionDateTime\":\"0001-01-01T00:00:00+00:00\"}", + "Date" : "Thu, 11 Feb 2021 22:10:19 GMT", + "Content-Type" : "application/json; charset=utf-8", + "Location" : "/phoneNumbers/+REDACTED?api-version=2021-03-07", + "Request-Context" : "appId=" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://REDACTED.communication.azure.com/phoneNumbers/operations/release_7daef158-fe12-48f3-adcf-ae63349e5dbd?api-version=2021-03-07", + "Headers" : { + "User-Agent" : "azsdk-java-azure-communication-phonenumbers/1.0.0-beta.5 (11.0.8; Windows 10; 10.0)" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "X-Processing-Time" : "305ms", + "MS-CV" : "17CS355Qg02doECttokEfg.0", + "retry-after" : "0", + "X-Azure-Ref" : "0TKslYAAAAABQqCzgI+3GR7jy8Db+1yQtWVZSMzBFREdFMDQxMAA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=", + "StatusCode" : "200", + "Body" : "{\"status\":\"Running\",\"resourceLocation\":null,\"createdDateTime\":\"2021-02-11T22:09:57.7859205+00:00\",\"id\":\"REDACTED\",\"operationType\":\"ReleasePhoneNumber\",\"lastActionDateTime\":\"0001-01-01T00:00:00+00:00\"}", + "Date" : "Thu, 11 Feb 2021 22:10:20 GMT", + "Content-Type" : "application/json; charset=utf-8", + "Location" : "/phoneNumbers/+REDACTED?api-version=2021-03-07", + "Request-Context" : "appId=" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://REDACTED.communication.azure.com/phoneNumbers/operations/release_7daef158-fe12-48f3-adcf-ae63349e5dbd?api-version=2021-03-07", + "Headers" : { + "User-Agent" : "azsdk-java-azure-communication-phonenumbers/1.0.0-beta.5 (11.0.8; Windows 10; 10.0)" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "X-Processing-Time" : "262ms", + "MS-CV" : "COmpd8JnCEO4A2m9DdG4Jw.0", + "retry-after" : "0", + "X-Azure-Ref" : "0TqslYAAAAADmpjxFHuPPR43xx4UzfTFaWVZSMzBFREdFMDQxOAA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=", + "StatusCode" : "200", + "Body" : "{\"status\":\"Succeeded\",\"resourceLocation\":null,\"createdDateTime\":\"2021-02-11T22:09:57.7859205+00:00\",\"id\":\"REDACTED\",\"operationType\":\"ReleasePhoneNumber\",\"lastActionDateTime\":\"0001-01-01T00:00:00+00:00\"}", + "Date" : "Thu, 11 Feb 2021 22:10:21 GMT", + "Content-Type" : "application/json; charset=utf-8", + "Location" : "/phoneNumbers/+REDACTED?api-version=2021-03-07", + "Request-Context" : "appId=" + }, + "Exception" : null + } ], + "variables" : [ ] +} \ No newline at end of file diff --git a/sdk/communication/azure-communication-phonenumbers/src/test/resources/session-records/beginSearchAvailablePhoneNumbersWithoutContext.json b/sdk/communication/azure-communication-phonenumbers/src/test/resources/session-records/beginSearchAvailablePhoneNumbersWithoutContext.json new file mode 100644 index 0000000000000..b92ecaeb54c25 --- /dev/null +++ b/sdk/communication/azure-communication-phonenumbers/src/test/resources/session-records/beginSearchAvailablePhoneNumbersWithoutContext.json @@ -0,0 +1,130 @@ +{ + "networkCallRecords" : [ { + "Method" : "POST", + "Uri" : "https://REDACTED.communication.azure.com/availablePhoneNumbers/countries/US/:search?api-version=2021-03-07", + "Headers" : { + "User-Agent" : "azsdk-java-azure-communication-phonenumbers/1.0.0-beta.7 (11.0.8; Windows 10; 10.0)", + "Content-Type" : "application/json" + }, + "Response" : { + "operation-id" : "search_67caa657-8156-442e-b56b-322b65b8a8be", + "retry-after" : "0", + "StatusCode" : "202", + "Date" : "Fri, 12 Mar 2021 19:56:27 GMT", + "Access-Control-Expose-Headers" : "Location,Operation-Location,operation-id,search-id", + "X-Processing-Time" : "2577ms", + "MS-CV" : "g8TMD2RMKEiUcLkr5CZrcA.0", + "search-id" : "67caa657-8156-442e-b56b-322b65b8a8be", + "X-Azure-Ref" : "0aMdLYAAAAADrpgxIdN2MRYBnI9x/O0IHWVZSMzBFREdFMDQwOQA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=", + "Content-Length" : "0", + "Operation-Location" : "/phoneNumbers/operations/search_67caa657-8156-442e-b56b-322b65b8a8be?api-version=2021-03-07", + "Location" : "/availablePhoneNumbers/searchResults/67caa657-8156-442e-b56b-322b65b8a8be?api-version=2021-03-07", + "Request-Context" : "appId=" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://REDACTED.communication.azure.com/phoneNumbers/operations/search_67caa657-8156-442e-b56b-322b65b8a8be?api-version=2021-03-07", + "Headers" : { + "User-Agent" : "azsdk-java-azure-communication-phonenumbers/1.0.0-beta.7 (11.0.8; Windows 10; 10.0)" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "Access-Control-Expose-Headers" : "Location", + "X-Processing-Time" : "351ms", + "MS-CV" : "Y0ZWGaIAZ0maIOtz4KEeEg.0", + "retry-after" : "0", + "X-Azure-Ref" : "0a8dLYAAAAACxkX1ewhMQR5sBZzA72igCWVZSMzBFREdFMDMwOQA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=", + "StatusCode" : "200", + "Body" : "{\"status\":\"NotStarted\",\"resourceLocation\":\"/availablePhoneNumbers/searchResults/67caa657-8156-442e-b56b-322b65b8a8be?api-version=2021-03-07\",\"createdDateTime\":\"2021-03-12T19:56:27.1693596+00:00\",\"id\":\"REDACTED\",\"operationType\":\"Search\",\"lastActionDateTime\":\"0001-01-01T00:00:00+00:00\"}", + "Date" : "Fri, 12 Mar 2021 19:56:27 GMT", + "Content-Type" : "application/json; charset=utf-8", + "Location" : "/availablePhoneNumbers/searchResults/67caa657-8156-442e-b56b-322b65b8a8be?api-version=2021-03-07", + "Request-Context" : "appId=" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://REDACTED.communication.azure.com/phoneNumbers/operations/search_67caa657-8156-442e-b56b-322b65b8a8be?api-version=2021-03-07", + "Headers" : { + "User-Agent" : "azsdk-java-azure-communication-phonenumbers/1.0.0-beta.7 (11.0.8; Windows 10; 10.0)" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "Access-Control-Expose-Headers" : "Location", + "X-Processing-Time" : "699ms", + "MS-CV" : "8jxfR6wCL0KhG1FZyB9e+Q.0", + "retry-after" : "0", + "X-Azure-Ref" : "0bcdLYAAAAACtFvDbyaVSS56Pcmn4+xToWVZSMzBFREdFMDQwOQA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=", + "StatusCode" : "200", + "Body" : "{\"status\":\"NotStarted\",\"resourceLocation\":\"/availablePhoneNumbers/searchResults/67caa657-8156-442e-b56b-322b65b8a8be?api-version=2021-03-07\",\"createdDateTime\":\"2021-03-12T19:56:27.1693596+00:00\",\"id\":\"REDACTED\",\"operationType\":\"Search\",\"lastActionDateTime\":\"0001-01-01T00:00:00+00:00\"}", + "Date" : "Fri, 12 Mar 2021 19:56:29 GMT", + "Content-Type" : "application/json; charset=utf-8", + "Location" : "/availablePhoneNumbers/searchResults/67caa657-8156-442e-b56b-322b65b8a8be?api-version=2021-03-07", + "Request-Context" : "appId=" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://REDACTED.communication.azure.com/phoneNumbers/operations/search_67caa657-8156-442e-b56b-322b65b8a8be?api-version=2021-03-07", + "Headers" : { + "User-Agent" : "azsdk-java-azure-communication-phonenumbers/1.0.0-beta.7 (11.0.8; Windows 10; 10.0)" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "Access-Control-Expose-Headers" : "Location", + "X-Processing-Time" : "321ms", + "MS-CV" : "PeOU/8ZCMUWexvYbPuXy2g.0", + "retry-after" : "0", + "X-Azure-Ref" : "0b8dLYAAAAABVl6V0+Kb2QJny7fPK8B8+WVZSMzBFREdFMDMwOQA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=", + "StatusCode" : "200", + "Body" : "{\"status\":\"Running\",\"resourceLocation\":\"/availablePhoneNumbers/searchResults/67caa657-8156-442e-b56b-322b65b8a8be?api-version=2021-03-07\",\"createdDateTime\":\"2021-03-12T19:56:27.1693596+00:00\",\"id\":\"REDACTED\",\"operationType\":\"Search\",\"lastActionDateTime\":\"0001-01-01T00:00:00+00:00\"}", + "Date" : "Fri, 12 Mar 2021 19:56:30 GMT", + "Content-Type" : "application/json; charset=utf-8", + "Location" : "/availablePhoneNumbers/searchResults/67caa657-8156-442e-b56b-322b65b8a8be?api-version=2021-03-07", + "Request-Context" : "appId=" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://REDACTED.communication.azure.com/phoneNumbers/operations/search_67caa657-8156-442e-b56b-322b65b8a8be?api-version=2021-03-07", + "Headers" : { + "User-Agent" : "azsdk-java-azure-communication-phonenumbers/1.0.0-beta.7 (11.0.8; Windows 10; 10.0)" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "Access-Control-Expose-Headers" : "Location", + "X-Processing-Time" : "733ms", + "MS-CV" : "tOcd2HdWlEihBXz3W+YNfw.0", + "retry-after" : "0", + "X-Azure-Ref" : "0cMdLYAAAAAAgztHs5pxrToeCm6nV5+IcWVZSMzBFREdFMDQwOQA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=", + "StatusCode" : "200", + "Body" : "{\"status\":\"Succeeded\",\"resourceLocation\":\"/availablePhoneNumbers/searchResults/67caa657-8156-442e-b56b-322b65b8a8be?api-version=2021-03-07\",\"createdDateTime\":\"2021-03-12T19:56:27.1693596+00:00\",\"id\":\"REDACTED\",\"operationType\":\"Search\",\"lastActionDateTime\":\"0001-01-01T00:00:00+00:00\"}", + "Date" : "Fri, 12 Mar 2021 19:56:33 GMT", + "Content-Type" : "application/json; charset=utf-8", + "Location" : "/availablePhoneNumbers/searchResults/67caa657-8156-442e-b56b-322b65b8a8be?api-version=2021-03-07", + "Request-Context" : "appId=" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://REDACTED.communication.azure.com/availablePhoneNumbers/searchResults/67caa657-8156-442e-b56b-322b65b8a8be?api-version=2021-03-07", + "Headers" : { + "User-Agent" : "azsdk-java-azure-communication-phonenumbers/1.0.0-beta.7 (11.0.8; Windows 10; 10.0)" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "X-Processing-Time" : "727ms", + "MS-CV" : "DJ+xvKeRhECatZZLtnROVA.0", + "retry-after" : "0", + "X-Azure-Ref" : "0ccdLYAAAAAAEWwRhpEcJQqDYf17d4uZbWVZSMzBFREdFMDMwOQA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=", + "StatusCode" : "200", + "Body" : "{\"searchId\":\"67caa657-8156-442e-b56b-322b65b8a8be\",\"phoneNumbers\":[\"+REDACTED\"],\"phoneNumberType\":\"TollFree\",\"assignmentType\":\"Application\",\"capabilities\":{\"calling\":\"inbound\",\"sms\":\"inbound+outbound\"},\"cost\":{\"amount\":2.0,\"currencyCode\":\"USD\",\"billingFrequency\":\"Monthly\"},\"searchExpiresBy\":\"2021-03-12T20:12:32.4784268+00:00\"}", + "Date" : "Fri, 12 Mar 2021 19:56:33 GMT", + "Content-Type" : "application/json; charset=utf-8", + "Request-Context" : "appId=" + }, + "Exception" : null + } ], + "variables" : [ ] +} \ No newline at end of file diff --git a/sdk/communication/azure-communication-phonenumbers/src/test/resources/session-records/beginSearchAvailablePhoneNumbersWithoutOptions.json b/sdk/communication/azure-communication-phonenumbers/src/test/resources/session-records/beginSearchAvailablePhoneNumbersWithoutOptions.json new file mode 100644 index 0000000000000..b92ecaeb54c25 --- /dev/null +++ b/sdk/communication/azure-communication-phonenumbers/src/test/resources/session-records/beginSearchAvailablePhoneNumbersWithoutOptions.json @@ -0,0 +1,130 @@ +{ + "networkCallRecords" : [ { + "Method" : "POST", + "Uri" : "https://REDACTED.communication.azure.com/availablePhoneNumbers/countries/US/:search?api-version=2021-03-07", + "Headers" : { + "User-Agent" : "azsdk-java-azure-communication-phonenumbers/1.0.0-beta.7 (11.0.8; Windows 10; 10.0)", + "Content-Type" : "application/json" + }, + "Response" : { + "operation-id" : "search_67caa657-8156-442e-b56b-322b65b8a8be", + "retry-after" : "0", + "StatusCode" : "202", + "Date" : "Fri, 12 Mar 2021 19:56:27 GMT", + "Access-Control-Expose-Headers" : "Location,Operation-Location,operation-id,search-id", + "X-Processing-Time" : "2577ms", + "MS-CV" : "g8TMD2RMKEiUcLkr5CZrcA.0", + "search-id" : "67caa657-8156-442e-b56b-322b65b8a8be", + "X-Azure-Ref" : "0aMdLYAAAAADrpgxIdN2MRYBnI9x/O0IHWVZSMzBFREdFMDQwOQA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=", + "Content-Length" : "0", + "Operation-Location" : "/phoneNumbers/operations/search_67caa657-8156-442e-b56b-322b65b8a8be?api-version=2021-03-07", + "Location" : "/availablePhoneNumbers/searchResults/67caa657-8156-442e-b56b-322b65b8a8be?api-version=2021-03-07", + "Request-Context" : "appId=" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://REDACTED.communication.azure.com/phoneNumbers/operations/search_67caa657-8156-442e-b56b-322b65b8a8be?api-version=2021-03-07", + "Headers" : { + "User-Agent" : "azsdk-java-azure-communication-phonenumbers/1.0.0-beta.7 (11.0.8; Windows 10; 10.0)" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "Access-Control-Expose-Headers" : "Location", + "X-Processing-Time" : "351ms", + "MS-CV" : "Y0ZWGaIAZ0maIOtz4KEeEg.0", + "retry-after" : "0", + "X-Azure-Ref" : "0a8dLYAAAAACxkX1ewhMQR5sBZzA72igCWVZSMzBFREdFMDMwOQA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=", + "StatusCode" : "200", + "Body" : "{\"status\":\"NotStarted\",\"resourceLocation\":\"/availablePhoneNumbers/searchResults/67caa657-8156-442e-b56b-322b65b8a8be?api-version=2021-03-07\",\"createdDateTime\":\"2021-03-12T19:56:27.1693596+00:00\",\"id\":\"REDACTED\",\"operationType\":\"Search\",\"lastActionDateTime\":\"0001-01-01T00:00:00+00:00\"}", + "Date" : "Fri, 12 Mar 2021 19:56:27 GMT", + "Content-Type" : "application/json; charset=utf-8", + "Location" : "/availablePhoneNumbers/searchResults/67caa657-8156-442e-b56b-322b65b8a8be?api-version=2021-03-07", + "Request-Context" : "appId=" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://REDACTED.communication.azure.com/phoneNumbers/operations/search_67caa657-8156-442e-b56b-322b65b8a8be?api-version=2021-03-07", + "Headers" : { + "User-Agent" : "azsdk-java-azure-communication-phonenumbers/1.0.0-beta.7 (11.0.8; Windows 10; 10.0)" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "Access-Control-Expose-Headers" : "Location", + "X-Processing-Time" : "699ms", + "MS-CV" : "8jxfR6wCL0KhG1FZyB9e+Q.0", + "retry-after" : "0", + "X-Azure-Ref" : "0bcdLYAAAAACtFvDbyaVSS56Pcmn4+xToWVZSMzBFREdFMDQwOQA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=", + "StatusCode" : "200", + "Body" : "{\"status\":\"NotStarted\",\"resourceLocation\":\"/availablePhoneNumbers/searchResults/67caa657-8156-442e-b56b-322b65b8a8be?api-version=2021-03-07\",\"createdDateTime\":\"2021-03-12T19:56:27.1693596+00:00\",\"id\":\"REDACTED\",\"operationType\":\"Search\",\"lastActionDateTime\":\"0001-01-01T00:00:00+00:00\"}", + "Date" : "Fri, 12 Mar 2021 19:56:29 GMT", + "Content-Type" : "application/json; charset=utf-8", + "Location" : "/availablePhoneNumbers/searchResults/67caa657-8156-442e-b56b-322b65b8a8be?api-version=2021-03-07", + "Request-Context" : "appId=" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://REDACTED.communication.azure.com/phoneNumbers/operations/search_67caa657-8156-442e-b56b-322b65b8a8be?api-version=2021-03-07", + "Headers" : { + "User-Agent" : "azsdk-java-azure-communication-phonenumbers/1.0.0-beta.7 (11.0.8; Windows 10; 10.0)" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "Access-Control-Expose-Headers" : "Location", + "X-Processing-Time" : "321ms", + "MS-CV" : "PeOU/8ZCMUWexvYbPuXy2g.0", + "retry-after" : "0", + "X-Azure-Ref" : "0b8dLYAAAAABVl6V0+Kb2QJny7fPK8B8+WVZSMzBFREdFMDMwOQA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=", + "StatusCode" : "200", + "Body" : "{\"status\":\"Running\",\"resourceLocation\":\"/availablePhoneNumbers/searchResults/67caa657-8156-442e-b56b-322b65b8a8be?api-version=2021-03-07\",\"createdDateTime\":\"2021-03-12T19:56:27.1693596+00:00\",\"id\":\"REDACTED\",\"operationType\":\"Search\",\"lastActionDateTime\":\"0001-01-01T00:00:00+00:00\"}", + "Date" : "Fri, 12 Mar 2021 19:56:30 GMT", + "Content-Type" : "application/json; charset=utf-8", + "Location" : "/availablePhoneNumbers/searchResults/67caa657-8156-442e-b56b-322b65b8a8be?api-version=2021-03-07", + "Request-Context" : "appId=" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://REDACTED.communication.azure.com/phoneNumbers/operations/search_67caa657-8156-442e-b56b-322b65b8a8be?api-version=2021-03-07", + "Headers" : { + "User-Agent" : "azsdk-java-azure-communication-phonenumbers/1.0.0-beta.7 (11.0.8; Windows 10; 10.0)" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "Access-Control-Expose-Headers" : "Location", + "X-Processing-Time" : "733ms", + "MS-CV" : "tOcd2HdWlEihBXz3W+YNfw.0", + "retry-after" : "0", + "X-Azure-Ref" : "0cMdLYAAAAAAgztHs5pxrToeCm6nV5+IcWVZSMzBFREdFMDQwOQA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=", + "StatusCode" : "200", + "Body" : "{\"status\":\"Succeeded\",\"resourceLocation\":\"/availablePhoneNumbers/searchResults/67caa657-8156-442e-b56b-322b65b8a8be?api-version=2021-03-07\",\"createdDateTime\":\"2021-03-12T19:56:27.1693596+00:00\",\"id\":\"REDACTED\",\"operationType\":\"Search\",\"lastActionDateTime\":\"0001-01-01T00:00:00+00:00\"}", + "Date" : "Fri, 12 Mar 2021 19:56:33 GMT", + "Content-Type" : "application/json; charset=utf-8", + "Location" : "/availablePhoneNumbers/searchResults/67caa657-8156-442e-b56b-322b65b8a8be?api-version=2021-03-07", + "Request-Context" : "appId=" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://REDACTED.communication.azure.com/availablePhoneNumbers/searchResults/67caa657-8156-442e-b56b-322b65b8a8be?api-version=2021-03-07", + "Headers" : { + "User-Agent" : "azsdk-java-azure-communication-phonenumbers/1.0.0-beta.7 (11.0.8; Windows 10; 10.0)" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "X-Processing-Time" : "727ms", + "MS-CV" : "DJ+xvKeRhECatZZLtnROVA.0", + "retry-after" : "0", + "X-Azure-Ref" : "0ccdLYAAAAAAEWwRhpEcJQqDYf17d4uZbWVZSMzBFREdFMDMwOQA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=", + "StatusCode" : "200", + "Body" : "{\"searchId\":\"67caa657-8156-442e-b56b-322b65b8a8be\",\"phoneNumbers\":[\"+REDACTED\"],\"phoneNumberType\":\"TollFree\",\"assignmentType\":\"Application\",\"capabilities\":{\"calling\":\"inbound\",\"sms\":\"inbound+outbound\"},\"cost\":{\"amount\":2.0,\"currencyCode\":\"USD\",\"billingFrequency\":\"Monthly\"},\"searchExpiresBy\":\"2021-03-12T20:12:32.4784268+00:00\"}", + "Date" : "Fri, 12 Mar 2021 19:56:33 GMT", + "Content-Type" : "application/json; charset=utf-8", + "Request-Context" : "appId=" + }, + "Exception" : null + } ], + "variables" : [ ] +} \ No newline at end of file diff --git a/sdk/communication/azure-communication-phonenumbers/src/test/resources/session-records/beginUpdatePhoneNumberCapabilitiesWithoutContext.json b/sdk/communication/azure-communication-phonenumbers/src/test/resources/session-records/beginUpdatePhoneNumberCapabilitiesWithoutContext.json new file mode 100644 index 0000000000000..71cad1bac6810 --- /dev/null +++ b/sdk/communication/azure-communication-phonenumbers/src/test/resources/session-records/beginUpdatePhoneNumberCapabilitiesWithoutContext.json @@ -0,0 +1,247 @@ +{ + "networkCallRecords" : [ { + "Method" : "PATCH", + "Uri" : "https://REDACTED.communication.azure.com/phoneNumbers/+REDACTED/capabilities?api-version=2021-03-07", + "Headers" : { + "User-Agent" : "azsdk-java-azure-communication-phonenumbers/1.0.0-beta.5 (11.0.8; Windows 10; 10.0)", + "Content-Type" : "application/merge-patch+json" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "capabilities-id" : "c974e32d-9234-4dad-b066-3cc58b93c11a", + "operation-id" : "capabilities_c974e32d-9234-4dad-b066-3cc58b93c11a", + "retry-after" : "0", + "StatusCode" : "202", + "Date" : "Thu, 11 Feb 2021 22:13:50 GMT", + "X-Processing-Time" : "1519ms", + "MS-CV" : "ZbTIZvyVhU62R7K5M5lzCQ.0", + "X-Azure-Ref" : "0HawlYAAAAADGWCb8mkrqRJuMIlG/XPpUWVZSMzBFREdFMDMwNwA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=", + "Operation-Location" : "/phoneNumbers/operations/capabilities_c974e32d-9234-4dad-b066-3cc58b93c11a?api-version=2021-03-07", + "Body" : "{\"capabilitiesUpdateId\":\"c974e32d-9234-4dad-b066-3cc58b93c11a\"}", + "Content-Type" : "application/json; charset=utf-8", + "Location" : "/phoneNumbers/+REDACTED?api-version=2021-03-07", + "Request-Context" : "appId=" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://REDACTED.communication.azure.com/phoneNumbers/operations/capabilities_c974e32d-9234-4dad-b066-3cc58b93c11a?api-version=2021-03-07", + "Headers" : { + "User-Agent" : "azsdk-java-azure-communication-phonenumbers/1.0.0-beta.5 (11.0.8; Windows 10; 10.0)" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "X-Processing-Time" : "592ms", + "MS-CV" : "QKaP/I4XxUy5hIZqRJOkkA.0", + "retry-after" : "0", + "X-Azure-Ref" : "0H6wlYAAAAACxhaSa8uguQa16yJCarnzfWVZSMzBFREdFMDQxNgA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=", + "StatusCode" : "200", + "Body" : "{\"status\":\"NotStarted\",\"resourceLocation\":null,\"createdDateTime\":\"2021-02-11T22:13:50.8167258+00:00\",\"id\":\"REDACTED\",\"operationType\":\"UpdatePhoneNumberCapabilities\",\"lastActionDateTime\":\"0001-01-01T00:00:00+00:00\"}", + "Date" : "Thu, 11 Feb 2021 22:13:51 GMT", + "Content-Type" : "application/json; charset=utf-8", + "Location" : "/phoneNumbers/+REDACTED?api-version=2021-03-07", + "Request-Context" : "appId=" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://REDACTED.communication.azure.com/phoneNumbers/operations/capabilities_c974e32d-9234-4dad-b066-3cc58b93c11a?api-version=2021-03-07", + "Headers" : { + "User-Agent" : "azsdk-java-azure-communication-phonenumbers/1.0.0-beta.5 (11.0.8; Windows 10; 10.0)" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "X-Processing-Time" : "403ms", + "MS-CV" : "9Yf9OGxwfkeSmWbb/O1nDA.0", + "retry-after" : "0", + "X-Azure-Ref" : "0IawlYAAAAADG22i0AJeATJdXQ9Tzg8pLWVZSMzBFREdFMDMwNwA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=", + "StatusCode" : "200", + "Body" : "{\"status\":\"NotStarted\",\"resourceLocation\":null,\"createdDateTime\":\"2021-02-11T22:13:50.8167258+00:00\",\"id\":\"REDACTED\",\"operationType\":\"UpdatePhoneNumberCapabilities\",\"lastActionDateTime\":\"0001-01-01T00:00:00+00:00\"}", + "Date" : "Thu, 11 Feb 2021 22:13:53 GMT", + "Content-Type" : "application/json; charset=utf-8", + "Location" : "/phoneNumbers/+REDACTED?api-version=2021-03-07", + "Request-Context" : "appId=" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://REDACTED.communication.azure.com/phoneNumbers/operations/capabilities_c974e32d-9234-4dad-b066-3cc58b93c11a?api-version=2021-03-07", + "Headers" : { + "User-Agent" : "azsdk-java-azure-communication-phonenumbers/1.0.0-beta.5 (11.0.8; Windows 10; 10.0)" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "X-Processing-Time" : "524ms", + "MS-CV" : "7uydKGrPiEGqZT8Q2FPRSQ.0", + "retry-after" : "0", + "X-Azure-Ref" : "0IqwlYAAAAACcNZxMRb59Rpg6g7bmK28/WVZSMzBFREdFMDQxNgA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=", + "StatusCode" : "200", + "Body" : "{\"status\":\"Running\",\"resourceLocation\":null,\"createdDateTime\":\"2021-02-11T22:13:50.8167258+00:00\",\"id\":\"REDACTED\",\"operationType\":\"UpdatePhoneNumberCapabilities\",\"lastActionDateTime\":\"0001-01-01T00:00:00+00:00\"}", + "Date" : "Thu, 11 Feb 2021 22:13:55 GMT", + "Content-Type" : "application/json; charset=utf-8", + "Location" : "/phoneNumbers/+REDACTED?api-version=2021-03-07", + "Request-Context" : "appId=" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://REDACTED.communication.azure.com/phoneNumbers/operations/capabilities_c974e32d-9234-4dad-b066-3cc58b93c11a?api-version=2021-03-07", + "Headers" : { + "User-Agent" : "azsdk-java-azure-communication-phonenumbers/1.0.0-beta.5 (11.0.8; Windows 10; 10.0)" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "X-Processing-Time" : "404ms", + "MS-CV" : "eRIk7skN6E+yoaFPSMieSg.0", + "retry-after" : "0", + "X-Azure-Ref" : "0JKwlYAAAAABMT7rlRq80Q5gq7yQcbWjNWVZSMzBFREdFMDMwNwA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=", + "StatusCode" : "200", + "Body" : "{\"status\":\"Running\",\"resourceLocation\":null,\"createdDateTime\":\"2021-02-11T22:13:50.8167258+00:00\",\"id\":\"REDACTED\",\"operationType\":\"UpdatePhoneNumberCapabilities\",\"lastActionDateTime\":\"0001-01-01T00:00:00+00:00\"}", + "Date" : "Thu, 11 Feb 2021 22:13:56 GMT", + "Content-Type" : "application/json; charset=utf-8", + "Location" : "/phoneNumbers/+REDACTED?api-version=2021-03-07", + "Request-Context" : "appId=" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://REDACTED.communication.azure.com/phoneNumbers/operations/capabilities_c974e32d-9234-4dad-b066-3cc58b93c11a?api-version=2021-03-07", + "Headers" : { + "User-Agent" : "azsdk-java-azure-communication-phonenumbers/1.0.0-beta.5 (11.0.8; Windows 10; 10.0)" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "X-Processing-Time" : "419ms", + "MS-CV" : "Pm0BRZnswkqAvohCTfJkcQ.0", + "retry-after" : "0", + "X-Azure-Ref" : "0JawlYAAAAABI8CFEM8YQT6lZhqUXyPRVWVZSMzBFREdFMDQxNgA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=", + "StatusCode" : "200", + "Body" : "{\"status\":\"Running\",\"resourceLocation\":null,\"createdDateTime\":\"2021-02-11T22:13:50.8167258+00:00\",\"id\":\"REDACTED\",\"operationType\":\"UpdatePhoneNumberCapabilities\",\"lastActionDateTime\":\"0001-01-01T00:00:00+00:00\"}", + "Date" : "Thu, 11 Feb 2021 22:13:57 GMT", + "Content-Type" : "application/json; charset=utf-8", + "Location" : "/phoneNumbers/+REDACTED?api-version=2021-03-07", + "Request-Context" : "appId=" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://REDACTED.communication.azure.com/phoneNumbers/operations/capabilities_c974e32d-9234-4dad-b066-3cc58b93c11a?api-version=2021-03-07", + "Headers" : { + "User-Agent" : "azsdk-java-azure-communication-phonenumbers/1.0.0-beta.5 (11.0.8; Windows 10; 10.0)" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "X-Processing-Time" : "643ms", + "MS-CV" : "lu3RSnxB4EOeBBNkMOSGBw.0", + "retry-after" : "0", + "X-Azure-Ref" : "0J6wlYAAAAAC8I5Stp32nRacWZmBQSgOqWVZSMzBFREdFMDMwNwA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=", + "StatusCode" : "200", + "Body" : "{\"status\":\"Running\",\"resourceLocation\":null,\"createdDateTime\":\"2021-02-11T22:13:50.8167258+00:00\",\"id\":\"REDACTED\",\"operationType\":\"UpdatePhoneNumberCapabilities\",\"lastActionDateTime\":\"0001-01-01T00:00:00+00:00\"}", + "Date" : "Thu, 11 Feb 2021 22:13:59 GMT", + "Content-Type" : "application/json; charset=utf-8", + "Location" : "/phoneNumbers/+REDACTED?api-version=2021-03-07", + "Request-Context" : "appId=" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://REDACTED.communication.azure.com/phoneNumbers/operations/capabilities_c974e32d-9234-4dad-b066-3cc58b93c11a?api-version=2021-03-07", + "Headers" : { + "User-Agent" : "azsdk-java-azure-communication-phonenumbers/1.0.0-beta.5 (11.0.8; Windows 10; 10.0)" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "X-Processing-Time" : "416ms", + "MS-CV" : "bMx39srWo0iIC3VM/yi0oQ.0", + "retry-after" : "0", + "X-Azure-Ref" : "0KawlYAAAAADC24rCb7arQIELQ6XVJLkkWVZSMzBFREdFMDQxNgA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=", + "StatusCode" : "200", + "Body" : "{\"status\":\"Running\",\"resourceLocation\":null,\"createdDateTime\":\"2021-02-11T22:13:50.8167258+00:00\",\"id\":\"REDACTED\",\"operationType\":\"UpdatePhoneNumberCapabilities\",\"lastActionDateTime\":\"0001-01-01T00:00:00+00:00\"}", + "Date" : "Thu, 11 Feb 2021 22:14:01 GMT", + "Content-Type" : "application/json; charset=utf-8", + "Location" : "/phoneNumbers/+REDACTED?api-version=2021-03-07", + "Request-Context" : "appId=" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://REDACTED.communication.azure.com/phoneNumbers/operations/capabilities_c974e32d-9234-4dad-b066-3cc58b93c11a?api-version=2021-03-07", + "Headers" : { + "User-Agent" : "azsdk-java-azure-communication-phonenumbers/1.0.0-beta.5 (11.0.8; Windows 10; 10.0)" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "X-Processing-Time" : "457ms", + "MS-CV" : "rhie9rMaXkSUmgYJT3/+8A.0", + "retry-after" : "0", + "X-Azure-Ref" : "0KqwlYAAAAABzLnoMIb1uRr476n7FNG2zWVZSMzBFREdFMDMwNwA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=", + "StatusCode" : "200", + "Body" : "{\"status\":\"Running\",\"resourceLocation\":null,\"createdDateTime\":\"2021-02-11T22:13:50.8167258+00:00\",\"id\":\"REDACTED\",\"operationType\":\"UpdatePhoneNumberCapabilities\",\"lastActionDateTime\":\"0001-01-01T00:00:00+00:00\"}", + "Date" : "Thu, 11 Feb 2021 22:14:02 GMT", + "Content-Type" : "application/json; charset=utf-8", + "Location" : "/phoneNumbers/+REDACTED?api-version=2021-03-07", + "Request-Context" : "appId=" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://REDACTED.communication.azure.com/phoneNumbers/operations/capabilities_c974e32d-9234-4dad-b066-3cc58b93c11a?api-version=2021-03-07", + "Headers" : { + "User-Agent" : "azsdk-java-azure-communication-phonenumbers/1.0.0-beta.5 (11.0.8; Windows 10; 10.0)" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "X-Processing-Time" : "583ms", + "MS-CV" : "VG1Vr2rLfUu1S8unpo/Wiw.0", + "retry-after" : "0", + "X-Azure-Ref" : "0K6wlYAAAAABMWKzVQ9g0RaLha+DPzEOHWVZSMzBFREdFMDQxNgA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=", + "StatusCode" : "200", + "Body" : "{\"status\":\"Running\",\"resourceLocation\":null,\"createdDateTime\":\"2021-02-11T22:13:50.8167258+00:00\",\"id\":\"REDACTED\",\"operationType\":\"UpdatePhoneNumberCapabilities\",\"lastActionDateTime\":\"0001-01-01T00:00:00+00:00\"}", + "Date" : "Thu, 11 Feb 2021 22:14:04 GMT", + "Content-Type" : "application/json; charset=utf-8", + "Location" : "/phoneNumbers/+REDACTED?api-version=2021-03-07", + "Request-Context" : "appId=" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://REDACTED.communication.azure.com/phoneNumbers/operations/capabilities_c974e32d-9234-4dad-b066-3cc58b93c11a?api-version=2021-03-07", + "Headers" : { + "User-Agent" : "azsdk-java-azure-communication-phonenumbers/1.0.0-beta.5 (11.0.8; Windows 10; 10.0)" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "X-Processing-Time" : "405ms", + "MS-CV" : "/m3VZIQXk02o0R8jmjdTyw.0", + "retry-after" : "0", + "X-Azure-Ref" : "0LawlYAAAAADXltbEq9VCS4u+3znTuyBMWVZSMzBFREdFMDMwNwA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=", + "StatusCode" : "200", + "Body" : "{\"status\":\"Succeeded\",\"resourceLocation\":null,\"createdDateTime\":\"2021-02-11T22:13:50.8167258+00:00\",\"id\":\"REDACTED\",\"operationType\":\"UpdatePhoneNumberCapabilities\",\"lastActionDateTime\":\"0001-01-01T00:00:00+00:00\"}", + "Date" : "Thu, 11 Feb 2021 22:14:05 GMT", + "Content-Type" : "application/json; charset=utf-8", + "Location" : "/phoneNumbers/+REDACTED?api-version=2021-03-07", + "Request-Context" : "appId=" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://REDACTED.communication.azure.com/phoneNumbers/+REDACTED?api-version=2021-03-07", + "Headers" : { + "User-Agent" : "azsdk-java-azure-communication-phonenumbers/1.0.0-beta.5 (11.0.8; Windows 10; 10.0)" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "X-Processing-Time" : "2213ms", + "MS-CV" : "38ilz5YlEkmqQzhzZv/pmg.0", + "retry-after" : "0", + "X-Azure-Ref" : "0LqwlYAAAAAD5WSzhjdujTLf3Cy/HNfF7WVZSMzBFREdFMDQxNgA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=", + "StatusCode" : "200", + "Body" : "{\"id\":\"REDACTED\",\"phoneNumber\":\"+REDACTED\",\"countryCode\":\"US\",\"phoneNumberType\":\"TollFree\",\"capabilities\":{\"calling\":\"inbound\",\"sms\":\"inbound+outbound\"},\"assignmentType\":\"Application\"}", + "Date" : "Thu, 11 Feb 2021 22:14:07 GMT", + "Content-Type" : "application/json; charset=utf-8", + "Request-Context" : "appId=" + }, + "Exception" : null + } ], + "variables" : [ ] +} \ No newline at end of file diff --git a/sdk/communication/azure-communication-phonenumbers/src/test/resources/session-records/listPurchasedPhoneNumbersWithoutContext.json b/sdk/communication/azure-communication-phonenumbers/src/test/resources/session-records/listPurchasedPhoneNumbersWithoutContext.json new file mode 100644 index 0000000000000..38125d8ff28ff --- /dev/null +++ b/sdk/communication/azure-communication-phonenumbers/src/test/resources/session-records/listPurchasedPhoneNumbersWithoutContext.json @@ -0,0 +1,23 @@ +{ + "networkCallRecords" : [ { + "Method" : "GET", + "Uri" : "https://REDACTED.communication.azure.com/phoneNumbers?api-version=2021-03-07", + "Headers" : { + "User-Agent" : "azsdk-java-azure-communication-phonenumbers/1.0.0-beta.7 (11.0.8; Windows 10; 10.0)" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "X-Processing-Time" : "3803ms", + "MS-CV" : "xKV3pxrQX0uqiEiWsK82OQ.0", + "retry-after" : "0", + "X-Azure-Ref" : "0HshLYAAAAAB2qIVFy6B/QKuNbyYCsxkKWVZSMzBFREdFMDQwOAA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=", + "StatusCode" : "200", + "Body" : "{\"phoneNumbers\":[{\"id\":\"REDACTED\",\"phoneNumber\":\"+REDACTED\",\"countryCode\":\"US\",\"phoneNumberType\":\"TollFree\",\"capabilities\":{\"calling\":\"inbound\",\"sms\":\"inbound+outbound\"},\"assignmentType\":\"Application\",\"purchaseDate\":\"2021-02-09T23:03:57.6969271+00:00\",\"cost\":{\"amount\":2.0,\"currencyCode\":\"USD\",\"billingFrequency\":\"Monthly\"}},{\"id\":\"REDACTED\",\"phoneNumber\":\"+REDACTED\",\"countryCode\":\"US\",\"phoneNumberType\":\"TollFree\",\"capabilities\":{\"calling\":\"none\",\"sms\":\"inbound+outbound\"},\"assignmentType\":\"Application\",\"purchaseDate\":\"2021-02-10T17:51:13.4876763+00:00\",\"cost\":{\"amount\":2.0,\"currencyCode\":\"USD\",\"billingFrequency\":\"Monthly\"}},{\"id\":\"REDACTED\",\"phoneNumber\":\"+REDACTED\",\"countryCode\":\"US\",\"phoneNumberType\":\"TollFree\",\"capabilities\":{\"calling\":\"none\",\"sms\":\"inbound\"},\"assignmentType\":\"Application\",\"purchaseDate\":\"2021-02-10T17:52:41.818335+00:00\",\"cost\":{\"amount\":2.0,\"currencyCode\":\"USD\",\"billingFrequency\":\"Monthly\"}},{\"id\":\"REDACTED\",\"phoneNumber\":\"+REDACTED\",\"countryCode\":\"US\",\"phoneNumberType\":\"TollFree\",\"capabilities\":{\"calling\":\"none\",\"sms\":\"inbound+outbound\"},\"assignmentType\":\"Application\",\"purchaseDate\":\"2021-02-10T18:01:46.4199999+00:00\",\"cost\":{\"amount\":2.0,\"currencyCode\":\"USD\",\"billingFrequency\":\"Monthly\"}},{\"id\":\"REDACTED\",\"phoneNumber\":\"+REDACTED\",\"countryCode\":\"US\",\"phoneNumberType\":\"TollFree\",\"capabilities\":{\"calling\":\"none\",\"sms\":\"inbound+outbound\"},\"assignmentType\":\"Application\",\"purchaseDate\":\"2021-03-09T15:01:55.0949003+00:00\",\"cost\":{\"amount\":2.0,\"currencyCode\":\"USD\",\"billingFrequency\":\"Monthly\"}},{\"id\":\"REDACTED\",\"phoneNumber\":\"+REDACTED\",\"countryCode\":\"US\",\"phoneNumberType\":\"TollFree\",\"capabilities\":{\"calling\":\"inbound+outbound\",\"sms\":\"outbound\"},\"assignmentType\":\"Application\",\"purchaseDate\":\"2021-03-09T15:03:04.7513808+00:00\",\"cost\":{\"amount\":2.0,\"currencyCode\":\"USD\",\"billingFrequency\":\"Monthly\"}},{\"id\":\"REDACTED\",\"phoneNumber\":\"+REDACTED\",\"countryCode\":\"US\",\"phoneNumberType\":\"TollFree\",\"capabilities\":{\"calling\":\"inbound\",\"sms\":\"inbound+outbound\"},\"assignmentType\":\"Application\",\"purchaseDate\":\"2000-01-01T00:00:00+00:00\",\"cost\":{\"amount\":2.0,\"currencyCode\":\"USD\",\"billingFrequency\":\"Monthly\"}},{\"id\":\"REDACTED\",\"phoneNumber\":\"+REDACTED\",\"countryCode\":\"US\",\"phoneNumberType\":\"TollFree\",\"capabilities\":{\"calling\":\"inbound+outbound\",\"sms\":\"none\"},\"assignmentType\":\"Application\",\"purchaseDate\":\"2020-09-18T15:03:19.5370985+00:00\",\"cost\":{\"amount\":2.0,\"currencyCode\":\"USD\",\"billingFrequency\":\"Monthly\"}}]}", + "Date" : "Fri, 12 Mar 2021 19:59:29 GMT", + "Content-Type" : "application/json; charset=utf-8", + "Request-Context" : "appId=" + }, + "Exception" : null + } ], + "variables" : [ ] +} \ No newline at end of file diff --git a/sdk/communication/azure-communication-phonenumbers/swagger/README.md b/sdk/communication/azure-communication-phonenumbers/swagger/README.md index 7c7be387b08b9..47079419d2ffa 100644 --- a/sdk/communication/azure-communication-phonenumbers/swagger/README.md +++ b/sdk/communication/azure-communication-phonenumbers/swagger/README.md @@ -50,8 +50,6 @@ directive: $["properties"]["capabilities"].readOnly = true; $["properties"]["assignmentType"].readOnly = true; $["properties"]["purchaseDate"].readOnly = true; - $["properties"]["callbackUri"].readOnly = true; - $["properties"]["applicationId"].readOnly = true; $["properties"]["cost"].readOnly = true; ``` @@ -95,6 +93,7 @@ directive: $["properties"]["assignmentType"].readOnly = true; $["properties"]["capabilities"].readOnly = true; ``` + ### Rename AcquiredPhoneNumber to PurchasedPhoneNumber ``` yaml directive: