PHPackages                             plekhub/pleksdk - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. plekhub/pleksdk

ActiveLibary[Utility &amp; Helpers](/categories/utility)

plekhub/pleksdk
===============

Pacote para auxilio no consumo de dados da plekhub

0901PHP

Since Feb 12Pushed 6y ago1 watchersCompare

[ Source](https://github.com/Plekhub/pleksdk)[ Packagist](https://packagist.org/packages/plekhub/pleksdk)[ RSS](/packages/plekhub-pleksdk/feed)WikiDiscussions master Synced 5d ago

READMEChangelogDependenciesVersions (1)Used By (0)

pleksdk
=======

[](#pleksdk)

SDK da integração com a API da plekhub

autenticação
============

[](#autenticação)

$autenticacao = new \\Plekhub\\Pleksdk\\Authentication\\Basic("usuario","secret");

Estados Civis / Listar todos os Estados Civis
=============================================

[](#estados-civis--listar-todos-os-estados-civis)

$getMartial = Plekhub\\Pleksdk\\Plekhub::getMaritalStatusMethod($autenticacao);

$teste = $getMartial-&gt;execute();

Estados Civis / Listar todos os Estados Civis - resposta
========================================================

[](#estados-civis--listar-todos-os-estados-civis---resposta)

```
array(7) {
  [0]=>
  object(Plekhub\Pleksdk\Entities\BasicEntity)#14 (2) {
    ["id":"Plekhub\Pleksdk\Entities\BasicEntity":private]=>
    int(1)
    ["name":"Plekhub\Pleksdk\Entities\BasicEntity":private]=>
    string(8) "Solteiro"
  }
  [1]=>
  object(Plekhub\Pleksdk\Entities\BasicEntity)#15 (2) {
    ["id":"Plekhub\Pleksdk\Entities\BasicEntity":private]=>
    int(2)
    ["name":"Plekhub\Pleksdk\Entities\BasicEntity":private]=>
    string(6) "Casado"
  }
  [2]=>
  object(Plekhub\Pleksdk\Entities\BasicEntity)#16 (2) {
    ["id":"Plekhub\Pleksdk\Entities\BasicEntity":private]=>
    int(3)
    ["name":"Plekhub\Pleksdk\Entities\BasicEntity":private]=>
    string(8) "Amasiado"
  }
}
```

Tipos de Pessoa/Listar todos os Tipos de Pessoa
===============================================

[](#tipos-de-pessoalistar-todos-os-tipos-de-pessoa)

$personType = Plekhub\\Pleksdk\\Plekhub::getPersonTypeMethod($autenticacao);

$teste = $personType-&gt;execute();

Tipos de Pessoa/Listar todos os Tipos de Pessoa - resposta
==========================================================

[](#tipos-de-pessoalistar-todos-os-tipos-de-pessoa---resposta)

```
array(2) {
  [0]=>
  object(Plekhub\Pleksdk\Entities\BasicEntity)#9 (2) {
    ["id":"Plekhub\Pleksdk\Entities\BasicEntity":private]=>
    int(1)
    ["name":"Plekhub\Pleksdk\Entities\BasicEntity":private]=>
    string(7) "Física"
  }
  [1]=>
  object(Plekhub\Pleksdk\Entities\BasicEntity)#10 (2) {
    ["id":"Plekhub\Pleksdk\Entities\BasicEntity":private]=>
    int(2)
    ["name":"Plekhub\Pleksdk\Entities\BasicEntity":private]=>
    string(9) "Jurídica"
  }
}
```

Seguro Fiança com Identificador/Calcular Seguro Fiança com Identificador
========================================================================

[](#seguro-fiança-com-identificadorcalcular-seguro-fiança-com-identificador)

```
$postInsuranceGuaranteeWithIdentifierMethod = Plekhub\Pleksdk\Plekhub::postInsuranceGuaranteeWithIdentifierMethod($autenticacao);
$postInsuranceGuaranteeWithIdentifierMethod->propety()
        ->setAddress("Rua falsa 123")
        ->setTypeId(1)
        ->setReasonRentId(1)
        ->setCep(74938120)
        ->setRentValue(600)
        ->setCondominumValue(0)
        ->setElectricalValue(0)
        ->setIptuValue(20)
        ->setWaterValue(0)
        ->setGasValue(0)
        ->setStreetTypeId(1)
        ->setNeighborhood("bairro")
        ->setCoverageInnerPainting(0)
        ->setCoverageOuterPainting(0)
        ->setCoveragePropertyDamage(0)
        ->setCoverageContractTerminationFine(0)
        ->setReadjustmentIndexId(1)
        ->setValidityDuration(30);
$postInsuranceGuaranteeWithIdentifierMethod->addRenter()
        ->setCpf(00000000000)
        ->setName("fulano de tal")
        ->setBirthday("1993-11-25")
        ->setEmanciped(0)
        ->setPhoneDdd(62)
        ->setPhoneNumber(33333333)
        ->setMaritalStatusId(1)
        ->setEmail("fulano@hotmail.com")
        ->setEmploymentBondId(1)
        ->setResidenceCep(74030100)
        ->setCellphoneDdd(62)
        ->setCellphoneNumber(99999999)
        ->setOtherIncomes(0)
        ->setPublicPerson(0)
        ->setCompanyPhoneDdd(62)
        ->setCompanyPhoneNumber(333333333)
        ->setCompanyName("plek")
        ->setResidentCountry("Brasil");
$teste = $postInsuranceGuaranteeWithIdentifierMethod->execute();
```

Seguro Fiança com Identificador/Calcular Seguro Fiança com Identificador - resposta
===================================================================================

[](#seguro-fiança-com-identificadorcalcular-seguro-fiança-com-identificador---resposta)

```
array(1) {
  ["PortoSeguro"]=>
  object(Plekhub\Pleksdk\Entities\BudgetsEntity)#14 (5) {
    ["insuranceCompany":"Plekhub\Pleksdk\Entities\BudgetsEntity":private]=>
    string(11) "PortoSeguro"
    ["id":"Plekhub\Pleksdk\Entities\BudgetsEntity":private]=>
    int(1)
    ["coverage":"Plekhub\Pleksdk\Entities\BudgetsEntity":private]=>
    object(Plekhub\Pleksdk\Entities\CoverageEntity)#15 (6) {
      ["rent":"Plekhub\Pleksdk\Entities\CoverageEntity":private]=>
      int(600)
      ["condominium":"Plekhub\Pleksdk\Entities\CoverageEntity":private]=>
      int(0)
      ["eletric":"Plekhub\Pleksdk\Entities\CoverageEntity":private]=>
      int(0)
      ["iptu":"Plekhub\Pleksdk\Entities\CoverageEntity":private]=>
      int(0)
      ["water":"Plekhub\Pleksdk\Entities\CoverageEntity":private]=>
      int(0)
      ["gas":"Plekhub\Pleksdk\Entities\CoverageEntity":private]=>
      int(0)
    }
    ["prize":"Plekhub\Pleksdk\Entities\BudgetsEntity":private]=>
    object(Plekhub\Pleksdk\Entities\PrizeEntity)#16 (5) {
      ["emergencyValue":"Plekhub\Pleksdk\Entities\PrizeEntity":private]=>
      int(0)
      ["netValue":"Plekhub\Pleksdk\Entities\PrizeEntity":private]=>
      int(0)
      ["policyCost":"Plekhub\Pleksdk\Entities\PrizeEntity":private]=>
      int(0)
      ["iofValue":"Plekhub\Pleksdk\Entities\PrizeEntity":private]=>
      int(0)
      ["total":"Plekhub\Pleksdk\Entities\PrizeEntity":private]=>
      int(0)
    }
    ["installmentPlans":"Plekhub\Pleksdk\Entities\BudgetsEntity":private]=>
    array(1) {
      [0]=>
      object(Plekhub\Pleksdk\Entities\InstallmentPlansEntity)#17 (12) {
        ["id":"Plekhub\Pleksdk\Entities\InstallmentPlansEntity":private]=>
        int(0)
        ["paymentType":"Plekhub\Pleksdk\Entities\InstallmentPlansEntity":private]=>
        string(6) "BOLETO"
        ["description":"Plekhub\Pleksdk\Entities\InstallmentPlansEntity":private]=>
        string(6) "BOLETO"
        ["installmentQuantity":"Plekhub\Pleksdk\Entities\InstallmentPlansEntity":private]=>
        int(1)
        ["firstInstallmentValue":"Plekhub\Pleksdk\Entities\InstallmentPlansEntity":private]=>
        int(0)
        ["remainingInstallmentsValue":"Plekhub\Pleksdk\Entities\InstallmentPlansEntity":private]=>
        int(0)
        ["interestValue":"Plekhub\Pleksdk\Entities\InstallmentPlansEntity":private]=>
        int(0)
        ["chargeValue":"Plekhub\Pleksdk\Entities\InstallmentPlansEntity":private]=>
        int(0)
        ["policyValue":"Plekhub\Pleksdk\Entities\InstallmentPlansEntity":private]=>
        int(0)
        ["iofValue":"Plekhub\Pleksdk\Entities\InstallmentPlansEntity":private]=>
        int(0)
        ["interestTax":"Plekhub\Pleksdk\Entities\InstallmentPlansEntity":private]=>
        int(0)
        ["totalValue":"Plekhub\Pleksdk\Entities\InstallmentPlansEntity":private]=>
        int(0)
      }
    }
  }
}
```

Contratar/Realizar Contratação
==============================

[](#contratarrealizar-contratação)

```
$postContractMethod = Plekhub\Pleksdk\Plekhub::postContractMethod($autenticacao);
$postContractMethod->setBudget(1);
$postContractMethod->setChoosenPlan(0);
$postContractMethod->setInsuranceCompany("PortoSeguro");

$postContractMethod->landLord()
        ->setAddress("rua falsa 123")
        ->setAddressComplement("")
        ->setAddressNumber(1)
        ->setBirthday("1993-11-25")
        ->setCep(74000000)
        ->setCity("Goiania")
        ->setCpf("00000000000")
        ->setEmail("cleomar@plek.com.br")
        ->setName("fulano de tal")
        ->setNeighborhood("bairro")
        ->setPersonTypeId(1)
        ->setPhone(62333633333)
        ->setProfession(1)
        ->setPublicPerson(0)
        ->setResidentCountry("Brasil")
        ->setStreetTypeId(1);
$teste = $postContractMethod->execute();
```

Contratar/Realizar Contratação - resposta
=========================================

[](#contratarrealizar-contratação---resposta)

bool(true)

exceções
========

[](#exceções)

Plekhub\\Pleksdk\\Exceptions\\ValidationException -&gt; falha da validação da entidade enviada
Plekhub\\Pleksdk\\Exceptions\\AuthenticationException -&gt; falha na autenticação
Plekhub\\Pleksdk\\Exceptions\\RequisitionException -&gt; falha no servidor

###  Health Score

19

—

LowBetter than 10% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity10

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity34

Early-stage or recently created project

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

### Community

Maintainers

![](https://www.gravatar.com/avatar/359b82f6cc73d8081f13064e894f6dd21a8c225fd7dcdde49330be03937eb642?d=identicon)[cleomar](/maintainers/cleomar)

---

Top Contributors

[![Plekhub](https://avatars.githubusercontent.com/u/59475544?v=4)](https://github.com/Plekhub "Plekhub (37 commits)")

### Embed Badge

![Health badge](/badges/plekhub-pleksdk/health.svg)

```
[![Health](https://phpackages.com/badges/plekhub-pleksdk/health.svg)](https://phpackages.com/packages/plekhub-pleksdk)
```

###  Alternatives

[rs/laravel-version-control

Foundations for making your app version controlled. Provides migration, blueprint and base models. Will make your app GxP compliant if you exclusively use the VC models and table structure as set out in this package.

1227.5k](/packages/rs-laravel-version-control)[mad-web/laravel-seoable

Easy to map your eloquent fields to seo properties

407.6k](/packages/mad-web-laravel-seoable)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
