Skip to content

Commit 65a148a

Browse files
authored
Merge pull request #18 from sharathkatteri/master
Bat file changes for class name
2 parents d4a511b + 1328b5d commit 65a148a

File tree

1 file changed

+15
-1
lines changed

1 file changed

+15
-1
lines changed

generator/cybersource_php_sdk_gen.bat

+15-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
@echo off
2+
13
java -jar swagger-codegen-cli-2.2.3.jar generate -t cybersource-php-template -i cybersource-rest-spec.json -l php -o ../ -c cybersource-php-config.json
24

35
powershell -Command "(Get-Content ..\CyberSource\lib\Api\CaptureApi.php) | ForEach-Object { $_ -replace 'selectHeaderAccept\(\[''application/json', 'selectHeaderAccept([''application/hal+json' } | Set-Content ..\CyberSource\lib\Api\CaptureApi.php"
@@ -20,7 +22,7 @@ powershell -Command "(Get-Content ..\CyberSource\lib\Api\VoidApi.php) | ForEach-
2022

2123
powershell -Command "(Get-Content ..\CyberSource\lib\Api\SearchTransactionsApi.php) | ForEach-Object { $_ -replace 'selectHeaderAccept\(\[''application/json;charset=utf-8', 'selectHeaderAccept([''*/*'} | Set-Content ..\CyberSource\lib\Api\SearchTransactionsApi.php"
2224

23-
powershell -Command "(Get-Content ..\CyberSource\lib\Model\Tmsv1paymentinstrumentsCard.php) | ForEach-Object { $_ -replace '\&\& \!in_array', '&& in_array'} | Set-Content ..\CyberSource\lib\Model\Tmsv1paymentinstrumentsCard.php"
25+
2426

2527
REM Batch file to change the content type
2628

@@ -40,6 +42,18 @@ powershell -Command " rename-item -Path ..\CyberSource\test\Model\Tmsv1instrumen
4042

4143
powershell -Command " rename-item -Path ..\CyberSource\test\Model\Ptsv2paymentsProcessingInformationAuthorizationOptionsInitiatorMerchantInitiatedTransactionTest.php -newname Ptsv2paymentsMerchantInitiatedTransactionTest.php"
4244

45+
powershell -Command "(Get-Content ..\CyberSource\lib\Model\Tmsv1instrumentidentifiersMerchantInitiatedTransaction.php) | ForEach-Object { $_ -replace 'class Tmsv1instrumentidentifiersProcessingInformationAuthorizationOptionsInitiatorMerchantInitiatedTransaction', 'class Tmsv1instrumentidentifiersMerchantInitiatedTransaction'} | Set-Content ..\CyberSource\lib\Model\Tmsv1instrumentidentifiersMerchantInitiatedTransaction.php"
46+
47+
powershell -Command "(Get-Content ..\CyberSource\lib\Model\Tmsv1instrumentidentifiersProcessingInformationAuthorizationOptionsInitiator.php) | ForEach-Object { $_ -replace 'Tmsv1instrumentidentifiersProcessingInformationAuthorizationOptionsInitiatorMerchantInitiatedTransaction', 'Tmsv1instrumentidentifiersMerchantInitiatedTransaction'} | Set-Content ..\CyberSource\lib\Model\Tmsv1instrumentidentifiersProcessingInformationAuthorizationOptionsInitiator.php"
48+
49+
powershell -Command "(Get-Content ..\CyberSource\lib\Model\ReportingV3ReportDefinitionsGet200ResponseReportDefinitions.php) | ForEach-Object { $_ -replace 'csv\'';', 'csv'';const SUPPORTED_FORMATS_JSON =''application/json'';'} | Set-Content ..\CyberSource\lib\Model\ReportingV3ReportDefinitionsGet200ResponseReportDefinitions.php"
50+
51+
powershell -Command "(Get-Content ..\CyberSource\lib\Model\ReportingV3ReportDefinitionsGet200ResponseReportDefinitions.php) | ForEach-Object { $_ -replace 'SUPPORTED_FORMATS_TEXTCSV\,', 'SUPPORTED_FORMATS_TEXTCSV,self::SUPPORTED_FORMATS_JSON,'} | Set-Content ..\CyberSource\lib\Model\ReportingV3ReportDefinitionsGet200ResponseReportDefinitions.php"
52+
53+
powershell -Command "(Get-Content ..\CyberSource\lib\Model\ReportingV3ReportDefinitionsGet200ResponseReportDefinitions.php) | ForEach-Object { $_ -replace 'getSupportedFormatsAllowableValues\(\);', 'getSupportedFormatsAllowableValues();foreach ($allowed_values as &$value) {'} | Set-Content ..\CyberSource\lib\Model\ReportingV3ReportDefinitionsGet200ResponseReportDefinitions.php"
54+
55+
powershell -Command "(Get-Content ..\CyberSource\lib\Model\ReportingV3ReportDefinitionsGet200ResponseReportDefinitions.php) | ForEach-Object { $_ -replace '\$this->container\[\''supportedFormats\''] = \$supportedFormats', '} $this->container[''supportedFormats''] = $supportedFormats'} | Set-Content ..\CyberSource\lib\Model\ReportingV3ReportDefinitionsGet200ResponseReportDefinitions.php"
56+
4357
xcopy ..\CyberSource ..\ /s /e /y
4458

4559
rd /s /q ..\CyberSource

0 commit comments

Comments
 (0)