-
Notifications
You must be signed in to change notification settings - Fork 44
/
automated_exports.go
37 lines (28 loc) · 1.06 KB
/
automated_exports.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
package mock
import (
"context"
"time"
"github.com/blacklightcms/recurly"
)
var _ recurly.AutomatedExportsService = &AutomatedExportsService{}
// AutomatedExportsService manages the interactions for automated exports.
type AutomatedExportsService struct {
OnGet func(ctx context.Context, date time.Time, fileName string) (*recurly.AutomatedExport, error)
GetInvoked bool
OnListDates func(opts *recurly.PagerOptions) recurly.Pager
ListDatesInvoked bool
OnListFiles func(date time.Time, opts *recurly.PagerOptions) recurly.Pager
ListFilesInvoked bool
}
func (m *AutomatedExportsService) Get(ctx context.Context, date time.Time, fileName string) (*recurly.AutomatedExport, error) {
m.GetInvoked = true
return m.OnGet(ctx, date, fileName)
}
func (m *AutomatedExportsService) ListDates(opts *recurly.PagerOptions) recurly.Pager {
m.ListDatesInvoked = true
return m.OnListDates(opts)
}
func (m *AutomatedExportsService) ListFiles(date time.Time, opts *recurly.PagerOptions) recurly.Pager {
m.ListFilesInvoked = true
return m.OnListFiles(date, opts)
}