service

package
v1.103.0 Latest Latest
Warning

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

Go to latest
Published: Nov 27, 2024 License: MIT Imports: 25 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	PaymentTypes      = []string{"CARD PAYMENT", "BACS TRANSFER"}
	AllocatedStatuses = []string{"ALLOCATED", "APPROVED", "CONFIRMED"} // TODO: PFS-107 & PFS-110 to investigate
)

Functions

This section is empty.

Types

type Dispatch

type Dispatch interface {
	CreditOnAccount(ctx context.Context, event event.CreditOnAccount) error
	FinanceAdminUploadProcessed(ctx context.Context, event event.FinanceAdminUploadProcessed) error
}

type FileStorage

type FileStorage interface {
	GetFile(ctx context.Context, bucketName string, fileName string) (io.ReadCloser, error)
}

type HTTPClient

type HTTPClient interface {
	Do(req *http.Request) (*http.Response, error)
}

type Service

type Service struct {
	// contains filtered or unexported fields
}

func NewService

func NewService(httpClient HTTPClient, conn *pgxpool.Pool, dispatch Dispatch, filestorage FileStorage) Service

func (*Service) AddFeeReduction

func (s *Service) AddFeeReduction(ctx context.Context, clientId int, data shared.AddFeeReduction) error

func (*Service) AddInvoiceAdjustment

func (s *Service) AddInvoiceAdjustment(ctx context.Context, clientId int, invoiceId int, ledgerEntry *shared.AddInvoiceAdjustmentRequest) (*shared.InvoiceReference, error)

func (*Service) AddManualInvoice

func (s *Service) AddManualInvoice(ctx context.Context, clientId int, data shared.AddManualInvoice) error

func (*Service) CancelFeeReduction

func (s *Service) CancelFeeReduction(ctx context.Context, id int, cancelledFeeReduction shared.CancelFeeReduction) error

func (*Service) GetAccountInformation

func (s *Service) GetAccountInformation(ctx context.Context, id int) (*shared.AccountInformation, error)

func (*Service) GetBillingHistory

func (s *Service) GetBillingHistory(ctx context.Context, clientID int) ([]shared.BillingHistory, error)

func (*Service) GetFeeReductions

func (s *Service) GetFeeReductions(ctx context.Context, id int) (*shared.FeeReductions, error)

func (*Service) GetInvoiceAdjustments

func (s *Service) GetInvoiceAdjustments(ctx context.Context, clientId int) (*shared.InvoiceAdjustments, error)

func (*Service) GetInvoices

func (s *Service) GetInvoices(ctx context.Context, clientId int) (*shared.Invoices, error)

func (*Service) GetPermittedAdjustments

func (s *Service) GetPermittedAdjustments(ctx context.Context, invoiceId int) ([]shared.AdjustmentType, error)

func (*Service) ProcessFinanceAdminUpload

func (s *Service) ProcessFinanceAdminUpload(ctx context.Context, detail shared.FinanceAdminUploadEvent) error

func (*Service) ReapplyCredit

func (s *Service) ReapplyCredit(ctx context.Context, clientID int32) error

func (*Service) UpdateClient

func (s *Service) UpdateClient(ctx context.Context, id int, courtRef string) error

func (*Service) UpdatePendingInvoiceAdjustment

func (s *Service) UpdatePendingInvoiceAdjustment(ctx context.Context, clientId int, adjustmentId int, status shared.AdjustmentStatus) error

type TX

type TX interface {
	Begin(ctx context.Context) (pgx.Tx, error)
}

Jump to

Keyboard shortcuts

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