Skip to content

Commit f665b97

Browse files
moved model class Location into a variable
1 parent 1848ffd commit f665b97

40 files changed

+225
-75
lines changed

generator/cybersource-php-template/api.mustache

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -238,7 +238,9 @@ use \{{invokerPackage}}\Logging\LogFactory as LogFactory;
238238
}
239239

240240
$sdkTracker = new \CyberSource\Utilities\Tracking\SdkTracker();
241-
$_tempBody = $sdkTracker->insertDeveloperIdTracker($_tempBody, end(explode('\\', '{{dataType}}')), $this->apiClient->merchantConfig->getRunEnvironment());
241+
$modelClassLocation = explode('\\', '{{dataType}}');
242+
243+
$_tempBody = $sdkTracker->insertDeveloperIdTracker($_tempBody, end($modelClassLocation), $this->apiClient->merchantConfig->getRunEnvironment());
242244
{{/bodyParams}}
243245
{{^bodyParams}}
244246
if ('{{httpMethod}}' == 'POST') {

lib/Api/AsymmetricKeyManagementApi.php

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,9 @@ public function createP12KeysWithHttpInfo($createP12KeysRequest)
147147
}
148148

149149
$sdkTracker = new \CyberSource\Utilities\Tracking\SdkTracker();
150-
$_tempBody = $sdkTracker->insertDeveloperIdTracker($_tempBody, end(explode('\\', '\CyberSource\Model\CreateP12KeysRequest')), $this->apiClient->merchantConfig->getRunEnvironment());
150+
$modelClassLocation = explode('\\', '\CyberSource\Model\CreateP12KeysRequest');
151+
152+
$_tempBody = $sdkTracker->insertDeveloperIdTracker($_tempBody, end($modelClassLocation), $this->apiClient->merchantConfig->getRunEnvironment());
151153

152154
// for model (json/xml)
153155
if (isset($_tempBody)) {
@@ -258,7 +260,9 @@ public function deleteBulkP12KeysWithHttpInfo($deleteBulkP12KeysRequest)
258260
}
259261

260262
$sdkTracker = new \CyberSource\Utilities\Tracking\SdkTracker();
261-
$_tempBody = $sdkTracker->insertDeveloperIdTracker($_tempBody, end(explode('\\', '\CyberSource\Model\DeleteBulkP12KeysRequest')), $this->apiClient->merchantConfig->getRunEnvironment());
263+
$modelClassLocation = explode('\\', '\CyberSource\Model\DeleteBulkP12KeysRequest');
264+
265+
$_tempBody = $sdkTracker->insertDeveloperIdTracker($_tempBody, end($modelClassLocation), $this->apiClient->merchantConfig->getRunEnvironment());
262266

263267
// for model (json/xml)
264268
if (isset($_tempBody)) {
@@ -498,7 +502,9 @@ public function updateAsymKeyWithHttpInfo($keyId, $updateAsymKeysRequest)
498502
}
499503

500504
$sdkTracker = new \CyberSource\Utilities\Tracking\SdkTracker();
501-
$_tempBody = $sdkTracker->insertDeveloperIdTracker($_tempBody, end(explode('\\', '\CyberSource\Model\UpdateAsymKeysRequest')), $this->apiClient->merchantConfig->getRunEnvironment());
505+
$modelClassLocation = explode('\\', '\CyberSource\Model\UpdateAsymKeysRequest');
506+
507+
$_tempBody = $sdkTracker->insertDeveloperIdTracker($_tempBody, end($modelClassLocation), $this->apiClient->merchantConfig->getRunEnvironment());
502508

503509
// for model (json/xml)
504510
if (isset($_tempBody)) {

lib/Api/BatchesApi.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -506,7 +506,9 @@ public function postBatchWithHttpInfo($body)
506506
}
507507

508508
$sdkTracker = new \CyberSource\Utilities\Tracking\SdkTracker();
509-
$_tempBody = $sdkTracker->insertDeveloperIdTracker($_tempBody, end(explode('\\', '\CyberSource\Model\Body')), $this->apiClient->merchantConfig->getRunEnvironment());
509+
$modelClassLocation = explode('\\', '\CyberSource\Model\Body');
510+
511+
$_tempBody = $sdkTracker->insertDeveloperIdTracker($_tempBody, end($modelClassLocation), $this->apiClient->merchantConfig->getRunEnvironment());
510512

511513
// for model (json/xml)
512514
if (isset($_tempBody)) {

lib/Api/BillingAgreementsApi.php

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,9 @@ public function billingAgreementsDeRegistrationWithHttpInfo($modifyBillingAgreem
162162
}
163163

164164
$sdkTracker = new \CyberSource\Utilities\Tracking\SdkTracker();
165-
$_tempBody = $sdkTracker->insertDeveloperIdTracker($_tempBody, end(explode('\\', '\CyberSource\Model\ModifyBillingAgreement')), $this->apiClient->merchantConfig->getRunEnvironment());
165+
$modelClassLocation = explode('\\', '\CyberSource\Model\ModifyBillingAgreement');
166+
167+
$_tempBody = $sdkTracker->insertDeveloperIdTracker($_tempBody, end($modelClassLocation), $this->apiClient->merchantConfig->getRunEnvironment());
166168

167169
// for model (json/xml)
168170
if (isset($_tempBody)) {
@@ -288,7 +290,9 @@ public function billingAgreementsIntimationWithHttpInfo($intimateBillingAgreemen
288290
}
289291

290292
$sdkTracker = new \CyberSource\Utilities\Tracking\SdkTracker();
291-
$_tempBody = $sdkTracker->insertDeveloperIdTracker($_tempBody, end(explode('\\', '\CyberSource\Model\IntimateBillingAgreement')), $this->apiClient->merchantConfig->getRunEnvironment());
293+
$modelClassLocation = explode('\\', '\CyberSource\Model\IntimateBillingAgreement');
294+
295+
$_tempBody = $sdkTracker->insertDeveloperIdTracker($_tempBody, end($modelClassLocation), $this->apiClient->merchantConfig->getRunEnvironment());
292296

293297
// for model (json/xml)
294298
if (isset($_tempBody)) {
@@ -399,7 +403,9 @@ public function billingAgreementsRegistrationWithHttpInfo($createBillingAgreemen
399403
}
400404

401405
$sdkTracker = new \CyberSource\Utilities\Tracking\SdkTracker();
402-
$_tempBody = $sdkTracker->insertDeveloperIdTracker($_tempBody, end(explode('\\', '\CyberSource\Model\CreateBillingAgreement')), $this->apiClient->merchantConfig->getRunEnvironment());
406+
$modelClassLocation = explode('\\', '\CyberSource\Model\CreateBillingAgreement');
407+
408+
$_tempBody = $sdkTracker->insertDeveloperIdTracker($_tempBody, end($modelClassLocation), $this->apiClient->merchantConfig->getRunEnvironment());
403409

404410
// for model (json/xml)
405411
if (isset($_tempBody)) {

lib/Api/CaptureApi.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,9 @@ public function capturePaymentWithHttpInfo($capturePaymentRequest, $id)
162162
}
163163

164164
$sdkTracker = new \CyberSource\Utilities\Tracking\SdkTracker();
165-
$_tempBody = $sdkTracker->insertDeveloperIdTracker($_tempBody, end(explode('\\', '\CyberSource\Model\CapturePaymentRequest')), $this->apiClient->merchantConfig->getRunEnvironment());
165+
$modelClassLocation = explode('\\', '\CyberSource\Model\CapturePaymentRequest');
166+
167+
$_tempBody = $sdkTracker->insertDeveloperIdTracker($_tempBody, end($modelClassLocation), $this->apiClient->merchantConfig->getRunEnvironment());
166168

167169
// for model (json/xml)
168170
if (isset($_tempBody)) {

lib/Api/CreateNewWebhooksApi.php

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,9 @@ public function createWebhookSubscriptionWithHttpInfo($createWebhookRequest = nu
144144
}
145145

146146
$sdkTracker = new \CyberSource\Utilities\Tracking\SdkTracker();
147-
$_tempBody = $sdkTracker->insertDeveloperIdTracker($_tempBody, end(explode('\\', '\CyberSource\Model\CreateWebhookRequest')), $this->apiClient->merchantConfig->getRunEnvironment());
147+
$modelClassLocation = explode('\\', '\CyberSource\Model\CreateWebhookRequest');
148+
149+
$_tempBody = $sdkTracker->insertDeveloperIdTracker($_tempBody, end($modelClassLocation), $this->apiClient->merchantConfig->getRunEnvironment());
148150

149151
// for model (json/xml)
150152
if (isset($_tempBody)) {
@@ -390,7 +392,9 @@ public function saveSymEgressKeyWithHttpInfo($vCSenderOrganizationId, $vCPermiss
390392
}
391393

392394
$sdkTracker = new \CyberSource\Utilities\Tracking\SdkTracker();
393-
$_tempBody = $sdkTracker->insertDeveloperIdTracker($_tempBody, end(explode('\\', '\CyberSource\Model\SaveSymEgressKey')), $this->apiClient->merchantConfig->getRunEnvironment());
395+
$modelClassLocation = explode('\\', '\CyberSource\Model\SaveSymEgressKey');
396+
397+
$_tempBody = $sdkTracker->insertDeveloperIdTracker($_tempBody, end($modelClassLocation), $this->apiClient->merchantConfig->getRunEnvironment());
394398

395399
// for model (json/xml)
396400
if (isset($_tempBody)) {

lib/Api/CreditApi.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,9 @@ public function createCreditWithHttpInfo($createCreditRequest)
147147
}
148148

149149
$sdkTracker = new \CyberSource\Utilities\Tracking\SdkTracker();
150-
$_tempBody = $sdkTracker->insertDeveloperIdTracker($_tempBody, end(explode('\\', '\CyberSource\Model\CreateCreditRequest')), $this->apiClient->merchantConfig->getRunEnvironment());
150+
$modelClassLocation = explode('\\', '\CyberSource\Model\CreateCreditRequest');
151+
152+
$_tempBody = $sdkTracker->insertDeveloperIdTracker($_tempBody, end($modelClassLocation), $this->apiClient->merchantConfig->getRunEnvironment());
151153

152154
// for model (json/xml)
153155
if (isset($_tempBody)) {

lib/Api/CustomerApi.php

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -449,7 +449,9 @@ public function patchCustomerWithHttpInfo($customerId, $patchCustomerRequest, $p
449449
}
450450

451451
$sdkTracker = new \CyberSource\Utilities\Tracking\SdkTracker();
452-
$_tempBody = $sdkTracker->insertDeveloperIdTracker($_tempBody, end(explode('\\', '\CyberSource\Model\PatchCustomerRequest')), $this->apiClient->merchantConfig->getRunEnvironment());
452+
$modelClassLocation = explode('\\', '\CyberSource\Model\PatchCustomerRequest');
453+
454+
$_tempBody = $sdkTracker->insertDeveloperIdTracker($_tempBody, end($modelClassLocation), $this->apiClient->merchantConfig->getRunEnvironment());
453455

454456
// for model (json/xml)
455457
if (isset($_tempBody)) {
@@ -587,7 +589,9 @@ public function postCustomerWithHttpInfo($postCustomerRequest, $profileId = null
587589
}
588590

589591
$sdkTracker = new \CyberSource\Utilities\Tracking\SdkTracker();
590-
$_tempBody = $sdkTracker->insertDeveloperIdTracker($_tempBody, end(explode('\\', '\CyberSource\Model\PostCustomerRequest')), $this->apiClient->merchantConfig->getRunEnvironment());
592+
$modelClassLocation = explode('\\', '\CyberSource\Model\PostCustomerRequest');
593+
594+
$_tempBody = $sdkTracker->insertDeveloperIdTracker($_tempBody, end($modelClassLocation), $this->apiClient->merchantConfig->getRunEnvironment());
591595

592596
// for model (json/xml)
593597
if (isset($_tempBody)) {

lib/Api/CustomerPaymentInstrumentApi.php

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -655,7 +655,9 @@ public function patchCustomersPaymentInstrumentWithHttpInfo($customerId, $paymen
655655
}
656656

657657
$sdkTracker = new \CyberSource\Utilities\Tracking\SdkTracker();
658-
$_tempBody = $sdkTracker->insertDeveloperIdTracker($_tempBody, end(explode('\\', '\CyberSource\Model\PatchCustomerPaymentInstrumentRequest')), $this->apiClient->merchantConfig->getRunEnvironment());
658+
$modelClassLocation = explode('\\', '\CyberSource\Model\PatchCustomerPaymentInstrumentRequest');
659+
660+
$_tempBody = $sdkTracker->insertDeveloperIdTracker($_tempBody, end($modelClassLocation), $this->apiClient->merchantConfig->getRunEnvironment());
659661

660662
// for model (json/xml)
661663
if (isset($_tempBody)) {
@@ -809,7 +811,9 @@ public function postCustomerPaymentInstrumentWithHttpInfo($customerId, $postCust
809811
}
810812

811813
$sdkTracker = new \CyberSource\Utilities\Tracking\SdkTracker();
812-
$_tempBody = $sdkTracker->insertDeveloperIdTracker($_tempBody, end(explode('\\', '\CyberSource\Model\PostCustomerPaymentInstrumentRequest')), $this->apiClient->merchantConfig->getRunEnvironment());
814+
$modelClassLocation = explode('\\', '\CyberSource\Model\PostCustomerPaymentInstrumentRequest');
815+
816+
$_tempBody = $sdkTracker->insertDeveloperIdTracker($_tempBody, end($modelClassLocation), $this->apiClient->merchantConfig->getRunEnvironment());
813817

814818
// for model (json/xml)
815819
if (isset($_tempBody)) {

lib/Api/CustomerShippingAddressApi.php

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -655,7 +655,9 @@ public function patchCustomersShippingAddressWithHttpInfo($customerId, $shipping
655655
}
656656

657657
$sdkTracker = new \CyberSource\Utilities\Tracking\SdkTracker();
658-
$_tempBody = $sdkTracker->insertDeveloperIdTracker($_tempBody, end(explode('\\', '\CyberSource\Model\PatchCustomerShippingAddressRequest')), $this->apiClient->merchantConfig->getRunEnvironment());
658+
$modelClassLocation = explode('\\', '\CyberSource\Model\PatchCustomerShippingAddressRequest');
659+
660+
$_tempBody = $sdkTracker->insertDeveloperIdTracker($_tempBody, end($modelClassLocation), $this->apiClient->merchantConfig->getRunEnvironment());
659661

660662
// for model (json/xml)
661663
if (isset($_tempBody)) {
@@ -809,7 +811,9 @@ public function postCustomerShippingAddressWithHttpInfo($customerId, $postCustom
809811
}
810812

811813
$sdkTracker = new \CyberSource\Utilities\Tracking\SdkTracker();
812-
$_tempBody = $sdkTracker->insertDeveloperIdTracker($_tempBody, end(explode('\\', '\CyberSource\Model\PostCustomerShippingAddressRequest')), $this->apiClient->merchantConfig->getRunEnvironment());
814+
$modelClassLocation = explode('\\', '\CyberSource\Model\PostCustomerShippingAddressRequest');
815+
816+
$_tempBody = $sdkTracker->insertDeveloperIdTracker($_tempBody, end($modelClassLocation), $this->apiClient->merchantConfig->getRunEnvironment());
813817

814818
// for model (json/xml)
815819
if (isset($_tempBody)) {

0 commit comments

Comments
 (0)