twilio-ruby 5.0.0.rc9 → 5.0.0.rc10
Sign up to get free protection for your applications and to get access to all the features.
- 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
@@ -17,7 +17,6 @@ module Twilio
|
|
17
17
|
# @param [String] account_sid A 34 character string that uniquely identifies this
|
18
18
|
# resource.
|
19
19
|
# @param [String] country_code The country_code
|
20
|
-
|
21
20
|
# @return [LocalList] LocalList
|
22
21
|
def initialize(version, account_sid: nil, country_code: nil)
|
23
22
|
super(version)
|
@@ -51,7 +50,6 @@ module Twilio
|
|
51
50
|
# the default value of 50 records. If no page_size is defined
|
52
51
|
# but a limit is defined, stream() will attempt to read the
|
53
52
|
# limit with the most efficient page size, i.e. min(limit, 1000)
|
54
|
-
|
55
53
|
# @return [Array] Array of up to limit results
|
56
54
|
def list(area_code: nil, contains: nil, sms_enabled: nil, mms_enabled: nil, voice_enabled: nil, exclude_all_address_required: nil, exclude_local_address_required: nil, exclude_foreign_address_required: nil, beta: nil, limit: nil, page_size: nil)
|
57
55
|
self.stream(
|
@@ -90,7 +88,6 @@ module Twilio
|
|
90
88
|
# the default value of 50 records. If no page_size is defined
|
91
89
|
# but a limit is defined, stream() will attempt to read the
|
92
90
|
# limit with the most efficient page size, i.e. min(limit, 1000)
|
93
|
-
|
94
91
|
# @return [Enumerable] Enumerable that will yield up to limit results
|
95
92
|
def stream(area_code: nil, contains: nil, sms_enabled: nil, mms_enabled: nil, voice_enabled: nil, exclude_all_address_required: nil, exclude_local_address_required: nil, exclude_foreign_address_required: nil, beta: nil, limit: nil, page_size: nil)
|
96
93
|
limits = @version.read_limits(limit, page_size)
|
@@ -161,7 +158,6 @@ module Twilio
|
|
161
158
|
# @param [String] page_token PageToken provided by the API
|
162
159
|
# @param [Integer] page_number Page Number, this value is simply for client state
|
163
160
|
# @param [Integer] page_size Number of records to return, defaults to 50
|
164
|
-
|
165
161
|
# @return [Page] Page of LocalInstance
|
166
162
|
def page(area_code: nil, contains: nil, sms_enabled: nil, mms_enabled: nil, voice_enabled: nil, exclude_all_address_required: nil, exclude_local_address_required: nil, exclude_foreign_address_required: nil, beta: nil, page_token: nil, page_number: nil, page_size: nil)
|
167
163
|
params = {
|
@@ -202,7 +198,6 @@ module Twilio
|
|
202
198
|
# @param [String] account_sid A 34 character string that uniquely identifies this
|
203
199
|
# resource.
|
204
200
|
# @param [String] country_code The country_code
|
205
|
-
|
206
201
|
# @return [LocalPage] LocalPage
|
207
202
|
def initialize(version, response, solution)
|
208
203
|
super(version, response)
|
@@ -214,14 +209,13 @@ module Twilio
|
|
214
209
|
##
|
215
210
|
# Build an instance of LocalInstance
|
216
211
|
# @param [Hash] payload Payload response from the API
|
217
|
-
|
218
212
|
# @return [LocalInstance] LocalInstance
|
219
213
|
def get_instance(payload)
|
220
214
|
return LocalInstance.new(
|
221
215
|
@version,
|
222
216
|
payload,
|
223
|
-
account_sid: @solution[
|
224
|
-
country_code: @solution[
|
217
|
+
account_sid: @solution[:account_sid],
|
218
|
+
country_code: @solution[:country_code],
|
225
219
|
)
|
226
220
|
end
|
227
221
|
|
@@ -240,7 +234,6 @@ module Twilio
|
|
240
234
|
# @param [String] account_sid A 34 character string that uniquely identifies this
|
241
235
|
# resource.
|
242
236
|
# @param [String] country_code The country_code
|
243
|
-
|
244
237
|
# @return [LocalInstance] LocalInstance
|
245
238
|
def initialize(version, payload, account_sid: nil, country_code: nil)
|
246
239
|
super(version)
|
@@ -17,7 +17,6 @@ module Twilio
|
|
17
17
|
# @param [String] account_sid A 34 character string that uniquely identifies this
|
18
18
|
# resource.
|
19
19
|
# @param [String] country_code The country_code
|
20
|
-
|
21
20
|
# @return [MobileList] MobileList
|
22
21
|
def initialize(version, account_sid: nil, country_code: nil)
|
23
22
|
super(version)
|
@@ -51,7 +50,6 @@ module Twilio
|
|
51
50
|
# the default value of 50 records. If no page_size is defined
|
52
51
|
# but a limit is defined, stream() will attempt to read the
|
53
52
|
# limit with the most efficient page size, i.e. min(limit, 1000)
|
54
|
-
|
55
53
|
# @return [Array] Array of up to limit results
|
56
54
|
def list(area_code: nil, contains: nil, sms_enabled: nil, mms_enabled: nil, voice_enabled: nil, exclude_all_address_required: nil, exclude_local_address_required: nil, exclude_foreign_address_required: nil, beta: nil, limit: nil, page_size: nil)
|
57
55
|
self.stream(
|
@@ -90,7 +88,6 @@ module Twilio
|
|
90
88
|
# the default value of 50 records. If no page_size is defined
|
91
89
|
# but a limit is defined, stream() will attempt to read the
|
92
90
|
# limit with the most efficient page size, i.e. min(limit, 1000)
|
93
|
-
|
94
91
|
# @return [Enumerable] Enumerable that will yield up to limit results
|
95
92
|
def stream(area_code: nil, contains: nil, sms_enabled: nil, mms_enabled: nil, voice_enabled: nil, exclude_all_address_required: nil, exclude_local_address_required: nil, exclude_foreign_address_required: nil, beta: nil, limit: nil, page_size: nil)
|
96
93
|
limits = @version.read_limits(limit, page_size)
|
@@ -161,7 +158,6 @@ module Twilio
|
|
161
158
|
# @param [String] page_token PageToken provided by the API
|
162
159
|
# @param [Integer] page_number Page Number, this value is simply for client state
|
163
160
|
# @param [Integer] page_size Number of records to return, defaults to 50
|
164
|
-
|
165
161
|
# @return [Page] Page of MobileInstance
|
166
162
|
def page(area_code: nil, contains: nil, sms_enabled: nil, mms_enabled: nil, voice_enabled: nil, exclude_all_address_required: nil, exclude_local_address_required: nil, exclude_foreign_address_required: nil, beta: nil, page_token: nil, page_number: nil, page_size: nil)
|
167
163
|
params = {
|
@@ -202,7 +198,6 @@ module Twilio
|
|
202
198
|
# @param [String] account_sid A 34 character string that uniquely identifies this
|
203
199
|
# resource.
|
204
200
|
# @param [String] country_code The country_code
|
205
|
-
|
206
201
|
# @return [MobilePage] MobilePage
|
207
202
|
def initialize(version, response, solution)
|
208
203
|
super(version, response)
|
@@ -214,14 +209,13 @@ module Twilio
|
|
214
209
|
##
|
215
210
|
# Build an instance of MobileInstance
|
216
211
|
# @param [Hash] payload Payload response from the API
|
217
|
-
|
218
212
|
# @return [MobileInstance] MobileInstance
|
219
213
|
def get_instance(payload)
|
220
214
|
return MobileInstance.new(
|
221
215
|
@version,
|
222
216
|
payload,
|
223
|
-
account_sid: @solution[
|
224
|
-
country_code: @solution[
|
217
|
+
account_sid: @solution[:account_sid],
|
218
|
+
country_code: @solution[:country_code],
|
225
219
|
)
|
226
220
|
end
|
227
221
|
|
@@ -240,7 +234,6 @@ module Twilio
|
|
240
234
|
# @param [String] account_sid A 34 character string that uniquely identifies this
|
241
235
|
# resource.
|
242
236
|
# @param [String] country_code The country_code
|
243
|
-
|
244
237
|
# @return [MobileInstance] MobileInstance
|
245
238
|
def initialize(version, payload, account_sid: nil, country_code: nil)
|
246
239
|
super(version)
|
@@ -17,7 +17,6 @@ module Twilio
|
|
17
17
|
# @param [String] account_sid A 34 character string that uniquely identifies this
|
18
18
|
# resource.
|
19
19
|
# @param [String] country_code The country_code
|
20
|
-
|
21
20
|
# @return [TollFreeList] TollFreeList
|
22
21
|
def initialize(version, account_sid: nil, country_code: nil)
|
23
22
|
super(version)
|
@@ -51,7 +50,6 @@ module Twilio
|
|
51
50
|
# the default value of 50 records. If no page_size is defined
|
52
51
|
# but a limit is defined, stream() will attempt to read the
|
53
52
|
# limit with the most efficient page size, i.e. min(limit, 1000)
|
54
|
-
|
55
53
|
# @return [Array] Array of up to limit results
|
56
54
|
def list(area_code: nil, contains: nil, sms_enabled: nil, mms_enabled: nil, voice_enabled: nil, exclude_all_address_required: nil, exclude_local_address_required: nil, exclude_foreign_address_required: nil, beta: nil, limit: nil, page_size: nil)
|
57
55
|
self.stream(
|
@@ -90,7 +88,6 @@ module Twilio
|
|
90
88
|
# the default value of 50 records. If no page_size is defined
|
91
89
|
# but a limit is defined, stream() will attempt to read the
|
92
90
|
# limit with the most efficient page size, i.e. min(limit, 1000)
|
93
|
-
|
94
91
|
# @return [Enumerable] Enumerable that will yield up to limit results
|
95
92
|
def stream(area_code: nil, contains: nil, sms_enabled: nil, mms_enabled: nil, voice_enabled: nil, exclude_all_address_required: nil, exclude_local_address_required: nil, exclude_foreign_address_required: nil, beta: nil, limit: nil, page_size: nil)
|
96
93
|
limits = @version.read_limits(limit, page_size)
|
@@ -161,7 +158,6 @@ module Twilio
|
|
161
158
|
# @param [String] page_token PageToken provided by the API
|
162
159
|
# @param [Integer] page_number Page Number, this value is simply for client state
|
163
160
|
# @param [Integer] page_size Number of records to return, defaults to 50
|
164
|
-
|
165
161
|
# @return [Page] Page of TollFreeInstance
|
166
162
|
def page(area_code: nil, contains: nil, sms_enabled: nil, mms_enabled: nil, voice_enabled: nil, exclude_all_address_required: nil, exclude_local_address_required: nil, exclude_foreign_address_required: nil, beta: nil, page_token: nil, page_number: nil, page_size: nil)
|
167
163
|
params = {
|
@@ -202,7 +198,6 @@ module Twilio
|
|
202
198
|
# @param [String] account_sid A 34 character string that uniquely identifies this
|
203
199
|
# resource.
|
204
200
|
# @param [String] country_code The country_code
|
205
|
-
|
206
201
|
# @return [TollFreePage] TollFreePage
|
207
202
|
def initialize(version, response, solution)
|
208
203
|
super(version, response)
|
@@ -214,14 +209,13 @@ module Twilio
|
|
214
209
|
##
|
215
210
|
# Build an instance of TollFreeInstance
|
216
211
|
# @param [Hash] payload Payload response from the API
|
217
|
-
|
218
212
|
# @return [TollFreeInstance] TollFreeInstance
|
219
213
|
def get_instance(payload)
|
220
214
|
return TollFreeInstance.new(
|
221
215
|
@version,
|
222
216
|
payload,
|
223
|
-
account_sid: @solution[
|
224
|
-
country_code: @solution[
|
217
|
+
account_sid: @solution[:account_sid],
|
218
|
+
country_code: @solution[:country_code],
|
225
219
|
)
|
226
220
|
end
|
227
221
|
|
@@ -240,7 +234,6 @@ module Twilio
|
|
240
234
|
# @param [String] account_sid A 34 character string that uniquely identifies this
|
241
235
|
# resource.
|
242
236
|
# @param [String] country_code The country_code
|
243
|
-
|
244
237
|
# @return [TollFreeInstance] TollFreeInstance
|
245
238
|
def initialize(version, payload, account_sid: nil, country_code: nil)
|
246
239
|
super(version)
|
@@ -15,7 +15,6 @@ module Twilio
|
|
15
15
|
# @param [Version] version Version that contains the resource
|
16
16
|
# @param [String] account_sid A 34 character string that uniquely identifies this
|
17
17
|
# resource.
|
18
|
-
|
19
18
|
# @return [AvailablePhoneNumberCountryList] AvailablePhoneNumberCountryList
|
20
19
|
def initialize(version, account_sid: nil)
|
21
20
|
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(limit: nil, page_size: nil)
|
43
41
|
self.stream(
|
@@ -56,7 +54,6 @@ module Twilio
|
|
56
54
|
# the default value of 50 records. If no page_size is defined
|
57
55
|
# but a limit is defined, stream() will attempt to read the
|
58
56
|
# limit with the most efficient page size, i.e. min(limit, 1000)
|
59
|
-
|
60
57
|
# @return [Enumerable] Enumerable that will yield up to limit results
|
61
58
|
def stream(limit: nil, page_size: nil)
|
62
59
|
limits = @version.read_limits(limit, page_size)
|
@@ -96,7 +93,6 @@ module Twilio
|
|
96
93
|
# @param [String] page_token PageToken provided by the API
|
97
94
|
# @param [Integer] page_number Page Number, this value is simply for client state
|
98
95
|
# @param [Integer] page_size Number of records to return, defaults to 50
|
99
|
-
|
100
96
|
# @return [Page] Page of AvailablePhoneNumberCountryInstance
|
101
97
|
def page(page_token: nil, page_number: nil, page_size: nil)
|
102
98
|
params = {
|
@@ -127,7 +123,6 @@ module Twilio
|
|
127
123
|
# @param [Hash] solution Path solution for the resource
|
128
124
|
# @param [String] account_sid A 34 character string that uniquely identifies this
|
129
125
|
# resource.
|
130
|
-
|
131
126
|
# @return [AvailablePhoneNumberCountryPage] AvailablePhoneNumberCountryPage
|
132
127
|
def initialize(version, response, solution)
|
133
128
|
super(version, response)
|
@@ -139,13 +134,12 @@ module Twilio
|
|
139
134
|
##
|
140
135
|
# Build an instance of AvailablePhoneNumberCountryInstance
|
141
136
|
# @param [Hash] payload Payload response from the API
|
142
|
-
|
143
137
|
# @return [AvailablePhoneNumberCountryInstance] AvailablePhoneNumberCountryInstance
|
144
138
|
def get_instance(payload)
|
145
139
|
return AvailablePhoneNumberCountryInstance.new(
|
146
140
|
@version,
|
147
141
|
payload,
|
148
|
-
account_sid: @solution[
|
142
|
+
account_sid: @solution[:account_sid],
|
149
143
|
)
|
150
144
|
end
|
151
145
|
|
@@ -162,7 +156,6 @@ module Twilio
|
|
162
156
|
# @param [Version] version Version that contains the resource
|
163
157
|
# @param [String] account_sid The account_sid
|
164
158
|
# @param [String] country_code The country_code
|
165
|
-
|
166
159
|
# @return [AvailablePhoneNumberCountryContext] AvailablePhoneNumberCountryContext
|
167
160
|
def initialize(version, account_sid, country_code)
|
168
161
|
super(version)
|
@@ -195,8 +188,8 @@ module Twilio
|
|
195
188
|
return AvailablePhoneNumberCountryInstance.new(
|
196
189
|
@version,
|
197
190
|
payload,
|
198
|
-
account_sid: @solution[
|
199
|
-
country_code: @solution[
|
191
|
+
account_sid: @solution[:account_sid],
|
192
|
+
country_code: @solution[:country_code],
|
200
193
|
)
|
201
194
|
end
|
202
195
|
|
@@ -261,7 +254,6 @@ module Twilio
|
|
261
254
|
# @param [String] account_sid A 34 character string that uniquely identifies this
|
262
255
|
# resource.
|
263
256
|
# @param [String] country_code The country_code
|
264
|
-
|
265
257
|
# @return [AvailablePhoneNumberCountryInstance] AvailablePhoneNumberCountryInstance
|
266
258
|
def initialize(version, payload, account_sid: nil, country_code: nil)
|
267
259
|
super(version)
|
@@ -287,7 +279,6 @@ module Twilio
|
|
287
279
|
# Generate an instance context for the instance, the context is capable of
|
288
280
|
# performing various actions. All instance actions are proxied to the context
|
289
281
|
# @param [Version] version Version that contains the resource
|
290
|
-
|
291
282
|
# @return [AvailablePhoneNumberCountryContext] AvailablePhoneNumberCountryContext for this AvailablePhoneNumberCountryInstance
|
292
283
|
def context
|
293
284
|
unless @instance_context
|
@@ -324,35 +315,35 @@ module Twilio
|
|
324
315
|
# Fetch a AvailablePhoneNumberCountryInstance
|
325
316
|
# @return [AvailablePhoneNumberCountryInstance] Fetched AvailablePhoneNumberCountryInstance
|
326
317
|
def fetch
|
327
|
-
|
318
|
+
context.fetch
|
328
319
|
end
|
329
320
|
|
330
321
|
##
|
331
322
|
# Access the local
|
332
323
|
# @return [local] local
|
333
324
|
def local
|
334
|
-
|
325
|
+
context.local
|
335
326
|
end
|
336
327
|
|
337
328
|
##
|
338
329
|
# Access the toll_free
|
339
330
|
# @return [toll_free] toll_free
|
340
331
|
def toll_free
|
341
|
-
|
332
|
+
context.toll_free
|
342
333
|
end
|
343
334
|
|
344
335
|
##
|
345
336
|
# Access the mobile
|
346
337
|
# @return [mobile] mobile
|
347
338
|
def mobile
|
348
|
-
|
339
|
+
context.mobile
|
349
340
|
end
|
350
341
|
|
351
342
|
##
|
352
343
|
# Provide a user friendly representation
|
353
344
|
def to_s
|
354
|
-
|
355
|
-
"<Twilio.Api.V2010.AvailablePhoneNumberCountryInstance #{
|
345
|
+
values = @params.map{|k, v| "#{k}: #{v}"}.join(" ")
|
346
|
+
"<Twilio.Api.V2010.AvailablePhoneNumberCountryInstance #{values}>"
|
356
347
|
end
|
357
348
|
end
|
358
349
|
end
|
@@ -17,7 +17,6 @@ module Twilio
|
|
17
17
|
# @param [String] account_sid The account_sid
|
18
18
|
# @param [String] call_sid A 34 character string that uniquely identifies this
|
19
19
|
# resource.
|
20
|
-
|
21
20
|
# @return [FeedbackList] FeedbackList
|
22
21
|
def initialize(version, account_sid: nil, call_sid: nil)
|
23
22
|
super(version)
|
@@ -45,7 +44,6 @@ module Twilio
|
|
45
44
|
# @param [String] account_sid The account_sid
|
46
45
|
# @param [String] call_sid A 34 character string that uniquely identifies this
|
47
46
|
# resource.
|
48
|
-
|
49
47
|
# @return [FeedbackPage] FeedbackPage
|
50
48
|
def initialize(version, response, solution)
|
51
49
|
super(version, response)
|
@@ -57,14 +55,13 @@ module Twilio
|
|
57
55
|
##
|
58
56
|
# Build an instance of FeedbackInstance
|
59
57
|
# @param [Hash] payload Payload response from the API
|
60
|
-
|
61
58
|
# @return [FeedbackInstance] FeedbackInstance
|
62
59
|
def get_instance(payload)
|
63
60
|
return FeedbackInstance.new(
|
64
61
|
@version,
|
65
62
|
payload,
|
66
|
-
account_sid: @solution[
|
67
|
-
call_sid: @solution[
|
63
|
+
account_sid: @solution[:account_sid],
|
64
|
+
call_sid: @solution[:call_sid],
|
68
65
|
)
|
69
66
|
end
|
70
67
|
|
@@ -81,7 +78,6 @@ module Twilio
|
|
81
78
|
# @param [Version] version Version that contains the resource
|
82
79
|
# @param [String] account_sid The account_sid
|
83
80
|
# @param [String] call_sid The call sid that uniquely identifies the call
|
84
|
-
|
85
81
|
# @return [FeedbackContext] FeedbackContext
|
86
82
|
def initialize(version, account_sid, call_sid)
|
87
83
|
super(version)
|
@@ -99,7 +95,6 @@ module Twilio
|
|
99
95
|
# Request is executed immediately.
|
100
96
|
# @param [String] quality_score The quality_score
|
101
97
|
# @param [feedback.Issues] issue The issue
|
102
|
-
|
103
98
|
# @return [FeedbackInstance] Newly created FeedbackInstance
|
104
99
|
def create(quality_score: nil, issue: nil)
|
105
100
|
data = {
|
@@ -116,8 +111,8 @@ module Twilio
|
|
116
111
|
return FeedbackInstance.new(
|
117
112
|
@version,
|
118
113
|
payload,
|
119
|
-
account_sid: @solution[
|
120
|
-
call_sid: @solution[
|
114
|
+
account_sid: @solution[:account_sid],
|
115
|
+
call_sid: @solution[:call_sid],
|
121
116
|
)
|
122
117
|
end
|
123
118
|
|
@@ -136,8 +131,8 @@ module Twilio
|
|
136
131
|
return FeedbackInstance.new(
|
137
132
|
@version,
|
138
133
|
payload,
|
139
|
-
account_sid: @solution[
|
140
|
-
call_sid: @solution[
|
134
|
+
account_sid: @solution[:account_sid],
|
135
|
+
call_sid: @solution[:call_sid],
|
141
136
|
)
|
142
137
|
end
|
143
138
|
|
@@ -146,7 +141,6 @@ module Twilio
|
|
146
141
|
# @param [String] quality_score An integer from 1 to 5 quality score
|
147
142
|
# @param [feedback.Issues] issue One or more of the issues experienced during the
|
148
143
|
# call
|
149
|
-
|
150
144
|
# @return [FeedbackInstance] Updated FeedbackInstance
|
151
145
|
def update(quality_score: nil, issue: nil)
|
152
146
|
data = {
|
@@ -163,8 +157,8 @@ module Twilio
|
|
163
157
|
return FeedbackInstance.new(
|
164
158
|
@version,
|
165
159
|
payload,
|
166
|
-
account_sid: @solution[
|
167
|
-
call_sid: @solution[
|
160
|
+
account_sid: @solution[:account_sid],
|
161
|
+
call_sid: @solution[:call_sid],
|
168
162
|
)
|
169
163
|
end
|
170
164
|
|
@@ -184,7 +178,6 @@ module Twilio
|
|
184
178
|
# @param [String] account_sid The account_sid
|
185
179
|
# @param [String] call_sid A 34 character string that uniquely identifies this
|
186
180
|
# resource.
|
187
|
-
|
188
181
|
# @return [FeedbackInstance] FeedbackInstance
|
189
182
|
def initialize(version, payload, account_sid: nil, call_sid: nil)
|
190
183
|
super(version)
|
@@ -211,7 +204,6 @@ module Twilio
|
|
211
204
|
# Generate an instance context for the instance, the context is capable of
|
212
205
|
# performing various actions. All instance actions are proxied to the context
|
213
206
|
# @param [Version] version Version that contains the resource
|
214
|
-
|
215
207
|
# @return [FeedbackContext] FeedbackContext for this FeedbackInstance
|
216
208
|
def context
|
217
209
|
unless @instance_context
|
@@ -253,10 +245,10 @@ module Twilio
|
|
253
245
|
# Request is executed immediately.
|
254
246
|
# @param [String] quality_score The quality_score
|
255
247
|
# @param [feedback.Issues] issue The issue
|
256
|
-
|
257
248
|
# @return [FeedbackInstance] Newly created FeedbackInstance
|
258
249
|
def create(quality_score: nil, issue: nil)
|
259
|
-
|
250
|
+
context.create(
|
251
|
+
quality_score: quality_score,
|
260
252
|
issue: issue,
|
261
253
|
)
|
262
254
|
end
|
@@ -265,7 +257,7 @@ module Twilio
|
|
265
257
|
# Fetch a FeedbackInstance
|
266
258
|
# @return [FeedbackInstance] Fetched FeedbackInstance
|
267
259
|
def fetch
|
268
|
-
|
260
|
+
context.fetch
|
269
261
|
end
|
270
262
|
|
271
263
|
##
|
@@ -273,10 +265,10 @@ module Twilio
|
|
273
265
|
# @param [String] quality_score An integer from 1 to 5 quality score
|
274
266
|
# @param [feedback.Issues] issue One or more of the issues experienced during the
|
275
267
|
# call
|
276
|
-
|
277
268
|
# @return [FeedbackInstance] Updated FeedbackInstance
|
278
269
|
def update(quality_score: nil, issue: nil)
|
279
|
-
|
270
|
+
context.update(
|
271
|
+
quality_score: quality_score,
|
280
272
|
issue: issue,
|
281
273
|
)
|
282
274
|
end
|
@@ -284,8 +276,8 @@ module Twilio
|
|
284
276
|
##
|
285
277
|
# Provide a user friendly representation
|
286
278
|
def to_s
|
287
|
-
|
288
|
-
"<Twilio.Api.V2010.FeedbackInstance #{
|
279
|
+
values = @params.map{|k, v| "#{k}: #{v}"}.join(" ")
|
280
|
+
"<Twilio.Api.V2010.FeedbackInstance #{values}>"
|
289
281
|
end
|
290
282
|
end
|
291
283
|
end
|