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
@@ -55,7 +55,7 @@ module Twilio
|
|
55
55
|
# @param [Hash] payload Payload response from the API
|
56
56
|
# @return [TaskQueueStatisticsInstance] TaskQueueStatisticsInstance
|
57
57
|
def get_instance(payload)
|
58
|
-
|
58
|
+
TaskQueueStatisticsInstance.new(
|
59
59
|
@version,
|
60
60
|
payload,
|
61
61
|
workspace_sid: @solution[:workspace_sid],
|
@@ -94,12 +94,12 @@ module Twilio
|
|
94
94
|
# @param [String] minutes The minutes
|
95
95
|
# @param [Time] start_date The start_date
|
96
96
|
# @return [TaskQueueStatisticsInstance] Fetched TaskQueueStatisticsInstance
|
97
|
-
def fetch(end_date:
|
98
|
-
params = {
|
97
|
+
def fetch(end_date: :unset, minutes: :unset, start_date: :unset)
|
98
|
+
params = Twilio::Values.of({
|
99
99
|
'EndDate' => Twilio.serialize_iso8601(end_date),
|
100
100
|
'Minutes' => minutes,
|
101
101
|
'StartDate' => Twilio.serialize_iso8601(start_date),
|
102
|
-
}
|
102
|
+
})
|
103
103
|
|
104
104
|
payload = @version.fetch(
|
105
105
|
'GET',
|
@@ -107,7 +107,7 @@ module Twilio
|
|
107
107
|
params,
|
108
108
|
)
|
109
109
|
|
110
|
-
|
110
|
+
TaskQueueStatisticsInstance.new(
|
111
111
|
@version,
|
112
112
|
payload,
|
113
113
|
workspace_sid: @solution[:workspace_sid],
|
@@ -198,7 +198,7 @@ module Twilio
|
|
198
198
|
# @param [String] minutes The minutes
|
199
199
|
# @param [Time] start_date The start_date
|
200
200
|
# @return [TaskQueueStatisticsInstance] Fetched TaskQueueStatisticsInstance
|
201
|
-
def fetch(end_date:
|
201
|
+
def fetch(end_date: :unset, minutes: :unset, start_date: :unset)
|
202
202
|
context.fetch(
|
203
203
|
end_date: end_date,
|
204
204
|
minutes: minutes,
|
@@ -41,7 +41,7 @@ module Twilio
|
|
41
41
|
# but a limit is defined, stream() will attempt to read the
|
42
42
|
# limit with the most efficient page size, i.e. min(limit, 1000)
|
43
43
|
# @return [Array] Array of up to limit results
|
44
|
-
def list(end_date:
|
44
|
+
def list(end_date: :unset, friendly_name: :unset, minutes: :unset, start_date: :unset, limit: nil, page_size: nil)
|
45
45
|
self.stream(
|
46
46
|
end_date: end_date,
|
47
47
|
friendly_name: friendly_name,
|
@@ -67,7 +67,7 @@ module Twilio
|
|
67
67
|
# but a limit is defined, stream() will attempt to read the
|
68
68
|
# limit with the most efficient page size, i.e. min(limit, 1000)
|
69
69
|
# @return [Enumerable] Enumerable that will yield up to limit results
|
70
|
-
def stream(end_date:
|
70
|
+
def stream(end_date: :unset, friendly_name: :unset, minutes: :unset, start_date: :unset, limit: nil, page_size: nil)
|
71
71
|
limits = @version.read_limits(limit, page_size)
|
72
72
|
|
73
73
|
page = self.page(
|
@@ -118,8 +118,8 @@ module Twilio
|
|
118
118
|
# @param [Integer] page_number Page Number, this value is simply for client state
|
119
119
|
# @param [Integer] page_size Number of records to return, defaults to 50
|
120
120
|
# @return [Page] Page of TaskQueuesStatisticsInstance
|
121
|
-
def page(end_date:
|
122
|
-
params = {
|
121
|
+
def page(end_date: :unset, friendly_name: :unset, minutes: :unset, start_date: :unset, page_token: :unset, page_number: :unset, page_size: :unset)
|
122
|
+
params = Twilio::Values.of({
|
123
123
|
'EndDate' => Twilio.serialize_iso8601(end_date),
|
124
124
|
'FriendlyName' => friendly_name,
|
125
125
|
'Minutes' => minutes,
|
@@ -127,13 +127,26 @@ module Twilio
|
|
127
127
|
'PageToken' => page_token,
|
128
128
|
'Page' => page_number,
|
129
129
|
'PageSize' => page_size,
|
130
|
-
}
|
130
|
+
})
|
131
131
|
response = @version.page(
|
132
132
|
'GET',
|
133
133
|
@uri,
|
134
134
|
params
|
135
135
|
)
|
136
|
-
|
136
|
+
TaskQueuesStatisticsPage.new(@version, response, @solution)
|
137
|
+
end
|
138
|
+
|
139
|
+
##
|
140
|
+
# Retrieve a single page of TaskQueuesStatisticsInstance records from the API.
|
141
|
+
# Request is executed immediately.
|
142
|
+
# @param [String] target_url API-generated URL for the requested results page
|
143
|
+
# @return [Page] Page of TaskQueuesStatisticsInstance
|
144
|
+
def get_page(target_url)
|
145
|
+
response = @version.domain.request(
|
146
|
+
'GET',
|
147
|
+
target_url
|
148
|
+
)
|
149
|
+
TaskQueuesStatisticsPage.new(@version, response, @solution)
|
137
150
|
end
|
138
151
|
|
139
152
|
##
|
@@ -163,7 +176,7 @@ module Twilio
|
|
163
176
|
# @param [Hash] payload Payload response from the API
|
164
177
|
# @return [TaskQueuesStatisticsInstance] TaskQueuesStatisticsInstance
|
165
178
|
def get_instance(payload)
|
166
|
-
|
179
|
+
TaskQueuesStatisticsInstance.new(
|
167
180
|
@version,
|
168
181
|
payload,
|
169
182
|
workspace_sid: @solution[:workspace_sid],
|
@@ -46,7 +46,7 @@ module Twilio
|
|
46
46
|
# but a limit is defined, stream() will attempt to read the
|
47
47
|
# limit with the most efficient page size, i.e. min(limit, 1000)
|
48
48
|
# @return [Array] Array of up to limit results
|
49
|
-
def list(activity_name:
|
49
|
+
def list(activity_name: :unset, activity_sid: :unset, available: :unset, friendly_name: :unset, target_workers_expression: :unset, task_queue_name: :unset, task_queue_sid: :unset, limit: nil, page_size: nil)
|
50
50
|
self.stream(
|
51
51
|
activity_name: activity_name,
|
52
52
|
activity_sid: activity_sid,
|
@@ -78,7 +78,7 @@ module Twilio
|
|
78
78
|
# but a limit is defined, stream() will attempt to read the
|
79
79
|
# limit with the most efficient page size, i.e. min(limit, 1000)
|
80
80
|
# @return [Enumerable] Enumerable that will yield up to limit results
|
81
|
-
def stream(activity_name:
|
81
|
+
def stream(activity_name: :unset, activity_sid: :unset, available: :unset, friendly_name: :unset, target_workers_expression: :unset, task_queue_name: :unset, task_queue_sid: :unset, limit: nil, page_size: nil)
|
82
82
|
limits = @version.read_limits(limit, page_size)
|
83
83
|
|
84
84
|
page = self.page(
|
@@ -138,8 +138,8 @@ module Twilio
|
|
138
138
|
# @param [Integer] page_number Page Number, this value is simply for client state
|
139
139
|
# @param [Integer] page_size Number of records to return, defaults to 50
|
140
140
|
# @return [Page] Page of WorkerInstance
|
141
|
-
def page(activity_name:
|
142
|
-
params = {
|
141
|
+
def page(activity_name: :unset, activity_sid: :unset, available: :unset, friendly_name: :unset, target_workers_expression: :unset, task_queue_name: :unset, task_queue_sid: :unset, page_token: :unset, page_number: :unset, page_size: :unset)
|
142
|
+
params = Twilio::Values.of({
|
143
143
|
'ActivityName' => activity_name,
|
144
144
|
'ActivitySid' => activity_sid,
|
145
145
|
'Available' => available,
|
@@ -150,13 +150,26 @@ module Twilio
|
|
150
150
|
'PageToken' => page_token,
|
151
151
|
'Page' => page_number,
|
152
152
|
'PageSize' => page_size,
|
153
|
-
}
|
153
|
+
})
|
154
154
|
response = @version.page(
|
155
155
|
'GET',
|
156
156
|
@uri,
|
157
157
|
params
|
158
158
|
)
|
159
|
-
|
159
|
+
WorkerPage.new(@version, response, @solution)
|
160
|
+
end
|
161
|
+
|
162
|
+
##
|
163
|
+
# Retrieve a single page of WorkerInstance records from the API.
|
164
|
+
# Request is executed immediately.
|
165
|
+
# @param [String] target_url API-generated URL for the requested results page
|
166
|
+
# @return [Page] Page of WorkerInstance
|
167
|
+
def get_page(target_url)
|
168
|
+
response = @version.domain.request(
|
169
|
+
'GET',
|
170
|
+
target_url
|
171
|
+
)
|
172
|
+
WorkerPage.new(@version, response, @solution)
|
160
173
|
end
|
161
174
|
|
162
175
|
##
|
@@ -166,12 +179,12 @@ module Twilio
|
|
166
179
|
# @param [String] activity_sid The activity_sid
|
167
180
|
# @param [String] attributes The attributes
|
168
181
|
# @return [WorkerInstance] Newly created WorkerInstance
|
169
|
-
def create(friendly_name: nil, activity_sid:
|
170
|
-
data = {
|
182
|
+
def create(friendly_name: nil, activity_sid: :unset, attributes: :unset)
|
183
|
+
data = Twilio::Values.of({
|
171
184
|
'FriendlyName' => friendly_name,
|
172
185
|
'ActivitySid' => activity_sid,
|
173
186
|
'Attributes' => attributes,
|
174
|
-
}
|
187
|
+
})
|
175
188
|
|
176
189
|
payload = @version.create(
|
177
190
|
'POST',
|
@@ -179,7 +192,7 @@ module Twilio
|
|
179
192
|
data: data
|
180
193
|
)
|
181
194
|
|
182
|
-
|
195
|
+
WorkerInstance.new(
|
183
196
|
@version,
|
184
197
|
payload,
|
185
198
|
workspace_sid: @solution[:workspace_sid],
|
@@ -228,7 +241,7 @@ module Twilio
|
|
228
241
|
# @param [Hash] payload Payload response from the API
|
229
242
|
# @return [WorkerInstance] WorkerInstance
|
230
243
|
def get_instance(payload)
|
231
|
-
|
244
|
+
WorkerInstance.new(
|
232
245
|
@version,
|
233
246
|
payload,
|
234
247
|
workspace_sid: @solution[:workspace_sid],
|
@@ -269,7 +282,7 @@ module Twilio
|
|
269
282
|
# Fetch a WorkerInstance
|
270
283
|
# @return [WorkerInstance] Fetched WorkerInstance
|
271
284
|
def fetch
|
272
|
-
params = {}
|
285
|
+
params = Twilio::Values.of({})
|
273
286
|
|
274
287
|
payload = @version.fetch(
|
275
288
|
'GET',
|
@@ -277,7 +290,7 @@ module Twilio
|
|
277
290
|
params,
|
278
291
|
)
|
279
292
|
|
280
|
-
|
293
|
+
WorkerInstance.new(
|
281
294
|
@version,
|
282
295
|
payload,
|
283
296
|
workspace_sid: @solution[:workspace_sid],
|
@@ -291,12 +304,12 @@ module Twilio
|
|
291
304
|
# @param [String] attributes The attributes
|
292
305
|
# @param [String] friendly_name The friendly_name
|
293
306
|
# @return [WorkerInstance] Updated WorkerInstance
|
294
|
-
def update(activity_sid:
|
295
|
-
data = {
|
307
|
+
def update(activity_sid: :unset, attributes: :unset, friendly_name: :unset)
|
308
|
+
data = Twilio::Values.of({
|
296
309
|
'ActivitySid' => activity_sid,
|
297
310
|
'Attributes' => attributes,
|
298
311
|
'FriendlyName' => friendly_name,
|
299
|
-
}
|
312
|
+
})
|
300
313
|
|
301
314
|
payload = @version.update(
|
302
315
|
'POST',
|
@@ -304,7 +317,7 @@ module Twilio
|
|
304
317
|
data: data,
|
305
318
|
)
|
306
319
|
|
307
|
-
|
320
|
+
WorkerInstance.new(
|
308
321
|
@version,
|
309
322
|
payload,
|
310
323
|
workspace_sid: @solution[:workspace_sid],
|
@@ -316,14 +329,14 @@ module Twilio
|
|
316
329
|
# Deletes the WorkerInstance
|
317
330
|
# @return [Boolean] true if delete succeeds, true otherwise
|
318
331
|
def delete
|
319
|
-
|
332
|
+
@version.delete('delete', @uri)
|
320
333
|
end
|
321
334
|
|
322
335
|
##
|
323
336
|
# Access the statistics
|
324
337
|
# @return [WorkerStatisticsList] WorkerStatisticsList
|
325
338
|
def statistics
|
326
|
-
|
339
|
+
WorkerStatisticsContext.new(
|
327
340
|
@version,
|
328
341
|
@solution[:workspace_sid],
|
329
342
|
@solution[:sid],
|
@@ -503,7 +516,7 @@ module Twilio
|
|
503
516
|
# @param [String] attributes The attributes
|
504
517
|
# @param [String] friendly_name The friendly_name
|
505
518
|
# @return [WorkerInstance] Updated WorkerInstance
|
506
|
-
def update(activity_sid:
|
519
|
+
def update(activity_sid: :unset, attributes: :unset, friendly_name: :unset)
|
507
520
|
context.update(
|
508
521
|
activity_sid: activity_sid,
|
509
522
|
attributes: attributes,
|
@@ -40,7 +40,7 @@ module Twilio
|
|
40
40
|
# but a limit is defined, stream() will attempt to read the
|
41
41
|
# limit with the most efficient page size, i.e. min(limit, 1000)
|
42
42
|
# @return [Array] Array of up to limit results
|
43
|
-
def list(reservation_status:
|
43
|
+
def list(reservation_status: :unset, limit: nil, page_size: nil)
|
44
44
|
self.stream(
|
45
45
|
reservation_status: reservation_status,
|
46
46
|
limit: limit,
|
@@ -60,7 +60,7 @@ module Twilio
|
|
60
60
|
# but a limit is defined, stream() will attempt to read the
|
61
61
|
# limit with the most efficient page size, i.e. min(limit, 1000)
|
62
62
|
# @return [Enumerable] Enumerable that will yield up to limit results
|
63
|
-
def stream(reservation_status:
|
63
|
+
def stream(reservation_status: :unset, limit: nil, page_size: nil)
|
64
64
|
limits = @version.read_limits(limit, page_size)
|
65
65
|
|
66
66
|
page = self.page(
|
@@ -102,19 +102,32 @@ module Twilio
|
|
102
102
|
# @param [Integer] page_number Page Number, this value is simply for client state
|
103
103
|
# @param [Integer] page_size Number of records to return, defaults to 50
|
104
104
|
# @return [Page] Page of ReservationInstance
|
105
|
-
def page(reservation_status:
|
106
|
-
params = {
|
105
|
+
def page(reservation_status: :unset, page_token: :unset, page_number: :unset, page_size: :unset)
|
106
|
+
params = Twilio::Values.of({
|
107
107
|
'ReservationStatus' => reservation_status,
|
108
108
|
'PageToken' => page_token,
|
109
109
|
'Page' => page_number,
|
110
110
|
'PageSize' => page_size,
|
111
|
-
}
|
111
|
+
})
|
112
112
|
response = @version.page(
|
113
113
|
'GET',
|
114
114
|
@uri,
|
115
115
|
params
|
116
116
|
)
|
117
|
-
|
117
|
+
ReservationPage.new(@version, response, @solution)
|
118
|
+
end
|
119
|
+
|
120
|
+
##
|
121
|
+
# Retrieve a single page of ReservationInstance records from the API.
|
122
|
+
# Request is executed immediately.
|
123
|
+
# @param [String] target_url API-generated URL for the requested results page
|
124
|
+
# @return [Page] Page of ReservationInstance
|
125
|
+
def get_page(target_url)
|
126
|
+
response = @version.domain.request(
|
127
|
+
'GET',
|
128
|
+
target_url
|
129
|
+
)
|
130
|
+
ReservationPage.new(@version, response, @solution)
|
118
131
|
end
|
119
132
|
|
120
133
|
##
|
@@ -145,7 +158,7 @@ module Twilio
|
|
145
158
|
# @param [Hash] payload Payload response from the API
|
146
159
|
# @return [ReservationInstance] ReservationInstance
|
147
160
|
def get_instance(payload)
|
148
|
-
|
161
|
+
ReservationInstance.new(
|
149
162
|
@version,
|
150
163
|
payload,
|
151
164
|
workspace_sid: @solution[:workspace_sid],
|
@@ -184,7 +197,7 @@ module Twilio
|
|
184
197
|
# Fetch a ReservationInstance
|
185
198
|
# @return [ReservationInstance] Fetched ReservationInstance
|
186
199
|
def fetch
|
187
|
-
params = {}
|
200
|
+
params = Twilio::Values.of({})
|
188
201
|
|
189
202
|
payload = @version.fetch(
|
190
203
|
'GET',
|
@@ -192,7 +205,7 @@ module Twilio
|
|
192
205
|
params,
|
193
206
|
)
|
194
207
|
|
195
|
-
|
208
|
+
ReservationInstance.new(
|
196
209
|
@version,
|
197
210
|
payload,
|
198
211
|
workspace_sid: @solution[:workspace_sid],
|
@@ -224,8 +237,8 @@ module Twilio
|
|
224
237
|
# @param [Boolean] redirect_accept The redirect_accept
|
225
238
|
# @param [String] redirect_url The redirect_url
|
226
239
|
# @return [ReservationInstance] Updated ReservationInstance
|
227
|
-
def update(reservation_status:
|
228
|
-
data = {
|
240
|
+
def update(reservation_status: :unset, worker_activity_sid: :unset, instruction: :unset, dequeue_post_work_activity_sid: :unset, dequeue_from: :unset, dequeue_record: :unset, dequeue_timeout: :unset, dequeue_to: :unset, dequeue_status_callback_url: :unset, call_from: :unset, call_record: :unset, call_timeout: :unset, call_to: :unset, call_url: :unset, call_status_callback_url: :unset, call_accept: :unset, redirect_call_sid: :unset, redirect_accept: :unset, redirect_url: :unset)
|
241
|
+
data = Twilio::Values.of({
|
229
242
|
'ReservationStatus' => reservation_status,
|
230
243
|
'WorkerActivitySid' => worker_activity_sid,
|
231
244
|
'Instruction' => instruction,
|
@@ -245,7 +258,7 @@ module Twilio
|
|
245
258
|
'RedirectCallSid' => redirect_call_sid,
|
246
259
|
'RedirectAccept' => redirect_accept,
|
247
260
|
'RedirectUrl' => redirect_url,
|
248
|
-
}
|
261
|
+
})
|
249
262
|
|
250
263
|
payload = @version.update(
|
251
264
|
'POST',
|
@@ -253,7 +266,7 @@ module Twilio
|
|
253
266
|
data: data,
|
254
267
|
)
|
255
268
|
|
256
|
-
|
269
|
+
ReservationInstance.new(
|
257
270
|
@version,
|
258
271
|
payload,
|
259
272
|
workspace_sid: @solution[:workspace_sid],
|
@@ -397,7 +410,7 @@ module Twilio
|
|
397
410
|
# @param [Boolean] redirect_accept The redirect_accept
|
398
411
|
# @param [String] redirect_url The redirect_url
|
399
412
|
# @return [ReservationInstance] Updated ReservationInstance
|
400
|
-
def update(reservation_status:
|
413
|
+
def update(reservation_status: :unset, worker_activity_sid: :unset, instruction: :unset, dequeue_post_work_activity_sid: :unset, dequeue_from: :unset, dequeue_record: :unset, dequeue_timeout: :unset, dequeue_to: :unset, dequeue_status_callback_url: :unset, call_from: :unset, call_record: :unset, call_timeout: :unset, call_to: :unset, call_url: :unset, call_status_callback_url: :unset, call_accept: :unset, redirect_call_sid: :unset, redirect_accept: :unset, redirect_url: :unset)
|
401
414
|
context.update(
|
402
415
|
reservation_status: reservation_status,
|
403
416
|
worker_activity_sid: worker_activity_sid,
|
@@ -96,18 +96,31 @@ module Twilio
|
|
96
96
|
# @param [Integer] page_number Page Number, this value is simply for client state
|
97
97
|
# @param [Integer] page_size Number of records to return, defaults to 50
|
98
98
|
# @return [Page] Page of WorkerChannelInstance
|
99
|
-
def page(page_token:
|
100
|
-
params = {
|
99
|
+
def page(page_token: :unset, page_number: :unset, page_size: :unset)
|
100
|
+
params = Twilio::Values.of({
|
101
101
|
'PageToken' => page_token,
|
102
102
|
'Page' => page_number,
|
103
103
|
'PageSize' => page_size,
|
104
|
-
}
|
104
|
+
})
|
105
105
|
response = @version.page(
|
106
106
|
'GET',
|
107
107
|
@uri,
|
108
108
|
params
|
109
109
|
)
|
110
|
-
|
110
|
+
WorkerChannelPage.new(@version, response, @solution)
|
111
|
+
end
|
112
|
+
|
113
|
+
##
|
114
|
+
# Retrieve a single page of WorkerChannelInstance records from the API.
|
115
|
+
# Request is executed immediately.
|
116
|
+
# @param [String] target_url API-generated URL for the requested results page
|
117
|
+
# @return [Page] Page of WorkerChannelInstance
|
118
|
+
def get_page(target_url)
|
119
|
+
response = @version.domain.request(
|
120
|
+
'GET',
|
121
|
+
target_url
|
122
|
+
)
|
123
|
+
WorkerChannelPage.new(@version, response, @solution)
|
111
124
|
end
|
112
125
|
|
113
126
|
##
|
@@ -138,7 +151,7 @@ module Twilio
|
|
138
151
|
# @param [Hash] payload Payload response from the API
|
139
152
|
# @return [WorkerChannelInstance] WorkerChannelInstance
|
140
153
|
def get_instance(payload)
|
141
|
-
|
154
|
+
WorkerChannelInstance.new(
|
142
155
|
@version,
|
143
156
|
payload,
|
144
157
|
workspace_sid: @solution[:workspace_sid],
|
@@ -177,7 +190,7 @@ module Twilio
|
|
177
190
|
# Fetch a WorkerChannelInstance
|
178
191
|
# @return [WorkerChannelInstance] Fetched WorkerChannelInstance
|
179
192
|
def fetch
|
180
|
-
params = {}
|
193
|
+
params = Twilio::Values.of({})
|
181
194
|
|
182
195
|
payload = @version.fetch(
|
183
196
|
'GET',
|
@@ -185,7 +198,7 @@ module Twilio
|
|
185
198
|
params,
|
186
199
|
)
|
187
200
|
|
188
|
-
|
201
|
+
WorkerChannelInstance.new(
|
189
202
|
@version,
|
190
203
|
payload,
|
191
204
|
workspace_sid: @solution[:workspace_sid],
|
@@ -199,11 +212,11 @@ module Twilio
|
|
199
212
|
# @param [String] capacity The capacity
|
200
213
|
# @param [Boolean] available The available
|
201
214
|
# @return [WorkerChannelInstance] Updated WorkerChannelInstance
|
202
|
-
def update(capacity:
|
203
|
-
data = {
|
215
|
+
def update(capacity: :unset, available: :unset)
|
216
|
+
data = Twilio::Values.of({
|
204
217
|
'Capacity' => capacity,
|
205
218
|
'Available' => available,
|
206
|
-
}
|
219
|
+
})
|
207
220
|
|
208
221
|
payload = @version.update(
|
209
222
|
'POST',
|
@@ -211,7 +224,7 @@ module Twilio
|
|
211
224
|
data: data,
|
212
225
|
)
|
213
226
|
|
214
|
-
|
227
|
+
WorkerChannelInstance.new(
|
215
228
|
@version,
|
216
229
|
payload,
|
217
230
|
workspace_sid: @solution[:workspace_sid],
|
@@ -352,7 +365,7 @@ module Twilio
|
|
352
365
|
# @param [String] capacity The capacity
|
353
366
|
# @param [Boolean] available The available
|
354
367
|
# @return [WorkerChannelInstance] Updated WorkerChannelInstance
|
355
|
-
def update(capacity:
|
368
|
+
def update(capacity: :unset, available: :unset)
|
356
369
|
context.update(
|
357
370
|
capacity: capacity,
|
358
371
|
available: available,
|