Completed
Push — master ( 78ef8c...6e8e35 )
by Luke
03:10
created

ListingDeleteObject::getDeletionReason()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 1
Bugs 0 Features 1
Metric Value
cc 1
eloc 1
nc 1
nop 0
dl 0
loc 3
ccs 2
cts 2
cp 1
crap 1
rs 10
c 1
b 0
f 1
1
<?php
2
3
namespace ZpgRtf\Objects;
4
5
/**
6
 * The listing delete object allows you to remove a listing from a branch's inventory list.
7
 */
8
class ListingDeleteObject implements \JsonSerializable
9
{
10
    /** @var string */
11
    private $listingReference;
12
13
    /** @var string */
14
    private $deletionReason;
15
16
    /**
17
     * @return string
18
     */
19 2
    public function getListingReference()
20
    {
21 2
        return $this->listingReference;
22
    }
23
24
    /**
25
     * @param string $listingReference
26
     *
27
     * @return ListingDeleteObject
28
     */
29 1
    public function setListingReference($listingReference)
30
    {
31 1
        $this->listingReference = $listingReference;
32
33 1
        return $this;
34
    }
35
36
    /**
37
     * @return string
38
     */
39 2
    public function getDeletionReason()
40
    {
41 2
        return $this->deletionReason;
42
    }
43
44
    /**
45
     * @param string $deletionReason
46
     *
47
     * @return ListingDeleteObject
48
     */
49 1
    public function setDeletionReason($deletionReason)
50
    {
51 1
        $this->deletionReason = $deletionReason;
52
53 1
        return $this;
54
    }
55
56
    /** {@inheritDoc} */
57 1
    public function jsonSerialize()
58
    {
59 1
        return array_filter([
60 1
            'listing_reference' => $this->getListingReference(),
61 1
            'deletion_reason' => $this->getDeletionReason(),
62
        ]);
63
    }
64
}
65