src/SignatureRequestRecipient.php
public function create($options = [])
    {
        $params = $this->toArray($options);
        $recipients['recipients'] = [$params];

        $uri = $this->uri();
        $createResult = static::post($this->client, $uri, [
            'json' => $recipients,
        ]);

        if (isset($createResult['errors'])) {
            throw new ResponseException($createResult['errors']);
        }

        $recipientData = array_filter($createResult['recipients'], function ($recipient) use ($params) {
            return $recipient['email'] == $params['email'];
        });

        return $this->parseArray(array_pop($recipientData));
    }
public function create($options = [])
    {
        $params = $this->toArray($options);
        $recipients['recipients'] = [$params];

        $uri = $this->uri();
        $createResult = static::post($this->client, $uri, [
            'json' => $recipients,
        ]);

        if (isset($createResult['errors'])) {
            throw new ResponseException($createResult['errors']);
        }

        $recipientData = array_filter($createResult['recipients'], function ($recipient) use ($params) {
            return $recipient['email'] == $params['email'];
        });

        return $this->parseArray(array_pop($recipientData));
    }
public function create ( $ options = [ ] ) { $ params = $ this -> toArray ( $ options ) ; $ recipients [ 'recipients' ] = [ $ params ] ; $ uri = $ this -> uri ( ) ; $ createResult = static :: post ( $ this -> client , $ uri , [ 'json' => $ recipients , ] ) ; if ( isset ( $ createResult [ 'errors' ] ) ) { throw new ResponseException ( $ createResult [ 'errors' ] ) ; } $ recipientData = array_filter ( $ createResult [ 'recipients' ] , function ( $ recipient ) use ( $ params ) { return $ recipient [ 'email' ] == $ params [ 'email' ] ; } ) ; return $ this -> parseArray ( array_pop ( $ recipientData ) ) ; }
Returns created recipient info.
@param array $options
@return mixed
@throws ResponseException
Returns created recipient info .