Add Account Member Listing (#194)

This commit is contained in:
Phil Young
2021-10-11 01:42:54 +01:00
committed by GitHub
parent bf796b9ec8
commit 99d8cfb71c
3 changed files with 125 additions and 0 deletions

View File

@@ -31,4 +31,20 @@ class AccountMembers implements API
return $this->body->result;
}
public function listAccountMembers(string $accountId, int $page = 1, int $perPage = 20): \stdClass
{
$query = [
'page' => $page,
'per_page' => $perPage,
];
$zone = $this->adapter->get('accounts/' . $accountId . '/members', $query);
$this->body = json_decode($zone->getBody());
return (object)[
'result' => $this->body->result,
'result_info' => $this->body->result_info,
];
}
}