oscar-team/sproom
最新稳定版本:v1.0.5
Composer 安装命令:
composer require oscar-team/sproom
包简介
php sdk for sproom
README 文档
README
This is a PHP library for integrating Sproom apis
Installation
Use the package manager composer to install.
composer require oscar-team/sproom
Usage
require __DIR__ . '/vendor/autoload.php'; $client = new \OscarTeam\Sproom\SproomClient(token: 'token', environment: 'test');
Note: Please refer to offical documentation to check the paramets for the api's.
ChildCompany Apis
// Get the list of child companies $client->childCompanies()->list(); // Create new child company $client->childCompanies()->create($requestData); // Delete child company $client->childCompanies()->delete($childCompanyId); // Enroll child company $client->childCompanies()->enroll($requestData); // Get child company $client->childCompanies()->get($childCompanyId); // Get child company token $client->childCompanies()->getToken($childCompanyId);
Company Apis
// Search for a company in sproom $client->childCompanies()->search('DK:CVR:1234');
Document Apis
// List all the documents $client->documents()->list(); // Send document to sproom $client->documents()->send($filePath); // Update already sent document $client->documents()->update($documentId, []); // Get sent document format $client->documents()->getFormat($documentId, $format); // Set response for the document $client->documents()->setResponse($documentId, []); // Get response for the document $client->documents()->getResponse($documentId); // Set state of the document $client->documents()->setState($documentId, []); // Get state of the document $client->documents()->getState($documentId);
PeppolParticipantVerificarion Apis
// List all the verifications $client->peppolParticipantVerifications()->list(); // Initiate the verification $client->peppolParticipantVerifications()->initiate([]); // Get the verification $client->peppolParticipantVerifications()->get($verificationId); // Revoke the verification $client->peppolParticipantVerifications()->revoke($verificationId); // Download the verification document $client->peppolParticipantVerifications()->downloadDocument($verificationId, []); // Preview the verification document $client->peppolParticipantVerifications()->previewDocument([]);
Recipients Apis
// Check if the recipients can reveie the document $client->recipients()->check('DK:CVR:123'); // Bulk check $client->recipients()->bulkCheck([ 'DK:CVR:123' ]);
Webhook Apis
// List all the webhooks $client->webhooks()->list(); // Create new webhook $client->webhooks()->create($requestData); // Delete webhook $client->webhooks()->delete($webhookId); // Update webhook $client->webhooks()->update($requestData); // Get webhook $client->webhooks()->get($webhookId); // Test webhook $client->webhooks()->test($webhookId);
Response:
All the apis will return the Saloon response class use Saloon\Http\Response;. Please refer to the offical documentation of saloon for more details.
Contributing
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.
Please make sure to update tests as appropriate.
License
统计信息
- 总下载量: 5
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2024-02-19