twilio-ruby 6.0.0.pre.rc.1 → 6.0.0.pre.rc.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/.github/workflows/test-and-deploy.yml +1 -1
- data/CHANGES.md +25 -0
- data/README.md +8 -3
- data/lib/twilio-ruby/framework/rest/error.rb +0 -12
- data/lib/twilio-ruby/rest/client.rb +8 -10
- data/lib/twilio-ruby/rest/conversations/v1/conversation.rb +24 -3
- data/lib/twilio-ruby/rest/conversations/v1/service/conversation.rb +24 -3
- data/lib/twilio-ruby/rest/insights/v1/call_summaries.rb +10 -3
- data/lib/twilio-ruby/rest/lookups/v2/phone_number.rb +0 -7
- data/lib/twilio-ruby/rest/messaging/v1/brand_registration/brand_registration_otp.rb +136 -0
- data/lib/twilio-ruby/rest/messaging/v1/brand_registration.rb +25 -2
- data/lib/twilio-ruby/rest/messaging/v1/service/us_app_to_person.rb +1 -1
- data/lib/twilio-ruby/rest/messaging/v1/service.rb +30 -30
- data/lib/twilio-ruby/version.rb +1 -1
- data/sonar-project.properties +1 -1
- metadata +3 -3
- data/lib/twilio-ruby/framework/twilio_response.rb +0 -19
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 231028f0f7e044931062a37dae8fcf18ad1e3f3b
|
4
|
+
data.tar.gz: 32f55aef766cc5f0471b7e8e992bf4b230e37fee
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4dc793687fb876d5a7df9e56ee8392581cf2a99c0e9e7ce0a6856f51449aec5d30b16e8ef92e19487ad240893e0d5fb85903bd8d7de01a235e05275f70c5732c
|
7
|
+
data.tar.gz: a4d1b73c690993495aaf8bc2eed953930114d1bf07c556a18569f2e6b579d31bd56679db91066476e099255ea4308f04986356484111d0d32da84e80d4aa6f7a
|
@@ -17,7 +17,7 @@ jobs:
|
|
17
17
|
timeout-minutes: 20
|
18
18
|
strategy:
|
19
19
|
matrix:
|
20
|
-
ruby: [ '2.4', '2.5', '2.6', '2.7', '3.0', '3.1', 'ruby-head', 'jruby-9.2' ]
|
20
|
+
ruby: [ '2.4', '2.5', '2.6', '2.7', '3.0', '3.1', '3.2', 'ruby-head', 'jruby-9.2', 'jruby-9.3', 'jruby-9.4' ]
|
21
21
|
steps:
|
22
22
|
- name: Checkout twilio-ruby
|
23
23
|
uses: actions/checkout@v3
|
data/CHANGES.md
CHANGED
@@ -1,6 +1,31 @@
|
|
1
1
|
twilio-ruby changelog
|
2
2
|
=====================
|
3
3
|
|
4
|
+
[2023-04-05] Version 6.0.0-rc.2
|
5
|
+
-------------------------------
|
6
|
+
**Library - Fix**
|
7
|
+
- [PR #642](https://github.com/twilio/twilio-ruby/pull/642): remove deprecated Twilio::REST::TwilioError#body. Thanks to [@kridai](https://github.com/kridai)!
|
8
|
+
- [PR #641](https://github.com/twilio/twilio-ruby/pull/641): remove deprecated TwilioResponse class. Thanks to [@kridai](https://github.com/kridai)!
|
9
|
+
|
10
|
+
**Library - Chore**
|
11
|
+
- [PR #643](https://github.com/twilio/twilio-ruby/pull/643): extend ruby & jruby support. Thanks to [@shrutiburman](https://github.com/shrutiburman)!
|
12
|
+
|
13
|
+
**Conversations**
|
14
|
+
- Expose query parameters `start_date`, `end_date` and `state` in list operation on Conversations resource for sorting and filtering
|
15
|
+
|
16
|
+
**Insights**
|
17
|
+
- Added answered by filter in Call Summaries
|
18
|
+
|
19
|
+
**Lookups**
|
20
|
+
- Remove `disposable_phone_number_risk` package **(breaking change)**
|
21
|
+
|
22
|
+
**Messaging**
|
23
|
+
- Add support for `SOLE_PROPRIETOR` brand type and `SOLE_PROPRIETOR` campaign use case.
|
24
|
+
- New Sole Proprietor Brands should be created with `SOLE_PROPRIETOR` brand type. Brand registration requests with `STARTER` brand type will be rejected.
|
25
|
+
- New Sole Proprietor Campaigns should be created with `SOLE_PROPRIETOR` campaign use case. Campaign registration requests with `STARTER` campaign use case will be rejected.
|
26
|
+
- Add Brand Registrations OTP API
|
27
|
+
|
28
|
+
|
4
29
|
[2023-03-23] Version 6.0.0-rc.1
|
5
30
|
-------------------------------
|
6
31
|
**Library - Fix**
|
data/README.md
CHANGED
@@ -24,6 +24,11 @@ This library supports the following Ruby implementations:
|
|
24
24
|
* Ruby 2.7
|
25
25
|
* Ruby 3.0
|
26
26
|
* Ruby 3.1
|
27
|
+
* Ruby 3.2
|
28
|
+
|
29
|
+
* JRuby 9.2
|
30
|
+
* JRuby 9.3
|
31
|
+
* JRuby 9.4
|
27
32
|
|
28
33
|
### Migrating from 4.x
|
29
34
|
|
@@ -34,19 +39,19 @@ This library supports the following Ruby implementations:
|
|
34
39
|
To install using [Bundler][bundler] grab the latest stable version:
|
35
40
|
|
36
41
|
```ruby
|
37
|
-
gem 'twilio-ruby', '~> 6.0.0-rc.
|
42
|
+
gem 'twilio-ruby', '~> 6.0.0-rc.2'
|
38
43
|
```
|
39
44
|
|
40
45
|
To manually install `twilio-ruby` via [Rubygems][rubygems] simply gem install:
|
41
46
|
|
42
47
|
```bash
|
43
|
-
gem install twilio-ruby -v 6.0.0-rc.
|
48
|
+
gem install twilio-ruby -v 6.0.0-rc.2
|
44
49
|
```
|
45
50
|
|
46
51
|
To install `twilio-ruby` release candidate via [Rubygems][rubygems] simply gem install:
|
47
52
|
|
48
53
|
```bash
|
49
|
-
gem install twilio-ruby -v 6.0.0-rc.
|
54
|
+
gem install twilio-ruby -v 6.0.0-rc.2
|
50
55
|
```
|
51
56
|
|
52
57
|
To build and install the development branch yourself from the latest source:
|
@@ -3,11 +3,6 @@
|
|
3
3
|
module Twilio
|
4
4
|
module REST
|
5
5
|
class TwilioError < StandardError
|
6
|
-
# @deprecated all errors that have a body are now 'Twilio::RestError's
|
7
|
-
def body
|
8
|
-
warn "'Twilio::REST::TwilioError#body' has been deprecated. No 'TwilioError' objects are raised with a body."
|
9
|
-
nil
|
10
|
-
end
|
11
6
|
end
|
12
7
|
|
13
8
|
class RestError < TwilioError
|
@@ -23,13 +18,6 @@ module Twilio
|
|
23
18
|
@response = response
|
24
19
|
end
|
25
20
|
|
26
|
-
# @deprecated use #response instead
|
27
|
-
def body
|
28
|
-
warn 'This error used to be a "Twilio::REST::TwilioError" but is now a "Twilio::REST::RestError". ' \
|
29
|
-
'Please use #response instead of #body.'
|
30
|
-
@response
|
31
|
-
end
|
32
|
-
|
33
21
|
def to_s
|
34
22
|
message
|
35
23
|
end
|
@@ -1,12 +1,12 @@
|
|
1
1
|
##
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
2
|
+
# This code was generated by
|
3
|
+
# ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
|
4
|
+
# | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
|
5
|
+
# | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
|
6
|
+
#
|
7
|
+
# NOTE: This class is auto generated by OpenAPI Generator.
|
8
|
+
# https://openapi-generator.tech
|
9
|
+
# Do not edit the class manually.
|
10
10
|
|
11
11
|
require 'twilio-ruby/base/client_base'
|
12
12
|
|
@@ -343,5 +343,3 @@ module Twilio
|
|
343
343
|
end
|
344
344
|
end
|
345
345
|
end
|
346
|
-
|
347
|
-
|
@@ -80,6 +80,9 @@ module Twilio
|
|
80
80
|
# Lists ConversationInstance records from the API as a list.
|
81
81
|
# Unlike stream(), this operation is eager and will load `limit` records into
|
82
82
|
# memory before returning.
|
83
|
+
# @param [String] start_date Start date in ISO8601 format for sorting and filtering list of Conversations.
|
84
|
+
# @param [String] end_date End date in ISO8601 format for sorting and filtering list of Conversations.
|
85
|
+
# @param [State] state State for sorting and filtering list of Conversations. Can be `active`, `inactive` or `closed`
|
83
86
|
# @param [Integer] limit Upper limit for the number of records to return. stream()
|
84
87
|
# guarantees to never return more than limit. Default is no limit
|
85
88
|
# @param [Integer] page_size Number of records to fetch per request, when
|
@@ -87,8 +90,11 @@ module Twilio
|
|
87
90
|
# but a limit is defined, stream() will attempt to read the limit with the most
|
88
91
|
# efficient page size, i.e. min(limit, 1000)
|
89
92
|
# @return [Array] Array of up to limit results
|
90
|
-
def list(limit: nil, page_size: nil)
|
93
|
+
def list(start_date: :unset, end_date: :unset, state: :unset, limit: nil, page_size: nil)
|
91
94
|
self.stream(
|
95
|
+
start_date: start_date,
|
96
|
+
end_date: end_date,
|
97
|
+
state: state,
|
92
98
|
limit: limit,
|
93
99
|
page_size: page_size
|
94
100
|
).entries
|
@@ -98,6 +104,9 @@ module Twilio
|
|
98
104
|
# Streams Instance records from the API as an Enumerable.
|
99
105
|
# This operation lazily loads records as efficiently as possible until the limit
|
100
106
|
# is reached.
|
107
|
+
# @param [String] start_date Start date in ISO8601 format for sorting and filtering list of Conversations.
|
108
|
+
# @param [String] end_date End date in ISO8601 format for sorting and filtering list of Conversations.
|
109
|
+
# @param [State] state State for sorting and filtering list of Conversations. Can be `active`, `inactive` or `closed`
|
101
110
|
# @param [Integer] limit Upper limit for the number of records to return. stream()
|
102
111
|
# guarantees to never return more than limit. Default is no limit
|
103
112
|
# @param [Integer] page_size Number of records to fetch per request, when
|
@@ -105,10 +114,13 @@ module Twilio
|
|
105
114
|
# but a limit is defined, stream() will attempt to read the limit with the most
|
106
115
|
# efficient page size, i.e. min(limit, 1000)
|
107
116
|
# @return [Enumerable] Enumerable that will yield up to limit results
|
108
|
-
def stream(limit: nil, page_size: nil)
|
117
|
+
def stream(start_date: :unset, end_date: :unset, state: :unset, limit: nil, page_size: nil)
|
109
118
|
limits = @version.read_limits(limit, page_size)
|
110
119
|
|
111
120
|
page = self.page(
|
121
|
+
start_date: start_date,
|
122
|
+
end_date: end_date,
|
123
|
+
state: state,
|
112
124
|
page_size: limits[:page_size], )
|
113
125
|
|
114
126
|
@version.stream(page, limit: limits[:limit], page_limit: limits[:page_limit])
|
@@ -131,13 +143,22 @@ module Twilio
|
|
131
143
|
##
|
132
144
|
# Retrieve a single page of ConversationInstance records from the API.
|
133
145
|
# Request is executed immediately.
|
146
|
+
# @param [String] start_date Start date in ISO8601 format for sorting and filtering list of Conversations.
|
147
|
+
# @param [String] end_date End date in ISO8601 format for sorting and filtering list of Conversations.
|
148
|
+
# @param [State] state State for sorting and filtering list of Conversations. Can be `active`, `inactive` or `closed`
|
134
149
|
# @param [String] page_token PageToken provided by the API
|
135
150
|
# @param [Integer] page_number Page Number, this value is simply for client state
|
136
151
|
# @param [Integer] page_size Number of records to return, defaults to 50
|
137
152
|
# @return [Page] Page of ConversationInstance
|
138
|
-
def page(page_token: :unset, page_number: :unset, page_size: :unset)
|
153
|
+
def page(start_date: :unset, end_date: :unset, state: :unset, page_token: :unset, page_number: :unset, page_size: :unset)
|
139
154
|
params = Twilio::Values.of({
|
140
155
|
|
156
|
+
'StartDate' => start_date,
|
157
|
+
|
158
|
+
'EndDate' => end_date,
|
159
|
+
|
160
|
+
'State' => state,
|
161
|
+
|
141
162
|
'PageToken' => page_token,
|
142
163
|
'Page' => page_number,
|
143
164
|
'PageSize' => page_size,
|
@@ -83,6 +83,9 @@ module Twilio
|
|
83
83
|
# Lists ConversationInstance records from the API as a list.
|
84
84
|
# Unlike stream(), this operation is eager and will load `limit` records into
|
85
85
|
# memory before returning.
|
86
|
+
# @param [String] start_date Start date in ISO8601 format for sorting and filtering list of Conversations.
|
87
|
+
# @param [String] end_date End date in ISO8601 format for sorting and filtering list of Conversations.
|
88
|
+
# @param [State] state State for sorting and filtering list of Conversations. Can be `active`, `inactive` or `closed`
|
86
89
|
# @param [Integer] limit Upper limit for the number of records to return. stream()
|
87
90
|
# guarantees to never return more than limit. Default is no limit
|
88
91
|
# @param [Integer] page_size Number of records to fetch per request, when
|
@@ -90,8 +93,11 @@ module Twilio
|
|
90
93
|
# but a limit is defined, stream() will attempt to read the limit with the most
|
91
94
|
# efficient page size, i.e. min(limit, 1000)
|
92
95
|
# @return [Array] Array of up to limit results
|
93
|
-
def list(limit: nil, page_size: nil)
|
96
|
+
def list(start_date: :unset, end_date: :unset, state: :unset, limit: nil, page_size: nil)
|
94
97
|
self.stream(
|
98
|
+
start_date: start_date,
|
99
|
+
end_date: end_date,
|
100
|
+
state: state,
|
95
101
|
limit: limit,
|
96
102
|
page_size: page_size
|
97
103
|
).entries
|
@@ -101,6 +107,9 @@ module Twilio
|
|
101
107
|
# Streams Instance records from the API as an Enumerable.
|
102
108
|
# This operation lazily loads records as efficiently as possible until the limit
|
103
109
|
# is reached.
|
110
|
+
# @param [String] start_date Start date in ISO8601 format for sorting and filtering list of Conversations.
|
111
|
+
# @param [String] end_date End date in ISO8601 format for sorting and filtering list of Conversations.
|
112
|
+
# @param [State] state State for sorting and filtering list of Conversations. Can be `active`, `inactive` or `closed`
|
104
113
|
# @param [Integer] limit Upper limit for the number of records to return. stream()
|
105
114
|
# guarantees to never return more than limit. Default is no limit
|
106
115
|
# @param [Integer] page_size Number of records to fetch per request, when
|
@@ -108,10 +117,13 @@ module Twilio
|
|
108
117
|
# but a limit is defined, stream() will attempt to read the limit with the most
|
109
118
|
# efficient page size, i.e. min(limit, 1000)
|
110
119
|
# @return [Enumerable] Enumerable that will yield up to limit results
|
111
|
-
def stream(limit: nil, page_size: nil)
|
120
|
+
def stream(start_date: :unset, end_date: :unset, state: :unset, limit: nil, page_size: nil)
|
112
121
|
limits = @version.read_limits(limit, page_size)
|
113
122
|
|
114
123
|
page = self.page(
|
124
|
+
start_date: start_date,
|
125
|
+
end_date: end_date,
|
126
|
+
state: state,
|
115
127
|
page_size: limits[:page_size], )
|
116
128
|
|
117
129
|
@version.stream(page, limit: limits[:limit], page_limit: limits[:page_limit])
|
@@ -134,13 +146,22 @@ module Twilio
|
|
134
146
|
##
|
135
147
|
# Retrieve a single page of ConversationInstance records from the API.
|
136
148
|
# Request is executed immediately.
|
149
|
+
# @param [String] start_date Start date in ISO8601 format for sorting and filtering list of Conversations.
|
150
|
+
# @param [String] end_date End date in ISO8601 format for sorting and filtering list of Conversations.
|
151
|
+
# @param [State] state State for sorting and filtering list of Conversations. Can be `active`, `inactive` or `closed`
|
137
152
|
# @param [String] page_token PageToken provided by the API
|
138
153
|
# @param [Integer] page_number Page Number, this value is simply for client state
|
139
154
|
# @param [Integer] page_size Number of records to return, defaults to 50
|
140
155
|
# @return [Page] Page of ConversationInstance
|
141
|
-
def page(page_token: :unset, page_number: :unset, page_size: :unset)
|
156
|
+
def page(start_date: :unset, end_date: :unset, state: :unset, page_token: :unset, page_number: :unset, page_size: :unset)
|
142
157
|
params = Twilio::Values.of({
|
143
158
|
|
159
|
+
'StartDate' => start_date,
|
160
|
+
|
161
|
+
'EndDate' => end_date,
|
162
|
+
|
163
|
+
'State' => state,
|
164
|
+
|
144
165
|
'PageToken' => page_token,
|
145
166
|
'Page' => page_number,
|
146
167
|
'PageSize' => page_size,
|
@@ -52,6 +52,7 @@ module Twilio
|
|
52
52
|
# @param [SortBy] sort_by
|
53
53
|
# @param [String] subaccount
|
54
54
|
# @param [Boolean] abnormal_session
|
55
|
+
# @param [AnsweredBy] answered_by
|
55
56
|
# @param [Integer] limit Upper limit for the number of records to return. stream()
|
56
57
|
# guarantees to never return more than limit. Default is no limit
|
57
58
|
# @param [Integer] page_size Number of records to fetch per request, when
|
@@ -59,7 +60,7 @@ module Twilio
|
|
59
60
|
# but a limit is defined, stream() will attempt to read the limit with the most
|
60
61
|
# efficient page size, i.e. min(limit, 1000)
|
61
62
|
# @return [Array] Array of up to limit results
|
62
|
-
def list(from: :unset, to: :unset, from_carrier: :unset, to_carrier: :unset, from_country_code: :unset, to_country_code: :unset, branded: :unset, verified_caller: :unset, has_tag: :unset, start_time: :unset, end_time: :unset, call_type: :unset, call_state: :unset, direction: :unset, processing_state: :unset, sort_by: :unset, subaccount: :unset, abnormal_session: :unset, limit: nil, page_size: nil)
|
63
|
+
def list(from: :unset, to: :unset, from_carrier: :unset, to_carrier: :unset, from_country_code: :unset, to_country_code: :unset, branded: :unset, verified_caller: :unset, has_tag: :unset, start_time: :unset, end_time: :unset, call_type: :unset, call_state: :unset, direction: :unset, processing_state: :unset, sort_by: :unset, subaccount: :unset, abnormal_session: :unset, answered_by: :unset, limit: nil, page_size: nil)
|
63
64
|
self.stream(
|
64
65
|
from: from,
|
65
66
|
to: to,
|
@@ -79,6 +80,7 @@ module Twilio
|
|
79
80
|
sort_by: sort_by,
|
80
81
|
subaccount: subaccount,
|
81
82
|
abnormal_session: abnormal_session,
|
83
|
+
answered_by: answered_by,
|
82
84
|
limit: limit,
|
83
85
|
page_size: page_size
|
84
86
|
).entries
|
@@ -106,6 +108,7 @@ module Twilio
|
|
106
108
|
# @param [SortBy] sort_by
|
107
109
|
# @param [String] subaccount
|
108
110
|
# @param [Boolean] abnormal_session
|
111
|
+
# @param [AnsweredBy] answered_by
|
109
112
|
# @param [Integer] limit Upper limit for the number of records to return. stream()
|
110
113
|
# guarantees to never return more than limit. Default is no limit
|
111
114
|
# @param [Integer] page_size Number of records to fetch per request, when
|
@@ -113,7 +116,7 @@ module Twilio
|
|
113
116
|
# but a limit is defined, stream() will attempt to read the limit with the most
|
114
117
|
# efficient page size, i.e. min(limit, 1000)
|
115
118
|
# @return [Enumerable] Enumerable that will yield up to limit results
|
116
|
-
def stream(from: :unset, to: :unset, from_carrier: :unset, to_carrier: :unset, from_country_code: :unset, to_country_code: :unset, branded: :unset, verified_caller: :unset, has_tag: :unset, start_time: :unset, end_time: :unset, call_type: :unset, call_state: :unset, direction: :unset, processing_state: :unset, sort_by: :unset, subaccount: :unset, abnormal_session: :unset, limit: nil, page_size: nil)
|
119
|
+
def stream(from: :unset, to: :unset, from_carrier: :unset, to_carrier: :unset, from_country_code: :unset, to_country_code: :unset, branded: :unset, verified_caller: :unset, has_tag: :unset, start_time: :unset, end_time: :unset, call_type: :unset, call_state: :unset, direction: :unset, processing_state: :unset, sort_by: :unset, subaccount: :unset, abnormal_session: :unset, answered_by: :unset, limit: nil, page_size: nil)
|
117
120
|
limits = @version.read_limits(limit, page_size)
|
118
121
|
|
119
122
|
page = self.page(
|
@@ -135,6 +138,7 @@ module Twilio
|
|
135
138
|
sort_by: sort_by,
|
136
139
|
subaccount: subaccount,
|
137
140
|
abnormal_session: abnormal_session,
|
141
|
+
answered_by: answered_by,
|
138
142
|
page_size: limits[:page_size], )
|
139
143
|
|
140
144
|
@version.stream(page, limit: limits[:limit], page_limit: limits[:page_limit])
|
@@ -175,11 +179,12 @@ module Twilio
|
|
175
179
|
# @param [SortBy] sort_by
|
176
180
|
# @param [String] subaccount
|
177
181
|
# @param [Boolean] abnormal_session
|
182
|
+
# @param [AnsweredBy] answered_by
|
178
183
|
# @param [String] page_token PageToken provided by the API
|
179
184
|
# @param [Integer] page_number Page Number, this value is simply for client state
|
180
185
|
# @param [Integer] page_size Number of records to return, defaults to 50
|
181
186
|
# @return [Page] Page of CallSummariesInstance
|
182
|
-
def page(from: :unset, to: :unset, from_carrier: :unset, to_carrier: :unset, from_country_code: :unset, to_country_code: :unset, branded: :unset, verified_caller: :unset, has_tag: :unset, start_time: :unset, end_time: :unset, call_type: :unset, call_state: :unset, direction: :unset, processing_state: :unset, sort_by: :unset, subaccount: :unset, abnormal_session: :unset, page_token: :unset, page_number: :unset, page_size: :unset)
|
187
|
+
def page(from: :unset, to: :unset, from_carrier: :unset, to_carrier: :unset, from_country_code: :unset, to_country_code: :unset, branded: :unset, verified_caller: :unset, has_tag: :unset, start_time: :unset, end_time: :unset, call_type: :unset, call_state: :unset, direction: :unset, processing_state: :unset, sort_by: :unset, subaccount: :unset, abnormal_session: :unset, answered_by: :unset, page_token: :unset, page_number: :unset, page_size: :unset)
|
183
188
|
params = Twilio::Values.of({
|
184
189
|
|
185
190
|
'From' => from,
|
@@ -218,6 +223,8 @@ module Twilio
|
|
218
223
|
|
219
224
|
'AbnormalSession' => abnormal_session,
|
220
225
|
|
226
|
+
'AnsweredBy' => answered_by,
|
227
|
+
|
221
228
|
'PageToken' => page_token,
|
222
229
|
'Page' => page_number,
|
223
230
|
'PageSize' => page_size,
|
@@ -180,7 +180,6 @@ module Twilio
|
|
180
180
|
'line_type_intelligence' => payload['line_type_intelligence'],
|
181
181
|
'identity_match' => payload['identity_match'],
|
182
182
|
'sms_pumping_risk' => payload['sms_pumping_risk'],
|
183
|
-
'disposable_phone_number_risk' => payload['disposable_phone_number_risk'],
|
184
183
|
'url' => payload['url'],
|
185
184
|
}
|
186
185
|
|
@@ -278,12 +277,6 @@ module Twilio
|
|
278
277
|
@properties['sms_pumping_risk']
|
279
278
|
end
|
280
279
|
|
281
|
-
##
|
282
|
-
# @return [Hash] An object that contains information on if a mobile phone number could be a disposable or burner number.
|
283
|
-
def disposable_phone_number_risk
|
284
|
-
@properties['disposable_phone_number_risk']
|
285
|
-
end
|
286
|
-
|
287
280
|
##
|
288
281
|
# @return [String] The absolute URL of the resource.
|
289
282
|
def url
|
@@ -0,0 +1,136 @@
|
|
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 BrandRegistrationContext < InstanceContext
|
21
|
+
|
22
|
+
class BrandRegistrationOtpList < ListResource
|
23
|
+
##
|
24
|
+
# Initialize the BrandRegistrationOtpList
|
25
|
+
# @param [Version] version Version that contains the resource
|
26
|
+
# @return [BrandRegistrationOtpList] BrandRegistrationOtpList
|
27
|
+
def initialize(version, brand_registration_sid: nil)
|
28
|
+
super(version)
|
29
|
+
# Path Solution
|
30
|
+
@solution = { brand_registration_sid: brand_registration_sid }
|
31
|
+
@uri = "/a2p/BrandRegistrations/#{@solution[:brand_registration_sid]}/SmsOtp"
|
32
|
+
|
33
|
+
end
|
34
|
+
##
|
35
|
+
# Create the BrandRegistrationOtpInstance
|
36
|
+
# @return [BrandRegistrationOtpInstance] Created BrandRegistrationOtpInstance
|
37
|
+
def create
|
38
|
+
|
39
|
+
payload = @version.create('POST', @uri)
|
40
|
+
BrandRegistrationOtpInstance.new(
|
41
|
+
@version,
|
42
|
+
payload,
|
43
|
+
brand_registration_sid: @solution[:brand_registration_sid],
|
44
|
+
)
|
45
|
+
end
|
46
|
+
|
47
|
+
|
48
|
+
|
49
|
+
|
50
|
+
# Provide a user friendly representation
|
51
|
+
def to_s
|
52
|
+
'#<Twilio.Messaging.V1.BrandRegistrationOtpList>'
|
53
|
+
end
|
54
|
+
end
|
55
|
+
|
56
|
+
class BrandRegistrationOtpPage < Page
|
57
|
+
##
|
58
|
+
# Initialize the BrandRegistrationOtpPage
|
59
|
+
# @param [Version] version Version that contains the resource
|
60
|
+
# @param [Response] response Response from the API
|
61
|
+
# @param [Hash] solution Path solution for the resource
|
62
|
+
# @return [BrandRegistrationOtpPage] BrandRegistrationOtpPage
|
63
|
+
def initialize(version, response, solution)
|
64
|
+
super(version, response)
|
65
|
+
|
66
|
+
# Path Solution
|
67
|
+
@solution = solution
|
68
|
+
end
|
69
|
+
|
70
|
+
##
|
71
|
+
# Build an instance of BrandRegistrationOtpInstance
|
72
|
+
# @param [Hash] payload Payload response from the API
|
73
|
+
# @return [BrandRegistrationOtpInstance] BrandRegistrationOtpInstance
|
74
|
+
def get_instance(payload)
|
75
|
+
BrandRegistrationOtpInstance.new(@version, payload, brand_registration_sid: @solution[:brand_registration_sid])
|
76
|
+
end
|
77
|
+
|
78
|
+
##
|
79
|
+
# Provide a user friendly representation
|
80
|
+
def to_s
|
81
|
+
'<Twilio.Messaging.V1.BrandRegistrationOtpPage>'
|
82
|
+
end
|
83
|
+
end
|
84
|
+
class BrandRegistrationOtpInstance < InstanceResource
|
85
|
+
##
|
86
|
+
# Initialize the BrandRegistrationOtpInstance
|
87
|
+
# @param [Version] version Version that contains the resource
|
88
|
+
# @param [Hash] payload payload that contains response from Twilio
|
89
|
+
# @param [String] account_sid The SID of the
|
90
|
+
# {Account}[https://www.twilio.com/docs/iam/api/account] that created this BrandRegistrationOtp
|
91
|
+
# resource.
|
92
|
+
# @param [String] sid The SID of the Call resource to fetch.
|
93
|
+
# @return [BrandRegistrationOtpInstance] BrandRegistrationOtpInstance
|
94
|
+
def initialize(version, payload , brand_registration_sid: nil)
|
95
|
+
super(version)
|
96
|
+
|
97
|
+
# Marshaled Properties
|
98
|
+
@properties = {
|
99
|
+
'account_sid' => payload['account_sid'],
|
100
|
+
'brand_registration_sid' => payload['brand_registration_sid'],
|
101
|
+
}
|
102
|
+
end
|
103
|
+
|
104
|
+
|
105
|
+
##
|
106
|
+
# @return [String] The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Brand Registration resource.
|
107
|
+
def account_sid
|
108
|
+
@properties['account_sid']
|
109
|
+
end
|
110
|
+
|
111
|
+
##
|
112
|
+
# @return [String] The unique string to identify Brand Registration of Sole Proprietor Brand
|
113
|
+
def brand_registration_sid
|
114
|
+
@properties['brand_registration_sid']
|
115
|
+
end
|
116
|
+
|
117
|
+
##
|
118
|
+
# Provide a user friendly representation
|
119
|
+
def to_s
|
120
|
+
"<Twilio.Messaging.V1.BrandRegistrationOtpInstance>"
|
121
|
+
end
|
122
|
+
|
123
|
+
##
|
124
|
+
# Provide a detailed, user friendly representation
|
125
|
+
def inspect
|
126
|
+
"<Twilio.Messaging.V1.BrandRegistrationOtpInstance>"
|
127
|
+
end
|
128
|
+
end
|
129
|
+
|
130
|
+
end
|
131
|
+
end
|
132
|
+
end
|
133
|
+
end
|
134
|
+
end
|
135
|
+
|
136
|
+
|
@@ -33,7 +33,7 @@ module Twilio
|
|
33
33
|
# Create the BrandRegistrationInstance
|
34
34
|
# @param [String] customer_profile_bundle_sid Customer Profile Bundle Sid.
|
35
35
|
# @param [String] a2p_profile_bundle_sid A2P Messaging Profile Bundle Sid.
|
36
|
-
# @param [String] brand_type Type of brand being created. One of: \\\"STANDARD\\\", \\\"
|
36
|
+
# @param [String] brand_type Type of brand being created. One of: \\\"STANDARD\\\", \\\"SOLE_PROPRIETOR\\\". SOLE_PROPRIETOR is for low volume, SOLE_PROPRIETOR use cases. STANDARD is for all other use cases.
|
37
37
|
# @param [Boolean] mock A boolean that specifies whether brand should be a mock or not. If true, brand will be registered as a mock brand. Defaults to false if no value is provided.
|
38
38
|
# @param [Boolean] skip_automatic_sec_vet A flag to disable automatic secondary vetting for brands which it would otherwise be done.
|
39
39
|
# @return [BrandRegistrationInstance] Created BrandRegistrationInstance
|
@@ -171,6 +171,7 @@ module Twilio
|
|
171
171
|
@uri = "/a2p/BrandRegistrations/#{@solution[:sid]}"
|
172
172
|
|
173
173
|
# Dependents
|
174
|
+
@brand_registration_otps = nil
|
174
175
|
@brand_vettings = nil
|
175
176
|
end
|
176
177
|
##
|
@@ -199,6 +200,21 @@ module Twilio
|
|
199
200
|
)
|
200
201
|
end
|
201
202
|
|
203
|
+
##
|
204
|
+
# Access the brand_registration_otps
|
205
|
+
# @return [BrandRegistrationOtpList]
|
206
|
+
# @return [BrandRegistrationOtpContext]
|
207
|
+
def brand_registration_otps
|
208
|
+
unless @brand_registration_otps
|
209
|
+
@brand_registration_otps = BrandRegistrationOtpList.new(
|
210
|
+
@version,
|
211
|
+
brand_registration_sid: @solution[:sid]
|
212
|
+
|
213
|
+
)
|
214
|
+
end
|
215
|
+
|
216
|
+
@brand_registration_otps
|
217
|
+
end
|
202
218
|
##
|
203
219
|
# Access the brand_vettings
|
204
220
|
# @return [BrandVettingList]
|
@@ -355,7 +371,7 @@ module Twilio
|
|
355
371
|
end
|
356
372
|
|
357
373
|
##
|
358
|
-
# @return [String] Type of brand. One of: \"STANDARD\", \"
|
374
|
+
# @return [String] Type of brand. One of: \"STANDARD\", \"SOLE_PROPRIETOR\". SOLE_PROPRIETOR is for the low volume, SOLE_PROPRIETOR campaign use case. There can only be one SOLE_PROPRIETOR campaign created per SOLE_PROPRIETOR brand. STANDARD is for all other campaign use cases. Multiple campaign use cases can be created per STANDARD brand.
|
359
375
|
def brand_type
|
360
376
|
@properties['brand_type']
|
361
377
|
end
|
@@ -454,6 +470,13 @@ module Twilio
|
|
454
470
|
context.update
|
455
471
|
end
|
456
472
|
|
473
|
+
##
|
474
|
+
# Access the brand_registration_otps
|
475
|
+
# @return [brand_registration_otps] brand_registration_otps
|
476
|
+
def brand_registration_otps
|
477
|
+
context.brand_registration_otps
|
478
|
+
end
|
479
|
+
|
457
480
|
##
|
458
481
|
# Access the brand_vettings
|
459
482
|
# @return [brand_vettings] brand_vettings
|
@@ -360,7 +360,7 @@ module Twilio
|
|
360
360
|
end
|
361
361
|
|
362
362
|
##
|
363
|
-
# @return [String] A2P Campaign Use Case. Examples: [ 2FA, EMERGENCY, MARKETING,
|
363
|
+
# @return [String] A2P Campaign Use Case. Examples: [ 2FA, EMERGENCY, MARKETING, SOLE_PROPRIETOR...]. SOLE_PROPRIETOR campaign use cases can only be created by SOLE_PROPRIETOR Brands, and there can only be one SOLE_PROPRIETOR campaign created per SOLE_PROPRIETOR Brand.
|
364
364
|
def us_app_to_person_usecase
|
365
365
|
@properties['us_app_to_person_usecase']
|
366
366
|
end
|
@@ -205,10 +205,10 @@ module Twilio
|
|
205
205
|
|
206
206
|
# Dependents
|
207
207
|
@us_app_to_person_usecases = nil
|
208
|
-
@alpha_senders = nil
|
209
208
|
@short_codes = nil
|
210
209
|
@us_app_to_person = nil
|
211
210
|
@phone_numbers = nil
|
211
|
+
@alpha_senders = nil
|
212
212
|
end
|
213
213
|
##
|
214
214
|
# Delete the ServiceInstance
|
@@ -312,28 +312,6 @@ module Twilio
|
|
312
312
|
@us_app_to_person_usecases
|
313
313
|
end
|
314
314
|
##
|
315
|
-
# Access the alpha_senders
|
316
|
-
# @return [AlphaSenderList]
|
317
|
-
# @return [AlphaSenderContext] if sid was passed.
|
318
|
-
def alpha_senders(sid=:unset)
|
319
|
-
|
320
|
-
raise ArgumentError, 'sid cannot be nil' if sid.nil?
|
321
|
-
|
322
|
-
if sid != :unset
|
323
|
-
return AlphaSenderContext.new(@version, @solution[:sid],sid )
|
324
|
-
end
|
325
|
-
|
326
|
-
unless @alpha_senders
|
327
|
-
@alpha_senders = AlphaSenderList.new(
|
328
|
-
@version,
|
329
|
-
service_sid: @solution[:sid]
|
330
|
-
|
331
|
-
)
|
332
|
-
end
|
333
|
-
|
334
|
-
@alpha_senders
|
335
|
-
end
|
336
|
-
##
|
337
315
|
# Access the short_codes
|
338
316
|
# @return [ShortCodeList]
|
339
317
|
# @return [ShortCodeContext] if sid was passed.
|
@@ -399,6 +377,28 @@ module Twilio
|
|
399
377
|
|
400
378
|
@phone_numbers
|
401
379
|
end
|
380
|
+
##
|
381
|
+
# Access the alpha_senders
|
382
|
+
# @return [AlphaSenderList]
|
383
|
+
# @return [AlphaSenderContext] if sid was passed.
|
384
|
+
def alpha_senders(sid=:unset)
|
385
|
+
|
386
|
+
raise ArgumentError, 'sid cannot be nil' if sid.nil?
|
387
|
+
|
388
|
+
if sid != :unset
|
389
|
+
return AlphaSenderContext.new(@version, @solution[:sid],sid )
|
390
|
+
end
|
391
|
+
|
392
|
+
unless @alpha_senders
|
393
|
+
@alpha_senders = AlphaSenderList.new(
|
394
|
+
@version,
|
395
|
+
service_sid: @solution[:sid]
|
396
|
+
|
397
|
+
)
|
398
|
+
end
|
399
|
+
|
400
|
+
@alpha_senders
|
401
|
+
end
|
402
402
|
|
403
403
|
##
|
404
404
|
# Provide a user friendly representation
|
@@ -718,13 +718,6 @@ module Twilio
|
|
718
718
|
context.us_app_to_person_usecases
|
719
719
|
end
|
720
720
|
|
721
|
-
##
|
722
|
-
# Access the alpha_senders
|
723
|
-
# @return [alpha_senders] alpha_senders
|
724
|
-
def alpha_senders
|
725
|
-
context.alpha_senders
|
726
|
-
end
|
727
|
-
|
728
721
|
##
|
729
722
|
# Access the short_codes
|
730
723
|
# @return [short_codes] short_codes
|
@@ -746,6 +739,13 @@ module Twilio
|
|
746
739
|
context.phone_numbers
|
747
740
|
end
|
748
741
|
|
742
|
+
##
|
743
|
+
# Access the alpha_senders
|
744
|
+
# @return [alpha_senders] alpha_senders
|
745
|
+
def alpha_senders
|
746
|
+
context.alpha_senders
|
747
|
+
end
|
748
|
+
|
749
749
|
##
|
750
750
|
# Provide a user friendly representation
|
751
751
|
def to_s
|
data/lib/twilio-ruby/version.rb
CHANGED
data/sonar-project.properties
CHANGED
@@ -4,7 +4,7 @@ sonar.organization=twilio
|
|
4
4
|
|
5
5
|
sonar.sources=lib/twilio-ruby
|
6
6
|
# Exclude any auto-generated source code
|
7
|
-
sonar.exclusions=lib/twilio-ruby/rest
|
7
|
+
sonar.exclusions=lib/twilio-ruby/rest/**/*, lib/twilio-ruby/twiml/**
|
8
8
|
sonar.tests=spec/
|
9
9
|
# Exclude any auto-generated integration tests
|
10
10
|
sonar.test.exclusions=spec/integration/**/*.spec.rb
|
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: 6.0.0.pre.rc.
|
4
|
+
version: 6.0.0.pre.rc.2
|
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: 2023-
|
11
|
+
date: 2023-04-06 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: jwt
|
@@ -235,7 +235,6 @@ files:
|
|
235
235
|
- lib/twilio-ruby/framework/rest/resource.rb
|
236
236
|
- lib/twilio-ruby/framework/rest/version.rb
|
237
237
|
- lib/twilio-ruby/framework/serialize.rb
|
238
|
-
- lib/twilio-ruby/framework/twilio_response.rb
|
239
238
|
- lib/twilio-ruby/framework/values.rb
|
240
239
|
- lib/twilio-ruby/http.rb
|
241
240
|
- lib/twilio-ruby/http/http_client.rb
|
@@ -519,6 +518,7 @@ files:
|
|
519
518
|
- lib/twilio-ruby/rest/messaging.rb
|
520
519
|
- lib/twilio-ruby/rest/messaging/v1.rb
|
521
520
|
- lib/twilio-ruby/rest/messaging/v1/brand_registration.rb
|
521
|
+
- lib/twilio-ruby/rest/messaging/v1/brand_registration/brand_registration_otp.rb
|
522
522
|
- lib/twilio-ruby/rest/messaging/v1/brand_registration/brand_vetting.rb
|
523
523
|
- lib/twilio-ruby/rest/messaging/v1/deactivations.rb
|
524
524
|
- lib/twilio-ruby/rest/messaging/v1/domain_certs.rb
|
@@ -1,19 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
module Twilio
|
4
|
-
class TwilioResponse
|
5
|
-
attr_accessor :status_code, :body
|
6
|
-
|
7
|
-
# @deprecated Use 'Twilio::Response' instead.
|
8
|
-
def initialize(status_code, body)
|
9
|
-
warn "'Twilio::TwilioResponse' has been deprecated. Use 'Twilio::Response' instead."
|
10
|
-
response = Twilio::Response.new(status_code, body)
|
11
|
-
@status_code = response.status_code
|
12
|
-
@body = response.body
|
13
|
-
end
|
14
|
-
|
15
|
-
def to_s
|
16
|
-
"[#{@status_code}] #{@body}"
|
17
|
-
end
|
18
|
-
end
|
19
|
-
end
|