storj/satellite/payments/invoices.go
stefanbenten 133fda4bef satellite/admin: add user deletion
Change-Id: Ideea978698183e25f5e0d73128c4f93c2caa1577
2020-07-14 11:37:00 +00:00

33 lines
940 B
Go

// Copyright (C) 2019 Storj Labs, Inc.
// See LICENSE for copying information.
package payments
import (
"context"
"time"
"storj.io/common/uuid"
)
// Invoices exposes all needed functionality to manage account invoices.
//
// architecture: Service
type Invoices interface {
// List returns a list of invoices for a given payment account.
List(ctx context.Context, userID uuid.UUID) ([]Invoice, error)
// CheckPendingItems returns if pending invoice items for a given payment account exist.
CheckPendingItems(ctx context.Context, userID uuid.UUID) (existingItems bool, err error)
}
// Invoice holds all public information about invoice.
type Invoice struct {
ID string `json:"id"`
Description string `json:"description"`
Amount int64 `json:"amount"`
Status string `json:"status"`
Link string `json:"link"`
Start time.Time `json:"start"`
End time.Time `json:"end"`
}