antonmarin/amocrm

View on GitHub
src/Account/AccountsRepository.php

Summary

Maintainability
A
0 mins
Test Coverage
<?php

namespace amocrm\Account;

use amocrm\Repository;

class AccountsRepository extends Repository implements AccountsRepositoryInterface
{
    public function getCurrent()
    {
        $result = $this->getConnection()->sendRequest('GET', 'accounts/current');
        $account = new Account();
        $this->getMapper()->fillEntity($account, $result['account']);
        return $account;
    }
}