-
Notifications
You must be signed in to change notification settings - Fork 192
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
18 changed files
with
151 additions
and
110 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
<?php | ||
|
||
namespace Mollie\Api\EndpointCollection; | ||
|
||
use Mollie\Api\Exceptions\ApiException; | ||
use Mollie\Api\Helpers; | ||
use Mollie\Api\Http\Requests\GetOrganizationRequest; | ||
use Mollie\Api\Resources\Organization; | ||
|
||
class OrganizationEndpointCollection extends EndpointCollection | ||
{ | ||
/** | ||
* Retrieve an organization from Mollie. | ||
* | ||
* Will throw a ApiException if the organization id is invalid or the resource cannot be found. | ||
* | ||
* @param array|bool $testmode | ||
* | ||
* @throws ApiException | ||
*/ | ||
public function get(string $id, $testmode = []): Organization | ||
{ | ||
$testmode = Helpers::extractBool($testmode, 'testmode', false); | ||
|
||
/** @var Organization */ | ||
return $this->send(new GetOrganizationRequest($id, $testmode)); | ||
} | ||
|
||
/** | ||
* Retrieve the current organization from Mollie. | ||
* | ||
* @param array|bool $testmode | ||
* | ||
* @throws ApiException | ||
*/ | ||
public function current($testmode = []): Organization | ||
{ | ||
/** @var Organization */ | ||
return $this->get('me', $testmode); | ||
} | ||
} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.