coriolis/sell-and-sign
Composer 安装命令:
composer require coriolis/sell-and-sign
包简介
A component to query the sell and sign API
README 文档
README
This package offers you some features in order to interact with the REST API of the SellAndSign group https://www.sellandsign.com
Installation with composer
composer require coriolis/sell-and-sign
The features
ContractLoader
- getContracts > Allows you to retrieve all the available contracts
- getContract > Allows you to retrieve a contract from its ID
- getContractorsAbout > Allows you to retrieve all the signatories of a contract
- closeTransaction > Used to close the transaction of a contract
FileLoader
- getFilesForContract
- loadFile
- getEvidences
- getContractFileSigned
- getCurrentDocumentForContract
MemberLoader
- getMembers
ContractLoader
use QH\Sellandsign\{ Configuration, ContractLoader, DTO\Request }; use Symfony\Component\HttpClient\HttpClient; //init the configuration $configuration = (new Configuration) ->setApiUrl("THE_API_URL") ->setHttpclient(HttpClient::create()) ->setToken("THE_TOEKN") ->setLicenseId("THE_LICENSE_ID"); $contractLoader = new ContractLoader($configuration); /** * Retrive all contract */ //You must provide an instance of Request $request = new Request; //this class offers you certain method to specify filters $contracts = $contractLoader->getContracts($request); //return an instance of ContractCollection /** * Retrieve a contract */ $contract = $contractLoader->getContract(1234); // return an instance of Contract or null
FileLoader
use QH\Sellandsign\{ Configuration, FileLoader }; use Symfony\Component\HttpClient\HttpClient; //init the configuration $configuration = (new Configuration) ->setApiUrl("THE_API_URL") ->setHttpclient(HttpClient::create()) ->setToken("THE_TOEKN") ->setLicenseId("THE_LICENSE_ID"); $fileLoader = new FileLoader($configuration); $fileContent = $this->fileLoader->getCurrentDocumentForContract(1234); //return the content of the file in string //You can write a file with the content $filename = "someName.pdf"; $pathOfDirectory = "/path/of/directory/"; $file = fopen($pathOfDirectory . $filename , 'w'); fwrite($file, $fileContent); fclose($fileHandler);
MemberLoader
use QH\Sellandsign\{ Configuration, MemberLoader, DTO\MemberRequest }; use Symfony\Component\HttpClient\HttpClient; //init the configuration $configuration = (new Configuration) ->setApiUrl("THE_API_URL") ->setHttpclient(HttpClient::create()) ->setToken("THE_TOEKN") ->setLicenseId("THE_LICENSE_ID"); $memberLoader = new MemberLoader($configuration); $request = new MemberRequest(); $members = $memberLoader->getMembers($request); //return an instance of MemberCollection //You can do a search, for example a search on an email //it will be necessary to modify the request $request = new MemberRequest(); $request->setSearchString("your-email@example.com"); $members = $memberLoader->getMembers($request); //return an instance of MemberCollection
统计信息
- 总下载量: 190
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 1
- 点击次数: 4
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2021-04-20