twilio-ruby 5.34.0 → 5.38.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGES.md +126 -0
- data/README.md +24 -3
- data/lib/twilio-ruby.rb +1 -1
- data/lib/twilio-ruby/rest/api/v2010/account/call.rb +87 -87
- data/lib/twilio-ruby/rest/api/v2010/account/conference.rb +14 -0
- data/lib/twilio-ruby/rest/api/v2010/account/conference/participant.rb +47 -9
- data/lib/twilio-ruby/rest/api/v2010/account/message.rb +71 -71
- data/lib/twilio-ruby/rest/api/v2010/account/queue.rb +29 -29
- data/lib/twilio-ruby/rest/api/v2010/account/sip/domain.rb +38 -3
- data/lib/twilio-ruby/rest/api/v2010/account/validation_request.rb +12 -12
- data/lib/twilio-ruby/rest/autopilot.rb +6 -0
- data/lib/twilio-ruby/rest/autopilot/v1.rb +7 -0
- data/lib/twilio-ruby/rest/autopilot/v1/assistant.rb +0 -16
- data/lib/twilio-ruby/rest/autopilot/v1/assistant/query.rb +12 -3
- data/lib/twilio-ruby/rest/autopilot/v1/restore_assistant.rb +198 -0
- data/lib/twilio-ruby/rest/client.rb +35 -15
- data/lib/twilio-ruby/rest/conversations/v1/conversation.rb +28 -3
- data/lib/twilio-ruby/rest/conversations/v1/conversation/participant.rb +27 -4
- data/lib/twilio-ruby/rest/flex_api/v1/channel.rb +2 -1
- data/lib/twilio-ruby/rest/flex_api/v1/configuration.rb +7 -0
- data/lib/twilio-ruby/rest/flex_api/v1/flex_flow.rb +6 -3
- data/lib/twilio-ruby/rest/monitor/v1/alert.rb +8 -8
- data/lib/twilio-ruby/rest/notify/v1/service.rb +20 -1
- data/lib/twilio-ruby/rest/numbers/v2/regulatory_compliance/bundle.rb +26 -0
- data/lib/twilio-ruby/rest/numbers/v2/regulatory_compliance/bundle/evaluation.rb +324 -0
- data/lib/twilio-ruby/rest/preview.rb +6 -0
- data/lib/twilio-ruby/rest/preview/trusted_comms.rb +7 -0
- data/lib/twilio-ruby/rest/preview/trusted_comms/brands_information.rb +193 -0
- data/lib/twilio-ruby/rest/preview/trusted_comms/business.rb +26 -0
- data/lib/twilio-ruby/rest/{autopilot/v1/assistant/export_assistant.rb → preview/trusted_comms/business/brand.rb} +88 -71
- data/lib/twilio-ruby/rest/preview/trusted_comms/business/brand/branded_channel.rb +266 -0
- data/lib/twilio-ruby/rest/preview/trusted_comms/business/brand/branded_channel/channel.rb +194 -0
- data/lib/twilio-ruby/rest/serverless/v1/service/environment/log.rb +7 -0
- data/lib/twilio-ruby/rest/supersim.rb +18 -0
- data/lib/twilio-ruby/rest/supersim/v1.rb +30 -0
- data/lib/twilio-ruby/rest/supersim/v1/fleet.rb +63 -16
- data/lib/twilio-ruby/rest/supersim/v1/network.rb +315 -0
- data/lib/twilio-ruby/rest/{authy/v1/service.rb → supersim/v1/network_access_profile.rb} +95 -121
- data/lib/twilio-ruby/rest/supersim/v1/network_access_profile/network_access_profile_network.rb +352 -0
- data/lib/twilio-ruby/rest/verify.rb +9 -0
- data/lib/twilio-ruby/rest/verify/v2.rb +16 -0
- data/lib/twilio-ruby/rest/{authy/v1 → verify/v2}/form.rb +8 -8
- data/lib/twilio-ruby/rest/verify/v2/service.rb +74 -3
- data/lib/twilio-ruby/rest/{authy/v1 → verify/v2}/service/entity.rb +32 -8
- data/lib/twilio-ruby/rest/verify/v2/service/entity/access_token.rb +141 -0
- data/lib/twilio-ruby/rest/{authy/v1 → verify/v2}/service/entity/factor.rb +8 -8
- data/lib/twilio-ruby/rest/{authy/v1 → verify/v2}/service/entity/factor/challenge.rb +8 -8
- data/lib/twilio-ruby/rest/verify/v2/service/verification.rb +3 -3
- data/lib/twilio-ruby/rest/verify/v2/service/webhook.rb +425 -0
- data/lib/twilio-ruby/rest/video/v1/composition_settings.rb +8 -4
- data/lib/twilio-ruby/rest/video/v1/recording_settings.rb +8 -4
- data/lib/twilio-ruby/rest/voice.rb +36 -0
- data/lib/twilio-ruby/rest/voice/v1.rb +64 -0
- data/lib/twilio-ruby/rest/voice/v1/byoc_trunk.rb +513 -0
- data/lib/twilio-ruby/rest/voice/v1/connection_policy.rb +379 -0
- data/lib/twilio-ruby/rest/voice/v1/connection_policy/connection_policy_target.rb +458 -0
- data/lib/twilio-ruby/rest/voice/v1/ip_record.rb +366 -0
- data/lib/twilio-ruby/rest/voice/v1/source_ip_mapping.rb +346 -0
- data/lib/twilio-ruby/util/configuration.rb +9 -1
- data/lib/twilio-ruby/version.rb +1 -1
- data/spec/integration/api/v2010/account/call_spec.rb +5 -5
- data/spec/integration/api/v2010/account/conference/participant_spec.rb +177 -0
- data/spec/integration/api/v2010/account/conference_spec.rb +42 -14
- data/spec/integration/api/v2010/account/outgoing_caller_id_spec.rb +8 -14
- data/spec/integration/api/v2010/account/sip/domain_spec.rb +12 -4
- data/spec/integration/api/v2010/account/token_spec.rb +23 -11
- data/spec/integration/api/v2010/account/validation_request_spec.rb +1 -1
- data/spec/integration/autopilot/v1/assistant/query_spec.rb +4 -4
- data/spec/integration/autopilot/v1/assistant_spec.rb +4 -8
- data/spec/integration/autopilot/v1/restore_assistant_spec.rb +53 -0
- data/spec/integration/conversations/v1/conversation/participant_spec.rb +7 -0
- data/spec/integration/conversations/v1/conversation_spec.rb +16 -0
- data/spec/integration/flex_api/v1/configuration_spec.rb +3 -0
- data/spec/integration/numbers/v2/regulatory_compliance/bundle/evaluation_spec.rb +623 -0
- data/spec/integration/numbers/v2/regulatory_compliance/bundle_spec.rb +4 -0
- data/spec/integration/preview/trusted_comms/brands_information_spec.rb +44 -0
- data/spec/integration/preview/trusted_comms/business/brand/branded_channel/channel_spec.rb +54 -0
- data/spec/integration/preview/trusted_comms/business/brand/branded_channel_spec.rb +52 -0
- data/spec/integration/preview/trusted_comms/business/brand_spec.rb +49 -0
- data/spec/integration/preview/trusted_comms/business_spec.rb +1 -0
- data/spec/integration/serverless/v1/service/environment/log_spec.rb +1 -0
- data/spec/integration/supersim/v1/fleet_spec.rb +16 -7
- data/spec/integration/supersim/v1/network_access_profile/network_access_profile_network_spec.rb +179 -0
- data/spec/integration/supersim/v1/network_access_profile_spec.rb +223 -0
- data/spec/integration/supersim/v1/network_spec.rb +139 -0
- data/spec/integration/supersim/v1/sim_spec.rb +78 -6
- data/spec/integration/trunking/v1/trunk/credential_list_spec.rb +13 -13
- data/spec/integration/trunking/v1/trunk/ip_access_control_list_spec.rb +23 -23
- data/spec/integration/trunking/v1/trunk/origination_url_spec.rb +28 -28
- data/spec/integration/trunking/v1/trunk/phone_number_spec.rb +17 -17
- data/spec/integration/trunking/v1/trunk_spec.rb +33 -33
- data/spec/integration/{authy/v1 → verify/v2}/form_spec.rb +4 -4
- data/spec/integration/verify/v2/service/entity/access_token_spec.rb +46 -0
- data/spec/integration/{authy/v1 → verify/v2}/service/entity/factor/challenge_spec.rb +73 -73
- data/spec/integration/{authy/v1 → verify/v2}/service/entity/factor_spec.rb +54 -54
- data/spec/integration/verify/v2/service/entity_spec.rb +204 -0
- data/spec/integration/verify/v2/service/webhook_spec.rb +262 -0
- data/spec/integration/verify/v2/service_spec.rb +32 -4
- data/spec/integration/voice/v1/byoc_trunk_spec.rb +250 -0
- data/spec/integration/voice/v1/connection_policy/connection_policy_target_spec.rb +246 -0
- data/spec/integration/voice/v1/connection_policy_spec.rb +226 -0
- data/spec/integration/voice/v1/ip_record_spec.rb +223 -0
- data/spec/integration/voice/v1/source_ip_mapping_spec.rb +219 -0
- data/spec/rest/client_spec.rb +168 -58
- data/spec/util/configuration_spec.rb +12 -0
- data/twilio-ruby.gemspec +1 -1
- metadata +63 -23
- data/lib/twilio-ruby/rest/authy.rb +0 -55
- data/lib/twilio-ruby/rest/authy/v1.rb +0 -59
- data/spec/integration/authy/v1/service/entity_spec.rb +0 -201
- data/spec/integration/authy/v1/service_spec.rb +0 -231
- data/spec/integration/autopilot/v1/assistant/export_assistant_spec.rb +0 -49
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0f977335dfe45b56523f320b3d4fbcf8e9dc4ab69b6f5459b61a5451ad3aacde
|
4
|
+
data.tar.gz: 5dcb7888fd08da7ebdf1c815abb1a5b9c44a71393d31c23d1f1c97547794dea6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 84713b37e22092294e75e6b26397d8e767392916dc4cf5959c54f6969f414ee79e56ea5410f6085ddd933835bb1c3e2661a560c8220245cef033b46923c0d3b1
|
7
|
+
data.tar.gz: 046fa6c107c85e0ce763ecb21d1d2c755dff0bebc2534394e35b401fad32d5265c93feaf0ee4b5309caa868d918bfa66ffc370927fd31e6dbda8cfe41f77837d
|
data/CHANGES.md
CHANGED
@@ -1,6 +1,132 @@
|
|
1
1
|
twilio-ruby changelog
|
2
2
|
=====================
|
3
3
|
|
4
|
+
[2020-06-24] Version 5.38.0
|
5
|
+
---------------------------
|
6
|
+
**Api**
|
7
|
+
- Added optional `JitterBufferSize` parameter for creating conference participant
|
8
|
+
- Added optional `label` property for conference participants
|
9
|
+
- Added optional parameter `caller_id` for creating conference participant endpoint.
|
10
|
+
|
11
|
+
**Autopilot**
|
12
|
+
- Remove Export resource from Autopilot Assistant
|
13
|
+
|
14
|
+
**Conversations**
|
15
|
+
- Expose Conversation timers
|
16
|
+
|
17
|
+
**Monitor**
|
18
|
+
- Update start/end date filter params to support date-or-time format **(breaking change)**
|
19
|
+
|
20
|
+
**Numbers**
|
21
|
+
- Add `provisionally-approved` as a Supporting Document status
|
22
|
+
|
23
|
+
**Preview**
|
24
|
+
- Removed `Authy` resources. **(breaking change)**
|
25
|
+
|
26
|
+
**Supersim**
|
27
|
+
- Add ready state to the allowed transitions in the sim update call behind the feature flag supersim.ready-state.v1
|
28
|
+
|
29
|
+
**Verify**
|
30
|
+
- Webhook resources added to Verify services and put behind the `api.verify.push` beta feature
|
31
|
+
|
32
|
+
**Twiml**
|
33
|
+
- Add more supported locales for the `Gather` verb.
|
34
|
+
|
35
|
+
|
36
|
+
[2020-06-10] Version 5.37.0
|
37
|
+
---------------------------
|
38
|
+
**Library - Docs**
|
39
|
+
- [PR #514](https://github.com/twilio/twilio-ruby/pull/514): link to handling exceptions. Thanks to [@thinkingserious](https://github.com/thinkingserious)!
|
40
|
+
- [PR #513](https://github.com/twilio/twilio-ruby/pull/513): link to custom HTTP client instructions. Thanks to [@thinkingserious](https://github.com/thinkingserious)!
|
41
|
+
|
42
|
+
**Api**
|
43
|
+
- Added `pstnconnectivity` to `usage_record` API
|
44
|
+
|
45
|
+
**Autopilot**
|
46
|
+
- Add dialogue_sid param to Query list resource
|
47
|
+
|
48
|
+
**Notify**
|
49
|
+
- delivery_callback_url and delivery_callback_enabled added
|
50
|
+
|
51
|
+
**Numbers**
|
52
|
+
- Add `provisionally-approved` as a Bundle status
|
53
|
+
|
54
|
+
**Preview**
|
55
|
+
- `BrandsInformation` endpoint now returns a single `BrandsInformation`
|
56
|
+
- Deleted phone number required field in the brand phone number endpoint from `kyc-api`
|
57
|
+
- Removed insights `preview API` from API Definitions **(breaking change)**
|
58
|
+
- Added `BrandsInformation` endpoint to query brands information stored in KYC
|
59
|
+
|
60
|
+
**Supersim**
|
61
|
+
- Require a Network Access Profile when creating a Fleet **(breaking change)**
|
62
|
+
|
63
|
+
|
64
|
+
[2020-05-27] Version 5.36.0
|
65
|
+
---------------------------
|
66
|
+
**Api**
|
67
|
+
- Added `reason_conference_ended` and `call_sid_ending_conference` to Conference read/fetch/update
|
68
|
+
- Fixed some examples to use the correct "TK" SID prefix for Trunk resources.
|
69
|
+
|
70
|
+
**Authy**
|
71
|
+
- Renamed `twilio_authy_sandbox_mode` headers to `twilio_sandbox_mode` **(breaking change)**
|
72
|
+
- Renamed `Twilio-Authy-*` headers to `Twilio-Veriry-*` **(breaking change)**
|
73
|
+
|
74
|
+
**Flex**
|
75
|
+
- Adding `flex_service_instance_sid` to Flex Configuration
|
76
|
+
|
77
|
+
**Preview**
|
78
|
+
- Removed insights preview API from API Definitions **(breaking change)**
|
79
|
+
- Added `Channels` endpoint to brand a phone number for BrandedCalls
|
80
|
+
|
81
|
+
**Serverless**
|
82
|
+
- Add Build Sid to Log results
|
83
|
+
|
84
|
+
**Supersim**
|
85
|
+
- Add Network Access Profile resource Networks subresource
|
86
|
+
- Allow specifying a Data Limit on Fleets
|
87
|
+
|
88
|
+
**Trunking**
|
89
|
+
- Fixed some examples to use the correct "TK" SID prefix for Trunk resources.
|
90
|
+
|
91
|
+
|
92
|
+
[2020-05-20] Version 5.35.0
|
93
|
+
---------------------------
|
94
|
+
**Library - Feature**
|
95
|
+
- [PR #512](https://github.com/twilio/twilio-ruby/pull/512): add regional and edge support. Thanks to [@eshanholtz](https://github.com/eshanholtz)!
|
96
|
+
|
97
|
+
|
98
|
+
[2020-05-13] Version 5.34.1
|
99
|
+
---------------------------
|
100
|
+
**Api**
|
101
|
+
- Add optional `emergency_caller_sid` parameter to SIP Domain
|
102
|
+
- Updated `call_reason` optional property to be treated as PII
|
103
|
+
- Added optional BYOC Trunk Sid property to Sip Domain API resource
|
104
|
+
|
105
|
+
**Autopilot**
|
106
|
+
- Add Restore resource to Autopilot Assistant
|
107
|
+
|
108
|
+
**Contacts**
|
109
|
+
- Added contacts Create API definition
|
110
|
+
|
111
|
+
**Events**
|
112
|
+
- Subscriptions API initial release
|
113
|
+
|
114
|
+
**Numbers**
|
115
|
+
- Add Evaluations API
|
116
|
+
|
117
|
+
**Supersim**
|
118
|
+
- Allow filtering the Fleets resource by Network Access Profile
|
119
|
+
- Allow assigning a Network Access Profile when creating and updating a Fleet
|
120
|
+
- Add Network Access Profiles resource
|
121
|
+
|
122
|
+
**Verify**
|
123
|
+
- Add `CustomCode` optional parameter on Verification creation.
|
124
|
+
- Add delete action on Service resource.
|
125
|
+
|
126
|
+
**Voice**
|
127
|
+
- Added endpoints for BYOC trunks, SIP connection policies and source IP mappings
|
128
|
+
|
129
|
+
|
4
130
|
[2020-04-29] Version 5.34.0
|
5
131
|
---------------------------
|
6
132
|
**Library - Feature**
|
data/README.md
CHANGED
@@ -32,13 +32,13 @@ This library supports the following Ruby implementations:
|
|
32
32
|
To install using [Bundler][bundler] grab the latest stable version:
|
33
33
|
|
34
34
|
```ruby
|
35
|
-
gem 'twilio-ruby', '~> 5.
|
35
|
+
gem 'twilio-ruby', '~> 5.38.0'
|
36
36
|
```
|
37
37
|
|
38
38
|
To manually install `twilio-ruby` via [Rubygems][rubygems] simply gem install:
|
39
39
|
|
40
40
|
```bash
|
41
|
-
gem install twilio-ruby -v 5.
|
41
|
+
gem install twilio-ruby -v 5.38.0
|
42
42
|
```
|
43
43
|
|
44
44
|
To build and install the development branch yourself from the latest source:
|
@@ -64,6 +64,23 @@ auth_token = 'yyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy'
|
|
64
64
|
@client = Twilio::REST::Client.new account_sid, auth_token
|
65
65
|
```
|
66
66
|
|
67
|
+
### Specify a Region and/or Edge
|
68
|
+
|
69
|
+
To take advantage of Twilio's [Global Infrastructure](https://www.twilio.com/docs/global-infrastructure), specify the target Region and/or Edge for the client:
|
70
|
+
|
71
|
+
```ruby
|
72
|
+
# set up a client to talk to the Twilio REST API over a specific region and edge
|
73
|
+
@client = Twilio::REST::Client.new account_sid, auth_token, nil, 'au1'
|
74
|
+
@client.edge = 'sydney'
|
75
|
+
|
76
|
+
# you may also specify the region and/or edge after client creation
|
77
|
+
@client = Twilio::REST::Client.new account_sid, auth_token
|
78
|
+
@client.region = 'au1'
|
79
|
+
@client.edge = 'sydney'
|
80
|
+
```
|
81
|
+
|
82
|
+
This will result in the `hostname` transforming from `api.twilio.com` to `api.sydney.au1.twilio.com`.
|
83
|
+
|
67
84
|
### Make a Call
|
68
85
|
|
69
86
|
```ruby
|
@@ -106,16 +123,20 @@ message_sid = 'SMxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'
|
|
106
123
|
@client.http_client.adapter = :typhoeus
|
107
124
|
```
|
108
125
|
|
126
|
+
To use a custom HTTP client with this helper library, please see the [Twilio documentation](https://www.twilio.com/docs/libraries/ruby/custom-http-clients).
|
127
|
+
|
109
128
|
### Handling Errors
|
110
129
|
|
111
130
|
```ruby
|
112
131
|
begin
|
113
132
|
messages = @client.messages.list(limit: 20)
|
114
|
-
rescue Twilio::REST::
|
133
|
+
rescue Twilio::REST::RestError => e
|
115
134
|
puts e.message
|
116
135
|
end
|
117
136
|
```
|
118
137
|
|
138
|
+
For more descriptive exception types, please see the [Twilio documentation](https://www.twilio.com/docs/libraries/ruby/usage-guide#error-handling).
|
139
|
+
|
119
140
|
### Getting Started With Client Capability Tokens
|
120
141
|
|
121
142
|
If you just need to generate a Capability Token for use with Twilio Client, you can do this:
|
data/lib/twilio-ruby.rb
CHANGED
@@ -38,7 +38,7 @@ module Twilio
|
|
38
38
|
autoload :JWT, File.join(File.dirname(__FILE__), 'twilio-ruby', 'jwt', 'jwt.rb')
|
39
39
|
autoload :TwiML, File.join(File.dirname(__FILE__), 'twilio-ruby', 'twiml', 'twiml.rb')
|
40
40
|
|
41
|
-
def_delegators :configuration, :account_sid, :auth_token, :http_client
|
41
|
+
def_delegators :configuration, :account_sid, :auth_token, :http_client, :region, :edge
|
42
42
|
|
43
43
|
##
|
44
44
|
# Pre-configure with account SID and auth token so that you don't need to
|
@@ -614,33 +614,33 @@ module Twilio
|
|
614
614
|
|
615
615
|
# Marshaled Properties
|
616
616
|
@properties = {
|
617
|
-
'
|
618
|
-
'annotation' => payload['annotation'],
|
619
|
-
'answered_by' => payload['answered_by'],
|
620
|
-
'api_version' => payload['api_version'],
|
621
|
-
'caller_name' => payload['caller_name'],
|
617
|
+
'sid' => payload['sid'],
|
622
618
|
'date_created' => Twilio.deserialize_rfc2822(payload['date_created']),
|
623
619
|
'date_updated' => Twilio.deserialize_rfc2822(payload['date_updated']),
|
624
|
-
'
|
625
|
-
'
|
626
|
-
'
|
627
|
-
'
|
620
|
+
'parent_call_sid' => payload['parent_call_sid'],
|
621
|
+
'account_sid' => payload['account_sid'],
|
622
|
+
'to' => payload['to'],
|
623
|
+
'to_formatted' => payload['to_formatted'],
|
628
624
|
'from' => payload['from'],
|
629
625
|
'from_formatted' => payload['from_formatted'],
|
630
|
-
'group_sid' => payload['group_sid'],
|
631
|
-
'parent_call_sid' => payload['parent_call_sid'],
|
632
626
|
'phone_number_sid' => payload['phone_number_sid'],
|
627
|
+
'status' => payload['status'],
|
628
|
+
'start_time' => Twilio.deserialize_rfc2822(payload['start_time']),
|
629
|
+
'end_time' => Twilio.deserialize_rfc2822(payload['end_time']),
|
630
|
+
'duration' => payload['duration'],
|
633
631
|
'price' => payload['price'],
|
634
632
|
'price_unit' => payload['price_unit'],
|
635
|
-
'
|
636
|
-
'
|
637
|
-
'
|
638
|
-
'
|
639
|
-
'
|
640
|
-
'
|
633
|
+
'direction' => payload['direction'],
|
634
|
+
'answered_by' => payload['answered_by'],
|
635
|
+
'annotation' => payload['annotation'],
|
636
|
+
'api_version' => payload['api_version'],
|
637
|
+
'forwarded_from' => payload['forwarded_from'],
|
638
|
+
'group_sid' => payload['group_sid'],
|
639
|
+
'caller_name' => payload['caller_name'],
|
640
|
+
'queue_time' => payload['queue_time'],
|
641
641
|
'trunk_sid' => payload['trunk_sid'],
|
642
642
|
'uri' => payload['uri'],
|
643
|
-
'
|
643
|
+
'subresource_uris' => payload['subresource_uris'],
|
644
644
|
}
|
645
645
|
|
646
646
|
# Context
|
@@ -660,33 +660,9 @@ module Twilio
|
|
660
660
|
end
|
661
661
|
|
662
662
|
##
|
663
|
-
# @return [String] The
|
664
|
-
def
|
665
|
-
@properties['
|
666
|
-
end
|
667
|
-
|
668
|
-
##
|
669
|
-
# @return [String] The annotation provided for the call
|
670
|
-
def annotation
|
671
|
-
@properties['annotation']
|
672
|
-
end
|
673
|
-
|
674
|
-
##
|
675
|
-
# @return [String] Either `human` or `machine` if this call was initiated with answering machine detection. Empty otherwise.
|
676
|
-
def answered_by
|
677
|
-
@properties['answered_by']
|
678
|
-
end
|
679
|
-
|
680
|
-
##
|
681
|
-
# @return [String] The API Version used to create the call
|
682
|
-
def api_version
|
683
|
-
@properties['api_version']
|
684
|
-
end
|
685
|
-
|
686
|
-
##
|
687
|
-
# @return [String] The caller's name if this call was an incoming call to a phone number with caller ID Lookup enabled. Otherwise, empty.
|
688
|
-
def caller_name
|
689
|
-
@properties['caller_name']
|
663
|
+
# @return [String] The unique string that identifies this resource
|
664
|
+
def sid
|
665
|
+
@properties['sid']
|
690
666
|
end
|
691
667
|
|
692
668
|
##
|
@@ -702,27 +678,27 @@ module Twilio
|
|
702
678
|
end
|
703
679
|
|
704
680
|
##
|
705
|
-
# @return [String]
|
706
|
-
def
|
707
|
-
@properties['
|
681
|
+
# @return [String] The SID that identifies the call that created this leg.
|
682
|
+
def parent_call_sid
|
683
|
+
@properties['parent_call_sid']
|
708
684
|
end
|
709
685
|
|
710
686
|
##
|
711
|
-
# @return [String] The
|
712
|
-
def
|
713
|
-
@properties['
|
687
|
+
# @return [String] The SID of the Account that created this resource
|
688
|
+
def account_sid
|
689
|
+
@properties['account_sid']
|
714
690
|
end
|
715
691
|
|
716
692
|
##
|
717
|
-
# @return [
|
718
|
-
def
|
719
|
-
@properties['
|
693
|
+
# @return [String] The phone number, SIP address or Client identifier that received this call. Phone numbers are in E.164 format (e.g., +16175551212). SIP addresses are formatted as `name@company.com`. Client identifiers are formatted `client:name`.
|
694
|
+
def to
|
695
|
+
@properties['to']
|
720
696
|
end
|
721
697
|
|
722
698
|
##
|
723
|
-
# @return [String] The
|
724
|
-
def
|
725
|
-
@properties['
|
699
|
+
# @return [String] The phone number, SIP address or Client identifier that received this call. Formatted for display.
|
700
|
+
def to_formatted
|
701
|
+
@properties['to_formatted']
|
726
702
|
end
|
727
703
|
|
728
704
|
##
|
@@ -738,21 +714,33 @@ module Twilio
|
|
738
714
|
end
|
739
715
|
|
740
716
|
##
|
741
|
-
# @return [String]
|
742
|
-
def
|
743
|
-
@properties['
|
717
|
+
# @return [String] If the call was inbound, this is the SID of the IncomingPhoneNumber resource that received the call. If the call was outbound, it is the SID of the OutgoingCallerId resource from which the call was placed.
|
718
|
+
def phone_number_sid
|
719
|
+
@properties['phone_number_sid']
|
744
720
|
end
|
745
721
|
|
746
722
|
##
|
747
|
-
# @return [
|
748
|
-
def
|
749
|
-
@properties['
|
723
|
+
# @return [call.Status] The status of this call.
|
724
|
+
def status
|
725
|
+
@properties['status']
|
750
726
|
end
|
751
727
|
|
752
728
|
##
|
753
|
-
# @return [
|
754
|
-
def
|
755
|
-
@properties['
|
729
|
+
# @return [Time] The start time of the call. Null if the call has not yet been dialed.
|
730
|
+
def start_time
|
731
|
+
@properties['start_time']
|
732
|
+
end
|
733
|
+
|
734
|
+
##
|
735
|
+
# @return [Time] The end time of the call. Null if the call did not complete successfully.
|
736
|
+
def end_time
|
737
|
+
@properties['end_time']
|
738
|
+
end
|
739
|
+
|
740
|
+
##
|
741
|
+
# @return [String] The length of the call in seconds.
|
742
|
+
def duration
|
743
|
+
@properties['duration']
|
756
744
|
end
|
757
745
|
|
758
746
|
##
|
@@ -768,39 +756,51 @@ module Twilio
|
|
768
756
|
end
|
769
757
|
|
770
758
|
##
|
771
|
-
# @return [String]
|
772
|
-
def
|
773
|
-
@properties['
|
759
|
+
# @return [String] A string describing the direction of the call. `inbound` for inbound calls, `outbound-api` for calls initiated via the REST API or `outbound-dial` for calls initiated by a `Dial` verb.
|
760
|
+
def direction
|
761
|
+
@properties['direction']
|
774
762
|
end
|
775
763
|
|
776
764
|
##
|
777
|
-
# @return [
|
778
|
-
def
|
779
|
-
@properties['
|
765
|
+
# @return [String] Either `human` or `machine` if this call was initiated with answering machine detection. Empty otherwise.
|
766
|
+
def answered_by
|
767
|
+
@properties['answered_by']
|
780
768
|
end
|
781
769
|
|
782
770
|
##
|
783
|
-
# @return [
|
784
|
-
def
|
785
|
-
@properties['
|
771
|
+
# @return [String] The annotation provided for the call
|
772
|
+
def annotation
|
773
|
+
@properties['annotation']
|
786
774
|
end
|
787
775
|
|
788
776
|
##
|
789
|
-
# @return [String]
|
790
|
-
def
|
791
|
-
@properties['
|
777
|
+
# @return [String] The API Version used to create the call
|
778
|
+
def api_version
|
779
|
+
@properties['api_version']
|
792
780
|
end
|
793
781
|
|
794
782
|
##
|
795
|
-
# @return [String] The phone number
|
796
|
-
def
|
797
|
-
@properties['
|
783
|
+
# @return [String] The forwarding phone number if this call was an incoming call forwarded from another number (depends on carrier supporting forwarding). Otherwise, empty.
|
784
|
+
def forwarded_from
|
785
|
+
@properties['forwarded_from']
|
798
786
|
end
|
799
787
|
|
800
788
|
##
|
801
|
-
# @return [String] The
|
802
|
-
def
|
803
|
-
@properties['
|
789
|
+
# @return [String] The Group SID associated with this call. If no Group is associated with the call, the field is empty.
|
790
|
+
def group_sid
|
791
|
+
@properties['group_sid']
|
792
|
+
end
|
793
|
+
|
794
|
+
##
|
795
|
+
# @return [String] The caller's name if this call was an incoming call to a phone number with caller ID Lookup enabled. Otherwise, empty.
|
796
|
+
def caller_name
|
797
|
+
@properties['caller_name']
|
798
|
+
end
|
799
|
+
|
800
|
+
##
|
801
|
+
# @return [String] The wait time in milliseconds before the call is placed.
|
802
|
+
def queue_time
|
803
|
+
@properties['queue_time']
|
804
804
|
end
|
805
805
|
|
806
806
|
##
|
@@ -816,9 +816,9 @@ module Twilio
|
|
816
816
|
end
|
817
817
|
|
818
818
|
##
|
819
|
-
# @return [String]
|
820
|
-
def
|
821
|
-
@properties['
|
819
|
+
# @return [String] A list of related subresources identified by their relative URIs
|
820
|
+
def subresource_uris
|
821
|
+
@properties['subresource_uris']
|
822
822
|
end
|
823
823
|
|
824
824
|
##
|