src/index.js
/**
   *  Send SMS to the provided phone no.
   * @param {object} config
   * @param {object} config.to
   * @param {string} config.body
   * @param {string|undefined} config.from
   * @param {string|undefined} config.channel
   * @param {string|undefined} config.type
   */
Send SMS to the provided phone no.
Send SMS to the provided phone no .
async sendSms({ from, to, body, channel, type }) {
    const response = await this.client.post('/api/sms/send', {
      ...config,
      to,
      sms: body,
      api_key: this.apiKey,
      type: type || 'plain',
      from: from || this.defaultSenderId,
      channel: channel || 'generic',
    });
    return response.data;
  }
async sendSms ( { from , to , body , channel , type } ) { const response = await this . client . post ( '/api/sms/send' , { ... config , to , sms : body , api_key : this . apiKey , type : type || 'plain' , from : from || this . defaultSenderId , channel : channel || 'generic' , } ) ; return response . data ; }
Send SMS to the provided phone no.
Send SMS to the provided phone no .