twilio-ruby 5.19.0 → 5.20.0
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/CHANGES.md +13 -0
- data/README.md +2 -2
- data/lib/twilio-ruby/rest/api.rb +16 -13
- data/lib/twilio-ruby/rest/api/v2010/account/address.rb +85 -88
- data/lib/twilio-ruby/rest/api/v2010/account/address/dependent_phone_number.rb +4 -4
- data/lib/twilio-ruby/rest/api/v2010/account/application.rb +135 -146
- data/lib/twilio-ruby/rest/api/v2010/account/authorized_connect_app.rb +21 -17
- data/lib/twilio-ruby/rest/api/v2010/account/available_phone_number.rb +14 -8
- data/lib/twilio-ruby/rest/api/v2010/account/available_phone_number/local.rb +150 -166
- data/lib/twilio-ruby/rest/api/v2010/account/available_phone_number/machine_to_machine.rb +174 -79
- data/lib/twilio-ruby/rest/api/v2010/account/available_phone_number/mobile.rb +147 -160
- data/lib/twilio-ruby/rest/api/v2010/account/available_phone_number/national.rb +174 -79
- data/lib/twilio-ruby/rest/api/v2010/account/available_phone_number/shared_cost.rb +174 -79
- data/lib/twilio-ruby/rest/api/v2010/account/available_phone_number/toll_free.rb +147 -160
- data/lib/twilio-ruby/rest/api/v2010/account/available_phone_number/voip.rb +174 -79
- data/lib/twilio-ruby/rest/api/v2010/account/connect_app.rb +51 -51
- data/lib/twilio-ruby/rest/api/v2010/account/incoming_phone_number.rb +246 -251
- data/lib/twilio-ruby/rest/api/v2010/account/incoming_phone_number/assigned_add_on.rb +31 -26
- data/lib/twilio-ruby/rest/api/v2010/account/incoming_phone_number/assigned_add_on/assigned_add_on_extension.rb +34 -26
- data/lib/twilio-ruby/rest/api/v2010/account/incoming_phone_number/local.rb +109 -112
- data/lib/twilio-ruby/rest/api/v2010/account/incoming_phone_number/mobile.rb +108 -112
- data/lib/twilio-ruby/rest/api/v2010/account/incoming_phone_number/toll_free.rb +108 -112
- data/lib/twilio-ruby/rest/api/v2010/account/message/feedback.rb +21 -11
- data/lib/twilio-ruby/rest/api/v2010/account/new_key.rb +7 -6
- data/lib/twilio-ruby/rest/api/v2010/account/new_signing_key.rb +7 -6
- data/lib/twilio-ruby/rest/api/v2010/account/notification.rb +32 -25
- data/lib/twilio-ruby/rest/api/v2010/account/outgoing_caller_id.rb +36 -36
- data/lib/twilio-ruby/rest/api/v2010/account/sip.rb +2 -1
- data/lib/twilio-ruby/rest/api/v2010/account/sip/domain.rb +70 -66
- data/lib/twilio-ruby/rest/api/v2010/account/sip/domain/auth_types.rb +10 -10
- data/lib/twilio-ruby/rest/api/v2010/account/sip/domain/auth_types/auth_calls_mapping.rb +14 -14
- data/lib/twilio-ruby/rest/api/v2010/account/sip/domain/auth_types/auth_calls_mapping/auth_calls_credential_list_mapping.rb +26 -23
- 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
- data/lib/twilio-ruby/rest/api/v2010/account/sip/domain/auth_types/auth_registrations_mapping.rb +12 -12
- data/lib/twilio-ruby/rest/api/v2010/account/sip/domain/auth_types/auth_registrations_mapping/auth_registrations_credential_list_mapping.rb +26 -23
- data/lib/twilio-ruby/rest/api/v2010/account/sip/domain/credential_list_mapping.rb +4 -4
- data/lib/twilio-ruby/rest/api/v2010/account/sip/domain/ip_access_control_list_mapping.rb +4 -4
- data/lib/twilio-ruby/rest/api/v2010/account/token.rb +11 -9
- data/lib/twilio-ruby/rest/api/v2010/account/usage.rb +2 -1
- data/lib/twilio-ruby/rest/api/v2010/account/usage/record.rb +56 -47
- data/lib/twilio-ruby/rest/api/v2010/account/usage/record/all_time.rb +59 -44
- data/lib/twilio-ruby/rest/api/v2010/account/usage/record/daily.rb +59 -44
- data/lib/twilio-ruby/rest/api/v2010/account/usage/record/last_month.rb +59 -47
- data/lib/twilio-ruby/rest/api/v2010/account/usage/record/monthly.rb +59 -44
- data/lib/twilio-ruby/rest/api/v2010/account/usage/record/this_month.rb +59 -44
- data/lib/twilio-ruby/rest/api/v2010/account/usage/record/today.rb +59 -44
- data/lib/twilio-ruby/rest/api/v2010/account/usage/record/yearly.rb +59 -44
- data/lib/twilio-ruby/rest/api/v2010/account/usage/record/yesterday.rb +59 -44
- data/lib/twilio-ruby/rest/api/v2010/account/usage/trigger.rb +76 -74
- data/lib/twilio-ruby/rest/authy.rb +8 -8
- data/lib/twilio-ruby/rest/authy/v1.rb +15 -15
- data/lib/twilio-ruby/rest/client.rb +16 -13
- data/lib/twilio-ruby/rest/messaging.rb +15 -0
- data/lib/twilio-ruby/rest/messaging/v1.rb +23 -0
- data/lib/twilio-ruby/rest/messaging/v1/session.rb +482 -0
- data/lib/twilio-ruby/rest/messaging/v1/session/message.rb +434 -0
- data/lib/twilio-ruby/rest/messaging/v1/session/participant.rb +458 -0
- data/lib/twilio-ruby/rest/messaging/v1/webhook.rb +285 -0
- data/lib/twilio-ruby/rest/preview.rb +8 -8
- data/lib/twilio-ruby/rest/preview/marketplace.rb +13 -13
- data/lib/twilio-ruby/rest/proxy/v1/service/session.rb +3 -2
- data/lib/twilio-ruby/rest/video.rb +9 -9
- data/lib/twilio-ruby/rest/video/v1.rb +16 -16
- data/lib/twilio-ruby/rest/video/v1/composition.rb +7 -6
- data/lib/twilio-ruby/rest/video/v1/composition_hook.rb +37 -21
- data/lib/twilio-ruby/rest/video/v1/recording.rb +12 -3
- data/lib/twilio-ruby/security/request_validator.rb +2 -2
- data/lib/twilio-ruby/version.rb +1 -1
- data/spec/integration/messaging/v1/session/message_spec.rb +238 -0
- data/spec/integration/messaging/v1/session/participant_spec.rb +256 -0
- data/spec/integration/messaging/v1/session_spec.rb +223 -0
- data/spec/integration/messaging/v1/webhook_spec.rb +92 -0
- data/spec/integration/video/v1/composition_hook_spec.rb +1 -1
- data/spec/security/request_validator_spec.rb +5 -7
- metadata +14 -2
@@ -32,17 +32,22 @@ module Twilio
|
|
32
32
|
# Lists AllTimeInstance 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 [all_time.Category] category
|
36
|
-
# category](https://www.twilio.com/docs/api/rest/usage-records#usage-categories)
|
35
|
+
# @param [all_time.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.
|
39
|
-
#
|
40
|
-
#
|
41
|
-
# @param [Date] end_date Only include usage that
|
42
|
-
# date
|
43
|
-
#
|
44
|
-
#
|
45
|
-
# @param [Boolean] 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 AllTimeInstance 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 [all_time.Category] category
|
69
|
-
# category](https://www.twilio.com/docs/api/rest/usage-records#usage-categories)
|
73
|
+
# @param [all_time.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.
|
72
|
-
#
|
73
|
-
#
|
74
|
-
# @param [Date] end_date Only include usage that
|
75
|
-
# date
|
76
|
-
#
|
77
|
-
#
|
78
|
-
# @param [Boolean] 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 AllTimeInstance records from the API.
|
116
126
|
# Request is executed immediately.
|
117
|
-
# @param [all_time.Category] category
|
118
|
-
# category](https://www.twilio.com/docs/api/rest/usage-records#usage-categories)
|
127
|
+
# @param [all_time.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.
|
121
|
-
#
|
122
|
-
#
|
123
|
-
# @param [Date] end_date Only include usage that
|
124
|
-
# date
|
125
|
-
#
|
126
|
-
#
|
127
|
-
# @param [Boolean] 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
|
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
|
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 [all_time.Category] The category of usage
|
257
|
+
# @return [all_time.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
|
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
|
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
|
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
|
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
|
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
|
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]
|
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
|
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
|
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
|
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 DailyInstance 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 [daily.Category] category
|
36
|
-
# category](https://www.twilio.com/docs/api/rest/usage-records#usage-categories)
|
35
|
+
# @param [daily.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.
|
39
|
-
#
|
40
|
-
#
|
41
|
-
# @param [Date] end_date Only include usage that
|
42
|
-
# date
|
43
|
-
#
|
44
|
-
#
|
45
|
-
# @param [Boolean] 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 DailyInstance 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 [daily.Category] category
|
69
|
-
# category](https://www.twilio.com/docs/api/rest/usage-records#usage-categories)
|
73
|
+
# @param [daily.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.
|
72
|
-
#
|
73
|
-
#
|
74
|
-
# @param [Date] end_date Only include usage that
|
75
|
-
# date
|
76
|
-
#
|
77
|
-
#
|
78
|
-
# @param [Boolean] 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 DailyInstance records from the API.
|
116
126
|
# Request is executed immediately.
|
117
|
-
# @param [daily.Category] category
|
118
|
-
# category](https://www.twilio.com/docs/api/rest/usage-records#usage-categories)
|
127
|
+
# @param [daily.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.
|
121
|
-
#
|
122
|
-
#
|
123
|
-
# @param [Date] end_date Only include usage that
|
124
|
-
# date
|
125
|
-
#
|
126
|
-
#
|
127
|
-
# @param [Boolean] 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
|
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
|
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 [daily.Category] The category of usage
|
257
|
+
# @return [daily.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
|
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
|
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
|
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
|
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
|
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
|
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]
|
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
|
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
|
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
|
323
|
+
# @return [String] The units in which usage is measured
|
309
324
|
def usage_unit
|
310
325
|
@properties['usage_unit']
|
311
326
|
end
|
@@ -32,18 +32,22 @@ module Twilio
|
|
32
32
|
# Lists LastMonthInstance 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 [last_month.Category] category The
|
36
|
-
#
|
37
|
-
#
|
35
|
+
# @param [last_month.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.
|
38
39
|
# @param [Date] start_date Only include usage that has occurred on or after this
|
39
|
-
# date.
|
40
|
-
#
|
41
|
-
#
|
42
|
-
# @param [Date] end_date Only include usage that
|
43
|
-
# date
|
44
|
-
#
|
45
|
-
#
|
46
|
-
# @param [Boolean] 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.
|
47
51
|
# @param [Integer] limit Upper limit for the number of records to return. stream()
|
48
52
|
# guarantees to never return more than limit. Default is no limit
|
49
53
|
# @param [Integer] page_size Number of records to fetch per request, when
|
@@ -66,18 +70,22 @@ module Twilio
|
|
66
70
|
# Streams LastMonthInstance records from the API as an Enumerable.
|
67
71
|
# This operation lazily loads records as efficiently as possible until the limit
|
68
72
|
# is reached.
|
69
|
-
# @param [last_month.Category] category The
|
70
|
-
#
|
71
|
-
#
|
73
|
+
# @param [last_month.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.
|
72
77
|
# @param [Date] start_date Only include usage that has occurred on or after this
|
73
|
-
# date.
|
74
|
-
#
|
75
|
-
#
|
76
|
-
# @param [Date] end_date Only include usage that
|
77
|
-
# date
|
78
|
-
#
|
79
|
-
#
|
80
|
-
# @param [Boolean] 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.
|
81
89
|
# @param [Integer] limit Upper limit for the number of records to return. stream()
|
82
90
|
# guarantees to never return more than limit. Default is no limit.
|
83
91
|
# @param [Integer] page_size Number of records to fetch per request, when
|
@@ -116,18 +124,22 @@ module Twilio
|
|
116
124
|
##
|
117
125
|
# Retrieve a single page of LastMonthInstance records from the API.
|
118
126
|
# Request is executed immediately.
|
119
|
-
# @param [last_month.Category] category The
|
120
|
-
#
|
121
|
-
#
|
127
|
+
# @param [last_month.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.
|
122
131
|
# @param [Date] start_date Only include usage that has occurred on or after this
|
123
|
-
# date.
|
124
|
-
#
|
125
|
-
#
|
126
|
-
# @param [Date] end_date Only include usage that
|
127
|
-
# date
|
128
|
-
#
|
129
|
-
#
|
130
|
-
# @param [Boolean] 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.
|
131
143
|
# @param [String] page_token PageToken provided by the API
|
132
144
|
# @param [Integer] page_number Page Number, this value is simply for client state
|
133
145
|
# @param [Integer] page_size Number of records to return, defaults to 50
|
@@ -230,85 +242,85 @@ module Twilio
|
|
230
242
|
end
|
231
243
|
|
232
244
|
##
|
233
|
-
# @return [String] The Account
|
245
|
+
# @return [String] The SID of the Account accrued the usage
|
234
246
|
def account_sid
|
235
247
|
@properties['account_sid']
|
236
248
|
end
|
237
249
|
|
238
250
|
##
|
239
|
-
# @return [String] The
|
251
|
+
# @return [String] The API version used to create the resource
|
240
252
|
def api_version
|
241
253
|
@properties['api_version']
|
242
254
|
end
|
243
255
|
|
244
256
|
##
|
245
|
-
# @return [last_month.Category] The category of usage
|
257
|
+
# @return [last_month.Category] The category of usage
|
246
258
|
def category
|
247
259
|
@properties['category']
|
248
260
|
end
|
249
261
|
|
250
262
|
##
|
251
|
-
# @return [String] The number of usage events
|
263
|
+
# @return [String] The number of usage events
|
252
264
|
def count
|
253
265
|
@properties['count']
|
254
266
|
end
|
255
267
|
|
256
268
|
##
|
257
|
-
# @return [String] The units in which
|
269
|
+
# @return [String] The units in which count is measured
|
258
270
|
def count_unit
|
259
271
|
@properties['count_unit']
|
260
272
|
end
|
261
273
|
|
262
274
|
##
|
263
|
-
# @return [String] A
|
275
|
+
# @return [String] A plain-language description of the usage category
|
264
276
|
def description
|
265
277
|
@properties['description']
|
266
278
|
end
|
267
279
|
|
268
280
|
##
|
269
|
-
# @return [Date] The last date for which usage is included in
|
281
|
+
# @return [Date] The last date for which usage is included in the UsageRecord
|
270
282
|
def end_date
|
271
283
|
@properties['end_date']
|
272
284
|
end
|
273
285
|
|
274
286
|
##
|
275
|
-
# @return [String] The total price of the usage
|
287
|
+
# @return [String] The total price of the usage
|
276
288
|
def price
|
277
289
|
@properties['price']
|
278
290
|
end
|
279
291
|
|
280
292
|
##
|
281
|
-
# @return [String] The currency in which
|
293
|
+
# @return [String] The currency in which `price` is measured
|
282
294
|
def price_unit
|
283
295
|
@properties['price_unit']
|
284
296
|
end
|
285
297
|
|
286
298
|
##
|
287
|
-
# @return [Date] The first date for which usage is included in this UsageRecord
|
299
|
+
# @return [Date] The first date for which usage is included in this UsageRecord
|
288
300
|
def start_date
|
289
301
|
@properties['start_date']
|
290
302
|
end
|
291
303
|
|
292
304
|
##
|
293
|
-
# @return [String]
|
305
|
+
# @return [String] A list of related resources identified by their relative URIs
|
294
306
|
def subresource_uris
|
295
307
|
@properties['subresource_uris']
|
296
308
|
end
|
297
309
|
|
298
310
|
##
|
299
|
-
# @return [String] The URI
|
311
|
+
# @return [String] The URI of the resource, relative to `https://api.twilio.com`
|
300
312
|
def uri
|
301
313
|
@properties['uri']
|
302
314
|
end
|
303
315
|
|
304
316
|
##
|
305
|
-
# @return [String] The amount of
|
317
|
+
# @return [String] The amount of usage
|
306
318
|
def usage
|
307
319
|
@properties['usage']
|
308
320
|
end
|
309
321
|
|
310
322
|
##
|
311
|
-
# @return [String] The units in which
|
323
|
+
# @return [String] The units in which usage is measured
|
312
324
|
def usage_unit
|
313
325
|
@properties['usage_unit']
|
314
326
|
end
|