2017 © Pedro Peláez
 

library sdk

The Dial Once PHP SDK

image

dialonce/sdk

The Dial Once PHP SDK

  • Monday, July 11, 2016
  • by jkernech
  • Repository
  • 8 Watchers
  • 2 Stars
  • 7 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 3 Versions
  • 0 % Grown

The README.md

dialonce-sdk-php

Circle CI Coverage Sqale, (*1)

This git repository contains the Dial Once PHP SDK composer package., (*2)

Installation

composer require dialonce/sdk

Usage

IVR

For all of the IVR exposed method usage, you will need to instanciate an Application object using your api key and secret:, (*3)

<?php
$application = new DialOnce\Application('API_KEY', 'API_SECRET');

The code above will generate a token by calling our API. If your script is not persistant in memory or if you don't have APC, you may want to use a previously fetched token directly:, (*4)

<?php
$application = new DialOnce\Application('API_TOKEN');

Log a call step to Dial Once

To allow us to gather analytics, and provide you some important KPI info, we need to get some call steps from your IVR:, (*5)

<?php

$ivr = new DialOnce\IVR($application, $callerNumber, $calledNumber);

$ivr->log('call-start');
$ivr->log('call-end');
$ivr->log('call-error');
//etc.

$application: a DialOnce\Application object instance
$callerNumber: a string, the caller phone number (inter. format with leading +)
$calledNumber: a string, the IVR phone number that the user called (inter. format with leading +), (*6)

Check if a caller is eligible to use the Dial Once service

<?php
$ivr = new DialOnce\IVR($application, $callerNumber, $calledNumber);
if ( $ivr->isEligible() ) {

}

$application: a DialOnce\Application object instance
$callerNumber: a string, the caller phone number (inter. format with leading +)
$calledNumber: a string, the IVR phone number that the user called (inter. format with leading +), (*7)

The user requested the Dial Once service

<?php
$ivr = new DialOnce\IVR($application, $callerNumber, $calledNumber);
$ivr->serviceRequest();

$application: a DialOnce\Application object instance
$callerNumber: a string, the caller phone number (inter. format with leading +)
$calledNumber: a string, the IVR phone number that the user called (inter. format with leading +), (*8)

Check if the caller uses a mobile phone

<?php
$ivr = new DialOnce\IVR($application, $callerNumber, $calledNumber);
if ($ivr->isMobile()) {

}

$application: a DialOnce\Application object instance
$callerNumber: a string, the caller phone number (inter. format with leading +)
$calledNumber: a string, the IVR phone number that the user called (inter. format with leading +), (*9)

The Versions

11/07 2016

dev-master

9999999-dev https://github.com/dial-once/dialonce-sdk-php

The Dial Once PHP SDK

  Sources   Download

MIT

The Requires

  • php ^5.3.0 || ^7.0

 

The Development Requires

sdk dialonce

24/06 2016

dev-develop

dev-develop https://github.com/dial-once/dialonce-sdk-php

The Dial Once PHP SDK

  Sources   Download

MIT

The Requires

  • php ^5.3.0 || ^7.0

 

The Development Requires

sdk dialonce

24/06 2016

v0.1.0

0.1.0.0 https://github.com/dial-once/dialonce-sdk-php

The Dial Once PHP SDK

  Sources   Download

MIT

The Requires

  • php ^5.3.0 || ^7.0

 

The Development Requires

sdk dialonce