Skip to content

Commit 1b64e1a

Browse files
author
regula-bot
committed
Merge remote-tracking branch 'origin/stable'
2 parents 28b5f50 + 0e63d7c commit 1b64e1a

22 files changed

+84
-75
lines changed

csharp-generator-config.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"packageName": "Regula.DocumentReader.WebClient",
33
"library": "httpclient",
44
"nullableReferenceTypes": true,
5-
"targetFramework": "net8.0",
5+
"targetFramework": "netstandard2.0",
66
"typeMappings" : {
77
"ContainerListListInner": "ResultItem",
88
"AuthenticityCheckResultListInner": "AuthenticityCheckResultItem"

src/Regula.DocumentReader.WebClient/Client/ApiClient.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@
2222
using System.Threading;
2323
using System.Text.RegularExpressions;
2424
using System.Threading.Tasks;
25-
using System.Web;
2625
using Newtonsoft.Json;
2726
using Newtonsoft.Json.Serialization;
2827
using ErrorEventArgs = Newtonsoft.Json.Serialization.ErrorEventArgs;

src/Regula.DocumentReader.WebClient/Client/ClientUtils.cs

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -100,12 +100,6 @@ public static string ParameterToString(object obj, IReadableConfiguration config
100100
// https://msdn.microsoft.com/en-us/library/az4se3k1(v=vs.110).aspx#Anchor_8
101101
// For example: 2009-06-15T13:45:30.0000000
102102
return dateTimeOffset.ToString((configuration ?? GlobalConfiguration.Instance).DateTimeFormat);
103-
if (obj is DateOnly dateOnly)
104-
// Return a formatted date string - Can be customized with Configuration.DateTimeFormat
105-
// Defaults to an ISO 8601, using the known as a Round-trip date/time pattern ("o")
106-
// https://msdn.microsoft.com/en-us/library/az4se3k1(v=vs.110).aspx#Anchor_8
107-
// For example: 2009-06-15
108-
return dateOnly.ToString((configuration ?? GlobalConfiguration.Instance).DateTimeFormat);
109103
if (obj is bool boolean)
110104
return boolean ? "true" : "false";
111105
if (obj is ICollection collection) {

src/Regula.DocumentReader.WebClient/Client/Configuration.cs

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -58,11 +58,6 @@ public class Configuration : IReadableConfiguration
5858
string.Format("Error calling {0}: {1}", methodName, response.RawContent),
5959
response.RawContent, response.Headers);
6060
}
61-
if (status == 0)
62-
{
63-
return new ApiException(status,
64-
string.Format("Error calling {0}: {1}", methodName, response.ErrorText), response.ErrorText);
65-
}
6661
return null;
6762
};
6863

src/Regula.DocumentReader.WebClient/Model/EncryptedRCLItem.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ protected EncryptedRCLItem() { }
5656
/// </summary>
5757
/// <value>Base64 encoded data</value>
5858
/*
59-
<example>[B@671e627</example>
59+
<example>[B@638eef98</example>
6060
*/
6161
[DataMember(Name = "EncryptedRCL", IsRequired = true, EmitDefaultValue = true)]
6262
public byte[] EncryptedRCL { get; set; }

src/Regula.DocumentReader.WebClient/Model/EncryptedRCLResult.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ protected EncryptedRCLResult() { }
6262
/// </summary>
6363
/// <value>Base64 encoded data</value>
6464
/*
65-
<example>[B@671e627</example>
65+
<example>[B@638eef98</example>
6666
*/
6767
[DataMember(Name = "EncryptedRCL", IsRequired = true, EmitDefaultValue = true)]
6868
public byte[] EncryptedRCL { get; set; }

src/Regula.DocumentReader.WebClient/Model/FDSIDList.cs

Lines changed: 12 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -53,13 +53,13 @@ protected FDSIDList() { }
5353
/// Initializes a new instance of the <see cref="FDSIDList" /> class.
5454
/// </summary>
5555
/// <param name="iCAOCode">ICAO code of the issuing country (required).</param>
56-
/// <param name="count">Number of elements in the List (required).</param>
57-
/// <param name="list">Document identifiers in &#39;Information Reference Systems&#39; (required).</param>
56+
/// <param name="count">Number of elements in the List.</param>
57+
/// <param name="list">Document identifiers in &#39;Information Reference Systems&#39;.</param>
5858
/// <param name="dType">dType (required).</param>
5959
/// <param name="dFormat">dFormat (required).</param>
6060
/// <param name="dMRZ">Flag indicating the presence of MRZ on the document (required).</param>
6161
/// <param name="dDescription">Document description.</param>
62-
/// <param name="dYear">Year of publication of the document (required).</param>
62+
/// <param name="dYear">Year of publication of the document.</param>
6363
/// <param name="dCountryName">Issuing country name (required).</param>
6464
/// <param name="dStateCode">Issuing state code.</param>
6565
/// <param name="dStateName">Issuing state name.</param>
@@ -72,30 +72,20 @@ protected FDSIDList() { }
7272
throw new ArgumentNullException("iCAOCode is a required property for FDSIDList and cannot be null");
7373
}
7474
this.ICAOCode = iCAOCode;
75-
this.Count = count;
76-
// to ensure "list" is required (not null)
77-
if (list == null)
78-
{
79-
throw new ArgumentNullException("list is a required property for FDSIDList and cannot be null");
80-
}
81-
this.List = list;
8275
this.DType = dType;
8376
this.DFormat = dFormat;
8477
this.DMRZ = dMRZ;
85-
// to ensure "dYear" is required (not null)
86-
if (dYear == null)
87-
{
88-
throw new ArgumentNullException("dYear is a required property for FDSIDList and cannot be null");
89-
}
90-
this.DYear = dYear;
9178
// to ensure "dCountryName" is required (not null)
9279
if (dCountryName == null)
9380
{
9481
throw new ArgumentNullException("dCountryName is a required property for FDSIDList and cannot be null");
9582
}
9683
this.DCountryName = dCountryName;
9784
this.IsDeprecated = isDeprecated;
85+
this.Count = count;
86+
this.List = list;
9887
this.DDescription = dDescription;
88+
this.DYear = dYear;
9989
this.DStateCode = dStateCode;
10090
this.DStateName = dStateName;
10191
}
@@ -111,15 +101,15 @@ protected FDSIDList() { }
111101
/// Number of elements in the List
112102
/// </summary>
113103
/// <value>Number of elements in the List</value>
114-
[DataMember(Name = "Count", IsRequired = true, EmitDefaultValue = true)]
115-
public decimal Count { get; set; }
104+
[DataMember(Name = "Count", EmitDefaultValue = false)]
105+
public decimal? Count { get; set; }
116106

117107
/// <summary>
118108
/// Document identifiers in &#39;Information Reference Systems&#39;
119109
/// </summary>
120110
/// <value>Document identifiers in &#39;Information Reference Systems&#39;</value>
121-
[DataMember(Name = "List", IsRequired = true, EmitDefaultValue = true)]
122-
public List<int> List { get; set; }
111+
[DataMember(Name = "List", EmitDefaultValue = false)]
112+
public List<int>? List { get; set; }
123113

124114
/// <summary>
125115
/// Flag indicating the presence of MRZ on the document
@@ -139,8 +129,8 @@ protected FDSIDList() { }
139129
/// Year of publication of the document
140130
/// </summary>
141131
/// <value>Year of publication of the document</value>
142-
[DataMember(Name = "dYear", IsRequired = true, EmitDefaultValue = true)]
143-
public string DYear { get; set; }
132+
[DataMember(Name = "dYear", EmitDefaultValue = false)]
133+
public string? DYear { get; set; }
144134

145135
/// <summary>
146136
/// Issuing country name

src/Regula.DocumentReader.WebClient/Model/LCID.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -293,9 +293,9 @@ public enum LCID
293293
ESTONIAN = 1061,
294294

295295
/// <summary>
296-
/// Enum FAEROESE for value: 1080
296+
/// Enum FAROESE for value: 1080
297297
/// </summary>
298-
FAEROESE = 1080,
298+
FAROESE = 1080,
299299

300300
/// <summary>
301301
/// Enum FARSI for value: 1065

src/Regula.DocumentReader.WebClient/Model/LicenseItem.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ protected LicenseItem() { }
5656
/// </summary>
5757
/// <value>Base64 encoded data</value>
5858
/*
59-
<example>[B@3768c9b</example>
59+
<example>[B@19a26868</example>
6060
*/
6161
[DataMember(Name = "License", IsRequired = true, EmitDefaultValue = true)]
6262
public byte[] License { get; set; }

src/Regula.DocumentReader.WebClient/Model/LicenseResult.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ protected LicenseResult() { }
6262
/// </summary>
6363
/// <value>Base64 encoded data</value>
6464
/*
65-
<example>[B@3768c9b</example>
65+
<example>[B@19a26868</example>
6666
*/
6767
[DataMember(Name = "License", IsRequired = true, EmitDefaultValue = true)]
6868
public byte[] License { get; set; }

0 commit comments

Comments
 (0)