accordous / fcanalise-sdk-php
A PHP SDK for the Fcanalise API
Fund package maintenance!
Accordous
Requires
- php: ^8.2
- fakerphp/faker: ^1.24
- illuminate/contracts: ^10.0||^11.0||^12.0
- illuminate/http: ^10.0||^11.0||^12.0
- illuminate/support: ^10.0||^11.0||^12.0
- spatie/laravel-package-tools: ^1.16
Requires (Dev)
- larastan/larastan: ^2.9||^3.0
- laravel/pint: ^1.14
- nunomaduro/collision: ^8.1.1||^7.10.0
- orchestra/testbench: ^10.0.0||^9.0.0||^8.22.0
- pestphp/pest: ^3.0
- pestphp/pest-plugin-arch: ^3.0
- pestphp/pest-plugin-laravel: ^3.0
- phpstan/extension-installer: ^1.3||^2.0
- phpstan/phpstan-deprecation-rules: ^1.1||^2.0
- phpstan/phpstan-phpunit: ^1.3||^2.0
- spatie/laravel-ray: ^1.35
- vlucas/phpdotenv: ^5.6
This package is not auto-updated.
Last update: 2025-04-23 23:09:58 UTC
README
A PHP SDK for the FC Análise API that provides tenant analysis and property rental services.
Requirements
- PHP 8.2 or higher
- Laravel 10.0 or higher
Installation
You can install the package via composer:
composer require accordous/fcanalise-sdk-php
Configuration
- Publish the configuration file:
php artisan vendor:publish --tag="fcanalise-config"
- Add the following variables to your
.env
file:
FCANALISE_BASE_URL=https://api.fichacertadigital.com.br FCANALISE_LOGIN=your_login FCANALISE_PASSWORD=your_password
Usage
Basic Setup
use Accordous\FcAnalise\FcAnalise; use Accordous\FcAnalise\Enums\PropertyType; use Accordous\FcAnalise\Enums\ApplicantType; use Accordous\FcAnalise\Enums\IncomeSource; // The client will automatically load configuration from .env $client = new FcAnalise(); // Or you can manually set the configuration $client = new FcAnalise( 'https://api.example.com', 'your_login', 'your_password' );
Creating a Solicitation
$response = $client->solicitation()->create([ 'produtos' => [1], // FC REPORT 'locacao' => [ 'codigo_imovel' => '#ABC1234', 'aluguel' => '5000', 'condominio' => '3500', 'iptu' => '100.50', 'tipo_imovel' => PropertyType::RESIDENTIAL, 'endereco' => [ 'cep' => '20751380', 'logradouro' => 'Rua Exemplo', 'bairro' => 'Centro', 'cidade' => 'São Paulo', 'uf' => 'SP', 'numero' => '123', 'complemento' => 'Sala 45' ] ], 'pretendente' => [ 'tipo_pretendente' => ApplicantType::TENANT, 'residir' => true, 'nome' => 'João Silva', 'cpf' => '12345678900', 'renda' => [ 'principal' => [ 'origem' => IncomeSource::PUBLIC_SERVANT_CLT, 'valor' => '5000' ], 'outra' => [ 'origem' => IncomeSource::RENTAL_INCOME, 'valor' => '3000' ] ] ] ]); // Returns: ['id' => 123, 'message' => 'Solicitação cadastrada']
Checking Solicitation Status
$status = $client->solicitation()->status(123); // Returns: ['status' => 'PENDING', 'message' => 'Análise em andamento']
Property Types
Available property types:
PropertyType::RESIDENTIAL
- Residential propertyPropertyType::NON_RESIDENTIAL
- Non-residential property
Applicant Types
Available applicant types:
ApplicantType::TENANT
- TenantApplicantType::GUARANTOR
- GuarantorApplicantType::TENANT_SPOUSE
- Tenant's spouseApplicantType::GUARANTOR_SPOUSE
- Guarantor's spouseApplicantType::OTHERS
- Others
Income Sources
Available income sources:
IncomeSource::NOT_INFORMED
(1)IncomeSource::PUBLIC_SERVANT_STATUTORY
(2)IncomeSource::PUBLIC_SERVANT_CLT
(3)IncomeSource::ENTREPRENEUR
(4)IncomeSource::FREELANCER
(5)IncomeSource::RETIRED_PENSIONER
(6)IncomeSource::RENTAL_INCOME
(7)IncomeSource::ALIMONY
(8)IncomeSource::INTERN_SCHOLARSHIP
(9)IncomeSource::PRIVATE_EMPLOYEE
(11)IncomeSource::MILITARY
(12)IncomeSource::CREDIT_CARD_LIMIT
(13)IncomeSource::OTHER
(14)IncomeSource::BANK_STATEMENT
(15)
Testing
composer test
License
The MIT License (MIT). Please see License File for more information.