transfer

package
v1.36.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Query

Types

type Account

type Account struct {
	StripeAccount
}

type Status

type Status string
const (
	// Stripe status
	Canceled  Status = "canceled"
	Failed    Status = "failed"
	InTransit Status = "in-transit"
	Pending   Status = "pending"

	// Failed to submit to stripe
	Error = "error"
)

type StripeAccount

type StripeAccount struct {
	TransferId string `json:"transferId,omitempty"`
	Type       string `json:"type,omitempty"`

	ApplicationFee int64 `json:"applicationFee,omitempty"` // FIXME: Apparently not returned by stripe-go?

	BalanceTransaction int64     `json:"balanceTransaction,omitempty"`
	Created            time.Time `json:"created,omitempty"`
	Date               time.Time `json:"date,omitempty"`
	Description        string    `json:"description,omitempty"`
	Destination        string    `json:"destination,omitempty"`
	DestinationType    string    `json:"destinationType,omitempty"`

	FailureCode    string `json:"failureCode,omitempty"`
	FailureMessage string `json:"failureMessage,omitempty"`

	Reversed bool `json:"reversed,omitempty"`

	SourceTransaction string `json:"sourceTransaction,omitempty"`
	SourceType        string `json:"sourceType,omitempty"`

	StatementDescriptor string `json:"statementDescriptor,omitempty"`
}

type Transfer

type Transfer struct {
	mixin.Model[Transfer]

	Account

	AffiliateId string `json:"affiliateId"`
	PartnerId   string `json:"partnerId"`
	FeeId       string `json:"feeId"`

	Currency       currency.Type  `json:"currency"`
	Amount         currency.Cents `json:"amount"`
	AmountReversed currency.Cents `json:"amountReversed,omitempty"`

	Type   Type   `json:"type"`
	Status Status `json:"status" orm:"default:pending"`
	Live   bool   `json:"live,omitempty"`

	Metadata  Map    `json:"metadata" datastore:"-"`
	Metadata_ string `json:"-" datastore:",noindex"`
}

func New

func New(db *datastore.Datastore) *Transfer

type Type

type Type string
const (
	Stripe Type = "stripe"
)

Jump to

Keyboard shortcuts

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