Skip to content

Commit

Permalink
separate register/unregister methods
Browse files Browse the repository at this point in the history
clarify startexportsession, exportdata, endexportsession usage
resolved comment from #4
  • Loading branch information
steininger committed Apr 30, 2020
1 parent cdd386c commit 6c3fd08
Show file tree
Hide file tree
Showing 13 changed files with 60 additions and 57 deletions.
18 changes: 6 additions & 12 deletions src/fiskaltrust.ifPOS/v1/de/IDESSCD.cs
Original file line number Diff line number Diff line change
Expand Up @@ -27,46 +27,42 @@ public interface IDESSCD
#endif
Task<FinishTransactionResponse> FinishTransactionAsync(FinishTransactionRequest request);


[OperationContract]
#if WCF
[WebInvoke(BodyStyle = WebMessageBodyStyle.Bare, UriTemplate = "v1/tseinfo", Method = "GET")]
#endif
Task<TseInfo> GetTseInfoAsync();


[OperationContract]
#if WCF
[WebInvoke(BodyStyle = WebMessageBodyStyle.Bare, UriTemplate = "v1/tsestate", Method = "POST")]
#endif
Task<TseState> SetTseStateAsync(TseState state);


[OperationContract]
#if WCF
[WebInvoke(BodyStyle = WebMessageBodyStyle.Bare, UriTemplate = "v1/registerclientid", Method = "POST")]
#endif
Task<ClientIdResponse> RegisterClientId(ClientIdRequest request);
Task<RegisterClientIdResponse> RegisterClientId(RegisterClientIdRequest request);

[OperationContract]
#if WCF
[WebInvoke(BodyStyle = WebMessageBodyStyle.Bare, UriTemplate = "v1/unregisterclientid", Method = "POST")]
#endif
Task<ClientIdResponse> UnRegisterClientId(ClientIdRequest request);
Task<UnregisterClientIdResponse> UnRegisterClientId(UnregisterClientIdRequest request);

[OperationContract]
#if WCF
[WebInvoke(BodyStyle = WebMessageBodyStyle.Bare, UriTemplate = "v1/executesettsetime", Method = "GET")]
[WebInvoke(BodyStyle = WebMessageBodyStyle.Bare, UriTemplate = "v1/executesettsetime", Method = "POST")]
#endif
Task ExecuteSetTseTimeAsync();

[OperationContract]
#if WCF
[WebInvoke(BodyStyle = WebMessageBodyStyle.Bare, UriTemplate = "v1/executeselftest", Method = "GET")]
[WebInvoke(BodyStyle = WebMessageBodyStyle.Bare, UriTemplate = "v1/executeselftest", Method = "POST")]
#endif
Task ExecuteSelfTestAsync();


[OperationContract]
#if WCF
[WebInvoke(BodyStyle = WebMessageBodyStyle.Bare, UriTemplate = "v1/startexportsession", Method = "POST")]
Expand All @@ -87,16 +83,14 @@ public interface IDESSCD

[OperationContract]
#if WCF
[WebInvoke(BodyStyle = WebMessageBodyStyle.Bare, UriTemplate = "v1/export", Method = "POST")]
[WebInvoke(BodyStyle = WebMessageBodyStyle.Bare, UriTemplate = "v1/exportdata", Method = "POST")]
#endif
Task<ExportDataResponse> ExportAsync(StartExportSessionByTransactionRequest request);
Task<ExportDataResponse> ExportDataAsync(ExportDataRequest request);

[OperationContract]
#if WCF
[WebInvoke(BodyStyle = WebMessageBodyStyle.Bare, UriTemplate = "v1/endexportsession", Method = "POST")]
#endif
Task<EndExportSessionResponse> EndExportSessionAsync(EndExportSessionRequest request);


}
}
12 changes: 4 additions & 8 deletions src/fiskaltrust.ifPOS/v1/de/Models/EndExportSessionRequest.cs
Original file line number Diff line number Diff line change
@@ -1,21 +1,17 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.Serialization;
using System.Text;
using System.Runtime.Serialization;

namespace fiskaltrust.ifPOS.v1.de
{
[DataContract]
public class EndExportSessionRequest
{
[DataMember(Order = 10)]
StartExportSessionResponse Session { get; set; }
public string TokenId { get; set; }

[DataMember(Order = 20)]
string Sha256ChecksumBase64 { get; set; }
public string Sha256ChecksumBase64 { get; set; }

[DataMember(Order = 30)]
bool Erase { get; set; }
public bool Erase { get; set; }
}
}
12 changes: 4 additions & 8 deletions src/fiskaltrust.ifPOS/v1/de/Models/EndExportSessionResponse.cs
Original file line number Diff line number Diff line change
@@ -1,21 +1,17 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.Serialization;
using System.Text;
using System.Runtime.Serialization;

namespace fiskaltrust.ifPOS.v1.de
{
[DataContract]
public class EndExportSessionResponse
{
[DataMember(Order = 10)]
StartExportSessionResponse Session { get; set; }
public string TokenId { get; set; }

[DataMember(Order = 20)]
bool IsValid { get; set; }
public bool IsValid { get; set; }

[DataMember(Order = 30)]
bool IsErased { get; set; }
public bool IsErased { get; set; }
}
}
13 changes: 13 additions & 0 deletions src/fiskaltrust.ifPOS/v1/de/Models/ExportDataRequest.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
using System.Runtime.Serialization;

namespace fiskaltrust.ifPOS.v1.de
{
[DataContract]
public class ExportDataRequest
{
[DataMember(Order = 10)]
public string TokenId { get; set; }
[DataMember(Order = 20)]
public int MaxJunkSize { get; set; }
}
}
9 changes: 3 additions & 6 deletions src/fiskaltrust.ifPOS/v1/de/Models/ExportDataResponse.cs
Original file line number Diff line number Diff line change
@@ -1,18 +1,15 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Collections.Generic;
using System.Runtime.Serialization;
using System.Text;

namespace fiskaltrust.ifPOS.v1.de
{
[DataContract]
public class ExportDataResponse
{
[DataMember(Order = 10)]
StartExportSessionResponse Session { get; set; }
public string TokenId { get; set; }

[DataMember(Order = 20)]
IEnumerable<string> TarFileByteJunkBase64 { get; set; }
public IEnumerable<string> TarFileByteJunksBase64 { get; set; }
}
}
11 changes: 11 additions & 0 deletions src/fiskaltrust.ifPOS/v1/de/Models/RegisterClientIdRequest.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
using System.Runtime.Serialization;

namespace fiskaltrust.ifPOS.v1.de
{
[DataContract]
public class RegisterClientIdRequest
{
[DataMember(Order = 10)]
public string ClientId { get; set; }
}
}
12 changes: 12 additions & 0 deletions src/fiskaltrust.ifPOS/v1/de/Models/RegisterClientIdResponse.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
using System.Collections.Generic;
using System.Runtime.Serialization;

namespace fiskaltrust.ifPOS.v1.de
{
[DataContract]
public class RegisterClientIdResponse
{
[DataMember(Order = 10)]
public IEnumerable<string> ClientIds { get; set; }
}
}
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.Serialization;
using System.Text;

namespace fiskaltrust.ifPOS.v1.de
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,4 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.Serialization;
using System.Text;
using System.Runtime.Serialization;

namespace fiskaltrust.ifPOS.v1.de
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,4 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.Serialization;
using System.Text;
using System.Runtime.Serialization;

namespace fiskaltrust.ifPOS.v1.de
{
Expand Down
11 changes: 3 additions & 8 deletions src/fiskaltrust.ifPOS/v1/de/Models/TseInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,6 @@ public class TseInfo
[DataMember(Order = 50)]
public long CurrentNumberOfTransactions { get; set; }

/*
[DataMember(Order = 60)]
public IEnumerable<CertificateInfo> Certificates { get; set; }
[DataMember(Order = 70)]
public IEnumerable<string> SerialNumbersBase64 { get; set; }
*/

[DataMember(Order = 60)]
public string TsePublicKeyBase64 { get; set; }

Expand All @@ -39,6 +31,9 @@ public class TseInfo
public TseState CurrentState { get; set; }

[DataMember(Order = 90)]
public IEnumerable<string> CertificatesBase64 { get; set; }

[DataMember(Order = 100)]
public Dictionary<string, object> Info { get; set; }
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
namespace fiskaltrust.ifPOS.v1.de
{
[DataContract]
public class ClientIdRequest
public class UnregisterClientIdRequest
{
[DataMember(Order = 10)]
public string ClientId { get; set; }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
namespace fiskaltrust.ifPOS.v1.de
{
[DataContract]
public class ClientIdResponse
public class UnregisterClientIdResponse
{
[DataMember(Order = 10)]
public IEnumerable<string> ClientIds { get; set; }
Expand Down

0 comments on commit 6c3fd08

Please sign in to comment.