model

package
v0.6.2 Latest Latest
Warning

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

Go to latest
Published: May 3, 2024 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CreateAccount

type CreateAccount struct {
	BankName   string                 `json:"bank_name"`
	Number     string                 `json:"number"`
	Currency   string                 `json:"currency"`
	IdentityId string                 `json:"identity_id"`
	LedgerId   string                 `json:"ledger_id"`
	BalanceId  string                 `json:"balance_id"`
	MetaData   map[string]interface{} `json:"meta_data"`
}

func (*CreateAccount) ToAccount

func (a *CreateAccount) ToAccount() model.Account

func (*CreateAccount) ValidateCreateAccount

func (a *CreateAccount) ValidateCreateAccount() error

type CreateBalance

type CreateBalance struct {
	LedgerId   string                 `json:"ledger_id"`
	IdentityId string                 `json:"identity_id"`
	Currency   string                 `json:"currency"`
	Precision  float64                `json:"precision"`
	MetaData   map[string]interface{} `json:"meta_data"`
}

func (*CreateBalance) ToBalance

func (b *CreateBalance) ToBalance() model.Balance

func (*CreateBalance) ValidateCreateBalance

func (b *CreateBalance) ValidateCreateBalance() error

type CreateBalanceMonitor

type CreateBalanceMonitor struct {
	BalanceId   string                 `json:"balance_id"`
	Condition   MonitorCondition       `json:"condition"`
	CallBackURL string                 `json:"call_back_url"`
	MetaData    map[string]interface{} `json:"meta_data"`
}

func (*CreateBalanceMonitor) ToBalanceMonitor

func (b *CreateBalanceMonitor) ToBalanceMonitor() model.BalanceMonitor

func (*CreateBalanceMonitor) ValidateCreateBalanceMonitor

func (b *CreateBalanceMonitor) ValidateCreateBalanceMonitor() error

type CreateIdentity

type CreateIdentity struct {
	IdentityType     string                 `json:"identity_type"`
	FirstName        string                 `json:"first_name"`
	LastName         string                 `json:"last_name"`
	OtherNames       string                 `json:"other_names"`
	Gender           string                 `json:"gender"`
	Dob              time.Time              `json:"dob"`
	EmailAddress     string                 `json:"email_address"`
	PhoneNumber      string                 `json:"phone_number"`
	Nationality      string                 `json:"nationality"`
	OrganizationName string                 `json:"organization_name"`
	Category         string                 `json:"category"`
	Street           string                 `json:"street"`
	Country          string                 `json:"country"`
	State            string                 `json:"state"`
	PostCode         string                 `json:"post_code"`
	City             string                 `json:"city"`
	CreatedAt        time.Time              `json:"created_at"`
	MetaData         map[string]interface{} `json:"meta_data"`
}

type CreateLedger

type CreateLedger struct {
	Name     string                 `json:"name"`
	MetaData map[string]interface{} `json:"meta_data"`
}

func (*CreateLedger) ToLedger

func (l *CreateLedger) ToLedger() model.Ledger

func (*CreateLedger) ValidateCreateLedger

func (l *CreateLedger) ValidateCreateLedger() error

type InflightUpdate added in v0.6.2

type InflightUpdate struct {
	Status string  `json:"status"`
	Amount float64 `json:"amount"`
}

type MonitorCondition

type MonitorCondition struct {
	Field    string `json:"field"`
	Operator string `json:"operator"`
	Value    int64  `json:"value"`
}

func (*MonitorCondition) ValidateMonitorCondition

func (c *MonitorCondition) ValidateMonitorCondition() error

type RecordTransaction

type RecordTransaction struct {
	Amount             float64                `json:"amount"`
	Rate               float64                `json:"rate"`
	Precision          float64                `json:"precision"`
	AllowOverDraft     bool                   `json:"allow_overdraft"`
	Inflight           bool                   `json:"inflight"`
	Source             string                 `json:"source"`
	Reference          string                 `json:"reference"`
	Destination        string                 `json:"destination"`
	Description        string                 `json:"description"`
	Currency           string                 `json:"currency"`
	BalanceId          string                 `json:"balance_id"`
	ScheduledFor       string                 `json:"scheduled_for"`
	InflightExpiryDate string                 `json:"inflight_expiry_date,omitempty"`
	Sources            []model.Distribution   `json:"sources"`
	Destinations       []model.Distribution   `json:"destinations"`
	MetaData           map[string]interface{} `json:"meta_data"`
}

func (*RecordTransaction) ToTransaction

func (t *RecordTransaction) ToTransaction() *model.Transaction

func (*RecordTransaction) ValidateRecordTransaction

func (t *RecordTransaction) ValidateRecordTransaction() error

Jump to

Keyboard shortcuts

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