All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.bandwidth.voice.bxml.verbs.PhoneNumber Maven / Gradle / Ivy

Go to download

The official client SDK for Bandwidth's Voice, Messaging, MFA, and WebRTC APIs

There is a newer version: 12.0.0
Show newest version

package com.bandwidth.voice.bxml.verbs;

import lombok.Builder;

import java.net.URI;

import javax.xml.bind.annotation.XmlAttribute;
import javax.xml.bind.annotation.XmlType;
import javax.xml.bind.annotation.XmlValue;

/**
 * Object representation of a Phonenumber
 */
@Builder
@XmlType(name = PhoneNumber.TYPE_NAME)
public class PhoneNumber {
    public static final String TYPE_NAME = "PhoneNumber";

    /**
     * The phone number that will be the text content of the  tag
     */
    @XmlValue
    private String phoneNumber;

    /**
     * (optional) URL, if any, to send the Transfer Answer event to and request BXML to be executed for the called party before the call is bridged
     */
    @XmlAttribute
    private URI transferAnswerUrl;

    /**
     * (optional) The HTTP method to use for the request to transferAnswerMethod . GET or POST. Default value is POST.
     */
    @XmlAttribute
    private Method transferAnswerMethod;

    /**
     * (optional) URL, if any, to send the Transfer Disconnect event to and request BXML to be executed for the called party before the call is bridged
     */
    @XmlAttribute
    private URI transferDisconnectUrl ;

    /**
     * (optional) URL, if any, to send the Transfer Answer event to and request BXML to be executed for the called party before the call is bridged
     */
    @XmlAttribute
    private Method transferDisconnectMethod  ;

    /**
     * (optional)  The username to send in the HTTP request to transferAnswerUrl.
     */
    @XmlAttribute
    protected String username;

    /**
     * (optional) The password to send in the HTTP request to transferAnswerUrl.
     */
    @XmlAttribute
    protected String password;

    /**
     * (optional) A custom string that will be sent with this and all future callbacks unless overwritten by a future tag attribute or cleared.
     * 
* May be cleared by setting tag="" *
* Max length 256 characters. */ @XmlAttribute private String tag; @XmlAttribute protected String fallbackUsername; @XmlAttribute protected String fallbackPassword; @XmlAttribute protected URI transferAnswerFallbackUrl; @XmlAttribute protected Method transferAnswerFallbackMethod; public static class PhoneNumberBuilder{ /** * (optional) The HTTP method to use for the request to transferAnswerUrl. GET or POST. Default value is POST. */ public PhoneNumberBuilder transferAnswerUrl(String uri){ return this.transferAnswerUrl(URI.create(uri)); } /** * (optional) The HTTP method to use for the request to transferAnswerUrl. GET or POST. Default value is POST. */ public PhoneNumberBuilder transferAnswerUrl(URI uri){ this.transferAnswerUrl = uri; return this; } public PhoneNumberBuilder transferAnswerFallbackUrl(String uri){ return this.transferAnswerFallbackUrl(URI.create(uri)); } public PhoneNumberBuilder transferAnswerFallbackUrl(URI uri){ this.transferAnswerFallbackUrl = uri; return this; } public PhoneNumberBuilder transferAnswerFallbackMethod(String method){ return this.transferAnswerFallbackMethod(Method.fromValue(method)); } public PhoneNumberBuilder transferAnswerFallbackMethod(Method method){ this.transferAnswerFallbackMethod = method; return this; } /** * (optional) The HTTP method to use for the request to transferDisconnectUrl . GET or POST. Default value is POST. */ public PhoneNumberBuilder transferDisconnectUrl (String uri){ return this.transferDisconnectUrl (URI.create(uri)); } /** * (optional) The HTTP method to use for the request to transferDisconnectUrl . GET or POST. Default value is POST. */ public PhoneNumberBuilder transferDisconnectUrl (URI uri){ this.transferDisconnectUrl = uri; return this; } /** * (optional) The HTTP method to use for the request to transferAnswerUrl. GET or POST. Default value is POST. */ public PhoneNumberBuilder transferAnswerMethod(String method){ return this.transferAnswerMethod(Method.fromValue(method)); } /** * (optional) The HTTP method to use for the request to transferAnswerUrl. GET or POST. Default value is POST. */ public PhoneNumberBuilder transferAnswerMethod(Method method){ this.transferAnswerMethod = method; return this; } /** * (optional) The HTTP method to use for the request to transferDisconnectUrl. GET or POST. Default value is POST. */ public PhoneNumberBuilder transferDisconnectMethod (String method){ return this.transferDisconnectMethod (Method.fromValue(method)); } /** * (optional) The HTTP method to use for the request to transferDisconnectUrl. GET or POST. Default value is POST. */ public PhoneNumberBuilder transferDisconnectMethod (Method method){ this.transferDisconnectMethod = method; return this; } } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy