models

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Jan 16, 2022 License: CC0-1.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Address

type Address struct {
	Street     *string `xml:"street"`
	Number     *string `xml:"number"`
	PostalCode string  `xml:"postalCode"`
	City       string  `xml:"city"`
}

type CancelledInvoice

type CancelledInvoice struct {
	InvoiceMark      uint64 `xml:"invoiceMark"`
	CancellationMark uint64 `xml:"cancellationMark"`
	CancellationDate string `xml:"cancellationDate"`
}

type CancelledInvoicesDoc

type CancelledInvoicesDoc struct {
	CancelledInvoices []CancelledInvoice `xml:"cancelledInvoice"`
}

type ContinuationToken

type ContinuationToken struct {
	NextPartitionKey string `xml:"nextPartitionKey"`
	NextRowKey       string `xml:"nextRowKey"`
}

type Error

type Error struct {
	Message string `xml:"message"`
	Code    string `xml:"code"`
}

func (Error) Error

func (e Error) Error() string

Error implements the error interface and returns a human-readable representation of the given error.

type Errors

type Errors struct {
	Error []Error `xml:"error"`
}

type ExpensesClassificationType

type ExpensesClassificationType struct {
	ClassificationType     string `xml:"classificationType"`
	ClassificationCategory string `xml:"classificationCategory"`
	Amount                 string `xml:"amount"`
	ID                     *byte  `xml:"id"`
}

type ExpensesClassificationsDoc

type ExpensesClassificationsDoc struct {
	ExpensesInvoiceClassification []ExpensesInvoiceClassification `xml:"ExpensesInvoiceClassification"`
}

type ExpensesInvoiceClassification

type ExpensesInvoiceClassification struct {
	InvoiceMark                           uint64                                  `xml:"invoiceMark"`
	ClassificationMark                    *uint64                                 `xml:"classificationMark"`
	EntityVatNumber                       *string                                 `xml:"entityVatNumber"`
	TransactionMode                       *uint8                                  `xml:"transactionMode"`
	InvoicesExpensesClassificationDetails []InvoicesExpensesClassificationDetails `xml:"invoicesExpensesClassificationDetails"`
}

type IncomeClassificationType

type IncomeClassificationType struct {
	ClassificationType     string `xml:"classificationType"`
	ClassificationCategory string `xml:"classificationCategory"`
	Amount                 string `xml:"amount"`
	ID                     *byte  `xml:"id"`
}

type IncomeClassificationsDoc

type IncomeClassificationsDoc struct {
	IncomeInvoiceClassification []IncomeInvoiceClassification `xml:"incomeInvoiceClassification"`
}

type IncomeInvoiceClassification

type IncomeInvoiceClassification struct {
	InvoiceMark                         uint64                                `xml:"invoiceMark"`
	ClassificationMark                  *uint64                               `xml:"classificationMark"`
	EntityVatNumber                     *string                               `xml:"entityVatNumber"`
	TransactionMode                     *uint8                                `xml:"transactionMode"`
	InvoicesIncomeClassificationDetails []InvoicesIncomeClassificationDetails `xml:"invoicesIncomeClassificationDetails"`
}

type Invoice

type Invoice struct {
	UID                 *string           `xml:"uid"`
	Mark                *uint64           `xml:"mark"`
	CancelledByMark     *uint64           `xml:"cancelledByMark"`
	AuthenticationCode  *string           `xml:"authenticationCode"`
	TransmissionFailure *byte             `xml:"transmissionFailure"`
	Issuer              *PartyType        `xml:"issuer"`
	Counterpart         *PartyType        `xml:"counterpart"`
	InvoiceHeader       *InvoiceHeader    `xml:"invoiceHeader"`
	PaymentMethods      *PaymentMethods   `xml:"paymentMethods"`
	InvoiceDetails      []*InvoiceDetails `xml:"invoiceDetails"`
	TaxesTotals         *TaxesTotals      `xml:"taxesTotals"`
	InvoiceSummary      *InvoiceSummary   `xml:"invoiceSummary"`
}

type InvoiceDetails

type InvoiceDetails struct {
	LineNumber                uint                        `xml:"lineNumber"`
	RecType                   *uint                       `xml:"recType"`
	Quantity                  *float64                    `xml:"quantity"`
	MeasurementUnit           *uint                       `xml:"measurementUnit"`
	InvoiceDetailType         *uint                       `xml:"invoiceDetailType"`
	NetValue                  float64                     `xml:"netValue"`
	VatCategory               uint                        `xml:"vatCategory"`
	VatAmount                 float64                     `xml:"vatAmount"`
	VatExemptionCategory      *uint                       `xml:"vatExemptionCategory"`
	Dienergia                 *ShipType                   `xml:"dienergia"`
	DiscountOption            *bool                       `xml:"discountOption"`
	WithheldAmount            *float64                    `xml:"withheldAmount"`
	WithheldPercentCategory   *uint                       `xml:"withheldPercentCategory"`
	StampDutyAmount           *float64                    `xml:"stampDutyAmount"`
	StampDutyPercentCategory  *uint                       `xml:"stampDutyPercentCategory"`
	FeesAmount                *float64                    `xml:"feesAmount"`
	FeesPercentCategory       *uint                       `xml:"feesPercentCategory"`
	OtherTaxesPercentCategory *uint                       `xml:"otherTaxesPercentCategory"`
	OtherTaxesAmount          *float64                    `xml:"otherTaxesAmount"`
	DeductionsAmount          *float64                    `xml:"deductionsAmount"`
	IncomeClassification      *IncomeClassificationType   `xml:"incomeClassification"`
	ExpensesClassification    *ExpensesClassificationType `xml:"expensesClassification"`
}

type InvoiceHeader

type InvoiceHeader struct {
	Series               string   `xml:"series"`
	Aa                   string   `xml:"aa"`
	IssueDate            string   `xml:"issueDate"`
	InvoiceType          string   `xml:"invoiceType"`
	VatPaymentSuspension *bool    `xml:"vatPaymentSuspension"`
	Currency             string   `xml:"currency"`
	ExchangeRate         *float64 `xml:"exchangeRate"`
	SelfPricing          *bool    `xml:"selfPricing"`
	CorrelatedInvoices   *uint    `xml:"correlatedInvoices"`
	DispatchDate         *string  `xml:"dispatchDate"`
	DispatchTime         *string  `xml:"dispatchTime"`
	VehicleNumber        *string  `xml:"vehicleNumber"`
	MovePurpose          *uint    `xml:"movePurpose"`
	FuelInvoice          *bool    `xml:"fuelInvoice"`
}

type InvoiceSummary

type InvoiceSummary struct {
	TotalNetValue          float64                     `xml:"totalNetValue"`
	TotalVatAmount         float64                     `xml:"totalVatAmount"`
	TotalWithheldAmount    float64                     `xml:"totalWithheldAmount"`
	TotalFeesAmount        float64                     `xml:"totalFeesAmount"`
	TotalStampDutyAmount   float64                     `xml:"totalStampDutyAmount"`
	TotalOtherTaxesAmount  float64                     `xml:"totalOtherTaxesAmount"`
	TotalDeductionsAmount  float64                     `xml:"totalDeductionsAmount"`
	TotalGrossValue        float64                     `xml:"totalGrossValue"`
	IncomeClassification   *IncomeClassificationType   `xml:"incomeClassification"`
	ExpensesClassification *ExpensesClassificationType `xml:"expensesClassification"`
}

type InvoicesDoc

type InvoicesDoc struct {
	Xmlns    string    `xml:"xmlns,attr"`
	Invoices []Invoice `xml:"invoice"`
}

type InvoicesExpensesClassificationDetails

type InvoicesExpensesClassificationDetails struct {
	LineNumber                       uint                         `xml:"lineNumber"`
	ExpensesClassificationDetailData []ExpensesClassificationType `xml:"ExpensesClassificationDetailData"`
}

type InvoicesIncomeClassificationDetails

type InvoicesIncomeClassificationDetails struct {
	LineNumber                     uint                       `xml:"lineNumber"`
	IncomeClassificationDetailData []IncomeClassificationType `xml:"incomeClassificationDetailData"`
}

type PartyType

type PartyType struct {
	VatNumber string   `xml:"vatNumber"`
	Country   string   `xml:"country"`
	Branch    uint64   `xml:"branch"`
	Name      *string  `xml:"name"`
	Address   *Address `xml:"address"`
}

type PaymentMethodDetails

type PaymentMethodDetails struct {
	Type              uint    `xml:"type"`
	Amount            float64 `xml:"amount"`
	PaymentMethodInfo string  `xml:"paymentMethodInfo"`
}

type PaymentMethods

type PaymentMethods struct {
	PaymentMethodDetails *PaymentMethodDetails `xml:"paymentMethodDetails"`
}

type RequestedDoc

type RequestedDoc struct {
	ContinuationToken      ContinuationToken          `xml:"continuationToken"`
	InvoicesDoc            InvoicesDoc                `xml:"invoicesDoc"`
	CancelledInvoicesDoc   CancelledInvoicesDoc       `xml:"cancelledInvoicesDoc"`
	IncomeClassification   IncomeClassificationType   `xml:"incomeClassificationsDoc"`
	ExpensesClassification ExpensesClassificationType `xml:"expensesClassification"`
}

type RequestedProviderDoc

type RequestedProviderDoc struct {
	ContinuationToken struct {
		NextPartitionKey string `xml:"nextPartitionKey"`
		NextRowKey       string `xml:"nextRowKey"`
	} `xml:"continuationToken"`
	InvoiceProviderType struct {
		IssuerVAT           string `xml:"issuerVAT"`
		InvoiceProviderMark string `xml:"invoiceProviderMark"`
		InvoiceUID          string `xml:"invoiceUid"`
		AuthenticationCode  string `xml:"authenticationCode"`
	} `xml:"InvoiceProviderType"`
}

type Response

type Response struct {
	StatusCode         string  `xml:"statusCode"`
	Errors             Errors  `xml:"errors"`
	Index              *uint   `xml:"index"`
	InvoiceUID         *string `xml:"invoiceUid"`
	InvoiceMark        *uint64 `xml:"invoiceMark"`
	ClassificationMark *uint64 `xml:"classificationMark"`
	AuthenticationCode *string `xml:"authenticationCode"`
	CancellationMark   *uint64 `xml:"cancellationMark"`
}

type ResponseDoc

type ResponseDoc struct {
	Response []*Response `xml:"response"`
}

func (ResponseDoc) Errors

func (rDoc ResponseDoc) Errors(prefix string) error

Errors returns all errors of the response doc wrapped with a given prefix. If no errors found then it returns nil.

func (ResponseDoc) HasErrors

func (rDoc ResponseDoc) HasErrors() bool

HasErrors returns true if the response contains at least one errors, else false.

type ShipType

type ShipType struct {
	ApplicationID   string `xml:"applicationId"`
	ApplicationDate string `xml:"applicationDate"`
	Doy             string `xml:"doy"`
	ShipID          string `xml:"shipID"`
}

type Taxes

type Taxes struct {
	TaxType         byte     `xml:"taxType"`
	TaxCategory     *byte    `xml:"taxCategory"`
	UnderlyingValue *float64 `xml:"underlyingValue"`
	TaxAmount       float64  `xml:"taxAmount"`
	ID              *byte    `xml:"id"`
}

type TaxesTotals

type TaxesTotals struct {
	Taxes Taxes `xml:"taxes"`
}

Jump to

Keyboard shortcuts

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