Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@
"php": "^8.2",
"guzzlehttp/guzzle": "^7.9",
"kelunik/link-header-rfc5988": "^1.0",
"saloonphp/pagination-plugin": "^2.2",
"saloonphp/rate-limit-plugin": "^2.0",
"saloonphp/saloon": "^3.10"
"saloonphp/pagination-plugin": "^2.2|^2.3",
"saloonphp/rate-limit-plugin": "^2.0|^2.5",
"saloonphp/saloon": "^3.10|^4.0"
},
"require-dev": {
"laravel/pint": "^1.17",
Expand Down
6 changes: 3 additions & 3 deletions src/Api/Administrations/GetAdministrationRequest.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,12 @@ public function __construct(
}

/**
* Returns the full URL to bypass the connector's base URL.
* The Administrations endpoint does not use an administration ID in the path.
* The Administrations endpoint does not use an administration ID in the path,
* so we navigate up from the connector's base URL (which includes the admin ID).
*/
public function resolveEndpoint(): string
{
return 'https://moneybird.com/api/v2/administrations/'.$this->id;
return '/../administrations/'.$this->id;
}

public function createDtoFromResponse(Response $response): Administration
Expand Down
6 changes: 3 additions & 3 deletions src/Api/Administrations/GetAdministrationsRequest.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,12 @@
class GetAdministrationsRequest extends BaseJsonGetRequest
{
/**
* Returns the full URL to bypass the connector's base URL.
* The Administrations endpoint does not use an administration ID in the path.
* The Administrations endpoint does not use an administration ID in the path,
* so we navigate up from the connector's base URL (which includes the admin ID).
*/
public function resolveEndpoint(): string
{
return 'https://moneybird.com/api/v2/administrations';
return '/../administrations';
}

public function createDtoFromResponse(Response $response): Administration
Expand Down
6 changes: 4 additions & 2 deletions src/Api/Support/BaseEndpoint.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@

namespace Sandorian\Moneybird\Api\Support;

use Saloon\Exceptions\Request\FatalRequestException;
use Saloon\Exceptions\Request\RequestException;
use Saloon\Http\Request;
use Saloon\PaginationPlugin\Paginator;
use Sandorian\Moneybird\Api\MoneybirdApiClient;
Expand All @@ -17,8 +19,8 @@ public function __construct(
/**
* @return mixed
*
* @throws \Saloon\Exceptions\Request\FatalRequestException
* @throws \Saloon\Exceptions\Request\RequestException
* @throws FatalRequestException
* @throws RequestException
*/
public function create(array $data): BaseDto
{
Expand Down
Loading