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
@@ -45,7 +45,7 @@ module Twilio
|
|
45
45
|
# but a limit is defined, stream() will attempt to read the
|
46
46
|
# limit with the most efficient page size, i.e. min(limit, 1000)
|
47
47
|
# @return [Array] Array of up to limit results
|
48
|
-
def list(end_date:
|
48
|
+
def list(end_date: :unset, event_type: :unset, minutes: :unset, reservation_sid: :unset, start_date: :unset, task_queue_sid: :unset, task_sid: :unset, worker_sid: :unset, workflow_sid: :unset, limit: nil, page_size: nil)
|
49
49
|
self.stream(
|
50
50
|
end_date: end_date,
|
51
51
|
event_type: event_type,
|
@@ -81,7 +81,7 @@ module Twilio
|
|
81
81
|
# but a limit is defined, stream() will attempt to read the
|
82
82
|
# limit with the most efficient page size, i.e. min(limit, 1000)
|
83
83
|
# @return [Enumerable] Enumerable that will yield up to limit results
|
84
|
-
def stream(end_date:
|
84
|
+
def stream(end_date: :unset, event_type: :unset, minutes: :unset, reservation_sid: :unset, start_date: :unset, task_queue_sid: :unset, task_sid: :unset, worker_sid: :unset, workflow_sid: :unset, limit: nil, page_size: nil)
|
85
85
|
limits = @version.read_limits(limit, page_size)
|
86
86
|
|
87
87
|
page = self.page(
|
@@ -147,8 +147,8 @@ module Twilio
|
|
147
147
|
# @param [Integer] page_number Page Number, this value is simply for client state
|
148
148
|
# @param [Integer] page_size Number of records to return, defaults to 50
|
149
149
|
# @return [Page] Page of EventInstance
|
150
|
-
def page(end_date:
|
151
|
-
params = {
|
150
|
+
def page(end_date: :unset, event_type: :unset, minutes: :unset, reservation_sid: :unset, start_date: :unset, task_queue_sid: :unset, task_sid: :unset, worker_sid: :unset, workflow_sid: :unset, page_token: :unset, page_number: :unset, page_size: :unset)
|
151
|
+
params = Twilio::Values.of({
|
152
152
|
'EndDate' => Twilio.serialize_iso8601(end_date),
|
153
153
|
'EventType' => event_type,
|
154
154
|
'Minutes' => minutes,
|
@@ -161,13 +161,26 @@ module Twilio
|
|
161
161
|
'PageToken' => page_token,
|
162
162
|
'Page' => page_number,
|
163
163
|
'PageSize' => page_size,
|
164
|
-
}
|
164
|
+
})
|
165
165
|
response = @version.page(
|
166
166
|
'GET',
|
167
167
|
@uri,
|
168
168
|
params
|
169
169
|
)
|
170
|
-
|
170
|
+
EventPage.new(@version, response, @solution)
|
171
|
+
end
|
172
|
+
|
173
|
+
##
|
174
|
+
# Retrieve a single page of EventInstance records from the API.
|
175
|
+
# Request is executed immediately.
|
176
|
+
# @param [String] target_url API-generated URL for the requested results page
|
177
|
+
# @return [Page] Page of EventInstance
|
178
|
+
def get_page(target_url)
|
179
|
+
response = @version.domain.request(
|
180
|
+
'GET',
|
181
|
+
target_url
|
182
|
+
)
|
183
|
+
EventPage.new(@version, response, @solution)
|
171
184
|
end
|
172
185
|
|
173
186
|
##
|
@@ -197,7 +210,7 @@ module Twilio
|
|
197
210
|
# @param [Hash] payload Payload response from the API
|
198
211
|
# @return [EventInstance] EventInstance
|
199
212
|
def get_instance(payload)
|
200
|
-
|
213
|
+
EventInstance.new(
|
201
214
|
@version,
|
202
215
|
payload,
|
203
216
|
workspace_sid: @solution[:workspace_sid],
|
@@ -233,7 +246,7 @@ module Twilio
|
|
233
246
|
# Fetch a EventInstance
|
234
247
|
# @return [EventInstance] Fetched EventInstance
|
235
248
|
def fetch
|
236
|
-
params = {}
|
249
|
+
params = Twilio::Values.of({})
|
237
250
|
|
238
251
|
payload = @version.fetch(
|
239
252
|
'GET',
|
@@ -241,7 +254,7 @@ module Twilio
|
|
241
254
|
params,
|
242
255
|
)
|
243
256
|
|
244
|
-
|
257
|
+
EventInstance.new(
|
245
258
|
@version,
|
246
259
|
payload,
|
247
260
|
workspace_sid: @solution[:workspace_sid],
|
@@ -45,7 +45,7 @@ module Twilio
|
|
45
45
|
# but a limit is defined, stream() will attempt to read the
|
46
46
|
# limit with the most efficient page size, i.e. min(limit, 1000)
|
47
47
|
# @return [Array] Array of up to limit results
|
48
|
-
def list(priority:
|
48
|
+
def list(priority: :unset, assignment_status: :unset, workflow_sid: :unset, workflow_name: :unset, task_queue_sid: :unset, task_queue_name: :unset, evaluate_task_attributes: :unset, ordering: :unset, has_addons: :unset, limit: nil, page_size: nil)
|
49
49
|
self.stream(
|
50
50
|
priority: priority,
|
51
51
|
assignment_status: assignment_status,
|
@@ -81,7 +81,7 @@ module Twilio
|
|
81
81
|
# but a limit is defined, stream() will attempt to read the
|
82
82
|
# limit with the most efficient page size, i.e. min(limit, 1000)
|
83
83
|
# @return [Enumerable] Enumerable that will yield up to limit results
|
84
|
-
def stream(priority:
|
84
|
+
def stream(priority: :unset, assignment_status: :unset, workflow_sid: :unset, workflow_name: :unset, task_queue_sid: :unset, task_queue_name: :unset, evaluate_task_attributes: :unset, ordering: :unset, has_addons: :unset, limit: nil, page_size: nil)
|
85
85
|
limits = @version.read_limits(limit, page_size)
|
86
86
|
|
87
87
|
page = self.page(
|
@@ -147,8 +147,8 @@ module Twilio
|
|
147
147
|
# @param [Integer] page_number Page Number, this value is simply for client state
|
148
148
|
# @param [Integer] page_size Number of records to return, defaults to 50
|
149
149
|
# @return [Page] Page of TaskInstance
|
150
|
-
def page(priority:
|
151
|
-
params = {
|
150
|
+
def page(priority: :unset, assignment_status: :unset, workflow_sid: :unset, workflow_name: :unset, task_queue_sid: :unset, task_queue_name: :unset, evaluate_task_attributes: :unset, ordering: :unset, has_addons: :unset, page_token: :unset, page_number: :unset, page_size: :unset)
|
151
|
+
params = Twilio::Values.of({
|
152
152
|
'Priority' => priority,
|
153
153
|
'AssignmentStatus' => assignment_status,
|
154
154
|
'WorkflowSid' => workflow_sid,
|
@@ -161,13 +161,26 @@ module Twilio
|
|
161
161
|
'PageToken' => page_token,
|
162
162
|
'Page' => page_number,
|
163
163
|
'PageSize' => page_size,
|
164
|
-
}
|
164
|
+
})
|
165
165
|
response = @version.page(
|
166
166
|
'GET',
|
167
167
|
@uri,
|
168
168
|
params
|
169
169
|
)
|
170
|
-
|
170
|
+
TaskPage.new(@version, response, @solution)
|
171
|
+
end
|
172
|
+
|
173
|
+
##
|
174
|
+
# Retrieve a single page of TaskInstance records from the API.
|
175
|
+
# Request is executed immediately.
|
176
|
+
# @param [String] target_url API-generated URL for the requested results page
|
177
|
+
# @return [Page] Page of TaskInstance
|
178
|
+
def get_page(target_url)
|
179
|
+
response = @version.domain.request(
|
180
|
+
'GET',
|
181
|
+
target_url
|
182
|
+
)
|
183
|
+
TaskPage.new(@version, response, @solution)
|
171
184
|
end
|
172
185
|
|
173
186
|
##
|
@@ -179,14 +192,14 @@ module Twilio
|
|
179
192
|
# @param [String] workflow_sid The workflow_sid
|
180
193
|
# @param [String] attributes The attributes
|
181
194
|
# @return [TaskInstance] Newly created TaskInstance
|
182
|
-
def create(timeout:
|
183
|
-
data = {
|
195
|
+
def create(timeout: :unset, priority: :unset, task_channel: :unset, workflow_sid: :unset, attributes: :unset)
|
196
|
+
data = Twilio::Values.of({
|
184
197
|
'Timeout' => timeout,
|
185
198
|
'Priority' => priority,
|
186
199
|
'TaskChannel' => task_channel,
|
187
200
|
'WorkflowSid' => workflow_sid,
|
188
201
|
'Attributes' => attributes,
|
189
|
-
}
|
202
|
+
})
|
190
203
|
|
191
204
|
payload = @version.create(
|
192
205
|
'POST',
|
@@ -194,7 +207,7 @@ module Twilio
|
|
194
207
|
data: data
|
195
208
|
)
|
196
209
|
|
197
|
-
|
210
|
+
TaskInstance.new(
|
198
211
|
@version,
|
199
212
|
payload,
|
200
213
|
workspace_sid: @solution[:workspace_sid],
|
@@ -228,7 +241,7 @@ module Twilio
|
|
228
241
|
# @param [Hash] payload Payload response from the API
|
229
242
|
# @return [TaskInstance] TaskInstance
|
230
243
|
def get_instance(payload)
|
231
|
-
|
244
|
+
TaskInstance.new(
|
232
245
|
@version,
|
233
246
|
payload,
|
234
247
|
workspace_sid: @solution[:workspace_sid],
|
@@ -267,7 +280,7 @@ module Twilio
|
|
267
280
|
# Fetch a TaskInstance
|
268
281
|
# @return [TaskInstance] Fetched TaskInstance
|
269
282
|
def fetch
|
270
|
-
params = {}
|
283
|
+
params = Twilio::Values.of({})
|
271
284
|
|
272
285
|
payload = @version.fetch(
|
273
286
|
'GET',
|
@@ -275,7 +288,7 @@ module Twilio
|
|
275
288
|
params,
|
276
289
|
)
|
277
290
|
|
278
|
-
|
291
|
+
TaskInstance.new(
|
279
292
|
@version,
|
280
293
|
payload,
|
281
294
|
workspace_sid: @solution[:workspace_sid],
|
@@ -291,14 +304,14 @@ module Twilio
|
|
291
304
|
# @param [String] priority The priority
|
292
305
|
# @param [String] task_channel The task_channel
|
293
306
|
# @return [TaskInstance] Updated TaskInstance
|
294
|
-
def update(attributes:
|
295
|
-
data = {
|
307
|
+
def update(attributes: :unset, assignment_status: :unset, reason: :unset, priority: :unset, task_channel: :unset)
|
308
|
+
data = Twilio::Values.of({
|
296
309
|
'Attributes' => attributes,
|
297
310
|
'AssignmentStatus' => assignment_status,
|
298
311
|
'Reason' => reason,
|
299
312
|
'Priority' => priority,
|
300
313
|
'TaskChannel' => task_channel,
|
301
|
-
}
|
314
|
+
})
|
302
315
|
|
303
316
|
payload = @version.update(
|
304
317
|
'POST',
|
@@ -306,7 +319,7 @@ module Twilio
|
|
306
319
|
data: data,
|
307
320
|
)
|
308
321
|
|
309
|
-
|
322
|
+
TaskInstance.new(
|
310
323
|
@version,
|
311
324
|
payload,
|
312
325
|
workspace_sid: @solution[:workspace_sid],
|
@@ -318,7 +331,7 @@ module Twilio
|
|
318
331
|
# Deletes the TaskInstance
|
319
332
|
# @return [Boolean] true if delete succeeds, true otherwise
|
320
333
|
def delete
|
321
|
-
|
334
|
+
@version.delete('delete', @uri)
|
322
335
|
end
|
323
336
|
|
324
337
|
##
|
@@ -507,7 +520,7 @@ module Twilio
|
|
507
520
|
# @param [String] priority The priority
|
508
521
|
# @param [String] task_channel The task_channel
|
509
522
|
# @return [TaskInstance] Updated TaskInstance
|
510
|
-
def update(attributes:
|
523
|
+
def update(attributes: :unset, assignment_status: :unset, reason: :unset, priority: :unset, task_channel: :unset)
|
511
524
|
context.update(
|
512
525
|
attributes: attributes,
|
513
526
|
assignment_status: assignment_status,
|
@@ -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,
|
@@ -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 TaskChannelInstance
|
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
|
+
TaskChannelPage.new(@version, response, @solution)
|
108
|
+
end
|
109
|
+
|
110
|
+
##
|
111
|
+
# Retrieve a single page of TaskChannelInstance 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 TaskChannelInstance
|
115
|
+
def get_page(target_url)
|
116
|
+
response = @version.domain.request(
|
117
|
+
'GET',
|
118
|
+
target_url
|
119
|
+
)
|
120
|
+
TaskChannelPage.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 [TaskChannelInstance] TaskChannelInstance
|
136
149
|
def get_instance(payload)
|
137
|
-
|
150
|
+
TaskChannelInstance.new(
|
138
151
|
@version,
|
139
152
|
payload,
|
140
153
|
workspace_sid: @solution[:workspace_sid],
|
@@ -170,7 +183,7 @@ module Twilio
|
|
170
183
|
# Fetch a TaskChannelInstance
|
171
184
|
# @return [TaskChannelInstance] Fetched TaskChannelInstance
|
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
|
+
TaskChannelInstance.new(
|
182
195
|
@version,
|
183
196
|
payload,
|
184
197
|
workspace_sid: @solution[:workspace_sid],
|
@@ -39,7 +39,7 @@ module Twilio
|
|
39
39
|
# but a limit is defined, stream() will attempt to read the
|
40
40
|
# limit with the most efficient page size, i.e. min(limit, 1000)
|
41
41
|
# @return [Array] Array of up to limit results
|
42
|
-
def list(friendly_name:
|
42
|
+
def list(friendly_name: :unset, evaluate_worker_attributes: :unset, worker_sid: :unset, limit: nil, page_size: nil)
|
43
43
|
self.stream(
|
44
44
|
friendly_name: friendly_name,
|
45
45
|
evaluate_worker_attributes: evaluate_worker_attributes,
|
@@ -63,7 +63,7 @@ module Twilio
|
|
63
63
|
# but a limit is defined, stream() will attempt to read the
|
64
64
|
# limit with the most efficient page size, i.e. min(limit, 1000)
|
65
65
|
# @return [Enumerable] Enumerable that will yield up to limit results
|
66
|
-
def stream(friendly_name:
|
66
|
+
def stream(friendly_name: :unset, evaluate_worker_attributes: :unset, worker_sid: :unset, limit: nil, page_size: nil)
|
67
67
|
limits = @version.read_limits(limit, page_size)
|
68
68
|
|
69
69
|
page = self.page(
|
@@ -111,21 +111,34 @@ module Twilio
|
|
111
111
|
# @param [Integer] page_number Page Number, this value is simply for client state
|
112
112
|
# @param [Integer] page_size Number of records to return, defaults to 50
|
113
113
|
# @return [Page] Page of TaskQueueInstance
|
114
|
-
def page(friendly_name:
|
115
|
-
params = {
|
114
|
+
def page(friendly_name: :unset, evaluate_worker_attributes: :unset, worker_sid: :unset, page_token: :unset, page_number: :unset, page_size: :unset)
|
115
|
+
params = Twilio::Values.of({
|
116
116
|
'FriendlyName' => friendly_name,
|
117
117
|
'EvaluateWorkerAttributes' => evaluate_worker_attributes,
|
118
118
|
'WorkerSid' => worker_sid,
|
119
119
|
'PageToken' => page_token,
|
120
120
|
'Page' => page_number,
|
121
121
|
'PageSize' => page_size,
|
122
|
-
}
|
122
|
+
})
|
123
123
|
response = @version.page(
|
124
124
|
'GET',
|
125
125
|
@uri,
|
126
126
|
params
|
127
127
|
)
|
128
|
-
|
128
|
+
TaskQueuePage.new(@version, response, @solution)
|
129
|
+
end
|
130
|
+
|
131
|
+
##
|
132
|
+
# Retrieve a single page of TaskQueueInstance records from the API.
|
133
|
+
# Request is executed immediately.
|
134
|
+
# @param [String] target_url API-generated URL for the requested results page
|
135
|
+
# @return [Page] Page of TaskQueueInstance
|
136
|
+
def get_page(target_url)
|
137
|
+
response = @version.domain.request(
|
138
|
+
'GET',
|
139
|
+
target_url
|
140
|
+
)
|
141
|
+
TaskQueuePage.new(@version, response, @solution)
|
129
142
|
end
|
130
143
|
|
131
144
|
##
|
@@ -138,15 +151,15 @@ module Twilio
|
|
138
151
|
# @param [String] max_reserved_workers The max_reserved_workers
|
139
152
|
# @param [task_queue.TaskOrder] task_order The task_order
|
140
153
|
# @return [TaskQueueInstance] Newly created TaskQueueInstance
|
141
|
-
def create(friendly_name: nil, reservation_activity_sid: nil, assignment_activity_sid: nil, target_workers:
|
142
|
-
data = {
|
154
|
+
def create(friendly_name: nil, reservation_activity_sid: nil, assignment_activity_sid: nil, target_workers: :unset, max_reserved_workers: :unset, task_order: :unset)
|
155
|
+
data = Twilio::Values.of({
|
143
156
|
'FriendlyName' => friendly_name,
|
144
157
|
'ReservationActivitySid' => reservation_activity_sid,
|
145
158
|
'AssignmentActivitySid' => assignment_activity_sid,
|
146
159
|
'TargetWorkers' => target_workers,
|
147
160
|
'MaxReservedWorkers' => max_reserved_workers,
|
148
161
|
'TaskOrder' => task_order,
|
149
|
-
}
|
162
|
+
})
|
150
163
|
|
151
164
|
payload = @version.create(
|
152
165
|
'POST',
|
@@ -154,7 +167,7 @@ module Twilio
|
|
154
167
|
data: data
|
155
168
|
)
|
156
169
|
|
157
|
-
|
170
|
+
TaskQueueInstance.new(
|
158
171
|
@version,
|
159
172
|
payload,
|
160
173
|
workspace_sid: @solution[:workspace_sid],
|
@@ -188,7 +201,7 @@ module Twilio
|
|
188
201
|
# @param [Hash] payload Payload response from the API
|
189
202
|
# @return [TaskQueueInstance] TaskQueueInstance
|
190
203
|
def get_instance(payload)
|
191
|
-
|
204
|
+
TaskQueueInstance.new(
|
192
205
|
@version,
|
193
206
|
payload,
|
194
207
|
workspace_sid: @solution[:workspace_sid],
|
@@ -228,7 +241,7 @@ module Twilio
|
|
228
241
|
# Fetch a TaskQueueInstance
|
229
242
|
# @return [TaskQueueInstance] Fetched TaskQueueInstance
|
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
|
+
TaskQueueInstance.new(
|
240
253
|
@version,
|
241
254
|
payload,
|
242
255
|
workspace_sid: @solution[:workspace_sid],
|
@@ -253,15 +266,15 @@ module Twilio
|
|
253
266
|
# @param [String] max_reserved_workers The max_reserved_workers
|
254
267
|
# @param [task_queue.TaskOrder] task_order The task_order
|
255
268
|
# @return [TaskQueueInstance] Updated TaskQueueInstance
|
256
|
-
def update(friendly_name:
|
257
|
-
data = {
|
269
|
+
def update(friendly_name: :unset, target_workers: :unset, reservation_activity_sid: :unset, assignment_activity_sid: :unset, max_reserved_workers: :unset, task_order: :unset)
|
270
|
+
data = Twilio::Values.of({
|
258
271
|
'FriendlyName' => friendly_name,
|
259
272
|
'TargetWorkers' => target_workers,
|
260
273
|
'ReservationActivitySid' => reservation_activity_sid,
|
261
274
|
'AssignmentActivitySid' => assignment_activity_sid,
|
262
275
|
'MaxReservedWorkers' => max_reserved_workers,
|
263
276
|
'TaskOrder' => task_order,
|
264
|
-
}
|
277
|
+
})
|
265
278
|
|
266
279
|
payload = @version.update(
|
267
280
|
'POST',
|
@@ -269,7 +282,7 @@ module Twilio
|
|
269
282
|
data: data,
|
270
283
|
)
|
271
284
|
|
272
|
-
|
285
|
+
TaskQueueInstance.new(
|
273
286
|
@version,
|
274
287
|
payload,
|
275
288
|
workspace_sid: @solution[:workspace_sid],
|
@@ -281,7 +294,7 @@ module Twilio
|
|
281
294
|
# Deletes the TaskQueueInstance
|
282
295
|
# @return [Boolean] true if delete succeeds, true otherwise
|
283
296
|
def delete
|
284
|
-
|
297
|
+
@version.delete('delete', @uri)
|
285
298
|
end
|
286
299
|
|
287
300
|
##
|
@@ -302,7 +315,7 @@ module Twilio
|
|
302
315
|
# Access the task_queue_statistics
|
303
316
|
# @return [TaskQueueStatisticsList] TaskQueueStatisticsList
|
304
317
|
def task_queue_statistics
|
305
|
-
|
318
|
+
TaskQueueStatisticsContext.new(
|
306
319
|
@version,
|
307
320
|
@solution[:workspace_sid],
|
308
321
|
@solution[:sid],
|
@@ -447,7 +460,7 @@ module Twilio
|
|
447
460
|
# @param [String] max_reserved_workers The max_reserved_workers
|
448
461
|
# @param [task_queue.TaskOrder] task_order The task_order
|
449
462
|
# @return [TaskQueueInstance] Updated TaskQueueInstance
|
450
|
-
def update(friendly_name:
|
463
|
+
def update(friendly_name: :unset, target_workers: :unset, reservation_activity_sid: :unset, assignment_activity_sid: :unset, max_reserved_workers: :unset, task_order: :unset)
|
451
464
|
context.update(
|
452
465
|
friendly_name: friendly_name,
|
453
466
|
target_workers: target_workers,
|