Overview

Namespaces

  • Angelfon
    • SDK
      • Exceptions
      • Http
      • Rest
        • Api
          • V099
            • User

Classes

  • Angelfon\SDK\Domain
  • Angelfon\SDK\Http\GuzzleClient
  • Angelfon\SDK\Http\Response
  • Angelfon\SDK\InstanceContext
  • Angelfon\SDK\InstanceResource
  • Angelfon\SDK\ListResource
  • Angelfon\SDK\Options
  • Angelfon\SDK\Page
  • Angelfon\SDK\Rest\Api
  • Angelfon\SDK\Rest\Api\V099
  • Angelfon\SDK\Rest\Api\V099\User\CallContext
  • Angelfon\SDK\Rest\Api\V099\User\CallInstance
  • Angelfon\SDK\Rest\Api\V099\User\CallList
  • Angelfon\SDK\Rest\Api\V099\User\CallOptions
  • Angelfon\SDK\Rest\Api\V099\User\CallPage
  • Angelfon\SDK\Rest\Api\V099\User\CreateCallOptions
  • Angelfon\SDK\Rest\Api\V099\User\CreateSmsOptions
  • Angelfon\SDK\Rest\Api\V099\User\ReadCallOptions
  • Angelfon\SDK\Rest\Api\V099\User\ReadSmsOptions
  • Angelfon\SDK\Rest\Api\V099\User\SmsContext
  • Angelfon\SDK\Rest\Api\V099\User\SmsInstance
  • Angelfon\SDK\Rest\Api\V099\User\SmsList
  • Angelfon\SDK\Rest\Api\V099\User\SmsOptions
  • Angelfon\SDK\Rest\Api\V099\User\SmsPage
  • Angelfon\SDK\Rest\Api\V099\UserContext
  • Angelfon\SDK\Rest\Api\V099\UserInstance
  • Angelfon\SDK\Rest\Client
  • Angelfon\SDK\Serialize
  • Angelfon\SDK\Values
  • Angelfon\SDK\Version
  • Angelfon\SDK\VersionInfo

Interfaces

  • Angelfon\SDK\Http\Client

Exceptions

  • Angelfon\SDK\Exceptions\AngelfonException
  • Angelfon\SDK\Exceptions\ConfigurationException
  • Angelfon\SDK\Exceptions\RestException
  • Overview
  • Namespace
  • Class
  1:   2:   3:   4:   5:   6:   7:   8:   9:  10:  11:  12:  13:  14:  15:  16:  17:  18:  19:  20:  21:  22:  23:  24:  25:  26:  27:  28:  29:  30:  31:  32:  33:  34:  35:  36:  37:  38:  39:  40:  41:  42:  43:  44:  45:  46:  47:  48:  49:  50:  51:  52:  53:  54:  55:  56:  57:  58:  59:  60:  61:  62:  63:  64:  65:  66:  67:  68:  69:  70:  71:  72:  73:  74:  75:  76:  77:  78:  79:  80:  81:  82:  83:  84:  85:  86:  87:  88:  89:  90:  91:  92:  93:  94:  95:  96:  97:  98:  99: 100: 101: 102: 103: 104: 105: 106: 107: 108: 109: 110: 111: 112: 113: 114: 115: 116: 117: 118: 119: 120: 121: 122: 123: 124: 125: 126: 127: 128: 129: 130: 131: 132: 133: 134: 135: 
<?php
namespace Angelfon\SDK\Rest\Api\V099\User;

use Angelfon\SDK\Options;
use Angelfon\SDK\Values;

abstract class SmsOptions
{
    /**
     *  Build filters for the API response according to the specified parameters
     * 
     * @param  string $recipient Filter by phone number
     * @param  string $batchId Filter by batch ID
     * @param  string $scheduledBefore Filters sms scheduled before the datetime specified
     * @param  string $scheduledAfter Filters sms scheduled after the datetime specified
     * @param  int $status Filters by call status (0 => pending, 1 => sended)
     * @return \Angelfon\SDK\Rest\Api\V099\User\ReadSmsOptions The builder for read sms options
     */
    public static function read($recipient = Values::NONE, $batchId = Values::NONE, 
                                                            $scheduledBefore = Values::NONE, $scheduledAfter = Values::NONE, 
                                                            $status = Values::NONE)
    {
        return new ReadSmsOptions(
            $recipient, 
            $batchId, 
            $startedBefore, 
            $startedAfter, 
            $scheduledBefore, 
            $scheduledAfter, 
            $status, 
            $answer
        );
    }

    /**
     *  Build options for a new Sms
     * 
     * @param  string $recipientName The name of the recipient
     * @param  string $body The content of the Sms. Maximum 160 ASCII characters.
     * @param  string $sendAt UTC time to schedule the Sms ie. '2017-05-15 14:15:00'
     * @param  string $batchId Add this Sms to a specific batch
     * @param  string $batchName Name this batch
     * @return \Angelfon\SDK\Rest\Api\V099\User\CreateSmsOptions The builder for create Sms options
     */
    public static function create($recipientName = Values::NONE, $body = Values::NONE, 
                                                                $sendAt = Values::NONE, $batchId = Values::NONE, 
                                                                $batchName = Values::NONE)
    {
        return new CreateSmsOptions(
            $recipientName, 
            $body, 
            $callAt,
            $batchId, 
            $batchName
        );
    }
}

class ReadSmsOptions extends Options
{
    public function __construct($recipient = Values::NONE, $batchId = Values::NONE, 
                                                            $scheduledBefore = Values::NONE, $scheduledAfter = Values::NONE, 
                                                            $status = Values::NONE)
    {
    $this->options['recipient'] = $recipient;
    $this->options['batchId'] = $batchId;
    $this->options['scheduledBefore'] = $scheduledBefore;
    $this->options['scheduledAfter'] = $scheduledAfter;
    $this->options['status'] = $status;
    }

    public function setRecipient($recipient)
    {
    $this->options['recipient'] = $recipient;
    }
    
    public function setBatchId($batchId)
    {
    $this->options['batchId'] = $batchId;
    }
    
    public function setScheduledBefore($datetime)
    {
    $this->options['scheduledBefore'] = $datetime;
    }
    
    public function setScheduledAfter($datetime)
    {
    $this->options['scheduledAfter'] = $datetime;
    }
    
    public function setStatus($status)
    {
    $this->options['status'] = $status;
    }
}

class CreateSmsOptions extends Options
{
    function __construct($recipientName = Values::NONE, $body = Values::NONE, $sendAt = Values::NONE, 
                                             $batchId = Values::NONE, $batchName = Values::NONE)
    {
    $this->options['recipientName'] = $recipientName;
    $this->options['body'] = $body;
    $this->options['sendAt'] = $sendAt;
    $this->options['batchId'] = $batchId;
    $this->options['batchName'] = $batchName;
    }
    
    public function setRecipientName($recipientName)
    {
    $this->options['recipientName'] = $recipientName;
    }

    public function setSendAt($sendAt)
    {
    $this->options['sendAt'] = $sendAt;
    }

    public function setBody($body)
    {
    $this->options['body'] = $body;
    }
    
    public function setBatchId($batch)
    {
    $this->options['batchId'] = $batch;
    }

    public function setBatchName($batchName)
    {
    $this->options['batchName'] = $batchName;
    }
}
API documentation generated by ApiGen