Skip to content

Commit 644cb93

Browse files
committed
+ Fixing build issues
1 parent e5b5f40 commit 644cb93

File tree

4 files changed

+23
-31
lines changed

4 files changed

+23
-31
lines changed

generator/ReportsApiLocalVarPath.txt

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
var localVarPath = $"/reporting/v3/reports";
2-
if (!string.IsNullOrEmpty(organizationId))
2+
if (!string.IsNullOrEmpty(organizationId))
33
localVarPath += $"?organizationId={organizationId}";
44

55
localVarPath += $"&startTime={startTime.Value.ToString("yyyy-MM-ddTHH:mm:ssZ")}";
@@ -19,5 +19,4 @@
1919
localVarPath += $"&reportDefinitionId={reportDefinitionId}";
2020

2121
if (!string.IsNullOrEmpty(reportStatus))
22-
localVarPath += $"&reportStatus={reportStatus}";
23-
22+
localVarPath += $"&reportStatus={reportStatus}";

generator/cybersource-csharp-template/Project.mustache

Lines changed: 4 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -68,22 +68,13 @@
6868
<Reference Include="System.Runtime.Serialization" />
6969
<Reference Include="System.Xml" />
7070
<Reference Include="AuthenticationSdk">
71-
<HintPath Condition="Exists('$(SolutionDir)\packages')">$(SolutionDir)\packages\CyberSource.Authentication.0.0.0.3\lib\AuthenticationSdk.dll</HintPath>
72-
<HintPath Condition="Exists('..\packages')">..\packages\CyberSource.Authentication.0.0.0.3\lib\AuthenticationSdk.dll</HintPath>
73-
<HintPath Condition="Exists('..\..\packages')">..\..\packages\CyberSource.Authentication.0.0.0.3\lib\AuthenticationSdk.dll</HintPath>
74-
<HintPath Condition="Exists('{{binRelativePath}}')">{{binRelativePath}}\CyberSource.Authentication.0.0.0.3\lib\AuthenticationSdk.dll</HintPath>
71+
<HintPath>packages\CyberSource.Authentication.0.0.0.3\lib\AuthenticationSdk.dll</HintPath>
7572
</Reference>
7673
<Reference Include="Newtonsoft.Json">
77-
<HintPath Condition="Exists('$(SolutionDir)\packages')">$(SolutionDir)\packages\Newtonsoft.Json.10.0.3\lib\{{targetFrameworkNuget}}\Newtonsoft.Json.dll</HintPath>
78-
<HintPath Condition="Exists('..\packages')">..\packages\Newtonsoft.Json.10.0.3\lib\{{targetFrameworkNuget}}\Newtonsoft.Json.dll</HintPath>
79-
<HintPath Condition="Exists('..\..\packages')">..\..\packages\Newtonsoft.Json.10.0.3\lib\{{targetFrameworkNuget}}\Newtonsoft.Json.dll</HintPath>
80-
<HintPath Condition="Exists('{{binRelativePath}}')">{{binRelativePath}}\Newtonsoft.Json.10.0.3\lib\{{targetFrameworkNuget}}\Newtonsoft.Json.dll</HintPath>
74+
<HintPath>packages\Newtonsoft.Json.10.0.3\lib\{{targetFrameworkNuget}}\Newtonsoft.Json.dll</HintPath>
8175
</Reference>
8276
<Reference Include="RestSharp">
83-
<HintPath Condition="Exists('$(SolutionDir)\packages')">$(SolutionDir)\packages\RestSharp.105.1.0\lib\{{targetFrameworkNuget}}\RestSharp.dll</HintPath>
84-
<HintPath Condition="Exists('..\packages')">..\packages\RestSharp.105.1.0\lib\{{targetFrameworkNuget}}\RestSharp.dll</HintPath>
85-
<HintPath Condition="Exists('..\..\packages')">..\..\packages\RestSharp.105.1.0\lib\{{targetFrameworkNuget}}\RestSharp.dll</HintPath>
86-
<HintPath Condition="Exists('{{binRelativePath}}')">{{binRelativePath}}\RestSharp.105.1.0\lib\{{targetFrameworkNuget}}\RestSharp.dll</HintPath>
77+
<HintPath>packages\RestSharp.106.5.3\lib\{{targetFrameworkNuget}}\RestSharp.dll</HintPath>
8778
</Reference>
8879
{{#generatePropertyChanged}}
8980
<Reference Include="PropertyChanged">
@@ -98,7 +89,7 @@
9889
</ItemGroup>
9990
<ItemGroup>
10091
<Compile Include="**\*.cs"
101-
Exclude="obj\**" />
92+
Exclude="obj\**;test\**" />
10293
</ItemGroup>
10394
{{^netStandard}}
10495
<ItemGroup>
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<packages>
33
<package id="NUnit" version="2.6.4" targetFramework="{{targetFrameworkNuget}}" />
4-
<package id="RestSharp" version="105.1.0" targetFramework="{{targetFrameworkNuget}}" developmentDependency="true" />
4+
<package id="RestSharp" version="106.5.3" targetFramework="{{targetFrameworkNuget}}" developmentDependency="true" />
55
<package id="Newtonsoft.Json" version="10.0.3" targetFramework="{{targetFrameworkNuget}}" developmentDependency="true" />
66
</packages>

generator/cybersource_csharp_sdk_gen.bat

Lines changed: 16 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -17,31 +17,33 @@ powershell -Command "(Get-Content ..\src\CyberSource\Api\SecureFileShareApi.cs)
1717

1818

1919
rem For Converting the datetime values to string while appending them to the localVarPath and commenting out the values being set in query params obj
20-
powershell -Command "(Get-Content ..\src\CyberSource\Api\TransactionBatchesApi.cs) | ForEach-Object { $_ -replace '/pts/v1/transaction-batches', '/pts/v1/transaction-batches?startTime={startTime.Value.ToString(\"yyyy-MM-ddTHH:mm:ssZ\")}&endTime={endTime.Value.ToString(\"yyyy-MM-ddTHH:mm:ssZ\")}' } | Set-Content ..\src\CyberSource\Api\TransactionBatchesApi.cs"
20+
powershell -Command "$fileContents = (get-content ..\src\CyberSource\Api\TransactionBatchesApi.cs) ; $fileContents[257] = $fileContents[257] -replace '/pts/v1/transaction-batches', '/pts/v1/transaction-batches?startTime={startTime.Value.ToString("yyyy-MM-ddTHH:mm:ssZ")}&endTime={endTime.Value.ToString("yyyy-MM-ddTHH:mm:ssZ")}' ; $fileContents[331] = $fileContents[331] -replace '/pts/v1/transaction-batches', '/pts/v1/transaction-batches?startTime={startTime.Value.ToString("yyyy-MM-ddTHH:mm:ssZ")}&endTime={endTime.Value.ToString("yyyy-MM-ddTHH:mm:ssZ")}' ; $fileContents|Set-Content ..\src\CyberSource\Api\TransactionBatchesApi.cs"
2121

2222
powershell -Command "(Get-Content ..\src\CyberSource\Api\TransactionBatchesApi.cs) | ForEach-Object { $_ -replace 'if \(startTime != null\)', '//if (startTime != null)' } | Set-Content ..\src\CyberSource\Api\TransactionBatchesApi.cs"
2323

2424
powershell -Command "(Get-Content ..\src\CyberSource\Api\TransactionBatchesApi.cs) | ForEach-Object { $_ -replace 'if \(endTime != null\)', '//if (endTime != null)' } | Set-Content ..\src\CyberSource\Api\TransactionBatchesApi.cs"
2525

26-
powershell -Command "$fileContents = (get-content ..\src\CyberSource\Api\ReportsApi.cs) ; $fileContents[660] = ''; $fileContents|Set-Content ..\src\CyberSource\Api\ReportsApi.cs"
26+
powershell -Command "$fileContents = (get-content ..\src\CyberSource\Api\ReportsApi.cs) ; $fileContents[660] = $fileContents[660] -replace 'Configuration.ApiClient.SelectHeaderContentType\(localVarHttpContentTypes\)', '\"\"'; $fileContents|Set-Content ..\src\CyberSource\Api\ReportsApi.cs"
2727

28-
powershell -Command "$fileContents = (get-content ..\src\CyberSource\Api\ReportsApi.cs) ; $fileContents[661] = ''; $fileContents|Set-Content ..\src\CyberSource\Api\ReportsApi.cs"
28+
powershell -Command "$fileContents = (get-content ..\src\CyberSource\Api\ReportsApi.cs) ; $fileContents[670] = ''; $fileContents|Set-Content ..\src\CyberSource\Api\ReportsApi.cs"
2929

30-
powershell -Command "$fileContents = (get-content ..\src\CyberSource\Api\ReportsApi.cs) ; $fileContents[662] = ''; $fileContents|Set-Content ..\src\CyberSource\Api\ReportsApi.cs"
30+
powershell -Command "$fileContents = (get-content ..\src\CyberSource\Api\ReportsApi.cs) ; $fileContents[671] = ''; $fileContents|Set-Content ..\src\CyberSource\Api\ReportsApi.cs"
3131

32-
powershell -Command "$fileContents = (get-content ..\src\CyberSource\Api\ReportsApi.cs) ; $fileContents[663] = ''; $fileContents|Set-Content ..\src\CyberSource\Api\ReportsApi.cs"
32+
powershell -Command "$fileContents = (get-content ..\src\CyberSource\Api\ReportsApi.cs) ; $fileContents[672] = ''; $fileContents|Set-Content ..\src\CyberSource\Api\ReportsApi.cs"
3333

34-
powershell -Command "$fileContents = (get-content ..\src\CyberSource\Api\ReportsApi.cs) ; $fileContents[664] = ''; $fileContents|Set-Content ..\src\CyberSource\Api\ReportsApi.cs"
34+
powershell -Command "$fileContents = (get-content ..\src\CyberSource\Api\ReportsApi.cs) ; $fileContents[673] = ''; $fileContents|Set-Content ..\src\CyberSource\Api\ReportsApi.cs"
3535

36-
powershell -Command "$fileContents = (get-content ..\src\CyberSource\Api\ReportsApi.cs) ; $fileContents[665] = ''; $fileContents|Set-Content ..\src\CyberSource\Api\ReportsApi.cs"
36+
powershell -Command "$fileContents = (get-content ..\src\CyberSource\Api\ReportsApi.cs) ; $fileContents[674] = ''; $fileContents|Set-Content ..\src\CyberSource\Api\ReportsApi.cs"
3737

38-
powershell -Command "$fileContents = (get-content ..\src\CyberSource\Api\ReportsApi.cs) ; $fileContents[666] = ''; $fileContents|Set-Content ..\src\CyberSource\Api\ReportsApi.cs"
38+
powershell -Command "$fileContents = (get-content ..\src\CyberSource\Api\ReportsApi.cs) ; $fileContents[675] = ''; $fileContents|Set-Content ..\src\CyberSource\Api\ReportsApi.cs"
3939

40-
powershell -Command "$fileContents = (get-content ..\src\CyberSource\Api\ReportsApi.cs) ; $fileContents[667] = ''; $fileContents|Set-Content ..\src\CyberSource\Api\ReportsApi.cs"
40+
powershell -Command "$fileContents = (get-content ..\src\CyberSource\Api\ReportsApi.cs) ; $fileContents[676] = ''; $fileContents|Set-Content ..\src\CyberSource\Api\ReportsApi.cs"
4141

42-
powershell -Command "$fileContents = (get-content ..\src\CyberSource\Api\ReportsApi.cs) ; $fileContents[668] = ''; $fileContents|Set-Content ..\src\CyberSource\Api\ReportsApi.cs"
42+
powershell -Command "$fileContents = (get-content ..\src\CyberSource\Api\ReportsApi.cs) ; $fileContents[677] = ''; $fileContents|Set-Content ..\src\CyberSource\Api\ReportsApi.cs"
4343

44-
powershell -Command "$fileContents = (get-content ..\src\CyberSource\Api\ReportsApi.cs) ; $fileContents[638] = (get-content ReportsApiLocalVarPath.txt); $fileContents|Set-Content ..\src\CyberSource\Api\ReportsApi.cs"
44+
powershell -Command "$fileContents = (get-content ..\src\CyberSource\Api\ReportsApi.cs) ; $fileContents[678] = ''; $fileContents|Set-Content ..\src\CyberSource\Api\ReportsApi.cs"
45+
46+
powershell -Command "$fileContents = (get-content ..\src\CyberSource\Api\ReportsApi.cs) ; $fileContents[648] = (get-content ReportsApiLocalVarPath.txt); $fileContents|Set-Content ..\src\CyberSource\Api\ReportsApi.cs"
4547

4648

4749
rem For Removing the length check for a property which is currently giving compile time error
@@ -100,7 +102,7 @@ REM powershell -Command "$fileContents = (get-content ..\src\CyberSource\Model\R
100102

101103
rem For changing nuspec filename in csproj file
102104

103-
powershell -Command "(Get-Content ..\src\CyberSource\CyberSource.csproj) | ForEach-Object { $_ -replace '<None Include="CyberSource.nuspec" />', '<None Include="cybersource-rest-client-dotnet.nuspec" />' } | Set-Content ..\src\CyberSource\CyberSource.csproj"
105+
powershell -Command "(Get-Content ..\src\CyberSource\CyberSource.csproj) | ForEach-Object { $_ -replace '<None Include=\"CyberSource.nuspec\" />', '<None Include=\"cybersource-rest-client-dotnet.nuspec\" />' } | Set-Content ..\src\CyberSource\CyberSource.csproj"
104106

105107
rem For Renaming the .csproj file Name from Cybersource to cybersource-rest-client-dotnet
106108
powershell Rename-Item ..\src\CyberSource\CyberSource.csproj cybersource-rest-client-dotnet.csproj
@@ -114,10 +116,10 @@ del ..\cybersource-rest-client-dotnet.sln
114116

115117
powershell Rename-Item ..\CyberSource.sln cybersource-rest-client-dotnet.sln
116118

117-
xcopy ..\src\CyberSource ..\ /s /e /y /Exclude:excludeList.txt
119+
xcopy ..\src\cybersource ..\ /s /e /y /exclude:excludelist.txt
118120
git checkout ..\README.md
119121
md ..\test
120-
xcopy ..\src\CyberSource.Test ..\test /s /e /y
122+
xcopy ..\src\cybersource.test ..\test /s /e /y
121123

122124
rd /s /q ..\src
123125

0 commit comments

Comments
 (0)