Documentation ¶
Index ¶
- type Adjustment
- type Balance
- func (b *Balance) Current(ctx context.Context, request *pb.CurrentRequest, response *pb.CurrentResponse) error
- func (b *Balance) Decrement(ctx context.Context, request *pb.DecrementRequest, ...) error
- func (b *Balance) DeleteCustomer(ctx context.Context, request *pb.DeleteCustomerRequest, ...) error
- func (b Balance) Increment(ctx context.Context, request *pb.IncrementRequest, ...) error
- func (b *Balance) ListAdjustments(ctx context.Context, request *pb.ListAdjustmentsRequest, ...) error
- func (b *Balance) Transfer(ctx context.Context, req *pb.TransferRequest, rsp *pb.TransferResponse) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Adjustment ¶
type Adjustment struct { ID string Created time.Time Amount int64 // positive is credit, negative is debit Reference string // reference description Visible bool // should this be visible to the customer? If false, it only displays to admins CustomerID string ActionedBy string // who made the adjustment Meta map[string]string }
Adjustment represents a balance adjustment (not including normal API usage). e.g. credit being added, promo codes, manual adjustment for customer service etc
type Balance ¶
type Balance struct {
// contains filtered or unexported fields
}
func NewHandler ¶
func (*Balance) Current ¶
func (b *Balance) Current(ctx context.Context, request *pb.CurrentRequest, response *pb.CurrentResponse) error
func (*Balance) Decrement ¶
func (b *Balance) Decrement(ctx context.Context, request *pb.DecrementRequest, response *pb.DecrementResponse) error
func (*Balance) DeleteCustomer ¶
func (b *Balance) DeleteCustomer(ctx context.Context, request *pb.DeleteCustomerRequest, response *pb.DeleteCustomerResponse) error
func (Balance) Increment ¶
func (b Balance) Increment(ctx context.Context, request *pb.IncrementRequest, response *pb.IncrementResponse) error
func (*Balance) ListAdjustments ¶
func (b *Balance) ListAdjustments(ctx context.Context, request *pb.ListAdjustmentsRequest, response *pb.ListAdjustmentsResponse) error
func (*Balance) Transfer ¶
func (b *Balance) Transfer(ctx context.Context, req *pb.TransferRequest, rsp *pb.TransferResponse) error
Click to show internal directories.
Click to hide internal directories.