twilio-ruby 5.22.0 → 5.22.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 (53) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGES.md +15 -0
  3. data/README.md +2 -2
  4. data/lib/twilio-ruby/rest/client.rb +7 -0
  5. data/lib/twilio-ruby/rest/flex_api/v1/configuration.rb +14 -0
  6. data/lib/twilio-ruby/rest/messaging/v1/session.rb +1 -7
  7. data/lib/twilio-ruby/rest/proxy/v1/service/phone_number.rb +34 -32
  8. data/lib/twilio-ruby/rest/proxy/v1/service/session/interaction.rb +37 -35
  9. data/lib/twilio-ruby/rest/proxy/v1/service/session/participant/message_interaction.rb +45 -38
  10. data/lib/twilio-ruby/rest/proxy/v1/service/session/participant.rb +38 -34
  11. data/lib/twilio-ruby/rest/proxy/v1/service/session.rb +67 -52
  12. data/lib/twilio-ruby/rest/proxy/v1/service/short_code.rb +32 -23
  13. data/lib/twilio-ruby/rest/proxy/v1/service.rb +123 -79
  14. data/lib/twilio-ruby/rest/proxy/v1.rb +2 -1
  15. data/lib/twilio-ruby/rest/proxy.rb +2 -1
  16. data/lib/twilio-ruby/rest/serverless/v1/service/asset/asset_version.rb +366 -0
  17. data/lib/twilio-ruby/rest/serverless/v1/service/asset.rb +384 -0
  18. data/lib/twilio-ruby/rest/serverless/v1/service/build.rb +348 -0
  19. data/lib/twilio-ruby/rest/serverless/v1/service/environment/deployment.rb +358 -0
  20. data/lib/twilio-ruby/rest/serverless/v1/service/environment/variable.rb +398 -0
  21. data/lib/twilio-ruby/rest/serverless/v1/service/environment.rb +417 -0
  22. data/lib/twilio-ruby/rest/serverless/v1/service/function/function_version.rb +366 -0
  23. data/lib/twilio-ruby/rest/serverless/v1/service/function.rb +384 -0
  24. data/lib/twilio-ruby/rest/{verify → serverless}/v1/service.rb +139 -175
  25. data/lib/twilio-ruby/rest/{verify → serverless}/v1.rb +6 -6
  26. data/lib/twilio-ruby/rest/serverless.rb +46 -0
  27. data/lib/twilio-ruby/rest/trunking/v1/trunk/terminating_sip_domain.rb +419 -0
  28. data/lib/twilio-ruby/rest/trunking/v1/trunk.rb +26 -0
  29. data/lib/twilio-ruby/rest/verify/v2/service/verification.rb +46 -38
  30. data/lib/twilio-ruby/rest/verify/v2/service/verification_check.rb +24 -20
  31. data/lib/twilio-ruby/rest/verify/v2/service.rb +59 -57
  32. data/lib/twilio-ruby/rest/verify/v2.rb +2 -1
  33. data/lib/twilio-ruby/rest/verify.rb +2 -8
  34. data/lib/twilio-ruby/version.rb +1 -1
  35. data/spec/integration/flex_api/v1/configuration_spec.rb +15 -0
  36. data/spec/integration/messaging/v1/session/participant_spec.rb +10 -10
  37. data/spec/integration/serverless/v1/service/asset/asset_version_spec.rb +144 -0
  38. data/spec/integration/serverless/v1/service/asset_spec.rb +177 -0
  39. data/spec/integration/serverless/v1/service/build_spec.rb +184 -0
  40. data/spec/integration/serverless/v1/service/environment/deployment_spec.rb +137 -0
  41. data/spec/integration/serverless/v1/service/environment/variable_spec.rb +181 -0
  42. data/spec/integration/serverless/v1/service/environment_spec.rb +143 -0
  43. data/spec/integration/serverless/v1/service/function/function_version_spec.rb +144 -0
  44. data/spec/integration/serverless/v1/service/function_spec.rb +177 -0
  45. data/spec/integration/serverless/v1/service_spec.rb +180 -0
  46. data/spec/integration/trunking/v1/trunk/terminating_sip_domain_spec.rb +231 -0
  47. data/spec/integration/trunking/v1/trunk_spec.rb +12 -6
  48. metadata +34 -12
  49. data/lib/twilio-ruby/rest/verify/v1/service/verification.rb +0 -340
  50. data/lib/twilio-ruby/rest/verify/v1/service/verification_check.rb +0 -209
  51. data/spec/integration/verify/v1/service/verification_check_spec.rb +0 -54
  52. data/spec/integration/verify/v1/service/verification_spec.rb +0 -169
  53. data/spec/integration/verify/v1/service_spec.rb +0 -231
@@ -19,12 +19,12 @@ module Twilio
19
19
  ##
20
20
  # Initialize the MessageInteractionList
21
21
  # @param [Version] version Version that contains the resource
22
- # @param [String] service_sid The unique SID identifier of the parent
23
- # [Service](https://www.twilio.com/docs/proxy/api/service).
24
- # @param [String] session_sid The unique SID identifier of the parent
25
- # [Session](https://www.twilio.com/docs/proxy/api/session).
26
- # @param [String] participant_sid The unique SID identifier of the
27
- # [Participant](https://www.twilio.com/docs/proxy/api/participants).
22
+ # @param [String] service_sid The SID of the parent
23
+ # [Service](https://www.twilio.com/docs/proxy/api/service) resource.
24
+ # @param [String] session_sid The SID of the parent
25
+ # [Session](https://www.twilio.com/docs/proxy/api/session) resource.
26
+ # @param [String] participant_sid The SID of the
27
+ # [Participant](https://www.twilio.com/docs/proxy/api/participant) resource.
28
28
  # @return [MessageInteractionList] MessageInteractionList
29
29
  def initialize(version, service_sid: nil, session_sid: nil, participant_sid: nil)
30
30
  super(version)
@@ -38,7 +38,7 @@ module Twilio
38
38
  # Retrieve a single page of MessageInteractionInstance records from the API.
39
39
  # Request is executed immediately.
40
40
  # @param [String] body The message to send to the participant
41
- # @param [String] media_url Not currently supported during beta.
41
+ # @param [String] media_url Reserved. Not currently supported.
42
42
  # @return [MessageInteractionInstance] Newly created MessageInteractionInstance
43
43
  def create(body: :unset, media_url: :unset)
44
44
  data = Twilio::Values.of({'Body' => body, 'MediaUrl' => Twilio.serialize_list(media_url) { |e| e }, })
@@ -190,10 +190,16 @@ module Twilio
190
190
  ##
191
191
  # Initialize the MessageInteractionContext
192
192
  # @param [Version] version Version that contains the resource
193
- # @param [String] service_sid The service_sid
194
- # @param [String] session_sid The session_sid
195
- # @param [String] participant_sid The participant_sid
196
- # @param [String] sid The sid
193
+ # @param [String] service_sid The SID of the parent
194
+ # [Service](https://www.twilio.com/docs/proxy/api/service) of the resource to
195
+ # fetch.
196
+ # @param [String] session_sid The SID of the parent
197
+ # [Session](https://www.twilio.com/docs/proxy/api/session) of the resource to
198
+ # fetch.
199
+ # @param [String] participant_sid The SID of the
200
+ # [Participant](https://www.twilio.com/docs/proxy/api/participant) resource.
201
+ # @param [String] sid The Twilio-provided string that uniquely identifies the
202
+ # MessageInteraction resource to fetch.
197
203
  # @return [MessageInteractionContext] MessageInteractionContext
198
204
  def initialize(version, service_sid, session_sid, participant_sid, sid)
199
205
  super(version)
@@ -252,13 +258,14 @@ module Twilio
252
258
  # Initialize the MessageInteractionInstance
253
259
  # @param [Version] version Version that contains the resource
254
260
  # @param [Hash] payload payload that contains response from Twilio
255
- # @param [String] service_sid The unique SID identifier of the parent
256
- # [Service](https://www.twilio.com/docs/proxy/api/service).
257
- # @param [String] session_sid The unique SID identifier of the parent
258
- # [Session](https://www.twilio.com/docs/proxy/api/session).
259
- # @param [String] participant_sid The unique SID identifier of the
260
- # [Participant](https://www.twilio.com/docs/proxy/api/participants).
261
- # @param [String] sid The sid
261
+ # @param [String] service_sid The SID of the parent
262
+ # [Service](https://www.twilio.com/docs/proxy/api/service) resource.
263
+ # @param [String] session_sid The SID of the parent
264
+ # [Session](https://www.twilio.com/docs/proxy/api/session) resource.
265
+ # @param [String] participant_sid The SID of the
266
+ # [Participant](https://www.twilio.com/docs/proxy/api/participant) resource.
267
+ # @param [String] sid The Twilio-provided string that uniquely identifies the
268
+ # MessageInteraction resource to fetch.
262
269
  # @return [MessageInteractionInstance] MessageInteractionInstance
263
270
  def initialize(version, payload, service_sid: nil, session_sid: nil, participant_sid: nil, sid: nil)
264
271
  super(version)
@@ -315,121 +322,121 @@ module Twilio
315
322
  end
316
323
 
317
324
  ##
318
- # @return [String] A string that uniquely identifies this Message Interaction.
325
+ # @return [String] The unique string that identifies the resource
319
326
  def sid
320
327
  @properties['sid']
321
328
  end
322
329
 
323
330
  ##
324
- # @return [String] Session Sid.
331
+ # @return [String] The SID of the resource's parent Session
325
332
  def session_sid
326
333
  @properties['session_sid']
327
334
  end
328
335
 
329
336
  ##
330
- # @return [String] Service Sid.
337
+ # @return [String] The SID of the resource's parent Service
331
338
  def service_sid
332
339
  @properties['service_sid']
333
340
  end
334
341
 
335
342
  ##
336
- # @return [String] Account Sid.
343
+ # @return [String] The SID of the Account that created the resource
337
344
  def account_sid
338
345
  @properties['account_sid']
339
346
  end
340
347
 
341
348
  ##
342
- # @return [String] Message body
349
+ # @return [String] A JSON string that includes the message body sent to the participant
343
350
  def data
344
351
  @properties['data']
345
352
  end
346
353
 
347
354
  ##
348
- # @return [message_interaction.Type] The Type of this Message Interaction
355
+ # @return [message_interaction.Type] The Type of Message Interaction
349
356
  def type
350
357
  @properties['type']
351
358
  end
352
359
 
353
360
  ##
354
- # @return [String] Participant Sid.
361
+ # @return [String] The SID of the Participant resource
355
362
  def participant_sid
356
363
  @properties['participant_sid']
357
364
  end
358
365
 
359
366
  ##
360
- # @return [String] Always empty for Message Interactions.
367
+ # @return [String] Always empty for Message Interactions
361
368
  def inbound_participant_sid
362
369
  @properties['inbound_participant_sid']
363
370
  end
364
371
 
365
372
  ##
366
- # @return [String] Always empty for Message Interactions.
373
+ # @return [String] Always empty for Message Interactions
367
374
  def inbound_resource_sid
368
375
  @properties['inbound_resource_sid']
369
376
  end
370
377
 
371
378
  ##
372
- # @return [message_interaction.ResourceStatus] Always empty for Message Interactions.
379
+ # @return [message_interaction.ResourceStatus] Always empty for Message Interactions
373
380
  def inbound_resource_status
374
381
  @properties['inbound_resource_status']
375
382
  end
376
383
 
377
384
  ##
378
- # @return [String] Always empty for Message Interactions.
385
+ # @return [String] Always empty for Message Interactions
379
386
  def inbound_resource_type
380
387
  @properties['inbound_resource_type']
381
388
  end
382
389
 
383
390
  ##
384
- # @return [String] Always empty for Message Interactions.
391
+ # @return [String] Always empty for Message Interactions
385
392
  def inbound_resource_url
386
393
  @properties['inbound_resource_url']
387
394
  end
388
395
 
389
396
  ##
390
- # @return [String] Outbound Participant Sid.
397
+ # @return [String] The SID of the outbound Participant resource
391
398
  def outbound_participant_sid
392
399
  @properties['outbound_participant_sid']
393
400
  end
394
401
 
395
402
  ##
396
- # @return [String] Outbound message resource Sid.
403
+ # @return [String] The SID of the outbound Message resource
397
404
  def outbound_resource_sid
398
405
  @properties['outbound_resource_sid']
399
406
  end
400
407
 
401
408
  ##
402
- # @return [message_interaction.ResourceStatus] The Outbound Resource Status of this Message Interaction
409
+ # @return [message_interaction.ResourceStatus] The outbound resource status
403
410
  def outbound_resource_status
404
411
  @properties['outbound_resource_status']
405
412
  end
406
413
 
407
414
  ##
408
- # @return [String] Message
415
+ # @return [String] The outbound resource type
409
416
  def outbound_resource_type
410
417
  @properties['outbound_resource_type']
411
418
  end
412
419
 
413
420
  ##
414
- # @return [String] The URL of the Twilio message resource.
421
+ # @return [String] The URL of the Twilio message resource
415
422
  def outbound_resource_url
416
423
  @properties['outbound_resource_url']
417
424
  end
418
425
 
419
426
  ##
420
- # @return [Time] The date this Message Interaction was created
427
+ # @return [Time] The ISO 8601 date and time in GMT when the resource was created
421
428
  def date_created
422
429
  @properties['date_created']
423
430
  end
424
431
 
425
432
  ##
426
- # @return [Time] The date this Message Interaction was last updated
433
+ # @return [Time] The ISO 8601 date and time in GMT when the resource was last updated
427
434
  def date_updated
428
435
  @properties['date_updated']
429
436
  end
430
437
 
431
438
  ##
432
- # @return [String] The URL of this resource.
439
+ # @return [String] The absolute URL of the MessageInteraction resource
433
440
  def url
434
441
  @properties['url']
435
442
  end
@@ -18,10 +18,10 @@ module Twilio
18
18
  ##
19
19
  # Initialize the ParticipantList
20
20
  # @param [Version] version Version that contains the resource
21
- # @param [String] service_sid The unique SID identifier of the parent
22
- # [Service](https://www.twilio.com/docs/proxy/api/service).
23
- # @param [String] session_sid The unique SID identifier of the parent
24
- # [Session](https://www.twilio.com/docs/proxy/api/session).
21
+ # @param [String] service_sid The SID of the resource's parent
22
+ # [Service](https://www.twilio.com/docs/proxy/api/service) resource.
23
+ # @param [String] session_sid The SID of the parent
24
+ # [Session](https://www.twilio.com/docs/proxy/api/session) resource.
25
25
  # @return [ParticipantList] ParticipantList
26
26
  def initialize(version, service_sid: nil, session_sid: nil)
27
27
  super(version)
@@ -116,12 +116,14 @@ module Twilio
116
116
  ##
117
117
  # Retrieve a single page of ParticipantInstance records from the API.
118
118
  # Request is executed immediately.
119
- # @param [String] identifier The phone number of this Participant.
120
- # @param [String] friendly_name A human-readable description of this resource, up
121
- # to 64 characters. Should not include PII.
122
- # @param [String] proxy_identifier The proxy phone number to use for this
119
+ # @param [String] identifier The phone number of the Participant.
120
+ # @param [String] friendly_name The string that you assigned to describe the
121
+ # participant. This value must be 255 characters or fewer. **This value should not
122
+ # have PII.**
123
+ # @param [String] proxy_identifier The proxy phone number to use for the
123
124
  # Participant. If not specified, Proxy will select a number from the pool.
124
- # @param [String] proxy_identifier_sid The proxy_identifier_sid
125
+ # @param [String] proxy_identifier_sid The SID of the Proxy Identifier to assign
126
+ # to the Participant.
125
127
  # @return [ParticipantInstance] Newly created ParticipantInstance
126
128
  def create(identifier: nil, friendly_name: :unset, proxy_identifier: :unset, proxy_identifier_sid: :unset)
127
129
  data = Twilio::Values.of({
@@ -194,12 +196,14 @@ module Twilio
194
196
  ##
195
197
  # Initialize the ParticipantContext
196
198
  # @param [Version] version Version that contains the resource
197
- # @param [String] service_sid The unique SID identifier of the parent
198
- # [Service](https://www.twilio.com/docs/proxy/api/service).
199
- # @param [String] session_sid The unique SID identifier of the parent
200
- # [Session](https://www.twilio.com/docs/proxy/api/session).
201
- # @param [String] sid A 34 character string that uniquely identifies this
202
- # Participant.
199
+ # @param [String] service_sid The SID of the parent
200
+ # [Service](https://www.twilio.com/docs/proxy/api/service) of the resource to
201
+ # fetch.
202
+ # @param [String] session_sid The SID of the parent
203
+ # [Session](https://www.twilio.com/docs/proxy/api/session) of the resource to
204
+ # fetch.
205
+ # @param [String] sid The Twilio-provided string that uniquely identifies the
206
+ # Participant resource to fetch.
203
207
  # @return [ParticipantContext] ParticipantContext
204
208
  def initialize(version, service_sid, session_sid, sid)
205
209
  super(version)
@@ -291,12 +295,12 @@ module Twilio
291
295
  # Initialize the ParticipantInstance
292
296
  # @param [Version] version Version that contains the resource
293
297
  # @param [Hash] payload payload that contains response from Twilio
294
- # @param [String] service_sid The unique SID identifier of the parent
295
- # [Service](https://www.twilio.com/docs/proxy/api/service).
296
- # @param [String] session_sid The unique SID identifier of the parent
297
- # [Session](https://www.twilio.com/docs/proxy/api/session).
298
- # @param [String] sid A 34 character string that uniquely identifies this
299
- # Participant.
298
+ # @param [String] service_sid The SID of the resource's parent
299
+ # [Service](https://www.twilio.com/docs/proxy/api/service) resource.
300
+ # @param [String] session_sid The SID of the parent
301
+ # [Session](https://www.twilio.com/docs/proxy/api/session) resource.
302
+ # @param [String] sid The Twilio-provided string that uniquely identifies the
303
+ # Participant resource to fetch.
300
304
  # @return [ParticipantInstance] ParticipantInstance
301
305
  def initialize(version, payload, service_sid: nil, session_sid: nil, sid: nil)
302
306
  super(version)
@@ -344,79 +348,79 @@ module Twilio
344
348
  end
345
349
 
346
350
  ##
347
- # @return [String] A string that uniquely identifies this Participant.
351
+ # @return [String] The unique string that identifies the resource
348
352
  def sid
349
353
  @properties['sid']
350
354
  end
351
355
 
352
356
  ##
353
- # @return [String] Session Sid.
357
+ # @return [String] The SID of the resource's parent Session
354
358
  def session_sid
355
359
  @properties['session_sid']
356
360
  end
357
361
 
358
362
  ##
359
- # @return [String] Service Sid.
363
+ # @return [String] The SID of the resource's parent Service
360
364
  def service_sid
361
365
  @properties['service_sid']
362
366
  end
363
367
 
364
368
  ##
365
- # @return [String] Account Sid.
369
+ # @return [String] The SID of the Account that created the resource
366
370
  def account_sid
367
371
  @properties['account_sid']
368
372
  end
369
373
 
370
374
  ##
371
- # @return [String] A human-readable description of this resource.
375
+ # @return [String] The string that you assigned to describe the participant
372
376
  def friendly_name
373
377
  @properties['friendly_name']
374
378
  end
375
379
 
376
380
  ##
377
- # @return [String] The phone number of this Participant.
381
+ # @return [String] The phone number of the Participant
378
382
  def identifier
379
383
  @properties['identifier']
380
384
  end
381
385
 
382
386
  ##
383
- # @return [String] Proxy Identifier.
387
+ # @return [String] The phone number or short code of the participant's partner
384
388
  def proxy_identifier
385
389
  @properties['proxy_identifier']
386
390
  end
387
391
 
388
392
  ##
389
- # @return [String] Proxy Identifier Sid.
393
+ # @return [String] The SID of the Proxy Identifier assigned to the Participant
390
394
  def proxy_identifier_sid
391
395
  @properties['proxy_identifier_sid']
392
396
  end
393
397
 
394
398
  ##
395
- # @return [Time] The date this Participant was removed
399
+ # @return [Time] The ISO 8601 date the Participant was removed
396
400
  def date_deleted
397
401
  @properties['date_deleted']
398
402
  end
399
403
 
400
404
  ##
401
- # @return [Time] The date this Participant was created
405
+ # @return [Time] The ISO 8601 date and time in GMT when the resource was created
402
406
  def date_created
403
407
  @properties['date_created']
404
408
  end
405
409
 
406
410
  ##
407
- # @return [Time] The date this Participant was last updated
411
+ # @return [Time] The ISO 8601 date and time in GMT when the resource was last updated
408
412
  def date_updated
409
413
  @properties['date_updated']
410
414
  end
411
415
 
412
416
  ##
413
- # @return [String] The URL of this resource.
417
+ # @return [String] The absolute URL of the Participant resource
414
418
  def url
415
419
  @properties['url']
416
420
  end
417
421
 
418
422
  ##
419
- # @return [String] Nested resource URLs.
423
+ # @return [String] The URLs to resources related the participant
420
424
  def links
421
425
  @properties['links']
422
426
  end
@@ -17,7 +17,9 @@ module Twilio
17
17
  ##
18
18
  # Initialize the SessionList
19
19
  # @param [Version] version Version that contains the resource
20
- # @param [String] service_sid The unique SID identifier of the Service.
20
+ # @param [String] service_sid The SID of the
21
+ # [Service](https://www.twilio.com/docs/proxy/api/service) the session is
22
+ # associated with.
21
23
  # @return [SessionList] SessionList
22
24
  def initialize(version, service_sid: nil)
23
25
  super(version)
@@ -112,20 +114,22 @@ module Twilio
112
114
  ##
113
115
  # Retrieve a single page of SessionInstance records from the API.
114
116
  # Request is executed immediately.
115
- # @param [String] unique_name Your unique identifier for this Session such as a
116
- # Job ID or conversation ID. *Should not contain PII.*
117
- # @param [Time] date_expiry An absolute time (ISO 8601) in the future at which
118
- # this Session should close. If this is populated, it takes precedence over TTL
119
- # values.
120
- # @param [String] ttl The time, in seconds, after the latest of Session create
121
- # time or the Session's last Interaction time at which the session will expire.
122
- # @param [session.Mode] mode The type of communications mediums allowed on a
123
- # Session. Defaults to `voice-and-message`. Other options are `voice-only` or
124
- # `message-only`.
125
- # @param [session.Status] status Set this value to `closed` to close the session.
126
- # A Session can be re-opened by posting to a closed session with the value
127
- # `in-progress`. This will be `open` by default on create.
128
- # @param [Hash] participants The participants
117
+ # @param [String] unique_name An application-defined string that uniquely
118
+ # identifies the resource. This value must be 191 characters or fewer in length
119
+ # and be unique. **This value should not have PII.**
120
+ # @param [Time] date_expiry The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601)
121
+ # date when the Session should expire. If this is value is present, it overrides
122
+ # the `ttl` value.
123
+ # @param [String] ttl The time, in seconds, when the session will expire. The time
124
+ # is measured from the last Session create or the Session's last Interaction.
125
+ # @param [session.Mode] mode The Mode of the Session. Can be: `message-only`,
126
+ # `voice-only`, or `voice-and-message` and the default value is
127
+ # `voice-and-message`.
128
+ # @param [session.Status] status The initial status of the Session. Can be:
129
+ # `open`, `in-progress`, `closed`, `failed`, or `unknown`. The default is `open`
130
+ # on create.
131
+ # @param [Hash] participants The Participant objects to include in the new
132
+ # session.
129
133
  # @return [SessionInstance] Newly created SessionInstance
130
134
  def create(unique_name: :unset, date_expiry: :unset, ttl: :unset, mode: :unset, status: :unset, participants: :unset)
131
135
  data = Twilio::Values.of({
@@ -190,9 +194,11 @@ module Twilio
190
194
  ##
191
195
  # Initialize the SessionContext
192
196
  # @param [Version] version Version that contains the resource
193
- # @param [String] service_sid The unique SID identifier of the parent
194
- # [Service](https://www.twilio.com/docs/proxy/api/service).
195
- # @param [String] sid A 34 character string that uniquely identifies this Session.
197
+ # @param [String] service_sid The SID of the parent
198
+ # [Service](https://www.twilio.com/docs/proxy/api/service) of the resource to
199
+ # fetch.
200
+ # @param [String] sid The Twilio-provided string that uniquely identifies the
201
+ # Session resource to fetch.
196
202
  # @return [SessionContext] SessionContext
197
203
  def initialize(version, service_sid, sid)
198
204
  super(version)
@@ -230,14 +236,17 @@ module Twilio
230
236
 
231
237
  ##
232
238
  # Update the SessionInstance
233
- # @param [Time] date_expiry The date that this Session should expire, given in ISO
234
- # 8601 format.
235
- # @param [String] ttl The time, in seconds, after the latest of Session create
236
- # time or the Session's last Interaction time at which the session will expire.
237
- # @param [session.Mode] mode The mode
238
- # @param [session.Status] status The Status of this Session. Set to `in-progress`
239
- # to re-open a session or `closed` to close a session.
240
- # @param [Hash] participants The participants
239
+ # @param [Time] date_expiry The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601)
240
+ # date when the Session should expire. If this is value is present, it overrides
241
+ # the `ttl` value.
242
+ # @param [String] ttl The time, in seconds, when the session will expire. The time
243
+ # is measured from the last Session create or the Session's last Interaction.
244
+ # @param [session.Mode] mode The Mode of the Session. Can be: `message-only`,
245
+ # `voice-only`, or `voice-and-message` and the default value is
246
+ # `voice-and-message`.
247
+ # @param [session.Status] status The new status of the resource. Can be:
248
+ # `in-progress` to re-open a session or `closed` to close a session.
249
+ # @param [Hash] participants The Participant objects to include in the session.
241
250
  # @return [SessionInstance] Updated SessionInstance
242
251
  def update(date_expiry: :unset, ttl: :unset, mode: :unset, status: :unset, participants: :unset)
243
252
  data = Twilio::Values.of({
@@ -323,8 +332,11 @@ module Twilio
323
332
  # Initialize the SessionInstance
324
333
  # @param [Version] version Version that contains the resource
325
334
  # @param [Hash] payload payload that contains response from Twilio
326
- # @param [String] service_sid The unique SID identifier of the Service.
327
- # @param [String] sid A 34 character string that uniquely identifies this Session.
335
+ # @param [String] service_sid The SID of the
336
+ # [Service](https://www.twilio.com/docs/proxy/api/service) the session is
337
+ # associated with.
338
+ # @param [String] sid The Twilio-provided string that uniquely identifies the
339
+ # Session resource to fetch.
328
340
  # @return [SessionInstance] SessionInstance
329
341
  def initialize(version, payload, service_sid: nil, sid: nil)
330
342
  super(version)
@@ -366,97 +378,97 @@ module Twilio
366
378
  end
367
379
 
368
380
  ##
369
- # @return [String] A string that uniquely identifies this Session.
381
+ # @return [String] The unique string that identifies the resource
370
382
  def sid
371
383
  @properties['sid']
372
384
  end
373
385
 
374
386
  ##
375
- # @return [String] Service Sid.
387
+ # @return [String] The SID of the resource's parent Service
376
388
  def service_sid
377
389
  @properties['service_sid']
378
390
  end
379
391
 
380
392
  ##
381
- # @return [String] Account Sid.
393
+ # @return [String] The SID of the Account that created the resource
382
394
  def account_sid
383
395
  @properties['account_sid']
384
396
  end
385
397
 
386
398
  ##
387
- # @return [Time] The date this Session was started
399
+ # @return [Time] The ISO 8601 date when the Session started
388
400
  def date_started
389
401
  @properties['date_started']
390
402
  end
391
403
 
392
404
  ##
393
- # @return [Time] The date this Session was ended
405
+ # @return [Time] The ISO 8601 date when the Session ended
394
406
  def date_ended
395
407
  @properties['date_ended']
396
408
  end
397
409
 
398
410
  ##
399
- # @return [Time] The date this Session last had an interaction
411
+ # @return [Time] The ISO 8601 date when the Session last had an interaction
400
412
  def date_last_interaction
401
413
  @properties['date_last_interaction']
402
414
  end
403
415
 
404
416
  ##
405
- # @return [Time] The date this Session should expire
417
+ # @return [Time] The ISO 8601 date when the Session should expire
406
418
  def date_expiry
407
419
  @properties['date_expiry']
408
420
  end
409
421
 
410
422
  ##
411
- # @return [String] A unique, developer assigned identifier for this Session.
423
+ # @return [String] An application-defined string that uniquely identifies the resource
412
424
  def unique_name
413
425
  @properties['unique_name']
414
426
  end
415
427
 
416
428
  ##
417
- # @return [session.Status] The Status of this Session
429
+ # @return [session.Status] The status of the Session
418
430
  def status
419
431
  @properties['status']
420
432
  end
421
433
 
422
434
  ##
423
- # @return [String] Reason Session ended.
435
+ # @return [String] The reason the Session ended
424
436
  def closed_reason
425
437
  @properties['closed_reason']
426
438
  end
427
439
 
428
440
  ##
429
- # @return [String] TTL for a Session, in seconds.
441
+ # @return [String] When the session will expire
430
442
  def ttl
431
443
  @properties['ttl']
432
444
  end
433
445
 
434
446
  ##
435
- # @return [session.Mode] The Mode of this Session
447
+ # @return [session.Mode] The Mode of the Session
436
448
  def mode
437
449
  @properties['mode']
438
450
  end
439
451
 
440
452
  ##
441
- # @return [Time] The date this Session was created
453
+ # @return [Time] The ISO 8601 date and time in GMT when the resource was created
442
454
  def date_created
443
455
  @properties['date_created']
444
456
  end
445
457
 
446
458
  ##
447
- # @return [Time] The date this Session was last updated
459
+ # @return [Time] The ISO 8601 date and time in GMT when the resource was last updated
448
460
  def date_updated
449
461
  @properties['date_updated']
450
462
  end
451
463
 
452
464
  ##
453
- # @return [String] The URL of this resource.
465
+ # @return [String] The absolute URL of the Session resource
454
466
  def url
455
467
  @properties['url']
456
468
  end
457
469
 
458
470
  ##
459
- # @return [String] Nested resource URLs.
471
+ # @return [String] The URLs of resources related to the Session
460
472
  def links
461
473
  @properties['links']
462
474
  end
@@ -477,14 +489,17 @@ module Twilio
477
489
 
478
490
  ##
479
491
  # Update the SessionInstance
480
- # @param [Time] date_expiry The date that this Session should expire, given in ISO
481
- # 8601 format.
482
- # @param [String] ttl The time, in seconds, after the latest of Session create
483
- # time or the Session's last Interaction time at which the session will expire.
484
- # @param [session.Mode] mode The mode
485
- # @param [session.Status] status The Status of this Session. Set to `in-progress`
486
- # to re-open a session or `closed` to close a session.
487
- # @param [Hash] participants The participants
492
+ # @param [Time] date_expiry The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601)
493
+ # date when the Session should expire. If this is value is present, it overrides
494
+ # the `ttl` value.
495
+ # @param [String] ttl The time, in seconds, when the session will expire. The time
496
+ # is measured from the last Session create or the Session's last Interaction.
497
+ # @param [session.Mode] mode The Mode of the Session. Can be: `message-only`,
498
+ # `voice-only`, or `voice-and-message` and the default value is
499
+ # `voice-and-message`.
500
+ # @param [session.Status] status The new status of the resource. Can be:
501
+ # `in-progress` to re-open a session or `closed` to close a session.
502
+ # @param [Hash] participants The Participant objects to include in the session.
488
503
  # @return [SessionInstance] Updated SessionInstance
489
504
  def update(date_expiry: :unset, ttl: :unset, mode: :unset, status: :unset, participants: :unset)
490
505
  context.update(