twilio-ruby 5.8.0 → 5.8.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.travis.yml +0 -4
- data/CHANGES.md +9 -0
- data/README.md +2 -2
- data/lib/twilio-ruby/framework/error.rb +11 -9
- data/lib/twilio-ruby/framework/page.rb +1 -1
- data/lib/twilio-ruby/rest/api.rb +2 -1
- data/lib/twilio-ruby/rest/api/v2010/account.rb +12 -9
- data/lib/twilio-ruby/rest/api/v2010/account/key.rb +8 -6
- data/lib/twilio-ruby/rest/api/v2010/account/new_key.rb +7 -6
- data/lib/twilio-ruby/rest/api/v2010/account/sip/credential_list/credential.rb +12 -10
- data/lib/twilio-ruby/rest/api/v2010/account/sip/domain.rb +13 -11
- data/lib/twilio-ruby/rest/api/v2010/account/sip/domain/credential_list_mapping.rb +2 -2
- data/lib/twilio-ruby/rest/api/v2010/account/sip/domain/ip_access_control_list_mapping.rb +2 -2
- data/lib/twilio-ruby/rest/api/v2010/account/sip/ip_access_control_list.rb +3 -2
- data/lib/twilio-ruby/rest/api/v2010/account/usage/record.rb +27 -24
- data/lib/twilio-ruby/rest/api/v2010/account/usage/record/all_time.rb +43 -22
- data/lib/twilio-ruby/rest/api/v2010/account/usage/record/daily.rb +43 -22
- data/lib/twilio-ruby/rest/api/v2010/account/usage/record/last_month.rb +43 -22
- data/lib/twilio-ruby/rest/api/v2010/account/usage/record/monthly.rb +43 -22
- data/lib/twilio-ruby/rest/api/v2010/account/usage/record/this_month.rb +43 -22
- data/lib/twilio-ruby/rest/api/v2010/account/usage/record/today.rb +43 -22
- data/lib/twilio-ruby/rest/api/v2010/account/usage/record/yearly.rb +43 -22
- data/lib/twilio-ruby/rest/api/v2010/account/usage/record/yesterday.rb +43 -22
- data/lib/twilio-ruby/rest/api/v2010/account/usage/trigger.rb +39 -21
- data/lib/twilio-ruby/rest/client.rb +2 -1
- data/lib/twilio-ruby/rest/lookups.rb +3 -1
- data/lib/twilio-ruby/rest/lookups/v1/phone_number.rb +37 -11
- data/lib/twilio-ruby/rest/trunking.rb +2 -1
- data/lib/twilio-ruby/rest/trunking/v1/trunk.rb +78 -30
- data/lib/twilio-ruby/rest/trunking/v1/trunk/origination_url.rb +51 -28
- data/lib/twilio-ruby/rest/trunking/v1/trunk/phone_number.rb +3 -1
- data/lib/twilio-ruby/rest/video/v1/room/recording.rb +15 -8
- data/lib/twilio-ruby/version.rb +1 -1
- data/spec/integration/pricing/v1/messaging/country_spec.rb +12 -12
- data/spec/integration/pricing/v1/phone_number/country_spec.rb +17 -17
- data/spec/integration/pricing/v1/voice/country_spec.rb +21 -149
- data/spec/integration/pricing/v1/voice/number_spec.rb +4 -4
- data/spec/integration/video/v1/room/recording_spec.rb +10 -0
- metadata +2 -2
@@ -30,9 +30,16 @@ module Twilio
|
|
30
30
|
# Lists YearlyInstance 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 [yearly.Category] category
|
34
|
-
#
|
35
|
-
# @param [Date]
|
33
|
+
# @param [yearly.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 YearlyInstance 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 [yearly.Category] category
|
58
|
-
#
|
59
|
-
# @param [Date]
|
64
|
+
# @param [yearly.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 YearlyInstance records from the API.
|
96
110
|
# Request is executed immediately.
|
97
|
-
# @param [yearly.Category] category
|
98
|
-
#
|
99
|
-
# @param [Date]
|
111
|
+
# @param [yearly.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
|
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 [yearly.Category] The category
|
234
|
+
# @return [yearly.Category] The category of usage.
|
214
235
|
def category
|
215
236
|
@properties['category']
|
216
237
|
end
|
217
238
|
|
218
239
|
##
|
219
|
-
# @return [String] The
|
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
|
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]
|
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
|
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
|
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
|
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]
|
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
|
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
|
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 YesterdayInstance 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 [yesterday.Category] category
|
34
|
-
#
|
35
|
-
# @param [Date]
|
33
|
+
# @param [yesterday.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 YesterdayInstance 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 [yesterday.Category] category
|
58
|
-
#
|
59
|
-
# @param [Date]
|
64
|
+
# @param [yesterday.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 YesterdayInstance records from the API.
|
96
110
|
# Request is executed immediately.
|
97
|
-
# @param [yesterday.Category] category
|
98
|
-
#
|
99
|
-
# @param [Date]
|
111
|
+
# @param [yesterday.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
|
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 [yesterday.Category] The category
|
234
|
+
# @return [yesterday.Category] The category of usage.
|
214
235
|
def category
|
215
236
|
@properties['category']
|
216
237
|
end
|
217
238
|
|
218
239
|
##
|
219
|
-
# @return [String] The
|
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
|
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]
|
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
|
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
|
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
|
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]
|
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
|
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
|
300
|
+
# @return [String] The units in which Usage is measured.
|
280
301
|
def usage_unit
|
281
302
|
@properties['usage_unit']
|
282
303
|
end
|
@@ -30,20 +30,26 @@ module Twilio
|
|
30
30
|
# Request is executed immediately.
|
31
31
|
# @param [String] callback_url Twilio will make a request to this url when the
|
32
32
|
# trigger fires.
|
33
|
-
# @param [String] trigger_value The
|
34
|
-
#
|
35
|
-
#
|
36
|
-
#
|
37
|
-
# @param [
|
38
|
-
#
|
39
|
-
#
|
40
|
-
#
|
33
|
+
# @param [String] trigger_value The trigger will fire when usage reaches this
|
34
|
+
# value. For convenience, you can use an offset like `+30`, which tells Twilio to
|
35
|
+
# create the UsageTrigger with its TriggerValue 30 units higher than the current
|
36
|
+
# usage. (just be sure to urlencode the `+` as `%2B`).
|
37
|
+
# @param [trigger.UsageCategory] usage_category The trigger will watch this usage
|
38
|
+
# category. One of the supported [usage
|
39
|
+
# categories](https://www.twilio.com/docs/api/rest/usage-records#usage-categories).
|
40
|
+
# @param [String] callback_method Twilio will use this HTTP method when making a
|
41
|
+
# request to the CallbackUrl. `GET` or `POST`. The default is `POST`.
|
42
|
+
# @param [String] friendly_name A human readable description of the new trigger.
|
43
|
+
# Maximum 64 characters.
|
41
44
|
# @param [trigger.Recurring] recurring How this trigger recurs. Empty for
|
42
45
|
# non-recurring triggers. One of `daily`, `monthly`, or `yearly` for recurring
|
43
46
|
# triggers. A trigger will only fire once during each recurring period.
|
44
47
|
# Recurring periods are in GMT.
|
45
|
-
# @param [trigger.TriggerField] trigger_by The field in the
|
46
|
-
#
|
48
|
+
# @param [trigger.TriggerField] trigger_by The field in the
|
49
|
+
# [UsageRecord](https://www.twilio.com/docs/api/rest/usage-records) that will fire
|
50
|
+
# the trigger. One of `count`, `usage`, or `price` as described in the
|
51
|
+
# [UsageRecords
|
52
|
+
# documentation](https://www.twilio.com/docs/api/rest/usage-records#usage-count-price). The default is `usage`.
|
47
53
|
# @return [TriggerInstance] Newly created TriggerInstance
|
48
54
|
def create(callback_url: nil, trigger_value: nil, usage_category: nil, callback_method: :unset, friendly_name: :unset, recurring: :unset, trigger_by: :unset)
|
49
55
|
data = Twilio::Values.of({
|
@@ -70,11 +76,15 @@ module Twilio
|
|
70
76
|
# Unlike stream(), this operation is eager and will load `limit` records into
|
71
77
|
# memory before returning.
|
72
78
|
# @param [trigger.Recurring] recurring Only show UsageTriggers that count over
|
73
|
-
# this interval.
|
79
|
+
# this interval. One of `daily`, `monthly`, or `yearly`. To retrieve
|
80
|
+
# non-recurring triggers, leave this empty or use `alltime`.
|
74
81
|
# @param [trigger.TriggerField] trigger_by Only show UsageTriggers that trigger by
|
75
|
-
# this field in the
|
82
|
+
# this field in the UsageRecord. Must be one of: `count`, `usage`, or `price` as
|
83
|
+
# described in the [UsageRecords
|
84
|
+
# documentation](https://www.twilio.com/docs/api/rest/usage-records#usage-count-price).
|
76
85
|
# @param [trigger.UsageCategory] usage_category Only show UsageTriggers that watch
|
77
|
-
# this usage category
|
86
|
+
# this usage category. Must be one of the supported [usage
|
87
|
+
# categories](https://www.twilio.com/docs/api/rest/usage-records#usage-categories).
|
78
88
|
# @param [Integer] limit Upper limit for the number of records to return. stream()
|
79
89
|
# guarantees to never return more than limit. Default is no limit
|
80
90
|
# @param [Integer] page_size Number of records to fetch per request, when
|
@@ -97,11 +107,15 @@ module Twilio
|
|
97
107
|
# This operation lazily loads records as efficiently as possible until the limit
|
98
108
|
# is reached.
|
99
109
|
# @param [trigger.Recurring] recurring Only show UsageTriggers that count over
|
100
|
-
# this interval.
|
110
|
+
# this interval. One of `daily`, `monthly`, or `yearly`. To retrieve
|
111
|
+
# non-recurring triggers, leave this empty or use `alltime`.
|
101
112
|
# @param [trigger.TriggerField] trigger_by Only show UsageTriggers that trigger by
|
102
|
-
# this field in the
|
113
|
+
# this field in the UsageRecord. Must be one of: `count`, `usage`, or `price` as
|
114
|
+
# described in the [UsageRecords
|
115
|
+
# documentation](https://www.twilio.com/docs/api/rest/usage-records#usage-count-price).
|
103
116
|
# @param [trigger.UsageCategory] usage_category Only show UsageTriggers that watch
|
104
|
-
# this usage category
|
117
|
+
# this usage category. Must be one of the supported [usage
|
118
|
+
# categories](https://www.twilio.com/docs/api/rest/usage-records#usage-categories).
|
105
119
|
# @param [Integer] limit Upper limit for the number of records to return. stream()
|
106
120
|
# guarantees to never return more than limit. Default is no limit.
|
107
121
|
# @param [Integer] page_size Number of records to fetch per request, when
|
@@ -140,11 +154,15 @@ module Twilio
|
|
140
154
|
# Retrieve a single page of TriggerInstance records from the API.
|
141
155
|
# Request is executed immediately.
|
142
156
|
# @param [trigger.Recurring] recurring Only show UsageTriggers that count over
|
143
|
-
# this interval.
|
157
|
+
# this interval. One of `daily`, `monthly`, or `yearly`. To retrieve
|
158
|
+
# non-recurring triggers, leave this empty or use `alltime`.
|
144
159
|
# @param [trigger.TriggerField] trigger_by Only show UsageTriggers that trigger by
|
145
|
-
# this field in the
|
160
|
+
# this field in the UsageRecord. Must be one of: `count`, `usage`, or `price` as
|
161
|
+
# described in the [UsageRecords
|
162
|
+
# documentation](https://www.twilio.com/docs/api/rest/usage-records#usage-count-price).
|
146
163
|
# @param [trigger.UsageCategory] usage_category Only show UsageTriggers that watch
|
147
|
-
# this usage category
|
164
|
+
# this usage category. Must be one of the supported [usage
|
165
|
+
# categories](https://www.twilio.com/docs/api/rest/usage-records#usage-categories).
|
148
166
|
# @param [String] page_token PageToken provided by the API
|
149
167
|
# @param [Integer] page_number Page Number, this value is simply for client state
|
150
168
|
# @param [Integer] page_size Number of records to return, defaults to 50
|
@@ -248,7 +266,7 @@ module Twilio
|
|
248
266
|
##
|
249
267
|
# Update the TriggerInstance
|
250
268
|
# @param [String] callback_method The HTTP method Twilio will use when making a
|
251
|
-
# request to the CallbackUrl. GET or POST
|
269
|
+
# request to the CallbackUrl. `GET` or `POST`.
|
252
270
|
# @param [String] callback_url Twilio will make a request to this url when the
|
253
271
|
# trigger fires.
|
254
272
|
# @param [String] friendly_name A user-specified, human-readable name for the
|
@@ -439,7 +457,7 @@ module Twilio
|
|
439
457
|
##
|
440
458
|
# Update the TriggerInstance
|
441
459
|
# @param [String] callback_method The HTTP method Twilio will use when making a
|
442
|
-
# request to the CallbackUrl. GET or POST
|
460
|
+
# request to the CallbackUrl. `GET` or `POST`.
|
443
461
|
# @param [String] callback_url Twilio will make a request to this url when the
|
444
462
|
# trigger fires.
|
445
463
|
# @param [String] friendly_name A user-specified, human-readable name for the
|
@@ -260,7 +260,8 @@ module Twilio
|
|
260
260
|
end
|
261
261
|
|
262
262
|
##
|
263
|
-
# @param [String] sid
|
263
|
+
# @param [String] sid A 34 character string that uniquely identifies this API Key.
|
264
|
+
# You will use this as the basic-auth `user` when authenticating to the API.
|
264
265
|
# @return [Twilio::REST::Api::V2010::AccountContext::KeyInstance] if sid was passed.
|
265
266
|
# @return [Twilio::REST::Api::V2010::AccountContext::KeyList]
|
266
267
|
def keys(sid=:unset)
|
@@ -27,7 +27,9 @@ module Twilio
|
|
27
27
|
end
|
28
28
|
|
29
29
|
##
|
30
|
-
# @param [String] phone_number The
|
30
|
+
# @param [String] phone_number The phone number, in
|
31
|
+
# [E.164](https://www.twilio.com/docs/api/rest/response#phone-numbers) format
|
32
|
+
# (i.e. "+1").
|
31
33
|
# @return [Twilio::REST::Lookups::V1::PhoneNumberInstance] if phone_number was passed.
|
32
34
|
# @return [Twilio::REST::Lookups::V1::PhoneNumberList]
|
33
35
|
def phone_numbers(phone_number=:unset)
|
@@ -72,9 +72,22 @@ module Twilio
|
|
72
72
|
|
73
73
|
##
|
74
74
|
# Fetch a PhoneNumberInstance
|
75
|
-
# @param [String] country_code
|
76
|
-
#
|
77
|
-
#
|
75
|
+
# @param [String] country_code Optional [ISO country
|
76
|
+
# code](http://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) of the phone number. This
|
77
|
+
# is used to specify the country when the number is provided in a national format.
|
78
|
+
# @param [String] type Indicates the type of information you would like returned
|
79
|
+
# with your request. Possible values are `carrier` or `caller-name`. If not
|
80
|
+
# specified, the default is null. Carrier information costs $0.005 per phone
|
81
|
+
# number looked up. Caller Name information costs $0.01 per phone number looked
|
82
|
+
# up, and is currently ONLY available in the US. You can retrieve both types of
|
83
|
+
# information by including two `Type` arguments or making two separate requests.
|
84
|
+
# @param [String] add_ons Indicates the particular Add-on you would like to use to
|
85
|
+
# get more information. Possible values are the *Add-on Unique Names* of Add-ons
|
86
|
+
# installed on your account. You can specify multiple instances of this parameter
|
87
|
+
# to invoke different Add-ons. See [Add-ons
|
88
|
+
# documentation](https://www.twilio.com/docs/api/addons) for information on
|
89
|
+
# installing Add-ons. Add-on pricing is available in your list of Installed
|
90
|
+
# Add-ons in the Console.
|
78
91
|
# @param [Hash] add_ons_data The add_ons_data
|
79
92
|
# @return [PhoneNumberInstance] Fetched PhoneNumberInstance
|
80
93
|
def fetch(country_code: :unset, type: :unset, add_ons: :unset, add_ons_data: :unset)
|
@@ -140,25 +153,25 @@ module Twilio
|
|
140
153
|
end
|
141
154
|
|
142
155
|
##
|
143
|
-
# @return [String]
|
156
|
+
# @return [String] String indicating the name of the owner of the phone number.
|
144
157
|
def caller_name
|
145
158
|
@properties['caller_name']
|
146
159
|
end
|
147
160
|
|
148
161
|
##
|
149
|
-
# @return [String] The
|
162
|
+
# @return [String] The ISO country code for the phone number.
|
150
163
|
def country_code
|
151
164
|
@properties['country_code']
|
152
165
|
end
|
153
166
|
|
154
167
|
##
|
155
|
-
# @return [String] The
|
168
|
+
# @return [String] The phone number, in E.
|
156
169
|
def phone_number
|
157
170
|
@properties['phone_number']
|
158
171
|
end
|
159
172
|
|
160
173
|
##
|
161
|
-
# @return [String] The
|
174
|
+
# @return [String] The phone number, in national format.
|
162
175
|
def national_format
|
163
176
|
@properties['national_format']
|
164
177
|
end
|
@@ -170,7 +183,7 @@ module Twilio
|
|
170
183
|
end
|
171
184
|
|
172
185
|
##
|
173
|
-
# @return [Hash]
|
186
|
+
# @return [Hash] Results of any Add-ons you have specified using the AddOn parameter in the request, as a JSON dictionary.
|
174
187
|
def add_ons
|
175
188
|
@properties['add_ons']
|
176
189
|
end
|
@@ -183,9 +196,22 @@ module Twilio
|
|
183
196
|
|
184
197
|
##
|
185
198
|
# Fetch a PhoneNumberInstance
|
186
|
-
# @param [String] country_code
|
187
|
-
#
|
188
|
-
#
|
199
|
+
# @param [String] country_code Optional [ISO country
|
200
|
+
# code](http://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) of the phone number. This
|
201
|
+
# is used to specify the country when the number is provided in a national format.
|
202
|
+
# @param [String] type Indicates the type of information you would like returned
|
203
|
+
# with your request. Possible values are `carrier` or `caller-name`. If not
|
204
|
+
# specified, the default is null. Carrier information costs $0.005 per phone
|
205
|
+
# number looked up. Caller Name information costs $0.01 per phone number looked
|
206
|
+
# up, and is currently ONLY available in the US. You can retrieve both types of
|
207
|
+
# information by including two `Type` arguments or making two separate requests.
|
208
|
+
# @param [String] add_ons Indicates the particular Add-on you would like to use to
|
209
|
+
# get more information. Possible values are the *Add-on Unique Names* of Add-ons
|
210
|
+
# installed on your account. You can specify multiple instances of this parameter
|
211
|
+
# to invoke different Add-ons. See [Add-ons
|
212
|
+
# documentation](https://www.twilio.com/docs/api/addons) for information on
|
213
|
+
# installing Add-ons. Add-on pricing is available in your list of Installed
|
214
|
+
# Add-ons in the Console.
|
189
215
|
# @param [Hash] add_ons_data The add_ons_data
|
190
216
|
# @return [PhoneNumberInstance] Fetched PhoneNumberInstance
|
191
217
|
def fetch(country_code: :unset, type: :unset, add_ons: :unset, add_ons_data: :unset)
|