twilio-sdk

Class TwilioClient

lucee.Component
    extended by twilio-sdk.TwilioClient

Interact with the Twilio API

Class Attributes:
  • singleton
  •  
  • synchronized : false
  •  
  • accessors : true
  •  
  • persistent : false
  •  
    Property Summary
    type property default serializable required
    any accountSID
          The configured account SID.

    • access = public
    • returntype = any
    • inject = coldbox:setting:accountSID@twilio-sdk
    true false
    any hyperClient
          A configured HyperBuilder client to use with the Twilio API.

    • access = public
    • returntype = any
    • inject = TwilioHyperClient@twilio-sdk
    true false
    Method Summary
    string getAccountSID()
    string getHyperClient()
    any lookup([any phoneNumber], [any withCallerName='false'], [any addons='[runtime expression]'])
         Look up information about a phone number.
    any newRequest()
    any onMissingMethod([any missingMethodName], [any missingMethodArguments])
    any setAccountSID(any accountSID)
    any setHyperClient(any hyperClient)
    any sms([any to], [any from], [any body])
         Send an sms message.
     
    Methods inherited from class lucee.Component
    None

    Property Detail

    accountSID

    property any accountSID

    The configured account SID. This can be overridden for subaccounts.

    Attributes:
    access - public
    required - false
    returntype - any
    inject - coldbox:setting:accountSID@twilio-sdk
    serializable - true

    hyperClient

    property any hyperClient

    A configured HyperBuilder client to use with the Twilio API. This is handled for you when using as a ColdBox module.

    Attributes:
    access - public
    required - false
    returntype - any
    inject - TwilioHyperClient@twilio-sdk
    serializable - true

    Method Detail

    getAccountSID

    public string getAccountSID()


    getHyperClient

    public string getHyperClient()


    lookup

    public any lookup([any phoneNumber], [any withCallerName='false'], [any addons='[runtime expression]'])

    Look up information about a phone number. (This costs extra.) Default: false. | in the response. (This may cost extra.)

    Parameters:
    phoneNumber - The phone number to look up. |
    withCallerName - Should caller information be included in the response.
    addons - An optional array of addons to process and include

    newRequest

    public any newRequest()


    onMissingMethod

    public any onMissingMethod([any missingMethodName], [any missingMethodArguments])

    Parameters:
    missingMethodName
    missingMethodArguments

    setAccountSID

    public any setAccountSID(any accountSID)

    Parameters:
    accountSID

    setHyperClient

    public any setHyperClient(any hyperClient)

    Parameters:
    hyperClient

    sms

    public any sms([any to], [any from], [any body])

    Send an sms message. This must be a valid Twilio number.

    Parameters:
    to - The phone number the sms is going to.
    from - The phone number the sms is from.
    body - The body of the sms message.