twilio-ruby 5.73.2 → 5.73.3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 420da06b1b46fcad457f163296ce2b934ef3d87d
4
- data.tar.gz: 499104cf3de9b1f2757cfcc513e4cff7a1466e42
3
+ metadata.gz: 896d8d0d0dfce7ae4974eef4b0310cf88235ba69
4
+ data.tar.gz: 92cb92bae7b8400bfed7273ef93b2bea4af690b2
5
5
  SHA512:
6
- metadata.gz: 333168f9d4403e1f1f49ac38d626486593548131ac316f188393b943f8bcf2b695fd7c92eee53d1a9cb427573bdce7b3e4f8548dbc6b0e442ea0c16994efe34a
7
- data.tar.gz: 26ef0ae6cc128348d192ba8777220d4c13a12534acc36d0bcbd0f986a01ba964671233e64c752ededc5eaf4949e7382c5e39ce598f8dd0c391ddc134c9670cf9
6
+ metadata.gz: fb4fd38d013d19504a3be0ad3675f2606027bda0f928183bf96dc186f82cfdbf4f8ea3e6bfff493157823526d2f58a8d5c32bbb6928af1dc9d14d104fd1ed32c
7
+ data.tar.gz: 89ea1e3fa976d22a46948144fe5fe56834faa75aabcf7ea0b0fd0466fabcb4a57b611dbb8b45ee70591c460a8e1211b68035ca5406b605fa7131c717b9ade3dc
@@ -8,8 +8,14 @@ jobs:
8
8
  name: Validate title
9
9
  runs-on: ubuntu-latest
10
10
  steps:
11
- - uses: amannn/action-semantic-pull-request@v4
11
+ - uses: amannn/action-semantic-pull-request@v5
12
12
  with:
13
- types: chore docs fix feat test misc
13
+ types: |
14
+ chore
15
+ docs
16
+ fix
17
+ feat
18
+ misc
19
+ test
14
20
  env:
15
21
  GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
@@ -20,7 +20,7 @@ jobs:
20
20
  ruby: [ '2.4', '2.5', '2.6', '2.7', '3.0', '3.1', 'ruby-head', 'jruby-9.2' ]
21
21
  steps:
22
22
  - name: Checkout twilio-ruby
23
- uses: actions/checkout@v2
23
+ uses: actions/checkout@v3
24
24
  with:
25
25
  fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis
26
26
 
@@ -65,7 +65,7 @@ jobs:
65
65
  runs-on: ubuntu-latest
66
66
  steps:
67
67
  - name: Checkout twilio-ruby
68
- uses: actions/checkout@v2
68
+ uses: actions/checkout@v3
69
69
  with:
70
70
  fetch-depth: 0
71
71
 
@@ -78,7 +78,7 @@ jobs:
78
78
  - run: bundle install
79
79
 
80
80
  - name: Login to Docker Hub
81
- uses: docker/login-action@v1
81
+ uses: docker/login-action@v2
82
82
  with:
83
83
  username: ${{ secrets.DOCKER_USERNAME }}
84
84
  password: ${{ secrets.DOCKER_AUTH_TOKEN }}
data/CHANGES.md CHANGED
@@ -1,6 +1,22 @@
1
1
  twilio-ruby changelog
2
2
  =====================
3
3
 
4
+ [2022-11-16] Version 5.73.3
5
+ ---------------------------
6
+ **Library - Chore**
7
+ - [PR #621](https://github.com/twilio/twilio-ruby/pull/621): upgrade GitHub Actions dependencies. Thanks to [@childish-sambino](https://github.com/childish-sambino)!
8
+
9
+ **Api**
10
+ - Set the Content resource to have public visibility as Preview
11
+
12
+ **Flex**
13
+ - Adding new parameter `base_url` to 'gooddata' response in version `v1`
14
+
15
+ **Insights**
16
+ - Added `answered_by` field in List Call Summary
17
+ - Added `answered_by` field in call summary
18
+
19
+
4
20
  [2022-11-10] Version 5.73.2
5
21
  ---------------------------
6
22
  **Flex**
data/LICENSE CHANGED
@@ -1,6 +1,6 @@
1
1
  MIT License
2
2
 
3
- Copyright (C) 2021, Twilio, Inc. <help@twilio.com>
3
+ Copyright (C) 2022, Twilio, Inc. <help@twilio.com>
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy of
6
6
  this software and associated documentation files (the "Software"), to deal in
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.73.2'
37
+ gem 'twilio-ruby', '~> 5.73.3'
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.73.2
43
+ gem install twilio-ruby -v 5.73.3
44
44
  ```
45
45
 
46
46
  To build and install the development branch yourself from the latest source:
@@ -34,6 +34,7 @@ module Twilio
34
34
  @api = nil
35
35
  @autopilot = nil
36
36
  @chat = nil
37
+ @content = nil
37
38
  @conversations = nil
38
39
  @events = nil
39
40
  @flex_api = nil
@@ -188,6 +189,12 @@ module Twilio
188
189
  @chat ||= Chat.new self
189
190
  end
190
191
 
192
+ ##
193
+ # Access the Content Twilio Domain
194
+ def content
195
+ @content ||= Content.new self
196
+ end
197
+
191
198
  ##
192
199
  # Access the Conversations Twilio Domain
193
200
  def conversations
@@ -0,0 +1,337 @@
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
+ class V1 < 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 ContentList < ListResource
16
+ ##
17
+ # Initialize the ContentList
18
+ # @param [Version] version Version that contains the resource
19
+ # @return [ContentList] ContentList
20
+ def initialize(version)
21
+ super(version)
22
+
23
+ # Path Solution
24
+ @solution = {}
25
+ @uri = "/Content"
26
+ end
27
+
28
+ ##
29
+ # Create the ContentInstance
30
+ # @return [ContentInstance] Created ContentInstance
31
+ def create
32
+ payload = @version.create('POST', @uri)
33
+
34
+ ContentInstance.new(@version, payload, )
35
+ end
36
+
37
+ ##
38
+ # Lists ContentInstance records from the API as a list.
39
+ # Unlike stream(), this operation is eager and will load `limit` records into
40
+ # memory before returning.
41
+ # @param [Integer] limit Upper limit for the number of records to return. stream()
42
+ # guarantees to never return more than limit. Default is no limit
43
+ # @param [Integer] page_size Number of records to fetch per request, when
44
+ # not set will use the default value of 50 records. If no page_size is defined
45
+ # but a limit is defined, stream() will attempt to read the limit with the most
46
+ # efficient page size, i.e. min(limit, 1000)
47
+ # @return [Array] Array of up to limit results
48
+ def list(limit: nil, page_size: nil)
49
+ self.stream(limit: limit, page_size: page_size).entries
50
+ end
51
+
52
+ ##
53
+ # Streams ContentInstance records from the API as an Enumerable.
54
+ # This operation lazily loads records as efficiently as possible until the limit
55
+ # is reached.
56
+ # @param [Integer] limit Upper limit for the number of records to return. stream()
57
+ # guarantees to never return more than limit. Default is no limit.
58
+ # @param [Integer] page_size Number of records to fetch per request, when
59
+ # not set will use the default value of 50 records. If no page_size is defined
60
+ # but a limit is defined, stream() will attempt to read the limit with the most
61
+ # efficient page size, i.e. min(limit, 1000)
62
+ # @return [Enumerable] Enumerable that will yield up to limit results
63
+ def stream(limit: nil, page_size: nil)
64
+ limits = @version.read_limits(limit, page_size)
65
+
66
+ page = self.page(page_size: limits[:page_size], )
67
+
68
+ @version.stream(page, limit: limits[:limit], page_limit: limits[:page_limit])
69
+ end
70
+
71
+ ##
72
+ # When passed a block, yields ContentInstance records from the API.
73
+ # This operation lazily loads records as efficiently as possible until the limit
74
+ # is reached.
75
+ def each
76
+ limits = @version.read_limits
77
+
78
+ page = self.page(page_size: limits[:page_size], )
79
+
80
+ @version.stream(page,
81
+ limit: limits[:limit],
82
+ page_limit: limits[:page_limit]).each {|x| yield x}
83
+ end
84
+
85
+ ##
86
+ # Retrieve a single page of ContentInstance records from the API.
87
+ # Request is executed immediately.
88
+ # @param [String] page_token PageToken provided by the API
89
+ # @param [Integer] page_number Page Number, this value is simply for client state
90
+ # @param [Integer] page_size Number of records to return, defaults to 50
91
+ # @return [Page] Page of ContentInstance
92
+ def page(page_token: :unset, page_number: :unset, page_size: :unset)
93
+ params = Twilio::Values.of({
94
+ 'PageToken' => page_token,
95
+ 'Page' => page_number,
96
+ 'PageSize' => page_size,
97
+ })
98
+
99
+ response = @version.page('GET', @uri, params: params)
100
+
101
+ ContentPage.new(@version, response, @solution)
102
+ end
103
+
104
+ ##
105
+ # Retrieve a single page of ContentInstance records from the API.
106
+ # Request is executed immediately.
107
+ # @param [String] target_url API-generated URL for the requested results page
108
+ # @return [Page] Page of ContentInstance
109
+ def get_page(target_url)
110
+ response = @version.domain.request(
111
+ 'GET',
112
+ target_url
113
+ )
114
+ ContentPage.new(@version, response, @solution)
115
+ end
116
+
117
+ ##
118
+ # Provide a user friendly representation
119
+ def to_s
120
+ '#<Twilio.Content.V1.ContentList>'
121
+ end
122
+ end
123
+
124
+ ##
125
+ # 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.
126
+ class ContentPage < Page
127
+ ##
128
+ # Initialize the ContentPage
129
+ # @param [Version] version Version that contains the resource
130
+ # @param [Response] response Response from the API
131
+ # @param [Hash] solution Path solution for the resource
132
+ # @return [ContentPage] ContentPage
133
+ def initialize(version, response, solution)
134
+ super(version, response)
135
+
136
+ # Path Solution
137
+ @solution = solution
138
+ end
139
+
140
+ ##
141
+ # Build an instance of ContentInstance
142
+ # @param [Hash] payload Payload response from the API
143
+ # @return [ContentInstance] ContentInstance
144
+ def get_instance(payload)
145
+ ContentInstance.new(@version, payload, )
146
+ end
147
+
148
+ ##
149
+ # Provide a user friendly representation
150
+ def to_s
151
+ '<Twilio.Content.V1.ContentPage>'
152
+ end
153
+ end
154
+
155
+ ##
156
+ # 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.
157
+ class ContentContext < InstanceContext
158
+ ##
159
+ # Initialize the ContentContext
160
+ # @param [Version] version Version that contains the resource
161
+ # @param [String] sid The Twilio-provided string that uniquely identifies the
162
+ # Content resource to fetch.
163
+ # @return [ContentContext] ContentContext
164
+ def initialize(version, sid)
165
+ super(version)
166
+
167
+ # Path Solution
168
+ @solution = {sid: sid, }
169
+ @uri = "/Content/#{@solution[:sid]}"
170
+ end
171
+
172
+ ##
173
+ # Fetch the ContentInstance
174
+ # @return [ContentInstance] Fetched ContentInstance
175
+ def fetch
176
+ payload = @version.fetch('GET', @uri)
177
+
178
+ ContentInstance.new(@version, payload, sid: @solution[:sid], )
179
+ end
180
+
181
+ ##
182
+ # Delete the ContentInstance
183
+ # @return [Boolean] true if delete succeeds, false otherwise
184
+ def delete
185
+ @version.delete('DELETE', @uri)
186
+ end
187
+
188
+ ##
189
+ # Provide a user friendly representation
190
+ def to_s
191
+ context = @solution.map {|k, v| "#{k}: #{v}"}.join(',')
192
+ "#<Twilio.Content.V1.ContentContext #{context}>"
193
+ end
194
+
195
+ ##
196
+ # Provide a detailed, user friendly representation
197
+ def inspect
198
+ context = @solution.map {|k, v| "#{k}: #{v}"}.join(',')
199
+ "#<Twilio.Content.V1.ContentContext #{context}>"
200
+ end
201
+ end
202
+
203
+ ##
204
+ # 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.
205
+ class ContentInstance < InstanceResource
206
+ ##
207
+ # Initialize the ContentInstance
208
+ # @param [Version] version Version that contains the resource
209
+ # @param [Hash] payload payload that contains response from Twilio
210
+ # @param [String] sid The Twilio-provided string that uniquely identifies the
211
+ # Content resource to fetch.
212
+ # @return [ContentInstance] ContentInstance
213
+ def initialize(version, payload, sid: nil)
214
+ super(version)
215
+
216
+ # Marshaled Properties
217
+ @properties = {
218
+ 'date_created' => Twilio.deserialize_iso8601_datetime(payload['date_created']),
219
+ 'date_updated' => Twilio.deserialize_iso8601_datetime(payload['date_updated']),
220
+ 'sid' => payload['sid'],
221
+ 'account_sid' => payload['account_sid'],
222
+ 'friendly_name' => payload['friendly_name'],
223
+ 'language' => payload['language'],
224
+ 'variables' => payload['variables'],
225
+ 'types' => payload['types'],
226
+ 'url' => payload['url'],
227
+ 'links' => payload['links'],
228
+ }
229
+
230
+ # Context
231
+ @instance_context = nil
232
+ @params = {'sid' => sid || @properties['sid'], }
233
+ end
234
+
235
+ ##
236
+ # Generate an instance context for the instance, the context is capable of
237
+ # performing various actions. All instance actions are proxied to the context
238
+ # @return [ContentContext] ContentContext for this ContentInstance
239
+ def context
240
+ unless @instance_context
241
+ @instance_context = ContentContext.new(@version, @params['sid'], )
242
+ end
243
+ @instance_context
244
+ end
245
+
246
+ ##
247
+ # @return [Time] The RFC 2822 date and time in GMT that the resource was created
248
+ def date_created
249
+ @properties['date_created']
250
+ end
251
+
252
+ ##
253
+ # @return [Time] The RFC 2822 date and time in GMT that the resource was last updated
254
+ def date_updated
255
+ @properties['date_updated']
256
+ end
257
+
258
+ ##
259
+ # @return [String] The unique string that identifies the resource
260
+ def sid
261
+ @properties['sid']
262
+ end
263
+
264
+ ##
265
+ # @return [String] The SID of the Account that created the resource
266
+ def account_sid
267
+ @properties['account_sid']
268
+ end
269
+
270
+ ##
271
+ # @return [String] A string name used to describe the Content resource
272
+ def friendly_name
273
+ @properties['friendly_name']
274
+ end
275
+
276
+ ##
277
+ # @return [String] Two-letter language code identifying the language the Content resource is in.
278
+ def language
279
+ @properties['language']
280
+ end
281
+
282
+ ##
283
+ # @return [Hash] Defines the default placeholder values for variables included in the Content resource
284
+ def variables
285
+ @properties['variables']
286
+ end
287
+
288
+ ##
289
+ # @return [Hash] The Content types (e.g. twilio/text) for this Content resource
290
+ def types
291
+ @properties['types']
292
+ end
293
+
294
+ ##
295
+ # @return [String] The URL of the resource, relative to `https://content.twilio.com`
296
+ def url
297
+ @properties['url']
298
+ end
299
+
300
+ ##
301
+ # @return [String] A list of links related to the Content resource
302
+ def links
303
+ @properties['links']
304
+ end
305
+
306
+ ##
307
+ # Fetch the ContentInstance
308
+ # @return [ContentInstance] Fetched ContentInstance
309
+ def fetch
310
+ context.fetch
311
+ end
312
+
313
+ ##
314
+ # Delete the ContentInstance
315
+ # @return [Boolean] true if delete succeeds, false otherwise
316
+ def delete
317
+ context.delete
318
+ end
319
+
320
+ ##
321
+ # Provide a user friendly representation
322
+ def to_s
323
+ values = @params.map{|k, v| "#{k}: #{v}"}.join(" ")
324
+ "<Twilio.Content.V1.ContentInstance #{values}>"
325
+ end
326
+
327
+ ##
328
+ # Provide a detailed, user friendly representation
329
+ def inspect
330
+ values = @properties.map{|k, v| "#{k}: #{v}"}.join(" ")
331
+ "<Twilio.Content.V1.ContentInstance #{values}>"
332
+ end
333
+ end
334
+ end
335
+ end
336
+ end
337
+ end
@@ -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
@@ -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
@@ -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
@@ -1,3 +1,3 @@
1
1
  module Twilio
2
- VERSION = '5.73.2'
2
+ VERSION = '5.73.3'
3
3
  end
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.73.2
4
+ version: 5.73.3
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-10 00:00:00.000000000 Z
11
+ date: 2022-11-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: jwt
@@ -381,6 +381,9 @@ files:
381
381
  - lib/twilio-ruby/rest/chat/v3.rb
382
382
  - lib/twilio-ruby/rest/chat/v3/channel.rb
383
383
  - lib/twilio-ruby/rest/client.rb
384
+ - lib/twilio-ruby/rest/content.rb
385
+ - lib/twilio-ruby/rest/content/v1.rb
386
+ - lib/twilio-ruby/rest/content/v1/content.rb
384
387
  - lib/twilio-ruby/rest/conversations.rb
385
388
  - lib/twilio-ruby/rest/conversations/v1.rb
386
389
  - lib/twilio-ruby/rest/conversations/v1/address_configuration.rb