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