| 1: | <?php |
| 2: | |
| 3: | |
| 4: | |
| 5: | |
| 6: | namespace Worldline\Connect\Sdk\V1\Domain; |
| 7: | |
| 8: | use UnexpectedValueException; |
| 9: | |
| 10: | |
| 11: | |
| 12: | |
| 13: | class MobilePaymentMethodSpecificInput extends AbstractMobilePaymentMethodSpecificInput |
| 14: | { |
| 15: | |
| 16: | |
| 17: | |
| 18: | public $decryptedPaymentData = null; |
| 19: | |
| 20: | |
| 21: | |
| 22: | |
| 23: | public $encryptedPaymentData = null; |
| 24: | |
| 25: | |
| 26: | |
| 27: | |
| 28: | public $isRecurring = null; |
| 29: | |
| 30: | |
| 31: | |
| 32: | |
| 33: | public $merchantInitiatedReasonIndicator = null; |
| 34: | |
| 35: | |
| 36: | |
| 37: | |
| 38: | public $paymentProduct320SpecificInput = null; |
| 39: | |
| 40: | |
| 41: | |
| 42: | |
| 43: | public function toObject() |
| 44: | { |
| 45: | $object = parent::toObject(); |
| 46: | if (!is_null($this->decryptedPaymentData)) { |
| 47: | $object->decryptedPaymentData = $this->decryptedPaymentData->toObject(); |
| 48: | } |
| 49: | if (!is_null($this->encryptedPaymentData)) { |
| 50: | $object->encryptedPaymentData = $this->encryptedPaymentData; |
| 51: | } |
| 52: | if (!is_null($this->isRecurring)) { |
| 53: | $object->isRecurring = $this->isRecurring; |
| 54: | } |
| 55: | if (!is_null($this->merchantInitiatedReasonIndicator)) { |
| 56: | $object->merchantInitiatedReasonIndicator = $this->merchantInitiatedReasonIndicator; |
| 57: | } |
| 58: | if (!is_null($this->paymentProduct320SpecificInput)) { |
| 59: | $object->paymentProduct320SpecificInput = $this->paymentProduct320SpecificInput->toObject(); |
| 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, 'decryptedPaymentData')) { |
| 73: | if (!is_object($object->decryptedPaymentData)) { |
| 74: | throw new UnexpectedValueException('value \'' . print_r($object->decryptedPaymentData, true) . '\' is not an object'); |
| 75: | } |
| 76: | $value = new DecryptedPaymentData(); |
| 77: | $this->decryptedPaymentData = $value->fromObject($object->decryptedPaymentData); |
| 78: | } |
| 79: | if (property_exists($object, 'encryptedPaymentData')) { |
| 80: | $this->encryptedPaymentData = $object->encryptedPaymentData; |
| 81: | } |
| 82: | if (property_exists($object, 'isRecurring')) { |
| 83: | $this->isRecurring = $object->isRecurring; |
| 84: | } |
| 85: | if (property_exists($object, 'merchantInitiatedReasonIndicator')) { |
| 86: | $this->merchantInitiatedReasonIndicator = $object->merchantInitiatedReasonIndicator; |
| 87: | } |
| 88: | if (property_exists($object, 'paymentProduct320SpecificInput')) { |
| 89: | if (!is_object($object->paymentProduct320SpecificInput)) { |
| 90: | throw new UnexpectedValueException('value \'' . print_r($object->paymentProduct320SpecificInput, true) . '\' is not an object'); |
| 91: | } |
| 92: | $value = new MobilePaymentProduct320SpecificInput(); |
| 93: | $this->paymentProduct320SpecificInput = $value->fromObject($object->paymentProduct320SpecificInput); |
| 94: | } |
| 95: | return $this; |
| 96: | } |
| 97: | } |
| 98: | |