-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathapi_requests.go
121 lines (111 loc) · 5.86 KB
/
api_requests.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
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
package dnbclient
type RequestBody struct {
CompanySearch *CompanySearchRequest
ContactSearch *ContactSearchRequest
}
// Company Search Request
type CompanySearchRequest struct {
DUNS string `json:"duns,omitempty"`
DUNSList []string `json:"dunsList,omitempty"`
IsMarketable bool `json:"isMarketable,omitempty"`
IsOutOffBusiness bool `json:"isOutOffBusiness,omitempty"`
IsTelephoneDisconnected bool `json:"isTelephoneDisconnected,omitempty"`
IsMailUndeliverable bool `json:"isMailUndeliverable,omitempty"`
SearchTerm string `json:"searchTerm,omitempty"`
PrimaryName string `json:"primaryName,omitempty"`
TradeStyleName string `json:"tradeStyleName,omitempty"`
CountryISOAlpha2Code string `json:"countryISOAlpha2Code,omitempty"`
AddressRegion string `json:"addressRegion,omitempty"`
AddressLocality string `json:"addressLocality,omitempty"`
StreetAddressLine1 string `json:"streetAddressLine1,omitempty"`
PostalCode string `json:"postalCode,omitempty"`
TelephoneNumber string `json:"telephoneNumber,omitempty"`
Domain string `json:"domain,omitempty"`
TickerSymbol string `json:"tickerSymbol,omitempty"`
IsStandalone bool `json:"isStandalone,omitempty"`
IsImporter bool `json:"isImporter,omitempty"`
IsExporter bool `json:"isExporter,omitempty"`
PageNumber int `json:"pageNumber,omitempty"`
PageSize int `json:"pageSize,omitempty"`
ReturnNavigators bool `json:"returnNavigators,omitempty"`
RegistrationNumbers []string `json:"registrationNumbers,omitempty"`
BusinessEntityType []string `json:"businessEntityType,omitempty"`
FamilytreeRolesPlayed []string `json:"familytreeRolesPlayed,omitempty"`
UsSicv4 []string `json:"usSicv4,omitempty"`
LocationRadius *struct {
Lat float64 `json:"lat,omitempty"`
Lng float64 `json:"lon,omitempty"`
Radius float64 `json:"radius,omitempty"`
Unit string `json:"unit,omitempty"`
} `json:"locationRadius,omitempty"`
NumberOfEmployees *struct {
InformationScope int `json:"informationScope,omitempty"`
MaximumValue int `json:"maximumValue,omitempty"`
MinimumValue int `json:"minimumValue,omitempty"`
} `json:"numberOfEmployees,omitempty"`
YearlyRevenue *struct {
MaximumValue int `json:"maximumValue,omitempty"`
MinimumValue int `json:"minimumValue,omitempty"`
} `json:"yearlyRevenue,omitempty"`
GlobalUltimateramilyTreeMembersCount *struct {
MaximumValue int `json:"maximumValue,omitempty"`
MinimumValue int `json:"minimumValue,omitempty"`
} `json:"globalUltimateFamilyTreeMembersCount,omitempty"`
IndustryCodes []*struct {
TypeDnbCode string `json:"typeDnbCode,omitempty"`
Description string `json:"description,omitempty"`
Code []string `json:"code,omitempty"`
} `json:"industryCodes,omitempty"`
}
// Typehead Search Request
type TypeheadSearchRequest struct {
SearchTerm string `json:"searchTerm"`
CountryISOAlpha2Code string `json:"countryISOAlpha2Code,omitempty"`
IsOutOfBusiness bool `json:"isOutOfBusiness,omitempty"`
IsMarketable bool `json:"isMarketable,omitempty"`
IsDelisted bool `json:"isDelisted"`
IsMailUndeliverable bool `json:"isMailUndeliverable,omitempty"`
AddressLocality string `json:"addressLocality,omitempty"`
AddressRegion string `json:"addressRegion,omitempty"`
StreetAddressLine1 string `json:"streetAddressLine1,omitempty"`
PostalCode string `json:"postalCode,omitempty"`
RadiusLat float64 `json:"radiusLat,omitempty"`
RadiusLon float64 `json:"radiusLon,omitempty"`
RadiusPostalCode string `json:"radiusPostalCode,omitempty"`
RadiusDistance float64 `json:"radiusDistance,omitempty"`
RadiusUnit string `json:"radiusUnit,omitempty"`
CandidateMaximumQuantity int `json:"candidateMaximumQuantity,omitempty"`
CustomerReference string `json:"customerReference,omitempty"`
}
// Contact Search Request
type ContactSearchRequest struct {
ContactID string `json:"contactID,omitempty"`
ContactEmail string `json:"contactEmail,omitempty"`
GivenName string `json:"givenName,omitempty"`
FamilyName string `json:"familyName,omitempty"`
JobTitles []string `json:"jobTitles,omitempty"`
Duns string `json:"duns,omitempty"`
PrimaryName string `json:"primaryName,omitempty"`
AddressLocality string `json:"addressLocality,omitempty"`
AddressRegion string `json:"addressRegion,omitempty"`
PostalCode string `json:"postalCode,omitempty"`
CountryISOAlpha2Code string `json:"countryISOAlpha2Code,omitempty"`
UsSicV4 []string `json:"usSicV4,omitempty"`
MrcCode []string `json:"mrcCode,omitempty"`
View string `json:"view,omitempty"`
HasDirectDial bool `json:"hasDirectDial,omitempty"`
IndustryCodes []*IndustryCode `json:"industryCodes,omitempty"`
ReturnNavigators bool `json:"returnNavigators,omitempty"`
PageNumber int `json:"pageNumber,omitempty"`
PageSize int `json:"pageSize,omitempty"`
Sort []*SortItem `json:"sort,omitempty"`
}
type IndustryCode struct {
TypeDnbCode int `json:"typeDnbCode,omitempty"`
Description []string `json:"description,omitempty"`
Code []string `json:"code,omitempty"`
}
type SortItem struct {
Item string `json:"item,omitempty"`
Direction string `json:"direction,omitempty"`
}