Skip to content

Commit f10ce27

Browse files
committed
Updated after adding the if-check in scripts/appendsetcode.txt
1 parent 3fbc1a3 commit f10ce27

160 files changed

Lines changed: 6975 additions & 6655 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

lib/net/authorize/api/contract/v1/ANetApiRequestType.php

Lines changed: 44 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
/**
66
* Class representing ANetApiRequestType
77
*
8-
*
8+
*
99
* XSD Type: ANetApiRequest
1010
*/
1111
class ANetApiRequestType implements \JsonSerializable
@@ -133,47 +133,49 @@ function ($val){
133133
// Json Set Code
134134
public function set($data)
135135
{
136-
$mapper = \net\authorize\util\Mapper::Instance();
137-
foreach($data AS $key => $value) {
138-
$classDetails = $mapper->getClass(get_class() , $key);
139-
140-
if($classDetails !== NULL ) {
141-
if ($classDetails->isArray) {
142-
if ($classDetails->isCustomDefined) {
143-
foreach($value AS $keyChild => $valueChild) {
144-
$type = new $classDetails->className;
145-
$type->set($valueChild);
146-
$this->{'addTo' . $key}($type);
147-
}
148-
}
149-
else if ($classDetails->className === 'DateTime' || $classDetails->className === 'Date' ) {
150-
foreach($value AS $keyChild => $valueChild) {
151-
$type = new \DateTime($valueChild);
152-
$this->{'addTo' . $key}($type);
153-
}
154-
}
155-
else {
156-
foreach($value AS $keyChild => $valueChild) {
157-
$this->{'addTo' . $key}($valueChild);
158-
}
159-
}
160-
}
161-
else {
162-
if ($classDetails->isCustomDefined){
163-
$type = new $classDetails->className;
164-
$type->set($value);
165-
$this->{'set' . $key}($type);
166-
}
167-
else if ($classDetails->className === 'DateTime' || $classDetails->className === 'Date' ) {
168-
$type = new \DateTime($value);
169-
$this->{'set' . $key}($type);
170-
}
171-
else {
172-
$this->{'set' . $key}($value);
173-
}
174-
}
175-
}
176-
}
136+
if(is_array($data) || is_object($data)) {
137+
$mapper = \net\authorize\util\Mapper::Instance();
138+
foreach($data AS $key => $value) {
139+
$classDetails = $mapper->getClass(get_class() , $key);
140+
141+
if($classDetails !== NULL ) {
142+
if ($classDetails->isArray) {
143+
if ($classDetails->isCustomDefined) {
144+
foreach($value AS $keyChild => $valueChild) {
145+
$type = new $classDetails->className;
146+
$type->set($valueChild);
147+
$this->{'addTo' . $key}($type);
148+
}
149+
}
150+
else if ($classDetails->className === 'DateTime' || $classDetails->className === 'Date' ) {
151+
foreach($value AS $keyChild => $valueChild) {
152+
$type = new \DateTime($valueChild);
153+
$this->{'addTo' . $key}($type);
154+
}
155+
}
156+
else {
157+
foreach($value AS $keyChild => $valueChild) {
158+
$this->{'addTo' . $key}($valueChild);
159+
}
160+
}
161+
}
162+
else {
163+
if ($classDetails->isCustomDefined){
164+
$type = new $classDetails->className;
165+
$type->set($value);
166+
$this->{'set' . $key}($type);
167+
}
168+
else if ($classDetails->className === 'DateTime' || $classDetails->className === 'Date' ) {
169+
$type = new \DateTime($value);
170+
$this->{'set' . $key}($type);
171+
}
172+
else {
173+
$this->{'set' . $key}($value);
174+
}
175+
}
176+
}
177+
}
178+
}
177179
}
178180

179181
}

lib/net/authorize/api/contract/v1/ANetApiResponseType.php

Lines changed: 44 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
/**
66
* Class representing ANetApiResponseType
77
*
8-
*
8+
*
99
* XSD Type: ANetApiResponse
1010
*/
1111
class ANetApiResponseType implements \JsonSerializable
@@ -131,47 +131,49 @@ function ($val){
131131
// Json Set Code
132132
public function set($data)
133133
{
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-
}
134+
if(is_array($data) || is_object($data)) {
135+
$mapper = \net\authorize\util\Mapper::Instance();
136+
foreach($data AS $key => $value) {
137+
$classDetails = $mapper->getClass(get_class() , $key);
138+
139+
if($classDetails !== NULL ) {
140+
if ($classDetails->isArray) {
141+
if ($classDetails->isCustomDefined) {
142+
foreach($value AS $keyChild => $valueChild) {
143+
$type = new $classDetails->className;
144+
$type->set($valueChild);
145+
$this->{'addTo' . $key}($type);
146+
}
147+
}
148+
else if ($classDetails->className === 'DateTime' || $classDetails->className === 'Date' ) {
149+
foreach($value AS $keyChild => $valueChild) {
150+
$type = new \DateTime($valueChild);
151+
$this->{'addTo' . $key}($type);
152+
}
153+
}
154+
else {
155+
foreach($value AS $keyChild => $valueChild) {
156+
$this->{'addTo' . $key}($valueChild);
157+
}
158+
}
159+
}
160+
else {
161+
if ($classDetails->isCustomDefined){
162+
$type = new $classDetails->className;
163+
$type->set($value);
164+
$this->{'set' . $key}($type);
165+
}
166+
else if ($classDetails->className === 'DateTime' || $classDetails->className === 'Date' ) {
167+
$type = new \DateTime($value);
168+
$this->{'set' . $key}($type);
169+
}
170+
else {
171+
$this->{'set' . $key}($value);
172+
}
173+
}
174+
}
175+
}
176+
}
175177
}
176178

177179
}

lib/net/authorize/api/contract/v1/ARBCancelSubscriptionResponse.php

Lines changed: 43 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -12,47 +12,49 @@ class ARBCancelSubscriptionResponse extends ANetApiResponseType
1212
// Json Set Code
1313
public function set($data)
1414
{
15-
$mapper = \net\authorize\util\Mapper::Instance();
16-
foreach($data AS $key => $value) {
17-
$classDetails = $mapper->getClass(get_class() , $key);
18-
19-
if($classDetails !== NULL ) {
20-
if ($classDetails->isArray) {
21-
if ($classDetails->isCustomDefined) {
22-
foreach($value AS $keyChild => $valueChild) {
23-
$type = new $classDetails->className;
24-
$type->set($valueChild);
25-
$this->{'addTo' . $key}($type);
26-
}
27-
}
28-
else if ($classDetails->className === 'DateTime' || $classDetails->className === 'Date' ) {
29-
foreach($value AS $keyChild => $valueChild) {
30-
$type = new \DateTime($valueChild);
31-
$this->{'addTo' . $key}($type);
32-
}
33-
}
34-
else {
35-
foreach($value AS $keyChild => $valueChild) {
36-
$this->{'addTo' . $key}($valueChild);
37-
}
38-
}
39-
}
40-
else {
41-
if ($classDetails->isCustomDefined){
42-
$type = new $classDetails->className;
43-
$type->set($value);
44-
$this->{'set' . $key}($type);
45-
}
46-
else if ($classDetails->className === 'DateTime' || $classDetails->className === 'Date' ) {
47-
$type = new \DateTime($value);
48-
$this->{'set' . $key}($type);
49-
}
50-
else {
51-
$this->{'set' . $key}($value);
52-
}
53-
}
54-
}
55-
}
15+
if(is_array($data) || is_object($data)) {
16+
$mapper = \net\authorize\util\Mapper::Instance();
17+
foreach($data AS $key => $value) {
18+
$classDetails = $mapper->getClass(get_class() , $key);
19+
20+
if($classDetails !== NULL ) {
21+
if ($classDetails->isArray) {
22+
if ($classDetails->isCustomDefined) {
23+
foreach($value AS $keyChild => $valueChild) {
24+
$type = new $classDetails->className;
25+
$type->set($valueChild);
26+
$this->{'addTo' . $key}($type);
27+
}
28+
}
29+
else if ($classDetails->className === 'DateTime' || $classDetails->className === 'Date' ) {
30+
foreach($value AS $keyChild => $valueChild) {
31+
$type = new \DateTime($valueChild);
32+
$this->{'addTo' . $key}($type);
33+
}
34+
}
35+
else {
36+
foreach($value AS $keyChild => $valueChild) {
37+
$this->{'addTo' . $key}($valueChild);
38+
}
39+
}
40+
}
41+
else {
42+
if ($classDetails->isCustomDefined){
43+
$type = new $classDetails->className;
44+
$type->set($value);
45+
$this->{'set' . $key}($type);
46+
}
47+
else if ($classDetails->className === 'DateTime' || $classDetails->className === 'Date' ) {
48+
$type = new \DateTime($value);
49+
$this->{'set' . $key}($type);
50+
}
51+
else {
52+
$this->{'set' . $key}($value);
53+
}
54+
}
55+
}
56+
}
57+
}
5658
}
5759

5860
}

lib/net/authorize/api/contract/v1/ARBCreateSubscriptionResponse.php

Lines changed: 43 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -66,47 +66,49 @@ public function setProfile(\net\authorize\api\contract\v1\CustomerProfileIdType
6666
// Json Set Code
6767
public function set($data)
6868
{
69-
$mapper = \net\authorize\util\Mapper::Instance();
70-
foreach($data AS $key => $value) {
71-
$classDetails = $mapper->getClass(get_class() , $key);
72-
73-
if($classDetails !== NULL ) {
74-
if ($classDetails->isArray) {
75-
if ($classDetails->isCustomDefined) {
76-
foreach($value AS $keyChild => $valueChild) {
77-
$type = new $classDetails->className;
78-
$type->set($valueChild);
79-
$this->{'addTo' . $key}($type);
80-
}
81-
}
82-
else if ($classDetails->className === 'DateTime' || $classDetails->className === 'Date' ) {
83-
foreach($value AS $keyChild => $valueChild) {
84-
$type = new \DateTime($valueChild);
85-
$this->{'addTo' . $key}($type);
86-
}
87-
}
88-
else {
89-
foreach($value AS $keyChild => $valueChild) {
90-
$this->{'addTo' . $key}($valueChild);
91-
}
92-
}
93-
}
94-
else {
95-
if ($classDetails->isCustomDefined){
96-
$type = new $classDetails->className;
97-
$type->set($value);
98-
$this->{'set' . $key}($type);
99-
}
100-
else if ($classDetails->className === 'DateTime' || $classDetails->className === 'Date' ) {
101-
$type = new \DateTime($value);
102-
$this->{'set' . $key}($type);
103-
}
104-
else {
105-
$this->{'set' . $key}($value);
106-
}
107-
}
108-
}
109-
}
69+
if(is_array($data) || is_object($data)) {
70+
$mapper = \net\authorize\util\Mapper::Instance();
71+
foreach($data AS $key => $value) {
72+
$classDetails = $mapper->getClass(get_class() , $key);
73+
74+
if($classDetails !== NULL ) {
75+
if ($classDetails->isArray) {
76+
if ($classDetails->isCustomDefined) {
77+
foreach($value AS $keyChild => $valueChild) {
78+
$type = new $classDetails->className;
79+
$type->set($valueChild);
80+
$this->{'addTo' . $key}($type);
81+
}
82+
}
83+
else if ($classDetails->className === 'DateTime' || $classDetails->className === 'Date' ) {
84+
foreach($value AS $keyChild => $valueChild) {
85+
$type = new \DateTime($valueChild);
86+
$this->{'addTo' . $key}($type);
87+
}
88+
}
89+
else {
90+
foreach($value AS $keyChild => $valueChild) {
91+
$this->{'addTo' . $key}($valueChild);
92+
}
93+
}
94+
}
95+
else {
96+
if ($classDetails->isCustomDefined){
97+
$type = new $classDetails->className;
98+
$type->set($value);
99+
$this->{'set' . $key}($type);
100+
}
101+
else if ($classDetails->className === 'DateTime' || $classDetails->className === 'Date' ) {
102+
$type = new \DateTime($value);
103+
$this->{'set' . $key}($type);
104+
}
105+
else {
106+
$this->{'set' . $key}($value);
107+
}
108+
}
109+
}
110+
}
111+
}
110112
}
111113

112114
}

0 commit comments

Comments
 (0)