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
@@ -32,17 +32,22 @@ module Twilio
32
32
  # Lists YearlyInstance records from the API as a list.
33
33
  # Unlike stream(), this operation is eager and will load `limit` records into
34
34
  # memory before returning.
35
- # @param [yearly.Category] category Only include usage of this [usage
36
- # category](https://www.twilio.com/docs/api/rest/usage-records#usage-categories).
35
+ # @param [yearly.Category] category The [usage
36
+ # category](https://www.twilio.com/docs/api/rest/usage-records#usage-categories)
37
+ # of the UsageRecord resources to read. Only UsageRecord resources in the
38
+ # specified category are retrieved.
37
39
  # @param [Date] start_date Only include usage that has occurred on or after this
38
- # date. Format is YYYY-MM-DD. All dates are in GMT. As a convenience, you can
39
- # also specify offsets to today. For example, `StartDate=-30days` will make
40
- # `StartDate` be 30 days before today.
41
- # @param [Date] end_date Only include usage that has occurred on or before this
42
- # date. Format is YYYY-MM-DD. All dates are in GMT. As a convenience, you can
43
- # also specify offsets to today. For example, `EndDate=+30days` will make
44
- # `EndDate` be 30 days from today.
45
- # @param [Boolean] include_subaccounts The include_subaccounts
40
+ # date. Specify the date in GMT and format as `YYYY-MM-DD`. You can also specify
41
+ # offsets from the current date, such as: `-30days`, which will set the start date
42
+ # to be 30 days before the current date.
43
+ # @param [Date] end_date Only include usage that occurred on or before this date.
44
+ # Specify the date in GMT and format as `YYYY-MM-DD`. You can also specify
45
+ # offsets from the current date, such as: `+30days`, which will set the end date
46
+ # to 30 days from the current date.
47
+ # @param [Boolean] include_subaccounts Whether to include usage from the master
48
+ # account and all its subaccounts. Can be: `true` (the default) to include usage
49
+ # from the master account and all subaccounts or `false` to retrieve usage from
50
+ # only the specified account.
46
51
  # @param [Integer] limit Upper limit for the number of records to return. stream()
47
52
  # guarantees to never return more than limit. Default is no limit
48
53
  # @param [Integer] page_size Number of records to fetch per request, when
@@ -65,17 +70,22 @@ module Twilio
65
70
  # Streams YearlyInstance records from the API as an Enumerable.
66
71
  # This operation lazily loads records as efficiently as possible until the limit
67
72
  # is reached.
68
- # @param [yearly.Category] category Only include usage of this [usage
69
- # category](https://www.twilio.com/docs/api/rest/usage-records#usage-categories).
73
+ # @param [yearly.Category] category The [usage
74
+ # category](https://www.twilio.com/docs/api/rest/usage-records#usage-categories)
75
+ # of the UsageRecord resources to read. Only UsageRecord resources in the
76
+ # specified category are retrieved.
70
77
  # @param [Date] start_date Only include usage that has occurred on or after this
71
- # date. Format is YYYY-MM-DD. All dates are in GMT. As a convenience, you can
72
- # also specify offsets to today. For example, `StartDate=-30days` will make
73
- # `StartDate` be 30 days before today.
74
- # @param [Date] end_date Only include usage that has occurred on or before this
75
- # date. Format is YYYY-MM-DD. All dates are in GMT. As a convenience, you can
76
- # also specify offsets to today. For example, `EndDate=+30days` will make
77
- # `EndDate` be 30 days from today.
78
- # @param [Boolean] include_subaccounts The include_subaccounts
78
+ # date. Specify the date in GMT and format as `YYYY-MM-DD`. You can also specify
79
+ # offsets from the current date, such as: `-30days`, which will set the start date
80
+ # to be 30 days before the current date.
81
+ # @param [Date] end_date Only include usage that occurred on or before this date.
82
+ # Specify the date in GMT and format as `YYYY-MM-DD`. You can also specify
83
+ # offsets from the current date, such as: `+30days`, which will set the end date
84
+ # to 30 days from the current date.
85
+ # @param [Boolean] include_subaccounts Whether to include usage from the master
86
+ # account and all its subaccounts. Can be: `true` (the default) to include usage
87
+ # from the master account and all subaccounts or `false` to retrieve usage from
88
+ # only the specified account.
79
89
  # @param [Integer] limit Upper limit for the number of records to return. stream()
80
90
  # guarantees to never return more than limit. Default is no limit.
81
91
  # @param [Integer] page_size Number of records to fetch per request, when
@@ -114,17 +124,22 @@ module Twilio
114
124
  ##
115
125
  # Retrieve a single page of YearlyInstance records from the API.
116
126
  # Request is executed immediately.
117
- # @param [yearly.Category] category Only include usage of this [usage
118
- # category](https://www.twilio.com/docs/api/rest/usage-records#usage-categories).
127
+ # @param [yearly.Category] category The [usage
128
+ # category](https://www.twilio.com/docs/api/rest/usage-records#usage-categories)
129
+ # of the UsageRecord resources to read. Only UsageRecord resources in the
130
+ # specified category are retrieved.
119
131
  # @param [Date] start_date Only include usage that has occurred on or after this
120
- # date. Format is YYYY-MM-DD. All dates are in GMT. As a convenience, you can
121
- # also specify offsets to today. For example, `StartDate=-30days` will make
122
- # `StartDate` be 30 days before today.
123
- # @param [Date] end_date Only include usage that has occurred on or before this
124
- # date. Format is YYYY-MM-DD. All dates are in GMT. As a convenience, you can
125
- # also specify offsets to today. For example, `EndDate=+30days` will make
126
- # `EndDate` be 30 days from today.
127
- # @param [Boolean] include_subaccounts The include_subaccounts
132
+ # date. Specify the date in GMT and format as `YYYY-MM-DD`. You can also specify
133
+ # offsets from the current date, such as: `-30days`, which will set the start date
134
+ # to be 30 days before the current date.
135
+ # @param [Date] end_date Only include usage that occurred on or before this date.
136
+ # Specify the date in GMT and format as `YYYY-MM-DD`. You can also specify
137
+ # offsets from the current date, such as: `+30days`, which will set the end date
138
+ # to 30 days from the current date.
139
+ # @param [Boolean] include_subaccounts Whether to include usage from the master
140
+ # account and all its subaccounts. Can be: `true` (the default) to include usage
141
+ # from the master account and all subaccounts or `false` to retrieve usage from
142
+ # only the specified account.
128
143
  # @param [String] page_token PageToken provided by the API
129
144
  # @param [Integer] page_number Page Number, this value is simply for client state
130
145
  # @param [Integer] page_size Number of records to return, defaults to 50
@@ -227,85 +242,85 @@ module Twilio
227
242
  end
228
243
 
229
244
  ##
230
- # @return [String] The Account that accrued the usage.
245
+ # @return [String] The SID of the Account accrued the usage
231
246
  def account_sid
232
247
  @properties['account_sid']
233
248
  end
234
249
 
235
250
  ##
236
- # @return [String] The api_version
251
+ # @return [String] The API version used to create the resource
237
252
  def api_version
238
253
  @properties['api_version']
239
254
  end
240
255
 
241
256
  ##
242
- # @return [yearly.Category] The category of usage.
257
+ # @return [yearly.Category] The category of usage
243
258
  def category
244
259
  @properties['category']
245
260
  end
246
261
 
247
262
  ##
248
- # @return [String] The number of usage events.
263
+ # @return [String] The number of usage events
249
264
  def count
250
265
  @properties['count']
251
266
  end
252
267
 
253
268
  ##
254
- # @return [String] The units in which Count is measured.
269
+ # @return [String] The units in which count is measured
255
270
  def count_unit
256
271
  @properties['count_unit']
257
272
  end
258
273
 
259
274
  ##
260
- # @return [String] A human-readable description of the usage category.
275
+ # @return [String] A plain-language description of the usage category
261
276
  def description
262
277
  @properties['description']
263
278
  end
264
279
 
265
280
  ##
266
- # @return [Date] The last date for which usage is included in this UsageRecord, formatted as YYYY-MM-DD.
281
+ # @return [Date] The last date for which usage is included in the UsageRecord
267
282
  def end_date
268
283
  @properties['end_date']
269
284
  end
270
285
 
271
286
  ##
272
- # @return [String] The total price of the usage, in the currency associated with the account.
287
+ # @return [String] The total price of the usage
273
288
  def price
274
289
  @properties['price']
275
290
  end
276
291
 
277
292
  ##
278
- # @return [String] The currency in which Price is measured, in ISO 4127 format.
293
+ # @return [String] The currency in which `price` is measured
279
294
  def price_unit
280
295
  @properties['price_unit']
281
296
  end
282
297
 
283
298
  ##
284
- # @return [Date] The first date for which usage is included in this UsageRecord, formatted as YYYY-MM-DD.
299
+ # @return [Date] The first date for which usage is included in this UsageRecord
285
300
  def start_date
286
301
  @properties['start_date']
287
302
  end
288
303
 
289
304
  ##
290
- # @return [String] Subresource Uris for this UsageRecord.
305
+ # @return [String] A list of related resources identified by their relative URIs
291
306
  def subresource_uris
292
307
  @properties['subresource_uris']
293
308
  end
294
309
 
295
310
  ##
296
- # @return [String] The URI that returns only this UsageRecord, relative to https://api.
311
+ # @return [String] The URI of the resource, relative to `https://api.twilio.com`
297
312
  def uri
298
313
  @properties['uri']
299
314
  end
300
315
 
301
316
  ##
302
- # @return [String] The amount of billed usage.
317
+ # @return [String] The amount of usage
303
318
  def usage
304
319
  @properties['usage']
305
320
  end
306
321
 
307
322
  ##
308
- # @return [String] The units in which Usage is measured.
323
+ # @return [String] The units in which usage is measured
309
324
  def usage_unit
310
325
  @properties['usage_unit']
311
326
  end
@@ -32,17 +32,22 @@ module Twilio
32
32
  # Lists YesterdayInstance records from the API as a list.
33
33
  # Unlike stream(), this operation is eager and will load `limit` records into
34
34
  # memory before returning.
35
- # @param [yesterday.Category] category Only include usage of this [usage
36
- # category](https://www.twilio.com/docs/api/rest/usage-records#usage-categories).
35
+ # @param [yesterday.Category] category The [usage
36
+ # category](https://www.twilio.com/docs/api/rest/usage-records#usage-categories)
37
+ # of the UsageRecord resources to read. Only UsageRecord resources in the
38
+ # specified category are retrieved.
37
39
  # @param [Date] start_date Only include usage that has occurred on or after this
38
- # date. Format is YYYY-MM-DD. All dates are in GMT. As a convenience, you can
39
- # also specify offsets to today. For example, `StartDate=-30days` will make
40
- # `StartDate` be 30 days before today.
41
- # @param [Date] end_date Only include usage that has occurred on or before this
42
- # date. Format is YYYY-MM-DD. All dates are in GMT. As a convenience, you can
43
- # also specify offsets to today. For example, `EndDate=+30days` will make
44
- # `EndDate` be 30 days from today.
45
- # @param [Boolean] include_subaccounts The include_subaccounts
40
+ # date. Specify the date in GMT and format as `YYYY-MM-DD`. You can also specify
41
+ # offsets from the current date, such as: `-30days`, which will set the start date
42
+ # to be 30 days before the current date.
43
+ # @param [Date] end_date Only include usage that occurred on or before this date.
44
+ # Specify the date in GMT and format as `YYYY-MM-DD`. You can also specify
45
+ # offsets from the current date, such as: `+30days`, which will set the end date
46
+ # to 30 days from the current date.
47
+ # @param [Boolean] include_subaccounts Whether to include usage from the master
48
+ # account and all its subaccounts. Can be: `true` (the default) to include usage
49
+ # from the master account and all subaccounts or `false` to retrieve usage from
50
+ # only the specified account.
46
51
  # @param [Integer] limit Upper limit for the number of records to return. stream()
47
52
  # guarantees to never return more than limit. Default is no limit
48
53
  # @param [Integer] page_size Number of records to fetch per request, when
@@ -65,17 +70,22 @@ module Twilio
65
70
  # Streams YesterdayInstance records from the API as an Enumerable.
66
71
  # This operation lazily loads records as efficiently as possible until the limit
67
72
  # is reached.
68
- # @param [yesterday.Category] category Only include usage of this [usage
69
- # category](https://www.twilio.com/docs/api/rest/usage-records#usage-categories).
73
+ # @param [yesterday.Category] category The [usage
74
+ # category](https://www.twilio.com/docs/api/rest/usage-records#usage-categories)
75
+ # of the UsageRecord resources to read. Only UsageRecord resources in the
76
+ # specified category are retrieved.
70
77
  # @param [Date] start_date Only include usage that has occurred on or after this
71
- # date. Format is YYYY-MM-DD. All dates are in GMT. As a convenience, you can
72
- # also specify offsets to today. For example, `StartDate=-30days` will make
73
- # `StartDate` be 30 days before today.
74
- # @param [Date] end_date Only include usage that has occurred on or before this
75
- # date. Format is YYYY-MM-DD. All dates are in GMT. As a convenience, you can
76
- # also specify offsets to today. For example, `EndDate=+30days` will make
77
- # `EndDate` be 30 days from today.
78
- # @param [Boolean] include_subaccounts The include_subaccounts
78
+ # date. Specify the date in GMT and format as `YYYY-MM-DD`. You can also specify
79
+ # offsets from the current date, such as: `-30days`, which will set the start date
80
+ # to be 30 days before the current date.
81
+ # @param [Date] end_date Only include usage that occurred on or before this date.
82
+ # Specify the date in GMT and format as `YYYY-MM-DD`. You can also specify
83
+ # offsets from the current date, such as: `+30days`, which will set the end date
84
+ # to 30 days from the current date.
85
+ # @param [Boolean] include_subaccounts Whether to include usage from the master
86
+ # account and all its subaccounts. Can be: `true` (the default) to include usage
87
+ # from the master account and all subaccounts or `false` to retrieve usage from
88
+ # only the specified account.
79
89
  # @param [Integer] limit Upper limit for the number of records to return. stream()
80
90
  # guarantees to never return more than limit. Default is no limit.
81
91
  # @param [Integer] page_size Number of records to fetch per request, when
@@ -114,17 +124,22 @@ module Twilio
114
124
  ##
115
125
  # Retrieve a single page of YesterdayInstance records from the API.
116
126
  # Request is executed immediately.
117
- # @param [yesterday.Category] category Only include usage of this [usage
118
- # category](https://www.twilio.com/docs/api/rest/usage-records#usage-categories).
127
+ # @param [yesterday.Category] category The [usage
128
+ # category](https://www.twilio.com/docs/api/rest/usage-records#usage-categories)
129
+ # of the UsageRecord resources to read. Only UsageRecord resources in the
130
+ # specified category are retrieved.
119
131
  # @param [Date] start_date Only include usage that has occurred on or after this
120
- # date. Format is YYYY-MM-DD. All dates are in GMT. As a convenience, you can
121
- # also specify offsets to today. For example, `StartDate=-30days` will make
122
- # `StartDate` be 30 days before today.
123
- # @param [Date] end_date Only include usage that has occurred on or before this
124
- # date. Format is YYYY-MM-DD. All dates are in GMT. As a convenience, you can
125
- # also specify offsets to today. For example, `EndDate=+30days` will make
126
- # `EndDate` be 30 days from today.
127
- # @param [Boolean] include_subaccounts The include_subaccounts
132
+ # date. Specify the date in GMT and format as `YYYY-MM-DD`. You can also specify
133
+ # offsets from the current date, such as: `-30days`, which will set the start date
134
+ # to be 30 days before the current date.
135
+ # @param [Date] end_date Only include usage that occurred on or before this date.
136
+ # Specify the date in GMT and format as `YYYY-MM-DD`. You can also specify
137
+ # offsets from the current date, such as: `+30days`, which will set the end date
138
+ # to 30 days from the current date.
139
+ # @param [Boolean] include_subaccounts Whether to include usage from the master
140
+ # account and all its subaccounts. Can be: `true` (the default) to include usage
141
+ # from the master account and all subaccounts or `false` to retrieve usage from
142
+ # only the specified account.
128
143
  # @param [String] page_token PageToken provided by the API
129
144
  # @param [Integer] page_number Page Number, this value is simply for client state
130
145
  # @param [Integer] page_size Number of records to return, defaults to 50
@@ -227,85 +242,85 @@ module Twilio
227
242
  end
228
243
 
229
244
  ##
230
- # @return [String] The Account that accrued the usage.
245
+ # @return [String] The SID of the Account accrued the usage
231
246
  def account_sid
232
247
  @properties['account_sid']
233
248
  end
234
249
 
235
250
  ##
236
- # @return [String] The api_version
251
+ # @return [String] The API version used to create the resource
237
252
  def api_version
238
253
  @properties['api_version']
239
254
  end
240
255
 
241
256
  ##
242
- # @return [yesterday.Category] The category of usage.
257
+ # @return [yesterday.Category] The category of usage
243
258
  def category
244
259
  @properties['category']
245
260
  end
246
261
 
247
262
  ##
248
- # @return [String] The number of usage events.
263
+ # @return [String] The number of usage events
249
264
  def count
250
265
  @properties['count']
251
266
  end
252
267
 
253
268
  ##
254
- # @return [String] The units in which Count is measured.
269
+ # @return [String] The units in which count is measured
255
270
  def count_unit
256
271
  @properties['count_unit']
257
272
  end
258
273
 
259
274
  ##
260
- # @return [String] A human-readable description of the usage category.
275
+ # @return [String] A plain-language description of the usage category
261
276
  def description
262
277
  @properties['description']
263
278
  end
264
279
 
265
280
  ##
266
- # @return [Date] The last date for which usage is included in this UsageRecord, formatted as YYYY-MM-DD.
281
+ # @return [Date] The last date for which usage is included in the UsageRecord
267
282
  def end_date
268
283
  @properties['end_date']
269
284
  end
270
285
 
271
286
  ##
272
- # @return [String] The total price of the usage, in the currency associated with the account.
287
+ # @return [String] The total price of the usage
273
288
  def price
274
289
  @properties['price']
275
290
  end
276
291
 
277
292
  ##
278
- # @return [String] The currency in which Price is measured, in ISO 4127 format.
293
+ # @return [String] The currency in which `price` is measured
279
294
  def price_unit
280
295
  @properties['price_unit']
281
296
  end
282
297
 
283
298
  ##
284
- # @return [Date] The first date for which usage is included in this UsageRecord, formatted as YYYY-MM-DD.
299
+ # @return [Date] The first date for which usage is included in this UsageRecord
285
300
  def start_date
286
301
  @properties['start_date']
287
302
  end
288
303
 
289
304
  ##
290
- # @return [String] Subresource Uris for this UsageRecord.
305
+ # @return [String] A list of related resources identified by their relative URIs
291
306
  def subresource_uris
292
307
  @properties['subresource_uris']
293
308
  end
294
309
 
295
310
  ##
296
- # @return [String] The URI that returns only this UsageRecord, relative to https://api.
311
+ # @return [String] The URI of the resource, relative to `https://api.twilio.com`
297
312
  def uri
298
313
  @properties['uri']
299
314
  end
300
315
 
301
316
  ##
302
- # @return [String] The amount of billed usage.
317
+ # @return [String] The amount of usage
303
318
  def usage
304
319
  @properties['usage']
305
320
  end
306
321
 
307
322
  ##
308
- # @return [String] The units in which Usage is measured.
323
+ # @return [String] The units in which usage is measured
309
324
  def usage_unit
310
325
  @properties['usage_unit']
311
326
  end
@@ -30,27 +30,28 @@ module Twilio
30
30
  ##
31
31
  # Retrieve a single page of TriggerInstance records from the API.
32
32
  # Request is executed immediately.
33
- # @param [String] callback_url Twilio will make a request to this url when the
34
- # trigger fires.
35
- # @param [String] trigger_value The trigger will fire when usage reaches this
36
- # value. For convenience, you can use an offset like `+30`, which tells Twilio to
37
- # create the UsageTrigger with its TriggerValue 30 units higher than the current
38
- # usage. (just be sure to urlencode the `+` as `%2B`).
39
- # @param [trigger.UsageCategory] usage_category The trigger will watch this usage
40
- # category. One of the supported [usage
41
- # categories](https://www.twilio.com/docs/api/rest/usage-records#usage-categories).
42
- # @param [String] callback_method Twilio will use this HTTP method when making a
43
- # request to the CallbackUrl. `GET` or `POST`. The default is `POST`.
44
- # @param [String] friendly_name A human readable description of the new trigger.
45
- # Maximum 64 characters.
46
- # @param [trigger.Recurring] recurring How this trigger recurs. Empty for
47
- # non-recurring triggers. One of `daily`, `monthly`, or `yearly` for recurring
48
- # triggers. A trigger will only fire once during each recurring period.
49
- # Recurring periods are in GMT.
33
+ # @param [String] callback_url The URL we should call using `callback_method` when
34
+ # the trigger fires.
35
+ # @param [String] trigger_value The usage value at which the trigger should fire.
36
+ # For convenience, you can use an offset value such as `+30` to specify a
37
+ # trigger_value that is 30 units more than the current usage value. Be sure to
38
+ # urlencode a `+` as `%2B`.
39
+ # @param [trigger.UsageCategory] usage_category The usage category that the
40
+ # trigger should watch. Use one of the supported [usage
41
+ # categories](https://www.twilio.com/docs/api/rest/usage-records#usage-categories)
42
+ # for this value.
43
+ # @param [String] callback_method The HTTP method we should use to call
44
+ # `callback_url`. Can be: `GET` or `POST` and the default is `POST`.
45
+ # @param [String] friendly_name A descriptive string that you create to describe
46
+ # the resource. It can be up to 64 characters long.
47
+ # @param [trigger.Recurring] recurring The frequency of a recurring UsageTrigger.
48
+ # Can be: `daily`, `monthly`, or `yearly` for recurring triggers or empty for
49
+ # non-recurring triggers. A trigger will only fire once during each period.
50
+ # Recurring times are in GMT.
50
51
  # @param [trigger.TriggerField] trigger_by The field in the
51
- # [UsageRecord](https://www.twilio.com/docs/api/rest/usage-records) that will fire
52
- # the trigger. One of `count`, `usage`, or `price` as described in the
53
- # [UsageRecords
52
+ # [UsageRecord](https://www.twilio.com/docs/api/rest/usage-records) resource that
53
+ # should fire the trigger. Can be: `count`, `usage`, or `price` as described in
54
+ # the [UsageRecords
54
55
  # documentation](https://www.twilio.com/docs/api/rest/usage-records#usage-count-price). The default is `usage`.
55
56
  # @return [TriggerInstance] Newly created TriggerInstance
56
57
  def create(callback_url: nil, trigger_value: nil, usage_category: nil, callback_method: :unset, friendly_name: :unset, recurring: :unset, trigger_by: :unset)
@@ -77,15 +78,14 @@ module Twilio
77
78
  # Lists TriggerInstance records from the API as a list.
78
79
  # Unlike stream(), this operation is eager and will load `limit` records into
79
80
  # memory before returning.
80
- # @param [trigger.Recurring] recurring Only show UsageTriggers that count over
81
- # this interval. One of `daily`, `monthly`, or `yearly`. To retrieve
82
- # non-recurring triggers, leave this empty or use `alltime`.
83
- # @param [trigger.TriggerField] trigger_by Only show UsageTriggers that trigger by
84
- # this field in the UsageRecord. Must be one of: `count`, `usage`, or `price` as
85
- # described in the [UsageRecords
81
+ # @param [trigger.Recurring] recurring The frequency of recurring UsageTriggers to
82
+ # read. Can be: `daily`, `monthly`, or `yearly` to read recurring UsageTriggers.
83
+ # An empty value or a value of `alltime` reads non-recurring UsageTriggers.
84
+ # @param [trigger.TriggerField] trigger_by The trigger field of the UsageTriggers
85
+ # to read. Can be: `count`, `usage`, or `price` as described in the [UsageRecords
86
86
  # documentation](https://www.twilio.com/docs/api/rest/usage-records#usage-count-price).
87
- # @param [trigger.UsageCategory] usage_category Only show UsageTriggers that watch
88
- # this usage category. Must be one of the supported [usage
87
+ # @param [trigger.UsageCategory] usage_category The usage category of the
88
+ # UsageTriggers to read. Must be a supported [usage
89
89
  # categories](https://www.twilio.com/docs/api/rest/usage-records#usage-categories).
90
90
  # @param [Integer] limit Upper limit for the number of records to return. stream()
91
91
  # guarantees to never return more than limit. Default is no limit
@@ -108,15 +108,14 @@ module Twilio
108
108
  # Streams TriggerInstance records from the API as an Enumerable.
109
109
  # This operation lazily loads records as efficiently as possible until the limit
110
110
  # is reached.
111
- # @param [trigger.Recurring] recurring Only show UsageTriggers that count over
112
- # this interval. One of `daily`, `monthly`, or `yearly`. To retrieve
113
- # non-recurring triggers, leave this empty or use `alltime`.
114
- # @param [trigger.TriggerField] trigger_by Only show UsageTriggers that trigger by
115
- # this field in the UsageRecord. Must be one of: `count`, `usage`, or `price` as
116
- # described in the [UsageRecords
111
+ # @param [trigger.Recurring] recurring The frequency of recurring UsageTriggers to
112
+ # read. Can be: `daily`, `monthly`, or `yearly` to read recurring UsageTriggers.
113
+ # An empty value or a value of `alltime` reads non-recurring UsageTriggers.
114
+ # @param [trigger.TriggerField] trigger_by The trigger field of the UsageTriggers
115
+ # to read. Can be: `count`, `usage`, or `price` as described in the [UsageRecords
117
116
  # documentation](https://www.twilio.com/docs/api/rest/usage-records#usage-count-price).
118
- # @param [trigger.UsageCategory] usage_category Only show UsageTriggers that watch
119
- # this usage category. Must be one of the supported [usage
117
+ # @param [trigger.UsageCategory] usage_category The usage category of the
118
+ # UsageTriggers to read. Must be a supported [usage
120
119
  # categories](https://www.twilio.com/docs/api/rest/usage-records#usage-categories).
121
120
  # @param [Integer] limit Upper limit for the number of records to return. stream()
122
121
  # guarantees to never return more than limit. Default is no limit.
@@ -155,15 +154,14 @@ module Twilio
155
154
  ##
156
155
  # Retrieve a single page of TriggerInstance records from the API.
157
156
  # Request is executed immediately.
158
- # @param [trigger.Recurring] recurring Only show UsageTriggers that count over
159
- # this interval. One of `daily`, `monthly`, or `yearly`. To retrieve
160
- # non-recurring triggers, leave this empty or use `alltime`.
161
- # @param [trigger.TriggerField] trigger_by Only show UsageTriggers that trigger by
162
- # this field in the UsageRecord. Must be one of: `count`, `usage`, or `price` as
163
- # described in the [UsageRecords
157
+ # @param [trigger.Recurring] recurring The frequency of recurring UsageTriggers to
158
+ # read. Can be: `daily`, `monthly`, or `yearly` to read recurring UsageTriggers.
159
+ # An empty value or a value of `alltime` reads non-recurring UsageTriggers.
160
+ # @param [trigger.TriggerField] trigger_by The trigger field of the UsageTriggers
161
+ # to read. Can be: `count`, `usage`, or `price` as described in the [UsageRecords
164
162
  # documentation](https://www.twilio.com/docs/api/rest/usage-records#usage-count-price).
165
- # @param [trigger.UsageCategory] usage_category Only show UsageTriggers that watch
166
- # this usage category. Must be one of the supported [usage
163
+ # @param [trigger.UsageCategory] usage_category The usage category of the
164
+ # UsageTriggers to read. Must be a supported [usage
167
165
  # categories](https://www.twilio.com/docs/api/rest/usage-records#usage-categories).
168
166
  # @param [String] page_token PageToken provided by the API
169
167
  # @param [Integer] page_number Page Number, this value is simply for client state
@@ -239,8 +237,11 @@ module Twilio
239
237
  ##
240
238
  # Initialize the TriggerContext
241
239
  # @param [Version] version Version that contains the resource
242
- # @param [String] account_sid The account_sid
243
- # @param [String] sid The usage-trigger Sid that uniquely identifies this resource
240
+ # @param [String] account_sid The SID of the
241
+ # [Account](https://www.twilio.com/docs/api/rest/account) that created the
242
+ # UsageTrigger resource to fetch.
243
+ # @param [String] sid The Twilio-provided string that uniquely identifies the
244
+ # UsageTrigger resource to fetch.
244
245
  # @return [TriggerContext] TriggerContext
245
246
  def initialize(version, account_sid, sid)
246
247
  super(version)
@@ -267,12 +268,12 @@ module Twilio
267
268
 
268
269
  ##
269
270
  # Update the TriggerInstance
270
- # @param [String] callback_method The HTTP method Twilio will use when making a
271
- # request to the CallbackUrl. `GET` or `POST`.
272
- # @param [String] callback_url Twilio will make a request to this url when the
273
- # trigger fires.
274
- # @param [String] friendly_name A user-specified, human-readable name for the
275
- # trigger.
271
+ # @param [String] callback_method The HTTP method we should use to call
272
+ # `callback_url`. Can be: `GET` or `POST` and the default is `POST`.
273
+ # @param [String] callback_url The URL we should call using `callback_method` when
274
+ # the trigger fires.
275
+ # @param [String] friendly_name A descriptive string that you create to describe
276
+ # the resource. It can be up to 64 characters long.
276
277
  # @return [TriggerInstance] Updated TriggerInstance
277
278
  def update(callback_method: :unset, callback_url: :unset, friendly_name: :unset)
278
279
  data = Twilio::Values.of({
@@ -312,7 +313,8 @@ module Twilio
312
313
  # @param [Hash] payload payload that contains response from Twilio
313
314
  # @param [String] account_sid A 34 character string that uniquely identifies this
314
315
  # resource.
315
- # @param [String] sid The usage-trigger Sid that uniquely identifies this resource
316
+ # @param [String] sid The Twilio-provided string that uniquely identifies the
317
+ # UsageTrigger resource to fetch.
316
318
  # @return [TriggerInstance] TriggerInstance
317
319
  def initialize(version, payload, account_sid: nil, sid: nil)
318
320
  super(version)
@@ -354,85 +356,85 @@ module Twilio
354
356
  end
355
357
 
356
358
  ##
357
- # @return [String] The account this trigger monitors.
359
+ # @return [String] The SID of the Account that this trigger monitors
358
360
  def account_sid
359
361
  @properties['account_sid']
360
362
  end
361
363
 
362
364
  ##
363
- # @return [String] The api_version
365
+ # @return [String] The API version used to create the resource
364
366
  def api_version
365
367
  @properties['api_version']
366
368
  end
367
369
 
368
370
  ##
369
- # @return [String] HTTP method to use with callback_url
371
+ # @return [String] The HTTP method we use to call callback_url
370
372
  def callback_method
371
373
  @properties['callback_method']
372
374
  end
373
375
 
374
376
  ##
375
- # @return [String] URL Twilio will request when the trigger fires
377
+ # @return [String] he URL we call when the trigger fires
376
378
  def callback_url
377
379
  @properties['callback_url']
378
380
  end
379
381
 
380
382
  ##
381
- # @return [String] The current value of the field the trigger is watching.
383
+ # @return [String] The current value of the field the trigger is watching
382
384
  def current_value
383
385
  @properties['current_value']
384
386
  end
385
387
 
386
388
  ##
387
- # @return [Time] The date this resource was created
389
+ # @return [Time] The RFC 2822 date and time in GMT that the resource was created
388
390
  def date_created
389
391
  @properties['date_created']
390
392
  end
391
393
 
392
394
  ##
393
- # @return [Time] The date the trigger was last fired
395
+ # @return [Time] The RFC 2822 date and time in GMT that the trigger was last fired
394
396
  def date_fired
395
397
  @properties['date_fired']
396
398
  end
397
399
 
398
400
  ##
399
- # @return [Time] The date this resource was last updated
401
+ # @return [Time] The RFC 2822 date and time in GMT that the resource was last updated
400
402
  def date_updated
401
403
  @properties['date_updated']
402
404
  end
403
405
 
404
406
  ##
405
- # @return [String] A user-specified, human-readable name for the trigger.
407
+ # @return [String] The string that you assigned to describe the trigger
406
408
  def friendly_name
407
409
  @properties['friendly_name']
408
410
  end
409
411
 
410
412
  ##
411
- # @return [trigger.Recurring] How this trigger recurs
413
+ # @return [trigger.Recurring] The frequency of a recurring UsageTrigger
412
414
  def recurring
413
415
  @properties['recurring']
414
416
  end
415
417
 
416
418
  ##
417
- # @return [String] The trigger's unique Sid
419
+ # @return [String] The unique string that identifies the resource
418
420
  def sid
419
421
  @properties['sid']
420
422
  end
421
423
 
422
424
  ##
423
- # @return [trigger.TriggerField] The field in the UsageRecord that fires the trigger
425
+ # @return [trigger.TriggerField] The field in the UsageRecord resource that fires the trigger
424
426
  def trigger_by
425
427
  @properties['trigger_by']
426
428
  end
427
429
 
428
430
  ##
429
- # @return [String] the value at which the trigger will fire
431
+ # @return [String] The value at which the trigger will fire
430
432
  def trigger_value
431
433
  @properties['trigger_value']
432
434
  end
433
435
 
434
436
  ##
435
- # @return [String] The URI for this resource
437
+ # @return [String] The URI of the resource, relative to `https://api.twilio.com`
436
438
  def uri
437
439
  @properties['uri']
438
440
  end
@@ -444,7 +446,7 @@ module Twilio
444
446
  end
445
447
 
446
448
  ##
447
- # @return [String] The URI of the UsageRecord this trigger is watching
449
+ # @return [String] The URI of the UsageRecord resource this trigger watches
448
450
  def usage_record_uri
449
451
  @properties['usage_record_uri']
450
452
  end
@@ -458,12 +460,12 @@ module Twilio
458
460
 
459
461
  ##
460
462
  # Update the TriggerInstance
461
- # @param [String] callback_method The HTTP method Twilio will use when making a
462
- # request to the CallbackUrl. `GET` or `POST`.
463
- # @param [String] callback_url Twilio will make a request to this url when the
464
- # trigger fires.
465
- # @param [String] friendly_name A user-specified, human-readable name for the
466
- # trigger.
463
+ # @param [String] callback_method The HTTP method we should use to call
464
+ # `callback_url`. Can be: `GET` or `POST` and the default is `POST`.
465
+ # @param [String] callback_url The URL we should call using `callback_method` when
466
+ # the trigger fires.
467
+ # @param [String] friendly_name A descriptive string that you create to describe
468
+ # the resource. It can be up to 64 characters long.
467
469
  # @return [TriggerInstance] Updated TriggerInstance
468
470
  def update(callback_method: :unset, callback_url: :unset, friendly_name: :unset)
469
471
  context.update(