| 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: | class DecryptedPaymentData extends DataObject |
| 15: | { |
| 16: | |
| 17: | |
| 18: | |
| 19: | |
| 20: | public $authMethod = null; |
| 21: | |
| 22: | |
| 23: | |
| 24: | |
| 25: | public $cardholderName = null; |
| 26: | |
| 27: | |
| 28: | |
| 29: | |
| 30: | public $cryptogram = null; |
| 31: | |
| 32: | |
| 33: | |
| 34: | |
| 35: | public $dpan = null; |
| 36: | |
| 37: | |
| 38: | |
| 39: | |
| 40: | public $eci = null; |
| 41: | |
| 42: | |
| 43: | |
| 44: | |
| 45: | public $expiryDate = null; |
| 46: | |
| 47: | |
| 48: | |
| 49: | |
| 50: | public $pan = null; |
| 51: | |
| 52: | |
| 53: | |
| 54: | |
| 55: | public $paymentMethod = null; |
| 56: | |
| 57: | |
| 58: | |
| 59: | |
| 60: | public function toObject() |
| 61: | { |
| 62: | $object = parent::toObject(); |
| 63: | if (!is_null($this->authMethod)) { |
| 64: | $object->authMethod = $this->authMethod; |
| 65: | } |
| 66: | if (!is_null($this->cardholderName)) { |
| 67: | $object->cardholderName = $this->cardholderName; |
| 68: | } |
| 69: | if (!is_null($this->cryptogram)) { |
| 70: | $object->cryptogram = $this->cryptogram; |
| 71: | } |
| 72: | if (!is_null($this->dpan)) { |
| 73: | $object->dpan = $this->dpan; |
| 74: | } |
| 75: | if (!is_null($this->eci)) { |
| 76: | $object->eci = $this->eci; |
| 77: | } |
| 78: | if (!is_null($this->expiryDate)) { |
| 79: | $object->expiryDate = $this->expiryDate; |
| 80: | } |
| 81: | if (!is_null($this->pan)) { |
| 82: | $object->pan = $this->pan; |
| 83: | } |
| 84: | if (!is_null($this->paymentMethod)) { |
| 85: | $object->paymentMethod = $this->paymentMethod; |
| 86: | } |
| 87: | return $object; |
| 88: | } |
| 89: | |
| 90: | |
| 91: | |
| 92: | |
| 93: | |
| 94: | |
| 95: | public function fromObject($object) |
| 96: | { |
| 97: | parent::fromObject($object); |
| 98: | if (property_exists($object, 'authMethod')) { |
| 99: | $this->authMethod = $object->authMethod; |
| 100: | } |
| 101: | if (property_exists($object, 'cardholderName')) { |
| 102: | $this->cardholderName = $object->cardholderName; |
| 103: | } |
| 104: | if (property_exists($object, 'cryptogram')) { |
| 105: | $this->cryptogram = $object->cryptogram; |
| 106: | } |
| 107: | if (property_exists($object, 'dpan')) { |
| 108: | $this->dpan = $object->dpan; |
| 109: | } |
| 110: | if (property_exists($object, 'eci')) { |
| 111: | $this->eci = $object->eci; |
| 112: | } |
| 113: | if (property_exists($object, 'expiryDate')) { |
| 114: | $this->expiryDate = $object->expiryDate; |
| 115: | } |
| 116: | if (property_exists($object, 'pan')) { |
| 117: | $this->pan = $object->pan; |
| 118: | } |
| 119: | if (property_exists($object, 'paymentMethod')) { |
| 120: | $this->paymentMethod = $object->paymentMethod; |
| 121: | } |
| 122: | return $this; |
| 123: | } |
| 124: | } |
| 125: | |