dto

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Feb 27, 2023 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AdditionalInvoiceInformationDto

type AdditionalInvoiceInformationDto struct {
	Title *string `json:"title" validate:"required"`
	Value *string `json:"value" validate:"required"`
}

type AddressDto

type AddressDto struct {
	Name    *string `json:"name" validate:"required"`
	Street1 *string `json:"street1,omitempty"`
	Street2 *string `json:"street2,omitempty"`
	Zip     *string `json:"zip,omitempty"`
	City    *string `json:"city,omitempty"`
	Country *string `json:"country,omitempty"`
}

func (*AddressDto) Format

func (data *AddressDto) Format(d delimitor.Delimitor) string

type BankPaymentDto

type BankPaymentDto struct {
	AccountHolder *string `json:"accountHolder" validate:"required"`
	BankName      *string `json:"bankName" validate:"required"`
	IBAN          *string `json:"iban" validate:"required"`
	BIC           *string `json:"bic,omitempty"`

	PaymentReference      *string `json:"paymentReference,omitempty"`
	RemittanceInformation *string `json:"remittanceInformation,omitempty"`
}

type DocumentDto

type DocumentDto struct {
	Style *DocumentStyleDto `json:"style" validate:"required"`

	SellerInformation *SellerInformationDto `json:"sellerInformation" validate:"required"`

	InvoiceAddress *InvoiceAddressDto `json:"invoiceAddress" validate:"required"`

	InvoiceInformation *InvoiceInformationDto `json:"invoiceInformation" validate:"required"`

	//can be null - no specific customer to be written on the invoice
	CustomerAddress *AddressDto `json:"customerAddress"`

	InvoiceData *InvoiceDto `json:"invoiceData" validate:"required"`

	//string-data-block after the invoice for writing thank you
	InvoiceDataSuffix *string `json:"invoiceDataSuffix" validate:"omitempty"`

	BankPaymentData *BankPaymentDto `json:"bankPaymentData"`
}

type DocumentStyleDto

type DocumentStyleDto struct {
	LocaleCode   *string `json:"localeCode" validate:"required"`
	LanguageCode *string `json:"languageCode" validate:"required"`

	Image *document.Image `json:"image"`

	Layout *document.LayoutType `json:"layout" validate:"required"`

	//only possible when A4-Portrait
	ShowMarkerPuncher *bool `json:"showMarkerPuncher"`

	//only possible when A4-Portrait
	ShowMarkerFolding *bool `json:"showMarkerFolding"`

	//only possible when submitting bank-payment-data in main document
	ShowBankPaymentQrCode *bool `json:"showBankPaymentQrCode"`

	FooterOverride *string `json:"footerOverride"`
}

type InvoiceAddressDto

type InvoiceAddressDto struct {
	*AddressDto

	VAT *string `json:"vat,omitempty"`
}

func (*InvoiceAddressDto) Format

func (data *InvoiceAddressDto) Format(d delimitor.Delimitor) string

type InvoiceDto

type InvoiceDto struct {
	ShowNetColumn    *bool `json:"showNetColumn"`
	ShowGrossColumn  *bool `json:"showGrossColumn"`
	ShowTaxColumn    *bool `json:"showTaxColumn"`
	ShowAmountColumn *bool `json:"showAmountColumn"`

	ShowNetSum   *bool `json:"showNetSum"`
	ShowTaxSum   *bool `json:"showTaxSum"`
	ShowGrossSum *bool `json:"showGrossSum"`

	SumDiscountPercentage *float64 `json:"sumDiscountPercentage"`
	SumDiscountFixed      *float64 `json:"sumDiscountFixed"`

	Rows *[]InvoiceRowDto `json:"rows"`
}

type InvoiceInformationDto

type InvoiceInformationDto struct {
	OfferNumber *string    `json:"offerNumber" validate:"required_without=InvoiceNumber"`
	OfferDate   *time.Time `json:"offerDate" validate:"required_with=OfferNumber"`

	DueDate *time.Time `json:"dueDate" validate:"required"`

	InvoiceNumber *string    `json:"invoiceNumber" validate:"required_without=OfferNumber"`
	InvoiceDate   *time.Time `json:"invoiceDate" validate:"required_with=InvoiceNumber"`

	CustomerIdentifier *string `json:"customerIdentifier"`

	AdditionalInformation *[]AdditionalInvoiceInformationDto `json:"additionalInformation"`
}

type InvoiceRowDto

type InvoiceRowDto struct {
	Name        *string `json:"name" validate:"required"`
	Description *string `json:"description" validate:"omitempty"`

	Amount     *float64 `json:"amount"`
	AmountUnit *string  `json:"amountUnit"`

	Net           *float64 `json:"net"`
	TaxPercentage *float64 `json:"taxPercentage"`
	Tax           *float64 `json:"tax"`
	Gross         *float64 `json:"gross"`

	DiscountPercentage *float64 `json:"discountPercentage"`
	DiscountFixed      *float64 `json:"discountFixed"`
}

type SellerInformationDto

type SellerInformationDto struct {
	Address *AddressDto `json:"address" validate:"required"`

	Email                   *string `json:"email,omitempty" validate:"omitempty,email"`
	Phone                   *string `json:"phone,omitempty"`
	Website                 *string `json:"website,omitempty"`
	VAT                     *string `json:"vat,omitempty"`
	CorporateRegisterNumber *string `json:"corporateRegisterNumber,omitempty"`
}

func (*SellerInformationDto) Format

Jump to

Keyboard shortcuts

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