Skip to content

Commit

Permalink
Merge branch 'main' into EDGSUP-16
Browse files Browse the repository at this point in the history
  • Loading branch information
KobeBrooks authored Oct 24, 2023
2 parents 7ccf791 + f5859f5 commit ea3b039
Show file tree
Hide file tree
Showing 15 changed files with 102 additions and 53 deletions.
34 changes: 34 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,40 @@
twilio-ruby changelog
=====================

[2023-10-19] Version 6.8.0
--------------------------
**Library - Chore**
- [PR #682](https://github.com/twilio/twilio-ruby/pull/682): Removing Test Related To Deprecated Endpoint - OAuth. Thanks to [@KobeBrooks](https://github.com/KobeBrooks)!

**Library - Fix**
- [PR #680](https://github.com/twilio/twilio-ruby/pull/680): update validate ssl method with new endpoint. Thanks to [@AsabuHere](https://github.com/AsabuHere)!

**Accounts**
- Updated Safelist metadata to correct the docs.
- Add Global SafeList API changes

**Api**
- Added optional parameter `CallToken` for create participant api

**Flex**
- Adding `offline_config` to Flex Configuration

**Intelligence**
- Deleted `redacted` parameter from fetching transcript in v2 **(breaking change)**

**Lookups**
- Add new `phone_number_quality_score` package to the lookup response
- Remove `disposable_phone_number_risk` package **(breaking change)**

**Messaging**
- Update US App To Person documentation with current `message_samples` requirements

**Taskrouter**
- Remove beta_feature check on task_queue_bulk_real_time_statistics endpoint
- Add `virtual_start_time` property to tasks
- Updating `task_queue_data` format from `map` to `array` in the response of bulk get endpoint of TaskQueue Real Time Statistics API **(breaking change)**


[2023-10-05] Version 6.7.1
--------------------------
**Library - Chore**
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,13 +39,13 @@ This library supports the following Ruby implementations:
To install using [Bundler][bundler] grab the latest stable version:

```ruby
gem 'twilio-ruby', '~> 6.7.1'
gem 'twilio-ruby', '~> 6.8.0'
```

To manually install `twilio-ruby` via [Rubygems][rubygems] simply gem install:

```bash
gem install twilio-ruby -v 6.7.1
gem install twilio-ruby -v 6.8.0
```

To build and install the development branch yourself from the latest source:
Expand Down
6 changes: 6 additions & 0 deletions lib/twilio-ruby/rest/accounts/v1.rb
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ def initialize(domain)
@version = 'v1'
@auth_token_promotion = nil
@credentials = nil
@safelist = nil
@secondary_auth_token = nil
end

Expand All @@ -37,6 +38,11 @@ def credentials
@credentials ||= CredentialList.new self
end
##
# @return [Twilio::REST::Accounts::V1::SafelistList]
def safelist
@safelist ||= SafelistList.new self
end
##
# @return [Twilio::REST::Accounts::V1::secondaryAuthTokenContext]
def secondary_auth_token
@secondary_auth_token ||= SecondaryAuthTokenContext.new self
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
# | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
# | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
#
# Twilio - Api
# Twilio - Accounts
# This is the public Twilio REST API.
#
# NOTE: This class is auto generated by OpenAPI Generator.
Expand All @@ -15,8 +15,8 @@

module Twilio
module REST
class Api < ApiBase
class V2010 < Version
class Accounts < AccountsBase
class V1 < Version
class SafelistList < ListResource
##
# Initialize the SafelistList
Expand All @@ -26,7 +26,7 @@ def initialize(version)
super(version)
# Path Solution
@solution = { }
@uri = "/SafeList/Numbers.json"
@uri = "/SafeList/Numbers"

end
##
Expand Down Expand Up @@ -85,7 +85,7 @@ def fetch(

# Provide a user friendly representation
def to_s
'#<Twilio.Api.V2010.SafelistList>'
'#<Twilio.Accounts.V1.SafelistList>'
end
end

Expand Down Expand Up @@ -114,7 +114,7 @@ def get_instance(payload)
##
# Provide a user friendly representation
def to_s
'<Twilio.Api.V2010.SafelistPage>'
'<Twilio.Accounts.V1.SafelistPage>'
end
end
class SafelistInstance < InstanceResource
Expand Down Expand Up @@ -153,13 +153,13 @@ def phone_number
##
# Provide a user friendly representation
def to_s
"<Twilio.Api.V2010.SafelistInstance>"
"<Twilio.Accounts.V1.SafelistInstance>"
end

##
# Provide a detailed, user friendly representation
def inspect
"<Twilio.Api.V2010.SafelistInstance>"
"<Twilio.Accounts.V1.SafelistInstance>"
end
end

Expand Down
6 changes: 0 additions & 6 deletions lib/twilio-ruby/rest/api/v2010.rb
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ def initialize(domain)
super
@version = '2010-04-01'
@accounts = nil
@safelist = nil
end

##
Expand Down Expand Up @@ -123,11 +122,6 @@ def accounts(sid=:unset)
end
end
##
# @return [Twilio::REST::Api::V2010::SafelistList]
def safelist
@safelist ||= SafelistList.new self
end
##
# Provide a user friendly representation
def to_s
'<Twilio::REST::Api::V2010>';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@ def initialize(version, account_sid: nil, conference_sid: nil)
# @param [String] amd_status_callback The URL that we should call using the `amd_status_callback_method` to notify customer application whether the call was answered by human, machine or fax.
# @param [String] amd_status_callback_method The HTTP method we should use when calling the `amd_status_callback` URL. Can be: `GET` or `POST` and the default is `POST`.
# @param [String] trim Whether to trim any leading and trailing silence from the participant recording. Can be: `trim-silence` or `do-not-trim` and the default is `trim-silence`.
# @param [String] call_token A token string needed to invoke a forwarded call. A call_token is generated when an incoming call is received on a Twilio number. Pass an incoming call's call_token value to a forwarded call via the call_token parameter when creating a new call. A forwarded call should bear the same CallerID of the original incoming call.
# @return [ParticipantInstance] Created ParticipantInstance
def create(
from: nil,
Expand Down Expand Up @@ -129,7 +130,8 @@ def create(
machine_detection_silence_timeout: :unset,
amd_status_callback: :unset,
amd_status_callback_method: :unset,
trim: :unset
trim: :unset,
call_token: :unset
)

data = Twilio::Values.of({
Expand Down Expand Up @@ -180,6 +182,7 @@ def create(
'AmdStatusCallback' => amd_status_callback,
'AmdStatusCallbackMethod' => amd_status_callback_method,
'Trim' => trim,
'CallToken' => call_token,
})

payload = @version.create('POST', @uri, data: data)
Expand Down
7 changes: 7 additions & 0 deletions lib/twilio-ruby/rest/flex_api/v1/configuration.rb
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,7 @@ def initialize(version, payload )
'flex_ui_status_report' => payload['flex_ui_status_report'],
'agent_conv_end_methods' => payload['agent_conv_end_methods'],
'citrix_voice_vdi' => payload['citrix_voice_vdi'],
'offline_config' => payload['offline_config'],
}

# Context
Expand Down Expand Up @@ -477,6 +478,12 @@ def citrix_voice_vdi
@properties['citrix_voice_vdi']
end

##
# @return [Hash] Presence and presence ttl configuration
def offline_config
@properties['offline_config']
end

##
# Fetch the ConfigurationInstance
# @param [String] ui_version The Pinned UI version of the Configuration resource to fetch.
Expand Down
19 changes: 4 additions & 15 deletions lib/twilio-ruby/rest/intelligence/v2/transcript.rb
Original file line number Diff line number Diff line change
Expand Up @@ -229,16 +229,10 @@ def delete

##
# Fetch the TranscriptInstance
# @param [Boolean] redacted Grant access to PII Redacted/Unredacted Transcript. The default is `true` to access redacted Transcript.
# @return [TranscriptInstance] Fetched TranscriptInstance
def fetch(
redacted: :unset
)
def fetch

params = Twilio::Values.of({
'Redacted' => redacted,
})
payload = @version.fetch('GET', @uri, params: params)
payload = @version.fetch('GET', @uri)
TranscriptInstance.new(
@version,
payload,
Expand Down Expand Up @@ -478,15 +472,10 @@ def delete

##
# Fetch the TranscriptInstance
# @param [Boolean] redacted Grant access to PII Redacted/Unredacted Transcript. The default is `true` to access redacted Transcript.
# @return [TranscriptInstance] Fetched TranscriptInstance
def fetch(
redacted: :unset
)
def fetch

context.fetch(
redacted: redacted,
)
context.fetch
end

##
Expand Down
4 changes: 2 additions & 2 deletions lib/twilio-ruby/rest/intelligence/v2/transcript/media.rb
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ def initialize(version, sid)
end
##
# Fetch the MediaInstance
# @param [Boolean] redacted Grant access to PII Redacted/Unredacted Media. The default is `true` to access redacted media.
# @param [Boolean] redacted Grant access to PII Redacted/Unredacted Media. If redaction is enabled, the default is `true` to access redacted media.
# @return [MediaInstance] Fetched MediaInstance
def fetch(
redacted: :unset
Expand Down Expand Up @@ -191,7 +191,7 @@ def url

##
# Fetch the MediaInstance
# @param [Boolean] redacted Grant access to PII Redacted/Unredacted Media. The default is `true` to access redacted media.
# @param [Boolean] redacted Grant access to PII Redacted/Unredacted Media. If redaction is enabled, the default is `true` to access redacted media.
# @return [MediaInstance] Fetched MediaInstance
def fetch(
redacted: :unset
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ def initialize(version, transcript_sid: nil)
# Lists OperatorResultInstance records from the API as a list.
# Unlike stream(), this operation is eager and will load `limit` records into
# memory before returning.
# @param [Boolean] redacted Grant access to PII redacted/unredacted Language Understanding operator. The default is True.
# @param [Boolean] redacted Grant access to PII redacted/unredacted Language Understanding operator. If redaction is enabled, the default is True.
# @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
Expand All @@ -56,7 +56,7 @@ def list(redacted: :unset, 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 [Boolean] redacted Grant access to PII redacted/unredacted Language Understanding operator. The default is True.
# @param [Boolean] redacted Grant access to PII redacted/unredacted Language Understanding operator. If redaction is enabled, the default is True.
# @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
Expand Down Expand Up @@ -91,7 +91,7 @@ def each
##
# Retrieve a single page of OperatorResultInstance records from the API.
# Request is executed immediately.
# @param [Boolean] redacted Grant access to PII redacted/unredacted Language Understanding operator. The default is True.
# @param [Boolean] redacted Grant access to PII redacted/unredacted Language Understanding operator. If redaction is enabled, the default is True.
# @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
Expand Down Expand Up @@ -151,7 +151,7 @@ def initialize(version, transcript_sid, operator_sid)
end
##
# Fetch the OperatorResultInstance
# @param [Boolean] redacted Grant access to PII redacted/unredacted Language Understanding operator. The default is True.
# @param [Boolean] redacted Grant access to PII redacted/unredacted Language Understanding operator. If redaction is enabled, the default is True.
# @return [OperatorResultInstance] Fetched OperatorResultInstance
def fetch(
redacted: :unset
Expand Down Expand Up @@ -346,7 +346,7 @@ def url

##
# Fetch the OperatorResultInstance
# @param [Boolean] redacted Grant access to PII redacted/unredacted Language Understanding operator. The default is True.
# @param [Boolean] redacted Grant access to PII redacted/unredacted Language Understanding operator. If redaction is enabled, the default is True.
# @return [OperatorResultInstance] Fetched OperatorResultInstance
def fetch(
redacted: :unset
Expand Down
6 changes: 3 additions & 3 deletions lib/twilio-ruby/rest/intelligence/v2/transcript/sentence.rb
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ def initialize(version, transcript_sid: nil)
# Lists SentenceInstance records from the API as a list.
# Unlike stream(), this operation is eager and will load `limit` records into
# memory before returning.
# @param [Boolean] redacted Grant access to PII Redacted/Unredacted Sentences. The default is `true` to access redacted sentences.
# @param [Boolean] redacted Grant access to PII Redacted/Unredacted Sentences. If redaction is enabled, the default is `true` to access redacted sentences.
# @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
Expand All @@ -56,7 +56,7 @@ def list(redacted: :unset, 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 [Boolean] redacted Grant access to PII Redacted/Unredacted Sentences. The default is `true` to access redacted sentences.
# @param [Boolean] redacted Grant access to PII Redacted/Unredacted Sentences. If redaction is enabled, the default is `true` to access redacted sentences.
# @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
Expand Down Expand Up @@ -91,7 +91,7 @@ def each
##
# Retrieve a single page of SentenceInstance records from the API.
# Request is executed immediately.
# @param [Boolean] redacted Grant access to PII Redacted/Unredacted Sentences. The default is `true` to access redacted sentences.
# @param [Boolean] redacted Grant access to PII Redacted/Unredacted Sentences. If redaction is enabled, the default is `true` to access redacted sentences.
# @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
Expand Down
8 changes: 4 additions & 4 deletions lib/twilio-ruby/rest/lookups/v2/phone_number.rb
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ def initialize(version, payload , phone_number: nil)
'identity_match' => payload['identity_match'],
'reassigned_number' => payload['reassigned_number'],
'sms_pumping_risk' => payload['sms_pumping_risk'],
'disposable_phone_number_risk' => payload['disposable_phone_number_risk'],
'phone_number_quality_score' => payload['phone_number_quality_score'],
'url' => payload['url'],
}

Expand Down Expand Up @@ -289,9 +289,9 @@ def sms_pumping_risk
end

##
# @return [Hash] An object that contains information on if a mobile phone number could be a disposable or burner number.
def disposable_phone_number_risk
@properties['disposable_phone_number_risk']
# @return [Hash] An object that contains information of a mobile phone number quality score. Quality score will return a risk score about the phone number.
def phone_number_quality_score
@properties['phone_number_quality_score']
end

##
Expand Down
Loading

0 comments on commit ea3b039

Please sign in to comment.