-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathdurianpay.go
34 lines (29 loc) · 1018 Bytes
/
durianpay.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
package durianpay
import (
"github.com/ayatmaulana/durianpay-go-sdk/common"
"github.com/ayatmaulana/durianpay-go-sdk/modules/disbursement"
"github.com/ayatmaulana/durianpay-go-sdk/modules/order"
"github.com/ayatmaulana/durianpay-go-sdk/modules/payment"
"github.com/ayatmaulana/durianpay-go-sdk/modules/promo"
"github.com/ayatmaulana/durianpay-go-sdk/modules/refund"
"github.com/ayatmaulana/durianpay-go-sdk/modules/settlement"
)
type Modules struct {
Disbursement disbursement.Disbursement
Order order.Order
Payment payment.Payment
Promo promo.Promo
Settlement settlement.Settlement
Refund refund.Refund
}
func NewClient(config *common.ClientConfig) *Modules {
agent := common.NewAgent(config)
return &Modules{
Disbursement: disbursement.Disbursement{Agent: agent},
Order: order.Order{Agent: agent},
Payment: payment.Payment{Agent: agent},
Promo: promo.Promo{Agent: agent},
Settlement: settlement.Settlement{Agent: agent},
Refund: refund.Refund{Agent: agent},
}
}