-
Notifications
You must be signed in to change notification settings - Fork 45
/
credit_payments.go
36 lines (27 loc) · 985 Bytes
/
credit_payments.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
package mock
import (
"context"
"github.com/blacklightcms/recurly"
)
var _ recurly.CreditPaymentsService = &CreditPaymentsService{}
// CreditPaymentsService manages the interactions for credit payments.
type CreditPaymentsService struct {
OnList func(opts *recurly.PagerOptions) recurly.Pager
ListInvoked bool
OnListAccount func(code string, opts *recurly.PagerOptions) recurly.Pager
ListAccountInvoked bool
OnGet func(ctx context.Context, uuid string) (*recurly.CreditPayment, error)
GetInvoked bool
}
func (m *CreditPaymentsService) List(opts *recurly.PagerOptions) recurly.Pager {
m.ListInvoked = true
return m.OnList(opts)
}
func (m *CreditPaymentsService) ListAccount(code string, opts *recurly.PagerOptions) recurly.Pager {
m.ListAccountInvoked = true
return m.OnListAccount(code, opts)
}
func (m *CreditPaymentsService) Get(ctx context.Context, uuid string) (*recurly.CreditPayment, error) {
m.GetInvoked = true
return m.OnGet(ctx, uuid)
}