Skip to content

Commit

Permalink
Adding $options param to Accounts::list.
Browse files Browse the repository at this point in the history
  • Loading branch information
brentscheffler committed Feb 21, 2021
1 parent d50b3f0 commit e121a79
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/Resources/Accounts.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,14 @@ class Accounts extends AbstractResource
* Get all Accounts.
*
* @param string $access_token
* @param array<string,mixed> $options
* @return object
*/
public function list(string $access_token): object
public function list(string $access_token, array $options = []): object
{
$params = [
"access_token" => $access_token
"access_token" => $access_token,
"options" => (object) $options
];

return $this->sendRequest(
Expand Down
1 change: 1 addition & 0 deletions tests/AccountsTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ public function test_get_accounts(): void
$this->assertEquals("client_id", $response->params->client_id);
$this->assertEquals("secret", $response->params->secret);
$this->assertEquals("access_token", $response->params->access_token);
$this->assertEquals((object) [], $response->params->options);
}

public function test_get_identity(): void
Expand Down

0 comments on commit e121a79

Please sign in to comment.