Completed
Push — master ( 2c3182...70677e )
by Juliano
02:18
created

ProductPriceTable::paginate()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 0
Metric Value
dl 0
loc 4
ccs 2
cts 2
cp 1
rs 10
c 0
b 0
f 0
cc 1
eloc 2
nc 1
nop 1
crap 1
1
<?php
2
3
namespace JulianoBailao\DomusApi\Endpoints\Secondary;
4
5
use JulianoBailao\DomusApi\Contracts\GetContract;
6
use JulianoBailao\DomusApi\Core\Endpoint;
7
8
class ProductPriceTable extends Endpoint implements GetContract
9
{
10
    /**
11
     * Get a page of models list.
12
     *
13
     * @param array $query the request query string.
14
     *
15
     * @return stdObject
16
     */
17 3
    public function paginate(array $query = [])
18
    {
19 3
        return $this->page('pedidovenda-rest/produtos', $query);
20
    }
21
22
    /**
23
     * Get a specific model.
24
     *
25
     * @param int $id the model id.
26
     *
27
     * @return stdObject
28
     */
29 3
    public function get($id)
30
    {
31 3
        return $this->run('GET', 'pedidovenda-rest/produtos/'.$id);
32
    }
33
}
34