-
Notifications
You must be signed in to change notification settings - Fork 131
/
types_me_order.go
64 lines (56 loc) · 1.65 KB
/
types_me_order.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
package ovh
type MeOrder struct {
Date string `json:"date"`
ExpirationDate string `json:"expirationDate"`
OrderId int64 `json:"orderId"`
}
func (v MeOrder) ToMap() map[string]interface{} {
obj := make(map[string]interface{})
obj["date"] = v.Date
obj["expiration_date"] = v.ExpirationDate
obj["order_id"] = v.OrderId
return obj
}
type MeOrderDetail struct {
Description string `json:"description"`
Domain string `json:"domain"`
OrderDetailId int64 `json:"orderDetailId"`
Quantity string `json:"quantity"`
}
func (v MeOrderDetail) ToMap() map[string]interface{} {
obj := make(map[string]interface{})
obj["description"] = v.Description
obj["domain"] = v.Domain
obj["order_detail_id"] = v.OrderDetailId
obj["quantity"] = v.Quantity
return obj
}
type MeOrderDetailExtension struct {
Order struct {
Plan struct {
Code string `json:"code"`
} `json:"plan"`
} `json:"order"`
}
type MeOrderDetailOperation struct {
Status string `json:"status"`
ID int `json:"id"`
Type string `json:"type"`
Resource MeOrderDetailOperationResource `json:"resource"`
Quantity int `json:"quantity"`
}
type MeOrderDetailOperationResource struct {
Name string `json:"name"`
State string `json:"state"`
DisplayName string `json:"displayName"`
}
type MeOrderPaymentOpts struct {
PaymentMean string `json:"paymentMean"`
PaymentMeanId *int64 `json:"paymentMeanId,omitEmpty"`
}
type MeOrderPaymentMethodOpts struct {
PaymentMethod PaymentMethod `json:"paymentMethod"`
}
type PaymentMethod struct {
Id int64 `json:"id"`
}