conveylaw/portal-integration

PHP SDK,用于作为引荐者与Convey365面板管理门户集成

1.1 2021-05-20 11:29 UTC

This package is auto-updated.

Last update: 2024-09-20 18:23:44 UTC


README

这是Convey365面板管理门户引荐者API的PHP客户端实现。

您需要一个由我们的NBT或IT团队提供的私有API密钥。

安装

通过Composer

$ composer require conveylaw/PortalIntegration

如果您还没有配置自动加载,可能需要这样做

require_once('vendor/autoload.php');

使用方法

$options = new conveylaw\IntroducerApiOptions($YOUR_PRIVATE_FIRM_API_KEY);
$api = conveylaw\PortalIntegration::getInstance($options);

// If you have been assigned any cases outside of the API you can query for them using this call
$convApiExportNewCases = $api->listInstructedCases();
if(!empty($convApiExportNewCases->getExports())) {
    // Import the cases
    $api->confirm($convApiExportNewCases->exportId);
}

// This will give you an array of ConvApiObjects that are updates to the cases that are assigned to you
$convApiExportCaseUpdates = $api->listCaseUpdates();
if(!empty($convApiExportCaseUpdates->getExports())) {
    // Import the case updates
    $api->confirm($convApiExportNewCases->exportId);
}

// This will create a new case using the ConvApiObjects that you provide
$convApiObjectsArray = [];
$matter = new ConvSaleTransaction();
$matter->setIntroducerReference("YOUR_REF");
$address = new ConvAddress();
$address->setProperty("34");
$address->setStreet("Stow Hill");
$address->setTown("Newport");
$address->setPostcode("NP20 1JE");
$matter->setAddress($address);
$matter->setAmount(120000);
$matter->setTenure(ConvTenureType::FREEHOLD);
$matter->setMortgage(true);
array_push($convApiObjectsArray, $matter);

$client = new ConvClient();
$client->setIntroducerReference("YOUR_REF");
$clientAddress = new ConvAddress();
$clientAddress->setProperty("34");
$clientAddress->setStreet("Stow Hill");
$clientAddress->setTown("Newport");
$clientAddress->setPostcode("NP20 1JE");
$client->setAddress($clientAddress);
$client->setTitle("Mr");
$client->setForename("Test");
$client->setSurname("Client");
$client->setTelephone("Telephone");
$client->setEmail("test@testington.com");
$client->setMobile("07123456789");
array_push($convApiObjectsArray, $client);

$note = new ConvNote();
$note->setIntroducerReference("YOUR_REF");
$note->setAuthor("Bob Jones");
$note->setNote("This is a test note");
$note->setTransactionType(ConvTransactionType::SALE);
array_push($convApiObjectsArray, $note);

$matterRef = $api->importCase($convApiObjectsArray);
//store the returned matter reference

变更日志

有关最近更改的更多信息,请参阅变更日志

测试

$ composer test

安全性

如果您发现任何与安全性相关的问题,请通过ned@conveylaw.com发送电子邮件,而不是使用问题跟踪器。

致谢

许可

MIT许可(MIT)。有关更多信息,请参阅许可文件