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,386 +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 PluginConfigurationList < ListResource
21
-
22
- ##
23
- # Initialize the PluginConfigurationList
24
- # @param [Version] version Version that contains the resource
25
- # @return [PluginConfigurationList] PluginConfigurationList
26
- def initialize(version)
27
- super(version)
28
- # Path Solution
29
- @solution = { }
30
- @uri = "/PluginService/Configurations"
31
-
32
- end
33
- ##
34
- # Create the PluginConfigurationInstance
35
- # @param [String] name The Flex Plugin Configuration's name.
36
- # @param [Array[Hash]] plugins A list of objects that describe the plugin versions included in the configuration. Each object contains the sid of the plugin version.
37
- # @param [String] description The Flex Plugin Configuration's description.
38
- # @param [String] flex_metadata The Flex-Metadata HTTP request header
39
- # @return [PluginConfigurationInstance] Created PluginConfigurationInstance
40
- def create(
41
- name: nil,
42
- plugins: :unset,
43
- description: :unset,
44
- flex_metadata: :unset
45
- )
46
-
47
- data = Twilio::Values.of({
48
- 'Name' => name,
49
- 'Plugins' => Twilio.serialize_list(plugins) { |e| Twilio.serialize_object(e) },
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
- PluginConfigurationInstance.new(
57
- @version,
58
- payload,
59
- )
60
- end
61
-
62
-
63
- ##
64
- # Lists PluginConfigurationInstance 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 PluginConfigurationInstance 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 PluginConfigurationInstance 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 PluginConfigurationInstance
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
- PluginConfigurationPage.new(@version, response, @solution)
138
- end
139
-
140
- ##
141
- # Retrieve a single page of PluginConfigurationInstance 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 PluginConfigurationInstance
145
- def get_page(target_url)
146
- response = @version.domain.request(
147
- 'GET',
148
- target_url
149
- )
150
- PluginConfigurationPage.new(@version, response, @solution)
151
- end
152
-
153
-
154
-
155
- # Provide a user friendly representation
156
- def to_s
157
- '#<Twilio.FlexApi.V1.PluginConfigurationList>'
158
- end
159
- end
160
-
161
-
162
- class PluginConfigurationContext < InstanceContext
163
- ##
164
- # Initialize the PluginConfigurationContext
165
- # @param [Version] version Version that contains the resource
166
- # @param [String] sid The SID of the Flex Plugin Configuration resource to fetch.
167
- # @return [PluginConfigurationContext] PluginConfigurationContext
168
- def initialize(version, sid)
169
- super(version)
170
-
171
- # Path Solution
172
- @solution = { sid: sid, }
173
- @uri = "/PluginService/Configurations/#{@solution[:sid]}"
174
-
175
- # Dependents
176
- @plugins = nil
177
- end
178
- ##
179
- # Fetch the PluginConfigurationInstance
180
- # @param [String] flex_metadata The Flex-Metadata HTTP request header
181
- # @return [PluginConfigurationInstance] Fetched PluginConfigurationInstance
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
- PluginConfigurationInstance.new(
190
- @version,
191
- payload,
192
- sid: @solution[:sid],
193
- )
194
- end
195
-
196
- ##
197
- # Access the plugins
198
- # @return [ConfiguredPluginList]
199
- # @return [ConfiguredPluginContext] if sid was passed.
200
- def plugins(plugin_sid=:unset)
201
-
202
- raise ArgumentError, 'plugin_sid cannot be nil' if plugin_sid.nil?
203
-
204
- if plugin_sid != :unset
205
- return ConfiguredPluginContext.new(@version, @solution[:sid],plugin_sid )
206
- end
207
-
208
- unless @plugins
209
- @plugins = ConfiguredPluginList.new(
210
- @version, configuration_sid: @solution[:sid], )
211
- end
212
-
213
- @plugins
214
- end
215
-
216
- ##
217
- # Provide a user friendly representation
218
- def to_s
219
- context = @solution.map{|k, v| "#{k}: #{v}"}.join(',')
220
- "#<Twilio.FlexApi.V1.PluginConfigurationContext #{context}>"
221
- end
222
-
223
- ##
224
- # Provide a detailed, user friendly representation
225
- def inspect
226
- context = @solution.map{|k, v| "#{k}: #{v}"}.join(',')
227
- "#<Twilio.FlexApi.V1.PluginConfigurationContext #{context}>"
228
- end
229
- end
230
-
231
- class PluginConfigurationPage < Page
232
- ##
233
- # Initialize the PluginConfigurationPage
234
- # @param [Version] version Version that contains the resource
235
- # @param [Response] response Response from the API
236
- # @param [Hash] solution Path solution for the resource
237
- # @return [PluginConfigurationPage] PluginConfigurationPage
238
- def initialize(version, response, solution)
239
- super(version, response)
240
-
241
- # Path Solution
242
- @solution = solution
243
- end
244
-
245
- ##
246
- # Build an instance of PluginConfigurationInstance
247
- # @param [Hash] payload Payload response from the API
248
- # @return [PluginConfigurationInstance] PluginConfigurationInstance
249
- def get_instance(payload)
250
- PluginConfigurationInstance.new(@version, payload)
251
- end
252
-
253
- ##
254
- # Provide a user friendly representation
255
- def to_s
256
- '<Twilio.FlexApi.V1.PluginConfigurationPage>'
257
- end
258
- end
259
- class PluginConfigurationInstance < InstanceResource
260
- ##
261
- # Initialize the PluginConfigurationInstance
262
- # @param [Version] version Version that contains the resource
263
- # @param [Hash] payload payload that contains response from Twilio
264
- # @param [String] account_sid The SID of the
265
- # {Account}[https://www.twilio.com/docs/iam/api/account] that created this PluginConfiguration
266
- # resource.
267
- # @param [String] sid The SID of the Call resource to fetch.
268
- # @return [PluginConfigurationInstance] PluginConfigurationInstance
269
- def initialize(version, payload , sid: nil)
270
- super(version)
271
-
272
- # Marshaled Properties
273
- @properties = {
274
- 'sid' => payload['sid'],
275
- 'account_sid' => payload['account_sid'],
276
- 'name' => payload['name'],
277
- 'description' => payload['description'],
278
- 'archived' => payload['archived'],
279
- 'date_created' => Twilio.deserialize_iso8601_datetime(payload['date_created']),
280
- 'url' => payload['url'],
281
- 'links' => payload['links'],
282
- }
283
-
284
- # Context
285
- @instance_context = nil
286
- @params = { 'sid' => sid || @properties['sid'] , }
287
- end
288
-
289
- ##
290
- # Generate an instance context for the instance, the context is capable of
291
- # performing various actions. All instance actions are proxied to the context
292
- # @return [PluginConfigurationContext] CallContext for this CallInstance
293
- def context
294
- unless @instance_context
295
- @instance_context = PluginConfigurationContext.new(@version , @params['sid'])
296
- end
297
- @instance_context
298
- end
299
-
300
- ##
301
- # @return [String] The unique string that we created to identify the Flex Plugin Configuration resource.
302
- def sid
303
- @properties['sid']
304
- end
305
-
306
- ##
307
- # @return [String] The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Flex Plugin Configuration resource and owns this resource.
308
- def account_sid
309
- @properties['account_sid']
310
- end
311
-
312
- ##
313
- # @return [String] The name of this Flex Plugin Configuration.
314
- def name
315
- @properties['name']
316
- end
317
-
318
- ##
319
- # @return [String] The description of the Flex Plugin Configuration resource.
320
- def description
321
- @properties['description']
322
- end
323
-
324
- ##
325
- # @return [Boolean] Whether the Flex Plugin Configuration is archived. The default value is false.
326
- def archived
327
- @properties['archived']
328
- end
329
-
330
- ##
331
- # @return [Time] The date and time in GMT when the Flex Plugin Configuration was created specified in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.
332
- def date_created
333
- @properties['date_created']
334
- end
335
-
336
- ##
337
- # @return [String] The absolute URL of the Flex Plugin Configuration resource.
338
- def url
339
- @properties['url']
340
- end
341
-
342
- ##
343
- # @return [Hash]
344
- def links
345
- @properties['links']
346
- end
347
-
348
- ##
349
- # Fetch the PluginConfigurationInstance
350
- # @param [String] flex_metadata The Flex-Metadata HTTP request header
351
- # @return [PluginConfigurationInstance] Fetched PluginConfigurationInstance
352
- def fetch(
353
- flex_metadata: :unset
354
- )
355
-
356
- context.fetch(
357
- flex_metadata: flex_metadata,
358
- )
359
- end
360
-
361
- ##
362
- # Access the plugins
363
- # @return [plugins] plugins
364
- def plugins
365
- context.plugins
366
- end
367
-
368
- ##
369
- # Provide a user friendly representation
370
- def to_s
371
- values = @params.map{|k, v| "#{k}: #{v}"}.join(" ")
372
- "<Twilio.FlexApi.V1.PluginConfigurationInstance #{values}>"
373
- end
374
-
375
- ##
376
- # Provide a detailed, user friendly representation
377
- def inspect
378
- values = @properties.map{|k, v| "#{k}: #{v}"}.join(" ")
379
- "<Twilio.FlexApi.V1.PluginConfigurationInstance #{values}>"
380
- end
381
- end
382
-
383
- end
384
- end
385
- end
386
- end
@@ -1,233 +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 PluginConfigurationArchiveList < ListResource
21
-
22
- ##
23
- # Initialize the PluginConfigurationArchiveList
24
- # @param [Version] version Version that contains the resource
25
- # @return [PluginConfigurationArchiveList] PluginConfigurationArchiveList
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.PluginConfigurationArchiveList>'
39
- end
40
- end
41
-
42
-
43
- class PluginConfigurationArchiveContext < InstanceContext
44
- ##
45
- # Initialize the PluginConfigurationArchiveContext
46
- # @param [Version] version Version that contains the resource
47
- # @param [String] sid The SID of the Flex Plugin Configuration resource to archive.
48
- # @return [PluginConfigurationArchiveContext] PluginConfigurationArchiveContext
49
- def initialize(version, sid)
50
- super(version)
51
-
52
- # Path Solution
53
- @solution = { sid: sid, }
54
- @uri = "/PluginService/Configurations/#{@solution[:sid]}/Archive"
55
-
56
-
57
- end
58
- ##
59
- # Update the PluginConfigurationArchiveInstance
60
- # @param [String] flex_metadata The Flex-Metadata HTTP request header
61
- # @return [PluginConfigurationArchiveInstance] Updated PluginConfigurationArchiveInstance
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
- PluginConfigurationArchiveInstance.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.PluginConfigurationArchiveContext #{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.PluginConfigurationArchiveContext #{context}>"
89
- end
90
- end
91
-
92
- class PluginConfigurationArchivePage < Page
93
- ##
94
- # Initialize the PluginConfigurationArchivePage
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 [PluginConfigurationArchivePage] PluginConfigurationArchivePage
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 PluginConfigurationArchiveInstance
108
- # @param [Hash] payload Payload response from the API
109
- # @return [PluginConfigurationArchiveInstance] PluginConfigurationArchiveInstance
110
- def get_instance(payload)
111
- PluginConfigurationArchiveInstance.new(@version, payload)
112
- end
113
-
114
- ##
115
- # Provide a user friendly representation
116
- def to_s
117
- '<Twilio.FlexApi.V1.PluginConfigurationArchivePage>'
118
- end
119
- end
120
- class PluginConfigurationArchiveInstance < InstanceResource
121
- ##
122
- # Initialize the PluginConfigurationArchiveInstance
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 PluginConfigurationArchive
127
- # resource.
128
- # @param [String] sid The SID of the Call resource to fetch.
129
- # @return [PluginConfigurationArchiveInstance] PluginConfigurationArchiveInstance
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
- 'name' => payload['name'],
138
- 'description' => payload['description'],
139
- 'archived' => payload['archived'],
140
- 'date_created' => Twilio.deserialize_iso8601_datetime(payload['date_created']),
141
- 'url' => payload['url'],
142
- }
143
-
144
- # Context
145
- @instance_context = nil
146
- @params = { 'sid' => sid || @properties['sid'] , }
147
- end
148
-
149
- ##
150
- # Generate an instance context for the instance, the context is capable of
151
- # performing various actions. All instance actions are proxied to the context
152
- # @return [PluginConfigurationArchiveContext] CallContext for this CallInstance
153
- def context
154
- unless @instance_context
155
- @instance_context = PluginConfigurationArchiveContext.new(@version , @params['sid'])
156
- end
157
- @instance_context
158
- end
159
-
160
- ##
161
- # @return [String] The unique string that we created to identify the Flex Plugin Configuration resource.
162
- def sid
163
- @properties['sid']
164
- end
165
-
166
- ##
167
- # @return [String] The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Flex Plugin Configuration resource and owns this resource.
168
- def account_sid
169
- @properties['account_sid']
170
- end
171
-
172
- ##
173
- # @return [String] The name of this Flex Plugin Configuration.
174
- def name
175
- @properties['name']
176
- end
177
-
178
- ##
179
- # @return [String] The description of the Flex Plugin Configuration resource.
180
- def description
181
- @properties['description']
182
- end
183
-
184
- ##
185
- # @return [Boolean] Whether the Flex Plugin Configuration is archived. The default value is false.
186
- def archived
187
- @properties['archived']
188
- end
189
-
190
- ##
191
- # @return [Time] The date and time in GMT when the Flex Plugin Configuration was created specified in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.
192
- def date_created
193
- @properties['date_created']
194
- end
195
-
196
- ##
197
- # @return [String] The absolute URL of the Flex Plugin Configuration resource.
198
- def url
199
- @properties['url']
200
- end
201
-
202
- ##
203
- # Update the PluginConfigurationArchiveInstance
204
- # @param [String] flex_metadata The Flex-Metadata HTTP request header
205
- # @return [PluginConfigurationArchiveInstance] Updated PluginConfigurationArchiveInstance
206
- def update(
207
- flex_metadata: :unset
208
- )
209
-
210
- context.update(
211
- flex_metadata: flex_metadata,
212
- )
213
- end
214
-
215
- ##
216
- # Provide a user friendly representation
217
- def to_s
218
- values = @params.map{|k, v| "#{k}: #{v}"}.join(" ")
219
- "<Twilio.FlexApi.V1.PluginConfigurationArchiveInstance #{values}>"
220
- end
221
-
222
- ##
223
- # Provide a detailed, user friendly representation
224
- def inspect
225
- values = @properties.map{|k, v| "#{k}: #{v}"}.join(" ")
226
- "<Twilio.FlexApi.V1.PluginConfigurationArchiveInstance #{values}>"
227
- end
228
- end
229
-
230
- end
231
- end
232
- end
233
- end