-
Notifications
You must be signed in to change notification settings - Fork 2
/
request.go
78 lines (70 loc) · 2.63 KB
/
request.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
package cicil
type CheckoutRequest struct {
Transaction Transaction `json:"transaction"`
PushURL string `json:"push_url"`
RedirectURL string `json:"redirect_url"`
Buyer Buyer `json:"buyer"`
Shipment Shipment `json:"shipment"`
SellerList []SellerList `json:"seller_list,omitempty"`
BackURL string `json:"back_url"`
}
type Transaction struct {
TotalAmount int `json:"total_amount"`
TransactionID string `json:"transaction_id"`
ItemLists []ItemList `json:"item_list"`
}
type ItemList struct {
ItemID string `json:"item_id"`
Type string `json:"type"`
Name string `json:"name"`
Price int `json:"price"`
Quantity int `json:"quantity"`
Category string `json:"category,omitempty"`
Url string `json:"url,omitempty"`
SellerID string `json:"seller_id,omitempty"`
}
type Buyer struct {
Fullname string `json:"fullname"`
Email string `json:"email"`
Phone string `json:"phone"`
Address string `json:"address"`
City string `json:"city,omitempty"`
District string `json:"district,omitempty"`
PostalCode string `json:"postal_code"`
Company string `json:"company,omitempty"`
Country string `json:"country,omitempty"`
}
type Shipment struct {
ShipmentProvider string `json:"shipment_provider"`
ShipmentPrice int `json:"shipment_price"`
ShipmentTax int `json:"shipment_tax"`
Address string `json:"address"`
City string `json:"city,omitempty"`
District string `json:"district,omitempty"`
PostalCode string `json:"postal_code"`
Phone string `json:"phone"`
Company string `json:"company,omitempty"`
Name string `json:"name"`
Country string `json:"country,omitempty"`
}
type SellerList struct {
Name string `json:"name"`
Email string `json:"email"`
Phone string `json:"phone"`
Url string `json:"url"`
}
type CancelOrderRequest struct {
PONumber string `json:"po_number"`
Reason string `json:"reason"`
CancelledBy string `json:"cancelled_by"`
TotalAmount int `json:"total_amount"`
TransactionID string `json:"transaction_id"`
}
type UpdateStatusRequest struct {
PONumber string `json:"po_number"`
POStatus string `json:"po_status"`
TransactionID string `json:"transaction_id"`
Reason string `json:"reason,omitempty"`
ShipmentNo string `json:"shipment_no,omitempty"`
ShipmentProvider string `json:"shipment_provider,omitempty"`
}