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] account_sid The unique id of the Account responsible for
|
|
18
18
|
# creating this Call
|
|
19
|
-
|
|
20
19
|
# @return [FeedbackSummaryList] FeedbackSummaryList
|
|
21
20
|
def initialize(version, account_sid: nil)
|
|
22
21
|
super(version)
|
|
@@ -36,7 +35,6 @@ module Twilio
|
|
|
36
35
|
# @param [Boolean] include_subaccounts The include_subaccounts
|
|
37
36
|
# @param [String] status_callback The status_callback
|
|
38
37
|
# @param [String] status_callback_method The status_callback_method
|
|
39
|
-
|
|
40
38
|
# @return [FeedbackSummaryInstance] Newly created FeedbackSummaryInstance
|
|
41
39
|
def create(start_date: nil, end_date: nil, include_subaccounts: nil, status_callback: nil, status_callback_method: nil)
|
|
42
40
|
data = {
|
|
@@ -56,7 +54,7 @@ module Twilio
|
|
|
56
54
|
return FeedbackSummaryInstance.new(
|
|
57
55
|
@version,
|
|
58
56
|
payload,
|
|
59
|
-
account_sid: @solution[
|
|
57
|
+
account_sid: @solution[:account_sid],
|
|
60
58
|
)
|
|
61
59
|
end
|
|
62
60
|
|
|
@@ -75,7 +73,6 @@ module Twilio
|
|
|
75
73
|
# @param [Hash] solution Path solution for the resource
|
|
76
74
|
# @param [String] account_sid The unique id of the Account responsible for
|
|
77
75
|
# creating this Call
|
|
78
|
-
|
|
79
76
|
# @return [FeedbackSummaryPage] FeedbackSummaryPage
|
|
80
77
|
def initialize(version, response, solution)
|
|
81
78
|
super(version, response)
|
|
@@ -87,13 +84,12 @@ module Twilio
|
|
|
87
84
|
##
|
|
88
85
|
# Build an instance of FeedbackSummaryInstance
|
|
89
86
|
# @param [Hash] payload Payload response from the API
|
|
90
|
-
|
|
91
87
|
# @return [FeedbackSummaryInstance] FeedbackSummaryInstance
|
|
92
88
|
def get_instance(payload)
|
|
93
89
|
return FeedbackSummaryInstance.new(
|
|
94
90
|
@version,
|
|
95
91
|
payload,
|
|
96
|
-
account_sid: @solution[
|
|
92
|
+
account_sid: @solution[:account_sid],
|
|
97
93
|
)
|
|
98
94
|
end
|
|
99
95
|
|
|
@@ -110,7 +106,6 @@ module Twilio
|
|
|
110
106
|
# @param [Version] version Version that contains the resource
|
|
111
107
|
# @param [String] account_sid The account_sid
|
|
112
108
|
# @param [String] sid The sid
|
|
113
|
-
|
|
114
109
|
# @return [FeedbackSummaryContext] FeedbackSummaryContext
|
|
115
110
|
def initialize(version, account_sid, sid)
|
|
116
111
|
super(version)
|
|
@@ -138,8 +133,8 @@ module Twilio
|
|
|
138
133
|
return FeedbackSummaryInstance.new(
|
|
139
134
|
@version,
|
|
140
135
|
payload,
|
|
141
|
-
account_sid: @solution[
|
|
142
|
-
sid: @solution[
|
|
136
|
+
account_sid: @solution[:account_sid],
|
|
137
|
+
sid: @solution[:sid],
|
|
143
138
|
)
|
|
144
139
|
end
|
|
145
140
|
|
|
@@ -166,7 +161,6 @@ module Twilio
|
|
|
166
161
|
# @param [String] account_sid The unique id of the Account responsible for
|
|
167
162
|
# creating this Call
|
|
168
163
|
# @param [String] sid The sid
|
|
169
|
-
|
|
170
164
|
# @return [FeedbackSummaryInstance] FeedbackSummaryInstance
|
|
171
165
|
def initialize(version, payload, account_sid: nil, sid: nil)
|
|
172
166
|
super(version)
|
|
@@ -201,7 +195,6 @@ module Twilio
|
|
|
201
195
|
# Generate an instance context for the instance, the context is capable of
|
|
202
196
|
# performing various actions. All instance actions are proxied to the context
|
|
203
197
|
# @param [Version] version Version that contains the resource
|
|
204
|
-
|
|
205
198
|
# @return [FeedbackSummaryContext] FeedbackSummaryContext for this FeedbackSummaryInstance
|
|
206
199
|
def context
|
|
207
200
|
unless @instance_context
|
|
@@ -274,21 +267,21 @@ module Twilio
|
|
|
274
267
|
# Fetch a FeedbackSummaryInstance
|
|
275
268
|
# @return [FeedbackSummaryInstance] Fetched FeedbackSummaryInstance
|
|
276
269
|
def fetch
|
|
277
|
-
|
|
270
|
+
context.fetch
|
|
278
271
|
end
|
|
279
272
|
|
|
280
273
|
##
|
|
281
274
|
# Deletes the FeedbackSummaryInstance
|
|
282
275
|
# @return [Boolean] true if delete succeeds, true otherwise
|
|
283
276
|
def delete
|
|
284
|
-
|
|
277
|
+
context.delete
|
|
285
278
|
end
|
|
286
279
|
|
|
287
280
|
##
|
|
288
281
|
# Provide a user friendly representation
|
|
289
282
|
def to_s
|
|
290
|
-
|
|
291
|
-
"<Twilio.Api.V2010.FeedbackSummaryInstance #{
|
|
283
|
+
values = @params.map{|k, v| "#{k}: #{v}"}.join(" ")
|
|
284
|
+
"<Twilio.Api.V2010.FeedbackSummaryInstance #{values}>"
|
|
292
285
|
end
|
|
293
286
|
end
|
|
294
287
|
end
|
|
@@ -16,7 +16,6 @@ module Twilio
|
|
|
16
16
|
# @param [Version] version Version that contains the resource
|
|
17
17
|
# @param [String] account_sid The account_sid
|
|
18
18
|
# @param [String] call_sid The call_sid
|
|
19
|
-
|
|
20
19
|
# @return [NotificationList] NotificationList
|
|
21
20
|
def initialize(version, account_sid: nil, call_sid: nil)
|
|
22
21
|
super(version)
|
|
@@ -43,7 +42,6 @@ module Twilio
|
|
|
43
42
|
# the default value of 50 records. If no page_size is defined
|
|
44
43
|
# but a limit is defined, stream() will attempt to read the
|
|
45
44
|
# limit with the most efficient page size, i.e. min(limit, 1000)
|
|
46
|
-
|
|
47
45
|
# @return [Array] Array of up to limit results
|
|
48
46
|
def list(log: nil, message_date_before: nil, message_date: nil, message_date_after: nil, limit: nil, page_size: nil)
|
|
49
47
|
self.stream(
|
|
@@ -70,7 +68,6 @@ module Twilio
|
|
|
70
68
|
# the default value of 50 records. If no page_size is defined
|
|
71
69
|
# but a limit is defined, stream() will attempt to read the
|
|
72
70
|
# limit with the most efficient page size, i.e. min(limit, 1000)
|
|
73
|
-
|
|
74
71
|
# @return [Enumerable] Enumerable that will yield up to limit results
|
|
75
72
|
def stream(log: nil, message_date_before: nil, message_date: nil, message_date_after: nil, limit: nil, page_size: nil)
|
|
76
73
|
limits = @version.read_limits(limit, page_size)
|
|
@@ -122,7 +119,6 @@ module Twilio
|
|
|
122
119
|
# @param [String] page_token PageToken provided by the API
|
|
123
120
|
# @param [Integer] page_number Page Number, this value is simply for client state
|
|
124
121
|
# @param [Integer] page_size Number of records to return, defaults to 50
|
|
125
|
-
|
|
126
122
|
# @return [Page] Page of NotificationInstance
|
|
127
123
|
def page(log: nil, message_date_before: nil, message_date: nil, message_date_after: nil, page_token: nil, page_number: nil, page_size: nil)
|
|
128
124
|
params = {
|
|
@@ -157,7 +153,6 @@ module Twilio
|
|
|
157
153
|
# @param [Hash] solution Path solution for the resource
|
|
158
154
|
# @param [String] account_sid The account_sid
|
|
159
155
|
# @param [String] call_sid The call_sid
|
|
160
|
-
|
|
161
156
|
# @return [NotificationPage] NotificationPage
|
|
162
157
|
def initialize(version, response, solution)
|
|
163
158
|
super(version, response)
|
|
@@ -169,14 +164,13 @@ module Twilio
|
|
|
169
164
|
##
|
|
170
165
|
# Build an instance of NotificationInstance
|
|
171
166
|
# @param [Hash] payload Payload response from the API
|
|
172
|
-
|
|
173
167
|
# @return [NotificationInstance] NotificationInstance
|
|
174
168
|
def get_instance(payload)
|
|
175
169
|
return NotificationInstance.new(
|
|
176
170
|
@version,
|
|
177
171
|
payload,
|
|
178
|
-
account_sid: @solution[
|
|
179
|
-
call_sid: @solution[
|
|
172
|
+
account_sid: @solution[:account_sid],
|
|
173
|
+
call_sid: @solution[:call_sid],
|
|
180
174
|
)
|
|
181
175
|
end
|
|
182
176
|
|
|
@@ -194,7 +188,6 @@ module Twilio
|
|
|
194
188
|
# @param [String] account_sid The account_sid
|
|
195
189
|
# @param [String] call_sid The call_sid
|
|
196
190
|
# @param [String] sid The sid
|
|
197
|
-
|
|
198
191
|
# @return [NotificationContext] NotificationContext
|
|
199
192
|
def initialize(version, account_sid, call_sid, sid)
|
|
200
193
|
super(version)
|
|
@@ -223,9 +216,9 @@ module Twilio
|
|
|
223
216
|
return NotificationInstance.new(
|
|
224
217
|
@version,
|
|
225
218
|
payload,
|
|
226
|
-
account_sid: @solution[
|
|
227
|
-
call_sid: @solution[
|
|
228
|
-
sid: @solution[
|
|
219
|
+
account_sid: @solution[:account_sid],
|
|
220
|
+
call_sid: @solution[:call_sid],
|
|
221
|
+
sid: @solution[:sid],
|
|
229
222
|
)
|
|
230
223
|
end
|
|
231
224
|
|
|
@@ -252,7 +245,6 @@ module Twilio
|
|
|
252
245
|
# @param [String] account_sid The account_sid
|
|
253
246
|
# @param [String] call_sid The call_sid
|
|
254
247
|
# @param [String] sid The sid
|
|
255
|
-
|
|
256
248
|
# @return [NotificationInstance] NotificationInstance
|
|
257
249
|
def initialize(version, payload, account_sid: nil, call_sid: nil, sid: nil)
|
|
258
250
|
super(version)
|
|
@@ -291,7 +283,6 @@ module Twilio
|
|
|
291
283
|
# Generate an instance context for the instance, the context is capable of
|
|
292
284
|
# performing various actions. All instance actions are proxied to the context
|
|
293
285
|
# @param [Version] version Version that contains the resource
|
|
294
|
-
|
|
295
286
|
# @return [NotificationContext] NotificationContext for this NotificationInstance
|
|
296
287
|
def context
|
|
297
288
|
unless @instance_context
|
|
@@ -377,21 +368,21 @@ module Twilio
|
|
|
377
368
|
# Fetch a NotificationInstance
|
|
378
369
|
# @return [NotificationInstance] Fetched NotificationInstance
|
|
379
370
|
def fetch
|
|
380
|
-
|
|
371
|
+
context.fetch
|
|
381
372
|
end
|
|
382
373
|
|
|
383
374
|
##
|
|
384
375
|
# Deletes the NotificationInstance
|
|
385
376
|
# @return [Boolean] true if delete succeeds, true otherwise
|
|
386
377
|
def delete
|
|
387
|
-
|
|
378
|
+
context.delete
|
|
388
379
|
end
|
|
389
380
|
|
|
390
381
|
##
|
|
391
382
|
# Provide a user friendly representation
|
|
392
383
|
def to_s
|
|
393
|
-
|
|
394
|
-
"<Twilio.Api.V2010.NotificationInstance #{
|
|
384
|
+
values = @params.map{|k, v| "#{k}: #{v}"}.join(" ")
|
|
385
|
+
"<Twilio.Api.V2010.NotificationInstance #{values}>"
|
|
395
386
|
end
|
|
396
387
|
end
|
|
397
388
|
end
|
|
@@ -16,7 +16,6 @@ module Twilio
|
|
|
16
16
|
# @param [Version] version Version that contains the resource
|
|
17
17
|
# @param [String] account_sid The account_sid
|
|
18
18
|
# @param [String] call_sid The call_sid
|
|
19
|
-
|
|
20
19
|
# @return [RecordingList] RecordingList
|
|
21
20
|
def initialize(version, account_sid: nil, call_sid: nil)
|
|
22
21
|
super(version)
|
|
@@ -42,7 +41,6 @@ module Twilio
|
|
|
42
41
|
# the default value of 50 records. If no page_size is defined
|
|
43
42
|
# but a limit is defined, stream() will attempt to read the
|
|
44
43
|
# limit with the most efficient page size, i.e. min(limit, 1000)
|
|
45
|
-
|
|
46
44
|
# @return [Array] Array of up to limit results
|
|
47
45
|
def list(date_created_before: nil, date_created: nil, date_created_after: nil, limit: nil, page_size: nil)
|
|
48
46
|
self.stream(
|
|
@@ -67,7 +65,6 @@ module Twilio
|
|
|
67
65
|
# the default value of 50 records. If no page_size is defined
|
|
68
66
|
# but a limit is defined, stream() will attempt to read the
|
|
69
67
|
# limit with the most efficient page size, i.e. min(limit, 1000)
|
|
70
|
-
|
|
71
68
|
# @return [Enumerable] Enumerable that will yield up to limit results
|
|
72
69
|
def stream(date_created_before: nil, date_created: nil, date_created_after: nil, limit: nil, page_size: nil)
|
|
73
70
|
limits = @version.read_limits(limit, page_size)
|
|
@@ -116,7 +113,6 @@ module Twilio
|
|
|
116
113
|
# @param [String] page_token PageToken provided by the API
|
|
117
114
|
# @param [Integer] page_number Page Number, this value is simply for client state
|
|
118
115
|
# @param [Integer] page_size Number of records to return, defaults to 50
|
|
119
|
-
|
|
120
116
|
# @return [Page] Page of RecordingInstance
|
|
121
117
|
def page(date_created_before: nil, date_created: nil, date_created_after: nil, page_token: nil, page_number: nil, page_size: nil)
|
|
122
118
|
params = {
|
|
@@ -150,7 +146,6 @@ module Twilio
|
|
|
150
146
|
# @param [Hash] solution Path solution for the resource
|
|
151
147
|
# @param [String] account_sid The account_sid
|
|
152
148
|
# @param [String] call_sid The call_sid
|
|
153
|
-
|
|
154
149
|
# @return [RecordingPage] RecordingPage
|
|
155
150
|
def initialize(version, response, solution)
|
|
156
151
|
super(version, response)
|
|
@@ -162,14 +157,13 @@ module Twilio
|
|
|
162
157
|
##
|
|
163
158
|
# Build an instance of RecordingInstance
|
|
164
159
|
# @param [Hash] payload Payload response from the API
|
|
165
|
-
|
|
166
160
|
# @return [RecordingInstance] RecordingInstance
|
|
167
161
|
def get_instance(payload)
|
|
168
162
|
return RecordingInstance.new(
|
|
169
163
|
@version,
|
|
170
164
|
payload,
|
|
171
|
-
account_sid: @solution[
|
|
172
|
-
call_sid: @solution[
|
|
165
|
+
account_sid: @solution[:account_sid],
|
|
166
|
+
call_sid: @solution[:call_sid],
|
|
173
167
|
)
|
|
174
168
|
end
|
|
175
169
|
|
|
@@ -187,7 +181,6 @@ module Twilio
|
|
|
187
181
|
# @param [String] account_sid The account_sid
|
|
188
182
|
# @param [String] call_sid The call_sid
|
|
189
183
|
# @param [String] sid The sid
|
|
190
|
-
|
|
191
184
|
# @return [RecordingContext] RecordingContext
|
|
192
185
|
def initialize(version, account_sid, call_sid, sid)
|
|
193
186
|
super(version)
|
|
@@ -216,9 +209,9 @@ module Twilio
|
|
|
216
209
|
return RecordingInstance.new(
|
|
217
210
|
@version,
|
|
218
211
|
payload,
|
|
219
|
-
account_sid: @solution[
|
|
220
|
-
call_sid: @solution[
|
|
221
|
-
sid: @solution[
|
|
212
|
+
account_sid: @solution[:account_sid],
|
|
213
|
+
call_sid: @solution[:call_sid],
|
|
214
|
+
sid: @solution[:sid],
|
|
222
215
|
)
|
|
223
216
|
end
|
|
224
217
|
|
|
@@ -245,7 +238,6 @@ module Twilio
|
|
|
245
238
|
# @param [String] account_sid The account_sid
|
|
246
239
|
# @param [String] call_sid The call_sid
|
|
247
240
|
# @param [String] sid The sid
|
|
248
|
-
|
|
249
241
|
# @return [RecordingInstance] RecordingInstance
|
|
250
242
|
def initialize(version, payload, account_sid: nil, call_sid: nil, sid: nil)
|
|
251
243
|
super(version)
|
|
@@ -275,7 +267,6 @@ module Twilio
|
|
|
275
267
|
# Generate an instance context for the instance, the context is capable of
|
|
276
268
|
# performing various actions. All instance actions are proxied to the context
|
|
277
269
|
# @param [Version] version Version that contains the resource
|
|
278
|
-
|
|
279
270
|
# @return [RecordingContext] RecordingContext for this RecordingInstance
|
|
280
271
|
def context
|
|
281
272
|
unless @instance_context
|
|
@@ -325,21 +316,21 @@ module Twilio
|
|
|
325
316
|
# Fetch a RecordingInstance
|
|
326
317
|
# @return [RecordingInstance] Fetched RecordingInstance
|
|
327
318
|
def fetch
|
|
328
|
-
|
|
319
|
+
context.fetch
|
|
329
320
|
end
|
|
330
321
|
|
|
331
322
|
##
|
|
332
323
|
# Deletes the RecordingInstance
|
|
333
324
|
# @return [Boolean] true if delete succeeds, true otherwise
|
|
334
325
|
def delete
|
|
335
|
-
|
|
326
|
+
context.delete
|
|
336
327
|
end
|
|
337
328
|
|
|
338
329
|
##
|
|
339
330
|
# Provide a user friendly representation
|
|
340
331
|
def to_s
|
|
341
|
-
|
|
342
|
-
"<Twilio.Api.V2010.RecordingInstance #{
|
|
332
|
+
values = @params.map{|k, v| "#{k}: #{v}"}.join(" ")
|
|
333
|
+
"<Twilio.Api.V2010.RecordingInstance #{values}>"
|
|
343
334
|
end
|
|
344
335
|
end
|
|
345
336
|
end
|
|
@@ -15,7 +15,6 @@ module Twilio
|
|
|
15
15
|
# @param [Version] version Version that contains the resource
|
|
16
16
|
# @param [String] account_sid The unique id of the Account responsible for
|
|
17
17
|
# creating this Call
|
|
18
|
-
|
|
19
18
|
# @return [CallList] CallList
|
|
20
19
|
def initialize(version, account_sid: nil)
|
|
21
20
|
super(version)
|
|
@@ -67,15 +66,16 @@ module Twilio
|
|
|
67
66
|
# @param [Boolean] record Set this parameter to true to record the entirety of a
|
|
68
67
|
# phone call. The RecordingUrl will be sent to the StatusCallback URL. Defaults to
|
|
69
68
|
# false.
|
|
69
|
+
# @param [String] sip_auth_username The sip_auth_username
|
|
70
|
+
# @param [String] sip_auth_password The sip_auth_password
|
|
70
71
|
# @param [String] url The fully qualified URL that should be consulted when the
|
|
71
72
|
# call connects. Just like when you set a URL on a phone number for handling
|
|
72
73
|
# inbound calls.
|
|
73
74
|
# @param [String] application_sid The 34 character sid of the application Twilio
|
|
74
75
|
# should use to handle this phone call. If this parameter is present, Twilio will
|
|
75
76
|
# ignore all of the voice URLs passed and use the URLs set on the application.
|
|
76
|
-
|
|
77
77
|
# @return [CallInstance] Newly created CallInstance
|
|
78
|
-
def create(to: nil, from: nil, method: nil, fallback_url: nil, fallback_method: nil, status_callback: nil, status_callback_method: nil, send_digits: nil, if_machine: nil, timeout: nil, record: nil, url: nil, application_sid: nil)
|
|
78
|
+
def create(to: nil, from: nil, method: nil, fallback_url: nil, fallback_method: nil, status_callback: nil, status_callback_method: nil, send_digits: nil, if_machine: nil, timeout: nil, record: nil, sip_auth_username: nil, sip_auth_password: nil, url: nil, application_sid: nil)
|
|
79
79
|
data = {
|
|
80
80
|
'To' => to,
|
|
81
81
|
'From' => from,
|
|
@@ -90,6 +90,8 @@ module Twilio
|
|
|
90
90
|
'IfMachine' => if_machine,
|
|
91
91
|
'Timeout' => timeout,
|
|
92
92
|
'Record' => record,
|
|
93
|
+
'SipAuthUsername' => sip_auth_username,
|
|
94
|
+
'SipAuthPassword' => sip_auth_password,
|
|
93
95
|
}
|
|
94
96
|
|
|
95
97
|
payload = @version.create(
|
|
@@ -101,7 +103,7 @@ module Twilio
|
|
|
101
103
|
return CallInstance.new(
|
|
102
104
|
@version,
|
|
103
105
|
payload,
|
|
104
|
-
account_sid: @solution[
|
|
106
|
+
account_sid: @solution[:account_sid],
|
|
105
107
|
)
|
|
106
108
|
end
|
|
107
109
|
|
|
@@ -126,7 +128,6 @@ module Twilio
|
|
|
126
128
|
# the default value of 50 records. If no page_size is defined
|
|
127
129
|
# but a limit is defined, stream() will attempt to read the
|
|
128
130
|
# limit with the most efficient page size, i.e. min(limit, 1000)
|
|
129
|
-
|
|
130
131
|
# @return [Array] Array of up to limit results
|
|
131
132
|
def list(to: nil, from: nil, parent_call_sid: nil, status: nil, start_time_before: nil, start_time: nil, start_time_after: nil, end_time_before: nil, end_time: nil, end_time_after: nil, limit: nil, page_size: nil)
|
|
132
133
|
self.stream(
|
|
@@ -166,7 +167,6 @@ module Twilio
|
|
|
166
167
|
# the default value of 50 records. If no page_size is defined
|
|
167
168
|
# but a limit is defined, stream() will attempt to read the
|
|
168
169
|
# limit with the most efficient page size, i.e. min(limit, 1000)
|
|
169
|
-
|
|
170
170
|
# @return [Enumerable] Enumerable that will yield up to limit results
|
|
171
171
|
def stream(to: nil, from: nil, parent_call_sid: nil, status: nil, start_time_before: nil, start_time: nil, start_time_after: nil, end_time_before: nil, end_time: nil, end_time_after: nil, limit: nil, page_size: nil)
|
|
172
172
|
limits = @version.read_limits(limit, page_size)
|
|
@@ -238,7 +238,6 @@ module Twilio
|
|
|
238
238
|
# @param [String] page_token PageToken provided by the API
|
|
239
239
|
# @param [Integer] page_number Page Number, this value is simply for client state
|
|
240
240
|
# @param [Integer] page_size Number of records to return, defaults to 50
|
|
241
|
-
|
|
242
241
|
# @return [Page] Page of CallInstance
|
|
243
242
|
def page(to: nil, from: nil, parent_call_sid: nil, status: nil, start_time_before: nil, start_time: nil, start_time_after: nil, end_time_before: nil, end_time: nil, end_time_after: nil, page_token: nil, page_number: nil, page_size: nil)
|
|
244
243
|
params = {
|
|
@@ -267,7 +266,6 @@ module Twilio
|
|
|
267
266
|
##
|
|
268
267
|
# Access the feedback_summaries
|
|
269
268
|
# @param [String] sid The sid
|
|
270
|
-
|
|
271
269
|
# @return [FeedbackSummaryList] FeedbackSummaryList
|
|
272
270
|
def feedback_summaries(sid=:unset)
|
|
273
271
|
if sid != :unset
|
|
@@ -299,7 +297,6 @@ module Twilio
|
|
|
299
297
|
# @param [Hash] solution Path solution for the resource
|
|
300
298
|
# @param [String] account_sid The unique id of the Account responsible for
|
|
301
299
|
# creating this Call
|
|
302
|
-
|
|
303
300
|
# @return [CallPage] CallPage
|
|
304
301
|
def initialize(version, response, solution)
|
|
305
302
|
super(version, response)
|
|
@@ -311,13 +308,12 @@ module Twilio
|
|
|
311
308
|
##
|
|
312
309
|
# Build an instance of CallInstance
|
|
313
310
|
# @param [Hash] payload Payload response from the API
|
|
314
|
-
|
|
315
311
|
# @return [CallInstance] CallInstance
|
|
316
312
|
def get_instance(payload)
|
|
317
313
|
return CallInstance.new(
|
|
318
314
|
@version,
|
|
319
315
|
payload,
|
|
320
|
-
account_sid: @solution[
|
|
316
|
+
account_sid: @solution[:account_sid],
|
|
321
317
|
)
|
|
322
318
|
end
|
|
323
319
|
|
|
@@ -334,7 +330,6 @@ module Twilio
|
|
|
334
330
|
# @param [Version] version Version that contains the resource
|
|
335
331
|
# @param [String] account_sid The account_sid
|
|
336
332
|
# @param [String] sid The Call Sid that uniquely identifies the Call to fetch
|
|
337
|
-
|
|
338
333
|
# @return [CallContext] CallContext
|
|
339
334
|
def initialize(version, account_sid, sid)
|
|
340
335
|
super(version)
|
|
@@ -374,8 +369,8 @@ module Twilio
|
|
|
374
369
|
return CallInstance.new(
|
|
375
370
|
@version,
|
|
376
371
|
payload,
|
|
377
|
-
account_sid: @solution[
|
|
378
|
-
sid: @solution[
|
|
372
|
+
account_sid: @solution[:account_sid],
|
|
373
|
+
sid: @solution[:sid],
|
|
379
374
|
)
|
|
380
375
|
end
|
|
381
376
|
|
|
@@ -397,7 +392,6 @@ module Twilio
|
|
|
397
392
|
# ends to notify your app.
|
|
398
393
|
# @param [String] status_callback_method The HTTP method that Twilio should use to
|
|
399
394
|
# request the `StatusCallback`. Defaults to `POST`.
|
|
400
|
-
|
|
401
395
|
# @return [CallInstance] Updated CallInstance
|
|
402
396
|
def update(url: nil, method: nil, status: nil, fallback_url: nil, fallback_method: nil, status_callback: nil, status_callback_method: nil)
|
|
403
397
|
data = {
|
|
@@ -419,8 +413,8 @@ module Twilio
|
|
|
419
413
|
return CallInstance.new(
|
|
420
414
|
@version,
|
|
421
415
|
payload,
|
|
422
|
-
account_sid: @solution[
|
|
423
|
-
sid: @solution[
|
|
416
|
+
account_sid: @solution[:account_sid],
|
|
417
|
+
sid: @solution[:sid],
|
|
424
418
|
)
|
|
425
419
|
end
|
|
426
420
|
|
|
@@ -499,7 +493,6 @@ module Twilio
|
|
|
499
493
|
# @param [String] account_sid The unique id of the Account responsible for
|
|
500
494
|
# creating this Call
|
|
501
495
|
# @param [String] sid The Call Sid that uniquely identifies the Call to fetch
|
|
502
|
-
|
|
503
496
|
# @return [CallInstance] CallInstance
|
|
504
497
|
def initialize(version, payload, account_sid: nil, sid: nil)
|
|
505
498
|
super(version)
|
|
@@ -545,7 +538,6 @@ module Twilio
|
|
|
545
538
|
# Generate an instance context for the instance, the context is capable of
|
|
546
539
|
# performing various actions. All instance actions are proxied to the context
|
|
547
540
|
# @param [Version] version Version that contains the resource
|
|
548
|
-
|
|
549
541
|
# @return [CallContext] CallContext for this CallInstance
|
|
550
542
|
def context
|
|
551
543
|
unless @instance_context
|
|
@@ -662,14 +654,14 @@ module Twilio
|
|
|
662
654
|
# Deletes the CallInstance
|
|
663
655
|
# @return [Boolean] true if delete succeeds, true otherwise
|
|
664
656
|
def delete
|
|
665
|
-
|
|
657
|
+
context.delete
|
|
666
658
|
end
|
|
667
659
|
|
|
668
660
|
##
|
|
669
661
|
# Fetch a CallInstance
|
|
670
662
|
# @return [CallInstance] Fetched CallInstance
|
|
671
663
|
def fetch
|
|
672
|
-
|
|
664
|
+
context.fetch
|
|
673
665
|
end
|
|
674
666
|
|
|
675
667
|
##
|
|
@@ -690,10 +682,10 @@ module Twilio
|
|
|
690
682
|
# ends to notify your app.
|
|
691
683
|
# @param [String] status_callback_method The HTTP method that Twilio should use to
|
|
692
684
|
# request the `StatusCallback`. Defaults to `POST`.
|
|
693
|
-
|
|
694
685
|
# @return [CallInstance] Updated CallInstance
|
|
695
686
|
def update(url: nil, method: nil, status: nil, fallback_url: nil, fallback_method: nil, status_callback: nil, status_callback_method: nil)
|
|
696
|
-
|
|
687
|
+
context.update(
|
|
688
|
+
url: url,
|
|
697
689
|
method: method,
|
|
698
690
|
status: status,
|
|
699
691
|
fallback_url: fallback_url,
|
|
@@ -707,28 +699,28 @@ module Twilio
|
|
|
707
699
|
# Access the recordings
|
|
708
700
|
# @return [recordings] recordings
|
|
709
701
|
def recordings
|
|
710
|
-
|
|
702
|
+
context.recordings
|
|
711
703
|
end
|
|
712
704
|
|
|
713
705
|
##
|
|
714
706
|
# Access the notifications
|
|
715
707
|
# @return [notifications] notifications
|
|
716
708
|
def notifications
|
|
717
|
-
|
|
709
|
+
context.notifications
|
|
718
710
|
end
|
|
719
711
|
|
|
720
712
|
##
|
|
721
713
|
# Access the feedback
|
|
722
714
|
# @return [feedback] feedback
|
|
723
715
|
def feedback
|
|
724
|
-
|
|
716
|
+
context.feedback
|
|
725
717
|
end
|
|
726
718
|
|
|
727
719
|
##
|
|
728
720
|
# Provide a user friendly representation
|
|
729
721
|
def to_s
|
|
730
|
-
|
|
731
|
-
"<Twilio.Api.V2010.CallInstance #{
|
|
722
|
+
values = @params.map{|k, v| "#{k}: #{v}"}.join(" ")
|
|
723
|
+
"<Twilio.Api.V2010.CallInstance #{values}>"
|
|
732
724
|
end
|
|
733
725
|
end
|
|
734
726
|
end
|