twilio-ruby 5.0.0.rc21 → 5.0.0.rc22
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/Makefile +3 -0
- data/lib/twilio-ruby.rb +7 -3
- data/lib/twilio-ruby/framework/domain.rb +5 -1
- data/lib/twilio-ruby/framework/page.rb +4 -4
- data/lib/twilio-ruby/framework/serialize.rb +3 -2
- data/lib/twilio-ruby/framework/values.rb +7 -0
- data/lib/twilio-ruby/framework/version.rb +4 -6
- data/lib/twilio-ruby/jwt/access_token.rb +160 -134
- data/lib/twilio-ruby/jwt/client_capability.rb +98 -0
- data/lib/twilio-ruby/jwt/jwt.rb +56 -0
- data/lib/twilio-ruby/jwt/task_router.rb +108 -139
- data/lib/twilio-ruby/rest/accounts.rb +1 -1
- data/lib/twilio-ruby/rest/accounts/v1/credential.rb +1 -1
- data/lib/twilio-ruby/rest/accounts/v1/credential/public_key.rb +30 -17
- data/lib/twilio-ruby/rest/api.rb +2 -2
- data/lib/twilio-ruby/rest/api/v2010/account.rb +31 -18
- data/lib/twilio-ruby/rest/api/v2010/account/address.rb +32 -19
- data/lib/twilio-ruby/rest/api/v2010/account/address/dependent_phone_number.rb +18 -5
- data/lib/twilio-ruby/rest/api/v2010/account/application.rb +32 -19
- data/lib/twilio-ruby/rest/api/v2010/account/authorized_connect_app.rb +20 -7
- data/lib/twilio-ruby/rest/api/v2010/account/available_phone_number.rb +20 -7
- data/lib/twilio-ruby/rest/api/v2010/account/available_phone_number/local.rb +20 -7
- data/lib/twilio-ruby/rest/api/v2010/account/available_phone_number/mobile.rb +20 -7
- data/lib/twilio-ruby/rest/api/v2010/account/available_phone_number/toll_free.rb +20 -7
- data/lib/twilio-ruby/rest/api/v2010/account/call.rb +33 -20
- data/lib/twilio-ruby/rest/api/v2010/account/call/feedback.rb +13 -13
- data/lib/twilio-ruby/rest/api/v2010/account/call/feedback_summary.rb +8 -8
- data/lib/twilio-ruby/rest/api/v2010/account/call/notification.rb +23 -10
- data/lib/twilio-ruby/rest/api/v2010/account/call/recording.rb +23 -10
- data/lib/twilio-ruby/rest/api/v2010/account/conference.rb +27 -14
- data/lib/twilio-ruby/rest/api/v2010/account/conference/participant.rb +32 -19
- data/lib/twilio-ruby/rest/api/v2010/account/connect_app.rb +25 -12
- data/lib/twilio-ruby/rest/api/v2010/account/incoming_phone_number.rb +32 -19
- data/lib/twilio-ruby/rest/api/v2010/account/incoming_phone_number/assigned_add_on.rb +24 -11
- data/lib/twilio-ruby/rest/api/v2010/account/incoming_phone_number/assigned_add_on/assigned_add_on_extension.rb +20 -7
- data/lib/twilio-ruby/rest/api/v2010/account/incoming_phone_number/local.rb +24 -11
- data/lib/twilio-ruby/rest/api/v2010/account/incoming_phone_number/mobile.rb +24 -11
- data/lib/twilio-ruby/rest/api/v2010/account/incoming_phone_number/toll_free.rb +24 -11
- data/lib/twilio-ruby/rest/api/v2010/account/key.rb +26 -13
- data/lib/twilio-ruby/rest/api/v2010/account/message.rb +30 -17
- data/lib/twilio-ruby/rest/api/v2010/account/message/feedback.rb +5 -5
- data/lib/twilio-ruby/rest/api/v2010/account/message/media.rb +23 -10
- data/lib/twilio-ruby/rest/api/v2010/account/new_key.rb +5 -5
- data/lib/twilio-ruby/rest/api/v2010/account/new_signing_key.rb +5 -5
- data/lib/twilio-ruby/rest/api/v2010/account/notification.rb +23 -10
- data/lib/twilio-ruby/rest/api/v2010/account/outgoing_caller_id.rb +28 -15
- data/lib/twilio-ruby/rest/api/v2010/account/queue.rb +30 -17
- data/lib/twilio-ruby/rest/api/v2010/account/queue/member.rb +23 -10
- data/lib/twilio-ruby/rest/api/v2010/account/recording.rb +23 -10
- data/lib/twilio-ruby/rest/api/v2010/account/recording/add_on_result.rb +21 -8
- data/lib/twilio-ruby/rest/api/v2010/account/recording/add_on_result/payload.rb +21 -8
- data/lib/twilio-ruby/rest/api/v2010/account/recording/transcription.rb +21 -8
- data/lib/twilio-ruby/rest/api/v2010/account/short_code.rb +27 -14
- data/lib/twilio-ruby/rest/api/v2010/account/signing_key.rb +26 -13
- data/lib/twilio-ruby/rest/api/v2010/account/sip.rb +1 -1
- data/lib/twilio-ruby/rest/api/v2010/account/sip/credential_list.rb +27 -14
- data/lib/twilio-ruby/rest/api/v2010/account/sip/credential_list/credential.rb +29 -16
- data/lib/twilio-ruby/rest/api/v2010/account/sip/domain.rb +30 -17
- data/lib/twilio-ruby/rest/api/v2010/account/sip/domain/credential_list_mapping.rb +24 -11
- data/lib/twilio-ruby/rest/api/v2010/account/sip/domain/ip_access_control_list_mapping.rb +24 -11
- data/lib/twilio-ruby/rest/api/v2010/account/sip/ip_access_control_list.rb +27 -14
- data/lib/twilio-ruby/rest/api/v2010/account/sip/ip_access_control_list/ip_address.rb +29 -16
- data/lib/twilio-ruby/rest/api/v2010/account/token.rb +5 -5
- data/lib/twilio-ruby/rest/api/v2010/account/transcription.rb +21 -8
- data/lib/twilio-ruby/rest/api/v2010/account/usage.rb +1 -1
- data/lib/twilio-ruby/rest/api/v2010/account/usage/record.rb +20 -7
- data/lib/twilio-ruby/rest/api/v2010/account/usage/record/all_time.rb +20 -7
- data/lib/twilio-ruby/rest/api/v2010/account/usage/record/daily.rb +20 -7
- data/lib/twilio-ruby/rest/api/v2010/account/usage/record/last_month.rb +20 -7
- data/lib/twilio-ruby/rest/api/v2010/account/usage/record/monthly.rb +20 -7
- data/lib/twilio-ruby/rest/api/v2010/account/usage/record/this_month.rb +20 -7
- data/lib/twilio-ruby/rest/api/v2010/account/usage/record/today.rb +20 -7
- data/lib/twilio-ruby/rest/api/v2010/account/usage/record/yearly.rb +20 -7
- data/lib/twilio-ruby/rest/api/v2010/account/usage/record/yesterday.rb +20 -7
- data/lib/twilio-ruby/rest/api/v2010/account/usage/trigger.rb +32 -19
- data/lib/twilio-ruby/rest/api/v2010/account/validation_request.rb +5 -5
- data/lib/twilio-ruby/rest/chat.rb +4 -4
- data/lib/twilio-ruby/rest/chat/v1/credential.rb +30 -17
- data/lib/twilio-ruby/rest/chat/v1/service.rb +29 -16
- data/lib/twilio-ruby/rest/chat/v1/service/channel.rb +32 -19
- data/lib/twilio-ruby/rest/chat/v1/service/channel/invite.rb +27 -14
- data/lib/twilio-ruby/rest/chat/v1/service/channel/member.rb +32 -19
- data/lib/twilio-ruby/rest/chat/v1/service/channel/message.rb +32 -19
- data/lib/twilio-ruby/rest/chat/v1/service/role.rb +27 -14
- data/lib/twilio-ruby/rest/chat/v1/service/user.rb +30 -17
- data/lib/twilio-ruby/rest/chat/v1/service/user/user_channel.rb +18 -5
- data/lib/twilio-ruby/rest/chat/v2/credential.rb +30 -17
- data/lib/twilio-ruby/rest/chat/v2/service.rb +29 -16
- data/lib/twilio-ruby/rest/chat/v2/service/channel.rb +32 -19
- data/lib/twilio-ruby/rest/chat/v2/service/channel/invite.rb +27 -14
- data/lib/twilio-ruby/rest/chat/v2/service/channel/member.rb +32 -19
- data/lib/twilio-ruby/rest/chat/v2/service/channel/message.rb +32 -19
- data/lib/twilio-ruby/rest/chat/v2/service/role.rb +27 -14
- data/lib/twilio-ruby/rest/chat/v2/service/user.rb +30 -17
- data/lib/twilio-ruby/rest/chat/v2/service/user/user_channel.rb +18 -5
- data/lib/twilio-ruby/rest/fax.rb +2 -2
- data/lib/twilio-ruby/rest/fax/v1/fax.rb +32 -19
- data/lib/twilio-ruby/rest/fax/v1/fax/fax_media.rb +21 -8
- data/lib/twilio-ruby/rest/ip_messaging.rb +4 -4
- data/lib/twilio-ruby/rest/ip_messaging/v1/credential.rb +30 -17
- data/lib/twilio-ruby/rest/ip_messaging/v1/service.rb +29 -16
- data/lib/twilio-ruby/rest/ip_messaging/v1/service/channel.rb +32 -19
- data/lib/twilio-ruby/rest/ip_messaging/v1/service/channel/invite.rb +27 -14
- data/lib/twilio-ruby/rest/ip_messaging/v1/service/channel/member.rb +32 -19
- data/lib/twilio-ruby/rest/ip_messaging/v1/service/channel/message.rb +32 -19
- data/lib/twilio-ruby/rest/ip_messaging/v1/service/role.rb +27 -14
- data/lib/twilio-ruby/rest/ip_messaging/v1/service/user.rb +30 -17
- data/lib/twilio-ruby/rest/ip_messaging/v1/service/user/user_channel.rb +18 -5
- data/lib/twilio-ruby/rest/ip_messaging/v2/credential.rb +30 -17
- data/lib/twilio-ruby/rest/ip_messaging/v2/service.rb +29 -16
- data/lib/twilio-ruby/rest/ip_messaging/v2/service/channel.rb +32 -19
- data/lib/twilio-ruby/rest/ip_messaging/v2/service/channel/invite.rb +27 -14
- data/lib/twilio-ruby/rest/ip_messaging/v2/service/channel/member.rb +32 -19
- data/lib/twilio-ruby/rest/ip_messaging/v2/service/channel/message.rb +32 -19
- data/lib/twilio-ruby/rest/ip_messaging/v2/service/role.rb +27 -14
- data/lib/twilio-ruby/rest/ip_messaging/v2/service/user.rb +30 -17
- data/lib/twilio-ruby/rest/ip_messaging/v2/service/user/user_channel.rb +18 -5
- data/lib/twilio-ruby/rest/lookups.rb +2 -2
- data/lib/twilio-ruby/rest/lookups/v1/phone_number.rb +6 -6
- data/lib/twilio-ruby/rest/messaging.rb +2 -2
- data/lib/twilio-ruby/rest/messaging/v1/service.rb +30 -17
- data/lib/twilio-ruby/rest/messaging/v1/service/alpha_sender.rb +24 -11
- data/lib/twilio-ruby/rest/messaging/v1/service/phone_number.rb +24 -11
- data/lib/twilio-ruby/rest/messaging/v1/service/short_code.rb +24 -11
- data/lib/twilio-ruby/rest/monitor.rb +4 -4
- data/lib/twilio-ruby/rest/monitor/v1/alert.rb +23 -10
- data/lib/twilio-ruby/rest/monitor/v1/event.rb +22 -9
- data/lib/twilio-ruby/rest/notify.rb +4 -4
- data/lib/twilio-ruby/rest/notify/v1/credential.rb +30 -17
- data/lib/twilio-ruby/rest/notify/v1/service.rb +32 -19
- data/lib/twilio-ruby/rest/notify/v1/service/binding.rb +27 -14
- data/lib/twilio-ruby/rest/notify/v1/service/notification.rb +5 -5
- data/lib/twilio-ruby/rest/notify/v1/service/segment.rb +18 -5
- data/lib/twilio-ruby/rest/notify/v1/service/user.rb +27 -14
- data/lib/twilio-ruby/rest/notify/v1/service/user/segment_memberships.rb +7 -7
- data/lib/twilio-ruby/rest/notify/v1/service/user/user_binding.rb +27 -14
- data/lib/twilio-ruby/rest/preview.rb +18 -18
- data/lib/twilio-ruby/rest/preview/bulk_exports/export.rb +3 -3
- data/lib/twilio-ruby/rest/preview/bulk_exports/export/day.rb +18 -5
- data/lib/twilio-ruby/rest/preview/bulk_exports/export_configuration.rb +8 -8
- data/lib/twilio-ruby/rest/preview/hosted_numbers/hosted_number_order.rb +32 -19
- data/lib/twilio-ruby/rest/preview/marketplace/available_add_on.rb +20 -7
- data/lib/twilio-ruby/rest/preview/marketplace/available_add_on/available_add_on_extension.rb +20 -7
- data/lib/twilio-ruby/rest/preview/marketplace/installed_add_on.rb +30 -17
- data/lib/twilio-ruby/rest/preview/marketplace/installed_add_on/installed_add_on_extension.rb +23 -10
- data/lib/twilio-ruby/rest/preview/proxy/service.rb +30 -17
- data/lib/twilio-ruby/rest/preview/proxy/service/phone_number.rb +24 -11
- data/lib/twilio-ruby/rest/preview/proxy/service/session.rb +32 -19
- data/lib/twilio-ruby/rest/preview/proxy/service/session/interaction.rb +22 -9
- data/lib/twilio-ruby/rest/preview/proxy/service/session/participant.rb +32 -19
- data/lib/twilio-ruby/rest/preview/proxy/service/session/participant/message_interaction.rb +24 -11
- data/lib/twilio-ruby/rest/preview/proxy/service/short_code.rb +24 -11
- data/lib/twilio-ruby/rest/preview/sync/service.rb +30 -17
- data/lib/twilio-ruby/rest/preview/sync/service/document.rb +28 -15
- data/lib/twilio-ruby/rest/preview/sync/service/document/document_permission.rb +24 -11
- data/lib/twilio-ruby/rest/preview/sync/service/sync_list.rb +25 -12
- data/lib/twilio-ruby/rest/preview/sync/service/sync_list/sync_list_item.rb +29 -16
- data/lib/twilio-ruby/rest/preview/sync/service/sync_list/sync_list_permission.rb +24 -11
- data/lib/twilio-ruby/rest/preview/sync/service/sync_map.rb +25 -12
- data/lib/twilio-ruby/rest/preview/sync/service/sync_map/sync_map_item.rb +29 -16
- data/lib/twilio-ruby/rest/preview/sync/service/sync_map/sync_map_permission.rb +24 -11
- data/lib/twilio-ruby/rest/preview/wireless/command.rb +26 -13
- data/lib/twilio-ruby/rest/preview/wireless/rate_plan.rb +30 -17
- data/lib/twilio-ruby/rest/preview/wireless/sim.rb +28 -15
- data/lib/twilio-ruby/rest/preview/wireless/sim/usage.rb +6 -6
- data/lib/twilio-ruby/rest/pricing.rb +3 -3
- data/lib/twilio-ruby/rest/pricing/v1/messaging.rb +1 -1
- data/lib/twilio-ruby/rest/pricing/v1/messaging/country.rb +20 -7
- data/lib/twilio-ruby/rest/pricing/v1/phone_number.rb +1 -1
- data/lib/twilio-ruby/rest/pricing/v1/phone_number/country.rb +20 -7
- data/lib/twilio-ruby/rest/pricing/v1/voice.rb +1 -1
- data/lib/twilio-ruby/rest/pricing/v1/voice/country.rb +20 -7
- data/lib/twilio-ruby/rest/pricing/v1/voice/number.rb +3 -3
- data/lib/twilio-ruby/rest/sync.rb +2 -2
- data/lib/twilio-ruby/rest/sync/v1/service.rb +30 -17
- data/lib/twilio-ruby/rest/sync/v1/service/document.rb +28 -15
- data/lib/twilio-ruby/rest/sync/v1/service/document/document_permission.rb +24 -11
- data/lib/twilio-ruby/rest/sync/v1/service/sync_list.rb +25 -12
- data/lib/twilio-ruby/rest/sync/v1/service/sync_list/sync_list_item.rb +29 -16
- data/lib/twilio-ruby/rest/sync/v1/service/sync_list/sync_list_permission.rb +24 -11
- data/lib/twilio-ruby/rest/sync/v1/service/sync_map.rb +25 -12
- data/lib/twilio-ruby/rest/sync/v1/service/sync_map/sync_map_item.rb +29 -16
- data/lib/twilio-ruby/rest/sync/v1/service/sync_map/sync_map_permission.rb +24 -11
- data/lib/twilio-ruby/rest/taskrouter.rb +2 -2
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace.rb +33 -20
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/activity.rb +32 -19
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/event.rb +22 -9
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/task.rb +32 -19
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/task/reservation.rb +27 -14
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/task_channel.rb +20 -7
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/task_queue.rb +33 -20
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/task_queue/task_queue_statistics.rb +6 -6
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/task_queue/task_queues_statistics.rb +20 -7
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/worker.rb +33 -20
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/worker/reservation.rb +27 -14
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/worker/worker_channel.rb +25 -12
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/worker/worker_statistics.rb +6 -6
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/worker/workers_statistics.rb +6 -6
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/workflow.rb +33 -20
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/workflow/workflow_statistics.rb +6 -6
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/workspace_statistics.rb +6 -6
- data/lib/twilio-ruby/rest/trunking.rb +2 -2
- data/lib/twilio-ruby/rest/trunking/v1/trunk.rb +30 -17
- data/lib/twilio-ruby/rest/trunking/v1/trunk/credential_list.rb +24 -11
- data/lib/twilio-ruby/rest/trunking/v1/trunk/ip_access_control_list.rb +24 -11
- data/lib/twilio-ruby/rest/trunking/v1/trunk/origination_url.rb +29 -16
- data/lib/twilio-ruby/rest/trunking/v1/trunk/phone_number.rb +24 -11
- data/lib/twilio-ruby/rest/video.rb +4 -4
- data/lib/twilio-ruby/rest/video/v1/recording.rb +23 -10
- data/lib/twilio-ruby/rest/video/v1/room.rb +29 -16
- data/lib/twilio-ruby/rest/video/v1/room/recording.rb +20 -7
- data/lib/twilio-ruby/rest/wireless.rb +6 -6
- data/lib/twilio-ruby/rest/wireless/v1/command.rb +26 -13
- data/lib/twilio-ruby/rest/wireless/v1/rate_plan.rb +30 -17
- data/lib/twilio-ruby/rest/wireless/v1/sim.rb +27 -14
- data/lib/twilio-ruby/rest/wireless/v1/sim/usage_record.rb +20 -7
- data/lib/twilio-ruby/twiml/messaging_response.rb +147 -0
- data/lib/twilio-ruby/twiml/twiml.rb +77 -0
- data/lib/twilio-ruby/twiml/voice_response.rb +925 -0
- data/lib/twilio-ruby/version.rb +1 -1
- data/spec/holodeck/hologram.rb +0 -1
- data/spec/jwt/access_token_spec.rb +126 -182
- data/spec/jwt/client_capability_spec.rb +104 -0
- data/spec/jwt/task_router_spec.rb +164 -97
- data/spec/twiml/messaging_response_spec.rb +62 -0
- data/spec/twiml/voice_response_spec.rb +452 -0
- data/twilio-ruby.gemspec +4 -2
- metadata +36 -23
- data/lib/twilio-ruby/compatibility/v2010/account/call/feedback.rb +0 -15
- data/lib/twilio-ruby/compatibility/v2010/account/queue/member.rb +0 -23
- data/lib/twilio-ruby/jwt/capability.rb +0 -64
- data/lib/twilio-ruby/twiml/response.rb +0 -16
- data/spec/jwt/capability_spec.rb +0 -186
- data/spec/jwt/task_router_taskqueue_spec.rb +0 -111
- data/spec/jwt/task_router_worker_spec.rb +0 -146
- data/spec/jwt/task_router_workspace_spec.rb +0 -110
- data/spec/twiml/twiml_response_spec.rb +0 -47
@@ -98,18 +98,31 @@ module Twilio
|
|
98
98
|
# @param [Integer] page_number Page Number, this value is simply for client state
|
99
99
|
# @param [Integer] page_size Number of records to return, defaults to 50
|
100
100
|
# @return [Page] Page of SyncMapPermissionInstance
|
101
|
-
def page(page_token:
|
102
|
-
params = {
|
101
|
+
def page(page_token: :unset, page_number: :unset, page_size: :unset)
|
102
|
+
params = Twilio::Values.of({
|
103
103
|
'PageToken' => page_token,
|
104
104
|
'Page' => page_number,
|
105
105
|
'PageSize' => page_size,
|
106
|
-
}
|
106
|
+
})
|
107
107
|
response = @version.page(
|
108
108
|
'GET',
|
109
109
|
@uri,
|
110
110
|
params
|
111
111
|
)
|
112
|
-
|
112
|
+
SyncMapPermissionPage.new(@version, response, @solution)
|
113
|
+
end
|
114
|
+
|
115
|
+
##
|
116
|
+
# Retrieve a single page of SyncMapPermissionInstance records from the API.
|
117
|
+
# Request is executed immediately.
|
118
|
+
# @param [String] target_url API-generated URL for the requested results page
|
119
|
+
# @return [Page] Page of SyncMapPermissionInstance
|
120
|
+
def get_page(target_url)
|
121
|
+
response = @version.domain.request(
|
122
|
+
'GET',
|
123
|
+
target_url
|
124
|
+
)
|
125
|
+
SyncMapPermissionPage.new(@version, response, @solution)
|
113
126
|
end
|
114
127
|
|
115
128
|
##
|
@@ -142,7 +155,7 @@ module Twilio
|
|
142
155
|
# @param [Hash] payload Payload response from the API
|
143
156
|
# @return [SyncMapPermissionInstance] SyncMapPermissionInstance
|
144
157
|
def get_instance(payload)
|
145
|
-
|
158
|
+
SyncMapPermissionInstance.new(
|
146
159
|
@version,
|
147
160
|
payload,
|
148
161
|
service_sid: @solution[:service_sid],
|
@@ -183,7 +196,7 @@ module Twilio
|
|
183
196
|
# Fetch a SyncMapPermissionInstance
|
184
197
|
# @return [SyncMapPermissionInstance] Fetched SyncMapPermissionInstance
|
185
198
|
def fetch
|
186
|
-
params = {}
|
199
|
+
params = Twilio::Values.of({})
|
187
200
|
|
188
201
|
payload = @version.fetch(
|
189
202
|
'GET',
|
@@ -191,7 +204,7 @@ module Twilio
|
|
191
204
|
params,
|
192
205
|
)
|
193
206
|
|
194
|
-
|
207
|
+
SyncMapPermissionInstance.new(
|
195
208
|
@version,
|
196
209
|
payload,
|
197
210
|
service_sid: @solution[:service_sid],
|
@@ -204,7 +217,7 @@ module Twilio
|
|
204
217
|
# Deletes the SyncMapPermissionInstance
|
205
218
|
# @return [Boolean] true if delete succeeds, true otherwise
|
206
219
|
def delete
|
207
|
-
|
220
|
+
@version.delete('delete', @uri)
|
208
221
|
end
|
209
222
|
|
210
223
|
##
|
@@ -217,11 +230,11 @@ module Twilio
|
|
217
230
|
# the Sync Map.
|
218
231
|
# @return [SyncMapPermissionInstance] Updated SyncMapPermissionInstance
|
219
232
|
def update(read: nil, write: nil, manage: nil)
|
220
|
-
data = {
|
233
|
+
data = Twilio::Values.of({
|
221
234
|
'Read' => read,
|
222
235
|
'Write' => write,
|
223
236
|
'Manage' => manage,
|
224
|
-
}
|
237
|
+
})
|
225
238
|
|
226
239
|
payload = @version.update(
|
227
240
|
'POST',
|
@@ -229,7 +242,7 @@ module Twilio
|
|
229
242
|
data: data,
|
230
243
|
)
|
231
244
|
|
232
|
-
|
245
|
+
SyncMapPermissionInstance.new(
|
233
246
|
@version,
|
234
247
|
payload,
|
235
248
|
service_sid: @solution[:service_sid],
|
@@ -36,7 +36,7 @@ module Twilio
|
|
36
36
|
# but a limit is defined, stream() will attempt to read the
|
37
37
|
# limit with the most efficient page size, i.e. min(limit, 1000)
|
38
38
|
# @return [Array] Array of up to limit results
|
39
|
-
def list(device:
|
39
|
+
def list(device: :unset, sim: :unset, status: :unset, direction: :unset, limit: nil, page_size: nil)
|
40
40
|
self.stream(
|
41
41
|
device: device,
|
42
42
|
sim: sim,
|
@@ -62,7 +62,7 @@ module Twilio
|
|
62
62
|
# but a limit is defined, stream() will attempt to read the
|
63
63
|
# limit with the most efficient page size, i.e. min(limit, 1000)
|
64
64
|
# @return [Enumerable] Enumerable that will yield up to limit results
|
65
|
-
def stream(device:
|
65
|
+
def stream(device: :unset, sim: :unset, status: :unset, direction: :unset, limit: nil, page_size: nil)
|
66
66
|
limits = @version.read_limits(limit, page_size)
|
67
67
|
|
68
68
|
page = self.page(
|
@@ -113,8 +113,8 @@ module Twilio
|
|
113
113
|
# @param [Integer] page_number Page Number, this value is simply for client state
|
114
114
|
# @param [Integer] page_size Number of records to return, defaults to 50
|
115
115
|
# @return [Page] Page of CommandInstance
|
116
|
-
def page(device:
|
117
|
-
params = {
|
116
|
+
def page(device: :unset, sim: :unset, status: :unset, direction: :unset, page_token: :unset, page_number: :unset, page_size: :unset)
|
117
|
+
params = Twilio::Values.of({
|
118
118
|
'Device' => device,
|
119
119
|
'Sim' => sim,
|
120
120
|
'Status' => status,
|
@@ -122,13 +122,26 @@ module Twilio
|
|
122
122
|
'PageToken' => page_token,
|
123
123
|
'Page' => page_number,
|
124
124
|
'PageSize' => page_size,
|
125
|
-
}
|
125
|
+
})
|
126
126
|
response = @version.page(
|
127
127
|
'GET',
|
128
128
|
@uri,
|
129
129
|
params
|
130
130
|
)
|
131
|
-
|
131
|
+
CommandPage.new(@version, response, @solution)
|
132
|
+
end
|
133
|
+
|
134
|
+
##
|
135
|
+
# Retrieve a single page of CommandInstance records from the API.
|
136
|
+
# Request is executed immediately.
|
137
|
+
# @param [String] target_url API-generated URL for the requested results page
|
138
|
+
# @return [Page] Page of CommandInstance
|
139
|
+
def get_page(target_url)
|
140
|
+
response = @version.domain.request(
|
141
|
+
'GET',
|
142
|
+
target_url
|
143
|
+
)
|
144
|
+
CommandPage.new(@version, response, @solution)
|
132
145
|
end
|
133
146
|
|
134
147
|
##
|
@@ -142,8 +155,8 @@ module Twilio
|
|
142
155
|
# @param [String] command_mode The command_mode
|
143
156
|
# @param [String] include_sid The include_sid
|
144
157
|
# @return [CommandInstance] Newly created CommandInstance
|
145
|
-
def create(command: nil, device:
|
146
|
-
data = {
|
158
|
+
def create(command: nil, device: :unset, sim: :unset, callback_method: :unset, callback_url: :unset, command_mode: :unset, include_sid: :unset)
|
159
|
+
data = Twilio::Values.of({
|
147
160
|
'Command' => command,
|
148
161
|
'Device' => device,
|
149
162
|
'Sim' => sim,
|
@@ -151,7 +164,7 @@ module Twilio
|
|
151
164
|
'CallbackUrl' => callback_url,
|
152
165
|
'CommandMode' => command_mode,
|
153
166
|
'IncludeSid' => include_sid,
|
154
|
-
}
|
167
|
+
})
|
155
168
|
|
156
169
|
payload = @version.create(
|
157
170
|
'POST',
|
@@ -159,7 +172,7 @@ module Twilio
|
|
159
172
|
data: data
|
160
173
|
)
|
161
174
|
|
162
|
-
|
175
|
+
CommandInstance.new(
|
163
176
|
@version,
|
164
177
|
payload,
|
165
178
|
)
|
@@ -191,7 +204,7 @@ module Twilio
|
|
191
204
|
# @param [Hash] payload Payload response from the API
|
192
205
|
# @return [CommandInstance] CommandInstance
|
193
206
|
def get_instance(payload)
|
194
|
-
|
207
|
+
CommandInstance.new(
|
195
208
|
@version,
|
196
209
|
payload,
|
197
210
|
)
|
@@ -224,7 +237,7 @@ module Twilio
|
|
224
237
|
# Fetch a CommandInstance
|
225
238
|
# @return [CommandInstance] Fetched CommandInstance
|
226
239
|
def fetch
|
227
|
-
params = {}
|
240
|
+
params = Twilio::Values.of({})
|
228
241
|
|
229
242
|
payload = @version.fetch(
|
230
243
|
'GET',
|
@@ -232,7 +245,7 @@ module Twilio
|
|
232
245
|
params,
|
233
246
|
)
|
234
247
|
|
235
|
-
|
248
|
+
CommandInstance.new(
|
236
249
|
@version,
|
237
250
|
payload,
|
238
251
|
sid: @solution[:sid],
|
@@ -89,18 +89,31 @@ module Twilio
|
|
89
89
|
# @param [Integer] page_number Page Number, this value is simply for client state
|
90
90
|
# @param [Integer] page_size Number of records to return, defaults to 50
|
91
91
|
# @return [Page] Page of RatePlanInstance
|
92
|
-
def page(page_token:
|
93
|
-
params = {
|
92
|
+
def page(page_token: :unset, page_number: :unset, page_size: :unset)
|
93
|
+
params = Twilio::Values.of({
|
94
94
|
'PageToken' => page_token,
|
95
95
|
'Page' => page_number,
|
96
96
|
'PageSize' => page_size,
|
97
|
-
}
|
97
|
+
})
|
98
98
|
response = @version.page(
|
99
99
|
'GET',
|
100
100
|
@uri,
|
101
101
|
params
|
102
102
|
)
|
103
|
-
|
103
|
+
RatePlanPage.new(@version, response, @solution)
|
104
|
+
end
|
105
|
+
|
106
|
+
##
|
107
|
+
# Retrieve a single page of RatePlanInstance records from the API.
|
108
|
+
# Request is executed immediately.
|
109
|
+
# @param [String] target_url API-generated URL for the requested results page
|
110
|
+
# @return [Page] Page of RatePlanInstance
|
111
|
+
def get_page(target_url)
|
112
|
+
response = @version.domain.request(
|
113
|
+
'GET',
|
114
|
+
target_url
|
115
|
+
)
|
116
|
+
RatePlanPage.new(@version, response, @solution)
|
104
117
|
end
|
105
118
|
|
106
119
|
##
|
@@ -117,8 +130,8 @@ module Twilio
|
|
117
130
|
# @param [Boolean] national_roaming_enabled The national_roaming_enabled
|
118
131
|
# @param [String] international_roaming The international_roaming
|
119
132
|
# @return [RatePlanInstance] Newly created RatePlanInstance
|
120
|
-
def create(unique_name:
|
121
|
-
data = {
|
133
|
+
def create(unique_name: :unset, friendly_name: :unset, data_enabled: :unset, data_limit: :unset, data_metering: :unset, messaging_enabled: :unset, voice_enabled: :unset, commands_enabled: :unset, national_roaming_enabled: :unset, international_roaming: :unset)
|
134
|
+
data = Twilio::Values.of({
|
122
135
|
'UniqueName' => unique_name,
|
123
136
|
'FriendlyName' => friendly_name,
|
124
137
|
'DataEnabled' => data_enabled,
|
@@ -129,7 +142,7 @@ module Twilio
|
|
129
142
|
'CommandsEnabled' => commands_enabled,
|
130
143
|
'NationalRoamingEnabled' => national_roaming_enabled,
|
131
144
|
'InternationalRoaming' => international_roaming,
|
132
|
-
}
|
145
|
+
})
|
133
146
|
|
134
147
|
payload = @version.create(
|
135
148
|
'POST',
|
@@ -137,7 +150,7 @@ module Twilio
|
|
137
150
|
data: data
|
138
151
|
)
|
139
152
|
|
140
|
-
|
153
|
+
RatePlanInstance.new(
|
141
154
|
@version,
|
142
155
|
payload,
|
143
156
|
)
|
@@ -169,7 +182,7 @@ module Twilio
|
|
169
182
|
# @param [Hash] payload Payload response from the API
|
170
183
|
# @return [RatePlanInstance] RatePlanInstance
|
171
184
|
def get_instance(payload)
|
172
|
-
|
185
|
+
RatePlanInstance.new(
|
173
186
|
@version,
|
174
187
|
payload,
|
175
188
|
)
|
@@ -202,7 +215,7 @@ module Twilio
|
|
202
215
|
# Fetch a RatePlanInstance
|
203
216
|
# @return [RatePlanInstance] Fetched RatePlanInstance
|
204
217
|
def fetch
|
205
|
-
params = {}
|
218
|
+
params = Twilio::Values.of({})
|
206
219
|
|
207
220
|
payload = @version.fetch(
|
208
221
|
'GET',
|
@@ -210,7 +223,7 @@ module Twilio
|
|
210
223
|
params,
|
211
224
|
)
|
212
225
|
|
213
|
-
|
226
|
+
RatePlanInstance.new(
|
214
227
|
@version,
|
215
228
|
payload,
|
216
229
|
sid: @solution[:sid],
|
@@ -222,11 +235,11 @@ module Twilio
|
|
222
235
|
# @param [String] unique_name The unique_name
|
223
236
|
# @param [String] friendly_name The friendly_name
|
224
237
|
# @return [RatePlanInstance] Updated RatePlanInstance
|
225
|
-
def update(unique_name:
|
226
|
-
data = {
|
238
|
+
def update(unique_name: :unset, friendly_name: :unset)
|
239
|
+
data = Twilio::Values.of({
|
227
240
|
'UniqueName' => unique_name,
|
228
241
|
'FriendlyName' => friendly_name,
|
229
|
-
}
|
242
|
+
})
|
230
243
|
|
231
244
|
payload = @version.update(
|
232
245
|
'POST',
|
@@ -234,7 +247,7 @@ module Twilio
|
|
234
247
|
data: data,
|
235
248
|
)
|
236
249
|
|
237
|
-
|
250
|
+
RatePlanInstance.new(
|
238
251
|
@version,
|
239
252
|
payload,
|
240
253
|
sid: @solution[:sid],
|
@@ -245,7 +258,7 @@ module Twilio
|
|
245
258
|
# Deletes the RatePlanInstance
|
246
259
|
# @return [Boolean] true if delete succeeds, true otherwise
|
247
260
|
def delete
|
248
|
-
|
261
|
+
@version.delete('delete', @uri)
|
249
262
|
end
|
250
263
|
|
251
264
|
##
|
@@ -374,7 +387,7 @@ module Twilio
|
|
374
387
|
# @param [String] unique_name The unique_name
|
375
388
|
# @param [String] friendly_name The friendly_name
|
376
389
|
# @return [RatePlanInstance] Updated RatePlanInstance
|
377
|
-
def update(unique_name:
|
390
|
+
def update(unique_name: :unset, friendly_name: :unset)
|
378
391
|
context.update(
|
379
392
|
unique_name: unique_name,
|
380
393
|
friendly_name: friendly_name,
|
@@ -37,7 +37,7 @@ module Twilio
|
|
37
37
|
# but a limit is defined, stream() will attempt to read the
|
38
38
|
# limit with the most efficient page size, i.e. min(limit, 1000)
|
39
39
|
# @return [Array] Array of up to limit results
|
40
|
-
def list(status:
|
40
|
+
def list(status: :unset, iccid: :unset, rate_plan: :unset, e_id: :unset, sim_registration_code: :unset, limit: nil, page_size: nil)
|
41
41
|
self.stream(
|
42
42
|
status: status,
|
43
43
|
iccid: iccid,
|
@@ -65,7 +65,7 @@ module Twilio
|
|
65
65
|
# but a limit is defined, stream() will attempt to read the
|
66
66
|
# limit with the most efficient page size, i.e. min(limit, 1000)
|
67
67
|
# @return [Enumerable] Enumerable that will yield up to limit results
|
68
|
-
def stream(status:
|
68
|
+
def stream(status: :unset, iccid: :unset, rate_plan: :unset, e_id: :unset, sim_registration_code: :unset, limit: nil, page_size: nil)
|
69
69
|
limits = @version.read_limits(limit, page_size)
|
70
70
|
|
71
71
|
page = self.page(
|
@@ -119,8 +119,8 @@ module Twilio
|
|
119
119
|
# @param [Integer] page_number Page Number, this value is simply for client state
|
120
120
|
# @param [Integer] page_size Number of records to return, defaults to 50
|
121
121
|
# @return [Page] Page of SimInstance
|
122
|
-
def page(status:
|
123
|
-
params = {
|
122
|
+
def page(status: :unset, iccid: :unset, rate_plan: :unset, e_id: :unset, sim_registration_code: :unset, page_token: :unset, page_number: :unset, page_size: :unset)
|
123
|
+
params = Twilio::Values.of({
|
124
124
|
'Status' => status,
|
125
125
|
'Iccid' => iccid,
|
126
126
|
'RatePlan' => rate_plan,
|
@@ -129,13 +129,26 @@ module Twilio
|
|
129
129
|
'PageToken' => page_token,
|
130
130
|
'Page' => page_number,
|
131
131
|
'PageSize' => page_size,
|
132
|
-
}
|
132
|
+
})
|
133
133
|
response = @version.page(
|
134
134
|
'GET',
|
135
135
|
@uri,
|
136
136
|
params
|
137
137
|
)
|
138
|
-
|
138
|
+
SimPage.new(@version, response, @solution)
|
139
|
+
end
|
140
|
+
|
141
|
+
##
|
142
|
+
# Retrieve a single page of SimInstance records from the API.
|
143
|
+
# Request is executed immediately.
|
144
|
+
# @param [String] target_url API-generated URL for the requested results page
|
145
|
+
# @return [Page] Page of SimInstance
|
146
|
+
def get_page(target_url)
|
147
|
+
response = @version.domain.request(
|
148
|
+
'GET',
|
149
|
+
target_url
|
150
|
+
)
|
151
|
+
SimPage.new(@version, response, @solution)
|
139
152
|
end
|
140
153
|
|
141
154
|
##
|
@@ -164,7 +177,7 @@ module Twilio
|
|
164
177
|
# @param [Hash] payload Payload response from the API
|
165
178
|
# @return [SimInstance] SimInstance
|
166
179
|
def get_instance(payload)
|
167
|
-
|
180
|
+
SimInstance.new(
|
168
181
|
@version,
|
169
182
|
payload,
|
170
183
|
)
|
@@ -200,7 +213,7 @@ module Twilio
|
|
200
213
|
# Fetch a SimInstance
|
201
214
|
# @return [SimInstance] Fetched SimInstance
|
202
215
|
def fetch
|
203
|
-
params = {}
|
216
|
+
params = Twilio::Values.of({})
|
204
217
|
|
205
218
|
payload = @version.fetch(
|
206
219
|
'GET',
|
@@ -208,7 +221,7 @@ module Twilio
|
|
208
221
|
params,
|
209
222
|
)
|
210
223
|
|
211
|
-
|
224
|
+
SimInstance.new(
|
212
225
|
@version,
|
213
226
|
payload,
|
214
227
|
sid: @solution[:sid],
|
@@ -234,8 +247,8 @@ module Twilio
|
|
234
247
|
# @param [String] voice_method The voice_method
|
235
248
|
# @param [String] voice_url The voice_url
|
236
249
|
# @return [SimInstance] Updated SimInstance
|
237
|
-
def update(unique_name:
|
238
|
-
data = {
|
250
|
+
def update(unique_name: :unset, callback_method: :unset, callback_url: :unset, friendly_name: :unset, rate_plan: :unset, status: :unset, commands_callback_method: :unset, commands_callback_url: :unset, sms_fallback_method: :unset, sms_fallback_url: :unset, sms_method: :unset, sms_url: :unset, voice_fallback_method: :unset, voice_fallback_url: :unset, voice_method: :unset, voice_url: :unset)
|
251
|
+
data = Twilio::Values.of({
|
239
252
|
'UniqueName' => unique_name,
|
240
253
|
'CallbackMethod' => callback_method,
|
241
254
|
'CallbackUrl' => callback_url,
|
@@ -252,7 +265,7 @@ module Twilio
|
|
252
265
|
'VoiceFallbackUrl' => voice_fallback_url,
|
253
266
|
'VoiceMethod' => voice_method,
|
254
267
|
'VoiceUrl' => voice_url,
|
255
|
-
}
|
268
|
+
})
|
256
269
|
|
257
270
|
payload = @version.update(
|
258
271
|
'POST',
|
@@ -260,7 +273,7 @@ module Twilio
|
|
260
273
|
data: data,
|
261
274
|
)
|
262
275
|
|
263
|
-
|
276
|
+
SimInstance.new(
|
264
277
|
@version,
|
265
278
|
payload,
|
266
279
|
sid: @solution[:sid],
|
@@ -271,7 +284,7 @@ module Twilio
|
|
271
284
|
# Access the usage
|
272
285
|
# @return [UsageList] UsageList
|
273
286
|
def usage
|
274
|
-
|
287
|
+
UsageContext.new(
|
275
288
|
@version,
|
276
289
|
@solution[:sid],
|
277
290
|
)
|
@@ -457,7 +470,7 @@ module Twilio
|
|
457
470
|
# @param [String] voice_method The voice_method
|
458
471
|
# @param [String] voice_url The voice_url
|
459
472
|
# @return [SimInstance] Updated SimInstance
|
460
|
-
def update(unique_name:
|
473
|
+
def update(unique_name: :unset, callback_method: :unset, callback_url: :unset, friendly_name: :unset, rate_plan: :unset, status: :unset, commands_callback_method: :unset, commands_callback_url: :unset, sms_fallback_method: :unset, sms_fallback_url: :unset, sms_method: :unset, sms_url: :unset, voice_fallback_method: :unset, voice_fallback_url: :unset, voice_method: :unset, voice_url: :unset)
|
461
474
|
context.update(
|
462
475
|
unique_name: unique_name,
|
463
476
|
callback_method: callback_method,
|