Documentation ¶
Index ¶
- Constants
- Variables
- type CustomerService
- type Filter
- type Invoice
- type Repository
- type Service
- func (s *Service) Close() error
- func (s *Service) DeleteByCustomer(ctx context.Context, c customer.Customer) error
- func (s *Service) GetUpcoming(ctx context.Context, customerID string) (Invoice, error)
- func (s *Service) Init(ctx context.Context) error
- func (s *Service) List(ctx context.Context, filter Filter) ([]Invoice, error)
- func (s *Service) ListAll(ctx context.Context, filter Filter) ([]Invoice, error)
- func (s *Service) SyncWithProvider(ctx context.Context, customr customer.Customer) error
Constants ¶
View Source
const (
SyncDelay = time.Minute * 3
)
Variables ¶
View Source
var ( ErrNotFound = fmt.Errorf("invoice not found") ErrInvalidDetail = fmt.Errorf("invalid invoice detail") )
Functions ¶
This section is empty.
Types ¶
type CustomerService ¶
type Repository ¶ added in v0.8.26
type Repository interface { Create(ctx context.Context, invoice Invoice) (Invoice, error) GetByID(ctx context.Context, id string) (Invoice, error) List(ctx context.Context, filter Filter) ([]Invoice, error) UpdateByID(ctx context.Context, invoice Invoice) (Invoice, error) Delete(ctx context.Context, id string) error }
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
func NewService ¶
func NewService(stripeClient *client.API, invoiceRepository Repository, customerService CustomerService) *Service
func (*Service) DeleteByCustomer ¶ added in v0.8.35
func (*Service) GetUpcoming ¶
func (*Service) List ¶
List currently queries stripe for invoices, but it should be refactored to query our own database
Click to show internal directories.
Click to hide internal directories.