-
Notifications
You must be signed in to change notification settings - Fork 0
/
domains_order_details.go
187 lines (139 loc) · 5.94 KB
/
domains_order_details.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
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
package resellerclub
import "strconv"
type OrderDetailsOption string
const (
OrderDetailsOptionAll OrderDetailsOption = "All"
OrderDetailsOptionOrderDetails OrderDetailsOption = "OrderDetails"
OrderDetailsOptionContactIds OrderDetailsOption = "ContactIds"
OrderDetailsOptionRegistrantContactDetails OrderDetailsOption = "RegistrantContactDetails"
OrderDetailsOptionAdminContactDetails OrderDetailsOption = "AdminContactDetails"
OrderDetailsOptionTechContactDetails OrderDetailsOption = "TechContactDetails"
OrderDetailsOptionBillingContactDetails OrderDetailsOption = "BillingContactDetails"
OrderDetailsOptionNsDetails OrderDetailsOption = "NsDetails"
OrderDetailsOptionDomainStatus OrderDetailsOption = "DomainStatus"
OrderDetailsOptionDNSSECDetails OrderDetailsOption = "DNSSECDetails"
OrderDetailsOptionStatusDetails OrderDetailsOption = "StatusDetails"
)
type DomainGetOrderDetailsResponse struct {
// Order ID
OrderID Int64 `json:"orderid"`
// Order Description
Description string `json:"description"`
// Domain Name
DomainName string `json:"domainname"`
// Current Order Status under the System.
// Value will be InActive, Active, Suspended, Pending Delete Restorable, Deleted or Archived
CurrentStatus string `json:"currentstatus"`
// Lock/Hold on the domain name at the Registry.
// Value(s) will be resellersuspend, resellerlock and/or transferlock
OrderStatus []string `json:"orderstatus"`
// Lock/Hold on the domain name in the System.
// Value(s) will be sixtydaylock and/or renewhold
DomainStatus []string `json:"domainstatus"`
// Product Category
ProductCategory string `json:"productcategory"`
// Product Key
ProductKey string `json:"productkey"`
// Order Creation (at the Registry) Date
CreationTime Time `json:"creationtime"`
// Registrant Contact Email Address Verification Status.
// Value will be Verified, Pending or Suspended
RaaVerificationStatus string `json:"raaVerificationStatus"`
// Expiry Date (at the Registry)
EndTime Time `json:"endtime"`
// Whether Order belongs to a Customer directly under the Reseller
IsImmediateReseller Bool `json:"isImmediateReseller"`
// Reseller Chain by RID
ParentKey string `json:"parentkey"`
// Customer ID Associated with the Order
CustomerID Int64 `json:"customerid"`
// Number of Name Servers associated with the Domain Name
NoOfNameServers Int64 `json:"noOfNameServers"`
// Name Server 1
NS1 string `json:"ns1"`
// Name Server 2
NS2 string `json:"ns2"`
// Domain Secret
DomainSecret string `json:"domsecret"`
// Whether Order Suspended due to Expiry
IsOrderSuspendedUponExpiry Bool `json:"isOrderSuspendedUponExpiry"`
// Whether Order Suspended by Parent Reseller
OrderSuspendedByParent Bool `json:"orderSuspendedByParent"`
// Whether Privacy Protection allowed for the Product Type
PrivacyProtectedAllowed Bool `json:"privacyprotectedallowed"`
// Whether Order is Privacy Protected
IsPrivacyProtected Bool `json:"isprivacyprotected"`
// Whether Premium DNS is allowed for the Product Type
PremiumDNSAllowed Bool `json:"premiumdnsallowed"`
// Status of Premium DNS
PremiumDNSEnabled Bool `json:"premiumdnsenabled"`
// Whether Order Deletion is Allowed
AllowDeletion Bool `json:"allowdeletion"`
// Registrant Contact ID
RegistrantContactID Int64 `json:"registrantcontactid"`
// Registrant Contact Details
RegistrantContact OrderContact `json:"registrantcontact"`
// Admin Contact ID
AdminContactID Int64 `json:"admincontactid"`
// Admin Contact Details
AdminContact OrderContact `json:"admincontact"`
// Technical Contact ID
TechContactID Int64 `json:"techcontactid"`
// Technical Contact Details
TechContact OrderContact `json:"techcontact"`
// Billing Contact ID
BillingContactID Int64 `json:"billingcontactid"`
// Billing Contact Details
BillingContact OrderContact `json:"billingcontact"`
// Auto Renewal
Recurring Bool `json:"recurring"`
// Delegation Signer (DS) Record Details
// - Key Tag (keytag)
// - Algorithm (algorithm)
// - Digest Type (digesttype)
// - Digest (digest)
DNSSec []string `json:"dnssec"`
// GDPR Protection
GDPR DomainGetOrderDetailsResponseGDPR `json:"gdpr"`
Paused Bool `json:"paused"`
TNCRequired Bool `json:"tnc_required"`
Actioncompleted string `json:"actioncompleted"`
EntityID Int64 `json:"entityid"`
ResellerCost Float64 `json:"resellercost"`
AutoRenewAttemptDuration Int64 `json:"autoRenewAttemptDuration"`
AutoRenewTermType string `json:"autoRenewTermType"`
ServiceProviderID Int64 `json:"serviceproviderid"`
MoneyBackPeriod Int64 `json:"moneybackperiod"`
EntityTypeID Int64 `json:"entitytypeid"`
ClassName string `json:"classname"`
CustomerCost Float64 `json:"customercost"`
EaqID Int64 `json:"eaqid"`
ClassKey string `json:"classkey"`
BulkWhoisOptOut string `json:"bulkwhoisoptout"`
MultilingualFlag string `json:"multilingualflag"`
}
type DomainGetOrderDetailsResponseGDPR struct {
Enabled Bool `json:"enabled"`
Eligible Bool `json:"eligible"`
}
type resDomainGetOrderDetailsResponse struct {
errorResponse
DomainGetOrderDetailsResponse
}
// GetOrderDetails Gets details of the Domain Registration Order associated with the specified Order Id.
// https://manage.resellerclub.com/kb/answer/770
func (domains *Domains) GetOrderDetails(orderID int64, options ...OrderDetailsOption) (*DomainGetOrderDetailsResponse, error) {
u := domains.url("/details.json")
q := u.Query()
q.Set("order-id", strconv.FormatInt(orderID, 10))
for _, opt := range options {
q.Add("options", string(opt))
}
u.RawQuery = q.Encode()
var res = resDomainGetOrderDetailsResponse{}
err := domains.client.get(u.String(), &res)
if err != nil {
return nil, err
}
return &res.DomainGetOrderDetailsResponse, nil
}