5
5
"net/http"
6
6
7
7
"github.com/xendit/xendit-go"
8
+ "github.com/xendit/xendit-go/account"
8
9
"github.com/xendit/xendit-go/balance"
9
10
"github.com/xendit/xendit-go/card"
10
11
"github.com/xendit/xendit-go/cardlesscredit"
@@ -39,6 +40,7 @@ type API struct {
39
40
Customer * customer.Client
40
41
Transaction * transaction.Client
41
42
Report * report.Client
43
+ Account * account.Client
42
44
}
43
45
44
46
func (a * API ) init () {
@@ -56,6 +58,7 @@ func (a *API) init() {
56
58
a .Customer = & customer.Client {Opt : & a .opt , APIRequester : a .apiRequester }
57
59
a .Transaction = & transaction.Client {Opt : & a .opt , APIRequester : a .apiRequester }
58
60
a .Report = & report.Client {Opt : & a .opt , APIRequester : a .apiRequester }
61
+ a .Account = & account.Client {Opt : & a .opt , APIRequester : a .apiRequester }
59
62
}
60
63
61
64
// New creates a new Xendit API client
@@ -74,7 +77,8 @@ func New(secretKey string) *API {
74
77
75
78
// WithAPIRequester set custom APIRequester for Xendit Client
76
79
// Can be chained with constructor like below:
77
- // client.New(yourSecretKey).WithAPIRequester(yourCustomRequester)
80
+ //
81
+ // client.New(yourSecretKey).WithAPIRequester(yourCustomRequester)
78
82
func (a * API ) WithAPIRequester (apiRequester xendit.APIRequester ) * API {
79
83
a .apiRequester = apiRequester
80
84
a .init ()
@@ -83,7 +87,8 @@ func (a *API) WithAPIRequester(apiRequester xendit.APIRequester) *API {
83
87
84
88
// WithCustomURL set custom xendit URL for Xendit Client
85
89
// Can be chained with constructor like below:
86
- // client.New(yourSecretKey).WithCustomURL(yourCustomURL)
90
+ //
91
+ // client.New(yourSecretKey).WithCustomURL(yourCustomURL)
87
92
func (a * API ) WithCustomURL (xenditURL string ) * API {
88
93
a .opt .XenditURL = xenditURL
89
94
a .init ()
@@ -92,7 +97,8 @@ func (a *API) WithCustomURL(xenditURL string) *API {
92
97
93
98
// WithCustomHTTPClient set custom HTTP Client for default API Requester
94
99
// Can be chained with constructor like below:
95
- // client.New(yourSecretKey).WithCustomHTTPClient(yourCustomHTTPClient)
100
+ //
101
+ // client.New(yourSecretKey).WithCustomHTTPClient(yourCustomHTTPClient)
96
102
func (a * API ) WithCustomHTTPClient (client * http.Client ) * API {
97
103
a .apiRequester = & xendit.APIRequesterImplementation {
98
104
HTTPClient : client ,
0 commit comments