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
@@ -19,11 +19,11 @@ module Twilio
|
|
19
19
|
##
|
20
20
|
# Initialize the AuthCallsIpAccessControlListMappingList
|
21
21
|
# @param [Version] version Version that contains the resource
|
22
|
-
# @param [String] account_sid The
|
23
|
-
# [Account](https://www.twilio.com/docs/api/rest/account)
|
24
|
-
#
|
25
|
-
# @param [String] domain_sid
|
26
|
-
#
|
22
|
+
# @param [String] account_sid The SID of the
|
23
|
+
# [Account](https://www.twilio.com/docs/api/rest/account) that created the
|
24
|
+
# SipDomain resource.
|
25
|
+
# @param [String] domain_sid The unique string that that we created to identify
|
26
|
+
# the SipDomain resource.
|
27
27
|
# @return [AuthCallsIpAccessControlListMappingList] AuthCallsIpAccessControlListMappingList
|
28
28
|
def initialize(version, account_sid: nil, domain_sid: nil)
|
29
29
|
super(version)
|
@@ -36,8 +36,8 @@ module Twilio
|
|
36
36
|
##
|
37
37
|
# Retrieve a single page of AuthCallsIpAccessControlListMappingInstance records from the API.
|
38
38
|
# Request is executed immediately.
|
39
|
-
# @param [String] ip_access_control_list_sid
|
40
|
-
#
|
39
|
+
# @param [String] ip_access_control_list_sid The SID of the IpAccessControlList
|
40
|
+
# resource to map to the SIP domain.
|
41
41
|
# @return [AuthCallsIpAccessControlListMappingInstance] Newly created AuthCallsIpAccessControlListMappingInstance
|
42
42
|
def create(ip_access_control_list_sid: nil)
|
43
43
|
data = Twilio::Values.of({'IpAccessControlListSid' => ip_access_control_list_sid, })
|
@@ -183,10 +183,13 @@ module Twilio
|
|
183
183
|
##
|
184
184
|
# Initialize the AuthCallsIpAccessControlListMappingContext
|
185
185
|
# @param [Version] version Version that contains the resource
|
186
|
-
# @param [String] account_sid The
|
187
|
-
#
|
188
|
-
#
|
189
|
-
#
|
186
|
+
# @param [String] account_sid The SID of the
|
187
|
+
# [Account](https://www.twilio.com/docs/api/rest/account) that created the
|
188
|
+
# IpAccessControlListMapping resource to fetch.
|
189
|
+
# @param [String] domain_sid The SID of the SIP domain that contains the resource
|
190
|
+
# to fetch.
|
191
|
+
# @param [String] sid The Twilio-provided string that uniquely identifies the
|
192
|
+
# IpAccessControlListMapping resource to fetch.
|
190
193
|
# @return [AuthCallsIpAccessControlListMappingContext] AuthCallsIpAccessControlListMappingContext
|
191
194
|
def initialize(version, account_sid, domain_sid, sid)
|
192
195
|
super(version)
|
@@ -237,13 +240,13 @@ module Twilio
|
|
237
240
|
# Initialize the AuthCallsIpAccessControlListMappingInstance
|
238
241
|
# @param [Version] version Version that contains the resource
|
239
242
|
# @param [Hash] payload payload that contains response from Twilio
|
240
|
-
# @param [String] account_sid The
|
241
|
-
# [Account](https://www.twilio.com/docs/api/rest/account)
|
242
|
-
#
|
243
|
-
# @param [String] domain_sid
|
244
|
-
#
|
245
|
-
# @param [String] sid The
|
246
|
-
# resource
|
243
|
+
# @param [String] account_sid The SID of the
|
244
|
+
# [Account](https://www.twilio.com/docs/api/rest/account) that created the
|
245
|
+
# SipDomain resource.
|
246
|
+
# @param [String] domain_sid The unique string that that we created to identify
|
247
|
+
# the SipDomain resource.
|
248
|
+
# @param [String] sid The Twilio-provided string that uniquely identifies the
|
249
|
+
# IpAccessControlListMapping resource to fetch.
|
247
250
|
# @return [AuthCallsIpAccessControlListMappingInstance] AuthCallsIpAccessControlListMappingInstance
|
248
251
|
def initialize(version, payload, account_sid: nil, domain_sid: nil, sid: nil)
|
249
252
|
super(version)
|
@@ -283,31 +286,31 @@ module Twilio
|
|
283
286
|
end
|
284
287
|
|
285
288
|
##
|
286
|
-
# @return [String] The
|
289
|
+
# @return [String] The SID of the Account that created the resource
|
287
290
|
def account_sid
|
288
291
|
@properties['account_sid']
|
289
292
|
end
|
290
293
|
|
291
294
|
##
|
292
|
-
# @return [Time] The date
|
295
|
+
# @return [Time] The RFC 2822 date and time in GMT that the resource was created
|
293
296
|
def date_created
|
294
297
|
@properties['date_created']
|
295
298
|
end
|
296
299
|
|
297
300
|
##
|
298
|
-
# @return [Time] The date
|
301
|
+
# @return [Time] The RFC 2822 date and time in GMT that the resource was last updated
|
299
302
|
def date_updated
|
300
303
|
@properties['date_updated']
|
301
304
|
end
|
302
305
|
|
303
306
|
##
|
304
|
-
# @return [String]
|
307
|
+
# @return [String] The string that you assigned to describe the resource
|
305
308
|
def friendly_name
|
306
309
|
@properties['friendly_name']
|
307
310
|
end
|
308
311
|
|
309
312
|
##
|
310
|
-
# @return [String]
|
313
|
+
# @return [String] The unique string that identifies the resource
|
311
314
|
def sid
|
312
315
|
@properties['sid']
|
313
316
|
end
|
data/lib/twilio-ruby/rest/api/v2010/account/sip/domain/auth_types/auth_registrations_mapping.rb
CHANGED
@@ -18,11 +18,11 @@ module Twilio
|
|
18
18
|
##
|
19
19
|
# Initialize the AuthTypeRegistrationsList
|
20
20
|
# @param [Version] version Version that contains the resource
|
21
|
-
# @param [String] account_sid The
|
22
|
-
# [Account](https://www.twilio.com/docs/api/rest/account)
|
23
|
-
#
|
24
|
-
# @param [String] domain_sid
|
25
|
-
#
|
21
|
+
# @param [String] account_sid The SID of the
|
22
|
+
# [Account](https://www.twilio.com/docs/api/rest/account) that created the
|
23
|
+
# SipDomain resource.
|
24
|
+
# @param [String] domain_sid The unique string that that we created to identify
|
25
|
+
# the SipDomain resource.
|
26
26
|
# @return [AuthTypeRegistrationsList] AuthTypeRegistrationsList
|
27
27
|
def initialize(version, account_sid: nil, domain_sid: nil)
|
28
28
|
super(version)
|
@@ -36,8 +36,8 @@ module Twilio
|
|
36
36
|
|
37
37
|
##
|
38
38
|
# Access the credential_list_mappings
|
39
|
-
# @param [String] sid The
|
40
|
-
# resource
|
39
|
+
# @param [String] sid The Twilio-provided string that uniquely identifies the
|
40
|
+
# CredentialListMapping resource to fetch.
|
41
41
|
# @return [AuthRegistrationsCredentialListMappingList]
|
42
42
|
# @return [AuthRegistrationsCredentialListMappingContext] if sid was passed.
|
43
43
|
def credential_list_mappings(sid=:unset)
|
@@ -105,11 +105,11 @@ module Twilio
|
|
105
105
|
# Initialize the AuthTypeRegistrationsInstance
|
106
106
|
# @param [Version] version Version that contains the resource
|
107
107
|
# @param [Hash] payload payload that contains response from Twilio
|
108
|
-
# @param [String] account_sid The
|
109
|
-
# [Account](https://www.twilio.com/docs/api/rest/account)
|
110
|
-
#
|
111
|
-
# @param [String] domain_sid
|
112
|
-
#
|
108
|
+
# @param [String] account_sid The SID of the
|
109
|
+
# [Account](https://www.twilio.com/docs/api/rest/account) that created the
|
110
|
+
# SipDomain resource.
|
111
|
+
# @param [String] domain_sid The unique string that that we created to identify
|
112
|
+
# the SipDomain resource.
|
113
113
|
# @return [AuthTypeRegistrationsInstance] AuthTypeRegistrationsInstance
|
114
114
|
def initialize(version, payload, account_sid: nil, domain_sid: nil)
|
115
115
|
super(version)
|
@@ -19,11 +19,11 @@ module Twilio
|
|
19
19
|
##
|
20
20
|
# Initialize the AuthRegistrationsCredentialListMappingList
|
21
21
|
# @param [Version] version Version that contains the resource
|
22
|
-
# @param [String] account_sid The
|
23
|
-
# [Account](https://www.twilio.com/docs/api/rest/account)
|
24
|
-
#
|
25
|
-
# @param [String] domain_sid
|
26
|
-
#
|
22
|
+
# @param [String] account_sid The SID of the
|
23
|
+
# [Account](https://www.twilio.com/docs/api/rest/account) that created the
|
24
|
+
# SipDomain resource.
|
25
|
+
# @param [String] domain_sid The unique string that that we created to identify
|
26
|
+
# the SipDomain resource.
|
27
27
|
# @return [AuthRegistrationsCredentialListMappingList] AuthRegistrationsCredentialListMappingList
|
28
28
|
def initialize(version, account_sid: nil, domain_sid: nil)
|
29
29
|
super(version)
|
@@ -36,8 +36,8 @@ module Twilio
|
|
36
36
|
##
|
37
37
|
# Retrieve a single page of AuthRegistrationsCredentialListMappingInstance records from the API.
|
38
38
|
# Request is executed immediately.
|
39
|
-
# @param [String] credential_list_sid
|
40
|
-
#
|
39
|
+
# @param [String] credential_list_sid The SID of the CredentialList resource to
|
40
|
+
# map to the SIP domain.
|
41
41
|
# @return [AuthRegistrationsCredentialListMappingInstance] Newly created AuthRegistrationsCredentialListMappingInstance
|
42
42
|
def create(credential_list_sid: nil)
|
43
43
|
data = Twilio::Values.of({'CredentialListSid' => credential_list_sid, })
|
@@ -183,10 +183,13 @@ module Twilio
|
|
183
183
|
##
|
184
184
|
# Initialize the AuthRegistrationsCredentialListMappingContext
|
185
185
|
# @param [Version] version Version that contains the resource
|
186
|
-
# @param [String] account_sid The
|
187
|
-
#
|
188
|
-
#
|
189
|
-
#
|
186
|
+
# @param [String] account_sid The SID of the
|
187
|
+
# [Account](https://www.twilio.com/docs/api/rest/account) that created the
|
188
|
+
# CredentialListMapping resource to fetch.
|
189
|
+
# @param [String] domain_sid The SID of the SIP domain that contains the resource
|
190
|
+
# to fetch.
|
191
|
+
# @param [String] sid The Twilio-provided string that uniquely identifies the
|
192
|
+
# CredentialListMapping resource to fetch.
|
190
193
|
# @return [AuthRegistrationsCredentialListMappingContext] AuthRegistrationsCredentialListMappingContext
|
191
194
|
def initialize(version, account_sid, domain_sid, sid)
|
192
195
|
super(version)
|
@@ -237,13 +240,13 @@ module Twilio
|
|
237
240
|
# Initialize the AuthRegistrationsCredentialListMappingInstance
|
238
241
|
# @param [Version] version Version that contains the resource
|
239
242
|
# @param [Hash] payload payload that contains response from Twilio
|
240
|
-
# @param [String] account_sid The
|
241
|
-
# [Account](https://www.twilio.com/docs/api/rest/account)
|
242
|
-
#
|
243
|
-
# @param [String] domain_sid
|
244
|
-
#
|
245
|
-
# @param [String] sid The
|
246
|
-
# resource
|
243
|
+
# @param [String] account_sid The SID of the
|
244
|
+
# [Account](https://www.twilio.com/docs/api/rest/account) that created the
|
245
|
+
# SipDomain resource.
|
246
|
+
# @param [String] domain_sid The unique string that that we created to identify
|
247
|
+
# the SipDomain resource.
|
248
|
+
# @param [String] sid The Twilio-provided string that uniquely identifies the
|
249
|
+
# CredentialListMapping resource to fetch.
|
247
250
|
# @return [AuthRegistrationsCredentialListMappingInstance] AuthRegistrationsCredentialListMappingInstance
|
248
251
|
def initialize(version, payload, account_sid: nil, domain_sid: nil, sid: nil)
|
249
252
|
super(version)
|
@@ -283,31 +286,31 @@ module Twilio
|
|
283
286
|
end
|
284
287
|
|
285
288
|
##
|
286
|
-
# @return [String] The
|
289
|
+
# @return [String] The SID of the Account that created the resource
|
287
290
|
def account_sid
|
288
291
|
@properties['account_sid']
|
289
292
|
end
|
290
293
|
|
291
294
|
##
|
292
|
-
# @return [Time] The date
|
295
|
+
# @return [Time] The RFC 2822 date and time in GMT that the resource was created
|
293
296
|
def date_created
|
294
297
|
@properties['date_created']
|
295
298
|
end
|
296
299
|
|
297
300
|
##
|
298
|
-
# @return [Time] The date
|
301
|
+
# @return [Time] The RFC 2822 date and time in GMT that the resource was last updated
|
299
302
|
def date_updated
|
300
303
|
@properties['date_updated']
|
301
304
|
end
|
302
305
|
|
303
306
|
##
|
304
|
-
# @return [String]
|
307
|
+
# @return [String] The string that you assigned to describe the resource
|
305
308
|
def friendly_name
|
306
309
|
@properties['friendly_name']
|
307
310
|
end
|
308
311
|
|
309
312
|
##
|
310
|
-
# @return [String]
|
313
|
+
# @return [String] The unique string that identifies the resource
|
311
314
|
def sid
|
312
315
|
@properties['sid']
|
313
316
|
end
|
@@ -19,8 +19,8 @@ module Twilio
|
|
19
19
|
# @param [Version] version Version that contains the resource
|
20
20
|
# @param [String] account_sid The unique id of the Account that is responsible for
|
21
21
|
# this resource.
|
22
|
-
# @param [String] domain_sid
|
23
|
-
#
|
22
|
+
# @param [String] domain_sid The unique string that that we created to identify
|
23
|
+
# the SipDomain resource.
|
24
24
|
# @return [CredentialListMappingList] CredentialListMappingList
|
25
25
|
def initialize(version, account_sid: nil, domain_sid: nil)
|
26
26
|
super(version)
|
@@ -239,8 +239,8 @@ module Twilio
|
|
239
239
|
# @param [Hash] payload payload that contains response from Twilio
|
240
240
|
# @param [String] account_sid The unique id of the Account that is responsible for
|
241
241
|
# this resource.
|
242
|
-
# @param [String] domain_sid
|
243
|
-
#
|
242
|
+
# @param [String] domain_sid The unique string that that we created to identify
|
243
|
+
# the SipDomain resource.
|
244
244
|
# @param [String] sid A 34 character string that uniquely identifies the resource
|
245
245
|
# to fetch.
|
246
246
|
# @return [CredentialListMappingInstance] CredentialListMappingInstance
|
@@ -19,8 +19,8 @@ module Twilio
|
|
19
19
|
# @param [Version] version Version that contains the resource
|
20
20
|
# @param [String] account_sid The unique id of the Account that is responsible for
|
21
21
|
# this resource.
|
22
|
-
# @param [String] domain_sid
|
23
|
-
#
|
22
|
+
# @param [String] domain_sid The unique string that that we created to identify
|
23
|
+
# the SipDomain resource.
|
24
24
|
# @return [IpAccessControlListMappingList] IpAccessControlListMappingList
|
25
25
|
def initialize(version, account_sid: nil, domain_sid: nil)
|
26
26
|
super(version)
|
@@ -238,8 +238,8 @@ module Twilio
|
|
238
238
|
# @param [Hash] payload payload that contains response from Twilio
|
239
239
|
# @param [String] account_sid The unique id of the Account that is responsible for
|
240
240
|
# this resource.
|
241
|
-
# @param [String] domain_sid
|
242
|
-
#
|
241
|
+
# @param [String] domain_sid The unique string that that we created to identify
|
242
|
+
# the SipDomain resource.
|
243
243
|
# @param [String] sid A 34 character string that uniquely identifies the resource
|
244
244
|
# to fetch.
|
245
245
|
# @return [IpAccessControlListMappingInstance] IpAccessControlListMappingInstance
|
@@ -15,8 +15,9 @@ module Twilio
|
|
15
15
|
##
|
16
16
|
# Initialize the TokenList
|
17
17
|
# @param [Version] version Version that contains the resource
|
18
|
-
# @param [String] account_sid The
|
19
|
-
# [Account](https://www.twilio.com/docs/
|
18
|
+
# @param [String] account_sid The SID of the
|
19
|
+
# [Account](https://www.twilio.com/docs/api/rest/account) that created the Token
|
20
|
+
# resource.
|
20
21
|
# @return [TokenList] TokenList
|
21
22
|
def initialize(version, account_sid: nil)
|
22
23
|
super(version)
|
@@ -30,7 +31,7 @@ module Twilio
|
|
30
31
|
# Retrieve a single page of TokenInstance records from the API.
|
31
32
|
# Request is executed immediately.
|
32
33
|
# @param [String] ttl The duration in seconds for which the generated credentials
|
33
|
-
# are valid
|
34
|
+
# are valid. The default value is 86400 (24 hours).
|
34
35
|
# @return [TokenInstance] Newly created TokenInstance
|
35
36
|
def create(ttl: :unset)
|
36
37
|
data = Twilio::Values.of({'Ttl' => ttl, })
|
@@ -85,8 +86,9 @@ module Twilio
|
|
85
86
|
# Initialize the TokenInstance
|
86
87
|
# @param [Version] version Version that contains the resource
|
87
88
|
# @param [Hash] payload payload that contains response from Twilio
|
88
|
-
# @param [String] account_sid The
|
89
|
-
# [Account](https://www.twilio.com/docs/
|
89
|
+
# @param [String] account_sid The SID of the
|
90
|
+
# [Account](https://www.twilio.com/docs/api/rest/account) that created the Token
|
91
|
+
# resource.
|
90
92
|
# @return [TokenInstance] TokenInstance
|
91
93
|
def initialize(version, payload, account_sid: nil)
|
92
94
|
super(version)
|
@@ -104,19 +106,19 @@ module Twilio
|
|
104
106
|
end
|
105
107
|
|
106
108
|
##
|
107
|
-
# @return [String] The
|
109
|
+
# @return [String] The SID of the Account that created the resource
|
108
110
|
def account_sid
|
109
111
|
@properties['account_sid']
|
110
112
|
end
|
111
113
|
|
112
114
|
##
|
113
|
-
# @return [Time] The date
|
115
|
+
# @return [Time] The RFC 2822 date and time in GMT that the resource was created
|
114
116
|
def date_created
|
115
117
|
@properties['date_created']
|
116
118
|
end
|
117
119
|
|
118
120
|
##
|
119
|
-
# @return [Time] The date
|
121
|
+
# @return [Time] The RFC 2822 date and time in GMT that the resource was last updated
|
120
122
|
def date_updated
|
121
123
|
@properties['date_updated']
|
122
124
|
end
|
@@ -140,7 +142,7 @@ module Twilio
|
|
140
142
|
end
|
141
143
|
|
142
144
|
##
|
143
|
-
# @return [String] The temporary username that uniquely identifies a Token
|
145
|
+
# @return [String] The temporary username that uniquely identifies a Token
|
144
146
|
def username
|
145
147
|
@properties['username']
|
146
148
|
end
|
@@ -39,7 +39,8 @@ module Twilio
|
|
39
39
|
|
40
40
|
##
|
41
41
|
# Access the triggers
|
42
|
-
# @param [String] sid The
|
42
|
+
# @param [String] sid The Twilio-provided string that uniquely identifies the
|
43
|
+
# UsageTrigger resource to fetch.
|
43
44
|
# @return [TriggerList]
|
44
45
|
# @return [TriggerContext] if sid was passed.
|
45
46
|
def triggers(sid=:unset)
|
@@ -41,19 +41,22 @@ module Twilio
|
|
41
41
|
# Lists RecordInstance records from the API as a list.
|
42
42
|
# Unlike stream(), this operation is eager and will load `limit` records into
|
43
43
|
# memory before returning.
|
44
|
-
# @param [record.Category] category
|
45
|
-
# category](https://www.twilio.com/docs/api/rest/usage-records#usage-categories)
|
44
|
+
# @param [record.Category] category The [usage
|
45
|
+
# category](https://www.twilio.com/docs/api/rest/usage-records#usage-categories)
|
46
|
+
# of the UsageRecord resources to read. Only UsageRecord resources in the
|
47
|
+
# specified category are retrieved.
|
46
48
|
# @param [Date] start_date Only include usage that has occurred on or after this
|
47
|
-
# date.
|
48
|
-
#
|
49
|
-
#
|
50
|
-
# @param [Date] end_date Only include usage that
|
51
|
-
# date
|
52
|
-
#
|
53
|
-
#
|
54
|
-
# @param [Boolean] include_subaccounts
|
55
|
-
# account and all subaccounts. `
|
56
|
-
# account
|
49
|
+
# date. Specify the date in GMT and format as `YYYY-MM-DD`. You can also specify
|
50
|
+
# offsets from the current date, such as: `-30days`, which will set the start date
|
51
|
+
# to be 30 days before the current date.
|
52
|
+
# @param [Date] end_date Only include usage that occurred on or before this date.
|
53
|
+
# Specify the date in GMT and format as `YYYY-MM-DD`. You can also specify
|
54
|
+
# offsets from the current date, such as: `+30days`, which will set the end date
|
55
|
+
# to 30 days from the current date.
|
56
|
+
# @param [Boolean] include_subaccounts Whether to include usage from the master
|
57
|
+
# account and all its subaccounts. Can be: `true` (the default) to include usage
|
58
|
+
# from the master account and all subaccounts or `false` to retrieve usage from
|
59
|
+
# only the specified account.
|
57
60
|
# @param [Integer] limit Upper limit for the number of records to return. stream()
|
58
61
|
# guarantees to never return more than limit. Default is no limit
|
59
62
|
# @param [Integer] page_size Number of records to fetch per request, when
|
@@ -76,19 +79,22 @@ module Twilio
|
|
76
79
|
# Streams RecordInstance records from the API as an Enumerable.
|
77
80
|
# This operation lazily loads records as efficiently as possible until the limit
|
78
81
|
# is reached.
|
79
|
-
# @param [record.Category] category
|
80
|
-
# category](https://www.twilio.com/docs/api/rest/usage-records#usage-categories)
|
82
|
+
# @param [record.Category] category The [usage
|
83
|
+
# category](https://www.twilio.com/docs/api/rest/usage-records#usage-categories)
|
84
|
+
# of the UsageRecord resources to read. Only UsageRecord resources in the
|
85
|
+
# specified category are retrieved.
|
81
86
|
# @param [Date] start_date Only include usage that has occurred on or after this
|
82
|
-
# date.
|
83
|
-
#
|
84
|
-
#
|
85
|
-
# @param [Date] end_date Only include usage that
|
86
|
-
# date
|
87
|
-
#
|
88
|
-
#
|
89
|
-
# @param [Boolean] include_subaccounts
|
90
|
-
# account and all subaccounts. `
|
91
|
-
# account
|
87
|
+
# date. Specify the date in GMT and format as `YYYY-MM-DD`. You can also specify
|
88
|
+
# offsets from the current date, such as: `-30days`, which will set the start date
|
89
|
+
# to be 30 days before the current date.
|
90
|
+
# @param [Date] end_date Only include usage that occurred on or before this date.
|
91
|
+
# Specify the date in GMT and format as `YYYY-MM-DD`. You can also specify
|
92
|
+
# offsets from the current date, such as: `+30days`, which will set the end date
|
93
|
+
# to 30 days from the current date.
|
94
|
+
# @param [Boolean] include_subaccounts Whether to include usage from the master
|
95
|
+
# account and all its subaccounts. Can be: `true` (the default) to include usage
|
96
|
+
# from the master account and all subaccounts or `false` to retrieve usage from
|
97
|
+
# only the specified account.
|
92
98
|
# @param [Integer] limit Upper limit for the number of records to return. stream()
|
93
99
|
# guarantees to never return more than limit. Default is no limit.
|
94
100
|
# @param [Integer] page_size Number of records to fetch per request, when
|
@@ -127,19 +133,22 @@ module Twilio
|
|
127
133
|
##
|
128
134
|
# Retrieve a single page of RecordInstance records from the API.
|
129
135
|
# Request is executed immediately.
|
130
|
-
# @param [record.Category] category
|
131
|
-
# category](https://www.twilio.com/docs/api/rest/usage-records#usage-categories)
|
136
|
+
# @param [record.Category] category The [usage
|
137
|
+
# category](https://www.twilio.com/docs/api/rest/usage-records#usage-categories)
|
138
|
+
# of the UsageRecord resources to read. Only UsageRecord resources in the
|
139
|
+
# specified category are retrieved.
|
132
140
|
# @param [Date] start_date Only include usage that has occurred on or after this
|
133
|
-
# date.
|
134
|
-
#
|
135
|
-
#
|
136
|
-
# @param [Date] end_date Only include usage that
|
137
|
-
# date
|
138
|
-
#
|
139
|
-
#
|
140
|
-
# @param [Boolean] include_subaccounts
|
141
|
-
# account and all subaccounts. `
|
142
|
-
# account
|
141
|
+
# date. Specify the date in GMT and format as `YYYY-MM-DD`. You can also specify
|
142
|
+
# offsets from the current date, such as: `-30days`, which will set the start date
|
143
|
+
# to be 30 days before the current date.
|
144
|
+
# @param [Date] end_date Only include usage that occurred on or before this date.
|
145
|
+
# Specify the date in GMT and format as `YYYY-MM-DD`. You can also specify
|
146
|
+
# offsets from the current date, such as: `+30days`, which will set the end date
|
147
|
+
# to 30 days from the current date.
|
148
|
+
# @param [Boolean] include_subaccounts Whether to include usage from the master
|
149
|
+
# account and all its subaccounts. Can be: `true` (the default) to include usage
|
150
|
+
# from the master account and all subaccounts or `false` to retrieve usage from
|
151
|
+
# only the specified account.
|
143
152
|
# @param [String] page_token PageToken provided by the API
|
144
153
|
# @param [Integer] page_number Page Number, this value is simply for client state
|
145
154
|
# @param [Integer] page_size Number of records to return, defaults to 50
|
@@ -306,13 +315,13 @@ module Twilio
|
|
306
315
|
end
|
307
316
|
|
308
317
|
##
|
309
|
-
# @return [String] The Account
|
318
|
+
# @return [String] The SID of the Account accrued the usage
|
310
319
|
def account_sid
|
311
320
|
@properties['account_sid']
|
312
321
|
end
|
313
322
|
|
314
323
|
##
|
315
|
-
# @return [String] The
|
324
|
+
# @return [String] The API version used to create the resource
|
316
325
|
def api_version
|
317
326
|
@properties['api_version']
|
318
327
|
end
|
@@ -324,25 +333,25 @@ module Twilio
|
|
324
333
|
end
|
325
334
|
|
326
335
|
##
|
327
|
-
# @return [String] The number of usage events
|
336
|
+
# @return [String] The number of usage events
|
328
337
|
def count
|
329
338
|
@properties['count']
|
330
339
|
end
|
331
340
|
|
332
341
|
##
|
333
|
-
# @return [String] The
|
342
|
+
# @return [String] The units in which count is measured
|
334
343
|
def count_unit
|
335
344
|
@properties['count_unit']
|
336
345
|
end
|
337
346
|
|
338
347
|
##
|
339
|
-
# @return [String] A
|
348
|
+
# @return [String] A plain-language description of the usage category
|
340
349
|
def description
|
341
350
|
@properties['description']
|
342
351
|
end
|
343
352
|
|
344
353
|
##
|
345
|
-
# @return [Date] The last date usage is included in
|
354
|
+
# @return [Date] The last date for which usage is included in the UsageRecord
|
346
355
|
def end_date
|
347
356
|
@properties['end_date']
|
348
357
|
end
|
@@ -354,25 +363,25 @@ module Twilio
|
|
354
363
|
end
|
355
364
|
|
356
365
|
##
|
357
|
-
# @return [String] The currency in which `
|
366
|
+
# @return [String] The currency in which `price` is measured
|
358
367
|
def price_unit
|
359
368
|
@properties['price_unit']
|
360
369
|
end
|
361
370
|
|
362
371
|
##
|
363
|
-
# @return [Date] The first date usage is included in this
|
372
|
+
# @return [Date] The first date for which usage is included in this UsageRecord
|
364
373
|
def start_date
|
365
374
|
@properties['start_date']
|
366
375
|
end
|
367
376
|
|
368
377
|
##
|
369
|
-
# @return [String]
|
378
|
+
# @return [String] A list of related resources identified by their relative URIs
|
370
379
|
def subresource_uris
|
371
380
|
@properties['subresource_uris']
|
372
381
|
end
|
373
382
|
|
374
383
|
##
|
375
|
-
# @return [String] The URI
|
384
|
+
# @return [String] The URI of the resource, relative to `https://api.twilio.com`
|
376
385
|
def uri
|
377
386
|
@properties['uri']
|
378
387
|
end
|
@@ -384,7 +393,7 @@ module Twilio
|
|
384
393
|
end
|
385
394
|
|
386
395
|
##
|
387
|
-
# @return [String] The units in which
|
396
|
+
# @return [String] The units in which usage is measured
|
388
397
|
def usage_unit
|
389
398
|
@properties['usage_unit']
|
390
399
|
end
|