-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpostpaid.go
67 lines (60 loc) · 2.15 KB
/
postpaid.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
package mobilepulsa
// Inquiry is response data from Postpaid product inquiry
type Inquiry struct {
Data DataInquiry `json:"data"`
}
// Payment is response data from Postpaid product purchase
type Payment struct {
Data DataPayment `json:"data"`
}
type DataInquiry struct {
TrID int `json:"tr_id"`
TrName string `json:"tr_name"`
Code string `json:"code"`
HP string `json:"hp"`
Period string `json:"period"`
Nominal float64 `json:"nominal"`
Admin float64 `json:"admin"`
RefID string `json:"ref_id"`
ResponseCode string `json:"response_code"`
Message string `json:"message"`
Price float64 `json:"price"`
SellingPrice float64 `json:"selling_price"`
Description Description `json:"desc"`
}
type DataPayment struct {
TrID int `json:"tr_id"`
Code string `json:"code"`
Datetime string `json:"datetime"`
HP string `json:"hp"`
TrName string `json:"tr_name"`
Period string `json:"period"`
Nominal float64 `json:"nominal"`
Admin float64 `json:"admin"`
ResponseCode string `json:"response_code"`
Message string `json:"message"`
Price float64 `json:"price"`
SellingPrice float64 `json:"selling_price"`
Balance float64 `json:"balance"`
NoRef string `json:"noref"`
RefID string `json:"ref_id"`
Description Description `json:"desc"`
}
// Description is description charge for customer inquiry
type Description struct {
KodeArea string `json:"kode_area"`
Divre string `json:"divre"`
Datel string `json:"datel"`
JumlahTagihan int `json:"jumlah_tagihan"`
Tagihan Tagihan `json:"tagihan"`
}
type Tagihan struct {
Details []DetailTagihan `json:"detail"`
}
// DetailTagihan is data for customer charge monthly
type DetailTagihan struct {
Periode string `json:"periode"`
NilaiTagihan string `json:"nilai_tagihan"`
Admin string `json:"admin"`
Total interface{} `json:"total"` // can be string or integer or double (float)
}