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
@@ -33,8 +33,8 @@ module Twilio
|
|
33
33
|
# @param [Boolean] record_participants_on_connect The
|
34
34
|
# record_participants_on_connect
|
35
35
|
# @return [RoomInstance] Newly created RoomInstance
|
36
|
-
def create(enable_turn:
|
37
|
-
data = {
|
36
|
+
def create(enable_turn: :unset, type: :unset, unique_name: :unset, status_callback: :unset, status_callback_method: :unset, max_participants: :unset, record_participants_on_connect: :unset)
|
37
|
+
data = Twilio::Values.of({
|
38
38
|
'EnableTurn' => enable_turn,
|
39
39
|
'Type' => type,
|
40
40
|
'UniqueName' => unique_name,
|
@@ -42,7 +42,7 @@ module Twilio
|
|
42
42
|
'StatusCallbackMethod' => status_callback_method,
|
43
43
|
'MaxParticipants' => max_participants,
|
44
44
|
'RecordParticipantsOnConnect' => record_participants_on_connect,
|
45
|
-
}
|
45
|
+
})
|
46
46
|
|
47
47
|
payload = @version.create(
|
48
48
|
'POST',
|
@@ -50,7 +50,7 @@ module Twilio
|
|
50
50
|
data: data
|
51
51
|
)
|
52
52
|
|
53
|
-
|
53
|
+
RoomInstance.new(
|
54
54
|
@version,
|
55
55
|
payload,
|
56
56
|
)
|
@@ -71,7 +71,7 @@ module Twilio
|
|
71
71
|
# but a limit is defined, stream() will attempt to read the
|
72
72
|
# limit with the most efficient page size, i.e. min(limit, 1000)
|
73
73
|
# @return [Array] Array of up to limit results
|
74
|
-
def list(status:
|
74
|
+
def list(status: :unset, unique_name: :unset, date_created_after: :unset, date_created_before: :unset, limit: nil, page_size: nil)
|
75
75
|
self.stream(
|
76
76
|
status: status,
|
77
77
|
unique_name: unique_name,
|
@@ -97,7 +97,7 @@ module Twilio
|
|
97
97
|
# but a limit is defined, stream() will attempt to read the
|
98
98
|
# limit with the most efficient page size, i.e. min(limit, 1000)
|
99
99
|
# @return [Enumerable] Enumerable that will yield up to limit results
|
100
|
-
def stream(status:
|
100
|
+
def stream(status: :unset, unique_name: :unset, date_created_after: :unset, date_created_before: :unset, limit: nil, page_size: nil)
|
101
101
|
limits = @version.read_limits(limit, page_size)
|
102
102
|
|
103
103
|
page = self.page(
|
@@ -148,8 +148,8 @@ module Twilio
|
|
148
148
|
# @param [Integer] page_number Page Number, this value is simply for client state
|
149
149
|
# @param [Integer] page_size Number of records to return, defaults to 50
|
150
150
|
# @return [Page] Page of RoomInstance
|
151
|
-
def page(status:
|
152
|
-
params = {
|
151
|
+
def page(status: :unset, unique_name: :unset, date_created_after: :unset, date_created_before: :unset, page_token: :unset, page_number: :unset, page_size: :unset)
|
152
|
+
params = Twilio::Values.of({
|
153
153
|
'Status' => status,
|
154
154
|
'UniqueName' => unique_name,
|
155
155
|
'DateCreatedAfter' => Twilio.serialize_iso8601(date_created_after),
|
@@ -157,13 +157,26 @@ module Twilio
|
|
157
157
|
'PageToken' => page_token,
|
158
158
|
'Page' => page_number,
|
159
159
|
'PageSize' => page_size,
|
160
|
-
}
|
160
|
+
})
|
161
161
|
response = @version.page(
|
162
162
|
'GET',
|
163
163
|
@uri,
|
164
164
|
params
|
165
165
|
)
|
166
|
-
|
166
|
+
RoomPage.new(@version, response, @solution)
|
167
|
+
end
|
168
|
+
|
169
|
+
##
|
170
|
+
# Retrieve a single page of RoomInstance records from the API.
|
171
|
+
# Request is executed immediately.
|
172
|
+
# @param [String] target_url API-generated URL for the requested results page
|
173
|
+
# @return [Page] Page of RoomInstance
|
174
|
+
def get_page(target_url)
|
175
|
+
response = @version.domain.request(
|
176
|
+
'GET',
|
177
|
+
target_url
|
178
|
+
)
|
179
|
+
RoomPage.new(@version, response, @solution)
|
167
180
|
end
|
168
181
|
|
169
182
|
##
|
@@ -192,7 +205,7 @@ module Twilio
|
|
192
205
|
# @param [Hash] payload Payload response from the API
|
193
206
|
# @return [RoomInstance] RoomInstance
|
194
207
|
def get_instance(payload)
|
195
|
-
|
208
|
+
RoomInstance.new(
|
196
209
|
@version,
|
197
210
|
payload,
|
198
211
|
)
|
@@ -228,7 +241,7 @@ module Twilio
|
|
228
241
|
# Fetch a RoomInstance
|
229
242
|
# @return [RoomInstance] Fetched RoomInstance
|
230
243
|
def fetch
|
231
|
-
params = {}
|
244
|
+
params = Twilio::Values.of({})
|
232
245
|
|
233
246
|
payload = @version.fetch(
|
234
247
|
'GET',
|
@@ -236,7 +249,7 @@ module Twilio
|
|
236
249
|
params,
|
237
250
|
)
|
238
251
|
|
239
|
-
|
252
|
+
RoomInstance.new(
|
240
253
|
@version,
|
241
254
|
payload,
|
242
255
|
sid: @solution[:sid],
|
@@ -248,9 +261,9 @@ module Twilio
|
|
248
261
|
# @param [room.RoomStatus] status The status
|
249
262
|
# @return [RoomInstance] Updated RoomInstance
|
250
263
|
def update(status: nil)
|
251
|
-
data = {
|
264
|
+
data = Twilio::Values.of({
|
252
265
|
'Status' => status,
|
253
|
-
}
|
266
|
+
})
|
254
267
|
|
255
268
|
payload = @version.update(
|
256
269
|
'POST',
|
@@ -258,7 +271,7 @@ module Twilio
|
|
258
271
|
data: data,
|
259
272
|
)
|
260
273
|
|
261
|
-
|
274
|
+
RoomInstance.new(
|
262
275
|
@version,
|
263
276
|
payload,
|
264
277
|
sid: @solution[:sid],
|
@@ -93,18 +93,31 @@ module Twilio
|
|
93
93
|
# @param [Integer] page_number Page Number, this value is simply for client state
|
94
94
|
# @param [Integer] page_size Number of records to return, defaults to 50
|
95
95
|
# @return [Page] Page of RoomRecordingInstance
|
96
|
-
def page(page_token:
|
97
|
-
params = {
|
96
|
+
def page(page_token: :unset, page_number: :unset, page_size: :unset)
|
97
|
+
params = Twilio::Values.of({
|
98
98
|
'PageToken' => page_token,
|
99
99
|
'Page' => page_number,
|
100
100
|
'PageSize' => page_size,
|
101
|
-
}
|
101
|
+
})
|
102
102
|
response = @version.page(
|
103
103
|
'GET',
|
104
104
|
@uri,
|
105
105
|
params
|
106
106
|
)
|
107
|
-
|
107
|
+
RoomRecordingPage.new(@version, response, @solution)
|
108
|
+
end
|
109
|
+
|
110
|
+
##
|
111
|
+
# Retrieve a single page of RoomRecordingInstance records from the API.
|
112
|
+
# Request is executed immediately.
|
113
|
+
# @param [String] target_url API-generated URL for the requested results page
|
114
|
+
# @return [Page] Page of RoomRecordingInstance
|
115
|
+
def get_page(target_url)
|
116
|
+
response = @version.domain.request(
|
117
|
+
'GET',
|
118
|
+
target_url
|
119
|
+
)
|
120
|
+
RoomRecordingPage.new(@version, response, @solution)
|
108
121
|
end
|
109
122
|
|
110
123
|
##
|
@@ -134,7 +147,7 @@ module Twilio
|
|
134
147
|
# @param [Hash] payload Payload response from the API
|
135
148
|
# @return [RoomRecordingInstance] RoomRecordingInstance
|
136
149
|
def get_instance(payload)
|
137
|
-
|
150
|
+
RoomRecordingInstance.new(
|
138
151
|
@version,
|
139
152
|
payload,
|
140
153
|
room_sid: @solution[:room_sid],
|
@@ -170,7 +183,7 @@ module Twilio
|
|
170
183
|
# Fetch a RoomRecordingInstance
|
171
184
|
# @return [RoomRecordingInstance] Fetched RoomRecordingInstance
|
172
185
|
def fetch
|
173
|
-
params = {}
|
186
|
+
params = Twilio::Values.of({})
|
174
187
|
|
175
188
|
payload = @version.fetch(
|
176
189
|
'GET',
|
@@ -178,7 +191,7 @@ module Twilio
|
|
178
191
|
params,
|
179
192
|
)
|
180
193
|
|
181
|
-
|
194
|
+
RoomRecordingInstance.new(
|
182
195
|
@version,
|
183
196
|
payload,
|
184
197
|
room_sid: @solution[:room_sid],
|
@@ -26,16 +26,16 @@ module Twilio
|
|
26
26
|
@v1 ||= V1.new self
|
27
27
|
end
|
28
28
|
|
29
|
-
def commands
|
30
|
-
self.v1.commands
|
29
|
+
def commands(sid=:unset)
|
30
|
+
self.v1.commands(sid)
|
31
31
|
end
|
32
32
|
|
33
|
-
def rate_plans
|
34
|
-
self.v1.rate_plans
|
33
|
+
def rate_plans(sid=:unset)
|
34
|
+
self.v1.rate_plans(sid)
|
35
35
|
end
|
36
36
|
|
37
|
-
def sims
|
38
|
-
self.v1.sims
|
37
|
+
def sims(sid=:unset)
|
38
|
+
self.v1.sims(sid)
|
39
39
|
end
|
40
40
|
|
41
41
|
##
|
@@ -35,7 +35,7 @@ module Twilio
|
|
35
35
|
# but a limit is defined, stream() will attempt to read the
|
36
36
|
# limit with the most efficient page size, i.e. min(limit, 1000)
|
37
37
|
# @return [Array] Array of up to limit results
|
38
|
-
def list(sim:
|
38
|
+
def list(sim: :unset, status: :unset, direction: :unset, limit: nil, page_size: nil)
|
39
39
|
self.stream(
|
40
40
|
sim: sim,
|
41
41
|
status: status,
|
@@ -59,7 +59,7 @@ module Twilio
|
|
59
59
|
# but a limit is defined, stream() will attempt to read the
|
60
60
|
# limit with the most efficient page size, i.e. min(limit, 1000)
|
61
61
|
# @return [Enumerable] Enumerable that will yield up to limit results
|
62
|
-
def stream(sim:
|
62
|
+
def stream(sim: :unset, status: :unset, direction: :unset, limit: nil, page_size: nil)
|
63
63
|
limits = @version.read_limits(limit, page_size)
|
64
64
|
|
65
65
|
page = self.page(
|
@@ -107,21 +107,34 @@ module Twilio
|
|
107
107
|
# @param [Integer] page_number Page Number, this value is simply for client state
|
108
108
|
# @param [Integer] page_size Number of records to return, defaults to 50
|
109
109
|
# @return [Page] Page of CommandInstance
|
110
|
-
def page(sim:
|
111
|
-
params = {
|
110
|
+
def page(sim: :unset, status: :unset, direction: :unset, page_token: :unset, page_number: :unset, page_size: :unset)
|
111
|
+
params = Twilio::Values.of({
|
112
112
|
'Sim' => sim,
|
113
113
|
'Status' => status,
|
114
114
|
'Direction' => direction,
|
115
115
|
'PageToken' => page_token,
|
116
116
|
'Page' => page_number,
|
117
117
|
'PageSize' => page_size,
|
118
|
-
}
|
118
|
+
})
|
119
119
|
response = @version.page(
|
120
120
|
'GET',
|
121
121
|
@uri,
|
122
122
|
params
|
123
123
|
)
|
124
|
-
|
124
|
+
CommandPage.new(@version, response, @solution)
|
125
|
+
end
|
126
|
+
|
127
|
+
##
|
128
|
+
# Retrieve a single page of CommandInstance records from the API.
|
129
|
+
# Request is executed immediately.
|
130
|
+
# @param [String] target_url API-generated URL for the requested results page
|
131
|
+
# @return [Page] Page of CommandInstance
|
132
|
+
def get_page(target_url)
|
133
|
+
response = @version.domain.request(
|
134
|
+
'GET',
|
135
|
+
target_url
|
136
|
+
)
|
137
|
+
CommandPage.new(@version, response, @solution)
|
125
138
|
end
|
126
139
|
|
127
140
|
##
|
@@ -134,15 +147,15 @@ module Twilio
|
|
134
147
|
# @param [command.CommandMode] command_mode The command_mode
|
135
148
|
# @param [String] include_sid The include_sid
|
136
149
|
# @return [CommandInstance] Newly created CommandInstance
|
137
|
-
def create(command: nil, sim:
|
138
|
-
data = {
|
150
|
+
def create(command: nil, sim: :unset, callback_method: :unset, callback_url: :unset, command_mode: :unset, include_sid: :unset)
|
151
|
+
data = Twilio::Values.of({
|
139
152
|
'Command' => command,
|
140
153
|
'Sim' => sim,
|
141
154
|
'CallbackMethod' => callback_method,
|
142
155
|
'CallbackUrl' => callback_url,
|
143
156
|
'CommandMode' => command_mode,
|
144
157
|
'IncludeSid' => include_sid,
|
145
|
-
}
|
158
|
+
})
|
146
159
|
|
147
160
|
payload = @version.create(
|
148
161
|
'POST',
|
@@ -150,7 +163,7 @@ module Twilio
|
|
150
163
|
data: data
|
151
164
|
)
|
152
165
|
|
153
|
-
|
166
|
+
CommandInstance.new(
|
154
167
|
@version,
|
155
168
|
payload,
|
156
169
|
)
|
@@ -182,7 +195,7 @@ module Twilio
|
|
182
195
|
# @param [Hash] payload Payload response from the API
|
183
196
|
# @return [CommandInstance] CommandInstance
|
184
197
|
def get_instance(payload)
|
185
|
-
|
198
|
+
CommandInstance.new(
|
186
199
|
@version,
|
187
200
|
payload,
|
188
201
|
)
|
@@ -215,7 +228,7 @@ module Twilio
|
|
215
228
|
# Fetch a CommandInstance
|
216
229
|
# @return [CommandInstance] Fetched CommandInstance
|
217
230
|
def fetch
|
218
|
-
params = {}
|
231
|
+
params = Twilio::Values.of({})
|
219
232
|
|
220
233
|
payload = @version.fetch(
|
221
234
|
'GET',
|
@@ -223,7 +236,7 @@ module Twilio
|
|
223
236
|
params,
|
224
237
|
)
|
225
238
|
|
226
|
-
|
239
|
+
CommandInstance.new(
|
227
240
|
@version,
|
228
241
|
payload,
|
229
242
|
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
|
##
|
@@ -116,8 +129,8 @@ module Twilio
|
|
116
129
|
# @param [Boolean] national_roaming_enabled The national_roaming_enabled
|
117
130
|
# @param [String] international_roaming The international_roaming
|
118
131
|
# @return [RatePlanInstance] Newly created RatePlanInstance
|
119
|
-
def create(unique_name:
|
120
|
-
data = {
|
132
|
+
def create(unique_name: :unset, friendly_name: :unset, data_enabled: :unset, data_limit: :unset, data_metering: :unset, messaging_enabled: :unset, voice_enabled: :unset, national_roaming_enabled: :unset, international_roaming: :unset)
|
133
|
+
data = Twilio::Values.of({
|
121
134
|
'UniqueName' => unique_name,
|
122
135
|
'FriendlyName' => friendly_name,
|
123
136
|
'DataEnabled' => data_enabled,
|
@@ -127,7 +140,7 @@ module Twilio
|
|
127
140
|
'VoiceEnabled' => voice_enabled,
|
128
141
|
'NationalRoamingEnabled' => national_roaming_enabled,
|
129
142
|
'InternationalRoaming' => international_roaming,
|
130
|
-
}
|
143
|
+
})
|
131
144
|
|
132
145
|
payload = @version.create(
|
133
146
|
'POST',
|
@@ -135,7 +148,7 @@ module Twilio
|
|
135
148
|
data: data
|
136
149
|
)
|
137
150
|
|
138
|
-
|
151
|
+
RatePlanInstance.new(
|
139
152
|
@version,
|
140
153
|
payload,
|
141
154
|
)
|
@@ -167,7 +180,7 @@ module Twilio
|
|
167
180
|
# @param [Hash] payload Payload response from the API
|
168
181
|
# @return [RatePlanInstance] RatePlanInstance
|
169
182
|
def get_instance(payload)
|
170
|
-
|
183
|
+
RatePlanInstance.new(
|
171
184
|
@version,
|
172
185
|
payload,
|
173
186
|
)
|
@@ -200,7 +213,7 @@ module Twilio
|
|
200
213
|
# Fetch a RatePlanInstance
|
201
214
|
# @return [RatePlanInstance] Fetched RatePlanInstance
|
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
|
+
RatePlanInstance.new(
|
212
225
|
@version,
|
213
226
|
payload,
|
214
227
|
sid: @solution[:sid],
|
@@ -220,11 +233,11 @@ module Twilio
|
|
220
233
|
# @param [String] unique_name The unique_name
|
221
234
|
# @param [String] friendly_name The friendly_name
|
222
235
|
# @return [RatePlanInstance] Updated RatePlanInstance
|
223
|
-
def update(unique_name:
|
224
|
-
data = {
|
236
|
+
def update(unique_name: :unset, friendly_name: :unset)
|
237
|
+
data = Twilio::Values.of({
|
225
238
|
'UniqueName' => unique_name,
|
226
239
|
'FriendlyName' => friendly_name,
|
227
|
-
}
|
240
|
+
})
|
228
241
|
|
229
242
|
payload = @version.update(
|
230
243
|
'POST',
|
@@ -232,7 +245,7 @@ module Twilio
|
|
232
245
|
data: data,
|
233
246
|
)
|
234
247
|
|
235
|
-
|
248
|
+
RatePlanInstance.new(
|
236
249
|
@version,
|
237
250
|
payload,
|
238
251
|
sid: @solution[:sid],
|
@@ -243,7 +256,7 @@ module Twilio
|
|
243
256
|
# Deletes the RatePlanInstance
|
244
257
|
# @return [Boolean] true if delete succeeds, true otherwise
|
245
258
|
def delete
|
246
|
-
|
259
|
+
@version.delete('delete', @uri)
|
247
260
|
end
|
248
261
|
|
249
262
|
##
|
@@ -372,7 +385,7 @@ module Twilio
|
|
372
385
|
# @param [String] unique_name The unique_name
|
373
386
|
# @param [String] friendly_name The friendly_name
|
374
387
|
# @return [RatePlanInstance] Updated RatePlanInstance
|
375
|
-
def update(unique_name:
|
388
|
+
def update(unique_name: :unset, friendly_name: :unset)
|
376
389
|
context.update(
|
377
390
|
unique_name: unique_name,
|
378
391
|
friendly_name: friendly_name,
|