accounts

package
v0.5.2 Latest Latest
Warning

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

Go to latest
Published: Feb 22, 2021 License: Apache-2.0 Imports: 22 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewRepo

func NewRepo(logger log.Logger, db *sql.DB) *sqlAccountRepository

func RegisterRoutes

func RegisterRoutes(logger log.Logger, r *mux.Router, accounts Repository, validations validator.Repository, fedClient fed.Client, keeper, transitKeeper *secrets.StringKeeper, validationStrategies map[validator.StrategyKey]validator.Strategy, ofac *AccountOfacSearcher, appSalt string)

Types

type AccountOfacSearcher

type AccountOfacSearcher struct {
	Repo           Repository
	WatchmanClient watchman.Client
}

func (*AccountOfacSearcher) StoreAccountOFACSearch

func (s *AccountOfacSearcher) StoreAccountOFACSearch(account *client.Account, requestID string) error

StoreAccountOFACSearch performs OFAC searches against the Account's HolderName and nickname if populated. The search result is stored in s.Repo for use later (in approvals)

type CreateAccountRequest

type CreateAccountRequest struct {
	HolderName    string             `json:"holderName"`
	AccountNumber string             `json:"accountNumber"`
	RoutingNumber string             `json:"routingNumber"`
	Type          client.AccountType `json:"type"`
	// contains filtered or unexported fields
}

func (*CreateAccountRequest) Disfigure

func (req *CreateAccountRequest) Disfigure(keeper *secrets.StringKeeper, appSalt string) error

func (*CreateAccountRequest) Validate

func (req *CreateAccountRequest) Validate() error

type Repository

type Repository interface {
	GetCustomerAccountsByIDs(accountIDs []string) ([]*client.Account, error)

	CreateCustomerAccount(customerID, userID string, req *CreateAccountRequest) (*client.Account, error)
	// contains filtered or unexported methods
}

Jump to

Keyboard shortcuts

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