Completed
Push — master ( 367642...b5a2de )
by Minas
01:34
created

Seller::balance()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 6

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 6
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 1
1
<?php
2
/**
3
 * EveryPay PHP Library
4
 */
5
6
namespace Everypay;
7
8
/**
9
 * Seller resource class.
10
 */
11
class Seller extends AbstractResource
12
{
13
    /**
14
     * API resource name.
15
     *
16
     * @var string
17
     */
18
    const RESOURCE_NAME = 'sellers';
19
20
    /**
21
     * Retrieve a seller's balance.
22
     * 
23
     * @param string|stdClass $token
24
     * 
25
     * @return stdClass
26
     */
27
    public static function balance($token)
28
    {
29
        $params = array('token_id' => $token);
30
31
        return self::invoke(__FUNCTION__, static::RESOURCE_NAME, $params);
32
    }
33
34
    /**
35
     * Not avalable for this resource.
36
     *
37
     * @throws Everypay\Exception\RuntimeException
38
     */
39
    public static function delete($token, array $params = array())
40
    {
41
        throw new Exception\RuntimeException(
42
            'Resource ' . ucfirst(static::RESOURCE_NAME) .
43
            ' does not support method ' . __METHOD__
44
        );
45
    }
46
}
47