twilio-ruby 5.58.0 → 5.59.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.travis.yml +1 -0
- data/CHANGES.md +90 -0
- data/README.md +3 -3
- data/lib/twilio-ruby/http/http_client.rb +1 -1
- data/lib/twilio-ruby/rest/api/v2010/account/call/siprec.rb +667 -0
- data/lib/twilio-ruby/rest/api/v2010/account/call.rb +27 -1
- data/lib/twilio-ruby/rest/api/v2010/account/incoming_phone_number/local.rb +4 -4
- data/lib/twilio-ruby/rest/api/v2010/account/incoming_phone_number/mobile.rb +4 -4
- data/lib/twilio-ruby/rest/api/v2010/account/incoming_phone_number/toll_free.rb +4 -4
- data/lib/twilio-ruby/rest/api/v2010/account/incoming_phone_number.rb +10 -10
- data/lib/twilio-ruby/rest/conversations/v1/conversation/message.rb +12 -5
- data/lib/twilio-ruby/rest/conversations/v1/service/configuration/notification.rb +18 -2
- data/lib/twilio-ruby/rest/conversations/v1/service/conversation/message.rb +12 -5
- data/lib/twilio-ruby/rest/flex_api/v1/configuration.rb +7 -0
- data/lib/twilio-ruby/rest/insights/v1/call_summaries.rb +44 -38
- data/lib/twilio-ruby/rest/messaging/v1/brand_registration.rb +43 -1
- data/lib/twilio-ruby/rest/messaging/v1/service/us_app_to_person.rb +9 -2
- data/lib/twilio-ruby/rest/messaging/v1/service/us_app_to_person_usecase.rb +6 -2
- data/lib/twilio-ruby/rest/numbers/v2/regulatory_compliance/bundle/bundle_copy.rb +188 -0
- data/lib/twilio-ruby/rest/numbers/v2/regulatory_compliance/bundle/replace_items.rb +188 -0
- data/lib/twilio-ruby/rest/numbers/v2/regulatory_compliance/bundle.rb +59 -14
- data/lib/twilio-ruby/rest/pricing/v2/country.rb +280 -0
- data/lib/twilio-ruby/rest/pricing/v2/number.rb +225 -0
- data/lib/twilio-ruby/rest/pricing/v2.rb +37 -0
- data/lib/twilio-ruby/rest/pricing.rb +19 -0
- data/lib/twilio-ruby/rest/serverless/v1/service/environment.rb +1 -1
- data/lib/twilio-ruby/rest/serverless/v1/service.rb +7 -0
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/task/reservation.rb +7 -3
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/worker/reservation.rb +7 -3
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/worker.rb +23 -11
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace.rb +30 -20
- data/lib/twilio-ruby/rest/trunking/v1/trunk.rb +19 -3
- data/lib/twilio-ruby/rest/verify/v2/service/entity/challenge/notification.rb +6 -2
- data/lib/twilio-ruby/rest/verify/v2/service/entity/challenge.rb +36 -11
- data/lib/twilio-ruby/rest/verify/v2/service/entity/factor.rb +11 -9
- data/lib/twilio-ruby/rest/verify/v2/service/entity/new_factor.rb +8 -8
- data/lib/twilio-ruby/rest/verify/v2/service/entity.rb +7 -3
- data/lib/twilio-ruby/rest/verify/v2/service/verification.rb +8 -8
- data/lib/twilio-ruby/rest/verify/v2/template.rb +206 -0
- data/lib/twilio-ruby/rest/verify/v2.rb +7 -0
- data/lib/twilio-ruby/rest/verify.rb +6 -0
- data/lib/twilio-ruby/version.rb +1 -1
- metadata +9 -3
@@ -0,0 +1,206 @@
|
|
1
|
+
##
|
2
|
+
# This code was generated by
|
3
|
+
# \ / _ _ _| _ _
|
4
|
+
# | (_)\/(_)(_|\/| |(/_ v1.0.0
|
5
|
+
# / /
|
6
|
+
#
|
7
|
+
# frozen_string_literal: true
|
8
|
+
|
9
|
+
module Twilio
|
10
|
+
module REST
|
11
|
+
class Verify < Domain
|
12
|
+
class V2 < Version
|
13
|
+
class TemplateList < ListResource
|
14
|
+
##
|
15
|
+
# Initialize the TemplateList
|
16
|
+
# @param [Version] version Version that contains the resource
|
17
|
+
# @return [TemplateList] TemplateList
|
18
|
+
def initialize(version)
|
19
|
+
super(version)
|
20
|
+
|
21
|
+
# Path Solution
|
22
|
+
@solution = {}
|
23
|
+
@uri = "/Templates"
|
24
|
+
end
|
25
|
+
|
26
|
+
##
|
27
|
+
# Lists TemplateInstance records from the API as a list.
|
28
|
+
# Unlike stream(), this operation is eager and will load `limit` records into
|
29
|
+
# memory before returning.
|
30
|
+
# @param [String] friendly_name String filter used to query templates with a given
|
31
|
+
# friendly name
|
32
|
+
# @param [Integer] limit Upper limit for the number of records to return. stream()
|
33
|
+
# guarantees to never return more than limit. Default is no limit
|
34
|
+
# @param [Integer] page_size Number of records to fetch per request, when
|
35
|
+
# not set will use the default value of 50 records. If no page_size is defined
|
36
|
+
# but a limit is defined, stream() will attempt to read the limit with the most
|
37
|
+
# efficient page size, i.e. min(limit, 1000)
|
38
|
+
# @return [Array] Array of up to limit results
|
39
|
+
def list(friendly_name: :unset, limit: nil, page_size: nil)
|
40
|
+
self.stream(friendly_name: friendly_name, limit: limit, page_size: page_size).entries
|
41
|
+
end
|
42
|
+
|
43
|
+
##
|
44
|
+
# Streams TemplateInstance records from the API as an Enumerable.
|
45
|
+
# This operation lazily loads records as efficiently as possible until the limit
|
46
|
+
# is reached.
|
47
|
+
# @param [String] friendly_name String filter used to query templates with a given
|
48
|
+
# friendly name
|
49
|
+
# @param [Integer] limit Upper limit for the number of records to return. stream()
|
50
|
+
# guarantees to never return more than limit. Default is no limit.
|
51
|
+
# @param [Integer] page_size Number of records to fetch per request, when
|
52
|
+
# not set will use the default value of 50 records. If no page_size is defined
|
53
|
+
# but a limit is defined, stream() will attempt to read the limit with the most
|
54
|
+
# efficient page size, i.e. min(limit, 1000)
|
55
|
+
# @return [Enumerable] Enumerable that will yield up to limit results
|
56
|
+
def stream(friendly_name: :unset, limit: nil, page_size: nil)
|
57
|
+
limits = @version.read_limits(limit, page_size)
|
58
|
+
|
59
|
+
page = self.page(friendly_name: friendly_name, page_size: limits[:page_size], )
|
60
|
+
|
61
|
+
@version.stream(page, limit: limits[:limit], page_limit: limits[:page_limit])
|
62
|
+
end
|
63
|
+
|
64
|
+
##
|
65
|
+
# When passed a block, yields TemplateInstance records from the API.
|
66
|
+
# This operation lazily loads records as efficiently as possible until the limit
|
67
|
+
# is reached.
|
68
|
+
def each
|
69
|
+
limits = @version.read_limits
|
70
|
+
|
71
|
+
page = self.page(page_size: limits[:page_size], )
|
72
|
+
|
73
|
+
@version.stream(page,
|
74
|
+
limit: limits[:limit],
|
75
|
+
page_limit: limits[:page_limit]).each {|x| yield x}
|
76
|
+
end
|
77
|
+
|
78
|
+
##
|
79
|
+
# Retrieve a single page of TemplateInstance records from the API.
|
80
|
+
# Request is executed immediately.
|
81
|
+
# @param [String] friendly_name String filter used to query templates with a given
|
82
|
+
# friendly name
|
83
|
+
# @param [String] page_token PageToken provided by the API
|
84
|
+
# @param [Integer] page_number Page Number, this value is simply for client state
|
85
|
+
# @param [Integer] page_size Number of records to return, defaults to 50
|
86
|
+
# @return [Page] Page of TemplateInstance
|
87
|
+
def page(friendly_name: :unset, page_token: :unset, page_number: :unset, page_size: :unset)
|
88
|
+
params = Twilio::Values.of({
|
89
|
+
'FriendlyName' => friendly_name,
|
90
|
+
'PageToken' => page_token,
|
91
|
+
'Page' => page_number,
|
92
|
+
'PageSize' => page_size,
|
93
|
+
})
|
94
|
+
|
95
|
+
response = @version.page('GET', @uri, params: params)
|
96
|
+
|
97
|
+
TemplatePage.new(@version, response, @solution)
|
98
|
+
end
|
99
|
+
|
100
|
+
##
|
101
|
+
# Retrieve a single page of TemplateInstance records from the API.
|
102
|
+
# Request is executed immediately.
|
103
|
+
# @param [String] target_url API-generated URL for the requested results page
|
104
|
+
# @return [Page] Page of TemplateInstance
|
105
|
+
def get_page(target_url)
|
106
|
+
response = @version.domain.request(
|
107
|
+
'GET',
|
108
|
+
target_url
|
109
|
+
)
|
110
|
+
TemplatePage.new(@version, response, @solution)
|
111
|
+
end
|
112
|
+
|
113
|
+
##
|
114
|
+
# Provide a user friendly representation
|
115
|
+
def to_s
|
116
|
+
'#<Twilio.Verify.V2.TemplateList>'
|
117
|
+
end
|
118
|
+
end
|
119
|
+
|
120
|
+
class TemplatePage < Page
|
121
|
+
##
|
122
|
+
# Initialize the TemplatePage
|
123
|
+
# @param [Version] version Version that contains the resource
|
124
|
+
# @param [Response] response Response from the API
|
125
|
+
# @param [Hash] solution Path solution for the resource
|
126
|
+
# @return [TemplatePage] TemplatePage
|
127
|
+
def initialize(version, response, solution)
|
128
|
+
super(version, response)
|
129
|
+
|
130
|
+
# Path Solution
|
131
|
+
@solution = solution
|
132
|
+
end
|
133
|
+
|
134
|
+
##
|
135
|
+
# Build an instance of TemplateInstance
|
136
|
+
# @param [Hash] payload Payload response from the API
|
137
|
+
# @return [TemplateInstance] TemplateInstance
|
138
|
+
def get_instance(payload)
|
139
|
+
TemplateInstance.new(@version, payload, )
|
140
|
+
end
|
141
|
+
|
142
|
+
##
|
143
|
+
# Provide a user friendly representation
|
144
|
+
def to_s
|
145
|
+
'<Twilio.Verify.V2.TemplatePage>'
|
146
|
+
end
|
147
|
+
end
|
148
|
+
|
149
|
+
class TemplateInstance < InstanceResource
|
150
|
+
##
|
151
|
+
# Initialize the TemplateInstance
|
152
|
+
# @param [Version] version Version that contains the resource
|
153
|
+
# @param [Hash] payload payload that contains response from Twilio
|
154
|
+
# @return [TemplateInstance] TemplateInstance
|
155
|
+
def initialize(version, payload)
|
156
|
+
super(version)
|
157
|
+
|
158
|
+
# Marshaled Properties
|
159
|
+
@properties = {
|
160
|
+
'sid' => payload['sid'],
|
161
|
+
'account_sid' => payload['account_sid'],
|
162
|
+
'friendly_name' => payload['friendly_name'],
|
163
|
+
'translations' => payload['translations'],
|
164
|
+
}
|
165
|
+
end
|
166
|
+
|
167
|
+
##
|
168
|
+
# @return [String] A string that uniquely identifies this Template
|
169
|
+
def sid
|
170
|
+
@properties['sid']
|
171
|
+
end
|
172
|
+
|
173
|
+
##
|
174
|
+
# @return [String] Account Sid
|
175
|
+
def account_sid
|
176
|
+
@properties['account_sid']
|
177
|
+
end
|
178
|
+
|
179
|
+
##
|
180
|
+
# @return [String] A string to describe the verification template
|
181
|
+
def friendly_name
|
182
|
+
@properties['friendly_name']
|
183
|
+
end
|
184
|
+
|
185
|
+
##
|
186
|
+
# @return [Hash] Ojbect with the template translations.
|
187
|
+
def translations
|
188
|
+
@properties['translations']
|
189
|
+
end
|
190
|
+
|
191
|
+
##
|
192
|
+
# Provide a user friendly representation
|
193
|
+
def to_s
|
194
|
+
"<Twilio.Verify.V2.TemplateInstance>"
|
195
|
+
end
|
196
|
+
|
197
|
+
##
|
198
|
+
# Provide a detailed, user friendly representation
|
199
|
+
def inspect
|
200
|
+
"<Twilio.Verify.V2.TemplateInstance>"
|
201
|
+
end
|
202
|
+
end
|
203
|
+
end
|
204
|
+
end
|
205
|
+
end
|
206
|
+
end
|
@@ -18,6 +18,7 @@ module Twilio
|
|
18
18
|
@forms = nil
|
19
19
|
@services = nil
|
20
20
|
@verification_attempts = nil
|
21
|
+
@templates = nil
|
21
22
|
end
|
22
23
|
|
23
24
|
##
|
@@ -67,6 +68,12 @@ module Twilio
|
|
67
68
|
end
|
68
69
|
end
|
69
70
|
|
71
|
+
##
|
72
|
+
# @return [Twilio::REST::Verify::V2::TemplateContext]
|
73
|
+
def templates
|
74
|
+
@templates ||= TemplateList.new self
|
75
|
+
end
|
76
|
+
|
70
77
|
##
|
71
78
|
# Provide a user friendly representation
|
72
79
|
def to_s
|
data/lib/twilio-ruby/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: twilio-ruby
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 5.
|
4
|
+
version: 5.59.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Twilio API Team
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-
|
11
|
+
date: 2021-10-06 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: jwt
|
@@ -285,6 +285,7 @@ files:
|
|
285
285
|
- lib/twilio-ruby/rest/api/v2010/account/call/notification.rb
|
286
286
|
- lib/twilio-ruby/rest/api/v2010/account/call/payment.rb
|
287
287
|
- lib/twilio-ruby/rest/api/v2010/account/call/recording.rb
|
288
|
+
- lib/twilio-ruby/rest/api/v2010/account/call/siprec.rb
|
288
289
|
- lib/twilio-ruby/rest/api/v2010/account/conference.rb
|
289
290
|
- lib/twilio-ruby/rest/api/v2010/account/conference/participant.rb
|
290
291
|
- lib/twilio-ruby/rest/api/v2010/account/conference/recording.rb
|
@@ -500,8 +501,10 @@ files:
|
|
500
501
|
- lib/twilio-ruby/rest/numbers/v2.rb
|
501
502
|
- lib/twilio-ruby/rest/numbers/v2/regulatory_compliance.rb
|
502
503
|
- lib/twilio-ruby/rest/numbers/v2/regulatory_compliance/bundle.rb
|
504
|
+
- lib/twilio-ruby/rest/numbers/v2/regulatory_compliance/bundle/bundle_copy.rb
|
503
505
|
- lib/twilio-ruby/rest/numbers/v2/regulatory_compliance/bundle/evaluation.rb
|
504
506
|
- lib/twilio-ruby/rest/numbers/v2/regulatory_compliance/bundle/item_assignment.rb
|
507
|
+
- lib/twilio-ruby/rest/numbers/v2/regulatory_compliance/bundle/replace_items.rb
|
505
508
|
- lib/twilio-ruby/rest/numbers/v2/regulatory_compliance/end_user.rb
|
506
509
|
- lib/twilio-ruby/rest/numbers/v2/regulatory_compliance/end_user_type.rb
|
507
510
|
- lib/twilio-ruby/rest/numbers/v2/regulatory_compliance/regulation.rb
|
@@ -575,6 +578,8 @@ files:
|
|
575
578
|
- lib/twilio-ruby/rest/pricing/v1/voice/country.rb
|
576
579
|
- lib/twilio-ruby/rest/pricing/v1/voice/number.rb
|
577
580
|
- lib/twilio-ruby/rest/pricing/v2.rb
|
581
|
+
- lib/twilio-ruby/rest/pricing/v2/country.rb
|
582
|
+
- lib/twilio-ruby/rest/pricing/v2/number.rb
|
578
583
|
- lib/twilio-ruby/rest/pricing/v2/voice.rb
|
579
584
|
- lib/twilio-ruby/rest/pricing/v2/voice/country.rb
|
580
585
|
- lib/twilio-ruby/rest/pricing/v2/voice/number.rb
|
@@ -711,6 +716,7 @@ files:
|
|
711
716
|
- lib/twilio-ruby/rest/verify/v2/service/verification.rb
|
712
717
|
- lib/twilio-ruby/rest/verify/v2/service/verification_check.rb
|
713
718
|
- lib/twilio-ruby/rest/verify/v2/service/webhook.rb
|
719
|
+
- lib/twilio-ruby/rest/verify/v2/template.rb
|
714
720
|
- lib/twilio-ruby/rest/verify/v2/verification_attempt.rb
|
715
721
|
- lib/twilio-ruby/rest/video.rb
|
716
722
|
- lib/twilio-ruby/rest/video/v1.rb
|
@@ -782,7 +788,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
782
788
|
- !ruby/object:Gem::Version
|
783
789
|
version: '0'
|
784
790
|
requirements: []
|
785
|
-
rubygems_version: 3.0.
|
791
|
+
rubygems_version: 3.0.9
|
786
792
|
signing_key:
|
787
793
|
specification_version: 4
|
788
794
|
summary: The official library for communicating with the Twilio REST API, building
|