Skip to content

Commit

Permalink
[Librarian] Regenerated @ 42b8ce059dcc13e9d9713dbf88dcec856be2bbc9
Browse files Browse the repository at this point in the history
  • Loading branch information
twilio-dx committed May 4, 2023
1 parent db64f7b commit 19322dc
Show file tree
Hide file tree
Showing 37 changed files with 199 additions and 1,989 deletions.
9 changes: 9 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,15 @@
twilio-php Changelog
====================

[2023-05-04] Version 7.4.0
--------------------------
**Conversations**
- Remove `start_date`, `end_date` and `state` query parameters from list operation on Conversations resource **(breaking change)**

**Twiml**
- Add support for new Amazon Polly voices (Q1 2023) for `Say` verb


[2023-04-19] Version 7.3.0
--------------------------
**Library - Docs**
Expand Down
18 changes: 4 additions & 14 deletions src/Twilio/Rest/Conversations/V1/ConversationList.php
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,6 @@ public function create(array $options = []): ConversationInstance
* Unlike stream(), this operation is eager and will load `limit` records into
* memory before returning.
*
* @param array|Options $options Optional Arguments
* @param int $limit Upper limit for the number of records to return. read()
* guarantees to never return more than limit. Default is no
* limit
Expand All @@ -104,9 +103,9 @@ public function create(array $options = []): ConversationInstance
* efficient page size, i.e. min(limit, 1000)
* @return ConversationInstance[] Array of results
*/
public function read(array $options = [], int $limit = null, $pageSize = null): array
public function read(int $limit = null, $pageSize = null): array
{
return \iterator_to_array($this->stream($options, $limit, $pageSize), false);
return \iterator_to_array($this->stream($limit, $pageSize), false);
}

/**
Expand All @@ -117,7 +116,6 @@ public function read(array $options = [], int $limit = null, $pageSize = null):
* The results are returned as a generator, so this operation is memory
* efficient.
*
* @param array|Options $options Optional Arguments
* @param int $limit Upper limit for the number of records to return. stream()
* guarantees to never return more than limit. Default is no
* limit
Expand All @@ -128,11 +126,11 @@ public function read(array $options = [], int $limit = null, $pageSize = null):
* efficient page size, i.e. min(limit, 1000)
* @return Stream stream of results
*/
public function stream(array $options = [], int $limit = null, $pageSize = null): Stream
public function stream(int $limit = null, $pageSize = null): Stream
{
$limits = $this->version->readLimits($limit, $pageSize);

$page = $this->page($options, $limits['pageSize']);
$page = $this->page($limits['pageSize']);

return $this->version->stream($page, $limits['limit'], $limits['pageLimit']);
}
Expand All @@ -147,21 +145,13 @@ public function stream(array $options = [], int $limit = null, $pageSize = null)
* @return ConversationPage Page of ConversationInstance
*/
public function page(
array $options = [],
$pageSize = Values::NONE,
string $pageToken = Values::NONE,
$pageNumber = Values::NONE
): ConversationPage
{
$options = new Values($options);

$params = Values::of([
'StartDate' =>
$options['startDate'],
'EndDate' =>
$options['endDate'],
'State' =>
$options['state'],
'PageToken' => $pageToken,
'Page' => $pageNumber,
'PageSize' => $pageSize,
Expand Down
86 changes: 0 additions & 86 deletions src/Twilio/Rest/Conversations/V1/ConversationOptions.php
Original file line number Diff line number Diff line change
Expand Up @@ -78,26 +78,6 @@ public static function delete(
}


/**
* @param string $startDate Start date or time in ISO8601 format for filtering list of Conversations. If a date is provided, the start time of the date is used (YYYY-MM-DDT00:00:00Z). Can be combined with other filters.
* @param string $endDate End date or time in ISO8601 format for filtering list of Conversations. If a date is provided, the end time of the date is used (YYYY-MM-DDT23:59:59Z). Can be combined with other filters.
* @param string $state State for sorting and filtering list of Conversations. Can be `active`, `inactive` or `closed`
* @return ReadConversationOptions Options builder
*/
public static function read(

string $startDate = Values::NONE,
string $endDate = Values::NONE,
string $state = Values::NONE

): ReadConversationOptions
{
return new ReadConversationOptions(
$startDate,
$endDate,
$state
);
}

/**
* @param string $friendlyName The human-readable name of this conversation, limited to 256 characters. Optional.
Expand Down Expand Up @@ -351,72 +331,6 @@ public function __toString(): string
}


class ReadConversationOptions extends Options
{
/**
* @param string $startDate Start date or time in ISO8601 format for filtering list of Conversations. If a date is provided, the start time of the date is used (YYYY-MM-DDT00:00:00Z). Can be combined with other filters.
* @param string $endDate End date or time in ISO8601 format for filtering list of Conversations. If a date is provided, the end time of the date is used (YYYY-MM-DDT23:59:59Z). Can be combined with other filters.
* @param string $state State for sorting and filtering list of Conversations. Can be `active`, `inactive` or `closed`
*/
public function __construct(

string $startDate = Values::NONE,
string $endDate = Values::NONE,
string $state = Values::NONE

) {
$this->options['startDate'] = $startDate;
$this->options['endDate'] = $endDate;
$this->options['state'] = $state;
}

/**
* Start date or time in ISO8601 format for filtering list of Conversations. If a date is provided, the start time of the date is used (YYYY-MM-DDT00:00:00Z). Can be combined with other filters.
*
* @param string $startDate Start date or time in ISO8601 format for filtering list of Conversations. If a date is provided, the start time of the date is used (YYYY-MM-DDT00:00:00Z). Can be combined with other filters.
* @return $this Fluent Builder
*/
public function setStartDate(string $startDate): self
{
$this->options['startDate'] = $startDate;
return $this;
}

/**
* End date or time in ISO8601 format for filtering list of Conversations. If a date is provided, the end time of the date is used (YYYY-MM-DDT23:59:59Z). Can be combined with other filters.
*
* @param string $endDate End date or time in ISO8601 format for filtering list of Conversations. If a date is provided, the end time of the date is used (YYYY-MM-DDT23:59:59Z). Can be combined with other filters.
* @return $this Fluent Builder
*/
public function setEndDate(string $endDate): self
{
$this->options['endDate'] = $endDate;
return $this;
}

/**
* State for sorting and filtering list of Conversations. Can be `active`, `inactive` or `closed`
*
* @param string $state State for sorting and filtering list of Conversations. Can be `active`, `inactive` or `closed`
* @return $this Fluent Builder
*/
public function setState(string $state): self
{
$this->options['state'] = $state;
return $this;
}

/**
* Provide a friendly representation
*
* @return string Machine friendly representation
*/
public function __toString(): string
{
$options = \http_build_query(Values::of($this->options), '', ' ');
return '[Twilio.Conversations.V1.ReadConversationOptions ' . $options . ']';
}
}

class UpdateConversationOptions extends Options
{
Expand Down
18 changes: 4 additions & 14 deletions src/Twilio/Rest/Conversations/V1/Service/ConversationList.php
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,6 @@ public function create(array $options = []): ConversationInstance
* Unlike stream(), this operation is eager and will load `limit` records into
* memory before returning.
*
* @param array|Options $options Optional Arguments
* @param int $limit Upper limit for the number of records to return. read()
* guarantees to never return more than limit. Default is no
* limit
Expand All @@ -111,9 +110,9 @@ public function create(array $options = []): ConversationInstance
* efficient page size, i.e. min(limit, 1000)
* @return ConversationInstance[] Array of results
*/
public function read(array $options = [], int $limit = null, $pageSize = null): array
public function read(int $limit = null, $pageSize = null): array
{
return \iterator_to_array($this->stream($options, $limit, $pageSize), false);
return \iterator_to_array($this->stream($limit, $pageSize), false);
}

/**
Expand All @@ -124,7 +123,6 @@ public function read(array $options = [], int $limit = null, $pageSize = null):
* The results are returned as a generator, so this operation is memory
* efficient.
*
* @param array|Options $options Optional Arguments
* @param int $limit Upper limit for the number of records to return. stream()
* guarantees to never return more than limit. Default is no
* limit
Expand All @@ -135,11 +133,11 @@ public function read(array $options = [], int $limit = null, $pageSize = null):
* efficient page size, i.e. min(limit, 1000)
* @return Stream stream of results
*/
public function stream(array $options = [], int $limit = null, $pageSize = null): Stream
public function stream(int $limit = null, $pageSize = null): Stream
{
$limits = $this->version->readLimits($limit, $pageSize);

$page = $this->page($options, $limits['pageSize']);
$page = $this->page($limits['pageSize']);

return $this->version->stream($page, $limits['limit'], $limits['pageLimit']);
}
Expand All @@ -154,21 +152,13 @@ public function stream(array $options = [], int $limit = null, $pageSize = null)
* @return ConversationPage Page of ConversationInstance
*/
public function page(
array $options = [],
$pageSize = Values::NONE,
string $pageToken = Values::NONE,
$pageNumber = Values::NONE
): ConversationPage
{
$options = new Values($options);

$params = Values::of([
'StartDate' =>
$options['startDate'],
'EndDate' =>
$options['endDate'],
'State' =>
$options['state'],
'PageToken' => $pageToken,
'Page' => $pageNumber,
'PageSize' => $pageSize,
Expand Down
86 changes: 0 additions & 86 deletions src/Twilio/Rest/Conversations/V1/Service/ConversationOptions.php
Original file line number Diff line number Diff line change
Expand Up @@ -78,26 +78,6 @@ public static function delete(
}


/**
* @param string $startDate Start date or time in ISO8601 format for filtering list of Conversations. If a date is provided, the start time of the date is used (YYYY-MM-DDT00:00:00Z). Can be combined with other filters.
* @param string $endDate End date or time in ISO8601 format for filtering list of Conversations. If a date is provided, the end time of the date is used (YYYY-MM-DDT23:59:59Z). Can be combined with other filters.
* @param string $state State for sorting and filtering list of Conversations. Can be `active`, `inactive` or `closed`
* @return ReadConversationOptions Options builder
*/
public static function read(

string $startDate = Values::NONE,
string $endDate = Values::NONE,
string $state = Values::NONE

): ReadConversationOptions
{
return new ReadConversationOptions(
$startDate,
$endDate,
$state
);
}

/**
* @param string $friendlyName The human-readable name of this conversation, limited to 256 characters. Optional.
Expand Down Expand Up @@ -351,72 +331,6 @@ public function __toString(): string
}


class ReadConversationOptions extends Options
{
/**
* @param string $startDate Start date or time in ISO8601 format for filtering list of Conversations. If a date is provided, the start time of the date is used (YYYY-MM-DDT00:00:00Z). Can be combined with other filters.
* @param string $endDate End date or time in ISO8601 format for filtering list of Conversations. If a date is provided, the end time of the date is used (YYYY-MM-DDT23:59:59Z). Can be combined with other filters.
* @param string $state State for sorting and filtering list of Conversations. Can be `active`, `inactive` or `closed`
*/
public function __construct(

string $startDate = Values::NONE,
string $endDate = Values::NONE,
string $state = Values::NONE

) {
$this->options['startDate'] = $startDate;
$this->options['endDate'] = $endDate;
$this->options['state'] = $state;
}

/**
* Start date or time in ISO8601 format for filtering list of Conversations. If a date is provided, the start time of the date is used (YYYY-MM-DDT00:00:00Z). Can be combined with other filters.
*
* @param string $startDate Start date or time in ISO8601 format for filtering list of Conversations. If a date is provided, the start time of the date is used (YYYY-MM-DDT00:00:00Z). Can be combined with other filters.
* @return $this Fluent Builder
*/
public function setStartDate(string $startDate): self
{
$this->options['startDate'] = $startDate;
return $this;
}

/**
* End date or time in ISO8601 format for filtering list of Conversations. If a date is provided, the end time of the date is used (YYYY-MM-DDT23:59:59Z). Can be combined with other filters.
*
* @param string $endDate End date or time in ISO8601 format for filtering list of Conversations. If a date is provided, the end time of the date is used (YYYY-MM-DDT23:59:59Z). Can be combined with other filters.
* @return $this Fluent Builder
*/
public function setEndDate(string $endDate): self
{
$this->options['endDate'] = $endDate;
return $this;
}

/**
* State for sorting and filtering list of Conversations. Can be `active`, `inactive` or `closed`
*
* @param string $state State for sorting and filtering list of Conversations. Can be `active`, `inactive` or `closed`
* @return $this Fluent Builder
*/
public function setState(string $state): self
{
$this->options['state'] = $state;
return $this;
}

/**
* Provide a friendly representation
*
* @return string Machine friendly representation
*/
public function __toString(): string
{
$options = \http_build_query(Values::of($this->options), '', ' ');
return '[Twilio.Conversations.V1.ReadConversationOptions ' . $options . ']';
}
}

class UpdateConversationOptions extends Options
{
Expand Down
9 changes: 4 additions & 5 deletions src/Twilio/Rest/FlexApi/V1.php
Original file line number Diff line number Diff line change
Expand Up @@ -55,11 +55,10 @@
* @property WebChannelList $webChannel
* @method \Twilio\Rest\FlexApi\V1\ChannelContext channel(string $sid)
* @method \Twilio\Rest\FlexApi\V1\FlexFlowContext flexFlow(string $sid)
* @method \Twilio\Rest\FlexApi\V1\AssessmentsContext assessments(string $assessmentId)
* @method \Twilio\Rest\FlexApi\V1\InsightsQuestionnairesContext insightsQuestionnaires(string $id)
* @method \Twilio\Rest\FlexApi\V1\InsightsQuestionnairesCategoryContext insightsQuestionnairesCategory(string $categoryId)
* @method \Twilio\Rest\FlexApi\V1\InsightsQuestionnairesQuestionContext insightsQuestionnairesQuestion(string $questionId)
* @method \Twilio\Rest\FlexApi\V1\InsightsSegmentsContext insightsSegments(string $segmentId)
* @method \Twilio\Rest\FlexApi\V1\AssessmentsContext assessments(string $assessmentSid)
* @method \Twilio\Rest\FlexApi\V1\InsightsQuestionnairesContext insightsQuestionnaires(string $questionnaireSid)
* @method \Twilio\Rest\FlexApi\V1\InsightsQuestionnairesCategoryContext insightsQuestionnairesCategory(string $categorySid)
* @method \Twilio\Rest\FlexApi\V1\InsightsQuestionnairesQuestionContext insightsQuestionnairesQuestion(string $questionSid)
* @method \Twilio\Rest\FlexApi\V1\InteractionContext interaction(string $sid)
* @method \Twilio\Rest\FlexApi\V1\WebChannelContext webChannel(string $sid)
*/
Expand Down
12 changes: 6 additions & 6 deletions src/Twilio/Rest/FlexApi/V1/AssessmentsContext.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,21 +30,21 @@ class AssessmentsContext extends InstanceContext
* Initialize the AssessmentsContext
*
* @param Version $version Version that contains the resource
* @param string $assessmentId The id of the assessment to be modified
* @param string $assessmentSid The SID of the assessment to be modified
*/
public function __construct(
Version $version,
$assessmentId
$assessmentSid
) {
parent::__construct($version);

// Path Solution
$this->solution = [
'assessmentId' =>
$assessmentId,
'assessmentSid' =>
$assessmentSid,
];

$this->uri = '/Insights/QM/Assessments/' . \rawurlencode($assessmentId)
$this->uri = '/Insights/QualityManagement/Assessments/' . \rawurlencode($assessmentSid)
.'';
}

Expand Down Expand Up @@ -79,7 +79,7 @@ public function update(string $offset, string $answerText, string $answerId, arr
return new AssessmentsInstance(
$this->version,
$payload,
$this->solution['assessmentId']
$this->solution['assessmentSid']
);
}

Expand Down
Loading

0 comments on commit 19322dc

Please sign in to comment.