-
Notifications
You must be signed in to change notification settings - Fork 582
Open
Description
The IncomingPhoneNumberInstance class extends the InstanceResource which has the toArray() method defined:
twilio-php/src/Twilio/InstanceResource.php
Lines 17 to 19 in 248dce8
| public function toArray(): array { | |
| return $this->properties; | |
| } |
But the PhoneNumberCapabilities does not include a toArray() method:
https://github.com/twilio/twilio-php/blob/main/src/Twilio/Base/PhoneNumberCapabilities.php
This results in the JSON encoded instance missing capabilities:
Notice how "capabilities" are empty:
{
"accountSid":"...",
"addressSid":null,
"addressRequirements":"none",
"apiVersion":"2010-04-01",
"beta":false,
"capabilities":{
},
"dateCreated":{
"date":"2021-10-22 08:17:04.000000",
"timezone_type":1,
"timezone":"+00:00"
},
"dateUpdated":{
"date":"2025-07-11 00:27:35.000000",
"timezone_type":1,
"timezone":"+00:00"
},
"friendlyName":"...",
"identitySid":null,
"phoneNumber":"...",
"origin":"twilio",
"sid":"...",
"smsApplicationSid":"",
"smsFallbackMethod":"POST",
"smsFallbackUrl":"",
"smsMethod":"POST",
"smsUrl":"https:\/\/....com\/telephony\/messages\/twilio",
"statusCallback":"",
"statusCallbackMethod":"POST",
"trunkSid":null,
"uri":"\/2010-04-01\/Accounts\/...\/IncomingPhoneNumbers\/....json",
"voiceReceiveMode":"voice",
"voiceApplicationSid":"",
"voiceCallerIdLookup":false,
"voiceFallbackMethod":"POST",
"voiceFallbackUrl":"",
"voiceMethod":"POST",
"voiceUrl":"http:\/\/realtime-websocket-dev.us-east-1.elasticbeanstalk.com:8081\/twiml",
"emergencyStatus":"Active",
"emergencyAddressSid":null,
"emergencyAddressStatus":"unregistered",
"bundleSid":null,
"status":"in-use"
}Metadata
Metadata
Assignees
Labels
No labels