1
+ @ echo off
2
+
1
3
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
2
4
3
5
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-
20
22
21
23
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"
22
24
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
+
24
26
25
27
REM Batch file to change the content type
26
28
@@ -40,6 +42,18 @@ powershell -Command " rename-item -Path ..\CyberSource\test\Model\Tmsv1instrumen
40
42
41
43
powershell -Command " rename-item -Path ..\CyberSource\test\Model\Ptsv2paymentsProcessingInformationAuthorizationOptionsInitiatorMerchantInitiatedTransactionTest.php -newname Ptsv2paymentsMerchantInitiatedTransactionTest.php"
42
44
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
+
43
57
xcopy ..\CyberSource ..\ /s /e /y
44
58
45
59
rd /s /q ..\CyberSource
0 commit comments