55/**
66 * Class representing CreditCardType
77 *
8- *
8+ *
99 * XSD Type: creditCardType
1010 */
1111class CreditCardType extends CreditCardSimpleType implements \JsonSerializable
@@ -26,6 +26,21 @@ class CreditCardType extends CreditCardSimpleType implements \JsonSerializable
2626 */
2727 private $ cryptogram = null ;
2828
29+ /**
30+ * @property string $tokenRequestorName
31+ */
32+ private $ tokenRequestorName = null ;
33+
34+ /**
35+ * @property string $tokenRequestorId
36+ */
37+ private $ tokenRequestorId = null ;
38+
39+ /**
40+ * @property string $tokenRequestorEci
41+ */
42+ private $ tokenRequestorEci = null ;
43+
2944 /**
3045 * Gets as cardCode
3146 *
@@ -92,6 +107,72 @@ public function setCryptogram($cryptogram)
92107 return $ this ;
93108 }
94109
110+ /**
111+ * Gets as tokenRequestorName
112+ *
113+ * @return string
114+ */
115+ public function getTokenRequestorName ()
116+ {
117+ return $ this ->tokenRequestorName ;
118+ }
119+
120+ /**
121+ * Sets a new tokenRequestorName
122+ *
123+ * @param string $tokenRequestorName
124+ * @return self
125+ */
126+ public function setTokenRequestorName ($ tokenRequestorName )
127+ {
128+ $ this ->tokenRequestorName = $ tokenRequestorName ;
129+ return $ this ;
130+ }
131+
132+ /**
133+ * Gets as tokenRequestorId
134+ *
135+ * @return string
136+ */
137+ public function getTokenRequestorId ()
138+ {
139+ return $ this ->tokenRequestorId ;
140+ }
141+
142+ /**
143+ * Sets a new tokenRequestorId
144+ *
145+ * @param string $tokenRequestorId
146+ * @return self
147+ */
148+ public function setTokenRequestorId ($ tokenRequestorId )
149+ {
150+ $ this ->tokenRequestorId = $ tokenRequestorId ;
151+ return $ this ;
152+ }
153+
154+ /**
155+ * Gets as tokenRequestorEci
156+ *
157+ * @return string
158+ */
159+ public function getTokenRequestorEci ()
160+ {
161+ return $ this ->tokenRequestorEci ;
162+ }
163+
164+ /**
165+ * Sets a new tokenRequestorEci
166+ *
167+ * @param string $tokenRequestorEci
168+ * @return self
169+ */
170+ public function setTokenRequestorEci ($ tokenRequestorEci )
171+ {
172+ $ this ->tokenRequestorEci = $ tokenRequestorEci ;
173+ return $ this ;
174+ }
175+
95176
96177 // Json Serialize Code
97178 public function jsonSerialize (){
@@ -131,47 +212,49 @@ function ($val){
131212 // Json Set Code
132213 public function set ($ data )
133214 {
134- $ mapper = \net \authorize \util \Mapper::Instance ();
135- foreach ($ data AS $ key => $ value ) {
136- $ classDetails = $ mapper ->getClass (get_class () , $ key );
137-
138- if ($ classDetails !== NULL ) {
139- if ($ classDetails ->isArray ) {
140- if ($ classDetails ->isCustomDefined ) {
141- foreach ($ value AS $ keyChild => $ valueChild ) {
142- $ type = new $ classDetails ->className ;
143- $ type ->set ($ valueChild );
144- $ this ->{'addTo ' . $ key }($ type );
145- }
146- }
147- else if ($ classDetails ->className === 'DateTime ' || $ classDetails ->className === 'Date ' ) {
148- foreach ($ value AS $ keyChild => $ valueChild ) {
149- $ type = new \DateTime ($ valueChild );
150- $ this ->{'addTo ' . $ key }($ type );
151- }
152- }
153- else {
154- foreach ($ value AS $ keyChild => $ valueChild ) {
155- $ this ->{'addTo ' . $ key }($ valueChild );
156- }
157- }
158- }
159- else {
160- if ($ classDetails ->isCustomDefined ){
161- $ type = new $ classDetails ->className ;
162- $ type ->set ($ value );
163- $ this ->{'set ' . $ key }($ type );
164- }
165- else if ($ classDetails ->className === 'DateTime ' || $ classDetails ->className === 'Date ' ) {
166- $ type = new \DateTime ($ value );
167- $ this ->{'set ' . $ key }($ type );
168- }
169- else {
170- $ this ->{'set ' . $ key }($ value );
171- }
172- }
173- }
174- }
215+ if (is_array ($ data ) || is_object ($ data )) {
216+ $ mapper = \net \authorize \util \Mapper::Instance ();
217+ foreach ($ data AS $ key => $ value ) {
218+ $ classDetails = $ mapper ->getClass (get_class () , $ key );
219+
220+ if ($ classDetails !== NULL ) {
221+ if ($ classDetails ->isArray ) {
222+ if ($ classDetails ->isCustomDefined ) {
223+ foreach ($ value AS $ keyChild => $ valueChild ) {
224+ $ type = new $ classDetails ->className ;
225+ $ type ->set ($ valueChild );
226+ $ this ->{'addTo ' . $ key }($ type );
227+ }
228+ }
229+ else if ($ classDetails ->className === 'DateTime ' || $ classDetails ->className === 'Date ' ) {
230+ foreach ($ value AS $ keyChild => $ valueChild ) {
231+ $ type = new \DateTime ($ valueChild );
232+ $ this ->{'addTo ' . $ key }($ type );
233+ }
234+ }
235+ else {
236+ foreach ($ value AS $ keyChild => $ valueChild ) {
237+ $ this ->{'addTo ' . $ key }($ valueChild );
238+ }
239+ }
240+ }
241+ else {
242+ if ($ classDetails ->isCustomDefined ){
243+ $ type = new $ classDetails ->className ;
244+ $ type ->set ($ value );
245+ $ this ->{'set ' . $ key }($ type );
246+ }
247+ else if ($ classDetails ->className === 'DateTime ' || $ classDetails ->className === 'Date ' ) {
248+ $ type = new \DateTime ($ value );
249+ $ this ->{'set ' . $ key }($ type );
250+ }
251+ else {
252+ $ this ->{'set ' . $ key }($ value );
253+ }
254+ }
255+ }
256+ }
257+ }
175258 }
176259
177260}
0 commit comments