/** * @throws CommunicationException * * @return Credit */ public function getCredit() { $options = ['query' => Out::attachAuth($this->account, [])]; if ($this->clientVersion == '5') { $request = $this->client->createRequest('GET', 'getCredit', $options); $response = Out::send($this->client, $request); } else { $request = new Request('GET', 'getCredit'); $response = Out::send($this->client, $request, $options); } return Parser::prepareCredit($response); }
/** * @return Credit * * @throws CommunicationException */ public function getCredit() { $request = $this->client->createRequest('GET', 'getCredit', ['query' => Out::attachAuth($this->account, [])]); $response = Out::send($this->client, $request); return Parser::prepareCredit($response); }