twilio-ruby 5.68.0 → 5.69.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.github/workflows/pr-lint.yml +1 -1
- data/CHANGES.md +22 -0
- data/PULL_REQUEST_TEMPLATE.md +1 -1
- data/README.md +2 -2
- data/lib/twilio-ruby/rest/lookups/v2/phone_number.rb +2 -9
- data/lib/twilio-ruby/rest/supersim/v1/sim/sim_ip_address.rb +195 -0
- data/lib/twilio-ruby/rest/supersim/v1/sim.rb +20 -0
- data/lib/twilio-ruby/rest/verify/v2/service/verification_check.rb +3 -3
- data/lib/twilio-ruby/rest/verify/v2/verification_attempts_summary.rb +8 -8
- data/lib/twilio-ruby/version.rb +1 -1
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8dfd0266c044e0696ec36adbe6b650a715bb222c
|
4
|
+
data.tar.gz: 72cdf92cb46568d1b314f2ae67c1d96f9129d0ef
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e18aee13b94d15e4a19b152d0c730caf8c7ea176e3ab422584a938e7934f415a868e8b592334fab20ccd8d927e6db0dd476d759c95ea0aa035c64658fe33bf9e
|
7
|
+
data.tar.gz: e482fefb1d0b50b0f7c3b79f829b5c3f899efede7dd85b0b0c10b7ba375efa7a7b4545367d1635e54356c0de6219a6080458dee1cb1fea358b0da8a3b00a204b
|
data/CHANGES.md
CHANGED
@@ -1,6 +1,28 @@
|
|
1
1
|
twilio-ruby changelog
|
2
2
|
=====================
|
3
3
|
|
4
|
+
[2022-07-13] Version 5.69.0
|
5
|
+
---------------------------
|
6
|
+
**Library - Fix**
|
7
|
+
- [PR #612](https://github.com/twilio/twilio-ruby/pull/612): useragent regrex unit test for RC branch. Thanks to [@claudiachua](https://github.com/claudiachua)!
|
8
|
+
|
9
|
+
**Library - Test**
|
10
|
+
- [PR #610](https://github.com/twilio/twilio-ruby/pull/610): Adding misc as PR type. Thanks to [@rakatyal](https://github.com/rakatyal)!
|
11
|
+
|
12
|
+
**Conversations**
|
13
|
+
- Allowed to use `identity` as part of Participant's resource **(breaking change)**
|
14
|
+
|
15
|
+
**Lookups**
|
16
|
+
- Remove `enhanced_line_type` from the lookup response **(breaking change)**
|
17
|
+
|
18
|
+
**Supersim**
|
19
|
+
- Add support for `sim_ip_addresses` resource to helper libraries
|
20
|
+
|
21
|
+
**Verify**
|
22
|
+
- Changed summary param `service_sid` to `verify_service_sid` to be consistent with list attempts API **(breaking change)**
|
23
|
+
- Make `code` optional on Verification check to support `sna` attempts.
|
24
|
+
|
25
|
+
|
4
26
|
[2022-06-29] Version 5.68.0
|
5
27
|
---------------------------
|
6
28
|
**Api**
|
data/PULL_REQUEST_TEMPLATE.md
CHANGED
@@ -3,7 +3,7 @@ We appreciate the effort for this pull request but before that please make sure
|
|
3
3
|
|
4
4
|
Please format the PR title appropriately based on the type of change:
|
5
5
|
<type>[!]: <description>
|
6
|
-
Where <type> is one of: docs, chore, feat, fix, test.
|
6
|
+
Where <type> is one of: docs, chore, feat, fix, test, misc.
|
7
7
|
Add a '!' after the type for breaking changes (e.g. feat!: new breaking feature).
|
8
8
|
|
9
9
|
**All third-party contributors acknowledge that any contributions they provide will be made under the same open-source license that the open-source project is provided under.**
|
data/README.md
CHANGED
@@ -34,13 +34,13 @@ This library supports the following Ruby implementations:
|
|
34
34
|
To install using [Bundler][bundler] grab the latest stable version:
|
35
35
|
|
36
36
|
```ruby
|
37
|
-
gem 'twilio-ruby', '~> 5.
|
37
|
+
gem 'twilio-ruby', '~> 5.69.0'
|
38
38
|
```
|
39
39
|
|
40
40
|
To manually install `twilio-ruby` via [Rubygems][rubygems] simply gem install:
|
41
41
|
|
42
42
|
```bash
|
43
|
-
gem install twilio-ruby -v 5.
|
43
|
+
gem install twilio-ruby -v 5.69.0
|
44
44
|
```
|
45
45
|
|
46
46
|
To build and install the development branch yourself from the latest source:
|
@@ -83,7 +83,7 @@ module Twilio
|
|
83
83
|
# Fetch the PhoneNumberInstance
|
84
84
|
# @param [String] fields A comma-separated list of fields to return. Possible
|
85
85
|
# values are caller_name, sim_swap, call_forwarding, live_activity,
|
86
|
-
#
|
86
|
+
# line_type_intelligence.
|
87
87
|
# @param [String] country_code The {country
|
88
88
|
# code}[https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2] used if the phone number
|
89
89
|
# provided is in national format.
|
@@ -136,7 +136,6 @@ module Twilio
|
|
136
136
|
'sim_swap' => payload['sim_swap'],
|
137
137
|
'call_forwarding' => payload['call_forwarding'],
|
138
138
|
'live_activity' => payload['live_activity'],
|
139
|
-
'enhanced_line_type' => payload['enhanced_line_type'],
|
140
139
|
'line_type_intelligence' => payload['line_type_intelligence'],
|
141
140
|
'url' => payload['url'],
|
142
141
|
}
|
@@ -217,12 +216,6 @@ module Twilio
|
|
217
216
|
@properties['live_activity']
|
218
217
|
end
|
219
218
|
|
220
|
-
##
|
221
|
-
# @return [Hash] An object that contains line type information
|
222
|
-
def enhanced_line_type
|
223
|
-
@properties['enhanced_line_type']
|
224
|
-
end
|
225
|
-
|
226
219
|
##
|
227
220
|
# @return [Hash] An object that contains line type information
|
228
221
|
def line_type_intelligence
|
@@ -239,7 +232,7 @@ module Twilio
|
|
239
232
|
# Fetch the PhoneNumberInstance
|
240
233
|
# @param [String] fields A comma-separated list of fields to return. Possible
|
241
234
|
# values are caller_name, sim_swap, call_forwarding, live_activity,
|
242
|
-
#
|
235
|
+
# line_type_intelligence.
|
243
236
|
# @param [String] country_code The {country
|
244
237
|
# code}[https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2] used if the phone number
|
245
238
|
# provided is in national format.
|
@@ -0,0 +1,195 @@
|
|
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 Supersim < Domain
|
12
|
+
class V1 < Version
|
13
|
+
class SimContext < InstanceContext
|
14
|
+
##
|
15
|
+
# PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution.
|
16
|
+
class SimIpAddressList < ListResource
|
17
|
+
##
|
18
|
+
# Initialize the SimIpAddressList
|
19
|
+
# @param [Version] version Version that contains the resource
|
20
|
+
# @param [String] sim_sid The unique string that identifies the Sim resource.
|
21
|
+
# @return [SimIpAddressList] SimIpAddressList
|
22
|
+
def initialize(version, sim_sid: nil)
|
23
|
+
super(version)
|
24
|
+
|
25
|
+
# Path Solution
|
26
|
+
@solution = {sim_sid: sim_sid}
|
27
|
+
@uri = "/Sims/#{@solution[:sim_sid]}/IpAddresses"
|
28
|
+
end
|
29
|
+
|
30
|
+
##
|
31
|
+
# Lists SimIpAddressInstance records from the API as a list.
|
32
|
+
# Unlike stream(), this operation is eager and will load `limit` records into
|
33
|
+
# memory before returning.
|
34
|
+
# @param [Integer] limit Upper limit for the number of records to return. stream()
|
35
|
+
# guarantees to never return more than limit. Default is no limit
|
36
|
+
# @param [Integer] page_size Number of records to fetch per request, when
|
37
|
+
# not set will use the default value of 50 records. If no page_size is defined
|
38
|
+
# but a limit is defined, stream() will attempt to read the limit with the most
|
39
|
+
# efficient page size, i.e. min(limit, 1000)
|
40
|
+
# @return [Array] Array of up to limit results
|
41
|
+
def list(limit: nil, page_size: nil)
|
42
|
+
self.stream(limit: limit, page_size: page_size).entries
|
43
|
+
end
|
44
|
+
|
45
|
+
##
|
46
|
+
# Streams SimIpAddressInstance records from the API as an Enumerable.
|
47
|
+
# This operation lazily loads records as efficiently as possible until the limit
|
48
|
+
# is reached.
|
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(limit: nil, page_size: nil)
|
57
|
+
limits = @version.read_limits(limit, page_size)
|
58
|
+
|
59
|
+
page = self.page(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 SimIpAddressInstance 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 SimIpAddressInstance records from the API.
|
80
|
+
# Request is executed immediately.
|
81
|
+
# @param [String] page_token PageToken provided by the API
|
82
|
+
# @param [Integer] page_number Page Number, this value is simply for client state
|
83
|
+
# @param [Integer] page_size Number of records to return, defaults to 50
|
84
|
+
# @return [Page] Page of SimIpAddressInstance
|
85
|
+
def page(page_token: :unset, page_number: :unset, page_size: :unset)
|
86
|
+
params = Twilio::Values.of({
|
87
|
+
'PageToken' => page_token,
|
88
|
+
'Page' => page_number,
|
89
|
+
'PageSize' => page_size,
|
90
|
+
})
|
91
|
+
|
92
|
+
response = @version.page('GET', @uri, params: params)
|
93
|
+
|
94
|
+
SimIpAddressPage.new(@version, response, @solution)
|
95
|
+
end
|
96
|
+
|
97
|
+
##
|
98
|
+
# Retrieve a single page of SimIpAddressInstance records from the API.
|
99
|
+
# Request is executed immediately.
|
100
|
+
# @param [String] target_url API-generated URL for the requested results page
|
101
|
+
# @return [Page] Page of SimIpAddressInstance
|
102
|
+
def get_page(target_url)
|
103
|
+
response = @version.domain.request(
|
104
|
+
'GET',
|
105
|
+
target_url
|
106
|
+
)
|
107
|
+
SimIpAddressPage.new(@version, response, @solution)
|
108
|
+
end
|
109
|
+
|
110
|
+
##
|
111
|
+
# Provide a user friendly representation
|
112
|
+
def to_s
|
113
|
+
'#<Twilio.Supersim.V1.SimIpAddressList>'
|
114
|
+
end
|
115
|
+
end
|
116
|
+
|
117
|
+
##
|
118
|
+
# PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution.
|
119
|
+
class SimIpAddressPage < Page
|
120
|
+
##
|
121
|
+
# Initialize the SimIpAddressPage
|
122
|
+
# @param [Version] version Version that contains the resource
|
123
|
+
# @param [Response] response Response from the API
|
124
|
+
# @param [Hash] solution Path solution for the resource
|
125
|
+
# @return [SimIpAddressPage] SimIpAddressPage
|
126
|
+
def initialize(version, response, solution)
|
127
|
+
super(version, response)
|
128
|
+
|
129
|
+
# Path Solution
|
130
|
+
@solution = solution
|
131
|
+
end
|
132
|
+
|
133
|
+
##
|
134
|
+
# Build an instance of SimIpAddressInstance
|
135
|
+
# @param [Hash] payload Payload response from the API
|
136
|
+
# @return [SimIpAddressInstance] SimIpAddressInstance
|
137
|
+
def get_instance(payload)
|
138
|
+
SimIpAddressInstance.new(@version, payload, sim_sid: @solution[:sim_sid], )
|
139
|
+
end
|
140
|
+
|
141
|
+
##
|
142
|
+
# Provide a user friendly representation
|
143
|
+
def to_s
|
144
|
+
'<Twilio.Supersim.V1.SimIpAddressPage>'
|
145
|
+
end
|
146
|
+
end
|
147
|
+
|
148
|
+
##
|
149
|
+
# PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution.
|
150
|
+
class SimIpAddressInstance < InstanceResource
|
151
|
+
##
|
152
|
+
# Initialize the SimIpAddressInstance
|
153
|
+
# @param [Version] version Version that contains the resource
|
154
|
+
# @param [Hash] payload payload that contains response from Twilio
|
155
|
+
# @param [String] sim_sid The unique string that identifies the Sim resource.
|
156
|
+
# @return [SimIpAddressInstance] SimIpAddressInstance
|
157
|
+
def initialize(version, payload, sim_sid: nil)
|
158
|
+
super(version)
|
159
|
+
|
160
|
+
# Marshaled Properties
|
161
|
+
@properties = {
|
162
|
+
'ip_address' => payload['ip_address'],
|
163
|
+
'ip_address_version' => payload['ip_address_version'],
|
164
|
+
}
|
165
|
+
end
|
166
|
+
|
167
|
+
##
|
168
|
+
# @return [String] IP address assigned to the given Super SIM
|
169
|
+
def ip_address
|
170
|
+
@properties['ip_address']
|
171
|
+
end
|
172
|
+
|
173
|
+
##
|
174
|
+
# @return [sim_ip_address.IpAddressVersion] IP address version
|
175
|
+
def ip_address_version
|
176
|
+
@properties['ip_address_version']
|
177
|
+
end
|
178
|
+
|
179
|
+
##
|
180
|
+
# Provide a user friendly representation
|
181
|
+
def to_s
|
182
|
+
"<Twilio.Supersim.V1.SimIpAddressInstance>"
|
183
|
+
end
|
184
|
+
|
185
|
+
##
|
186
|
+
# Provide a detailed, user friendly representation
|
187
|
+
def inspect
|
188
|
+
"<Twilio.Supersim.V1.SimIpAddressInstance>"
|
189
|
+
end
|
190
|
+
end
|
191
|
+
end
|
192
|
+
end
|
193
|
+
end
|
194
|
+
end
|
195
|
+
end
|
@@ -203,6 +203,7 @@ module Twilio
|
|
203
203
|
|
204
204
|
# Dependents
|
205
205
|
@billing_periods = nil
|
206
|
+
@sim_ip_addresses = nil
|
206
207
|
end
|
207
208
|
|
208
209
|
##
|
@@ -261,6 +262,18 @@ module Twilio
|
|
261
262
|
@billing_periods
|
262
263
|
end
|
263
264
|
|
265
|
+
##
|
266
|
+
# Access the sim_ip_addresses
|
267
|
+
# @return [SimIpAddressList]
|
268
|
+
# @return [SimIpAddressContext]
|
269
|
+
def sim_ip_addresses
|
270
|
+
unless @sim_ip_addresses
|
271
|
+
@sim_ip_addresses = SimIpAddressList.new(@version, sim_sid: @solution[:sid], )
|
272
|
+
end
|
273
|
+
|
274
|
+
@sim_ip_addresses
|
275
|
+
end
|
276
|
+
|
264
277
|
##
|
265
278
|
# Provide a user friendly representation
|
266
279
|
def to_s
|
@@ -423,6 +436,13 @@ module Twilio
|
|
423
436
|
context.billing_periods
|
424
437
|
end
|
425
438
|
|
439
|
+
##
|
440
|
+
# Access the sim_ip_addresses
|
441
|
+
# @return [sim_ip_addresses] sim_ip_addresses
|
442
|
+
def sim_ip_addresses
|
443
|
+
context.sim_ip_addresses
|
444
|
+
end
|
445
|
+
|
426
446
|
##
|
427
447
|
# Provide a user friendly representation
|
428
448
|
def to_s
|
@@ -29,7 +29,6 @@ module Twilio
|
|
29
29
|
|
30
30
|
##
|
31
31
|
# Create the VerificationCheckInstance
|
32
|
-
# @param [String] code The 4-10 character string being verified.
|
33
32
|
# @param [String] to The phone number or
|
34
33
|
# {email}[https://www.twilio.com/docs/verify/email] to verify. Either this
|
35
34
|
# parameter or the `verification_sid` must be specified. Phone numbers must be in
|
@@ -41,14 +40,15 @@ module Twilio
|
|
41
40
|
# Requires the PSD2 Service flag enabled.
|
42
41
|
# @param [String] payee The payee of the associated PSD2 compliant transaction.
|
43
42
|
# Requires the PSD2 Service flag enabled.
|
43
|
+
# @param [String] code The 4-10 character string being verified.
|
44
44
|
# @return [VerificationCheckInstance] Created VerificationCheckInstance
|
45
|
-
def create(
|
45
|
+
def create(to: :unset, verification_sid: :unset, amount: :unset, payee: :unset, code: :unset)
|
46
46
|
data = Twilio::Values.of({
|
47
|
-
'Code' => code,
|
48
47
|
'To' => to,
|
49
48
|
'VerificationSid' => verification_sid,
|
50
49
|
'Amount' => amount,
|
51
50
|
'Payee' => payee,
|
51
|
+
'Code' => code,
|
52
52
|
})
|
53
53
|
|
54
54
|
payload = @version.create('POST', @uri, data: data)
|
@@ -73,8 +73,8 @@ module Twilio
|
|
73
73
|
|
74
74
|
##
|
75
75
|
# Fetch the VerificationAttemptsSummaryInstance
|
76
|
-
# @param [String]
|
77
|
-
# of the given verify service on the summary aggregation.
|
76
|
+
# @param [String] verify_service_sid Filter used to consider only Verification
|
77
|
+
# Attempts of the given verify service on the summary aggregation.
|
78
78
|
# @param [Time] date_created_after Datetime filter used to consider only
|
79
79
|
# Verification Attempts created after this datetime on the summary aggregation.
|
80
80
|
# Given as GMT in RFC 2822 format.
|
@@ -90,9 +90,9 @@ module Twilio
|
|
90
90
|
# on the summary aggregation by Destination prefix. It is the prefix of a phone
|
91
91
|
# number in E.164 format.
|
92
92
|
# @return [VerificationAttemptsSummaryInstance] Fetched VerificationAttemptsSummaryInstance
|
93
|
-
def fetch(
|
93
|
+
def fetch(verify_service_sid: :unset, date_created_after: :unset, date_created_before: :unset, country: :unset, channel: :unset, destination_prefix: :unset)
|
94
94
|
params = Twilio::Values.of({
|
95
|
-
'
|
95
|
+
'VerifyServiceSid' => verify_service_sid,
|
96
96
|
'DateCreatedAfter' => Twilio.serialize_iso8601_datetime(date_created_after),
|
97
97
|
'DateCreatedBefore' => Twilio.serialize_iso8601_datetime(date_created_before),
|
98
98
|
'Country' => country,
|
@@ -186,8 +186,8 @@ module Twilio
|
|
186
186
|
|
187
187
|
##
|
188
188
|
# Fetch the VerificationAttemptsSummaryInstance
|
189
|
-
# @param [String]
|
190
|
-
# of the given verify service on the summary aggregation.
|
189
|
+
# @param [String] verify_service_sid Filter used to consider only Verification
|
190
|
+
# Attempts of the given verify service on the summary aggregation.
|
191
191
|
# @param [Time] date_created_after Datetime filter used to consider only
|
192
192
|
# Verification Attempts created after this datetime on the summary aggregation.
|
193
193
|
# Given as GMT in RFC 2822 format.
|
@@ -203,9 +203,9 @@ module Twilio
|
|
203
203
|
# on the summary aggregation by Destination prefix. It is the prefix of a phone
|
204
204
|
# number in E.164 format.
|
205
205
|
# @return [VerificationAttemptsSummaryInstance] Fetched VerificationAttemptsSummaryInstance
|
206
|
-
def fetch(
|
206
|
+
def fetch(verify_service_sid: :unset, date_created_after: :unset, date_created_before: :unset, country: :unset, channel: :unset, destination_prefix: :unset)
|
207
207
|
context.fetch(
|
208
|
-
|
208
|
+
verify_service_sid: verify_service_sid,
|
209
209
|
date_created_after: date_created_after,
|
210
210
|
date_created_before: date_created_before,
|
211
211
|
country: country,
|
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.69.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: 2022-
|
11
|
+
date: 2022-07-13 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: jwt
|
@@ -641,6 +641,7 @@ files:
|
|
641
641
|
- lib/twilio-ruby/rest/supersim/v1/network_access_profile/network_access_profile_network.rb
|
642
642
|
- lib/twilio-ruby/rest/supersim/v1/sim.rb
|
643
643
|
- lib/twilio-ruby/rest/supersim/v1/sim/billing_period.rb
|
644
|
+
- lib/twilio-ruby/rest/supersim/v1/sim/sim_ip_address.rb
|
644
645
|
- lib/twilio-ruby/rest/supersim/v1/sms_command.rb
|
645
646
|
- lib/twilio-ruby/rest/supersim/v1/usage_record.rb
|
646
647
|
- lib/twilio-ruby/rest/sync.rb
|