twilio-ruby 6.2.0 → 6.3.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.
@@ -0,0 +1,751 @@
1
+ ##
2
+ # This code was generated by
3
+ # ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
4
+ # | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
5
+ # | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
6
+ #
7
+ # Twilio - Messaging
8
+ # This is the public Twilio REST API.
9
+ #
10
+ # NOTE: This class is auto generated by OpenAPI Generator.
11
+ # https://openapi-generator.tech
12
+ # Do not edit the class manually.
13
+ #
14
+
15
+
16
+ module Twilio
17
+ module REST
18
+ class Messaging < MessagingBase
19
+ class V1 < Version
20
+ class TollfreeVerificationList < ListResource
21
+ ##
22
+ # Initialize the TollfreeVerificationList
23
+ # @param [Version] version Version that contains the resource
24
+ # @return [TollfreeVerificationList] TollfreeVerificationList
25
+ def initialize(version)
26
+ super(version)
27
+ # Path Solution
28
+ @solution = { }
29
+ @uri = "/Tollfree/Verifications"
30
+
31
+ end
32
+ ##
33
+ # Create the TollfreeVerificationInstance
34
+ # @param [String] business_name The name of the business or organization using the Tollfree number.
35
+ # @param [String] business_website The website of the business or organization using the Tollfree number.
36
+ # @param [String] notification_email The email address to receive the notification about the verification result. .
37
+ # @param [Array[String]] use_case_categories The category of the use case for the Tollfree Number. List as many are applicable..
38
+ # @param [String] use_case_summary Use this to further explain how messaging is used by the business or organization.
39
+ # @param [String] production_message_sample An example of message content, i.e. a sample message.
40
+ # @param [Array[String]] opt_in_image_urls Link to an image that shows the opt-in workflow. Multiple images allowed and must be a publicly hosted URL.
41
+ # @param [OptInType] opt_in_type
42
+ # @param [String] message_volume Estimate monthly volume of messages from the Tollfree Number.
43
+ # @param [String] tollfree_phone_number_sid The SID of the Phone Number associated with the Tollfree Verification.
44
+ # @param [String] customer_profile_sid Customer's Profile Bundle BundleSid.
45
+ # @param [String] business_street_address The address of the business or organization using the Tollfree number.
46
+ # @param [String] business_street_address2 The address of the business or organization using the Tollfree number.
47
+ # @param [String] business_city The city of the business or organization using the Tollfree number.
48
+ # @param [String] business_state_province_region The state/province/region of the business or organization using the Tollfree number.
49
+ # @param [String] business_postal_code The postal code of the business or organization using the Tollfree number.
50
+ # @param [String] business_country The country of the business or organization using the Tollfree number.
51
+ # @param [String] additional_information Additional information to be provided for verification.
52
+ # @param [String] business_contact_first_name The first name of the contact for the business or organization using the Tollfree number.
53
+ # @param [String] business_contact_last_name The last name of the contact for the business or organization using the Tollfree number.
54
+ # @param [String] business_contact_email The email address of the contact for the business or organization using the Tollfree number.
55
+ # @param [String] business_contact_phone The phone number of the contact for the business or organization using the Tollfree number.
56
+ # @param [String] external_reference_id An optional external reference ID supplied by customer and echoed back on status retrieval.
57
+ # @return [TollfreeVerificationInstance] Created TollfreeVerificationInstance
58
+ def create(
59
+ business_name: nil,
60
+ business_website: nil,
61
+ notification_email: nil,
62
+ use_case_categories: nil,
63
+ use_case_summary: nil,
64
+ production_message_sample: nil,
65
+ opt_in_image_urls: nil,
66
+ opt_in_type: nil,
67
+ message_volume: nil,
68
+ tollfree_phone_number_sid: nil,
69
+ customer_profile_sid: :unset,
70
+ business_street_address: :unset,
71
+ business_street_address2: :unset,
72
+ business_city: :unset,
73
+ business_state_province_region: :unset,
74
+ business_postal_code: :unset,
75
+ business_country: :unset,
76
+ additional_information: :unset,
77
+ business_contact_first_name: :unset,
78
+ business_contact_last_name: :unset,
79
+ business_contact_email: :unset,
80
+ business_contact_phone: :unset,
81
+ external_reference_id: :unset
82
+ )
83
+
84
+ data = Twilio::Values.of({
85
+ 'BusinessName' => business_name,
86
+ 'BusinessWebsite' => business_website,
87
+ 'NotificationEmail' => notification_email,
88
+ 'UseCaseCategories' => Twilio.serialize_list(use_case_categories) { |e| e },
89
+ 'UseCaseSummary' => use_case_summary,
90
+ 'ProductionMessageSample' => production_message_sample,
91
+ 'OptInImageUrls' => Twilio.serialize_list(opt_in_image_urls) { |e| e },
92
+ 'OptInType' => opt_in_type,
93
+ 'MessageVolume' => message_volume,
94
+ 'TollfreePhoneNumberSid' => tollfree_phone_number_sid,
95
+ 'CustomerProfileSid' => customer_profile_sid,
96
+ 'BusinessStreetAddress' => business_street_address,
97
+ 'BusinessStreetAddress2' => business_street_address2,
98
+ 'BusinessCity' => business_city,
99
+ 'BusinessStateProvinceRegion' => business_state_province_region,
100
+ 'BusinessPostalCode' => business_postal_code,
101
+ 'BusinessCountry' => business_country,
102
+ 'AdditionalInformation' => additional_information,
103
+ 'BusinessContactFirstName' => business_contact_first_name,
104
+ 'BusinessContactLastName' => business_contact_last_name,
105
+ 'BusinessContactEmail' => business_contact_email,
106
+ 'BusinessContactPhone' => business_contact_phone,
107
+ 'ExternalReferenceId' => external_reference_id,
108
+ })
109
+
110
+ payload = @version.create('POST', @uri, data: data)
111
+ TollfreeVerificationInstance.new(
112
+ @version,
113
+ payload,
114
+ )
115
+ end
116
+
117
+
118
+ ##
119
+ # Lists TollfreeVerificationInstance records from the API as a list.
120
+ # Unlike stream(), this operation is eager and will load `limit` records into
121
+ # memory before returning.
122
+ # @param [String] tollfree_phone_number_sid The SID of the Phone Number associated with the Tollfree Verification.
123
+ # @param [Status] status The compliance status of the Tollfree Verification record.
124
+ # @param [Integer] limit Upper limit for the number of records to return. stream()
125
+ # guarantees to never return more than limit. Default is no limit
126
+ # @param [Integer] page_size Number of records to fetch per request, when
127
+ # not set will use the default value of 50 records. If no page_size is defined
128
+ # but a limit is defined, stream() will attempt to read the limit with the most
129
+ # efficient page size, i.e. min(limit, 1000)
130
+ # @return [Array] Array of up to limit results
131
+ def list(tollfree_phone_number_sid: :unset, status: :unset, limit: nil, page_size: nil)
132
+ self.stream(
133
+ tollfree_phone_number_sid: tollfree_phone_number_sid,
134
+ status: status,
135
+ limit: limit,
136
+ page_size: page_size
137
+ ).entries
138
+ end
139
+
140
+ ##
141
+ # Streams Instance records from the API as an Enumerable.
142
+ # This operation lazily loads records as efficiently as possible until the limit
143
+ # is reached.
144
+ # @param [String] tollfree_phone_number_sid The SID of the Phone Number associated with the Tollfree Verification.
145
+ # @param [Status] status The compliance status of the Tollfree Verification record.
146
+ # @param [Integer] limit Upper limit for the number of records to return. stream()
147
+ # guarantees to never return more than limit. Default is no limit
148
+ # @param [Integer] page_size Number of records to fetch per request, when
149
+ # not set will use the default value of 50 records. If no page_size is defined
150
+ # but a limit is defined, stream() will attempt to read the limit with the most
151
+ # efficient page size, i.e. min(limit, 1000)
152
+ # @return [Enumerable] Enumerable that will yield up to limit results
153
+ def stream(tollfree_phone_number_sid: :unset, status: :unset, limit: nil, page_size: nil)
154
+ limits = @version.read_limits(limit, page_size)
155
+
156
+ page = self.page(
157
+ tollfree_phone_number_sid: tollfree_phone_number_sid,
158
+ status: status,
159
+ page_size: limits[:page_size], )
160
+
161
+ @version.stream(page, limit: limits[:limit], page_limit: limits[:page_limit])
162
+ end
163
+
164
+ ##
165
+ # When passed a block, yields TollfreeVerificationInstance records from the API.
166
+ # This operation lazily loads records as efficiently as possible until the limit
167
+ # is reached.
168
+ def each
169
+ limits = @version.read_limits
170
+
171
+ page = self.page(page_size: limits[:page_size], )
172
+
173
+ @version.stream(page,
174
+ limit: limits[:limit],
175
+ page_limit: limits[:page_limit]).each {|x| yield x}
176
+ end
177
+
178
+ ##
179
+ # Retrieve a single page of TollfreeVerificationInstance records from the API.
180
+ # Request is executed immediately.
181
+ # @param [String] tollfree_phone_number_sid The SID of the Phone Number associated with the Tollfree Verification.
182
+ # @param [Status] status The compliance status of the Tollfree Verification record.
183
+ # @param [String] page_token PageToken provided by the API
184
+ # @param [Integer] page_number Page Number, this value is simply for client state
185
+ # @param [Integer] page_size Number of records to return, defaults to 50
186
+ # @return [Page] Page of TollfreeVerificationInstance
187
+ def page(tollfree_phone_number_sid: :unset, status: :unset, page_token: :unset, page_number: :unset, page_size: :unset)
188
+ params = Twilio::Values.of({
189
+
190
+ 'TollfreePhoneNumberSid' => tollfree_phone_number_sid,
191
+
192
+ 'Status' => status,
193
+
194
+ 'PageToken' => page_token,
195
+ 'Page' => page_number,
196
+ 'PageSize' => page_size,
197
+ })
198
+
199
+ response = @version.page('GET', @uri, params: params)
200
+
201
+ TollfreeVerificationPage.new(@version, response, @solution)
202
+ end
203
+
204
+ ##
205
+ # Retrieve a single page of TollfreeVerificationInstance records from the API.
206
+ # Request is executed immediately.
207
+ # @param [String] target_url API-generated URL for the requested results page
208
+ # @return [Page] Page of TollfreeVerificationInstance
209
+ def get_page(target_url)
210
+ response = @version.domain.request(
211
+ 'GET',
212
+ target_url
213
+ )
214
+ TollfreeVerificationPage.new(@version, response, @solution)
215
+ end
216
+
217
+
218
+
219
+ # Provide a user friendly representation
220
+ def to_s
221
+ '#<Twilio.Messaging.V1.TollfreeVerificationList>'
222
+ end
223
+ end
224
+
225
+
226
+ ##
227
+ #PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution.
228
+ class TollfreeVerificationContext < InstanceContext
229
+ ##
230
+ # Initialize the TollfreeVerificationContext
231
+ # @param [Version] version Version that contains the resource
232
+ # @param [String] sid The unique string to identify Tollfree Verification.
233
+ # @return [TollfreeVerificationContext] TollfreeVerificationContext
234
+ def initialize(version, sid)
235
+ super(version)
236
+
237
+ # Path Solution
238
+ @solution = { sid: sid, }
239
+ @uri = "/Tollfree/Verifications/#{@solution[:sid]}"
240
+
241
+
242
+ end
243
+ ##
244
+ # Fetch the TollfreeVerificationInstance
245
+ # @return [TollfreeVerificationInstance] Fetched TollfreeVerificationInstance
246
+ def fetch
247
+
248
+ payload = @version.fetch('GET', @uri)
249
+ TollfreeVerificationInstance.new(
250
+ @version,
251
+ payload,
252
+ sid: @solution[:sid],
253
+ )
254
+ end
255
+
256
+ ##
257
+ # Update the TollfreeVerificationInstance
258
+ # @param [String] business_name The name of the business or organization using the Tollfree number.
259
+ # @param [String] business_website The website of the business or organization using the Tollfree number.
260
+ # @param [String] notification_email The email address to receive the notification about the verification result. .
261
+ # @param [Array[String]] use_case_categories The category of the use case for the Tollfree Number. List as many are applicable..
262
+ # @param [String] use_case_summary Use this to further explain how messaging is used by the business or organization.
263
+ # @param [String] production_message_sample An example of message content, i.e. a sample message.
264
+ # @param [Array[String]] opt_in_image_urls Link to an image that shows the opt-in workflow. Multiple images allowed and must be a publicly hosted URL.
265
+ # @param [OptInType] opt_in_type
266
+ # @param [String] message_volume Estimate monthly volume of messages from the Tollfree Number.
267
+ # @param [String] business_street_address The address of the business or organization using the Tollfree number.
268
+ # @param [String] business_street_address2 The address of the business or organization using the Tollfree number.
269
+ # @param [String] business_city The city of the business or organization using the Tollfree number.
270
+ # @param [String] business_state_province_region The state/province/region of the business or organization using the Tollfree number.
271
+ # @param [String] business_postal_code The postal code of the business or organization using the Tollfree number.
272
+ # @param [String] business_country The country of the business or organization using the Tollfree number.
273
+ # @param [String] additional_information Additional information to be provided for verification.
274
+ # @param [String] business_contact_first_name The first name of the contact for the business or organization using the Tollfree number.
275
+ # @param [String] business_contact_last_name The last name of the contact for the business or organization using the Tollfree number.
276
+ # @param [String] business_contact_email The email address of the contact for the business or organization using the Tollfree number.
277
+ # @param [String] business_contact_phone The phone number of the contact for the business or organization using the Tollfree number.
278
+ # @return [TollfreeVerificationInstance] Updated TollfreeVerificationInstance
279
+ def update(
280
+ business_name: :unset,
281
+ business_website: :unset,
282
+ notification_email: :unset,
283
+ use_case_categories: :unset,
284
+ use_case_summary: :unset,
285
+ production_message_sample: :unset,
286
+ opt_in_image_urls: :unset,
287
+ opt_in_type: :unset,
288
+ message_volume: :unset,
289
+ business_street_address: :unset,
290
+ business_street_address2: :unset,
291
+ business_city: :unset,
292
+ business_state_province_region: :unset,
293
+ business_postal_code: :unset,
294
+ business_country: :unset,
295
+ additional_information: :unset,
296
+ business_contact_first_name: :unset,
297
+ business_contact_last_name: :unset,
298
+ business_contact_email: :unset,
299
+ business_contact_phone: :unset
300
+ )
301
+
302
+ data = Twilio::Values.of({
303
+ 'BusinessName' => business_name,
304
+ 'BusinessWebsite' => business_website,
305
+ 'NotificationEmail' => notification_email,
306
+ 'UseCaseCategories' => Twilio.serialize_list(use_case_categories) { |e| e },
307
+ 'UseCaseSummary' => use_case_summary,
308
+ 'ProductionMessageSample' => production_message_sample,
309
+ 'OptInImageUrls' => Twilio.serialize_list(opt_in_image_urls) { |e| e },
310
+ 'OptInType' => opt_in_type,
311
+ 'MessageVolume' => message_volume,
312
+ 'BusinessStreetAddress' => business_street_address,
313
+ 'BusinessStreetAddress2' => business_street_address2,
314
+ 'BusinessCity' => business_city,
315
+ 'BusinessStateProvinceRegion' => business_state_province_region,
316
+ 'BusinessPostalCode' => business_postal_code,
317
+ 'BusinessCountry' => business_country,
318
+ 'AdditionalInformation' => additional_information,
319
+ 'BusinessContactFirstName' => business_contact_first_name,
320
+ 'BusinessContactLastName' => business_contact_last_name,
321
+ 'BusinessContactEmail' => business_contact_email,
322
+ 'BusinessContactPhone' => business_contact_phone,
323
+ })
324
+
325
+ payload = @version.update('POST', @uri, data: data)
326
+ TollfreeVerificationInstance.new(
327
+ @version,
328
+ payload,
329
+ sid: @solution[:sid],
330
+ )
331
+ end
332
+
333
+
334
+ ##
335
+ # Provide a user friendly representation
336
+ def to_s
337
+ context = @solution.map{|k, v| "#{k}: #{v}"}.join(',')
338
+ "#<Twilio.Messaging.V1.TollfreeVerificationContext #{context}>"
339
+ end
340
+
341
+ ##
342
+ # Provide a detailed, user friendly representation
343
+ def inspect
344
+ context = @solution.map{|k, v| "#{k}: #{v}"}.join(',')
345
+ "#<Twilio.Messaging.V1.TollfreeVerificationContext #{context}>"
346
+ end
347
+ end
348
+
349
+ class TollfreeVerificationPage < Page
350
+ ##
351
+ # Initialize the TollfreeVerificationPage
352
+ # @param [Version] version Version that contains the resource
353
+ # @param [Response] response Response from the API
354
+ # @param [Hash] solution Path solution for the resource
355
+ # @return [TollfreeVerificationPage] TollfreeVerificationPage
356
+ def initialize(version, response, solution)
357
+ super(version, response)
358
+
359
+ # Path Solution
360
+ @solution = solution
361
+ end
362
+
363
+ ##
364
+ # Build an instance of TollfreeVerificationInstance
365
+ # @param [Hash] payload Payload response from the API
366
+ # @return [TollfreeVerificationInstance] TollfreeVerificationInstance
367
+ def get_instance(payload)
368
+ TollfreeVerificationInstance.new(@version, payload)
369
+ end
370
+
371
+ ##
372
+ # Provide a user friendly representation
373
+ def to_s
374
+ '<Twilio.Messaging.V1.TollfreeVerificationPage>'
375
+ end
376
+ end
377
+ class TollfreeVerificationInstance < InstanceResource
378
+ ##
379
+ # Initialize the TollfreeVerificationInstance
380
+ # @param [Version] version Version that contains the resource
381
+ # @param [Hash] payload payload that contains response from Twilio
382
+ # @param [String] account_sid The SID of the
383
+ # {Account}[https://www.twilio.com/docs/iam/api/account] that created this TollfreeVerification
384
+ # resource.
385
+ # @param [String] sid The SID of the Call resource to fetch.
386
+ # @return [TollfreeVerificationInstance] TollfreeVerificationInstance
387
+ def initialize(version, payload , sid: nil)
388
+ super(version)
389
+
390
+ # Marshaled Properties
391
+ @properties = {
392
+ 'sid' => payload['sid'],
393
+ 'account_sid' => payload['account_sid'],
394
+ 'customer_profile_sid' => payload['customer_profile_sid'],
395
+ 'trust_product_sid' => payload['trust_product_sid'],
396
+ 'date_created' => Twilio.deserialize_iso8601_datetime(payload['date_created']),
397
+ 'date_updated' => Twilio.deserialize_iso8601_datetime(payload['date_updated']),
398
+ 'regulated_item_sid' => payload['regulated_item_sid'],
399
+ 'business_name' => payload['business_name'],
400
+ 'business_street_address' => payload['business_street_address'],
401
+ 'business_street_address2' => payload['business_street_address2'],
402
+ 'business_city' => payload['business_city'],
403
+ 'business_state_province_region' => payload['business_state_province_region'],
404
+ 'business_postal_code' => payload['business_postal_code'],
405
+ 'business_country' => payload['business_country'],
406
+ 'business_website' => payload['business_website'],
407
+ 'business_contact_first_name' => payload['business_contact_first_name'],
408
+ 'business_contact_last_name' => payload['business_contact_last_name'],
409
+ 'business_contact_email' => payload['business_contact_email'],
410
+ 'business_contact_phone' => payload['business_contact_phone'],
411
+ 'notification_email' => payload['notification_email'],
412
+ 'use_case_categories' => payload['use_case_categories'],
413
+ 'use_case_summary' => payload['use_case_summary'],
414
+ 'production_message_sample' => payload['production_message_sample'],
415
+ 'opt_in_image_urls' => payload['opt_in_image_urls'],
416
+ 'opt_in_type' => payload['opt_in_type'],
417
+ 'message_volume' => payload['message_volume'],
418
+ 'additional_information' => payload['additional_information'],
419
+ 'tollfree_phone_number_sid' => payload['tollfree_phone_number_sid'],
420
+ 'status' => payload['status'],
421
+ 'url' => payload['url'],
422
+ 'rejection_reason' => payload['rejection_reason'],
423
+ 'error_code' => payload['error_code'] == nil ? payload['error_code'] : payload['error_code'].to_i,
424
+ 'edit_expiration' => Twilio.deserialize_iso8601_datetime(payload['edit_expiration']),
425
+ 'resource_links' => payload['resource_links'],
426
+ 'external_reference_id' => payload['external_reference_id'],
427
+ }
428
+
429
+ # Context
430
+ @instance_context = nil
431
+ @params = { 'sid' => sid || @properties['sid'] , }
432
+ end
433
+
434
+ ##
435
+ # Generate an instance context for the instance, the context is capable of
436
+ # performing various actions. All instance actions are proxied to the context
437
+ # @return [TollfreeVerificationContext] CallContext for this CallInstance
438
+ def context
439
+ unless @instance_context
440
+ @instance_context = TollfreeVerificationContext.new(@version , @params['sid'])
441
+ end
442
+ @instance_context
443
+ end
444
+
445
+ ##
446
+ # @return [String] The unique string to identify Tollfree Verification.
447
+ def sid
448
+ @properties['sid']
449
+ end
450
+
451
+ ##
452
+ # @return [String] The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Tollfree Verification resource.
453
+ def account_sid
454
+ @properties['account_sid']
455
+ end
456
+
457
+ ##
458
+ # @return [String] Customer's Profile Bundle BundleSid.
459
+ def customer_profile_sid
460
+ @properties['customer_profile_sid']
461
+ end
462
+
463
+ ##
464
+ # @return [String] Tollfree TrustProduct Bundle BundleSid.
465
+ def trust_product_sid
466
+ @properties['trust_product_sid']
467
+ end
468
+
469
+ ##
470
+ # @return [Time] The date and time in GMT when the resource was created specified in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.
471
+ def date_created
472
+ @properties['date_created']
473
+ end
474
+
475
+ ##
476
+ # @return [Time] The date and time in GMT when the resource was last updated specified in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.
477
+ def date_updated
478
+ @properties['date_updated']
479
+ end
480
+
481
+ ##
482
+ # @return [String] The SID of the Regulated Item.
483
+ def regulated_item_sid
484
+ @properties['regulated_item_sid']
485
+ end
486
+
487
+ ##
488
+ # @return [String] The name of the business or organization using the Tollfree number.
489
+ def business_name
490
+ @properties['business_name']
491
+ end
492
+
493
+ ##
494
+ # @return [String] The address of the business or organization using the Tollfree number.
495
+ def business_street_address
496
+ @properties['business_street_address']
497
+ end
498
+
499
+ ##
500
+ # @return [String] The address of the business or organization using the Tollfree number.
501
+ def business_street_address2
502
+ @properties['business_street_address2']
503
+ end
504
+
505
+ ##
506
+ # @return [String] The city of the business or organization using the Tollfree number.
507
+ def business_city
508
+ @properties['business_city']
509
+ end
510
+
511
+ ##
512
+ # @return [String] The state/province/region of the business or organization using the Tollfree number.
513
+ def business_state_province_region
514
+ @properties['business_state_province_region']
515
+ end
516
+
517
+ ##
518
+ # @return [String] The postal code of the business or organization using the Tollfree number.
519
+ def business_postal_code
520
+ @properties['business_postal_code']
521
+ end
522
+
523
+ ##
524
+ # @return [String] The country of the business or organization using the Tollfree number.
525
+ def business_country
526
+ @properties['business_country']
527
+ end
528
+
529
+ ##
530
+ # @return [String] The website of the business or organization using the Tollfree number.
531
+ def business_website
532
+ @properties['business_website']
533
+ end
534
+
535
+ ##
536
+ # @return [String] The first name of the contact for the business or organization using the Tollfree number.
537
+ def business_contact_first_name
538
+ @properties['business_contact_first_name']
539
+ end
540
+
541
+ ##
542
+ # @return [String] The last name of the contact for the business or organization using the Tollfree number.
543
+ def business_contact_last_name
544
+ @properties['business_contact_last_name']
545
+ end
546
+
547
+ ##
548
+ # @return [String] The email address of the contact for the business or organization using the Tollfree number.
549
+ def business_contact_email
550
+ @properties['business_contact_email']
551
+ end
552
+
553
+ ##
554
+ # @return [String] The phone number of the contact for the business or organization using the Tollfree number.
555
+ def business_contact_phone
556
+ @properties['business_contact_phone']
557
+ end
558
+
559
+ ##
560
+ # @return [String] The email address to receive the notification about the verification result. .
561
+ def notification_email
562
+ @properties['notification_email']
563
+ end
564
+
565
+ ##
566
+ # @return [Array<String>] The category of the use case for the Tollfree Number. List as many are applicable..
567
+ def use_case_categories
568
+ @properties['use_case_categories']
569
+ end
570
+
571
+ ##
572
+ # @return [String] Use this to further explain how messaging is used by the business or organization.
573
+ def use_case_summary
574
+ @properties['use_case_summary']
575
+ end
576
+
577
+ ##
578
+ # @return [String] An example of message content, i.e. a sample message.
579
+ def production_message_sample
580
+ @properties['production_message_sample']
581
+ end
582
+
583
+ ##
584
+ # @return [Array<String>] Link to an image that shows the opt-in workflow. Multiple images allowed and must be a publicly hosted URL.
585
+ def opt_in_image_urls
586
+ @properties['opt_in_image_urls']
587
+ end
588
+
589
+ ##
590
+ # @return [OptInType]
591
+ def opt_in_type
592
+ @properties['opt_in_type']
593
+ end
594
+
595
+ ##
596
+ # @return [String] Estimate monthly volume of messages from the Tollfree Number.
597
+ def message_volume
598
+ @properties['message_volume']
599
+ end
600
+
601
+ ##
602
+ # @return [String] Additional information to be provided for verification.
603
+ def additional_information
604
+ @properties['additional_information']
605
+ end
606
+
607
+ ##
608
+ # @return [String] The SID of the Phone Number associated with the Tollfree Verification.
609
+ def tollfree_phone_number_sid
610
+ @properties['tollfree_phone_number_sid']
611
+ end
612
+
613
+ ##
614
+ # @return [Status]
615
+ def status
616
+ @properties['status']
617
+ end
618
+
619
+ ##
620
+ # @return [String] The absolute URL of the Tollfree Verification resource.
621
+ def url
622
+ @properties['url']
623
+ end
624
+
625
+ ##
626
+ # @return [String] The rejection reason given when a Tollfree Verification has been rejected.
627
+ def rejection_reason
628
+ @properties['rejection_reason']
629
+ end
630
+
631
+ ##
632
+ # @return [String] The error code given when a Tollfree Verification has been rejected.
633
+ def error_code
634
+ @properties['error_code']
635
+ end
636
+
637
+ ##
638
+ # @return [Time] The date and time when the ability to edit a rejected verification expires.
639
+ def edit_expiration
640
+ @properties['edit_expiration']
641
+ end
642
+
643
+ ##
644
+ # @return [Hash] The URLs of the documents associated with the Tollfree Verification resource.
645
+ def resource_links
646
+ @properties['resource_links']
647
+ end
648
+
649
+ ##
650
+ # @return [String] An optional external reference ID supplied by customer and echoed back on status retrieval.
651
+ def external_reference_id
652
+ @properties['external_reference_id']
653
+ end
654
+
655
+ ##
656
+ # Fetch the TollfreeVerificationInstance
657
+ # @return [TollfreeVerificationInstance] Fetched TollfreeVerificationInstance
658
+ def fetch
659
+
660
+ context.fetch
661
+ end
662
+
663
+ ##
664
+ # Update the TollfreeVerificationInstance
665
+ # @param [String] business_name The name of the business or organization using the Tollfree number.
666
+ # @param [String] business_website The website of the business or organization using the Tollfree number.
667
+ # @param [String] notification_email The email address to receive the notification about the verification result. .
668
+ # @param [Array[String]] use_case_categories The category of the use case for the Tollfree Number. List as many are applicable..
669
+ # @param [String] use_case_summary Use this to further explain how messaging is used by the business or organization.
670
+ # @param [String] production_message_sample An example of message content, i.e. a sample message.
671
+ # @param [Array[String]] opt_in_image_urls Link to an image that shows the opt-in workflow. Multiple images allowed and must be a publicly hosted URL.
672
+ # @param [OptInType] opt_in_type
673
+ # @param [String] message_volume Estimate monthly volume of messages from the Tollfree Number.
674
+ # @param [String] business_street_address The address of the business or organization using the Tollfree number.
675
+ # @param [String] business_street_address2 The address of the business or organization using the Tollfree number.
676
+ # @param [String] business_city The city of the business or organization using the Tollfree number.
677
+ # @param [String] business_state_province_region The state/province/region of the business or organization using the Tollfree number.
678
+ # @param [String] business_postal_code The postal code of the business or organization using the Tollfree number.
679
+ # @param [String] business_country The country of the business or organization using the Tollfree number.
680
+ # @param [String] additional_information Additional information to be provided for verification.
681
+ # @param [String] business_contact_first_name The first name of the contact for the business or organization using the Tollfree number.
682
+ # @param [String] business_contact_last_name The last name of the contact for the business or organization using the Tollfree number.
683
+ # @param [String] business_contact_email The email address of the contact for the business or organization using the Tollfree number.
684
+ # @param [String] business_contact_phone The phone number of the contact for the business or organization using the Tollfree number.
685
+ # @return [TollfreeVerificationInstance] Updated TollfreeVerificationInstance
686
+ def update(
687
+ business_name: :unset,
688
+ business_website: :unset,
689
+ notification_email: :unset,
690
+ use_case_categories: :unset,
691
+ use_case_summary: :unset,
692
+ production_message_sample: :unset,
693
+ opt_in_image_urls: :unset,
694
+ opt_in_type: :unset,
695
+ message_volume: :unset,
696
+ business_street_address: :unset,
697
+ business_street_address2: :unset,
698
+ business_city: :unset,
699
+ business_state_province_region: :unset,
700
+ business_postal_code: :unset,
701
+ business_country: :unset,
702
+ additional_information: :unset,
703
+ business_contact_first_name: :unset,
704
+ business_contact_last_name: :unset,
705
+ business_contact_email: :unset,
706
+ business_contact_phone: :unset
707
+ )
708
+
709
+ context.update(
710
+ business_name: business_name,
711
+ business_website: business_website,
712
+ notification_email: notification_email,
713
+ use_case_categories: use_case_categories,
714
+ use_case_summary: use_case_summary,
715
+ production_message_sample: production_message_sample,
716
+ opt_in_image_urls: opt_in_image_urls,
717
+ opt_in_type: opt_in_type,
718
+ message_volume: message_volume,
719
+ business_street_address: business_street_address,
720
+ business_street_address2: business_street_address2,
721
+ business_city: business_city,
722
+ business_state_province_region: business_state_province_region,
723
+ business_postal_code: business_postal_code,
724
+ business_country: business_country,
725
+ additional_information: additional_information,
726
+ business_contact_first_name: business_contact_first_name,
727
+ business_contact_last_name: business_contact_last_name,
728
+ business_contact_email: business_contact_email,
729
+ business_contact_phone: business_contact_phone,
730
+ )
731
+ end
732
+
733
+ ##
734
+ # Provide a user friendly representation
735
+ def to_s
736
+ values = @params.map{|k, v| "#{k}: #{v}"}.join(" ")
737
+ "<Twilio.Messaging.V1.TollfreeVerificationInstance #{values}>"
738
+ end
739
+
740
+ ##
741
+ # Provide a detailed, user friendly representation
742
+ def inspect
743
+ values = @properties.map{|k, v| "#{k}: #{v}"}.join(" ")
744
+ "<Twilio.Messaging.V1.TollfreeVerificationInstance #{values}>"
745
+ end
746
+ end
747
+
748
+ end
749
+ end
750
+ end
751
+ end