twilio-ruby 5.73.2 → 5.73.4

Sign up to get free protection for your applications and to get access to all the features.
Files changed (32) hide show
  1. checksums.yaml +4 -4
  2. data/.github/workflows/pr-lint.yml +8 -2
  3. data/.github/workflows/test-and-deploy.yml +3 -3
  4. data/CHANGES.md +32 -0
  5. data/LICENSE +1 -1
  6. data/README.md +2 -2
  7. data/lib/twilio-ruby/rest/client.rb +7 -0
  8. data/lib/twilio-ruby/rest/content/v1/content/approval_fetch.rb +195 -0
  9. data/lib/twilio-ruby/rest/content/v1/content.rb +346 -0
  10. data/lib/twilio-ruby/rest/content/v1.rb +45 -0
  11. data/lib/twilio-ruby/rest/content.rb +47 -0
  12. data/lib/twilio-ruby/rest/flex_api/v1/assessments.rb +156 -0
  13. data/lib/twilio-ruby/rest/flex_api/v1/good_data.rb +7 -0
  14. data/lib/twilio-ruby/rest/flex_api/v1.rb +7 -0
  15. data/lib/twilio-ruby/rest/flex_api.rb +6 -0
  16. data/lib/twilio-ruby/rest/insights/v1/call/summary.rb +7 -0
  17. data/lib/twilio-ruby/rest/insights/v1/call_summaries.rb +7 -0
  18. data/lib/twilio-ruby/rest/lookups/v2/phone_number.rb +81 -6
  19. data/lib/twilio-ruby/rest/messaging/v1/domain_cert.rb +257 -0
  20. data/lib/twilio-ruby/rest/messaging/v1/domain_config.rb +267 -0
  21. data/lib/twilio-ruby/rest/messaging/v1.rb +34 -0
  22. data/lib/twilio-ruby/rest/messaging.rb +18 -0
  23. data/lib/twilio-ruby/rest/microvisor/v1/device.rb +7 -0
  24. data/lib/twilio-ruby/rest/preview.rb +0 -33
  25. data/lib/twilio-ruby/version.rb +1 -1
  26. metadata +9 -8
  27. data/lib/twilio-ruby/rest/preview/trusted_comms/branded_channel/channel.rb +0 -165
  28. data/lib/twilio-ruby/rest/preview/trusted_comms/branded_channel.rb +0 -225
  29. data/lib/twilio-ruby/rest/preview/trusted_comms/brands_information.rb +0 -195
  30. data/lib/twilio-ruby/rest/preview/trusted_comms/cps.rb +0 -186
  31. data/lib/twilio-ruby/rest/preview/trusted_comms/current_call.rb +0 -277
  32. data/lib/twilio-ruby/rest/preview/trusted_comms.rb +0 -65
@@ -1,186 +0,0 @@
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 Preview < Domain
12
- class TrustedComms < Version
13
- ##
14
- # PLEASE NOTE that this class contains preview products that are subject to change. Use them with caution. If you currently do not have developer preview access, please contact help@twilio.com.
15
- class CpsList < ListResource
16
- ##
17
- # Initialize the CpsList
18
- # @param [Version] version Version that contains the resource
19
- # @return [CpsList] CpsList
20
- def initialize(version)
21
- super(version)
22
-
23
- # Path Solution
24
- @solution = {}
25
- end
26
-
27
- ##
28
- # Provide a user friendly representation
29
- def to_s
30
- '#<Twilio.Preview.TrustedComms.CpsList>'
31
- end
32
- end
33
-
34
- ##
35
- # PLEASE NOTE that this class contains preview products that are subject to change. Use them with caution. If you currently do not have developer preview access, please contact help@twilio.com.
36
- class CpsPage < Page
37
- ##
38
- # Initialize the CpsPage
39
- # @param [Version] version Version that contains the resource
40
- # @param [Response] response Response from the API
41
- # @param [Hash] solution Path solution for the resource
42
- # @return [CpsPage] CpsPage
43
- def initialize(version, response, solution)
44
- super(version, response)
45
-
46
- # Path Solution
47
- @solution = solution
48
- end
49
-
50
- ##
51
- # Build an instance of CpsInstance
52
- # @param [Hash] payload Payload response from the API
53
- # @return [CpsInstance] CpsInstance
54
- def get_instance(payload)
55
- CpsInstance.new(@version, payload, )
56
- end
57
-
58
- ##
59
- # Provide a user friendly representation
60
- def to_s
61
- '<Twilio.Preview.TrustedComms.CpsPage>'
62
- end
63
- end
64
-
65
- ##
66
- # PLEASE NOTE that this class contains preview products that are subject to change. Use them with caution. If you currently do not have developer preview access, please contact help@twilio.com.
67
- class CpsContext < InstanceContext
68
- ##
69
- # Initialize the CpsContext
70
- # @param [Version] version Version that contains the resource
71
- # @return [CpsContext] CpsContext
72
- def initialize(version)
73
- super(version)
74
-
75
- # Path Solution
76
- @solution = {}
77
- @uri = "/CPS"
78
- end
79
-
80
- ##
81
- # Fetch the CpsInstance
82
- # @param [String] x_xcnam_sensitive_phone_number Phone number used to retrieve its
83
- # corresponding CPS.
84
- # @return [CpsInstance] Fetched CpsInstance
85
- def fetch(x_xcnam_sensitive_phone_number: :unset)
86
- headers = Twilio::Values.of({'X-Xcnam-Sensitive-Phone-Number' => x_xcnam_sensitive_phone_number, })
87
-
88
- payload = @version.fetch('GET', @uri, headers: headers)
89
-
90
- CpsInstance.new(@version, payload, )
91
- end
92
-
93
- ##
94
- # Provide a user friendly representation
95
- def to_s
96
- context = @solution.map {|k, v| "#{k}: #{v}"}.join(',')
97
- "#<Twilio.Preview.TrustedComms.CpsContext #{context}>"
98
- end
99
-
100
- ##
101
- # Provide a detailed, user friendly representation
102
- def inspect
103
- context = @solution.map {|k, v| "#{k}: #{v}"}.join(',')
104
- "#<Twilio.Preview.TrustedComms.CpsContext #{context}>"
105
- end
106
- end
107
-
108
- ##
109
- # PLEASE NOTE that this class contains preview products that are subject to change. Use them with caution. If you currently do not have developer preview access, please contact help@twilio.com.
110
- class CpsInstance < InstanceResource
111
- ##
112
- # Initialize the CpsInstance
113
- # @param [Version] version Version that contains the resource
114
- # @param [Hash] payload payload that contains response from Twilio
115
- # @return [CpsInstance] CpsInstance
116
- def initialize(version, payload)
117
- super(version)
118
-
119
- # Marshaled Properties
120
- @properties = {
121
- 'cps_url' => payload['cps_url'],
122
- 'phone_number' => payload['phone_number'],
123
- 'url' => payload['url'],
124
- }
125
-
126
- # Context
127
- @instance_context = nil
128
- @params = {}
129
- end
130
-
131
- ##
132
- # Generate an instance context for the instance, the context is capable of
133
- # performing various actions. All instance actions are proxied to the context
134
- # @return [CpsContext] CpsContext for this CpsInstance
135
- def context
136
- unless @instance_context
137
- @instance_context = CpsContext.new(@version, )
138
- end
139
- @instance_context
140
- end
141
-
142
- ##
143
- # @return [String] CPS URL of the phone number.
144
- def cps_url
145
- @properties['cps_url']
146
- end
147
-
148
- ##
149
- # @return [String] Phone number passed.
150
- def phone_number
151
- @properties['phone_number']
152
- end
153
-
154
- ##
155
- # @return [String] The URL of this resource.
156
- def url
157
- @properties['url']
158
- end
159
-
160
- ##
161
- # Fetch the CpsInstance
162
- # @param [String] x_xcnam_sensitive_phone_number Phone number used to retrieve its
163
- # corresponding CPS.
164
- # @return [CpsInstance] Fetched CpsInstance
165
- def fetch(x_xcnam_sensitive_phone_number: :unset)
166
- context.fetch(x_xcnam_sensitive_phone_number: x_xcnam_sensitive_phone_number, )
167
- end
168
-
169
- ##
170
- # Provide a user friendly representation
171
- def to_s
172
- values = @params.map{|k, v| "#{k}: #{v}"}.join(" ")
173
- "<Twilio.Preview.TrustedComms.CpsInstance #{values}>"
174
- end
175
-
176
- ##
177
- # Provide a detailed, user friendly representation
178
- def inspect
179
- values = @properties.map{|k, v| "#{k}: #{v}"}.join(" ")
180
- "<Twilio.Preview.TrustedComms.CpsInstance #{values}>"
181
- end
182
- end
183
- end
184
- end
185
- end
186
- end
@@ -1,277 +0,0 @@
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 Preview < Domain
12
- class TrustedComms < Version
13
- ##
14
- # PLEASE NOTE that this class contains preview products that are subject to change. Use them with caution. If you currently do not have developer preview access, please contact help@twilio.com.
15
- class CurrentCallList < ListResource
16
- ##
17
- # Initialize the CurrentCallList
18
- # @param [Version] version Version that contains the resource
19
- # @return [CurrentCallList] CurrentCallList
20
- def initialize(version)
21
- super(version)
22
-
23
- # Path Solution
24
- @solution = {}
25
- end
26
-
27
- ##
28
- # Provide a user friendly representation
29
- def to_s
30
- '#<Twilio.Preview.TrustedComms.CurrentCallList>'
31
- end
32
- end
33
-
34
- ##
35
- # PLEASE NOTE that this class contains preview products that are subject to change. Use them with caution. If you currently do not have developer preview access, please contact help@twilio.com.
36
- class CurrentCallPage < Page
37
- ##
38
- # Initialize the CurrentCallPage
39
- # @param [Version] version Version that contains the resource
40
- # @param [Response] response Response from the API
41
- # @param [Hash] solution Path solution for the resource
42
- # @return [CurrentCallPage] CurrentCallPage
43
- def initialize(version, response, solution)
44
- super(version, response)
45
-
46
- # Path Solution
47
- @solution = solution
48
- end
49
-
50
- ##
51
- # Build an instance of CurrentCallInstance
52
- # @param [Hash] payload Payload response from the API
53
- # @return [CurrentCallInstance] CurrentCallInstance
54
- def get_instance(payload)
55
- CurrentCallInstance.new(@version, payload, )
56
- end
57
-
58
- ##
59
- # Provide a user friendly representation
60
- def to_s
61
- '<Twilio.Preview.TrustedComms.CurrentCallPage>'
62
- end
63
- end
64
-
65
- ##
66
- # PLEASE NOTE that this class contains preview products that are subject to change. Use them with caution. If you currently do not have developer preview access, please contact help@twilio.com.
67
- class CurrentCallContext < InstanceContext
68
- ##
69
- # Initialize the CurrentCallContext
70
- # @param [Version] version Version that contains the resource
71
- # @return [CurrentCallContext] CurrentCallContext
72
- def initialize(version)
73
- super(version)
74
-
75
- # Path Solution
76
- @solution = {}
77
- @uri = "/CurrentCall"
78
- end
79
-
80
- ##
81
- # Fetch the CurrentCallInstance
82
- # @param [String] x_xcnam_sensitive_phone_number_from The originating Phone
83
- # Number, given in {E.164 format}[https://www.twilio.com/docs/glossary/what-e164].
84
- # This phone number should be a Twilio number, otherwise it will return an error
85
- # with HTTP Status Code 400.
86
- # @param [String] x_xcnam_sensitive_phone_number_to The terminating Phone Number,
87
- # given in {E.164 format}[https://www.twilio.com/docs/glossary/what-e164].
88
- # @return [CurrentCallInstance] Fetched CurrentCallInstance
89
- def fetch(x_xcnam_sensitive_phone_number_from: :unset, x_xcnam_sensitive_phone_number_to: :unset)
90
- headers = Twilio::Values.of({
91
- 'X-Xcnam-Sensitive-Phone-Number-From' => x_xcnam_sensitive_phone_number_from,
92
- 'X-Xcnam-Sensitive-Phone-Number-To' => x_xcnam_sensitive_phone_number_to,
93
- })
94
-
95
- payload = @version.fetch('GET', @uri, headers: headers)
96
-
97
- CurrentCallInstance.new(@version, payload, )
98
- end
99
-
100
- ##
101
- # Provide a user friendly representation
102
- def to_s
103
- context = @solution.map {|k, v| "#{k}: #{v}"}.join(',')
104
- "#<Twilio.Preview.TrustedComms.CurrentCallContext #{context}>"
105
- end
106
-
107
- ##
108
- # Provide a detailed, user friendly representation
109
- def inspect
110
- context = @solution.map {|k, v| "#{k}: #{v}"}.join(',')
111
- "#<Twilio.Preview.TrustedComms.CurrentCallContext #{context}>"
112
- end
113
- end
114
-
115
- ##
116
- # PLEASE NOTE that this class contains preview products that are subject to change. Use them with caution. If you currently do not have developer preview access, please contact help@twilio.com.
117
- class CurrentCallInstance < InstanceResource
118
- ##
119
- # Initialize the CurrentCallInstance
120
- # @param [Version] version Version that contains the resource
121
- # @param [Hash] payload payload that contains response from Twilio
122
- # @return [CurrentCallInstance] CurrentCallInstance
123
- def initialize(version, payload)
124
- super(version)
125
-
126
- # Marshaled Properties
127
- @properties = {
128
- 'bg_color' => payload['bg_color'],
129
- 'caller' => payload['caller'],
130
- 'created_at' => Twilio.deserialize_iso8601_datetime(payload['created_at']),
131
- 'font_color' => payload['font_color'],
132
- 'from' => payload['from'],
133
- 'logo' => payload['logo'],
134
- 'manager' => payload['manager'],
135
- 'reason' => payload['reason'],
136
- 'shield_img' => payload['shield_img'],
137
- 'sid' => payload['sid'],
138
- 'status' => payload['status'],
139
- 'to' => payload['to'],
140
- 'url' => payload['url'],
141
- 'use_case' => payload['use_case'],
142
- }
143
-
144
- # Context
145
- @instance_context = nil
146
- @params = {}
147
- end
148
-
149
- ##
150
- # Generate an instance context for the instance, the context is capable of
151
- # performing various actions. All instance actions are proxied to the context
152
- # @return [CurrentCallContext] CurrentCallContext for this CurrentCallInstance
153
- def context
154
- unless @instance_context
155
- @instance_context = CurrentCallContext.new(@version, )
156
- end
157
- @instance_context
158
- end
159
-
160
- ##
161
- # @return [String] Background color of the current phone call
162
- def bg_color
163
- @properties['bg_color']
164
- end
165
-
166
- ##
167
- # @return [String] Caller name of the current phone call
168
- def caller
169
- @properties['caller']
170
- end
171
-
172
- ##
173
- # @return [Time] The date this current phone call was created
174
- def created_at
175
- @properties['created_at']
176
- end
177
-
178
- ##
179
- # @return [String] Font color of the current phone call
180
- def font_color
181
- @properties['font_color']
182
- end
183
-
184
- ##
185
- # @return [String] The originating phone number
186
- def from
187
- @properties['from']
188
- end
189
-
190
- ##
191
- # @return [String] Logo URL of the caller
192
- def logo
193
- @properties['logo']
194
- end
195
-
196
- ##
197
- # @return [String] The name of the CPS organization
198
- def manager
199
- @properties['manager']
200
- end
201
-
202
- ##
203
- # @return [String] The business reason for this current phone call
204
- def reason
205
- @properties['reason']
206
- end
207
-
208
- ##
209
- # @return [String] Shield image URL that serves as authenticity proof of the current phone call
210
- def shield_img
211
- @properties['shield_img']
212
- end
213
-
214
- ##
215
- # @return [String] A string that uniquely identifies this current branded phone call.
216
- def sid
217
- @properties['sid']
218
- end
219
-
220
- ##
221
- # @return [String] The status of the current phone call
222
- def status
223
- @properties['status']
224
- end
225
-
226
- ##
227
- # @return [String] The terminating phone number
228
- def to
229
- @properties['to']
230
- end
231
-
232
- ##
233
- # @return [String] The URL of this resource.
234
- def url
235
- @properties['url']
236
- end
237
-
238
- ##
239
- # @return [String] The use case for the current phone call
240
- def use_case
241
- @properties['use_case']
242
- end
243
-
244
- ##
245
- # Fetch the CurrentCallInstance
246
- # @param [String] x_xcnam_sensitive_phone_number_from The originating Phone
247
- # Number, given in {E.164 format}[https://www.twilio.com/docs/glossary/what-e164].
248
- # This phone number should be a Twilio number, otherwise it will return an error
249
- # with HTTP Status Code 400.
250
- # @param [String] x_xcnam_sensitive_phone_number_to The terminating Phone Number,
251
- # given in {E.164 format}[https://www.twilio.com/docs/glossary/what-e164].
252
- # @return [CurrentCallInstance] Fetched CurrentCallInstance
253
- def fetch(x_xcnam_sensitive_phone_number_from: :unset, x_xcnam_sensitive_phone_number_to: :unset)
254
- context.fetch(
255
- x_xcnam_sensitive_phone_number_from: x_xcnam_sensitive_phone_number_from,
256
- x_xcnam_sensitive_phone_number_to: x_xcnam_sensitive_phone_number_to,
257
- )
258
- end
259
-
260
- ##
261
- # Provide a user friendly representation
262
- def to_s
263
- values = @params.map{|k, v| "#{k}: #{v}"}.join(" ")
264
- "<Twilio.Preview.TrustedComms.CurrentCallInstance #{values}>"
265
- end
266
-
267
- ##
268
- # Provide a detailed, user friendly representation
269
- def inspect
270
- values = @properties.map{|k, v| "#{k}: #{v}"}.join(" ")
271
- "<Twilio.Preview.TrustedComms.CurrentCallInstance #{values}>"
272
- end
273
- end
274
- end
275
- end
276
- end
277
- end
@@ -1,65 +0,0 @@
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 Preview
12
- class TrustedComms < Version
13
- ##
14
- # Initialize the TrustedComms version of Preview
15
- def initialize(domain)
16
- super
17
- @version = 'TrustedComms'
18
- @branded_channels = nil
19
- @brands_information = nil
20
- @cps = nil
21
- @current_calls = nil
22
- end
23
-
24
- ##
25
- # @param [String] sid The unique SID identifier of the Branded Channel.
26
- # @return [Twilio::REST::Preview::TrustedComms::BrandedChannelContext] if sid was passed.
27
- # @return [Twilio::REST::Preview::TrustedComms::BrandedChannelList]
28
- def branded_channels(sid=:unset)
29
- if sid.nil?
30
- raise ArgumentError, 'sid cannot be nil'
31
- end
32
- if sid == :unset
33
- @branded_channels ||= BrandedChannelList.new self
34
- else
35
- BrandedChannelContext.new(self, sid)
36
- end
37
- end
38
-
39
- ##
40
- # @return [Twilio::REST::Preview::TrustedComms::BrandsInformationContext]
41
- def brands_information
42
- @brands_information ||= BrandsInformationContext.new self
43
- end
44
-
45
- ##
46
- # @return [Twilio::REST::Preview::TrustedComms::CpsContext]
47
- def cps
48
- @cps ||= CpsContext.new self
49
- end
50
-
51
- ##
52
- # @return [Twilio::REST::Preview::TrustedComms::CurrentCallContext]
53
- def current_calls
54
- @current_calls ||= CurrentCallContext.new self
55
- end
56
-
57
- ##
58
- # Provide a user friendly representation
59
- def to_s
60
- '<Twilio::REST::Preview::TrustedComms>'
61
- end
62
- end
63
- end
64
- end
65
- end