bank

package
v0.7.0 Latest Latest
Warning

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

Go to latest
Published: Apr 9, 2023 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BVNResponse

type BVNResponse struct {
	Meta struct {
		CallsThisMonth int `json:"calls_this_month,omitempty"`
		FreeCallsLeft  int `json:"free_calls_left,omitempty"`
	}
	BVN string
}

BVNResponse represents response from resolve_bvn endpoint

type Bank

type Bank struct {
	ID        int    `json:"id,omitempty"`
	CreatedAt string `json:"createdAt,omitempty"`
	UpdatedAt string `json:"updatedAt,omitempty"`
	Name      string `json:"name,omitempty"`
	Slug      string `json:"slug,omitempty"`
	Code      string `json:"code,omitempty"`
	LongCode  string `json:"long_code,omitempty"`
	Gateway   string `json:"gateway,omitempty"`
	Active    bool   `json:"active,omitempty"`
	IsDeleted bool   `json:"is_deleted,omitempty"`
}

Bank represents a Paystack bank

type DefaultBankService

type DefaultBankService struct {
	*client.Client
}

DefaultBankService handles operations related to the bank For more details see https://developers.paystack.co/v1.0/reference#bank

func (*DefaultBankService) List

func (s *DefaultBankService) List(ctx context.Context) (*List, error)

List returns a list of all the banks. For more details see https://developers.paystack.co/v1.0/reference#list-banks

func (*DefaultBankService) ResolveAccountNumber

func (s *DefaultBankService) ResolveAccountNumber(ctx context.Context, accountNumber, bankCode string) (response.Response, error)

ResolveAccountNumber docs https://developers.paystack.co/v1.0/reference#resolve-account-number

func (*DefaultBankService) ResolveBVN

func (s *DefaultBankService) ResolveBVN(ctx context.Context, bvn int) (*BVNResponse, error)

ResolveBVN docs https://developers.paystack.co/v1.0/reference#resolve-bvn

type List

type List struct {
	Meta   response.ListMeta
	Values []Bank `json:"data,omitempty"`
}

List is a list object for banks.

type Service

type Service interface {
	List(ctx context.Context) (*List, error)
	ResolveBVN(ctx context.Context, bvn int) (*BVNResponse, error)
	ResolveAccountNumber(ctx context.Context, accountNumber, bankCode string) (response.Response, error)
}

Jump to

Keyboard shortcuts

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