forked from twilio/twilio-ruby
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Librarian] Regenerated @ 964f1611ab7481d828261f49551385a276499e30
- Loading branch information
Showing
27 changed files
with
695 additions
and
79 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
Oops, something went wrong.