twilio-ruby 7.0.2 → 7.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGES.md +43 -0
- data/Gemfile +1 -0
- data/README.md +2 -2
- data/lib/twilio-ruby/rest/api/v2010/account/message.rb +1 -1
- data/lib/twilio-ruby/rest/client.rb +0 -5
- data/lib/twilio-ruby/rest/content/v2/content.rb +259 -0
- data/lib/twilio-ruby/rest/content/v2/content_and_approvals.rb +252 -0
- data/lib/twilio-ruby/rest/content/v2.rb +46 -0
- data/lib/twilio-ruby/rest/content_base.rb +6 -1
- data/lib/twilio-ruby/rest/flex_api/v1/interaction.rb +1 -1
- data/lib/twilio-ruby/rest/flex_api/v1/plugin/plugin_versions.rb +8 -1
- data/lib/twilio-ruby/rest/intelligence/v2/custom_operator.rb +444 -0
- data/lib/twilio-ruby/rest/intelligence/v2/operator.rb +355 -0
- data/lib/twilio-ruby/rest/intelligence/v2/operator_attachment.rb +215 -0
- data/lib/twilio-ruby/rest/intelligence/v2/operator_attachments.rb +196 -0
- data/lib/twilio-ruby/rest/intelligence/v2/operator_type.rb +357 -0
- data/lib/twilio-ruby/rest/intelligence/v2/prebuilt_operator.rb +355 -0
- data/lib/twilio-ruby/rest/intelligence/v2/service.rb +9 -8
- data/lib/twilio-ruby/rest/intelligence/v2/transcript.rb +18 -18
- data/lib/twilio-ruby/rest/intelligence/v2.rb +112 -0
- data/lib/twilio-ruby/rest/messaging/v1/service.rb +0 -7
- data/lib/twilio-ruby/rest/numbers/v1/porting_port_in.rb +86 -1
- data/lib/twilio-ruby/rest/numbers/v1/porting_port_in_phone_number.rb +126 -2
- data/lib/twilio-ruby/rest/numbers/v1/porting_webhook_configuration.rb +148 -0
- data/lib/twilio-ruby/rest/numbers/v1/porting_webhook_configuration_delete.rb +167 -0
- data/lib/twilio-ruby/rest/numbers/v1/porting_webhook_configuration_fetch.rb +160 -0
- data/lib/twilio-ruby/rest/numbers/v1.rb +29 -32
- data/lib/twilio-ruby/rest/preview/sync/service/document.rb +1 -1
- data/lib/twilio-ruby/rest/preview/sync/service/sync_list.rb +2 -2
- data/lib/twilio-ruby/rest/preview/sync/service/sync_map.rb +2 -2
- data/lib/twilio-ruby/rest/preview/sync/service.rb +2 -2
- data/lib/twilio-ruby/rest/sync/v1/service/document.rb +1 -1
- data/lib/twilio-ruby/rest/sync/v1/service/sync_list.rb +2 -2
- data/lib/twilio-ruby/rest/sync/v1/service/sync_map.rb +2 -2
- data/lib/twilio-ruby/rest/sync/v1/service/sync_stream.rb +1 -1
- data/lib/twilio-ruby/rest/sync/v1/service.rb +3 -3
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/task.rb +33 -4
- data/lib/twilio-ruby/rest/trusthub/v1/compliance_tollfree_inquiries.rb +4 -1
- data/lib/twilio-ruby/rest/trusthub/v1/customer_profiles.rb +7 -0
- data/lib/twilio-ruby/rest/trusthub/v1/trust_products.rb +7 -0
- data/lib/twilio-ruby/rest/verify/v2/service/verification.rb +1 -1
- data/lib/twilio-ruby/rest/verify/v2/service/verification_check.rb +1 -1
- data/lib/twilio-ruby/rest/verify/v2/service.rb +1 -1
- data/lib/twilio-ruby/version.rb +1 -1
- metadata +14 -9
- data/lib/twilio-ruby/rest/numbers/v1/porting_bulk_portability.rb +0 -230
- data/lib/twilio-ruby/rest/numbers/v1/porting_port_in_fetch.rb +0 -252
- data/lib/twilio-ruby/rest/preview_messaging/v1/broadcast.rb +0 -164
- data/lib/twilio-ruby/rest/preview_messaging/v1/message.rb +0 -235
- data/lib/twilio-ruby/rest/preview_messaging/v1.rb +0 -46
- data/lib/twilio-ruby/rest/preview_messaging.rb +0 -12
- data/lib/twilio-ruby/rest/preview_messaging_base.rb +0 -38
@@ -0,0 +1,196 @@
|
|
1
|
+
##
|
2
|
+
# This code was generated by
|
3
|
+
# ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
|
4
|
+
# | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
|
5
|
+
# | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
|
6
|
+
#
|
7
|
+
# Twilio - Intelligence
|
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 Intelligence < IntelligenceBase
|
19
|
+
class V2 < Version
|
20
|
+
class OperatorAttachmentsList < ListResource
|
21
|
+
|
22
|
+
##
|
23
|
+
# Initialize the OperatorAttachmentsList
|
24
|
+
# @param [Version] version Version that contains the resource
|
25
|
+
# @return [OperatorAttachmentsList] OperatorAttachmentsList
|
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.Intelligence.V2.OperatorAttachmentsList>'
|
39
|
+
end
|
40
|
+
end
|
41
|
+
|
42
|
+
|
43
|
+
class OperatorAttachmentsContext < InstanceContext
|
44
|
+
##
|
45
|
+
# Initialize the OperatorAttachmentsContext
|
46
|
+
# @param [Version] version Version that contains the resource
|
47
|
+
# @param [String] service_sid The unique SID identifier of the Service.
|
48
|
+
# @return [OperatorAttachmentsContext] OperatorAttachmentsContext
|
49
|
+
def initialize(version, service_sid)
|
50
|
+
super(version)
|
51
|
+
|
52
|
+
# Path Solution
|
53
|
+
@solution = { service_sid: service_sid, }
|
54
|
+
@uri = "/Services/#{@solution[:service_sid]}/Operators"
|
55
|
+
|
56
|
+
|
57
|
+
end
|
58
|
+
##
|
59
|
+
# Fetch the OperatorAttachmentsInstance
|
60
|
+
# @return [OperatorAttachmentsInstance] Fetched OperatorAttachmentsInstance
|
61
|
+
def fetch
|
62
|
+
|
63
|
+
|
64
|
+
payload = @version.fetch('GET', @uri)
|
65
|
+
OperatorAttachmentsInstance.new(
|
66
|
+
@version,
|
67
|
+
payload,
|
68
|
+
service_sid: @solution[:service_sid],
|
69
|
+
)
|
70
|
+
end
|
71
|
+
|
72
|
+
|
73
|
+
##
|
74
|
+
# Provide a user friendly representation
|
75
|
+
def to_s
|
76
|
+
context = @solution.map{|k, v| "#{k}: #{v}"}.join(',')
|
77
|
+
"#<Twilio.Intelligence.V2.OperatorAttachmentsContext #{context}>"
|
78
|
+
end
|
79
|
+
|
80
|
+
##
|
81
|
+
# Provide a detailed, user friendly representation
|
82
|
+
def inspect
|
83
|
+
context = @solution.map{|k, v| "#{k}: #{v}"}.join(',')
|
84
|
+
"#<Twilio.Intelligence.V2.OperatorAttachmentsContext #{context}>"
|
85
|
+
end
|
86
|
+
end
|
87
|
+
|
88
|
+
class OperatorAttachmentsPage < Page
|
89
|
+
##
|
90
|
+
# Initialize the OperatorAttachmentsPage
|
91
|
+
# @param [Version] version Version that contains the resource
|
92
|
+
# @param [Response] response Response from the API
|
93
|
+
# @param [Hash] solution Path solution for the resource
|
94
|
+
# @return [OperatorAttachmentsPage] OperatorAttachmentsPage
|
95
|
+
def initialize(version, response, solution)
|
96
|
+
super(version, response)
|
97
|
+
|
98
|
+
# Path Solution
|
99
|
+
@solution = solution
|
100
|
+
end
|
101
|
+
|
102
|
+
##
|
103
|
+
# Build an instance of OperatorAttachmentsInstance
|
104
|
+
# @param [Hash] payload Payload response from the API
|
105
|
+
# @return [OperatorAttachmentsInstance] OperatorAttachmentsInstance
|
106
|
+
def get_instance(payload)
|
107
|
+
OperatorAttachmentsInstance.new(@version, payload)
|
108
|
+
end
|
109
|
+
|
110
|
+
##
|
111
|
+
# Provide a user friendly representation
|
112
|
+
def to_s
|
113
|
+
'<Twilio.Intelligence.V2.OperatorAttachmentsPage>'
|
114
|
+
end
|
115
|
+
end
|
116
|
+
class OperatorAttachmentsInstance < InstanceResource
|
117
|
+
##
|
118
|
+
# Initialize the OperatorAttachmentsInstance
|
119
|
+
# @param [Version] version Version that contains the resource
|
120
|
+
# @param [Hash] payload payload that contains response from Twilio
|
121
|
+
# @param [String] account_sid The SID of the
|
122
|
+
# {Account}[https://www.twilio.com/docs/iam/api/account] that created this OperatorAttachments
|
123
|
+
# resource.
|
124
|
+
# @param [String] sid The SID of the Call resource to fetch.
|
125
|
+
# @return [OperatorAttachmentsInstance] OperatorAttachmentsInstance
|
126
|
+
def initialize(version, payload , service_sid: nil)
|
127
|
+
super(version)
|
128
|
+
|
129
|
+
# Marshaled Properties
|
130
|
+
@properties = {
|
131
|
+
'service_sid' => payload['service_sid'],
|
132
|
+
'operator_sids' => payload['operator_sids'],
|
133
|
+
'url' => payload['url'],
|
134
|
+
}
|
135
|
+
|
136
|
+
# Context
|
137
|
+
@instance_context = nil
|
138
|
+
@params = { 'service_sid' => service_sid || @properties['service_sid'] , }
|
139
|
+
end
|
140
|
+
|
141
|
+
##
|
142
|
+
# Generate an instance context for the instance, the context is capable of
|
143
|
+
# performing various actions. All instance actions are proxied to the context
|
144
|
+
# @return [OperatorAttachmentsContext] CallContext for this CallInstance
|
145
|
+
def context
|
146
|
+
unless @instance_context
|
147
|
+
@instance_context = OperatorAttachmentsContext.new(@version , @params['service_sid'])
|
148
|
+
end
|
149
|
+
@instance_context
|
150
|
+
end
|
151
|
+
|
152
|
+
##
|
153
|
+
# @return [String] The unique SID identifier of the Service.
|
154
|
+
def service_sid
|
155
|
+
@properties['service_sid']
|
156
|
+
end
|
157
|
+
|
158
|
+
##
|
159
|
+
# @return [Array<String>] List of Operator SIDs attached to the service. Includes both Custom and Pre-built Operators.
|
160
|
+
def operator_sids
|
161
|
+
@properties['operator_sids']
|
162
|
+
end
|
163
|
+
|
164
|
+
##
|
165
|
+
# @return [String] The URL of this resource.
|
166
|
+
def url
|
167
|
+
@properties['url']
|
168
|
+
end
|
169
|
+
|
170
|
+
##
|
171
|
+
# Fetch the OperatorAttachmentsInstance
|
172
|
+
# @return [OperatorAttachmentsInstance] Fetched OperatorAttachmentsInstance
|
173
|
+
def fetch
|
174
|
+
|
175
|
+
context.fetch
|
176
|
+
end
|
177
|
+
|
178
|
+
##
|
179
|
+
# Provide a user friendly representation
|
180
|
+
def to_s
|
181
|
+
values = @params.map{|k, v| "#{k}: #{v}"}.join(" ")
|
182
|
+
"<Twilio.Intelligence.V2.OperatorAttachmentsInstance #{values}>"
|
183
|
+
end
|
184
|
+
|
185
|
+
##
|
186
|
+
# Provide a detailed, user friendly representation
|
187
|
+
def inspect
|
188
|
+
values = @properties.map{|k, v| "#{k}: #{v}"}.join(" ")
|
189
|
+
"<Twilio.Intelligence.V2.OperatorAttachmentsInstance #{values}>"
|
190
|
+
end
|
191
|
+
end
|
192
|
+
|
193
|
+
end
|
194
|
+
end
|
195
|
+
end
|
196
|
+
end
|
@@ -0,0 +1,357 @@
|
|
1
|
+
##
|
2
|
+
# This code was generated by
|
3
|
+
# ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
|
4
|
+
# | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
|
5
|
+
# | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
|
6
|
+
#
|
7
|
+
# Twilio - Intelligence
|
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 Intelligence < IntelligenceBase
|
19
|
+
class V2 < Version
|
20
|
+
class OperatorTypeList < ListResource
|
21
|
+
|
22
|
+
##
|
23
|
+
# Initialize the OperatorTypeList
|
24
|
+
# @param [Version] version Version that contains the resource
|
25
|
+
# @return [OperatorTypeList] OperatorTypeList
|
26
|
+
def initialize(version)
|
27
|
+
super(version)
|
28
|
+
# Path Solution
|
29
|
+
@solution = { }
|
30
|
+
@uri = "/OperatorTypes"
|
31
|
+
|
32
|
+
end
|
33
|
+
|
34
|
+
##
|
35
|
+
# Lists OperatorTypeInstance records from the API as a list.
|
36
|
+
# Unlike stream(), this operation is eager and will load `limit` records into
|
37
|
+
# memory before returning.
|
38
|
+
# @param [Integer] limit Upper limit for the number of records to return. stream()
|
39
|
+
# guarantees to never return more than limit. Default is no limit
|
40
|
+
# @param [Integer] page_size Number of records to fetch per request, when
|
41
|
+
# not set will use the default value of 50 records. If no page_size is defined
|
42
|
+
# but a limit is defined, stream() will attempt to read the limit with the most
|
43
|
+
# efficient page size, i.e. min(limit, 1000)
|
44
|
+
# @return [Array] Array of up to limit results
|
45
|
+
def list(limit: nil, page_size: nil)
|
46
|
+
self.stream(
|
47
|
+
limit: limit,
|
48
|
+
page_size: page_size
|
49
|
+
).entries
|
50
|
+
end
|
51
|
+
|
52
|
+
##
|
53
|
+
# Streams Instance records from the API as an Enumerable.
|
54
|
+
# This operation lazily loads records as efficiently as possible until the limit
|
55
|
+
# is reached.
|
56
|
+
# @param [Integer] limit Upper limit for the number of records to return. stream()
|
57
|
+
# guarantees to never return more than limit. Default is no limit
|
58
|
+
# @param [Integer] page_size Number of records to fetch per request, when
|
59
|
+
# not set will use the default value of 50 records. If no page_size is defined
|
60
|
+
# but a limit is defined, stream() will attempt to read the limit with the most
|
61
|
+
# efficient page size, i.e. min(limit, 1000)
|
62
|
+
# @return [Enumerable] Enumerable that will yield up to limit results
|
63
|
+
def stream(limit: nil, page_size: nil)
|
64
|
+
limits = @version.read_limits(limit, page_size)
|
65
|
+
|
66
|
+
page = self.page(
|
67
|
+
page_size: limits[:page_size], )
|
68
|
+
|
69
|
+
@version.stream(page, limit: limits[:limit], page_limit: limits[:page_limit])
|
70
|
+
end
|
71
|
+
|
72
|
+
##
|
73
|
+
# When passed a block, yields OperatorTypeInstance records from the API.
|
74
|
+
# This operation lazily loads records as efficiently as possible until the limit
|
75
|
+
# is reached.
|
76
|
+
def each
|
77
|
+
limits = @version.read_limits
|
78
|
+
|
79
|
+
page = self.page(page_size: limits[:page_size], )
|
80
|
+
|
81
|
+
@version.stream(page,
|
82
|
+
limit: limits[:limit],
|
83
|
+
page_limit: limits[:page_limit]).each {|x| yield x}
|
84
|
+
end
|
85
|
+
|
86
|
+
##
|
87
|
+
# Retrieve a single page of OperatorTypeInstance records from the API.
|
88
|
+
# Request is executed immediately.
|
89
|
+
# @param [String] page_token PageToken provided by the API
|
90
|
+
# @param [Integer] page_number Page Number, this value is simply for client state
|
91
|
+
# @param [Integer] page_size Number of records to return, defaults to 50
|
92
|
+
# @return [Page] Page of OperatorTypeInstance
|
93
|
+
def page(page_token: :unset, page_number: :unset, page_size: :unset)
|
94
|
+
params = Twilio::Values.of({
|
95
|
+
'PageToken' => page_token,
|
96
|
+
'Page' => page_number,
|
97
|
+
'PageSize' => page_size,
|
98
|
+
})
|
99
|
+
|
100
|
+
response = @version.page('GET', @uri, params: params)
|
101
|
+
|
102
|
+
OperatorTypePage.new(@version, response, @solution)
|
103
|
+
end
|
104
|
+
|
105
|
+
##
|
106
|
+
# Retrieve a single page of OperatorTypeInstance records from the API.
|
107
|
+
# Request is executed immediately.
|
108
|
+
# @param [String] target_url API-generated URL for the requested results page
|
109
|
+
# @return [Page] Page of OperatorTypeInstance
|
110
|
+
def get_page(target_url)
|
111
|
+
response = @version.domain.request(
|
112
|
+
'GET',
|
113
|
+
target_url
|
114
|
+
)
|
115
|
+
OperatorTypePage.new(@version, response, @solution)
|
116
|
+
end
|
117
|
+
|
118
|
+
|
119
|
+
|
120
|
+
# Provide a user friendly representation
|
121
|
+
def to_s
|
122
|
+
'#<Twilio.Intelligence.V2.OperatorTypeList>'
|
123
|
+
end
|
124
|
+
end
|
125
|
+
|
126
|
+
|
127
|
+
class OperatorTypeContext < InstanceContext
|
128
|
+
##
|
129
|
+
# Initialize the OperatorTypeContext
|
130
|
+
# @param [Version] version Version that contains the resource
|
131
|
+
# @param [String] sid A 34 character string that uniquely identifies this Operator Type.
|
132
|
+
# @return [OperatorTypeContext] OperatorTypeContext
|
133
|
+
def initialize(version, sid)
|
134
|
+
super(version)
|
135
|
+
|
136
|
+
# Path Solution
|
137
|
+
@solution = { sid: sid, }
|
138
|
+
@uri = "/OperatorTypes/#{@solution[:sid]}"
|
139
|
+
|
140
|
+
|
141
|
+
end
|
142
|
+
##
|
143
|
+
# Fetch the OperatorTypeInstance
|
144
|
+
# @return [OperatorTypeInstance] Fetched OperatorTypeInstance
|
145
|
+
def fetch
|
146
|
+
|
147
|
+
|
148
|
+
payload = @version.fetch('GET', @uri)
|
149
|
+
OperatorTypeInstance.new(
|
150
|
+
@version,
|
151
|
+
payload,
|
152
|
+
sid: @solution[:sid],
|
153
|
+
)
|
154
|
+
end
|
155
|
+
|
156
|
+
|
157
|
+
##
|
158
|
+
# Provide a user friendly representation
|
159
|
+
def to_s
|
160
|
+
context = @solution.map{|k, v| "#{k}: #{v}"}.join(',')
|
161
|
+
"#<Twilio.Intelligence.V2.OperatorTypeContext #{context}>"
|
162
|
+
end
|
163
|
+
|
164
|
+
##
|
165
|
+
# Provide a detailed, user friendly representation
|
166
|
+
def inspect
|
167
|
+
context = @solution.map{|k, v| "#{k}: #{v}"}.join(',')
|
168
|
+
"#<Twilio.Intelligence.V2.OperatorTypeContext #{context}>"
|
169
|
+
end
|
170
|
+
end
|
171
|
+
|
172
|
+
class OperatorTypePage < Page
|
173
|
+
##
|
174
|
+
# Initialize the OperatorTypePage
|
175
|
+
# @param [Version] version Version that contains the resource
|
176
|
+
# @param [Response] response Response from the API
|
177
|
+
# @param [Hash] solution Path solution for the resource
|
178
|
+
# @return [OperatorTypePage] OperatorTypePage
|
179
|
+
def initialize(version, response, solution)
|
180
|
+
super(version, response)
|
181
|
+
|
182
|
+
# Path Solution
|
183
|
+
@solution = solution
|
184
|
+
end
|
185
|
+
|
186
|
+
##
|
187
|
+
# Build an instance of OperatorTypeInstance
|
188
|
+
# @param [Hash] payload Payload response from the API
|
189
|
+
# @return [OperatorTypeInstance] OperatorTypeInstance
|
190
|
+
def get_instance(payload)
|
191
|
+
OperatorTypeInstance.new(@version, payload)
|
192
|
+
end
|
193
|
+
|
194
|
+
##
|
195
|
+
# Provide a user friendly representation
|
196
|
+
def to_s
|
197
|
+
'<Twilio.Intelligence.V2.OperatorTypePage>'
|
198
|
+
end
|
199
|
+
end
|
200
|
+
class OperatorTypeInstance < InstanceResource
|
201
|
+
##
|
202
|
+
# Initialize the OperatorTypeInstance
|
203
|
+
# @param [Version] version Version that contains the resource
|
204
|
+
# @param [Hash] payload payload that contains response from Twilio
|
205
|
+
# @param [String] account_sid The SID of the
|
206
|
+
# {Account}[https://www.twilio.com/docs/iam/api/account] that created this OperatorType
|
207
|
+
# resource.
|
208
|
+
# @param [String] sid The SID of the Call resource to fetch.
|
209
|
+
# @return [OperatorTypeInstance] OperatorTypeInstance
|
210
|
+
def initialize(version, payload , sid: nil)
|
211
|
+
super(version)
|
212
|
+
|
213
|
+
# Marshaled Properties
|
214
|
+
@properties = {
|
215
|
+
'name' => payload['name'],
|
216
|
+
'sid' => payload['sid'],
|
217
|
+
'friendly_name' => payload['friendly_name'],
|
218
|
+
'description' => payload['description'],
|
219
|
+
'docs_link' => payload['docs_link'],
|
220
|
+
'output_type' => payload['output_type'],
|
221
|
+
'supported_languages' => payload['supported_languages'],
|
222
|
+
'provider' => payload['provider'],
|
223
|
+
'availability' => payload['availability'],
|
224
|
+
'configurable' => payload['configurable'],
|
225
|
+
'config_schema' => payload['config_schema'],
|
226
|
+
'date_created' => Twilio.deserialize_iso8601_datetime(payload['date_created']),
|
227
|
+
'date_updated' => Twilio.deserialize_iso8601_datetime(payload['date_updated']),
|
228
|
+
'url' => payload['url'],
|
229
|
+
}
|
230
|
+
|
231
|
+
# Context
|
232
|
+
@instance_context = nil
|
233
|
+
@params = { 'sid' => sid || @properties['sid'] , }
|
234
|
+
end
|
235
|
+
|
236
|
+
##
|
237
|
+
# Generate an instance context for the instance, the context is capable of
|
238
|
+
# performing various actions. All instance actions are proxied to the context
|
239
|
+
# @return [OperatorTypeContext] CallContext for this CallInstance
|
240
|
+
def context
|
241
|
+
unless @instance_context
|
242
|
+
@instance_context = OperatorTypeContext.new(@version , @params['sid'])
|
243
|
+
end
|
244
|
+
@instance_context
|
245
|
+
end
|
246
|
+
|
247
|
+
##
|
248
|
+
# @return [String] A unique name that references an Operator's Operator Type.
|
249
|
+
def name
|
250
|
+
@properties['name']
|
251
|
+
end
|
252
|
+
|
253
|
+
##
|
254
|
+
# @return [String] A 34 character string that uniquely identifies this Operator Type.
|
255
|
+
def sid
|
256
|
+
@properties['sid']
|
257
|
+
end
|
258
|
+
|
259
|
+
##
|
260
|
+
# @return [String] A human-readable name of this resource, up to 64 characters.
|
261
|
+
def friendly_name
|
262
|
+
@properties['friendly_name']
|
263
|
+
end
|
264
|
+
|
265
|
+
##
|
266
|
+
# @return [String] A human-readable description of this resource, longer than the friendly name.
|
267
|
+
def description
|
268
|
+
@properties['description']
|
269
|
+
end
|
270
|
+
|
271
|
+
##
|
272
|
+
# @return [String] Additional documentation for the Operator Type.
|
273
|
+
def docs_link
|
274
|
+
@properties['docs_link']
|
275
|
+
end
|
276
|
+
|
277
|
+
##
|
278
|
+
# @return [OutputType]
|
279
|
+
def output_type
|
280
|
+
@properties['output_type']
|
281
|
+
end
|
282
|
+
|
283
|
+
##
|
284
|
+
# @return [Array<String>] List of languages this Operator Type supports.
|
285
|
+
def supported_languages
|
286
|
+
@properties['supported_languages']
|
287
|
+
end
|
288
|
+
|
289
|
+
##
|
290
|
+
# @return [Provider]
|
291
|
+
def provider
|
292
|
+
@properties['provider']
|
293
|
+
end
|
294
|
+
|
295
|
+
##
|
296
|
+
# @return [Availability]
|
297
|
+
def availability
|
298
|
+
@properties['availability']
|
299
|
+
end
|
300
|
+
|
301
|
+
##
|
302
|
+
# @return [Boolean] Operators can be created from configurable Operator Types.
|
303
|
+
def configurable
|
304
|
+
@properties['configurable']
|
305
|
+
end
|
306
|
+
|
307
|
+
##
|
308
|
+
# @return [Hash] JSON Schema for configuring an Operator with this Operator Type. Following https://json-schema.org/
|
309
|
+
def config_schema
|
310
|
+
@properties['config_schema']
|
311
|
+
end
|
312
|
+
|
313
|
+
##
|
314
|
+
# @return [Time] The date that this Operator Type was created, given in ISO 8601 format.
|
315
|
+
def date_created
|
316
|
+
@properties['date_created']
|
317
|
+
end
|
318
|
+
|
319
|
+
##
|
320
|
+
# @return [Time] The date that this Operator Type was updated, given in ISO 8601 format.
|
321
|
+
def date_updated
|
322
|
+
@properties['date_updated']
|
323
|
+
end
|
324
|
+
|
325
|
+
##
|
326
|
+
# @return [String] The URL of this resource.
|
327
|
+
def url
|
328
|
+
@properties['url']
|
329
|
+
end
|
330
|
+
|
331
|
+
##
|
332
|
+
# Fetch the OperatorTypeInstance
|
333
|
+
# @return [OperatorTypeInstance] Fetched OperatorTypeInstance
|
334
|
+
def fetch
|
335
|
+
|
336
|
+
context.fetch
|
337
|
+
end
|
338
|
+
|
339
|
+
##
|
340
|
+
# Provide a user friendly representation
|
341
|
+
def to_s
|
342
|
+
values = @params.map{|k, v| "#{k}: #{v}"}.join(" ")
|
343
|
+
"<Twilio.Intelligence.V2.OperatorTypeInstance #{values}>"
|
344
|
+
end
|
345
|
+
|
346
|
+
##
|
347
|
+
# Provide a detailed, user friendly representation
|
348
|
+
def inspect
|
349
|
+
values = @properties.map{|k, v| "#{k}: #{v}"}.join(" ")
|
350
|
+
"<Twilio.Intelligence.V2.OperatorTypeInstance #{values}>"
|
351
|
+
end
|
352
|
+
end
|
353
|
+
|
354
|
+
end
|
355
|
+
end
|
356
|
+
end
|
357
|
+
end
|