twilio-ruby 5.72.0 → 5.77.0
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 +234 -0
- data/CONTRIBUTING.md +1 -7
- data/LICENSE +1 -1
- data/README.md +132 -45
- data/advanced-examples/custom-http-client.md +170 -0
- 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 +6 -6
- 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 +1 -1
- 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 +14 -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/content_and_approvals.rb +240 -0
- data/lib/twilio-ruby/rest/content/v1/legacy_content.rb +254 -0
- data/lib/twilio-ruby/rest/content/v1.rb +59 -0
- data/lib/twilio-ruby/rest/content.rb +59 -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/conversation.rb +43 -5
- 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/conversations/v1/service/conversation.rb +43 -5
- 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/insights_assessments_comment.rb +314 -0
- data/lib/twilio-ruby/rest/flex_api/v1/insights_conversations.rb +216 -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.rb +122 -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 +89 -0
- data/lib/twilio-ruby/rest/insights/v1/call/summary.rb +7 -0
- data/lib/twilio-ruby/rest/insights/v1/call_summaries.rb +16 -3
- 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/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 +88 -6
- data/lib/twilio-ruby/rest/media/v1/media_processor.rb +1 -1
- data/lib/twilio-ruby/rest/media/v1/media_recording.rb +2 -2
- data/lib/twilio-ruby/rest/media/v1/player_streamer.rb +1 -1
- data/lib/twilio-ruby/rest/messaging/v1/brand_registration/brand_registration_otp.rb +134 -0
- data/lib/twilio-ruby/rest/messaging/v1/brand_registration.rb +26 -3
- data/lib/twilio-ruby/rest/messaging/v1/domain_cert.rb +257 -0
- data/lib/twilio-ruby/rest/messaging/v1/domain_config.rb +242 -0
- data/lib/twilio-ruby/rest/messaging/v1/domain_config_messaging_service.rb +226 -0
- data/lib/twilio-ruby/rest/messaging/v1/linkshortening_messaging_service.rb +218 -0
- 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 +165 -1
- data/lib/twilio-ruby/rest/messaging/v1.rb +75 -0
- data/lib/twilio-ruby/rest/messaging.rb +36 -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 +25 -0
- data/lib/twilio-ruby/rest/microvisor/v1/device/device_config.rb +342 -0
- data/lib/twilio-ruby/rest/microvisor/v1/device/device_secret.rb +335 -0
- data/lib/twilio-ruby/rest/microvisor/v1/device.rb +61 -0
- data/lib/twilio-ruby/rest/microvisor/v1.rb +32 -0
- data/lib/twilio-ruby/rest/microvisor.rb +16 -0
- data/lib/twilio-ruby/rest/notify/v1/service/notification.rb +1 -1
- data/lib/twilio-ruby/rest/numbers/v1/eligibility.rb +111 -0
- data/lib/twilio-ruby/rest/numbers/v1.rb +35 -0
- data/lib/twilio-ruby/rest/numbers.rb +13 -0
- 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 -33
- 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/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 +1 -1
- 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/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/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 +12 -6
- data/lib/twilio-ruby/rest/verify/v2/service/webhook.rb +0 -8
- data/lib/twilio-ruby/rest/verify/v2/service.rb +4 -4
- data/lib/twilio-ruby/rest/verify/v2/template.rb +10 -3
- data/lib/twilio-ruby/rest/verify/v2/verification_attempts_summary.rb +4 -4
- 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.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/twiml/voice_response.rb +132 -33
- data/lib/twilio-ruby/version.rb +1 -1
- data/twilio-ruby.gemspec +1 -1
- metadata +48 -12
- 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,335 @@
|
|
|
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 Microvisor < Domain
|
|
12
|
+
class V1 < Version
|
|
13
|
+
class DeviceContext < InstanceContext
|
|
14
|
+
##
|
|
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 DeviceSecretList < ListResource
|
|
17
|
+
##
|
|
18
|
+
# Initialize the DeviceSecretList
|
|
19
|
+
# @param [Version] version Version that contains the resource
|
|
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
|
+
super(version)
|
|
25
|
+
|
|
26
|
+
# Path Solution
|
|
27
|
+
@solution = {device_sid: device_sid}
|
|
28
|
+
@uri = "/Devices/#{@solution[:device_sid]}/Secrets"
|
|
29
|
+
end
|
|
30
|
+
|
|
31
|
+
##
|
|
32
|
+
# Lists DeviceSecretInstance records from the API as a list.
|
|
33
|
+
# Unlike stream(), this operation is eager and will load `limit` records into
|
|
34
|
+
# memory before returning.
|
|
35
|
+
# @param [Integer] limit Upper limit for the number of records to return. stream()
|
|
36
|
+
# guarantees to never return more than limit. Default is no limit
|
|
37
|
+
# @param [Integer] page_size Number of records to fetch per request, when
|
|
38
|
+
# not set will use the default value of 50 records. If no page_size is defined
|
|
39
|
+
# but a limit is defined, stream() will attempt to read the limit with the most
|
|
40
|
+
# efficient page size, i.e. min(limit, 1000)
|
|
41
|
+
# @return [Array] Array of up to limit results
|
|
42
|
+
def list(limit: nil, page_size: nil)
|
|
43
|
+
self.stream(limit: limit, page_size: page_size).entries
|
|
44
|
+
end
|
|
45
|
+
|
|
46
|
+
##
|
|
47
|
+
# Streams DeviceSecretInstance records from the API as an Enumerable.
|
|
48
|
+
# This operation lazily loads records as efficiently as possible until the limit
|
|
49
|
+
# is reached.
|
|
50
|
+
# @param [Integer] limit Upper limit for the number of records to return. stream()
|
|
51
|
+
# guarantees to never return more than limit. Default is no limit.
|
|
52
|
+
# @param [Integer] page_size Number of records to fetch per request, when
|
|
53
|
+
# not set will use the default value of 50 records. If no page_size is defined
|
|
54
|
+
# but a limit is defined, stream() will attempt to read the limit with the most
|
|
55
|
+
# efficient page size, i.e. min(limit, 1000)
|
|
56
|
+
# @return [Enumerable] Enumerable that will yield up to limit results
|
|
57
|
+
def stream(limit: nil, page_size: nil)
|
|
58
|
+
limits = @version.read_limits(limit, page_size)
|
|
59
|
+
|
|
60
|
+
page = self.page(page_size: limits[:page_size], )
|
|
61
|
+
|
|
62
|
+
@version.stream(page, limit: limits[:limit], page_limit: limits[:page_limit])
|
|
63
|
+
end
|
|
64
|
+
|
|
65
|
+
##
|
|
66
|
+
# When passed a block, yields DeviceSecretInstance records from the API.
|
|
67
|
+
# This operation lazily loads records as efficiently as possible until the limit
|
|
68
|
+
# is reached.
|
|
69
|
+
def each
|
|
70
|
+
limits = @version.read_limits
|
|
71
|
+
|
|
72
|
+
page = self.page(page_size: limits[:page_size], )
|
|
73
|
+
|
|
74
|
+
@version.stream(page,
|
|
75
|
+
limit: limits[:limit],
|
|
76
|
+
page_limit: limits[:page_limit]).each {|x| yield x}
|
|
77
|
+
end
|
|
78
|
+
|
|
79
|
+
##
|
|
80
|
+
# Retrieve a single page of DeviceSecretInstance records from the API.
|
|
81
|
+
# Request is executed immediately.
|
|
82
|
+
# @param [String] page_token PageToken provided by the API
|
|
83
|
+
# @param [Integer] page_number Page Number, this value is simply for client state
|
|
84
|
+
# @param [Integer] page_size Number of records to return, defaults to 50
|
|
85
|
+
# @return [Page] Page of DeviceSecretInstance
|
|
86
|
+
def page(page_token: :unset, page_number: :unset, page_size: :unset)
|
|
87
|
+
params = Twilio::Values.of({
|
|
88
|
+
'PageToken' => page_token,
|
|
89
|
+
'Page' => page_number,
|
|
90
|
+
'PageSize' => page_size,
|
|
91
|
+
})
|
|
92
|
+
|
|
93
|
+
response = @version.page('GET', @uri, params: params)
|
|
94
|
+
|
|
95
|
+
DeviceSecretPage.new(@version, response, @solution)
|
|
96
|
+
end
|
|
97
|
+
|
|
98
|
+
##
|
|
99
|
+
# Retrieve a single page of DeviceSecretInstance records from the API.
|
|
100
|
+
# Request is executed immediately.
|
|
101
|
+
# @param [String] target_url API-generated URL for the requested results page
|
|
102
|
+
# @return [Page] Page of DeviceSecretInstance
|
|
103
|
+
def get_page(target_url)
|
|
104
|
+
response = @version.domain.request(
|
|
105
|
+
'GET',
|
|
106
|
+
target_url
|
|
107
|
+
)
|
|
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], )
|
|
122
|
+
end
|
|
123
|
+
|
|
124
|
+
##
|
|
125
|
+
# Provide a user friendly representation
|
|
126
|
+
def to_s
|
|
127
|
+
'#<Twilio.Microvisor.V1.DeviceSecretList>'
|
|
128
|
+
end
|
|
129
|
+
end
|
|
130
|
+
|
|
131
|
+
##
|
|
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.
|
|
133
|
+
class DeviceSecretPage < Page
|
|
134
|
+
##
|
|
135
|
+
# Initialize the DeviceSecretPage
|
|
136
|
+
# @param [Version] version Version that contains the resource
|
|
137
|
+
# @param [Response] response Response from the API
|
|
138
|
+
# @param [Hash] solution Path solution for the resource
|
|
139
|
+
# @return [DeviceSecretPage] DeviceSecretPage
|
|
140
|
+
def initialize(version, response, solution)
|
|
141
|
+
super(version, response)
|
|
142
|
+
|
|
143
|
+
# Path Solution
|
|
144
|
+
@solution = solution
|
|
145
|
+
end
|
|
146
|
+
|
|
147
|
+
##
|
|
148
|
+
# Build an instance of DeviceSecretInstance
|
|
149
|
+
# @param [Hash] payload Payload response from the API
|
|
150
|
+
# @return [DeviceSecretInstance] DeviceSecretInstance
|
|
151
|
+
def get_instance(payload)
|
|
152
|
+
DeviceSecretInstance.new(@version, payload, device_sid: @solution[:device_sid], )
|
|
153
|
+
end
|
|
154
|
+
|
|
155
|
+
##
|
|
156
|
+
# Provide a user friendly representation
|
|
157
|
+
def to_s
|
|
158
|
+
'<Twilio.Microvisor.V1.DeviceSecretPage>'
|
|
159
|
+
end
|
|
160
|
+
end
|
|
161
|
+
|
|
162
|
+
##
|
|
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.
|
|
164
|
+
class DeviceSecretContext < InstanceContext
|
|
165
|
+
##
|
|
166
|
+
# Initialize the DeviceSecretContext
|
|
167
|
+
# @param [Version] version Version that contains the resource
|
|
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)
|
|
173
|
+
super(version)
|
|
174
|
+
|
|
175
|
+
# Path Solution
|
|
176
|
+
@solution = {device_sid: device_sid, key: key, }
|
|
177
|
+
@uri = "/Devices/#{@solution[:device_sid]}/Secrets/#{@solution[:key]}"
|
|
178
|
+
end
|
|
179
|
+
|
|
180
|
+
##
|
|
181
|
+
# Fetch the DeviceSecretInstance
|
|
182
|
+
# @return [DeviceSecretInstance] Fetched DeviceSecretInstance
|
|
183
|
+
def fetch
|
|
184
|
+
payload = @version.fetch('GET', @uri)
|
|
185
|
+
|
|
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)
|
|
216
|
+
end
|
|
217
|
+
|
|
218
|
+
##
|
|
219
|
+
# Provide a user friendly representation
|
|
220
|
+
def to_s
|
|
221
|
+
context = @solution.map {|k, v| "#{k}: #{v}"}.join(',')
|
|
222
|
+
"#<Twilio.Microvisor.V1.DeviceSecretContext #{context}>"
|
|
223
|
+
end
|
|
224
|
+
|
|
225
|
+
##
|
|
226
|
+
# Provide a detailed, user friendly representation
|
|
227
|
+
def inspect
|
|
228
|
+
context = @solution.map {|k, v| "#{k}: #{v}"}.join(',')
|
|
229
|
+
"#<Twilio.Microvisor.V1.DeviceSecretContext #{context}>"
|
|
230
|
+
end
|
|
231
|
+
end
|
|
232
|
+
|
|
233
|
+
##
|
|
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.
|
|
235
|
+
class DeviceSecretInstance < InstanceResource
|
|
236
|
+
##
|
|
237
|
+
# Initialize the DeviceSecretInstance
|
|
238
|
+
# @param [Version] version Version that contains the resource
|
|
239
|
+
# @param [Hash] payload payload that contains response from Twilio
|
|
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)
|
|
245
|
+
super(version)
|
|
246
|
+
|
|
247
|
+
# Marshaled Properties
|
|
248
|
+
@properties = {
|
|
249
|
+
'device_sid' => payload['device_sid'],
|
|
250
|
+
'key' => payload['key'],
|
|
251
|
+
'date_rotated' => Twilio.deserialize_iso8601_datetime(payload['date_rotated']),
|
|
252
|
+
'url' => payload['url'],
|
|
253
|
+
}
|
|
254
|
+
|
|
255
|
+
# Context
|
|
256
|
+
@instance_context = nil
|
|
257
|
+
@params = {'device_sid' => device_sid, 'key' => key || @properties['key'], }
|
|
258
|
+
end
|
|
259
|
+
|
|
260
|
+
##
|
|
261
|
+
# Generate an instance context for the instance, the context is capable of
|
|
262
|
+
# performing various actions. All instance actions are proxied to the context
|
|
263
|
+
# @return [DeviceSecretContext] DeviceSecretContext for this DeviceSecretInstance
|
|
264
|
+
def context
|
|
265
|
+
unless @instance_context
|
|
266
|
+
@instance_context = DeviceSecretContext.new(@version, @params['device_sid'], @params['key'], )
|
|
267
|
+
end
|
|
268
|
+
@instance_context
|
|
269
|
+
end
|
|
270
|
+
|
|
271
|
+
##
|
|
272
|
+
# @return [String] A string that uniquely identifies the parent Device.
|
|
273
|
+
def device_sid
|
|
274
|
+
@properties['device_sid']
|
|
275
|
+
end
|
|
276
|
+
|
|
277
|
+
##
|
|
278
|
+
# @return [String] The secret key.
|
|
279
|
+
def key
|
|
280
|
+
@properties['key']
|
|
281
|
+
end
|
|
282
|
+
|
|
283
|
+
##
|
|
284
|
+
# @return [Time] The date_rotated
|
|
285
|
+
def date_rotated
|
|
286
|
+
@properties['date_rotated']
|
|
287
|
+
end
|
|
288
|
+
|
|
289
|
+
##
|
|
290
|
+
# @return [String] The absolute URL of the Secret.
|
|
291
|
+
def url
|
|
292
|
+
@properties['url']
|
|
293
|
+
end
|
|
294
|
+
|
|
295
|
+
##
|
|
296
|
+
# Fetch the DeviceSecretInstance
|
|
297
|
+
# @return [DeviceSecretInstance] Fetched DeviceSecretInstance
|
|
298
|
+
def fetch
|
|
299
|
+
context.fetch
|
|
300
|
+
end
|
|
301
|
+
|
|
302
|
+
##
|
|
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, )
|
|
308
|
+
end
|
|
309
|
+
|
|
310
|
+
##
|
|
311
|
+
# Delete the DeviceSecretInstance
|
|
312
|
+
# @return [Boolean] true if delete succeeds, false otherwise
|
|
313
|
+
def delete
|
|
314
|
+
context.delete
|
|
315
|
+
end
|
|
316
|
+
|
|
317
|
+
##
|
|
318
|
+
# Provide a user friendly representation
|
|
319
|
+
def to_s
|
|
320
|
+
values = @params.map{|k, v| "#{k}: #{v}"}.join(" ")
|
|
321
|
+
"<Twilio.Microvisor.V1.DeviceSecretInstance #{values}>"
|
|
322
|
+
end
|
|
323
|
+
|
|
324
|
+
##
|
|
325
|
+
# Provide a detailed, user friendly representation
|
|
326
|
+
def inspect
|
|
327
|
+
values = @properties.map{|k, v| "#{k}: #{v}"}.join(" ")
|
|
328
|
+
"<Twilio.Microvisor.V1.DeviceSecretInstance #{values}>"
|
|
329
|
+
end
|
|
330
|
+
end
|
|
331
|
+
end
|
|
332
|
+
end
|
|
333
|
+
end
|
|
334
|
+
end
|
|
335
|
+
end
|
|
@@ -157,6 +157,10 @@ module Twilio
|
|
|
157
157
|
# Path Solution
|
|
158
158
|
@solution = {sid: sid, }
|
|
159
159
|
@uri = "/Devices/#{@solution[:sid]}"
|
|
160
|
+
|
|
161
|
+
# Dependents
|
|
162
|
+
@device_configs = nil
|
|
163
|
+
@device_secrets = nil
|
|
160
164
|
end
|
|
161
165
|
|
|
162
166
|
##
|
|
@@ -189,6 +193,42 @@ module Twilio
|
|
|
189
193
|
DeviceInstance.new(@version, payload, sid: @solution[:sid], )
|
|
190
194
|
end
|
|
191
195
|
|
|
196
|
+
##
|
|
197
|
+
# Access the device_configs
|
|
198
|
+
# @return [DeviceConfigList]
|
|
199
|
+
# @return [DeviceConfigContext] if key was passed.
|
|
200
|
+
def device_configs(key=:unset)
|
|
201
|
+
raise ArgumentError, 'key cannot be nil' if key.nil?
|
|
202
|
+
|
|
203
|
+
if key != :unset
|
|
204
|
+
return DeviceConfigContext.new(@version, @solution[:sid], key, )
|
|
205
|
+
end
|
|
206
|
+
|
|
207
|
+
unless @device_configs
|
|
208
|
+
@device_configs = DeviceConfigList.new(@version, device_sid: @solution[:sid], )
|
|
209
|
+
end
|
|
210
|
+
|
|
211
|
+
@device_configs
|
|
212
|
+
end
|
|
213
|
+
|
|
214
|
+
##
|
|
215
|
+
# Access the device_secrets
|
|
216
|
+
# @return [DeviceSecretList]
|
|
217
|
+
# @return [DeviceSecretContext] if key was passed.
|
|
218
|
+
def device_secrets(key=:unset)
|
|
219
|
+
raise ArgumentError, 'key cannot be nil' if key.nil?
|
|
220
|
+
|
|
221
|
+
if key != :unset
|
|
222
|
+
return DeviceSecretContext.new(@version, @solution[:sid], key, )
|
|
223
|
+
end
|
|
224
|
+
|
|
225
|
+
unless @device_secrets
|
|
226
|
+
@device_secrets = DeviceSecretList.new(@version, device_sid: @solution[:sid], )
|
|
227
|
+
end
|
|
228
|
+
|
|
229
|
+
@device_secrets
|
|
230
|
+
end
|
|
231
|
+
|
|
192
232
|
##
|
|
193
233
|
# Provide a user friendly representation
|
|
194
234
|
def to_s
|
|
@@ -226,6 +266,7 @@ module Twilio
|
|
|
226
266
|
'date_created' => Twilio.deserialize_iso8601_datetime(payload['date_created']),
|
|
227
267
|
'date_updated' => Twilio.deserialize_iso8601_datetime(payload['date_updated']),
|
|
228
268
|
'url' => payload['url'],
|
|
269
|
+
'links' => payload['links'],
|
|
229
270
|
}
|
|
230
271
|
|
|
231
272
|
# Context
|
|
@@ -292,6 +333,12 @@ module Twilio
|
|
|
292
333
|
@properties['url']
|
|
293
334
|
end
|
|
294
335
|
|
|
336
|
+
##
|
|
337
|
+
# @return [String] The absolute URLs of related resources
|
|
338
|
+
def links
|
|
339
|
+
@properties['links']
|
|
340
|
+
end
|
|
341
|
+
|
|
295
342
|
##
|
|
296
343
|
# Fetch the DeviceInstance
|
|
297
344
|
# @return [DeviceInstance] Fetched DeviceInstance
|
|
@@ -312,6 +359,20 @@ module Twilio
|
|
|
312
359
|
context.update(unique_name: unique_name, target_app: target_app, logging_enabled: logging_enabled, )
|
|
313
360
|
end
|
|
314
361
|
|
|
362
|
+
##
|
|
363
|
+
# Access the device_configs
|
|
364
|
+
# @return [device_configs] device_configs
|
|
365
|
+
def device_configs
|
|
366
|
+
context.device_configs
|
|
367
|
+
end
|
|
368
|
+
|
|
369
|
+
##
|
|
370
|
+
# Access the device_secrets
|
|
371
|
+
# @return [device_secrets] device_secrets
|
|
372
|
+
def device_secrets
|
|
373
|
+
context.device_secrets
|
|
374
|
+
end
|
|
375
|
+
|
|
315
376
|
##
|
|
316
377
|
# Provide a user friendly representation
|
|
317
378
|
def to_s
|
|
@@ -15,10 +15,42 @@ module Twilio
|
|
|
15
15
|
def initialize(domain)
|
|
16
16
|
super
|
|
17
17
|
@version = 'v1'
|
|
18
|
+
@account_configs = nil
|
|
19
|
+
@account_secrets = nil
|
|
18
20
|
@apps = nil
|
|
19
21
|
@devices = nil
|
|
20
22
|
end
|
|
21
23
|
|
|
24
|
+
##
|
|
25
|
+
# @param [String] key The config key; up to 100 characters.
|
|
26
|
+
# @return [Twilio::REST::Microvisor::V1::AccountConfigContext] if key was passed.
|
|
27
|
+
# @return [Twilio::REST::Microvisor::V1::AccountConfigList]
|
|
28
|
+
def account_configs(key=:unset)
|
|
29
|
+
if key.nil?
|
|
30
|
+
raise ArgumentError, 'key cannot be nil'
|
|
31
|
+
end
|
|
32
|
+
if key == :unset
|
|
33
|
+
@account_configs ||= AccountConfigList.new self
|
|
34
|
+
else
|
|
35
|
+
AccountConfigContext.new(self, key)
|
|
36
|
+
end
|
|
37
|
+
end
|
|
38
|
+
|
|
39
|
+
##
|
|
40
|
+
# @param [String] key The secret key; up to 100 characters.
|
|
41
|
+
# @return [Twilio::REST::Microvisor::V1::AccountSecretContext] if key was passed.
|
|
42
|
+
# @return [Twilio::REST::Microvisor::V1::AccountSecretList]
|
|
43
|
+
def account_secrets(key=:unset)
|
|
44
|
+
if key.nil?
|
|
45
|
+
raise ArgumentError, 'key cannot be nil'
|
|
46
|
+
end
|
|
47
|
+
if key == :unset
|
|
48
|
+
@account_secrets ||= AccountSecretList.new self
|
|
49
|
+
else
|
|
50
|
+
AccountSecretContext.new(self, key)
|
|
51
|
+
end
|
|
52
|
+
end
|
|
53
|
+
|
|
22
54
|
##
|
|
23
55
|
# @param [String] sid A 34-character string that uniquely identifies this App.
|
|
24
56
|
# @return [Twilio::REST::Microvisor::V1::AppContext] if sid was passed.
|
|
@@ -28,6 +28,22 @@ module Twilio
|
|
|
28
28
|
@v1 ||= V1.new self
|
|
29
29
|
end
|
|
30
30
|
|
|
31
|
+
##
|
|
32
|
+
# @param [String] key The config key; up to 100 characters.
|
|
33
|
+
# @return [Twilio::REST::Microvisor::V1::AccountConfigInstance] if key was passed.
|
|
34
|
+
# @return [Twilio::REST::Microvisor::V1::AccountConfigList]
|
|
35
|
+
def account_configs(key=:unset)
|
|
36
|
+
self.v1.account_configs(key)
|
|
37
|
+
end
|
|
38
|
+
|
|
39
|
+
##
|
|
40
|
+
# @param [String] key The secret key; up to 100 characters.
|
|
41
|
+
# @return [Twilio::REST::Microvisor::V1::AccountSecretInstance] if key was passed.
|
|
42
|
+
# @return [Twilio::REST::Microvisor::V1::AccountSecretList]
|
|
43
|
+
def account_secrets(key=:unset)
|
|
44
|
+
self.v1.account_secrets(key)
|
|
45
|
+
end
|
|
46
|
+
|
|
31
47
|
##
|
|
32
48
|
# @param [String] sid A 34-character string that uniquely identifies this App.
|
|
33
49
|
# @return [Twilio::REST::Microvisor::V1::AppInstance] if sid was passed.
|
|
@@ -215,7 +215,7 @@ module Twilio
|
|
|
215
215
|
'tags' => payload['tags'],
|
|
216
216
|
'segments' => payload['segments'],
|
|
217
217
|
'priority' => payload['priority'],
|
|
218
|
-
'ttl' => payload['ttl'].to_i,
|
|
218
|
+
'ttl' => payload['ttl'] == nil ? payload['ttl'] : payload['ttl'].to_i,
|
|
219
219
|
'title' => payload['title'],
|
|
220
220
|
'body' => payload['body'],
|
|
221
221
|
'sound' => payload['sound'],
|
|
@@ -0,0 +1,111 @@
|
|
|
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 Numbers < 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 EligibilityList < ListResource
|
|
16
|
+
##
|
|
17
|
+
# Initialize the EligibilityList
|
|
18
|
+
# @param [Version] version Version that contains the resource
|
|
19
|
+
# @return [EligibilityList] EligibilityList
|
|
20
|
+
def initialize(version)
|
|
21
|
+
super(version)
|
|
22
|
+
|
|
23
|
+
# Path Solution
|
|
24
|
+
@solution = {}
|
|
25
|
+
@uri = "/HostedNumber/Eligibility"
|
|
26
|
+
end
|
|
27
|
+
|
|
28
|
+
##
|
|
29
|
+
# Create the EligibilityInstance
|
|
30
|
+
# @return [EligibilityInstance] Created EligibilityInstance
|
|
31
|
+
def create
|
|
32
|
+
payload = @version.create('POST', @uri)
|
|
33
|
+
|
|
34
|
+
EligibilityInstance.new(@version, payload, )
|
|
35
|
+
end
|
|
36
|
+
|
|
37
|
+
##
|
|
38
|
+
# Provide a user friendly representation
|
|
39
|
+
def to_s
|
|
40
|
+
'#<Twilio.Numbers.V1.EligibilityList>'
|
|
41
|
+
end
|
|
42
|
+
end
|
|
43
|
+
|
|
44
|
+
##
|
|
45
|
+
# PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution.
|
|
46
|
+
class EligibilityPage < Page
|
|
47
|
+
##
|
|
48
|
+
# Initialize the EligibilityPage
|
|
49
|
+
# @param [Version] version Version that contains the resource
|
|
50
|
+
# @param [Response] response Response from the API
|
|
51
|
+
# @param [Hash] solution Path solution for the resource
|
|
52
|
+
# @return [EligibilityPage] EligibilityPage
|
|
53
|
+
def initialize(version, response, solution)
|
|
54
|
+
super(version, response)
|
|
55
|
+
|
|
56
|
+
# Path Solution
|
|
57
|
+
@solution = solution
|
|
58
|
+
end
|
|
59
|
+
|
|
60
|
+
##
|
|
61
|
+
# Build an instance of EligibilityInstance
|
|
62
|
+
# @param [Hash] payload Payload response from the API
|
|
63
|
+
# @return [EligibilityInstance] EligibilityInstance
|
|
64
|
+
def get_instance(payload)
|
|
65
|
+
EligibilityInstance.new(@version, payload, )
|
|
66
|
+
end
|
|
67
|
+
|
|
68
|
+
##
|
|
69
|
+
# Provide a user friendly representation
|
|
70
|
+
def to_s
|
|
71
|
+
'<Twilio.Numbers.V1.EligibilityPage>'
|
|
72
|
+
end
|
|
73
|
+
end
|
|
74
|
+
|
|
75
|
+
##
|
|
76
|
+
# PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution.
|
|
77
|
+
class EligibilityInstance < InstanceResource
|
|
78
|
+
##
|
|
79
|
+
# Initialize the EligibilityInstance
|
|
80
|
+
# @param [Version] version Version that contains the resource
|
|
81
|
+
# @param [Hash] payload payload that contains response from Twilio
|
|
82
|
+
# @return [EligibilityInstance] EligibilityInstance
|
|
83
|
+
def initialize(version, payload)
|
|
84
|
+
super(version)
|
|
85
|
+
|
|
86
|
+
# Marshaled Properties
|
|
87
|
+
@properties = {'results' => payload['results'], }
|
|
88
|
+
end
|
|
89
|
+
|
|
90
|
+
##
|
|
91
|
+
# @return [Array[Hash]] The result set of the requested number in the eligibility check.
|
|
92
|
+
def results
|
|
93
|
+
@properties['results']
|
|
94
|
+
end
|
|
95
|
+
|
|
96
|
+
##
|
|
97
|
+
# Provide a user friendly representation
|
|
98
|
+
def to_s
|
|
99
|
+
"<Twilio.Numbers.V1.EligibilityInstance>"
|
|
100
|
+
end
|
|
101
|
+
|
|
102
|
+
##
|
|
103
|
+
# Provide a detailed, user friendly representation
|
|
104
|
+
def inspect
|
|
105
|
+
"<Twilio.Numbers.V1.EligibilityInstance>"
|
|
106
|
+
end
|
|
107
|
+
end
|
|
108
|
+
end
|
|
109
|
+
end
|
|
110
|
+
end
|
|
111
|
+
end
|
|
@@ -0,0 +1,35 @@
|
|
|
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 Numbers
|
|
12
|
+
class V1 < Version
|
|
13
|
+
##
|
|
14
|
+
# Initialize the V1 version of Numbers
|
|
15
|
+
def initialize(domain)
|
|
16
|
+
super
|
|
17
|
+
@version = 'v1'
|
|
18
|
+
@eligibilities = nil
|
|
19
|
+
end
|
|
20
|
+
|
|
21
|
+
##
|
|
22
|
+
# @return [Twilio::REST::Numbers::V1::EligibilityContext]
|
|
23
|
+
def eligibilities
|
|
24
|
+
@eligibilities ||= EligibilityList.new self
|
|
25
|
+
end
|
|
26
|
+
|
|
27
|
+
##
|
|
28
|
+
# Provide a user friendly representation
|
|
29
|
+
def to_s
|
|
30
|
+
'<Twilio::REST::Numbers::V1>'
|
|
31
|
+
end
|
|
32
|
+
end
|
|
33
|
+
end
|
|
34
|
+
end
|
|
35
|
+
end
|
|
@@ -19,15 +19,28 @@ module Twilio
|
|
|
19
19
|
@port = 443
|
|
20
20
|
|
|
21
21
|
# Versions
|
|
22
|
+
@v1 = nil
|
|
22
23
|
@v2 = nil
|
|
23
24
|
end
|
|
24
25
|
|
|
26
|
+
##
|
|
27
|
+
# Version v1 of numbers
|
|
28
|
+
def v1
|
|
29
|
+
@v1 ||= V1.new self
|
|
30
|
+
end
|
|
31
|
+
|
|
25
32
|
##
|
|
26
33
|
# Version v2 of numbers
|
|
27
34
|
def v2
|
|
28
35
|
@v2 ||= V2.new self
|
|
29
36
|
end
|
|
30
37
|
|
|
38
|
+
##
|
|
39
|
+
# @return [Twilio::REST::Numbers::V1::EligibilityInstance]
|
|
40
|
+
def eligibilities
|
|
41
|
+
self.v1.eligibilities()
|
|
42
|
+
end
|
|
43
|
+
|
|
31
44
|
##
|
|
32
45
|
# @return [Twilio::REST::Numbers::V2::RegulatoryComplianceInstance]
|
|
33
46
|
def regulatory_compliance
|