Skip to content

Commit

Permalink
[Librarian] Regenerated @ f133b211b6c641995f3e68cf130059fe0e05fa9b
Browse files Browse the repository at this point in the history
  • Loading branch information
twilio-dx committed Aug 11, 2021
1 parent 7356b24 commit 6ee606a
Show file tree
Hide file tree
Showing 21 changed files with 757 additions and 121 deletions.
29 changes: 29 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,35 @@
twilio-ruby changelog
=====================

[2021-08-11] Version 5.58.0
---------------------------
**Library - Chore**
- [PR #566](https://github.com/twilio/twilio-ruby/pull/566): integrate sonarcloud. Thanks to [@shwetha-manvinkurke](https://github.com/shwetha-manvinkurke)!

**Library - Docs**
- [PR #565](https://github.com/twilio/twilio-ruby/pull/565): update mms example to use media_url. Thanks to [@cnorm35](https://github.com/cnorm35)!

**Api**
- Corrected the `price`, `call_sid_to_coach`, and `uri` data types for Conference, Participant, and Recording **(breaking change)**
- Made documentation for property `time_limit` in the call api public. **(breaking change)**
- Added `domain_sid` in sip_credential_list_mapping and sip_ip_access_control_list_mapping APIs **(breaking change)**

**Insights**
- Added new endpoint to fetch Call Summaries

**Messaging**
- Add brand_type field to a2p brand_registration api
- Revert brand registration api update to add brand_type field
- Add brand_type field to a2p brand_registration api

**Taskrouter**
- Add `X-Rate-Limit-Limit`, `X-Rate-Limit-Remaining`, and `X-Rate-Limit-Config` as Response Headers to all TaskRouter endpoints

**Verify**
- Add `TemplateSid` optional parameter on Verification creation.
- Include `whatsapp` as a channel type in the verifications API.


[2021-07-28] Version 5.57.1
---------------------------
**Conversations**
Expand Down
15 changes: 12 additions & 3 deletions lib/twilio-ruby/rest/api/v2010/account/call.rb
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,8 @@ def initialize(version, account_sid: nil)
# `inbound`, `outbound` or `both`. The default is `both`. `inbound` records the
# audio that is received by Twilio. `outbound` records the audio that is generated
# from Twilio. `both` records the audio that is received and generated by Twilio.
# @param [String] time_limit The maximum duration of the call in seconds.
# Constraints depend on account and configuration.
# @param [String] url The absolute URL that returns the TwiML instructions for the
# call. We will call this URL using the `method` when the call connects. For more
# information, see the {Url
Expand All @@ -162,7 +164,7 @@ def initialize(version, account_sid: nil)
# @param [String] application_sid The SID of the Application resource that will
# handle the call, if the call will be handled by an application.
# @return [CallInstance] Created CallInstance
def create(to: nil, from: nil, method: :unset, fallback_url: :unset, fallback_method: :unset, status_callback: :unset, status_callback_event: :unset, status_callback_method: :unset, send_digits: :unset, timeout: :unset, record: :unset, recording_channels: :unset, recording_status_callback: :unset, recording_status_callback_method: :unset, sip_auth_username: :unset, sip_auth_password: :unset, machine_detection: :unset, machine_detection_timeout: :unset, recording_status_callback_event: :unset, trim: :unset, caller_id: :unset, machine_detection_speech_threshold: :unset, machine_detection_speech_end_threshold: :unset, machine_detection_silence_timeout: :unset, async_amd: :unset, async_amd_status_callback: :unset, async_amd_status_callback_method: :unset, byoc: :unset, call_reason: :unset, call_token: :unset, recording_track: :unset, url: :unset, twiml: :unset, application_sid: :unset)
def create(to: nil, from: nil, method: :unset, fallback_url: :unset, fallback_method: :unset, status_callback: :unset, status_callback_event: :unset, status_callback_method: :unset, send_digits: :unset, timeout: :unset, record: :unset, recording_channels: :unset, recording_status_callback: :unset, recording_status_callback_method: :unset, sip_auth_username: :unset, sip_auth_password: :unset, machine_detection: :unset, machine_detection_timeout: :unset, recording_status_callback_event: :unset, trim: :unset, caller_id: :unset, machine_detection_speech_threshold: :unset, machine_detection_speech_end_threshold: :unset, machine_detection_silence_timeout: :unset, async_amd: :unset, async_amd_status_callback: :unset, async_amd_status_callback_method: :unset, byoc: :unset, call_reason: :unset, call_token: :unset, recording_track: :unset, time_limit: :unset, url: :unset, twiml: :unset, application_sid: :unset)
data = Twilio::Values.of({
'To' => to,
'From' => from,
Expand Down Expand Up @@ -198,6 +200,7 @@ def create(to: nil, from: nil, method: :unset, fallback_url: :unset, fallback_me
'CallReason' => call_reason,
'CallToken' => call_token,
'RecordingTrack' => recording_track,
'TimeLimit' => time_limit,
})

payload = @version.create('POST', @uri, data: data)
Expand Down Expand Up @@ -488,8 +491,10 @@ def fetch
# `POST`. If an `application_sid` parameter is present, this parameter is ignored.
# @param [String] twiml TwiML instructions for the call Twilio will use without
# fetching Twiml from url. Twiml and url parameters are mutually exclusive
# @param [String] time_limit The maximum duration of the call in seconds.
# Constraints depend on account and configuration.
# @return [CallInstance] Updated CallInstance
def update(url: :unset, method: :unset, status: :unset, fallback_url: :unset, fallback_method: :unset, status_callback: :unset, status_callback_method: :unset, twiml: :unset)
def update(url: :unset, method: :unset, status: :unset, fallback_url: :unset, fallback_method: :unset, status_callback: :unset, status_callback_method: :unset, twiml: :unset, time_limit: :unset)
data = Twilio::Values.of({
'Url' => url,
'Method' => method,
Expand All @@ -499,6 +504,7 @@ def update(url: :unset, method: :unset, status: :unset, fallback_url: :unset, fa
'StatusCallback' => status_callback,
'StatusCallbackMethod' => status_callback_method,
'Twiml' => twiml,
'TimeLimit' => time_limit,
})

payload = @version.update('POST', @uri, data: data)
Expand Down Expand Up @@ -874,8 +880,10 @@ def fetch
# `POST`. If an `application_sid` parameter is present, this parameter is ignored.
# @param [String] twiml TwiML instructions for the call Twilio will use without
# fetching Twiml from url. Twiml and url parameters are mutually exclusive
# @param [String] time_limit The maximum duration of the call in seconds.
# Constraints depend on account and configuration.
# @return [CallInstance] Updated CallInstance
def update(url: :unset, method: :unset, status: :unset, fallback_url: :unset, fallback_method: :unset, status_callback: :unset, status_callback_method: :unset, twiml: :unset)
def update(url: :unset, method: :unset, status: :unset, fallback_url: :unset, fallback_method: :unset, status_callback: :unset, status_callback_method: :unset, twiml: :unset, time_limit: :unset)
context.update(
url: url,
method: method,
Expand All @@ -885,6 +893,7 @@ def update(url: :unset, method: :unset, status: :unset, fallback_url: :unset, fa
status_callback: status_callback,
status_callback_method: status_callback_method,
twiml: twiml,
time_limit: time_limit,
)
end

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -167,8 +167,10 @@ def initialize(version, account_sid: nil, conference_sid: nil)
# `inbound`, `outbound` or `both`. The default is `both`. `inbound` records the
# audio that is received by Twilio. `outbound` records the audio that is sent from
# Twilio. `both` records the audio that is received and sent by Twilio.
# @param [String] time_limit The maximum duration of the call in seconds.
# Constraints depend on account and configuration.
# @return [ParticipantInstance] Created ParticipantInstance
def create(from: nil, to: nil, status_callback: :unset, status_callback_method: :unset, status_callback_event: :unset, label: :unset, timeout: :unset, record: :unset, muted: :unset, beep: :unset, start_conference_on_enter: :unset, end_conference_on_exit: :unset, wait_url: :unset, wait_method: :unset, early_media: :unset, max_participants: :unset, conference_record: :unset, conference_trim: :unset, conference_status_callback: :unset, conference_status_callback_method: :unset, conference_status_callback_event: :unset, recording_channels: :unset, recording_status_callback: :unset, recording_status_callback_method: :unset, sip_auth_username: :unset, sip_auth_password: :unset, region: :unset, conference_recording_status_callback: :unset, conference_recording_status_callback_method: :unset, recording_status_callback_event: :unset, conference_recording_status_callback_event: :unset, coaching: :unset, call_sid_to_coach: :unset, jitter_buffer_size: :unset, byoc: :unset, caller_id: :unset, call_reason: :unset, recording_track: :unset)
def create(from: nil, to: nil, status_callback: :unset, status_callback_method: :unset, status_callback_event: :unset, label: :unset, timeout: :unset, record: :unset, muted: :unset, beep: :unset, start_conference_on_enter: :unset, end_conference_on_exit: :unset, wait_url: :unset, wait_method: :unset, early_media: :unset, max_participants: :unset, conference_record: :unset, conference_trim: :unset, conference_status_callback: :unset, conference_status_callback_method: :unset, conference_status_callback_event: :unset, recording_channels: :unset, recording_status_callback: :unset, recording_status_callback_method: :unset, sip_auth_username: :unset, sip_auth_password: :unset, region: :unset, conference_recording_status_callback: :unset, conference_recording_status_callback_method: :unset, recording_status_callback_event: :unset, conference_recording_status_callback_event: :unset, coaching: :unset, call_sid_to_coach: :unset, jitter_buffer_size: :unset, byoc: :unset, caller_id: :unset, call_reason: :unset, recording_track: :unset, time_limit: :unset)
data = Twilio::Values.of({
'From' => from,
'To' => to,
Expand Down Expand Up @@ -208,6 +210,7 @@ def create(from: nil, to: nil, status_callback: :unset, status_callback_method:
'CallerId' => caller_id,
'CallReason' => call_reason,
'RecordingTrack' => recording_track,
'TimeLimit' => time_limit,
})

payload = @version.create('POST', @uri, data: data)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -282,7 +282,7 @@ def initialize(version, payload, account_sid: nil, conference_sid: nil, sid: nil
'start_time' => Twilio.deserialize_rfc2822(payload['start_time']),
'duration' => payload['duration'],
'sid' => payload['sid'],
'price' => payload['price'].to_f,
'price' => payload['price'],
'price_unit' => payload['price_unit'],
'status' => payload['status'],
'channels' => payload['channels'].to_i,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ class CredentialListMappingList < ListResource
# @param [Version] version Version that contains the resource
# @param [String] account_sid The unique id of the Account that is responsible for
# this resource.
# @param [String] domain_sid The unique string that that we created to identify
# the SipDomain resource.
# @param [String] domain_sid The unique string that is created to identify the
# SipDomain resource.
# @return [CredentialListMappingList] CredentialListMappingList
def initialize(version, account_sid: nil, domain_sid: nil)
super(version)
Expand Down Expand Up @@ -233,8 +233,8 @@ class CredentialListMappingInstance < InstanceResource
# @param [Hash] payload payload that contains response from Twilio
# @param [String] account_sid The unique id of the Account that is responsible for
# this resource.
# @param [String] domain_sid The unique string that that we created to identify
# the SipDomain resource.
# @param [String] domain_sid The unique string that is created to identify the
# SipDomain resource.
# @param [String] sid A 34 character string that uniquely identifies the resource
# to fetch.
# @return [CredentialListMappingInstance] CredentialListMappingInstance
Expand All @@ -246,10 +246,10 @@ def initialize(version, payload, account_sid: nil, domain_sid: nil, sid: nil)
'account_sid' => payload['account_sid'],
'date_created' => Twilio.deserialize_rfc2822(payload['date_created']),
'date_updated' => Twilio.deserialize_rfc2822(payload['date_updated']),
'domain_sid' => payload['domain_sid'],
'friendly_name' => payload['friendly_name'],
'sid' => payload['sid'],
'uri' => payload['uri'],
'subresource_uris' => payload['subresource_uris'],
}

# Context
Expand Down Expand Up @@ -295,6 +295,12 @@ def date_updated
@properties['date_updated']
end

##
# @return [String] The unique string that identifies the SipDomain resource.
def domain_sid
@properties['domain_sid']
end

##
# @return [String] A human readable descriptive text for this resource, up to 64 characters long.
def friendly_name
Expand All @@ -313,12 +319,6 @@ def uri
@properties['uri']
end

##
# @return [String] The credentials associated with this resource.
def subresource_uris
@properties['subresource_uris']
end

##
# Fetch the CredentialListMappingInstance
# @return [CredentialListMappingInstance] Fetched CredentialListMappingInstance
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ class IpAccessControlListMappingList < ListResource
# @param [Version] version Version that contains the resource
# @param [String] account_sid The unique id of the Account that is responsible for
# this resource.
# @param [String] domain_sid The unique string that that we created to identify
# the SipDomain resource.
# @param [String] domain_sid The unique string that is created to identify the
# SipDomain resource.
# @return [IpAccessControlListMappingList] IpAccessControlListMappingList
def initialize(version, account_sid: nil, domain_sid: nil)
super(version)
Expand Down Expand Up @@ -232,8 +232,8 @@ class IpAccessControlListMappingInstance < InstanceResource
# @param [Hash] payload payload that contains response from Twilio
# @param [String] account_sid The unique id of the Account that is responsible for
# this resource.
# @param [String] domain_sid The unique string that that we created to identify
# the SipDomain resource.
# @param [String] domain_sid The unique string that is created to identify the
# SipDomain resource.
# @param [String] sid A 34 character string that uniquely identifies the resource
# to fetch.
# @return [IpAccessControlListMappingInstance] IpAccessControlListMappingInstance
Expand All @@ -245,10 +245,10 @@ def initialize(version, payload, account_sid: nil, domain_sid: nil, sid: nil)
'account_sid' => payload['account_sid'],
'date_created' => Twilio.deserialize_rfc2822(payload['date_created']),
'date_updated' => Twilio.deserialize_rfc2822(payload['date_updated']),
'domain_sid' => payload['domain_sid'],
'friendly_name' => payload['friendly_name'],
'sid' => payload['sid'],
'uri' => payload['uri'],
'subresource_uris' => payload['subresource_uris'],
}

# Context
Expand Down Expand Up @@ -294,6 +294,12 @@ def date_updated
@properties['date_updated']
end

##
# @return [String] The unique string that identifies the SipDomain resource.
def domain_sid
@properties['domain_sid']
end

##
# @return [String] A human readable descriptive text for this resource, up to 64 characters long.
def friendly_name
Expand All @@ -312,12 +318,6 @@ def uri
@properties['uri']
end

##
# @return [String] The list of IP addresses associated with this domain.
def subresource_uris
@properties['subresource_uris']
end

##
# Fetch the IpAccessControlListMappingInstance
# @return [IpAccessControlListMappingInstance] Fetched IpAccessControlListMappingInstance
Expand Down
6 changes: 6 additions & 0 deletions lib/twilio-ruby/rest/insights.rb
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,12 @@ def calls(sid=:unset)
self.v1.calls(sid)
end

##
# @return [Twilio::REST::Insights::V1::CallSummariesInstance]
def call_summaries
self.v1.call_summaries()
end

##
# @param [String] room_sid Unique identifier for the room.
# @return [Twilio::REST::Insights::V1::RoomInstance] if room_sid was passed.
Expand Down
7 changes: 7 additions & 0 deletions lib/twilio-ruby/rest/insights/v1.rb
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ def initialize(domain)
super
@version = 'v1'
@calls = nil
@call_summaries = nil
@rooms = nil
end

Expand All @@ -34,6 +35,12 @@ def calls(sid=:unset)
end
end

##
# @return [Twilio::REST::Insights::V1::CallSummariesContext]
def call_summaries
@call_summaries ||= CallSummariesList.new self
end

##
# @param [String] room_sid The SID of the Room resource.
# @return [Twilio::REST::Insights::V1::RoomContext] if room_sid was passed.
Expand Down
Loading

0 comments on commit 6ee606a

Please sign in to comment.