| 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: | |
| 15: | class LoanRecipient extends DataObject |
| 16: | { |
| 17: | |
| 18: | |
| 19: | |
| 20: | |
| 21: | public $accountNumber = null; |
| 22: | |
| 23: | |
| 24: | |
| 25: | |
| 26: | |
| 27: | public $dateOfBirth = null; |
| 28: | |
| 29: | |
| 30: | |
| 31: | |
| 32: | |
| 33: | public $partialPan = null; |
| 34: | |
| 35: | |
| 36: | |
| 37: | |
| 38: | |
| 39: | public $surname = null; |
| 40: | |
| 41: | |
| 42: | |
| 43: | |
| 44: | |
| 45: | public $zip = null; |
| 46: | |
| 47: | |
| 48: | |
| 49: | |
| 50: | public function toObject() |
| 51: | { |
| 52: | $object = parent::toObject(); |
| 53: | if (!is_null($this->accountNumber)) { |
| 54: | $object->accountNumber = $this->accountNumber; |
| 55: | } |
| 56: | if (!is_null($this->dateOfBirth)) { |
| 57: | $object->dateOfBirth = $this->dateOfBirth; |
| 58: | } |
| 59: | if (!is_null($this->partialPan)) { |
| 60: | $object->partialPan = $this->partialPan; |
| 61: | } |
| 62: | if (!is_null($this->surname)) { |
| 63: | $object->surname = $this->surname; |
| 64: | } |
| 65: | if (!is_null($this->zip)) { |
| 66: | $object->zip = $this->zip; |
| 67: | } |
| 68: | return $object; |
| 69: | } |
| 70: | |
| 71: | |
| 72: | |
| 73: | |
| 74: | |
| 75: | |
| 76: | public function fromObject($object) |
| 77: | { |
| 78: | parent::fromObject($object); |
| 79: | if (property_exists($object, 'accountNumber')) { |
| 80: | $this->accountNumber = $object->accountNumber; |
| 81: | } |
| 82: | if (property_exists($object, 'dateOfBirth')) { |
| 83: | $this->dateOfBirth = $object->dateOfBirth; |
| 84: | } |
| 85: | if (property_exists($object, 'partialPan')) { |
| 86: | $this->partialPan = $object->partialPan; |
| 87: | } |
| 88: | if (property_exists($object, 'surname')) { |
| 89: | $this->surname = $object->surname; |
| 90: | } |
| 91: | if (property_exists($object, 'zip')) { |
| 92: | $this->zip = $object->zip; |
| 93: | } |
| 94: | return $this; |
| 95: | } |
| 96: | } |
| 97: | |