Skip to content

Releases: Bandwidth/php-sdk

v12.0.0

21 Nov 18:25
139bd60

Choose a tag to compare

What's Changed

Full Changelog: v11.0.1...v12.0.0

TN Lookup Migration Guide

  • All new response bodies will contain top level fields links, data, and errors.
  • data will contain information similar to that returned by the V1 response bodies.
  • links will be populated if receiving paginated results from Get Async Lookup Status.
  • errors will contain any errors with your request.

Create Async Lookup Request

Old

$body = new BandwidthLib\PhoneNumberLookup\Models\OrderRequest();
$body->tns = ["+19195551234"];
$resp = $this->bandwidthClient->getPhoneNumberLookup()->getClient()->createLookupRequest("ACCOUNT_ID", $body);
$requestId = $resp->getResult()->requestId;
  • $resp->getResult() was BandwidthLib\PhoneNumberLookup\Models\OrderResponse

New

$body = new BandwidthLib\PhoneNumberLookup\Models\CreateLookupRequest();
$body->phoneNumbers = ["+19195551234"];
$resp = $this->bandwidthClient->getPhoneNumberLookup()->getClient()->createAsyncBulkLookupRequest("ACCOUNT_ID", $body);
$requestId = $resp->getResult()->data->requestId;
  • $resp->getResult() is now BandwidthLib\PhoneNumberLookup\Models\CreateAsyncBulkResponse
  • response data is now inside $resp->getResult()->data
  • $resp->getResult()->data is BandwidthLib\PhoneNumberLookup\Models\CreateAsyncBulkResponseData

Get Async Lookup Status

Old

$resp = $this->bandwidthClient->getPhoneNumberLookup()->getClient()->getLookupRequestStatus("ACCOUNT_ID", $requestId);
$firstResult = $resp->getResult()->result[0];
$phoneNumber = $firstResult->e164Format;
  • $resp->getResult() was BandwidthLib\PhoneNumberLookup\Models\OrderStatus
  • $resp->getResult()->result was an array of BandwidthLib\PhoneNumberLookup\Models\Result

New

$resp = $this->bandwidthClient->getPhoneNumberLookup()->getClient()->getAsyncLookupRequestStatus("ACCOUNT_ID", $requestId);
$firstResult = $resp->getResult()->data->results[0];
$phoneNumber = $firstResult->phoneNumber;
  • $resp->getResult() is now BandwidthLib\PhoneNumberLookup\Models\LookupResponse
  • $resp->getResult()->data is BandwidthLib\PhoneNumberLookup\Models\LookupResponseData
    • This is equivalent to the old OrderStatus
  • $resp->getResult()->data->results is an array of BandwidthLib\PhoneNumberLookup\Models\LookupResult
    • results will be empty until status is COMPLETE

New Synchronous Lookup

Useful if requesting less than 100 TNs

$body = new BandwidthLib\PhoneNumberLookup\Models\CreateLookupRequest();
$body->phoneNumbers = ["+19195551234"];
$resp = $this->bandwidthClient->getPhoneNumberLookup()->getClient()->createSyncLookupRequest("ACCOUNT_ID", $body);
$firstResult = $resp->getResult()->data->results[0];
$phoneNumber = $firstResult->phoneNumber;
  • Request body is the exact same as Create Async Lookup Request, just limited to 100 TNs
  • Response body is the exact same as Get Async Lookup Status, but the status will always be COMPLETE and results will be populated.

v11.0.1

08 Apr 14:57
1717666

Choose a tag to compare

What's Changed

New Contributors

Full Changelog: v11.0.0...v11.0.1

v11.0.0

09 Jul 18:50
ed05c82

Choose a tag to compare

What's Changed

New Contributors

Full Changelog: v10.6.1...v11.0.0

v10.6.1

24 Jun 14:30
754a7ee

Choose a tag to compare

What's Changed

Full Changelog: v10.6.0...v10.6.1

v10.6.0

28 Feb 14:38
708bb4a

Choose a tag to compare

What's Changed

Full Changelog: v10.5.0...v10.6.0

v10.5.0

20 Jun 16:41
abfe764

Choose a tag to compare

What's Changed

Full Changelog: v10.4.0...v10.5.0

v10.4.0

24 May 15:23
26c9b5d

Choose a tag to compare

What's Changed

Full Changelog: v10.3.0...v10.4.0

v10.3.0

23 May 17:05
2757021

Choose a tag to compare

What's Changed

Full Changelog: v10.2.0...v10.3.0

v10.2.0

27 Sep 17:45
f77566e

Choose a tag to compare

What's Changed

Full Changelog: v10.1.0...v10.2.0

v10.1.0

30 Aug 20:52
a92620f

Choose a tag to compare

What's Changed

Full Changelog: v10.0.1...v10.1.0