. */ declare(strict_types=1); namespace FireflyIII\Services\Ynab\Request; use Log; /** * Class GetAccountsRequest */ class GetAccountsRequest extends YnabRequest { /** @var array */ public $accounts; /** @var string */ public $budgetId; /** * */ public function call(): void { Log::debug('Now in GetAccountsRequest::call()'); $uri = $this->api . sprintf('/budgets/%s/accounts', $this->budgetId); Log::debug(sprintf('URI is %s', $uri)); $result = $this->authenticatedGetRequest($uri, []); //Log::debug('Raw GetAccountsRequest result', $result); // expect data in [data][accounts] $this->accounts = $result['data']['accounts'] ?? []; } }