twilio-ruby 6.0.0.pre.rc.3 → 6.0.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 (119) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGES.md +84 -48
  3. data/CONTRIBUTING.md +10 -8
  4. data/README.md +128 -46
  5. data/UPGRADE.md +7 -4
  6. data/advanced-examples/custom-http-client.md +170 -0
  7. data/lib/twilio-ruby/rest/api/v2010/account/address.rb +1 -6
  8. data/lib/twilio-ruby/rest/api/v2010/account/available_phone_number_country.rb +7 -42
  9. data/lib/twilio-ruby/rest/api/v2010/account/call.rb +8 -42
  10. data/lib/twilio-ruby/rest/api/v2010/account/conference.rb +2 -10
  11. data/lib/twilio-ruby/rest/api/v2010/account/incoming_phone_number/assigned_add_on.rb +1 -6
  12. data/lib/twilio-ruby/rest/api/v2010/account/incoming_phone_number.rb +1 -5
  13. data/lib/twilio-ruby/rest/api/v2010/account/message.rb +2 -11
  14. data/lib/twilio-ruby/rest/api/v2010/account/queue.rb +1 -5
  15. data/lib/twilio-ruby/rest/api/v2010/account/recording/add_on_result.rb +1 -6
  16. data/lib/twilio-ruby/rest/api/v2010/account/recording.rb +2 -10
  17. data/lib/twilio-ruby/rest/api/v2010/account/sip/credential_list.rb +1 -5
  18. data/lib/twilio-ruby/rest/api/v2010/account/sip/domain.rb +3 -16
  19. data/lib/twilio-ruby/rest/api/v2010/account/sip/ip_access_control_list.rb +1 -5
  20. data/lib/twilio-ruby/rest/api/v2010/account.rb +24 -103
  21. data/lib/twilio-ruby/rest/autopilot/v1/assistant/field_type.rb +1 -5
  22. data/lib/twilio-ruby/rest/autopilot/v1/assistant/task.rb +2 -10
  23. data/lib/twilio-ruby/rest/autopilot/v1/assistant.rb +6 -24
  24. data/lib/twilio-ruby/rest/bulkexports/v1/export.rb +2 -9
  25. data/lib/twilio-ruby/rest/chat/v1/service/channel.rb +3 -15
  26. data/lib/twilio-ruby/rest/chat/v1/service/user.rb +1 -6
  27. data/lib/twilio-ruby/rest/chat/v1/service.rb +3 -12
  28. data/lib/twilio-ruby/rest/chat/v2/service/channel.rb +4 -20
  29. data/lib/twilio-ruby/rest/chat/v2/service/user.rb +2 -10
  30. data/lib/twilio-ruby/rest/chat/v2/service.rb +4 -16
  31. data/lib/twilio-ruby/rest/conversations/v1/conversation/message.rb +1 -5
  32. data/lib/twilio-ruby/rest/conversations/v1/conversation.rb +6 -36
  33. data/lib/twilio-ruby/rest/conversations/v1/service/conversation/message.rb +1 -6
  34. data/lib/twilio-ruby/rest/conversations/v1/service/conversation.rb +6 -39
  35. data/lib/twilio-ruby/rest/conversations/v1/service/user.rb +1 -5
  36. data/lib/twilio-ruby/rest/conversations/v1/service.rb +5 -21
  37. data/lib/twilio-ruby/rest/conversations/v1/user.rb +1 -4
  38. data/lib/twilio-ruby/rest/events/v1/schema.rb +1 -4
  39. data/lib/twilio-ruby/rest/events/v1/sink.rb +2 -10
  40. data/lib/twilio-ruby/rest/events/v1/subscription.rb +1 -4
  41. data/lib/twilio-ruby/rest/flex_api/v1/assessments.rb +20 -20
  42. data/lib/twilio-ruby/rest/flex_api/v1/insights_assessments_comment.rb +5 -5
  43. data/lib/twilio-ruby/rest/flex_api/v1/insights_questionnaires.rb +23 -23
  44. data/lib/twilio-ruby/rest/flex_api/v1/insights_questionnaires_category.rb +13 -13
  45. data/lib/twilio-ruby/rest/flex_api/v1/insights_questionnaires_question.rb +31 -31
  46. data/lib/twilio-ruby/rest/flex_api/v1/insights_segments.rb +13 -86
  47. data/lib/twilio-ruby/rest/flex_api/v1/insights_settings_answer_sets.rb +1 -1
  48. data/lib/twilio-ruby/rest/flex_api/v1/insights_settings_comment.rb +1 -1
  49. data/lib/twilio-ruby/rest/flex_api/v1/interaction/interaction_channel.rb +2 -11
  50. data/lib/twilio-ruby/rest/flex_api/v1/interaction.rb +1 -4
  51. data/lib/twilio-ruby/rest/flex_api/v1.rb +30 -39
  52. data/lib/twilio-ruby/rest/insights/v1/call.rb +2 -10
  53. data/lib/twilio-ruby/rest/insights/v1/conference.rb +1 -4
  54. data/lib/twilio-ruby/rest/insights/v1/room.rb +1 -4
  55. data/lib/twilio-ruby/rest/ip_messaging/v1/service/channel.rb +3 -15
  56. data/lib/twilio-ruby/rest/ip_messaging/v1/service/user.rb +1 -6
  57. data/lib/twilio-ruby/rest/ip_messaging/v1/service.rb +3 -12
  58. data/lib/twilio-ruby/rest/ip_messaging/v2/service/channel.rb +4 -20
  59. data/lib/twilio-ruby/rest/ip_messaging/v2/service/user.rb +2 -10
  60. data/lib/twilio-ruby/rest/ip_messaging/v2/service.rb +4 -16
  61. data/lib/twilio-ruby/rest/messaging/v1/brand_registration.rb +2 -9
  62. data/lib/twilio-ruby/rest/messaging/v1/service.rb +31 -47
  63. data/lib/twilio-ruby/rest/messaging/v1.rb +0 -15
  64. data/lib/twilio-ruby/rest/messaging.rb +1 -1
  65. data/lib/twilio-ruby/rest/microvisor/v1/device.rb +2 -8
  66. data/lib/twilio-ruby/rest/microvisor.rb +2 -1
  67. data/lib/twilio-ruby/rest/notify/v1/service.rb +2 -9
  68. data/lib/twilio-ruby/rest/numbers/v2/regulatory_compliance/bundle.rb +4 -18
  69. data/lib/twilio-ruby/rest/numbers_base.rb +1 -6
  70. data/lib/twilio-ruby/rest/oauth.rb +1 -1
  71. data/lib/twilio-ruby/rest/preview/deployed_devices/fleet.rb +4 -16
  72. data/lib/twilio-ruby/rest/preview/hosted_numbers/authorization_document.rb +1 -5
  73. data/lib/twilio-ruby/rest/preview/marketplace/available_add_on.rb +1 -4
  74. data/lib/twilio-ruby/rest/preview/marketplace/installed_add_on.rb +1 -4
  75. data/lib/twilio-ruby/rest/preview/sync/service/document.rb +1 -5
  76. data/lib/twilio-ruby/rest/preview/sync/service/sync_list.rb +2 -10
  77. data/lib/twilio-ruby/rest/preview/sync/service/sync_map.rb +2 -10
  78. data/lib/twilio-ruby/rest/preview/sync/service.rb +3 -12
  79. data/lib/twilio-ruby/rest/preview/understand/assistant/field_type.rb +1 -5
  80. data/lib/twilio-ruby/rest/preview/understand/assistant/task.rb +2 -10
  81. data/lib/twilio-ruby/rest/preview/understand/assistant.rb +5 -20
  82. data/lib/twilio-ruby/rest/proxy/v1/service/session/participant.rb +1 -6
  83. data/lib/twilio-ruby/rest/proxy/v1/service/session.rb +2 -10
  84. data/lib/twilio-ruby/rest/proxy/v1/service.rb +3 -12
  85. data/lib/twilio-ruby/rest/serverless/v1/service/asset.rb +1 -5
  86. data/lib/twilio-ruby/rest/serverless/v1/service/environment.rb +3 -15
  87. data/lib/twilio-ruby/rest/serverless/v1/service/function.rb +1 -5
  88. data/lib/twilio-ruby/rest/serverless/v1/service.rb +4 -16
  89. data/lib/twilio-ruby/rest/studio/v1/flow/engagement.rb +1 -5
  90. data/lib/twilio-ruby/rest/studio/v1/flow/execution.rb +1 -5
  91. data/lib/twilio-ruby/rest/studio/v1/flow.rb +2 -8
  92. data/lib/twilio-ruby/rest/studio/v2/flow/execution.rb +1 -5
  93. data/lib/twilio-ruby/rest/studio/v2/flow.rb +2 -8
  94. data/lib/twilio-ruby/rest/supersim/v1/network_access_profile.rb +1 -4
  95. data/lib/twilio-ruby/rest/supersim/v1/sim.rb +2 -10
  96. data/lib/twilio-ruby/rest/sync/v1/service/document.rb +1 -5
  97. data/lib/twilio-ruby/rest/sync/v1/service/sync_list.rb +2 -10
  98. data/lib/twilio-ruby/rest/sync/v1/service/sync_map.rb +2 -10
  99. data/lib/twilio-ruby/rest/sync/v1/service/sync_stream.rb +1 -6
  100. data/lib/twilio-ruby/rest/sync/v1/service.rb +4 -16
  101. data/lib/twilio-ruby/rest/taskrouter/v1/workspace/task.rb +1 -5
  102. data/lib/twilio-ruby/rest/taskrouter/v1/workspace/worker.rb +2 -10
  103. data/lib/twilio-ruby/rest/taskrouter/v1/workspace.rb +7 -28
  104. data/lib/twilio-ruby/rest/trunking/v1/trunk.rb +4 -16
  105. data/lib/twilio-ruby/rest/trusthub/v1/customer_profiles.rb +3 -12
  106. data/lib/twilio-ruby/rest/trusthub/v1/trust_products.rb +3 -12
  107. data/lib/twilio-ruby/rest/verify/v2/service/entity/challenge.rb +1 -7
  108. data/lib/twilio-ruby/rest/verify/v2/service/entity.rb +3 -16
  109. data/lib/twilio-ruby/rest/verify/v2/service/rate_limit.rb +1 -5
  110. data/lib/twilio-ruby/rest/verify/v2/service.rb +7 -29
  111. data/lib/twilio-ruby/rest/video/v1/room/participant.rb +3 -16
  112. data/lib/twilio-ruby/rest/video/v1/room.rb +3 -13
  113. data/lib/twilio-ruby/rest/voice/v1/connection_policy.rb +1 -4
  114. data/lib/twilio-ruby/rest/voice/v1/dialing_permissions/country.rb +1 -5
  115. data/lib/twilio-ruby/rest/wireless/v1/sim.rb +2 -10
  116. data/lib/twilio-ruby/version.rb +1 -1
  117. data/twilio-ruby.gemspec +1 -1
  118. metadata +9 -9
  119. data/lib/twilio-ruby/rest/messaging/v1/tollfree_verification.rb +0 -744
@@ -1,744 +0,0 @@
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
- 'resource_links' => payload['resource_links'],
425
- 'external_reference_id' => payload['external_reference_id'],
426
- }
427
-
428
- # Context
429
- @instance_context = nil
430
- @params = { 'sid' => sid || @properties['sid'] , }
431
- end
432
-
433
- ##
434
- # Generate an instance context for the instance, the context is capable of
435
- # performing various actions. All instance actions are proxied to the context
436
- # @return [TollfreeVerificationContext] CallContext for this CallInstance
437
- def context
438
- unless @instance_context
439
- @instance_context = TollfreeVerificationContext.new(@version , @params['sid'])
440
- end
441
- @instance_context
442
- end
443
-
444
- ##
445
- # @return [String] The unique string to identify Tollfree Verification.
446
- def sid
447
- @properties['sid']
448
- end
449
-
450
- ##
451
- # @return [String] The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Tollfree Verification resource.
452
- def account_sid
453
- @properties['account_sid']
454
- end
455
-
456
- ##
457
- # @return [String] Customer's Profile Bundle BundleSid.
458
- def customer_profile_sid
459
- @properties['customer_profile_sid']
460
- end
461
-
462
- ##
463
- # @return [String] Tollfree TrustProduct Bundle BundleSid.
464
- def trust_product_sid
465
- @properties['trust_product_sid']
466
- end
467
-
468
- ##
469
- # @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.
470
- def date_created
471
- @properties['date_created']
472
- end
473
-
474
- ##
475
- # @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.
476
- def date_updated
477
- @properties['date_updated']
478
- end
479
-
480
- ##
481
- # @return [String] The SID of the Regulated Item.
482
- def regulated_item_sid
483
- @properties['regulated_item_sid']
484
- end
485
-
486
- ##
487
- # @return [String] The name of the business or organization using the Tollfree number.
488
- def business_name
489
- @properties['business_name']
490
- end
491
-
492
- ##
493
- # @return [String] The address of the business or organization using the Tollfree number.
494
- def business_street_address
495
- @properties['business_street_address']
496
- end
497
-
498
- ##
499
- # @return [String] The address of the business or organization using the Tollfree number.
500
- def business_street_address2
501
- @properties['business_street_address2']
502
- end
503
-
504
- ##
505
- # @return [String] The city of the business or organization using the Tollfree number.
506
- def business_city
507
- @properties['business_city']
508
- end
509
-
510
- ##
511
- # @return [String] The state/province/region of the business or organization using the Tollfree number.
512
- def business_state_province_region
513
- @properties['business_state_province_region']
514
- end
515
-
516
- ##
517
- # @return [String] The postal code of the business or organization using the Tollfree number.
518
- def business_postal_code
519
- @properties['business_postal_code']
520
- end
521
-
522
- ##
523
- # @return [String] The country of the business or organization using the Tollfree number.
524
- def business_country
525
- @properties['business_country']
526
- end
527
-
528
- ##
529
- # @return [String] The website of the business or organization using the Tollfree number.
530
- def business_website
531
- @properties['business_website']
532
- end
533
-
534
- ##
535
- # @return [String] The first name of the contact for the business or organization using the Tollfree number.
536
- def business_contact_first_name
537
- @properties['business_contact_first_name']
538
- end
539
-
540
- ##
541
- # @return [String] The last name of the contact for the business or organization using the Tollfree number.
542
- def business_contact_last_name
543
- @properties['business_contact_last_name']
544
- end
545
-
546
- ##
547
- # @return [String] The email address of the contact for the business or organization using the Tollfree number.
548
- def business_contact_email
549
- @properties['business_contact_email']
550
- end
551
-
552
- ##
553
- # @return [String] The phone number of the contact for the business or organization using the Tollfree number.
554
- def business_contact_phone
555
- @properties['business_contact_phone']
556
- end
557
-
558
- ##
559
- # @return [String] The email address to receive the notification about the verification result. .
560
- def notification_email
561
- @properties['notification_email']
562
- end
563
-
564
- ##
565
- # @return [Array<String>] The category of the use case for the Tollfree Number. List as many are applicable..
566
- def use_case_categories
567
- @properties['use_case_categories']
568
- end
569
-
570
- ##
571
- # @return [String] Use this to further explain how messaging is used by the business or organization.
572
- def use_case_summary
573
- @properties['use_case_summary']
574
- end
575
-
576
- ##
577
- # @return [String] An example of message content, i.e. a sample message.
578
- def production_message_sample
579
- @properties['production_message_sample']
580
- end
581
-
582
- ##
583
- # @return [Array<String>] Link to an image that shows the opt-in workflow. Multiple images allowed and must be a publicly hosted URL.
584
- def opt_in_image_urls
585
- @properties['opt_in_image_urls']
586
- end
587
-
588
- ##
589
- # @return [OptInType]
590
- def opt_in_type
591
- @properties['opt_in_type']
592
- end
593
-
594
- ##
595
- # @return [String] Estimate monthly volume of messages from the Tollfree Number.
596
- def message_volume
597
- @properties['message_volume']
598
- end
599
-
600
- ##
601
- # @return [String] Additional information to be provided for verification.
602
- def additional_information
603
- @properties['additional_information']
604
- end
605
-
606
- ##
607
- # @return [String] The SID of the Phone Number associated with the Tollfree Verification.
608
- def tollfree_phone_number_sid
609
- @properties['tollfree_phone_number_sid']
610
- end
611
-
612
- ##
613
- # @return [Status]
614
- def status
615
- @properties['status']
616
- end
617
-
618
- ##
619
- # @return [String] The absolute URL of the Tollfree Verification resource.
620
- def url
621
- @properties['url']
622
- end
623
-
624
- ##
625
- # @return [String] The rejection reason given when a Tollfree Verification has been rejected.
626
- def rejection_reason
627
- @properties['rejection_reason']
628
- end
629
-
630
- ##
631
- # @return [String] The error code given when a Tollfree Verification has been rejected.
632
- def error_code
633
- @properties['error_code']
634
- end
635
-
636
- ##
637
- # @return [Hash] The URLs of the documents associated with the Tollfree Verification resource.
638
- def resource_links
639
- @properties['resource_links']
640
- end
641
-
642
- ##
643
- # @return [String] An optional external reference ID supplied by customer and echoed back on status retrieval.
644
- def external_reference_id
645
- @properties['external_reference_id']
646
- end
647
-
648
- ##
649
- # Fetch the TollfreeVerificationInstance
650
- # @return [TollfreeVerificationInstance] Fetched TollfreeVerificationInstance
651
- def fetch
652
-
653
- context.fetch
654
- end
655
-
656
- ##
657
- # Update the TollfreeVerificationInstance
658
- # @param [String] business_name The name of the business or organization using the Tollfree number.
659
- # @param [String] business_website The website of the business or organization using the Tollfree number.
660
- # @param [String] notification_email The email address to receive the notification about the verification result. .
661
- # @param [Array[String]] use_case_categories The category of the use case for the Tollfree Number. List as many are applicable..
662
- # @param [String] use_case_summary Use this to further explain how messaging is used by the business or organization.
663
- # @param [String] production_message_sample An example of message content, i.e. a sample message.
664
- # @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.
665
- # @param [OptInType] opt_in_type
666
- # @param [String] message_volume Estimate monthly volume of messages from the Tollfree Number.
667
- # @param [String] business_street_address The address of the business or organization using the Tollfree number.
668
- # @param [String] business_street_address2 The address of the business or organization using the Tollfree number.
669
- # @param [String] business_city The city of the business or organization using the Tollfree number.
670
- # @param [String] business_state_province_region The state/province/region of the business or organization using the Tollfree number.
671
- # @param [String] business_postal_code The postal code of the business or organization using the Tollfree number.
672
- # @param [String] business_country The country of the business or organization using the Tollfree number.
673
- # @param [String] additional_information Additional information to be provided for verification.
674
- # @param [String] business_contact_first_name The first name of the contact for the business or organization using the Tollfree number.
675
- # @param [String] business_contact_last_name The last name of the contact for the business or organization using the Tollfree number.
676
- # @param [String] business_contact_email The email address of the contact for the business or organization using the Tollfree number.
677
- # @param [String] business_contact_phone The phone number of the contact for the business or organization using the Tollfree number.
678
- # @return [TollfreeVerificationInstance] Updated TollfreeVerificationInstance
679
- def update(
680
- business_name: :unset,
681
- business_website: :unset,
682
- notification_email: :unset,
683
- use_case_categories: :unset,
684
- use_case_summary: :unset,
685
- production_message_sample: :unset,
686
- opt_in_image_urls: :unset,
687
- opt_in_type: :unset,
688
- message_volume: :unset,
689
- business_street_address: :unset,
690
- business_street_address2: :unset,
691
- business_city: :unset,
692
- business_state_province_region: :unset,
693
- business_postal_code: :unset,
694
- business_country: :unset,
695
- additional_information: :unset,
696
- business_contact_first_name: :unset,
697
- business_contact_last_name: :unset,
698
- business_contact_email: :unset,
699
- business_contact_phone: :unset
700
- )
701
-
702
- context.update(
703
- business_name: business_name,
704
- business_website: business_website,
705
- notification_email: notification_email,
706
- use_case_categories: use_case_categories,
707
- use_case_summary: use_case_summary,
708
- production_message_sample: production_message_sample,
709
- opt_in_image_urls: opt_in_image_urls,
710
- opt_in_type: opt_in_type,
711
- message_volume: message_volume,
712
- business_street_address: business_street_address,
713
- business_street_address2: business_street_address2,
714
- business_city: business_city,
715
- business_state_province_region: business_state_province_region,
716
- business_postal_code: business_postal_code,
717
- business_country: business_country,
718
- additional_information: additional_information,
719
- business_contact_first_name: business_contact_first_name,
720
- business_contact_last_name: business_contact_last_name,
721
- business_contact_email: business_contact_email,
722
- business_contact_phone: business_contact_phone,
723
- )
724
- end
725
-
726
- ##
727
- # Provide a user friendly representation
728
- def to_s
729
- values = @params.map{|k, v| "#{k}: #{v}"}.join(" ")
730
- "<Twilio.Messaging.V1.TollfreeVerificationInstance #{values}>"
731
- end
732
-
733
- ##
734
- # Provide a detailed, user friendly representation
735
- def inspect
736
- values = @properties.map{|k, v| "#{k}: #{v}"}.join(" ")
737
- "<Twilio.Messaging.V1.TollfreeVerificationInstance #{values}>"
738
- end
739
- end
740
-
741
- end
742
- end
743
- end
744
- end