twilio-ruby 7.0.2 → 7.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (64) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGES.md +58 -0
  3. data/Gemfile +1 -0
  4. data/README.md +2 -2
  5. data/lib/twilio-ruby/rest/api/v2010/account/message.rb +3 -3
  6. data/lib/twilio-ruby/rest/client.rb +3 -3
  7. data/lib/twilio-ruby/rest/content/v2/content.rb +316 -0
  8. data/lib/twilio-ruby/rest/content/v2/content_and_approvals.rb +309 -0
  9. data/lib/twilio-ruby/rest/content/v2.rb +46 -0
  10. data/lib/twilio-ruby/rest/content_base.rb +6 -1
  11. data/lib/twilio-ruby/rest/flex_api/v1/interaction.rb +1 -1
  12. data/lib/twilio-ruby/rest/flex_api/v1/plugin/plugin_versions.rb +8 -1
  13. data/lib/twilio-ruby/rest/intelligence/v2/custom_operator.rb +444 -0
  14. data/lib/twilio-ruby/rest/intelligence/v2/operator.rb +355 -0
  15. data/lib/twilio-ruby/rest/intelligence/v2/operator_attachment.rb +215 -0
  16. data/lib/twilio-ruby/rest/intelligence/v2/operator_attachments.rb +196 -0
  17. data/lib/twilio-ruby/rest/intelligence/v2/operator_type.rb +357 -0
  18. data/lib/twilio-ruby/rest/intelligence/v2/prebuilt_operator.rb +355 -0
  19. data/lib/twilio-ruby/rest/intelligence/v2/service.rb +9 -8
  20. data/lib/twilio-ruby/rest/intelligence/v2/transcript.rb +18 -18
  21. data/lib/twilio-ruby/rest/intelligence/v2.rb +112 -0
  22. data/lib/twilio-ruby/rest/marketplace/v1/available_add_on/available_add_on_extension.rb +308 -0
  23. data/lib/twilio-ruby/rest/marketplace/v1/available_add_on.rb +335 -0
  24. data/lib/twilio-ruby/rest/marketplace/v1/installed_add_on/installed_add_on_extension.rb +350 -0
  25. data/lib/twilio-ruby/rest/marketplace/v1/installed_add_on/installed_add_on_usage.rb +169 -0
  26. data/lib/twilio-ruby/rest/marketplace/v1/installed_add_on.rb +461 -0
  27. data/lib/twilio-ruby/rest/marketplace/v1/module_data_management.rb +282 -0
  28. data/lib/twilio-ruby/rest/marketplace/v1.rb +79 -0
  29. data/lib/twilio-ruby/rest/marketplace.rb +6 -0
  30. data/lib/twilio-ruby/rest/{preview_messaging_base.rb → marketplace_base.rb} +6 -6
  31. data/lib/twilio-ruby/rest/messaging/v1/service.rb +0 -7
  32. data/lib/twilio-ruby/rest/messaging/v1/tollfree_verification.rb +15 -3
  33. data/lib/twilio-ruby/rest/messaging/v1.rb +1 -1
  34. data/lib/twilio-ruby/rest/numbers/v1/porting_port_in.rb +86 -1
  35. data/lib/twilio-ruby/rest/numbers/v1/porting_port_in_phone_number.rb +126 -2
  36. data/lib/twilio-ruby/rest/numbers/v1/porting_webhook_configuration.rb +148 -0
  37. data/lib/twilio-ruby/rest/numbers/v1/porting_webhook_configuration_delete.rb +167 -0
  38. data/lib/twilio-ruby/rest/numbers/v1/porting_webhook_configuration_fetch.rb +160 -0
  39. data/lib/twilio-ruby/rest/numbers/v1/signing_request_configuration.rb +176 -0
  40. data/lib/twilio-ruby/rest/numbers/v1.rb +35 -32
  41. data/lib/twilio-ruby/rest/preview/sync/service/document.rb +1 -1
  42. data/lib/twilio-ruby/rest/preview/sync/service/sync_list.rb +2 -2
  43. data/lib/twilio-ruby/rest/preview/sync/service/sync_map.rb +2 -2
  44. data/lib/twilio-ruby/rest/preview/sync/service.rb +2 -2
  45. data/lib/twilio-ruby/rest/sync/v1/service/document.rb +1 -1
  46. data/lib/twilio-ruby/rest/sync/v1/service/sync_list.rb +2 -2
  47. data/lib/twilio-ruby/rest/sync/v1/service/sync_map.rb +2 -2
  48. data/lib/twilio-ruby/rest/sync/v1/service/sync_stream.rb +1 -1
  49. data/lib/twilio-ruby/rest/sync/v1/service.rb +3 -3
  50. data/lib/twilio-ruby/rest/taskrouter/v1/workspace/task.rb +33 -4
  51. data/lib/twilio-ruby/rest/trusthub/v1/compliance_tollfree_inquiries.rb +4 -1
  52. data/lib/twilio-ruby/rest/trusthub/v1/customer_profiles.rb +7 -0
  53. data/lib/twilio-ruby/rest/trusthub/v1/trust_products.rb +7 -0
  54. data/lib/twilio-ruby/rest/verify/v2/service/verification.rb +1 -1
  55. data/lib/twilio-ruby/rest/verify/v2/service/verification_check.rb +1 -1
  56. data/lib/twilio-ruby/rest/verify/v2/service.rb +1 -1
  57. data/lib/twilio-ruby/version.rb +1 -1
  58. metadata +24 -9
  59. data/lib/twilio-ruby/rest/numbers/v1/porting_bulk_portability.rb +0 -230
  60. data/lib/twilio-ruby/rest/numbers/v1/porting_port_in_fetch.rb +0 -252
  61. data/lib/twilio-ruby/rest/preview_messaging/v1/broadcast.rb +0 -164
  62. data/lib/twilio-ruby/rest/preview_messaging/v1/message.rb +0 -235
  63. data/lib/twilio-ruby/rest/preview_messaging/v1.rb +0 -46
  64. data/lib/twilio-ruby/rest/preview_messaging.rb +0 -12
@@ -0,0 +1,355 @@
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 OperatorList < ListResource
21
+
22
+ ##
23
+ # Initialize the OperatorList
24
+ # @param [Version] version Version that contains the resource
25
+ # @return [OperatorList] OperatorList
26
+ def initialize(version)
27
+ super(version)
28
+ # Path Solution
29
+ @solution = { }
30
+ @uri = "/Operators"
31
+
32
+ end
33
+
34
+ ##
35
+ # Lists OperatorInstance 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 [Availability] availability Returns Operators with the provided availability type. Possible values: internal, beta, public, retired.
39
+ # @param [String] language_code Returns Operators that support the provided language code.
40
+ # @param [Integer] limit Upper limit for the number of records to return. stream()
41
+ # guarantees to never return more than limit. Default is no limit
42
+ # @param [Integer] page_size Number of records to fetch per request, when
43
+ # not set will use the default value of 50 records. If no page_size is defined
44
+ # but a limit is defined, stream() will attempt to read the limit with the most
45
+ # efficient page size, i.e. min(limit, 1000)
46
+ # @return [Array] Array of up to limit results
47
+ def list(availability: :unset, language_code: :unset, limit: nil, page_size: nil)
48
+ self.stream(
49
+ availability: availability,
50
+ language_code: language_code,
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 [Availability] availability Returns Operators with the provided availability type. Possible values: internal, beta, public, retired.
61
+ # @param [String] language_code Returns Operators that support the provided language code.
62
+ # @param [Integer] limit Upper limit for the number of records to return. stream()
63
+ # guarantees to never return more than limit. Default is no limit
64
+ # @param [Integer] page_size Number of records to fetch per request, when
65
+ # not set will use the default value of 50 records. If no page_size is defined
66
+ # but a limit is defined, stream() will attempt to read the limit with the most
67
+ # efficient page size, i.e. min(limit, 1000)
68
+ # @return [Enumerable] Enumerable that will yield up to limit results
69
+ def stream(availability: :unset, language_code: :unset, limit: nil, page_size: nil)
70
+ limits = @version.read_limits(limit, page_size)
71
+
72
+ page = self.page(
73
+ availability: availability,
74
+ language_code: language_code,
75
+ page_size: limits[:page_size], )
76
+
77
+ @version.stream(page, limit: limits[:limit], page_limit: limits[:page_limit])
78
+ end
79
+
80
+ ##
81
+ # When passed a block, yields OperatorInstance records from the API.
82
+ # This operation lazily loads records as efficiently as possible until the limit
83
+ # is reached.
84
+ def each
85
+ limits = @version.read_limits
86
+
87
+ page = self.page(page_size: limits[:page_size], )
88
+
89
+ @version.stream(page,
90
+ limit: limits[:limit],
91
+ page_limit: limits[:page_limit]).each {|x| yield x}
92
+ end
93
+
94
+ ##
95
+ # Retrieve a single page of OperatorInstance records from the API.
96
+ # Request is executed immediately.
97
+ # @param [Availability] availability Returns Operators with the provided availability type. Possible values: internal, beta, public, retired.
98
+ # @param [String] language_code Returns Operators that support the provided language code.
99
+ # @param [String] page_token PageToken provided by the API
100
+ # @param [Integer] page_number Page Number, this value is simply for client state
101
+ # @param [Integer] page_size Number of records to return, defaults to 50
102
+ # @return [Page] Page of OperatorInstance
103
+ def page(availability: :unset, language_code: :unset, page_token: :unset, page_number: :unset, page_size: :unset)
104
+ params = Twilio::Values.of({
105
+ 'Availability' => availability,
106
+ 'LanguageCode' => language_code,
107
+ 'PageToken' => page_token,
108
+ 'Page' => page_number,
109
+ 'PageSize' => page_size,
110
+ })
111
+
112
+ response = @version.page('GET', @uri, params: params)
113
+
114
+ OperatorPage.new(@version, response, @solution)
115
+ end
116
+
117
+ ##
118
+ # Retrieve a single page of OperatorInstance records from the API.
119
+ # Request is executed immediately.
120
+ # @param [String] target_url API-generated URL for the requested results page
121
+ # @return [Page] Page of OperatorInstance
122
+ def get_page(target_url)
123
+ response = @version.domain.request(
124
+ 'GET',
125
+ target_url
126
+ )
127
+ OperatorPage.new(@version, response, @solution)
128
+ end
129
+
130
+
131
+
132
+ # Provide a user friendly representation
133
+ def to_s
134
+ '#<Twilio.Intelligence.V2.OperatorList>'
135
+ end
136
+ end
137
+
138
+
139
+ class OperatorContext < InstanceContext
140
+ ##
141
+ # Initialize the OperatorContext
142
+ # @param [Version] version Version that contains the resource
143
+ # @param [String] sid A 34 character string that uniquely identifies this Operator.
144
+ # @return [OperatorContext] OperatorContext
145
+ def initialize(version, sid)
146
+ super(version)
147
+
148
+ # Path Solution
149
+ @solution = { sid: sid, }
150
+ @uri = "/Operators/#{@solution[:sid]}"
151
+
152
+
153
+ end
154
+ ##
155
+ # Fetch the OperatorInstance
156
+ # @return [OperatorInstance] Fetched OperatorInstance
157
+ def fetch
158
+
159
+
160
+ payload = @version.fetch('GET', @uri)
161
+ OperatorInstance.new(
162
+ @version,
163
+ payload,
164
+ sid: @solution[:sid],
165
+ )
166
+ end
167
+
168
+
169
+ ##
170
+ # Provide a user friendly representation
171
+ def to_s
172
+ context = @solution.map{|k, v| "#{k}: #{v}"}.join(',')
173
+ "#<Twilio.Intelligence.V2.OperatorContext #{context}>"
174
+ end
175
+
176
+ ##
177
+ # Provide a detailed, user friendly representation
178
+ def inspect
179
+ context = @solution.map{|k, v| "#{k}: #{v}"}.join(',')
180
+ "#<Twilio.Intelligence.V2.OperatorContext #{context}>"
181
+ end
182
+ end
183
+
184
+ class OperatorPage < Page
185
+ ##
186
+ # Initialize the OperatorPage
187
+ # @param [Version] version Version that contains the resource
188
+ # @param [Response] response Response from the API
189
+ # @param [Hash] solution Path solution for the resource
190
+ # @return [OperatorPage] OperatorPage
191
+ def initialize(version, response, solution)
192
+ super(version, response)
193
+
194
+ # Path Solution
195
+ @solution = solution
196
+ end
197
+
198
+ ##
199
+ # Build an instance of OperatorInstance
200
+ # @param [Hash] payload Payload response from the API
201
+ # @return [OperatorInstance] OperatorInstance
202
+ def get_instance(payload)
203
+ OperatorInstance.new(@version, payload)
204
+ end
205
+
206
+ ##
207
+ # Provide a user friendly representation
208
+ def to_s
209
+ '<Twilio.Intelligence.V2.OperatorPage>'
210
+ end
211
+ end
212
+ class OperatorInstance < InstanceResource
213
+ ##
214
+ # Initialize the OperatorInstance
215
+ # @param [Version] version Version that contains the resource
216
+ # @param [Hash] payload payload that contains response from Twilio
217
+ # @param [String] account_sid The SID of the
218
+ # {Account}[https://www.twilio.com/docs/iam/api/account] that created this Operator
219
+ # resource.
220
+ # @param [String] sid The SID of the Call resource to fetch.
221
+ # @return [OperatorInstance] OperatorInstance
222
+ def initialize(version, payload , sid: nil)
223
+ super(version)
224
+
225
+ # Marshaled Properties
226
+ @properties = {
227
+ 'account_sid' => payload['account_sid'],
228
+ 'sid' => payload['sid'],
229
+ 'friendly_name' => payload['friendly_name'],
230
+ 'description' => payload['description'],
231
+ 'author' => payload['author'],
232
+ 'operator_type' => payload['operator_type'],
233
+ 'version' => payload['version'] == nil ? payload['version'] : payload['version'].to_i,
234
+ 'availability' => payload['availability'],
235
+ 'config' => payload['config'],
236
+ 'date_created' => Twilio.deserialize_iso8601_datetime(payload['date_created']),
237
+ 'date_updated' => Twilio.deserialize_iso8601_datetime(payload['date_updated']),
238
+ 'url' => payload['url'],
239
+ }
240
+
241
+ # Context
242
+ @instance_context = nil
243
+ @params = { 'sid' => sid || @properties['sid'] , }
244
+ end
245
+
246
+ ##
247
+ # Generate an instance context for the instance, the context is capable of
248
+ # performing various actions. All instance actions are proxied to the context
249
+ # @return [OperatorContext] CallContext for this CallInstance
250
+ def context
251
+ unless @instance_context
252
+ @instance_context = OperatorContext.new(@version , @params['sid'])
253
+ end
254
+ @instance_context
255
+ end
256
+
257
+ ##
258
+ # @return [String] The unique SID identifier of the Account the Operator belongs to.
259
+ def account_sid
260
+ @properties['account_sid']
261
+ end
262
+
263
+ ##
264
+ # @return [String] A 34 character string that uniquely identifies this Operator.
265
+ def sid
266
+ @properties['sid']
267
+ end
268
+
269
+ ##
270
+ # @return [String] A human-readable name of this resource, up to 64 characters.
271
+ def friendly_name
272
+ @properties['friendly_name']
273
+ end
274
+
275
+ ##
276
+ # @return [String] A human-readable description of this resource, longer than the friendly name.
277
+ def description
278
+ @properties['description']
279
+ end
280
+
281
+ ##
282
+ # @return [String] The creator of the Operator. Either Twilio or the creating Account.
283
+ def author
284
+ @properties['author']
285
+ end
286
+
287
+ ##
288
+ # @return [String] Operator Type for this Operator. References an existing Operator Type resource.
289
+ def operator_type
290
+ @properties['operator_type']
291
+ end
292
+
293
+ ##
294
+ # @return [String] Numeric Operator version. Incremented with each update on the resource, used to ensure integrity when updating the Operator.
295
+ def version
296
+ @properties['version']
297
+ end
298
+
299
+ ##
300
+ # @return [Availability]
301
+ def availability
302
+ @properties['availability']
303
+ end
304
+
305
+ ##
306
+ # @return [Hash] Operator configuration, following the schema defined by the Operator Type. Only available on Custom Operators created by the Account.
307
+ def config
308
+ @properties['config']
309
+ end
310
+
311
+ ##
312
+ # @return [Time] The date that this Operator was created, given in ISO 8601 format.
313
+ def date_created
314
+ @properties['date_created']
315
+ end
316
+
317
+ ##
318
+ # @return [Time] The date that this Operator was updated, given in ISO 8601 format.
319
+ def date_updated
320
+ @properties['date_updated']
321
+ end
322
+
323
+ ##
324
+ # @return [String] The URL of this resource.
325
+ def url
326
+ @properties['url']
327
+ end
328
+
329
+ ##
330
+ # Fetch the OperatorInstance
331
+ # @return [OperatorInstance] Fetched OperatorInstance
332
+ def fetch
333
+
334
+ context.fetch
335
+ end
336
+
337
+ ##
338
+ # Provide a user friendly representation
339
+ def to_s
340
+ values = @params.map{|k, v| "#{k}: #{v}"}.join(" ")
341
+ "<Twilio.Intelligence.V2.OperatorInstance #{values}>"
342
+ end
343
+
344
+ ##
345
+ # Provide a detailed, user friendly representation
346
+ def inspect
347
+ values = @properties.map{|k, v| "#{k}: #{v}"}.join(" ")
348
+ "<Twilio.Intelligence.V2.OperatorInstance #{values}>"
349
+ end
350
+ end
351
+
352
+ end
353
+ end
354
+ end
355
+ end
@@ -0,0 +1,215 @@
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 OperatorAttachmentList < ListResource
21
+
22
+ ##
23
+ # Initialize the OperatorAttachmentList
24
+ # @param [Version] version Version that contains the resource
25
+ # @return [OperatorAttachmentList] OperatorAttachmentList
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.OperatorAttachmentList>'
39
+ end
40
+ end
41
+
42
+
43
+ class OperatorAttachmentContext < InstanceContext
44
+ ##
45
+ # Initialize the OperatorAttachmentContext
46
+ # @param [Version] version Version that contains the resource
47
+ # @param [String] service_sid The unique SID identifier of the Service.
48
+ # @param [String] operator_sid The unique SID identifier of the Operator. Allows both Custom and Pre-built Operators.
49
+ # @return [OperatorAttachmentContext] OperatorAttachmentContext
50
+ def initialize(version, service_sid, operator_sid)
51
+ super(version)
52
+
53
+ # Path Solution
54
+ @solution = { service_sid: service_sid, operator_sid: operator_sid, }
55
+ @uri = "/Services/#{@solution[:service_sid]}/Operators/#{@solution[:operator_sid]}"
56
+
57
+
58
+ end
59
+ ##
60
+ # Create the OperatorAttachmentInstance
61
+ # @return [OperatorAttachmentInstance] Created OperatorAttachmentInstance
62
+ def create
63
+
64
+
65
+ payload = @version.create('POST', @uri)
66
+ OperatorAttachmentInstance.new(
67
+ @version,
68
+ payload,
69
+ service_sid: @solution[:service_sid],
70
+ operator_sid: @solution[:operator_sid],
71
+ )
72
+ end
73
+
74
+ ##
75
+ # Delete the OperatorAttachmentInstance
76
+ # @return [Boolean] True if delete succeeds, false otherwise
77
+ def delete
78
+
79
+
80
+ @version.delete('DELETE', @uri)
81
+ end
82
+
83
+
84
+ ##
85
+ # Provide a user friendly representation
86
+ def to_s
87
+ context = @solution.map{|k, v| "#{k}: #{v}"}.join(',')
88
+ "#<Twilio.Intelligence.V2.OperatorAttachmentContext #{context}>"
89
+ end
90
+
91
+ ##
92
+ # Provide a detailed, user friendly representation
93
+ def inspect
94
+ context = @solution.map{|k, v| "#{k}: #{v}"}.join(',')
95
+ "#<Twilio.Intelligence.V2.OperatorAttachmentContext #{context}>"
96
+ end
97
+ end
98
+
99
+ class OperatorAttachmentPage < Page
100
+ ##
101
+ # Initialize the OperatorAttachmentPage
102
+ # @param [Version] version Version that contains the resource
103
+ # @param [Response] response Response from the API
104
+ # @param [Hash] solution Path solution for the resource
105
+ # @return [OperatorAttachmentPage] OperatorAttachmentPage
106
+ def initialize(version, response, solution)
107
+ super(version, response)
108
+
109
+ # Path Solution
110
+ @solution = solution
111
+ end
112
+
113
+ ##
114
+ # Build an instance of OperatorAttachmentInstance
115
+ # @param [Hash] payload Payload response from the API
116
+ # @return [OperatorAttachmentInstance] OperatorAttachmentInstance
117
+ def get_instance(payload)
118
+ OperatorAttachmentInstance.new(@version, payload)
119
+ end
120
+
121
+ ##
122
+ # Provide a user friendly representation
123
+ def to_s
124
+ '<Twilio.Intelligence.V2.OperatorAttachmentPage>'
125
+ end
126
+ end
127
+ class OperatorAttachmentInstance < InstanceResource
128
+ ##
129
+ # Initialize the OperatorAttachmentInstance
130
+ # @param [Version] version Version that contains the resource
131
+ # @param [Hash] payload payload that contains response from Twilio
132
+ # @param [String] account_sid The SID of the
133
+ # {Account}[https://www.twilio.com/docs/iam/api/account] that created this OperatorAttachment
134
+ # resource.
135
+ # @param [String] sid The SID of the Call resource to fetch.
136
+ # @return [OperatorAttachmentInstance] OperatorAttachmentInstance
137
+ def initialize(version, payload , service_sid: nil, operator_sid: nil)
138
+ super(version)
139
+
140
+ # Marshaled Properties
141
+ @properties = {
142
+ 'service_sid' => payload['service_sid'],
143
+ 'operator_sid' => payload['operator_sid'],
144
+ 'url' => payload['url'],
145
+ }
146
+
147
+ # Context
148
+ @instance_context = nil
149
+ @params = { 'service_sid' => service_sid || @properties['service_sid'] ,'operator_sid' => operator_sid || @properties['operator_sid'] , }
150
+ end
151
+
152
+ ##
153
+ # Generate an instance context for the instance, the context is capable of
154
+ # performing various actions. All instance actions are proxied to the context
155
+ # @return [OperatorAttachmentContext] CallContext for this CallInstance
156
+ def context
157
+ unless @instance_context
158
+ @instance_context = OperatorAttachmentContext.new(@version , @params['service_sid'], @params['operator_sid'])
159
+ end
160
+ @instance_context
161
+ end
162
+
163
+ ##
164
+ # @return [String] The unique SID identifier of the Service.
165
+ def service_sid
166
+ @properties['service_sid']
167
+ end
168
+
169
+ ##
170
+ # @return [String] The unique SID identifier of the Operator.
171
+ def operator_sid
172
+ @properties['operator_sid']
173
+ end
174
+
175
+ ##
176
+ # @return [String] The URL of this resource.
177
+ def url
178
+ @properties['url']
179
+ end
180
+
181
+ ##
182
+ # Create the OperatorAttachmentInstance
183
+ # @return [OperatorAttachmentInstance] Created OperatorAttachmentInstance
184
+ def create
185
+
186
+ context.create
187
+ end
188
+
189
+ ##
190
+ # Delete the OperatorAttachmentInstance
191
+ # @return [Boolean] True if delete succeeds, false otherwise
192
+ def delete
193
+
194
+ context.delete
195
+ end
196
+
197
+ ##
198
+ # Provide a user friendly representation
199
+ def to_s
200
+ values = @params.map{|k, v| "#{k}: #{v}"}.join(" ")
201
+ "<Twilio.Intelligence.V2.OperatorAttachmentInstance #{values}>"
202
+ end
203
+
204
+ ##
205
+ # Provide a detailed, user friendly representation
206
+ def inspect
207
+ values = @properties.map{|k, v| "#{k}: #{v}"}.join(" ")
208
+ "<Twilio.Intelligence.V2.OperatorAttachmentInstance #{values}>"
209
+ end
210
+ end
211
+
212
+ end
213
+ end
214
+ end
215
+ end