PageRenderTime 38ms CodeModel.GetById 10ms RepoModel.GetById 0ms app.codeStats 1ms

/src/Twilio/Rest/Bulkexports.php

http://github.com/twilio/twilio-php
PHP | 112 lines | 47 code | 16 blank | 49 comment | 3 complexity | 423b6d192021f69c39929ffba7cfa4f3 MD5 | raw file
Possible License(s): MIT
  1. <?php
  2. /**
  3. * This code was generated by
  4. * \ / _ _ _| _ _
  5. * | (_)\/(_)(_|\/| |(/_ v1.0.0
  6. * / /
  7. */
  8. namespace Twilio\Rest;
  9. use Twilio\Domain;
  10. use Twilio\Exceptions\TwilioException;
  11. use Twilio\Rest\Bulkexports\V1;
  12. /**
  13. * @property \Twilio\Rest\Bulkexports\V1 $v1
  14. * @property \Twilio\Rest\Bulkexports\V1\ExportList $exports
  15. * @property \Twilio\Rest\Bulkexports\V1\ExportConfigurationList $exportConfiguration
  16. * @method \Twilio\Rest\Bulkexports\V1\ExportContext exports(string $resourceType)
  17. * @method \Twilio\Rest\Bulkexports\V1\ExportConfigurationContext exportConfiguration(string $resourceType)
  18. */
  19. class Bulkexports extends Domain {
  20. protected $_v1;
  21. /**
  22. * Construct the Bulkexports Domain
  23. *
  24. * @param Client $client Client to communicate with Twilio
  25. */
  26. public function __construct(Client $client) {
  27. parent::__construct($client);
  28. $this->baseUrl = 'https://bulkexports.twilio.com';
  29. }
  30. /**
  31. * @return V1 Version v1 of bulkexports
  32. */
  33. protected function getV1(): V1 {
  34. if (!$this->_v1) {
  35. $this->_v1 = new V1($this);
  36. }
  37. return $this->_v1;
  38. }
  39. /**
  40. * Magic getter to lazy load version
  41. *
  42. * @param string $name Version to return
  43. * @return \Twilio\Version The requested version
  44. * @throws TwilioException For unknown versions
  45. */
  46. public function __get(string $name) {
  47. $method = 'get' . \ucfirst($name);
  48. if (\method_exists($this, $method)) {
  49. return $this->$method();
  50. }
  51. throw new TwilioException('Unknown version ' . $name);
  52. }
  53. /**
  54. * Magic caller to get resource contexts
  55. *
  56. * @param string $name Resource to return
  57. * @param array $arguments Context parameters
  58. * @return \Twilio\InstanceContext The requested resource context
  59. * @throws TwilioException For unknown resource
  60. */
  61. public function __call(string $name, array $arguments) {
  62. $method = 'context' . \ucfirst($name);
  63. if (\method_exists($this, $method)) {
  64. return \call_user_func_array([$this, $method], $arguments);
  65. }
  66. throw new TwilioException('Unknown context ' . $name);
  67. }
  68. protected function getExports(): \Twilio\Rest\Bulkexports\V1\ExportList {
  69. return $this->v1->exports;
  70. }
  71. /**
  72. * @param string $resourceType The type of communication – Messages, Calls,
  73. * Conferences, and Participants
  74. */
  75. protected function contextExports(string $resourceType): \Twilio\Rest\Bulkexports\V1\ExportContext {
  76. return $this->v1->exports($resourceType);
  77. }
  78. protected function getExportConfiguration(): \Twilio\Rest\Bulkexports\V1\ExportConfigurationList {
  79. return $this->v1->exportConfiguration;
  80. }
  81. /**
  82. * @param string $resourceType The type of communication – Messages, Calls,
  83. * Conferences, and Participants
  84. */
  85. protected function contextExportConfiguration(string $resourceType): \Twilio\Rest\Bulkexports\V1\ExportConfigurationContext {
  86. return $this->v1->exportConfiguration($resourceType);
  87. }
  88. /**
  89. * Provide a friendly representation
  90. *
  91. * @return string Machine friendly representation
  92. */
  93. public function __toString(): string {
  94. return '[Twilio.Bulkexports]';
  95. }
  96. }