Exemplo n.º 1
0
 /**
  * Magic method to construct an options model or call an apimethod
  * @param $method
  * @param $args
  * @return mixed
  */
 public function __call($method, $args)
 {
     // If the method matches this signature instantiate the options
     if (preg_match('/^\\w+Options$/', $method)) {
         return $this->setOptionsObject($method, $args);
     }
     if ($method !== 'login' && !$this->apiClient->isAuthenticated()) {
         $this->apiClient->authenticate();
     }
     if ($this->usesAccountId) {
         array_unshift($args, $this->apiClient->getAccountId());
     }
     return call_user_func_array([$this->client, $method], $args);
 }
Exemplo n.º 2
0
 public function __construct(array $params = [])
 {
     $this->username = config('docusign.username');
     $this->password = config('docusign.password');
     $this->integrator_key = config('docusign.integrator_key');
     $this->host = config('docusign.host');
     parent::__construct($params);
 }