Add ability to explicitly provide userAccessToken to requests; add V3 OTP endpoints (while also keeping V2 endpoints)
This commit is contained in:
1 parent
9fe5913be3
commit
1eec7eab28
21 files changed
+1464
No files matched your search
@@ -0,0 +1,38 @@
|
||||
using System.Text.Json.Serialization;
|
||||
|
||||
public class ErrorResponse
|
||||
{
|
||||
[JsonConstructor]
|
||||
public ErrorResponse(Error[] errors, string exceptionClassName, string exceptionStackTrace)
|
||||
{
|
||||
this.errors = errors;
|
||||
this.exceptionClassName = exceptionClassName;
|
||||
this.exceptionStackTrace = exceptionStackTrace;
|
||||
}
|
||||
|
||||
public ErrorResponse(string errorMessage, int statusCode)
|
||||
{
|
||||
this.errors = new Error[] { new Error(statusCode.ToString(), new string[] { }, errorMessage) };
|
||||
this.exceptionClassName = null;
|
||||
this.exceptionStackTrace = null;
|
||||
}
|
||||
|
||||
public Error[] errors { get; set; }
|
||||
public string? exceptionClassName { get; set; }
|
||||
public string? exceptionStackTrace { get; set; }
|
||||
|
||||
public class Error
|
||||
{
|
||||
public Error(string code, string[] data, string message)
|
||||
{
|
||||
this.code = code;
|
||||
this.data = data;
|
||||
this.message = message;
|
||||
}
|
||||
|
||||
public string code { get; set; }
|
||||
public string[] data { get; set; }
|
||||
public string message { get; set; }
|
||||
}
|
||||
|
||||
}
|
||||
Reference in new issue
Block a user