westonwatson / realtag
用于iLeads RealTag API的PHP客户端。
Requires (Dev)
- phpunit/phpunit: ^8.1
This package is auto-updated.
Last update: 2024-09-11 03:24:02 UTC
README
用于iLeads RealTag API的PHP客户端 (网站)
贡献
如果您想帮忙,请阅读贡献指南这里。所有Pull请求都需要至少一个项目所有者的批准。其他开发者的批准将有助于引起项目所有者的注意。这是促进重要且有益的变更的绝佳方式。
行为准则
请在此阅读我们的行为准则。
备注
- 如果您尚未使用自动加载器并且不需要手动要求类,RealTag PHP客户端将尝试使用Composer的自动加载器。因此,如果您不是通过Composer使用此库,请确保手动包含客户端类和辅助类(使用
require
、require_once
)。 - 您可以请求API响应的任何属性,realtag将在所有API响应部分(例如-属性、估计数据、没收等)中查找请求的属性。
- 如果配置不正确或请求了无效的属性属性,客户端库将触发PHP
E_USER_NOTICE
。 - PHP RealTag客户端默认为生产模式
$devMode == false
。如果您不想调用生产服务,请确保启用$devMode
。 - 如果您有任何问题或评论,请随时在Github上创建问题,或提交一个包含您建议的更改的pull请求。任何/所有帮助都备受赞赏!😃
可用属性
成功
错误
产品
版本
LeadID
请求
OriginalRequest (stdClass)
"FullName", "AddressLine1", "AddressLine2", "City", "State", "Zip", "ExternalID",
AllFields (stdClass)
"FullName", "AddressLine1", "City", "State", "Zip", "ExternalID", "AVM", "ConfidenceScore", "HighValue", "LowValue", "Value",
Foreclosure (stdClass)
"NODorForeclosure", "DefaultAmount", "DefaultDate",
Property (stdClass)
"IsHomeOwner", "OwnerName", "IsOwnerOccupied", "Address", "UnitNumber", "City", "State", "Zip", "APN", "County", "CensusTract", "FIPSCode", "FIPSCensusCombo", "PropertyUse", "LandUseDescription", "CountyUse", "StateLandUseDescription", "Bathrooms", "Bedrooms", "BasementSqFt", "Fireplaces", "CentralCooling", "ParkingType", "GarageSqFt", "GarageTotalCars", "LandValue", "LotAreaSqFt", "Pool", "TotalAssesedValueAmount", "RoofSurfaceDescription", "TotalLivingAreaSqFt", "GrossLivingAreaSqFt", "TotalAdjustmentLivingSqFt", "TotalRooms", "TotalStories", "YearBuilt", "Schooldistrict", "Realestatetotaltaxamount", "LastSaleDate", "LastSalePrice", "PricePerSquareFoot", "Improvementvalue", "Zoning", "Taxyear", "Totaltaxablevalueamount", "PhoneNumber", "MailingAddress", "MailingCity", "MailingState", "MailingPostalCode", "PlusFourPostalCode", "HouseNumber", "DirectionPrefix", "StreetName", "StreetSuffix", "DirectionSuffix", "ApartmentOrUnit", "SiteInfluenceDescription", "FloodZoneIdentifier", "RoofTypeDescription", "FoundationMaterialDescription", "ConditionsDescription", "ConstructionQualityTypeDescription", "OtherPropertyImprovementsDescription", "ExteriorWallsIdentifier", "ConstructionTypeDescription", "ImprovementValueAmount", "BasementType", "BasementDescription", "BasementFinishedAreaSqFt", "LenderName", "TitleCompanyName", "OpenLienAmount", "OpenLienCount", "LastLoanDate",
Liens (array)
"TransactionNumber", "TransactionType", "SaleDocumentNumberIdentifier", "SaleDeedTypeDescription", "SaleDeedTypeDamarCode", "SaleRecordingDate", "SaleDate", "OneSaleTypeDescription", "SaleStampAmount", "SalesPriceAmount", "SaleSellerName", "SaleBuyerNames", "SaleTitleCompanyName", "SaleTransferDocumentNumberIdentifier", "SaleOwnerTransferIndicator", "CorporateBuyer", "Borrower1Names", "VestingDescription", "LastSaleIndicator", "MortgageAmount",
估算数据 (stdClass)
"按揭期限", "按揭利率", "按揭还款额", "按揭月龄", "按揭余额", "贷款价值比", "股本",
示例
<?php
namespace Example\RealTagImplementation;
use westonwatson\realtag\RealTagHelper;
class RealTagUsage
{
const MY_API_TOKEN = 'bqJNaoN98hNx/wDFDcZUEjkdsnKJN87Y8BBH8D8SKzoyQ5iCHyzg==';
/**
* @var bool
*/
private $devMode = false;
/**
* @var RealTagHelper
*/
private $realtag;
/**
* @var \stdClass
*/
private $response;
/**
* RealTagUsage constructor.
*
* @param bool $devMode
*/
public function __construct($devMode = false)
{
$this->realtag = new RealTagHelper(self::MY_API_TOKEN, $devMode);
}
public function getHomeEquityInfo()
{
$this->realtag->setProperty([
"FullName" => "Barack Obama",
"AddressLine1" => "1600 Pennsylvania Ave., NW",
"City" => "Washington",
"State" => "DC",
"Zip" => "20500",
"ExternalID" => "change20500",
]);
}
public function showRoomCount()
{
echo "This property has {$this->realtag->Bedrooms} bedrooms and {$this->realtag->Bedrooms} bathrooms.\n";
}
public function showMortgageTerm()
{
echo "The owner of this property pays an estimated \${$this->realtag->MortgagePayment}, {$this->realtag->MortgageTerm} times a year.\n";
}
}
$realtagUsage = new RealTagUsage(true);
$realtagUsage->getHomeEquityInfo();
$realtagUsage->showMortgageTerm();
$realtagUsage->showRoomCount();