Skip to content
This repository was archived by the owner on Aug 18, 2023. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions keypay-dotnet.sln
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@


Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 15
VisualStudioVersion = 15.0.26228.4
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "keypay-dotnet", "src\keypay-dotnet\keypay-dotnet.csproj", "{93365E33-3B92-4EA6-AB42-FFECBC504138}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "keypay-dotnet", "src\keypay-dotnet\keypay-dotnet.csproj", "{93365E33-3B92-4EA6-AB42-FFECBC504138}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SampleApplication", "test\SampleApplication\SampleApplication.csproj", "{08F68476-5DE7-4C24-AEB5-3FFF29DF1C87}"
EndProject
Expand Down
5 changes: 5 additions & 0 deletions src/keypay-dotnet/ApiFunctions/V2/PayScheduleFunction.cs
Original file line number Diff line number Diff line change
Expand Up @@ -39,5 +39,10 @@ public void Delete(int businessId, int payCategoryId)
{
ApiRequest($"/business/{businessId}/payschedule/{payCategoryId}", Method.Delete);
}

public PayScheduleDateForecastResultApiModel GetNextPayDate(int businessId, int payScheduleId)
{
return ApiRequest<PayScheduleDateForecastResultApiModel>($"/business/{businessId}/payschedule/{payScheduleId}/nextpaydate");
}
}
}
14 changes: 7 additions & 7 deletions src/keypay-dotnet/ApiRequestExecutor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
using Newtonsoft.Json;
using RestSharp;
using RestSharp.Authenticators;
using RestSharp.Serializers;
using RestSharp.Serializers.NewtonsoftJson;

namespace KeyPay
Expand Down Expand Up @@ -55,15 +56,14 @@ private RestClient GetClient(RestRequest request)
var options = new RestClientOptions
{
BaseUrl = new Uri(baseUrl),
MaxTimeout = 600000 // 10 min timeout for long EI queries
Authenticator = Authenticator,
MaxTimeout = 600000,
// 10 min timeout for long EI queries
};

var client = new RestClient(options, configureSerialization: s => s.UseNewtonsoftJson() ) ;

var client = new RestClient(options)
{
Authenticator = Authenticator
};

client.UseNewtonsoftJson();


request.OnBeforeDeserialization = resp => HandleResponse(resp, request.Method, request.Resource);
return client;
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
using System;

namespace KeyPay.DomainModels.V2.Business
{
public class PayScheduleDateForecastResultApiModel
{
public int PayScheduleId { get; set; }
public DateTime? NextScheduledPaidDate { get; set; }
public DateTime? NextScheduledFromDate { get; set; }
public DateTime? NextScheduledToDate { get; set; }
}
}
21 changes: 0 additions & 21 deletions src/keypay-dotnet/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
@@ -1,13 +1,5 @@
using System.Reflection;
using System.Runtime.InteropServices;

// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("KeyPay")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyProduct("KeyPay")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]

Expand All @@ -18,16 +10,3 @@

// The following GUID is for the ID of the typelib if this project is exposed to COM
[assembly: Guid("93365e33-3b92-4ea6-ab42-ffecbc504138")]

// Version information for an assembly consists of the following four values:
//
// Major Version
// Minor Version
// Build Number
// Revision
//
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyInformationalVersion("1.1.0.18")]
[assembly: AssemblyFileVersion("1.0.0.0")]
20 changes: 18 additions & 2 deletions src/keypay-dotnet/app.config
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,24 @@
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="System.Runtime.CompilerServices.Unsafe" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-5.0.0.0" newVersion="5.0.0.0" />
<bindingRedirect oldVersion="0.0.0.0-6.0.0.0" newVersion="6.0.0.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="Microsoft.Bcl.AsyncInterfaces" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-7.0.0.0" newVersion="7.0.0.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Text.Json" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-7.0.0.3" newVersion="7.0.0.3" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-13.0.0.0" newVersion="13.0.0.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="RestSharp" publicKeyToken="598062e77f915f75" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-110.2.0.0" newVersion="110.2.0.0" />
</dependentAssembly>
</assemblyBinding>
</runtime>
</configuration>
<startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.7.2" /></startup></configuration>
Loading