-
Notifications
You must be signed in to change notification settings - Fork 429
/
bill_test.go
52 lines (44 loc) · 1.07 KB
/
bill_test.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
package alipay_test
import (
"context"
"testing"
"github.com/smartwalle/alipay/v3"
)
func TestClient_BillDownloadURLQuery(t *testing.T) {
t.Log("========== BillDownloadURLQuery ==========")
var p = alipay.BillDownloadURLQuery{}
p.BillType = "trade"
p.BillDate = "2019-01-01"
rsp, err := client.BillDownloadURLQuery(context.Background(), p)
if err != nil {
t.Fatal(err)
}
if rsp.IsFailure() {
t.Fatal(rsp.Msg, rsp.SubMsg)
}
t.Logf("%v", rsp)
}
func TestClient_BillBalanceQuery(t *testing.T) {
t.Log("========== BillBalanceQuery ==========")
var p = alipay.BillBalanceQuery{}
rsp, err := client.BillBalanceQuery(context.Background(), p)
if err != nil {
t.Fatal(err)
}
if rsp.IsFailure() {
t.Fatal(rsp.Msg, rsp.SubMsg)
}
t.Logf("%v", rsp)
}
func TestClient_BillAccountLogQuery(t *testing.T) {
t.Log("========== BillAccountLogQuery ==========")
var p = alipay.BillAccountLogQuery{}
rsp, err := client.BillAccountLogQuery(context.Background(), p)
if err != nil {
t.Fatal(err)
}
if rsp.IsFailure() {
t.Fatal(rsp.Msg, rsp.SubMsg)
}
t.Logf("%v", rsp)
}