-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathVehicleInsuranceContractData.cs
135 lines (104 loc) · 3.6 KB
/
VehicleInsuranceContractData.cs
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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
using System.Text.Json.Serialization;
using EvaluationTests.Shared.Serialization;
namespace EvaluationTests.Assets.Contracts;
public class VehicleInsuranceContractData
{
public string? PolicyNumber { get; set; }
public CostDetails? Cost { get; set; }
public RenewalDetails? Renewal { get; set; }
[JsonConverter(typeof(UtcDateTimeConverter))]
public DateTime? EffectiveFrom { get; set; }
[JsonConverter(typeof(UtcDateTimeConverter))]
public DateTime? EffectiveTo { get; set; }
[JsonConverter(typeof(UtcDateTimeConverter))]
public DateTime? LastDateToCancel { get; set; }
public CustomerDetails? Policyholder { get; set; }
public VehicleDetails? Vehicle { get; set; }
public ExcessDetails? AccidentExcess { get; set; }
public ExcessDetails? FireAndTheftExcess { get; set; }
public static VehicleInsuranceContractData Empty => new()
{
PolicyNumber = string.Empty,
Cost = new CostDetails
{
AnnualTotal = 0.0,
PayableByDate = DateTime.MinValue
},
Renewal = new RenewalDetails
{
RenewalNotificationDate = DateTime.MinValue,
RenewalDueDate = DateTime.MinValue
},
EffectiveFrom = DateTime.MinValue,
EffectiveTo = DateTime.MinValue,
LastDateToCancel = DateTime.MinValue,
Policyholder = new CustomerDetails
{
FirstName = string.Empty,
LastName = string.Empty,
DateOfBirth = DateTime.MinValue,
Address = string.Empty,
EmailAddress = string.Empty,
TotalYearsOfResidenceInUK = 0,
DrivingLicenseNumber = string.Empty
},
Vehicle = new VehicleDetails
{
RegistrationNumber = string.Empty,
Make = string.Empty,
Model = string.Empty,
Year = 2024,
Value = 0.0
},
AccidentExcess = new ExcessDetails
{
Compulsory = 0.0,
Voluntary = 0.0,
UnapprovedRepairPenalty = 0.0
},
FireAndTheftExcess = new ExcessDetails
{
Compulsory = 0.0,
Voluntary = 0.0,
UnapprovedRepairPenalty = 0.0
}
};
public class CustomerDetails
{
public string? FirstName { get; set; }
public string? LastName { get; set; }
[JsonConverter(typeof(UtcDateTimeConverter))]
public DateTime? DateOfBirth { get; set; }
public string? Address { get; set; }
public string? EmailAddress { get; set; }
public int? TotalYearsOfResidenceInUK { get; set; }
public string? DrivingLicenseNumber { get; set; }
}
public class VehicleDetails
{
public string? RegistrationNumber { get; set; }
public string? Make { get; set; }
public string? Model { get; set; }
public int? Year { get; set; }
public double? Value { get; set; }
}
public class CostDetails
{
public double? AnnualTotal { get; set; }
[JsonConverter(typeof(UtcDateTimeConverter))]
public DateTime? PayableByDate { get; set; }
}
public class RenewalDetails
{
[JsonConverter(typeof(UtcDateTimeConverter))]
public DateTime? RenewalNotificationDate { get; set; }
[JsonConverter(typeof(UtcDateTimeConverter))]
public DateTime? RenewalDueDate { get; set; }
}
public class ExcessDetails
{
public double? Compulsory { get; set; }
public double? Voluntary { get; set; }
public double? UnapprovedRepairPenalty { get; set; }
}
}