lib/twilio-ruby/rest/api/v2010/account/call.rb in twilio-ruby-5.0.0.rc26 vs lib/twilio-ruby/rest/api/v2010/account/call.rb in twilio-ruby-5.0.0
- old
+ new
@@ -132,14 +132,14 @@
# @param [String] parent_call_sid Only show calls spawned by the call with this
# Sid
# @param [feedback_summary.Status] status Only show calls currently in this status
# @param [Time] start_time_before StartTime to filter on
# @param [Time] start_time StartTime to filter on
- # @param [Time] start_time_after: StartTime to filter on
+ # @param [Time] start_time_after StartTime to filter on
# @param [Time] end_time_before EndTime to filter on
# @param [Time] end_time EndTime to filter on
- # @param [Time] end_time_after: EndTime to filter on
+ # @param [Time] end_time_after EndTime to filter on
# @param [Integer] limit Upper limit for the number of records to return. stream()
# guarantees to never return more than limit. Default is no limit
# @param [Integer] page_size Number of records to fetch per request, when not set will use
# the default value of 50 records. If no page_size is defined
# but a limit is defined, stream() will attempt to read the
@@ -171,14 +171,14 @@
# @param [String] parent_call_sid Only show calls spawned by the call with this
# Sid
# @param [feedback_summary.Status] status Only show calls currently in this status
# @param [Time] start_time_before StartTime to filter on
# @param [Time] start_time StartTime to filter on
- # @param [Time] start_time_after: StartTime to filter on
+ # @param [Time] start_time_after StartTime to filter on
# @param [Time] end_time_before EndTime to filter on
# @param [Time] end_time EndTime to filter on
- # @param [Time] end_time_after: EndTime to filter on
+ # @param [Time] end_time_after EndTime to filter on
# @param [Integer] limit Upper limit for the number of records to return. stream()
# guarantees to never return more than limit. Default is no limit
# @param [Integer] page_size Number of records to fetch per request, when not set will use
# the default value of 50 records. If no page_size is defined
# but a limit is defined, stream() will attempt to read the
@@ -206,27 +206,10 @@
##
# When passed a block, yields CallInstance records from the API.
# This operation lazily loads records as efficiently as possible until the limit
# is reached.
- # @param [String] to Only show calls to this phone number or Client identifier
- # @param [String] from Only show calls from this phone number or Client identifier
- # @param [String] parent_call_sid Only show calls spawned by the call with this
- # Sid
- # @param [feedback_summary.Status] status Only show calls currently in this status
- # @param [Time] start_time_before StartTime to filter on
- # @param [Time] start_time StartTime to filter on
- # @param [Time] start_time_after: StartTime to filter on
- # @param [Time] end_time_before EndTime to filter on
- # @param [Time] end_time EndTime to filter on
- # @param [Time] end_time_after: EndTime to filter on
- # @param [Integer] limit Upper limit for the number of records to return. stream()
- # guarantees to never return more than limit. Default is no limit
- # @param [Integer] page_size Number of records to fetch per request, when not set will use
- # the default value of 50 records. If no page_size is defined
- # but a limit is defined, stream() will attempt to read the
- # limit with the most efficient page size, i.e. min(limit, 1000)
def each
limits = @version.read_limits
page = self.page(
page_size: limits[:page_size],
@@ -245,14 +228,14 @@
# @param [String] parent_call_sid Only show calls spawned by the call with this
# Sid
# @param [feedback_summary.Status] status Only show calls currently in this status
# @param [Time] start_time_before StartTime to filter on
# @param [Time] start_time StartTime to filter on
- # @param [Time] start_time_after: StartTime to filter on
+ # @param [Time] start_time_after StartTime to filter on
# @param [Time] end_time_before EndTime to filter on
# @param [Time] end_time EndTime to filter on
- # @param [Time] end_time_after: EndTime to filter on
+ # @param [Time] end_time_after EndTime to filter on
# @param [String] page_token PageToken provided by the API
# @param [Integer] page_number Page Number, this value is simply for client state
# @param [Integer] page_size Number of records to return, defaults to 50
# @return [Page] Page of CallInstance
def page(to: :unset, from: :unset, parent_call_sid: :unset, status: :unset, start_time_before: :unset, start_time: :unset, start_time_after: :unset, end_time_before: :unset, end_time: :unset, end_time_after: :unset, page_token: :unset, page_number: :unset, page_size: :unset)
@@ -293,12 +276,12 @@
end
##
# Access the feedback_summaries
# @param [String] sid The sid
- # @return [FeedbackSummaryList] if a(n) FeedbackSummaryList object was created.
- # @return [FeedbackSummaryContext] if a(n) FeedbackSummaryContext object was created.
+ # @return [FeedbackSummaryList]
+ # @return [FeedbackSummaryContext] if sid was passed.
def feedback_summaries(sid=:unset)
raise ArgumentError, 'sid cannot be nil' if sid.nil?
if sid != :unset
return FeedbackSummaryContext.new(
@@ -325,12 +308,10 @@
##
# Initialize the CallPage
# @param [Version] version Version that contains the resource
# @param [Response] response Response from the API
# @param [Hash] solution Path solution for the resource
- # @param [String] account_sid The unique id of the Account responsible for
- # creating this Call
# @return [CallPage] CallPage
def initialize(version, response, solution)
super(version, response)
# Path Solution
@@ -450,12 +431,12 @@
)
end
##
# Access the recordings
- # @return [RecordingList] if a(n) RecordingList object was created.
- # @return [RecordingContext] if a(n) RecordingContext object was created.
+ # @return [RecordingList]
+ # @return [RecordingContext] if sid was passed.
def recordings(sid=:unset)
raise ArgumentError, 'sid cannot be nil' if sid.nil?
if sid != :unset
return RecordingContext.new(
@@ -477,12 +458,12 @@
@recordings
end
##
# Access the notifications
- # @return [NotificationList] if a(n) NotificationList object was created.
- # @return [NotificationContext] if a(n) NotificationContext object was created.
+ # @return [NotificationList]
+ # @return [NotificationContext] if sid was passed.
def notifications(sid=:unset)
raise ArgumentError, 'sid cannot be nil' if sid.nil?
if sid != :unset
return NotificationContext.new(
@@ -504,12 +485,12 @@
@notifications
end
##
# Access the feedback
- # @return [FeedbackList] if a(n) FeedbackList object was created.
- # @return [FeedbackContext] if a(n) FeedbackContext object was created.
+ # @return [FeedbackList]
+ # @return [FeedbackContext]
def feedback
FeedbackContext.new(
@version,
@solution[:account_sid],
@solution[:sid],
@@ -574,11 +555,10 @@
end
##
# Generate an instance context for the instance, the context is capable of
# performing various actions. All instance actions are proxied to the context
- # @param [Version] version Version that contains the resource
# @return [CallContext] CallContext for this CallInstance
def context
unless @instance_context
@instance_context = CallContext.new(
@version,
@@ -587,105 +567,155 @@
)
end
@instance_context
end
+ ##
+ # @return [String] The unique id of the Account responsible for creating this Call
def account_sid
@properties['account_sid']
end
+ ##
+ # @return [String] The annotation provided for the Call
def annotation
@properties['annotation']
end
+ ##
+ # @return [String] If this call was initiated with answering machine detection, either `human` or `machine`. Empty otherwise.
def answered_by
@properties['answered_by']
end
+ ##
+ # @return [String] The API Version the Call was created through
def api_version
@properties['api_version']
end
+ ##
+ # @return [String] If this call was an incoming call to a phone number with Caller ID Lookup enabled, the caller's name. Empty otherwise.
def caller_name
@properties['caller_name']
end
+ ##
+ # @return [Time] The date that this resource was created
def date_created
@properties['date_created']
end
+ ##
+ # @return [Time] The date that this resource was last updated
def date_updated
@properties['date_updated']
end
+ ##
+ # @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.
def direction
@properties['direction']
end
+ ##
+ # @return [String] The duration
def duration
@properties['duration']
end
+ ##
+ # @return [Time] The end time of the Call. Null if the call did not complete successfully.
def end_time
@properties['end_time']
end
+ ##
+ # @return [String] If this Call was an incoming call forwarded from another number, the forwarding phone number (depends on carrier supporting forwarding). Empty otherwise.
def forwarded_from
@properties['forwarded_from']
end
+ ##
+ # @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`.
def from
@properties['from']
end
+ ##
+ # @return [String] The phone number, SIP address or Client identifier that made this Call. Formatted for display.
def from_formatted
@properties['from_formatted']
end
+ ##
+ # @return [String] A 34 character Group Sid associated with this Call. Empty if no Group is associated with the Call.
def group_sid
@properties['group_sid']
end
+ ##
+ # @return [String] A 34 character string that uniquely identifies the Call that created this leg.
def parent_call_sid
@properties['parent_call_sid']
end
+ ##
+ # @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.
def phone_number_sid
@properties['phone_number_sid']
end
+ ##
+ # @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.
def price
@properties['price']
end
+ ##
+ # @return [String] The currency in which `Price` is measured.
def price_unit
@properties['price_unit']
end
+ ##
+ # @return [String] A 34 character string that uniquely identifies this resource.
def sid
@properties['sid']
end
+ ##
+ # @return [Time] The start time of the Call. Null if the call has not yet been dialed.
def start_time
@properties['start_time']
end
+ ##
+ # @return [feedback_summary.Status] The status
def status
@properties['status']
end
+ ##
+ # @return [String] Call Instance Subresources
def subresource_uris
@properties['subresource_uris']
end
+ ##
+ # @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`.
def to
@properties['to']
end
+ ##
+ # @return [String] The phone number, SIP address or Client identifier that received this Call. Formatted for display.
def to_formatted
@properties['to_formatted']
end
+ ##
+ # @return [String] The URI for this resource, relative to `https://api.twilio.com`
def uri
@properties['uri']
end
##
\ No newline at end of file