-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathFacturAPIException.cs
More file actions
38 lines (36 loc) · 1.17 KB
/
Copy pathFacturAPIException.cs
File metadata and controls
38 lines (36 loc) · 1.17 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
using System;
using System.Collections.Generic;
using Newtonsoft.Json.Linq;
namespace Facturapi
{
public class FacturapiException : Exception
{
public int? Status { get; private set; }
public string Code { get; private set; }
public string Path { get; private set; }
public string Location { get; private set; }
public JArray Errors { get; private set; }
public string LogId { get; private set; }
public IReadOnlyDictionary<string, string> Headers { get; private set; }
public FacturapiException() : base() { }
public FacturapiException(
string message,
int? status = null,
string code = null,
string path = null,
string location = null,
JArray errors = null,
string logId = null,
IReadOnlyDictionary<string, string> headers = null
) : base(message)
{
Status = status;
Code = code;
Path = path;
Location = location;
Errors = errors;
LogId = logId;
Headers = headers ?? new Dictionary<string, string>();
}
}
}