Skip to content

Commit

Permalink
[Librarian] Regenerated @ b8a450aff168b5449d658833256ca2354e3ecbbc df…
Browse files Browse the repository at this point in the history
…505752cdef00170b029d7b720bbc359933bf82
  • Loading branch information
twilio-dx committed Jun 6, 2024
1 parent 53a8b59 commit 7150c76
Show file tree
Hide file tree
Showing 18 changed files with 2,368 additions and 12 deletions.
15 changes: 15 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,21 @@
twilio-ruby changelog
=====================

[2024-06-06] Version 7.1.1
--------------------------
**Library - Chore**
- [PR #721](https://github.com/twilio/twilio-ruby/pull/721): adding rexml to Gemfile. Thanks to [@tiwarishubham635](https://github.com/tiwarishubham635)!

**Api**
- Mark MaxPrice as obsolete

**Lookups**
- Update examples for `phone_number_quality_score`

**Messaging**
- List tollfree verifications on parent account and all sub-accounts


[2024-05-24] Version 7.1.0
--------------------------
**Library - Chore**
Expand Down
4 changes: 2 additions & 2 deletions lib/twilio-ruby/rest/api/v2010/account/message.rb
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,10 @@ def initialize(version, account_sid: nil)
# @param [String] to The recipient's phone number in [E.164](https://www.twilio.com/docs/glossary/what-e164) format (for SMS/MMS) or [channel address](https://www.twilio.com/docs/messaging/channels), e.g. `whatsapp:+15552229999`.
# @param [String] status_callback The URL of the endpoint to which Twilio sends [Message status callback requests](https://www.twilio.com/docs/sms/api/message-resource#twilios-request-to-the-statuscallback-url). URL must contain a valid hostname and underscores are not allowed. If you include this parameter with the `messaging_service_sid`, Twilio uses this URL instead of the Status Callback URL of the [Messaging Service](https://www.twilio.com/docs/messaging/api/service-resource).
# @param [String] application_sid The SID of the associated [TwiML Application](https://www.twilio.com/docs/usage/api/applications). [Message status callback requests](https://www.twilio.com/docs/sms/api/message-resource#twilios-request-to-the-statuscallback-url) are sent to the TwiML App's `message_status_callback` URL. Note that the `status_callback` parameter of a request takes priority over the `application_sid` parameter; if both are included `application_sid` is ignored.
# @param [Float] max_price [DEPRECATED] This parameter will no longer have any effect as of 2024-06-03.
# @param [Float] max_price [OBSOLETE] This parameter will no longer have any effect as of 2024-06-03.
# @param [Boolean] provide_feedback Boolean indicating whether or not you intend to provide delivery confirmation feedback to Twilio (used in conjunction with the [Message Feedback subresource](https://www.twilio.com/docs/sms/api/message-feedback-resource)). Default value is `false`.
# @param [String] attempt Total number of attempts made (including this request) to send the message regardless of the provider used
# @param [String] validity_period The maximum length in seconds that the Message can remain in Twilio's outgoing message queue. If a queued Message exceeds the `validity_period`, the Message is not sent. Accepted values are integers from `1` to `14400`. Default value is `14400`. A `validity_period` greater than `5` is recommended. [Learn more about the validity period](https://www.twilio.com/blog/take-more-control-of-outbound-messages-using-validity-period-html)
# @param [String] validity_period The maximum length in seconds that the Message can remain in Twilio's outgoing message queue. If a queued Message exceeds the `validity_period`, the Message is not sent. Accepted values are integers from `1` to `36000`. Default value is `36000`. A `validity_period` greater than `5` is recommended. [Learn more about the validity period](https://www.twilio.com/blog/take-more-control-of-outbound-messages-using-validity-period-html)
# @param [Boolean] force_delivery Reserved
# @param [ContentRetention] content_retention
# @param [AddressRetention] address_retention
Expand Down
5 changes: 5 additions & 0 deletions lib/twilio-ruby/rest/client.rb
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,11 @@ def lookups
@lookups ||= Lookups.new self
end
##
# Access the Marketplace Twilio Domain
def marketplace
@marketplace ||= Marketplace.new self
end
##
# Access the Messaging Twilio Domain
def messaging
@messaging ||= Messaging.new self
Expand Down
63 changes: 60 additions & 3 deletions lib/twilio-ruby/rest/content/v2/content.rb
Original file line number Diff line number Diff line change
Expand Up @@ -35,15 +35,33 @@ def initialize(version)
# Lists ContentInstance records from the API as a list.
# Unlike stream(), this operation is eager and will load `limit` records into
# memory before returning.
# @param [String] sort_by_date Whether to sort by ascending or descending date updated
# @param [String] sort_by_content_name Whether to sort by ascending or descending content name
# @param [Time] date_created_after Filter by >=[date-time]
# @param [Time] date_created_before Filter by <=[date-time]
# @param [String] content_name Filter by Regex Pattern in content name
# @param [String] content Filter by Regex Pattern in template content
# @param [Array[String]] language Filter by array of valid language(s)
# @param [Array[String]] content_type Filter by array of contentType(s)
# @param [Array[String]] channel_eligibility Filter by array of ChannelEligibility(s), where ChannelEligibility=<channel>:<status>
# @param [Integer] limit Upper limit for the number of records to return. stream()
# guarantees to never return more than limit. Default is no limit
# @param [Integer] page_size Number of records to fetch per request, when
# not set will use the default value of 50 records. If no page_size is defined
# but a limit is defined, stream() will attempt to read the limit with the most
# efficient page size, i.e. min(limit, 1000)
# @return [Array] Array of up to limit results
def list(limit: nil, page_size: nil)
def list(sort_by_date: :unset, sort_by_content_name: :unset, date_created_after: :unset, date_created_before: :unset, content_name: :unset, content: :unset, language: :unset, content_type: :unset, channel_eligibility: :unset, limit: nil, page_size: nil)
self.stream(
sort_by_date: sort_by_date,
sort_by_content_name: sort_by_content_name,
date_created_after: date_created_after,
date_created_before: date_created_before,
content_name: content_name,
content: content,
language: language,
content_type: content_type,
channel_eligibility: channel_eligibility,
limit: limit,
page_size: page_size
).entries
Expand All @@ -53,17 +71,35 @@ def list(limit: nil, page_size: nil)
# Streams Instance records from the API as an Enumerable.
# This operation lazily loads records as efficiently as possible until the limit
# is reached.
# @param [String] sort_by_date Whether to sort by ascending or descending date updated
# @param [String] sort_by_content_name Whether to sort by ascending or descending content name
# @param [Time] date_created_after Filter by >=[date-time]
# @param [Time] date_created_before Filter by <=[date-time]
# @param [String] content_name Filter by Regex Pattern in content name
# @param [String] content Filter by Regex Pattern in template content
# @param [Array[String]] language Filter by array of valid language(s)
# @param [Array[String]] content_type Filter by array of contentType(s)
# @param [Array[String]] channel_eligibility Filter by array of ChannelEligibility(s), where ChannelEligibility=<channel>:<status>
# @param [Integer] limit Upper limit for the number of records to return. stream()
# guarantees to never return more than limit. Default is no limit
# @param [Integer] page_size Number of records to fetch per request, when
# not set will use the default value of 50 records. If no page_size is defined
# but a limit is defined, stream() will attempt to read the limit with the most
# efficient page size, i.e. min(limit, 1000)
# @return [Enumerable] Enumerable that will yield up to limit results
def stream(limit: nil, page_size: nil)
def stream(sort_by_date: :unset, sort_by_content_name: :unset, date_created_after: :unset, date_created_before: :unset, content_name: :unset, content: :unset, language: :unset, content_type: :unset, channel_eligibility: :unset, limit: nil, page_size: nil)
limits = @version.read_limits(limit, page_size)

page = self.page(
sort_by_date: sort_by_date,
sort_by_content_name: sort_by_content_name,
date_created_after: date_created_after,
date_created_before: date_created_before,
content_name: content_name,
content: content,
language: language,
content_type: content_type,
channel_eligibility: channel_eligibility,
page_size: limits[:page_size], )

@version.stream(page, limit: limits[:limit], page_limit: limits[:page_limit])
Expand All @@ -86,12 +122,33 @@ def each
##
# Retrieve a single page of ContentInstance records from the API.
# Request is executed immediately.
# @param [String] sort_by_date Whether to sort by ascending or descending date updated
# @param [String] sort_by_content_name Whether to sort by ascending or descending content name
# @param [Time] date_created_after Filter by >=[date-time]
# @param [Time] date_created_before Filter by <=[date-time]
# @param [String] content_name Filter by Regex Pattern in content name
# @param [String] content Filter by Regex Pattern in template content
# @param [Array[String]] language Filter by array of valid language(s)
# @param [Array[String]] content_type Filter by array of contentType(s)
# @param [Array[String]] channel_eligibility Filter by array of ChannelEligibility(s), where ChannelEligibility=<channel>:<status>
# @param [String] page_token PageToken provided by the API
# @param [Integer] page_number Page Number, this value is simply for client state
# @param [Integer] page_size Number of records to return, defaults to 50
# @return [Page] Page of ContentInstance
def page(page_token: :unset, page_number: :unset, page_size: :unset)
def page(sort_by_date: :unset, sort_by_content_name: :unset, date_created_after: :unset, date_created_before: :unset, content_name: :unset, content: :unset, language: :unset, content_type: :unset, channel_eligibility: :unset, page_token: :unset, page_number: :unset, page_size: :unset)
params = Twilio::Values.of({
'SortByDate' => sort_by_date,
'SortByContentName' => sort_by_content_name,
'DateCreatedAfter' => Twilio.serialize_iso8601_datetime(date_created_after),
'DateCreatedBefore' => Twilio.serialize_iso8601_datetime(date_created_before),
'ContentName' => content_name,
'Content' => content,

'Language' => Twilio.serialize_list(language) { |e| e },

'ContentType' => Twilio.serialize_list(content_type) { |e| e },

'ChannelEligibility' => Twilio.serialize_list(channel_eligibility) { |e| e },
'PageToken' => page_token,
'Page' => page_number,
'PageSize' => page_size,
Expand Down
Loading

0 comments on commit 7150c76

Please sign in to comment.