Skip to content

Commit

Permalink
[Librarian] Regenerated @ 964f1611ab7481d828261f49551385a276499e30
Browse files Browse the repository at this point in the history
  • Loading branch information
twilio-dx committed Dec 14, 2022
1 parent 4973ed6 commit bfd65b4
Show file tree
Hide file tree
Showing 27 changed files with 695 additions and 79 deletions.
33 changes: 33 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,39 @@
twilio-ruby changelog
=====================

[2022-12-14] Version 5.74.0
---------------------------
**Api**
- Add `street_secondary` param to address create and update
- Make `method` optional for user defined message subscription **(breaking change)**

**Flex**
- Flex Conversations is now Generally Available
- Adding the ie1 mapping for authorization api, updating service base uri and base url response attribute **(breaking change)**
- Change web channels to GA and library visibility to public
- Changing the uri for authorization api from using Accounts to Insights **(breaking change)**

**Media**
- Gate Twilio Live endpoints behind beta_feature for EOS

**Messaging**
- Mark `MessageFlow` as a required field for Campaign Creation **(breaking change)**

**Oauth**
- updated openid discovery endpoint uri **(breaking change)**
- Added device code authorization endpoint

**Supersim**
- Allow filtering the SettingsUpdates resource by `status`

**Twiml**
- Add new Polly Neural voices
- Add tr-TR, ar-AE, yue-CN, fi-FI languages to SSML `<lang>` element.
- Add x-amazon-jyutping, x-amazon-pinyin, x-amazon-pron-kana, x-amazon-yomigana alphabets to SSML `<phoneme>` element.
- Rename `character` value for SSML `<say-as>` `interpret-as` attribute to `characters`. **(breaking change)**
- Rename `role` attribute to `format` in SSML `<say-as>` element. **(breaking change)**


[2022-11-30] Version 5.73.4
---------------------------
**Flex**
Expand Down
22 changes: 19 additions & 3 deletions lib/twilio-ruby/rest/api/v2010/account/address.rb
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,10 @@ def initialize(version, account_sid: nil)
# the address. Can be: `true` or `false` and the default is `true`. If empty or
# `true`, we will correct the address you provide if necessary. If `false`, we
# won't alter the address you provide.
# @param [String] street_secondary The additional number and street address of the
# address.
# @return [AddressInstance] Created AddressInstance
def create(customer_name: nil, street: nil, city: nil, region: nil, postal_code: nil, iso_country: nil, friendly_name: :unset, emergency_enabled: :unset, auto_correct_address: :unset)
def create(customer_name: nil, street: nil, city: nil, region: nil, postal_code: nil, iso_country: nil, friendly_name: :unset, emergency_enabled: :unset, auto_correct_address: :unset, street_secondary: :unset)
data = Twilio::Values.of({
'CustomerName' => customer_name,
'Street' => street,
Expand All @@ -55,6 +57,7 @@ def create(customer_name: nil, street: nil, city: nil, region: nil, postal_code:
'FriendlyName' => friendly_name,
'EmergencyEnabled' => emergency_enabled,
'AutoCorrectAddress' => auto_correct_address,
'StreetSecondary' => street_secondary,
})

payload = @version.create('POST', @uri, data: data)
Expand Down Expand Up @@ -262,8 +265,10 @@ def fetch
# the address. Can be: `true` or `false` and the default is `true`. If empty or
# `true`, we will correct the address you provide if necessary. If `false`, we
# won't alter the address you provide.
# @param [String] street_secondary The additional number and street address of the
# address.
# @return [AddressInstance] Updated AddressInstance
def update(friendly_name: :unset, customer_name: :unset, street: :unset, city: :unset, region: :unset, postal_code: :unset, emergency_enabled: :unset, auto_correct_address: :unset)
def update(friendly_name: :unset, customer_name: :unset, street: :unset, city: :unset, region: :unset, postal_code: :unset, emergency_enabled: :unset, auto_correct_address: :unset, street_secondary: :unset)
data = Twilio::Values.of({
'FriendlyName' => friendly_name,
'CustomerName' => customer_name,
Expand All @@ -273,6 +278,7 @@ def update(friendly_name: :unset, customer_name: :unset, street: :unset, city: :
'PostalCode' => postal_code,
'EmergencyEnabled' => emergency_enabled,
'AutoCorrectAddress' => auto_correct_address,
'StreetSecondary' => street_secondary,
})

payload = @version.update('POST', @uri, data: data)
Expand Down Expand Up @@ -342,6 +348,7 @@ def initialize(version, payload, account_sid: nil, sid: nil)
'emergency_enabled' => payload['emergency_enabled'],
'validated' => payload['validated'],
'verified' => payload['verified'],
'street_secondary' => payload['street_secondary'],
}

# Context
Expand Down Expand Up @@ -450,6 +457,12 @@ def verified
@properties['verified']
end

##
# @return [String] The additional number and street address of the address
def street_secondary
@properties['street_secondary']
end

##
# Delete the AddressInstance
# @return [Boolean] true if delete succeeds, false otherwise
Expand Down Expand Up @@ -479,8 +492,10 @@ def fetch
# the address. Can be: `true` or `false` and the default is `true`. If empty or
# `true`, we will correct the address you provide if necessary. If `false`, we
# won't alter the address you provide.
# @param [String] street_secondary The additional number and street address of the
# address.
# @return [AddressInstance] Updated AddressInstance
def update(friendly_name: :unset, customer_name: :unset, street: :unset, city: :unset, region: :unset, postal_code: :unset, emergency_enabled: :unset, auto_correct_address: :unset)
def update(friendly_name: :unset, customer_name: :unset, street: :unset, city: :unset, region: :unset, postal_code: :unset, emergency_enabled: :unset, auto_correct_address: :unset, street_secondary: :unset)
context.update(
friendly_name: friendly_name,
customer_name: customer_name,
Expand All @@ -490,6 +505,7 @@ def update(friendly_name: :unset, customer_name: :unset, street: :unset, city: :
postal_code: postal_code,
emergency_enabled: emergency_enabled,
auto_correct_address: auto_correct_address,
street_secondary: street_secondary,
)
end

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,16 +37,16 @@ def initialize(version, account_sid: nil, call_sid: nil)
# @param [String] callback The URL we should call using the `method` to send user
# defined events to your application. URLs must contain a valid hostname
# (underscores are not permitted).
# @param [String] method The HTTP method Twilio will use when requesting the above
# `Url`. Either `GET` or `POST`.
# @param [String] idempotency_key A unique string value to identify API call. This
# should be a unique string value per API call and can be a randomly generated.
# @param [String] method The HTTP method Twilio will use when requesting the above
# `Url`. Either `GET` or `POST`.
# @return [UserDefinedMessageSubscriptionInstance] Created UserDefinedMessageSubscriptionInstance
def create(callback: nil, method: nil, idempotency_key: :unset)
def create(callback: nil, idempotency_key: :unset, method: :unset)
data = Twilio::Values.of({
'Callback' => callback,
'Method' => method,
'IdempotencyKey' => idempotency_key,
'Method' => method,
})

payload = @version.create('POST', @uri, data: data)
Expand Down
13 changes: 13 additions & 0 deletions lib/twilio-ruby/rest/flex_api.rb
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ def initialize(twilio)

# Versions
@v1 = nil
@v2 = nil
end

##
Expand All @@ -28,6 +29,12 @@ def v1
@v1 ||= V1.new self
end

##
# Version v2 of flex_api
def v2
@v2 ||= V2.new self
end

##
# @return [Twilio::REST::Flex_api::V1::AssessmentsInstance]
def assessments
Expand Down Expand Up @@ -88,6 +95,12 @@ def web_channel(sid=:unset)
self.v1.web_channel(sid)
end

##
# @return [Twilio::REST::Flex_api::V2::WebChannelsInstance]
def web_channels
self.v2.web_channels()
end

##
# Provide a user friendly representation
def to_s
Expand Down
12 changes: 6 additions & 6 deletions lib/twilio-ruby/rest/flex_api/v1/good_data.rb
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ def initialize(version)

# Path Solution
@solution = {}
@uri = "/Accounts/GoodData"
@uri = "/Insights/Session"
end

##
Expand Down Expand Up @@ -112,7 +112,7 @@ def initialize(version, payload)
'workspace_id' => payload['workspace_id'],
'session_expiry' => payload['session_expiry'],
'session_id' => payload['session_id'],
'gd_base_url' => payload['gd_base_url'],
'base_url' => payload['base_url'],
'url' => payload['url'],
}

Expand All @@ -133,7 +133,7 @@ def context
end

##
# @return [String] Unique workspace ID in gooddata
# @return [String] Unique ID to identify the user's workspace
def workspace_id
@properties['workspace_id']
end
Expand All @@ -151,9 +151,9 @@ def session_id
end

##
# @return [String] GoodData login base URL
def gd_base_url
@properties['gd_base_url']
# @return [String] Base URL to fetch reports and dashboards
def base_url
@properties['base_url']
end

##
Expand Down
2 changes: 1 addition & 1 deletion lib/twilio-ruby/rest/flex_api/v1/user_roles.rb
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ def initialize(version)

# Path Solution
@solution = {}
@uri = "/Accounts/UserRoles"
@uri = "/Insights/UserRoles"
end

##
Expand Down
35 changes: 35 additions & 0 deletions lib/twilio-ruby/rest/flex_api/v2.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
##
# This code was generated by
# \ / _ _ _| _ _
# | (_)\/(_)(_|\/| |(/_ v1.0.0
# / /
#
# frozen_string_literal: true

module Twilio
module REST
class FlexApi
class V2 < Version
##
# Initialize the V2 version of FlexApi
def initialize(domain)
super
@version = 'v2'
@web_channels = nil
end

##
# @return [Twilio::REST::Flex_api::V2::WebChannelsContext]
def web_channels
@web_channels ||= WebChannelsList.new self
end

##
# Provide a user friendly representation
def to_s
'<Twilio::REST::FlexApi::V2>'
end
end
end
end
end
133 changes: 133 additions & 0 deletions lib/twilio-ruby/rest/flex_api/v2/web_channels.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,133 @@
##
# This code was generated by
# \ / _ _ _| _ _
# | (_)\/(_)(_|\/| |(/_ v1.0.0
# / /
#
# frozen_string_literal: true

module Twilio
module REST
class FlexApi < Domain
class V2 < Version
class WebChannelsList < ListResource
##
# Initialize the WebChannelsList
# @param [Version] version Version that contains the resource
# @return [WebChannelsList] WebChannelsList
def initialize(version)
super(version)

# Path Solution
@solution = {}
@uri = "/WebChats"
end

##
# Create the WebChannelsInstance
# @param [String] address_sid The SID of the Conversations Address. See {Address
# Configuration
# Resource}[https://www.twilio.com/docs/conversations/api/address-configuration-resource]
# for configuration details. When a conversation is created on the Flex backend,
# the callback URL will be set to the corresponding Studio Flow SID or webhook URL
# in your address configuration.
# @param [String] chat_friendly_name The Conversation's friendly name. See the
# {Conversation
# resource}[https://www.twilio.com/docs/conversations/api/conversation-resource]
# for an example.
# @param [String] customer_friendly_name The Conversation participant's friendly
# name. See the {Conversation Participant
# Resource}[https://www.twilio.com/docs/conversations/api/conversation-participant-resource]
# for an example.
# @param [String] pre_engagement_data The pre-engagement data.
# @return [WebChannelsInstance] Created WebChannelsInstance
def create(address_sid: nil, chat_friendly_name: :unset, customer_friendly_name: :unset, pre_engagement_data: :unset)
data = Twilio::Values.of({
'AddressSid' => address_sid,
'ChatFriendlyName' => chat_friendly_name,
'CustomerFriendlyName' => customer_friendly_name,
'PreEngagementData' => pre_engagement_data,
})

payload = @version.create('POST', @uri, data: data)

WebChannelsInstance.new(@version, payload, )
end

##
# Provide a user friendly representation
def to_s
'#<Twilio.FlexApi.V2.WebChannelsList>'
end
end

class WebChannelsPage < Page
##
# Initialize the WebChannelsPage
# @param [Version] version Version that contains the resource
# @param [Response] response Response from the API
# @param [Hash] solution Path solution for the resource
# @return [WebChannelsPage] WebChannelsPage
def initialize(version, response, solution)
super(version, response)

# Path Solution
@solution = solution
end

##
# Build an instance of WebChannelsInstance
# @param [Hash] payload Payload response from the API
# @return [WebChannelsInstance] WebChannelsInstance
def get_instance(payload)
WebChannelsInstance.new(@version, payload, )
end

##
# Provide a user friendly representation
def to_s
'<Twilio.FlexApi.V2.WebChannelsPage>'
end
end

class WebChannelsInstance < InstanceResource
##
# Initialize the WebChannelsInstance
# @param [Version] version Version that contains the resource
# @param [Hash] payload payload that contains response from Twilio
# @return [WebChannelsInstance] WebChannelsInstance
def initialize(version, payload)
super(version)

# Marshaled Properties
@properties = {'conversation_sid' => payload['conversation_sid'], 'identity' => payload['identity'], }
end

##
# @return [String] The unique string representing the Conversation resource created
def conversation_sid
@properties['conversation_sid']
end

##
# @return [String] The unique string representing the User created
def identity
@properties['identity']
end

##
# Provide a user friendly representation
def to_s
"<Twilio.FlexApi.V2.WebChannelsInstance>"
end

##
# Provide a detailed, user friendly representation
def inspect
"<Twilio.FlexApi.V2.WebChannelsInstance>"
end
end
end
end
end
end
Loading

0 comments on commit bfd65b4

Please sign in to comment.