twilio-ruby 7.0.2 → 7.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGES.md +58 -0
- data/Gemfile +1 -0
- data/README.md +2 -2
- data/lib/twilio-ruby/rest/api/v2010/account/message.rb +3 -3
- data/lib/twilio-ruby/rest/client.rb +3 -3
- data/lib/twilio-ruby/rest/content/v2/content.rb +316 -0
- data/lib/twilio-ruby/rest/content/v2/content_and_approvals.rb +309 -0
- data/lib/twilio-ruby/rest/content/v2.rb +46 -0
- data/lib/twilio-ruby/rest/content_base.rb +6 -1
- data/lib/twilio-ruby/rest/flex_api/v1/interaction.rb +1 -1
- data/lib/twilio-ruby/rest/flex_api/v1/plugin/plugin_versions.rb +8 -1
- data/lib/twilio-ruby/rest/intelligence/v2/custom_operator.rb +444 -0
- data/lib/twilio-ruby/rest/intelligence/v2/operator.rb +355 -0
- data/lib/twilio-ruby/rest/intelligence/v2/operator_attachment.rb +215 -0
- data/lib/twilio-ruby/rest/intelligence/v2/operator_attachments.rb +196 -0
- data/lib/twilio-ruby/rest/intelligence/v2/operator_type.rb +357 -0
- data/lib/twilio-ruby/rest/intelligence/v2/prebuilt_operator.rb +355 -0
- data/lib/twilio-ruby/rest/intelligence/v2/service.rb +9 -8
- data/lib/twilio-ruby/rest/intelligence/v2/transcript.rb +18 -18
- data/lib/twilio-ruby/rest/intelligence/v2.rb +112 -0
- data/lib/twilio-ruby/rest/marketplace/v1/available_add_on/available_add_on_extension.rb +308 -0
- data/lib/twilio-ruby/rest/marketplace/v1/available_add_on.rb +335 -0
- data/lib/twilio-ruby/rest/marketplace/v1/installed_add_on/installed_add_on_extension.rb +350 -0
- data/lib/twilio-ruby/rest/marketplace/v1/installed_add_on/installed_add_on_usage.rb +169 -0
- data/lib/twilio-ruby/rest/marketplace/v1/installed_add_on.rb +461 -0
- data/lib/twilio-ruby/rest/marketplace/v1/module_data_management.rb +282 -0
- data/lib/twilio-ruby/rest/marketplace/v1.rb +79 -0
- data/lib/twilio-ruby/rest/marketplace.rb +6 -0
- data/lib/twilio-ruby/rest/{preview_messaging_base.rb → marketplace_base.rb} +6 -6
- data/lib/twilio-ruby/rest/messaging/v1/service.rb +0 -7
- data/lib/twilio-ruby/rest/messaging/v1/tollfree_verification.rb +15 -3
- data/lib/twilio-ruby/rest/messaging/v1.rb +1 -1
- data/lib/twilio-ruby/rest/numbers/v1/porting_port_in.rb +86 -1
- data/lib/twilio-ruby/rest/numbers/v1/porting_port_in_phone_number.rb +126 -2
- data/lib/twilio-ruby/rest/numbers/v1/porting_webhook_configuration.rb +148 -0
- data/lib/twilio-ruby/rest/numbers/v1/porting_webhook_configuration_delete.rb +167 -0
- data/lib/twilio-ruby/rest/numbers/v1/porting_webhook_configuration_fetch.rb +160 -0
- data/lib/twilio-ruby/rest/numbers/v1/signing_request_configuration.rb +176 -0
- data/lib/twilio-ruby/rest/numbers/v1.rb +35 -32
- data/lib/twilio-ruby/rest/preview/sync/service/document.rb +1 -1
- data/lib/twilio-ruby/rest/preview/sync/service/sync_list.rb +2 -2
- data/lib/twilio-ruby/rest/preview/sync/service/sync_map.rb +2 -2
- data/lib/twilio-ruby/rest/preview/sync/service.rb +2 -2
- data/lib/twilio-ruby/rest/sync/v1/service/document.rb +1 -1
- data/lib/twilio-ruby/rest/sync/v1/service/sync_list.rb +2 -2
- data/lib/twilio-ruby/rest/sync/v1/service/sync_map.rb +2 -2
- data/lib/twilio-ruby/rest/sync/v1/service/sync_stream.rb +1 -1
- data/lib/twilio-ruby/rest/sync/v1/service.rb +3 -3
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/task.rb +33 -4
- data/lib/twilio-ruby/rest/trusthub/v1/compliance_tollfree_inquiries.rb +4 -1
- data/lib/twilio-ruby/rest/trusthub/v1/customer_profiles.rb +7 -0
- data/lib/twilio-ruby/rest/trusthub/v1/trust_products.rb +7 -0
- data/lib/twilio-ruby/rest/verify/v2/service/verification.rb +1 -1
- data/lib/twilio-ruby/rest/verify/v2/service/verification_check.rb +1 -1
- data/lib/twilio-ruby/rest/verify/v2/service.rb +1 -1
- data/lib/twilio-ruby/version.rb +1 -1
- metadata +24 -9
- data/lib/twilio-ruby/rest/numbers/v1/porting_bulk_portability.rb +0 -230
- data/lib/twilio-ruby/rest/numbers/v1/porting_port_in_fetch.rb +0 -252
- data/lib/twilio-ruby/rest/preview_messaging/v1/broadcast.rb +0 -164
- data/lib/twilio-ruby/rest/preview_messaging/v1/message.rb +0 -235
- data/lib/twilio-ruby/rest/preview_messaging/v1.rb +0 -46
- data/lib/twilio-ruby/rest/preview_messaging.rb +0 -12
@@ -45,7 +45,7 @@ module Twilio
|
|
45
45
|
# Initialize the PortingPortInPhoneNumberContext
|
46
46
|
# @param [Version] version Version that contains the resource
|
47
47
|
# @param [String] port_in_request_sid The SID of the Port In request. This is a unique identifier of the port in request.
|
48
|
-
# @param [String] phone_number_sid The SID of the
|
48
|
+
# @param [String] phone_number_sid The SID of the Phone number. This is a unique identifier of the phone number.
|
49
49
|
# @return [PortingPortInPhoneNumberContext] PortingPortInPhoneNumberContext
|
50
50
|
def initialize(version, port_in_request_sid, phone_number_sid)
|
51
51
|
super(version)
|
@@ -65,6 +65,21 @@ module Twilio
|
|
65
65
|
@version.delete('DELETE', @uri)
|
66
66
|
end
|
67
67
|
|
68
|
+
##
|
69
|
+
# Fetch the PortingPortInPhoneNumberInstance
|
70
|
+
# @return [PortingPortInPhoneNumberInstance] Fetched PortingPortInPhoneNumberInstance
|
71
|
+
def fetch
|
72
|
+
|
73
|
+
|
74
|
+
payload = @version.fetch('GET', @uri)
|
75
|
+
PortingPortInPhoneNumberInstance.new(
|
76
|
+
@version,
|
77
|
+
payload,
|
78
|
+
port_in_request_sid: @solution[:port_in_request_sid],
|
79
|
+
phone_number_sid: @solution[:phone_number_sid],
|
80
|
+
)
|
81
|
+
end
|
82
|
+
|
68
83
|
|
69
84
|
##
|
70
85
|
# Provide a user friendly representation
|
@@ -119,9 +134,26 @@ module Twilio
|
|
119
134
|
# resource.
|
120
135
|
# @param [String] sid The SID of the Call resource to fetch.
|
121
136
|
# @return [PortingPortInPhoneNumberInstance] PortingPortInPhoneNumberInstance
|
122
|
-
def initialize(version , port_in_request_sid: nil, phone_number_sid: nil)
|
137
|
+
def initialize(version, payload , port_in_request_sid: nil, phone_number_sid: nil)
|
123
138
|
super(version)
|
124
139
|
|
140
|
+
# Marshaled Properties
|
141
|
+
@properties = {
|
142
|
+
'port_in_request_sid' => payload['port_in_request_sid'],
|
143
|
+
'phone_number_sid' => payload['phone_number_sid'],
|
144
|
+
'url' => payload['url'],
|
145
|
+
'account_sid' => payload['account_sid'],
|
146
|
+
'phone_number_type' => payload['phone_number_type'],
|
147
|
+
'date_created' => Twilio.deserialize_iso8601_datetime(payload['date_created']),
|
148
|
+
'country' => payload['country'],
|
149
|
+
'missing_required_fields' => payload['missing_required_fields'],
|
150
|
+
'status_last_time_updated_timestamp' => Twilio.deserialize_iso8601_datetime(payload['status_last_time_updated_timestamp']),
|
151
|
+
'phone_number' => payload['phone_number'],
|
152
|
+
'portable' => payload['portable'],
|
153
|
+
'not_portability_reason' => payload['not_portability_reason'],
|
154
|
+
'not_portability_reason_code' => payload['not_portability_reason_code'],
|
155
|
+
'port_in_phone_number_status' => payload['port_in_phone_number_status'],
|
156
|
+
}
|
125
157
|
|
126
158
|
# Context
|
127
159
|
@instance_context = nil
|
@@ -139,6 +171,90 @@ module Twilio
|
|
139
171
|
@instance_context
|
140
172
|
end
|
141
173
|
|
174
|
+
##
|
175
|
+
# @return [String] The SID of the Port In request. This is a unique identifier of the port in request.
|
176
|
+
def port_in_request_sid
|
177
|
+
@properties['port_in_request_sid']
|
178
|
+
end
|
179
|
+
|
180
|
+
##
|
181
|
+
# @return [String] The SID of the Port In request phone number. This is a unique identifier of the phone number.
|
182
|
+
def phone_number_sid
|
183
|
+
@properties['phone_number_sid']
|
184
|
+
end
|
185
|
+
|
186
|
+
##
|
187
|
+
# @return [String]
|
188
|
+
def url
|
189
|
+
@properties['url']
|
190
|
+
end
|
191
|
+
|
192
|
+
##
|
193
|
+
# @return [String] The SID of the account that the phone number belongs to.
|
194
|
+
def account_sid
|
195
|
+
@properties['account_sid']
|
196
|
+
end
|
197
|
+
|
198
|
+
##
|
199
|
+
# @return [String] The type of the phone number.
|
200
|
+
def phone_number_type
|
201
|
+
@properties['phone_number_type']
|
202
|
+
end
|
203
|
+
|
204
|
+
##
|
205
|
+
# @return [Time] The date when the phone number was created.
|
206
|
+
def date_created
|
207
|
+
@properties['date_created']
|
208
|
+
end
|
209
|
+
|
210
|
+
##
|
211
|
+
# @return [String] The country of the phone number.
|
212
|
+
def country
|
213
|
+
@properties['country']
|
214
|
+
end
|
215
|
+
|
216
|
+
##
|
217
|
+
# @return [Boolean] The phone number is missing required fields.
|
218
|
+
def missing_required_fields
|
219
|
+
@properties['missing_required_fields']
|
220
|
+
end
|
221
|
+
|
222
|
+
##
|
223
|
+
# @return [Time] The timestamp when the status was last updated.
|
224
|
+
def status_last_time_updated_timestamp
|
225
|
+
@properties['status_last_time_updated_timestamp']
|
226
|
+
end
|
227
|
+
|
228
|
+
##
|
229
|
+
# @return [String] The phone number.
|
230
|
+
def phone_number
|
231
|
+
@properties['phone_number']
|
232
|
+
end
|
233
|
+
|
234
|
+
##
|
235
|
+
# @return [Boolean] The phone number is portable.
|
236
|
+
def portable
|
237
|
+
@properties['portable']
|
238
|
+
end
|
239
|
+
|
240
|
+
##
|
241
|
+
# @return [String] The reason why the phone number is not portable.
|
242
|
+
def not_portability_reason
|
243
|
+
@properties['not_portability_reason']
|
244
|
+
end
|
245
|
+
|
246
|
+
##
|
247
|
+
# @return [String] The code of the reason why the phone number is not portable.
|
248
|
+
def not_portability_reason_code
|
249
|
+
@properties['not_portability_reason_code']
|
250
|
+
end
|
251
|
+
|
252
|
+
##
|
253
|
+
# @return [String] The status of the phone number in the port in request.
|
254
|
+
def port_in_phone_number_status
|
255
|
+
@properties['port_in_phone_number_status']
|
256
|
+
end
|
257
|
+
|
142
258
|
##
|
143
259
|
# Delete the PortingPortInPhoneNumberInstance
|
144
260
|
# @return [Boolean] True if delete succeeds, false otherwise
|
@@ -147,6 +263,14 @@ module Twilio
|
|
147
263
|
context.delete
|
148
264
|
end
|
149
265
|
|
266
|
+
##
|
267
|
+
# Fetch the PortingPortInPhoneNumberInstance
|
268
|
+
# @return [PortingPortInPhoneNumberInstance] Fetched PortingPortInPhoneNumberInstance
|
269
|
+
def fetch
|
270
|
+
|
271
|
+
context.fetch
|
272
|
+
end
|
273
|
+
|
150
274
|
##
|
151
275
|
# Provide a user friendly representation
|
152
276
|
def to_s
|
@@ -0,0 +1,148 @@
|
|
1
|
+
##
|
2
|
+
# This code was generated by
|
3
|
+
# ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
|
4
|
+
# | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
|
5
|
+
# | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
|
6
|
+
#
|
7
|
+
# Twilio - Numbers
|
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 Numbers < NumbersBase
|
19
|
+
class V1 < Version
|
20
|
+
class PortingWebhookConfigurationList < ListResource
|
21
|
+
|
22
|
+
##
|
23
|
+
# Initialize the PortingWebhookConfigurationList
|
24
|
+
# @param [Version] version Version that contains the resource
|
25
|
+
# @return [PortingWebhookConfigurationList] PortingWebhookConfigurationList
|
26
|
+
def initialize(version)
|
27
|
+
super(version)
|
28
|
+
# Path Solution
|
29
|
+
@solution = { }
|
30
|
+
@uri = "/Porting/Configuration/Webhook"
|
31
|
+
|
32
|
+
end
|
33
|
+
##
|
34
|
+
# Create the PortingWebhookConfigurationInstance
|
35
|
+
# @param [Object] body
|
36
|
+
# @return [PortingWebhookConfigurationInstance] Created PortingWebhookConfigurationInstance
|
37
|
+
def create(body: :unset
|
38
|
+
)
|
39
|
+
|
40
|
+
headers = Twilio::Values.of({"Content-Type"=> "application/json"})
|
41
|
+
payload = @version.create('POST', @uri, data: body.to_json, headers: headers)
|
42
|
+
PortingWebhookConfigurationInstance.new(
|
43
|
+
@version,
|
44
|
+
payload,
|
45
|
+
)
|
46
|
+
end
|
47
|
+
|
48
|
+
|
49
|
+
|
50
|
+
|
51
|
+
# Provide a user friendly representation
|
52
|
+
def to_s
|
53
|
+
'#<Twilio.Numbers.V1.PortingWebhookConfigurationList>'
|
54
|
+
end
|
55
|
+
end
|
56
|
+
|
57
|
+
class PortingWebhookConfigurationPage < Page
|
58
|
+
##
|
59
|
+
# Initialize the PortingWebhookConfigurationPage
|
60
|
+
# @param [Version] version Version that contains the resource
|
61
|
+
# @param [Response] response Response from the API
|
62
|
+
# @param [Hash] solution Path solution for the resource
|
63
|
+
# @return [PortingWebhookConfigurationPage] PortingWebhookConfigurationPage
|
64
|
+
def initialize(version, response, solution)
|
65
|
+
super(version, response)
|
66
|
+
|
67
|
+
# Path Solution
|
68
|
+
@solution = solution
|
69
|
+
end
|
70
|
+
|
71
|
+
##
|
72
|
+
# Build an instance of PortingWebhookConfigurationInstance
|
73
|
+
# @param [Hash] payload Payload response from the API
|
74
|
+
# @return [PortingWebhookConfigurationInstance] PortingWebhookConfigurationInstance
|
75
|
+
def get_instance(payload)
|
76
|
+
PortingWebhookConfigurationInstance.new(@version, payload)
|
77
|
+
end
|
78
|
+
|
79
|
+
##
|
80
|
+
# Provide a user friendly representation
|
81
|
+
def to_s
|
82
|
+
'<Twilio.Numbers.V1.PortingWebhookConfigurationPage>'
|
83
|
+
end
|
84
|
+
end
|
85
|
+
class PortingWebhookConfigurationInstance < InstanceResource
|
86
|
+
##
|
87
|
+
# Initialize the PortingWebhookConfigurationInstance
|
88
|
+
# @param [Version] version Version that contains the resource
|
89
|
+
# @param [Hash] payload payload that contains response from Twilio
|
90
|
+
# @param [String] account_sid The SID of the
|
91
|
+
# {Account}[https://www.twilio.com/docs/iam/api/account] that created this PortingWebhookConfiguration
|
92
|
+
# resource.
|
93
|
+
# @param [String] sid The SID of the Call resource to fetch.
|
94
|
+
# @return [PortingWebhookConfigurationInstance] PortingWebhookConfigurationInstance
|
95
|
+
def initialize(version, payload )
|
96
|
+
super(version)
|
97
|
+
|
98
|
+
# Marshaled Properties
|
99
|
+
@properties = {
|
100
|
+
'url' => payload['url'],
|
101
|
+
'port_in_target_url' => payload['port_in_target_url'],
|
102
|
+
'port_out_target_url' => payload['port_out_target_url'],
|
103
|
+
'notifications_of' => payload['notifications_of'],
|
104
|
+
}
|
105
|
+
end
|
106
|
+
|
107
|
+
|
108
|
+
##
|
109
|
+
# @return [String] The URL of the webhook configuration request
|
110
|
+
def url
|
111
|
+
@properties['url']
|
112
|
+
end
|
113
|
+
|
114
|
+
##
|
115
|
+
# @return [String] Webhook URL to send a request when a port in request or port in phone number event happens
|
116
|
+
def port_in_target_url
|
117
|
+
@properties['port_in_target_url']
|
118
|
+
end
|
119
|
+
|
120
|
+
##
|
121
|
+
# @return [String] Webhook URL to send a request when a port out phone number event happens
|
122
|
+
def port_out_target_url
|
123
|
+
@properties['port_out_target_url']
|
124
|
+
end
|
125
|
+
|
126
|
+
##
|
127
|
+
# @return [Array<String>] List of notification events to send a request to the webhook URL
|
128
|
+
def notifications_of
|
129
|
+
@properties['notifications_of']
|
130
|
+
end
|
131
|
+
|
132
|
+
##
|
133
|
+
# Provide a user friendly representation
|
134
|
+
def to_s
|
135
|
+
"<Twilio.Numbers.V1.PortingWebhookConfigurationInstance>"
|
136
|
+
end
|
137
|
+
|
138
|
+
##
|
139
|
+
# Provide a detailed, user friendly representation
|
140
|
+
def inspect
|
141
|
+
"<Twilio.Numbers.V1.PortingWebhookConfigurationInstance>"
|
142
|
+
end
|
143
|
+
end
|
144
|
+
|
145
|
+
end
|
146
|
+
end
|
147
|
+
end
|
148
|
+
end
|
@@ -0,0 +1,167 @@
|
|
1
|
+
##
|
2
|
+
# This code was generated by
|
3
|
+
# ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
|
4
|
+
# | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
|
5
|
+
# | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
|
6
|
+
#
|
7
|
+
# Twilio - Numbers
|
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 Numbers < NumbersBase
|
19
|
+
class V1 < Version
|
20
|
+
class PortingWebhookConfigurationDeleteList < ListResource
|
21
|
+
|
22
|
+
##
|
23
|
+
# Initialize the PortingWebhookConfigurationDeleteList
|
24
|
+
# @param [Version] version Version that contains the resource
|
25
|
+
# @return [PortingWebhookConfigurationDeleteList] PortingWebhookConfigurationDeleteList
|
26
|
+
def initialize(version)
|
27
|
+
super(version)
|
28
|
+
# Path Solution
|
29
|
+
@solution = { }
|
30
|
+
|
31
|
+
|
32
|
+
end
|
33
|
+
|
34
|
+
|
35
|
+
|
36
|
+
# Provide a user friendly representation
|
37
|
+
def to_s
|
38
|
+
'#<Twilio.Numbers.V1.PortingWebhookConfigurationDeleteList>'
|
39
|
+
end
|
40
|
+
end
|
41
|
+
|
42
|
+
|
43
|
+
class PortingWebhookConfigurationDeleteContext < InstanceContext
|
44
|
+
##
|
45
|
+
# Initialize the PortingWebhookConfigurationDeleteContext
|
46
|
+
# @param [Version] version Version that contains the resource
|
47
|
+
# @param [WebhookType] webhook_type The of the webhook type of the configuration to be deleted
|
48
|
+
# @return [PortingWebhookConfigurationDeleteContext] PortingWebhookConfigurationDeleteContext
|
49
|
+
def initialize(version, webhook_type)
|
50
|
+
super(version)
|
51
|
+
|
52
|
+
# Path Solution
|
53
|
+
@solution = { webhook_type: webhook_type, }
|
54
|
+
@uri = "/Porting/Configuration/Webhook/#{@solution[:webhook_type]}"
|
55
|
+
|
56
|
+
|
57
|
+
end
|
58
|
+
##
|
59
|
+
# Delete the PortingWebhookConfigurationDeleteInstance
|
60
|
+
# @return [Boolean] True if delete succeeds, false otherwise
|
61
|
+
def delete
|
62
|
+
|
63
|
+
|
64
|
+
@version.delete('DELETE', @uri)
|
65
|
+
end
|
66
|
+
|
67
|
+
|
68
|
+
##
|
69
|
+
# Provide a user friendly representation
|
70
|
+
def to_s
|
71
|
+
context = @solution.map{|k, v| "#{k}: #{v}"}.join(',')
|
72
|
+
"#<Twilio.Numbers.V1.PortingWebhookConfigurationDeleteContext #{context}>"
|
73
|
+
end
|
74
|
+
|
75
|
+
##
|
76
|
+
# Provide a detailed, user friendly representation
|
77
|
+
def inspect
|
78
|
+
context = @solution.map{|k, v| "#{k}: #{v}"}.join(',')
|
79
|
+
"#<Twilio.Numbers.V1.PortingWebhookConfigurationDeleteContext #{context}>"
|
80
|
+
end
|
81
|
+
end
|
82
|
+
|
83
|
+
class PortingWebhookConfigurationDeletePage < Page
|
84
|
+
##
|
85
|
+
# Initialize the PortingWebhookConfigurationDeletePage
|
86
|
+
# @param [Version] version Version that contains the resource
|
87
|
+
# @param [Response] response Response from the API
|
88
|
+
# @param [Hash] solution Path solution for the resource
|
89
|
+
# @return [PortingWebhookConfigurationDeletePage] PortingWebhookConfigurationDeletePage
|
90
|
+
def initialize(version, response, solution)
|
91
|
+
super(version, response)
|
92
|
+
|
93
|
+
# Path Solution
|
94
|
+
@solution = solution
|
95
|
+
end
|
96
|
+
|
97
|
+
##
|
98
|
+
# Build an instance of PortingWebhookConfigurationDeleteInstance
|
99
|
+
# @param [Hash] payload Payload response from the API
|
100
|
+
# @return [PortingWebhookConfigurationDeleteInstance] PortingWebhookConfigurationDeleteInstance
|
101
|
+
def get_instance(payload)
|
102
|
+
PortingWebhookConfigurationDeleteInstance.new(@version, payload)
|
103
|
+
end
|
104
|
+
|
105
|
+
##
|
106
|
+
# Provide a user friendly representation
|
107
|
+
def to_s
|
108
|
+
'<Twilio.Numbers.V1.PortingWebhookConfigurationDeletePage>'
|
109
|
+
end
|
110
|
+
end
|
111
|
+
class PortingWebhookConfigurationDeleteInstance < InstanceResource
|
112
|
+
##
|
113
|
+
# Initialize the PortingWebhookConfigurationDeleteInstance
|
114
|
+
# @param [Version] version Version that contains the resource
|
115
|
+
# @param [Hash] payload payload that contains response from Twilio
|
116
|
+
# @param [String] account_sid The SID of the
|
117
|
+
# {Account}[https://www.twilio.com/docs/iam/api/account] that created this PortingWebhookConfigurationDelete
|
118
|
+
# resource.
|
119
|
+
# @param [String] sid The SID of the Call resource to fetch.
|
120
|
+
# @return [PortingWebhookConfigurationDeleteInstance] PortingWebhookConfigurationDeleteInstance
|
121
|
+
def initialize(version , webhook_type: nil)
|
122
|
+
super(version)
|
123
|
+
|
124
|
+
|
125
|
+
# Context
|
126
|
+
@instance_context = nil
|
127
|
+
@params = { 'webhook_type' => webhook_type || @properties['webhook_type'] , }
|
128
|
+
end
|
129
|
+
|
130
|
+
##
|
131
|
+
# Generate an instance context for the instance, the context is capable of
|
132
|
+
# performing various actions. All instance actions are proxied to the context
|
133
|
+
# @return [PortingWebhookConfigurationDeleteContext] CallContext for this CallInstance
|
134
|
+
def context
|
135
|
+
unless @instance_context
|
136
|
+
@instance_context = PortingWebhookConfigurationDeleteContext.new(@version , @params['webhook_type'])
|
137
|
+
end
|
138
|
+
@instance_context
|
139
|
+
end
|
140
|
+
|
141
|
+
##
|
142
|
+
# Delete the PortingWebhookConfigurationDeleteInstance
|
143
|
+
# @return [Boolean] True if delete succeeds, false otherwise
|
144
|
+
def delete
|
145
|
+
|
146
|
+
context.delete
|
147
|
+
end
|
148
|
+
|
149
|
+
##
|
150
|
+
# Provide a user friendly representation
|
151
|
+
def to_s
|
152
|
+
values = @params.map{|k, v| "#{k}: #{v}"}.join(" ")
|
153
|
+
"<Twilio.Numbers.V1.PortingWebhookConfigurationDeleteInstance #{values}>"
|
154
|
+
end
|
155
|
+
|
156
|
+
##
|
157
|
+
# Provide a detailed, user friendly representation
|
158
|
+
def inspect
|
159
|
+
values = @properties.map{|k, v| "#{k}: #{v}"}.join(" ")
|
160
|
+
"<Twilio.Numbers.V1.PortingWebhookConfigurationDeleteInstance #{values}>"
|
161
|
+
end
|
162
|
+
end
|
163
|
+
|
164
|
+
end
|
165
|
+
end
|
166
|
+
end
|
167
|
+
end
|
@@ -0,0 +1,160 @@
|
|
1
|
+
##
|
2
|
+
# This code was generated by
|
3
|
+
# ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
|
4
|
+
# | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
|
5
|
+
# | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
|
6
|
+
#
|
7
|
+
# Twilio - Numbers
|
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 Numbers < NumbersBase
|
19
|
+
class V1 < Version
|
20
|
+
class PortingWebhookConfigurationFetchList < ListResource
|
21
|
+
|
22
|
+
##
|
23
|
+
# Initialize the PortingWebhookConfigurationFetchList
|
24
|
+
# @param [Version] version Version that contains the resource
|
25
|
+
# @return [PortingWebhookConfigurationFetchList] PortingWebhookConfigurationFetchList
|
26
|
+
def initialize(version)
|
27
|
+
super(version)
|
28
|
+
# Path Solution
|
29
|
+
@solution = { }
|
30
|
+
@uri = "/Porting/Configuration/Webhook"
|
31
|
+
|
32
|
+
end
|
33
|
+
##
|
34
|
+
# Fetch the PortingWebhookConfigurationFetchInstance
|
35
|
+
# @return [PortingWebhookConfigurationFetchInstance] Fetched PortingWebhookConfigurationFetchInstance
|
36
|
+
def fetch
|
37
|
+
|
38
|
+
|
39
|
+
payload = @version.fetch('GET', @uri)
|
40
|
+
PortingWebhookConfigurationFetchInstance.new(
|
41
|
+
@version,
|
42
|
+
payload,
|
43
|
+
)
|
44
|
+
end
|
45
|
+
|
46
|
+
|
47
|
+
|
48
|
+
|
49
|
+
# Provide a user friendly representation
|
50
|
+
def to_s
|
51
|
+
'#<Twilio.Numbers.V1.PortingWebhookConfigurationFetchList>'
|
52
|
+
end
|
53
|
+
end
|
54
|
+
|
55
|
+
class PortingWebhookConfigurationFetchPage < Page
|
56
|
+
##
|
57
|
+
# Initialize the PortingWebhookConfigurationFetchPage
|
58
|
+
# @param [Version] version Version that contains the resource
|
59
|
+
# @param [Response] response Response from the API
|
60
|
+
# @param [Hash] solution Path solution for the resource
|
61
|
+
# @return [PortingWebhookConfigurationFetchPage] PortingWebhookConfigurationFetchPage
|
62
|
+
def initialize(version, response, solution)
|
63
|
+
super(version, response)
|
64
|
+
|
65
|
+
# Path Solution
|
66
|
+
@solution = solution
|
67
|
+
end
|
68
|
+
|
69
|
+
##
|
70
|
+
# Build an instance of PortingWebhookConfigurationFetchInstance
|
71
|
+
# @param [Hash] payload Payload response from the API
|
72
|
+
# @return [PortingWebhookConfigurationFetchInstance] PortingWebhookConfigurationFetchInstance
|
73
|
+
def get_instance(payload)
|
74
|
+
PortingWebhookConfigurationFetchInstance.new(@version, payload)
|
75
|
+
end
|
76
|
+
|
77
|
+
##
|
78
|
+
# Provide a user friendly representation
|
79
|
+
def to_s
|
80
|
+
'<Twilio.Numbers.V1.PortingWebhookConfigurationFetchPage>'
|
81
|
+
end
|
82
|
+
end
|
83
|
+
class PortingWebhookConfigurationFetchInstance < InstanceResource
|
84
|
+
##
|
85
|
+
# Initialize the PortingWebhookConfigurationFetchInstance
|
86
|
+
# @param [Version] version Version that contains the resource
|
87
|
+
# @param [Hash] payload payload that contains response from Twilio
|
88
|
+
# @param [String] account_sid The SID of the
|
89
|
+
# {Account}[https://www.twilio.com/docs/iam/api/account] that created this PortingWebhookConfigurationFetch
|
90
|
+
# resource.
|
91
|
+
# @param [String] sid The SID of the Call resource to fetch.
|
92
|
+
# @return [PortingWebhookConfigurationFetchInstance] PortingWebhookConfigurationFetchInstance
|
93
|
+
def initialize(version, payload )
|
94
|
+
super(version)
|
95
|
+
|
96
|
+
# Marshaled Properties
|
97
|
+
@properties = {
|
98
|
+
'url' => payload['url'],
|
99
|
+
'port_in_target_url' => payload['port_in_target_url'],
|
100
|
+
'port_out_target_url' => payload['port_out_target_url'],
|
101
|
+
'notifications_of' => payload['notifications_of'],
|
102
|
+
'port_in_target_date_created' => Twilio.deserialize_iso8601_datetime(payload['port_in_target_date_created']),
|
103
|
+
'port_out_target_date_created' => Twilio.deserialize_iso8601_datetime(payload['port_out_target_date_created']),
|
104
|
+
}
|
105
|
+
end
|
106
|
+
|
107
|
+
|
108
|
+
##
|
109
|
+
# @return [String] The URL of the webhook configuration request
|
110
|
+
def url
|
111
|
+
@properties['url']
|
112
|
+
end
|
113
|
+
|
114
|
+
##
|
115
|
+
# @return [String] Webhook URL to send a request when a port in request or port in phone number event happens
|
116
|
+
def port_in_target_url
|
117
|
+
@properties['port_in_target_url']
|
118
|
+
end
|
119
|
+
|
120
|
+
##
|
121
|
+
# @return [String] Webhook URL to send a request when a port out phone number event happens
|
122
|
+
def port_out_target_url
|
123
|
+
@properties['port_out_target_url']
|
124
|
+
end
|
125
|
+
|
126
|
+
##
|
127
|
+
# @return [Array<String>] List of notification events to send a request to the webhook URL
|
128
|
+
def notifications_of
|
129
|
+
@properties['notifications_of']
|
130
|
+
end
|
131
|
+
|
132
|
+
##
|
133
|
+
# @return [Time] Creation date for the port in webhook configuration
|
134
|
+
def port_in_target_date_created
|
135
|
+
@properties['port_in_target_date_created']
|
136
|
+
end
|
137
|
+
|
138
|
+
##
|
139
|
+
# @return [Time] Creation date for the port out webhook configuration
|
140
|
+
def port_out_target_date_created
|
141
|
+
@properties['port_out_target_date_created']
|
142
|
+
end
|
143
|
+
|
144
|
+
##
|
145
|
+
# Provide a user friendly representation
|
146
|
+
def to_s
|
147
|
+
"<Twilio.Numbers.V1.PortingWebhookConfigurationFetchInstance>"
|
148
|
+
end
|
149
|
+
|
150
|
+
##
|
151
|
+
# Provide a detailed, user friendly representation
|
152
|
+
def inspect
|
153
|
+
"<Twilio.Numbers.V1.PortingWebhookConfigurationFetchInstance>"
|
154
|
+
end
|
155
|
+
end
|
156
|
+
|
157
|
+
end
|
158
|
+
end
|
159
|
+
end
|
160
|
+
end
|