Passed
Push — master ( fd49ce...ffd082 )
by Radu
02:08
created

Shipment::getService()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 1
nc 1
nop 0
dl 0
loc 3
rs 10
c 0
b 0
f 0
1
<?php
2
namespace ParcelValue\Api\JsonApi\ResourceObjects;
3
4
class Shipment extends \WebServCo\Api\JsonApi\AbstractResourceObject
5
{
6
    const TYPE = 'shipment';
7
    const DATE_FORMAT = 'Y-m-d';
8
    const SERVICE_ECONOMY = 'economy';
9
    const SERVICE_EXPRESS = 'express';
10
    const CURRENCY_EUR = 'EUR';
11
12
    public function __construct($id = null)
13
    {
14
        parent::__construct();
15
        $this->setId($id);
16
        $this->setType(self::TYPE);
17
    }
18
19
    public function getReference()
20
    {
21
        return $this->getMeta('reference');
22
    }
23
24
    public function getService()
25
    {
26
        return $this->getMeta('service');
27
    }
28
29
    public function getStatus()
30
    {
31
        return $this->getMeta('status');
32
    }
33
34
    public function setService($service)
35
    {
36
        $this->setMeta('service', $service);
37
        return true;
38
    }
39
40
    public function setStatus(int $status)
41
    {
42
        $this->setMeta('status', $status);
43
        return true;
44
    }
45
}
46