1: | <?php |
2: | |
3: | |
4: | |
5: | |
6: | namespace Worldline\Connect\Sdk\V1\Domain; |
7: | |
8: | use UnexpectedValueException; |
9: | use Worldline\Connect\Sdk\Domain\DataObject; |
10: | |
11: | |
12: | |
13: | |
14: | class LineItemInvoiceData extends DataObject |
15: | { |
16: | |
17: | |
18: | |
19: | public $description = null; |
20: | |
21: | |
22: | |
23: | |
24: | public $merchantLinenumber = null; |
25: | |
26: | |
27: | |
28: | |
29: | public $merchantPagenumber = null; |
30: | |
31: | |
32: | |
33: | |
34: | public $nrOfItems = null; |
35: | |
36: | |
37: | |
38: | |
39: | public $pricePerItem = null; |
40: | |
41: | |
42: | |
43: | |
44: | public function toObject() |
45: | { |
46: | $object = parent::toObject(); |
47: | if (!is_null($this->description)) { |
48: | $object->description = $this->description; |
49: | } |
50: | if (!is_null($this->merchantLinenumber)) { |
51: | $object->merchantLinenumber = $this->merchantLinenumber; |
52: | } |
53: | if (!is_null($this->merchantPagenumber)) { |
54: | $object->merchantPagenumber = $this->merchantPagenumber; |
55: | } |
56: | if (!is_null($this->nrOfItems)) { |
57: | $object->nrOfItems = $this->nrOfItems; |
58: | } |
59: | if (!is_null($this->pricePerItem)) { |
60: | $object->pricePerItem = $this->pricePerItem; |
61: | } |
62: | return $object; |
63: | } |
64: | |
65: | |
66: | |
67: | |
68: | |
69: | |
70: | public function fromObject($object) |
71: | { |
72: | parent::fromObject($object); |
73: | if (property_exists($object, 'description')) { |
74: | $this->description = $object->description; |
75: | } |
76: | if (property_exists($object, 'merchantLinenumber')) { |
77: | $this->merchantLinenumber = $object->merchantLinenumber; |
78: | } |
79: | if (property_exists($object, 'merchantPagenumber')) { |
80: | $this->merchantPagenumber = $object->merchantPagenumber; |
81: | } |
82: | if (property_exists($object, 'nrOfItems')) { |
83: | $this->nrOfItems = $object->nrOfItems; |
84: | } |
85: | if (property_exists($object, 'pricePerItem')) { |
86: | $this->pricePerItem = $object->pricePerItem; |
87: | } |
88: | return $this; |
89: | } |
90: | } |
91: | |