twilio-ruby 5.19.0 → 5.20.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (76) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGES.md +13 -0
  3. data/README.md +2 -2
  4. data/lib/twilio-ruby/rest/api.rb +16 -13
  5. data/lib/twilio-ruby/rest/api/v2010/account/address.rb +85 -88
  6. data/lib/twilio-ruby/rest/api/v2010/account/address/dependent_phone_number.rb +4 -4
  7. data/lib/twilio-ruby/rest/api/v2010/account/application.rb +135 -146
  8. data/lib/twilio-ruby/rest/api/v2010/account/authorized_connect_app.rb +21 -17
  9. data/lib/twilio-ruby/rest/api/v2010/account/available_phone_number.rb +14 -8
  10. data/lib/twilio-ruby/rest/api/v2010/account/available_phone_number/local.rb +150 -166
  11. data/lib/twilio-ruby/rest/api/v2010/account/available_phone_number/machine_to_machine.rb +174 -79
  12. data/lib/twilio-ruby/rest/api/v2010/account/available_phone_number/mobile.rb +147 -160
  13. data/lib/twilio-ruby/rest/api/v2010/account/available_phone_number/national.rb +174 -79
  14. data/lib/twilio-ruby/rest/api/v2010/account/available_phone_number/shared_cost.rb +174 -79
  15. data/lib/twilio-ruby/rest/api/v2010/account/available_phone_number/toll_free.rb +147 -160
  16. data/lib/twilio-ruby/rest/api/v2010/account/available_phone_number/voip.rb +174 -79
  17. data/lib/twilio-ruby/rest/api/v2010/account/connect_app.rb +51 -51
  18. data/lib/twilio-ruby/rest/api/v2010/account/incoming_phone_number.rb +246 -251
  19. data/lib/twilio-ruby/rest/api/v2010/account/incoming_phone_number/assigned_add_on.rb +31 -26
  20. data/lib/twilio-ruby/rest/api/v2010/account/incoming_phone_number/assigned_add_on/assigned_add_on_extension.rb +34 -26
  21. data/lib/twilio-ruby/rest/api/v2010/account/incoming_phone_number/local.rb +109 -112
  22. data/lib/twilio-ruby/rest/api/v2010/account/incoming_phone_number/mobile.rb +108 -112
  23. data/lib/twilio-ruby/rest/api/v2010/account/incoming_phone_number/toll_free.rb +108 -112
  24. data/lib/twilio-ruby/rest/api/v2010/account/message/feedback.rb +21 -11
  25. data/lib/twilio-ruby/rest/api/v2010/account/new_key.rb +7 -6
  26. data/lib/twilio-ruby/rest/api/v2010/account/new_signing_key.rb +7 -6
  27. data/lib/twilio-ruby/rest/api/v2010/account/notification.rb +32 -25
  28. data/lib/twilio-ruby/rest/api/v2010/account/outgoing_caller_id.rb +36 -36
  29. data/lib/twilio-ruby/rest/api/v2010/account/sip.rb +2 -1
  30. data/lib/twilio-ruby/rest/api/v2010/account/sip/domain.rb +70 -66
  31. data/lib/twilio-ruby/rest/api/v2010/account/sip/domain/auth_types.rb +10 -10
  32. data/lib/twilio-ruby/rest/api/v2010/account/sip/domain/auth_types/auth_calls_mapping.rb +14 -14
  33. data/lib/twilio-ruby/rest/api/v2010/account/sip/domain/auth_types/auth_calls_mapping/auth_calls_credential_list_mapping.rb +26 -23
  34. data/lib/twilio-ruby/rest/api/v2010/account/sip/domain/auth_types/auth_calls_mapping/auth_calls_ip_access_control_list_mapping.rb +26 -23
  35. data/lib/twilio-ruby/rest/api/v2010/account/sip/domain/auth_types/auth_registrations_mapping.rb +12 -12
  36. data/lib/twilio-ruby/rest/api/v2010/account/sip/domain/auth_types/auth_registrations_mapping/auth_registrations_credential_list_mapping.rb +26 -23
  37. data/lib/twilio-ruby/rest/api/v2010/account/sip/domain/credential_list_mapping.rb +4 -4
  38. data/lib/twilio-ruby/rest/api/v2010/account/sip/domain/ip_access_control_list_mapping.rb +4 -4
  39. data/lib/twilio-ruby/rest/api/v2010/account/token.rb +11 -9
  40. data/lib/twilio-ruby/rest/api/v2010/account/usage.rb +2 -1
  41. data/lib/twilio-ruby/rest/api/v2010/account/usage/record.rb +56 -47
  42. data/lib/twilio-ruby/rest/api/v2010/account/usage/record/all_time.rb +59 -44
  43. data/lib/twilio-ruby/rest/api/v2010/account/usage/record/daily.rb +59 -44
  44. data/lib/twilio-ruby/rest/api/v2010/account/usage/record/last_month.rb +59 -47
  45. data/lib/twilio-ruby/rest/api/v2010/account/usage/record/monthly.rb +59 -44
  46. data/lib/twilio-ruby/rest/api/v2010/account/usage/record/this_month.rb +59 -44
  47. data/lib/twilio-ruby/rest/api/v2010/account/usage/record/today.rb +59 -44
  48. data/lib/twilio-ruby/rest/api/v2010/account/usage/record/yearly.rb +59 -44
  49. data/lib/twilio-ruby/rest/api/v2010/account/usage/record/yesterday.rb +59 -44
  50. data/lib/twilio-ruby/rest/api/v2010/account/usage/trigger.rb +76 -74
  51. data/lib/twilio-ruby/rest/authy.rb +8 -8
  52. data/lib/twilio-ruby/rest/authy/v1.rb +15 -15
  53. data/lib/twilio-ruby/rest/client.rb +16 -13
  54. data/lib/twilio-ruby/rest/messaging.rb +15 -0
  55. data/lib/twilio-ruby/rest/messaging/v1.rb +23 -0
  56. data/lib/twilio-ruby/rest/messaging/v1/session.rb +482 -0
  57. data/lib/twilio-ruby/rest/messaging/v1/session/message.rb +434 -0
  58. data/lib/twilio-ruby/rest/messaging/v1/session/participant.rb +458 -0
  59. data/lib/twilio-ruby/rest/messaging/v1/webhook.rb +285 -0
  60. data/lib/twilio-ruby/rest/preview.rb +8 -8
  61. data/lib/twilio-ruby/rest/preview/marketplace.rb +13 -13
  62. data/lib/twilio-ruby/rest/proxy/v1/service/session.rb +3 -2
  63. data/lib/twilio-ruby/rest/video.rb +9 -9
  64. data/lib/twilio-ruby/rest/video/v1.rb +16 -16
  65. data/lib/twilio-ruby/rest/video/v1/composition.rb +7 -6
  66. data/lib/twilio-ruby/rest/video/v1/composition_hook.rb +37 -21
  67. data/lib/twilio-ruby/rest/video/v1/recording.rb +12 -3
  68. data/lib/twilio-ruby/security/request_validator.rb +2 -2
  69. data/lib/twilio-ruby/version.rb +1 -1
  70. data/spec/integration/messaging/v1/session/message_spec.rb +238 -0
  71. data/spec/integration/messaging/v1/session/participant_spec.rb +256 -0
  72. data/spec/integration/messaging/v1/session_spec.rb +223 -0
  73. data/spec/integration/messaging/v1/webhook_spec.rb +92 -0
  74. data/spec/integration/video/v1/composition_hook_spec.rb +1 -1
  75. data/spec/security/request_validator_spec.rb +5 -7
  76. metadata +14 -2
@@ -19,11 +19,11 @@ module Twilio
19
19
  ##
20
20
  # Initialize the AuthCallsIpAccessControlListMappingList
21
21
  # @param [Version] version Version that contains the resource
22
- # @param [String] account_sid The unique id of the
23
- # [Account](https://www.twilio.com/docs/api/rest/account) responsible for this
24
- # domain.
25
- # @param [String] domain_sid A 34 character string that uniquely identifies the
26
- # SIP domain in Twilio.
22
+ # @param [String] account_sid The SID of the
23
+ # [Account](https://www.twilio.com/docs/api/rest/account) that created the
24
+ # SipDomain resource.
25
+ # @param [String] domain_sid The unique string that that we created to identify
26
+ # the SipDomain resource.
27
27
  # @return [AuthCallsIpAccessControlListMappingList] AuthCallsIpAccessControlListMappingList
28
28
  def initialize(version, account_sid: nil, domain_sid: nil)
29
29
  super(version)
@@ -36,8 +36,8 @@ module Twilio
36
36
  ##
37
37
  # Retrieve a single page of AuthCallsIpAccessControlListMappingInstance records from the API.
38
38
  # Request is executed immediately.
39
- # @param [String] ip_access_control_list_sid A 34 character string that uniquely
40
- # identifies IP Access Control List
39
+ # @param [String] ip_access_control_list_sid The SID of the IpAccessControlList
40
+ # resource to map to the SIP domain.
41
41
  # @return [AuthCallsIpAccessControlListMappingInstance] Newly created AuthCallsIpAccessControlListMappingInstance
42
42
  def create(ip_access_control_list_sid: nil)
43
43
  data = Twilio::Values.of({'IpAccessControlListSid' => ip_access_control_list_sid, })
@@ -183,10 +183,13 @@ module Twilio
183
183
  ##
184
184
  # Initialize the AuthCallsIpAccessControlListMappingContext
185
185
  # @param [Version] version Version that contains the resource
186
- # @param [String] account_sid The account_sid
187
- # @param [String] domain_sid The domain_sid
188
- # @param [String] sid The IP Access Control List Sid that uniquely identifies this
189
- # resource
186
+ # @param [String] account_sid The SID of the
187
+ # [Account](https://www.twilio.com/docs/api/rest/account) that created the
188
+ # IpAccessControlListMapping resource to fetch.
189
+ # @param [String] domain_sid The SID of the SIP domain that contains the resource
190
+ # to fetch.
191
+ # @param [String] sid The Twilio-provided string that uniquely identifies the
192
+ # IpAccessControlListMapping resource to fetch.
190
193
  # @return [AuthCallsIpAccessControlListMappingContext] AuthCallsIpAccessControlListMappingContext
191
194
  def initialize(version, account_sid, domain_sid, sid)
192
195
  super(version)
@@ -237,13 +240,13 @@ module Twilio
237
240
  # Initialize the AuthCallsIpAccessControlListMappingInstance
238
241
  # @param [Version] version Version that contains the resource
239
242
  # @param [Hash] payload payload that contains response from Twilio
240
- # @param [String] account_sid The unique id of the
241
- # [Account](https://www.twilio.com/docs/api/rest/account) responsible for this
242
- # domain.
243
- # @param [String] domain_sid A 34 character string that uniquely identifies the
244
- # SIP domain in Twilio.
245
- # @param [String] sid The IP Access Control List Sid that uniquely identifies this
246
- # resource
243
+ # @param [String] account_sid The SID of the
244
+ # [Account](https://www.twilio.com/docs/api/rest/account) that created the
245
+ # SipDomain resource.
246
+ # @param [String] domain_sid The unique string that that we created to identify
247
+ # the SipDomain resource.
248
+ # @param [String] sid The Twilio-provided string that uniquely identifies the
249
+ # IpAccessControlListMapping resource to fetch.
247
250
  # @return [AuthCallsIpAccessControlListMappingInstance] AuthCallsIpAccessControlListMappingInstance
248
251
  def initialize(version, payload, account_sid: nil, domain_sid: nil, sid: nil)
249
252
  super(version)
@@ -283,31 +286,31 @@ module Twilio
283
286
  end
284
287
 
285
288
  ##
286
- # @return [String] The unique sid that identifies this account
289
+ # @return [String] The SID of the Account that created the resource
287
290
  def account_sid
288
291
  @properties['account_sid']
289
292
  end
290
293
 
291
294
  ##
292
- # @return [Time] The date this resource was created
295
+ # @return [Time] The RFC 2822 date and time in GMT that the resource was created
293
296
  def date_created
294
297
  @properties['date_created']
295
298
  end
296
299
 
297
300
  ##
298
- # @return [Time] The date this resource was last updated
301
+ # @return [Time] The RFC 2822 date and time in GMT that the resource was last updated
299
302
  def date_updated
300
303
  @properties['date_updated']
301
304
  end
302
305
 
303
306
  ##
304
- # @return [String] A human readable description of this resource
307
+ # @return [String] The string that you assigned to describe the resource
305
308
  def friendly_name
306
309
  @properties['friendly_name']
307
310
  end
308
311
 
309
312
  ##
310
- # @return [String] A string that uniquely identifies this resource
313
+ # @return [String] The unique string that identifies the resource
311
314
  def sid
312
315
  @properties['sid']
313
316
  end
@@ -18,11 +18,11 @@ module Twilio
18
18
  ##
19
19
  # Initialize the AuthTypeRegistrationsList
20
20
  # @param [Version] version Version that contains the resource
21
- # @param [String] account_sid The unique id of the
22
- # [Account](https://www.twilio.com/docs/api/rest/account) responsible for this
23
- # domain.
24
- # @param [String] domain_sid A 34 character string that uniquely identifies the
25
- # SIP domain in Twilio.
21
+ # @param [String] account_sid The SID of the
22
+ # [Account](https://www.twilio.com/docs/api/rest/account) that created the
23
+ # SipDomain resource.
24
+ # @param [String] domain_sid The unique string that that we created to identify
25
+ # the SipDomain resource.
26
26
  # @return [AuthTypeRegistrationsList] AuthTypeRegistrationsList
27
27
  def initialize(version, account_sid: nil, domain_sid: nil)
28
28
  super(version)
@@ -36,8 +36,8 @@ module Twilio
36
36
 
37
37
  ##
38
38
  # Access the credential_list_mappings
39
- # @param [String] sid The credential list Sid that uniquely identifies this
40
- # resource
39
+ # @param [String] sid The Twilio-provided string that uniquely identifies the
40
+ # CredentialListMapping resource to fetch.
41
41
  # @return [AuthRegistrationsCredentialListMappingList]
42
42
  # @return [AuthRegistrationsCredentialListMappingContext] if sid was passed.
43
43
  def credential_list_mappings(sid=:unset)
@@ -105,11 +105,11 @@ module Twilio
105
105
  # Initialize the AuthTypeRegistrationsInstance
106
106
  # @param [Version] version Version that contains the resource
107
107
  # @param [Hash] payload payload that contains response from Twilio
108
- # @param [String] account_sid The unique id of the
109
- # [Account](https://www.twilio.com/docs/api/rest/account) responsible for this
110
- # domain.
111
- # @param [String] domain_sid A 34 character string that uniquely identifies the
112
- # SIP domain in Twilio.
108
+ # @param [String] account_sid The SID of the
109
+ # [Account](https://www.twilio.com/docs/api/rest/account) that created the
110
+ # SipDomain resource.
111
+ # @param [String] domain_sid The unique string that that we created to identify
112
+ # the SipDomain resource.
113
113
  # @return [AuthTypeRegistrationsInstance] AuthTypeRegistrationsInstance
114
114
  def initialize(version, payload, account_sid: nil, domain_sid: nil)
115
115
  super(version)
@@ -19,11 +19,11 @@ module Twilio
19
19
  ##
20
20
  # Initialize the AuthRegistrationsCredentialListMappingList
21
21
  # @param [Version] version Version that contains the resource
22
- # @param [String] account_sid The unique id of the
23
- # [Account](https://www.twilio.com/docs/api/rest/account) responsible for this
24
- # domain.
25
- # @param [String] domain_sid A 34 character string that uniquely identifies the
26
- # SIP domain in Twilio.
22
+ # @param [String] account_sid The SID of the
23
+ # [Account](https://www.twilio.com/docs/api/rest/account) that created the
24
+ # SipDomain resource.
25
+ # @param [String] domain_sid The unique string that that we created to identify
26
+ # the SipDomain resource.
27
27
  # @return [AuthRegistrationsCredentialListMappingList] AuthRegistrationsCredentialListMappingList
28
28
  def initialize(version, account_sid: nil, domain_sid: nil)
29
29
  super(version)
@@ -36,8 +36,8 @@ module Twilio
36
36
  ##
37
37
  # Retrieve a single page of AuthRegistrationsCredentialListMappingInstance records from the API.
38
38
  # Request is executed immediately.
39
- # @param [String] credential_list_sid A 34 character string that uniquely
40
- # identifies this credential list resource
39
+ # @param [String] credential_list_sid The SID of the CredentialList resource to
40
+ # map to the SIP domain.
41
41
  # @return [AuthRegistrationsCredentialListMappingInstance] Newly created AuthRegistrationsCredentialListMappingInstance
42
42
  def create(credential_list_sid: nil)
43
43
  data = Twilio::Values.of({'CredentialListSid' => credential_list_sid, })
@@ -183,10 +183,13 @@ module Twilio
183
183
  ##
184
184
  # Initialize the AuthRegistrationsCredentialListMappingContext
185
185
  # @param [Version] version Version that contains the resource
186
- # @param [String] account_sid The account_sid
187
- # @param [String] domain_sid The domain_sid
188
- # @param [String] sid The credential list Sid that uniquely identifies this
189
- # resource
186
+ # @param [String] account_sid The SID of the
187
+ # [Account](https://www.twilio.com/docs/api/rest/account) that created the
188
+ # CredentialListMapping resource to fetch.
189
+ # @param [String] domain_sid The SID of the SIP domain that contains the resource
190
+ # to fetch.
191
+ # @param [String] sid The Twilio-provided string that uniquely identifies the
192
+ # CredentialListMapping resource to fetch.
190
193
  # @return [AuthRegistrationsCredentialListMappingContext] AuthRegistrationsCredentialListMappingContext
191
194
  def initialize(version, account_sid, domain_sid, sid)
192
195
  super(version)
@@ -237,13 +240,13 @@ module Twilio
237
240
  # Initialize the AuthRegistrationsCredentialListMappingInstance
238
241
  # @param [Version] version Version that contains the resource
239
242
  # @param [Hash] payload payload that contains response from Twilio
240
- # @param [String] account_sid The unique id of the
241
- # [Account](https://www.twilio.com/docs/api/rest/account) responsible for this
242
- # domain.
243
- # @param [String] domain_sid A 34 character string that uniquely identifies the
244
- # SIP domain in Twilio.
245
- # @param [String] sid The credential list Sid that uniquely identifies this
246
- # resource
243
+ # @param [String] account_sid The SID of the
244
+ # [Account](https://www.twilio.com/docs/api/rest/account) that created the
245
+ # SipDomain resource.
246
+ # @param [String] domain_sid The unique string that that we created to identify
247
+ # the SipDomain resource.
248
+ # @param [String] sid The Twilio-provided string that uniquely identifies the
249
+ # CredentialListMapping resource to fetch.
247
250
  # @return [AuthRegistrationsCredentialListMappingInstance] AuthRegistrationsCredentialListMappingInstance
248
251
  def initialize(version, payload, account_sid: nil, domain_sid: nil, sid: nil)
249
252
  super(version)
@@ -283,31 +286,31 @@ module Twilio
283
286
  end
284
287
 
285
288
  ##
286
- # @return [String] The unique sid that identifies this account
289
+ # @return [String] The SID of the Account that created the resource
287
290
  def account_sid
288
291
  @properties['account_sid']
289
292
  end
290
293
 
291
294
  ##
292
- # @return [Time] The date this resource was created
295
+ # @return [Time] The RFC 2822 date and time in GMT that the resource was created
293
296
  def date_created
294
297
  @properties['date_created']
295
298
  end
296
299
 
297
300
  ##
298
- # @return [Time] The date this resource was last updated
301
+ # @return [Time] The RFC 2822 date and time in GMT that the resource was last updated
299
302
  def date_updated
300
303
  @properties['date_updated']
301
304
  end
302
305
 
303
306
  ##
304
- # @return [String] A human readable description of this resource
307
+ # @return [String] The string that you assigned to describe the resource
305
308
  def friendly_name
306
309
  @properties['friendly_name']
307
310
  end
308
311
 
309
312
  ##
310
- # @return [String] A string that uniquely identifies this resource
313
+ # @return [String] The unique string that identifies the resource
311
314
  def sid
312
315
  @properties['sid']
313
316
  end
@@ -19,8 +19,8 @@ module Twilio
19
19
  # @param [Version] version Version that contains the resource
20
20
  # @param [String] account_sid The unique id of the Account that is responsible for
21
21
  # this resource.
22
- # @param [String] domain_sid A 34 character string that uniquely identifies the
23
- # SIP domain in Twilio.
22
+ # @param [String] domain_sid The unique string that that we created to identify
23
+ # the SipDomain resource.
24
24
  # @return [CredentialListMappingList] CredentialListMappingList
25
25
  def initialize(version, account_sid: nil, domain_sid: nil)
26
26
  super(version)
@@ -239,8 +239,8 @@ module Twilio
239
239
  # @param [Hash] payload payload that contains response from Twilio
240
240
  # @param [String] account_sid The unique id of the Account that is responsible for
241
241
  # this resource.
242
- # @param [String] domain_sid A 34 character string that uniquely identifies the
243
- # SIP domain in Twilio.
242
+ # @param [String] domain_sid The unique string that that we created to identify
243
+ # the SipDomain resource.
244
244
  # @param [String] sid A 34 character string that uniquely identifies the resource
245
245
  # to fetch.
246
246
  # @return [CredentialListMappingInstance] CredentialListMappingInstance
@@ -19,8 +19,8 @@ module Twilio
19
19
  # @param [Version] version Version that contains the resource
20
20
  # @param [String] account_sid The unique id of the Account that is responsible for
21
21
  # this resource.
22
- # @param [String] domain_sid A 34 character string that uniquely identifies the
23
- # SIP domain in Twilio.
22
+ # @param [String] domain_sid The unique string that that we created to identify
23
+ # the SipDomain resource.
24
24
  # @return [IpAccessControlListMappingList] IpAccessControlListMappingList
25
25
  def initialize(version, account_sid: nil, domain_sid: nil)
26
26
  super(version)
@@ -238,8 +238,8 @@ module Twilio
238
238
  # @param [Hash] payload payload that contains response from Twilio
239
239
  # @param [String] account_sid The unique id of the Account that is responsible for
240
240
  # this resource.
241
- # @param [String] domain_sid A 34 character string that uniquely identifies the
242
- # SIP domain in Twilio.
241
+ # @param [String] domain_sid The unique string that that we created to identify
242
+ # the SipDomain resource.
243
243
  # @param [String] sid A 34 character string that uniquely identifies the resource
244
244
  # to fetch.
245
245
  # @return [IpAccessControlListMappingInstance] IpAccessControlListMappingInstance
@@ -15,8 +15,9 @@ module Twilio
15
15
  ##
16
16
  # Initialize the TokenList
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/iam/api/account) that created this Token.
18
+ # @param [String] account_sid The SID of the
19
+ # [Account](https://www.twilio.com/docs/api/rest/account) that created the Token
20
+ # resource.
20
21
  # @return [TokenList] TokenList
21
22
  def initialize(version, account_sid: nil)
22
23
  super(version)
@@ -30,7 +31,7 @@ module Twilio
30
31
  # Retrieve a single page of TokenInstance records from the API.
31
32
  # Request is executed immediately.
32
33
  # @param [String] ttl The duration in seconds for which the generated credentials
33
- # are valid, the default value is 86400 (24 hours).
34
+ # are valid. The default value is 86400 (24 hours).
34
35
  # @return [TokenInstance] Newly created TokenInstance
35
36
  def create(ttl: :unset)
36
37
  data = Twilio::Values.of({'Ttl' => ttl, })
@@ -85,8 +86,9 @@ module Twilio
85
86
  # Initialize the TokenInstance
86
87
  # @param [Version] version Version that contains the resource
87
88
  # @param [Hash] payload payload that contains response from Twilio
88
- # @param [String] account_sid The unique id of the
89
- # [Account](https://www.twilio.com/docs/iam/api/account) that created this Token.
89
+ # @param [String] account_sid The SID of the
90
+ # [Account](https://www.twilio.com/docs/api/rest/account) that created the Token
91
+ # resource.
90
92
  # @return [TokenInstance] TokenInstance
91
93
  def initialize(version, payload, account_sid: nil)
92
94
  super(version)
@@ -104,19 +106,19 @@ module Twilio
104
106
  end
105
107
 
106
108
  ##
107
- # @return [String] The unique sid that identifies this account
109
+ # @return [String] The SID of the Account that created the resource
108
110
  def account_sid
109
111
  @properties['account_sid']
110
112
  end
111
113
 
112
114
  ##
113
- # @return [Time] The date this resource was created
115
+ # @return [Time] The RFC 2822 date and time in GMT that the resource was created
114
116
  def date_created
115
117
  @properties['date_created']
116
118
  end
117
119
 
118
120
  ##
119
- # @return [Time] The date this resource was last updated
121
+ # @return [Time] The RFC 2822 date and time in GMT that the resource was last updated
120
122
  def date_updated
121
123
  @properties['date_updated']
122
124
  end
@@ -140,7 +142,7 @@ module Twilio
140
142
  end
141
143
 
142
144
  ##
143
- # @return [String] The temporary username that uniquely identifies a Token.
145
+ # @return [String] The temporary username that uniquely identifies a Token
144
146
  def username
145
147
  @properties['username']
146
148
  end
@@ -39,7 +39,8 @@ module Twilio
39
39
 
40
40
  ##
41
41
  # Access the triggers
42
- # @param [String] sid The usage-trigger Sid that uniquely identifies this resource
42
+ # @param [String] sid The Twilio-provided string that uniquely identifies the
43
+ # UsageTrigger resource to fetch.
43
44
  # @return [TriggerList]
44
45
  # @return [TriggerContext] if sid was passed.
45
46
  def triggers(sid=:unset)
@@ -41,19 +41,22 @@ module Twilio
41
41
  # Lists RecordInstance records from the API as a list.
42
42
  # Unlike stream(), this operation is eager and will load `limit` records into
43
43
  # memory before returning.
44
- # @param [record.Category] category Only include usage of this [usage
45
- # category](https://www.twilio.com/docs/api/rest/usage-records#usage-categories).
44
+ # @param [record.Category] category The [usage
45
+ # category](https://www.twilio.com/docs/api/rest/usage-records#usage-categories)
46
+ # of the UsageRecord resources to read. Only UsageRecord resources in the
47
+ # specified category are retrieved.
46
48
  # @param [Date] start_date Only include usage that has occurred on or after this
47
- # date. Format is YYYY-MM-DD. All dates are in GMT. As a convenience, you can
48
- # also specify offsets to today. For example, `StartDate=-30days` will make
49
- # `StartDate` be 30 days before today.
50
- # @param [Date] end_date Only include usage that has occurred on or before this
51
- # date. Format is YYYY-MM-DD. All dates are in GMT. As a convenience, you can
52
- # also specify offsets to today. For example, `EndDate=+30days` will make
53
- # `EndDate` be 30 days from today.
54
- # @param [Boolean] include_subaccounts `true` to include usage from the master
55
- # account and all subaccounts. `false` to only retrieve usage from the specified
56
- # account. `IncludeSubaccounts` is `true` by default.
49
+ # date. Specify the date in GMT and format as `YYYY-MM-DD`. You can also specify
50
+ # offsets from the current date, such as: `-30days`, which will set the start date
51
+ # to be 30 days before the current date.
52
+ # @param [Date] end_date Only include usage that occurred on or before this date.
53
+ # Specify the date in GMT and format as `YYYY-MM-DD`. You can also specify
54
+ # offsets from the current date, such as: `+30days`, which will set the end date
55
+ # to 30 days from the current date.
56
+ # @param [Boolean] include_subaccounts Whether to include usage from the master
57
+ # account and all its subaccounts. Can be: `true` (the default) to include usage
58
+ # from the master account and all subaccounts or `false` to retrieve usage from
59
+ # only the specified account.
57
60
  # @param [Integer] limit Upper limit for the number of records to return. stream()
58
61
  # guarantees to never return more than limit. Default is no limit
59
62
  # @param [Integer] page_size Number of records to fetch per request, when
@@ -76,19 +79,22 @@ module Twilio
76
79
  # Streams RecordInstance records from the API as an Enumerable.
77
80
  # This operation lazily loads records as efficiently as possible until the limit
78
81
  # is reached.
79
- # @param [record.Category] category Only include usage of this [usage
80
- # category](https://www.twilio.com/docs/api/rest/usage-records#usage-categories).
82
+ # @param [record.Category] category The [usage
83
+ # category](https://www.twilio.com/docs/api/rest/usage-records#usage-categories)
84
+ # of the UsageRecord resources to read. Only UsageRecord resources in the
85
+ # specified category are retrieved.
81
86
  # @param [Date] start_date Only include usage that has occurred on or after this
82
- # date. Format is YYYY-MM-DD. All dates are in GMT. As a convenience, you can
83
- # also specify offsets to today. For example, `StartDate=-30days` will make
84
- # `StartDate` be 30 days before today.
85
- # @param [Date] end_date Only include usage that has occurred on or before this
86
- # date. Format is YYYY-MM-DD. All dates are in GMT. As a convenience, you can
87
- # also specify offsets to today. For example, `EndDate=+30days` will make
88
- # `EndDate` be 30 days from today.
89
- # @param [Boolean] include_subaccounts `true` to include usage from the master
90
- # account and all subaccounts. `false` to only retrieve usage from the specified
91
- # account. `IncludeSubaccounts` is `true` by default.
87
+ # date. Specify the date in GMT and format as `YYYY-MM-DD`. You can also specify
88
+ # offsets from the current date, such as: `-30days`, which will set the start date
89
+ # to be 30 days before the current date.
90
+ # @param [Date] end_date Only include usage that occurred on or before this date.
91
+ # Specify the date in GMT and format as `YYYY-MM-DD`. You can also specify
92
+ # offsets from the current date, such as: `+30days`, which will set the end date
93
+ # to 30 days from the current date.
94
+ # @param [Boolean] include_subaccounts Whether to include usage from the master
95
+ # account and all its subaccounts. Can be: `true` (the default) to include usage
96
+ # from the master account and all subaccounts or `false` to retrieve usage from
97
+ # only the specified account.
92
98
  # @param [Integer] limit Upper limit for the number of records to return. stream()
93
99
  # guarantees to never return more than limit. Default is no limit.
94
100
  # @param [Integer] page_size Number of records to fetch per request, when
@@ -127,19 +133,22 @@ module Twilio
127
133
  ##
128
134
  # Retrieve a single page of RecordInstance records from the API.
129
135
  # Request is executed immediately.
130
- # @param [record.Category] category Only include usage of this [usage
131
- # category](https://www.twilio.com/docs/api/rest/usage-records#usage-categories).
136
+ # @param [record.Category] category The [usage
137
+ # category](https://www.twilio.com/docs/api/rest/usage-records#usage-categories)
138
+ # of the UsageRecord resources to read. Only UsageRecord resources in the
139
+ # specified category are retrieved.
132
140
  # @param [Date] start_date Only include usage that has occurred on or after this
133
- # date. Format is YYYY-MM-DD. All dates are in GMT. As a convenience, you can
134
- # also specify offsets to today. For example, `StartDate=-30days` will make
135
- # `StartDate` be 30 days before today.
136
- # @param [Date] end_date Only include usage that has occurred on or before this
137
- # date. Format is YYYY-MM-DD. All dates are in GMT. As a convenience, you can
138
- # also specify offsets to today. For example, `EndDate=+30days` will make
139
- # `EndDate` be 30 days from today.
140
- # @param [Boolean] include_subaccounts `true` to include usage from the master
141
- # account and all subaccounts. `false` to only retrieve usage from the specified
142
- # account. `IncludeSubaccounts` is `true` by default.
141
+ # date. Specify the date in GMT and format as `YYYY-MM-DD`. You can also specify
142
+ # offsets from the current date, such as: `-30days`, which will set the start date
143
+ # to be 30 days before the current date.
144
+ # @param [Date] end_date Only include usage that occurred on or before this date.
145
+ # Specify the date in GMT and format as `YYYY-MM-DD`. You can also specify
146
+ # offsets from the current date, such as: `+30days`, which will set the end date
147
+ # to 30 days from the current date.
148
+ # @param [Boolean] include_subaccounts Whether to include usage from the master
149
+ # account and all its subaccounts. Can be: `true` (the default) to include usage
150
+ # from the master account and all subaccounts or `false` to retrieve usage from
151
+ # only the specified account.
143
152
  # @param [String] page_token PageToken provided by the API
144
153
  # @param [Integer] page_number Page Number, this value is simply for client state
145
154
  # @param [Integer] page_size Number of records to return, defaults to 50
@@ -306,13 +315,13 @@ module Twilio
306
315
  end
307
316
 
308
317
  ##
309
- # @return [String] The Account that accrued the usage
318
+ # @return [String] The SID of the Account accrued the usage
310
319
  def account_sid
311
320
  @properties['account_sid']
312
321
  end
313
322
 
314
323
  ##
315
- # @return [String] The api_version
324
+ # @return [String] The API version used to create the resource
316
325
  def api_version
317
326
  @properties['api_version']
318
327
  end
@@ -324,25 +333,25 @@ module Twilio
324
333
  end
325
334
 
326
335
  ##
327
- # @return [String] The number of usage events (e.g. the number of calls).
336
+ # @return [String] The number of usage events
328
337
  def count
329
338
  @properties['count']
330
339
  end
331
340
 
332
341
  ##
333
- # @return [String] The unit in which `Count` is measured
342
+ # @return [String] The units in which count is measured
334
343
  def count_unit
335
344
  @properties['count_unit']
336
345
  end
337
346
 
338
347
  ##
339
- # @return [String] A human-readable description of the usage category.
348
+ # @return [String] A plain-language description of the usage category
340
349
  def description
341
350
  @properties['description']
342
351
  end
343
352
 
344
353
  ##
345
- # @return [Date] The last date usage is included in this record
354
+ # @return [Date] The last date for which usage is included in the UsageRecord
346
355
  def end_date
347
356
  @properties['end_date']
348
357
  end
@@ -354,25 +363,25 @@ module Twilio
354
363
  end
355
364
 
356
365
  ##
357
- # @return [String] The currency in which `Price` is measured
366
+ # @return [String] The currency in which `price` is measured
358
367
  def price_unit
359
368
  @properties['price_unit']
360
369
  end
361
370
 
362
371
  ##
363
- # @return [Date] The first date usage is included in this record
372
+ # @return [Date] The first date for which usage is included in this UsageRecord
364
373
  def start_date
365
374
  @properties['start_date']
366
375
  end
367
376
 
368
377
  ##
369
- # @return [String] Subresources Uris for this UsageRecord
378
+ # @return [String] A list of related resources identified by their relative URIs
370
379
  def subresource_uris
371
380
  @properties['subresource_uris']
372
381
  end
373
382
 
374
383
  ##
375
- # @return [String] The URI for this resource
384
+ # @return [String] The URI of the resource, relative to `https://api.twilio.com`
376
385
  def uri
377
386
  @properties['uri']
378
387
  end
@@ -384,7 +393,7 @@ module Twilio
384
393
  end
385
394
 
386
395
  ##
387
- # @return [String] The units in which `Usage` is measured
396
+ # @return [String] The units in which usage is measured
388
397
  def usage_unit
389
398
  @properties['usage_unit']
390
399
  end