Skip to content

Commit

Permalink
Merge pull request #20 from bildvitta/feature/sys-typologies
Browse files Browse the repository at this point in the history
Sys typologies
  • Loading branch information
fabiomartins1 authored May 14, 2024
2 parents fe40dea + 9d07075 commit 763db11
Show file tree
Hide file tree
Showing 2 changed files with 53 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/Resources/SYS.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
use Bildvitta\IssSupernova\IssSupernova;
use Bildvitta\IssSupernova\Resources\SYS\Cadastral;
use Bildvitta\IssSupernova\Resources\SYS\CreditoVitta;
use Bildvitta\IssSupernova\Resources\SYS\Tipologias;
use stdClass;

class SYS
Expand Down Expand Up @@ -34,4 +35,9 @@ public function statusUnidade(string $unitUuid): stdClass
->throw()
->object();
}

public function tipologias(): Tipologias
{
return new Tipologias($this->issSupernova);
}
}
47 changes: 47 additions & 0 deletions src/Resources/SYS/Tipologias.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
<?php

namespace Bildvitta\IssSupernova\Resources\SYS;

use Bildvitta\IssSupernova\IssSupernova;
use stdClass;

class Tipologias
{
private IssSupernova $issSupernova;

public function __construct(IssSupernova $issSupernova)
{
$this->issSupernova = $issSupernova;
}

public function options(
string $realEstateDevelopmentUuid,
string $search = '',
array $ids = [],
int $limit = 12,
int $offset = 0
): stdClass {
$query = [
'real_estate_development_uuid' => $realEstateDevelopmentUuid,
'search' => $search,
'ids' => $ids,
'limit' => $limit,
'offset' => $offset
];

return $this->issSupernova
->request
->get('/sys/repasse/tipologias', $query)
->throw()
->object();
}

public function show(int $sysTypologyId): stdClass
{
return $this->issSupernova
->request
->get('/sys/repasse/tipologias/' . $sysTypologyId)
->throw()
->object();
}
}

0 comments on commit 763db11

Please sign in to comment.