twilio-ruby 5.73.0 → 5.73.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGES.md +32 -0
- data/README.md +2 -2
- data/lib/twilio-ruby/rest/api/v2010/account/call/user_defined_message.rb +160 -0
- data/lib/twilio-ruby/rest/api/v2010/account/call/user_defined_message_subscription.rb +251 -0
- data/lib/twilio-ruby/rest/api/v2010/account/call.rb +59 -0
- data/lib/twilio-ruby/rest/api/v2010/account/message.rb +10 -1
- data/lib/twilio-ruby/rest/flex_api/v1/good_data.rb +183 -0
- data/lib/twilio-ruby/rest/flex_api/v1/user_roles.rb +166 -0
- data/lib/twilio-ruby/rest/flex_api/v1.rb +14 -0
- data/lib/twilio-ruby/rest/flex_api.rb +12 -0
- data/lib/twilio-ruby/rest/messaging/v1/service/us_app_to_person.rb +71 -1
- data/lib/twilio-ruby/rest/proxy/v1/service/session/participant.rb +1 -14
- data/lib/twilio-ruby/rest/proxy/v1/service/session.rb +4 -45
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/task/reservation.rb +18 -5
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/task_queue.rb +9 -3
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/worker.rb +9 -3
- data/lib/twilio-ruby/rest/verify/v2/service/verification.rb +2 -2
- data/lib/twilio-ruby/rest/verify/v2/template.rb +1 -1
- data/lib/twilio-ruby/twiml/voice_response.rb +4 -2
- data/lib/twilio-ruby/version.rb +1 -1
- metadata +6 -2
@@ -0,0 +1,183 @@
|
|
1
|
+
##
|
2
|
+
# This code was generated by
|
3
|
+
# \ / _ _ _| _ _
|
4
|
+
# | (_)\/(_)(_|\/| |(/_ v1.0.0
|
5
|
+
# / /
|
6
|
+
#
|
7
|
+
# frozen_string_literal: true
|
8
|
+
|
9
|
+
module Twilio
|
10
|
+
module REST
|
11
|
+
class FlexApi < Domain
|
12
|
+
class V1 < Version
|
13
|
+
class GoodDataList < ListResource
|
14
|
+
##
|
15
|
+
# Initialize the GoodDataList
|
16
|
+
# @param [Version] version Version that contains the resource
|
17
|
+
# @return [GoodDataList] GoodDataList
|
18
|
+
def initialize(version)
|
19
|
+
super(version)
|
20
|
+
|
21
|
+
# Path Solution
|
22
|
+
@solution = {}
|
23
|
+
end
|
24
|
+
|
25
|
+
##
|
26
|
+
# Provide a user friendly representation
|
27
|
+
def to_s
|
28
|
+
'#<Twilio.FlexApi.V1.GoodDataList>'
|
29
|
+
end
|
30
|
+
end
|
31
|
+
|
32
|
+
class GoodDataPage < Page
|
33
|
+
##
|
34
|
+
# Initialize the GoodDataPage
|
35
|
+
# @param [Version] version Version that contains the resource
|
36
|
+
# @param [Response] response Response from the API
|
37
|
+
# @param [Hash] solution Path solution for the resource
|
38
|
+
# @return [GoodDataPage] GoodDataPage
|
39
|
+
def initialize(version, response, solution)
|
40
|
+
super(version, response)
|
41
|
+
|
42
|
+
# Path Solution
|
43
|
+
@solution = solution
|
44
|
+
end
|
45
|
+
|
46
|
+
##
|
47
|
+
# Build an instance of GoodDataInstance
|
48
|
+
# @param [Hash] payload Payload response from the API
|
49
|
+
# @return [GoodDataInstance] GoodDataInstance
|
50
|
+
def get_instance(payload)
|
51
|
+
GoodDataInstance.new(@version, payload, )
|
52
|
+
end
|
53
|
+
|
54
|
+
##
|
55
|
+
# Provide a user friendly representation
|
56
|
+
def to_s
|
57
|
+
'<Twilio.FlexApi.V1.GoodDataPage>'
|
58
|
+
end
|
59
|
+
end
|
60
|
+
|
61
|
+
class GoodDataContext < InstanceContext
|
62
|
+
##
|
63
|
+
# Initialize the GoodDataContext
|
64
|
+
# @param [Version] version Version that contains the resource
|
65
|
+
# @return [GoodDataContext] GoodDataContext
|
66
|
+
def initialize(version)
|
67
|
+
super(version)
|
68
|
+
|
69
|
+
# Path Solution
|
70
|
+
@solution = {}
|
71
|
+
@uri = "/Accounts/GoodData"
|
72
|
+
end
|
73
|
+
|
74
|
+
##
|
75
|
+
# Create the GoodDataInstance
|
76
|
+
# @param [String] token The Token HTTP request header
|
77
|
+
# @return [GoodDataInstance] Created GoodDataInstance
|
78
|
+
def create(token: :unset)
|
79
|
+
headers = Twilio::Values.of({'Token' => token, })
|
80
|
+
|
81
|
+
payload = @version.create('POST', @uri, headers: headers)
|
82
|
+
|
83
|
+
GoodDataInstance.new(@version, payload, )
|
84
|
+
end
|
85
|
+
|
86
|
+
##
|
87
|
+
# Provide a user friendly representation
|
88
|
+
def to_s
|
89
|
+
context = @solution.map {|k, v| "#{k}: #{v}"}.join(',')
|
90
|
+
"#<Twilio.FlexApi.V1.GoodDataContext #{context}>"
|
91
|
+
end
|
92
|
+
|
93
|
+
##
|
94
|
+
# Provide a detailed, user friendly representation
|
95
|
+
def inspect
|
96
|
+
context = @solution.map {|k, v| "#{k}: #{v}"}.join(',')
|
97
|
+
"#<Twilio.FlexApi.V1.GoodDataContext #{context}>"
|
98
|
+
end
|
99
|
+
end
|
100
|
+
|
101
|
+
class GoodDataInstance < InstanceResource
|
102
|
+
##
|
103
|
+
# Initialize the GoodDataInstance
|
104
|
+
# @param [Version] version Version that contains the resource
|
105
|
+
# @param [Hash] payload payload that contains response from Twilio
|
106
|
+
# @return [GoodDataInstance] GoodDataInstance
|
107
|
+
def initialize(version, payload)
|
108
|
+
super(version)
|
109
|
+
|
110
|
+
# Marshaled Properties
|
111
|
+
@properties = {
|
112
|
+
'workspace_id' => payload['workspace_id'],
|
113
|
+
'session_expiry' => payload['session_expiry'],
|
114
|
+
'session_id' => payload['session_id'],
|
115
|
+
'url' => payload['url'],
|
116
|
+
}
|
117
|
+
|
118
|
+
# Context
|
119
|
+
@instance_context = nil
|
120
|
+
@params = {}
|
121
|
+
end
|
122
|
+
|
123
|
+
##
|
124
|
+
# Generate an instance context for the instance, the context is capable of
|
125
|
+
# performing various actions. All instance actions are proxied to the context
|
126
|
+
# @return [GoodDataContext] GoodDataContext for this GoodDataInstance
|
127
|
+
def context
|
128
|
+
unless @instance_context
|
129
|
+
@instance_context = GoodDataContext.new(@version, )
|
130
|
+
end
|
131
|
+
@instance_context
|
132
|
+
end
|
133
|
+
|
134
|
+
##
|
135
|
+
# @return [String] Unique workspace ID in gooddata
|
136
|
+
def workspace_id
|
137
|
+
@properties['workspace_id']
|
138
|
+
end
|
139
|
+
|
140
|
+
##
|
141
|
+
# @return [String] The session expiry date and time
|
142
|
+
def session_expiry
|
143
|
+
@properties['session_expiry']
|
144
|
+
end
|
145
|
+
|
146
|
+
##
|
147
|
+
# @return [String] Unique session ID
|
148
|
+
def session_id
|
149
|
+
@properties['session_id']
|
150
|
+
end
|
151
|
+
|
152
|
+
##
|
153
|
+
# @return [String] The URL of this resource.
|
154
|
+
def url
|
155
|
+
@properties['url']
|
156
|
+
end
|
157
|
+
|
158
|
+
##
|
159
|
+
# Create the GoodDataInstance
|
160
|
+
# @param [String] token The Token HTTP request header
|
161
|
+
# @return [GoodDataInstance] Created GoodDataInstance
|
162
|
+
def create(token: :unset)
|
163
|
+
context.create(token: token, )
|
164
|
+
end
|
165
|
+
|
166
|
+
##
|
167
|
+
# Provide a user friendly representation
|
168
|
+
def to_s
|
169
|
+
values = @params.map{|k, v| "#{k}: #{v}"}.join(" ")
|
170
|
+
"<Twilio.FlexApi.V1.GoodDataInstance #{values}>"
|
171
|
+
end
|
172
|
+
|
173
|
+
##
|
174
|
+
# Provide a detailed, user friendly representation
|
175
|
+
def inspect
|
176
|
+
values = @properties.map{|k, v| "#{k}: #{v}"}.join(" ")
|
177
|
+
"<Twilio.FlexApi.V1.GoodDataInstance #{values}>"
|
178
|
+
end
|
179
|
+
end
|
180
|
+
end
|
181
|
+
end
|
182
|
+
end
|
183
|
+
end
|
@@ -0,0 +1,166 @@
|
|
1
|
+
##
|
2
|
+
# This code was generated by
|
3
|
+
# \ / _ _ _| _ _
|
4
|
+
# | (_)\/(_)(_|\/| |(/_ v1.0.0
|
5
|
+
# / /
|
6
|
+
#
|
7
|
+
# frozen_string_literal: true
|
8
|
+
|
9
|
+
module Twilio
|
10
|
+
module REST
|
11
|
+
class FlexApi < Domain
|
12
|
+
class V1 < Version
|
13
|
+
class UserRolesList < ListResource
|
14
|
+
##
|
15
|
+
# Initialize the UserRolesList
|
16
|
+
# @param [Version] version Version that contains the resource
|
17
|
+
# @return [UserRolesList] UserRolesList
|
18
|
+
def initialize(version)
|
19
|
+
super(version)
|
20
|
+
|
21
|
+
# Path Solution
|
22
|
+
@solution = {}
|
23
|
+
end
|
24
|
+
|
25
|
+
##
|
26
|
+
# Provide a user friendly representation
|
27
|
+
def to_s
|
28
|
+
'#<Twilio.FlexApi.V1.UserRolesList>'
|
29
|
+
end
|
30
|
+
end
|
31
|
+
|
32
|
+
class UserRolesPage < Page
|
33
|
+
##
|
34
|
+
# Initialize the UserRolesPage
|
35
|
+
# @param [Version] version Version that contains the resource
|
36
|
+
# @param [Response] response Response from the API
|
37
|
+
# @param [Hash] solution Path solution for the resource
|
38
|
+
# @return [UserRolesPage] UserRolesPage
|
39
|
+
def initialize(version, response, solution)
|
40
|
+
super(version, response)
|
41
|
+
|
42
|
+
# Path Solution
|
43
|
+
@solution = solution
|
44
|
+
end
|
45
|
+
|
46
|
+
##
|
47
|
+
# Build an instance of UserRolesInstance
|
48
|
+
# @param [Hash] payload Payload response from the API
|
49
|
+
# @return [UserRolesInstance] UserRolesInstance
|
50
|
+
def get_instance(payload)
|
51
|
+
UserRolesInstance.new(@version, payload, )
|
52
|
+
end
|
53
|
+
|
54
|
+
##
|
55
|
+
# Provide a user friendly representation
|
56
|
+
def to_s
|
57
|
+
'<Twilio.FlexApi.V1.UserRolesPage>'
|
58
|
+
end
|
59
|
+
end
|
60
|
+
|
61
|
+
class UserRolesContext < InstanceContext
|
62
|
+
##
|
63
|
+
# Initialize the UserRolesContext
|
64
|
+
# @param [Version] version Version that contains the resource
|
65
|
+
# @return [UserRolesContext] UserRolesContext
|
66
|
+
def initialize(version)
|
67
|
+
super(version)
|
68
|
+
|
69
|
+
# Path Solution
|
70
|
+
@solution = {}
|
71
|
+
@uri = "/Accounts/UserRoles"
|
72
|
+
end
|
73
|
+
|
74
|
+
##
|
75
|
+
# Fetch the UserRolesInstance
|
76
|
+
# @param [String] token The Token HTTP request header
|
77
|
+
# @return [UserRolesInstance] Fetched UserRolesInstance
|
78
|
+
def fetch(token: :unset)
|
79
|
+
headers = Twilio::Values.of({'Token' => token, })
|
80
|
+
|
81
|
+
payload = @version.fetch('GET', @uri, headers: headers)
|
82
|
+
|
83
|
+
UserRolesInstance.new(@version, payload, )
|
84
|
+
end
|
85
|
+
|
86
|
+
##
|
87
|
+
# Provide a user friendly representation
|
88
|
+
def to_s
|
89
|
+
context = @solution.map {|k, v| "#{k}: #{v}"}.join(',')
|
90
|
+
"#<Twilio.FlexApi.V1.UserRolesContext #{context}>"
|
91
|
+
end
|
92
|
+
|
93
|
+
##
|
94
|
+
# Provide a detailed, user friendly representation
|
95
|
+
def inspect
|
96
|
+
context = @solution.map {|k, v| "#{k}: #{v}"}.join(',')
|
97
|
+
"#<Twilio.FlexApi.V1.UserRolesContext #{context}>"
|
98
|
+
end
|
99
|
+
end
|
100
|
+
|
101
|
+
class UserRolesInstance < InstanceResource
|
102
|
+
##
|
103
|
+
# Initialize the UserRolesInstance
|
104
|
+
# @param [Version] version Version that contains the resource
|
105
|
+
# @param [Hash] payload payload that contains response from Twilio
|
106
|
+
# @return [UserRolesInstance] UserRolesInstance
|
107
|
+
def initialize(version, payload)
|
108
|
+
super(version)
|
109
|
+
|
110
|
+
# Marshaled Properties
|
111
|
+
@properties = {'roles' => payload['roles'], 'url' => payload['url'], }
|
112
|
+
|
113
|
+
# Context
|
114
|
+
@instance_context = nil
|
115
|
+
@params = {}
|
116
|
+
end
|
117
|
+
|
118
|
+
##
|
119
|
+
# Generate an instance context for the instance, the context is capable of
|
120
|
+
# performing various actions. All instance actions are proxied to the context
|
121
|
+
# @return [UserRolesContext] UserRolesContext for this UserRolesInstance
|
122
|
+
def context
|
123
|
+
unless @instance_context
|
124
|
+
@instance_context = UserRolesContext.new(@version, )
|
125
|
+
end
|
126
|
+
@instance_context
|
127
|
+
end
|
128
|
+
|
129
|
+
##
|
130
|
+
# @return [Array[String]] Flex Insights roles for the user
|
131
|
+
def roles
|
132
|
+
@properties['roles']
|
133
|
+
end
|
134
|
+
|
135
|
+
##
|
136
|
+
# @return [String] The url
|
137
|
+
def url
|
138
|
+
@properties['url']
|
139
|
+
end
|
140
|
+
|
141
|
+
##
|
142
|
+
# Fetch the UserRolesInstance
|
143
|
+
# @param [String] token The Token HTTP request header
|
144
|
+
# @return [UserRolesInstance] Fetched UserRolesInstance
|
145
|
+
def fetch(token: :unset)
|
146
|
+
context.fetch(token: token, )
|
147
|
+
end
|
148
|
+
|
149
|
+
##
|
150
|
+
# Provide a user friendly representation
|
151
|
+
def to_s
|
152
|
+
values = @params.map{|k, v| "#{k}: #{v}"}.join(" ")
|
153
|
+
"<Twilio.FlexApi.V1.UserRolesInstance #{values}>"
|
154
|
+
end
|
155
|
+
|
156
|
+
##
|
157
|
+
# Provide a detailed, user friendly representation
|
158
|
+
def inspect
|
159
|
+
values = @properties.map{|k, v| "#{k}: #{v}"}.join(" ")
|
160
|
+
"<Twilio.FlexApi.V1.UserRolesInstance #{values}>"
|
161
|
+
end
|
162
|
+
end
|
163
|
+
end
|
164
|
+
end
|
165
|
+
end
|
166
|
+
end
|
@@ -18,7 +18,9 @@ module Twilio
|
|
18
18
|
@channel = nil
|
19
19
|
@configuration = nil
|
20
20
|
@flex_flow = nil
|
21
|
+
@good_data = nil
|
21
22
|
@interaction = nil
|
23
|
+
@user_roles = nil
|
22
24
|
@web_channel = nil
|
23
25
|
end
|
24
26
|
|
@@ -58,6 +60,12 @@ module Twilio
|
|
58
60
|
end
|
59
61
|
end
|
60
62
|
|
63
|
+
##
|
64
|
+
# @return [Twilio::REST::Flex_api::V1::GoodDataContext]
|
65
|
+
def good_data
|
66
|
+
@good_data ||= GoodDataContext.new self
|
67
|
+
end
|
68
|
+
|
61
69
|
##
|
62
70
|
# @param [String] sid The SID of the Interaction resource to fetch.
|
63
71
|
# @return [Twilio::REST::Flex_api::V1::InteractionContext] if sid was passed.
|
@@ -73,6 +81,12 @@ module Twilio
|
|
73
81
|
end
|
74
82
|
end
|
75
83
|
|
84
|
+
##
|
85
|
+
# @return [Twilio::REST::Flex_api::V1::UserRolesContext]
|
86
|
+
def user_roles
|
87
|
+
@user_roles ||= UserRolesContext.new self
|
88
|
+
end
|
89
|
+
|
76
90
|
##
|
77
91
|
# @param [String] sid The SID of the WebChannel resource to fetch.
|
78
92
|
# @return [Twilio::REST::Flex_api::V1::WebChannelContext] if sid was passed.
|
@@ -52,6 +52,12 @@ module Twilio
|
|
52
52
|
self.v1.flex_flow(sid)
|
53
53
|
end
|
54
54
|
|
55
|
+
##
|
56
|
+
# @return [Twilio::REST::Flex_api::V1::GoodDataInstance]
|
57
|
+
def good_data
|
58
|
+
self.v1.good_data()
|
59
|
+
end
|
60
|
+
|
55
61
|
##
|
56
62
|
# @param [String] sid The unique string created by Twilio to identify an
|
57
63
|
# Interaction resource, prefixed with KD.
|
@@ -61,6 +67,12 @@ module Twilio
|
|
61
67
|
self.v1.interaction(sid)
|
62
68
|
end
|
63
69
|
|
70
|
+
##
|
71
|
+
# @return [Twilio::REST::Flex_api::V1::UserRolesInstance]
|
72
|
+
def user_roles
|
73
|
+
self.v1.user_roles()
|
74
|
+
end
|
75
|
+
|
64
76
|
##
|
65
77
|
# @param [String] sid The unique string that we created to identify the WebChannel
|
66
78
|
# resource.
|
@@ -41,8 +41,22 @@ module Twilio
|
|
41
41
|
# messages that contain links.
|
42
42
|
# @param [Boolean] has_embedded_phone Indicates that this SMS campaign will send
|
43
43
|
# messages that contain phone numbers.
|
44
|
+
# @param [String] message_flow Description of how end users opt-in to the SMS
|
45
|
+
# campaign, therefore giving consent to receive messages.
|
46
|
+
# @param [String] opt_in_message The message that will be sent to the user when
|
47
|
+
# they opt in to the SMS campaign.
|
48
|
+
# @param [String] opt_out_message The message that will be sent to the user when
|
49
|
+
# they opt out of the SMS campaign.
|
50
|
+
# @param [String] help_message The message that will be sent to the user when they
|
51
|
+
# request help for the SMS campaign.
|
52
|
+
# @param [Array[String]] opt_in_keywords The keywords that will be used to opt in
|
53
|
+
# to the SMS campaign.
|
54
|
+
# @param [Array[String]] opt_out_keywords The keywords that will be used to opt
|
55
|
+
# out of the SMS campaign.
|
56
|
+
# @param [Array[String]] help_keywords The keywords that will be used to request
|
57
|
+
# help for the SMS campaign.
|
44
58
|
# @return [UsAppToPersonInstance] Created UsAppToPersonInstance
|
45
|
-
def create(brand_registration_sid: nil, description: nil, message_samples: nil, us_app_to_person_usecase: nil, has_embedded_links: nil, has_embedded_phone: nil)
|
59
|
+
def create(brand_registration_sid: nil, description: nil, message_samples: nil, us_app_to_person_usecase: nil, has_embedded_links: nil, has_embedded_phone: nil, message_flow: :unset, opt_in_message: :unset, opt_out_message: :unset, help_message: :unset, opt_in_keywords: :unset, opt_out_keywords: :unset, help_keywords: :unset)
|
46
60
|
data = Twilio::Values.of({
|
47
61
|
'BrandRegistrationSid' => brand_registration_sid,
|
48
62
|
'Description' => description,
|
@@ -50,6 +64,13 @@ module Twilio
|
|
50
64
|
'UsAppToPersonUsecase' => us_app_to_person_usecase,
|
51
65
|
'HasEmbeddedLinks' => has_embedded_links,
|
52
66
|
'HasEmbeddedPhone' => has_embedded_phone,
|
67
|
+
'MessageFlow' => message_flow,
|
68
|
+
'OptInMessage' => opt_in_message,
|
69
|
+
'OptOutMessage' => opt_out_message,
|
70
|
+
'HelpMessage' => help_message,
|
71
|
+
'OptInKeywords' => Twilio.serialize_list(opt_in_keywords) { |e| e },
|
72
|
+
'OptOutKeywords' => Twilio.serialize_list(opt_out_keywords) { |e| e },
|
73
|
+
'HelpKeywords' => Twilio.serialize_list(help_keywords) { |e| e },
|
53
74
|
})
|
54
75
|
|
55
76
|
payload = @version.create('POST', @uri, data: data)
|
@@ -270,6 +291,13 @@ module Twilio
|
|
270
291
|
'campaign_id' => payload['campaign_id'],
|
271
292
|
'is_externally_registered' => payload['is_externally_registered'],
|
272
293
|
'rate_limits' => payload['rate_limits'],
|
294
|
+
'message_flow' => payload['message_flow'],
|
295
|
+
'opt_in_message' => payload['opt_in_message'],
|
296
|
+
'opt_out_message' => payload['opt_out_message'],
|
297
|
+
'help_message' => payload['help_message'],
|
298
|
+
'opt_in_keywords' => payload['opt_in_keywords'],
|
299
|
+
'opt_out_keywords' => payload['opt_out_keywords'],
|
300
|
+
'help_keywords' => payload['help_keywords'],
|
273
301
|
'date_created' => Twilio.deserialize_iso8601_datetime(payload['date_created']),
|
274
302
|
'date_updated' => Twilio.deserialize_iso8601_datetime(payload['date_updated']),
|
275
303
|
'url' => payload['url'],
|
@@ -374,6 +402,48 @@ module Twilio
|
|
374
402
|
@properties['rate_limits']
|
375
403
|
end
|
376
404
|
|
405
|
+
##
|
406
|
+
# @return [String] Consumer opt-in flow
|
407
|
+
def message_flow
|
408
|
+
@properties['message_flow']
|
409
|
+
end
|
410
|
+
|
411
|
+
##
|
412
|
+
# @return [String] Opt In Message
|
413
|
+
def opt_in_message
|
414
|
+
@properties['opt_in_message']
|
415
|
+
end
|
416
|
+
|
417
|
+
##
|
418
|
+
# @return [String] Opt Out Message
|
419
|
+
def opt_out_message
|
420
|
+
@properties['opt_out_message']
|
421
|
+
end
|
422
|
+
|
423
|
+
##
|
424
|
+
# @return [String] Help Message
|
425
|
+
def help_message
|
426
|
+
@properties['help_message']
|
427
|
+
end
|
428
|
+
|
429
|
+
##
|
430
|
+
# @return [Array[String]] Opt In Keywords
|
431
|
+
def opt_in_keywords
|
432
|
+
@properties['opt_in_keywords']
|
433
|
+
end
|
434
|
+
|
435
|
+
##
|
436
|
+
# @return [Array[String]] Opt Out Keywords
|
437
|
+
def opt_out_keywords
|
438
|
+
@properties['opt_out_keywords']
|
439
|
+
end
|
440
|
+
|
441
|
+
##
|
442
|
+
# @return [Array[String]] Help Keywords
|
443
|
+
def help_keywords
|
444
|
+
@properties['help_keywords']
|
445
|
+
end
|
446
|
+
|
377
447
|
##
|
378
448
|
# @return [Time] The ISO 8601 date and time in GMT when the resource was created
|
379
449
|
def date_created
|
@@ -121,26 +121,13 @@ module Twilio
|
|
121
121
|
# Participant. If not specified, Proxy will select a number from the pool.
|
122
122
|
# @param [String] proxy_identifier_sid The SID of the Proxy Identifier to assign
|
123
123
|
# to the Participant.
|
124
|
-
# @param [Boolean] fail_on_participant_conflict [Experimental] For accounts with
|
125
|
-
# the ProxyAllowParticipantConflict account flag, setting to true enables
|
126
|
-
# per-request opt-in to allowing Proxy to reject a Participant create request that
|
127
|
-
# could cause the same Identifier/ProxyIdentifier pair to be active in multiple
|
128
|
-
# Sessions. Depending on the context, this could be a 409 error (Twilio error code
|
129
|
-
# 80623) or a 400 error (Twilio error code 80604). If not provided, requests will
|
130
|
-
# be allowed to succeed and a Debugger notification (80802) will be emitted.
|
131
|
-
# Having multiple, active Participants with the same Identifier/ProxyIdentifier
|
132
|
-
# pair causes calls and messages from affected Participants to be routed
|
133
|
-
# incorrectly. Please note, the default behavior for accounts without the
|
134
|
-
# ProxyAllowParticipantConflict flag is to reject the request as described. This
|
135
|
-
# will eventually be the default for all accounts.
|
136
124
|
# @return [ParticipantInstance] Created ParticipantInstance
|
137
|
-
def create(identifier: nil, friendly_name: :unset, proxy_identifier: :unset, proxy_identifier_sid: :unset
|
125
|
+
def create(identifier: nil, friendly_name: :unset, proxy_identifier: :unset, proxy_identifier_sid: :unset)
|
138
126
|
data = Twilio::Values.of({
|
139
127
|
'Identifier' => identifier,
|
140
128
|
'FriendlyName' => friendly_name,
|
141
129
|
'ProxyIdentifier' => proxy_identifier,
|
142
130
|
'ProxyIdentifierSid' => proxy_identifier_sid,
|
143
|
-
'FailOnParticipantConflict' => fail_on_participant_conflict,
|
144
131
|
})
|
145
132
|
|
146
133
|
payload = @version.create('POST', @uri, data: data)
|
@@ -127,20 +127,8 @@ module Twilio
|
|
127
127
|
# on create.
|
128
128
|
# @param [Array[Hash]] participants The Participant objects to include in the new
|
129
129
|
# session.
|
130
|
-
# @param [Boolean] fail_on_participant_conflict [Experimental] For accounts with
|
131
|
-
# the ProxyAllowParticipantConflict account flag, setting to true enables
|
132
|
-
# per-request opt-in to allowing Proxy to reject a Session create (with
|
133
|
-
# Participants) request that could cause the same Identifier/ProxyIdentifier pair
|
134
|
-
# to be active in multiple Sessions. Depending on the context, this could be a 409
|
135
|
-
# error (Twilio error code 80623) or a 400 error (Twilio error code 80604). If not
|
136
|
-
# provided, requests will be allowed to succeed and a Debugger notification
|
137
|
-
# (80802) will be emitted. Having multiple, active Participants with the same
|
138
|
-
# Identifier/ProxyIdentifier pair causes calls and messages from affected
|
139
|
-
# Participants to be routed incorrectly. Please note, the default behavior for
|
140
|
-
# accounts without the ProxyAllowParticipantConflict flag is to reject the request
|
141
|
-
# as described. This will eventually be the default for all accounts.
|
142
130
|
# @return [SessionInstance] Created SessionInstance
|
143
|
-
def create(unique_name: :unset, date_expiry: :unset, ttl: :unset, mode: :unset, status: :unset, participants: :unset
|
131
|
+
def create(unique_name: :unset, date_expiry: :unset, ttl: :unset, mode: :unset, status: :unset, participants: :unset)
|
144
132
|
data = Twilio::Values.of({
|
145
133
|
'UniqueName' => unique_name,
|
146
134
|
'DateExpiry' => Twilio.serialize_iso8601_datetime(date_expiry),
|
@@ -148,7 +136,6 @@ module Twilio
|
|
148
136
|
'Mode' => mode,
|
149
137
|
'Status' => status,
|
150
138
|
'Participants' => Twilio.serialize_list(participants) { |e| Twilio.serialize_object(e) },
|
151
|
-
'FailOnParticipantConflict' => fail_on_participant_conflict,
|
152
139
|
})
|
153
140
|
|
154
141
|
payload = @version.create('POST', @uri, data: data)
|
@@ -243,24 +230,12 @@ module Twilio
|
|
243
230
|
# is measured from the last Session create or the Session's last Interaction.
|
244
231
|
# @param [session.Status] status The new status of the resource. Can be:
|
245
232
|
# `in-progress` to re-open a session or `closed` to close a session.
|
246
|
-
# @param [Boolean] fail_on_participant_conflict [Experimental] For accounts with
|
247
|
-
# the ProxyAllowParticipantConflict account flag, setting to true enables
|
248
|
-
# per-request opt-in to allowing Proxy to return a 400 error (Twilio error code
|
249
|
-
# 80604) when a request to set a Session to in-progress would cause Participants
|
250
|
-
# with the same Identifier/ProxyIdentifier pair to be active in multiple Sessions.
|
251
|
-
# If not provided, requests will be allowed to succeed, and a Debugger
|
252
|
-
# notification (80801) will be emitted. Having multiple, active Participants with
|
253
|
-
# the same Identifier/ProxyIdentifier pair causes calls and messages from affected
|
254
|
-
# Participants to be routed incorrectly. Please note, the default behavior for
|
255
|
-
# accounts without the ProxyAllowParticipantConflict flag is to reject the request
|
256
|
-
# as described. This will eventually be the default for all accounts.
|
257
233
|
# @return [SessionInstance] Updated SessionInstance
|
258
|
-
def update(date_expiry: :unset, ttl: :unset, status: :unset
|
234
|
+
def update(date_expiry: :unset, ttl: :unset, status: :unset)
|
259
235
|
data = Twilio::Values.of({
|
260
236
|
'DateExpiry' => Twilio.serialize_iso8601_datetime(date_expiry),
|
261
237
|
'Ttl' => ttl,
|
262
238
|
'Status' => status,
|
263
|
-
'FailOnParticipantConflict' => fail_on_participant_conflict,
|
264
239
|
})
|
265
240
|
|
266
241
|
payload = @version.update('POST', @uri, data: data)
|
@@ -498,25 +473,9 @@ module Twilio
|
|
498
473
|
# is measured from the last Session create or the Session's last Interaction.
|
499
474
|
# @param [session.Status] status The new status of the resource. Can be:
|
500
475
|
# `in-progress` to re-open a session or `closed` to close a session.
|
501
|
-
# @param [Boolean] fail_on_participant_conflict [Experimental] For accounts with
|
502
|
-
# the ProxyAllowParticipantConflict account flag, setting to true enables
|
503
|
-
# per-request opt-in to allowing Proxy to return a 400 error (Twilio error code
|
504
|
-
# 80604) when a request to set a Session to in-progress would cause Participants
|
505
|
-
# with the same Identifier/ProxyIdentifier pair to be active in multiple Sessions.
|
506
|
-
# If not provided, requests will be allowed to succeed, and a Debugger
|
507
|
-
# notification (80801) will be emitted. Having multiple, active Participants with
|
508
|
-
# the same Identifier/ProxyIdentifier pair causes calls and messages from affected
|
509
|
-
# Participants to be routed incorrectly. Please note, the default behavior for
|
510
|
-
# accounts without the ProxyAllowParticipantConflict flag is to reject the request
|
511
|
-
# as described. This will eventually be the default for all accounts.
|
512
476
|
# @return [SessionInstance] Updated SessionInstance
|
513
|
-
def update(date_expiry: :unset, ttl: :unset, status: :unset
|
514
|
-
context.update(
|
515
|
-
date_expiry: date_expiry,
|
516
|
-
ttl: ttl,
|
517
|
-
status: status,
|
518
|
-
fail_on_participant_conflict: fail_on_participant_conflict,
|
519
|
-
)
|
477
|
+
def update(date_expiry: :unset, ttl: :unset, status: :unset)
|
478
|
+
context.update(date_expiry: date_expiry, ttl: ttl, status: status, )
|
520
479
|
end
|
521
480
|
|
522
481
|
##
|