Aller au contenu

omnisign/docusign Référence de l’API

Étage
Fournisseur · Omnisign
Version
1.x
Suite de conformité
non branchée
Vérifié en réel
Vérifié en partie
Licence
MIT
composer require omnisign/docusign:1.x-dev

Lue dans les fichiers PHP du paquet au commit 497cf974387b : ses espaces de noms, classes, interfaces et énumérations, leurs constantes, propriétés et méthodes publiques avec leur PHPDoc, et les options que prennent ses fabriques. Rien n’en est exécuté.

Omnisign\Docusign

  • Api class

    DocuSign's eSignature REST API v2.1, authenticated by the JWT grant: a JWT signed (RS256) with the integration's private key, for the user it acts as, exchanged at the account server for an access token - kept until a minute before it lapses. The account's base URI is the userinfo's when none is configured.

    6 methods · 1 property · 3 constants

  • DocusignGatewayFactory class

    DocuSign eSignature: envelopes, by e-mail or signed in the application's page, the JWT grant for an integration acting as one of the account's users.

    17 options · 1 method

Omnisign\Docusign\Action

  • AbstractAction class

    An action on DocuSign's eSignature REST API v2.1.

    1 method

  • CancelAction class

    PUT /envelopes/{id}, status "voided" with its reason (required by DocuSign).

    2 methods

  • CreateAction class

    POST /envelopes, status "created": the documents in base64 (documentId 1, 2...), the signers (recipientId 1, 2..., routingOrder their turn, clientUserId their key when they sign in the page) and their tabs.

    2 methods

  • DownloadAction class

    GET /envelopes/{id}/documents/combined (certificate=false) and /documents/certificate: the certificate of completion.

    2 methods

  • FetchAction class

    GET /envelopes/{id}?include=recipients.

    2 methods

  • NotifyAction class

    A Connect message (JSON): X-DocuSign-Signature-n checked, its event read.

    2 methods

  • RemindAction class

    PUT /envelopes/{id}/recipients?resend_envelope=true, with the signers who have not signed.

    2 methods

  • SendAction class

    PUT /envelopes/{id}, status "sent".

    2 methods

  • SigningUrlAction class

    POST /envelopes/{id}/views/recipient: a signing session for an embedded signer (the clientUserId the envelope was created with). Use it at once.

    2 methods

Omnisign\Docusign

Api class

final class Api Api.php:19

DocuSign's eSignature REST API v2.1, authenticated by the JWT grant: a JWT signed (RS256) with the integration's private key, for the user it acts as, exchanged at the account server for an access token - kept until a minute before it lapses. The account's base URI is the userinfo's when none is configured.

const PROVIDER = 'docusign'
const DEMO_OAUTH = 'account-d.docusign.com'
const OAUTH = 'account.docusign.com'
public readonly string $accountId

Api::__construct()

public function __construct(readonly HttpClientInterface $http, readonly string $integrationKey, readonly string $userId, readonly string $privateKey, public readonly string $accountId, ?string $baseUri = null, readonly string $oauthHost = self::DEMO_OAUTH, readonly array $hmacKeys = [], readonly ?\Closure $clock = null)

Api::json()

public function json(string $method, string $path, array $json = [], array $query = []): array

Api::file()

public function file(string $path, array $query = []): Answer

Api::envelopes()

public function envelopes(): string

Api::verify()

public function verify(string $body, array $signatures): array

A Connect message, its HMAC checked: X-DocuSign-Signature-1, -2... each the base64 HMAC-SHA-256 of the raw body under one of the account's Connect keys.

Api::assertion()

public function assertion(int $now): string

The JWT grant's assertion: RS256, for the user the integration acts as.

DocusignGatewayFactory class

final class DocusignGatewayFactory extends GatewayFactory DocusignGatewayFactory.php:34

DocuSign eSignature: envelopes, by e-mail or signed in the application's page, the JWT grant for an integration acting as one of the account's users.

options: integration_key: '%env(DOCUSIGN_INTEGRATION_KEY)%' # required: the app's client id user_id: '%env(DOCUSIGN_USER_ID)%' # required: the user it acts as (who consented once) private_key: '%env(DOCUSIGN_PRIVATE_KEY)%' # required: the RSA key's PEM, or its path account_id: '%env(DOCUSIGN_ACCOUNT_ID)%' # required: the API account id (GUID) sandbox: true # account-d.docusign.com and demo.docusign.net; false: production base_uri: ~ # https://demo.docusign.net/restapi; production: the userinfo's when left empty hmac_keys: '%env(default::DOCUSIGN_HMAC_KEYS)%' # Connect's HMAC keys, comma-separated: notify() checks X-DocuSign-Signature-n

Options

OptionDefault
sandboxtrue
base_urinull
hmac_keys[]
omnisign.capabilitiesnew Capabilities([Level::SIMPLE], embedded: true, ordered: true, identityCheck: false, thirdParty: true)
omnisign.apifunction (Config $c): Api { $sandbox = $c->bool('sandbox'); return new Api($this->http ?? HttpClient::create(), (string) $c['integration_key'], (stri…
omnisign.action.createnew CreateAction()
omnisign.action.sendnew SendAction()
omnisign.action.fetchnew FetchAction()
omnisign.action.remindnew RemindAction()
omnisign.action.cancelnew CancelAction()
omnisign.action.downloadnew DownloadAction()
omnisign.action.signing_urlnew SigningUrlAction()
omnisign.action.notifystatic fn(Config $c) => $c->list('hmac_keys') ? new NotifyAction() : null
integration_keyrequired
user_idrequired
private_keyrequired
account_idrequired

DocusignGatewayFactory::__construct()

public function __construct(readonly ?HttpClientInterface $http = null)

Omnisign\Docusign\Action

AbstractAction class

abstract class AbstractAction implements ActionInterface, ApiAwareInterface AbstractAction.php:15

An action on DocuSign's eSignature REST API v2.1.

AbstractAction::__construct()

public function __construct()

CancelAction class

final class CancelAction extends AbstractAction CancelAction.php:10

PUT /envelopes/{id}, status "voided" with its reason (required by DocuSign).

CancelAction::supports()

public function supports(Request $request): bool

CancelAction::execute()

public function execute(Request $request): void

CreateAction class

final class CreateAction extends AbstractAction CreateAction.php:18

POST /envelopes, status "created": the documents in base64 (documentId 1, 2...), the signers (recipientId 1, 2..., routingOrder their turn, clientUserId their key when they sign in the page) and their tabs.

CreateAction::supports()

public function supports(Request $request): bool

CreateAction::execute()

public function execute(Request $request): void

DownloadAction class

final class DownloadAction extends AbstractAction DownloadAction.php:11

GET /envelopes/{id}/documents/combined (certificate=false) and /documents/certificate: the certificate of completion.

DownloadAction::supports()

public function supports(Request $request): bool

DownloadAction::execute()

public function execute(Request $request): void

FetchAction class

final class FetchAction extends AbstractAction FetchAction.php:9

GET /envelopes/{id}?include=recipients.

FetchAction::supports()

public function supports(Request $request): bool

FetchAction::execute()

public function execute(Request $request): void

NotifyAction class

final class NotifyAction extends AbstractAction NotifyAction.php:11

A Connect message (JSON): X-DocuSign-Signature-n checked, its event read.

NotifyAction::supports()

public function supports(Request $request): bool

NotifyAction::execute()

public function execute(Request $request): void

RemindAction class

final class RemindAction extends AbstractAction RemindAction.php:10

PUT /envelopes/{id}/recipients?resend_envelope=true, with the signers who have not signed.

RemindAction::supports()

public function supports(Request $request): bool

RemindAction::execute()

public function execute(Request $request): void

SendAction class

final class SendAction extends AbstractAction SendAction.php:9

PUT /envelopes/{id}, status "sent".

SendAction::supports()

public function supports(Request $request): bool

SendAction::execute()

public function execute(Request $request): void

SigningUrlAction class

final class SigningUrlAction extends AbstractAction SigningUrlAction.php:14

POST /envelopes/{id}/views/recipient: a signing session for an embedded signer (the clientUserId the envelope was created with). Use it at once.

SigningUrlAction::supports()

public function supports(Request $request): bool

SigningUrlAction::execute()

public function execute(Request $request): void