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