-
Notifications
You must be signed in to change notification settings - Fork 578
Closed
Description
Issue Summary
I wanted to get the list of numbers for area code 215. However, the SDK returns MMS and SMS capabilities as false even though the API returns them as true.
Steps to Reproduce
Returns MMS and SMS capabilities as false.
$twilio = new \Twilio\Rest\Client(config('twilio.sid'), config('twilio.auth_token'));
$availablePhoneNumbers = $twilio
->availablePhoneNumbers('US')
->local->read(['areaCode' => 215], 20);
Returns MMS and SMS capabilities as true.
curl "https://api.twilio.com/2010-04-01/Accounts/XXX/AvailablePhoneNumbers/US/Local.json?AreaCode=215&PageSize=20"
twilio-php/src/Twilio/Base/PhoneNumberCapabilities.php
Lines 23 to 24 in 0959531
$this->mms = Values::array_get($capabilities, 'mms', "false"); | |
$this->sms = Values::array_get($capabilities, 'sms', "false"); |
If we take a look at API, the key "MMS" and "SMS" are uppercase, so I believe the above two lines should follow the same case?
{
"address_requirements" : "none",
"beta" : false,
"capabilities" : {
"MMS" : true,
"SMS" : true,
"voice" : true
},
...
}
Technical details:
- twilio-php version: 7.8.0
- php version: 8.2.8
Metadata
Metadata
Assignees
Labels
No labels