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 NonSepaDirectDebitPaymentProduct705SpecificInput extends DataObject |
15: | { |
16: | |
17: | |
18: | |
19: | public $authorisationId = null; |
20: | |
21: | |
22: | |
23: | |
24: | public $bankAccountBban = null; |
25: | |
26: | |
27: | |
28: | |
29: | public $transactionType = null; |
30: | |
31: | |
32: | |
33: | |
34: | public function toObject() |
35: | { |
36: | $object = parent::toObject(); |
37: | if (!is_null($this->authorisationId)) { |
38: | $object->authorisationId = $this->authorisationId; |
39: | } |
40: | if (!is_null($this->bankAccountBban)) { |
41: | $object->bankAccountBban = $this->bankAccountBban->toObject(); |
42: | } |
43: | if (!is_null($this->transactionType)) { |
44: | $object->transactionType = $this->transactionType; |
45: | } |
46: | return $object; |
47: | } |
48: | |
49: | |
50: | |
51: | |
52: | |
53: | |
54: | public function fromObject($object) |
55: | { |
56: | parent::fromObject($object); |
57: | if (property_exists($object, 'authorisationId')) { |
58: | $this->authorisationId = $object->authorisationId; |
59: | } |
60: | if (property_exists($object, 'bankAccountBban')) { |
61: | if (!is_object($object->bankAccountBban)) { |
62: | throw new UnexpectedValueException('value \'' . print_r($object->bankAccountBban, true) . '\' is not an object'); |
63: | } |
64: | $value = new BankAccountBban(); |
65: | $this->bankAccountBban = $value->fromObject($object->bankAccountBban); |
66: | } |
67: | if (property_exists($object, 'transactionType')) { |
68: | $this->transactionType = $object->transactionType; |
69: | } |
70: | return $this; |
71: | } |
72: | } |
73: | |