twilio-ruby 7.0.0.pre.rc.1 → 7.0.0.pre.rc.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (35) hide show
  1. checksums.yaml +4 -4
  2. data/.github/workflows/test-and-deploy.yml +9 -9
  3. data/CHANGES.md +40 -0
  4. data/README.md +2 -2
  5. data/lib/twilio-ruby/rest/api/v2010/account/call.rb +1 -34
  6. data/lib/twilio-ruby/rest/api/v2010/account/message.rb +2 -2
  7. data/lib/twilio-ruby/rest/flex_api/v1/configuration.rb +10 -5
  8. data/lib/twilio-ruby/rest/flex_api/v1/interaction/interaction_channel/interaction_channel_participant.rb +11 -1
  9. data/lib/twilio-ruby/rest/flex_api/v1/plugin/plugin_versions.rb +384 -0
  10. data/lib/twilio-ruby/rest/flex_api/v1/plugin.rb +446 -0
  11. data/lib/twilio-ruby/rest/flex_api/v1/plugin_archive.rb +247 -0
  12. data/lib/twilio-ruby/rest/flex_api/v1/plugin_configuration/configured_plugin.rb +393 -0
  13. data/lib/twilio-ruby/rest/flex_api/v1/plugin_configuration.rb +386 -0
  14. data/lib/twilio-ruby/rest/flex_api/v1/plugin_configuration_archive.rb +233 -0
  15. data/lib/twilio-ruby/rest/flex_api/v1/plugin_release.rb +332 -0
  16. data/lib/twilio-ruby/rest/flex_api/v1/plugin_version_archive.rb +256 -0
  17. data/lib/twilio-ruby/rest/flex_api/v1.rb +112 -30
  18. data/lib/twilio-ruby/rest/lookups/v1/phone_number.rb +1 -1
  19. data/lib/twilio-ruby/rest/lookups/v2/phone_number.rb +6 -6
  20. data/lib/twilio-ruby/rest/messaging/v1/brand_registration.rb +9 -2
  21. data/lib/twilio-ruby/rest/messaging/v1/tollfree_verification.rb +11 -4
  22. data/lib/twilio-ruby/rest/numbers/v1/bulk_eligibility.rb +5 -3
  23. data/lib/twilio-ruby/rest/numbers/v1/eligibility.rb +5 -3
  24. data/lib/twilio-ruby/rest/numbers/v1/porting_port_in.rb +5 -3
  25. data/lib/twilio-ruby/rest/numbers/v1.rb +3 -3
  26. data/lib/twilio-ruby/rest/numbers/v2/bulk_hosted_number_order.rb +5 -3
  27. data/lib/twilio-ruby/rest/taskrouter/v1/workspace/task_queue/task_queue_bulk_real_time_statistics.rb +5 -3
  28. data/lib/twilio-ruby/rest/trusthub/v1/compliance_registration_inquiries.rb +26 -2
  29. data/lib/twilio-ruby/twiml/messaging_response.rb +1 -1
  30. data/lib/twilio-ruby/version.rb +1 -1
  31. metadata +10 -6
  32. data/lib/twilio-ruby/rest/api/v2010/account/call/feedback.rb +0 -267
  33. data/lib/twilio-ruby/rest/api/v2010/account/call/feedback_summary.rb +0 -332
  34. data/lib/twilio-ruby/rest/flex_api/v1/insights_conversational_ai.rb +0 -274
  35. data/lib/twilio-ruby/rest/flex_api/v1/insights_conversational_ai_report_insights.rb +0 -253
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 4fc04f5b7e8b5662f2660255ab69debcd88c9f1e
4
- data.tar.gz: 69d9201155d5a0d86e22533cb3bf60e27ea6c752
3
+ metadata.gz: 1730c85dbb2c0da063c2c73ea90bc28b87fb5015
4
+ data.tar.gz: 70485b2a857f7076f8c2d05c4c4a43286688392c
5
5
  SHA512:
6
- metadata.gz: a8d2466da6a059765419f9856bec82da8827c94cf0528f49673ec67f99eedea66faf555f22e9ef9f2272bc95c7ab39027d68b23eea661916cf2a1a8badf91189
7
- data.tar.gz: fd3ad8841cefd637f7b63e9a46043a02766c48a5d2e6ea91617449d5c497ff4bfdeab2c748c63d7d713c20d6f954228fe6a54bf093174f2bae61ac7450517934
6
+ metadata.gz: abbb783d2713dc054fcb827acdbf12a772764d0bcfff66432033c9eaedb6a60750986ae1afcf43164f653130e51df07976d49f9943632cad5c9e472a190c53ec
7
+ data.tar.gz: 8cfbd2b13dad2fe85106abdb37cbded08d7828e961d9e2f87782240f11c75101fa39031a7b5a4ff4284d8b0fff9dc139f622c3e28144cc8afcfdf7ef4e8a4039
@@ -45,15 +45,15 @@ jobs:
45
45
  - name: Run Unit Tests
46
46
  run: make test
47
47
 
48
- # - name: Run Cluster Test
49
- # if: (!github.event.pull_request.head.repo.fork)
50
- # env:
51
- # TWILIO_ACCOUNT_SID: ${{ secrets.TWILIO_ACCOUNT_SID }}
52
- # TWILIO_API_KEY: ${{ secrets.TWILIO_CLUSTER_TEST_API_KEY}}
53
- # TWILIO_API_SECRET: ${{ secrets.TWILIO_CLUSTER_TEST_API_KEY_SECRET }}
54
- # TWILIO_FROM_NUMBER: ${{ secrets.TWILIO_FROM_NUMBER }}
55
- # TWILIO_TO_NUMBER: ${{ secrets.TWILIO_TO_NUMBER }}
56
- # run: make cluster-test
48
+ - name: Run Cluster Test
49
+ if: (!github.event.pull_request.head.repo.fork)
50
+ env:
51
+ TWILIO_ACCOUNT_SID: ${{ secrets.TWILIO_ACCOUNT_SID }}
52
+ TWILIO_API_KEY: ${{ secrets.TWILIO_CLUSTER_TEST_API_KEY}}
53
+ TWILIO_API_SECRET: ${{ secrets.TWILIO_CLUSTER_TEST_API_KEY_SECRET }}
54
+ TWILIO_FROM_NUMBER: ${{ secrets.TWILIO_FROM_NUMBER }}
55
+ TWILIO_TO_NUMBER: ${{ secrets.TWILIO_TO_NUMBER }}
56
+ run: make cluster-test
57
57
 
58
58
  - name: Fix code coverage paths
59
59
  if: ${{ (github.event_name == 'pull_request' || github.ref_type == 'branch') && matrix.ruby == '3.0' && !github.event.pull_request.head.repo.fork }}
data/CHANGES.md CHANGED
@@ -2,6 +2,46 @@ twilio-ruby changelog
2
2
  =====================
3
3
 
4
4
 
5
+ [2024-03-12] Version 7.0.0-rc.2
6
+ -------------------------------
7
+ **Library - Chore**
8
+ - [PR #714](https://github.com/twilio/twilio-ruby/pull/714): enable cluster test. Thanks to [@tiwarishubham635](https://github.com/tiwarishubham635)!
9
+
10
+ **Api**
11
+ - Correct precedence documentation for application_sid vs status_callback in message creation
12
+ - Mark MaxPrice as deprecated
13
+ - remove feedback and feedback summary from call resource
14
+
15
+ **Flex**
16
+ - Making `plugins` visibility to public
17
+ - Adding `routing_properties` to Interactions Channels Participant
18
+
19
+ **Lookups**
20
+ - Add new `line_status` package to the lookup response
21
+ - Remove `live_activity` package from the lookup response **(breaking change)**
22
+
23
+ **Messaging**
24
+ - Add new `errors` attribute to the Brand Registration resource.
25
+ - Mark `brand_feedback` attribute as deprecated.
26
+ - Mark `failure_reason` attribute as deprecated.
27
+ - The new `errors` attribute is expected to provide additional information about Brand registration failures and feedback (if any has been provided by The Campaign Registry). Consumers should use this attribute instead of `brand_feedback` and `failure_reason`.
28
+ - Add tollfree multiple rejection reasons response array
29
+
30
+ **Numbers**
31
+ - Correcting mount_name for porting port in fetch API
32
+
33
+ **Trusthub**
34
+ - Add new field in statusCallbackUrl in compliance_registration.
35
+ - Add new field in isvRegisteringForSelfOrTenant in compliance_registration.
36
+ - Add ENUM for businessRegistrationAuthority in compliance_registration. **(breaking change)**
37
+ - Add new field in isIsvEmbed in compliance_registration.
38
+ - Add additional optional fields in compliance_registration for Individual business type.
39
+
40
+ **Twiml**
41
+ - Expanded description of Action parameter for Message verb
42
+ - Add support for new Amazon Polly and Google voices (Q1 2024) for `Say` verb
43
+
44
+
5
45
  [2024-02-09] Version 7.0.0-rc.1
6
46
  -------------------------------
7
47
  **Library - Chore**
data/README.md CHANGED
@@ -39,13 +39,13 @@ This library supports the following Ruby implementations:
39
39
  To install using [Bundler][bundler] grab the latest stable version:
40
40
 
41
41
  ```ruby
42
- gem 'twilio-ruby', '~> 7.0.0-rc.1'
42
+ gem 'twilio-ruby', '~> 7.0.0-rc.2'
43
43
  ```
44
44
 
45
45
  To manually install `twilio-ruby` via [Rubygems][rubygems] simply gem install:
46
46
 
47
47
  ```bash
48
- gem install twilio-ruby -v 7.0.0-rc.1
48
+ gem install twilio-ruby -v 7.0.0-rc.2
49
49
  ```
50
50
 
51
51
  To build and install the development branch yourself from the latest source:
@@ -30,8 +30,7 @@ module Twilio
30
30
  # Path Solution
31
31
  @solution = { account_sid: account_sid }
32
32
  @uri = "/Accounts/#{@solution[:account_sid]}/Calls.json"
33
- # Components
34
- @feedback_summaries = nil
33
+
35
34
  end
36
35
  ##
37
36
  # Create the CallInstance
@@ -278,19 +277,6 @@ module Twilio
278
277
  end
279
278
 
280
279
 
281
- ##
282
- # Access the feedback_summaries
283
- # @return [FeedbackSummaryList]
284
- # @return [FeedbackSummaryContext] if sid was passed.
285
- def feedback_summaries(sid=:unset)
286
- raise ArgumentError, 'sid cannot be nil' if sid.nil?
287
-
288
- if sid != :unset
289
- return FeedbackSummaryContext.new(@version, @solution[:account_sid],sid )
290
- end
291
-
292
- @feedback_summaries ||= FeedbackSummaryList.new(@version, account_sid: @solution[:account_sid] )
293
- end
294
280
 
295
281
  # Provide a user friendly representation
296
282
  def to_s
@@ -321,7 +307,6 @@ module Twilio
321
307
  @payments = nil
322
308
  @recordings = nil
323
309
  @notifications = nil
324
- @feedback = nil
325
310
  @streams = nil
326
311
  end
327
312
  ##
@@ -512,17 +497,6 @@ module Twilio
512
497
  @notifications
513
498
  end
514
499
  ##
515
- # Access the feedback
516
- # @return [FeedbackList]
517
- # @return [FeedbackContext]
518
- def feedback
519
- FeedbackContext.new(
520
- @version,
521
- @solution[:account_sid],
522
- @solution[:sid]
523
- )
524
- end
525
- ##
526
500
  # Access the streams
527
501
  # @return [StreamList]
528
502
  # @return [StreamContext] if sid was passed.
@@ -902,13 +876,6 @@ module Twilio
902
876
  context.notifications
903
877
  end
904
878
 
905
- ##
906
- # Access the feedback
907
- # @return [feedback] feedback
908
- def feedback
909
- context.feedback
910
- end
911
-
912
879
  ##
913
880
  # Access the streams
914
881
  # @return [streams] streams
@@ -36,8 +36,8 @@ module Twilio
36
36
  # Create the MessageInstance
37
37
  # @param [String] to The recipient's phone number in [E.164](https://www.twilio.com/docs/glossary/what-e164) format (for SMS/MMS) or [channel address](https://www.twilio.com/docs/messaging/channels), e.g. `whatsapp:+15552229999`.
38
38
  # @param [String] status_callback The URL of the endpoint to which Twilio sends [Message status callback requests](https://www.twilio.com/docs/sms/api/message-resource#twilios-request-to-the-statuscallback-url). URL must contain a valid hostname and underscores are not allowed. If you include this parameter with the `messaging_service_sid`, Twilio uses this URL instead of the Status Callback URL of the [Messaging Service](https://www.twilio.com/docs/messaging/api/service-resource).
39
- # @param [String] application_sid The SID of the associated [TwiML Application](https://www.twilio.com/docs/usage/api/applications). If this parameter is provided, the `status_callback` parameter of this request is ignored; [Message status callback requests](https://www.twilio.com/docs/sms/api/message-resource#twilios-request-to-the-statuscallback-url) are sent to the TwiML App's `message_status_callback` URL.
40
- # @param [Float] max_price The maximum price in US dollars that you are willing to pay for this Message's delivery. The value can have up to four decimal places. When the `max_price` parameter is provided, the cost of a message is checked before it is sent. If the cost exceeds `max_price`, the message is not sent and the Message `status` is `failed`.
39
+ # @param [String] application_sid The SID of the associated [TwiML Application](https://www.twilio.com/docs/usage/api/applications). [Message status callback requests](https://www.twilio.com/docs/sms/api/message-resource#twilios-request-to-the-statuscallback-url) are sent to the TwiML App's `message_status_callback` URL. Note that the `status_callback` parameter of a request takes priority over the `application_sid` parameter; if both are included `application_sid` is ignored.
40
+ # @param [Float] max_price [DEPRECATED] This parameter will no longer have any effect as of 2024-06-03.
41
41
  # @param [Boolean] provide_feedback Boolean indicating whether or not you intend to provide delivery confirmation feedback to Twilio (used in conjunction with the [Message Feedback subresource](https://www.twilio.com/docs/sms/api/message-feedback-resource)). Default value is `false`.
42
42
  # @param [String] attempt Total number of attempts made (including this request) to send the message regardless of the provider used
43
43
  # @param [String] validity_period The maximum length in seconds that the Message can remain in Twilio's outgoing message queue. If a queued Message exceeds the `validity_period`, the Message is not sent. Accepted values are integers from `1` to `14400`. Default value is `14400`. A `validity_period` greater than `5` is recommended. [Learn more about the validity period](https://www.twilio.com/blog/take-more-control-of-outbound-messages-using-validity-period-html)
@@ -75,11 +75,13 @@ module Twilio
75
75
 
76
76
  ##
77
77
  # Update the ConfigurationInstance
78
+ # @param [Object] body
78
79
  # @return [ConfigurationInstance] Updated ConfigurationInstance
79
- def update
80
+ def update(body: :unset
81
+ )
80
82
 
81
-
82
- payload = @version.update('POST', @uri)
83
+ headers = Twilio::Values.of({"Content-Type"=> "application/json"})
84
+ payload = @version.update('POST', @uri, data: body.to_json, headers: headers)
83
85
  ConfigurationInstance.new(
84
86
  @version,
85
87
  payload,
@@ -521,10 +523,13 @@ module Twilio
521
523
 
522
524
  ##
523
525
  # Update the ConfigurationInstance
526
+ # @param [Object] body
524
527
  # @return [ConfigurationInstance] Updated ConfigurationInstance
525
- def update
528
+ def update(body: :unset
529
+ )
526
530
 
527
- context.update
531
+ context.update(
532
+ )
528
533
  end
529
534
 
530
535
  ##
@@ -37,15 +37,18 @@ module Twilio
37
37
  # Create the InteractionChannelParticipantInstance
38
38
  # @param [Type] type
39
39
  # @param [Object] media_properties JSON representing the Media Properties for the new Participant.
40
+ # @param [Object] routing_properties Object representing the Routing Properties for the new Participant.
40
41
  # @return [InteractionChannelParticipantInstance] Created InteractionChannelParticipantInstance
41
42
  def create(
42
43
  type: nil,
43
- media_properties: nil
44
+ media_properties: nil,
45
+ routing_properties: :unset
44
46
  )
45
47
 
46
48
  data = Twilio::Values.of({
47
49
  'Type' => type,
48
50
  'MediaProperties' => Twilio.serialize_object(media_properties),
51
+ 'RoutingProperties' => Twilio.serialize_object(routing_properties),
49
52
  })
50
53
 
51
54
 
@@ -256,6 +259,7 @@ module Twilio
256
259
  'interaction_sid' => payload['interaction_sid'],
257
260
  'channel_sid' => payload['channel_sid'],
258
261
  'url' => payload['url'],
262
+ 'routing_properties' => payload['routing_properties'],
259
263
  }
260
264
 
261
265
  # Context
@@ -304,6 +308,12 @@ module Twilio
304
308
  @properties['url']
305
309
  end
306
310
 
311
+ ##
312
+ # @return [Hash] The Participant's routing properties.
313
+ def routing_properties
314
+ @properties['routing_properties']
315
+ end
316
+
307
317
  ##
308
318
  # Update the InteractionChannelParticipantInstance
309
319
  # @param [Status] status
@@ -0,0 +1,384 @@
1
+ ##
2
+ # This code was generated by
3
+ # ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
4
+ # | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
5
+ # | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
6
+ #
7
+ # Twilio - Flex
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 FlexApi < FlexApiBase
19
+ class V1 < Version
20
+ class PluginContext < InstanceContext
21
+
22
+ class PluginVersionsList < ListResource
23
+
24
+ ##
25
+ # Initialize the PluginVersionsList
26
+ # @param [Version] version Version that contains the resource
27
+ # @return [PluginVersionsList] PluginVersionsList
28
+ def initialize(version, plugin_sid: nil)
29
+ super(version)
30
+ # Path Solution
31
+ @solution = { plugin_sid: plugin_sid }
32
+ @uri = "/PluginService/Plugins/#{@solution[:plugin_sid]}/Versions"
33
+
34
+ end
35
+ ##
36
+ # Create the PluginVersionsInstance
37
+ # @param [String] version The Flex Plugin Version's version.
38
+ # @param [String] plugin_url The URL of the Flex Plugin Version bundle
39
+ # @param [String] changelog The changelog of the Flex Plugin Version.
40
+ # @param [Boolean] private Whether this Flex Plugin Version requires authorization.
41
+ # @param [String] flex_metadata The Flex-Metadata HTTP request header
42
+ # @return [PluginVersionsInstance] Created PluginVersionsInstance
43
+ def create(
44
+ version: nil,
45
+ plugin_url: nil,
46
+ changelog: :unset,
47
+ private: :unset,
48
+ flex_metadata: :unset
49
+ )
50
+
51
+ data = Twilio::Values.of({
52
+ 'Version' => version,
53
+ 'PluginUrl' => plugin_url,
54
+ 'Changelog' => changelog,
55
+ 'Private' => private,
56
+ })
57
+
58
+
59
+ headers = Twilio::Values.of({ 'Flex-Metadata' => flex_metadata, })
60
+ payload = @version.create('POST', @uri, data: data, headers: headers)
61
+ PluginVersionsInstance.new(
62
+ @version,
63
+ payload,
64
+ plugin_sid: @solution[:plugin_sid],
65
+ )
66
+ end
67
+
68
+
69
+ ##
70
+ # Lists PluginVersionsInstance records from the API as a list.
71
+ # Unlike stream(), this operation is eager and will load `limit` records into
72
+ # memory before returning.
73
+ # @param [String] flex_metadata The Flex-Metadata HTTP request header
74
+ # @param [Integer] limit Upper limit for the number of records to return. stream()
75
+ # guarantees to never return more than limit. Default is no limit
76
+ # @param [Integer] page_size Number of records to fetch per request, when
77
+ # not set will use the default value of 50 records. If no page_size is defined
78
+ # but a limit is defined, stream() will attempt to read the limit with the most
79
+ # efficient page size, i.e. min(limit, 1000)
80
+ # @return [Array] Array of up to limit results
81
+ def list(flex_metadata: :unset, limit: nil, page_size: nil)
82
+ self.stream(
83
+ flex_metadata: flex_metadata,
84
+ limit: limit,
85
+ page_size: page_size
86
+ ).entries
87
+ end
88
+
89
+ ##
90
+ # Streams Instance records from the API as an Enumerable.
91
+ # This operation lazily loads records as efficiently as possible until the limit
92
+ # is reached.
93
+ # @param [String] flex_metadata The Flex-Metadata HTTP request header
94
+ # @param [Integer] limit Upper limit for the number of records to return. stream()
95
+ # guarantees to never return more than limit. Default is no limit
96
+ # @param [Integer] page_size Number of records to fetch per request, when
97
+ # not set will use the default value of 50 records. If no page_size is defined
98
+ # but a limit is defined, stream() will attempt to read the limit with the most
99
+ # efficient page size, i.e. min(limit, 1000)
100
+ # @return [Enumerable] Enumerable that will yield up to limit results
101
+ def stream(flex_metadata: :unset, limit: nil, page_size: nil)
102
+ limits = @version.read_limits(limit, page_size)
103
+
104
+ page = self.page(
105
+ flex_metadata: flex_metadata,
106
+ page_size: limits[:page_size], )
107
+
108
+ @version.stream(page, limit: limits[:limit], page_limit: limits[:page_limit])
109
+ end
110
+
111
+ ##
112
+ # When passed a block, yields PluginVersionsInstance records from the API.
113
+ # This operation lazily loads records as efficiently as possible until the limit
114
+ # is reached.
115
+ def each
116
+ limits = @version.read_limits
117
+
118
+ page = self.page(page_size: limits[:page_size], )
119
+
120
+ @version.stream(page,
121
+ limit: limits[:limit],
122
+ page_limit: limits[:page_limit]).each {|x| yield x}
123
+ end
124
+
125
+ ##
126
+ # Retrieve a single page of PluginVersionsInstance records from the API.
127
+ # Request is executed immediately.
128
+ # @param [String] flex_metadata The Flex-Metadata HTTP request header
129
+ # @param [String] page_token PageToken provided by the API
130
+ # @param [Integer] page_number Page Number, this value is simply for client state
131
+ # @param [Integer] page_size Number of records to return, defaults to 50
132
+ # @return [Page] Page of PluginVersionsInstance
133
+ def page(flex_metadata: :unset, page_token: :unset, page_number: :unset, page_size: :unset)
134
+ params = Twilio::Values.of({
135
+ 'Flex-Metadata' => flex_metadata,
136
+ 'PageToken' => page_token,
137
+ 'Page' => page_number,
138
+ 'PageSize' => page_size,
139
+ })
140
+
141
+ response = @version.page('GET', @uri, params: params)
142
+
143
+ PluginVersionsPage.new(@version, response, @solution)
144
+ end
145
+
146
+ ##
147
+ # Retrieve a single page of PluginVersionsInstance records from the API.
148
+ # Request is executed immediately.
149
+ # @param [String] target_url API-generated URL for the requested results page
150
+ # @return [Page] Page of PluginVersionsInstance
151
+ def get_page(target_url)
152
+ response = @version.domain.request(
153
+ 'GET',
154
+ target_url
155
+ )
156
+ PluginVersionsPage.new(@version, response, @solution)
157
+ end
158
+
159
+
160
+
161
+ # Provide a user friendly representation
162
+ def to_s
163
+ '#<Twilio.FlexApi.V1.PluginVersionsList>'
164
+ end
165
+ end
166
+
167
+
168
+ class PluginVersionsContext < InstanceContext
169
+ ##
170
+ # Initialize the PluginVersionsContext
171
+ # @param [Version] version Version that contains the resource
172
+ # @param [String] plugin_sid The SID of the Flex Plugin the resource to belongs to.
173
+ # @param [String] sid The SID of the Flex Plugin Version resource to fetch.
174
+ # @return [PluginVersionsContext] PluginVersionsContext
175
+ def initialize(version, plugin_sid, sid)
176
+ super(version)
177
+
178
+ # Path Solution
179
+ @solution = { plugin_sid: plugin_sid, sid: sid, }
180
+ @uri = "/PluginService/Plugins/#{@solution[:plugin_sid]}/Versions/#{@solution[:sid]}"
181
+
182
+
183
+ end
184
+ ##
185
+ # Fetch the PluginVersionsInstance
186
+ # @param [String] flex_metadata The Flex-Metadata HTTP request header
187
+ # @return [PluginVersionsInstance] Fetched PluginVersionsInstance
188
+ def fetch(
189
+ flex_metadata: :unset
190
+ )
191
+
192
+
193
+ headers = Twilio::Values.of({ 'Flex-Metadata' => flex_metadata, })
194
+ payload = @version.fetch('GET', @uri, headers: headers)
195
+ PluginVersionsInstance.new(
196
+ @version,
197
+ payload,
198
+ plugin_sid: @solution[:plugin_sid],
199
+ sid: @solution[:sid],
200
+ )
201
+ end
202
+
203
+
204
+ ##
205
+ # Provide a user friendly representation
206
+ def to_s
207
+ context = @solution.map{|k, v| "#{k}: #{v}"}.join(',')
208
+ "#<Twilio.FlexApi.V1.PluginVersionsContext #{context}>"
209
+ end
210
+
211
+ ##
212
+ # Provide a detailed, user friendly representation
213
+ def inspect
214
+ context = @solution.map{|k, v| "#{k}: #{v}"}.join(',')
215
+ "#<Twilio.FlexApi.V1.PluginVersionsContext #{context}>"
216
+ end
217
+ end
218
+
219
+ class PluginVersionsPage < Page
220
+ ##
221
+ # Initialize the PluginVersionsPage
222
+ # @param [Version] version Version that contains the resource
223
+ # @param [Response] response Response from the API
224
+ # @param [Hash] solution Path solution for the resource
225
+ # @return [PluginVersionsPage] PluginVersionsPage
226
+ def initialize(version, response, solution)
227
+ super(version, response)
228
+
229
+ # Path Solution
230
+ @solution = solution
231
+ end
232
+
233
+ ##
234
+ # Build an instance of PluginVersionsInstance
235
+ # @param [Hash] payload Payload response from the API
236
+ # @return [PluginVersionsInstance] PluginVersionsInstance
237
+ def get_instance(payload)
238
+ PluginVersionsInstance.new(@version, payload, plugin_sid: @solution[:plugin_sid])
239
+ end
240
+
241
+ ##
242
+ # Provide a user friendly representation
243
+ def to_s
244
+ '<Twilio.FlexApi.V1.PluginVersionsPage>'
245
+ end
246
+ end
247
+ class PluginVersionsInstance < InstanceResource
248
+ ##
249
+ # Initialize the PluginVersionsInstance
250
+ # @param [Version] version Version that contains the resource
251
+ # @param [Hash] payload payload that contains response from Twilio
252
+ # @param [String] account_sid The SID of the
253
+ # {Account}[https://www.twilio.com/docs/iam/api/account] that created this PluginVersions
254
+ # resource.
255
+ # @param [String] sid The SID of the Call resource to fetch.
256
+ # @return [PluginVersionsInstance] PluginVersionsInstance
257
+ def initialize(version, payload , plugin_sid: nil, sid: nil)
258
+ super(version)
259
+
260
+ # Marshaled Properties
261
+ @properties = {
262
+ 'sid' => payload['sid'],
263
+ 'plugin_sid' => payload['plugin_sid'],
264
+ 'account_sid' => payload['account_sid'],
265
+ 'version' => payload['version'],
266
+ 'plugin_url' => payload['plugin_url'],
267
+ 'changelog' => payload['changelog'],
268
+ 'private' => payload['private'],
269
+ 'archived' => payload['archived'],
270
+ 'date_created' => Twilio.deserialize_iso8601_datetime(payload['date_created']),
271
+ 'url' => payload['url'],
272
+ }
273
+
274
+ # Context
275
+ @instance_context = nil
276
+ @params = { 'plugin_sid' => plugin_sid || @properties['plugin_sid'] ,'sid' => sid || @properties['sid'] , }
277
+ end
278
+
279
+ ##
280
+ # Generate an instance context for the instance, the context is capable of
281
+ # performing various actions. All instance actions are proxied to the context
282
+ # @return [PluginVersionsContext] CallContext for this CallInstance
283
+ def context
284
+ unless @instance_context
285
+ @instance_context = PluginVersionsContext.new(@version , @params['plugin_sid'], @params['sid'])
286
+ end
287
+ @instance_context
288
+ end
289
+
290
+ ##
291
+ # @return [String] The unique string that we created to identify the Flex Plugin Version resource.
292
+ def sid
293
+ @properties['sid']
294
+ end
295
+
296
+ ##
297
+ # @return [String] The SID of the Flex Plugin resource this Flex Plugin Version belongs to.
298
+ def plugin_sid
299
+ @properties['plugin_sid']
300
+ end
301
+
302
+ ##
303
+ # @return [String] The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Flex Plugin Version resource and owns this resource.
304
+ def account_sid
305
+ @properties['account_sid']
306
+ end
307
+
308
+ ##
309
+ # @return [String] The unique version of this Flex Plugin Version.
310
+ def version
311
+ @properties['version']
312
+ end
313
+
314
+ ##
315
+ # @return [String] The URL of where the Flex Plugin Version JavaScript bundle is hosted on.
316
+ def plugin_url
317
+ @properties['plugin_url']
318
+ end
319
+
320
+ ##
321
+ # @return [String] A changelog that describes the changes this Flex Plugin Version brings.
322
+ def changelog
323
+ @properties['changelog']
324
+ end
325
+
326
+ ##
327
+ # @return [Boolean] Whether to inject credentials while accessing this Plugin Version. The default value is false.
328
+ def private
329
+ @properties['private']
330
+ end
331
+
332
+ ##
333
+ # @return [Boolean] Whether the Flex Plugin Version is archived. The default value is false.
334
+ def archived
335
+ @properties['archived']
336
+ end
337
+
338
+ ##
339
+ # @return [Time] The date and time in GMT when the Flex Plugin Version was created specified in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.
340
+ def date_created
341
+ @properties['date_created']
342
+ end
343
+
344
+ ##
345
+ # @return [String] The absolute URL of the Flex Plugin Version resource.
346
+ def url
347
+ @properties['url']
348
+ end
349
+
350
+ ##
351
+ # Fetch the PluginVersionsInstance
352
+ # @param [String] flex_metadata The Flex-Metadata HTTP request header
353
+ # @return [PluginVersionsInstance] Fetched PluginVersionsInstance
354
+ def fetch(
355
+ flex_metadata: :unset
356
+ )
357
+
358
+ context.fetch(
359
+ flex_metadata: flex_metadata,
360
+ )
361
+ end
362
+
363
+ ##
364
+ # Provide a user friendly representation
365
+ def to_s
366
+ values = @params.map{|k, v| "#{k}: #{v}"}.join(" ")
367
+ "<Twilio.FlexApi.V1.PluginVersionsInstance #{values}>"
368
+ end
369
+
370
+ ##
371
+ # Provide a detailed, user friendly representation
372
+ def inspect
373
+ values = @properties.map{|k, v| "#{k}: #{v}"}.join(" ")
374
+ "<Twilio.FlexApi.V1.PluginVersionsInstance #{values}>"
375
+ end
376
+ end
377
+
378
+ end
379
+ end
380
+ end
381
+ end
382
+ end
383
+
384
+