twilio-ruby 5.34.0 → 5.38.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.
Files changed (113) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGES.md +126 -0
  3. data/README.md +24 -3
  4. data/lib/twilio-ruby.rb +1 -1
  5. data/lib/twilio-ruby/rest/api/v2010/account/call.rb +87 -87
  6. data/lib/twilio-ruby/rest/api/v2010/account/conference.rb +14 -0
  7. data/lib/twilio-ruby/rest/api/v2010/account/conference/participant.rb +47 -9
  8. data/lib/twilio-ruby/rest/api/v2010/account/message.rb +71 -71
  9. data/lib/twilio-ruby/rest/api/v2010/account/queue.rb +29 -29
  10. data/lib/twilio-ruby/rest/api/v2010/account/sip/domain.rb +38 -3
  11. data/lib/twilio-ruby/rest/api/v2010/account/validation_request.rb +12 -12
  12. data/lib/twilio-ruby/rest/autopilot.rb +6 -0
  13. data/lib/twilio-ruby/rest/autopilot/v1.rb +7 -0
  14. data/lib/twilio-ruby/rest/autopilot/v1/assistant.rb +0 -16
  15. data/lib/twilio-ruby/rest/autopilot/v1/assistant/query.rb +12 -3
  16. data/lib/twilio-ruby/rest/autopilot/v1/restore_assistant.rb +198 -0
  17. data/lib/twilio-ruby/rest/client.rb +35 -15
  18. data/lib/twilio-ruby/rest/conversations/v1/conversation.rb +28 -3
  19. data/lib/twilio-ruby/rest/conversations/v1/conversation/participant.rb +27 -4
  20. data/lib/twilio-ruby/rest/flex_api/v1/channel.rb +2 -1
  21. data/lib/twilio-ruby/rest/flex_api/v1/configuration.rb +7 -0
  22. data/lib/twilio-ruby/rest/flex_api/v1/flex_flow.rb +6 -3
  23. data/lib/twilio-ruby/rest/monitor/v1/alert.rb +8 -8
  24. data/lib/twilio-ruby/rest/notify/v1/service.rb +20 -1
  25. data/lib/twilio-ruby/rest/numbers/v2/regulatory_compliance/bundle.rb +26 -0
  26. data/lib/twilio-ruby/rest/numbers/v2/regulatory_compliance/bundle/evaluation.rb +324 -0
  27. data/lib/twilio-ruby/rest/preview.rb +6 -0
  28. data/lib/twilio-ruby/rest/preview/trusted_comms.rb +7 -0
  29. data/lib/twilio-ruby/rest/preview/trusted_comms/brands_information.rb +193 -0
  30. data/lib/twilio-ruby/rest/preview/trusted_comms/business.rb +26 -0
  31. data/lib/twilio-ruby/rest/{autopilot/v1/assistant/export_assistant.rb → preview/trusted_comms/business/brand.rb} +88 -71
  32. data/lib/twilio-ruby/rest/preview/trusted_comms/business/brand/branded_channel.rb +266 -0
  33. data/lib/twilio-ruby/rest/preview/trusted_comms/business/brand/branded_channel/channel.rb +194 -0
  34. data/lib/twilio-ruby/rest/serverless/v1/service/environment/log.rb +7 -0
  35. data/lib/twilio-ruby/rest/supersim.rb +18 -0
  36. data/lib/twilio-ruby/rest/supersim/v1.rb +30 -0
  37. data/lib/twilio-ruby/rest/supersim/v1/fleet.rb +63 -16
  38. data/lib/twilio-ruby/rest/supersim/v1/network.rb +315 -0
  39. data/lib/twilio-ruby/rest/{authy/v1/service.rb → supersim/v1/network_access_profile.rb} +95 -121
  40. data/lib/twilio-ruby/rest/supersim/v1/network_access_profile/network_access_profile_network.rb +352 -0
  41. data/lib/twilio-ruby/rest/verify.rb +9 -0
  42. data/lib/twilio-ruby/rest/verify/v2.rb +16 -0
  43. data/lib/twilio-ruby/rest/{authy/v1 → verify/v2}/form.rb +8 -8
  44. data/lib/twilio-ruby/rest/verify/v2/service.rb +74 -3
  45. data/lib/twilio-ruby/rest/{authy/v1 → verify/v2}/service/entity.rb +32 -8
  46. data/lib/twilio-ruby/rest/verify/v2/service/entity/access_token.rb +141 -0
  47. data/lib/twilio-ruby/rest/{authy/v1 → verify/v2}/service/entity/factor.rb +8 -8
  48. data/lib/twilio-ruby/rest/{authy/v1 → verify/v2}/service/entity/factor/challenge.rb +8 -8
  49. data/lib/twilio-ruby/rest/verify/v2/service/verification.rb +3 -3
  50. data/lib/twilio-ruby/rest/verify/v2/service/webhook.rb +425 -0
  51. data/lib/twilio-ruby/rest/video/v1/composition_settings.rb +8 -4
  52. data/lib/twilio-ruby/rest/video/v1/recording_settings.rb +8 -4
  53. data/lib/twilio-ruby/rest/voice.rb +36 -0
  54. data/lib/twilio-ruby/rest/voice/v1.rb +64 -0
  55. data/lib/twilio-ruby/rest/voice/v1/byoc_trunk.rb +513 -0
  56. data/lib/twilio-ruby/rest/voice/v1/connection_policy.rb +379 -0
  57. data/lib/twilio-ruby/rest/voice/v1/connection_policy/connection_policy_target.rb +458 -0
  58. data/lib/twilio-ruby/rest/voice/v1/ip_record.rb +366 -0
  59. data/lib/twilio-ruby/rest/voice/v1/source_ip_mapping.rb +346 -0
  60. data/lib/twilio-ruby/util/configuration.rb +9 -1
  61. data/lib/twilio-ruby/version.rb +1 -1
  62. data/spec/integration/api/v2010/account/call_spec.rb +5 -5
  63. data/spec/integration/api/v2010/account/conference/participant_spec.rb +177 -0
  64. data/spec/integration/api/v2010/account/conference_spec.rb +42 -14
  65. data/spec/integration/api/v2010/account/outgoing_caller_id_spec.rb +8 -14
  66. data/spec/integration/api/v2010/account/sip/domain_spec.rb +12 -4
  67. data/spec/integration/api/v2010/account/token_spec.rb +23 -11
  68. data/spec/integration/api/v2010/account/validation_request_spec.rb +1 -1
  69. data/spec/integration/autopilot/v1/assistant/query_spec.rb +4 -4
  70. data/spec/integration/autopilot/v1/assistant_spec.rb +4 -8
  71. data/spec/integration/autopilot/v1/restore_assistant_spec.rb +53 -0
  72. data/spec/integration/conversations/v1/conversation/participant_spec.rb +7 -0
  73. data/spec/integration/conversations/v1/conversation_spec.rb +16 -0
  74. data/spec/integration/flex_api/v1/configuration_spec.rb +3 -0
  75. data/spec/integration/numbers/v2/regulatory_compliance/bundle/evaluation_spec.rb +623 -0
  76. data/spec/integration/numbers/v2/regulatory_compliance/bundle_spec.rb +4 -0
  77. data/spec/integration/preview/trusted_comms/brands_information_spec.rb +44 -0
  78. data/spec/integration/preview/trusted_comms/business/brand/branded_channel/channel_spec.rb +54 -0
  79. data/spec/integration/preview/trusted_comms/business/brand/branded_channel_spec.rb +52 -0
  80. data/spec/integration/preview/trusted_comms/business/brand_spec.rb +49 -0
  81. data/spec/integration/preview/trusted_comms/business_spec.rb +1 -0
  82. data/spec/integration/serverless/v1/service/environment/log_spec.rb +1 -0
  83. data/spec/integration/supersim/v1/fleet_spec.rb +16 -7
  84. data/spec/integration/supersim/v1/network_access_profile/network_access_profile_network_spec.rb +179 -0
  85. data/spec/integration/supersim/v1/network_access_profile_spec.rb +223 -0
  86. data/spec/integration/supersim/v1/network_spec.rb +139 -0
  87. data/spec/integration/supersim/v1/sim_spec.rb +78 -6
  88. data/spec/integration/trunking/v1/trunk/credential_list_spec.rb +13 -13
  89. data/spec/integration/trunking/v1/trunk/ip_access_control_list_spec.rb +23 -23
  90. data/spec/integration/trunking/v1/trunk/origination_url_spec.rb +28 -28
  91. data/spec/integration/trunking/v1/trunk/phone_number_spec.rb +17 -17
  92. data/spec/integration/trunking/v1/trunk_spec.rb +33 -33
  93. data/spec/integration/{authy/v1 → verify/v2}/form_spec.rb +4 -4
  94. data/spec/integration/verify/v2/service/entity/access_token_spec.rb +46 -0
  95. data/spec/integration/{authy/v1 → verify/v2}/service/entity/factor/challenge_spec.rb +73 -73
  96. data/spec/integration/{authy/v1 → verify/v2}/service/entity/factor_spec.rb +54 -54
  97. data/spec/integration/verify/v2/service/entity_spec.rb +204 -0
  98. data/spec/integration/verify/v2/service/webhook_spec.rb +262 -0
  99. data/spec/integration/verify/v2/service_spec.rb +32 -4
  100. data/spec/integration/voice/v1/byoc_trunk_spec.rb +250 -0
  101. data/spec/integration/voice/v1/connection_policy/connection_policy_target_spec.rb +246 -0
  102. data/spec/integration/voice/v1/connection_policy_spec.rb +226 -0
  103. data/spec/integration/voice/v1/ip_record_spec.rb +223 -0
  104. data/spec/integration/voice/v1/source_ip_mapping_spec.rb +219 -0
  105. data/spec/rest/client_spec.rb +168 -58
  106. data/spec/util/configuration_spec.rb +12 -0
  107. data/twilio-ruby.gemspec +1 -1
  108. metadata +63 -23
  109. data/lib/twilio-ruby/rest/authy.rb +0 -55
  110. data/lib/twilio-ruby/rest/authy/v1.rb +0 -59
  111. data/spec/integration/authy/v1/service/entity_spec.rb +0 -201
  112. data/spec/integration/authy/v1/service_spec.rb +0 -231
  113. data/spec/integration/autopilot/v1/assistant/export_assistant_spec.rb +0 -49
@@ -0,0 +1,352 @@
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 NetworkAccessProfileContext < 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 NetworkAccessProfileNetworkList < ListResource
17
+ ##
18
+ # Initialize the NetworkAccessProfileNetworkList
19
+ # @param [Version] version Version that contains the resource
20
+ # @param [String] network_access_profile_sid The unique string that identifies the
21
+ # Network resource's Network Access Profile resource.
22
+ # @return [NetworkAccessProfileNetworkList] NetworkAccessProfileNetworkList
23
+ def initialize(version, network_access_profile_sid: nil)
24
+ super(version)
25
+
26
+ # Path Solution
27
+ @solution = {network_access_profile_sid: network_access_profile_sid}
28
+ @uri = "/NetworkAccessProfiles/#{@solution[:network_access_profile_sid]}/Networks"
29
+ end
30
+
31
+ ##
32
+ # Lists NetworkAccessProfileNetworkInstance 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 NetworkAccessProfileNetworkInstance 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 NetworkAccessProfileNetworkInstance 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 NetworkAccessProfileNetworkInstance 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 NetworkAccessProfileNetworkInstance
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
+ response = @version.page(
93
+ 'GET',
94
+ @uri,
95
+ params
96
+ )
97
+ NetworkAccessProfileNetworkPage.new(@version, response, @solution)
98
+ end
99
+
100
+ ##
101
+ # Retrieve a single page of NetworkAccessProfileNetworkInstance records from the API.
102
+ # Request is executed immediately.
103
+ # @param [String] target_url API-generated URL for the requested results page
104
+ # @return [Page] Page of NetworkAccessProfileNetworkInstance
105
+ def get_page(target_url)
106
+ response = @version.domain.request(
107
+ 'GET',
108
+ target_url
109
+ )
110
+ NetworkAccessProfileNetworkPage.new(@version, response, @solution)
111
+ end
112
+
113
+ ##
114
+ # Retrieve a single page of NetworkAccessProfileNetworkInstance records from the API.
115
+ # Request is executed immediately.
116
+ # @param [String] network The SID of the Network resource to be added to the
117
+ # Network Access Profile resource.
118
+ # @return [NetworkAccessProfileNetworkInstance] Newly created NetworkAccessProfileNetworkInstance
119
+ def create(network: nil)
120
+ data = Twilio::Values.of({'Network' => network, })
121
+
122
+ payload = @version.create(
123
+ 'POST',
124
+ @uri,
125
+ data: data
126
+ )
127
+
128
+ NetworkAccessProfileNetworkInstance.new(
129
+ @version,
130
+ payload,
131
+ network_access_profile_sid: @solution[:network_access_profile_sid],
132
+ )
133
+ end
134
+
135
+ ##
136
+ # Provide a user friendly representation
137
+ def to_s
138
+ '#<Twilio.Supersim.V1.NetworkAccessProfileNetworkList>'
139
+ end
140
+ end
141
+
142
+ ##
143
+ # 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.
144
+ class NetworkAccessProfileNetworkPage < Page
145
+ ##
146
+ # Initialize the NetworkAccessProfileNetworkPage
147
+ # @param [Version] version Version that contains the resource
148
+ # @param [Response] response Response from the API
149
+ # @param [Hash] solution Path solution for the resource
150
+ # @return [NetworkAccessProfileNetworkPage] NetworkAccessProfileNetworkPage
151
+ def initialize(version, response, solution)
152
+ super(version, response)
153
+
154
+ # Path Solution
155
+ @solution = solution
156
+ end
157
+
158
+ ##
159
+ # Build an instance of NetworkAccessProfileNetworkInstance
160
+ # @param [Hash] payload Payload response from the API
161
+ # @return [NetworkAccessProfileNetworkInstance] NetworkAccessProfileNetworkInstance
162
+ def get_instance(payload)
163
+ NetworkAccessProfileNetworkInstance.new(
164
+ @version,
165
+ payload,
166
+ network_access_profile_sid: @solution[:network_access_profile_sid],
167
+ )
168
+ end
169
+
170
+ ##
171
+ # Provide a user friendly representation
172
+ def to_s
173
+ '<Twilio.Supersim.V1.NetworkAccessProfileNetworkPage>'
174
+ end
175
+ end
176
+
177
+ ##
178
+ # 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.
179
+ class NetworkAccessProfileNetworkContext < InstanceContext
180
+ ##
181
+ # Initialize the NetworkAccessProfileNetworkContext
182
+ # @param [Version] version Version that contains the resource
183
+ # @param [String] network_access_profile_sid The unique string that identifies the
184
+ # Network Access Profile resource.
185
+ # @param [String] sid The SID of the Network resource to fetch.
186
+ # @return [NetworkAccessProfileNetworkContext] NetworkAccessProfileNetworkContext
187
+ def initialize(version, network_access_profile_sid, sid)
188
+ super(version)
189
+
190
+ # Path Solution
191
+ @solution = {network_access_profile_sid: network_access_profile_sid, sid: sid, }
192
+ @uri = "/NetworkAccessProfiles/#{@solution[:network_access_profile_sid]}/Networks/#{@solution[:sid]}"
193
+ end
194
+
195
+ ##
196
+ # Deletes the NetworkAccessProfileNetworkInstance
197
+ # @return [Boolean] true if delete succeeds, false otherwise
198
+ def delete
199
+ @version.delete('delete', @uri)
200
+ end
201
+
202
+ ##
203
+ # Fetch a NetworkAccessProfileNetworkInstance
204
+ # @return [NetworkAccessProfileNetworkInstance] Fetched NetworkAccessProfileNetworkInstance
205
+ def fetch
206
+ params = Twilio::Values.of({})
207
+
208
+ payload = @version.fetch(
209
+ 'GET',
210
+ @uri,
211
+ params,
212
+ )
213
+
214
+ NetworkAccessProfileNetworkInstance.new(
215
+ @version,
216
+ payload,
217
+ network_access_profile_sid: @solution[:network_access_profile_sid],
218
+ sid: @solution[:sid],
219
+ )
220
+ end
221
+
222
+ ##
223
+ # Provide a user friendly representation
224
+ def to_s
225
+ context = @solution.map {|k, v| "#{k}: #{v}"}.join(',')
226
+ "#<Twilio.Supersim.V1.NetworkAccessProfileNetworkContext #{context}>"
227
+ end
228
+
229
+ ##
230
+ # Provide a detailed, user friendly representation
231
+ def inspect
232
+ context = @solution.map {|k, v| "#{k}: #{v}"}.join(',')
233
+ "#<Twilio.Supersim.V1.NetworkAccessProfileNetworkContext #{context}>"
234
+ end
235
+ end
236
+
237
+ ##
238
+ # 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.
239
+ class NetworkAccessProfileNetworkInstance < InstanceResource
240
+ ##
241
+ # Initialize the NetworkAccessProfileNetworkInstance
242
+ # @param [Version] version Version that contains the resource
243
+ # @param [Hash] payload payload that contains response from Twilio
244
+ # @param [String] network_access_profile_sid The unique string that identifies the
245
+ # Network resource's Network Access Profile resource.
246
+ # @param [String] sid The SID of the Network resource to fetch.
247
+ # @return [NetworkAccessProfileNetworkInstance] NetworkAccessProfileNetworkInstance
248
+ def initialize(version, payload, network_access_profile_sid: nil, sid: nil)
249
+ super(version)
250
+
251
+ # Marshaled Properties
252
+ @properties = {
253
+ 'sid' => payload['sid'],
254
+ 'network_access_profile_sid' => payload['network_access_profile_sid'],
255
+ 'friendly_name' => payload['friendly_name'],
256
+ 'iso_country' => payload['iso_country'],
257
+ 'identifiers' => payload['identifiers'],
258
+ 'url' => payload['url'],
259
+ }
260
+
261
+ # Context
262
+ @instance_context = nil
263
+ @params = {
264
+ 'network_access_profile_sid' => network_access_profile_sid,
265
+ 'sid' => sid || @properties['sid'],
266
+ }
267
+ end
268
+
269
+ ##
270
+ # Generate an instance context for the instance, the context is capable of
271
+ # performing various actions. All instance actions are proxied to the context
272
+ # @return [NetworkAccessProfileNetworkContext] NetworkAccessProfileNetworkContext for this NetworkAccessProfileNetworkInstance
273
+ def context
274
+ unless @instance_context
275
+ @instance_context = NetworkAccessProfileNetworkContext.new(
276
+ @version,
277
+ @params['network_access_profile_sid'],
278
+ @params['sid'],
279
+ )
280
+ end
281
+ @instance_context
282
+ end
283
+
284
+ ##
285
+ # @return [String] The unique string that identifies the resource
286
+ def sid
287
+ @properties['sid']
288
+ end
289
+
290
+ ##
291
+ # @return [String] The unique string that identifies the Network Access Profile resource
292
+ def network_access_profile_sid
293
+ @properties['network_access_profile_sid']
294
+ end
295
+
296
+ ##
297
+ # @return [String] A human readable identifier of this resource
298
+ def friendly_name
299
+ @properties['friendly_name']
300
+ end
301
+
302
+ ##
303
+ # @return [String] The ISO country code of the Network resource
304
+ def iso_country
305
+ @properties['iso_country']
306
+ end
307
+
308
+ ##
309
+ # @return [Hash] The MCC/MNCs included in the resource
310
+ def identifiers
311
+ @properties['identifiers']
312
+ end
313
+
314
+ ##
315
+ # @return [String] The absolute URL of the resource
316
+ def url
317
+ @properties['url']
318
+ end
319
+
320
+ ##
321
+ # Deletes the NetworkAccessProfileNetworkInstance
322
+ # @return [Boolean] true if delete succeeds, false otherwise
323
+ def delete
324
+ context.delete
325
+ end
326
+
327
+ ##
328
+ # Fetch a NetworkAccessProfileNetworkInstance
329
+ # @return [NetworkAccessProfileNetworkInstance] Fetched NetworkAccessProfileNetworkInstance
330
+ def fetch
331
+ context.fetch
332
+ end
333
+
334
+ ##
335
+ # Provide a user friendly representation
336
+ def to_s
337
+ values = @params.map{|k, v| "#{k}: #{v}"}.join(" ")
338
+ "<Twilio.Supersim.V1.NetworkAccessProfileNetworkInstance #{values}>"
339
+ end
340
+
341
+ ##
342
+ # Provide a detailed, user friendly representation
343
+ def inspect
344
+ values = @properties.map{|k, v| "#{k}: #{v}"}.join(" ")
345
+ "<Twilio.Supersim.V1.NetworkAccessProfileNetworkInstance #{values}>"
346
+ end
347
+ end
348
+ end
349
+ end
350
+ end
351
+ end
352
+ end
@@ -28,6 +28,15 @@ module Twilio
28
28
  @v2 ||= V2.new self
29
29
  end
30
30
 
31
+ ##
32
+ # @param [form.FormTypes] form_type The Type of this Form. One of `form-app-push`,
33
+ # `form-sms` or `form-totp`.
34
+ # @return [Twilio::REST::Verify::V2::FormInstance] if form_type was passed.
35
+ # @return [Twilio::REST::Verify::V2::FormList]
36
+ def forms(form_type=:unset)
37
+ self.v2.forms(form_type)
38
+ end
39
+
31
40
  ##
32
41
  # @param [String] sid The unique string that we created to identify the Service
33
42
  # resource.
@@ -15,9 +15,25 @@ module Twilio
15
15
  def initialize(domain)
16
16
  super
17
17
  @version = 'v2'
18
+ @forms = nil
18
19
  @services = nil
19
20
  end
20
21
 
22
+ ##
23
+ # @param [form.FormTypes] form_type The Type of this Form. One of `form-app-push`,
24
+ # `form-sms` or `form-totp`.
25
+ # @return [Twilio::REST::Verify::V2::FormContext] if form_type was passed.
26
+ # @return [Twilio::REST::Verify::V2::FormList]
27
+ def forms(form_type=:unset)
28
+ if form_type.nil?
29
+ raise ArgumentError, 'form_type cannot be nil'
30
+ elsif form_type == :unset
31
+ @forms ||= FormList.new self
32
+ else
33
+ FormContext.new(self, form_type)
34
+ end
35
+ end
36
+
21
37
  ##
22
38
  # @param [String] sid The Twilio-provided string that uniquely identifies the
23
39
  # Verification Service resource to fetch.
@@ -8,8 +8,8 @@
8
8
 
9
9
  module Twilio
10
10
  module REST
11
- class Authy < Domain
12
- class V1 < Version
11
+ class Verify < Domain
12
+ class V2 < Version
13
13
  ##
14
14
  # 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.
15
15
  class FormList < ListResource
@@ -27,7 +27,7 @@ module Twilio
27
27
  ##
28
28
  # Provide a user friendly representation
29
29
  def to_s
30
- '#<Twilio.Authy.V1.FormList>'
30
+ '#<Twilio.Verify.V2.FormList>'
31
31
  end
32
32
  end
33
33
 
@@ -58,7 +58,7 @@ module Twilio
58
58
  ##
59
59
  # Provide a user friendly representation
60
60
  def to_s
61
- '<Twilio.Authy.V1.FormPage>'
61
+ '<Twilio.Verify.V2.FormPage>'
62
62
  end
63
63
  end
64
64
 
@@ -98,14 +98,14 @@ module Twilio
98
98
  # Provide a user friendly representation
99
99
  def to_s
100
100
  context = @solution.map {|k, v| "#{k}: #{v}"}.join(',')
101
- "#<Twilio.Authy.V1.FormContext #{context}>"
101
+ "#<Twilio.Verify.V2.FormContext #{context}>"
102
102
  end
103
103
 
104
104
  ##
105
105
  # Provide a detailed, user friendly representation
106
106
  def inspect
107
107
  context = @solution.map {|k, v| "#{k}: #{v}"}.join(',')
108
- "#<Twilio.Authy.V1.FormContext #{context}>"
108
+ "#<Twilio.Verify.V2.FormContext #{context}>"
109
109
  end
110
110
  end
111
111
 
@@ -181,14 +181,14 @@ module Twilio
181
181
  # Provide a user friendly representation
182
182
  def to_s
183
183
  values = @params.map{|k, v| "#{k}: #{v}"}.join(" ")
184
- "<Twilio.Authy.V1.FormInstance #{values}>"
184
+ "<Twilio.Verify.V2.FormInstance #{values}>"
185
185
  end
186
186
 
187
187
  ##
188
188
  # Provide a detailed, user friendly representation
189
189
  def inspect
190
190
  values = @properties.map{|k, v| "#{k}: #{v}"}.join(" ")
191
- "<Twilio.Authy.V1.FormInstance #{values}>"
191
+ "<Twilio.Verify.V2.FormInstance #{values}>"
192
192
  end
193
193
  end
194
194
  end