/libraries/fabrik/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Address/DependentPhoneNumberInstance.php

https://github.com/trob/fabrik · PHP · 120 lines · 54 code · 10 blank · 56 comment · 2 complexity · 077f0169f29c532983dd5fe7c0e118d9 MD5 · raw file

  1. <?php
  2. /**
  3. * This code was generated by
  4. * \ / _ _ _| _ _
  5. * | (_)\/(_)(_|\/| |(/_ v1.0.0
  6. * / /
  7. */
  8. namespace Twilio\Rest\Api\V2010\Account\Address;
  9. use Twilio\Deserialize;
  10. use Twilio\Exceptions\TwilioException;
  11. use Twilio\InstanceResource;
  12. use Twilio\Values;
  13. use Twilio\Version;
  14. /**
  15. * @property string $sid
  16. * @property string $accountSid
  17. * @property string $friendlyName
  18. * @property string $phoneNumber
  19. * @property string $voiceUrl
  20. * @property string $voiceMethod
  21. * @property string $voiceFallbackMethod
  22. * @property string $voiceFallbackUrl
  23. * @property bool $voiceCallerIdLookup
  24. * @property \DateTime $dateCreated
  25. * @property \DateTime $dateUpdated
  26. * @property string $smsFallbackMethod
  27. * @property string $smsFallbackUrl
  28. * @property string $smsMethod
  29. * @property string $smsUrl
  30. * @property string $addressRequirements
  31. * @property array $capabilities
  32. * @property string $statusCallback
  33. * @property string $statusCallbackMethod
  34. * @property string $apiVersion
  35. * @property string $smsApplicationSid
  36. * @property string $voiceApplicationSid
  37. * @property string $trunkSid
  38. * @property string $emergencyStatus
  39. * @property string $emergencyAddressSid
  40. * @property string $uri
  41. */
  42. class DependentPhoneNumberInstance extends InstanceResource {
  43. /**
  44. * Initialize the DependentPhoneNumberInstance
  45. *
  46. * @param \Twilio\Version $version Version that contains the resource
  47. * @param mixed[] $payload The response payload
  48. * @param string $accountSid The SID of the Account that created the resource
  49. * @param string $addressSid The unique string that identifies the resource
  50. * @return \Twilio\Rest\Api\V2010\Account\Address\DependentPhoneNumberInstance
  51. */
  52. public function __construct(Version $version, array $payload, $accountSid, $addressSid) {
  53. parent::__construct($version);
  54. // Marshaled Properties
  55. $this->properties = array(
  56. 'sid' => Values::array_get($payload, 'sid'),
  57. 'accountSid' => Values::array_get($payload, 'account_sid'),
  58. 'friendlyName' => Values::array_get($payload, 'friendly_name'),
  59. 'phoneNumber' => Values::array_get($payload, 'phone_number'),
  60. 'voiceUrl' => Values::array_get($payload, 'voice_url'),
  61. 'voiceMethod' => Values::array_get($payload, 'voice_method'),
  62. 'voiceFallbackMethod' => Values::array_get($payload, 'voice_fallback_method'),
  63. 'voiceFallbackUrl' => Values::array_get($payload, 'voice_fallback_url'),
  64. 'voiceCallerIdLookup' => Values::array_get($payload, 'voice_caller_id_lookup'),
  65. 'dateCreated' => Deserialize::dateTime(Values::array_get($payload, 'date_created')),
  66. 'dateUpdated' => Deserialize::dateTime(Values::array_get($payload, 'date_updated')),
  67. 'smsFallbackMethod' => Values::array_get($payload, 'sms_fallback_method'),
  68. 'smsFallbackUrl' => Values::array_get($payload, 'sms_fallback_url'),
  69. 'smsMethod' => Values::array_get($payload, 'sms_method'),
  70. 'smsUrl' => Values::array_get($payload, 'sms_url'),
  71. 'addressRequirements' => Values::array_get($payload, 'address_requirements'),
  72. 'capabilities' => Values::array_get($payload, 'capabilities'),
  73. 'statusCallback' => Values::array_get($payload, 'status_callback'),
  74. 'statusCallbackMethod' => Values::array_get($payload, 'status_callback_method'),
  75. 'apiVersion' => Values::array_get($payload, 'api_version'),
  76. 'smsApplicationSid' => Values::array_get($payload, 'sms_application_sid'),
  77. 'voiceApplicationSid' => Values::array_get($payload, 'voice_application_sid'),
  78. 'trunkSid' => Values::array_get($payload, 'trunk_sid'),
  79. 'emergencyStatus' => Values::array_get($payload, 'emergency_status'),
  80. 'emergencyAddressSid' => Values::array_get($payload, 'emergency_address_sid'),
  81. 'uri' => Values::array_get($payload, 'uri'),
  82. );
  83. $this->solution = array('accountSid' => $accountSid, 'addressSid' => $addressSid, );
  84. }
  85. /**
  86. * Magic getter to access properties
  87. *
  88. * @param string $name Property to access
  89. * @return mixed The requested property
  90. * @throws TwilioException For unknown properties
  91. */
  92. public function __get($name) {
  93. if (\array_key_exists($name, $this->properties)) {
  94. return $this->properties[$name];
  95. }
  96. if (\property_exists($this, '_' . $name)) {
  97. $method = 'get' . \ucfirst($name);
  98. return $this->$method();
  99. }
  100. throw new TwilioException('Unknown property: ' . $name);
  101. }
  102. /**
  103. * Provide a friendly representation
  104. *
  105. * @return string Machine friendly representation
  106. */
  107. public function __toString() {
  108. return '[Twilio.Api.V2010.DependentPhoneNumberInstance]';
  109. }
  110. }