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