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.
Files changed (113) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGES.md +126 -0
  3. data/README.md +24 -3
  4. data/lib/twilio-ruby.rb +1 -1
  5. data/lib/twilio-ruby/rest/api/v2010/account/call.rb +87 -87
  6. data/lib/twilio-ruby/rest/api/v2010/account/conference.rb +14 -0
  7. data/lib/twilio-ruby/rest/api/v2010/account/conference/participant.rb +47 -9
  8. data/lib/twilio-ruby/rest/api/v2010/account/message.rb +71 -71
  9. data/lib/twilio-ruby/rest/api/v2010/account/queue.rb +29 -29
  10. data/lib/twilio-ruby/rest/api/v2010/account/sip/domain.rb +38 -3
  11. data/lib/twilio-ruby/rest/api/v2010/account/validation_request.rb +12 -12
  12. data/lib/twilio-ruby/rest/autopilot.rb +6 -0
  13. data/lib/twilio-ruby/rest/autopilot/v1.rb +7 -0
  14. data/lib/twilio-ruby/rest/autopilot/v1/assistant.rb +0 -16
  15. data/lib/twilio-ruby/rest/autopilot/v1/assistant/query.rb +12 -3
  16. data/lib/twilio-ruby/rest/autopilot/v1/restore_assistant.rb +198 -0
  17. data/lib/twilio-ruby/rest/client.rb +35 -15
  18. data/lib/twilio-ruby/rest/conversations/v1/conversation.rb +28 -3
  19. data/lib/twilio-ruby/rest/conversations/v1/conversation/participant.rb +27 -4
  20. data/lib/twilio-ruby/rest/flex_api/v1/channel.rb +2 -1
  21. data/lib/twilio-ruby/rest/flex_api/v1/configuration.rb +7 -0
  22. data/lib/twilio-ruby/rest/flex_api/v1/flex_flow.rb +6 -3
  23. data/lib/twilio-ruby/rest/monitor/v1/alert.rb +8 -8
  24. data/lib/twilio-ruby/rest/notify/v1/service.rb +20 -1
  25. data/lib/twilio-ruby/rest/numbers/v2/regulatory_compliance/bundle.rb +26 -0
  26. data/lib/twilio-ruby/rest/numbers/v2/regulatory_compliance/bundle/evaluation.rb +324 -0
  27. data/lib/twilio-ruby/rest/preview.rb +6 -0
  28. data/lib/twilio-ruby/rest/preview/trusted_comms.rb +7 -0
  29. data/lib/twilio-ruby/rest/preview/trusted_comms/brands_information.rb +193 -0
  30. data/lib/twilio-ruby/rest/preview/trusted_comms/business.rb +26 -0
  31. data/lib/twilio-ruby/rest/{autopilot/v1/assistant/export_assistant.rb → preview/trusted_comms/business/brand.rb} +88 -71
  32. data/lib/twilio-ruby/rest/preview/trusted_comms/business/brand/branded_channel.rb +266 -0
  33. data/lib/twilio-ruby/rest/preview/trusted_comms/business/brand/branded_channel/channel.rb +194 -0
  34. data/lib/twilio-ruby/rest/serverless/v1/service/environment/log.rb +7 -0
  35. data/lib/twilio-ruby/rest/supersim.rb +18 -0
  36. data/lib/twilio-ruby/rest/supersim/v1.rb +30 -0
  37. data/lib/twilio-ruby/rest/supersim/v1/fleet.rb +63 -16
  38. data/lib/twilio-ruby/rest/supersim/v1/network.rb +315 -0
  39. data/lib/twilio-ruby/rest/{authy/v1/service.rb → supersim/v1/network_access_profile.rb} +95 -121
  40. data/lib/twilio-ruby/rest/supersim/v1/network_access_profile/network_access_profile_network.rb +352 -0
  41. data/lib/twilio-ruby/rest/verify.rb +9 -0
  42. data/lib/twilio-ruby/rest/verify/v2.rb +16 -0
  43. data/lib/twilio-ruby/rest/{authy/v1 → verify/v2}/form.rb +8 -8
  44. data/lib/twilio-ruby/rest/verify/v2/service.rb +74 -3
  45. data/lib/twilio-ruby/rest/{authy/v1 → verify/v2}/service/entity.rb +32 -8
  46. data/lib/twilio-ruby/rest/verify/v2/service/entity/access_token.rb +141 -0
  47. data/lib/twilio-ruby/rest/{authy/v1 → verify/v2}/service/entity/factor.rb +8 -8
  48. data/lib/twilio-ruby/rest/{authy/v1 → verify/v2}/service/entity/factor/challenge.rb +8 -8
  49. data/lib/twilio-ruby/rest/verify/v2/service/verification.rb +3 -3
  50. data/lib/twilio-ruby/rest/verify/v2/service/webhook.rb +425 -0
  51. data/lib/twilio-ruby/rest/video/v1/composition_settings.rb +8 -4
  52. data/lib/twilio-ruby/rest/video/v1/recording_settings.rb +8 -4
  53. data/lib/twilio-ruby/rest/voice.rb +36 -0
  54. data/lib/twilio-ruby/rest/voice/v1.rb +64 -0
  55. data/lib/twilio-ruby/rest/voice/v1/byoc_trunk.rb +513 -0
  56. data/lib/twilio-ruby/rest/voice/v1/connection_policy.rb +379 -0
  57. data/lib/twilio-ruby/rest/voice/v1/connection_policy/connection_policy_target.rb +458 -0
  58. data/lib/twilio-ruby/rest/voice/v1/ip_record.rb +366 -0
  59. data/lib/twilio-ruby/rest/voice/v1/source_ip_mapping.rb +346 -0
  60. data/lib/twilio-ruby/util/configuration.rb +9 -1
  61. data/lib/twilio-ruby/version.rb +1 -1
  62. data/spec/integration/api/v2010/account/call_spec.rb +5 -5
  63. data/spec/integration/api/v2010/account/conference/participant_spec.rb +177 -0
  64. data/spec/integration/api/v2010/account/conference_spec.rb +42 -14
  65. data/spec/integration/api/v2010/account/outgoing_caller_id_spec.rb +8 -14
  66. data/spec/integration/api/v2010/account/sip/domain_spec.rb +12 -4
  67. data/spec/integration/api/v2010/account/token_spec.rb +23 -11
  68. data/spec/integration/api/v2010/account/validation_request_spec.rb +1 -1
  69. data/spec/integration/autopilot/v1/assistant/query_spec.rb +4 -4
  70. data/spec/integration/autopilot/v1/assistant_spec.rb +4 -8
  71. data/spec/integration/autopilot/v1/restore_assistant_spec.rb +53 -0
  72. data/spec/integration/conversations/v1/conversation/participant_spec.rb +7 -0
  73. data/spec/integration/conversations/v1/conversation_spec.rb +16 -0
  74. data/spec/integration/flex_api/v1/configuration_spec.rb +3 -0
  75. data/spec/integration/numbers/v2/regulatory_compliance/bundle/evaluation_spec.rb +623 -0
  76. data/spec/integration/numbers/v2/regulatory_compliance/bundle_spec.rb +4 -0
  77. data/spec/integration/preview/trusted_comms/brands_information_spec.rb +44 -0
  78. data/spec/integration/preview/trusted_comms/business/brand/branded_channel/channel_spec.rb +54 -0
  79. data/spec/integration/preview/trusted_comms/business/brand/branded_channel_spec.rb +52 -0
  80. data/spec/integration/preview/trusted_comms/business/brand_spec.rb +49 -0
  81. data/spec/integration/preview/trusted_comms/business_spec.rb +1 -0
  82. data/spec/integration/serverless/v1/service/environment/log_spec.rb +1 -0
  83. data/spec/integration/supersim/v1/fleet_spec.rb +16 -7
  84. data/spec/integration/supersim/v1/network_access_profile/network_access_profile_network_spec.rb +179 -0
  85. data/spec/integration/supersim/v1/network_access_profile_spec.rb +223 -0
  86. data/spec/integration/supersim/v1/network_spec.rb +139 -0
  87. data/spec/integration/supersim/v1/sim_spec.rb +78 -6
  88. data/spec/integration/trunking/v1/trunk/credential_list_spec.rb +13 -13
  89. data/spec/integration/trunking/v1/trunk/ip_access_control_list_spec.rb +23 -23
  90. data/spec/integration/trunking/v1/trunk/origination_url_spec.rb +28 -28
  91. data/spec/integration/trunking/v1/trunk/phone_number_spec.rb +17 -17
  92. data/spec/integration/trunking/v1/trunk_spec.rb +33 -33
  93. data/spec/integration/{authy/v1 → verify/v2}/form_spec.rb +4 -4
  94. data/spec/integration/verify/v2/service/entity/access_token_spec.rb +46 -0
  95. data/spec/integration/{authy/v1 → verify/v2}/service/entity/factor/challenge_spec.rb +73 -73
  96. data/spec/integration/{authy/v1 → verify/v2}/service/entity/factor_spec.rb +54 -54
  97. data/spec/integration/verify/v2/service/entity_spec.rb +204 -0
  98. data/spec/integration/verify/v2/service/webhook_spec.rb +262 -0
  99. data/spec/integration/verify/v2/service_spec.rb +32 -4
  100. data/spec/integration/voice/v1/byoc_trunk_spec.rb +250 -0
  101. data/spec/integration/voice/v1/connection_policy/connection_policy_target_spec.rb +246 -0
  102. data/spec/integration/voice/v1/connection_policy_spec.rb +226 -0
  103. data/spec/integration/voice/v1/ip_record_spec.rb +223 -0
  104. data/spec/integration/voice/v1/source_ip_mapping_spec.rb +219 -0
  105. data/spec/rest/client_spec.rb +168 -58
  106. data/spec/util/configuration_spec.rb +12 -0
  107. data/twilio-ruby.gemspec +1 -1
  108. metadata +63 -23
  109. data/lib/twilio-ruby/rest/authy.rb +0 -55
  110. data/lib/twilio-ruby/rest/authy/v1.rb +0 -59
  111. data/spec/integration/authy/v1/service/entity_spec.rb +0 -201
  112. data/spec/integration/authy/v1/service_spec.rb +0 -231
  113. 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: a3c2f4bbf217f506df9191e83264ccfc2966a7500754885341f4c0bd7626a35a
4
- data.tar.gz: 2f770e917a2b26214707107eaa47ad3052a8ef883ba1293caf47b89a87be9fef
3
+ metadata.gz: 0f977335dfe45b56523f320b3d4fbcf8e9dc4ab69b6f5459b61a5451ad3aacde
4
+ data.tar.gz: 5dcb7888fd08da7ebdf1c815abb1a5b9c44a71393d31c23d1f1c97547794dea6
5
5
  SHA512:
6
- metadata.gz: 236c258000ffa8eacdb7947f3b7268fdfe5c141e0e3de6cd6ba90b2a8591a21c5dbd0fa88da678a6fbd3744aead2fcb951e92de8be9c3fc9ff7d035c132e7342
7
- data.tar.gz: f60524d0983d267aefcf3d01234bcbf39b4de400e08bfd650edbc6a0c29c0dd67f46db2985d87325d28d51649376e8df27db1f38d00c6fd24b12e1517d7b1369
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.34.0'
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.34.0
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::TwilioError => e
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:
@@ -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
- 'account_sid' => payload['account_sid'],
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
- 'direction' => payload['direction'],
625
- 'duration' => payload['duration'],
626
- 'end_time' => Twilio.deserialize_rfc2822(payload['end_time']),
627
- 'forwarded_from' => payload['forwarded_from'],
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
- 'sid' => payload['sid'],
636
- 'start_time' => Twilio.deserialize_rfc2822(payload['start_time']),
637
- 'status' => payload['status'],
638
- 'subresource_uris' => payload['subresource_uris'],
639
- 'to' => payload['to'],
640
- 'to_formatted' => payload['to_formatted'],
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
- 'queue_time' => payload['queue_time'],
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 SID of the Account that created this resource
664
- def account_sid
665
- @properties['account_sid']
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] 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.
706
- def direction
707
- @properties['direction']
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 length of the call in seconds.
712
- def duration
713
- @properties['duration']
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 [Time] The end time of the call. Null if the call did not complete successfully.
718
- def end_time
719
- @properties['end_time']
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 forwarding phone number if this call was an incoming call forwarded from another number (depends on carrier supporting forwarding). Otherwise, empty.
724
- def forwarded_from
725
- @properties['forwarded_from']
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] The Group SID associated with this call. If no Group is associated with the call, the field is empty.
742
- def group_sid
743
- @properties['group_sid']
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 [String] The SID that identifies the call that created this leg.
748
- def parent_call_sid
749
- @properties['parent_call_sid']
723
+ # @return [call.Status] The status of this call.
724
+ def status
725
+ @properties['status']
750
726
  end
751
727
 
752
728
  ##
753
- # @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.
754
- def phone_number_sid
755
- @properties['phone_number_sid']
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] The unique string that identifies this resource
772
- def sid
773
- @properties['sid']
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 [Time] The start time of the call. Null if the call has not yet been dialed.
778
- def start_time
779
- @properties['start_time']
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 [call.Status] The status of this call.
784
- def status
785
- @properties['status']
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] A list of related subresources identified by their relative URIs
790
- def subresource_uris
791
- @properties['subresource_uris']
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, 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`.
796
- def to
797
- @properties['to']
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 phone number, SIP address or Client identifier that received this call. Formatted for display.
802
- def to_formatted
803
- @properties['to_formatted']
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] The wait time in milliseconds before the call is placed.
820
- def queue_time
821
- @properties['queue_time']
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
  ##