1+ @ echo off
2+
13java -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
35powershell -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
2123powershell -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
2527REM Batch file to change the content type
2628
@@ -40,6 +42,18 @@ powershell -Command " rename-item -Path ..\CyberSource\test\Model\Tmsv1instrumen
4042
4143powershell -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+
4357xcopy ..\CyberSource ..\ /s /e /y
4458
4559rd /s /q ..\CyberSource
0 commit comments