twilio-ruby 5.8.0 → 5.8.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (40) hide show
  1. checksums.yaml +4 -4
  2. data/.travis.yml +0 -4
  3. data/CHANGES.md +9 -0
  4. data/README.md +2 -2
  5. data/lib/twilio-ruby/framework/error.rb +11 -9
  6. data/lib/twilio-ruby/framework/page.rb +1 -1
  7. data/lib/twilio-ruby/rest/api.rb +2 -1
  8. data/lib/twilio-ruby/rest/api/v2010/account.rb +12 -9
  9. data/lib/twilio-ruby/rest/api/v2010/account/key.rb +8 -6
  10. data/lib/twilio-ruby/rest/api/v2010/account/new_key.rb +7 -6
  11. data/lib/twilio-ruby/rest/api/v2010/account/sip/credential_list/credential.rb +12 -10
  12. data/lib/twilio-ruby/rest/api/v2010/account/sip/domain.rb +13 -11
  13. data/lib/twilio-ruby/rest/api/v2010/account/sip/domain/credential_list_mapping.rb +2 -2
  14. data/lib/twilio-ruby/rest/api/v2010/account/sip/domain/ip_access_control_list_mapping.rb +2 -2
  15. data/lib/twilio-ruby/rest/api/v2010/account/sip/ip_access_control_list.rb +3 -2
  16. data/lib/twilio-ruby/rest/api/v2010/account/usage/record.rb +27 -24
  17. data/lib/twilio-ruby/rest/api/v2010/account/usage/record/all_time.rb +43 -22
  18. data/lib/twilio-ruby/rest/api/v2010/account/usage/record/daily.rb +43 -22
  19. data/lib/twilio-ruby/rest/api/v2010/account/usage/record/last_month.rb +43 -22
  20. data/lib/twilio-ruby/rest/api/v2010/account/usage/record/monthly.rb +43 -22
  21. data/lib/twilio-ruby/rest/api/v2010/account/usage/record/this_month.rb +43 -22
  22. data/lib/twilio-ruby/rest/api/v2010/account/usage/record/today.rb +43 -22
  23. data/lib/twilio-ruby/rest/api/v2010/account/usage/record/yearly.rb +43 -22
  24. data/lib/twilio-ruby/rest/api/v2010/account/usage/record/yesterday.rb +43 -22
  25. data/lib/twilio-ruby/rest/api/v2010/account/usage/trigger.rb +39 -21
  26. data/lib/twilio-ruby/rest/client.rb +2 -1
  27. data/lib/twilio-ruby/rest/lookups.rb +3 -1
  28. data/lib/twilio-ruby/rest/lookups/v1/phone_number.rb +37 -11
  29. data/lib/twilio-ruby/rest/trunking.rb +2 -1
  30. data/lib/twilio-ruby/rest/trunking/v1/trunk.rb +78 -30
  31. data/lib/twilio-ruby/rest/trunking/v1/trunk/origination_url.rb +51 -28
  32. data/lib/twilio-ruby/rest/trunking/v1/trunk/phone_number.rb +3 -1
  33. data/lib/twilio-ruby/rest/video/v1/room/recording.rb +15 -8
  34. data/lib/twilio-ruby/version.rb +1 -1
  35. data/spec/integration/pricing/v1/messaging/country_spec.rb +12 -12
  36. data/spec/integration/pricing/v1/phone_number/country_spec.rb +17 -17
  37. data/spec/integration/pricing/v1/voice/country_spec.rb +21 -149
  38. data/spec/integration/pricing/v1/voice/number_spec.rb +4 -4
  39. data/spec/integration/video/v1/room/recording_spec.rb +10 -0
  40. metadata +2 -2
@@ -30,9 +30,16 @@ module Twilio
30
30
  # Lists MonthlyInstance records from the API as a list.
31
31
  # Unlike stream(), this operation is eager and will load `limit` records into
32
32
  # memory before returning.
33
- # @param [monthly.Category] category The category
34
- # @param [Date] start_date The start_date
35
- # @param [Date] end_date The end_date
33
+ # @param [monthly.Category] category Only include usage of this [usage
34
+ # category](https://www.twilio.com/docs/api/rest/usage-records#usage-categories).
35
+ # @param [Date] start_date Only include usage that has occurred on or after this
36
+ # date. Format is YYYY-MM-DD. All dates are in GMT. As a convenience, you can
37
+ # also specify offsets to today. For example, `StartDate=-30days` will make
38
+ # `StartDate` be 30 days before today.
39
+ # @param [Date] end_date Only include usage that has occurred on or before this
40
+ # date. Format is YYYY-MM-DD. All dates are in GMT. As a convenience, you can
41
+ # also specify offsets to today. For example, `EndDate=+30days` will make
42
+ # `EndDate` be 30 days from today.
36
43
  # @param [Integer] limit Upper limit for the number of records to return. stream()
37
44
  # guarantees to never return more than limit. Default is no limit
38
45
  # @param [Integer] page_size Number of records to fetch per request, when
@@ -54,9 +61,16 @@ module Twilio
54
61
  # Streams MonthlyInstance records from the API as an Enumerable.
55
62
  # This operation lazily loads records as efficiently as possible until the limit
56
63
  # is reached.
57
- # @param [monthly.Category] category The category
58
- # @param [Date] start_date The start_date
59
- # @param [Date] end_date The end_date
64
+ # @param [monthly.Category] category Only include usage of this [usage
65
+ # category](https://www.twilio.com/docs/api/rest/usage-records#usage-categories).
66
+ # @param [Date] start_date Only include usage that has occurred on or after this
67
+ # date. Format is YYYY-MM-DD. All dates are in GMT. As a convenience, you can
68
+ # also specify offsets to today. For example, `StartDate=-30days` will make
69
+ # `StartDate` be 30 days before today.
70
+ # @param [Date] end_date Only include usage that has occurred on or before 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, `EndDate=+30days` will make
73
+ # `EndDate` be 30 days from today.
60
74
  # @param [Integer] limit Upper limit for the number of records to return. stream()
61
75
  # guarantees to never return more than limit. Default is no limit.
62
76
  # @param [Integer] page_size Number of records to fetch per request, when
@@ -94,9 +108,16 @@ module Twilio
94
108
  ##
95
109
  # Retrieve a single page of MonthlyInstance records from the API.
96
110
  # Request is executed immediately.
97
- # @param [monthly.Category] category The category
98
- # @param [Date] start_date The start_date
99
- # @param [Date] end_date The end_date
111
+ # @param [monthly.Category] category Only include usage of this [usage
112
+ # category](https://www.twilio.com/docs/api/rest/usage-records#usage-categories).
113
+ # @param [Date] start_date Only include usage that has occurred on or after this
114
+ # date. Format is YYYY-MM-DD. All dates are in GMT. As a convenience, you can
115
+ # also specify offsets to today. For example, `StartDate=-30days` will make
116
+ # `StartDate` be 30 days before today.
117
+ # @param [Date] end_date Only include usage that has occurred on or before this
118
+ # date. Format is YYYY-MM-DD. All dates are in GMT. As a convenience, you can
119
+ # also specify offsets to today. For example, `EndDate=+30days` will make
120
+ # `EndDate` be 30 days from today.
100
121
  # @param [String] page_token PageToken provided by the API
101
122
  # @param [Integer] page_number Page Number, this value is simply for client state
102
123
  # @param [Integer] page_size Number of records to return, defaults to 50
@@ -198,7 +219,7 @@ module Twilio
198
219
  end
199
220
 
200
221
  ##
201
- # @return [String] The account_sid
222
+ # @return [String] The Account that accrued the usage.
202
223
  def account_sid
203
224
  @properties['account_sid']
204
225
  end
@@ -210,73 +231,73 @@ module Twilio
210
231
  end
211
232
 
212
233
  ##
213
- # @return [monthly.Category] The category
234
+ # @return [monthly.Category] The category of usage.
214
235
  def category
215
236
  @properties['category']
216
237
  end
217
238
 
218
239
  ##
219
- # @return [String] The count
240
+ # @return [String] The number of usage events.
220
241
  def count
221
242
  @properties['count']
222
243
  end
223
244
 
224
245
  ##
225
- # @return [String] The count_unit
246
+ # @return [String] The units in which Count is measured.
226
247
  def count_unit
227
248
  @properties['count_unit']
228
249
  end
229
250
 
230
251
  ##
231
- # @return [String] The description
252
+ # @return [String] A human-readable description of the usage category.
232
253
  def description
233
254
  @properties['description']
234
255
  end
235
256
 
236
257
  ##
237
- # @return [Date] The end_date
258
+ # @return [Date] The last date for which usage is included in this UsageRecord, formatted as YYYY-MM-DD.
238
259
  def end_date
239
260
  @properties['end_date']
240
261
  end
241
262
 
242
263
  ##
243
- # @return [String] The price
264
+ # @return [String] The total price of the usage, in the currency associated with the account.
244
265
  def price
245
266
  @properties['price']
246
267
  end
247
268
 
248
269
  ##
249
- # @return [String] The price_unit
270
+ # @return [String] The currency in which Price is measured, in ISO 4127 format.
250
271
  def price_unit
251
272
  @properties['price_unit']
252
273
  end
253
274
 
254
275
  ##
255
- # @return [Date] The start_date
276
+ # @return [Date] The first date for which usage is included in this UsageRecord, formatted as YYYY-MM-DD.
256
277
  def start_date
257
278
  @properties['start_date']
258
279
  end
259
280
 
260
281
  ##
261
- # @return [String] The subresource_uris
282
+ # @return [String] Subresource Uris for this UsageRecord.
262
283
  def subresource_uris
263
284
  @properties['subresource_uris']
264
285
  end
265
286
 
266
287
  ##
267
- # @return [String] The uri
288
+ # @return [String] The URI that returns only this UsageRecord, relative to https://api.
268
289
  def uri
269
290
  @properties['uri']
270
291
  end
271
292
 
272
293
  ##
273
- # @return [String] The usage
294
+ # @return [String] The amount of billed usage.
274
295
  def usage
275
296
  @properties['usage']
276
297
  end
277
298
 
278
299
  ##
279
- # @return [String] The usage_unit
300
+ # @return [String] The units in which Usage is measured.
280
301
  def usage_unit
281
302
  @properties['usage_unit']
282
303
  end
@@ -30,9 +30,16 @@ module Twilio
30
30
  # Lists ThisMonthInstance records from the API as a list.
31
31
  # Unlike stream(), this operation is eager and will load `limit` records into
32
32
  # memory before returning.
33
- # @param [this_month.Category] category The category
34
- # @param [Date] start_date The start_date
35
- # @param [Date] end_date The end_date
33
+ # @param [this_month.Category] category Only include usage of this [usage
34
+ # category](https://www.twilio.com/docs/api/rest/usage-records#usage-categories).
35
+ # @param [Date] start_date Only include usage that has occurred on or after this
36
+ # date. Format is YYYY-MM-DD. All dates are in GMT. As a convenience, you can
37
+ # also specify offsets to today. For example, `StartDate=-30days` will make
38
+ # `StartDate` be 30 days before today.
39
+ # @param [Date] end_date Only include usage that has occurred on or before this
40
+ # date. Format is YYYY-MM-DD. All dates are in GMT. As a convenience, you can
41
+ # also specify offsets to today. For example, `EndDate=+30days` will make
42
+ # `EndDate` be 30 days from today.
36
43
  # @param [Integer] limit Upper limit for the number of records to return. stream()
37
44
  # guarantees to never return more than limit. Default is no limit
38
45
  # @param [Integer] page_size Number of records to fetch per request, when
@@ -54,9 +61,16 @@ module Twilio
54
61
  # Streams ThisMonthInstance records from the API as an Enumerable.
55
62
  # This operation lazily loads records as efficiently as possible until the limit
56
63
  # is reached.
57
- # @param [this_month.Category] category The category
58
- # @param [Date] start_date The start_date
59
- # @param [Date] end_date The end_date
64
+ # @param [this_month.Category] category Only include usage of this [usage
65
+ # category](https://www.twilio.com/docs/api/rest/usage-records#usage-categories).
66
+ # @param [Date] start_date Only include usage that has occurred on or after this
67
+ # date. Format is YYYY-MM-DD. All dates are in GMT. As a convenience, you can
68
+ # also specify offsets to today. For example, `StartDate=-30days` will make
69
+ # `StartDate` be 30 days before today.
70
+ # @param [Date] end_date Only include usage that has occurred on or before 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, `EndDate=+30days` will make
73
+ # `EndDate` be 30 days from today.
60
74
  # @param [Integer] limit Upper limit for the number of records to return. stream()
61
75
  # guarantees to never return more than limit. Default is no limit.
62
76
  # @param [Integer] page_size Number of records to fetch per request, when
@@ -94,9 +108,16 @@ module Twilio
94
108
  ##
95
109
  # Retrieve a single page of ThisMonthInstance records from the API.
96
110
  # Request is executed immediately.
97
- # @param [this_month.Category] category The category
98
- # @param [Date] start_date The start_date
99
- # @param [Date] end_date The end_date
111
+ # @param [this_month.Category] category Only include usage of this [usage
112
+ # category](https://www.twilio.com/docs/api/rest/usage-records#usage-categories).
113
+ # @param [Date] start_date Only include usage that has occurred on or after this
114
+ # date. Format is YYYY-MM-DD. All dates are in GMT. As a convenience, you can
115
+ # also specify offsets to today. For example, `StartDate=-30days` will make
116
+ # `StartDate` be 30 days before today.
117
+ # @param [Date] end_date Only include usage that has occurred on or before this
118
+ # date. Format is YYYY-MM-DD. All dates are in GMT. As a convenience, you can
119
+ # also specify offsets to today. For example, `EndDate=+30days` will make
120
+ # `EndDate` be 30 days from today.
100
121
  # @param [String] page_token PageToken provided by the API
101
122
  # @param [Integer] page_number Page Number, this value is simply for client state
102
123
  # @param [Integer] page_size Number of records to return, defaults to 50
@@ -198,7 +219,7 @@ module Twilio
198
219
  end
199
220
 
200
221
  ##
201
- # @return [String] The account_sid
222
+ # @return [String] The Account that accrued the usage.
202
223
  def account_sid
203
224
  @properties['account_sid']
204
225
  end
@@ -210,73 +231,73 @@ module Twilio
210
231
  end
211
232
 
212
233
  ##
213
- # @return [this_month.Category] The category
234
+ # @return [this_month.Category] The category of usage.
214
235
  def category
215
236
  @properties['category']
216
237
  end
217
238
 
218
239
  ##
219
- # @return [String] The count
240
+ # @return [String] The number of usage events.
220
241
  def count
221
242
  @properties['count']
222
243
  end
223
244
 
224
245
  ##
225
- # @return [String] The count_unit
246
+ # @return [String] The units in which Count is measured.
226
247
  def count_unit
227
248
  @properties['count_unit']
228
249
  end
229
250
 
230
251
  ##
231
- # @return [String] The description
252
+ # @return [String] A human-readable description of the usage category.
232
253
  def description
233
254
  @properties['description']
234
255
  end
235
256
 
236
257
  ##
237
- # @return [Date] The end_date
258
+ # @return [Date] The last date for which usage is included in this UsageRecord, formatted as YYYY-MM-DD.
238
259
  def end_date
239
260
  @properties['end_date']
240
261
  end
241
262
 
242
263
  ##
243
- # @return [String] The price
264
+ # @return [String] The total price of the usage, in the currency associated with the account.
244
265
  def price
245
266
  @properties['price']
246
267
  end
247
268
 
248
269
  ##
249
- # @return [String] The price_unit
270
+ # @return [String] The currency in which Price is measured, in ISO 4127 format.
250
271
  def price_unit
251
272
  @properties['price_unit']
252
273
  end
253
274
 
254
275
  ##
255
- # @return [Date] The start_date
276
+ # @return [Date] The first date for which usage is included in this UsageRecord, formatted as YYYY-MM-DD.
256
277
  def start_date
257
278
  @properties['start_date']
258
279
  end
259
280
 
260
281
  ##
261
- # @return [String] The subresource_uris
282
+ # @return [String] Subresource Uris for this UsageRecord.
262
283
  def subresource_uris
263
284
  @properties['subresource_uris']
264
285
  end
265
286
 
266
287
  ##
267
- # @return [String] The uri
288
+ # @return [String] The URI that returns only this UsageRecord, relative to https://api.
268
289
  def uri
269
290
  @properties['uri']
270
291
  end
271
292
 
272
293
  ##
273
- # @return [String] The usage
294
+ # @return [String] The amount of billed usage.
274
295
  def usage
275
296
  @properties['usage']
276
297
  end
277
298
 
278
299
  ##
279
- # @return [String] The usage_unit
300
+ # @return [String] The units in which Usage is measured.
280
301
  def usage_unit
281
302
  @properties['usage_unit']
282
303
  end
@@ -30,9 +30,16 @@ module Twilio
30
30
  # Lists TodayInstance records from the API as a list.
31
31
  # Unlike stream(), this operation is eager and will load `limit` records into
32
32
  # memory before returning.
33
- # @param [today.Category] category The category
34
- # @param [Date] start_date The start_date
35
- # @param [Date] end_date The end_date
33
+ # @param [today.Category] category Only include usage of this [usage
34
+ # category](https://www.twilio.com/docs/api/rest/usage-records#usage-categories).
35
+ # @param [Date] start_date Only include usage that has occurred on or after this
36
+ # date. Format is YYYY-MM-DD. All dates are in GMT. As a convenience, you can
37
+ # also specify offsets to today. For example, `StartDate=-30days` will make
38
+ # `StartDate` be 30 days before today.
39
+ # @param [Date] end_date Only include usage that has occurred on or before this
40
+ # date. Format is YYYY-MM-DD. All dates are in GMT. As a convenience, you can
41
+ # also specify offsets to today. For example, `EndDate=+30days` will make
42
+ # `EndDate` be 30 days from today.
36
43
  # @param [Integer] limit Upper limit for the number of records to return. stream()
37
44
  # guarantees to never return more than limit. Default is no limit
38
45
  # @param [Integer] page_size Number of records to fetch per request, when
@@ -54,9 +61,16 @@ module Twilio
54
61
  # Streams TodayInstance records from the API as an Enumerable.
55
62
  # This operation lazily loads records as efficiently as possible until the limit
56
63
  # is reached.
57
- # @param [today.Category] category The category
58
- # @param [Date] start_date The start_date
59
- # @param [Date] end_date The end_date
64
+ # @param [today.Category] category Only include usage of this [usage
65
+ # category](https://www.twilio.com/docs/api/rest/usage-records#usage-categories).
66
+ # @param [Date] start_date Only include usage that has occurred on or after this
67
+ # date. Format is YYYY-MM-DD. All dates are in GMT. As a convenience, you can
68
+ # also specify offsets to today. For example, `StartDate=-30days` will make
69
+ # `StartDate` be 30 days before today.
70
+ # @param [Date] end_date Only include usage that has occurred on or before 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, `EndDate=+30days` will make
73
+ # `EndDate` be 30 days from today.
60
74
  # @param [Integer] limit Upper limit for the number of records to return. stream()
61
75
  # guarantees to never return more than limit. Default is no limit.
62
76
  # @param [Integer] page_size Number of records to fetch per request, when
@@ -94,9 +108,16 @@ module Twilio
94
108
  ##
95
109
  # Retrieve a single page of TodayInstance records from the API.
96
110
  # Request is executed immediately.
97
- # @param [today.Category] category The category
98
- # @param [Date] start_date The start_date
99
- # @param [Date] end_date The end_date
111
+ # @param [today.Category] category Only include usage of this [usage
112
+ # category](https://www.twilio.com/docs/api/rest/usage-records#usage-categories).
113
+ # @param [Date] start_date Only include usage that has occurred on or after this
114
+ # date. Format is YYYY-MM-DD. All dates are in GMT. As a convenience, you can
115
+ # also specify offsets to today. For example, `StartDate=-30days` will make
116
+ # `StartDate` be 30 days before today.
117
+ # @param [Date] end_date Only include usage that has occurred on or before this
118
+ # date. Format is YYYY-MM-DD. All dates are in GMT. As a convenience, you can
119
+ # also specify offsets to today. For example, `EndDate=+30days` will make
120
+ # `EndDate` be 30 days from today.
100
121
  # @param [String] page_token PageToken provided by the API
101
122
  # @param [Integer] page_number Page Number, this value is simply for client state
102
123
  # @param [Integer] page_size Number of records to return, defaults to 50
@@ -198,7 +219,7 @@ module Twilio
198
219
  end
199
220
 
200
221
  ##
201
- # @return [String] The account_sid
222
+ # @return [String] The Account that accrued the usage.
202
223
  def account_sid
203
224
  @properties['account_sid']
204
225
  end
@@ -210,73 +231,73 @@ module Twilio
210
231
  end
211
232
 
212
233
  ##
213
- # @return [today.Category] The category
234
+ # @return [today.Category] The category of usage.
214
235
  def category
215
236
  @properties['category']
216
237
  end
217
238
 
218
239
  ##
219
- # @return [String] The count
240
+ # @return [String] The number of usage events.
220
241
  def count
221
242
  @properties['count']
222
243
  end
223
244
 
224
245
  ##
225
- # @return [String] The count_unit
246
+ # @return [String] The units in which Count is measured.
226
247
  def count_unit
227
248
  @properties['count_unit']
228
249
  end
229
250
 
230
251
  ##
231
- # @return [String] The description
252
+ # @return [String] A human-readable description of the usage category.
232
253
  def description
233
254
  @properties['description']
234
255
  end
235
256
 
236
257
  ##
237
- # @return [Date] The end_date
258
+ # @return [Date] The last date for which usage is included in this UsageRecord, formatted as YYYY-MM-DD.
238
259
  def end_date
239
260
  @properties['end_date']
240
261
  end
241
262
 
242
263
  ##
243
- # @return [String] The price
264
+ # @return [String] The total price of the usage, in the currency associated with the account.
244
265
  def price
245
266
  @properties['price']
246
267
  end
247
268
 
248
269
  ##
249
- # @return [String] The price_unit
270
+ # @return [String] The currency in which Price is measured, in ISO 4127 format.
250
271
  def price_unit
251
272
  @properties['price_unit']
252
273
  end
253
274
 
254
275
  ##
255
- # @return [Date] The start_date
276
+ # @return [Date] The first date for which usage is included in this UsageRecord, formatted as YYYY-MM-DD.
256
277
  def start_date
257
278
  @properties['start_date']
258
279
  end
259
280
 
260
281
  ##
261
- # @return [String] The subresource_uris
282
+ # @return [String] Subresource Uris for this UsageRecord.
262
283
  def subresource_uris
263
284
  @properties['subresource_uris']
264
285
  end
265
286
 
266
287
  ##
267
- # @return [String] The uri
288
+ # @return [String] The URI that returns only this UsageRecord, relative to https://api.
268
289
  def uri
269
290
  @properties['uri']
270
291
  end
271
292
 
272
293
  ##
273
- # @return [String] The usage
294
+ # @return [String] The amount of billed usage.
274
295
  def usage
275
296
  @properties['usage']
276
297
  end
277
298
 
278
299
  ##
279
- # @return [String] The usage_unit
300
+ # @return [String] The units in which Usage is measured.
280
301
  def usage_unit
281
302
  @properties['usage_unit']
282
303
  end