Skip to content

Commit ea27e9d

Browse files
[communication] activate phone number live tests (Azure#14199)
* activate phone number tests This PR adds recordings for the phone number tests and activates them. It also removes the attachResponse method and stops sending the raw response in results. * Update lro.update.spec.ts * fix browser test * apply arch review renames * rebuild * . * readd comment * rename VoidResponse * Update phoneNumbersClient.ts * add missed rename in readme Co-authored-by: Dominik Messinger <domessin@microsoft.com>
1 parent 01040ae commit ea27e9d

File tree

42 files changed

+3630
-198
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

42 files changed

+3630
-198
lines changed

sdk/communication/communication-phone-numbers/README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -238,7 +238,7 @@ main();
238238

239239
### Get an acquired phone number
240240

241-
Use the `getPhoneNumber` method to get information about an acquired phone number. This information includes the phone number's type, capabilities, cost, and purchase date.
241+
Use the `getPurchasedPhoneNumber` method to get information about an acquired phone number. This information includes the phone number's type, capabilities, cost, and purchase date.
242242

243243
```typescript
244244
import { PhoneNumbersClient } from "@azure/communication-phone-numbers";
@@ -249,7 +249,7 @@ const client = new PhoneNumbersClient(connectionString);
249249
async main function() {
250250
const phoneNumberToGet = "<phone-number-to-get>";
251251

252-
const phoneNumber = await client.getPhoneNumber(phoneNumberToGet);
252+
const phoneNumber = await client.getPurchasedPhoneNumber(phoneNumberToGet);
253253

254254
console.log(`The id is the same as the phone number: ${phoneNumber.id}`);
255255
console.log(`Phone number type is ${phoneNumber.type}`);
@@ -260,7 +260,7 @@ main();
260260

261261
### List acquired phone numbers
262262

263-
Use the `listPhoneNumbers` method to page through all acquired phone numbers.
263+
Use the `listPurchasedPhoneNumbers` method to page through all acquired phone numbers.
264264

265265
```typescript
266266
import { PhoneNumbersClient } from "@azure/communication-phone-numbers";
@@ -269,7 +269,7 @@ const connectionString = "endpoint=<endpoint>;accessKey=<accessKey>";
269269
const client = new PhoneNumbersClient(connectionString);
270270

271271
async main function() {
272-
const phoneNumbers = await client.listPhoneNumbers();
272+
const phoneNumbers = await client.listPurchasedPhoneNumbers();
273273

274274
for await (const phoneNumber of phoneNumbers) {
275275
console.log(`The id is the same as the phone number: ${phoneNumber.id}`);

sdk/communication/communication-phone-numbers/recordings/browsers/phonenumbersclient__get_phone_number/recording_can_get_a_purchased_phone_number.json

Lines changed: 22 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

sdk/communication/communication-phone-numbers/recordings/browsers/phonenumbersclient__get_phone_number/recording_errors_if_phone_number_not_found.json

Lines changed: 22 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

sdk/communication/communication-phone-numbers/recordings/browsers/phonenumbersclient__lists/recording_can_list_all_purchased_phone_numbers.json

Lines changed: 23 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

sdk/communication/communication-phone-numbers/recordings/browsers/phonenumbersclient__lists/recording_can_list_by_page.json

Lines changed: 23 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

sdk/communication/communication-phone-numbers/recordings/browsers/phonenumbersclient__lists/recording_can_skip_a_phone_number.json

Lines changed: 24 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

sdk/communication/communication-phone-numbers/recordings/browsers/phonenumbersclient__lro__purchase_successfully_purchases_a_phone_number/recording_finds_phone_number_to_purchase.json

Lines changed: 123 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)