-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathresponses.go
56 lines (49 loc) · 1.83 KB
/
responses.go
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
package mothistory
import (
// "encoding/json"
)
// Response for {baseURL}/[registration|vin]/<registration|vin>
type VehicleDetailsResponse struct {
Registration string `json:"registration"`
Make string `json:"make"`
FirstUsedDate string `json:"firstUsedDate"`
FuelType string `json:"fuelType"`
PrimaryColour string `json:"primaryColour"`
RegistrationDate string `json:"registrationDate"`
ManufactureDate string `json:"manufactureDate"`
EngineSize string `json:"engineSize"`
HasOutstandingRecall string `json:"hasOutstandingRecall"`
MotTests []MOTTest `json:"motTests"`
}
type MOTTest struct {
CompletedDate string `json:"completedDate"`
TestResult string `json:"testResult"`
ExpiryDate string `json:"expiryDate"`
OdometerValue string `json:"odometerValue"`
OdometerUnit string `json:"odometerUnit"`
OdometerResultType string `json:"odometerResultType"`
MotTestNumber string `json:"motTestNumber"`
DataSource string `json:"dataSource"`
Location string `json:"location,omitempty"` // Optional field
Defects []Defect `json:"defects,omitempty"` // Optional field
}
type Defect struct {
Text string `json:"text"`
TypeOfDefect string `json:"type"`
Dangerous bool `json:"dangerous"`
}
// Response for {baseURL}/[bulk-download]
type BulkDownloadResponse struct {
Bulk []BulkDelta `json:"bulk"`
Delta []BulkDelta `json:"delta"`
}
type BulkDelta struct {
Filename string `json:"filename"`
DownloadURL string `json:"downloadUrl"`
FileSize int `json:"fileSize"`
FileCreatedOn string `json:"fileCreatedOn"`
}
// Response for v1/trade/[credentials]
type ClientSecretResponse struct {
ClientSecret string `json:"clientSecret"`
}