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

Sign up to get free protection for your applications and to get access to all the features.
Files changed (155) hide show
  1. checksums.yaml +4 -4
  2. data/.github/workflows/test-and-deploy.yml +9 -9
  3. data/CHANGES.md +10 -57
  4. data/README.md +2 -2
  5. data/UPGRADE.md +10 -0
  6. data/lib/twilio-ruby/framework/request.rb +8 -1
  7. data/lib/twilio-ruby/http/http_client.rb +10 -3
  8. data/lib/twilio-ruby/rest/api/v2010/account/call/feedback.rb +267 -0
  9. data/lib/twilio-ruby/rest/api/v2010/account/call/feedback_summary.rb +332 -0
  10. data/lib/twilio-ruby/rest/api/v2010/account/call/payment.rb +0 -2
  11. data/lib/twilio-ruby/rest/api/v2010/account/call.rb +37 -28
  12. data/lib/twilio-ruby/rest/api/v2010/account/conference.rb +3 -27
  13. data/lib/twilio-ruby/rest/api/v2010/account/incoming_phone_number/assigned_add_on/assigned_add_on_extension.rb +0 -2
  14. data/lib/twilio-ruby/rest/api/v2010/account/incoming_phone_number/assigned_add_on.rb +0 -2
  15. data/lib/twilio-ruby/rest/api/v2010/account/message.rb +5 -17
  16. data/lib/twilio-ruby/rest/client.rb +5 -0
  17. data/lib/twilio-ruby/rest/content/v1/content/approval_create.rb +184 -0
  18. data/lib/twilio-ruby/rest/content/v1/content/approval_fetch.rb +0 -2
  19. data/lib/twilio-ruby/rest/content/v1/content.rb +363 -3
  20. data/lib/twilio-ruby/rest/content/v1/content_and_approvals.rb +1 -1
  21. data/lib/twilio-ruby/rest/content/v1/legacy_content.rb +1 -1
  22. data/lib/twilio-ruby/rest/flex_api/v1/assessments.rb +0 -2
  23. data/lib/twilio-ruby/rest/flex_api/v1/configuration.rb +21 -0
  24. data/lib/twilio-ruby/rest/flex_api/v1/insights_conversational_ai.rb +274 -0
  25. data/lib/twilio-ruby/rest/flex_api/v1/insights_conversational_ai_report_insights.rb +253 -0
  26. data/lib/twilio-ruby/rest/flex_api/v1/insights_questionnaires.rb +0 -2
  27. data/lib/twilio-ruby/rest/flex_api/v1/insights_questionnaires_category.rb +0 -2
  28. data/lib/twilio-ruby/rest/flex_api/v1/insights_questionnaires_question.rb +0 -2
  29. data/lib/twilio-ruby/rest/flex_api/v1/insights_session.rb +0 -2
  30. data/lib/twilio-ruby/rest/flex_api/v1/insights_user_roles.rb +0 -2
  31. data/lib/twilio-ruby/rest/flex_api/v1/interaction/interaction_channel/interaction_channel_participant.rb +1 -11
  32. data/lib/twilio-ruby/rest/flex_api/v1/provisioning_status.rb +0 -2
  33. data/lib/twilio-ruby/rest/flex_api/v1.rb +30 -112
  34. data/lib/twilio-ruby/rest/frontline_api/v1/user.rb +0 -2
  35. data/lib/twilio-ruby/rest/insights/v1/call/annotation.rb +0 -2
  36. data/lib/twilio-ruby/rest/insights/v1/room/participant.rb +0 -2
  37. data/lib/twilio-ruby/rest/insights/v1/room.rb +0 -2
  38. data/lib/twilio-ruby/rest/intelligence/v2/service.rb +0 -2
  39. data/lib/twilio-ruby/rest/intelligence/v2/transcript/media.rb +0 -2
  40. data/lib/twilio-ruby/rest/intelligence/v2/transcript/operator_result.rb +0 -2
  41. data/lib/twilio-ruby/rest/intelligence/v2/transcript.rb +0 -2
  42. data/lib/twilio-ruby/rest/lookups/v1/phone_number.rb +1 -1
  43. data/lib/twilio-ruby/rest/lookups/v2/phone_number.rb +6 -8
  44. data/lib/twilio-ruby/rest/media/v1/media_recording.rb +0 -2
  45. data/lib/twilio-ruby/rest/media.rb +32 -3
  46. data/lib/twilio-ruby/rest/messaging/v1/brand_registration/brand_vetting.rb +0 -2
  47. data/lib/twilio-ruby/rest/messaging/v1/brand_registration.rb +2 -11
  48. data/lib/twilio-ruby/rest/messaging/v1/domain_certs.rb +0 -2
  49. data/lib/twilio-ruby/rest/messaging/v1/domain_config.rb +0 -2
  50. data/lib/twilio-ruby/rest/messaging/v1/domain_config_messaging_service.rb +0 -2
  51. data/lib/twilio-ruby/rest/messaging/v1/linkshortening_messaging_service.rb +0 -2
  52. data/lib/twilio-ruby/rest/messaging/v1/linkshortening_messaging_service_domain_association.rb +0 -2
  53. data/lib/twilio-ruby/rest/messaging/v1/service/alpha_sender.rb +0 -2
  54. data/lib/twilio-ruby/rest/messaging/v1/service/channel_sender.rb +0 -2
  55. data/lib/twilio-ruby/rest/messaging/v1/service/phone_number.rb +0 -2
  56. data/lib/twilio-ruby/rest/messaging/v1/service/short_code.rb +0 -2
  57. data/lib/twilio-ruby/rest/messaging/v1/service/us_app_to_person.rb +0 -2
  58. data/lib/twilio-ruby/rest/messaging/v1/service.rb +0 -2
  59. data/lib/twilio-ruby/rest/messaging/v1/tollfree_verification.rb +4 -13
  60. data/lib/twilio-ruby/rest/microvisor/v1/account_config.rb +0 -2
  61. data/lib/twilio-ruby/rest/microvisor/v1/account_secret.rb +0 -2
  62. data/lib/twilio-ruby/rest/microvisor/v1/app/app_manifest.rb +0 -2
  63. data/lib/twilio-ruby/rest/microvisor/v1/app.rb +0 -2
  64. data/lib/twilio-ruby/rest/microvisor/v1/device/device_config.rb +0 -2
  65. data/lib/twilio-ruby/rest/microvisor/v1/device/device_secret.rb +0 -2
  66. data/lib/twilio-ruby/rest/microvisor/v1/device.rb +0 -2
  67. data/lib/twilio-ruby/rest/notify/v1/credential.rb +0 -2
  68. data/lib/twilio-ruby/rest/notify/v1/service/binding.rb +0 -2
  69. data/lib/twilio-ruby/rest/notify/v1/service.rb +0 -2
  70. data/lib/twilio-ruby/rest/numbers/v1/bulk_eligibility.rb +13 -2
  71. data/lib/twilio-ruby/rest/numbers/v1/eligibility.rb +125 -0
  72. data/lib/twilio-ruby/rest/numbers/v1/porting_bulk_portability.rb +0 -2
  73. data/lib/twilio-ruby/rest/numbers/v1/porting_port_in.rb +132 -0
  74. data/lib/twilio-ruby/rest/numbers/v1/porting_port_in_fetch.rb +0 -2
  75. data/lib/twilio-ruby/rest/numbers/v1/porting_portability.rb +0 -2
  76. data/lib/twilio-ruby/rest/numbers/v1.rb +15 -3
  77. data/lib/twilio-ruby/rest/numbers/v2/authorization_document.rb +0 -2
  78. data/lib/twilio-ruby/rest/numbers/v2/bulk_hosted_number_order.rb +13 -2
  79. data/lib/twilio-ruby/rest/numbers/v2/hosted_number_order.rb +0 -2
  80. data/lib/twilio-ruby/rest/numbers/v2/regulatory_compliance/bundle.rb +3 -15
  81. data/lib/twilio-ruby/rest/preview/deployed_devices/fleet/certificate.rb +0 -2
  82. data/lib/twilio-ruby/rest/preview/deployed_devices/fleet/deployment.rb +0 -2
  83. data/lib/twilio-ruby/rest/preview/deployed_devices/fleet/device.rb +0 -2
  84. data/lib/twilio-ruby/rest/preview/deployed_devices/fleet/key.rb +0 -2
  85. data/lib/twilio-ruby/rest/preview/deployed_devices/fleet.rb +0 -2
  86. data/lib/twilio-ruby/rest/preview/hosted_numbers/authorization_document.rb +0 -2
  87. data/lib/twilio-ruby/rest/preview/hosted_numbers/hosted_number_order.rb +0 -2
  88. data/lib/twilio-ruby/rest/preview/marketplace/available_add_on/available_add_on_extension.rb +0 -2
  89. data/lib/twilio-ruby/rest/preview/marketplace/available_add_on.rb +0 -2
  90. data/lib/twilio-ruby/rest/preview/marketplace/installed_add_on/installed_add_on_extension.rb +0 -2
  91. data/lib/twilio-ruby/rest/preview/marketplace/installed_add_on.rb +0 -2
  92. data/lib/twilio-ruby/rest/preview/sync/service/document/document_permission.rb +0 -2
  93. data/lib/twilio-ruby/rest/preview/sync/service/document.rb +0 -2
  94. data/lib/twilio-ruby/rest/preview/sync/service/sync_list/sync_list_item.rb +0 -2
  95. data/lib/twilio-ruby/rest/preview/sync/service/sync_list/sync_list_permission.rb +0 -2
  96. data/lib/twilio-ruby/rest/preview/sync/service/sync_list.rb +0 -2
  97. data/lib/twilio-ruby/rest/preview/sync/service/sync_map/sync_map_item.rb +0 -2
  98. data/lib/twilio-ruby/rest/preview/sync/service/sync_map/sync_map_permission.rb +0 -2
  99. data/lib/twilio-ruby/rest/preview/sync/service/sync_map.rb +0 -2
  100. data/lib/twilio-ruby/rest/preview/sync/service.rb +0 -2
  101. data/lib/twilio-ruby/rest/preview/wireless/command.rb +0 -2
  102. data/lib/twilio-ruby/rest/preview/wireless/rate_plan.rb +0 -2
  103. data/lib/twilio-ruby/rest/preview/wireless/sim/usage.rb +0 -2
  104. data/lib/twilio-ruby/rest/preview/wireless/sim.rb +0 -2
  105. data/lib/twilio-ruby/rest/preview_messaging/v1/broadcast.rb +164 -0
  106. data/lib/twilio-ruby/rest/preview_messaging/v1/message.rb +235 -0
  107. data/lib/twilio-ruby/rest/preview_messaging/v1.rb +46 -0
  108. data/lib/twilio-ruby/rest/preview_messaging.rb +12 -0
  109. data/lib/twilio-ruby/rest/preview_messaging_base.rb +38 -0
  110. data/lib/twilio-ruby/rest/proxy/v1/service/phone_number.rb +0 -2
  111. data/lib/twilio-ruby/rest/proxy/v1/service/session/interaction.rb +0 -2
  112. data/lib/twilio-ruby/rest/proxy/v1/service/session/participant/message_interaction.rb +0 -2
  113. data/lib/twilio-ruby/rest/proxy/v1/service/session/participant.rb +0 -2
  114. data/lib/twilio-ruby/rest/proxy/v1/service/session.rb +0 -2
  115. data/lib/twilio-ruby/rest/proxy/v1/service/short_code.rb +0 -2
  116. data/lib/twilio-ruby/rest/proxy/v1/service.rb +0 -2
  117. data/lib/twilio-ruby/rest/serverless/v1/service/asset/asset_version.rb +0 -2
  118. data/lib/twilio-ruby/rest/serverless/v1/service/asset.rb +0 -2
  119. data/lib/twilio-ruby/rest/serverless/v1/service/build/build_status.rb +0 -2
  120. data/lib/twilio-ruby/rest/serverless/v1/service/build.rb +0 -2
  121. data/lib/twilio-ruby/rest/serverless/v1/service/environment/deployment.rb +0 -2
  122. data/lib/twilio-ruby/rest/serverless/v1/service/environment/log.rb +0 -2
  123. data/lib/twilio-ruby/rest/serverless/v1/service/environment/variable.rb +0 -2
  124. data/lib/twilio-ruby/rest/serverless/v1/service/environment.rb +0 -2
  125. data/lib/twilio-ruby/rest/serverless/v1/service/function/function_version/function_version_content.rb +0 -2
  126. data/lib/twilio-ruby/rest/serverless/v1/service/function/function_version.rb +0 -2
  127. data/lib/twilio-ruby/rest/serverless/v1/service/function.rb +0 -2
  128. data/lib/twilio-ruby/rest/serverless/v1/service.rb +0 -2
  129. data/lib/twilio-ruby/rest/supersim/v1/esim_profile.rb +0 -2
  130. data/lib/twilio-ruby/rest/supersim/v1/fleet.rb +0 -2
  131. data/lib/twilio-ruby/rest/supersim/v1/ip_command.rb +0 -2
  132. data/lib/twilio-ruby/rest/supersim/v1/network.rb +0 -2
  133. data/lib/twilio-ruby/rest/supersim/v1/network_access_profile/network_access_profile_network.rb +0 -2
  134. data/lib/twilio-ruby/rest/supersim/v1/network_access_profile.rb +0 -2
  135. data/lib/twilio-ruby/rest/supersim/v1/sim.rb +0 -2
  136. data/lib/twilio-ruby/rest/supersim/v1/sms_command.rb +0 -2
  137. data/lib/twilio-ruby/rest/taskrouter/v1/workspace/task_queue/task_queue_bulk_real_time_statistics.rb +161 -0
  138. data/lib/twilio-ruby/rest/taskrouter/v1/workspace/task_queue.rb +8 -8
  139. data/lib/twilio-ruby/rest/trusthub/v1/compliance_registration_inquiries.rb +2 -26
  140. data/lib/twilio-ruby/rest/verify/v2/form.rb +0 -2
  141. data/lib/twilio-ruby/rest/verify/v2/safelist.rb +0 -2
  142. data/lib/twilio-ruby/rest/voice/v1/archived_call.rb +0 -2
  143. data/lib/twilio-ruby/rest/voice/v1/dialing_permissions/country.rb +0 -2
  144. data/lib/twilio-ruby/rest/voice/v1/dialing_permissions/settings.rb +0 -2
  145. data/lib/twilio-ruby/twiml/messaging_response.rb +1 -1
  146. data/lib/twilio-ruby/version.rb +1 -1
  147. metadata +17 -12
  148. data/lib/twilio-ruby/rest/flex_api/v1/plugin/plugin_versions.rb +0 -384
  149. data/lib/twilio-ruby/rest/flex_api/v1/plugin.rb +0 -446
  150. data/lib/twilio-ruby/rest/flex_api/v1/plugin_archive.rb +0 -247
  151. data/lib/twilio-ruby/rest/flex_api/v1/plugin_configuration/configured_plugin.rb +0 -393
  152. data/lib/twilio-ruby/rest/flex_api/v1/plugin_configuration.rb +0 -386
  153. data/lib/twilio-ruby/rest/flex_api/v1/plugin_configuration_archive.rb +0 -233
  154. data/lib/twilio-ruby/rest/flex_api/v1/plugin_release.rb +0 -332
  155. data/lib/twilio-ruby/rest/flex_api/v1/plugin_version_archive.rb +0 -256
@@ -1,332 +0,0 @@
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 PluginReleaseList < ListResource
21
-
22
- ##
23
- # Initialize the PluginReleaseList
24
- # @param [Version] version Version that contains the resource
25
- # @return [PluginReleaseList] PluginReleaseList
26
- def initialize(version)
27
- super(version)
28
- # Path Solution
29
- @solution = { }
30
- @uri = "/PluginService/Releases"
31
-
32
- end
33
- ##
34
- # Create the PluginReleaseInstance
35
- # @param [String] configuration_id The SID or the Version of the Flex Plugin Configuration to release.
36
- # @param [String] flex_metadata The Flex-Metadata HTTP request header
37
- # @return [PluginReleaseInstance] Created PluginReleaseInstance
38
- def create(
39
- configuration_id: nil,
40
- flex_metadata: :unset
41
- )
42
-
43
- data = Twilio::Values.of({
44
- 'ConfigurationId' => configuration_id,
45
- })
46
-
47
-
48
- headers = Twilio::Values.of({ 'Flex-Metadata' => flex_metadata, })
49
- payload = @version.create('POST', @uri, data: data, headers: headers)
50
- PluginReleaseInstance.new(
51
- @version,
52
- payload,
53
- )
54
- end
55
-
56
-
57
- ##
58
- # Lists PluginReleaseInstance records from the API as a list.
59
- # Unlike stream(), this operation is eager and will load `limit` records into
60
- # memory before returning.
61
- # @param [String] flex_metadata The Flex-Metadata HTTP request header
62
- # @param [Integer] limit Upper limit for the number of records to return. stream()
63
- # guarantees to never return more than limit. Default is no limit
64
- # @param [Integer] page_size Number of records to fetch per request, when
65
- # not set will use the default value of 50 records. If no page_size is defined
66
- # but a limit is defined, stream() will attempt to read the limit with the most
67
- # efficient page size, i.e. min(limit, 1000)
68
- # @return [Array] Array of up to limit results
69
- def list(flex_metadata: :unset, limit: nil, page_size: nil)
70
- self.stream(
71
- flex_metadata: flex_metadata,
72
- limit: limit,
73
- page_size: page_size
74
- ).entries
75
- end
76
-
77
- ##
78
- # Streams Instance records from the API as an Enumerable.
79
- # This operation lazily loads records as efficiently as possible until the limit
80
- # is reached.
81
- # @param [String] flex_metadata The Flex-Metadata HTTP request header
82
- # @param [Integer] limit Upper limit for the number of records to return. stream()
83
- # guarantees to never return more than limit. Default is no limit
84
- # @param [Integer] page_size Number of records to fetch per request, when
85
- # not set will use the default value of 50 records. If no page_size is defined
86
- # but a limit is defined, stream() will attempt to read the limit with the most
87
- # efficient page size, i.e. min(limit, 1000)
88
- # @return [Enumerable] Enumerable that will yield up to limit results
89
- def stream(flex_metadata: :unset, limit: nil, page_size: nil)
90
- limits = @version.read_limits(limit, page_size)
91
-
92
- page = self.page(
93
- flex_metadata: flex_metadata,
94
- page_size: limits[:page_size], )
95
-
96
- @version.stream(page, limit: limits[:limit], page_limit: limits[:page_limit])
97
- end
98
-
99
- ##
100
- # When passed a block, yields PluginReleaseInstance records from the API.
101
- # This operation lazily loads records as efficiently as possible until the limit
102
- # is reached.
103
- def each
104
- limits = @version.read_limits
105
-
106
- page = self.page(page_size: limits[:page_size], )
107
-
108
- @version.stream(page,
109
- limit: limits[:limit],
110
- page_limit: limits[:page_limit]).each {|x| yield x}
111
- end
112
-
113
- ##
114
- # Retrieve a single page of PluginReleaseInstance records from the API.
115
- # Request is executed immediately.
116
- # @param [String] flex_metadata The Flex-Metadata HTTP request header
117
- # @param [String] page_token PageToken provided by the API
118
- # @param [Integer] page_number Page Number, this value is simply for client state
119
- # @param [Integer] page_size Number of records to return, defaults to 50
120
- # @return [Page] Page of PluginReleaseInstance
121
- def page(flex_metadata: :unset, page_token: :unset, page_number: :unset, page_size: :unset)
122
- params = Twilio::Values.of({
123
- 'Flex-Metadata' => flex_metadata,
124
- 'PageToken' => page_token,
125
- 'Page' => page_number,
126
- 'PageSize' => page_size,
127
- })
128
-
129
- response = @version.page('GET', @uri, params: params)
130
-
131
- PluginReleasePage.new(@version, response, @solution)
132
- end
133
-
134
- ##
135
- # Retrieve a single page of PluginReleaseInstance records from the API.
136
- # Request is executed immediately.
137
- # @param [String] target_url API-generated URL for the requested results page
138
- # @return [Page] Page of PluginReleaseInstance
139
- def get_page(target_url)
140
- response = @version.domain.request(
141
- 'GET',
142
- target_url
143
- )
144
- PluginReleasePage.new(@version, response, @solution)
145
- end
146
-
147
-
148
-
149
- # Provide a user friendly representation
150
- def to_s
151
- '#<Twilio.FlexApi.V1.PluginReleaseList>'
152
- end
153
- end
154
-
155
-
156
- class PluginReleaseContext < InstanceContext
157
- ##
158
- # Initialize the PluginReleaseContext
159
- # @param [Version] version Version that contains the resource
160
- # @param [String] sid The SID of the Flex Plugin Release resource to fetch.
161
- # @return [PluginReleaseContext] PluginReleaseContext
162
- def initialize(version, sid)
163
- super(version)
164
-
165
- # Path Solution
166
- @solution = { sid: sid, }
167
- @uri = "/PluginService/Releases/#{@solution[:sid]}"
168
-
169
-
170
- end
171
- ##
172
- # Fetch the PluginReleaseInstance
173
- # @param [String] flex_metadata The Flex-Metadata HTTP request header
174
- # @return [PluginReleaseInstance] Fetched PluginReleaseInstance
175
- def fetch(
176
- flex_metadata: :unset
177
- )
178
-
179
-
180
- headers = Twilio::Values.of({ 'Flex-Metadata' => flex_metadata, })
181
- payload = @version.fetch('GET', @uri, headers: headers)
182
- PluginReleaseInstance.new(
183
- @version,
184
- payload,
185
- sid: @solution[:sid],
186
- )
187
- end
188
-
189
-
190
- ##
191
- # Provide a user friendly representation
192
- def to_s
193
- context = @solution.map{|k, v| "#{k}: #{v}"}.join(',')
194
- "#<Twilio.FlexApi.V1.PluginReleaseContext #{context}>"
195
- end
196
-
197
- ##
198
- # Provide a detailed, user friendly representation
199
- def inspect
200
- context = @solution.map{|k, v| "#{k}: #{v}"}.join(',')
201
- "#<Twilio.FlexApi.V1.PluginReleaseContext #{context}>"
202
- end
203
- end
204
-
205
- class PluginReleasePage < Page
206
- ##
207
- # Initialize the PluginReleasePage
208
- # @param [Version] version Version that contains the resource
209
- # @param [Response] response Response from the API
210
- # @param [Hash] solution Path solution for the resource
211
- # @return [PluginReleasePage] PluginReleasePage
212
- def initialize(version, response, solution)
213
- super(version, response)
214
-
215
- # Path Solution
216
- @solution = solution
217
- end
218
-
219
- ##
220
- # Build an instance of PluginReleaseInstance
221
- # @param [Hash] payload Payload response from the API
222
- # @return [PluginReleaseInstance] PluginReleaseInstance
223
- def get_instance(payload)
224
- PluginReleaseInstance.new(@version, payload)
225
- end
226
-
227
- ##
228
- # Provide a user friendly representation
229
- def to_s
230
- '<Twilio.FlexApi.V1.PluginReleasePage>'
231
- end
232
- end
233
- class PluginReleaseInstance < InstanceResource
234
- ##
235
- # Initialize the PluginReleaseInstance
236
- # @param [Version] version Version that contains the resource
237
- # @param [Hash] payload payload that contains response from Twilio
238
- # @param [String] account_sid The SID of the
239
- # {Account}[https://www.twilio.com/docs/iam/api/account] that created this PluginRelease
240
- # resource.
241
- # @param [String] sid The SID of the Call resource to fetch.
242
- # @return [PluginReleaseInstance] PluginReleaseInstance
243
- def initialize(version, payload , sid: nil)
244
- super(version)
245
-
246
- # Marshaled Properties
247
- @properties = {
248
- 'sid' => payload['sid'],
249
- 'account_sid' => payload['account_sid'],
250
- 'configuration_sid' => payload['configuration_sid'],
251
- 'date_created' => Twilio.deserialize_iso8601_datetime(payload['date_created']),
252
- 'url' => payload['url'],
253
- }
254
-
255
- # Context
256
- @instance_context = nil
257
- @params = { 'sid' => sid || @properties['sid'] , }
258
- end
259
-
260
- ##
261
- # Generate an instance context for the instance, the context is capable of
262
- # performing various actions. All instance actions are proxied to the context
263
- # @return [PluginReleaseContext] CallContext for this CallInstance
264
- def context
265
- unless @instance_context
266
- @instance_context = PluginReleaseContext.new(@version , @params['sid'])
267
- end
268
- @instance_context
269
- end
270
-
271
- ##
272
- # @return [String] The unique string that we created to identify the Plugin Release resource.
273
- def sid
274
- @properties['sid']
275
- end
276
-
277
- ##
278
- # @return [String] The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Plugin Release resource and owns this resource.
279
- def account_sid
280
- @properties['account_sid']
281
- end
282
-
283
- ##
284
- # @return [String] The SID of the Plugin Configuration resource to release.
285
- def configuration_sid
286
- @properties['configuration_sid']
287
- end
288
-
289
- ##
290
- # @return [Time] The date and time in GMT when the Flex Plugin Release was created specified in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.
291
- def date_created
292
- @properties['date_created']
293
- end
294
-
295
- ##
296
- # @return [String] The absolute URL of the Plugin Release resource.
297
- def url
298
- @properties['url']
299
- end
300
-
301
- ##
302
- # Fetch the PluginReleaseInstance
303
- # @param [String] flex_metadata The Flex-Metadata HTTP request header
304
- # @return [PluginReleaseInstance] Fetched PluginReleaseInstance
305
- def fetch(
306
- flex_metadata: :unset
307
- )
308
-
309
- context.fetch(
310
- flex_metadata: flex_metadata,
311
- )
312
- end
313
-
314
- ##
315
- # Provide a user friendly representation
316
- def to_s
317
- values = @params.map{|k, v| "#{k}: #{v}"}.join(" ")
318
- "<Twilio.FlexApi.V1.PluginReleaseInstance #{values}>"
319
- end
320
-
321
- ##
322
- # Provide a detailed, user friendly representation
323
- def inspect
324
- values = @properties.map{|k, v| "#{k}: #{v}"}.join(" ")
325
- "<Twilio.FlexApi.V1.PluginReleaseInstance #{values}>"
326
- end
327
- end
328
-
329
- end
330
- end
331
- end
332
- end
@@ -1,256 +0,0 @@
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 PluginVersionArchiveList < ListResource
21
-
22
- ##
23
- # Initialize the PluginVersionArchiveList
24
- # @param [Version] version Version that contains the resource
25
- # @return [PluginVersionArchiveList] PluginVersionArchiveList
26
- def initialize(version)
27
- super(version)
28
- # Path Solution
29
- @solution = { }
30
-
31
-
32
- end
33
-
34
-
35
-
36
- # Provide a user friendly representation
37
- def to_s
38
- '#<Twilio.FlexApi.V1.PluginVersionArchiveList>'
39
- end
40
- end
41
-
42
-
43
- class PluginVersionArchiveContext < InstanceContext
44
- ##
45
- # Initialize the PluginVersionArchiveContext
46
- # @param [Version] version Version that contains the resource
47
- # @param [String] plugin_sid The SID of the Flex Plugin the resource to belongs to.
48
- # @param [String] sid The SID of the Flex Plugin Version resource to archive.
49
- # @return [PluginVersionArchiveContext] PluginVersionArchiveContext
50
- def initialize(version, plugin_sid, sid)
51
- super(version)
52
-
53
- # Path Solution
54
- @solution = { plugin_sid: plugin_sid, sid: sid, }
55
- @uri = "/PluginService/Plugins/#{@solution[:plugin_sid]}/Versions/#{@solution[:sid]}/Archive"
56
-
57
-
58
- end
59
- ##
60
- # Update the PluginVersionArchiveInstance
61
- # @param [String] flex_metadata The Flex-Metadata HTTP request header
62
- # @return [PluginVersionArchiveInstance] Updated PluginVersionArchiveInstance
63
- def update(
64
- flex_metadata: :unset
65
- )
66
-
67
-
68
- headers = Twilio::Values.of({ 'Flex-Metadata' => flex_metadata, })
69
- payload = @version.update('POST', @uri, headers: headers)
70
- PluginVersionArchiveInstance.new(
71
- @version,
72
- payload,
73
- plugin_sid: @solution[:plugin_sid],
74
- sid: @solution[:sid],
75
- )
76
- end
77
-
78
-
79
- ##
80
- # Provide a user friendly representation
81
- def to_s
82
- context = @solution.map{|k, v| "#{k}: #{v}"}.join(',')
83
- "#<Twilio.FlexApi.V1.PluginVersionArchiveContext #{context}>"
84
- end
85
-
86
- ##
87
- # Provide a detailed, user friendly representation
88
- def inspect
89
- context = @solution.map{|k, v| "#{k}: #{v}"}.join(',')
90
- "#<Twilio.FlexApi.V1.PluginVersionArchiveContext #{context}>"
91
- end
92
- end
93
-
94
- class PluginVersionArchivePage < Page
95
- ##
96
- # Initialize the PluginVersionArchivePage
97
- # @param [Version] version Version that contains the resource
98
- # @param [Response] response Response from the API
99
- # @param [Hash] solution Path solution for the resource
100
- # @return [PluginVersionArchivePage] PluginVersionArchivePage
101
- def initialize(version, response, solution)
102
- super(version, response)
103
-
104
- # Path Solution
105
- @solution = solution
106
- end
107
-
108
- ##
109
- # Build an instance of PluginVersionArchiveInstance
110
- # @param [Hash] payload Payload response from the API
111
- # @return [PluginVersionArchiveInstance] PluginVersionArchiveInstance
112
- def get_instance(payload)
113
- PluginVersionArchiveInstance.new(@version, payload)
114
- end
115
-
116
- ##
117
- # Provide a user friendly representation
118
- def to_s
119
- '<Twilio.FlexApi.V1.PluginVersionArchivePage>'
120
- end
121
- end
122
- class PluginVersionArchiveInstance < InstanceResource
123
- ##
124
- # Initialize the PluginVersionArchiveInstance
125
- # @param [Version] version Version that contains the resource
126
- # @param [Hash] payload payload that contains response from Twilio
127
- # @param [String] account_sid The SID of the
128
- # {Account}[https://www.twilio.com/docs/iam/api/account] that created this PluginVersionArchive
129
- # resource.
130
- # @param [String] sid The SID of the Call resource to fetch.
131
- # @return [PluginVersionArchiveInstance] PluginVersionArchiveInstance
132
- def initialize(version, payload , plugin_sid: nil, sid: nil)
133
- super(version)
134
-
135
- # Marshaled Properties
136
- @properties = {
137
- 'sid' => payload['sid'],
138
- 'plugin_sid' => payload['plugin_sid'],
139
- 'account_sid' => payload['account_sid'],
140
- 'version' => payload['version'],
141
- 'plugin_url' => payload['plugin_url'],
142
- 'changelog' => payload['changelog'],
143
- 'private' => payload['private'],
144
- 'archived' => payload['archived'],
145
- 'date_created' => Twilio.deserialize_iso8601_datetime(payload['date_created']),
146
- 'url' => payload['url'],
147
- }
148
-
149
- # Context
150
- @instance_context = nil
151
- @params = { 'plugin_sid' => plugin_sid || @properties['plugin_sid'] ,'sid' => sid || @properties['sid'] , }
152
- end
153
-
154
- ##
155
- # Generate an instance context for the instance, the context is capable of
156
- # performing various actions. All instance actions are proxied to the context
157
- # @return [PluginVersionArchiveContext] CallContext for this CallInstance
158
- def context
159
- unless @instance_context
160
- @instance_context = PluginVersionArchiveContext.new(@version , @params['plugin_sid'], @params['sid'])
161
- end
162
- @instance_context
163
- end
164
-
165
- ##
166
- # @return [String] The unique string that we created to identify the Flex Plugin Version resource.
167
- def sid
168
- @properties['sid']
169
- end
170
-
171
- ##
172
- # @return [String] The SID of the Flex Plugin resource this Flex Plugin Version belongs to.
173
- def plugin_sid
174
- @properties['plugin_sid']
175
- end
176
-
177
- ##
178
- # @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.
179
- def account_sid
180
- @properties['account_sid']
181
- end
182
-
183
- ##
184
- # @return [String] The unique version of this Flex Plugin Version.
185
- def version
186
- @properties['version']
187
- end
188
-
189
- ##
190
- # @return [String] The URL of where the Flex Plugin Version JavaScript bundle is hosted on.
191
- def plugin_url
192
- @properties['plugin_url']
193
- end
194
-
195
- ##
196
- # @return [String] A changelog that describes the changes this Flex Plugin Version brings.
197
- def changelog
198
- @properties['changelog']
199
- end
200
-
201
- ##
202
- # @return [Boolean] Whether to inject credentials while accessing this Plugin Version. The default value is false.
203
- def private
204
- @properties['private']
205
- end
206
-
207
- ##
208
- # @return [Boolean] Whether the Flex Plugin Version is archived. The default value is false.
209
- def archived
210
- @properties['archived']
211
- end
212
-
213
- ##
214
- # @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.
215
- def date_created
216
- @properties['date_created']
217
- end
218
-
219
- ##
220
- # @return [String] The absolute URL of the Flex Plugin Version resource.
221
- def url
222
- @properties['url']
223
- end
224
-
225
- ##
226
- # Update the PluginVersionArchiveInstance
227
- # @param [String] flex_metadata The Flex-Metadata HTTP request header
228
- # @return [PluginVersionArchiveInstance] Updated PluginVersionArchiveInstance
229
- def update(
230
- flex_metadata: :unset
231
- )
232
-
233
- context.update(
234
- flex_metadata: flex_metadata,
235
- )
236
- end
237
-
238
- ##
239
- # Provide a user friendly representation
240
- def to_s
241
- values = @params.map{|k, v| "#{k}: #{v}"}.join(" ")
242
- "<Twilio.FlexApi.V1.PluginVersionArchiveInstance #{values}>"
243
- end
244
-
245
- ##
246
- # Provide a detailed, user friendly representation
247
- def inspect
248
- values = @properties.map{|k, v| "#{k}: #{v}"}.join(" ")
249
- "<Twilio.FlexApi.V1.PluginVersionArchiveInstance #{values}>"
250
- end
251
- end
252
-
253
- end
254
- end
255
- end
256
- end