Skip to content

Commit

Permalink
Merge pull request #109 from lamarios/DPK-2645-fix-customer-not-init
Browse files Browse the repository at this point in the history
init customer client on the API struct
  • Loading branch information
feliciagojali authored Nov 30, 2022
2 parents 6f22c13 + e729663 commit c12673f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,7 @@ The following is a list of pointers to documentations for sub-packages of [xendi
- [Payout](https://pkg.go.dev/github.com/xendit/xendit-go/payout)
- [Recurring Payment](https://pkg.go.dev/github.com/xendit/xendit-go/recurringpayment)
- [Cardless Credit](https://pkg.go.dev/github.com/xendit/xendit-go/cardlesscredit)
- [Customer](https://pkg.go.dev/github.com/xendit/xendit-go/customer)

## Contribute

Expand Down
3 changes: 3 additions & 0 deletions client/api.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import (
"github.com/xendit/xendit-go/balance"
"github.com/xendit/xendit-go/card"
"github.com/xendit/xendit-go/cardlesscredit"
"github.com/xendit/xendit-go/customer"
"github.com/xendit/xendit-go/disbursement"
"github.com/xendit/xendit-go/ewallet"
"github.com/xendit/xendit-go/invoice"
Expand All @@ -33,6 +34,7 @@ type API struct {
CardlessCredit *cardlesscredit.Client
Disbursement *disbursement.Client
QRCode *qrcode.Client
Customer *customer.Client
}

func (a *API) init() {
Expand All @@ -47,6 +49,7 @@ func (a *API) init() {
a.CardlessCredit = &cardlesscredit.Client{Opt: &a.opt, APIRequester: a.apiRequester}
a.Disbursement = &disbursement.Client{Opt: &a.opt, APIRequester: a.apiRequester}
a.QRCode = &qrcode.Client{Opt: &a.opt, APIRequester: a.apiRequester}
a.Customer = &customer.Client{Opt: &a.opt, APIRequester: a.apiRequester}
}

// New creates a new Xendit API client
Expand Down

0 comments on commit c12673f

Please sign in to comment.