| 1: | <?php |
| 2: | |
| 3: | |
| 4: | |
| 5: | |
| 6: | namespace Worldline\Connect\Sdk\V1\Domain; |
| 7: | |
| 8: | use UnexpectedValueException; |
| 9: | |
| 10: | |
| 11: | |
| 12: | |
| 13: | class RedirectPaymentProduct840SpecificInput extends AbstractRedirectPaymentProduct840SpecificInput |
| 14: | { |
| 15: | |
| 16: | |
| 17: | |
| 18: | |
| 19: | |
| 20: | public ?string $custom = null; |
| 21: | |
| 22: | |
| 23: | |
| 24: | |
| 25: | public ?bool $isShortcut = null; |
| 26: | |
| 27: | |
| 28: | |
| 29: | |
| 30: | public function toObject(): object |
| 31: | { |
| 32: | $object = parent::toObject(); |
| 33: | if (!is_null($this->custom)) { |
| 34: | $object->custom = $this->custom; |
| 35: | } |
| 36: | if (!is_null($this->isShortcut)) { |
| 37: | $object->isShortcut = $this->isShortcut; |
| 38: | } |
| 39: | return $object; |
| 40: | } |
| 41: | |
| 42: | |
| 43: | |
| 44: | |
| 45: | |
| 46: | |
| 47: | |
| 48: | public function fromObject(object $object): RedirectPaymentProduct840SpecificInput |
| 49: | { |
| 50: | parent::fromObject($object); |
| 51: | if (property_exists($object, 'custom')) { |
| 52: | $this->custom = $object->custom; |
| 53: | } |
| 54: | if (property_exists($object, 'isShortcut')) { |
| 55: | $this->isShortcut = $object->isShortcut; |
| 56: | } |
| 57: | return $this; |
| 58: | } |
| 59: | } |
| 60: | |