customers

package
v0.10.4 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	HttpClient = &http.Client{
		Timeout: 10 * time.Second,
	}
)

Functions

func AcceptableAccountStatus added in v0.9.0

func AcceptableAccountStatus(acct *moovcustomers.Account) error

AcceptableAccountStatus returns an error if the Accounts's status can not be used in a Transfer.

func AcceptableCustomerStatus added in v0.9.0

func AcceptableCustomerStatus(cust *moovcustomers.Customer) error

AcceptableCustomerStatus returns an error if the Customer's status can not be used in a Transfer.

Types

type Client

type Client interface {
	Ping() error

	Lookup(organization string, customerID string, requestID string) (*moovcustomers.Customer, error)
	FindAccount(organization, customerID, accountID string) (*moovcustomers.Account, error)
	DecryptAccount(organization, customerID, accountID string) (*moovcustomers.TransitAccountNumber, error)

	LatestOFACSearch(organization, customerID, requestID string) (*OfacSearch, error)
	RefreshOFACSearch(organization, customerID, requestID string) (*OfacSearch, error)
}

func NewClient

func NewClient(logger log.Logger, cfg config.Customers, httpClient *http.Client) Client

NewClient returns an Client instance and will default to using the Customers address in moov's standard Kubernetes setup.

endpoint is a DNS record responsible for routing us to an Customers instance. Example: http://customers.apps.svc.cluster.local:8080

type HealthCheck added in v0.9.0

type HealthCheck func() error

func HealthChecker added in v0.9.0

func HealthChecker(client Client, organization, customerID, accountID string) HealthCheck

HealthChecker verifies the provided customerID and accountID exist and are in acceptable statuses to be used in Transfers. This is used to verify configured Sources such as micro-deposits.

type MockClient

type MockClient struct {
	Accounts  map[string]*moovcustomers.Account
	Customers []*moovcustomers.Customer
	Transit   *moovcustomers.TransitAccountNumber
	Result    *OfacSearch

	Err error
}

func (*MockClient) DecryptAccount

func (c *MockClient) DecryptAccount(organization, customerID, accountID string) (*moovcustomers.TransitAccountNumber, error)

func (*MockClient) FindAccount

func (c *MockClient) FindAccount(organization, customerID, accountID string) (*moovcustomers.Account, error)

func (*MockClient) LatestOFACSearch

func (c *MockClient) LatestOFACSearch(organization, customerID, requestID string) (*OfacSearch, error)

func (*MockClient) Lookup

func (c *MockClient) Lookup(organization, customerID, requestID string) (*moovcustomers.Customer, error)

func (*MockClient) Ping

func (c *MockClient) Ping() error

func (*MockClient) RefreshOFACSearch

func (c *MockClient) RefreshOFACSearch(organization, customerID, requestID string) (*OfacSearch, error)

type OfacSearch

type OfacSearch struct {
	EntityId  string
	SdnName   string
	Match     float32
	CreatedAt time.Time
}

OfacSearch represents a search performed against OFAC data

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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