GET /payment-history/{id} now returns one row per payment of the order
(paid, card, time, period, amounts), newest first - the per-order payment
table the frontend already calls. The step-by-step logs it used to return
are kept at GET /payment-history/{id}/logs.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
18 lines
829 B
Go
18 lines
829 B
Go
package paymenthistory
|
|
|
|
import "context"
|
|
|
|
type Repository interface {
|
|
List(ctx context.Context, filter ListFilter) (ListPaymentHistoryDTO, error)
|
|
// Get returns a single payout attempt by its visa_master_order_payments id.
|
|
Get(ctx context.Context, paymentID int64) (PaymentHistoryDetailDTO, error)
|
|
// OrderPayments returns every payout attempt of a single order, newest
|
|
// first - the per-order payment table, without paging.
|
|
OrderPayments(ctx context.Context, orderID int64) ([]PaymentHistoryItemDTO, error)
|
|
// Logs returns the full visa_master_payment_logs audit trail for a
|
|
// single order, newest first.
|
|
Logs(ctx context.Context, orderID int64) ([]PaymentLogDTO, error)
|
|
// OwnerInfo returns an order's owning user/branch, for rbac.GuardOrder.
|
|
OwnerInfo(ctx context.Context, orderID int64) (*int64, int64, error)
|
|
}
|