| 1: | <?php |
| 2: | |
| 3: | |
| 4: | |
| 5: | |
| 6: | namespace Worldline\Connect\Sdk\V1\Domain; |
| 7: | |
| 8: | use UnexpectedValueException; |
| 9: | |
| 10: | |
| 11: | |
| 12: | |
| 13: | class MobilePaymentMethodSpecificInputHostedCheckout extends AbstractPaymentMethodSpecificInput |
| 14: | { |
| 15: | |
| 16: | |
| 17: | |
| 18: | public $authorizationMode = null; |
| 19: | |
| 20: | |
| 21: | |
| 22: | |
| 23: | public $customerReference = null; |
| 24: | |
| 25: | |
| 26: | |
| 27: | |
| 28: | public $paymentProduct302SpecificInput = null; |
| 29: | |
| 30: | |
| 31: | |
| 32: | |
| 33: | public $paymentProduct320SpecificInput = null; |
| 34: | |
| 35: | |
| 36: | |
| 37: | |
| 38: | public $requiresApproval = null; |
| 39: | |
| 40: | |
| 41: | |
| 42: | |
| 43: | public $skipFraudService = null; |
| 44: | |
| 45: | |
| 46: | |
| 47: | |
| 48: | public function toObject() |
| 49: | { |
| 50: | $object = parent::toObject(); |
| 51: | if (!is_null($this->authorizationMode)) { |
| 52: | $object->authorizationMode = $this->authorizationMode; |
| 53: | } |
| 54: | if (!is_null($this->customerReference)) { |
| 55: | $object->customerReference = $this->customerReference; |
| 56: | } |
| 57: | if (!is_null($this->paymentProduct302SpecificInput)) { |
| 58: | $object->paymentProduct302SpecificInput = $this->paymentProduct302SpecificInput->toObject(); |
| 59: | } |
| 60: | if (!is_null($this->paymentProduct320SpecificInput)) { |
| 61: | $object->paymentProduct320SpecificInput = $this->paymentProduct320SpecificInput->toObject(); |
| 62: | } |
| 63: | if (!is_null($this->requiresApproval)) { |
| 64: | $object->requiresApproval = $this->requiresApproval; |
| 65: | } |
| 66: | if (!is_null($this->skipFraudService)) { |
| 67: | $object->skipFraudService = $this->skipFraudService; |
| 68: | } |
| 69: | return $object; |
| 70: | } |
| 71: | |
| 72: | |
| 73: | |
| 74: | |
| 75: | |
| 76: | |
| 77: | public function fromObject($object) |
| 78: | { |
| 79: | parent::fromObject($object); |
| 80: | if (property_exists($object, 'authorizationMode')) { |
| 81: | $this->authorizationMode = $object->authorizationMode; |
| 82: | } |
| 83: | if (property_exists($object, 'customerReference')) { |
| 84: | $this->customerReference = $object->customerReference; |
| 85: | } |
| 86: | if (property_exists($object, 'paymentProduct302SpecificInput')) { |
| 87: | if (!is_object($object->paymentProduct302SpecificInput)) { |
| 88: | throw new UnexpectedValueException('value \'' . print_r($object->paymentProduct302SpecificInput, true) . '\' is not an object'); |
| 89: | } |
| 90: | $value = new MobilePaymentProduct302SpecificInputHostedCheckout(); |
| 91: | $this->paymentProduct302SpecificInput = $value->fromObject($object->paymentProduct302SpecificInput); |
| 92: | } |
| 93: | if (property_exists($object, 'paymentProduct320SpecificInput')) { |
| 94: | if (!is_object($object->paymentProduct320SpecificInput)) { |
| 95: | throw new UnexpectedValueException('value \'' . print_r($object->paymentProduct320SpecificInput, true) . '\' is not an object'); |
| 96: | } |
| 97: | $value = new MobilePaymentProduct320SpecificInputHostedCheckout(); |
| 98: | $this->paymentProduct320SpecificInput = $value->fromObject($object->paymentProduct320SpecificInput); |
| 99: | } |
| 100: | if (property_exists($object, 'requiresApproval')) { |
| 101: | $this->requiresApproval = $object->requiresApproval; |
| 102: | } |
| 103: | if (property_exists($object, 'skipFraudService')) { |
| 104: | $this->skipFraudService = $object->skipFraudService; |
| 105: | } |
| 106: | return $this; |
| 107: | } |
| 108: | } |
| 109: | |