Skip to content

Commit

Permalink
Merge pull request #15 from bildvitta/feature/sales-integrations
Browse files Browse the repository at this point in the history
Add sales integrations endpoint
  • Loading branch information
paulodavanco authored May 26, 2022
2 parents 9431e98 + 9547225 commit 89dc758
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/Contracts/Resources/Programmatic/SaleContract.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,11 @@ interface SaleContract
*/
public const ENDPOINT_FIND_BY_UUID = self::ENDPOINT_PREFIX.'/%s';

/**
* @const string
*/
public const ENDPOINT_INTEGRATIONS = self::ENDPOINT_PREFIX.'/integrations';

/**
* @param string $uuid
*
Expand Down
10 changes: 10 additions & 0 deletions src/Resources/Programmatic/Sale.php
Original file line number Diff line number Diff line change
Expand Up @@ -39,4 +39,14 @@ public function find(string $uuid): object
{
return $this->programmatic->vendas->request->get(vsprintf(self::ENDPOINT_FIND_BY_UUID, [$uuid]))->throw()->object();
}

/**
* @param array $query
*
* @return object
*/
public function integrations(array $query = []): object
{
return $this->programmatic->vendas->request->get(self::ENDPOINT_INTEGRATIONS, $query)->throw()->object();
}
}

0 comments on commit 89dc758

Please sign in to comment.