Completed
Push — master ( 8e0025...04518a )
by
05:55
created

Account::fetch()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 4
rs 10
c 0
b 0
f 0
cc 1
eloc 2
nc 1
nop 0
1
<?php
2
3
/*
4
 * This file is part of the PhpMob package.
5
 *
6
 * (c) Ishmael Doss <[email protected]>
7
 *
8
 * For the full copyright and license information, please view the LICENSE
9
 * file that was distributed with this source code.
10
 */
11
12
namespace PhpMob\Omise\Api;
13
14
use PhpMob\Omise\Api;
15
use PhpMob\Omise\Domain\Account as Domain;
16
17
/**
18
 * @author Ishmael Doss <[email protected]>
19
 *
20
 * @see https://www.omise.co/account-api
21
 */
22
final class Account extends Api
23
{
24
    /**
25
     * @return Domain
26
     */
27
    public function fetch()
28
    {
29
        return $this->doRequest('GET', '/account');
30
    }
31
32
    /**
33
     * @param Domain $account
34
     */
35
    public function refresh(Domain $account)
36
    {
37
        $account->updateStore($this->fetch()->toArray());
38
    }
39
}
40