twilio-ruby 7.3.1 → 7.3.2
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 +11 -0
- data/README.md +2 -2
- data/lib/twilio-ruby/rest/accounts/v1/bulk_consents.rb +133 -0
- data/lib/twilio-ruby/rest/accounts/v1/bulk_contacts.rb +133 -0
- data/lib/twilio-ruby/rest/accounts/v1.rb +12 -0
- data/lib/twilio-ruby/rest/assistants/v1/assistant/assistants_knowledge.rb +355 -0
- data/lib/twilio-ruby/rest/assistants/v1/assistant/assistants_tool.rb +362 -0
- data/lib/twilio-ruby/rest/assistants/v1/assistant/feedback.rb +1 -1
- data/lib/twilio-ruby/rest/assistants/v1/assistant/message.rb +201 -0
- data/lib/twilio-ruby/rest/assistants/v1/assistant.rb +57 -15
- data/lib/twilio-ruby/rest/assistants/v1/knowledge/knowledge_status.rb +209 -0
- data/lib/twilio-ruby/rest/assistants/v1/knowledge.rb +21 -23
- data/lib/twilio-ruby/rest/assistants/v1/tool.rb +37 -0
- data/lib/twilio-ruby/rest/numbers/v1/{porting_webhook_configuration_fetch.rb → webhook.rb} +20 -20
- data/lib/twilio-ruby/rest/numbers/v1.rb +6 -6
- data/lib/twilio-ruby/rest/serverless/v1/service/environment/deployment.rb +4 -1
- data/lib/twilio-ruby/version.rb +1 -1
- metadata +9 -3
@@ -326,7 +326,8 @@ module Twilio
|
|
326
326
|
# Dependents
|
327
327
|
@feedbacks = nil
|
328
328
|
@messages = nil
|
329
|
-
@
|
329
|
+
@assistants_tools = nil
|
330
|
+
@assistants_knowledge = nil
|
330
331
|
end
|
331
332
|
##
|
332
333
|
# Delete the AssistantInstance
|
@@ -377,7 +378,7 @@ module Twilio
|
|
377
378
|
def feedbacks
|
378
379
|
unless @feedbacks
|
379
380
|
@feedbacks = FeedbackList.new(
|
380
|
-
@version, )
|
381
|
+
@version, id: @solution[:id], )
|
381
382
|
end
|
382
383
|
@feedbacks
|
383
384
|
end
|
@@ -388,20 +389,47 @@ module Twilio
|
|
388
389
|
def messages
|
389
390
|
unless @messages
|
390
391
|
@messages = MessageList.new(
|
391
|
-
@version, )
|
392
|
+
@version, id: @solution[:id], )
|
392
393
|
end
|
393
394
|
@messages
|
394
395
|
end
|
395
396
|
##
|
396
|
-
# Access the
|
397
|
-
# @return [
|
398
|
-
# @return [
|
399
|
-
def
|
400
|
-
|
401
|
-
|
397
|
+
# Access the assistants_tools
|
398
|
+
# @return [AssistantsToolList]
|
399
|
+
# @return [AssistantsToolContext] if sid was passed.
|
400
|
+
def assistants_tools(id=:unset)
|
401
|
+
|
402
|
+
raise ArgumentError, 'id cannot be nil' if id.nil?
|
403
|
+
|
404
|
+
if id != :unset
|
405
|
+
return AssistantsToolContext.new(@version, @solution[:id],id )
|
406
|
+
end
|
407
|
+
|
408
|
+
unless @assistants_tools
|
409
|
+
@assistants_tools = AssistantsToolList.new(
|
402
410
|
@version, )
|
403
|
-
|
404
|
-
|
411
|
+
end
|
412
|
+
|
413
|
+
@assistants_tools
|
414
|
+
end
|
415
|
+
##
|
416
|
+
# Access the assistants_knowledge
|
417
|
+
# @return [AssistantsKnowledgeList]
|
418
|
+
# @return [AssistantsKnowledgeContext] if sid was passed.
|
419
|
+
def assistants_knowledge(id=:unset)
|
420
|
+
|
421
|
+
raise ArgumentError, 'id cannot be nil' if id.nil?
|
422
|
+
|
423
|
+
if id != :unset
|
424
|
+
return AssistantsKnowledgeContext.new(@version, @solution[:id],id )
|
425
|
+
end
|
426
|
+
|
427
|
+
unless @assistants_knowledge
|
428
|
+
@assistants_knowledge = AssistantsKnowledgeList.new(
|
429
|
+
@version, )
|
430
|
+
end
|
431
|
+
|
432
|
+
@assistants_knowledge
|
405
433
|
end
|
406
434
|
|
407
435
|
##
|
@@ -468,6 +496,7 @@ module Twilio
|
|
468
496
|
'model' => payload['model'],
|
469
497
|
'name' => payload['name'],
|
470
498
|
'owner' => payload['owner'],
|
499
|
+
'url' => payload['url'],
|
471
500
|
'personality_prompt' => payload['personality_prompt'],
|
472
501
|
'date_created' => Twilio.deserialize_iso8601_datetime(payload['date_created']),
|
473
502
|
'date_updated' => Twilio.deserialize_iso8601_datetime(payload['date_updated']),
|
@@ -527,6 +556,12 @@ module Twilio
|
|
527
556
|
@properties['owner']
|
528
557
|
end
|
529
558
|
|
559
|
+
##
|
560
|
+
# @return [String] The url of the assistant resource.
|
561
|
+
def url
|
562
|
+
@properties['url']
|
563
|
+
end
|
564
|
+
|
530
565
|
##
|
531
566
|
# @return [String] The personality prompt to be used for assistant.
|
532
567
|
def personality_prompt
|
@@ -599,10 +634,17 @@ module Twilio
|
|
599
634
|
end
|
600
635
|
|
601
636
|
##
|
602
|
-
# Access the
|
603
|
-
# @return [
|
604
|
-
def
|
605
|
-
context.
|
637
|
+
# Access the assistants_tools
|
638
|
+
# @return [assistants_tools] assistants_tools
|
639
|
+
def assistants_tools
|
640
|
+
context.assistants_tools
|
641
|
+
end
|
642
|
+
|
643
|
+
##
|
644
|
+
# Access the assistants_knowledge
|
645
|
+
# @return [assistants_knowledge] assistants_knowledge
|
646
|
+
def assistants_knowledge
|
647
|
+
context.assistants_knowledge
|
606
648
|
end
|
607
649
|
|
608
650
|
##
|
@@ -0,0 +1,209 @@
|
|
1
|
+
##
|
2
|
+
# This code was generated by
|
3
|
+
# ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
|
4
|
+
# | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
|
5
|
+
# | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
|
6
|
+
#
|
7
|
+
# Twilio - Assistants
|
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 Assistants < AssistantsBase
|
19
|
+
class V1 < Version
|
20
|
+
class Knowledge < InstanceContext
|
21
|
+
|
22
|
+
class KnowledgeStatusList < ListResource
|
23
|
+
|
24
|
+
##
|
25
|
+
# Initialize the KnowledgeStatusList
|
26
|
+
# @param [Version] version Version that contains the resource
|
27
|
+
# @return [KnowledgeStatusList] KnowledgeStatusList
|
28
|
+
def initialize(version, id: nil)
|
29
|
+
super(version)
|
30
|
+
# Path Solution
|
31
|
+
@solution = { id: id }
|
32
|
+
|
33
|
+
|
34
|
+
end
|
35
|
+
|
36
|
+
|
37
|
+
|
38
|
+
# Provide a user friendly representation
|
39
|
+
def to_s
|
40
|
+
'#<Twilio.Assistants.V1.KnowledgeStatusList>'
|
41
|
+
end
|
42
|
+
end
|
43
|
+
|
44
|
+
|
45
|
+
class KnowledgeStatusContext < InstanceContext
|
46
|
+
##
|
47
|
+
# Initialize the KnowledgeStatusContext
|
48
|
+
# @param [Version] version Version that contains the resource
|
49
|
+
# @param [String] id the Knowledge ID.
|
50
|
+
# @return [KnowledgeStatusContext] KnowledgeStatusContext
|
51
|
+
def initialize(version, id)
|
52
|
+
super(version)
|
53
|
+
|
54
|
+
# Path Solution
|
55
|
+
@solution = { id: id, }
|
56
|
+
@uri = "/Knowledge/#{@solution[:id]}/Status"
|
57
|
+
|
58
|
+
|
59
|
+
end
|
60
|
+
##
|
61
|
+
# Fetch the KnowledgeStatusInstance
|
62
|
+
# @return [KnowledgeStatusInstance] Fetched KnowledgeStatusInstance
|
63
|
+
def fetch
|
64
|
+
|
65
|
+
headers = Twilio::Values.of({'Content-Type' => 'application/x-www-form-urlencoded', })
|
66
|
+
|
67
|
+
payload = @version.fetch('GET', @uri, headers: headers)
|
68
|
+
KnowledgeStatusInstance.new(
|
69
|
+
@version,
|
70
|
+
payload,
|
71
|
+
id: @solution[:id],
|
72
|
+
)
|
73
|
+
end
|
74
|
+
|
75
|
+
|
76
|
+
##
|
77
|
+
# Provide a user friendly representation
|
78
|
+
def to_s
|
79
|
+
context = @solution.map{|k, v| "#{k}: #{v}"}.join(',')
|
80
|
+
"#<Twilio.Assistants.V1.KnowledgeStatusContext #{context}>"
|
81
|
+
end
|
82
|
+
|
83
|
+
##
|
84
|
+
# Provide a detailed, user friendly representation
|
85
|
+
def inspect
|
86
|
+
context = @solution.map{|k, v| "#{k}: #{v}"}.join(',')
|
87
|
+
"#<Twilio.Assistants.V1.KnowledgeStatusContext #{context}>"
|
88
|
+
end
|
89
|
+
end
|
90
|
+
|
91
|
+
class KnowledgeStatusPage < Page
|
92
|
+
##
|
93
|
+
# Initialize the KnowledgeStatusPage
|
94
|
+
# @param [Version] version Version that contains the resource
|
95
|
+
# @param [Response] response Response from the API
|
96
|
+
# @param [Hash] solution Path solution for the resource
|
97
|
+
# @return [KnowledgeStatusPage] KnowledgeStatusPage
|
98
|
+
def initialize(version, response, solution)
|
99
|
+
super(version, response)
|
100
|
+
|
101
|
+
# Path Solution
|
102
|
+
@solution = solution
|
103
|
+
end
|
104
|
+
|
105
|
+
##
|
106
|
+
# Build an instance of KnowledgeStatusInstance
|
107
|
+
# @param [Hash] payload Payload response from the API
|
108
|
+
# @return [KnowledgeStatusInstance] KnowledgeStatusInstance
|
109
|
+
def get_instance(payload)
|
110
|
+
KnowledgeStatusInstance.new(@version, payload, id: @solution[:id])
|
111
|
+
end
|
112
|
+
|
113
|
+
##
|
114
|
+
# Provide a user friendly representation
|
115
|
+
def to_s
|
116
|
+
'<Twilio.Assistants.V1.KnowledgeStatusPage>'
|
117
|
+
end
|
118
|
+
end
|
119
|
+
class KnowledgeStatusInstance < InstanceResource
|
120
|
+
##
|
121
|
+
# Initialize the KnowledgeStatusInstance
|
122
|
+
# @param [Version] version Version that contains the resource
|
123
|
+
# @param [Hash] payload payload that contains response from Twilio
|
124
|
+
# @param [String] account_sid The SID of the
|
125
|
+
# {Account}[https://www.twilio.com/docs/iam/api/account] that created this KnowledgeStatus
|
126
|
+
# resource.
|
127
|
+
# @param [String] sid The SID of the Call resource to fetch.
|
128
|
+
# @return [KnowledgeStatusInstance] KnowledgeStatusInstance
|
129
|
+
def initialize(version, payload , id: nil)
|
130
|
+
super(version)
|
131
|
+
|
132
|
+
# Marshaled Properties
|
133
|
+
@properties = {
|
134
|
+
'account_sid' => payload['account_sid'],
|
135
|
+
'status' => payload['status'],
|
136
|
+
'last_status' => payload['last_status'],
|
137
|
+
'date_updated' => Twilio.deserialize_iso8601_datetime(payload['date_updated']),
|
138
|
+
}
|
139
|
+
|
140
|
+
# Context
|
141
|
+
@instance_context = nil
|
142
|
+
@params = { 'id' => id || @properties['id'] , }
|
143
|
+
end
|
144
|
+
|
145
|
+
##
|
146
|
+
# Generate an instance context for the instance, the context is capable of
|
147
|
+
# performing various actions. All instance actions are proxied to the context
|
148
|
+
# @return [KnowledgeStatusContext] CallContext for this CallInstance
|
149
|
+
def context
|
150
|
+
unless @instance_context
|
151
|
+
@instance_context = KnowledgeStatusContext.new(@version , @params['id'])
|
152
|
+
end
|
153
|
+
@instance_context
|
154
|
+
end
|
155
|
+
|
156
|
+
##
|
157
|
+
# @return [String] The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Knowledge resource.
|
158
|
+
def account_sid
|
159
|
+
@properties['account_sid']
|
160
|
+
end
|
161
|
+
|
162
|
+
##
|
163
|
+
# @return [String] The status of processing the knowledge source ('QUEUED', 'PROCESSING', 'COMPLETED', 'FAILED')
|
164
|
+
def status
|
165
|
+
@properties['status']
|
166
|
+
end
|
167
|
+
|
168
|
+
##
|
169
|
+
# @return [String] The last status of processing the knowledge source ('QUEUED', 'PROCESSING', 'COMPLETED', 'FAILED')
|
170
|
+
def last_status
|
171
|
+
@properties['last_status']
|
172
|
+
end
|
173
|
+
|
174
|
+
##
|
175
|
+
# @return [Time] The date and time in GMT when the Knowledge was last updated specified in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.
|
176
|
+
def date_updated
|
177
|
+
@properties['date_updated']
|
178
|
+
end
|
179
|
+
|
180
|
+
##
|
181
|
+
# Fetch the KnowledgeStatusInstance
|
182
|
+
# @return [KnowledgeStatusInstance] Fetched KnowledgeStatusInstance
|
183
|
+
def fetch
|
184
|
+
|
185
|
+
context.fetch
|
186
|
+
end
|
187
|
+
|
188
|
+
##
|
189
|
+
# Provide a user friendly representation
|
190
|
+
def to_s
|
191
|
+
values = @params.map{|k, v| "#{k}: #{v}"}.join(" ")
|
192
|
+
"<Twilio.Assistants.V1.KnowledgeStatusInstance #{values}>"
|
193
|
+
end
|
194
|
+
|
195
|
+
##
|
196
|
+
# Provide a detailed, user friendly representation
|
197
|
+
def inspect
|
198
|
+
values = @properties.map{|k, v| "#{k}: #{v}"}.join(" ")
|
199
|
+
"<Twilio.Assistants.V1.KnowledgeStatusInstance #{values}>"
|
200
|
+
end
|
201
|
+
end
|
202
|
+
|
203
|
+
end
|
204
|
+
end
|
205
|
+
end
|
206
|
+
end
|
207
|
+
end
|
208
|
+
|
209
|
+
|
@@ -184,8 +184,7 @@ module Twilio
|
|
184
184
|
# Path Solution
|
185
185
|
@solution = { }
|
186
186
|
@uri = "/Knowledge"
|
187
|
-
|
188
|
-
@search = nil
|
187
|
+
|
189
188
|
end
|
190
189
|
##
|
191
190
|
# Create the KnowledgeInstance
|
@@ -295,13 +294,6 @@ module Twilio
|
|
295
294
|
end
|
296
295
|
|
297
296
|
|
298
|
-
##
|
299
|
-
# Access the search
|
300
|
-
# @return [SearchList]
|
301
|
-
# @return [SearchContext]
|
302
|
-
def search
|
303
|
-
@search ||= SearchList.new(@version )
|
304
|
-
end
|
305
297
|
|
306
298
|
# Provide a user friendly representation
|
307
299
|
def to_s
|
@@ -325,7 +317,7 @@ module Twilio
|
|
325
317
|
|
326
318
|
# Dependents
|
327
319
|
@chunks = nil
|
328
|
-
@
|
320
|
+
@knowledge_status = nil
|
329
321
|
end
|
330
322
|
##
|
331
323
|
# Delete the KnowledgeInstance
|
@@ -381,15 +373,14 @@ module Twilio
|
|
381
373
|
@chunks
|
382
374
|
end
|
383
375
|
##
|
384
|
-
# Access the
|
385
|
-
# @return [
|
386
|
-
# @return [
|
387
|
-
def
|
388
|
-
|
389
|
-
|
390
|
-
@
|
391
|
-
|
392
|
-
@status
|
376
|
+
# Access the knowledge_status
|
377
|
+
# @return [KnowledgeStatusList]
|
378
|
+
# @return [KnowledgeStatusContext]
|
379
|
+
def knowledge_status
|
380
|
+
KnowledgeStatusContext.new(
|
381
|
+
@version,
|
382
|
+
@solution[:id]
|
383
|
+
)
|
393
384
|
end
|
394
385
|
|
395
386
|
##
|
@@ -457,6 +448,7 @@ module Twilio
|
|
457
448
|
'name' => payload['name'],
|
458
449
|
'status' => payload['status'],
|
459
450
|
'type' => payload['type'],
|
451
|
+
'url' => payload['url'],
|
460
452
|
'date_created' => Twilio.deserialize_iso8601_datetime(payload['date_created']),
|
461
453
|
'date_updated' => Twilio.deserialize_iso8601_datetime(payload['date_updated']),
|
462
454
|
}
|
@@ -519,6 +511,12 @@ module Twilio
|
|
519
511
|
@properties['type']
|
520
512
|
end
|
521
513
|
|
514
|
+
##
|
515
|
+
# @return [String] The url of the knowledge resource.
|
516
|
+
def url
|
517
|
+
@properties['url']
|
518
|
+
end
|
519
|
+
|
522
520
|
##
|
523
521
|
# @return [Time] The date and time in GMT when the Knowledge was created specified in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.
|
524
522
|
def date_created
|
@@ -566,10 +564,10 @@ module Twilio
|
|
566
564
|
end
|
567
565
|
|
568
566
|
##
|
569
|
-
# Access the
|
570
|
-
# @return [
|
571
|
-
def
|
572
|
-
context.
|
567
|
+
# Access the knowledge_status
|
568
|
+
# @return [knowledge_status] knowledge_status
|
569
|
+
def knowledge_status
|
570
|
+
context.knowledge_status
|
573
571
|
end
|
574
572
|
|
575
573
|
##
|
@@ -345,6 +345,21 @@ module Twilio
|
|
345
345
|
@version.delete('DELETE', @uri, headers: headers)
|
346
346
|
end
|
347
347
|
|
348
|
+
##
|
349
|
+
# Fetch the ToolInstance
|
350
|
+
# @return [ToolInstance] Fetched ToolInstance
|
351
|
+
def fetch
|
352
|
+
|
353
|
+
headers = Twilio::Values.of({'Content-Type' => 'application/x-www-form-urlencoded', })
|
354
|
+
|
355
|
+
payload = @version.fetch('GET', @uri, headers: headers)
|
356
|
+
ToolInstance.new(
|
357
|
+
@version,
|
358
|
+
payload,
|
359
|
+
id: @solution[:id],
|
360
|
+
)
|
361
|
+
end
|
362
|
+
|
348
363
|
##
|
349
364
|
# Update the ToolInstance
|
350
365
|
# @param [AssistantsV1ServiceUpdateToolRequest] assistants_v1_service_update_tool_request
|
@@ -429,8 +444,10 @@ module Twilio
|
|
429
444
|
'name' => payload['name'],
|
430
445
|
'requires_auth' => payload['requires_auth'],
|
431
446
|
'type' => payload['type'],
|
447
|
+
'url' => payload['url'],
|
432
448
|
'date_created' => Twilio.deserialize_iso8601_datetime(payload['date_created']),
|
433
449
|
'date_updated' => Twilio.deserialize_iso8601_datetime(payload['date_updated']),
|
450
|
+
'policies' => payload['policies'],
|
434
451
|
}
|
435
452
|
|
436
453
|
# Context
|
@@ -497,6 +514,12 @@ module Twilio
|
|
497
514
|
@properties['type']
|
498
515
|
end
|
499
516
|
|
517
|
+
##
|
518
|
+
# @return [String] The url of the tool resource.
|
519
|
+
def url
|
520
|
+
@properties['url']
|
521
|
+
end
|
522
|
+
|
500
523
|
##
|
501
524
|
# @return [Time] The date and time in GMT when the Tool was created specified in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.
|
502
525
|
def date_created
|
@@ -509,6 +532,12 @@ module Twilio
|
|
509
532
|
@properties['date_updated']
|
510
533
|
end
|
511
534
|
|
535
|
+
##
|
536
|
+
# @return [Array<AssistantsV1ServicePolicy>] The Policies associated with the tool.
|
537
|
+
def policies
|
538
|
+
@properties['policies']
|
539
|
+
end
|
540
|
+
|
512
541
|
##
|
513
542
|
# Delete the ToolInstance
|
514
543
|
# @return [Boolean] True if delete succeeds, false otherwise
|
@@ -517,6 +546,14 @@ module Twilio
|
|
517
546
|
context.delete
|
518
547
|
end
|
519
548
|
|
549
|
+
##
|
550
|
+
# Fetch the ToolInstance
|
551
|
+
# @return [ToolInstance] Fetched ToolInstance
|
552
|
+
def fetch
|
553
|
+
|
554
|
+
context.fetch
|
555
|
+
end
|
556
|
+
|
520
557
|
##
|
521
558
|
# Update the ToolInstance
|
522
559
|
# @param [AssistantsV1ServiceUpdateToolRequest] assistants_v1_service_update_tool_request
|
@@ -17,12 +17,12 @@ module Twilio
|
|
17
17
|
module REST
|
18
18
|
class Numbers < NumbersBase
|
19
19
|
class V1 < Version
|
20
|
-
class
|
20
|
+
class WebhookList < ListResource
|
21
21
|
|
22
22
|
##
|
23
|
-
# Initialize the
|
23
|
+
# Initialize the WebhookList
|
24
24
|
# @param [Version] version Version that contains the resource
|
25
|
-
# @return [
|
25
|
+
# @return [WebhookList] WebhookList
|
26
26
|
def initialize(version)
|
27
27
|
super(version)
|
28
28
|
# Path Solution
|
@@ -31,14 +31,14 @@ module Twilio
|
|
31
31
|
|
32
32
|
end
|
33
33
|
##
|
34
|
-
# Fetch the
|
35
|
-
# @return [
|
34
|
+
# Fetch the WebhookInstance
|
35
|
+
# @return [WebhookInstance] Fetched WebhookInstance
|
36
36
|
def fetch
|
37
37
|
|
38
38
|
headers = Twilio::Values.of({'Content-Type' => 'application/x-www-form-urlencoded', })
|
39
39
|
|
40
40
|
payload = @version.fetch('GET', @uri, headers: headers)
|
41
|
-
|
41
|
+
WebhookInstance.new(
|
42
42
|
@version,
|
43
43
|
payload,
|
44
44
|
)
|
@@ -49,17 +49,17 @@ module Twilio
|
|
49
49
|
|
50
50
|
# Provide a user friendly representation
|
51
51
|
def to_s
|
52
|
-
'#<Twilio.Numbers.V1.
|
52
|
+
'#<Twilio.Numbers.V1.WebhookList>'
|
53
53
|
end
|
54
54
|
end
|
55
55
|
|
56
|
-
class
|
56
|
+
class WebhookPage < Page
|
57
57
|
##
|
58
|
-
# Initialize the
|
58
|
+
# Initialize the WebhookPage
|
59
59
|
# @param [Version] version Version that contains the resource
|
60
60
|
# @param [Response] response Response from the API
|
61
61
|
# @param [Hash] solution Path solution for the resource
|
62
|
-
# @return [
|
62
|
+
# @return [WebhookPage] WebhookPage
|
63
63
|
def initialize(version, response, solution)
|
64
64
|
super(version, response)
|
65
65
|
|
@@ -68,29 +68,29 @@ module Twilio
|
|
68
68
|
end
|
69
69
|
|
70
70
|
##
|
71
|
-
# Build an instance of
|
71
|
+
# Build an instance of WebhookInstance
|
72
72
|
# @param [Hash] payload Payload response from the API
|
73
|
-
# @return [
|
73
|
+
# @return [WebhookInstance] WebhookInstance
|
74
74
|
def get_instance(payload)
|
75
|
-
|
75
|
+
WebhookInstance.new(@version, payload)
|
76
76
|
end
|
77
77
|
|
78
78
|
##
|
79
79
|
# Provide a user friendly representation
|
80
80
|
def to_s
|
81
|
-
'<Twilio.Numbers.V1.
|
81
|
+
'<Twilio.Numbers.V1.WebhookPage>'
|
82
82
|
end
|
83
83
|
end
|
84
|
-
class
|
84
|
+
class WebhookInstance < InstanceResource
|
85
85
|
##
|
86
|
-
# Initialize the
|
86
|
+
# Initialize the WebhookInstance
|
87
87
|
# @param [Version] version Version that contains the resource
|
88
88
|
# @param [Hash] payload payload that contains response from Twilio
|
89
89
|
# @param [String] account_sid The SID of the
|
90
|
-
# {Account}[https://www.twilio.com/docs/iam/api/account] that created this
|
90
|
+
# {Account}[https://www.twilio.com/docs/iam/api/account] that created this Webhook
|
91
91
|
# resource.
|
92
92
|
# @param [String] sid The SID of the Call resource to fetch.
|
93
|
-
# @return [
|
93
|
+
# @return [WebhookInstance] WebhookInstance
|
94
94
|
def initialize(version, payload )
|
95
95
|
super(version)
|
96
96
|
|
@@ -145,13 +145,13 @@ module Twilio
|
|
145
145
|
##
|
146
146
|
# Provide a user friendly representation
|
147
147
|
def to_s
|
148
|
-
"<Twilio.Numbers.V1.
|
148
|
+
"<Twilio.Numbers.V1.WebhookInstance>"
|
149
149
|
end
|
150
150
|
|
151
151
|
##
|
152
152
|
# Provide a detailed, user friendly representation
|
153
153
|
def inspect
|
154
|
-
"<Twilio.Numbers.V1.
|
154
|
+
"<Twilio.Numbers.V1.WebhookInstance>"
|
155
155
|
end
|
156
156
|
end
|
157
157
|
|
@@ -28,8 +28,8 @@ module Twilio
|
|
28
28
|
@porting_portabilities = nil
|
29
29
|
@porting_webhook_configurations = nil
|
30
30
|
@porting_webhook_configurations_delete = nil
|
31
|
-
@porting_webhook_configuration_fetch = nil
|
32
31
|
@signing_request_configurations = nil
|
32
|
+
@webhook = nil
|
33
33
|
end
|
34
34
|
|
35
35
|
##
|
@@ -135,16 +135,16 @@ module Twilio
|
|
135
135
|
end
|
136
136
|
end
|
137
137
|
##
|
138
|
-
# @return [Twilio::REST::Numbers::V1::PortingWebhookConfigurationFetchList]
|
139
|
-
def porting_webhook_configuration_fetch
|
140
|
-
@porting_webhook_configuration_fetch ||= PortingWebhookConfigurationFetchList.new self
|
141
|
-
end
|
142
|
-
##
|
143
138
|
# @return [Twilio::REST::Numbers::V1::SigningRequestConfigurationList]
|
144
139
|
def signing_request_configurations
|
145
140
|
@signing_request_configurations ||= SigningRequestConfigurationList.new self
|
146
141
|
end
|
147
142
|
##
|
143
|
+
# @return [Twilio::REST::Numbers::V1::WebhookList]
|
144
|
+
def webhook
|
145
|
+
@webhook ||= WebhookList.new self
|
146
|
+
end
|
147
|
+
##
|
148
148
|
# Provide a user friendly representation
|
149
149
|
def to_s
|
150
150
|
'<Twilio::REST::Numbers::V1>';
|
@@ -36,13 +36,16 @@ module Twilio
|
|
36
36
|
##
|
37
37
|
# Create the DeploymentInstance
|
38
38
|
# @param [String] build_sid The SID of the Build for the Deployment.
|
39
|
+
# @param [Boolean] is_plugin Whether the Deployment is a plugin.
|
39
40
|
# @return [DeploymentInstance] Created DeploymentInstance
|
40
41
|
def create(
|
41
|
-
build_sid: :unset
|
42
|
+
build_sid: :unset,
|
43
|
+
is_plugin: :unset
|
42
44
|
)
|
43
45
|
|
44
46
|
data = Twilio::Values.of({
|
45
47
|
'BuildSid' => build_sid,
|
48
|
+
'IsPlugin' => is_plugin,
|
46
49
|
})
|
47
50
|
|
48
51
|
headers = Twilio::Values.of({'Content-Type' => 'application/x-www-form-urlencoded', })
|
data/lib/twilio-ruby/version.rb
CHANGED