fee

package
v1.36.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 25, 2026 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Query

Query returns a datastore query for fees.

Types

type Bitcoin

type Bitcoin struct {
	FinalTransactionTxId string         `json:"finalTransactionTxId,omitempty"`
	FinalAddress         string         `json:"finalAddress,omitempty"`
	FinalAmount          currency.Cents `json:"finalAmount,omitempty"`
	FinalVOut            int64          `json:"vout,omitempty"`
}

type Ethereum

type Ethereum struct {
	FinalTransactionHash string                `json:"finalTransactionHash,omitempty"`
	FinalTransactionCost blockchains.BigNumber `json:"finalTransactionCost,omitempty"`
	FinalAddress         string                `json:"finalAddress,omitempty"`
	FinalAmount          blockchains.BigNumber `json:"finalAmount,omitempty"`
}

type Fee

type Fee struct {
	mixin.Model[Fee]

	Name string `json:"name"`

	Type        Type   `json:"type"`
	AffiliateId string `json:"affiliateId,omitempty"`
	PartnerId   string `json:"partnerId,omitempty"`

	PaymentId  string `json:"paymentId"`
	TransferId string `json:"transferId"`

	Commission commission.Commission `json:"commission,omitempty"`

	Currency       currency.Type  `json:"currency"`
	Amount         currency.Cents `json:"amount"`
	AmountRefunded currency.Cents `json:"amountRefunded,omitempty"`

	Status Status `json:"status" orm:"default:pending"`

	Ethereum Ethereum `json:"ethereum"`
	Bitcoin  Bitcoin  `json:"bitcoin"`

	// Stripe livemode
	Live bool `json:"live"`

	// Internal testing flag
	Test bool `json:"-"`
}

func New

func New(db *datastore.Datastore) *Fee

New creates a new Fee wired to the given datastore.

type Status

type Status string
const (
	Pending     Status = "pending"
	Disputed    Status = "disputed"
	Transferred Status = "transferred"
	Payable     Status = "payable"
	Refunded    Status = "refunded"
)

type Type

type Type string
const (
	Platform  Type = "platform"
	Stripe    Type = "stripe"
	Affiliate Type = "affiliate"
	Partner   Type = "partner"
)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL