File tree Expand file tree Collapse file tree
lib/net/authorize/api/contract/v1 Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -49,7 +49,11 @@ public function getClass(string $class, string $property){
4949
5050 if (isset ($ this ->classes [$ class ]['properties ' ][$ property ]['type ' ])){
5151 $ className = $ this ->classes [$ class ]['properties ' ][$ property ]['type ' ];
52- if (substr ( $ className , 0 , 5 ) === "array " ){
52+ if (stripos ($ className , 'Date ' ) !== false ) {
53+ $ obj ->className = 'DateTime ' ;
54+ $ obj ->isCustomDefined = false ;
55+ }
56+ if (substr ( $ className , 0 , 5 ) === "array " ) {
5357 $ className = ltrim ($ className , 'array< ' );
5458 $ className = rtrim ($ className , '> ' );
5559 $ obj ->isArray = true ;
@@ -61,10 +65,10 @@ public function getClass(string $class, string $property){
6165 $ obj ->isInlineArray = $ this ->classes [$ class ]['properties ' ][$ property ]['xml_list ' ]['inline ' ];
6266 $ obj ->arrayEntryname = $ this ->classes [$ class ]['properties ' ][$ property ]['xml_list ' ]['entry_name ' ];
6367 }
68+ $ obj ->className = $ className ;
69+ $ obj ->isCustomDefined = stripos ($ className , '\\' ) !== false ;
6470 }
65- $ obj ->className = $ className ;
66- $ obj ->isCustomDefined = stripos ($ className , '\\' ) !== false ;
67-
71+
6872 return $ obj ;
6973 }
7074 else if (get_parent_class ($ class )){
Original file line number Diff line number Diff line change 1919 $this->{'addTo' . $key}($type);
2020 }
2121 }
22+ else ($classDetails->className === 'DateTime') {
23+ foreach($value AS $keyChild => $valueChild) {
24+ $this->{'addTo' . $key}($valueChild);
25+ }
26+ }
2227 else {
2328 foreach($value AS $keyChild => $valueChild) {
2429 $this->{'addTo' . $key}($valueChild);
3136 $type->set($value);
3237 $this->{'set' . $key}($type);
3338 }
39+ else if ($classDetails->className === 'DateTime') {
40+ $this->{'set' . $key}($value);
41+ }
3442 else {
3543 $this->{'set' . $key}($value);
3644 }
You can’t perform that action at this time.
0 commit comments