twilio-ruby 5.18.0 → 5.19.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (57) hide show
  1. checksums.yaml +5 -5
  2. data/.travis.yml +0 -4
  3. data/CHANGES.md +20 -0
  4. data/LICENSE.md +1 -1
  5. data/README.md +2 -2
  6. data/lib/twilio-ruby/rest/accounts/v1/credential/aws.rb +21 -13
  7. data/lib/twilio-ruby/rest/accounts/v1/credential.rb +2 -1
  8. data/lib/twilio-ruby/rest/api/v2010/account/call/feedback.rb +4 -4
  9. data/lib/twilio-ruby/rest/api/v2010/account/call/feedback_summary.rb +6 -6
  10. data/lib/twilio-ruby/rest/api/v2010/account/call/recording.rb +80 -70
  11. data/lib/twilio-ruby/rest/api/v2010/account/call.rb +204 -196
  12. data/lib/twilio-ruby/rest/api/v2010/account/conference/recording.rb +59 -53
  13. data/lib/twilio-ruby/rest/api/v2010/account/conference.rb +69 -61
  14. data/lib/twilio-ruby/rest/api/v2010/account/message/media.rb +30 -25
  15. data/lib/twilio-ruby/rest/api/v2010/account/queue/member.rb +28 -16
  16. data/lib/twilio-ruby/rest/api/v2010/account/queue.rb +31 -20
  17. data/lib/twilio-ruby/rest/api/v2010/account/short_code.rb +54 -50
  18. data/lib/twilio-ruby/rest/api.rb +7 -6
  19. data/lib/twilio-ruby/rest/authy/v1.rb +15 -15
  20. data/lib/twilio-ruby/rest/authy.rb +8 -8
  21. data/lib/twilio-ruby/rest/client.rb +14 -6
  22. data/lib/twilio-ruby/rest/insights/v1/summary.rb +286 -0
  23. data/lib/twilio-ruby/rest/insights/v1.rb +43 -0
  24. data/lib/twilio-ruby/rest/insights.rb +46 -0
  25. data/lib/twilio-ruby/rest/messaging/v1/service/short_code.rb +22 -14
  26. data/lib/twilio-ruby/rest/preview/marketplace.rb +13 -13
  27. data/lib/twilio-ruby/rest/preview.rb +8 -8
  28. data/lib/twilio-ruby/rest/proxy/v1/service/session/interaction.rb +5 -28
  29. data/lib/twilio-ruby/rest/proxy/v1/service/session/participant.rb +5 -9
  30. data/lib/twilio-ruby/rest/proxy/v1/service/session.rb +5 -13
  31. data/lib/twilio-ruby/rest/sync/v1/service/sync_map/sync_map_item.rb +1 -1
  32. data/lib/twilio-ruby/rest/sync/v1/service/sync_stream.rb +1 -1
  33. data/lib/twilio-ruby/rest/trunking/v1/trunk.rb +4 -2
  34. data/lib/twilio-ruby/rest/trunking/v1.rb +2 -1
  35. data/lib/twilio-ruby/rest/verify/v1/service/verification.rb +7 -0
  36. data/lib/twilio-ruby/rest/verify/v1/service/verification_check.rb +7 -4
  37. data/lib/twilio-ruby/rest/video/v1/composition.rb +25 -13
  38. data/lib/twilio-ruby/rest/video/v1/composition_hook.rb +69 -74
  39. data/lib/twilio-ruby/rest/video/v1/recording.rb +13 -7
  40. data/lib/twilio-ruby/rest/video/v1.rb +16 -16
  41. data/lib/twilio-ruby/rest/video.rb +9 -9
  42. data/lib/twilio-ruby/rest/voice/v1/voice_permission/bulk_country_update.rb +3 -3
  43. data/lib/twilio-ruby/rest/voice/v1/voice_permission/country/highrisk_special_prefix.rb +2 -2
  44. data/lib/twilio-ruby/rest/voice/v1/voice_permission/country.rb +20 -20
  45. data/lib/twilio-ruby/version.rb +1 -1
  46. data/spec/integration/api/v2010/account/sip/domain_spec.rb +8 -4
  47. data/spec/integration/insights/v1/summary_spec.rb +60 -0
  48. data/spec/integration/proxy/v1/service/phone_number_spec.rb +2 -2
  49. data/spec/integration/proxy/v1/service/session/interaction_spec.rb +1 -1
  50. data/spec/integration/proxy/v1/service/session/participant/message_interaction_spec.rb +2 -2
  51. data/spec/integration/proxy/v1/service/session/participant_spec.rb +66 -4
  52. data/spec/integration/proxy/v1/service/session_spec.rb +8 -8
  53. data/spec/integration/proxy/v1/service_spec.rb +3 -3
  54. data/spec/integration/trunking/v1/trunk_spec.rb +80 -0
  55. data/spec/integration/verify/v1/service/verification_spec.rb +10 -1
  56. data/twilio-ruby.gemspec +1 -2
  57. metadata +16 -6
@@ -15,9 +15,9 @@ module Twilio
15
15
  ##
16
16
  # Initialize the CallList
17
17
  # @param [Version] version Version that contains the resource
18
- # @param [String] account_sid The unique id of the
19
- # [Account](https://www.twilio.com/docs/api/rest/account) responsible for creating
20
- # this Call.
18
+ # @param [String] account_sid The SID of the
19
+ # [Account](https://www.twilio.com/docs/api/rest/account) that created this Call
20
+ # resource.
21
21
  # @return [CallList] CallList
22
22
  def initialize(version, account_sid: nil)
23
23
  super(version)
@@ -37,94 +37,96 @@ module Twilio
37
37
  # @param [String] from The phone number or client identifier to use as the caller
38
38
  # id. If using a phone number, it must be a Twilio number or a Verified [outgoing
39
39
  # caller id](https://www.twilio.com/docs/voice/api/outgoing-caller-ids) for your
40
- # account. If the `To` parameter is a phone number, `From` must also be a phone
40
+ # account. If the `to` parameter is a phone number, `From` must also be a phone
41
41
  # number.
42
- # @param [String] method The HTTP method Twilio should use when making its request
43
- # to the `Url` parameter's value. Defaults to `POST`. If an `ApplicationSid`
44
- # parameter is present, this parameter is ignored.
45
- # @param [String] fallback_url A URL that Twilio will request if an error occurs
46
- # requesting or executing the TwiML at `Url`. If an `ApplicationSid` parameter is
47
- # present, this parameter is ignored.
48
- # @param [String] fallback_method The HTTP method that Twilio should use to
49
- # request the `FallbackUrl`. Must be either `GET` or `POST`. Defaults to `POST`.
50
- # If an `ApplicationSid` parameter is present, this parameter is ignored.
51
- # @param [String] status_callback A URL that Twilio will send asynchronous webhook
52
- # requests to on every call event specified in the `StatusCallbackEvent`
53
- # parameter. If no event is specified, Twilio will send `completed` by default. If
54
- # an `ApplicationSid` parameter is present, this parameter is ignored. URLs must
42
+ # @param [String] method The HTTP method we should use when calling the `url`
43
+ # parameter's value. Can be: `GET` or `POST` and the default is `POST`. If an
44
+ # `application_sid` parameter is present, this parameter is ignored.
45
+ # @param [String] fallback_url The URL that we call using the `fallback_method` if
46
+ # an error occurs when requesting or executing the TwiML at `url`. If an
47
+ # `application_sid` parameter is present, this parameter is ignored.
48
+ # @param [String] fallback_method The HTTP method that we should use to request
49
+ # the `fallback_url`. Can be: `GET` or `POST` and the default is `POST`. If an
50
+ # `application_sid` parameter is present, this parameter is ignored.
51
+ # @param [String] status_callback The URL we should call using the
52
+ # `status_callback_method` to send status information to your application. If no
53
+ # `status_callback_event` is specified, we will send the `completed` status. If an
54
+ # `application_sid` parameter is present, this parameter is ignored. URLs must
55
55
  # contain a valid hostname (underscores are not permitted).
56
- # @param [String] status_callback_event The call progress events that will trigger
57
- # a webhook from Twilio. Available values are `initiated`, `ringing`, `answered`,
58
- # and `completed`. If no event is specified, defaults to `completed`. If you want
59
- # to receive multiple events, please provide multiple `StatusCallbackEvent` values
60
- # as individual parameters in the `POST` request. See the code sample for
61
- # [monitoring call
62
- # progress](https://www.twilio.com/docs/voice/api/call?code-sample=code-create-a-call-and-specify-a-statuscallbackevent). If an `ApplicationSid` is present, this parameter is ignored.
63
- # @param [String] status_callback_method The HTTP method Twilio should use when
64
- # requesting the `StatusCallback` URL. Defaults to `POST`. If an `ApplicationSid`
65
- # parameter is present, this parameter is ignored.
56
+ # @param [String] status_callback_event The call progress events that we will send
57
+ # to the `status_callback` URL. Can be: `initiated`, `ringing`, `answered`, and
58
+ # `completed`. If no event is specified, we send the `completed` status. If you
59
+ # want to receive multiple events, specify each one in a separate
60
+ # `status_callback_event` parameter. See the code sample for [monitoring call
61
+ # progress](https://www.twilio.com/docs/voice/api/call?code-sample=code-create-a-call-and-specify-a-statuscallbackevent). If an `application_sid` is present, this parameter is ignored.
62
+ # @param [String] status_callback_method The HTTP method we should use when
63
+ # calling the `status_callback` URL. Can be: `GET` or `POST` and the default is
64
+ # `POST`. If an `application_sid` parameter is present, this parameter is ignored.
66
65
  # @param [String] send_digits A string of keys to dial after connecting to the
67
66
  # number, maximum of 32 digits. Valid digits in the string include: any digit
68
- # (`0`-`9`), '`#`', '`*`' and '`w`' (to insert a half second pause). For example,
67
+ # (`0`-`9`), '`#`', '`*`' and '`w`', to insert a half second pause. For example,
69
68
  # if you connected to a company phone number and wanted to pause for one second,
70
- # dial extension 1234, and then the pound key, use `SendDigits=ww1234#`. Remember
71
- # to URL-encode this string, since the '`#`' character has special meaning in a
72
- # URL. If both `SendDigits` and `MachineDetection` parameters are provided, then
73
- # `MachineDetection` will be ignored.
74
- # @param [String] if_machine The if_machine
75
- # @param [String] timeout The integer number of seconds that Twilio should allow
76
- # the phone to ring before assuming there is no answer. Default is `60` seconds,
77
- # the maximum is `600` seconds. For some call flows, Twilio will add a 5-second
78
- # buffer to the timeout value provided, so if you enter a timeout value of 10
79
- # seconds, you could see actual timeout closer to 15 seconds. Note, you could set
80
- # this to a low value like `15` to hang up before reaching an answering machine or
81
- # voicemail.
82
- # @param [Boolean] record Set this parameter to `true` to record the entirety of a
83
- # phone call. The `RecordingUrl` will be sent to the `StatusCallback` URL.
84
- # Defaults to false.
85
- # @param [String] recording_channels `mono` or `dual` defaults to `mono`. Set
86
- # this parameter to specify the number of channels in the final recording. In a
87
- # mono-channel recording, both legs of the call are mixed down into a single
88
- # channel within a single recording file. With dual-channel recording, both legs
89
- # use separate channels within a single recording file. In dual-channel
90
- # recordings, the parent call will always be in the first channel, and the child
91
- # call will always be in the second channel.
92
- # @param [String] recording_status_callback A URL that Twilio will send a webhook
93
- # request to when the recording is available for access.
94
- # @param [String] recording_status_callback_method The HTTP method Twilio should
95
- # use when requesting the `RecordingStatusCallback` URL. Defaults to `POST`.
96
- # @param [String] sip_auth_username The sip_auth_username
97
- # @param [String] sip_auth_password The sip_auth_password
69
+ # and then dial extension 1234 followed by the pound key, the value of this
70
+ # parameter would be `ww1234#`. Remember to URL-encode this string, since the
71
+ # '`#`' character has special meaning in a URL. If both `SendDigits` and
72
+ # `MachineDetection` parameters are provided, then `MachineDetection` will be
73
+ # ignored.
74
+ # @param [String] if_machine The action to take if an answering machine is
75
+ # detected. Can be: `Continue`, `Hangup`, or `False`. `False` disables the
76
+ # detection of an answering machine.
77
+ # @param [String] timeout The integer number of seconds that we should allow the
78
+ # phone to ring before assuming there is no answer. The default is `60` seconds
79
+ # and the maximum is `600` seconds. For some call flows, we will add a 5-second
80
+ # buffer to the timeout value you provide. For this reason, a timeout value of 10
81
+ # seconds could result in an actual timeout closer to 15 seconds. You can set this
82
+ # to a short time, such as `15` seconds, to hang up before reaching an answering
83
+ # machine or voicemail.
84
+ # @param [Boolean] record Set this parameter to `true` to record the phone call.
85
+ # The `recording_url` will be sent to the `status_callback` URL. The default is
86
+ # `false`.
87
+ # @param [String] recording_channels The number of channels in the final
88
+ # recording. Can be: `mono` or `dual`. The default is `mono`. `mono` records both
89
+ # legs of the call in a single channel of the recording file. `dual` records each
90
+ # leg to a separate channel of the recording file. The first channel of a
91
+ # dual-channel recording contains the parent call and the second channel contains
92
+ # the child call.
93
+ # @param [String] recording_status_callback The URL that we call when the
94
+ # recording is available to be accessed.
95
+ # @param [String] recording_status_callback_method The HTTP method we should use
96
+ # when calling the `recording_status_callback` URL. Can be: `GET` or `POST` and
97
+ # the default is `POST`.
98
+ # @param [String] sip_auth_username The username used to authenticate the caller
99
+ # making a SIP call.
100
+ # @param [String] sip_auth_password The password required to authenticate the user
101
+ # account specified in `sip_auth_username`.
98
102
  # @param [String] machine_detection Detect if a human, answering machine, or fax
99
- # has picked up the call. Use `Enable` if you would like Twilio to return an
100
- # `AnsweredBy` value as soon as it identifies the called party. If you would like
101
- # to leave a message on an answering machine, specify `DetectMessageEnd`. If both
102
- # `SendDigits` and `MachineDetection` parameters are provided, then
103
- # MachineDetection will be ignored. [Detailed documentation is
104
- # here](https://www.twilio.com/docs/voice/answering-machine-detection).
105
- # @param [String] machine_detection_timeout The number of seconds that Twilio
106
- # should attempt to perform answering machine detection before timing out and
107
- # firing a voice request with `AnsweredBy` of `unknown`. Defaults to 30 seconds.
103
+ # has picked up the call. Can be: `Enable` or `DetectMessageEnd`. Use `Enable` if
104
+ # you would like us to return `AnsweredBy` as soon as the called party is
105
+ # identified. Use `DetectMessageEnd`, if you would like to leave a message on an
106
+ # answering machine. If `send_digits` is provided, this parameter is ignored. For
107
+ # more information, see [Answering Machine
108
+ # Detection](https://www.twilio.com/docs/voice/answering-machine-detection).
109
+ # @param [String] machine_detection_timeout The number of seconds that we should
110
+ # attempt to detect an answering machine before timing out and sending a voice
111
+ # request with `AnsweredBy` of `unknown`. The default timeout is 30 seconds.
108
112
  # @param [String] recording_status_callback_event The recording status events that
109
- # will trigger Twilio to send webhooks on to the URL specified in
110
- # `RecordingStatusCallback`. The available values are `in-progress`, `completed`
111
- # and `absent`. Defaults to `completed`. To specify multiple values, separate them
112
- # with a space.
113
- # @param [String] trim `trim-silence` or `do-not-trim`. Set this parameter to
114
- # define whether leading and trailing silence is trimmed from the recording.
115
- # Defaults to `trim-silence`.
113
+ # will trigger calls to the URL specified in `recording_status_callback`. Can be:
114
+ # `in-progress`, `completed` and `absent`. Defaults to `completed`. Separate
115
+ # multiple values with a space.
116
+ # @param [String] trim Whether to trim any leading and trailing silence from the
117
+ # recording. Can be: `trim-silence` or `do-not-trim` and the default is
118
+ # `trim-silence`.
116
119
  # @param [String] caller_id The phone number, SIP address, or Client identifier
117
- # that made this Call. Phone numbers are in [E.164
118
- # format](https://www.twilio.com/docs/glossary/what-e164) (e.g., +16175551212).
120
+ # that made this call. Phone numbers are in [E.164
121
+ # format](https://wwnw.twilio.com/docs/glossary/what-e164) (e.g., +16175551212).
119
122
  # SIP addresses are formatted as `name@company.com`.
120
- # @param [String] url The fully qualified URL that hosts instructions for the
121
- # call. Twilio will consult this URL when the call connects. See the [Url
122
- # Parameter](https://www.twilio.com/docs/voice/make-calls#specify-a-url-parameter) details in [Making Calls](https://www.twilio.com/docs/voice/make-calls) for more details.
123
- # @param [String] application_sid The 34-character SID of the application Twilio
124
- # should use to handle this phone call. If this parameter is present, Twilio will
125
- # ignore all of the voice URLs passed and use the URLs set on the application. See
126
- # the [ApplicationSid
127
- # Parameter](https://www.twilio.com/docs/voice/make-calls#specify-an-applicationsid-parameter) section in [Making Calls](https://www.twilio.com/docs/voice/make-calls) for more details.
123
+ # @param [String] url The absolute URL that returns the TwiML instructions for the
124
+ # call. We will call this URL using the `method` when the call connects. For more
125
+ # information, see the [Url
126
+ # Parameter](https://www.twilio.com/docs/voice/make-calls#specify-a-url-parameter)
127
+ # section in [Making Calls](https://www.twilio.com/docs/voice/make-calls).
128
+ # @param [String] application_sid The SID of the Application resource that will
129
+ # handle the call, if the call will be handled by an application.
128
130
  # @return [CallInstance] Newly created CallInstance
129
131
  def create(to: nil, from: nil, method: :unset, fallback_url: :unset, fallback_method: :unset, status_callback: :unset, status_callback_event: :unset, status_callback_method: :unset, send_digits: :unset, if_machine: :unset, timeout: :unset, record: :unset, recording_channels: :unset, recording_status_callback: :unset, recording_status_callback_method: :unset, sip_auth_username: :unset, sip_auth_password: :unset, machine_detection: :unset, machine_detection_timeout: :unset, recording_status_callback_event: :unset, trim: :unset, caller_id: :unset, url: :unset, application_sid: :unset)
130
132
  data = Twilio::Values.of({
@@ -169,19 +171,19 @@ module Twilio
169
171
  # memory before returning.
170
172
  # @param [String] to Only show calls to this phone number, SIP address, Client
171
173
  # identifier or SIM SID.
172
- # @param [String] from Only show calls from this phone number, SIP address, Client
173
- # identifier or SIM SID.
174
- # @param [String] parent_call_sid Only show calls spawned by the Call with this
174
+ # @param [String] from Only include calls from this phone number, SIP address,
175
+ # Client identifier or SIM SID.
176
+ # @param [String] parent_call_sid Only include calls spawned by calls with this
175
177
  # SID.
176
- # @param [call.Status] status Only show calls currently in the specified status.
177
- # May be `queued`, `ringing`, `in-progress`, `canceled`, `completed`, `failed`,
178
- # `busy`, or `no-answer`.
179
- # @param [Time] start_time_before StartTime to filter on
180
- # @param [Time] start_time StartTime to filter on
181
- # @param [Time] start_time_after StartTime to filter on
182
- # @param [Time] end_time_before EndTime to filter on
183
- # @param [Time] end_time EndTime to filter on
184
- # @param [Time] end_time_after EndTime to filter on
178
+ # @param [call.Status] status The status of the calls to include. Can be:
179
+ # `queued`, `ringing`, `in-progress`, `canceled`, `completed`, `failed`, `busy`,
180
+ # or `no-answer`.
181
+ # @param [Time] start_time_before Only include calls that started on or after this date
182
+ # @param [Time] start_time Only include calls that started on or after this date
183
+ # @param [Time] start_time_after Only include calls that started on or after this date
184
+ # @param [Time] end_time_before Only include usage that occurred on or before this date
185
+ # @param [Time] end_time Only include usage that occurred on or before this date
186
+ # @param [Time] end_time_after Only include usage that occurred on or before this date
185
187
  # @param [Integer] limit Upper limit for the number of records to return. stream()
186
188
  # guarantees to never return more than limit. Default is no limit
187
189
  # @param [Integer] page_size Number of records to fetch per request, when
@@ -212,19 +214,19 @@ module Twilio
212
214
  # is reached.
213
215
  # @param [String] to Only show calls to this phone number, SIP address, Client
214
216
  # identifier or SIM SID.
215
- # @param [String] from Only show calls from this phone number, SIP address, Client
216
- # identifier or SIM SID.
217
- # @param [String] parent_call_sid Only show calls spawned by the Call with this
217
+ # @param [String] from Only include calls from this phone number, SIP address,
218
+ # Client identifier or SIM SID.
219
+ # @param [String] parent_call_sid Only include calls spawned by calls with this
218
220
  # SID.
219
- # @param [call.Status] status Only show calls currently in the specified status.
220
- # May be `queued`, `ringing`, `in-progress`, `canceled`, `completed`, `failed`,
221
- # `busy`, or `no-answer`.
222
- # @param [Time] start_time_before StartTime to filter on
223
- # @param [Time] start_time StartTime to filter on
224
- # @param [Time] start_time_after StartTime to filter on
225
- # @param [Time] end_time_before EndTime to filter on
226
- # @param [Time] end_time EndTime to filter on
227
- # @param [Time] end_time_after EndTime to filter on
221
+ # @param [call.Status] status The status of the calls to include. Can be:
222
+ # `queued`, `ringing`, `in-progress`, `canceled`, `completed`, `failed`, `busy`,
223
+ # or `no-answer`.
224
+ # @param [Time] start_time_before Only include calls that started on or after this date
225
+ # @param [Time] start_time Only include calls that started on or after this date
226
+ # @param [Time] start_time_after Only include calls that started on or after this date
227
+ # @param [Time] end_time_before Only include usage that occurred on or before this date
228
+ # @param [Time] end_time Only include usage that occurred on or before this date
229
+ # @param [Time] end_time_after Only include usage that occurred on or before this date
228
230
  # @param [Integer] limit Upper limit for the number of records to return. stream()
229
231
  # guarantees to never return more than limit. Default is no limit.
230
232
  # @param [Integer] page_size Number of records to fetch per request, when
@@ -271,19 +273,19 @@ module Twilio
271
273
  # Request is executed immediately.
272
274
  # @param [String] to Only show calls to this phone number, SIP address, Client
273
275
  # identifier or SIM SID.
274
- # @param [String] from Only show calls from this phone number, SIP address, Client
275
- # identifier or SIM SID.
276
- # @param [String] parent_call_sid Only show calls spawned by the Call with this
276
+ # @param [String] from Only include calls from this phone number, SIP address,
277
+ # Client identifier or SIM SID.
278
+ # @param [String] parent_call_sid Only include calls spawned by calls with this
277
279
  # SID.
278
- # @param [call.Status] status Only show calls currently in the specified status.
279
- # May be `queued`, `ringing`, `in-progress`, `canceled`, `completed`, `failed`,
280
- # `busy`, or `no-answer`.
281
- # @param [Time] start_time_before StartTime to filter on
282
- # @param [Time] start_time StartTime to filter on
283
- # @param [Time] start_time_after StartTime to filter on
284
- # @param [Time] end_time_before EndTime to filter on
285
- # @param [Time] end_time EndTime to filter on
286
- # @param [Time] end_time_after EndTime to filter on
280
+ # @param [call.Status] status The status of the calls to include. Can be:
281
+ # `queued`, `ringing`, `in-progress`, `canceled`, `completed`, `failed`, `busy`,
282
+ # or `no-answer`.
283
+ # @param [Time] start_time_before Only include calls that started on or after this date
284
+ # @param [Time] start_time Only include calls that started on or after this date
285
+ # @param [Time] start_time_after Only include calls that started on or after this date
286
+ # @param [Time] end_time_before Only include usage that occurred on or before this date
287
+ # @param [Time] end_time Only include usage that occurred on or before this date
288
+ # @param [Time] end_time_after Only include usage that occurred on or before this date
287
289
  # @param [String] page_token PageToken provided by the API
288
290
  # @param [Integer] page_number Page Number, this value is simply for client state
289
291
  # @param [Integer] page_size Number of records to return, defaults to 50
@@ -381,8 +383,11 @@ module Twilio
381
383
  ##
382
384
  # Initialize the CallContext
383
385
  # @param [Version] version Version that contains the resource
384
- # @param [String] account_sid The account_sid
385
- # @param [String] sid The Call Sid that uniquely identifies the Call to fetch
386
+ # @param [String] account_sid The SID of the
387
+ # [Account](https://www.twilio.com/docs/api/rest/account) that created the Call
388
+ # resource(s) to fetch.
389
+ # @param [String] sid The Twilio-provided string that uniquely identifies the Call
390
+ # resource to fetch
386
391
  # @return [CallContext] CallContext
387
392
  def initialize(version, account_sid, sid)
388
393
  super(version)
@@ -421,32 +426,33 @@ module Twilio
421
426
 
422
427
  ##
423
428
  # Update the CallInstance
424
- # @param [String] url that hosts instructions for the call. Twilio will consult
425
- # this URL when the call connects. See the [Url
429
+ # @param [String] url The absolute URL that returns the TwiML instructions for the
430
+ # call. We will call this URL using the `method` when the call connects. For more
431
+ # information, see the [Url
426
432
  # Parameter](https://www.twilio.com/docs/voice/make-calls#specify-a-url-parameter)
427
- # section in [Making Calls](https://www.twilio.com/docs/voice/make-calls) for more
428
- # details.
429
- # @param [String] method The HTTP method Twilio should use when making its request
430
- # to the `Url` parameter's value. Defaults to `POST`. If an `ApplicationSid`
431
- # parameter is present, this parameter is ignored.
432
- # @param [call.UpdateStatus] status Either `canceled` or `completed`.
433
- # Specifying `canceled` will attempt to hang up calls that are queued or ringing,
434
- # but will not affect calls already in progress. Specifying `completed` will
435
- # attempt to hang up a call even if it's already in progress.
436
- # @param [String] fallback_url A URL that Twilio will request if an error occurs
437
- # when requesting or executing the TwiML at `Url`. If an `ApplicationSid`
438
- # parameter is present, this parameter is ignored.
439
- # @param [String] fallback_method The HTTP method that Twilio should use to
440
- # request the `FallbackUrl`. Must be either `GET` or `POST`. Defaults to `POST`.
441
- # If an `ApplicationSid` parameter is present, this parameter is ignored.
442
- # @param [String] status_callback A URL that Twilio will send asynchronous webhook
443
- # requests to on every call event specified in the `StatusCallbackEvent`
444
- # parameter. If no event is specified, Twilio will send `completed` by default. If
445
- # an `ApplicationSid` parameter is present, this parameter is ignored. URLs must
433
+ # section in [Making Calls](https://www.twilio.com/docs/voice/make-calls).
434
+ # @param [String] method The HTTP method we should use when calling the `url`. Can
435
+ # be: `GET` or `POST` and the default is `POST`. If an `application_sid` parameter
436
+ # is present, this parameter is ignored.
437
+ # @param [call.UpdateStatus] status The new status of the resource. Can be:
438
+ # `canceled` or `completed`. Specifying `canceled` will attempt to hang up calls
439
+ # that are queued or ringing; however, it will not affect calls already in
440
+ # progress. Specifying `completed` will attempt to hang up a call even if it's
441
+ # already in progress.
442
+ # @param [String] fallback_url The URL that we call using the `fallback_method` if
443
+ # an error occurs when requesting or executing the TwiML at `url`. If an
444
+ # `application_sid` parameter is present, this parameter is ignored.
445
+ # @param [String] fallback_method The HTTP method that we should use to request
446
+ # the `fallback_url`. Can be: `GET` or `POST` and the default is `POST`. If an
447
+ # `application_sid` parameter is present, this parameter is ignored.
448
+ # @param [String] status_callback The URL we should call using the
449
+ # `status_callback_method` to send status information to your application. If no
450
+ # `status_callback_event` is specified, we will send the `completed` status. If an
451
+ # `application_sid` parameter is present, this parameter is ignored. URLs must
446
452
  # contain a valid hostname (underscores are not permitted).
447
- # @param [String] status_callback_method The HTTP method Twilio should use when
448
- # requesting the `StatusCallback` URL. Defaults to `POST`. If an `ApplicationSid`
449
- # parameter is present, this parameter is ignored.
453
+ # @param [String] status_callback_method The HTTP method we should use when
454
+ # requesting the `status_callback` URL. Can be: `GET` or `POST` and the default is
455
+ # `POST`. If an `application_sid` parameter is present, this parameter is ignored.
450
456
  # @return [CallInstance] Updated CallInstance
451
457
  def update(url: :unset, method: :unset, status: :unset, fallback_url: :unset, fallback_method: :unset, status_callback: :unset, status_callback_method: :unset)
452
458
  data = Twilio::Values.of({
@@ -533,10 +539,11 @@ module Twilio
533
539
  # Initialize the CallInstance
534
540
  # @param [Version] version Version that contains the resource
535
541
  # @param [Hash] payload payload that contains response from Twilio
536
- # @param [String] account_sid The unique id of the
537
- # [Account](https://www.twilio.com/docs/api/rest/account) responsible for creating
538
- # this Call.
539
- # @param [String] sid The Call Sid that uniquely identifies the Call to fetch
542
+ # @param [String] account_sid The SID of the
543
+ # [Account](https://www.twilio.com/docs/api/rest/account) that created this Call
544
+ # resource.
545
+ # @param [String] sid The Twilio-provided string that uniquely identifies the Call
546
+ # resource to fetch
540
547
  # @return [CallInstance] CallInstance
541
548
  def initialize(version, payload, account_sid: nil, sid: nil)
542
549
  super(version)
@@ -587,103 +594,103 @@ module Twilio
587
594
  end
588
595
 
589
596
  ##
590
- # @return [String] The unique id of the Account responsible for creating this Call
597
+ # @return [String] The SID of the Account that created this resource
591
598
  def account_sid
592
599
  @properties['account_sid']
593
600
  end
594
601
 
595
602
  ##
596
- # @return [String] The annotation provided for the Call
603
+ # @return [String] The annotation provided for the call
597
604
  def annotation
598
605
  @properties['annotation']
599
606
  end
600
607
 
601
608
  ##
602
- # @return [String] Either `human` or `machine` if this Call was initiated with answering machine detection. Empty otherwise.
609
+ # @return [String] Either `human` or `machine` if this call was initiated with answering machine detection. Empty otherwise.
603
610
  def answered_by
604
611
  @properties['answered_by']
605
612
  end
606
613
 
607
614
  ##
608
- # @return [String] The API Version used to create the Call
615
+ # @return [String] The API Version used to create the call
609
616
  def api_version
610
617
  @properties['api_version']
611
618
  end
612
619
 
613
620
  ##
614
- # @return [String] The caller's name if this Call was an incoming call to a phone number with Caller ID Lookup enabled. Empty otherwise.
621
+ # @return [String] The caller's name if this call was an incoming call to a phone number with caller ID Lookup enabled. Otherwise, empty.
615
622
  def caller_name
616
623
  @properties['caller_name']
617
624
  end
618
625
 
619
626
  ##
620
- # @return [Time] The date that this resource was created
627
+ # @return [Time] The RFC 2822 date and time in GMT that this resource was created
621
628
  def date_created
622
629
  @properties['date_created']
623
630
  end
624
631
 
625
632
  ##
626
- # @return [Time] The date that this resource was last updated
633
+ # @return [Time] The RFC 2822 date and time in GMT that this resource was last updated
627
634
  def date_updated
628
635
  @properties['date_updated']
629
636
  end
630
637
 
631
638
  ##
632
- # @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.
639
+ # @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.
633
640
  def direction
634
641
  @properties['direction']
635
642
  end
636
643
 
637
644
  ##
638
- # @return [String] The length of the Call in seconds.
645
+ # @return [String] The length of the call in seconds.
639
646
  def duration
640
647
  @properties['duration']
641
648
  end
642
649
 
643
650
  ##
644
- # @return [Time] The end time of the Call. Null if the call did not complete successfully.
651
+ # @return [Time] The end time of the call. Null if the call did not complete successfully.
645
652
  def end_time
646
653
  @properties['end_time']
647
654
  end
648
655
 
649
656
  ##
650
- # @return [String] The forwarding phone number if this Call was an incoming call forwarded from another number (depends on carrier supporting forwarding). Empty otherwise.
657
+ # @return [String] The forwarding phone number if this call was an incoming call forwarded from another number (depends on carrier supporting forwarding). Otherwise, empty.
651
658
  def forwarded_from
652
659
  @properties['forwarded_from']
653
660
  end
654
661
 
655
662
  ##
656
- # @return [String] The phone number, SIP address or Client identifier that made 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`.
663
+ # @return [String] The phone number, SIP address or Client identifier that made 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`.
657
664
  def from
658
665
  @properties['from']
659
666
  end
660
667
 
661
668
  ##
662
- # @return [String] The phone number, SIP address or Client identifier that made this Call. Formatted for display.
669
+ # @return [String] The calling phone number, SIP address, or Client identifier formatted for display.
663
670
  def from_formatted
664
671
  @properties['from_formatted']
665
672
  end
666
673
 
667
674
  ##
668
- # @return [String] A 34-character Group Sid associated with this Call. Empty if no Group is associated with the Call.
675
+ # @return [String] The Group SID associated with this call. If no Group is associated with the call, the field is empty.
669
676
  def group_sid
670
677
  @properties['group_sid']
671
678
  end
672
679
 
673
680
  ##
674
- # @return [String] A 34-character string that uniquely identifies the Call that created this leg.
681
+ # @return [String] The SID that identifies the call that created this leg.
675
682
  def parent_call_sid
676
683
  @properties['parent_call_sid']
677
684
  end
678
685
 
679
686
  ##
680
- # @return [String] If the call was inbound, this is the Sid of the `IncomingPhoneNumber` that received the call. If the call was outbound, it is the Sid of the `OutgoingCallerId` from which the call was placed.
687
+ # @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.
681
688
  def phone_number_sid
682
689
  @properties['phone_number_sid']
683
690
  end
684
691
 
685
692
  ##
686
- # @return [String] The charge for this Call, in the currency associated with the account. Populated after the call is completed. May not be immediately available.
693
+ # @return [String] The charge for this call, in the currency associated with the account. Populated after the call is completed. May not be immediately available.
687
694
  def price
688
695
  @properties['price']
689
696
  end
@@ -695,43 +702,43 @@ module Twilio
695
702
  end
696
703
 
697
704
  ##
698
- # @return [String] A 34-character string that uniquely identifies the Call resource.
705
+ # @return [String] The unique string that identifies this resource
699
706
  def sid
700
707
  @properties['sid']
701
708
  end
702
709
 
703
710
  ##
704
- # @return [Time] The start time of the Call. Null if the call has not yet been dialed.
711
+ # @return [Time] The start time of the call. Null if the call has not yet been dialed.
705
712
  def start_time
706
713
  @properties['start_time']
707
714
  end
708
715
 
709
716
  ##
710
- # @return [call.Status] A string representing the status of the Call.
717
+ # @return [call.Status] The status of this call.
711
718
  def status
712
719
  @properties['status']
713
720
  end
714
721
 
715
722
  ##
716
- # @return [String] Call Instance Subresources
723
+ # @return [String] A list of related subresources identified by their relative URIs
717
724
  def subresource_uris
718
725
  @properties['subresource_uris']
719
726
  end
720
727
 
721
728
  ##
722
- # @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`.
729
+ # @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`.
723
730
  def to
724
731
  @properties['to']
725
732
  end
726
733
 
727
734
  ##
728
- # @return [String] The phone number, SIP address or Client identifier that received this Call. Formatted for display.
735
+ # @return [String] The phone number, SIP address or Client identifier that received this call. Formatted for display.
729
736
  def to_formatted
730
737
  @properties['to_formatted']
731
738
  end
732
739
 
733
740
  ##
734
- # @return [String] The URI for this resource, relative to `https://api.twilio.com`
741
+ # @return [String] The URI of this resource, relative to `https://api.twilio.com`
735
742
  def uri
736
743
  @properties['uri']
737
744
  end
@@ -752,32 +759,33 @@ module Twilio
752
759
 
753
760
  ##
754
761
  # Update the CallInstance
755
- # @param [String] url that hosts instructions for the call. Twilio will consult
756
- # this URL when the call connects. See the [Url
762
+ # @param [String] url The absolute URL that returns the TwiML instructions for the
763
+ # call. We will call this URL using the `method` when the call connects. For more
764
+ # information, see the [Url
757
765
  # Parameter](https://www.twilio.com/docs/voice/make-calls#specify-a-url-parameter)
758
- # section in [Making Calls](https://www.twilio.com/docs/voice/make-calls) for more
759
- # details.
760
- # @param [String] method The HTTP method Twilio should use when making its request
761
- # to the `Url` parameter's value. Defaults to `POST`. If an `ApplicationSid`
762
- # parameter is present, this parameter is ignored.
763
- # @param [call.UpdateStatus] status Either `canceled` or `completed`.
764
- # Specifying `canceled` will attempt to hang up calls that are queued or ringing,
765
- # but will not affect calls already in progress. Specifying `completed` will
766
- # attempt to hang up a call even if it's already in progress.
767
- # @param [String] fallback_url A URL that Twilio will request if an error occurs
768
- # when requesting or executing the TwiML at `Url`. If an `ApplicationSid`
769
- # parameter is present, this parameter is ignored.
770
- # @param [String] fallback_method The HTTP method that Twilio should use to
771
- # request the `FallbackUrl`. Must be either `GET` or `POST`. Defaults to `POST`.
772
- # If an `ApplicationSid` parameter is present, this parameter is ignored.
773
- # @param [String] status_callback A URL that Twilio will send asynchronous webhook
774
- # requests to on every call event specified in the `StatusCallbackEvent`
775
- # parameter. If no event is specified, Twilio will send `completed` by default. If
776
- # an `ApplicationSid` parameter is present, this parameter is ignored. URLs must
766
+ # section in [Making Calls](https://www.twilio.com/docs/voice/make-calls).
767
+ # @param [String] method The HTTP method we should use when calling the `url`. Can
768
+ # be: `GET` or `POST` and the default is `POST`. If an `application_sid` parameter
769
+ # is present, this parameter is ignored.
770
+ # @param [call.UpdateStatus] status The new status of the resource. Can be:
771
+ # `canceled` or `completed`. Specifying `canceled` will attempt to hang up calls
772
+ # that are queued or ringing; however, it will not affect calls already in
773
+ # progress. Specifying `completed` will attempt to hang up a call even if it's
774
+ # already in progress.
775
+ # @param [String] fallback_url The URL that we call using the `fallback_method` if
776
+ # an error occurs when requesting or executing the TwiML at `url`. If an
777
+ # `application_sid` parameter is present, this parameter is ignored.
778
+ # @param [String] fallback_method The HTTP method that we should use to request
779
+ # the `fallback_url`. Can be: `GET` or `POST` and the default is `POST`. If an
780
+ # `application_sid` parameter is present, this parameter is ignored.
781
+ # @param [String] status_callback The URL we should call using the
782
+ # `status_callback_method` to send status information to your application. If no
783
+ # `status_callback_event` is specified, we will send the `completed` status. If an
784
+ # `application_sid` parameter is present, this parameter is ignored. URLs must
777
785
  # contain a valid hostname (underscores are not permitted).
778
- # @param [String] status_callback_method The HTTP method Twilio should use when
779
- # requesting the `StatusCallback` URL. Defaults to `POST`. If an `ApplicationSid`
780
- # parameter is present, this parameter is ignored.
786
+ # @param [String] status_callback_method The HTTP method we should use when
787
+ # requesting the `status_callback` URL. Can be: `GET` or `POST` and the default is
788
+ # `POST`. If an `application_sid` parameter is present, this parameter is ignored.
781
789
  # @return [CallInstance] Updated CallInstance
782
790
  def update(url: :unset, method: :unset, status: :unset, fallback_url: :unset, fallback_method: :unset, status_callback: :unset, status_callback_method: :unset)
783
791
  context.update(