-
Notifications
You must be signed in to change notification settings - Fork 560
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Librarian] Regenerated @ 2e932f6c59e0f9fb6cb96952802e5ebedd83b6f0 18…
…52557f82faade033dbd5bd0615c9e1aa4d9fae
- Loading branch information
Showing
24 changed files
with
1,291 additions
and
226 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
107 changes: 107 additions & 0 deletions
107
src/Twilio/Rest/Conversations/V1/ConversationWithParticipantsInstance.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,107 @@ | ||
<?php | ||
|
||
/** | ||
* This code was generated by | ||
* ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __ | ||
* | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/ | ||
* | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \ | ||
* | ||
* Twilio - Conversations | ||
* This is the public Twilio REST API. | ||
* | ||
* NOTE: This class is auto generated by OpenAPI Generator. | ||
* https://openapi-generator.tech | ||
* Do not edit the class manually. | ||
*/ | ||
|
||
|
||
namespace Twilio\Rest\Conversations\V1; | ||
|
||
use Twilio\Exceptions\TwilioException; | ||
use Twilio\InstanceResource; | ||
use Twilio\Values; | ||
use Twilio\Version; | ||
use Twilio\Deserialize; | ||
|
||
|
||
/** | ||
* @property string|null $accountSid | ||
* @property string|null $chatServiceSid | ||
* @property string|null $messagingServiceSid | ||
* @property string|null $sid | ||
* @property string|null $friendlyName | ||
* @property string|null $uniqueName | ||
* @property string|null $attributes | ||
* @property string $state | ||
* @property \DateTime|null $dateCreated | ||
* @property \DateTime|null $dateUpdated | ||
* @property array|null $timers | ||
* @property array|null $links | ||
* @property array|null $bindings | ||
* @property string|null $url | ||
*/ | ||
class ConversationWithParticipantsInstance extends InstanceResource | ||
{ | ||
/** | ||
* Initialize the ConversationWithParticipantsInstance | ||
* | ||
* @param Version $version Version that contains the resource | ||
* @param mixed[] $payload The response payload | ||
*/ | ||
public function __construct(Version $version, array $payload) | ||
{ | ||
parent::__construct($version); | ||
|
||
// Marshaled Properties | ||
$this->properties = [ | ||
'accountSid' => Values::array_get($payload, 'account_sid'), | ||
'chatServiceSid' => Values::array_get($payload, 'chat_service_sid'), | ||
'messagingServiceSid' => Values::array_get($payload, 'messaging_service_sid'), | ||
'sid' => Values::array_get($payload, 'sid'), | ||
'friendlyName' => Values::array_get($payload, 'friendly_name'), | ||
'uniqueName' => Values::array_get($payload, 'unique_name'), | ||
'attributes' => Values::array_get($payload, 'attributes'), | ||
'state' => Values::array_get($payload, 'state'), | ||
'dateCreated' => Deserialize::dateTime(Values::array_get($payload, 'date_created')), | ||
'dateUpdated' => Deserialize::dateTime(Values::array_get($payload, 'date_updated')), | ||
'timers' => Values::array_get($payload, 'timers'), | ||
'links' => Values::array_get($payload, 'links'), | ||
'bindings' => Values::array_get($payload, 'bindings'), | ||
'url' => Values::array_get($payload, 'url'), | ||
]; | ||
|
||
$this->solution = []; | ||
} | ||
|
||
/** | ||
* Magic getter to access properties | ||
* | ||
* @param string $name Property to access | ||
* @return mixed The requested property | ||
* @throws TwilioException For unknown properties | ||
*/ | ||
public function __get(string $name) | ||
{ | ||
if (\array_key_exists($name, $this->properties)) { | ||
return $this->properties[$name]; | ||
} | ||
|
||
if (\property_exists($this, '_' . $name)) { | ||
$method = 'get' . \ucfirst($name); | ||
return $this->$method(); | ||
} | ||
|
||
throw new TwilioException('Unknown property: ' . $name); | ||
} | ||
|
||
/** | ||
* Provide a friendly representation | ||
* | ||
* @return string Machine friendly representation | ||
*/ | ||
public function __toString(): string | ||
{ | ||
return '[Twilio.Conversations.V1.ConversationWithParticipantsInstance]'; | ||
} | ||
} | ||
|
104 changes: 104 additions & 0 deletions
104
src/Twilio/Rest/Conversations/V1/ConversationWithParticipantsList.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,104 @@ | ||
<?php | ||
|
||
/** | ||
* This code was generated by | ||
* ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __ | ||
* | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/ | ||
* | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \ | ||
* | ||
* Twilio - Conversations | ||
* This is the public Twilio REST API. | ||
* | ||
* NOTE: This class is auto generated by OpenAPI Generator. | ||
* https://openapi-generator.tech | ||
* Do not edit the class manually. | ||
*/ | ||
|
||
namespace Twilio\Rest\Conversations\V1; | ||
|
||
use Twilio\Exceptions\TwilioException; | ||
use Twilio\ListResource; | ||
use Twilio\Options; | ||
use Twilio\Values; | ||
use Twilio\Version; | ||
use Twilio\Serialize; | ||
|
||
|
||
class ConversationWithParticipantsList extends ListResource | ||
{ | ||
/** | ||
* Construct the ConversationWithParticipantsList | ||
* | ||
* @param Version $version Version that contains the resource | ||
*/ | ||
public function __construct( | ||
Version $version | ||
) { | ||
parent::__construct($version); | ||
|
||
// Path Solution | ||
$this->solution = [ | ||
]; | ||
|
||
$this->uri = '/ConversationWithParticipants'; | ||
} | ||
|
||
/** | ||
* Create the ConversationWithParticipantsInstance | ||
* | ||
* @param array|Options $options Optional Arguments | ||
* @return ConversationWithParticipantsInstance Created ConversationWithParticipantsInstance | ||
* @throws TwilioException When an HTTP error occurs. | ||
*/ | ||
public function create(array $options = []): ConversationWithParticipantsInstance | ||
{ | ||
|
||
$options = new Values($options); | ||
|
||
$data = Values::of([ | ||
'FriendlyName' => | ||
$options['friendlyName'], | ||
'UniqueName' => | ||
$options['uniqueName'], | ||
'DateCreated' => | ||
Serialize::iso8601DateTime($options['dateCreated']), | ||
'DateUpdated' => | ||
Serialize::iso8601DateTime($options['dateUpdated']), | ||
'MessagingServiceSid' => | ||
$options['messagingServiceSid'], | ||
'Attributes' => | ||
$options['attributes'], | ||
'State' => | ||
$options['state'], | ||
'Timers.Inactive' => | ||
$options['timersInactive'], | ||
'Timers.Closed' => | ||
$options['timersClosed'], | ||
'Bindings.Email.Address' => | ||
$options['bindingsEmailAddress'], | ||
'Bindings.Email.Name' => | ||
$options['bindingsEmailName'], | ||
'Participant' => | ||
Serialize::map($options['participant'], function ($e) { return $e; }), | ||
]); | ||
|
||
$headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' , 'X-Twilio-Webhook-Enabled' => $options['xTwilioWebhookEnabled']]); | ||
$payload = $this->version->create('POST', $this->uri, [], $data, $headers); | ||
|
||
return new ConversationWithParticipantsInstance( | ||
$this->version, | ||
$payload | ||
); | ||
} | ||
|
||
|
||
/** | ||
* Provide a friendly representation | ||
* | ||
* @return string Machine friendly representation | ||
*/ | ||
public function __toString(): string | ||
{ | ||
return '[Twilio.Conversations.V1.ConversationWithParticipantsList]'; | ||
} | ||
} |
Oops, something went wrong.