eikster-dk/dinero-go

add type alias for all const properties

eikster-dk opened this issue · 0 comments

To improve the quality of the SDK, add a property for all const types in the SDK.

For example:

// Payment terms
const (
	Netto           = "Netto"
	NettoCash       = "NettoCash"
	CurrentMonthOut = "CurrentMonthNettoOut"
)

Can have a type alias like

// PaymentTerm represents how payment terms in dinero regnskab
type PaymentTerm string

// Payment terms
const (
	Netto            PaymentTerm = "Netto"
	NettoCash        PaymentTerm = "NettoCash"
	CurrentMonthOut  PaymentTerm = "CurrentMonthNettoOut"
)

Packages have const without a type alias is:

  • invoices
  • account
  • contacts