1: <?php
2: /*
3: * This class was auto-generated from the API references found at
4: * https://apireference.connect.worldline-solutions.com/
5: */
6: namespace Worldline\Connect\Sdk\V1\Domain;
7:
8: use UnexpectedValueException;
9:
10: /**
11: * @package Worldline\Connect\Sdk\V1\Domain
12: */
13: class AbstractMobilePaymentMethodSpecificInput extends AbstractPaymentMethodSpecificInput
14: {
15: /**
16: * @var string
17: */
18: public $authorizationMode = null;
19:
20: /**
21: * @var string
22: */
23: public $customerReference = null;
24:
25: /**
26: * @var string
27: */
28: public $initialSchemeTransactionId = null;
29:
30: /**
31: * @var CardRecurrenceDetails
32: */
33: public $recurring = null;
34:
35: /**
36: * @var bool
37: */
38: public $requiresApproval = null;
39:
40: /**
41: * @var bool
42: */
43: public $skipFraudService = null;
44:
45: /**
46: * @var string
47: */
48: public $token = null;
49:
50: /**
51: * @var bool
52: */
53: public $tokenize = null;
54:
55: /**
56: * @var string
57: */
58: public $unscheduledCardOnFileRequestor = null;
59:
60: /**
61: * @var string
62: */
63: public $unscheduledCardOnFileSequenceIndicator = null;
64:
65: /**
66: * @return object
67: */
68: public function toObject()
69: {
70: $object = parent::toObject();
71: if (!is_null($this->authorizationMode)) {
72: $object->authorizationMode = $this->authorizationMode;
73: }
74: if (!is_null($this->customerReference)) {
75: $object->customerReference = $this->customerReference;
76: }
77: if (!is_null($this->initialSchemeTransactionId)) {
78: $object->initialSchemeTransactionId = $this->initialSchemeTransactionId;
79: }
80: if (!is_null($this->recurring)) {
81: $object->recurring = $this->recurring->toObject();
82: }
83: if (!is_null($this->requiresApproval)) {
84: $object->requiresApproval = $this->requiresApproval;
85: }
86: if (!is_null($this->skipFraudService)) {
87: $object->skipFraudService = $this->skipFraudService;
88: }
89: if (!is_null($this->token)) {
90: $object->token = $this->token;
91: }
92: if (!is_null($this->tokenize)) {
93: $object->tokenize = $this->tokenize;
94: }
95: if (!is_null($this->unscheduledCardOnFileRequestor)) {
96: $object->unscheduledCardOnFileRequestor = $this->unscheduledCardOnFileRequestor;
97: }
98: if (!is_null($this->unscheduledCardOnFileSequenceIndicator)) {
99: $object->unscheduledCardOnFileSequenceIndicator = $this->unscheduledCardOnFileSequenceIndicator;
100: }
101: return $object;
102: }
103:
104: /**
105: * @param object $object
106: * @return $this
107: * @throws UnexpectedValueException
108: */
109: public function fromObject($object)
110: {
111: parent::fromObject($object);
112: if (property_exists($object, 'authorizationMode')) {
113: $this->authorizationMode = $object->authorizationMode;
114: }
115: if (property_exists($object, 'customerReference')) {
116: $this->customerReference = $object->customerReference;
117: }
118: if (property_exists($object, 'initialSchemeTransactionId')) {
119: $this->initialSchemeTransactionId = $object->initialSchemeTransactionId;
120: }
121: if (property_exists($object, 'recurring')) {
122: if (!is_object($object->recurring)) {
123: throw new UnexpectedValueException('value \'' . print_r($object->recurring, true) . '\' is not an object');
124: }
125: $value = new CardRecurrenceDetails();
126: $this->recurring = $value->fromObject($object->recurring);
127: }
128: if (property_exists($object, 'requiresApproval')) {
129: $this->requiresApproval = $object->requiresApproval;
130: }
131: if (property_exists($object, 'skipFraudService')) {
132: $this->skipFraudService = $object->skipFraudService;
133: }
134: if (property_exists($object, 'token')) {
135: $this->token = $object->token;
136: }
137: if (property_exists($object, 'tokenize')) {
138: $this->tokenize = $object->tokenize;
139: }
140: if (property_exists($object, 'unscheduledCardOnFileRequestor')) {
141: $this->unscheduledCardOnFileRequestor = $object->unscheduledCardOnFileRequestor;
142: }
143: if (property_exists($object, 'unscheduledCardOnFileSequenceIndicator')) {
144: $this->unscheduledCardOnFileSequenceIndicator = $object->unscheduledCardOnFileSequenceIndicator;
145: }
146: return $this;
147: }
148: }
149: