twilio-ruby 5.20.1 → 5.21.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (37) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGES.md +22 -0
  3. data/README.md +2 -2
  4. data/lib/twilio-ruby/rest/accounts/v1/credential.rb +4 -4
  5. data/lib/twilio-ruby/rest/accounts/v1/credential/aws.rb +21 -20
  6. data/lib/twilio-ruby/rest/accounts/v1/credential/public_key.rb +21 -19
  7. data/lib/twilio-ruby/rest/api.rb +8 -7
  8. data/lib/twilio-ruby/rest/api/v2010/account/address/dependent_phone_number.rb +32 -28
  9. data/lib/twilio-ruby/rest/api/v2010/account/call/notification.rb +56 -37
  10. data/lib/twilio-ruby/rest/api/v2010/account/call/recording.rb +27 -27
  11. data/lib/twilio-ruby/rest/api/v2010/account/conference/participant.rb +248 -165
  12. data/lib/twilio-ruby/rest/api/v2010/account/conference/recording.rb +35 -35
  13. data/lib/twilio-ruby/rest/api/v2010/account/key.rb +15 -11
  14. data/lib/twilio-ruby/rest/api/v2010/account/message.rb +104 -114
  15. data/lib/twilio-ruby/rest/api/v2010/account/message/media.rb +4 -4
  16. data/lib/twilio-ruby/rest/api/v2010/account/recording.rb +48 -46
  17. data/lib/twilio-ruby/rest/api/v2010/account/recording/add_on_result.rb +29 -22
  18. data/lib/twilio-ruby/rest/api/v2010/account/recording/add_on_result/payload.rb +36 -28
  19. data/lib/twilio-ruby/rest/api/v2010/account/recording/transcription.rb +35 -21
  20. data/lib/twilio-ruby/rest/api/v2010/account/transcription.rb +24 -20
  21. data/lib/twilio-ruby/rest/api/v2010/account/validation_request.rb +27 -27
  22. data/lib/twilio-ruby/rest/authy/v1/service/entity/factor.rb +7 -0
  23. data/lib/twilio-ruby/rest/authy/v1/service/entity/factor/challenge.rb +7 -0
  24. data/lib/twilio-ruby/rest/client.rb +8 -7
  25. data/lib/twilio-ruby/rest/fax.rb +2 -1
  26. data/lib/twilio-ruby/rest/fax/v1.rb +2 -1
  27. data/lib/twilio-ruby/rest/fax/v1/fax.rb +85 -75
  28. data/lib/twilio-ruby/rest/fax/v1/fax/fax_media.rb +16 -16
  29. data/lib/twilio-ruby/rest/verify/v1/service.rb +8 -2
  30. data/lib/twilio-ruby/rest/verify/v1/service/verification.rb +120 -3
  31. data/lib/twilio-ruby/rest/video/v1/composition.rb +1 -1
  32. data/lib/twilio-ruby/version.rb +1 -1
  33. data/spec/integration/authy/v1/service/entity/factor/challenge_spec.rb +5 -0
  34. data/spec/integration/authy/v1/service/entity/factor_spec.rb +4 -0
  35. data/spec/integration/verify/v1/service/verification_spec.rb +107 -1
  36. data/spec/integration/video/v1/composition_spec.rb +28 -3
  37. metadata +2 -2
@@ -17,8 +17,8 @@ module Twilio
17
17
  # Initialize the RecordingList
18
18
  # @param [Version] version Version that contains the resource
19
19
  # @param [String] account_sid The SID of the
20
- # [Account](https://www.twilio.com/docs/api/rest/account) that created this
21
- # ConferenceRecording resource.
20
+ # [Account](https://www.twilio.com/docs/api/rest/account) that created the
21
+ # Conference Recording resource.
22
22
  # @param [String] conference_sid The Conference SID that identifies the conference
23
23
  # associated with the recording.
24
24
  # @return [RecordingList] RecordingList
@@ -34,9 +34,9 @@ module Twilio
34
34
  # Lists RecordingInstance records from the API as a list.
35
35
  # Unlike stream(), this operation is eager and will load `limit` records into
36
36
  # memory before returning.
37
- # @param [Time] date_created_before The `date_created` value, specified as `YYYY-MM-DD`, of the resources to read
38
- # @param [Time] date_created The `date_created` value, specified as `YYYY-MM-DD`, of the resources to read
39
- # @param [Time] date_created_after The `date_created` value, specified as `YYYY-MM-DD`, of the resources to read
37
+ # @param [Time] date_created_before The `YYYY-MM-DD` value of the resources to read
38
+ # @param [Time] date_created The `YYYY-MM-DD` value of the resources to read
39
+ # @param [Time] date_created_after The `YYYY-MM-DD` value of the resources to read
40
40
  # @param [Integer] limit Upper limit for the number of records to return. stream()
41
41
  # guarantees to never return more than limit. Default is no limit
42
42
  # @param [Integer] page_size Number of records to fetch per request, when
@@ -58,9 +58,9 @@ module Twilio
58
58
  # Streams RecordingInstance records from the API as an Enumerable.
59
59
  # This operation lazily loads records as efficiently as possible until the limit
60
60
  # is reached.
61
- # @param [Time] date_created_before The `date_created` value, specified as `YYYY-MM-DD`, of the resources to read
62
- # @param [Time] date_created The `date_created` value, specified as `YYYY-MM-DD`, of the resources to read
63
- # @param [Time] date_created_after The `date_created` value, specified as `YYYY-MM-DD`, of the resources to read
61
+ # @param [Time] date_created_before The `YYYY-MM-DD` value of the resources to read
62
+ # @param [Time] date_created The `YYYY-MM-DD` value of the resources to read
63
+ # @param [Time] date_created_after The `YYYY-MM-DD` value of the resources to read
64
64
  # @param [Integer] limit Upper limit for the number of records to return. stream()
65
65
  # guarantees to never return more than limit. Default is no limit.
66
66
  # @param [Integer] page_size Number of records to fetch per request, when
@@ -98,9 +98,9 @@ module Twilio
98
98
  ##
99
99
  # Retrieve a single page of RecordingInstance records from the API.
100
100
  # Request is executed immediately.
101
- # @param [Time] date_created_before The `date_created` value, specified as `YYYY-MM-DD`, of the resources to read
102
- # @param [Time] date_created The `date_created` value, specified as `YYYY-MM-DD`, of the resources to read
103
- # @param [Time] date_created_after The `date_created` value, specified as `YYYY-MM-DD`, of the resources to read
101
+ # @param [Time] date_created_before The `YYYY-MM-DD` value of the resources to read
102
+ # @param [Time] date_created The `YYYY-MM-DD` value of the resources to read
103
+ # @param [Time] date_created_after The `YYYY-MM-DD` value of the resources to read
104
104
  # @param [String] page_token PageToken provided by the API
105
105
  # @param [Integer] page_number Page Number, this value is simply for client state
106
106
  # @param [Integer] page_size Number of records to return, defaults to 50
@@ -182,11 +182,11 @@ module Twilio
182
182
  # @param [Version] version Version that contains the resource
183
183
  # @param [String] account_sid The SID of the
184
184
  # [Account](https://www.twilio.com/docs/api/rest/account) that created the
185
- # ConferenceRecording resource(s) to fetch.
185
+ # Conference Recording resource to fetch.
186
186
  # @param [String] conference_sid The Conference SID that identifies the conference
187
187
  # associated with the recording to fetch.
188
188
  # @param [String] sid The Twilio-provided string that uniquely identifies the
189
- # ConferenceRecording resource to fetch
189
+ # Conference Recording resource to fetch.
190
190
  # @return [RecordingContext] RecordingContext
191
191
  def initialize(version, account_sid, conference_sid, sid)
192
192
  super(version)
@@ -198,10 +198,10 @@ module Twilio
198
198
 
199
199
  ##
200
200
  # Update the RecordingInstance
201
- # @param [recording.Status] status The new status of the resource. Can be:
202
- # `stopped`, `paused`, or `in-progress`
201
+ # @param [recording.Status] status The new status of the recording. Can be:
202
+ # `stopped`, `paused`, `in-progress`.
203
203
  # @param [String] pause_behavior Whether to record during a pause. Can be: `skip`
204
- # or `silence` and the default is `silence`. `skip` does not record during the
204
+ # or `silence` and the default is `silence`. `skip` does not record during the
205
205
  # pause period, while `silence` will replace the actual audio of the call with
206
206
  # silence during the pause period. This parameter only applies when setting
207
207
  # `status` is set to `paused`.
@@ -273,12 +273,12 @@ module Twilio
273
273
  # @param [Version] version Version that contains the resource
274
274
  # @param [Hash] payload payload that contains response from Twilio
275
275
  # @param [String] account_sid The SID of the
276
- # [Account](https://www.twilio.com/docs/api/rest/account) that created this
277
- # ConferenceRecording resource.
276
+ # [Account](https://www.twilio.com/docs/api/rest/account) that created the
277
+ # Conference Recording resource.
278
278
  # @param [String] conference_sid The Conference SID that identifies the conference
279
279
  # associated with the recording.
280
280
  # @param [String] sid The Twilio-provided string that uniquely identifies the
281
- # ConferenceRecording resource to fetch
281
+ # Conference Recording resource to fetch.
282
282
  # @return [RecordingInstance] RecordingInstance
283
283
  def initialize(version, payload, account_sid: nil, conference_sid: nil, sid: nil)
284
284
  super(version)
@@ -330,7 +330,7 @@ module Twilio
330
330
  end
331
331
 
332
332
  ##
333
- # @return [String] The SID of the Account that created this resource
333
+ # @return [String] The SID of the Account that created the resource
334
334
  def account_sid
335
335
  @properties['account_sid']
336
336
  end
@@ -342,7 +342,7 @@ module Twilio
342
342
  end
343
343
 
344
344
  ##
345
- # @return [String] The SID of the Call this resource is associated with
345
+ # @return [String] The SID of the Call the resource is associated with
346
346
  def call_sid
347
347
  @properties['call_sid']
348
348
  end
@@ -354,13 +354,13 @@ module Twilio
354
354
  end
355
355
 
356
356
  ##
357
- # @return [Time] The RFC 2822 date and time in GMT that this resource was created
357
+ # @return [Time] The RFC 2822 date and time in GMT that the resource was created
358
358
  def date_created
359
359
  @properties['date_created']
360
360
  end
361
361
 
362
362
  ##
363
- # @return [Time] The RFC 2822 date and time in GMT that this resource was last updated
363
+ # @return [Time] The RFC 2822 date and time in GMT that the resource was last updated
364
364
  def date_updated
365
365
  @properties['date_updated']
366
366
  end
@@ -372,31 +372,31 @@ module Twilio
372
372
  end
373
373
 
374
374
  ##
375
- # @return [String] The length of the recording, in seconds
375
+ # @return [String] The length of the recording in seconds
376
376
  def duration
377
377
  @properties['duration']
378
378
  end
379
379
 
380
380
  ##
381
- # @return [String] The unique string that identifies this resource
381
+ # @return [String] The unique string that identifies the resource
382
382
  def sid
383
383
  @properties['sid']
384
384
  end
385
385
 
386
386
  ##
387
- # @return [String] The one-time cost of creating this recording
387
+ # @return [String] The one-time cost of creating the recording.
388
388
  def price
389
389
  @properties['price']
390
390
  end
391
391
 
392
392
  ##
393
- # @return [String] The currency used in the price property
393
+ # @return [String] The currency used in the price property.
394
394
  def price_unit
395
395
  @properties['price_unit']
396
396
  end
397
397
 
398
398
  ##
399
- # @return [recording.Status] The status of this recording
399
+ # @return [recording.Status] The status of the recording
400
400
  def status
401
401
  @properties['status']
402
402
  end
@@ -408,35 +408,35 @@ module Twilio
408
408
  end
409
409
 
410
410
  ##
411
- # @return [recording.Source] How this recording was created
411
+ # @return [recording.Source] How the recording was created
412
412
  def source
413
413
  @properties['source']
414
414
  end
415
415
 
416
416
  ##
417
- # @return [String] More information about why the recording is missing, if Status is `absent`
417
+ # @return [String] More information about why the recording is missing, if status is `absent`.
418
418
  def error_code
419
419
  @properties['error_code']
420
420
  end
421
421
 
422
422
  ##
423
- # @return [Hash] Details about how to decrypt the recording
423
+ # @return [Hash] How to decrypt the recording.
424
424
  def encryption_details
425
425
  @properties['encryption_details']
426
426
  end
427
427
 
428
428
  ##
429
- # @return [String] The URI of this resource, relative to `https://api.twilio.com`
429
+ # @return [String] The URI of the resource, relative to `https://api.twilio.com`
430
430
  def uri
431
431
  @properties['uri']
432
432
  end
433
433
 
434
434
  ##
435
435
  # Update the RecordingInstance
436
- # @param [recording.Status] status The new status of the resource. Can be:
437
- # `stopped`, `paused`, or `in-progress`
436
+ # @param [recording.Status] status The new status of the recording. Can be:
437
+ # `stopped`, `paused`, `in-progress`.
438
438
  # @param [String] pause_behavior Whether to record during a pause. Can be: `skip`
439
- # or `silence` and the default is `silence`. `skip` does not record during the
439
+ # or `silence` and the default is `silence`. `skip` does not record during the
440
440
  # pause period, while `silence` will replace the actual audio of the call with
441
441
  # silence during the pause period. This parameter only applies when setting
442
442
  # `status` is set to `paused`.
@@ -148,8 +148,11 @@ module Twilio
148
148
  ##
149
149
  # Initialize the KeyContext
150
150
  # @param [Version] version Version that contains the resource
151
- # @param [String] account_sid The account_sid
152
- # @param [String] sid The sid
151
+ # @param [String] account_sid The SID of the
152
+ # [Account](https://www.twilio.com/docs/api/rest/account) that created the Key
153
+ # resource to fetch.
154
+ # @param [String] sid The Twilio-provided string that uniquely identifies the Key
155
+ # resource to fetch.
153
156
  # @return [KeyContext] KeyContext
154
157
  def initialize(version, account_sid, sid)
155
158
  super(version)
@@ -176,8 +179,8 @@ module Twilio
176
179
 
177
180
  ##
178
181
  # Update the KeyInstance
179
- # @param [String] friendly_name A descriptive string for this resource, chosen by
180
- # your application, up to 64 characters long.
182
+ # @param [String] friendly_name A descriptive string that you create to describe
183
+ # the resource. It can be up to 64 characters long.
181
184
  # @return [KeyInstance] Updated KeyInstance
182
185
  def update(friendly_name: :unset)
183
186
  data = Twilio::Values.of({'FriendlyName' => friendly_name, })
@@ -220,7 +223,8 @@ module Twilio
220
223
  # @param [Hash] payload payload that contains response from Twilio
221
224
  # @param [String] account_sid A 34 character string that uniquely identifies this
222
225
  # resource.
223
- # @param [String] sid The sid
226
+ # @param [String] sid The Twilio-provided string that uniquely identifies the Key
227
+ # resource to fetch.
224
228
  # @return [KeyInstance] KeyInstance
225
229
  def initialize(version, payload, account_sid: nil, sid: nil)
226
230
  super(version)
@@ -250,25 +254,25 @@ module Twilio
250
254
  end
251
255
 
252
256
  ##
253
- # @return [String] A 34 character string that uniquely identifies this API Key.
257
+ # @return [String] The unique string that identifies the resource
254
258
  def sid
255
259
  @properties['sid']
256
260
  end
257
261
 
258
262
  ##
259
- # @return [String] A descriptive string for this resource, chosen by your application, up to 64 characters long.
263
+ # @return [String] The string that you assigned to describe the resource
260
264
  def friendly_name
261
265
  @properties['friendly_name']
262
266
  end
263
267
 
264
268
  ##
265
- # @return [Time] The date-time this API Key was created, given as a RFC 2822 Timestamp.
269
+ # @return [Time] The RFC 2822 date and time in GMT that the resource was created
266
270
  def date_created
267
271
  @properties['date_created']
268
272
  end
269
273
 
270
274
  ##
271
- # @return [Time] The date-time this API Key was most recently updated, given as a RFC 2822 Timestamp.
275
+ # @return [Time] The RFC 2822 date and time in GMT that the resource was last updated
272
276
  def date_updated
273
277
  @properties['date_updated']
274
278
  end
@@ -282,8 +286,8 @@ module Twilio
282
286
 
283
287
  ##
284
288
  # Update the KeyInstance
285
- # @param [String] friendly_name A descriptive string for this resource, chosen by
286
- # your application, up to 64 characters long.
289
+ # @param [String] friendly_name A descriptive string that you create to describe
290
+ # the resource. It can be up to 64 characters long.
287
291
  # @return [KeyInstance] Updated KeyInstance
288
292
  def update(friendly_name: :unset)
289
293
  context.update(friendly_name: friendly_name, )
@@ -15,8 +15,9 @@ module Twilio
15
15
  ##
16
16
  # Initialize the MessageList
17
17
  # @param [Version] version Version that contains the resource
18
- # @param [String] account_sid The unique id of the
19
- # [Account](https://www.twilio.com/docs/api/rest/account) that sent this message.
18
+ # @param [String] account_sid The SID of the
19
+ # [Account](https://www.twilio.com/docs/api/rest/account) that sent the message
20
+ # that created the resource.
20
21
  # @return [MessageList] MessageList
21
22
  def initialize(version, account_sid: nil)
22
23
  super(version)
@@ -29,87 +30,76 @@ module Twilio
29
30
  ##
30
31
  # Retrieve a single page of MessageInstance records from the API.
31
32
  # Request is executed immediately.
32
- # @param [String] to The destination phone number for SMS/MMS or a [Channel user
33
+ # @param [String] to The destination phone number in
34
+ # [E.164](https://www.twilio.com/docs/glossary/what-e164) format for SMS/MMS or
35
+ # [Channel user
33
36
  # address](https://www.twilio.com/docs/sms/channels#channel-addresses) for other
34
- # 3rd party channels. Destination phone numbers should be formatted with a '+' and
35
- # country code e.g., `+16175551212`
36
- # ([E.164](https://www.twilio.com/docs/glossary/what-e164) format).
37
- # @param [String] status_callback A URL where Twilio will POST each time your
38
- # message status changes to one of the following: `queued`, `failed`, `sent`,
39
- # `delivered`, or `undelivered`. Twilio will POST its [standard request
37
+ # 3rd-party channels.
38
+ # @param [String] status_callback The URL we should call using the
39
+ # `status_callback_method` to send status information to your application. If
40
+ # specified, we POST these message status changes to the URL: `queued`, `failed`,
41
+ # `sent`, `delivered`, or `undelivered`. Twilio will POST its [standard request
40
42
  # parameters](https://www.twilio.com/docs/sms/twiml#request-parameters) as well as
41
43
  # some additional parameters including `MessageSid`, `MessageStatus`, and
42
- # `ErrorCode`(see more details [below](#statuscallback-request-parameters)). If
43
- # you include this parameter in addition to a `MessagingServiceSid`, Twilio will
44
- # override the Status Callback URL of the [Messaging
44
+ # `ErrorCode`. If you include this parameter with the `messaging_service_sid`, we
45
+ # use this URL instead of the Status Callback URL of the [Messaging
45
46
  # Service](https://www.twilio.com/docs/sms/services/api). URLs must contain a
46
- # valid hostname underscores are not allowed.
47
- # @param [String] application_sid Twilio will POST a `MessageSid` as well as
48
- # `MessageStatus=sent` or `MessageStatus=failed` to the URL in the
49
- # `MessageStatusCallback` property of this
50
- # [application](https://www.twilio.com/docs/usage/api/applications). If the
51
- # `StatusCallback` parameter is also passed, the application's
52
- # `MessageStatusCallback` parameter will take precedence.
53
- # @param [String] max_price The total maximum price up to the fourth decimal
54
- # (0.0001) in US dollars acceptable for the message to be delivered. *All messages
55
- # will be queued for delivery regardless of the price point.* A POST request will
56
- # later be made to your Status Callback URL with a status change of `Sent` or
57
- # `Failed`. When the price of the message is greater than this value, the message
58
- # will fail and not be sent. When `MaxPrice` is not set, all prices for the
59
- # message are accepted.
60
- # @param [Boolean] provide_feedback Set this value to `true` if you are sending
61
- # messages that have a trackable user action and you intend to confirm delivery of
62
- # the message using the [Message Feedback
63
- # API](https://www.twilio.com/docs/sms/api/message-feedback). This parameter is
64
- # `false` by default.
65
- # @param [String] validity_period The number of seconds that the message can
66
- # remain in a Twilio queue. After exceeding this time limit, the message will fail
67
- # and a POST request will later be made to your Status Callback URL. Valid values
68
- # are between 1 and 14400 seconds (the default). Please note that Twilio cannot
69
- # guarantee that a message will not be queued by the carrier after they accept the
70
- # message. We do not recommend setting validity periods of less than 5 seconds.
71
- # @param [String] max_rate The max_rate
72
- # @param [Boolean] force_delivery The force_delivery
73
- # @param [String] provider_sid The provider_sid
74
- # @param [message.ContentRetention] content_retention The content_retention
75
- # @param [message.AddressRetention] address_retention The address_retention
76
- # @param [Boolean] smart_encoded The smart_encoded
77
- # @param [String] interactive_data A JSON string that represents interactive
78
- # message which is a category of messages including list picker, time picker, and
79
- # an Apple Pay request.
80
- # @param [Boolean] force_opt_in A boolean that forcefully whitelists a from:to
81
- # pair when set to true.
82
- # @param [String] from A Twilio phone number (in
83
- # [E.164](https://www.twilio.com/docs/glossary/what-e164) format), [alphanumeric
47
+ # valid hostname and underscores are not allowed.
48
+ # @param [String] application_sid The SID of the application that should receive
49
+ # message status. We POST a `message_sid` parameter and a `message_status`
50
+ # parameter with a value of `sent` or `failed` to the
51
+ # [application](https://www.twilio.com/docs/usage/api/applications)'s
52
+ # `message_status_callback`. If a `status_callback` parameter is also passed, it
53
+ # will be ignored and the application's `message_status_callback` parameter will
54
+ # be used.
55
+ # @param [String] max_price The maximum total price in US dollars that you will
56
+ # pay for the message to be delivered. Can be a decimal value that has up to 4
57
+ # decimal places. All messages are queued for delivery and the message cost is
58
+ # checked before the message is sent. If the cost exceeds `max_price`, the message
59
+ # will fail and a status of `Failed` is sent to the status callback. If `MaxPrice`
60
+ # is not set, the message cost is not checked.
61
+ # @param [Boolean] provide_feedback Whether to confirm delivery of the message.
62
+ # Set this value to `true` if you are sending messages that have a trackable user
63
+ # action and you intend to confirm delivery of the message using the [Message
64
+ # Feedback API](https://www.twilio.com/docs/sms/api/message-feedback). This
65
+ # parameter is `false` by default.
66
+ # @param [String] validity_period How long in seconds the message can remain in
67
+ # our outgoing message queue. After this period elapses, the message fails and we
68
+ # call your status callback. Can be between 1 and the default value of 14,400
69
+ # seconds. After a message has been accepted by a carrier, however, we cannot
70
+ # guarantee that the message will not be queued after this period. We recommend
71
+ # that this value be at least 5 seconds.
72
+ # @param [Boolean] smart_encoded Whether to detect Unicode characters that have a
73
+ # similar GSM-7 character and replace them. Can be: `true` or `false`.
74
+ # @param [String] interactive_data A JSON string that represents an interactive
75
+ # message. An interactive message is a category of messages that includes a list
76
+ # picker, a time picker, and an Apple Pay request.
77
+ # @param [Boolean] force_opt_in Whether to forcefully whitelist a from:to pair.
78
+ # Can be: `true` or `false`.
79
+ # @param [String] from A Twilio phone number in
80
+ # [E.164](https://www.twilio.com/docs/glossary/what-e164) format, an [alphanumeric
84
81
  # sender
85
- # ID](https://www.twilio.com/docs/sms/send-messages#use-an-alphanumeric-sender-id)
86
- # or a [Channel Endpoint
87
- # address](https://www.twilio.com/docs/sms/channels#channel-addresses) enabled for
88
- # the type of message you wish to send. Phone numbers or [short
89
- # codes](https://www.twilio.com/docs/sms/api/short-codes) purchased from Twilio
90
- # work here. You cannot (for example) spoof messages from your own cell phone
91
- # number. *Do not use this parameter if you are using `MessagingServiceSid`.*
92
- # @param [String] messaging_service_sid The 34-character unique ID of the
93
- # [Messaging
82
+ # ID](https://www.twilio.com/docs/sms/send-messages#use-an-alphanumeric-sender-id), or a [Channel Endpoint address](https://www.twilio.com/docs/sms/channels#channel-addresses) that is enabled for the type of message you want to send. Phone numbers or [short codes](https://www.twilio.com/docs/sms/api/short-codes) purchased from Twilio also work here. You cannot, for example, spoof messages from a private cell phone number. If you are using `messaging_service_sid`, this parameter must be empty.
83
+ # @param [String] messaging_service_sid The SID of the [Messaging
94
84
  # Service](https://www.twilio.com/docs/sms/services#send-a-message-with-copilot)
95
- # you want to associate with this Message. Set this parameter to use the
96
- # [Messaging Service Settings and Copilot
97
- # Features](https://www.twilio.com/console/sms/services) you have configured. When
98
- # only this parameter is set, Twilio will use your enabled Copilot Features to
99
- # select the `From` phone number for delivery. *Do not pass this value if you are
100
- # using `From`.*
101
- # @param [String] body The text of the message you want to send, limited to 1600
102
- # characters.
103
- # @param [String] media_url The URL containing the media you wish to send with the
104
- # message. `gif` , `png` and `jpeg` content is currently supported and will be
105
- # formatted correctly on the recipient's device. [Other
106
- # types](https://www.twilio.com/docs/sms/accepted-mime-types) are also accepted by
107
- # the API. The media size limit is 5MB. If you wish to send more than one image in
108
- # the message body, please provide multiple `MediaUrl` values in the POST request.
109
- # You may include up to 10 MediaUrls per message. *Sending images via SMS is
110
- # currently only possible in the US and Canada*
85
+ # you want to associate with the Message. Set this parameter to use the [Messaging
86
+ # Service Settings and Copilot
87
+ # Features](https://www.twilio.com/console/sms/services) you have configured and
88
+ # leave the `from` parameter empty. When only this parameter is set, Twilio will
89
+ # use your enabled Copilot Features to select the `from` phone number for
90
+ # delivery.
91
+ # @param [String] body The text of the message you want to send. Can be up to
92
+ # 1,600 characters in length.
93
+ # @param [String] media_url The URL of the media to send with the message. The
94
+ # media can be of type `gif`, `png`, and `jpeg` and will be formatted correctly on
95
+ # the recipient's device. [Other
96
+ # types](https://www.twilio.com/docs/sms/accepted-mime-types) of media are also
97
+ # accepted. The media size limit is 5MB. To send more than one image in the
98
+ # message body, provide multiple `media_url` parameters in the POST request. You
99
+ # can include up to 10 `media_url` parameters per message. You can send images in
100
+ # an SMS message in only the US and Canada.
111
101
  # @return [MessageInstance] Newly created MessageInstance
112
- def create(to: nil, status_callback: :unset, application_sid: :unset, max_price: :unset, provide_feedback: :unset, validity_period: :unset, max_rate: :unset, force_delivery: :unset, provider_sid: :unset, content_retention: :unset, address_retention: :unset, smart_encoded: :unset, interactive_data: :unset, force_opt_in: :unset, from: :unset, messaging_service_sid: :unset, body: :unset, media_url: :unset)
102
+ def create(to: nil, status_callback: :unset, application_sid: :unset, max_price: :unset, provide_feedback: :unset, validity_period: :unset, smart_encoded: :unset, interactive_data: :unset, force_opt_in: :unset, from: :unset, messaging_service_sid: :unset, body: :unset, media_url: :unset)
113
103
  data = Twilio::Values.of({
114
104
  'To' => to,
115
105
  'From' => from,
@@ -121,11 +111,6 @@ module Twilio
121
111
  'MaxPrice' => max_price,
122
112
  'ProvideFeedback' => provide_feedback,
123
113
  'ValidityPeriod' => validity_period,
124
- 'MaxRate' => max_rate,
125
- 'ForceDelivery' => force_delivery,
126
- 'ProviderSid' => provider_sid,
127
- 'ContentRetention' => content_retention,
128
- 'AddressRetention' => address_retention,
129
114
  'SmartEncoded' => smart_encoded,
130
115
  'InteractiveData' => interactive_data,
131
116
  'ForceOptIn' => force_opt_in,
@@ -144,9 +129,9 @@ module Twilio
144
129
  # Lists MessageInstance records from the API as a list.
145
130
  # Unlike stream(), this operation is eager and will load `limit` records into
146
131
  # memory before returning.
147
- # @param [String] to Only show messages to this phone number.
148
- # @param [String] from Only show messages from this phone number or alphanumeric
149
- # sender ID.
132
+ # @param [String] to Read messages sent to only this phone number.
133
+ # @param [String] from Read messages sent from only this phone number or
134
+ # alphanumeric sender ID.
150
135
  # @param [Time] date_sent_before Filter by date sent
151
136
  # @param [Time] date_sent Filter by date sent
152
137
  # @param [Time] date_sent_after Filter by date sent
@@ -173,9 +158,9 @@ module Twilio
173
158
  # Streams MessageInstance records from the API as an Enumerable.
174
159
  # This operation lazily loads records as efficiently as possible until the limit
175
160
  # is reached.
176
- # @param [String] to Only show messages to this phone number.
177
- # @param [String] from Only show messages from this phone number or alphanumeric
178
- # sender ID.
161
+ # @param [String] to Read messages sent to only this phone number.
162
+ # @param [String] from Read messages sent from only this phone number or
163
+ # alphanumeric sender ID.
179
164
  # @param [Time] date_sent_before Filter by date sent
180
165
  # @param [Time] date_sent Filter by date sent
181
166
  # @param [Time] date_sent_after Filter by date sent
@@ -218,9 +203,9 @@ module Twilio
218
203
  ##
219
204
  # Retrieve a single page of MessageInstance records from the API.
220
205
  # Request is executed immediately.
221
- # @param [String] to Only show messages to this phone number.
222
- # @param [String] from Only show messages from this phone number or alphanumeric
223
- # sender ID.
206
+ # @param [String] to Read messages sent to only this phone number.
207
+ # @param [String] from Read messages sent from only this phone number or
208
+ # alphanumeric sender ID.
224
209
  # @param [Time] date_sent_before Filter by date sent
225
210
  # @param [Time] date_sent Filter by date sent
226
211
  # @param [Time] date_sent_after Filter by date sent
@@ -300,8 +285,11 @@ module Twilio
300
285
  ##
301
286
  # Initialize the MessageContext
302
287
  # @param [Version] version Version that contains the resource
303
- # @param [String] account_sid The account_sid
304
- # @param [String] sid The message Sid that uniquely identifies this resource
288
+ # @param [String] account_sid The SID of the
289
+ # [Account](https://www.twilio.com/docs/api/rest/account) that created the Message
290
+ # resource to fetch.
291
+ # @param [String] sid The Twilio-provided string that uniquely identifies the
292
+ # Message resource to fetch.
305
293
  # @return [MessageContext] MessageContext
306
294
  def initialize(version, account_sid, sid)
307
295
  super(version)
@@ -339,8 +327,8 @@ module Twilio
339
327
 
340
328
  ##
341
329
  # Update the MessageInstance
342
- # @param [String] body The text of the message you want to send, limited to 1600
343
- # characters.
330
+ # @param [String] body The text of the message you want to send. Can be up to
331
+ # 1,600 characters long.
344
332
  # @return [MessageInstance] Updated MessageInstance
345
333
  def update(body: nil)
346
334
  data = Twilio::Values.of({'Body' => body, })
@@ -408,9 +396,11 @@ module Twilio
408
396
  # Initialize the MessageInstance
409
397
  # @param [Version] version Version that contains the resource
410
398
  # @param [Hash] payload payload that contains response from Twilio
411
- # @param [String] account_sid The unique id of the
412
- # [Account](https://www.twilio.com/docs/api/rest/account) that sent this message.
413
- # @param [String] sid The message Sid that uniquely identifies this resource
399
+ # @param [String] account_sid The SID of the
400
+ # [Account](https://www.twilio.com/docs/api/rest/account) that sent the message
401
+ # that created the resource.
402
+ # @param [String] sid The Twilio-provided string that uniquely identifies the
403
+ # Message resource to fetch.
414
404
  # @return [MessageInstance] MessageInstance
415
405
  def initialize(version, payload, account_sid: nil, sid: nil)
416
406
  super(version)
@@ -456,37 +446,37 @@ module Twilio
456
446
  end
457
447
 
458
448
  ##
459
- # @return [String] The unique sid that identifies this account
449
+ # @return [String] The SID of the Account that created the resource
460
450
  def account_sid
461
451
  @properties['account_sid']
462
452
  end
463
453
 
464
454
  ##
465
- # @return [String] The version of the Twilio API used to process the message.
455
+ # @return [String] The API version used to process the message
466
456
  def api_version
467
457
  @properties['api_version']
468
458
  end
469
459
 
470
460
  ##
471
- # @return [String] The text body of the message. Up to 1600 characters long.
461
+ # @return [String] The message text
472
462
  def body
473
463
  @properties['body']
474
464
  end
475
465
 
476
466
  ##
477
- # @return [Time] The date this resource was created
467
+ # @return [Time] The RFC 2822 date and time in GMT that the resource was created
478
468
  def date_created
479
469
  @properties['date_created']
480
470
  end
481
471
 
482
472
  ##
483
- # @return [Time] The date this resource was last updated
473
+ # @return [Time] The RFC 2822 date and time in GMT that the resource was last updated
484
474
  def date_updated
485
475
  @properties['date_updated']
486
476
  end
487
477
 
488
478
  ##
489
- # @return [Time] The date the message was sent
479
+ # @return [Time] The RFC 2822 date and time in GMT when the message was sent
490
480
  def date_sent
491
481
  @properties['date_sent']
492
482
  end
@@ -504,7 +494,7 @@ module Twilio
504
494
  end
505
495
 
506
496
  ##
507
- # @return [String] Human readable description of the ErrorCode
497
+ # @return [String] The description of the error_code
508
498
  def error_message
509
499
  @properties['error_message']
510
500
  end
@@ -516,19 +506,19 @@ module Twilio
516
506
  end
517
507
 
518
508
  ##
519
- # @return [String] The unique id of the Messaging Service used with the message.
509
+ # @return [String] The SID of the Messaging Service used with the message.
520
510
  def messaging_service_sid
521
511
  @properties['messaging_service_sid']
522
512
  end
523
513
 
524
514
  ##
525
- # @return [String] Number of media files associated with the message
515
+ # @return [String] The number of media files associated with the message
526
516
  def num_media
527
517
  @properties['num_media']
528
518
  end
529
519
 
530
520
  ##
531
- # @return [String] Indicates number of messages used to delivery the body
521
+ # @return [String] The number of messages used to deliver the message body
532
522
  def num_segments
533
523
  @properties['num_segments']
534
524
  end
@@ -540,25 +530,25 @@ module Twilio
540
530
  end
541
531
 
542
532
  ##
543
- # @return [String] The currency in which Price is measured
533
+ # @return [String] The currency in which price is measured
544
534
  def price_unit
545
535
  @properties['price_unit']
546
536
  end
547
537
 
548
538
  ##
549
- # @return [String] A string that uniquely identifies this message
539
+ # @return [String] The unique string that identifies the resource
550
540
  def sid
551
541
  @properties['sid']
552
542
  end
553
543
 
554
544
  ##
555
- # @return [message.Status] The status of this message
545
+ # @return [message.Status] The status of the message
556
546
  def status
557
547
  @properties['status']
558
548
  end
559
549
 
560
550
  ##
561
- # @return [String] The URI for any subresources
551
+ # @return [String] A list of related resources identified by their relative URIs
562
552
  def subresource_uris
563
553
  @properties['subresource_uris']
564
554
  end
@@ -570,7 +560,7 @@ module Twilio
570
560
  end
571
561
 
572
562
  ##
573
- # @return [String] The URI for this resource
563
+ # @return [String] The URI of the resource, relative to `https://api.twilio.com`
574
564
  def uri
575
565
  @properties['uri']
576
566
  end
@@ -591,8 +581,8 @@ module Twilio
591
581
 
592
582
  ##
593
583
  # Update the MessageInstance
594
- # @param [String] body The text of the message you want to send, limited to 1600
595
- # characters.
584
+ # @param [String] body The text of the message you want to send. Can be up to
585
+ # 1,600 characters long.
596
586
  # @return [MessageInstance] Updated MessageInstance
597
587
  def update(body: nil)
598
588
  context.update(body: body, )