twilio-ruby 5.67.3 → 5.74.5
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/.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
@@ -8,28 +8,28 @@
|
|
8
8
|
|
9
9
|
module Twilio
|
10
10
|
module REST
|
11
|
-
class
|
12
|
-
class
|
13
|
-
class
|
11
|
+
class Microvisor < Domain
|
12
|
+
class V1 < Version
|
13
|
+
class DeviceContext < InstanceContext
|
14
14
|
##
|
15
15
|
# PLEASE NOTE that this class contains preview products that are subject to change. Use them with caution. If you currently do not have developer preview access, please contact help@twilio.com.
|
16
|
-
class
|
16
|
+
class DeviceSecretList < ListResource
|
17
17
|
##
|
18
|
-
# Initialize the
|
18
|
+
# Initialize the DeviceSecretList
|
19
19
|
# @param [Version] version Version that contains the resource
|
20
|
-
# @param [String]
|
21
|
-
#
|
22
|
-
# @return [
|
23
|
-
def initialize(version,
|
20
|
+
# @param [String] device_sid A 34-character string that uniquely identifies the
|
21
|
+
# parent Device.
|
22
|
+
# @return [DeviceSecretList] DeviceSecretList
|
23
|
+
def initialize(version, device_sid: nil)
|
24
24
|
super(version)
|
25
25
|
|
26
26
|
# Path Solution
|
27
|
-
@solution = {
|
28
|
-
@uri = "/
|
27
|
+
@solution = {device_sid: device_sid}
|
28
|
+
@uri = "/Devices/#{@solution[:device_sid]}/Secrets"
|
29
29
|
end
|
30
30
|
|
31
31
|
##
|
32
|
-
# Lists
|
32
|
+
# Lists DeviceSecretInstance records from the API as a list.
|
33
33
|
# Unlike stream(), this operation is eager and will load `limit` records into
|
34
34
|
# memory before returning.
|
35
35
|
# @param [Integer] limit Upper limit for the number of records to return. stream()
|
@@ -44,7 +44,7 @@ module Twilio
|
|
44
44
|
end
|
45
45
|
|
46
46
|
##
|
47
|
-
# Streams
|
47
|
+
# Streams DeviceSecretInstance records from the API as an Enumerable.
|
48
48
|
# This operation lazily loads records as efficiently as possible until the limit
|
49
49
|
# is reached.
|
50
50
|
# @param [Integer] limit Upper limit for the number of records to return. stream()
|
@@ -63,7 +63,7 @@ module Twilio
|
|
63
63
|
end
|
64
64
|
|
65
65
|
##
|
66
|
-
# When passed a block, yields
|
66
|
+
# When passed a block, yields DeviceSecretInstance records from the API.
|
67
67
|
# This operation lazily loads records as efficiently as possible until the limit
|
68
68
|
# is reached.
|
69
69
|
def each
|
@@ -77,12 +77,12 @@ module Twilio
|
|
77
77
|
end
|
78
78
|
|
79
79
|
##
|
80
|
-
# Retrieve a single page of
|
80
|
+
# Retrieve a single page of DeviceSecretInstance records from the API.
|
81
81
|
# Request is executed immediately.
|
82
82
|
# @param [String] page_token PageToken provided by the API
|
83
83
|
# @param [Integer] page_number Page Number, this value is simply for client state
|
84
84
|
# @param [Integer] page_size Number of records to return, defaults to 50
|
85
|
-
# @return [Page] Page of
|
85
|
+
# @return [Page] Page of DeviceSecretInstance
|
86
86
|
def page(page_token: :unset, page_number: :unset, page_size: :unset)
|
87
87
|
params = Twilio::Values.of({
|
88
88
|
'PageToken' => page_token,
|
@@ -92,38 +92,51 @@ module Twilio
|
|
92
92
|
|
93
93
|
response = @version.page('GET', @uri, params: params)
|
94
94
|
|
95
|
-
|
95
|
+
DeviceSecretPage.new(@version, response, @solution)
|
96
96
|
end
|
97
97
|
|
98
98
|
##
|
99
|
-
# Retrieve a single page of
|
99
|
+
# Retrieve a single page of DeviceSecretInstance records from the API.
|
100
100
|
# Request is executed immediately.
|
101
101
|
# @param [String] target_url API-generated URL for the requested results page
|
102
|
-
# @return [Page] Page of
|
102
|
+
# @return [Page] Page of DeviceSecretInstance
|
103
103
|
def get_page(target_url)
|
104
104
|
response = @version.domain.request(
|
105
105
|
'GET',
|
106
106
|
target_url
|
107
107
|
)
|
108
|
-
|
108
|
+
DeviceSecretPage.new(@version, response, @solution)
|
109
|
+
end
|
110
|
+
|
111
|
+
##
|
112
|
+
# Create the DeviceSecretInstance
|
113
|
+
# @param [String] key The secret key; up to 100 characters.
|
114
|
+
# @param [String] value The secret value; up to 4096 characters.
|
115
|
+
# @return [DeviceSecretInstance] Created DeviceSecretInstance
|
116
|
+
def create(key: nil, value: nil)
|
117
|
+
data = Twilio::Values.of({'Key' => key, 'Value' => value, })
|
118
|
+
|
119
|
+
payload = @version.create('POST', @uri, data: data)
|
120
|
+
|
121
|
+
DeviceSecretInstance.new(@version, payload, device_sid: @solution[:device_sid], )
|
109
122
|
end
|
110
123
|
|
111
124
|
##
|
112
125
|
# Provide a user friendly representation
|
113
126
|
def to_s
|
114
|
-
'#<Twilio.
|
127
|
+
'#<Twilio.Microvisor.V1.DeviceSecretList>'
|
115
128
|
end
|
116
129
|
end
|
117
130
|
|
118
131
|
##
|
119
132
|
# PLEASE NOTE that this class contains preview products that are subject to change. Use them with caution. If you currently do not have developer preview access, please contact help@twilio.com.
|
120
|
-
class
|
133
|
+
class DeviceSecretPage < Page
|
121
134
|
##
|
122
|
-
# Initialize the
|
135
|
+
# Initialize the DeviceSecretPage
|
123
136
|
# @param [Version] version Version that contains the resource
|
124
137
|
# @param [Response] response Response from the API
|
125
138
|
# @param [Hash] solution Path solution for the resource
|
126
|
-
# @return [
|
139
|
+
# @return [DeviceSecretPage] DeviceSecretPage
|
127
140
|
def initialize(version, response, solution)
|
128
141
|
super(version, response)
|
129
142
|
|
@@ -132,159 +145,187 @@ module Twilio
|
|
132
145
|
end
|
133
146
|
|
134
147
|
##
|
135
|
-
# Build an instance of
|
148
|
+
# Build an instance of DeviceSecretInstance
|
136
149
|
# @param [Hash] payload Payload response from the API
|
137
|
-
# @return [
|
150
|
+
# @return [DeviceSecretInstance] DeviceSecretInstance
|
138
151
|
def get_instance(payload)
|
139
|
-
|
152
|
+
DeviceSecretInstance.new(@version, payload, device_sid: @solution[:device_sid], )
|
140
153
|
end
|
141
154
|
|
142
155
|
##
|
143
156
|
# Provide a user friendly representation
|
144
157
|
def to_s
|
145
|
-
'<Twilio.
|
158
|
+
'<Twilio.Microvisor.V1.DeviceSecretPage>'
|
146
159
|
end
|
147
160
|
end
|
148
161
|
|
149
162
|
##
|
150
163
|
# PLEASE NOTE that this class contains preview products that are subject to change. Use them with caution. If you currently do not have developer preview access, please contact help@twilio.com.
|
151
|
-
class
|
164
|
+
class DeviceSecretContext < InstanceContext
|
152
165
|
##
|
153
|
-
# Initialize the
|
166
|
+
# Initialize the DeviceSecretContext
|
154
167
|
# @param [Version] version Version that contains the resource
|
155
|
-
# @param [String]
|
156
|
-
#
|
157
|
-
# @param [String]
|
158
|
-
#
|
159
|
-
|
160
|
-
def initialize(version, resource_type, day)
|
168
|
+
# @param [String] device_sid A 34-character string that uniquely identifies the
|
169
|
+
# Device.
|
170
|
+
# @param [String] key The secret key; up to 100 characters.
|
171
|
+
# @return [DeviceSecretContext] DeviceSecretContext
|
172
|
+
def initialize(version, device_sid, key)
|
161
173
|
super(version)
|
162
174
|
|
163
175
|
# Path Solution
|
164
|
-
@solution = {
|
165
|
-
@uri = "/
|
176
|
+
@solution = {device_sid: device_sid, key: key, }
|
177
|
+
@uri = "/Devices/#{@solution[:device_sid]}/Secrets/#{@solution[:key]}"
|
166
178
|
end
|
167
179
|
|
168
180
|
##
|
169
|
-
# Fetch the
|
170
|
-
# @return [
|
181
|
+
# Fetch the DeviceSecretInstance
|
182
|
+
# @return [DeviceSecretInstance] Fetched DeviceSecretInstance
|
171
183
|
def fetch
|
172
184
|
payload = @version.fetch('GET', @uri)
|
173
185
|
|
174
|
-
|
186
|
+
DeviceSecretInstance.new(
|
187
|
+
@version,
|
188
|
+
payload,
|
189
|
+
device_sid: @solution[:device_sid],
|
190
|
+
key: @solution[:key],
|
191
|
+
)
|
192
|
+
end
|
193
|
+
|
194
|
+
##
|
195
|
+
# Update the DeviceSecretInstance
|
196
|
+
# @param [String] value The secret value; up to 4096 characters.
|
197
|
+
# @return [DeviceSecretInstance] Updated DeviceSecretInstance
|
198
|
+
def update(value: nil)
|
199
|
+
data = Twilio::Values.of({'Value' => value, })
|
200
|
+
|
201
|
+
payload = @version.update('POST', @uri, data: data)
|
202
|
+
|
203
|
+
DeviceSecretInstance.new(
|
204
|
+
@version,
|
205
|
+
payload,
|
206
|
+
device_sid: @solution[:device_sid],
|
207
|
+
key: @solution[:key],
|
208
|
+
)
|
209
|
+
end
|
210
|
+
|
211
|
+
##
|
212
|
+
# Delete the DeviceSecretInstance
|
213
|
+
# @return [Boolean] true if delete succeeds, false otherwise
|
214
|
+
def delete
|
215
|
+
@version.delete('DELETE', @uri)
|
175
216
|
end
|
176
217
|
|
177
218
|
##
|
178
219
|
# Provide a user friendly representation
|
179
220
|
def to_s
|
180
221
|
context = @solution.map {|k, v| "#{k}: #{v}"}.join(',')
|
181
|
-
"#<Twilio.
|
222
|
+
"#<Twilio.Microvisor.V1.DeviceSecretContext #{context}>"
|
182
223
|
end
|
183
224
|
|
184
225
|
##
|
185
226
|
# Provide a detailed, user friendly representation
|
186
227
|
def inspect
|
187
228
|
context = @solution.map {|k, v| "#{k}: #{v}"}.join(',')
|
188
|
-
"#<Twilio.
|
229
|
+
"#<Twilio.Microvisor.V1.DeviceSecretContext #{context}>"
|
189
230
|
end
|
190
231
|
end
|
191
232
|
|
192
233
|
##
|
193
234
|
# PLEASE NOTE that this class contains preview products that are subject to change. Use them with caution. If you currently do not have developer preview access, please contact help@twilio.com.
|
194
|
-
class
|
235
|
+
class DeviceSecretInstance < InstanceResource
|
195
236
|
##
|
196
|
-
# Initialize the
|
237
|
+
# Initialize the DeviceSecretInstance
|
197
238
|
# @param [Version] version Version that contains the resource
|
198
239
|
# @param [Hash] payload payload that contains response from Twilio
|
199
|
-
# @param [String]
|
200
|
-
#
|
201
|
-
# @param [String]
|
202
|
-
#
|
203
|
-
|
204
|
-
def initialize(version, payload, resource_type: nil, day: nil)
|
240
|
+
# @param [String] device_sid A 34-character string that uniquely identifies the
|
241
|
+
# parent Device.
|
242
|
+
# @param [String] key The secret key; up to 100 characters.
|
243
|
+
# @return [DeviceSecretInstance] DeviceSecretInstance
|
244
|
+
def initialize(version, payload, device_sid: nil, key: nil)
|
205
245
|
super(version)
|
206
246
|
|
207
247
|
# Marshaled Properties
|
208
248
|
@properties = {
|
209
|
-
'
|
210
|
-
'
|
211
|
-
'
|
212
|
-
'
|
213
|
-
'friendly_name' => payload['friendly_name'],
|
214
|
-
'resource_type' => payload['resource_type'],
|
249
|
+
'device_sid' => payload['device_sid'],
|
250
|
+
'key' => payload['key'],
|
251
|
+
'date_rotated' => Twilio.deserialize_iso8601_datetime(payload['date_rotated']),
|
252
|
+
'url' => payload['url'],
|
215
253
|
}
|
216
254
|
|
217
255
|
# Context
|
218
256
|
@instance_context = nil
|
219
|
-
@params = {'
|
257
|
+
@params = {'device_sid' => device_sid, 'key' => key || @properties['key'], }
|
220
258
|
end
|
221
259
|
|
222
260
|
##
|
223
261
|
# Generate an instance context for the instance, the context is capable of
|
224
262
|
# performing various actions. All instance actions are proxied to the context
|
225
|
-
# @return [
|
263
|
+
# @return [DeviceSecretContext] DeviceSecretContext for this DeviceSecretInstance
|
226
264
|
def context
|
227
265
|
unless @instance_context
|
228
|
-
@instance_context =
|
266
|
+
@instance_context = DeviceSecretContext.new(@version, @params['device_sid'], @params['key'], )
|
229
267
|
end
|
230
268
|
@instance_context
|
231
269
|
end
|
232
270
|
|
233
271
|
##
|
234
|
-
# @return [String]
|
235
|
-
def
|
236
|
-
@properties['
|
272
|
+
# @return [String] A string that uniquely identifies the parent Device.
|
273
|
+
def device_sid
|
274
|
+
@properties['device_sid']
|
237
275
|
end
|
238
276
|
|
239
277
|
##
|
240
|
-
# @return [String] The
|
241
|
-
def
|
242
|
-
@properties['
|
278
|
+
# @return [String] The secret key.
|
279
|
+
def key
|
280
|
+
@properties['key']
|
243
281
|
end
|
244
282
|
|
245
283
|
##
|
246
|
-
# @return [
|
247
|
-
def
|
248
|
-
@properties['
|
284
|
+
# @return [Time] The date_rotated
|
285
|
+
def date_rotated
|
286
|
+
@properties['date_rotated']
|
249
287
|
end
|
250
288
|
|
251
289
|
##
|
252
|
-
# @return [String] The
|
253
|
-
def
|
254
|
-
@properties['
|
290
|
+
# @return [String] The absolute URL of the Secret.
|
291
|
+
def url
|
292
|
+
@properties['url']
|
255
293
|
end
|
256
294
|
|
257
295
|
##
|
258
|
-
#
|
259
|
-
|
260
|
-
|
296
|
+
# Fetch the DeviceSecretInstance
|
297
|
+
# @return [DeviceSecretInstance] Fetched DeviceSecretInstance
|
298
|
+
def fetch
|
299
|
+
context.fetch
|
261
300
|
end
|
262
301
|
|
263
302
|
##
|
264
|
-
#
|
265
|
-
|
266
|
-
|
303
|
+
# Update the DeviceSecretInstance
|
304
|
+
# @param [String] value The secret value; up to 4096 characters.
|
305
|
+
# @return [DeviceSecretInstance] Updated DeviceSecretInstance
|
306
|
+
def update(value: nil)
|
307
|
+
context.update(value: value, )
|
267
308
|
end
|
268
309
|
|
269
310
|
##
|
270
|
-
#
|
271
|
-
# @return [
|
272
|
-
def
|
273
|
-
context.
|
311
|
+
# Delete the DeviceSecretInstance
|
312
|
+
# @return [Boolean] true if delete succeeds, false otherwise
|
313
|
+
def delete
|
314
|
+
context.delete
|
274
315
|
end
|
275
316
|
|
276
317
|
##
|
277
318
|
# Provide a user friendly representation
|
278
319
|
def to_s
|
279
320
|
values = @params.map{|k, v| "#{k}: #{v}"}.join(" ")
|
280
|
-
"<Twilio.
|
321
|
+
"<Twilio.Microvisor.V1.DeviceSecretInstance #{values}>"
|
281
322
|
end
|
282
323
|
|
283
324
|
##
|
284
325
|
# Provide a detailed, user friendly representation
|
285
326
|
def inspect
|
286
327
|
values = @properties.map{|k, v| "#{k}: #{v}"}.join(" ")
|
287
|
-
"<Twilio.
|
328
|
+
"<Twilio.Microvisor.V1.DeviceSecretInstance #{values}>"
|
288
329
|
end
|
289
330
|
end
|
290
331
|
end
|