Class TransferAnswerCallback


  • @Generated(value="org.openapitools.codegen.languages.JavaClientCodegen",
               date="2023-02-21T09:43:53.001100-05:00[America/New_York]")
    public class TransferAnswerCallback
    extends Object
    When processing a <Transfer> verb, this event is sent when a called party (B-leg) answers. The event is sent to the endpoint specified in the transferAnswerUrl attribute of the <PhoneNumber> tag that answered. BXML returned by this callback will be executed for the called party only. After all BXML has been executed, the called party will be bridged to the original call. Most BXML verbs are allowed in response to a transferAnswer event, but some are not allowed.
    • Constructor Detail

      • TransferAnswerCallback

        public TransferAnswerCallback()
    • Method Detail

      • getEventType

        @Nullable
        public String getEventType()
        The event type, value can be one of the following: answer, bridgeComplete, bridgeTargetComplete, conferenceCreated, conferenceRedirect, conferenceMemberJoin, conferenceMemberExit, conferenceCompleted, conferenceRecordingAvailable, disconnect, dtmf, gather, initiate, machineDetectionComplete, recordingComplete, recordingAvailable, redirect, transcriptionAvailable, transferAnswer, transferComplete, transferDisconnect.
        Returns:
        eventType
      • setEventType

        public void setEventType​(String eventType)
      • getEventTime

        @Nullable
        public String getEventTime()
        The approximate UTC date and time when the event was generated by the Bandwidth server, in ISO 8601 format. This may not be exactly the time of event execution.
        Returns:
        eventTime
      • setEventTime

        public void setEventTime​(String eventTime)
      • getAccountId

        @Nullable
        public String getAccountId()
        The user account associated with the call.
        Returns:
        accountId
      • setAccountId

        public void setAccountId​(String accountId)
      • getApplicationId

        @Nullable
        public String getApplicationId()
        The id of the application associated with the call.
        Returns:
        applicationId
      • setApplicationId

        public void setApplicationId​(String applicationId)
      • getFrom

        @Nullable
        public String getFrom()
        The provided identifier of the caller: can be a phone number in E.164 format (e.g. +15555555555) or one of Private, Restricted, Unavailable, or Anonymous.
        Returns:
        from
      • setFrom

        public void setFrom​(String from)
      • getTo

        @Nullable
        public String getTo()
        The phone number that received the call, in E.164 format (e.g. +15555555555).
        Returns:
        to
      • setTo

        public void setTo​(String to)
      • getDirection

        @Nullable
        public CallDirectionEnum getDirection()
        Get direction
        Returns:
        direction
      • getCallId

        @Nullable
        public String getCallId()
        The call id associated with the event.
        Returns:
        callId
      • setCallId

        public void setCallId​(String callId)
      • getCallUrl

        @Nullable
        public String getCallUrl()
        The URL of the call associated with the event.
        Returns:
        callUrl
      • setCallUrl

        public void setCallUrl​(String callUrl)
      • getEnqueuedTime

        @Nullable
        public OffsetDateTime getEnqueuedTime()
        (optional) If call queueing is enabled and this is an outbound call, time the call was queued, in ISO 8601 format.
        Returns:
        enqueuedTime
      • setEnqueuedTime

        public void setEnqueuedTime​(OffsetDateTime enqueuedTime)
      • getStartTime

        @Nullable
        public OffsetDateTime getStartTime()
        Time the call was started, in ISO 8601 format.
        Returns:
        startTime
      • setStartTime

        public void setStartTime​(OffsetDateTime startTime)
      • getAnswerTime

        @Nullable
        public OffsetDateTime getAnswerTime()
        Time the call was answered, in ISO 8601 format.
        Returns:
        answerTime
      • setAnswerTime

        public void setAnswerTime​(OffsetDateTime answerTime)
      • getTag

        @Nullable
        public String getTag()
        (optional) The tag specified on call creation. If no tag was specified or it was previously cleared, this field will not be present.
        Returns:
        tag
      • setTag

        public void setTag​(String tag)
      • getTransferCallerId

        @Nullable
        public String getTransferCallerId()
        The phone number used as the from field of the B-leg call, in E.164 format (e.g. +15555555555) or one of Restricted, Anonymous, Private, or Unavailable.
        Returns:
        transferCallerId
      • setTransferCallerId

        public void setTransferCallerId​(String transferCallerId)
      • getTransferTo

        @Nullable
        public String getTransferTo()
        The phone number used as the to field of the B-leg call, in E.164 format (e.g. +15555555555).
        Returns:
        transferTo
      • setTransferTo

        public void setTransferTo​(String transferTo)
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object
      • validateJsonObject

        public static void validateJsonObject​(com.google.gson.JsonObject jsonObj)
                                       throws IOException
        Validates the JSON Object and throws an exception if issues found
        Parameters:
        jsonObj - JSON Object
        Throws:
        IOException - if the JSON Object is invalid with respect to TransferAnswerCallback
      • fromJson

        public static TransferAnswerCallback fromJson​(String jsonString)
                                               throws IOException
        Create an instance of TransferAnswerCallback given an JSON string
        Parameters:
        jsonString - JSON string
        Returns:
        An instance of TransferAnswerCallback
        Throws:
        IOException - if the JSON string is invalid with respect to TransferAnswerCallback
      • toJson

        public String toJson()
        Convert an instance of TransferAnswerCallback to an JSON string
        Returns:
        JSON string