twilio-ruby 5.67.3 → 5.74.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/pr-lint.yml +8 -2
- data/.github/workflows/test-and-deploy.yml +3 -3
- data/CHANGES.md +288 -0
- data/LICENSE +1 -1
- data/Makefile +6 -2
- data/PULL_REQUEST_TEMPLATE.md +1 -1
- data/README.md +2 -2
- data/lib/twilio-ruby/rest/api/v2010/account/address.rb +19 -3
- data/lib/twilio-ruby/rest/api/v2010/account/application.rb +22 -3
- data/lib/twilio-ruby/rest/api/v2010/account/available_phone_number/local.rb +2 -2
- data/lib/twilio-ruby/rest/api/v2010/account/available_phone_number/machine_to_machine.rb +2 -2
- data/lib/twilio-ruby/rest/api/v2010/account/available_phone_number/mobile.rb +2 -2
- data/lib/twilio-ruby/rest/api/v2010/account/available_phone_number/national.rb +2 -2
- data/lib/twilio-ruby/rest/api/v2010/account/available_phone_number/shared_cost.rb +2 -2
- data/lib/twilio-ruby/rest/api/v2010/account/available_phone_number/toll_free.rb +2 -2
- data/lib/twilio-ruby/rest/api/v2010/account/available_phone_number/voip.rb +2 -2
- data/lib/twilio-ruby/rest/api/v2010/account/call/feedback.rb +1 -1
- data/lib/twilio-ruby/rest/api/v2010/account/call/feedback_summary.rb +5 -5
- data/lib/twilio-ruby/rest/api/v2010/account/call/recording.rb +2 -2
- data/lib/twilio-ruby/rest/api/v2010/account/call/user_defined_message.rb +160 -0
- data/lib/twilio-ruby/rest/api/v2010/account/call/user_defined_message_subscription.rb +251 -0
- data/lib/twilio-ruby/rest/api/v2010/account/call.rb +59 -0
- data/lib/twilio-ruby/rest/api/v2010/account/conference/participant.rb +56 -17
- data/lib/twilio-ruby/rest/api/v2010/account/conference/recording.rb +1 -1
- data/lib/twilio-ruby/rest/api/v2010/account/conference.rb +5 -5
- data/lib/twilio-ruby/rest/api/v2010/account/message.rb +17 -1
- data/lib/twilio-ruby/rest/api/v2010/account/queue/member.rb +2 -2
- data/lib/twilio-ruby/rest/api/v2010/account/queue.rb +3 -3
- data/lib/twilio-ruby/rest/api/v2010/account/recording/transcription.rb +1 -1
- data/lib/twilio-ruby/rest/api/v2010/account/recording.rb +1 -1
- data/lib/twilio-ruby/rest/api/v2010/account/sip/ip_access_control_list/ip_address.rb +5 -5
- data/lib/twilio-ruby/rest/api/v2010/account/sip/ip_access_control_list.rb +3 -3
- data/lib/twilio-ruby/rest/api/v2010/account/transcription.rb +1 -1
- data/lib/twilio-ruby/rest/api/v2010/account/usage/record/all_time.rb +1 -1
- data/lib/twilio-ruby/rest/api/v2010/account/usage/record/daily.rb +1 -1
- data/lib/twilio-ruby/rest/api/v2010/account/usage/record/last_month.rb +1 -1
- data/lib/twilio-ruby/rest/api/v2010/account/usage/record/monthly.rb +1 -1
- data/lib/twilio-ruby/rest/api/v2010/account/usage/record/this_month.rb +1 -1
- data/lib/twilio-ruby/rest/api/v2010/account/usage/record/today.rb +1 -1
- data/lib/twilio-ruby/rest/api/v2010/account/usage/record/yearly.rb +1 -1
- data/lib/twilio-ruby/rest/api/v2010/account/usage/record/yesterday.rb +1 -1
- data/lib/twilio-ruby/rest/api/v2010/account/usage/record.rb +1 -1
- data/lib/twilio-ruby/rest/autopilot/v1/assistant/task/task_statistics.rb +2 -2
- data/lib/twilio-ruby/rest/bulkexports/v1/export/day.rb +1 -1
- data/lib/twilio-ruby/rest/chat/v1/service/channel/message.rb +1 -1
- data/lib/twilio-ruby/rest/chat/v1/service/channel.rb +2 -2
- data/lib/twilio-ruby/rest/chat/v1/service/user.rb +1 -1
- data/lib/twilio-ruby/rest/chat/v1/service.rb +2 -2
- data/lib/twilio-ruby/rest/chat/v2/service/channel/message.rb +1 -1
- data/lib/twilio-ruby/rest/chat/v2/service/channel.rb +2 -2
- data/lib/twilio-ruby/rest/chat/v2/service/user.rb +1 -1
- data/lib/twilio-ruby/rest/chat/v2/service.rb +4 -4
- data/lib/twilio-ruby/rest/chat/v3/channel.rb +2 -2
- data/lib/twilio-ruby/rest/client.rb +28 -0
- data/lib/twilio-ruby/rest/content/v1/content/approval_fetch.rb +195 -0
- data/lib/twilio-ruby/rest/content/v1/content.rb +346 -0
- data/lib/twilio-ruby/rest/content/v1/legacy_content.rb +254 -0
- data/lib/twilio-ruby/rest/content/v1.rb +52 -0
- data/lib/twilio-ruby/rest/content.rb +53 -0
- data/lib/twilio-ruby/rest/conversations/v1/conversation/message/delivery_receipt.rb +1 -1
- data/lib/twilio-ruby/rest/conversations/v1/conversation/message.rb +17 -2
- data/lib/twilio-ruby/rest/conversations/v1/service/conversation/message/delivery_receipt.rb +1 -1
- data/lib/twilio-ruby/rest/conversations/v1/service/conversation/message.rb +17 -2
- data/lib/twilio-ruby/rest/events/v1/schema/version.rb +1 -1
- data/lib/twilio-ruby/rest/events/v1/schema.rb +1 -1
- data/lib/twilio-ruby/rest/events/v1/subscription/subscribed_event.rb +1 -1
- data/lib/twilio-ruby/rest/flex_api/v1/assessments.rb +397 -0
- data/lib/twilio-ruby/rest/flex_api/v1/configuration.rb +14 -0
- data/lib/twilio-ruby/rest/flex_api/v1/insights_assessments_comment.rb +314 -0
- data/lib/twilio-ruby/rest/flex_api/v1/insights_questionnaires.rb +394 -0
- data/lib/twilio-ruby/rest/flex_api/v1/insights_questionnaires_category.rb +313 -0
- data/lib/twilio-ruby/rest/flex_api/v1/insights_questionnaires_question.rb +390 -0
- data/lib/twilio-ruby/rest/flex_api/v1/insights_segments.rb +413 -0
- data/lib/twilio-ruby/rest/{preview/trusted_comms/brands_information.rb → flex_api/v1/insights_session.rb} +58 -55
- data/lib/twilio-ruby/rest/flex_api/v1/insights_settings_answersets.rb +144 -0
- data/lib/twilio-ruby/rest/flex_api/v1/insights_settings_comment.rb +130 -0
- data/lib/twilio-ruby/rest/{preview/trusted_comms/cps.rb → flex_api/v1/insights_user_roles.rb} +42 -54
- data/lib/twilio-ruby/rest/flex_api/v1/interaction/interaction_channel.rb +22 -1
- data/lib/twilio-ruby/rest/flex_api/v1.rb +115 -0
- data/lib/twilio-ruby/rest/flex_api/v2/web_channels.rb +133 -0
- data/lib/twilio-ruby/rest/flex_api/v2.rb +35 -0
- data/lib/twilio-ruby/rest/flex_api.rb +83 -0
- data/lib/twilio-ruby/rest/insights/v1/call/annotation.rb +322 -0
- data/lib/twilio-ruby/rest/insights/v1/call/summary.rb +14 -0
- data/lib/twilio-ruby/rest/insights/v1/call.rb +16 -8
- data/lib/twilio-ruby/rest/insights/v1/call_summaries.rb +7 -0
- data/lib/twilio-ruby/rest/insights/v1/room/participant.rb +1 -1
- data/lib/twilio-ruby/rest/insights/v1/room.rb +3 -3
- data/lib/twilio-ruby/rest/insights/v1.rb +0 -16
- data/lib/twilio-ruby/rest/insights.rb +0 -8
- data/lib/twilio-ruby/rest/ip_messaging/v1/service/channel/message.rb +1 -1
- data/lib/twilio-ruby/rest/ip_messaging/v1/service/channel.rb +2 -2
- data/lib/twilio-ruby/rest/ip_messaging/v1/service/user.rb +1 -1
- data/lib/twilio-ruby/rest/ip_messaging/v1/service.rb +2 -2
- data/lib/twilio-ruby/rest/ip_messaging/v2/service/channel/message.rb +1 -1
- data/lib/twilio-ruby/rest/ip_messaging/v2/service/channel.rb +2 -2
- data/lib/twilio-ruby/rest/ip_messaging/v2/service/user.rb +1 -1
- data/lib/twilio-ruby/rest/ip_messaging/v2/service.rb +4 -4
- data/lib/twilio-ruby/rest/lookups/v2/phone_number.rb +94 -12
- data/lib/twilio-ruby/rest/media/v1/media_processor.rb +1 -1
- data/lib/twilio-ruby/rest/media/v1/media_recording.rb +2 -9
- data/lib/twilio-ruby/rest/media/v1/player_streamer.rb +5 -5
- data/lib/twilio-ruby/rest/messaging/v1/domain_cert.rb +257 -0
- data/lib/twilio-ruby/rest/messaging/v1/domain_config.rb +267 -0
- data/lib/twilio-ruby/rest/messaging/v1/service/alpha_sender.rb +2 -2
- data/lib/twilio-ruby/rest/messaging/v1/service/us_app_to_person.rb +98 -3
- data/lib/twilio-ruby/rest/messaging/v1/service.rb +1 -1
- data/lib/twilio-ruby/rest/messaging/v1/tollfree_verification.rb +709 -0
- data/lib/twilio-ruby/rest/messaging/v1.rb +50 -0
- data/lib/twilio-ruby/rest/messaging.rb +26 -0
- data/lib/twilio-ruby/rest/microvisor/v1/account_config.rb +317 -0
- data/lib/twilio-ruby/rest/microvisor/v1/account_secret.rb +310 -0
- data/lib/twilio-ruby/rest/microvisor/v1/app/app_manifest.rb +192 -0
- data/lib/twilio-ruby/rest/microvisor/v1/app.rb +330 -0
- data/lib/twilio-ruby/rest/microvisor/v1/device/device_config.rb +342 -0
- data/lib/twilio-ruby/rest/{preview/bulk_exports/export/day.rb → microvisor/v1/device/device_secret.rb} +125 -84
- data/lib/twilio-ruby/rest/microvisor/v1/device.rb +393 -0
- data/lib/twilio-ruby/rest/microvisor/v1.rb +92 -0
- data/lib/twilio-ruby/rest/microvisor.rb +70 -0
- data/lib/twilio-ruby/rest/notify/v1/service/notification.rb +1 -1
- data/lib/twilio-ruby/rest/oauth/v1/device_code.rb +153 -0
- data/lib/twilio-ruby/rest/oauth/v1/oauth.rb +162 -0
- data/lib/twilio-ruby/rest/oauth/v1/openid_discovery.rb +242 -0
- data/lib/twilio-ruby/rest/oauth/v1/token.rb +157 -0
- data/lib/twilio-ruby/rest/oauth/v1/user_info.rb +193 -0
- data/lib/twilio-ruby/rest/oauth/v1.rb +63 -0
- data/lib/twilio-ruby/rest/oauth.rb +68 -0
- data/lib/twilio-ruby/rest/preview/hosted_numbers/authorization_document/dependent_hosted_number_order.rb +2 -2
- data/lib/twilio-ruby/rest/preview/hosted_numbers/hosted_number_order.rb +2 -2
- data/lib/twilio-ruby/rest/preview/sync/service/sync_list/sync_list_item.rb +1 -1
- data/lib/twilio-ruby/rest/preview/understand/assistant/task/task_statistics.rb +2 -2
- data/lib/twilio-ruby/rest/preview/wireless/rate_plan.rb +1 -1
- data/lib/twilio-ruby/rest/preview.rb +0 -58
- data/lib/twilio-ruby/rest/proxy/v1/service/phone_number.rb +1 -1
- data/lib/twilio-ruby/rest/proxy/v1/service/session/participant.rb +1 -14
- data/lib/twilio-ruby/rest/proxy/v1/service/session.rb +5 -46
- data/lib/twilio-ruby/rest/proxy/v1/service.rb +1 -1
- data/lib/twilio-ruby/rest/routes/v2/phone_number.rb +235 -0
- data/lib/twilio-ruby/rest/routes/v2/sip_domain.rb +231 -0
- data/lib/twilio-ruby/rest/routes/v2/trunk.rb +235 -0
- data/lib/twilio-ruby/rest/routes/v2.rb +76 -0
- data/lib/twilio-ruby/rest/routes.rb +62 -0
- data/lib/twilio-ruby/rest/studio/v1/flow.rb +1 -1
- data/lib/twilio-ruby/rest/studio/v2/flow/flow_revision.rb +1 -1
- data/lib/twilio-ruby/rest/studio/v2/flow.rb +1 -1
- data/lib/twilio-ruby/rest/supersim/v1/esim_profile.rb +21 -1
- data/lib/twilio-ruby/rest/supersim/v1/fleet.rb +17 -7
- data/lib/twilio-ruby/rest/supersim/v1/ip_command.rb +5 -2
- data/lib/twilio-ruby/rest/supersim/v1/settings_update.rb +247 -0
- data/lib/twilio-ruby/rest/supersim/v1/sim/sim_ip_address.rb +195 -0
- data/lib/twilio-ruby/rest/supersim/v1/sim.rb +20 -0
- data/lib/twilio-ruby/rest/supersim/v1/sms_command.rb +3 -3
- data/lib/twilio-ruby/rest/supersim/v1/usage_record.rb +4 -4
- data/lib/twilio-ruby/rest/supersim/v1.rb +7 -0
- data/lib/twilio-ruby/rest/supersim.rb +6 -0
- data/lib/twilio-ruby/rest/sync/v1/service/sync_list/sync_list_item.rb +1 -1
- data/lib/twilio-ruby/rest/sync/v1/service.rb +1 -1
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/event.rb +1 -1
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/task/reservation.rb +18 -5
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/task.rb +3 -3
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/task_queue/task_queue_cumulative_statistics.rb +12 -12
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/task_queue/task_queue_real_time_statistics.rb +5 -5
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/task_queue.rb +10 -4
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/worker/worker_channel.rb +3 -3
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/worker/workers_cumulative_statistics.rb +6 -6
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/worker/workers_real_time_statistics.rb +1 -1
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/worker.rb +9 -3
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/workflow/workflow_cumulative_statistics.rb +13 -13
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/workflow/workflow_real_time_statistics.rb +2 -2
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/workflow.rb +1 -1
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/workspace_cumulative_statistics.rb +13 -13
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/workspace_real_time_statistics.rb +3 -3
- data/lib/twilio-ruby/rest/trunking/v1/trunk/origination_url.rb +2 -2
- data/lib/twilio-ruby/rest/verify/v2/safelist.rb +215 -0
- data/lib/twilio-ruby/rest/verify/v2/service/access_token.rb +1 -9
- data/lib/twilio-ruby/rest/verify/v2/service/entity/challenge/notification.rb +1 -7
- data/lib/twilio-ruby/rest/verify/v2/service/entity/challenge.rb +0 -8
- data/lib/twilio-ruby/rest/verify/v2/service/entity/factor.rb +0 -8
- data/lib/twilio-ruby/rest/verify/v2/service/entity/new_factor.rb +0 -6
- data/lib/twilio-ruby/rest/verify/v2/service/entity.rb +0 -8
- data/lib/twilio-ruby/rest/verify/v2/service/rate_limit/bucket.rb +2 -2
- data/lib/twilio-ruby/rest/verify/v2/service/verification.rb +14 -10
- data/lib/twilio-ruby/rest/verify/v2/service/verification_check.rb +8 -1
- data/lib/twilio-ruby/rest/verify/v2/service/webhook.rb +0 -8
- data/lib/twilio-ruby/rest/verify/v2/service.rb +1 -1
- data/lib/twilio-ruby/rest/verify/v2/template.rb +7 -0
- data/lib/twilio-ruby/rest/verify/v2/verification_attempts_summary.rb +4 -4
- data/lib/twilio-ruby/rest/verify/v2.rb +18 -0
- data/lib/twilio-ruby/rest/verify.rb +8 -0
- data/lib/twilio-ruby/rest/video/v1/composition.rb +3 -3
- data/lib/twilio-ruby/rest/video/v1/recording.rb +2 -2
- data/lib/twilio-ruby/rest/video/v1/room/recording.rb +2 -2
- data/lib/twilio-ruby/rest/video/v1/room/room_participant/room_participant_anonymize.rb +240 -0
- data/lib/twilio-ruby/rest/video/v1/room/room_participant.rb +16 -0
- data/lib/twilio-ruby/rest/video/v1/room.rb +4 -4
- data/lib/twilio-ruby/rest/voice/v1/connection_policy/connection_policy_target.rb +2 -2
- data/lib/twilio-ruby/rest/voice/v1/dialing_permissions/bulk_country_update.rb +1 -1
- data/lib/twilio-ruby/rest/voice/v1/ip_record.rb +1 -1
- data/lib/twilio-ruby/rest/wireless/v1/rate_plan.rb +3 -3
- data/lib/twilio-ruby/rest/wireless/v1/sim/data_session.rb +2 -2
- data/lib/twilio-ruby/security/request_validator.rb +1 -1
- data/lib/twilio-ruby/twiml/voice_response.rb +135 -35
- data/lib/twilio-ruby/version.rb +1 -1
- data/twilio-ruby.gemspec +1 -1
- metadata +52 -17
- data/lib/twilio-ruby/rest/insights/v1/annotation.rb +0 -271
- data/lib/twilio-ruby/rest/preview/bulk_exports/export/export_custom_job.rb +0 -275
- data/lib/twilio-ruby/rest/preview/bulk_exports/export/job.rb +0 -249
- data/lib/twilio-ruby/rest/preview/bulk_exports/export.rb +0 -251
- data/lib/twilio-ruby/rest/preview/bulk_exports/export_configuration.rb +0 -234
- data/lib/twilio-ruby/rest/preview/bulk_exports.rb +0 -62
- data/lib/twilio-ruby/rest/preview/trusted_comms/branded_channel/channel.rb +0 -165
- data/lib/twilio-ruby/rest/preview/trusted_comms/branded_channel.rb +0 -225
- data/lib/twilio-ruby/rest/preview/trusted_comms/current_call.rb +0 -277
- data/lib/twilio-ruby/rest/preview/trusted_comms.rb +0 -65
@@ -0,0 +1,247 @@
|
|
1
|
+
##
|
2
|
+
# This code was generated by
|
3
|
+
# \ / _ _ _| _ _
|
4
|
+
# | (_)\/(_)(_|\/| |(/_ v1.0.0
|
5
|
+
# / /
|
6
|
+
#
|
7
|
+
# frozen_string_literal: true
|
8
|
+
|
9
|
+
module Twilio
|
10
|
+
module REST
|
11
|
+
class Supersim < Domain
|
12
|
+
class V1 < Version
|
13
|
+
##
|
14
|
+
# PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution.
|
15
|
+
class SettingsUpdateList < ListResource
|
16
|
+
##
|
17
|
+
# Initialize the SettingsUpdateList
|
18
|
+
# @param [Version] version Version that contains the resource
|
19
|
+
# @return [SettingsUpdateList] SettingsUpdateList
|
20
|
+
def initialize(version)
|
21
|
+
super(version)
|
22
|
+
|
23
|
+
# Path Solution
|
24
|
+
@solution = {}
|
25
|
+
@uri = "/SettingsUpdates"
|
26
|
+
end
|
27
|
+
|
28
|
+
##
|
29
|
+
# Lists SettingsUpdateInstance records from the API as a list.
|
30
|
+
# Unlike stream(), this operation is eager and will load `limit` records into
|
31
|
+
# memory before returning.
|
32
|
+
# @param [String] sim Filter the Settings Updates by a Super SIM's SID or
|
33
|
+
# UniqueName.
|
34
|
+
# @param [settings_update.Status] status Filter the Settings Updates by status.
|
35
|
+
# Can be `scheduled`, `in-progress`, `successful`, or `failed`.
|
36
|
+
# @param [Integer] limit Upper limit for the number of records to return. stream()
|
37
|
+
# guarantees to never return more than limit. Default is no limit
|
38
|
+
# @param [Integer] page_size Number of records to fetch per request, when
|
39
|
+
# not set will use the default value of 50 records. If no page_size is defined
|
40
|
+
# but a limit is defined, stream() will attempt to read the limit with the most
|
41
|
+
# efficient page size, i.e. min(limit, 1000)
|
42
|
+
# @return [Array] Array of up to limit results
|
43
|
+
def list(sim: :unset, status: :unset, limit: nil, page_size: nil)
|
44
|
+
self.stream(sim: sim, status: status, limit: limit, page_size: page_size).entries
|
45
|
+
end
|
46
|
+
|
47
|
+
##
|
48
|
+
# Streams SettingsUpdateInstance records from the API as an Enumerable.
|
49
|
+
# This operation lazily loads records as efficiently as possible until the limit
|
50
|
+
# is reached.
|
51
|
+
# @param [String] sim Filter the Settings Updates by a Super SIM's SID or
|
52
|
+
# UniqueName.
|
53
|
+
# @param [settings_update.Status] status Filter the Settings Updates by status.
|
54
|
+
# Can be `scheduled`, `in-progress`, `successful`, or `failed`.
|
55
|
+
# @param [Integer] limit Upper limit for the number of records to return. stream()
|
56
|
+
# guarantees to never return more than limit. Default is no limit.
|
57
|
+
# @param [Integer] page_size Number of records to fetch per request, when
|
58
|
+
# not set will use the default value of 50 records. If no page_size is defined
|
59
|
+
# but a limit is defined, stream() will attempt to read the limit with the most
|
60
|
+
# efficient page size, i.e. min(limit, 1000)
|
61
|
+
# @return [Enumerable] Enumerable that will yield up to limit results
|
62
|
+
def stream(sim: :unset, status: :unset, limit: nil, page_size: nil)
|
63
|
+
limits = @version.read_limits(limit, page_size)
|
64
|
+
|
65
|
+
page = self.page(sim: sim, status: status, page_size: limits[:page_size], )
|
66
|
+
|
67
|
+
@version.stream(page, limit: limits[:limit], page_limit: limits[:page_limit])
|
68
|
+
end
|
69
|
+
|
70
|
+
##
|
71
|
+
# When passed a block, yields SettingsUpdateInstance records from the API.
|
72
|
+
# This operation lazily loads records as efficiently as possible until the limit
|
73
|
+
# is reached.
|
74
|
+
def each
|
75
|
+
limits = @version.read_limits
|
76
|
+
|
77
|
+
page = self.page(page_size: limits[:page_size], )
|
78
|
+
|
79
|
+
@version.stream(page,
|
80
|
+
limit: limits[:limit],
|
81
|
+
page_limit: limits[:page_limit]).each {|x| yield x}
|
82
|
+
end
|
83
|
+
|
84
|
+
##
|
85
|
+
# Retrieve a single page of SettingsUpdateInstance records from the API.
|
86
|
+
# Request is executed immediately.
|
87
|
+
# @param [String] sim Filter the Settings Updates by a Super SIM's SID or
|
88
|
+
# UniqueName.
|
89
|
+
# @param [settings_update.Status] status Filter the Settings Updates by status.
|
90
|
+
# Can be `scheduled`, `in-progress`, `successful`, or `failed`.
|
91
|
+
# @param [String] page_token PageToken provided by the API
|
92
|
+
# @param [Integer] page_number Page Number, this value is simply for client state
|
93
|
+
# @param [Integer] page_size Number of records to return, defaults to 50
|
94
|
+
# @return [Page] Page of SettingsUpdateInstance
|
95
|
+
def page(sim: :unset, status: :unset, page_token: :unset, page_number: :unset, page_size: :unset)
|
96
|
+
params = Twilio::Values.of({
|
97
|
+
'Sim' => sim,
|
98
|
+
'Status' => status,
|
99
|
+
'PageToken' => page_token,
|
100
|
+
'Page' => page_number,
|
101
|
+
'PageSize' => page_size,
|
102
|
+
})
|
103
|
+
|
104
|
+
response = @version.page('GET', @uri, params: params)
|
105
|
+
|
106
|
+
SettingsUpdatePage.new(@version, response, @solution)
|
107
|
+
end
|
108
|
+
|
109
|
+
##
|
110
|
+
# Retrieve a single page of SettingsUpdateInstance records from the API.
|
111
|
+
# Request is executed immediately.
|
112
|
+
# @param [String] target_url API-generated URL for the requested results page
|
113
|
+
# @return [Page] Page of SettingsUpdateInstance
|
114
|
+
def get_page(target_url)
|
115
|
+
response = @version.domain.request(
|
116
|
+
'GET',
|
117
|
+
target_url
|
118
|
+
)
|
119
|
+
SettingsUpdatePage.new(@version, response, @solution)
|
120
|
+
end
|
121
|
+
|
122
|
+
##
|
123
|
+
# Provide a user friendly representation
|
124
|
+
def to_s
|
125
|
+
'#<Twilio.Supersim.V1.SettingsUpdateList>'
|
126
|
+
end
|
127
|
+
end
|
128
|
+
|
129
|
+
##
|
130
|
+
# PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution.
|
131
|
+
class SettingsUpdatePage < Page
|
132
|
+
##
|
133
|
+
# Initialize the SettingsUpdatePage
|
134
|
+
# @param [Version] version Version that contains the resource
|
135
|
+
# @param [Response] response Response from the API
|
136
|
+
# @param [Hash] solution Path solution for the resource
|
137
|
+
# @return [SettingsUpdatePage] SettingsUpdatePage
|
138
|
+
def initialize(version, response, solution)
|
139
|
+
super(version, response)
|
140
|
+
|
141
|
+
# Path Solution
|
142
|
+
@solution = solution
|
143
|
+
end
|
144
|
+
|
145
|
+
##
|
146
|
+
# Build an instance of SettingsUpdateInstance
|
147
|
+
# @param [Hash] payload Payload response from the API
|
148
|
+
# @return [SettingsUpdateInstance] SettingsUpdateInstance
|
149
|
+
def get_instance(payload)
|
150
|
+
SettingsUpdateInstance.new(@version, payload, )
|
151
|
+
end
|
152
|
+
|
153
|
+
##
|
154
|
+
# Provide a user friendly representation
|
155
|
+
def to_s
|
156
|
+
'<Twilio.Supersim.V1.SettingsUpdatePage>'
|
157
|
+
end
|
158
|
+
end
|
159
|
+
|
160
|
+
##
|
161
|
+
# PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution.
|
162
|
+
class SettingsUpdateInstance < InstanceResource
|
163
|
+
##
|
164
|
+
# Initialize the SettingsUpdateInstance
|
165
|
+
# @param [Version] version Version that contains the resource
|
166
|
+
# @param [Hash] payload payload that contains response from Twilio
|
167
|
+
# @return [SettingsUpdateInstance] SettingsUpdateInstance
|
168
|
+
def initialize(version, payload)
|
169
|
+
super(version)
|
170
|
+
|
171
|
+
# Marshaled Properties
|
172
|
+
@properties = {
|
173
|
+
'sid' => payload['sid'],
|
174
|
+
'iccid' => payload['iccid'],
|
175
|
+
'sim_sid' => payload['sim_sid'],
|
176
|
+
'status' => payload['status'],
|
177
|
+
'packages' => payload['packages'],
|
178
|
+
'date_completed' => Twilio.deserialize_iso8601_datetime(payload['date_completed']),
|
179
|
+
'date_created' => Twilio.deserialize_iso8601_datetime(payload['date_created']),
|
180
|
+
'date_updated' => Twilio.deserialize_iso8601_datetime(payload['date_updated']),
|
181
|
+
}
|
182
|
+
end
|
183
|
+
|
184
|
+
##
|
185
|
+
# @return [String] The unique identifier of this Settings Update
|
186
|
+
def sid
|
187
|
+
@properties['sid']
|
188
|
+
end
|
189
|
+
|
190
|
+
##
|
191
|
+
# @return [String] The ICCID associated with the SIM
|
192
|
+
def iccid
|
193
|
+
@properties['iccid']
|
194
|
+
end
|
195
|
+
|
196
|
+
##
|
197
|
+
# @return [String] The SID of the Super SIM to which this Settings Update was applied
|
198
|
+
def sim_sid
|
199
|
+
@properties['sim_sid']
|
200
|
+
end
|
201
|
+
|
202
|
+
##
|
203
|
+
# @return [settings_update.Status] The Status of this Settings Update
|
204
|
+
def status
|
205
|
+
@properties['status']
|
206
|
+
end
|
207
|
+
|
208
|
+
##
|
209
|
+
# @return [Array[Hash]] Array containing the different Settings Packages that will be applied to the SIM after the update completes
|
210
|
+
def packages
|
211
|
+
@properties['packages']
|
212
|
+
end
|
213
|
+
|
214
|
+
##
|
215
|
+
# @return [Time] The time when the update successfully completed and the new settings were applied to the SIM
|
216
|
+
def date_completed
|
217
|
+
@properties['date_completed']
|
218
|
+
end
|
219
|
+
|
220
|
+
##
|
221
|
+
# @return [Time] The date this Settings Update was created
|
222
|
+
def date_created
|
223
|
+
@properties['date_created']
|
224
|
+
end
|
225
|
+
|
226
|
+
##
|
227
|
+
# @return [Time] The date this Settings Update was last updated
|
228
|
+
def date_updated
|
229
|
+
@properties['date_updated']
|
230
|
+
end
|
231
|
+
|
232
|
+
##
|
233
|
+
# Provide a user friendly representation
|
234
|
+
def to_s
|
235
|
+
"<Twilio.Supersim.V1.SettingsUpdateInstance>"
|
236
|
+
end
|
237
|
+
|
238
|
+
##
|
239
|
+
# Provide a detailed, user friendly representation
|
240
|
+
def inspect
|
241
|
+
"<Twilio.Supersim.V1.SettingsUpdateInstance>"
|
242
|
+
end
|
243
|
+
end
|
244
|
+
end
|
245
|
+
end
|
246
|
+
end
|
247
|
+
end
|
@@ -0,0 +1,195 @@
|
|
1
|
+
##
|
2
|
+
# This code was generated by
|
3
|
+
# \ / _ _ _| _ _
|
4
|
+
# | (_)\/(_)(_|\/| |(/_ v1.0.0
|
5
|
+
# / /
|
6
|
+
#
|
7
|
+
# frozen_string_literal: true
|
8
|
+
|
9
|
+
module Twilio
|
10
|
+
module REST
|
11
|
+
class Supersim < Domain
|
12
|
+
class V1 < Version
|
13
|
+
class SimContext < InstanceContext
|
14
|
+
##
|
15
|
+
# PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution.
|
16
|
+
class SimIpAddressList < ListResource
|
17
|
+
##
|
18
|
+
# Initialize the SimIpAddressList
|
19
|
+
# @param [Version] version Version that contains the resource
|
20
|
+
# @param [String] sim_sid The unique string that identifies the Sim resource.
|
21
|
+
# @return [SimIpAddressList] SimIpAddressList
|
22
|
+
def initialize(version, sim_sid: nil)
|
23
|
+
super(version)
|
24
|
+
|
25
|
+
# Path Solution
|
26
|
+
@solution = {sim_sid: sim_sid}
|
27
|
+
@uri = "/Sims/#{@solution[:sim_sid]}/IpAddresses"
|
28
|
+
end
|
29
|
+
|
30
|
+
##
|
31
|
+
# Lists SimIpAddressInstance records from the API as a list.
|
32
|
+
# Unlike stream(), this operation is eager and will load `limit` records into
|
33
|
+
# memory before returning.
|
34
|
+
# @param [Integer] limit Upper limit for the number of records to return. stream()
|
35
|
+
# guarantees to never return more than limit. Default is no limit
|
36
|
+
# @param [Integer] page_size Number of records to fetch per request, when
|
37
|
+
# not set will use the default value of 50 records. If no page_size is defined
|
38
|
+
# but a limit is defined, stream() will attempt to read the limit with the most
|
39
|
+
# efficient page size, i.e. min(limit, 1000)
|
40
|
+
# @return [Array] Array of up to limit results
|
41
|
+
def list(limit: nil, page_size: nil)
|
42
|
+
self.stream(limit: limit, page_size: page_size).entries
|
43
|
+
end
|
44
|
+
|
45
|
+
##
|
46
|
+
# Streams SimIpAddressInstance records from the API as an Enumerable.
|
47
|
+
# This operation lazily loads records as efficiently as possible until the limit
|
48
|
+
# is reached.
|
49
|
+
# @param [Integer] limit Upper limit for the number of records to return. stream()
|
50
|
+
# guarantees to never return more than limit. Default is no limit.
|
51
|
+
# @param [Integer] page_size Number of records to fetch per request, when
|
52
|
+
# not set will use the default value of 50 records. If no page_size is defined
|
53
|
+
# but a limit is defined, stream() will attempt to read the limit with the most
|
54
|
+
# efficient page size, i.e. min(limit, 1000)
|
55
|
+
# @return [Enumerable] Enumerable that will yield up to limit results
|
56
|
+
def stream(limit: nil, page_size: nil)
|
57
|
+
limits = @version.read_limits(limit, page_size)
|
58
|
+
|
59
|
+
page = self.page(page_size: limits[:page_size], )
|
60
|
+
|
61
|
+
@version.stream(page, limit: limits[:limit], page_limit: limits[:page_limit])
|
62
|
+
end
|
63
|
+
|
64
|
+
##
|
65
|
+
# When passed a block, yields SimIpAddressInstance records from the API.
|
66
|
+
# This operation lazily loads records as efficiently as possible until the limit
|
67
|
+
# is reached.
|
68
|
+
def each
|
69
|
+
limits = @version.read_limits
|
70
|
+
|
71
|
+
page = self.page(page_size: limits[:page_size], )
|
72
|
+
|
73
|
+
@version.stream(page,
|
74
|
+
limit: limits[:limit],
|
75
|
+
page_limit: limits[:page_limit]).each {|x| yield x}
|
76
|
+
end
|
77
|
+
|
78
|
+
##
|
79
|
+
# Retrieve a single page of SimIpAddressInstance records from the API.
|
80
|
+
# Request is executed immediately.
|
81
|
+
# @param [String] page_token PageToken provided by the API
|
82
|
+
# @param [Integer] page_number Page Number, this value is simply for client state
|
83
|
+
# @param [Integer] page_size Number of records to return, defaults to 50
|
84
|
+
# @return [Page] Page of SimIpAddressInstance
|
85
|
+
def page(page_token: :unset, page_number: :unset, page_size: :unset)
|
86
|
+
params = Twilio::Values.of({
|
87
|
+
'PageToken' => page_token,
|
88
|
+
'Page' => page_number,
|
89
|
+
'PageSize' => page_size,
|
90
|
+
})
|
91
|
+
|
92
|
+
response = @version.page('GET', @uri, params: params)
|
93
|
+
|
94
|
+
SimIpAddressPage.new(@version, response, @solution)
|
95
|
+
end
|
96
|
+
|
97
|
+
##
|
98
|
+
# Retrieve a single page of SimIpAddressInstance records from the API.
|
99
|
+
# Request is executed immediately.
|
100
|
+
# @param [String] target_url API-generated URL for the requested results page
|
101
|
+
# @return [Page] Page of SimIpAddressInstance
|
102
|
+
def get_page(target_url)
|
103
|
+
response = @version.domain.request(
|
104
|
+
'GET',
|
105
|
+
target_url
|
106
|
+
)
|
107
|
+
SimIpAddressPage.new(@version, response, @solution)
|
108
|
+
end
|
109
|
+
|
110
|
+
##
|
111
|
+
# Provide a user friendly representation
|
112
|
+
def to_s
|
113
|
+
'#<Twilio.Supersim.V1.SimIpAddressList>'
|
114
|
+
end
|
115
|
+
end
|
116
|
+
|
117
|
+
##
|
118
|
+
# PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution.
|
119
|
+
class SimIpAddressPage < Page
|
120
|
+
##
|
121
|
+
# Initialize the SimIpAddressPage
|
122
|
+
# @param [Version] version Version that contains the resource
|
123
|
+
# @param [Response] response Response from the API
|
124
|
+
# @param [Hash] solution Path solution for the resource
|
125
|
+
# @return [SimIpAddressPage] SimIpAddressPage
|
126
|
+
def initialize(version, response, solution)
|
127
|
+
super(version, response)
|
128
|
+
|
129
|
+
# Path Solution
|
130
|
+
@solution = solution
|
131
|
+
end
|
132
|
+
|
133
|
+
##
|
134
|
+
# Build an instance of SimIpAddressInstance
|
135
|
+
# @param [Hash] payload Payload response from the API
|
136
|
+
# @return [SimIpAddressInstance] SimIpAddressInstance
|
137
|
+
def get_instance(payload)
|
138
|
+
SimIpAddressInstance.new(@version, payload, sim_sid: @solution[:sim_sid], )
|
139
|
+
end
|
140
|
+
|
141
|
+
##
|
142
|
+
# Provide a user friendly representation
|
143
|
+
def to_s
|
144
|
+
'<Twilio.Supersim.V1.SimIpAddressPage>'
|
145
|
+
end
|
146
|
+
end
|
147
|
+
|
148
|
+
##
|
149
|
+
# PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution.
|
150
|
+
class SimIpAddressInstance < InstanceResource
|
151
|
+
##
|
152
|
+
# Initialize the SimIpAddressInstance
|
153
|
+
# @param [Version] version Version that contains the resource
|
154
|
+
# @param [Hash] payload payload that contains response from Twilio
|
155
|
+
# @param [String] sim_sid The unique string that identifies the Sim resource.
|
156
|
+
# @return [SimIpAddressInstance] SimIpAddressInstance
|
157
|
+
def initialize(version, payload, sim_sid: nil)
|
158
|
+
super(version)
|
159
|
+
|
160
|
+
# Marshaled Properties
|
161
|
+
@properties = {
|
162
|
+
'ip_address' => payload['ip_address'],
|
163
|
+
'ip_address_version' => payload['ip_address_version'],
|
164
|
+
}
|
165
|
+
end
|
166
|
+
|
167
|
+
##
|
168
|
+
# @return [String] IP address assigned to the given Super SIM
|
169
|
+
def ip_address
|
170
|
+
@properties['ip_address']
|
171
|
+
end
|
172
|
+
|
173
|
+
##
|
174
|
+
# @return [sim_ip_address.IpAddressVersion] IP address version
|
175
|
+
def ip_address_version
|
176
|
+
@properties['ip_address_version']
|
177
|
+
end
|
178
|
+
|
179
|
+
##
|
180
|
+
# Provide a user friendly representation
|
181
|
+
def to_s
|
182
|
+
"<Twilio.Supersim.V1.SimIpAddressInstance>"
|
183
|
+
end
|
184
|
+
|
185
|
+
##
|
186
|
+
# Provide a detailed, user friendly representation
|
187
|
+
def inspect
|
188
|
+
"<Twilio.Supersim.V1.SimIpAddressInstance>"
|
189
|
+
end
|
190
|
+
end
|
191
|
+
end
|
192
|
+
end
|
193
|
+
end
|
194
|
+
end
|
195
|
+
end
|
@@ -203,6 +203,7 @@ module Twilio
|
|
203
203
|
|
204
204
|
# Dependents
|
205
205
|
@billing_periods = nil
|
206
|
+
@sim_ip_addresses = nil
|
206
207
|
end
|
207
208
|
|
208
209
|
##
|
@@ -261,6 +262,18 @@ module Twilio
|
|
261
262
|
@billing_periods
|
262
263
|
end
|
263
264
|
|
265
|
+
##
|
266
|
+
# Access the sim_ip_addresses
|
267
|
+
# @return [SimIpAddressList]
|
268
|
+
# @return [SimIpAddressContext]
|
269
|
+
def sim_ip_addresses
|
270
|
+
unless @sim_ip_addresses
|
271
|
+
@sim_ip_addresses = SimIpAddressList.new(@version, sim_sid: @solution[:sid], )
|
272
|
+
end
|
273
|
+
|
274
|
+
@sim_ip_addresses
|
275
|
+
end
|
276
|
+
|
264
277
|
##
|
265
278
|
# Provide a user friendly representation
|
266
279
|
def to_s
|
@@ -423,6 +436,13 @@ module Twilio
|
|
423
436
|
context.billing_periods
|
424
437
|
end
|
425
438
|
|
439
|
+
##
|
440
|
+
# Access the sim_ip_addresses
|
441
|
+
# @return [sim_ip_addresses] sim_ip_addresses
|
442
|
+
def sim_ip_addresses
|
443
|
+
context.sim_ip_addresses
|
444
|
+
end
|
445
|
+
|
426
446
|
##
|
427
447
|
# Provide a user friendly representation
|
428
448
|
def to_s
|
@@ -58,7 +58,7 @@ module Twilio
|
|
58
58
|
# @param [sms_command.Status] status The status of the SMS Command. Can be:
|
59
59
|
# `queued`, `sent`, `delivered`, `received` or `failed`. See the {SMS Command
|
60
60
|
# Status
|
61
|
-
# Values}[https://www.twilio.com/docs/
|
61
|
+
# Values}[https://www.twilio.com/docs/iot/supersim/api/smscommand-resource#status-values]
|
62
62
|
# for a description of each.
|
63
63
|
# @param [sms_command.Direction] direction The direction of the SMS Command. Can
|
64
64
|
# be `to_sim` or `from_sim`. The value of `to_sim` is synonymous with the term
|
@@ -90,7 +90,7 @@ module Twilio
|
|
90
90
|
# @param [sms_command.Status] status The status of the SMS Command. Can be:
|
91
91
|
# `queued`, `sent`, `delivered`, `received` or `failed`. See the {SMS Command
|
92
92
|
# Status
|
93
|
-
# Values}[https://www.twilio.com/docs/
|
93
|
+
# Values}[https://www.twilio.com/docs/iot/supersim/api/smscommand-resource#status-values]
|
94
94
|
# for a description of each.
|
95
95
|
# @param [sms_command.Direction] direction The direction of the SMS Command. Can
|
96
96
|
# be `to_sim` or `from_sim`. The value of `to_sim` is synonymous with the term
|
@@ -133,7 +133,7 @@ module Twilio
|
|
133
133
|
# @param [sms_command.Status] status The status of the SMS Command. Can be:
|
134
134
|
# `queued`, `sent`, `delivered`, `received` or `failed`. See the {SMS Command
|
135
135
|
# Status
|
136
|
-
# Values}[https://www.twilio.com/docs/
|
136
|
+
# Values}[https://www.twilio.com/docs/iot/supersim/api/smscommand-resource#status-values]
|
137
137
|
# for a description of each.
|
138
138
|
# @param [sms_command.Direction] direction The direction of the SMS Command. Can
|
139
139
|
# be `to_sim` or `from_sim`. The value of `to_sim` is synonymous with the term
|
@@ -260,10 +260,10 @@ module Twilio
|
|
260
260
|
'fleet_sid' => payload['fleet_sid'],
|
261
261
|
'iso_country' => payload['iso_country'],
|
262
262
|
'period' => payload['period'],
|
263
|
-
'data_upload' => payload['data_upload'].to_i,
|
264
|
-
'data_download' => payload['data_download'].to_i,
|
265
|
-
'data_total' => payload['data_total'].to_i,
|
266
|
-
'data_total_billed' => payload['data_total_billed'].to_f,
|
263
|
+
'data_upload' => payload['data_upload'] == nil ? payload['data_upload'] : payload['data_upload'].to_i,
|
264
|
+
'data_download' => payload['data_download'] == nil ? payload['data_download'] : payload['data_download'].to_i,
|
265
|
+
'data_total' => payload['data_total'] == nil ? payload['data_total'] : payload['data_total'].to_i,
|
266
|
+
'data_total_billed' => payload['data_total_billed'] == nil ? payload['data_total_billed'] : payload['data_total_billed'].to_f,
|
267
267
|
'billed_unit' => payload['billed_unit'],
|
268
268
|
}
|
269
269
|
end
|
@@ -20,6 +20,7 @@ module Twilio
|
|
20
20
|
@ip_commands = nil
|
21
21
|
@networks = nil
|
22
22
|
@network_access_profiles = nil
|
23
|
+
@settings_updates = nil
|
23
24
|
@sims = nil
|
24
25
|
@sms_commands = nil
|
25
26
|
@usage_records = nil
|
@@ -100,6 +101,12 @@ module Twilio
|
|
100
101
|
end
|
101
102
|
end
|
102
103
|
|
104
|
+
##
|
105
|
+
# @return [Twilio::REST::Supersim::V1::SettingsUpdateContext]
|
106
|
+
def settings_updates
|
107
|
+
@settings_updates ||= SettingsUpdateList.new self
|
108
|
+
end
|
109
|
+
|
103
110
|
##
|
104
111
|
# @param [String] sid The SID of the Sim resource to fetch.
|
105
112
|
# @return [Twilio::REST::Supersim::V1::SimContext] if sid was passed.
|
@@ -73,6 +73,12 @@ module Twilio
|
|
73
73
|
self.v1.network_access_profiles(sid)
|
74
74
|
end
|
75
75
|
|
76
|
+
##
|
77
|
+
# @return [Twilio::REST::Supersim::V1::SettingsUpdateInstance]
|
78
|
+
def settings_updates
|
79
|
+
self.v1.settings_updates()
|
80
|
+
end
|
81
|
+
|
76
82
|
##
|
77
83
|
# @param [String] sid The unique string that identifies the Sim resource.
|
78
84
|
# @return [Twilio::REST::Supersim::V1::SimInstance] if sid was passed.
|
@@ -328,7 +328,7 @@ module Twilio
|
|
328
328
|
|
329
329
|
# Marshaled Properties
|
330
330
|
@properties = {
|
331
|
-
'index' => payload['index'].to_i,
|
331
|
+
'index' => payload['index'] == nil ? payload['index'] : payload['index'].to_i,
|
332
332
|
'account_sid' => payload['account_sid'],
|
333
333
|
'service_sid' => payload['service_sid'],
|
334
334
|
'list_sid' => payload['list_sid'],
|
@@ -372,7 +372,7 @@ module Twilio
|
|
372
372
|
'reachability_webhooks_enabled' => payload['reachability_webhooks_enabled'],
|
373
373
|
'acl_enabled' => payload['acl_enabled'],
|
374
374
|
'reachability_debouncing_enabled' => payload['reachability_debouncing_enabled'],
|
375
|
-
'reachability_debouncing_window' => payload['reachability_debouncing_window'].to_i,
|
375
|
+
'reachability_debouncing_window' => payload['reachability_debouncing_window'] == nil ? payload['reachability_debouncing_window'] : payload['reachability_debouncing_window'].to_i,
|
376
376
|
'links' => payload['links'],
|
377
377
|
}
|
378
378
|
|
@@ -313,7 +313,7 @@ module Twilio
|
|
313
313
|
'description' => payload['description'],
|
314
314
|
'event_data' => payload['event_data'],
|
315
315
|
'event_date' => Twilio.deserialize_iso8601_datetime(payload['event_date']),
|
316
|
-
'event_date_ms' => payload['event_date_ms'].to_i,
|
316
|
+
'event_date_ms' => payload['event_date_ms'] == nil ? payload['event_date_ms'] : payload['event_date_ms'].to_i,
|
317
317
|
'event_type' => payload['event_type'],
|
318
318
|
'resource_sid' => payload['resource_sid'],
|
319
319
|
'resource_type' => payload['resource_type'],
|
@@ -35,6 +35,7 @@ module Twilio
|
|
35
35
|
# @param [reservation.Status] reservation_status Returns the list of reservations
|
36
36
|
# for a task with a specified ReservationStatus. Can be: `pending`, `accepted`,
|
37
37
|
# `rejected`, or `timeout`.
|
38
|
+
# @param [String] worker_sid The SID of the reserved Worker resource to read.
|
38
39
|
# @param [Integer] limit Upper limit for the number of records to return. stream()
|
39
40
|
# guarantees to never return more than limit. Default is no limit
|
40
41
|
# @param [Integer] page_size Number of records to fetch per request, when
|
@@ -42,8 +43,13 @@ module Twilio
|
|
42
43
|
# but a limit is defined, stream() will attempt to read the limit with the most
|
43
44
|
# efficient page size, i.e. min(limit, 1000)
|
44
45
|
# @return [Array] Array of up to limit results
|
45
|
-
def list(reservation_status: :unset, limit: nil, page_size: nil)
|
46
|
-
self.stream(
|
46
|
+
def list(reservation_status: :unset, worker_sid: :unset, limit: nil, page_size: nil)
|
47
|
+
self.stream(
|
48
|
+
reservation_status: reservation_status,
|
49
|
+
worker_sid: worker_sid,
|
50
|
+
limit: limit,
|
51
|
+
page_size: page_size
|
52
|
+
).entries
|
47
53
|
end
|
48
54
|
|
49
55
|
##
|
@@ -53,6 +59,7 @@ module Twilio
|
|
53
59
|
# @param [reservation.Status] reservation_status Returns the list of reservations
|
54
60
|
# for a task with a specified ReservationStatus. Can be: `pending`, `accepted`,
|
55
61
|
# `rejected`, or `timeout`.
|
62
|
+
# @param [String] worker_sid The SID of the reserved Worker resource to read.
|
56
63
|
# @param [Integer] limit Upper limit for the number of records to return. stream()
|
57
64
|
# guarantees to never return more than limit. Default is no limit.
|
58
65
|
# @param [Integer] page_size Number of records to fetch per request, when
|
@@ -60,10 +67,14 @@ module Twilio
|
|
60
67
|
# but a limit is defined, stream() will attempt to read the limit with the most
|
61
68
|
# efficient page size, i.e. min(limit, 1000)
|
62
69
|
# @return [Enumerable] Enumerable that will yield up to limit results
|
63
|
-
def stream(reservation_status: :unset, limit: nil, page_size: nil)
|
70
|
+
def stream(reservation_status: :unset, worker_sid: :unset, limit: nil, page_size: nil)
|
64
71
|
limits = @version.read_limits(limit, page_size)
|
65
72
|
|
66
|
-
page = self.page(
|
73
|
+
page = self.page(
|
74
|
+
reservation_status: reservation_status,
|
75
|
+
worker_sid: worker_sid,
|
76
|
+
page_size: limits[:page_size],
|
77
|
+
)
|
67
78
|
|
68
79
|
@version.stream(page, limit: limits[:limit], page_limit: limits[:page_limit])
|
69
80
|
end
|
@@ -88,13 +99,15 @@ module Twilio
|
|
88
99
|
# @param [reservation.Status] reservation_status Returns the list of reservations
|
89
100
|
# for a task with a specified ReservationStatus. Can be: `pending`, `accepted`,
|
90
101
|
# `rejected`, or `timeout`.
|
102
|
+
# @param [String] worker_sid The SID of the reserved Worker resource to read.
|
91
103
|
# @param [String] page_token PageToken provided by the API
|
92
104
|
# @param [Integer] page_number Page Number, this value is simply for client state
|
93
105
|
# @param [Integer] page_size Number of records to return, defaults to 50
|
94
106
|
# @return [Page] Page of ReservationInstance
|
95
|
-
def page(reservation_status: :unset, page_token: :unset, page_number: :unset, page_size: :unset)
|
107
|
+
def page(reservation_status: :unset, worker_sid: :unset, page_token: :unset, page_number: :unset, page_size: :unset)
|
96
108
|
params = Twilio::Values.of({
|
97
109
|
'ReservationStatus' => reservation_status,
|
110
|
+
'WorkerSid' => worker_sid,
|
98
111
|
'PageToken' => page_token,
|
99
112
|
'Page' => page_number,
|
100
113
|
'PageSize' => page_size,
|