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,446 +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 PluginList < ListResource
21
-
22
- ##
23
- # Initialize the PluginList
24
- # @param [Version] version Version that contains the resource
25
- # @return [PluginList] PluginList
26
- def initialize(version)
27
- super(version)
28
- # Path Solution
29
- @solution = { }
30
- @uri = "/PluginService/Plugins"
31
-
32
- end
33
- ##
34
- # Create the PluginInstance
35
- # @param [String] unique_name The Flex Plugin's unique name.
36
- # @param [String] friendly_name The Flex Plugin's friendly name.
37
- # @param [String] description A descriptive string that you create to describe the plugin resource. It can be up to 500 characters long
38
- # @param [String] flex_metadata The Flex-Metadata HTTP request header
39
- # @return [PluginInstance] Created PluginInstance
40
- def create(
41
- unique_name: nil,
42
- friendly_name: :unset,
43
- description: :unset,
44
- flex_metadata: :unset
45
- )
46
-
47
- data = Twilio::Values.of({
48
- 'UniqueName' => unique_name,
49
- 'FriendlyName' => friendly_name,
50
- 'Description' => description,
51
- })
52
-
53
-
54
- headers = Twilio::Values.of({ 'Flex-Metadata' => flex_metadata, })
55
- payload = @version.create('POST', @uri, data: data, headers: headers)
56
- PluginInstance.new(
57
- @version,
58
- payload,
59
- )
60
- end
61
-
62
-
63
- ##
64
- # Lists PluginInstance records from the API as a list.
65
- # Unlike stream(), this operation is eager and will load `limit` records into
66
- # memory before returning.
67
- # @param [String] flex_metadata The Flex-Metadata HTTP request header
68
- # @param [Integer] limit Upper limit for the number of records to return. stream()
69
- # guarantees to never return more than limit. Default is no limit
70
- # @param [Integer] page_size Number of records to fetch per request, when
71
- # not set will use the default value of 50 records. If no page_size is defined
72
- # but a limit is defined, stream() will attempt to read the limit with the most
73
- # efficient page size, i.e. min(limit, 1000)
74
- # @return [Array] Array of up to limit results
75
- def list(flex_metadata: :unset, limit: nil, page_size: nil)
76
- self.stream(
77
- flex_metadata: flex_metadata,
78
- limit: limit,
79
- page_size: page_size
80
- ).entries
81
- end
82
-
83
- ##
84
- # Streams Instance 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] flex_metadata The Flex-Metadata HTTP request header
88
- # @param [Integer] limit Upper limit for the number of records to return. stream()
89
- # guarantees to never return more than limit. Default is no limit
90
- # @param [Integer] page_size Number of records to fetch per request, when
91
- # not set will use the default value of 50 records. If no page_size is defined
92
- # but a limit is defined, stream() will attempt to read the limit with the most
93
- # efficient page size, i.e. min(limit, 1000)
94
- # @return [Enumerable] Enumerable that will yield up to limit results
95
- def stream(flex_metadata: :unset, limit: nil, page_size: nil)
96
- limits = @version.read_limits(limit, page_size)
97
-
98
- page = self.page(
99
- flex_metadata: flex_metadata,
100
- page_size: limits[:page_size], )
101
-
102
- @version.stream(page, limit: limits[:limit], page_limit: limits[:page_limit])
103
- end
104
-
105
- ##
106
- # When passed a block, yields PluginInstance records from the API.
107
- # This operation lazily loads records as efficiently as possible until the limit
108
- # is reached.
109
- def each
110
- limits = @version.read_limits
111
-
112
- page = self.page(page_size: limits[:page_size], )
113
-
114
- @version.stream(page,
115
- limit: limits[:limit],
116
- page_limit: limits[:page_limit]).each {|x| yield x}
117
- end
118
-
119
- ##
120
- # Retrieve a single page of PluginInstance records from the API.
121
- # Request is executed immediately.
122
- # @param [String] flex_metadata The Flex-Metadata 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 PluginInstance
127
- def page(flex_metadata: :unset, page_token: :unset, page_number: :unset, page_size: :unset)
128
- params = Twilio::Values.of({
129
- 'Flex-Metadata' => flex_metadata,
130
- 'PageToken' => page_token,
131
- 'Page' => page_number,
132
- 'PageSize' => page_size,
133
- })
134
-
135
- response = @version.page('GET', @uri, params: params)
136
-
137
- PluginPage.new(@version, response, @solution)
138
- end
139
-
140
- ##
141
- # Retrieve a single page of PluginInstance records from the API.
142
- # Request is executed immediately.
143
- # @param [String] target_url API-generated URL for the requested results page
144
- # @return [Page] Page of PluginInstance
145
- def get_page(target_url)
146
- response = @version.domain.request(
147
- 'GET',
148
- target_url
149
- )
150
- PluginPage.new(@version, response, @solution)
151
- end
152
-
153
-
154
-
155
- # Provide a user friendly representation
156
- def to_s
157
- '#<Twilio.FlexApi.V1.PluginList>'
158
- end
159
- end
160
-
161
-
162
- class PluginContext < InstanceContext
163
- ##
164
- # Initialize the PluginContext
165
- # @param [Version] version Version that contains the resource
166
- # @param [String] sid The SID of the Flex Plugin resource to update.
167
- # @return [PluginContext] PluginContext
168
- def initialize(version, sid)
169
- super(version)
170
-
171
- # Path Solution
172
- @solution = { sid: sid, }
173
- @uri = "/PluginService/Plugins/#{@solution[:sid]}"
174
-
175
- # Dependents
176
- @plugin_versions = nil
177
- end
178
- ##
179
- # Fetch the PluginInstance
180
- # @param [String] flex_metadata The Flex-Metadata HTTP request header
181
- # @return [PluginInstance] Fetched PluginInstance
182
- def fetch(
183
- flex_metadata: :unset
184
- )
185
-
186
-
187
- headers = Twilio::Values.of({ 'Flex-Metadata' => flex_metadata, })
188
- payload = @version.fetch('GET', @uri, headers: headers)
189
- PluginInstance.new(
190
- @version,
191
- payload,
192
- sid: @solution[:sid],
193
- )
194
- end
195
-
196
- ##
197
- # Update the PluginInstance
198
- # @param [String] friendly_name The Flex Plugin's friendly name.
199
- # @param [String] description A descriptive string that you update to describe the plugin resource. It can be up to 500 characters long
200
- # @param [String] flex_metadata The Flex-Metadata HTTP request header
201
- # @return [PluginInstance] Updated PluginInstance
202
- def update(
203
- friendly_name: :unset,
204
- description: :unset,
205
- flex_metadata: :unset
206
- )
207
-
208
- data = Twilio::Values.of({
209
- 'FriendlyName' => friendly_name,
210
- 'Description' => description,
211
- })
212
-
213
-
214
- headers = Twilio::Values.of({ 'Flex-Metadata' => flex_metadata, })
215
- payload = @version.update('POST', @uri, data: data, headers: headers)
216
- PluginInstance.new(
217
- @version,
218
- payload,
219
- sid: @solution[:sid],
220
- )
221
- end
222
-
223
- ##
224
- # Access the plugin_versions
225
- # @return [PluginVersionsList]
226
- # @return [PluginVersionsContext] if sid was passed.
227
- def plugin_versions(sid=:unset)
228
-
229
- raise ArgumentError, 'sid cannot be nil' if sid.nil?
230
-
231
- if sid != :unset
232
- return PluginVersionsContext.new(@version, @solution[:sid],sid )
233
- end
234
-
235
- unless @plugin_versions
236
- @plugin_versions = PluginVersionsList.new(
237
- @version, plugin_sid: @solution[:sid], )
238
- end
239
-
240
- @plugin_versions
241
- end
242
-
243
- ##
244
- # Provide a user friendly representation
245
- def to_s
246
- context = @solution.map{|k, v| "#{k}: #{v}"}.join(',')
247
- "#<Twilio.FlexApi.V1.PluginContext #{context}>"
248
- end
249
-
250
- ##
251
- # Provide a detailed, user friendly representation
252
- def inspect
253
- context = @solution.map{|k, v| "#{k}: #{v}"}.join(',')
254
- "#<Twilio.FlexApi.V1.PluginContext #{context}>"
255
- end
256
- end
257
-
258
- class PluginPage < Page
259
- ##
260
- # Initialize the PluginPage
261
- # @param [Version] version Version that contains the resource
262
- # @param [Response] response Response from the API
263
- # @param [Hash] solution Path solution for the resource
264
- # @return [PluginPage] PluginPage
265
- def initialize(version, response, solution)
266
- super(version, response)
267
-
268
- # Path Solution
269
- @solution = solution
270
- end
271
-
272
- ##
273
- # Build an instance of PluginInstance
274
- # @param [Hash] payload Payload response from the API
275
- # @return [PluginInstance] PluginInstance
276
- def get_instance(payload)
277
- PluginInstance.new(@version, payload)
278
- end
279
-
280
- ##
281
- # Provide a user friendly representation
282
- def to_s
283
- '<Twilio.FlexApi.V1.PluginPage>'
284
- end
285
- end
286
- class PluginInstance < InstanceResource
287
- ##
288
- # Initialize the PluginInstance
289
- # @param [Version] version Version that contains the resource
290
- # @param [Hash] payload payload that contains response from Twilio
291
- # @param [String] account_sid The SID of the
292
- # {Account}[https://www.twilio.com/docs/iam/api/account] that created this Plugin
293
- # resource.
294
- # @param [String] sid The SID of the Call resource to fetch.
295
- # @return [PluginInstance] PluginInstance
296
- def initialize(version, payload , sid: nil)
297
- super(version)
298
-
299
- # Marshaled Properties
300
- @properties = {
301
- 'sid' => payload['sid'],
302
- 'account_sid' => payload['account_sid'],
303
- 'unique_name' => payload['unique_name'],
304
- 'friendly_name' => payload['friendly_name'],
305
- 'description' => payload['description'],
306
- 'archived' => payload['archived'],
307
- 'date_created' => Twilio.deserialize_iso8601_datetime(payload['date_created']),
308
- 'date_updated' => Twilio.deserialize_iso8601_datetime(payload['date_updated']),
309
- 'url' => payload['url'],
310
- 'links' => payload['links'],
311
- }
312
-
313
- # Context
314
- @instance_context = nil
315
- @params = { 'sid' => sid || @properties['sid'] , }
316
- end
317
-
318
- ##
319
- # Generate an instance context for the instance, the context is capable of
320
- # performing various actions. All instance actions are proxied to the context
321
- # @return [PluginContext] CallContext for this CallInstance
322
- def context
323
- unless @instance_context
324
- @instance_context = PluginContext.new(@version , @params['sid'])
325
- end
326
- @instance_context
327
- end
328
-
329
- ##
330
- # @return [String] The unique string that we created to identify the Flex Plugin resource.
331
- def sid
332
- @properties['sid']
333
- end
334
-
335
- ##
336
- # @return [String] The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Flex Plugin resource and owns this resource.
337
- def account_sid
338
- @properties['account_sid']
339
- end
340
-
341
- ##
342
- # @return [String] The name that uniquely identifies this Flex Plugin resource.
343
- def unique_name
344
- @properties['unique_name']
345
- end
346
-
347
- ##
348
- # @return [String] The friendly name this Flex Plugin resource.
349
- def friendly_name
350
- @properties['friendly_name']
351
- end
352
-
353
- ##
354
- # @return [String] A descriptive string that you create to describe the plugin resource. It can be up to 500 characters long
355
- def description
356
- @properties['description']
357
- end
358
-
359
- ##
360
- # @return [Boolean] Whether the Flex Plugin is archived. The default value is false.
361
- def archived
362
- @properties['archived']
363
- end
364
-
365
- ##
366
- # @return [Time] The date and time in GMT-7 when the Flex Plugin was created specified in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.
367
- def date_created
368
- @properties['date_created']
369
- end
370
-
371
- ##
372
- # @return [Time] The date and time in GMT-7 when the Flex Plugin was last updated specified in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.
373
- def date_updated
374
- @properties['date_updated']
375
- end
376
-
377
- ##
378
- # @return [String] The absolute URL of the Flex Plugin resource.
379
- def url
380
- @properties['url']
381
- end
382
-
383
- ##
384
- # @return [Hash]
385
- def links
386
- @properties['links']
387
- end
388
-
389
- ##
390
- # Fetch the PluginInstance
391
- # @param [String] flex_metadata The Flex-Metadata HTTP request header
392
- # @return [PluginInstance] Fetched PluginInstance
393
- def fetch(
394
- flex_metadata: :unset
395
- )
396
-
397
- context.fetch(
398
- flex_metadata: flex_metadata,
399
- )
400
- end
401
-
402
- ##
403
- # Update the PluginInstance
404
- # @param [String] friendly_name The Flex Plugin's friendly name.
405
- # @param [String] description A descriptive string that you update to describe the plugin resource. It can be up to 500 characters long
406
- # @param [String] flex_metadata The Flex-Metadata HTTP request header
407
- # @return [PluginInstance] Updated PluginInstance
408
- def update(
409
- friendly_name: :unset,
410
- description: :unset,
411
- flex_metadata: :unset
412
- )
413
-
414
- context.update(
415
- friendly_name: friendly_name,
416
- description: description,
417
- flex_metadata: flex_metadata,
418
- )
419
- end
420
-
421
- ##
422
- # Access the plugin_versions
423
- # @return [plugin_versions] plugin_versions
424
- def plugin_versions
425
- context.plugin_versions
426
- end
427
-
428
- ##
429
- # Provide a user friendly representation
430
- def to_s
431
- values = @params.map{|k, v| "#{k}: #{v}"}.join(" ")
432
- "<Twilio.FlexApi.V1.PluginInstance #{values}>"
433
- end
434
-
435
- ##
436
- # Provide a detailed, user friendly representation
437
- def inspect
438
- values = @properties.map{|k, v| "#{k}: #{v}"}.join(" ")
439
- "<Twilio.FlexApi.V1.PluginInstance #{values}>"
440
- end
441
- end
442
-
443
- end
444
- end
445
- end
446
- end
@@ -1,247 +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 PluginArchiveList < ListResource
21
-
22
- ##
23
- # Initialize the PluginArchiveList
24
- # @param [Version] version Version that contains the resource
25
- # @return [PluginArchiveList] PluginArchiveList
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.PluginArchiveList>'
39
- end
40
- end
41
-
42
-
43
- class PluginArchiveContext < InstanceContext
44
- ##
45
- # Initialize the PluginArchiveContext
46
- # @param [Version] version Version that contains the resource
47
- # @param [String] sid The SID of the Flex Plugin resource to archive.
48
- # @return [PluginArchiveContext] PluginArchiveContext
49
- def initialize(version, sid)
50
- super(version)
51
-
52
- # Path Solution
53
- @solution = { sid: sid, }
54
- @uri = "/PluginService/Plugins/#{@solution[:sid]}/Archive"
55
-
56
-
57
- end
58
- ##
59
- # Update the PluginArchiveInstance
60
- # @param [String] flex_metadata The Flex-Metadata HTTP request header
61
- # @return [PluginArchiveInstance] Updated PluginArchiveInstance
62
- def update(
63
- flex_metadata: :unset
64
- )
65
-
66
-
67
- headers = Twilio::Values.of({ 'Flex-Metadata' => flex_metadata, })
68
- payload = @version.update('POST', @uri, headers: headers)
69
- PluginArchiveInstance.new(
70
- @version,
71
- payload,
72
- sid: @solution[:sid],
73
- )
74
- end
75
-
76
-
77
- ##
78
- # Provide a user friendly representation
79
- def to_s
80
- context = @solution.map{|k, v| "#{k}: #{v}"}.join(',')
81
- "#<Twilio.FlexApi.V1.PluginArchiveContext #{context}>"
82
- end
83
-
84
- ##
85
- # Provide a detailed, user friendly representation
86
- def inspect
87
- context = @solution.map{|k, v| "#{k}: #{v}"}.join(',')
88
- "#<Twilio.FlexApi.V1.PluginArchiveContext #{context}>"
89
- end
90
- end
91
-
92
- class PluginArchivePage < Page
93
- ##
94
- # Initialize the PluginArchivePage
95
- # @param [Version] version Version that contains the resource
96
- # @param [Response] response Response from the API
97
- # @param [Hash] solution Path solution for the resource
98
- # @return [PluginArchivePage] PluginArchivePage
99
- def initialize(version, response, solution)
100
- super(version, response)
101
-
102
- # Path Solution
103
- @solution = solution
104
- end
105
-
106
- ##
107
- # Build an instance of PluginArchiveInstance
108
- # @param [Hash] payload Payload response from the API
109
- # @return [PluginArchiveInstance] PluginArchiveInstance
110
- def get_instance(payload)
111
- PluginArchiveInstance.new(@version, payload)
112
- end
113
-
114
- ##
115
- # Provide a user friendly representation
116
- def to_s
117
- '<Twilio.FlexApi.V1.PluginArchivePage>'
118
- end
119
- end
120
- class PluginArchiveInstance < InstanceResource
121
- ##
122
- # Initialize the PluginArchiveInstance
123
- # @param [Version] version Version that contains the resource
124
- # @param [Hash] payload payload that contains response from Twilio
125
- # @param [String] account_sid The SID of the
126
- # {Account}[https://www.twilio.com/docs/iam/api/account] that created this PluginArchive
127
- # resource.
128
- # @param [String] sid The SID of the Call resource to fetch.
129
- # @return [PluginArchiveInstance] PluginArchiveInstance
130
- def initialize(version, payload , sid: nil)
131
- super(version)
132
-
133
- # Marshaled Properties
134
- @properties = {
135
- 'sid' => payload['sid'],
136
- 'account_sid' => payload['account_sid'],
137
- 'unique_name' => payload['unique_name'],
138
- 'friendly_name' => payload['friendly_name'],
139
- 'description' => payload['description'],
140
- 'archived' => payload['archived'],
141
- 'date_created' => Twilio.deserialize_iso8601_datetime(payload['date_created']),
142
- 'date_updated' => Twilio.deserialize_iso8601_datetime(payload['date_updated']),
143
- 'url' => payload['url'],
144
- }
145
-
146
- # Context
147
- @instance_context = nil
148
- @params = { 'sid' => sid || @properties['sid'] , }
149
- end
150
-
151
- ##
152
- # Generate an instance context for the instance, the context is capable of
153
- # performing various actions. All instance actions are proxied to the context
154
- # @return [PluginArchiveContext] CallContext for this CallInstance
155
- def context
156
- unless @instance_context
157
- @instance_context = PluginArchiveContext.new(@version , @params['sid'])
158
- end
159
- @instance_context
160
- end
161
-
162
- ##
163
- # @return [String] The unique string that we created to identify the Flex Plugin resource.
164
- def sid
165
- @properties['sid']
166
- end
167
-
168
- ##
169
- # @return [String] The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Flex Plugin resource and owns this resource.
170
- def account_sid
171
- @properties['account_sid']
172
- end
173
-
174
- ##
175
- # @return [String] The name that uniquely identifies this Flex Plugin resource.
176
- def unique_name
177
- @properties['unique_name']
178
- end
179
-
180
- ##
181
- # @return [String] The friendly name this Flex Plugin resource.
182
- def friendly_name
183
- @properties['friendly_name']
184
- end
185
-
186
- ##
187
- # @return [String] A descriptive string that you create to describe the plugin resource. It can be up to 500 characters long
188
- def description
189
- @properties['description']
190
- end
191
-
192
- ##
193
- # @return [Boolean] Whether the Flex Plugin is archived. The default value is false.
194
- def archived
195
- @properties['archived']
196
- end
197
-
198
- ##
199
- # @return [Time] The date and time in GMT when the Flex Plugin was created specified in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.
200
- def date_created
201
- @properties['date_created']
202
- end
203
-
204
- ##
205
- # @return [Time] The date and time in GMT when the Flex Plugin was last updated specified in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.
206
- def date_updated
207
- @properties['date_updated']
208
- end
209
-
210
- ##
211
- # @return [String] The absolute URL of the Flex Plugin resource.
212
- def url
213
- @properties['url']
214
- end
215
-
216
- ##
217
- # Update the PluginArchiveInstance
218
- # @param [String] flex_metadata The Flex-Metadata HTTP request header
219
- # @return [PluginArchiveInstance] Updated PluginArchiveInstance
220
- def update(
221
- flex_metadata: :unset
222
- )
223
-
224
- context.update(
225
- flex_metadata: flex_metadata,
226
- )
227
- end
228
-
229
- ##
230
- # Provide a user friendly representation
231
- def to_s
232
- values = @params.map{|k, v| "#{k}: #{v}"}.join(" ")
233
- "<Twilio.FlexApi.V1.PluginArchiveInstance #{values}>"
234
- end
235
-
236
- ##
237
- # Provide a detailed, user friendly representation
238
- def inspect
239
- values = @properties.map{|k, v| "#{k}: #{v}"}.join(" ")
240
- "<Twilio.FlexApi.V1.PluginArchiveInstance #{values}>"
241
- end
242
- end
243
-
244
- end
245
- end
246
- end
247
- end