cncrdadapter

package
v0.1.5 Latest Latest
Warning

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

Go to latest
Published: Jul 13, 2024 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CncrdAdapter

type CncrdAdapter interface {
	CreatePaylink(ctx context.Context, request PaymentLinkRequestDto) (PaymentLinkDto, error)
	GetPaylinkById(ctx context.Context, id uint) (PaymentLinkDto, error)
}

func New

func New(cncrdBaseUrl string, fixedApiToken string) (CncrdAdapter, error)

type Impl

type Impl struct {
	// contains filtered or unexported fields
}
func (i *Impl) CreatePaylink(ctx context.Context, request PaymentLinkRequestDto) (PaymentLinkDto, error)

func (*Impl) GetPaylinkById

func (i *Impl) GetPaylinkById(ctx context.Context, id uint) (PaymentLinkDto, error)

type PaymentLinkDto

type PaymentLinkDto struct {
	Title       string  `json:"title"`
	Description string  `json:"description"`
	ReferenceId string  `json:"reference_id"`
	Purpose     string  `json:"purpose"`
	AmountDue   int64   `json:"amount_due"`
	AmountPaid  int64   `json:"amount_paid"`
	Currency    string  `json:"currency"`
	VatRate     float64 `json:"vat_rate"`
	Link        string  `json:"link"`
}

type PaymentLinkRequestDto

type PaymentLinkRequestDto struct {
	ReferenceId string  `json:"reference_id"`
	DebitorId   int64   `json:"debitor_id"`
	AmountDue   int64   `json:"amount_due"`
	Currency    string  `json:"currency"`
	VatRate     float64 `json:"vat_rate"`
}

Jump to

Keyboard shortcuts

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