Пример #1
0
 /**
  * @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);
 }
Пример #2
0
 /**
  * @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);
 }