twilio-ruby 5.74.4 → 5.74.5

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: 79498c371956cac86eb0c4281ad40018066fcd80
4
- data.tar.gz: e241341e9bbae20dbc4e987e71e09d60c437f4aa
3
+ metadata.gz: 7018019e5270ca1565d431219da291876017fc73
4
+ data.tar.gz: c821fa40d85a91e7ca3947bda93dd7e1ab0d8528
5
5
  SHA512:
6
- metadata.gz: a919fe9df9ed98d43d0cdb3b9514672f086ed811ed53285bdcea897e4eb18d5bc65236ee567509ac6613b45d7f1dc822de7cfdbf7bab5f1345a0666f65eafece
7
- data.tar.gz: cd57db7c480397143d93a143285966bd62baca8b763bde46b345e2c2b51d520504d68345f47e07a0cb32bcb21f527e2f5dedb9666bfecab73e511308d958b670
6
+ metadata.gz: f80521099336899dcbec4975deff99dc40d24e8b2f4eccab23554a234e73b1bc046a693a0c030d2a9e496f539f0817f446d32afb7dfe9f1389dc266213e76af5
7
+ data.tar.gz: f9f78b1cb2eb9c737f82c86adf2e492e7012740ccba69a653ab0236c2a8a9832d916b6699358da0703f41caeaf4213405ab8629ab39aace9b26ab55a6f7a644b
data/CHANGES.md CHANGED
@@ -1,6 +1,18 @@
1
1
  twilio-ruby changelog
2
2
  =====================
3
3
 
4
+ [2023-03-09] Version 5.74.5
5
+ ---------------------------
6
+ **Api**
7
+ - Add new categories for whatsapp template
8
+
9
+ **Lookups**
10
+ - Remove `validation_results` from the `default_output_properties`
11
+
12
+ **Supersim**
13
+ - Add ESimProfile's `matching_id` and `activation_code` parameters to libraries
14
+
15
+
4
16
  [2023-02-22] Version 5.74.4
5
17
  ---------------------------
6
18
  **Api**
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.74.4'
37
+ gem 'twilio-ruby', '~> 5.74.5'
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.74.4
43
+ gem install twilio-ruby -v 5.74.5
44
44
  ```
45
45
 
46
46
  To build and install the development branch yourself from the latest source:
@@ -63,6 +63,94 @@ module Twilio
63
63
  AssessmentsInstance.new(@version, payload, )
64
64
  end
65
65
 
66
+ ##
67
+ # Lists AssessmentsInstance records from the API as a list.
68
+ # Unlike stream(), this operation is eager and will load `limit` records into
69
+ # memory before returning.
70
+ # @param [String] segment_id The id of the segment.
71
+ # @param [String] token The Token HTTP request header
72
+ # @param [Integer] limit Upper limit for the number of records to return. stream()
73
+ # guarantees to never return more than limit. Default is no limit
74
+ # @param [Integer] page_size Number of records to fetch per request, when
75
+ # not set will use the default value of 50 records. If no page_size is defined
76
+ # but a limit is defined, stream() will attempt to read the limit with the most
77
+ # efficient page size, i.e. min(limit, 1000)
78
+ # @return [Array] Array of up to limit results
79
+ def list(segment_id: :unset, token: :unset, limit: nil, page_size: nil)
80
+ self.stream(segment_id: segment_id, token: token, limit: limit, page_size: page_size).entries
81
+ end
82
+
83
+ ##
84
+ # Streams AssessmentsInstance records from the API as an Enumerable.
85
+ # This operation lazily loads records as efficiently as possible until the limit
86
+ # is reached.
87
+ # @param [String] segment_id The id of the segment.
88
+ # @param [String] token The Token HTTP request header
89
+ # @param [Integer] limit Upper limit for the number of records to return. stream()
90
+ # guarantees to never return more than limit. Default is no limit.
91
+ # @param [Integer] page_size Number of records to fetch per request, when
92
+ # not set will use the default value of 50 records. If no page_size is defined
93
+ # but a limit is defined, stream() will attempt to read the limit with the most
94
+ # efficient page size, i.e. min(limit, 1000)
95
+ # @return [Enumerable] Enumerable that will yield up to limit results
96
+ def stream(segment_id: :unset, token: :unset, limit: nil, page_size: nil)
97
+ limits = @version.read_limits(limit, page_size)
98
+
99
+ page = self.page(segment_id: segment_id, token: token, page_size: limits[:page_size], )
100
+
101
+ @version.stream(page, limit: limits[:limit], page_limit: limits[:page_limit])
102
+ end
103
+
104
+ ##
105
+ # When passed a block, yields AssessmentsInstance records from the API.
106
+ # This operation lazily loads records as efficiently as possible until the limit
107
+ # is reached.
108
+ def each
109
+ limits = @version.read_limits
110
+
111
+ page = self.page(page_size: limits[:page_size], )
112
+
113
+ @version.stream(page,
114
+ limit: limits[:limit],
115
+ page_limit: limits[:page_limit]).each {|x| yield x}
116
+ end
117
+
118
+ ##
119
+ # Retrieve a single page of AssessmentsInstance records from the API.
120
+ # Request is executed immediately.
121
+ # @param [String] segment_id The id of the segment.
122
+ # @param [String] token The Token HTTP request header
123
+ # @param [String] page_token PageToken provided by the API
124
+ # @param [Integer] page_number Page Number, this value is simply for client state
125
+ # @param [Integer] page_size Number of records to return, defaults to 50
126
+ # @return [Page] Page of AssessmentsInstance
127
+ def page(segment_id: :unset, token: :unset, page_token: :unset, page_number: :unset, page_size: :unset)
128
+ params = Twilio::Values.of({
129
+ 'SegmentId' => segment_id,
130
+ 'PageToken' => page_token,
131
+ 'Page' => page_number,
132
+ 'PageSize' => page_size,
133
+ })
134
+ headers = Twilio::Values.of({'Token' => token, })
135
+
136
+ response = @version.page('GET', @uri, params: params, headers: headers)
137
+
138
+ AssessmentsPage.new(@version, response, @solution)
139
+ end
140
+
141
+ ##
142
+ # Retrieve a single page of AssessmentsInstance records from the API.
143
+ # Request is executed immediately.
144
+ # @param [String] target_url API-generated URL for the requested results page
145
+ # @return [Page] Page of AssessmentsInstance
146
+ def get_page(target_url)
147
+ response = @version.domain.request(
148
+ 'GET',
149
+ target_url
150
+ )
151
+ AssessmentsPage.new(@version, response, @solution)
152
+ end
153
+
66
154
  ##
67
155
  # Provide a user friendly representation
68
156
  def to_s
@@ -29,18 +29,18 @@ module Twilio
29
29
  # Create the InsightsQuestionnairesQuestionInstance
30
30
  # @param [String] category_id The ID of the category
31
31
  # @param [String] question The question.
32
- # @param [String] description The description for the question.
33
32
  # @param [String] answer_set_id The answer_set for the question.
34
33
  # @param [Boolean] allow_na The flag to enable for disable NA for answer.
34
+ # @param [String] description The description for the question.
35
35
  # @param [String] token The Token HTTP request header
36
36
  # @return [InsightsQuestionnairesQuestionInstance] Created InsightsQuestionnairesQuestionInstance
37
- def create(category_id: nil, question: nil, description: nil, answer_set_id: nil, allow_na: nil, token: :unset)
37
+ def create(category_id: nil, question: nil, answer_set_id: nil, allow_na: nil, description: :unset, token: :unset)
38
38
  data = Twilio::Values.of({
39
39
  'CategoryId' => category_id,
40
40
  'Question' => question,
41
- 'Description' => description,
42
41
  'AnswerSetId' => answer_set_id,
43
42
  'AllowNa' => allow_na,
43
+ 'Description' => description,
44
44
  })
45
45
  headers = Twilio::Values.of({'Token' => token, })
46
46
 
@@ -0,0 +1,192 @@
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 Microvisor < Domain
12
+ class V1 < Version
13
+ class AppContext < InstanceContext
14
+ ##
15
+ # 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.
16
+ class AppManifestList < ListResource
17
+ ##
18
+ # Initialize the AppManifestList
19
+ # @param [Version] version Version that contains the resource
20
+ # @param [String] app_sid A 34-character string that uniquely identifies this App.
21
+ # @return [AppManifestList] AppManifestList
22
+ def initialize(version, app_sid: nil)
23
+ super(version)
24
+
25
+ # Path Solution
26
+ @solution = {app_sid: app_sid}
27
+ end
28
+
29
+ ##
30
+ # Provide a user friendly representation
31
+ def to_s
32
+ '#<Twilio.Microvisor.V1.AppManifestList>'
33
+ end
34
+ end
35
+
36
+ ##
37
+ # 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.
38
+ class AppManifestPage < Page
39
+ ##
40
+ # Initialize the AppManifestPage
41
+ # @param [Version] version Version that contains the resource
42
+ # @param [Response] response Response from the API
43
+ # @param [Hash] solution Path solution for the resource
44
+ # @return [AppManifestPage] AppManifestPage
45
+ def initialize(version, response, solution)
46
+ super(version, response)
47
+
48
+ # Path Solution
49
+ @solution = solution
50
+ end
51
+
52
+ ##
53
+ # Build an instance of AppManifestInstance
54
+ # @param [Hash] payload Payload response from the API
55
+ # @return [AppManifestInstance] AppManifestInstance
56
+ def get_instance(payload)
57
+ AppManifestInstance.new(@version, payload, app_sid: @solution[:app_sid], )
58
+ end
59
+
60
+ ##
61
+ # Provide a user friendly representation
62
+ def to_s
63
+ '<Twilio.Microvisor.V1.AppManifestPage>'
64
+ end
65
+ end
66
+
67
+ ##
68
+ # 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.
69
+ class AppManifestContext < InstanceContext
70
+ ##
71
+ # Initialize the AppManifestContext
72
+ # @param [Version] version Version that contains the resource
73
+ # @param [String] app_sid A 34-character string that uniquely identifies this App.
74
+ # @return [AppManifestContext] AppManifestContext
75
+ def initialize(version, app_sid)
76
+ super(version)
77
+
78
+ # Path Solution
79
+ @solution = {app_sid: app_sid, }
80
+ @uri = "/Apps/#{@solution[:app_sid]}/Manifest"
81
+ end
82
+
83
+ ##
84
+ # Fetch the AppManifestInstance
85
+ # @return [AppManifestInstance] Fetched AppManifestInstance
86
+ def fetch
87
+ payload = @version.fetch('GET', @uri)
88
+
89
+ AppManifestInstance.new(@version, payload, app_sid: @solution[:app_sid], )
90
+ end
91
+
92
+ ##
93
+ # Provide a user friendly representation
94
+ def to_s
95
+ context = @solution.map {|k, v| "#{k}: #{v}"}.join(',')
96
+ "#<Twilio.Microvisor.V1.AppManifestContext #{context}>"
97
+ end
98
+
99
+ ##
100
+ # Provide a detailed, user friendly representation
101
+ def inspect
102
+ context = @solution.map {|k, v| "#{k}: #{v}"}.join(',')
103
+ "#<Twilio.Microvisor.V1.AppManifestContext #{context}>"
104
+ end
105
+ end
106
+
107
+ ##
108
+ # 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.
109
+ class AppManifestInstance < InstanceResource
110
+ ##
111
+ # Initialize the AppManifestInstance
112
+ # @param [Version] version Version that contains the resource
113
+ # @param [Hash] payload payload that contains response from Twilio
114
+ # @param [String] app_sid A 34-character string that uniquely identifies this App.
115
+ # @return [AppManifestInstance] AppManifestInstance
116
+ def initialize(version, payload, app_sid: nil)
117
+ super(version)
118
+
119
+ # Marshaled Properties
120
+ @properties = {
121
+ 'app_sid' => payload['app_sid'],
122
+ 'hash' => payload['hash'],
123
+ 'encoded_bytes' => payload['encoded_bytes'],
124
+ 'url' => payload['url'],
125
+ }
126
+
127
+ # Context
128
+ @instance_context = nil
129
+ @params = {'app_sid' => app_sid, }
130
+ end
131
+
132
+ ##
133
+ # Generate an instance context for the instance, the context is capable of
134
+ # performing various actions. All instance actions are proxied to the context
135
+ # @return [AppManifestContext] AppManifestContext for this AppManifestInstance
136
+ def context
137
+ unless @instance_context
138
+ @instance_context = AppManifestContext.new(@version, @params['app_sid'], )
139
+ end
140
+ @instance_context
141
+ end
142
+
143
+ ##
144
+ # @return [String] A string that uniquely identifies this App.
145
+ def app_sid
146
+ @properties['app_sid']
147
+ end
148
+
149
+ ##
150
+ # @return [String] App manifest hash represented as hash_algorithm:hash_value.
151
+ def hash
152
+ @properties['hash']
153
+ end
154
+
155
+ ##
156
+ # @return [String] The base-64 encoded manifest
157
+ def encoded_bytes
158
+ @properties['encoded_bytes']
159
+ end
160
+
161
+ ##
162
+ # @return [String] The absolute URL of this Manifest.
163
+ def url
164
+ @properties['url']
165
+ end
166
+
167
+ ##
168
+ # Fetch the AppManifestInstance
169
+ # @return [AppManifestInstance] Fetched AppManifestInstance
170
+ def fetch
171
+ context.fetch
172
+ end
173
+
174
+ ##
175
+ # Provide a user friendly representation
176
+ def to_s
177
+ values = @params.map{|k, v| "#{k}: #{v}"}.join(" ")
178
+ "<Twilio.Microvisor.V1.AppManifestInstance #{values}>"
179
+ end
180
+
181
+ ##
182
+ # Provide a detailed, user friendly representation
183
+ def inspect
184
+ values = @properties.map{|k, v| "#{k}: #{v}"}.join(" ")
185
+ "<Twilio.Microvisor.V1.AppManifestInstance #{values}>"
186
+ end
187
+ end
188
+ end
189
+ end
190
+ end
191
+ end
192
+ end
@@ -157,6 +157,9 @@ module Twilio
157
157
  # Path Solution
158
158
  @solution = {sid: sid, }
159
159
  @uri = "/Apps/#{@solution[:sid]}"
160
+
161
+ # Dependents
162
+ @app_manifests = nil
160
163
  end
161
164
 
162
165
  ##
@@ -175,6 +178,14 @@ module Twilio
175
178
  @version.delete('DELETE', @uri)
176
179
  end
177
180
 
181
+ ##
182
+ # Access the app_manifests
183
+ # @return [AppManifestList]
184
+ # @return [AppManifestContext]
185
+ def app_manifests
186
+ AppManifestContext.new(@version, @solution[:sid], )
187
+ end
188
+
178
189
  ##
179
190
  # Provide a user friendly representation
180
191
  def to_s
@@ -211,6 +222,7 @@ module Twilio
211
222
  'date_created' => Twilio.deserialize_iso8601_datetime(payload['date_created']),
212
223
  'date_updated' => Twilio.deserialize_iso8601_datetime(payload['date_updated']),
213
224
  'url' => payload['url'],
225
+ 'links' => payload['links'],
214
226
  }
215
227
 
216
228
  # Context
@@ -271,6 +283,12 @@ module Twilio
271
283
  @properties['url']
272
284
  end
273
285
 
286
+ ##
287
+ # @return [String] The links
288
+ def links
289
+ @properties['links']
290
+ end
291
+
274
292
  ##
275
293
  # Fetch the AppInstance
276
294
  # @return [AppInstance] Fetched AppInstance
@@ -285,6 +303,13 @@ module Twilio
285
303
  context.delete
286
304
  end
287
305
 
306
+ ##
307
+ # Access the app_manifests
308
+ # @return [app_manifests] app_manifests
309
+ def app_manifests
310
+ context.app_manifests
311
+ end
312
+
288
313
  ##
289
314
  # Provide a user friendly representation
290
315
  def to_s
@@ -33,12 +33,18 @@ module Twilio
33
33
  # resource changes from `reserving` to `available`.
34
34
  # @param [String] callback_method The HTTP method we should use to call
35
35
  # `callback_url`. Can be: `GET` or `POST` and the default is POST.
36
+ # @param [Boolean] generate_matching_id When set to `true`, a value for `Eid` does
37
+ # not need to be provided. Instead, when the eSIM profile is reserved, a matching
38
+ # ID will be generated and returned via the `matching_id` property. This
39
+ # identifies the specific eSIM profile that can be used by any capable device to
40
+ # claim and download the profile.
36
41
  # @param [String] eid Identifier of the eUICC that will claim the eSIM Profile.
37
42
  # @return [EsimProfileInstance] Created EsimProfileInstance
38
- def create(callback_url: :unset, callback_method: :unset, eid: :unset)
43
+ def create(callback_url: :unset, callback_method: :unset, generate_matching_id: :unset, eid: :unset)
39
44
  data = Twilio::Values.of({
40
45
  'CallbackUrl' => callback_url,
41
46
  'CallbackMethod' => callback_method,
47
+ 'GenerateMatchingId' => generate_matching_id,
42
48
  'Eid' => eid,
43
49
  })
44
50
 
@@ -250,6 +256,8 @@ module Twilio
250
256
  'status' => payload['status'],
251
257
  'eid' => payload['eid'],
252
258
  'smdp_plus_address' => payload['smdp_plus_address'],
259
+ 'matching_id' => payload['matching_id'],
260
+ 'activation_code' => payload['activation_code'],
253
261
  'error_code' => payload['error_code'],
254
262
  'error_message' => payload['error_message'],
255
263
  'date_created' => Twilio.deserialize_iso8601_datetime(payload['date_created']),
@@ -315,6 +323,18 @@ module Twilio
315
323
  @properties['smdp_plus_address']
316
324
  end
317
325
 
326
+ ##
327
+ # @return [String] Unique identifier of the eSIM profile that be used to identify and download the eSIM profile
328
+ def matching_id
329
+ @properties['matching_id']
330
+ end
331
+
332
+ ##
333
+ # @return [String] Combined machine-readable activation code for acquiring an eSIM Profile with the Activation Code download method
334
+ def activation_code
335
+ @properties['activation_code']
336
+ end
337
+
318
338
  ##
319
339
  # @return [String] Code indicating the failure if the download of the SIM Profile failed and the eSIM Profile is in `failed` state
320
340
  def error_code
@@ -1,3 +1,3 @@
1
1
  module Twilio
2
- VERSION = '5.74.4'
2
+ VERSION = '5.74.5'
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.74.4
4
+ version: 5.74.5
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-02-22 00:00:00.000000000 Z
11
+ date: 2023-03-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: jwt
@@ -519,6 +519,7 @@ files:
519
519
  - lib/twilio-ruby/rest/microvisor/v1/account_config.rb
520
520
  - lib/twilio-ruby/rest/microvisor/v1/account_secret.rb
521
521
  - lib/twilio-ruby/rest/microvisor/v1/app.rb
522
+ - lib/twilio-ruby/rest/microvisor/v1/app/app_manifest.rb
522
523
  - lib/twilio-ruby/rest/microvisor/v1/device.rb
523
524
  - lib/twilio-ruby/rest/microvisor/v1/device/device_config.rb
524
525
  - lib/twilio-ruby/rest/microvisor/v1/device/device_secret.rb