Documentation
¶
Index ¶
- func Query(db *datastore.Datastore) datastore.Query
- type Payout
- func (p *Payout) Cancel() error
- func (p *Payout) Defaults()
- func (p *Payout) Init(db *datastore.Datastore)
- func (p Payout) Kind() string
- func (p *Payout) Load(ps []datastore.Property) (err error)
- func (p *Payout) MarkFailed(code, message string) error
- func (p *Payout) MarkInTransit() error
- func (p *Payout) MarkPaid() error
- func (p *Payout) Save() (ps []datastore.Property, err error)
- func (p *Payout) Validator() *val.Validator
- type Status
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Payout ¶
type Payout struct {
mixin.BaseModel
Amount int64 `json:"amount"` // cents
Currency currency.Type `json:"currency"`
Status Status `json:"status"`
DestinationType string `json:"destinationType"` // "bank_account" | "card"
DestinationId string `json:"destinationId"` // payment method ID
Description string `json:"description,omitempty"`
ArrivalDate time.Time `json:"arrivalDate,omitempty"`
ProviderRef string `json:"providerRef,omitempty"`
FailureCode string `json:"failureCode,omitempty"`
FailureMessage string `json:"failureMessage,omitempty"`
Metadata Map `json:"metadata,omitempty" datastore:"-"`
Metadata_ string `json:"-" datastore:",noindex"`
}
Payout represents an outbound transfer to a bank account or card.
func (*Payout) MarkFailed ¶
MarkFailed transitions payout to failed.
func (*Payout) MarkInTransit ¶
MarkInTransit transitions payout to in-transit.
Click to show internal directories.
Click to hide internal directories.