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
@@ -0,0 +1,45 @@
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 Content
12
+ class V1 < Version
13
+ ##
14
+ # Initialize the V1 version of Content
15
+ def initialize(domain)
16
+ super
17
+ @version = 'v1'
18
+ @contents = nil
19
+ end
20
+
21
+ ##
22
+ # @param [String] sid The Twilio-provided string that uniquely identifies the
23
+ # Content resource to fetch.
24
+ # @return [Twilio::REST::Content::V1::ContentContext] if sid was passed.
25
+ # @return [Twilio::REST::Content::V1::ContentList]
26
+ def contents(sid=:unset)
27
+ if sid.nil?
28
+ raise ArgumentError, 'sid cannot be nil'
29
+ end
30
+ if sid == :unset
31
+ @contents ||= ContentList.new self
32
+ else
33
+ ContentContext.new(self, sid)
34
+ end
35
+ end
36
+
37
+ ##
38
+ # Provide a user friendly representation
39
+ def to_s
40
+ '<Twilio::REST::Content::V1>'
41
+ end
42
+ end
43
+ end
44
+ end
45
+ end
@@ -0,0 +1,47 @@
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 Content < Domain
12
+ ##
13
+ # Initialize the Content Domain
14
+ def initialize(twilio)
15
+ super
16
+
17
+ @base_url = 'https://content.twilio.com'
18
+ @host = 'content.twilio.com'
19
+ @port = 443
20
+
21
+ # Versions
22
+ @v1 = nil
23
+ end
24
+
25
+ ##
26
+ # Version v1 of content
27
+ def v1
28
+ @v1 ||= V1.new self
29
+ end
30
+
31
+ ##
32
+ # @param [String] sid The unique string that that we created to identify the
33
+ # Content resource.
34
+ # @return [Twilio::REST::Content::V1::ContentInstance] if sid was passed.
35
+ # @return [Twilio::REST::Content::V1::ContentList]
36
+ def contents(sid=:unset)
37
+ self.v1.contents(sid)
38
+ end
39
+
40
+ ##
41
+ # Provide a user friendly representation
42
+ def to_s
43
+ '#<Twilio::REST::Content>'
44
+ end
45
+ end
46
+ end
47
+ end
@@ -0,0 +1,156 @@
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 FlexApi < Domain
12
+ class V1 < Version
13
+ class AssessmentsList < ListResource
14
+ ##
15
+ # Initialize the AssessmentsList
16
+ # @param [Version] version Version that contains the resource
17
+ # @return [AssessmentsList] AssessmentsList
18
+ def initialize(version)
19
+ super(version)
20
+
21
+ # Path Solution
22
+ @solution = {}
23
+ end
24
+
25
+ ##
26
+ # Provide a user friendly representation
27
+ def to_s
28
+ '#<Twilio.FlexApi.V1.AssessmentsList>'
29
+ end
30
+ end
31
+
32
+ class AssessmentsPage < Page
33
+ ##
34
+ # Initialize the AssessmentsPage
35
+ # @param [Version] version Version that contains the resource
36
+ # @param [Response] response Response from the API
37
+ # @param [Hash] solution Path solution for the resource
38
+ # @return [AssessmentsPage] AssessmentsPage
39
+ def initialize(version, response, solution)
40
+ super(version, response)
41
+
42
+ # Path Solution
43
+ @solution = solution
44
+ end
45
+
46
+ ##
47
+ # Build an instance of AssessmentsInstance
48
+ # @param [Hash] payload Payload response from the API
49
+ # @return [AssessmentsInstance] AssessmentsInstance
50
+ def get_instance(payload)
51
+ AssessmentsInstance.new(@version, payload, )
52
+ end
53
+
54
+ ##
55
+ # Provide a user friendly representation
56
+ def to_s
57
+ '<Twilio.FlexApi.V1.AssessmentsPage>'
58
+ end
59
+ end
60
+
61
+ class AssessmentsContext < InstanceContext
62
+ ##
63
+ # Initialize the AssessmentsContext
64
+ # @param [Version] version Version that contains the resource
65
+ # @return [AssessmentsContext] AssessmentsContext
66
+ def initialize(version)
67
+ super(version)
68
+
69
+ # Path Solution
70
+ @solution = {}
71
+ @uri = "/Accounts/Assessments"
72
+ end
73
+
74
+ ##
75
+ # Create the AssessmentsInstance
76
+ # @return [AssessmentsInstance] Created AssessmentsInstance
77
+ def create
78
+ payload = @version.create('POST', @uri)
79
+
80
+ AssessmentsInstance.new(@version, payload, )
81
+ end
82
+
83
+ ##
84
+ # Provide a user friendly representation
85
+ def to_s
86
+ context = @solution.map {|k, v| "#{k}: #{v}"}.join(',')
87
+ "#<Twilio.FlexApi.V1.AssessmentsContext #{context}>"
88
+ end
89
+
90
+ ##
91
+ # Provide a detailed, user friendly representation
92
+ def inspect
93
+ context = @solution.map {|k, v| "#{k}: #{v}"}.join(',')
94
+ "#<Twilio.FlexApi.V1.AssessmentsContext #{context}>"
95
+ end
96
+ end
97
+
98
+ class AssessmentsInstance < InstanceResource
99
+ ##
100
+ # Initialize the AssessmentsInstance
101
+ # @param [Version] version Version that contains the resource
102
+ # @param [Hash] payload payload that contains response from Twilio
103
+ # @return [AssessmentsInstance] AssessmentsInstance
104
+ def initialize(version, payload)
105
+ super(version)
106
+
107
+ # Marshaled Properties
108
+ @properties = {'url' => payload['url'], }
109
+
110
+ # Context
111
+ @instance_context = nil
112
+ @params = {}
113
+ end
114
+
115
+ ##
116
+ # Generate an instance context for the instance, the context is capable of
117
+ # performing various actions. All instance actions are proxied to the context
118
+ # @return [AssessmentsContext] AssessmentsContext for this AssessmentsInstance
119
+ def context
120
+ unless @instance_context
121
+ @instance_context = AssessmentsContext.new(@version, )
122
+ end
123
+ @instance_context
124
+ end
125
+
126
+ ##
127
+ # @return [String] The URL of this resource.
128
+ def url
129
+ @properties['url']
130
+ end
131
+
132
+ ##
133
+ # Create the AssessmentsInstance
134
+ # @return [AssessmentsInstance] Created AssessmentsInstance
135
+ def create
136
+ context.create
137
+ end
138
+
139
+ ##
140
+ # Provide a user friendly representation
141
+ def to_s
142
+ values = @params.map{|k, v| "#{k}: #{v}"}.join(" ")
143
+ "<Twilio.FlexApi.V1.AssessmentsInstance #{values}>"
144
+ end
145
+
146
+ ##
147
+ # Provide a detailed, user friendly representation
148
+ def inspect
149
+ values = @properties.map{|k, v| "#{k}: #{v}"}.join(" ")
150
+ "<Twilio.FlexApi.V1.AssessmentsInstance #{values}>"
151
+ end
152
+ end
153
+ end
154
+ end
155
+ end
156
+ end
@@ -112,6 +112,7 @@ module Twilio
112
112
  'workspace_id' => payload['workspace_id'],
113
113
  'session_expiry' => payload['session_expiry'],
114
114
  'session_id' => payload['session_id'],
115
+ 'gd_base_url' => payload['gd_base_url'],
115
116
  'url' => payload['url'],
116
117
  }
117
118
 
@@ -149,6 +150,12 @@ module Twilio
149
150
  @properties['session_id']
150
151
  end
151
152
 
153
+ ##
154
+ # @return [String] GoodData login base URL
155
+ def gd_base_url
156
+ @properties['gd_base_url']
157
+ end
158
+
152
159
  ##
153
160
  # @return [String] The URL of this resource.
154
161
  def url
@@ -15,6 +15,7 @@ module Twilio
15
15
  def initialize(domain)
16
16
  super
17
17
  @version = 'v1'
18
+ @assessments = nil
18
19
  @channel = nil
19
20
  @configuration = nil
20
21
  @flex_flow = nil
@@ -24,6 +25,12 @@ module Twilio
24
25
  @web_channel = nil
25
26
  end
26
27
 
28
+ ##
29
+ # @return [Twilio::REST::Flex_api::V1::AssessmentsContext]
30
+ def assessments
31
+ @assessments ||= AssessmentsContext.new self
32
+ end
33
+
27
34
  ##
28
35
  # @param [String] sid The SID of the Flex chat channel resource to fetch.
29
36
  # @return [Twilio::REST::Flex_api::V1::ChannelContext] if sid was passed.
@@ -28,6 +28,12 @@ module Twilio
28
28
  @v1 ||= V1.new self
29
29
  end
30
30
 
31
+ ##
32
+ # @return [Twilio::REST::Flex_api::V1::AssessmentsInstance]
33
+ def assessments
34
+ self.v1.assessments()
35
+ end
36
+
31
37
  ##
32
38
  # @param [String] sid The unique string that we created to identify the Channel
33
39
  # resource.
@@ -117,6 +117,7 @@ module Twilio
117
117
  'call_sid' => payload['call_sid'],
118
118
  'call_type' => payload['call_type'],
119
119
  'call_state' => payload['call_state'],
120
+ 'answered_by' => payload['answered_by'],
120
121
  'processing_state' => payload['processing_state'],
121
122
  'created_time' => Twilio.deserialize_iso8601_datetime(payload['created_time']),
122
123
  'start_time' => Twilio.deserialize_iso8601_datetime(payload['start_time']),
@@ -177,6 +178,12 @@ module Twilio
177
178
  @properties['call_state']
178
179
  end
179
180
 
181
+ ##
182
+ # @return [call_summary.AnsweredBy] The answered_by
183
+ def answered_by
184
+ @properties['answered_by']
185
+ end
186
+
180
187
  ##
181
188
  # @return [call_summary.ProcessingState] The processing_state
182
189
  def processing_state
@@ -268,6 +268,7 @@ module Twilio
268
268
  @properties = {
269
269
  'account_sid' => payload['account_sid'],
270
270
  'call_sid' => payload['call_sid'],
271
+ 'answered_by' => payload['answered_by'],
271
272
  'call_type' => payload['call_type'],
272
273
  'call_state' => payload['call_state'],
273
274
  'processing_state' => payload['processing_state'],
@@ -302,6 +303,12 @@ module Twilio
302
303
  @properties['call_sid']
303
304
  end
304
305
 
306
+ ##
307
+ # @return [call_summaries.AnsweredBy] The answered_by
308
+ def answered_by
309
+ @properties['answered_by']
310
+ end
311
+
305
312
  ##
306
313
  # @return [call_summaries.CallType] The call_type
307
314
  def call_type
@@ -83,13 +83,47 @@ 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
- # line_type_intelligence.
86
+ # line_type_intelligence, identity_match.
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.
90
+ # @param [String] first_name User’s first name. This query parameter is only used
91
+ # (optionally) for identity_match package requests.
92
+ # @param [String] last_name User’s last name. This query parameter is only used
93
+ # (optionally) for identity_match package requests.
94
+ # @param [String] address_line_1 User’s first address line. This query parameter
95
+ # is only used (optionally) for identity_match package requests.
96
+ # @param [String] address_line_2 User’s second address line. This query parameter
97
+ # is only used (optionally) for identity_match package requests.
98
+ # @param [String] city User’s city. This query parameter is only used (optionally)
99
+ # for identity_match package requests.
100
+ # @param [String] state User’s country subdivision, such as state, province, or
101
+ # locality. This query parameter is only used (optionally) for identity_match
102
+ # package requests.
103
+ # @param [String] postal_code User’s postal zip code. This query parameter is only
104
+ # used (optionally) for identity_match package requests.
105
+ # @param [String] address_country_code User’s country, up to two characters. This
106
+ # query parameter is only used (optionally) for identity_match package requests.
107
+ # @param [String] national_id User’s national ID, such as SSN or Passport ID. This
108
+ # query parameter is only used (optionally) for identity_match package requests.
109
+ # @param [String] date_of_birth User’s date of birth, in YYYYMMDD format. This
110
+ # query parameter is only used (optionally) for identity_match package requests.
90
111
  # @return [PhoneNumberInstance] Fetched PhoneNumberInstance
91
- def fetch(fields: :unset, country_code: :unset)
92
- params = Twilio::Values.of({'Fields' => fields, 'CountryCode' => country_code, })
112
+ def fetch(fields: :unset, country_code: :unset, first_name: :unset, last_name: :unset, address_line_1: :unset, address_line_2: :unset, city: :unset, state: :unset, postal_code: :unset, address_country_code: :unset, national_id: :unset, date_of_birth: :unset)
113
+ params = Twilio::Values.of({
114
+ 'Fields' => fields,
115
+ 'CountryCode' => country_code,
116
+ 'FirstName' => first_name,
117
+ 'LastName' => last_name,
118
+ 'AddressLine1' => address_line_1,
119
+ 'AddressLine2' => address_line_2,
120
+ 'City' => city,
121
+ 'State' => state,
122
+ 'PostalCode' => postal_code,
123
+ 'AddressCountryCode' => address_country_code,
124
+ 'NationalId' => national_id,
125
+ 'DateOfBirth' => date_of_birth,
126
+ })
93
127
 
94
128
  payload = @version.fetch('GET', @uri, params: params)
95
129
 
@@ -137,6 +171,7 @@ module Twilio
137
171
  'call_forwarding' => payload['call_forwarding'],
138
172
  'live_activity' => payload['live_activity'],
139
173
  'line_type_intelligence' => payload['line_type_intelligence'],
174
+ 'identity_match' => payload['identity_match'],
140
175
  'url' => payload['url'],
141
176
  }
142
177
 
@@ -222,6 +257,12 @@ module Twilio
222
257
  @properties['line_type_intelligence']
223
258
  end
224
259
 
260
+ ##
261
+ # @return [Hash] An object that contains identity match information
262
+ def identity_match
263
+ @properties['identity_match']
264
+ end
265
+
225
266
  ##
226
267
  # @return [String] The absolute URL of the resource
227
268
  def url
@@ -232,13 +273,47 @@ module Twilio
232
273
  # Fetch the PhoneNumberInstance
233
274
  # @param [String] fields A comma-separated list of fields to return. Possible
234
275
  # values are caller_name, sim_swap, call_forwarding, live_activity,
235
- # line_type_intelligence.
276
+ # line_type_intelligence, identity_match.
236
277
  # @param [String] country_code The {country
237
278
  # code}[https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2] used if the phone number
238
279
  # provided is in national format.
280
+ # @param [String] first_name User’s first name. This query parameter is only used
281
+ # (optionally) for identity_match package requests.
282
+ # @param [String] last_name User’s last name. This query parameter is only used
283
+ # (optionally) for identity_match package requests.
284
+ # @param [String] address_line_1 User’s first address line. This query parameter
285
+ # is only used (optionally) for identity_match package requests.
286
+ # @param [String] address_line_2 User’s second address line. This query parameter
287
+ # is only used (optionally) for identity_match package requests.
288
+ # @param [String] city User’s city. This query parameter is only used (optionally)
289
+ # for identity_match package requests.
290
+ # @param [String] state User’s country subdivision, such as state, province, or
291
+ # locality. This query parameter is only used (optionally) for identity_match
292
+ # package requests.
293
+ # @param [String] postal_code User’s postal zip code. This query parameter is only
294
+ # used (optionally) for identity_match package requests.
295
+ # @param [String] address_country_code User’s country, up to two characters. This
296
+ # query parameter is only used (optionally) for identity_match package requests.
297
+ # @param [String] national_id User’s national ID, such as SSN or Passport ID. This
298
+ # query parameter is only used (optionally) for identity_match package requests.
299
+ # @param [String] date_of_birth User’s date of birth, in YYYYMMDD format. This
300
+ # query parameter is only used (optionally) for identity_match package requests.
239
301
  # @return [PhoneNumberInstance] Fetched PhoneNumberInstance
240
- def fetch(fields: :unset, country_code: :unset)
241
- context.fetch(fields: fields, country_code: country_code, )
302
+ def fetch(fields: :unset, country_code: :unset, first_name: :unset, last_name: :unset, address_line_1: :unset, address_line_2: :unset, city: :unset, state: :unset, postal_code: :unset, address_country_code: :unset, national_id: :unset, date_of_birth: :unset)
303
+ context.fetch(
304
+ fields: fields,
305
+ country_code: country_code,
306
+ first_name: first_name,
307
+ last_name: last_name,
308
+ address_line_1: address_line_1,
309
+ address_line_2: address_line_2,
310
+ city: city,
311
+ state: state,
312
+ postal_code: postal_code,
313
+ address_country_code: address_country_code,
314
+ national_id: national_id,
315
+ date_of_birth: date_of_birth,
316
+ )
242
317
  end
243
318
 
244
319
  ##