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