dropbox/sign 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

dropbox/sign

Composer 安装命令:

composer require dropbox/sign

包简介

Dropbox Sign v3 API

README 文档

README

Dropbox Sign v3 API

Migrating from legacy SDK

This SDK is generated from our officially maintained OpenAPI spec. We've made important updates that introduce new functionality and create feature parity between the Dropbox Sign API and the SDK. However, some of these changes are considered "breaking" in the sense that they'll require you to update your existing code in order to continue using the SDK. Please refer to this migration guide for more information.

Contributing

This repo is no longer accepting new issues or Pull Requests. All issues or Pull Requests must be opened against the hellosign/hellosign-openapi repo!

Changes to the SDK code

You must make SDK code changes in the mustache file within the templates directory that corresponds to the file you want updated.

We use OpenAPI Generator to automatically generate this SDK from the OAS, using the template files.

Building

You must have docker (or podman linked to docker) installed. Highly recommended to use rootless docker.

Run the following and everything is done for you:

./run-build

Attention: Any changes you have made to the SDK code that you have not made to the OAS file and/or the mustache template files will be lost when you run this command.

Installation & Usage

Requirements

PHP 7.4 and later.

Composer

To install the bindings via Composer, add the following to composer.json:

{
    "require": {
        "dropbox/sign": "^1.11.0"
    },
    "minimum-stability": "dev"
}

Then run composer install

Alternatively, install directly with

composer require dropbox/sign:^1.11.0

Getting Started

Please follow the installation procedure and then run the following:

<?php

namespace Dropbox\SignSandbox;

require_once __DIR__ . '/../vendor/autoload.php';

use SplFileObject;
use Dropbox;

$config = Dropbox\Sign\Configuration::getDefaultConfiguration();
$config->setUsername("YOUR_API_KEY");
// $config->setAccessToken("YOUR_ACCESS_TOKEN");

$account_create_request = (new Dropbox\Sign\Model\AccountCreateRequest())
    ->setEmailAddress("newuser@dropboxsign.com");

try {
    $response = (new Dropbox\Sign\Api\AccountApi(config: $config))->accountCreate(
        account_create_request: $account_create_request,
    );

    print_r($response);
} catch (Dropbox\Sign\ApiException $e) {
    echo "Exception when calling AccountApi#accountCreate: {$e->getMessage()}";
}

You may also instantiate objects by calling the class' ::init() method:

<?php

require_once __DIR__ . "/vendor/autoload.php";

$config = Dropbox\Sign\Configuration::getDefaultConfiguration();
$config->setUsername("YOUR_API_KEY");

$api = new Dropbox\Sign\Api\SignatureRequestApi($config);

$data = Dropbox\Sign\Model\SignatureRequestSendRequest::init([
    "title"   => "NDA with Acme Co.",
    "signers" => [
        [
            "email_address" => "jack@example.com",
            "name"          => "Jack",
            "order"         => 0,
        ],
        [
            "email_address" => "jill@example.com",
            "name"          => "Jill",
            "order"         => 1,
        ],
    ],
    "files"    => [
        new SplFileObject("/absolute/path/to/file.pdf"),
    ],
]);

try {
    $result = $api->signatureRequestSend($data);
    print_r($result);
} catch (Dropbox\Sign\ApiException $e) {
    echo "Exception when calling Dropbox Sign API: "
        . $e->getMessage() . PHP_EOL;
}

API Endpoints

All URIs are relative to https://api.hellosign.com/v3

Class Method HTTP request Description
AccountApi accountCreate POST /account/create Create Account
AccountApi accountGet GET /account Get Account
AccountApi accountUpdate PUT /account Update Account
AccountApi accountVerify POST /account/verify Verify Account
ApiAppApi apiAppCreate POST /api_app Create API App
ApiAppApi apiAppDelete DELETE /api_app/{client_id} Delete API App
ApiAppApi apiAppGet GET /api_app/{client_id} Get API App
ApiAppApi apiAppList GET /api_app/list List API Apps
ApiAppApi apiAppUpdate PUT /api_app/{client_id} Update API App
BulkSendJobApi bulkSendJobGet GET /bulk_send_job/{bulk_send_job_id} Get Bulk Send Job
BulkSendJobApi bulkSendJobList GET /bulk_send_job/list List Bulk Send Jobs
EmbeddedApi embeddedEditUrl POST /embedded/edit_url/{template_id} Get Embedded Template Edit URL
EmbeddedApi embeddedSignUrl GET /embedded/sign_url/{signature_id} Get Embedded Sign URL
FaxApi faxDelete DELETE /fax/{fax_id} Delete Fax
FaxApi faxFiles GET /fax/files/{fax_id} Download Fax Files
FaxApi faxGet GET /fax/{fax_id} Get Fax
FaxApi faxList GET /fax/list Lists Faxes
FaxApi faxSend POST /fax/send Send Fax
FaxLineApi faxLineAddUser PUT /fax_line/add_user Add Fax Line User
FaxLineApi faxLineAreaCodeGet GET /fax_line/area_codes Get Available Fax Line Area Codes
FaxLineApi faxLineCreate POST /fax_line/create Purchase Fax Line
FaxLineApi faxLineDelete DELETE /fax_line Delete Fax Line
FaxLineApi faxLineGet GET /fax_line Get Fax Line
FaxLineApi faxLineList GET /fax_line/list List Fax Lines
FaxLineApi faxLineRemoveUser PUT /fax_line/remove_user Remove Fax Line Access
OAuthApi oauthTokenGenerate POST /oauth/token OAuth Token Generate
OAuthApi oauthTokenRefresh POST /oauth/token?refresh OAuth Token Refresh
ReportApi reportCreate POST /report/create Create Report
SignatureRequestApi signatureRequestBulkCreateEmbeddedWithTemplate POST /signature_request/bulk_create_embedded_with_template Embedded Bulk Send with Template
SignatureRequestApi signatureRequestBulkSendWithTemplate POST /signature_request/bulk_send_with_template Bulk Send with Template
SignatureRequestApi signatureRequestCancel POST /signature_request/cancel/{signature_request_id} Cancel Incomplete Signature Request
SignatureRequestApi signatureRequestCreateEmbedded POST /signature_request/create_embedded Create Embedded Signature Request
SignatureRequestApi signatureRequestCreateEmbeddedWithTemplate POST /signature_request/create_embedded_with_template Create Embedded Signature Request with Template
SignatureRequestApi signatureRequestEdit PUT /signature_request/edit/{signature_request_id} Edit Signature Request
SignatureRequestApi signatureRequestEditEmbedded PUT /signature_request/edit_embedded/{signature_request_id} Edit Embedded Signature Request
SignatureRequestApi signatureRequestEditEmbeddedWithTemplate PUT /signature_request/edit_embedded_with_template/{signature_request_id} Edit Embedded Signature Request with Template
SignatureRequestApi signatureRequestEditWithTemplate PUT /signature_request/edit_with_template/{signature_request_id} Edit Signature Request With Template
SignatureRequestApi signatureRequestFiles GET /signature_request/files/{signature_request_id} Download Files
SignatureRequestApi signatureRequestFilesAsDataUri GET /signature_request/files_as_data_uri/{signature_request_id} Download Files as Data Uri
SignatureRequestApi signatureRequestFilesAsFileUrl GET /signature_request/files_as_file_url/{signature_request_id} Download Files as File Url
SignatureRequestApi signatureRequestGet GET /signature_request/{signature_request_id} Get Signature Request
SignatureRequestApi signatureRequestList GET /signature_request/list List Signature Requests
SignatureRequestApi signatureRequestReleaseHold POST /signature_request/release_hold/{signature_request_id} Release On-Hold Signature Request
SignatureRequestApi signatureRequestRemind POST /signature_request/remind/{signature_request_id} Send Request Reminder
SignatureRequestApi signatureRequestRemove POST /signature_request/remove/{signature_request_id} Remove Signature Request Access
SignatureRequestApi signatureRequestSend POST /signature_request/send Send Signature Request
SignatureRequestApi signatureRequestSendWithTemplate POST /signature_request/send_with_template Send with Template
SignatureRequestApi signatureRequestUpdate POST /signature_request/update/{signature_request_id} Update Signature Request
TeamApi teamAddMember PUT /team/add_member Add User to Team
TeamApi teamCreate POST /team/create Create Team
TeamApi teamDelete DELETE /team/destroy Delete Team
TeamApi teamGet GET /team Get Team
TeamApi teamInfo GET /team/info Get Team Info
TeamApi teamInvites GET /team/invites List Team Invites
TeamApi teamMembers GET /team/members/{team_id} List Team Members
TeamApi teamRemoveMember POST /team/remove_member Remove User from Team
TeamApi teamSubTeams GET /team/sub_teams/{team_id} List Sub Teams
TeamApi teamUpdate PUT /team Update Team
TemplateApi templateAddUser POST /template/add_user/{template_id} Add User to Template
TemplateApi templateCreate POST /template/create Create Template
TemplateApi templateCreateEmbeddedDraft POST /template/create_embedded_draft Create Embedded Template Draft
TemplateApi templateDelete POST /template/delete/{template_id} Delete Template
TemplateApi templateFiles GET /template/files/{template_id} Get Template Files
TemplateApi templateFilesAsDataUri GET /template/files_as_data_uri/{template_id} Get Template Files as Data Uri
TemplateApi templateFilesAsFileUrl GET /template/files_as_file_url/{template_id} Get Template Files as File Url
TemplateApi templateGet GET /template/{template_id} Get Template
TemplateApi templateList GET /template/list List Templates
TemplateApi templateRemoveUser POST /template/remove_user/{template_id} Remove User from Template
TemplateApi templateUpdateFiles POST /template/update_files/{template_id} Update Template Files
UnclaimedDraftApi unclaimedDraftCreate POST /unclaimed_draft/create Create Unclaimed Draft
UnclaimedDraftApi unclaimedDraftCreateEmbedded POST /unclaimed_draft/create_embedded Create Embedded Unclaimed Draft
UnclaimedDraftApi unclaimedDraftCreateEmbeddedWithTemplate POST /unclaimed_draft/create_embedded_with_template Create Embedded Unclaimed Draft with Template
UnclaimedDraftApi unclaimedDraftEditAndResend POST /unclaimed_draft/edit_and_resend/{signature_request_id} Edit and Resend Unclaimed Draft

Models

Authorization

api_key

  • Type: HTTP basic authentication

oauth2

  • Type: Bearer authentication (JWT)

Tests

To run the tests, use:

composer install
vendor/bin/phpunit

Author

apisupport@hellosign.com

About this package

This PHP package is automatically generated by the OpenAPI Generator project:

  • API version: 3.0.0
    • Package version: 1.11.0
    • Generator version: 7.12.0
  • Build package: org.openapitools.codegen.languages.PhpClientCodegen

dropbox/sign 适用场景与选型建议

dropbox/sign 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 438.71k 次下载、GitHub Stars 达 6, 最近一次更新时间为 2023 年 01 月 19 日, 在 PHP 生态内属于活跃度较高的组件。

它主要适用于以下技术方向: 「php」 「rest」 「api」 「sdk」 「openapi」 「hellosign」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。

我们在过去多个企业项目中使用过 dropbox/sign 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。

围绕 dropbox/sign 我们能提供哪些服务?
定制开发 / 二次开发

基于 dropbox/sign 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。

BUG 修复 & 性能优化

线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。

项目外包 & 长期维护

承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。

yvsm@zunyunkeji.com QQ:316430983 微信:yvsm316 西安尊云信息科技 · 专注 PHP / Go / 分布式系统研发

统计信息

  • 总下载量: 438.71k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 6
  • 点击次数: 33
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 6
  • Watchers: 5
  • Forks: 3
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2023-01-19