Documentation
¶
Overview ¶
Package szamlazzhu is a Go language binding for the szamlazz.hu Számla Agent API
The NewUserAgent and NewTokenAgent functions should be used to create an Agent struct initialized with számlázz.hu credentials. Methods of the struct can be used to invoke API endpoints afterwards.
a := szamlazzhu.NewUserAgent("user@example.com", "P4ssword") receipt, err := a.GenerateReceipt(szamlazzhu.Xmlnyugtacreate{ Elotag: "BNY", Fizmod: "készpénz", Tetelek: []szamlazzhu.XmlnyugtacreateTetel{ { Megnevezes: "Eladott dolog", NettoEgysegar: 100, Mennyiseg: 5, MennyisegiEgyseg: "db", Netto: 500, Afakulcs: "27", Afa: 135, Brutto: 635, }, }, }) if err != nil { fmt.Printf("Something went wrong: %v\n", err) }else{ fmt.Printf("Receipt issued, number: %s\n", receipt.Nyugtaszam) }
The agent struct should be kept as-long as you wish to use the same credentials, as it stores session-specific identifier.
Each method is a direct call to an API endpoint, taking the parameters as described by the API documentation. The fields Felhasználónév, Jelszó, Token and VálaszVerzió will be set by the Agent, and should not need to be used directly.
All errors - including stacktraces, HTTP headers, XML-embedded failure codes and timeouts - are collected and returned in convenient Go format, irrespective of the format the REST API returns them.
When err == nil, it is safe to assume the business-logic of the call has happened successfully. When err != nil, an error has happened meaning that the business-logic of the call may or may not happened. The client needs to examine the error, and decide how to proceed, including any retry attempts if applicable.
In addition to this documentation, you may refer to https://docs.szamlazz.hu for additional information about the API itself.
Index ¶
- Constants
- type Agent
- func (a *Agent) DeleteProforma(req Xmlszamladbkdel) (Xmlszamladbkdelvalasz, error)
- func (a *Agent) GenerateInvoice(req Xmlszamla) (Xmlszamlavalasz, error)
- func (a *Agent) GenerateReceipt(req Xmlnyugtacreate) (Xmlnyugtavalasz, error)
- func (a *Agent) QueryInvoicePdf(req Xmlszamlapdf) (Xmlszamlavalasz, error)
- func (a *Agent) QueryInvoiceXml(req Xmlszamlaxml) (Szamla, error)
- func (a *Agent) QueryReceipt(req Xmlnyugtaget) (Xmlnyugtavalasz, error)
- func (a *Agent) QueryTaxpayer(req Xmltaxpayer) (QueryTaxpayerResponse, error)
- func (a *Agent) RegisterCredit(req Xmlszamlakifiz) error
- func (a *Agent) ReverseInvoice(req Xmlszamlast) (string, error)
- func (a *Agent) ReverseReceipt(req Xmlnyugtast) (Xmlnyugtavalasz, error)
- func (a *Agent) SendReceipt(req Xmlnyugtasend) (Xmlnyugtasendvalasz, error)
- func (a *Agent) StornoReceipt(req Xmlnyugtast) (Xmlnyugtavalasz, error)
- func (a *Agent) SupplierAccount(req Xmlcegmb) (SupplierStatus, error)
- type Date
- type Empty
- type Message
- type QueryTaxpayerResponse
- type SupplierStatus
- type Szamla
- type SzamlaAfakulcsossz
- type SzamlaKifizetes
- type SzamlaTetel
- type SzamlazzhuError
- type TaxpayerAddressItem
- type Xmlcegmb
- type Xmlnyugtacreate
- type XmlnyugtacreateKifizetes
- type XmlnyugtacreateTetel
- type Xmlnyugtaget
- type Xmlnyugtasend
- type Xmlnyugtasendvalasz
- type Xmlnyugtast
- type Xmlnyugtavalasz
- type XmlnyugtavalaszAfakulcsossz
- type XmlnyugtavalaszKifizetes
- type XmlnyugtavalaszTetel
- type Xmlszamla
- type XmlszamlaTetel
- type Xmlszamladbkdel
- type Xmlszamladbkdelvalasz
- type Xmlszamlakifiz
- type XmlszamlakifizKifizetes
- type Xmlszamlapdf
- type Xmlszamlast
- type Xmlszamlavalasz
- type Xmlszamlaxml
- type Xmltaxpayer
Constants ¶
const ( ErrorSystemMaintenance = 1 // System Maintenance, please try again in a few minutes. ErrorFailedLogin = 3 // Login error. Invalid login name, password or token. ErrorAccountProblem = 136 // For some reason you cannot use Számla Agent. Please log in to the Számlázz.hu system via a browser. ErrorMultiUser = 164 // The username-password combination is ambigous due to multi-company access. Please use Token authentication. ErrorInvalidPrefix = 202 // The provided invoice prefix cannot be used. You need to login to the website and add the desired prefixes before you can use them with Számla Agent. )
Configuration errors - you may need to change
const ( ErrorXMLFile = 53 // Missing XML file. RPC structure error ErrorXMLRead = 57 // XML reading error. There is an error in the sent XML file. ErrorSessionConflict = 135 // Conflict in session data )
Structural errors - these may be bugs in the binding package, consider reporting them.
const ( ErrorInvalidNettoErtek1 = 259 // The NET value of the item is not correct ErrorInvalidAfa1 = 260 // The VAT value of the item is not correct ErrorInvalidBruttoErtek1 = 261 // The GROSS value of the item is not correct ErrorInvalidNettoErtek2 = 262 // The NET value of the item is not correct ErrorInvalidAfa2 = 263 // The VAT value of the item is not correct ErrorInvalidBruttoErtek2 = 264 // The GROSS value of the item is not correct )
Data errors - you provided information that does not pass szamlazz.hu validations.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Agent ¶
type Agent struct {
// contains filtered or unexported fields
}
Agent is an authenticated agent that can interact with the szamlazz.hu API endpoint https://docs.szamlazz.hu
func NewTokenAgent ¶
NewAgentUser creates a new Agent instance, based on token authentication
func NewUserAgent ¶
NewUserAgent creates a new Agent instance, based on username authentication
func (*Agent) DeleteProforma ¶
func (a *Agent) DeleteProforma(req Xmlszamladbkdel) (Xmlszamladbkdelvalasz, error)
DeleteProforma removes a proforma invoice (díjbekérő) from szamlazz.hu https://docs.szamlazz.hu/#deleting-a-pro-forma-invoice
func (*Agent) GenerateInvoice ¶
func (a *Agent) GenerateInvoice(req Xmlszamla) (Xmlszamlavalasz, error)
GenerateInvoice creates a new invoice (or other document) https://docs.szamlazz.hu/#generating-invoices
func (*Agent) GenerateReceipt ¶
func (a *Agent) GenerateReceipt(req Xmlnyugtacreate) (Xmlnyugtavalasz, error)
GenerateReceipt creates a new receipt https://docs.szamlazz.hu/#generating-a-receipt
func (*Agent) QueryInvoicePdf ¶
func (a *Agent) QueryInvoicePdf(req Xmlszamlapdf) (Xmlszamlavalasz, error)
QueryInvoicePdf downloads the PDF representation of an invoice https://docs.szamlazz.hu/#querying-the-invoice-pdf
func (*Agent) QueryInvoiceXml ¶
func (a *Agent) QueryInvoiceXml(req Xmlszamlaxml) (Szamla, error)
QueryInvoiceXml downloads invoice details https://docs.szamlazz.hu/#querying-the-invoice-pdf
func (*Agent) QueryReceipt ¶
func (a *Agent) QueryReceipt(req Xmlnyugtaget) (Xmlnyugtavalasz, error)
QueryReceipt downloads an existing receipt https://docs.szamlazz.hu/#querying-a-receipt
func (*Agent) QueryTaxpayer ¶
func (a *Agent) QueryTaxpayer(req Xmltaxpayer) (QueryTaxpayerResponse, error)
QueryTaxpayer requests taxpayer information from NAV via szamlazz.hu https://docs.szamlazz.hu/#querying-taxpayers
func (*Agent) RegisterCredit ¶
func (a *Agent) RegisterCredit(req Xmlszamlakifiz) error
RegisterCredit updates payment entries for an invoice https://docs.szamlazz.hu/#registering-a-credit-entry
func (*Agent) ReverseInvoice ¶
func (a *Agent) ReverseInvoice(req Xmlszamlast) (string, error)
ReverseInvoice reverses an existing invoice and returns the reversing document number https://docs.szamlazz.hu/#reversing-an-invoice-storno
func (*Agent) ReverseReceipt ¶ added in v1.1.0
func (a *Agent) ReverseReceipt(req Xmlnyugtast) (Xmlnyugtavalasz, error)
ReverseReceipt reverses an existing receipt https://docs.szamlazz.hu/#reversing-a-receipt-storno
func (*Agent) SendReceipt ¶
func (a *Agent) SendReceipt(req Xmlnyugtasend) (Xmlnyugtasendvalasz, error)
SendReceipt sends an existing receipt via e-mail https://docs.szamlazz.hu/#sending-a-receipt
func (*Agent) StornoReceipt ¶
func (a *Agent) StornoReceipt(req Xmlnyugtast) (Xmlnyugtavalasz, error)
StornoReceipt is an alias of ReverseReceipt for compatibility reasons. Deprecated!
func (*Agent) SupplierAccount ¶
func (a *Agent) SupplierAccount(req Xmlcegmb) (SupplierStatus, error)
SupplierAccount creates or requests access to a supplier's szamlazz.hu account https://docs.szamlazz.hu/#self-billing
type Date ¶
Date implements date fields as go time.Time
func (*Date) MarshalText ¶
MarshalText marshals a Date from time.Time to 2006-01-02 format
func (*Date) MarshalXML ¶
MarshalXML is a wrapper to override time.Time.MarshalXML with MarshalText
func (*Date) UnmarshalText ¶
UnmarshalText unmarshals from 2006-01-02 format
type Empty ¶
type Empty struct{}
Empty is a dummy type that we use for passing in tags data reflections. Ideal, because it does not allocate memory
type Message ¶
type Message interface{}
Message is an alias of empty interface which we use for passing the endpoint descriptor structs
type QueryTaxpayerResponse ¶
type QueryTaxpayerResponse struct { XMLName Empty `xml:"http://schemas.nav.gov.hu/OSA/3.0/api QueryTaxpayerResponse"` ResultFuncCode string `xml:"result>funcCode"` // ENUM: OK, ERROR ResultErrorCode string `xml:"result>errorCode,omitempty"` ResultMessage string `xml:"result>message,omitempty"` Validity bool `xml:"taxpayerValidity,omitempty"` Name string `xml:"taxpayerData>taxpayerName"` ShortName string `xml:"taxpayerData>taxpayerShortName,omitempty"` TaxpayerId string `xml:"taxpayerData>taxNumberDetail>taxpayerId"` VatCode string `xml:"taxpayerData>taxNumberDetail>vatCode,omitempty"` CountyCode string `xml:"taxpayerData>taxNumberDetail>countyCode,omitempty"` VatGroupMembership string `xml:"taxpayerData>vatGroupMembership,omitempty"` AddressList []TaxpayerAddressItem `xml:"taxpayerData>taxpayerAddressList>taxpayerAddressItem"` }
QueryTaxpayerResponse describes the response of querying NAV taxpayer details Note: This is a partial implementation based on NAV schema
type SupplierStatus ¶
type SupplierStatus int
SupplierStatus describes the state of a supplier account
const ( Unknown SupplierStatus = iota NewCompany // New supplier account creation has started NewCompanyResend // New supplier account creation was already started, e-mail resent NewConnect // Supplier has existing account, access request sent NewConnectResend // Supplier has existing account, access was already requested, e-mail resent )
type Szamla ¶
type Szamla struct { XMLName Empty `xml:"http://www.szamlazz.hu/szamla szamla"` SzallitoId int `xml:"szallito>id"` SzallitoNev string `xml:"szallito>nev"` SzallitoCimOrszag string `xml:"szallito>cim>orszag"` SzallitoCimIrsz string `xml:"szallito>cim>irsz"` SzallitoCimTelepules string `xml:"szallito>cim>telepules"` SzallitoCimCim string `xml:"szallito>cim>cim"` SzallitoPostacimOrszag string `xml:"szallito>postacim>orszag,omitempty"` SzallitoPostacimIrsz string `xml:"szallito>postacim>irsz,omitempty"` SzallitoPostacimTelepules string `xml:"szallito>postacim>telepules,omitempty"` SzallitoPostacimCim string `xml:"szallito>postacim>cim,omitempty"` SzallitoAdoszam string `xml:"szallito>adoszam"` SzallitoAdoszameu string `xml:"szallito>adoszameu,omitempty"` SzallitoBankNev string `xml:"szallito>bank>nev,omitempty"` SzallitoBankBankszamla string `xml:"szallito>bank>bankszamla,omitempty"` AlapId int `xml:"alap>id"` AlapSzamlaszam string `xml:"alap>szamlaszam"` AlapForras int `xml:"alap>forras,omitempty"` AlapIktatoszam string `xml:"alap>iktatoszam"` AlapTipus string `xml:"alap>tipus"` AlapEszamla int `xml:"alap>eszamla"` AlapHivszamlaszam string `xml:"alap>hivszamlaszam,omitempty"` AlapHivdijbekszam string `xml:"alap>hivdijbekszam,omitempty"` AlapKelt Date `xml:"alap>kelt"` AlapTelj Date `xml:"alap>telj"` AlapFizh Date `xml:"alap>fizh"` AlapFizmod string `xml:"alap>fizmod"` AlapFizmodunified string `xml:"alap>fizmodunified"` // ENUM: átutalás, készpénz, bankkártya, csekk, utánvét, ajándékutalvány, barion, barter, csoportos beszedés, OTP Simple, kompenzáció, kupon, PayPal, PayU, SZÉP kártya, utalvány, egyéb AlapKeszpenz bool `xml:"alap>keszpenz"` AlapRendelesszam string `xml:"alap>rendelesszam,omitempty"` AlapNyelv string `xml:"alap>nyelv"` // ENUM: hu, en, de, it, ro, sk, hr, fr, es, cz, pl AlapDevizanem string `xml:"alap>devizanem"` AlapDevizabank string `xml:"alap>devizabank,omitempty"` AlapDevizaarf float64 `xml:"alap>devizaarf,omitempty"` AlapMegjegyzes string `xml:"alap>megjegyzes,omitempty"` AlapPenzforg bool `xml:"alap>penzforg"` AlapKata bool `xml:"alap>kata"` AlapEmail string `xml:"alap>email,omitempty"` AlapTeszt bool `xml:"alap>teszt"` VevoId int `xml:"vevo>id,omitempty"` VevoNev string `xml:"vevo>nev"` VevoAzonosito string `xml:"vevo>azonosito,omitempty"` VevoCimOrszag string `xml:"vevo>cim>orszag"` VevoCimIrsz string `xml:"vevo>cim>irsz"` VevoCimTelepules string `xml:"vevo>cim>telepules"` VevoCimCim string `xml:"vevo>cim>cim"` VevoPostacimOrszag string `xml:"vevo>postacim>orszag,omitempty"` VevoPostacimIrsz string `xml:"vevo>postacim>irsz,omitempty"` VevoPostacimTelepules string `xml:"vevo>postacim>telepules,omitempty"` VevoPostacimCim string `xml:"vevo>postacim>cim,omitempty"` VevoEmail string `xml:"vevo>email,omitempty"` VevoAdoszam string `xml:"vevo>adoszam"` VevoAdoszameu string `xml:"vevo>adoszameu,omitempty"` VevoLokacio int `xml:"vevo>lokacio"` VevoFokonyvVevo string `xml:"vevo>fokonyv>vevo,omitempty"` VevoFokonyvVevoazon string `xml:"vevo>fokonyv>vevoazon,omitempty"` VevoFokonyvDatum Date `xml:"vevo>fokonyv>datum,omitempty"` VevoFokonyvFolyamatostelj bool `xml:"vevo>fokonyv>folyamatostelj,omitempty"` VevoFokonyvElszDatTol Date `xml:"vevo>fokonyv>elszDatTol,omitempty"` VevoFokonyvElszDatIg Date `xml:"vevo>fokonyv>elszDatIg,omitempty"` Tetelek []SzamlaTetel `xml:"tetelek>tetel"` OsszegekAfakulcsossz []SzamlaAfakulcsossz `xml:"osszegek>afakulcsossz"` OsszegekTotalosszNetto float64 `xml:"osszegek>totalossz>netto"` OsszegekTotalosszAfa float64 `xml:"osszegek>totalossz>afa"` OsszegekTotalosszBrutto float64 `xml:"osszegek>totalossz>brutto"` Kifizetesek []SzamlaKifizetes `xml:"kifizetesek>kifizetes,omitempty"` Pdf []byte `xml:"pdf"` }
Szamla describes the response of downloading invoice data
type SzamlaAfakulcsossz ¶
type SzamlaAfakulcsossz struct { Afatipus string `xml:"afatipus,omitempty"` // ENUM: TAM, AAM, EU, EUK, MAA, F.AFA, K.AFA, ÁKK, TAHK, TEHK, EUT, EUKT Afakulcs float64 `xml:"afakulcs"` // schema states int, but field has decimals. Ex: 27.0 Netto float64 `xml:"netto"` Afa float64 `xml:"afa"` Brutto float64 `xml:"brutto"` }
SzamlaAfakulcsossz describes a summary for a VAT key within Szamla
type SzamlaKifizetes ¶
type SzamlaKifizetes struct { Datum Date `xml:"datum"` Jogcim string `xml:"jogcim"` Osszeg float64 `xml:"osszeg"` Megjegyzes string `xml:"megjegyzes,omitempty"` Bankszamlaszam string `xml:"bankszamlaszam,omitempty"` Banktranzid int `xml:"banktranzid,omitempty"` Devizaarf float64 `xml:"devizaarf,omitempty"` }
SzamlaKifizetesek describes a payment item within Szamla
type SzamlaTetel ¶
type SzamlaTetel struct { Nev string `xml:"nev"` Azonosito string `xml:"azonosito,omitempty"` Mennyiseg float64 `xml:"mennyiseg"` Mennyisegiegyseg string `xml:"mennyisegiegyseg"` Nettoegysegar float64 `xml:"nettoegysegar"` Afatipus string `xml:"afatipus,omitempty"` // ENUM: TAM, AAM, EU, EUK, MAA, F.AFA, K.AFA, ÁKK, TAHK, TEHK, EUT, EUKT Afakulcs float64 `xml:"afakulcs"` // schema states int, but field has decimals. Ex: 27.0 Netto float64 `xml:"netto"` Arresafaalap float64 `xml:"arresafaalap,omitempty"` Afa float64 `xml:"afa"` Brutto float64 `xml:"brutto"` Megjegyzes string `xml:"megjegyzes,omitempty"` FokonyvArbevetel string `xml:"fokonyv>arbevetel,omitempty"` FokonyvAfa string `xml:"fokonyv>afa,omitempty"` FokonyvGazdasagiesemeny string `xml:"fokonyv>gazdasagiesemeny,omitempty"` FokonyvGazdasagiesemenyafa string `xml:"fokonyv>gazdasagiesemenyafa,omitempty"` FokonyvElszdattol Date `xml:"fokonyv>elszdattol,omitempty"` FokonyvElszdatig Date `xml:"fokonyv>elszdatig,omitempty"` }
SzamlaTetel describes a line item within Szamla
type SzamlazzhuError ¶
type SzamlazzhuError struct {
// contains filtered or unexported fields
}
func (*SzamlazzhuError) Error ¶
func (e *SzamlazzhuError) Error() string
type TaxpayerAddressItem ¶
type TaxpayerAddressItem struct { Type string `xml:"taxpayerAddressType"` // ENUM: HQ, SITE, BRANCH Country string `xml:"taxpayerAddress>countryCode"` PostalCode string `xml:"taxpayerAddress>postalCode"` City string `xml:"taxpayerAddress>city"` StreetName string `xml:"taxpayerAddress>streetName"` PublicPlaceCategory string `xml:"taxpayerAddress>publicPlaceCategory"` Number string `xml:"taxpayerAddress>number,omitempty"` Building string `xml:"taxpayerAddress>building,omitempty"` Staircase string `xml:"taxpayerAddress>staircase,omitempty"` Floor string `xml:"taxpayerAddress>floor,omitempty"` Door string `xml:"taxpayerAddress>door,omitempty"` LotNumber string `xml:"taxpayerAddress>lotNumber,omitempty"` }
TaxpayerAddressItem describes a single address within QueryTaxpayerResponse
type Xmlcegmb ¶
type Xmlcegmb struct { XMLName Empty `xml:"http://www.szamlazz.hu/xmlcegmb XmlCegMb"` LoginName string `xml:"login>loginname"` // API user Password string `xml:"login>password"` // API password SzamlaAgentKulcs string `xml:"login>szamlaagentkulcs"` // API token CompanyName string `xml:"cegMb>cegcompanyname"` TaxNumber string `xml:"cegMb>cegtaxnumber"` SzamlaszamElotag string `xml:"cegMb>cegszamlaszamelotag"` Irsz string `xml:"cegMb>cegirsz"` City string `xml:"cegMb>cegcity"` Addr string `xml:"cegMb>cegaddr"` PostIrsz string `xml:"cegMb>cegpostirsz,omitempty"` PostCity string `xml:"cegMb>cegpostcity,omitempty"` PostAddr string `xml:"cegMb>cegpostaddr,omitempty"` Bank string `xml:"cegMb>cegbank"` BankAccount string `xml:"cegMb>cegbankaccount"` Email string `xml:"cegMb>cegemail"` EmailReplyTo string `xml:"cegMb>cegemailreplyto"` CegPenzforgDatTol string `xml:"cegMb>cegpenzforgdattol,omitempty"` CegPenzforgDatIg string `xml:"cegMb>cegpenzforgdatig,omitempty"` CegKataDatTol string `xml:"cegMb>cegkatadattol,omitempty"` CegKataDatIg string `xml:"cegMb>cegpenzkatadatig,omitempty"` UsrEmail string `xml:"usrMb>usremail"` UsrPassword string `xml:"usrMb>usrpassword"` UsrVezeteknev string `xml:"usrMb>usrvezeteknev"` UsrKeresztnev string `xml:"usrMb>usrkeresztnev"` }
xmlcegmb describes the request for registering a managed user account
type Xmlnyugtacreate ¶
type Xmlnyugtacreate struct { XMLName Empty `xml:"http://www.szamlazz.hu/xmlnyugtacreate xmlnyugtacreate"` Felhasznalo string `xml:"beallitasok>felhasznalo,omitempty"` Jelszo string `xml:"beallitasok>jelszo,omitempty"` SzamlaAgentKulcs string `xml:"beallitasok>szamlaagentkulcs,omitempty"` PdfLetoltes bool `xml:"beallitasok>pdfLetoltes"` HivasAzonosito string `xml:"fejlec>hivasAzonosito"` Elotag string `xml:"fejlec>elotag"` Fizmod string `xml:"fejlec>fizmod"` Penznem string `xml:"fejlec>penznem"` Devizaarf float64 `xml:"fejlec>devizaarf,omitempty"` Devizabank string `xml:"fejlec>devizabank,omitempty"` Megjegyzes string `xml:"fejlec>megjegyzes,omitempty"` PdfSablon string `xml:"fejlec>pdfSablon,omitempty"` FokonyvVevo string `xml:"fejlec>fokonyvVevo,omitempty"` Tetelek []XmlnyugtacreateTetel `xml:"tetelek>tetel"` Kifizetesek *[]XmlnyugtacreateKifizetes `xml:"kifizetesek>kifizetes,omitempty"` }
Xmlnyugtacreate describes the request of creating receipts
type XmlnyugtacreateKifizetes ¶
type XmlnyugtacreateKifizetes struct { Fizetoeszkoz string `xml:"fizetoeszkoz"` Osszeg float64 `xml:"osszeg"` Leiras string `xml:"leiras,omitempty"` }
XmlnyugtacreateKifizetes is a payment line of Xmlnyugtacreate
type XmlnyugtacreateTetel ¶
type XmlnyugtacreateTetel struct { Megnevezes string `xml:"megnevezes"` Azonosito string `xml:"azonosito,omitempty"` Mennyiseg float64 `xml:"mennyiseg"` MennyisegiEgyseg string `xml:"mennyisegiEgyseg"` NettoEgysegar float64 `xml:"nettoEgysegar"` Afakulcs string `xml:"afakulcs"` // ENUM: 0, 5, 10, 27, AAM, TAM, EU, EUK, MAA, F.AFA, K.AFA, ÁKK,HO, EUE, EUFADE, EUFAD37, ATK, NAM, EAM, KBAUK, KBAET Netto float64 `xml:"netto"` Afa float64 `xml:"afa"` Brutto float64 `xml:"brutto"` FokonyvArbevetel string `xml:"fokonyv>arbevetel,omitempty"` FokonyvAfa string `xml:"fokonyv>afa,omitempty"` }
XmlnyugtacreateTetel is a line item of Xmlnyugtacreate
type Xmlnyugtaget ¶
type Xmlnyugtaget struct { XMLName Empty `xml:"http://www.szamlazz.hu/xmlnyugtaget xmlnyugtaget"` Felhasznalo string `xml:"beallitasok>felhasznalo,omitempty"` Jelszo string `xml:"beallitasok>jelszo,omitempty"` SzamlaAgentKulcs string `xml:"beallitasok>szamlaagentkulcs,omitempty"` PdfLetoltes bool `xml:"beallitasok>pdfLetoltes"` Nyugtaszam string `xml:"fejlec>nyugtaszam"` PdfSablon string `xml:"fejlec>pdfSablon,omitempty"` HivasAzonosito string `xml:"fejlec>hivasAzonosito"` }
Xmlnyugtaget describes the request of downloading receipts
type Xmlnyugtasend ¶
type Xmlnyugtasend struct { XMLName Empty `xml:"http://www.szamlazz.hu/xmlnyugtasend xmlnyugtasend"` Felhasznalo string `xml:"beallitasok>felhasznalo,omitempty"` Jelszo string `xml:"beallitasok>jelszo,omitempty"` SzamlaAgentKulcs string `xml:"beallitasok>szamlaagentkulcs,omitempty"` Nyugtaszam string `xml:"fejlec>nyugtaszam"` Email string `xml:"emailKuldes>email,omitempty"` EmailReplyto string `xml:"emailKuldes>emailReplyto,omitempty"` EmailTargy string `xml:"emailKuldes>emailTargy,omitempty"` EmailSzoveg string `xml:"emailKuldes>emailSzoveg,omitempty"` }
Xmlnyugtasend describes the request of sending receipts via email
type Xmlnyugtasendvalasz ¶
type Xmlnyugtasendvalasz struct { XMLName Empty `xml:"http://www.szamlazz.hu/xmlnyugtasendvalasz xmlnyugtasendvalasz"` Sikeres bool `xml:"sikeres"` Hibakod int `xml:"hibakod,omitempty"` Hibauzenet string `xml:"hibauzenet,omitempty"` }
Xmlnyugtasendvalasz describes the response of sending receipts via email
type Xmlnyugtast ¶
type Xmlnyugtast struct { XMLName Empty `xml:"http://www.szamlazz.hu/xmlnyugtast xmlnyugtast"` Felhasznalo string `xml:"beallitasok>felhasznalo,omitempty"` Jelszo string `xml:"beallitasok>jelszo,omitempty"` SzamlaAgentKulcs string `xml:"beallitasok>szamlaagentkulcs,omitempty"` PdfLetoltes bool `xml:"beallitasok>pdfLetoltes"` Nyugtaszam string `xml:"fejlec>nyugtaszam"` PdfSablon string `xml:"fejlec>pdfSablon,omitempty"` HivasAzonosito string `xml:"fejlec>hivasAzonosito"` }
Xmlnyugtast describes the request of reversing receipts
type Xmlnyugtavalasz ¶
type Xmlnyugtavalasz struct { XMLName Empty `xml:"http://www.szamlazz.hu/xmlnyugtavalasz xmlnyugtavalasz"` Sikeres bool `xml:"sikeres"` Hibakod int `xml:"hibakod,omitempty"` Hibauzenet string `xml:"hibauzenet,omitempty"` NyugtaPdf []byte `xml:"nyugtaPdf,omitempty"` Id int `xml:"nyugta>alap>id"` HivasAzonosito string `xml:"nyugta>alap>hivasAzonosito"` Nyugtaszam string `xml:"nyugta>alap>nyugtaszam"` Tipus string `xml:"nyugta>alap>tipus"` Stornozott bool `xml:"nyugta>alap>stornozott"` StronozottNyugtaszam string `xml:"nyugta>alap>stornozottNyugtaszam"` Kelt Date `xml:"nyugta>alap>kelt"` Fizmod string `xml:"nyugta>alap>fizmod"` Penznem string `xml:"nyugta>alap>penznem"` Devizaarf float64 `xml:"nyugta>alap>devizaarf,omitempty"` Devizabank string `xml:"nyugta>alap>devizabank,omitempty"` Megjegyzes string `xml:"nyugta>alap>megjegyzes,omitempty"` FokonyvVevo string `xml:"nyugta>alap>fokonyvVevo,omitempty"` Teszt bool `xml:"nyugta>alap>teszt"` Tetelek []XmlnyugtavalaszTetel `xml:"nyugta>tetelek>tetel"` Kifizetesek *[]XmlnyugtavalaszKifizetes `xml:"nyugta>kifizetesek>kifizetes,omitempty"` OsszegekAfakulcsossz []XmlnyugtavalaszAfakulcsossz `xml:"nyugta>osszegek>afakulcsossz"` OsszegekTotalosszNetto float64 `xml:"nyugta>osszegek>totalossz>netto"` OsszegekTotalosszAfa float64 `xml:"nyugta>osszegek>totalossz>afa"` OsszegekTotalosszBrutto float64 `xml:"nyugta>osszegek>totalossz>brutto"` }
Xmlnyugtavalasz describes the response of creating receipts
func (*Xmlnyugtavalasz) GetPDF ¶
func (x *Xmlnyugtavalasz) GetPDF() ([]byte, error)
type XmlnyugtavalaszAfakulcsossz ¶
type XmlnyugtavalaszAfakulcsossz struct { Afatipus string `xml:"afatipus,omitempty"` // ENUM: TEHK, TAHK, TAM, AAM, EUT, EUKT, MAA, F.AFA, K.AFA, HO, EUE, EUFADE, EUFAD37, ATK, NAM, EAM, KBAUK, KBAET, 0, 5, 7, 18, 19, 20, 25, 27 Afakulcs float64 `xml:"afakulcs"` // schema states int, but field has decimals. Ex: 27.0 Netto float64 `xml:"netto"` Afa float64 `xml:"afa"` Brutto float64 `xml:"brutto"` }
XmlnyugtavalaszAfakulcsossz describes a summary for a VAT key within Xmlnyugtavalasz
type XmlnyugtavalaszKifizetes ¶
type XmlnyugtavalaszKifizetes struct { Fizetoeszkoz string `xml:"fizetoeszkoz"` Osszeg float64 `xml:"osszeg"` Leiras string `xml:"leiras,omitempty"` }
XmlnyugatavalaszKifizetes is a payment item of Xmlnyugtavalasz
type XmlnyugtavalaszTetel ¶
type XmlnyugtavalaszTetel struct { Megnevezes string `xml:"megnevezes"` Azonosito string `xml:"azonosito,omitempty"` NettoEgysegar float64 `xml:"nettoEgysegar"` Mennyiseg float64 `xml:"mennyiseg"` MennyisegiEgyseg string `xml:"mennyisegiEgyseg"` Netto float64 `xml:"netto"` Afatipus string `xml:"afatipus"` // ENUM: TAM, AAM, EU, EUK, MAA, F.AFA, K.AFA, ÁKK, TAHK, TEHK, EUT, EUKT, HO, EUE, EUFADE, EUFADE37, ATK, NAM, EAM, KBAUK, KBAET Afakulcs float64 `xml:"afakulcs"` // schema states int, but field has decimals. Ex: 27.0 Afa float64 `xml:"afa"` Brutto float64 `xml:"brutto"` FokonyvArbevetel string `xml:"fokonyv>arbevetel,omitempty"` FokonyvAfa string `xml:"fokonyv>afa,omitempty"` }
XmlnyugtavalaszTetel is a line item of Xmlnyugtavalasz
type Xmlszamla ¶
type Xmlszamla struct { XMLName Empty `xml:"http://www.szamlazz.hu/xmlszamla xmlszamla"` Felhasznalo string `xml:"beallitasok>felhasznalo,omitempty"` Jelszo string `xml:"beallitasok>jelszo,omitempty"` SzamlaAgentKulcs string `xml:"beallitasok>szamlaagentkulcs,omitempty"` ESzamla bool `xml:"beallitasok>eszamla"` // Whether to issue electronically signed invoices SzamlaLetoltes bool `xml:"beallitasok>szamlaLetoltes"` // Whether to return the created invoice image SzamlaLetoltesPld int `xml:"beallitasok>szamlaLetoltesPld,omitempty"` // Number of copies to download ValaszVerzio uint `xml:"beallitasok>valaszVerzio"` // Format of reply. 1: mixed 2: xml-encapsulated Aggregator string `xml:"beallitasok>aggregator,omitempty"` // Webshop or aggregator type (undocumented) Guardian bool `xml:"beallitasok>guardian,omitempty"` Cikkazoninvoice bool `xml:"beallitasok>cikkazoninvoice,omitempty"` // Display item identifiers on invoice (undocumented) SzamlaKulsoAzon string `xml:"beallitasok>szamlaKulsoAzon,omitempty"` // External reference for query-back KeltDatum Date `xml:"fejlec>keltDatum,omitempty"` // Date of creation (YYYY-MM-DD) TeljesitesDatum Date `xml:"fejlec>teljesitesDatum"` // Date of fullfillment (YYYY-MM-DD) FizetesiHataridoDatum Date `xml:"fejlec>fizetesiHataridoDatum"` // Payment deadline (YYYY-MM-DD) FizMod string `xml:"fejlec>fizmod"` // Payment type Penznem string `xml:"fejlec>penznem"` // Currency SzamlaNyelve string `xml:"fejlec>szamlaNyelve"` // Language (hu/en/de/it/ro/sk/hr) Megjegyzes string `xml:"fejlec>megjegyzes,omitempty"` // Comment ArfolyamBank string `xml:"fejlec>arfolyamBank,omitempty"` // Bank of exchange (MNB) Arfolyam float64 `xml:"fejlec>arfolyam,omitempty"` // Exchange rate (0.0) RendelesSzam string `xml:"fejlec>rendelesSzam"` // Order number DijbekeroSzamlaszam string `xml:"fejlec>dijbekeroSzamlaszam,omitempty"` // ID of Proforma invoice ElolegSzamla bool `xml:"fejlec>elolegszamla,omitempty"` // Is advance invoice? VegSzamla bool `xml:"fejlec>vegszamla,omitempty"` // Is settlement invoice? HelyesbitoSzamla bool `xml:"fejlec>helyesbitoszamla,omitempty"` // Is correction invoice? HelyesbitettSzamlaszam bool `xml:"fejlec>helyesbitettSzamlaszam,omitempty"` // No of invoice corrected Dijbekero bool `xml:"fejlec>dijbekero,omitempty"` // Is proforma invoice? Szallitolevel bool `xml:"fejlec>szallitolevel,omitempty"` // Is delivery bill? LogoExtra string `xml:"fejlec>logoExtra,omitempty"` // Extra information for logo selection (undocumented) SzamlaszamElotag string `xml:"fejlec>szamlaszamElotag,omitempty"` // Invoice ID prefix FizetendoKorrekcio float64 `xml:"fejlec>fizetendoKorrekcio,omitempty"` // Correction of total typically due to rounding of cash (undocumented) Fizetve bool `xml:"fejlec>fizetve,omitempty"` // Invoice has been paid? ArresAfa bool `xml:"fejlec>arresAfa,omitempty"` // VAT calculation based on margin EUsAfa bool `xml:"fejlec>eusAfa,omitempty"` // Indicate no no hungarian VAT on the receipt. Data disclosure towards NTCAs Online Invoice System is not needed. SzamlaSablon string `xml:"fejlec>szamlaSablon,omitempty"` // Invoice format (SzlaMost/SzlaAlap/SzlaNoEnv/Szla8cm/SzlaTomb) Elonezetpdf bool `xml:"fejlec>elonezetpdf,omitempty"` // Generate preview PDF instead of issuance? Bank string `xml:"elado>bank,omitempty"` // Merchant Bank Name BankszamlaSzam string `xml:"elado>bankszamlaszam,omitempty"` // Merchant Bank Account EmailReplyTo string `xml:"elado>emailReplyto,omitempty"` // Reply-to header for notification e-mails EmailTargy string `xml:"elado>emailTargy,omitempty"` // Subject header for notification e-mails EmailSzoveg string `xml:"elado>emailSzoveg,omitempty"` // Content text of notification e-mails AlairoNeve string `xml:"elado>alairoNeve,omitempty"` // Name of signer at seller (undocumented) VevoNev string `xml:"vevo>nev"` // Customer name VevoOrszag string `xml:"vevo>orszag,omitempty"` // Customer country VevoIrsz string `xml:"vevo>irsz"` // Customer address zip code VevoTelepules string `xml:"vevo>telepules"` // Customer address city VevoCim string `xml:"vevo>cim"` // Customer address line VevoEmail string `xml:"vevo>email,omitempty"` // Customer e-mail address VevoSendEmail bool `xml:"vevo>sendEmail,omitempty"` // Send notification e-mail to customer? VevoAdoalany int `xml:"vevo>adoalany,omitempty"` // Customer VAT status 7:business is based outside of the European Union, 6:business is based in the Europen Union, 1: has a hungarian tax number, 0: we don't know, if the buyer has a tax number, -1: no tax number VevoAdoszam string `xml:"vevo>adoszam,omitempty"` // Customer VAT number VevoAdoszamEU string `xml:"vevo>adoszamEU,omitempty"` // Customer VAT number VevoPostazasiNev string `xml:"vevo>postazasiNev,omitempty"` // Customer mail name VevoPostazasiOrszag string `xml:"vevo>postazasiOrszag,omitempty"` // Customer mail country VevoPostazasiIrsz string `xml:"vevo>postazasiIrsz,omitempty"` // Customer mail address zip code VevoPostazasiTelepules string `xml:"vevo>postazasiTelepules,omitempty"` // Customer mail address city VevoPostazasiCim string `xml:"vevo>postazasiCim,omitempty"` // Customer mail address line VevoAzonosito string `xml:"vevo>azonosito,omitempty"` // Customer unique ID VevoFokonyvKonyvelesDatum Date `xml:"vevo>vevoFokonyv>konyvelesDatum,omitempty"` VevoFokonyvVevoAzonosito string `xml:"vevo>vevoFokonyv>vevoAzonosito,omitempty"` VevoFokonyvFokonyviSzam string `xml:"vevo>vevoFokonyv>vevoFokonyviSzam,omitempty"` VevoFokonyvFolyamatostelj bool `xml:"vevo>vevoFokonyv>folyamatosTelj,omitempty"` VevoFokonyvElszDatumTol Date `xml:"vevo>vevoFokonyv>elszDatumTol,omitempty"` VevoFokonyvElszDatumIg Date `xml:"vevo>vevoFokonyv>elszDatumIg,omitempty"` VevoAlairoNeve string `xml:"vevo>alairoNeve,omitempty"` // Name of signer at customer (undocumented) VevoTelefonszam string `xml:"vevo>telefonszam,omitempty"` // Customer phone number VevoMegjegyzes string `xml:"vevo>megjegyzes,omitempty"` // Customer comment // Note: provider-specific consigment options are not supported by the Go binding yet FuvarlevelVonalkod string `xml:"fuvarlevel>vonalkod,omitempty"` // Generic barcode of consigment FuvarlevelMegjegyzes string `xml:"fuvarlevel>megjegyzes,omitempty"` // Generic comment of consigment Tetelek []XmlszamlaTetel `xml:"tetelek>tetel"` // Invoice content }
Xmlszamla describes the request of creating new invoices
type XmlszamlaTetel ¶
type XmlszamlaTetel struct { Megnevezes string `xml:"megnevezes"` // Item name Azonosito string `xml:"azonosito,omitempty"` // Item identifier Mennyiseg float64 `xml:"mennyiseg"` // Item quantity MennyisegiEgyseg string `xml:"mennyisegiEgyseg"` // Quantity specifier NettoEgysegar float64 `xml:"nettoEgysegar"` // Net unit value AfaKulcs string `xml:"afakulcs"` // VAT base (TAM/AAM/EU/EUK/MAA/F.AFA/K.AFA/0/5/7/18/19/20/25/27) ArresAfaAlap float64 `xml:"arresAfaAlap"` // Margin-based VAT base NettoErtek float64 `xml:"nettoErtek"` // Net value AfaErtek float64 `xml:"afaErtek"` // VAT value BruttoErtek float64 `xml:"bruttoErtek"` // Gross value Megjegyzes string `xml:"megjegyzes,omitempty"` // Comment FokonyvGazdasagiEsem string `xml:"tetelFokonyv>gazdasagiEsem,omitempty"` FokonyvGazdasagiEsemAfa string `xml:"tetelFokonyv>gazdasagiEsemAfa,omitempty"` FokonyvArbevetelFokonyviSzam string `xml:"tetelFokonyv>arbevetelFokonyviSzam,omitempty"` FokonyvAfaFokonyviSzam string `xml:"tetelFokonyv>afaFokonyviSzam,omitempty"` FokonyvElszDatumTol Date `xml:"tetelFokonyv>elszDatumTol,omitempty"` FokonyvElszDatumIg Date `xml:"tetelFokonyv>elszDatumIg,omitempty"` }
XmlszamlaTetel describes a line item within an xmlszamla
type Xmlszamladbkdel ¶
type Xmlszamladbkdel struct { XMLName Empty `xml:"http://www.szamlazz.hu/xmlszamladbkdel xmlszamladbkdel"` Felhasznalo string `xml:"beallitasok>felhasznalo,omitempty"` Jelszo string `xml:"beallitasok>jelszo,omitempty"` SzamlaAgentKulcs string `xml:"beallitasok>szamlaagentkulcs,omitempty"` Szamlaszam string `xml:"fejlec>szamlaszam,omitempty"` Rendelesszam string `xml:"fejlec>rendelesszam,omitempty"` }
Xmlszamladbkdel describes the request of deleting proforma invoices
type Xmlszamladbkdelvalasz ¶
type Xmlszamladbkdelvalasz struct { XMLName Empty `xml:"http://www.szamlazz.hu/xmlszamladbkdelvalasz xmlszamladbkdelvalasz"` // sic! Sikeres bool `xml:"sikeres"` Hibakod int `xml:"hibakod,omitempty"` Hibauzenet string `xml:"hibauzenet,omitempty"` }
Xmlszamladbkdelvalasz describes the response of deleting proforma invoices
type Xmlszamlakifiz ¶
type Xmlszamlakifiz struct { XMLName Empty `xml:"http://www.szamlazz.hu/xmlszamlakifiz xmlszamlakifiz"` // Authentication (Username+Password or AgentKey required) Felhasznalo string `xml:"beallitasok>felhasznalo"` // API user Jelszo string `xml:"beallitasok>jelszo"` // API password SzamlaAgentKulcs string `xml:"beallitasok>szamlaagentkulcs"` // API token Szamlaszam string `xml:"beallitasok>szamlaszam"` // Number of invoice to be updated Additiv bool `xml:"beallitasok>additiv"` // Append payment records (true) or overwrite them (false) Kifizetes []XmlszamlakifizKifizetes `xml:"kifizetes"` }
Xmlszamlakifiz describes the request of updating payment statuses
type XmlszamlakifizKifizetes ¶
type XmlszamlakifizKifizetes struct { Datum Date `xml:"datum"` // Date of creation (YYYY-MM-DD) Jogcim string `xml:"jogcim"` // Method Of Payment (cash, credit card, etc) Osszeg float64 `xml:"osszeg"` // Net value Leiras string `xml:"leiras"` // Description }
XmlszamlakifizKifizetes describes a line item within an xmlszalakifiz
type Xmlszamlapdf ¶
type Xmlszamlapdf struct { XMLName Empty `xml:"http://www.szamlazz.hu/xmlszamlapdf xmlszamlapdf"` // Authentication (Username+Password or AgentKey required) Felhasznalo string `xml:"felhasznalo,omitempty"` Jelszo string `xml:"jelszo,omitempty"` SzamlaAgentKulcs string `xml:"szamlaagentkulcs,omitempty"` Szamlaszam string `xml:"szamlaszam,omitempty"` // Id of document to be downloaded RendelesSzam string `xml:"rendelesSzam,omitempty"` // Order number (undocumented) SzamlaKulsoAzon string `xml:"szamlaKulsoAzon,omitempty"` // External reference for query-back ValaszVerzio uint `xml:"valaszVerzio"` // Format of reply. 1: mixed 2: xml-encapsulated }
Xmlszamlapdf describes the request for downloading PDF invoices
type Xmlszamlast ¶
type Xmlszamlast struct { XMLName Empty `xml:"http://www.szamlazz.hu/xmlszamlast xmlszamlast"` Felhasznalo string `xml:"beallitasok>felhasznalo,omitempty"` Jelszo string `xml:"beallitasok>jelszo,omitempty"` SzamlaAgentKulcs string `xml:"beallitasok>szamlaagentkulcs,omitempty"` ESzamla bool `xml:"beallitasok>eszamla"` // Whether to issue electronically signed invoices KulcstartoJelszo string `xml:"beallitasok>kulcstartojelszo,omitempty"` // Password for electronic signature keyring SzamlaLetoltes bool `xml:"beallitasok>szamlaLetoltes"` // Whether to return the created invoice image ValaszVerzio uint `xml:"beallitasok>valaszVerzio"` // Format of reply. 1: mixed 2: xml-encapsulated Szamlaszam string `xml:"fejlec>szamlaszam"` // To be reversed invoice number KeltDatum Date `xml:"fejlec>keltDatum,omitempty"` // Date of creation (YYYY-MM-DD) TeljesitesDatum Date `xml:"fejlec>teljesitesDatum,omitempty"` // Date of fullfillment (YYYY-MM-DD) Tipus string `xml:"fejlec>tipus,omitempty"` // Type of reversal. Must be SS SzamlaSablon string `xml:"fejlec>szamlaSablon,omitempty"` // Invoice format (SzlaMost/SzlaAlap/SzlaNoEnv/Szla8cm/SzlaTomb) EmailReplyTo string `xml:"elado>emailReplyto,omitempty"` // Reply-to header for notification e-mails EmailTargy string `xml:"elado>emailTargy,omitempty"` // Subject header for notification e-mails EmailSzoveg string `xml:"elado>emailSzoveg,omitempty"` // Content text of notification e-mails Email string `xml:"vevo>email,omitempty"` // Customer e-mail address }
Xmlszamlast describes the request of reversing invoices
type Xmlszamlavalasz ¶
type Xmlszamlavalasz struct { XMLName Empty `xml:"http://www.szamlazz.hu/xmlszamlavalasz xmlszamlavalasz"` Sikeres bool `xml:"sikeres"` Hibakod int `xml:"hibakod,omitempty"` // Note: this is string in the original XSD, parse it as int anyway Hibauzenet string `xml:"hibauzenet,omitempty"` Szamlaszam string `xml:"szamlaszam,omitempty"` SzamlaNetto float64 `xml:"szamlanetto,omitempty"` SzamlaBrutto float64 `xml:"szamlabrutto,omitempty"` Kintlevoseg float64 `xml:"kintlevoseg,omitempty"` Vevoifiokurl string `xml:"vevoifiokurl,omitempty"` Pdf []byte `xml:"pdf,omitempty"` }
Xmlszamlavalasz describes the response of creating new invoices
func (*Xmlszamlavalasz) GetPDF ¶
func (x *Xmlszamlavalasz) GetPDF() ([]byte, error)
type Xmlszamlaxml ¶
type Xmlszamlaxml struct { XMLName Empty `xml:"http://www.szamlazz.hu/xmlszamlaxml xmlszamlaxml"` // Authentication (Username+Password or AgentKey required) Felhasznalo string `xml:"felhasznalo,omitempty"` Jelszo string `xml:"jelszo,omitempty"` SzamlaAgentKulcs string `xml:"szamlaagentkulcs,omitempty"` Szamlaszam string `xml:"szamlaszam"` // Id of document to be downloaded RendelesSzam string `xml:"rendelesSzam"` // Order number Pdf bool `xml:"pdf"` // Whether to return the created invoice image }
Xmlszamlaxml describes the request of downloading invoice data
type Xmltaxpayer ¶
type Xmltaxpayer struct { XMLName Empty `xml:"http://www.szamlazz.hu/xmltaxpayer xmltaxpayer"` Felhasznalo string `xml:"beallitasok>felhasznalo,omitempty"` Jelszo string `xml:"beallitasok>jelszo,omitempty"` SzamlaAgentKulcs string `xml:"beallitasok>szamlaagentkulcs,omitempty"` Torzsszam string `xml:"torzsszam"` // VAT no (first 8 chars) }
Xmltaxpayer describes the request for querying NAV taxpayer details