Class Call
- java.lang.Object
-
- com.twilio.base.Resource
-
- com.twilio.rest.api.v2010.account.Call
-
- All Implemented Interfaces:
Serializable
public class Call extends Resource
- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
Call.Event
static class
Call.Status
static class
Call.UpdateStatus
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static CallCreator
creator(Endpoint to, Endpoint from, String applicationSid)
Create a CallCreator to execute create.static CallCreator
creator(Endpoint to, Endpoint from, URI url)
Create a CallCreator to execute create.static CallCreator
creator(String pathAccountSid, Endpoint to, Endpoint from, String applicationSid)
Create a CallCreator to execute create.static CallCreator
creator(String pathAccountSid, Endpoint to, Endpoint from, URI url)
Create a CallCreator to execute create.static CallDeleter
deleter(String pathSid)
Create a CallDeleter to execute delete.static CallDeleter
deleter(String pathAccountSid, String pathSid)
Create a CallDeleter to execute delete.boolean
equals(Object o)
static CallFetcher
fetcher(String pathSid)
Create a CallFetcher to execute fetch.static CallFetcher
fetcher(String pathAccountSid, String pathSid)
Create a CallFetcher to execute fetch.static Call
fromJson(InputStream json, com.fasterxml.jackson.databind.ObjectMapper objectMapper)
Converts a JSON InputStream into a Call object using the provided ObjectMapper.static Call
fromJson(String json, com.fasterxml.jackson.databind.ObjectMapper objectMapper)
Converts a JSON String into a Call object using the provided ObjectMapper.String
getAccountSid()
Returns The The SID of the Account that created this resource.String
getAnnotation()
Returns The The annotation provided for the call.String
getAnsweredBy()
Returns The Either `human` or `machine` if this call was initiated with answering machine detection.String
getApiVersion()
Returns The The API Version used to create the call.String
getCallerName()
Returns The The caller's name if this call was an incoming call to a phone number with caller ID Lookup enabled.org.joda.time.DateTime
getDateCreated()
Returns The The RFC 2822 date and time in GMT that this resource was created.org.joda.time.DateTime
getDateUpdated()
Returns The The RFC 2822 date and time in GMT that this resource was last updated.String
getDirection()
Returns The A string describing the direction of the call.String
getDuration()
Returns The The length of the call in seconds..org.joda.time.DateTime
getEndTime()
Returns The The end time of the call.String
getForwardedFrom()
Returns The The forwarding phone number if this call was an incoming call forwarded from another number (depends on carrier supporting forwarding).String
getFrom()
Returns The The phone number, SIP address or Client identifier that made this call.String
getFromFormatted()
Returns The The calling phone number, SIP address, or Client identifier formatted for display..String
getGroupSid()
Returns The The Group SID associated with this call.String
getParentCallSid()
Returns The The SID that identifies the call that created this leg..String
getPhoneNumberSid()
Returns The If the call was inbound, this is the SID of the IncomingPhoneNumber resource that received the call.BigDecimal
getPrice()
Returns The The charge for this call, in the currency associated with the account.Currency
getPriceUnit()
Returns The The currency in which `Price` is measured..String
getSid()
Returns The The unique string that identifies this resource.org.joda.time.DateTime
getStartTime()
Returns The The start time of the call.Call.Status
getStatus()
Returns The The status of this call..Map<String,String>
getSubresourceUris()
Returns The A list of related subresources identified by their relative URIs.String
getTo()
Returns The The phone number, SIP address or Client identifier that received this call.String
getToFormatted()
Returns The The phone number, SIP address or Client identifier that received this call.String
getUri()
Returns The The URI of this resource, relative to `https://api.twilio.com`.int
hashCode()
static CallReader
reader()
Create a CallReader to execute read.static CallReader
reader(String pathAccountSid)
Create a CallReader to execute read.String
toString()
static CallUpdater
updater(String pathSid)
Create a CallUpdater to execute update.static CallUpdater
updater(String pathAccountSid, String pathSid)
Create a CallUpdater to execute update.
-
-
-
Method Detail
-
creator
public static CallCreator creator(String pathAccountSid, Endpoint to, Endpoint from, URI url)
Create a CallCreator to execute create.- Parameters:
pathAccountSid
- The SID of the Account that will create the resourceto
- Phone number, SIP address, or client identifier to callfrom
- Twilio number from which to originate the callurl
- The absolute URL that returns TwiML for this call- Returns:
- CallCreator capable of executing the create
-
creator
public static CallCreator creator(Endpoint to, Endpoint from, URI url)
Create a CallCreator to execute create.- Parameters:
to
- Phone number, SIP address, or client identifier to callfrom
- Twilio number from which to originate the callurl
- The absolute URL that returns TwiML for this call- Returns:
- CallCreator capable of executing the create
-
creator
public static CallCreator creator(String pathAccountSid, Endpoint to, Endpoint from, String applicationSid)
Create a CallCreator to execute create.- Parameters:
pathAccountSid
- The SID of the Account that will create the resourceto
- Phone number, SIP address, or client identifier to callfrom
- Twilio number from which to originate the callapplicationSid
- The SID of the Application resource that will handle the call- Returns:
- CallCreator capable of executing the create
-
creator
public static CallCreator creator(Endpoint to, Endpoint from, String applicationSid)
Create a CallCreator to execute create.- Parameters:
to
- Phone number, SIP address, or client identifier to callfrom
- Twilio number from which to originate the callapplicationSid
- The SID of the Application resource that will handle the call- Returns:
- CallCreator capable of executing the create
-
deleter
public static CallDeleter deleter(String pathAccountSid, String pathSid)
Create a CallDeleter to execute delete.- Parameters:
pathAccountSid
- The SID of the Account that created the resource(s) to deletepathSid
- The unique string that identifies this resource- Returns:
- CallDeleter capable of executing the delete
-
deleter
public static CallDeleter deleter(String pathSid)
Create a CallDeleter to execute delete.- Parameters:
pathSid
- The unique string that identifies this resource- Returns:
- CallDeleter capable of executing the delete
-
fetcher
public static CallFetcher fetcher(String pathAccountSid, String pathSid)
Create a CallFetcher to execute fetch.- Parameters:
pathAccountSid
- The SID of the Account that created the resource(s) to fetchpathSid
- The unique string that identifies this resource- Returns:
- CallFetcher capable of executing the fetch
-
fetcher
public static CallFetcher fetcher(String pathSid)
Create a CallFetcher to execute fetch.- Parameters:
pathSid
- The unique string that identifies this resource- Returns:
- CallFetcher capable of executing the fetch
-
reader
public static CallReader reader(String pathAccountSid)
Create a CallReader to execute read.- Parameters:
pathAccountSid
- The SID of the Account that created the resource(s) to read- Returns:
- CallReader capable of executing the read
-
reader
public static CallReader reader()
Create a CallReader to execute read.- Returns:
- CallReader capable of executing the read
-
updater
public static CallUpdater updater(String pathAccountSid, String pathSid)
Create a CallUpdater to execute update.- Parameters:
pathAccountSid
- The SID of the Account that created the resource(s) to updatepathSid
- The unique string that identifies this resource- Returns:
- CallUpdater capable of executing the update
-
updater
public static CallUpdater updater(String pathSid)
Create a CallUpdater to execute update.- Parameters:
pathSid
- The unique string that identifies this resource- Returns:
- CallUpdater capable of executing the update
-
fromJson
public static Call fromJson(String json, com.fasterxml.jackson.databind.ObjectMapper objectMapper)
Converts a JSON String into a Call object using the provided ObjectMapper.- Parameters:
json
- Raw JSON StringobjectMapper
- Jackson ObjectMapper- Returns:
- Call object represented by the provided JSON
-
fromJson
public static Call fromJson(InputStream json, com.fasterxml.jackson.databind.ObjectMapper objectMapper)
Converts a JSON InputStream into a Call object using the provided ObjectMapper.- Parameters:
json
- Raw JSON InputStreamobjectMapper
- Jackson ObjectMapper- Returns:
- Call object represented by the provided JSON
-
getAccountSid
public final String getAccountSid()
Returns The The SID of the Account that created this resource.- Returns:
- The SID of the Account that created this resource
-
getAnnotation
public final String getAnnotation()
Returns The The annotation provided for the call.- Returns:
- The annotation provided for the call
-
getAnsweredBy
public final String getAnsweredBy()
Returns The Either `human` or `machine` if this call was initiated with answering machine detection. Empty otherwise..- Returns:
- Either `human` or `machine` if this call was initiated with answering machine detection. Empty otherwise.
-
getApiVersion
public final String getApiVersion()
Returns The The API Version used to create the call.- Returns:
- The API Version used to create the call
-
getCallerName
public final String getCallerName()
Returns The The caller's name if this call was an incoming call to a phone number with caller ID Lookup enabled. Otherwise, empty..- Returns:
- The caller's name if this call was an incoming call to a phone number with caller ID Lookup enabled. Otherwise, empty.
-
getDateCreated
public final org.joda.time.DateTime getDateCreated()
Returns The The RFC 2822 date and time in GMT that this resource was created.- Returns:
- The RFC 2822 date and time in GMT that this resource was created
-
getDateUpdated
public final org.joda.time.DateTime getDateUpdated()
Returns The The RFC 2822 date and time in GMT that this resource was last updated.- Returns:
- The RFC 2822 date and time in GMT that this resource was last updated
-
getDirection
public final String getDirection()
Returns The 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..- Returns:
- 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.
-
getDuration
public final String getDuration()
Returns The The length of the call in seconds..- Returns:
- The length of the call in seconds.
-
getEndTime
public final org.joda.time.DateTime getEndTime()
Returns The The end time of the call. Null if the call did not complete successfully..- Returns:
- The end time of the call. Null if the call did not complete successfully.
-
getForwardedFrom
public final String getForwardedFrom()
Returns The The forwarding phone number if this call was an incoming call forwarded from another number (depends on carrier supporting forwarding). Otherwise, empty..- Returns:
- The forwarding phone number if this call was an incoming call forwarded from another number (depends on carrier supporting forwarding). Otherwise, empty.
-
getFrom
public final String getFrom()
Returns The 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 `[email protected]`. Client identifiers are formatted `client:name`..- Returns:
- 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 `[email protected]`. Client identifiers are formatted `client:name`.
-
getFromFormatted
public final String getFromFormatted()
Returns The The calling phone number, SIP address, or Client identifier formatted for display..- Returns:
- The calling phone number, SIP address, or Client identifier formatted for display.
-
getGroupSid
public final String getGroupSid()
Returns The The Group SID associated with this call. If no Group is associated with the call, the field is empty..- Returns:
- The Group SID associated with this call. If no Group is associated with the call, the field is empty.
-
getParentCallSid
public final String getParentCallSid()
Returns The The SID that identifies the call that created this leg..- Returns:
- The SID that identifies the call that created this leg.
-
getPhoneNumberSid
public final String getPhoneNumberSid()
Returns The 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..- Returns:
- 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.
-
getPrice
public final BigDecimal getPrice()
Returns The The charge for this call, in the currency associated with the account. Populated after the call is completed. May not be immediately available..- Returns:
- The charge for this call, in the currency associated with the account. Populated after the call is completed. May not be immediately available.
-
getPriceUnit
public final Currency getPriceUnit()
Returns The The currency in which `Price` is measured..- Returns:
- The currency in which `Price` is measured.
-
getSid
public final String getSid()
Returns The The unique string that identifies this resource.- Returns:
- The unique string that identifies this resource
-
getStartTime
public final org.joda.time.DateTime getStartTime()
Returns The The start time of the call. Null if the call has not yet been dialed..- Returns:
- The start time of the call. Null if the call has not yet been dialed.
-
getStatus
public final Call.Status getStatus()
Returns The The status of this call..- Returns:
- The status of this call.
-
getSubresourceUris
public final Map<String,String> getSubresourceUris()
Returns The A list of related subresources identified by their relative URIs.- Returns:
- A list of related subresources identified by their relative URIs
-
getTo
public final String getTo()
Returns The 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 `[email protected]`. Client identifiers are formatted `client:name`..- Returns:
- 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 `[email protected]`. Client identifiers are formatted `client:name`.
-
getToFormatted
public final String getToFormatted()
Returns The The phone number, SIP address or Client identifier that received this call. Formatted for display..- Returns:
- The phone number, SIP address or Client identifier that received this call. Formatted for display.
-
getUri
public final String getUri()
Returns The The URI of this resource, relative to `https://api.twilio.com`.- Returns:
- The URI of this resource, relative to `https://api.twilio.com`
-
-