api

package
v1.147.0-pfs-237-jwt.4 Latest Latest
Warning

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

Go to latest
Published: Feb 18, 2025 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Caches

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

type Client

type Client struct {
	Envs
	// contains filtered or unexported fields
}

func NewClient

func NewClient(httpClient HTTPClient, jwt JWTClient, envs Envs) *Client

func (*Client) AddFeeReduction

func (c *Client) AddFeeReduction(ctx context.Context, clientId int, feeType string, startYear string, lengthOfAward string, dateReceived string, notes string) error

func (*Client) AddManualInvoice

func (c *Client) AddManualInvoice(ctx context.Context, clientId int, invoiceType string, amount *string, raisedDate *string, raisedYear *string, startDate *string, endDate *string, supervisionLevel *string) error

func (*Client) AdjustInvoice

func (c *Client) AdjustInvoice(ctx context.Context, clientId int, supervisionBillingTeamId int, invoiceId int, adjustmentType string, notes string, amount string) error

func (*Client) CancelFeeReduction

func (c *Client) CancelFeeReduction(ctx context.Context, clientId int, feeReductionId int, cancellationReason string) error

func (*Client) CreatePendingInvoiceAdjustmentTask

func (c *Client) CreatePendingInvoiceAdjustmentTask(ctx context.Context, clientId int, supervisionBillingTeamId int, invoiceRef string, adjustmentType string) error

func (*Client) GetAccountInformation

func (c *Client) GetAccountInformation(ctx context.Context, ClientId int) (shared.AccountInformation, error)

func (*Client) GetBillingHistory

func (c *Client) GetBillingHistory(ctx context.Context, clientId int) ([]shared.BillingHistory, error)

func (*Client) GetFeeReductions

func (c *Client) GetFeeReductions(ctx context.Context, clientId int) (shared.FeeReductions, error)

func (*Client) GetInvoiceAdjustments

func (c *Client) GetInvoiceAdjustments(ctx context.Context, clientId int) (shared.InvoiceAdjustments, error)

func (*Client) GetInvoices

func (c *Client) GetInvoices(ctx context.Context, clientId int) (shared.Invoices, error)

func (*Client) GetPermittedAdjustments

func (c *Client) GetPermittedAdjustments(ctx context.Context, clientId int, invoiceId int) ([]shared.AdjustmentType, error)

func (*Client) GetPersonDetails

func (c *Client) GetPersonDetails(ctx context.Context, ClientId int) (shared.Person, error)

func (*Client) GetUser

func (c *Client) GetUser(ctx context.Context, userId int) (shared.User, error)

func (*Client) GetUserSession

func (c *Client) GetUserSession(ctx context.Context) (*shared.User, error)

func (*Client) SubmitDirectDebit

func (c *Client) SubmitDirectDebit(accountHolder string, accountName string, sortCode string, accountNumber string) error

func (*Client) UpdatePendingInvoiceAdjustment

func (c *Client) UpdatePendingInvoiceAdjustment(ctx context.Context, clientId int, ledgerId int, status string) error

type ClientError

type ClientError string
const ErrUnauthorized ClientError = "unauthorized"

func (ClientError) Error

func (e ClientError) Error() string

type Envs

type Envs struct {
	SiriusURL  string
	BackendURL string
}

type HTTPClient

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

type JWTClient

type JWTClient interface {
	CreateJWT(ctx context.Context) string
}

type StatusError

type StatusError struct {
	Code   int    `json:"code"`
	URL    string `json:"url"`
	Method string `json:"method"`
}

func (StatusError) Data

func (e StatusError) Data() interface{}

func (StatusError) Error

func (e StatusError) Error() string

Jump to

Keyboard shortcuts

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