twilio-ruby 5.0.0.rc9 → 5.0.0.rc10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/twilio-ruby/rest/api/v2010/account/address/dependent_phone_number.rb +2 -9
- data/lib/twilio-ruby/rest/api/v2010/account/address.rb +13 -24
- data/lib/twilio-ruby/rest/api/v2010/account/application.rb +12 -23
- data/lib/twilio-ruby/rest/api/v2010/account/authorized_connect_app.rb +6 -15
- data/lib/twilio-ruby/rest/api/v2010/account/available_phone_number/local.rb +2 -9
- data/lib/twilio-ruby/rest/api/v2010/account/available_phone_number/mobile.rb +2 -9
- data/lib/twilio-ruby/rest/api/v2010/account/available_phone_number/toll_free.rb +2 -9
- data/lib/twilio-ruby/rest/api/v2010/account/available_phone_number.rb +9 -18
- data/lib/twilio-ruby/rest/api/v2010/account/call/feedback.rb +15 -23
- data/lib/twilio-ruby/rest/api/v2010/account/call/feedback_summary.rb +8 -15
- data/lib/twilio-ruby/rest/api/v2010/account/call/notification.rb +9 -18
- data/lib/twilio-ruby/rest/api/v2010/account/call/recording.rb +9 -18
- data/lib/twilio-ruby/rest/api/v2010/account/call.rb +20 -28
- data/lib/twilio-ruby/rest/api/v2010/account/conference/participant.rb +15 -24
- data/lib/twilio-ruby/rest/api/v2010/account/conference.rb +7 -16
- data/lib/twilio-ruby/rest/api/v2010/account/connect_app.rb +10 -20
- data/lib/twilio-ruby/rest/api/v2010/account/incoming_phone_number/local.rb +2 -10
- data/lib/twilio-ruby/rest/api/v2010/account/incoming_phone_number/mobile.rb +2 -10
- data/lib/twilio-ruby/rest/api/v2010/account/incoming_phone_number/toll_free.rb +2 -10
- data/lib/twilio-ruby/rest/api/v2010/account/incoming_phone_number.rb +12 -23
- data/lib/twilio-ruby/rest/api/v2010/account/key.rb +324 -0
- data/lib/twilio-ruby/rest/api/v2010/account/message/feedback.rb +4 -9
- data/lib/twilio-ruby/rest/api/v2010/account/message/media.rb +9 -18
- data/lib/twilio-ruby/rest/api/v2010/account/message.rb +23 -29
- data/lib/twilio-ruby/rest/api/v2010/account/new_key.rb +145 -0
- data/lib/twilio-ruby/rest/api/v2010/account/new_signing_key.rb +145 -0
- data/lib/twilio-ruby/rest/api/v2010/account/notification.rb +7 -16
- data/lib/twilio-ruby/rest/api/v2010/account/outgoing_caller_id.rb +12 -21
- data/lib/twilio-ruby/rest/api/v2010/account/queue/member.rb +13 -23
- data/lib/twilio-ruby/rest/api/v2010/account/queue.rb +13 -24
- data/lib/twilio-ruby/rest/api/v2010/account/recording/transcription.rb +9 -18
- data/lib/twilio-ruby/rest/api/v2010/account/recording.rb +8 -17
- data/lib/twilio-ruby/rest/api/v2010/account/sandbox.rb +8 -15
- data/lib/twilio-ruby/rest/api/v2010/account/signing_key.rb +324 -0
- data/lib/twilio-ruby/rest/api/v2010/account/sip/credential_list/credential.rb +16 -27
- data/lib/twilio-ruby/rest/api/v2010/account/sip/credential_list.rb +14 -24
- data/lib/twilio-ruby/rest/api/v2010/account/sip/domain/credential_list_mapping.rb +11 -21
- data/lib/twilio-ruby/rest/api/v2010/account/sip/domain/ip_access_control_list_mapping.rb +11 -21
- data/lib/twilio-ruby/rest/api/v2010/account/sip/domain.rb +23 -31
- data/lib/twilio-ruby/rest/api/v2010/account/sip/ip_access_control_list/ip_address.rb +16 -27
- data/lib/twilio-ruby/rest/api/v2010/account/sip/ip_access_control_list.rb +14 -24
- data/lib/twilio-ruby/rest/api/v2010/account/sip.rb +1 -8
- data/lib/twilio-ruby/rest/api/v2010/account/sms/short_code.rb +10 -20
- data/lib/twilio-ruby/rest/api/v2010/account/sms/sms_message.rb +13 -23
- data/lib/twilio-ruby/rest/api/v2010/account/sms.rb +1 -7
- data/lib/twilio-ruby/rest/api/v2010/account/token.rb +2 -7
- data/lib/twilio-ruby/rest/api/v2010/account/transcription.rb +7 -16
- data/lib/twilio-ruby/rest/api/v2010/account/usage/record/all_time.rb +1 -8
- data/lib/twilio-ruby/rest/api/v2010/account/usage/record/daily.rb +1 -8
- data/lib/twilio-ruby/rest/api/v2010/account/usage/record/last_month.rb +1 -8
- data/lib/twilio-ruby/rest/api/v2010/account/usage/record/monthly.rb +1 -8
- data/lib/twilio-ruby/rest/api/v2010/account/usage/record/this_month.rb +1 -8
- data/lib/twilio-ruby/rest/api/v2010/account/usage/record/today.rb +1 -8
- data/lib/twilio-ruby/rest/api/v2010/account/usage/record/yearly.rb +1 -8
- data/lib/twilio-ruby/rest/api/v2010/account/usage/record/yesterday.rb +1 -8
- data/lib/twilio-ruby/rest/api/v2010/account/usage/record.rb +1 -8
- data/lib/twilio-ruby/rest/api/v2010/account/usage/trigger.rb +12 -23
- data/lib/twilio-ruby/rest/api/v2010/account/usage.rb +1 -6
- data/lib/twilio-ruby/rest/api/v2010/account/validation_request.rb +2 -7
- data/lib/twilio-ruby/rest/api/v2010/account.rb +131 -38
- data/lib/twilio-ruby/rest/api/v2010.rb +17 -1
- data/lib/twilio-ruby/rest/api.rb +16 -0
- data/lib/twilio-ruby/rest/client.rb +16 -0
- data/lib/twilio-ruby/rest/ip_messaging/v1/credential.rb +13 -28
- data/lib/twilio-ruby/rest/ip_messaging/v1/service/channel/member.rb +11 -21
- data/lib/twilio-ruby/rest/ip_messaging/v1/service/channel/message.rb +62 -20
- data/lib/twilio-ruby/rest/ip_messaging/v1/service/channel.rb +17 -28
- data/lib/twilio-ruby/rest/ip_messaging/v1/service/role.rb +12 -23
- data/lib/twilio-ruby/rest/ip_messaging/v1/service/user.rb +23 -25
- data/lib/twilio-ruby/rest/ip_messaging/v1/service.rb +13 -24
- data/lib/twilio-ruby/rest/ip_messaging/v1.rb +1 -1
- data/lib/twilio-ruby/rest/lookups/v1/phone_number.rb +5 -12
- data/lib/twilio-ruby/rest/lookups/v1.rb +1 -1
- data/lib/twilio-ruby/rest/monitor/v1/alert.rb +5 -14
- data/lib/twilio-ruby/rest/monitor/v1/event.rb +4 -13
- data/lib/twilio-ruby/rest/monitor/v1.rb +1 -1
- data/lib/twilio-ruby/rest/notifications/v1/credential.rb +13 -28
- data/lib/twilio-ruby/rest/notifications/v1/service/binding.rb +8 -18
- data/lib/twilio-ruby/rest/notifications/v1/service/notification.rb +8 -8
- data/lib/twilio-ruby/rest/notifications/v1/service.rb +10 -21
- data/lib/twilio-ruby/rest/notifications/v1.rb +1 -1
- data/lib/twilio-ruby/rest/preview/wireless/command.rb +4 -14
- data/lib/twilio-ruby/rest/preview/wireless/device/usage.rb +6 -13
- data/lib/twilio-ruby/rest/preview/wireless/device.rb +8 -19
- data/lib/twilio-ruby/rest/preview/wireless/rate_plan.rb +4 -13
- data/lib/twilio-ruby/rest/preview/wireless.rb +1 -1
- data/lib/twilio-ruby/rest/pricing/v1/messaging/country.rb +4 -13
- data/lib/twilio-ruby/rest/pricing/v1/messaging.rb +0 -5
- data/lib/twilio-ruby/rest/pricing/v1/phone_number/country.rb +4 -13
- data/lib/twilio-ruby/rest/pricing/v1/phone_number.rb +0 -5
- data/lib/twilio-ruby/rest/pricing/v1/voice/country.rb +4 -13
- data/lib/twilio-ruby/rest/pricing/v1/voice/number.rb +4 -10
- data/lib/twilio-ruby/rest/pricing/v1/voice.rb +0 -6
- data/lib/twilio-ruby/rest/pricing/v1.rb +1 -1
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/activity.rb +13 -23
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/event.rb +6 -15
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/task/reservation.rb +13 -23
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/task.rb +13 -24
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/task_queue/task_queue_statistics.rb +8 -15
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/task_queue/task_queues_statistics.rb +1 -8
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/task_queue.rb +13 -24
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/worker/worker_statistics.rb +8 -15
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/worker/workers_statistics.rb +6 -13
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/worker.rb +13 -24
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/workflow/workflow_statistics.rb +8 -15
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/workflow.rb +13 -24
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/workspace_statistics.rb +6 -13
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace.rb +15 -26
- data/lib/twilio-ruby/rest/taskrouter/v1.rb +1 -1
- data/lib/twilio-ruby/rest/trunking/v1/trunk/credential_list.rb +8 -18
- data/lib/twilio-ruby/rest/trunking/v1/trunk/ip_access_control_list.rb +8 -18
- data/lib/twilio-ruby/rest/trunking/v1/trunk/origination_url.rb +12 -23
- data/lib/twilio-ruby/rest/trunking/v1/trunk/phone_number.rb +8 -18
- data/lib/twilio-ruby/rest/trunking/v1/trunk.rb +12 -23
- data/lib/twilio-ruby/rest/trunking/v1.rb +1 -1
- data/lib/twilio-ruby/version.rb +1 -1
- data/spec/integration/api/v2010/account/key_spec.rb +178 -0
- data/spec/integration/api/v2010/account/message_spec.rb +2 -3
- data/spec/integration/api/v2010/account/new_key_spec.rb +45 -0
- data/spec/integration/api/v2010/account/new_signing_key_spec.rb +45 -0
- data/spec/integration/api/v2010/account/signing_key_spec.rb +178 -0
- data/spec/integration/api/v2010/account/sip/ip_access_control_list/ip_address_spec.rb +3 -7
- data/spec/integration/ip_messaging/v1/credential_spec.rb +5 -10
- data/spec/integration/ip_messaging/v1/service/channel/message_spec.rb +37 -0
- data/spec/integration/ip_messaging/v1/service/channel_spec.rb +3 -7
- data/spec/integration/ip_messaging/v1/service/user_spec.rb +3 -6
- data/spec/integration/notifications/v1/credential_spec.rb +5 -10
- data/spec/integration/notifications/v1/service/notification_spec.rb +1 -0
- data/spec/integration/preview/wireless/device_spec.rb +4 -4
- data/spec/integration/taskrouter/v1/workspace/task/reservation_spec.rb +3 -6
- metadata +15 -3
|
@@ -16,7 +16,6 @@ module Twilio
|
|
|
16
16
|
# @param [Version] version Version that contains the resource
|
|
17
17
|
# @param [String] workspace_sid The workspace_sid
|
|
18
18
|
# @param [String] workflow_sid The workflow_sid
|
|
19
|
-
|
|
20
19
|
# @return [WorkflowStatisticsList] WorkflowStatisticsList
|
|
21
20
|
def initialize(version, workspace_sid: nil, workflow_sid: nil)
|
|
22
21
|
super(version)
|
|
@@ -43,7 +42,6 @@ module Twilio
|
|
|
43
42
|
# @param [Hash] solution Path solution for the resource
|
|
44
43
|
# @param [String] workspace_sid The workspace_sid
|
|
45
44
|
# @param [String] workflow_sid The workflow_sid
|
|
46
|
-
|
|
47
45
|
# @return [WorkflowStatisticsPage] WorkflowStatisticsPage
|
|
48
46
|
def initialize(version, response, solution)
|
|
49
47
|
super(version, response)
|
|
@@ -55,14 +53,13 @@ module Twilio
|
|
|
55
53
|
##
|
|
56
54
|
# Build an instance of WorkflowStatisticsInstance
|
|
57
55
|
# @param [Hash] payload Payload response from the API
|
|
58
|
-
|
|
59
56
|
# @return [WorkflowStatisticsInstance] WorkflowStatisticsInstance
|
|
60
57
|
def get_instance(payload)
|
|
61
58
|
return WorkflowStatisticsInstance.new(
|
|
62
59
|
@version,
|
|
63
60
|
payload,
|
|
64
|
-
workspace_sid: @solution[
|
|
65
|
-
workflow_sid: @solution[
|
|
61
|
+
workspace_sid: @solution[:workspace_sid],
|
|
62
|
+
workflow_sid: @solution[:workflow_sid],
|
|
66
63
|
)
|
|
67
64
|
end
|
|
68
65
|
|
|
@@ -79,7 +76,6 @@ module Twilio
|
|
|
79
76
|
# @param [Version] version Version that contains the resource
|
|
80
77
|
# @param [String] workspace_sid The workspace_sid
|
|
81
78
|
# @param [String] workflow_sid The workflow_sid
|
|
82
|
-
|
|
83
79
|
# @return [WorkflowStatisticsContext] WorkflowStatisticsContext
|
|
84
80
|
def initialize(version, workspace_sid, workflow_sid)
|
|
85
81
|
super(version)
|
|
@@ -97,7 +93,6 @@ module Twilio
|
|
|
97
93
|
# @param [String] minutes The minutes
|
|
98
94
|
# @param [Time] start_date The start_date
|
|
99
95
|
# @param [Time] end_date The end_date
|
|
100
|
-
|
|
101
96
|
# @return [WorkflowStatisticsInstance] Fetched WorkflowStatisticsInstance
|
|
102
97
|
def fetch(minutes: nil, start_date: nil, end_date: nil)
|
|
103
98
|
params = {
|
|
@@ -115,8 +110,8 @@ module Twilio
|
|
|
115
110
|
return WorkflowStatisticsInstance.new(
|
|
116
111
|
@version,
|
|
117
112
|
payload,
|
|
118
|
-
workspace_sid: @solution[
|
|
119
|
-
workflow_sid: @solution[
|
|
113
|
+
workspace_sid: @solution[:workspace_sid],
|
|
114
|
+
workflow_sid: @solution[:workflow_sid],
|
|
120
115
|
)
|
|
121
116
|
end
|
|
122
117
|
|
|
@@ -135,7 +130,6 @@ module Twilio
|
|
|
135
130
|
# @param [Hash] payload payload that contains response from Twilio
|
|
136
131
|
# @param [String] workspace_sid The workspace_sid
|
|
137
132
|
# @param [String] workflow_sid The workflow_sid
|
|
138
|
-
|
|
139
133
|
# @return [WorkflowStatisticsInstance] WorkflowStatisticsInstance
|
|
140
134
|
def initialize(version, payload, workspace_sid: nil, workflow_sid: nil)
|
|
141
135
|
super(version)
|
|
@@ -161,7 +155,6 @@ module Twilio
|
|
|
161
155
|
# Generate an instance context for the instance, the context is capable of
|
|
162
156
|
# performing various actions. All instance actions are proxied to the context
|
|
163
157
|
# @param [Version] version Version that contains the resource
|
|
164
|
-
|
|
165
158
|
# @return [WorkflowStatisticsContext] WorkflowStatisticsContext for this WorkflowStatisticsInstance
|
|
166
159
|
def context
|
|
167
160
|
unless @instance_context
|
|
@@ -199,10 +192,10 @@ module Twilio
|
|
|
199
192
|
# @param [String] minutes The minutes
|
|
200
193
|
# @param [Time] start_date The start_date
|
|
201
194
|
# @param [Time] end_date The end_date
|
|
202
|
-
|
|
203
195
|
# @return [WorkflowStatisticsInstance] Fetched WorkflowStatisticsInstance
|
|
204
196
|
def fetch(minutes: nil, start_date: nil, end_date: nil)
|
|
205
|
-
|
|
197
|
+
context.fetch(
|
|
198
|
+
minutes: minutes,
|
|
206
199
|
start_date: start_date,
|
|
207
200
|
end_date: end_date,
|
|
208
201
|
)
|
|
@@ -211,8 +204,8 @@ module Twilio
|
|
|
211
204
|
##
|
|
212
205
|
# Provide a user friendly representation
|
|
213
206
|
def to_s
|
|
214
|
-
|
|
215
|
-
"<Twilio.Taskrouter.V1.WorkflowStatisticsInstance #{
|
|
207
|
+
values = @params.map{|k, v| "#{k}: #{v}"}.join(" ")
|
|
208
|
+
"<Twilio.Taskrouter.V1.WorkflowStatisticsInstance #{values}>"
|
|
216
209
|
end
|
|
217
210
|
end
|
|
218
211
|
end
|
|
@@ -14,7 +14,6 @@ module Twilio
|
|
|
14
14
|
# Initialize the WorkflowList
|
|
15
15
|
# @param [Version] version Version that contains the resource
|
|
16
16
|
# @param [String] workspace_sid The workspace_sid
|
|
17
|
-
|
|
18
17
|
# @return [WorkflowList] WorkflowList
|
|
19
18
|
def initialize(version, workspace_sid: nil)
|
|
20
19
|
super(version)
|
|
@@ -37,7 +36,6 @@ module Twilio
|
|
|
37
36
|
# the default value of 50 records. If no page_size is defined
|
|
38
37
|
# but a limit is defined, stream() will attempt to read the
|
|
39
38
|
# limit with the most efficient page size, i.e. min(limit, 1000)
|
|
40
|
-
|
|
41
39
|
# @return [Array] Array of up to limit results
|
|
42
40
|
def list(friendly_name: nil, limit: nil, page_size: nil)
|
|
43
41
|
self.stream(
|
|
@@ -58,7 +56,6 @@ module Twilio
|
|
|
58
56
|
# the default value of 50 records. If no page_size is defined
|
|
59
57
|
# but a limit is defined, stream() will attempt to read the
|
|
60
58
|
# limit with the most efficient page size, i.e. min(limit, 1000)
|
|
61
|
-
|
|
62
59
|
# @return [Enumerable] Enumerable that will yield up to limit results
|
|
63
60
|
def stream(friendly_name: nil, limit: nil, page_size: nil)
|
|
64
61
|
limits = @version.read_limits(limit, page_size)
|
|
@@ -101,7 +98,6 @@ module Twilio
|
|
|
101
98
|
# @param [String] page_token PageToken provided by the API
|
|
102
99
|
# @param [Integer] page_number Page Number, this value is simply for client state
|
|
103
100
|
# @param [Integer] page_size Number of records to return, defaults to 50
|
|
104
|
-
|
|
105
101
|
# @return [Page] Page of WorkflowInstance
|
|
106
102
|
def page(friendly_name: nil, page_token: nil, page_number: nil, page_size: nil)
|
|
107
103
|
params = {
|
|
@@ -127,7 +123,6 @@ module Twilio
|
|
|
127
123
|
# @param [String] fallback_assignment_callback_url The
|
|
128
124
|
# fallback_assignment_callback_url
|
|
129
125
|
# @param [String] task_reservation_timeout The task_reservation_timeout
|
|
130
|
-
|
|
131
126
|
# @return [WorkflowInstance] Newly created WorkflowInstance
|
|
132
127
|
def create(friendly_name: nil, configuration: nil, assignment_callback_url: nil, fallback_assignment_callback_url: nil, task_reservation_timeout: nil)
|
|
133
128
|
data = {
|
|
@@ -147,7 +142,7 @@ module Twilio
|
|
|
147
142
|
return WorkflowInstance.new(
|
|
148
143
|
@version,
|
|
149
144
|
payload,
|
|
150
|
-
workspace_sid: @solution[
|
|
145
|
+
workspace_sid: @solution[:workspace_sid],
|
|
151
146
|
)
|
|
152
147
|
end
|
|
153
148
|
|
|
@@ -165,7 +160,6 @@ module Twilio
|
|
|
165
160
|
# @param [Response] response Response from the API
|
|
166
161
|
# @param [Hash] solution Path solution for the resource
|
|
167
162
|
# @param [String] workspace_sid The workspace_sid
|
|
168
|
-
|
|
169
163
|
# @return [WorkflowPage] WorkflowPage
|
|
170
164
|
def initialize(version, response, solution)
|
|
171
165
|
super(version, response)
|
|
@@ -177,13 +171,12 @@ module Twilio
|
|
|
177
171
|
##
|
|
178
172
|
# Build an instance of WorkflowInstance
|
|
179
173
|
# @param [Hash] payload Payload response from the API
|
|
180
|
-
|
|
181
174
|
# @return [WorkflowInstance] WorkflowInstance
|
|
182
175
|
def get_instance(payload)
|
|
183
176
|
return WorkflowInstance.new(
|
|
184
177
|
@version,
|
|
185
178
|
payload,
|
|
186
|
-
workspace_sid: @solution[
|
|
179
|
+
workspace_sid: @solution[:workspace_sid],
|
|
187
180
|
)
|
|
188
181
|
end
|
|
189
182
|
|
|
@@ -200,7 +193,6 @@ module Twilio
|
|
|
200
193
|
# @param [Version] version Version that contains the resource
|
|
201
194
|
# @param [String] workspace_sid The workspace_sid
|
|
202
195
|
# @param [String] sid The sid
|
|
203
|
-
|
|
204
196
|
# @return [WorkflowContext] WorkflowContext
|
|
205
197
|
def initialize(version, workspace_sid, sid)
|
|
206
198
|
super(version)
|
|
@@ -231,8 +223,8 @@ module Twilio
|
|
|
231
223
|
return WorkflowInstance.new(
|
|
232
224
|
@version,
|
|
233
225
|
payload,
|
|
234
|
-
workspace_sid: @solution[
|
|
235
|
-
sid: @solution[
|
|
226
|
+
workspace_sid: @solution[:workspace_sid],
|
|
227
|
+
sid: @solution[:sid],
|
|
236
228
|
)
|
|
237
229
|
end
|
|
238
230
|
|
|
@@ -244,7 +236,6 @@ module Twilio
|
|
|
244
236
|
# fallback_assignment_callback_url
|
|
245
237
|
# @param [String] configuration The configuration
|
|
246
238
|
# @param [String] task_reservation_timeout The task_reservation_timeout
|
|
247
|
-
|
|
248
239
|
# @return [WorkflowInstance] Updated WorkflowInstance
|
|
249
240
|
def update(friendly_name: nil, assignment_callback_url: nil, fallback_assignment_callback_url: nil, configuration: nil, task_reservation_timeout: nil)
|
|
250
241
|
data = {
|
|
@@ -264,8 +255,8 @@ module Twilio
|
|
|
264
255
|
return WorkflowInstance.new(
|
|
265
256
|
@version,
|
|
266
257
|
payload,
|
|
267
|
-
workspace_sid: @solution[
|
|
268
|
-
sid: @solution[
|
|
258
|
+
workspace_sid: @solution[:workspace_sid],
|
|
259
|
+
sid: @solution[:sid],
|
|
269
260
|
)
|
|
270
261
|
end
|
|
271
262
|
|
|
@@ -302,7 +293,6 @@ module Twilio
|
|
|
302
293
|
# @param [Hash] payload payload that contains response from Twilio
|
|
303
294
|
# @param [String] workspace_sid The workspace_sid
|
|
304
295
|
# @param [String] sid The sid
|
|
305
|
-
|
|
306
296
|
# @return [WorkflowInstance] WorkflowInstance
|
|
307
297
|
def initialize(version, payload, workspace_sid: nil, sid: nil)
|
|
308
298
|
super(version)
|
|
@@ -334,7 +324,6 @@ module Twilio
|
|
|
334
324
|
# Generate an instance context for the instance, the context is capable of
|
|
335
325
|
# performing various actions. All instance actions are proxied to the context
|
|
336
326
|
# @param [Version] version Version that contains the resource
|
|
337
|
-
|
|
338
327
|
# @return [WorkflowContext] WorkflowContext for this WorkflowInstance
|
|
339
328
|
def context
|
|
340
329
|
unless @instance_context
|
|
@@ -395,7 +384,7 @@ module Twilio
|
|
|
395
384
|
# Fetch a WorkflowInstance
|
|
396
385
|
# @return [WorkflowInstance] Fetched WorkflowInstance
|
|
397
386
|
def fetch
|
|
398
|
-
|
|
387
|
+
context.fetch
|
|
399
388
|
end
|
|
400
389
|
|
|
401
390
|
##
|
|
@@ -406,10 +395,10 @@ module Twilio
|
|
|
406
395
|
# fallback_assignment_callback_url
|
|
407
396
|
# @param [String] configuration The configuration
|
|
408
397
|
# @param [String] task_reservation_timeout The task_reservation_timeout
|
|
409
|
-
|
|
410
398
|
# @return [WorkflowInstance] Updated WorkflowInstance
|
|
411
399
|
def update(friendly_name: nil, assignment_callback_url: nil, fallback_assignment_callback_url: nil, configuration: nil, task_reservation_timeout: nil)
|
|
412
|
-
|
|
400
|
+
context.update(
|
|
401
|
+
friendly_name: friendly_name,
|
|
413
402
|
assignment_callback_url: assignment_callback_url,
|
|
414
403
|
fallback_assignment_callback_url: fallback_assignment_callback_url,
|
|
415
404
|
configuration: configuration,
|
|
@@ -421,21 +410,21 @@ module Twilio
|
|
|
421
410
|
# Deletes the WorkflowInstance
|
|
422
411
|
# @return [Boolean] true if delete succeeds, true otherwise
|
|
423
412
|
def delete
|
|
424
|
-
|
|
413
|
+
context.delete
|
|
425
414
|
end
|
|
426
415
|
|
|
427
416
|
##
|
|
428
417
|
# Access the statistics
|
|
429
418
|
# @return [statistics] statistics
|
|
430
419
|
def statistics
|
|
431
|
-
|
|
420
|
+
context.statistics
|
|
432
421
|
end
|
|
433
422
|
|
|
434
423
|
##
|
|
435
424
|
# Provide a user friendly representation
|
|
436
425
|
def to_s
|
|
437
|
-
|
|
438
|
-
"<Twilio.Taskrouter.V1.WorkflowInstance #{
|
|
426
|
+
values = @params.map{|k, v| "#{k}: #{v}"}.join(" ")
|
|
427
|
+
"<Twilio.Taskrouter.V1.WorkflowInstance #{values}>"
|
|
439
428
|
end
|
|
440
429
|
end
|
|
441
430
|
end
|
|
@@ -14,7 +14,6 @@ module Twilio
|
|
|
14
14
|
# Initialize the WorkspaceStatisticsList
|
|
15
15
|
# @param [Version] version Version that contains the resource
|
|
16
16
|
# @param [String] workspace_sid The workspace_sid
|
|
17
|
-
|
|
18
17
|
# @return [WorkspaceStatisticsList] WorkspaceStatisticsList
|
|
19
18
|
def initialize(version, workspace_sid: nil)
|
|
20
19
|
super(version)
|
|
@@ -39,7 +38,6 @@ module Twilio
|
|
|
39
38
|
# @param [Response] response Response from the API
|
|
40
39
|
# @param [Hash] solution Path solution for the resource
|
|
41
40
|
# @param [String] workspace_sid The workspace_sid
|
|
42
|
-
|
|
43
41
|
# @return [WorkspaceStatisticsPage] WorkspaceStatisticsPage
|
|
44
42
|
def initialize(version, response, solution)
|
|
45
43
|
super(version, response)
|
|
@@ -51,13 +49,12 @@ module Twilio
|
|
|
51
49
|
##
|
|
52
50
|
# Build an instance of WorkspaceStatisticsInstance
|
|
53
51
|
# @param [Hash] payload Payload response from the API
|
|
54
|
-
|
|
55
52
|
# @return [WorkspaceStatisticsInstance] WorkspaceStatisticsInstance
|
|
56
53
|
def get_instance(payload)
|
|
57
54
|
return WorkspaceStatisticsInstance.new(
|
|
58
55
|
@version,
|
|
59
56
|
payload,
|
|
60
|
-
workspace_sid: @solution[
|
|
57
|
+
workspace_sid: @solution[:workspace_sid],
|
|
61
58
|
)
|
|
62
59
|
end
|
|
63
60
|
|
|
@@ -73,7 +70,6 @@ module Twilio
|
|
|
73
70
|
# Initialize the WorkspaceStatisticsContext
|
|
74
71
|
# @param [Version] version Version that contains the resource
|
|
75
72
|
# @param [String] workspace_sid The workspace_sid
|
|
76
|
-
|
|
77
73
|
# @return [WorkspaceStatisticsContext] WorkspaceStatisticsContext
|
|
78
74
|
def initialize(version, workspace_sid)
|
|
79
75
|
super(version)
|
|
@@ -94,7 +90,6 @@ module Twilio
|
|
|
94
90
|
# @param [Time] end_date_before The end_date
|
|
95
91
|
# @param [Time] end_date The end_date
|
|
96
92
|
# @param [Time] end_date_after: The end_date
|
|
97
|
-
|
|
98
93
|
# @return [WorkspaceStatisticsInstance] Fetched WorkspaceStatisticsInstance
|
|
99
94
|
def fetch(minutes: nil, start_date_before: nil, start_date: nil, start_date_after: nil, end_date_before: nil, end_date: nil, end_date_after: nil)
|
|
100
95
|
params = {
|
|
@@ -116,7 +111,7 @@ module Twilio
|
|
|
116
111
|
return WorkspaceStatisticsInstance.new(
|
|
117
112
|
@version,
|
|
118
113
|
payload,
|
|
119
|
-
workspace_sid: @solution[
|
|
114
|
+
workspace_sid: @solution[:workspace_sid],
|
|
120
115
|
)
|
|
121
116
|
end
|
|
122
117
|
|
|
@@ -134,7 +129,6 @@ module Twilio
|
|
|
134
129
|
# @param [Version] version Version that contains the resource
|
|
135
130
|
# @param [Hash] payload payload that contains response from Twilio
|
|
136
131
|
# @param [String] workspace_sid The workspace_sid
|
|
137
|
-
|
|
138
132
|
# @return [WorkspaceStatisticsInstance] WorkspaceStatisticsInstance
|
|
139
133
|
def initialize(version, payload, workspace_sid: nil)
|
|
140
134
|
super(version)
|
|
@@ -158,7 +152,6 @@ module Twilio
|
|
|
158
152
|
# Generate an instance context for the instance, the context is capable of
|
|
159
153
|
# performing various actions. All instance actions are proxied to the context
|
|
160
154
|
# @param [Version] version Version that contains the resource
|
|
161
|
-
|
|
162
155
|
# @return [WorkspaceStatisticsContext] WorkspaceStatisticsContext for this WorkspaceStatisticsInstance
|
|
163
156
|
def context
|
|
164
157
|
unless @instance_context
|
|
@@ -195,10 +188,10 @@ module Twilio
|
|
|
195
188
|
# @param [Time] end_date_before The end_date
|
|
196
189
|
# @param [Time] end_date The end_date
|
|
197
190
|
# @param [Time] end_date_after: The end_date
|
|
198
|
-
|
|
199
191
|
# @return [WorkspaceStatisticsInstance] Fetched WorkspaceStatisticsInstance
|
|
200
192
|
def fetch(minutes: nil, start_date_before: nil, start_date: nil, start_date_after: nil, end_date_before: nil, end_date: nil, end_date_after: nil)
|
|
201
|
-
|
|
193
|
+
context.fetch(
|
|
194
|
+
minutes: minutes,
|
|
202
195
|
start_date_before: start_date_before,
|
|
203
196
|
start_date: start_date,
|
|
204
197
|
start_date_after: start_date_after,
|
|
@@ -211,8 +204,8 @@ module Twilio
|
|
|
211
204
|
##
|
|
212
205
|
# Provide a user friendly representation
|
|
213
206
|
def to_s
|
|
214
|
-
|
|
215
|
-
"<Twilio.Taskrouter.V1.WorkspaceStatisticsInstance #{
|
|
207
|
+
values = @params.map{|k, v| "#{k}: #{v}"}.join(" ")
|
|
208
|
+
"<Twilio.Taskrouter.V1.WorkspaceStatisticsInstance #{values}>"
|
|
216
209
|
end
|
|
217
210
|
end
|
|
218
211
|
end
|
|
@@ -12,7 +12,6 @@ module Twilio
|
|
|
12
12
|
##
|
|
13
13
|
# Initialize the WorkspaceList
|
|
14
14
|
# @param [Version] version Version that contains the resource
|
|
15
|
-
|
|
16
15
|
# @return [WorkspaceList] WorkspaceList
|
|
17
16
|
def initialize(version)
|
|
18
17
|
super(version)
|
|
@@ -33,7 +32,6 @@ module Twilio
|
|
|
33
32
|
# the default value of 50 records. If no page_size is defined
|
|
34
33
|
# but a limit is defined, stream() will attempt to read the
|
|
35
34
|
# limit with the most efficient page size, i.e. min(limit, 1000)
|
|
36
|
-
|
|
37
35
|
# @return [Array] Array of up to limit results
|
|
38
36
|
def list(friendly_name: nil, limit: nil, page_size: nil)
|
|
39
37
|
self.stream(
|
|
@@ -54,7 +52,6 @@ module Twilio
|
|
|
54
52
|
# the default value of 50 records. If no page_size is defined
|
|
55
53
|
# but a limit is defined, stream() will attempt to read the
|
|
56
54
|
# limit with the most efficient page size, i.e. min(limit, 1000)
|
|
57
|
-
|
|
58
55
|
# @return [Enumerable] Enumerable that will yield up to limit results
|
|
59
56
|
def stream(friendly_name: nil, limit: nil, page_size: nil)
|
|
60
57
|
limits = @version.read_limits(limit, page_size)
|
|
@@ -97,7 +94,6 @@ module Twilio
|
|
|
97
94
|
# @param [String] page_token PageToken provided by the API
|
|
98
95
|
# @param [Integer] page_number Page Number, this value is simply for client state
|
|
99
96
|
# @param [Integer] page_size Number of records to return, defaults to 50
|
|
100
|
-
|
|
101
97
|
# @return [Page] Page of WorkspaceInstance
|
|
102
98
|
def page(friendly_name: nil, page_token: nil, page_number: nil, page_size: nil)
|
|
103
99
|
params = {
|
|
@@ -120,7 +116,6 @@ module Twilio
|
|
|
120
116
|
# @param [String] friendly_name The friendly_name
|
|
121
117
|
# @param [String] event_callback_url The event_callback_url
|
|
122
118
|
# @param [String] template The template
|
|
123
|
-
|
|
124
119
|
# @return [WorkspaceInstance] Newly created WorkspaceInstance
|
|
125
120
|
def create(friendly_name: nil, event_callback_url: nil, template: nil)
|
|
126
121
|
data = {
|
|
@@ -154,7 +149,6 @@ module Twilio
|
|
|
154
149
|
# @param [Version] version Version that contains the resource
|
|
155
150
|
# @param [Response] response Response from the API
|
|
156
151
|
# @param [Hash] solution Path solution for the resource
|
|
157
|
-
|
|
158
152
|
# @return [WorkspacePage] WorkspacePage
|
|
159
153
|
def initialize(version, response, solution)
|
|
160
154
|
super(version, response)
|
|
@@ -166,7 +160,6 @@ module Twilio
|
|
|
166
160
|
##
|
|
167
161
|
# Build an instance of WorkspaceInstance
|
|
168
162
|
# @param [Hash] payload Payload response from the API
|
|
169
|
-
|
|
170
163
|
# @return [WorkspaceInstance] WorkspaceInstance
|
|
171
164
|
def get_instance(payload)
|
|
172
165
|
return WorkspaceInstance.new(
|
|
@@ -187,7 +180,6 @@ module Twilio
|
|
|
187
180
|
# Initialize the WorkspaceContext
|
|
188
181
|
# @param [Version] version Version that contains the resource
|
|
189
182
|
# @param [String] sid The sid
|
|
190
|
-
|
|
191
183
|
# @return [WorkspaceContext] WorkspaceContext
|
|
192
184
|
def initialize(version, sid)
|
|
193
185
|
super(version)
|
|
@@ -223,7 +215,7 @@ module Twilio
|
|
|
223
215
|
return WorkspaceInstance.new(
|
|
224
216
|
@version,
|
|
225
217
|
payload,
|
|
226
|
-
sid: @solution[
|
|
218
|
+
sid: @solution[:sid],
|
|
227
219
|
)
|
|
228
220
|
end
|
|
229
221
|
|
|
@@ -233,7 +225,6 @@ module Twilio
|
|
|
233
225
|
# @param [String] event_callback_url The event_callback_url
|
|
234
226
|
# @param [String] friendly_name The friendly_name
|
|
235
227
|
# @param [String] timeout_activity_sid The timeout_activity_sid
|
|
236
|
-
|
|
237
228
|
# @return [WorkspaceInstance] Updated WorkspaceInstance
|
|
238
229
|
def update(default_activity_sid: nil, event_callback_url: nil, friendly_name: nil, timeout_activity_sid: nil)
|
|
239
230
|
data = {
|
|
@@ -252,7 +243,7 @@ module Twilio
|
|
|
252
243
|
return WorkspaceInstance.new(
|
|
253
244
|
@version,
|
|
254
245
|
payload,
|
|
255
|
-
sid: @solution[
|
|
246
|
+
sid: @solution[:sid],
|
|
256
247
|
)
|
|
257
248
|
end
|
|
258
249
|
|
|
@@ -419,7 +410,6 @@ module Twilio
|
|
|
419
410
|
# @param [Version] version Version that contains the resource
|
|
420
411
|
# @param [Hash] payload payload that contains response from Twilio
|
|
421
412
|
# @param [String] sid The sid
|
|
422
|
-
|
|
423
413
|
# @return [WorkspaceInstance] WorkspaceInstance
|
|
424
414
|
def initialize(version, payload, sid: nil)
|
|
425
415
|
super(version)
|
|
@@ -449,7 +439,6 @@ module Twilio
|
|
|
449
439
|
# Generate an instance context for the instance, the context is capable of
|
|
450
440
|
# performing various actions. All instance actions are proxied to the context
|
|
451
441
|
# @param [Version] version Version that contains the resource
|
|
452
|
-
|
|
453
442
|
# @return [WorkspaceContext] WorkspaceContext for this WorkspaceInstance
|
|
454
443
|
def context
|
|
455
444
|
unless @instance_context
|
|
@@ -505,7 +494,7 @@ module Twilio
|
|
|
505
494
|
# Fetch a WorkspaceInstance
|
|
506
495
|
# @return [WorkspaceInstance] Fetched WorkspaceInstance
|
|
507
496
|
def fetch
|
|
508
|
-
|
|
497
|
+
context.fetch
|
|
509
498
|
end
|
|
510
499
|
|
|
511
500
|
##
|
|
@@ -514,10 +503,10 @@ module Twilio
|
|
|
514
503
|
# @param [String] event_callback_url The event_callback_url
|
|
515
504
|
# @param [String] friendly_name The friendly_name
|
|
516
505
|
# @param [String] timeout_activity_sid The timeout_activity_sid
|
|
517
|
-
|
|
518
506
|
# @return [WorkspaceInstance] Updated WorkspaceInstance
|
|
519
507
|
def update(default_activity_sid: nil, event_callback_url: nil, friendly_name: nil, timeout_activity_sid: nil)
|
|
520
|
-
|
|
508
|
+
context.update(
|
|
509
|
+
default_activity_sid: default_activity_sid,
|
|
521
510
|
event_callback_url: event_callback_url,
|
|
522
511
|
friendly_name: friendly_name,
|
|
523
512
|
timeout_activity_sid: timeout_activity_sid,
|
|
@@ -528,63 +517,63 @@ module Twilio
|
|
|
528
517
|
# Deletes the WorkspaceInstance
|
|
529
518
|
# @return [Boolean] true if delete succeeds, true otherwise
|
|
530
519
|
def delete
|
|
531
|
-
|
|
520
|
+
context.delete
|
|
532
521
|
end
|
|
533
522
|
|
|
534
523
|
##
|
|
535
524
|
# Access the activities
|
|
536
525
|
# @return [activities] activities
|
|
537
526
|
def activities
|
|
538
|
-
|
|
527
|
+
context.activities
|
|
539
528
|
end
|
|
540
529
|
|
|
541
530
|
##
|
|
542
531
|
# Access the events
|
|
543
532
|
# @return [events] events
|
|
544
533
|
def events
|
|
545
|
-
|
|
534
|
+
context.events
|
|
546
535
|
end
|
|
547
536
|
|
|
548
537
|
##
|
|
549
538
|
# Access the tasks
|
|
550
539
|
# @return [tasks] tasks
|
|
551
540
|
def tasks
|
|
552
|
-
|
|
541
|
+
context.tasks
|
|
553
542
|
end
|
|
554
543
|
|
|
555
544
|
##
|
|
556
545
|
# Access the task_queues
|
|
557
546
|
# @return [task_queues] task_queues
|
|
558
547
|
def task_queues
|
|
559
|
-
|
|
548
|
+
context.task_queues
|
|
560
549
|
end
|
|
561
550
|
|
|
562
551
|
##
|
|
563
552
|
# Access the workers
|
|
564
553
|
# @return [workers] workers
|
|
565
554
|
def workers
|
|
566
|
-
|
|
555
|
+
context.workers
|
|
567
556
|
end
|
|
568
557
|
|
|
569
558
|
##
|
|
570
559
|
# Access the workflows
|
|
571
560
|
# @return [workflows] workflows
|
|
572
561
|
def workflows
|
|
573
|
-
|
|
562
|
+
context.workflows
|
|
574
563
|
end
|
|
575
564
|
|
|
576
565
|
##
|
|
577
566
|
# Access the statistics
|
|
578
567
|
# @return [statistics] statistics
|
|
579
568
|
def statistics
|
|
580
|
-
|
|
569
|
+
context.statistics
|
|
581
570
|
end
|
|
582
571
|
|
|
583
572
|
##
|
|
584
573
|
# Provide a user friendly representation
|
|
585
574
|
def to_s
|
|
586
|
-
|
|
587
|
-
"<Twilio.Taskrouter.V1.WorkspaceInstance #{
|
|
575
|
+
values = @params.map{|k, v| "#{k}: #{v}"}.join(" ")
|
|
576
|
+
"<Twilio.Taskrouter.V1.WorkspaceInstance #{values}>"
|
|
588
577
|
end
|
|
589
578
|
end
|
|
590
579
|
end
|