twilio-ruby 7.5.1 → 7.6.0

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.
@@ -0,0 +1,38 @@
1
+ ##
2
+ # This code was generated by
3
+ # ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
4
+ # | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
5
+ # | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
6
+ #
7
+ # NOTE: This class is auto generated by OpenAPI Generator.
8
+ # https://openapi-generator.tech
9
+ # Do not edit the class manually.
10
+ # frozen_string_literal: true
11
+ module Twilio
12
+ module REST
13
+ class KnowledgeBase < Domain
14
+ ##
15
+ # Initialize knowledge domain
16
+ #
17
+ # @param twilio - The twilio client
18
+ #
19
+ def initialize(twilio)
20
+ super(twilio)
21
+ @base_url = "https://knowledge.twilio.com"
22
+ @host = "knowledge.twilio.com"
23
+ @port = 443
24
+ @v1 = nil
25
+ end
26
+
27
+ def v1
28
+ @v1 ||= Knowledge::V1.new self
29
+ end
30
+
31
+ ##
32
+ # Provide a user friendly representation
33
+ def to_s
34
+ '<Twilio::REST::Knowledge::V1>';
35
+ end
36
+ end
37
+ end
38
+ end
@@ -58,7 +58,7 @@ module Twilio
58
58
  ##
59
59
  # Fetch the PhoneNumberInstance
60
60
  # @param [String] country_code The [ISO country code](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) of the phone number to fetch. This is used to specify the country when the phone number is provided in a national format.
61
- # @param [Array[String]] type The type of information to return. Can be: `carrier` or `caller-name`. The default is null. Carrier information costs $0.005 per phone number looked up. Caller Name information is currently available only in the US and costs $0.01 per phone number looked up. To retrieve both types on information, specify this parameter twice; once with `carrier` and once with `caller-name` as the value.
61
+ # @param [Array[String]] type The type of information to return. Can be: `carrier` or `caller-name`. The default is null. To retrieve both types of information, specify this parameter twice; once with `carrier` and once with `caller-name` as the value.
62
62
  # @param [Array[String]] add_ons The `unique_name` of an Add-on you would like to invoke. Can be the `unique_name` of an Add-on that is installed on your account. You can specify multiple instances of this parameter to invoke multiple Add-ons. For more information about Add-ons, see the [Add-ons documentation](https://www.twilio.com/docs/add-ons).
63
63
  # @param [Hash] add_ons_data Data specific to the add-on you would like to invoke. The content and format of this value depends on the add-on.
64
64
  # @return [PhoneNumberInstance] Fetched PhoneNumberInstance
@@ -218,7 +218,7 @@ module Twilio
218
218
  ##
219
219
  # Fetch the PhoneNumberInstance
220
220
  # @param [String] country_code The [ISO country code](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) of the phone number to fetch. This is used to specify the country when the phone number is provided in a national format.
221
- # @param [Array[String]] type The type of information to return. Can be: `carrier` or `caller-name`. The default is null. Carrier information costs $0.005 per phone number looked up. Caller Name information is currently available only in the US and costs $0.01 per phone number looked up. To retrieve both types on information, specify this parameter twice; once with `carrier` and once with `caller-name` as the value.
221
+ # @param [Array[String]] type The type of information to return. Can be: `carrier` or `caller-name`. The default is null. To retrieve both types of information, specify this parameter twice; once with `carrier` and once with `caller-name` as the value.
222
222
  # @param [Array[String]] add_ons The `unique_name` of an Add-on you would like to invoke. Can be the `unique_name` of an Add-on that is installed on your account. You can specify multiple instances of this parameter to invoke multiple Add-ons. For more information about Add-ons, see the [Add-ons documentation](https://www.twilio.com/docs/add-ons).
223
223
  # @param [Hash] add_ons_data Data specific to the add-on you would like to invoke. The content and format of this value depends on the add-on.
224
224
  # @return [PhoneNumberInstance] Fetched PhoneNumberInstance
@@ -0,0 +1,556 @@
1
+ ##
2
+ # This code was generated by
3
+ # ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
4
+ # | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
5
+ # | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
6
+ #
7
+ # Twilio - Messaging
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 Messaging < MessagingBase
19
+ class V2 < Version
20
+ class ChannelsSenderList < ListResource
21
+
22
+ class MessagingV2ChannelsSenderProfileEmails
23
+ # @param [email]: [String] The email of the sender.
24
+ # @param [label]: [String] The label of the sender.
25
+ attr_accessor :email, :label
26
+ def initialize(payload)
27
+ @email = payload["email"]
28
+ @label = payload["label"]
29
+ end
30
+ def to_json(options = {})
31
+ {
32
+ "email": @email,
33
+ "label": @label,
34
+ }.to_json(options)
35
+ end
36
+ end
37
+
38
+ class MessagingV2ChannelsSenderProfileWebsites
39
+ # @param [label]: [String] The label of the sender.
40
+ # @param [website]: [String] The website of the sender.
41
+ attr_accessor :label, :website
42
+ def initialize(payload)
43
+ @label = payload["label"]
44
+ @website = payload["website"]
45
+ end
46
+ def to_json(options = {})
47
+ {
48
+ "label": @label,
49
+ "website": @website,
50
+ }.to_json(options)
51
+ end
52
+ end
53
+
54
+ class MessagingV2ChannelsSenderRequestsCreate
55
+ # @param [sender_id]: [String] The ID of this Sender prefixed with the channel, e.g., `whatsapp:E.164`
56
+ # @param [configuration]: [ChannelsSenderList.MessagingV2ChannelsSenderConfiguration]
57
+ # @param [webhook]: [ChannelsSenderList.MessagingV2ChannelsSenderWebhook]
58
+ # @param [profile]: [ChannelsSenderList.MessagingV2ChannelsSenderProfile]
59
+ attr_accessor :sender_id, :configuration, :webhook, :profile
60
+ def initialize(payload)
61
+ @sender_id = payload["sender_id"]
62
+ @configuration = payload["configuration"]
63
+ @webhook = payload["webhook"]
64
+ @profile = payload["profile"]
65
+ end
66
+ def to_json(options = {})
67
+ {
68
+ "sender_id": @sender_id,
69
+ "configuration": @configuration,
70
+ "webhook": @webhook,
71
+ "profile": @profile,
72
+ }.to_json(options)
73
+ end
74
+ end
75
+
76
+ class MessagingV2ChannelsSenderRequestsUpdate
77
+ # @param [configuration]: [ChannelsSenderList.MessagingV2ChannelsSenderConfiguration]
78
+ # @param [webhook]: [ChannelsSenderList.MessagingV2ChannelsSenderWebhook]
79
+ # @param [profile]: [ChannelsSenderList.MessagingV2ChannelsSenderProfile]
80
+ attr_accessor :configuration, :webhook, :profile
81
+ def initialize(payload)
82
+ @configuration = payload["configuration"]
83
+ @webhook = payload["webhook"]
84
+ @profile = payload["profile"]
85
+ end
86
+ def to_json(options = {})
87
+ {
88
+ "configuration": @configuration,
89
+ "webhook": @webhook,
90
+ "profile": @profile,
91
+ }.to_json(options)
92
+ end
93
+ end
94
+
95
+
96
+ class MessagingV2ChannelsSenderProfileEmails
97
+ # @param [email]: [String] The email of the sender.
98
+ # @param [label]: [String] The label of the sender.
99
+ attr_accessor :email, :label
100
+ def initialize(payload)
101
+ @email = payload["email"]
102
+ @label = payload["label"]
103
+ end
104
+ def to_json(options = {})
105
+ {
106
+ "email": @email,
107
+ "label": @label,
108
+ }.to_json(options)
109
+ end
110
+ end
111
+
112
+ class MessagingV2ChannelsSenderProfileWebsites
113
+ # @param [label]: [String] The label of the sender.
114
+ # @param [website]: [String] The website of the sender.
115
+ attr_accessor :label, :website
116
+ def initialize(payload)
117
+ @label = payload["label"]
118
+ @website = payload["website"]
119
+ end
120
+ def to_json(options = {})
121
+ {
122
+ "label": @label,
123
+ "website": @website,
124
+ }.to_json(options)
125
+ end
126
+ end
127
+
128
+ class MessagingV2ChannelsSenderRequestsCreate
129
+ # @param [sender_id]: [String] The ID of this Sender prefixed with the channel, e.g., `whatsapp:E.164`
130
+ # @param [configuration]: [ChannelsSenderList.MessagingV2ChannelsSenderConfiguration]
131
+ # @param [webhook]: [ChannelsSenderList.MessagingV2ChannelsSenderWebhook]
132
+ # @param [profile]: [ChannelsSenderList.MessagingV2ChannelsSenderProfile]
133
+ attr_accessor :sender_id, :configuration, :webhook, :profile
134
+ def initialize(payload)
135
+ @sender_id = payload["sender_id"]
136
+ @configuration = payload["configuration"]
137
+ @webhook = payload["webhook"]
138
+ @profile = payload["profile"]
139
+ end
140
+ def to_json(options = {})
141
+ {
142
+ "sender_id": @sender_id,
143
+ "configuration": @configuration,
144
+ "webhook": @webhook,
145
+ "profile": @profile,
146
+ }.to_json(options)
147
+ end
148
+ end
149
+
150
+ class MessagingV2ChannelsSenderRequestsUpdate
151
+ # @param [configuration]: [ChannelsSenderList.MessagingV2ChannelsSenderConfiguration]
152
+ # @param [webhook]: [ChannelsSenderList.MessagingV2ChannelsSenderWebhook]
153
+ # @param [profile]: [ChannelsSenderList.MessagingV2ChannelsSenderProfile]
154
+ attr_accessor :configuration, :webhook, :profile
155
+ def initialize(payload)
156
+ @configuration = payload["configuration"]
157
+ @webhook = payload["webhook"]
158
+ @profile = payload["profile"]
159
+ end
160
+ def to_json(options = {})
161
+ {
162
+ "configuration": @configuration,
163
+ "webhook": @webhook,
164
+ "profile": @profile,
165
+ }.to_json(options)
166
+ end
167
+ end
168
+
169
+
170
+ ##
171
+ # Initialize the ChannelsSenderList
172
+ # @param [Version] version Version that contains the resource
173
+ # @return [ChannelsSenderList] ChannelsSenderList
174
+ def initialize(version)
175
+ super(version)
176
+ # Path Solution
177
+ @solution = { }
178
+ @uri = "/Channels/Senders"
179
+
180
+ end
181
+ ##
182
+ # Create the ChannelsSenderInstance
183
+ # @param [MessagingV2ChannelsSenderRequestsCreate] messaging_v2_channels_sender_requests_create
184
+ # @return [ChannelsSenderInstance] Created ChannelsSenderInstance
185
+ def create(messaging_v2_channels_sender_requests_create: nil
186
+ )
187
+
188
+ headers = Twilio::Values.of({'Content-Type' => 'application/x-www-form-urlencoded', })
189
+ headers['Content-Type'] = 'application/json'
190
+
191
+
192
+
193
+
194
+ payload = @version.create('POST', @uri, headers: headers, data: messaging_v2_channels_sender_requests_create.to_json)
195
+ ChannelsSenderInstance.new(
196
+ @version,
197
+ payload,
198
+ )
199
+ end
200
+
201
+
202
+ ##
203
+ # Lists ChannelsSenderInstance records from the API as a list.
204
+ # Unlike stream(), this operation is eager and will load `limit` records into
205
+ # memory before returning.
206
+ # @param [String] channel
207
+ # @param [Integer] limit Upper limit for the number of records to return. stream()
208
+ # guarantees to never return more than limit. Default is no limit
209
+ # @param [Integer] page_size Number of records to fetch per request, when
210
+ # not set will use the default value of 50 records. If no page_size is defined
211
+ # but a limit is defined, stream() will attempt to read the limit with the most
212
+ # efficient page size, i.e. min(limit, 1000)
213
+ # @return [Array] Array of up to limit results
214
+ def list(channel: nil, limit: nil, page_size: nil)
215
+ self.stream(
216
+ channel: channel,
217
+ limit: limit,
218
+ page_size: page_size
219
+ ).entries
220
+ end
221
+
222
+ ##
223
+ # Streams Instance records from the API as an Enumerable.
224
+ # This operation lazily loads records as efficiently as possible until the limit
225
+ # is reached.
226
+ # @param [String] channel
227
+ # @param [Integer] limit Upper limit for the number of records to return. stream()
228
+ # guarantees to never return more than limit. Default is no limit
229
+ # @param [Integer] page_size Number of records to fetch per request, when
230
+ # not set will use the default value of 50 records. If no page_size is defined
231
+ # but a limit is defined, stream() will attempt to read the limit with the most
232
+ # efficient page size, i.e. min(limit, 1000)
233
+ # @return [Enumerable] Enumerable that will yield up to limit results
234
+ def stream(channel: nil, limit: nil, page_size: nil)
235
+ limits = @version.read_limits(limit, page_size)
236
+
237
+ page = self.page(
238
+ channel: channel,
239
+ page_size: limits[:page_size], )
240
+
241
+ @version.stream(page, limit: limits[:limit], page_limit: limits[:page_limit])
242
+ end
243
+
244
+ ##
245
+ # When passed a block, yields ChannelsSenderInstance records from the API.
246
+ # This operation lazily loads records as efficiently as possible until the limit
247
+ # is reached.
248
+ def each
249
+ limits = @version.read_limits
250
+
251
+ page = self.page(page_size: limits[:page_size], )
252
+
253
+ @version.stream(page,
254
+ limit: limits[:limit],
255
+ page_limit: limits[:page_limit]).each {|x| yield x}
256
+ end
257
+
258
+ ##
259
+ # Retrieve a single page of ChannelsSenderInstance records from the API.
260
+ # Request is executed immediately.
261
+ # @param [String] channel
262
+ # @param [String] page_token PageToken provided by the API
263
+ # @param [Integer] page_number Page Number, this value is simply for client state
264
+ # @param [Integer] page_size Number of records to return, defaults to 50
265
+ # @return [Page] Page of ChannelsSenderInstance
266
+ def page(channel: nil, page_token: :unset, page_number: :unset, page_size: :unset)
267
+ params = Twilio::Values.of({
268
+ 'Channel' => channel,
269
+ 'PageToken' => page_token,
270
+ 'Page' => page_number,
271
+ 'PageSize' => page_size,
272
+ })
273
+ headers = Twilio::Values.of({})
274
+
275
+
276
+
277
+ response = @version.page('GET', @uri, params: params, headers: headers)
278
+
279
+ ChannelsSenderPage.new(@version, response, @solution)
280
+ end
281
+
282
+ ##
283
+ # Retrieve a single page of ChannelsSenderInstance records from the API.
284
+ # Request is executed immediately.
285
+ # @param [String] target_url API-generated URL for the requested results page
286
+ # @return [Page] Page of ChannelsSenderInstance
287
+ def get_page(target_url)
288
+ response = @version.domain.request(
289
+ 'GET',
290
+ target_url
291
+ )
292
+ ChannelsSenderPage.new(@version, response, @solution)
293
+ end
294
+
295
+
296
+
297
+ # Provide a user friendly representation
298
+ def to_s
299
+ '#<Twilio.Messaging.V2.ChannelsSenderList>'
300
+ end
301
+ end
302
+
303
+
304
+ class ChannelsSenderContext < InstanceContext
305
+ ##
306
+ # Initialize the ChannelsSenderContext
307
+ # @param [Version] version Version that contains the resource
308
+ # @param [String] sid A 34 character string that uniquely identifies this Sender.
309
+ # @return [ChannelsSenderContext] ChannelsSenderContext
310
+ def initialize(version, sid)
311
+ super(version)
312
+
313
+ # Path Solution
314
+ @solution = { sid: sid, }
315
+ @uri = "/Channels/Senders/#{@solution[:sid]}"
316
+
317
+
318
+ end
319
+ ##
320
+ # Delete the ChannelsSenderInstance
321
+ # @return [Boolean] True if delete succeeds, false otherwise
322
+ def delete
323
+
324
+ headers = Twilio::Values.of({'Content-Type' => 'application/x-www-form-urlencoded', })
325
+
326
+
327
+
328
+ @version.delete('DELETE', @uri, headers: headers)
329
+ end
330
+
331
+ ##
332
+ # Fetch the ChannelsSenderInstance
333
+ # @return [ChannelsSenderInstance] Fetched ChannelsSenderInstance
334
+ def fetch
335
+
336
+ headers = Twilio::Values.of({'Content-Type' => 'application/x-www-form-urlencoded', })
337
+
338
+
339
+
340
+
341
+
342
+ payload = @version.fetch('GET', @uri, headers: headers)
343
+ ChannelsSenderInstance.new(
344
+ @version,
345
+ payload,
346
+ sid: @solution[:sid],
347
+ )
348
+ end
349
+
350
+ ##
351
+ # Update the ChannelsSenderInstance
352
+ # @param [MessagingV2ChannelsSenderRequestsUpdate] messaging_v2_channels_sender_requests_update
353
+ # @return [ChannelsSenderInstance] Updated ChannelsSenderInstance
354
+ def update(messaging_v2_channels_sender_requests_update: :unset
355
+ )
356
+
357
+ headers = Twilio::Values.of({'Content-Type' => 'application/x-www-form-urlencoded', })
358
+ headers['Content-Type'] = 'application/json'
359
+
360
+
361
+
362
+
363
+ payload = @version.update('POST', @uri, headers: headers, data: messaging_v2_channels_sender_requests_update.to_json)
364
+ ChannelsSenderInstance.new(
365
+ @version,
366
+ payload,
367
+ sid: @solution[:sid],
368
+ )
369
+ end
370
+
371
+
372
+ ##
373
+ # Provide a user friendly representation
374
+ def to_s
375
+ context = @solution.map{|k, v| "#{k}: #{v}"}.join(',')
376
+ "#<Twilio.Messaging.V2.ChannelsSenderContext #{context}>"
377
+ end
378
+
379
+ ##
380
+ # Provide a detailed, user friendly representation
381
+ def inspect
382
+ context = @solution.map{|k, v| "#{k}: #{v}"}.join(',')
383
+ "#<Twilio.Messaging.V2.ChannelsSenderContext #{context}>"
384
+ end
385
+ end
386
+
387
+ class ChannelsSenderPage < Page
388
+ ##
389
+ # Initialize the ChannelsSenderPage
390
+ # @param [Version] version Version that contains the resource
391
+ # @param [Response] response Response from the API
392
+ # @param [Hash] solution Path solution for the resource
393
+ # @return [ChannelsSenderPage] ChannelsSenderPage
394
+ def initialize(version, response, solution)
395
+ super(version, response)
396
+
397
+ # Path Solution
398
+ @solution = solution
399
+ end
400
+
401
+ ##
402
+ # Build an instance of ChannelsSenderInstance
403
+ # @param [Hash] payload Payload response from the API
404
+ # @return [ChannelsSenderInstance] ChannelsSenderInstance
405
+ def get_instance(payload)
406
+ ChannelsSenderInstance.new(@version, payload)
407
+ end
408
+
409
+ ##
410
+ # Provide a user friendly representation
411
+ def to_s
412
+ '<Twilio.Messaging.V2.ChannelsSenderPage>'
413
+ end
414
+ end
415
+ class ChannelsSenderInstance < InstanceResource
416
+ ##
417
+ # Initialize the ChannelsSenderInstance
418
+ # @param [Version] version Version that contains the resource
419
+ # @param [Hash] payload payload that contains response from Twilio
420
+ # @param [String] account_sid The SID of the
421
+ # {Account}[https://www.twilio.com/docs/iam/api/account] that created this ChannelsSender
422
+ # resource.
423
+ # @param [String] sid The SID of the Call resource to fetch.
424
+ # @return [ChannelsSenderInstance] ChannelsSenderInstance
425
+ def initialize(version, payload , sid: nil)
426
+ super(version)
427
+
428
+ # Marshaled Properties
429
+ @properties = {
430
+ 'sid' => payload['sid'],
431
+ 'status' => payload['status'],
432
+ 'sender_id' => payload['sender_id'],
433
+ 'configuration' => payload['configuration'],
434
+ 'webhook' => payload['webhook'],
435
+ 'profile' => payload['profile'],
436
+ 'properties' => payload['properties'],
437
+ 'offline_reasons' => payload['offline_reasons'],
438
+ 'url' => payload['url'],
439
+ }
440
+
441
+ # Context
442
+ @instance_context = nil
443
+ @params = { 'sid' => sid || @properties['sid'] , }
444
+ end
445
+
446
+ ##
447
+ # Generate an instance context for the instance, the context is capable of
448
+ # performing various actions. All instance actions are proxied to the context
449
+ # @return [ChannelsSenderContext] CallContext for this CallInstance
450
+ def context
451
+ unless @instance_context
452
+ @instance_context = ChannelsSenderContext.new(@version , @params['sid'])
453
+ end
454
+ @instance_context
455
+ end
456
+
457
+ ##
458
+ # @return [String] A 34 character string that uniquely identifies this Sender.
459
+ def sid
460
+ @properties['sid']
461
+ end
462
+
463
+ ##
464
+ # @return [Status]
465
+ def status
466
+ @properties['status']
467
+ end
468
+
469
+ ##
470
+ # @return [String] The ID of this Sender prefixed with the channel, e.g., `whatsapp:E.164`
471
+ def sender_id
472
+ @properties['sender_id']
473
+ end
474
+
475
+ ##
476
+ # @return [MessagingV2ChannelsSenderConfiguration]
477
+ def configuration
478
+ @properties['configuration']
479
+ end
480
+
481
+ ##
482
+ # @return [MessagingV2ChannelsSenderWebhook]
483
+ def webhook
484
+ @properties['webhook']
485
+ end
486
+
487
+ ##
488
+ # @return [MessagingV2ChannelsSenderProfile]
489
+ def profile
490
+ @properties['profile']
491
+ end
492
+
493
+ ##
494
+ # @return [MessagingV2ChannelsSenderProperties]
495
+ def properties
496
+ @properties['properties']
497
+ end
498
+
499
+ ##
500
+ # @return [Array<MessagingV2ChannelsSenderOfflineReasonsItems>] Reasons why the sender is offline., e.g., [{\"code\": \"21211400\", \"message\": \"Whatsapp business account is banned by provider {provider_name} | Credit line is assigned to another BSP\", \"more_info\": \"https://www.twilio.com/docs/errors/21211400\"}]
501
+ def offline_reasons
502
+ @properties['offline_reasons']
503
+ end
504
+
505
+ ##
506
+ # @return [String] The URL of this resource, relative to `https://messaging.twilio.com`.
507
+ def url
508
+ @properties['url']
509
+ end
510
+
511
+ ##
512
+ # Delete the ChannelsSenderInstance
513
+ # @return [Boolean] True if delete succeeds, false otherwise
514
+ def delete
515
+
516
+ context.delete
517
+ end
518
+
519
+ ##
520
+ # Fetch the ChannelsSenderInstance
521
+ # @return [ChannelsSenderInstance] Fetched ChannelsSenderInstance
522
+ def fetch
523
+
524
+ context.fetch
525
+ end
526
+
527
+ ##
528
+ # Update the ChannelsSenderInstance
529
+ # @param [MessagingV2ChannelsSenderRequestsUpdate] messaging_v2_channels_sender_requests_update
530
+ # @return [ChannelsSenderInstance] Updated ChannelsSenderInstance
531
+ def update(messaging_v2_channels_sender_requests_update: :unset
532
+ )
533
+
534
+ context.update(
535
+ )
536
+ end
537
+
538
+ ##
539
+ # Provide a user friendly representation
540
+ def to_s
541
+ values = @params.map{|k, v| "#{k}: #{v}"}.join(" ")
542
+ "<Twilio.Messaging.V2.ChannelsSenderInstance #{values}>"
543
+ end
544
+
545
+ ##
546
+ # Provide a detailed, user friendly representation
547
+ def inspect
548
+ values = @properties.map{|k, v| "#{k}: #{v}"}.join(" ")
549
+ "<Twilio.Messaging.V2.ChannelsSenderInstance #{values}>"
550
+ end
551
+ end
552
+
553
+ end
554
+ end
555
+ end
556
+ end
@@ -0,0 +1,49 @@
1
+ ##
2
+ # This code was generated by
3
+ # ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
4
+ # | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
5
+ # | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
6
+ #
7
+ # Twilio - Messaging
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
+ module Twilio
16
+ module REST
17
+ class Messaging
18
+ class V2 < Version
19
+ ##
20
+ # Initialize the V2 version of Messaging
21
+ def initialize(domain)
22
+ super
23
+ @version = 'v2'
24
+ @channels_senders = nil
25
+ end
26
+
27
+ ##
28
+ # @param [String] sid A 34 character string that uniquely identifies this Sender.
29
+ # @return [Twilio::REST::Messaging::V2::ChannelsSenderContext] if sid was passed.
30
+ # @return [Twilio::REST::Messaging::V2::ChannelsSenderList]
31
+ def channels_senders(sid=:unset)
32
+ if sid.nil?
33
+ raise ArgumentError, 'sid cannot be nil'
34
+ end
35
+ if sid == :unset
36
+ @channels_senders ||= ChannelsSenderList.new self
37
+ else
38
+ ChannelsSenderContext.new(self, sid)
39
+ end
40
+ end
41
+ ##
42
+ # Provide a user friendly representation
43
+ def to_s
44
+ '<Twilio::REST::Messaging::V2>';
45
+ end
46
+ end
47
+ end
48
+ end
49
+ end