liberic 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1 @@
1
+ require 'liberic/helpers/invocation'
@@ -0,0 +1,27 @@
1
+ module Liberic
2
+ module Helpers
3
+ module Invocation
4
+ class Error < StandardError
5
+ end
6
+
7
+ extend self
8
+
9
+ def raise_on_error(value)
10
+ return value if value == SDK::Fehlercodes::OK
11
+ raise Error.new(SDK::Fehlercodes::CODES[value])
12
+ end
13
+
14
+ def with_result_buffer(raise_on_error = true, &block)
15
+ handle = SDK::API.rueckgabepuffer_erzeugen
16
+ if raise_on_error
17
+ raise_on_error(yield(handle))
18
+ else
19
+ yield(handle)
20
+ end
21
+ result = Liberic::SDK::API.rueckgabepuffer_inhalt(handle)
22
+ SDK::API.rueckgabepuffer_freigeben(handle)
23
+ result
24
+ end
25
+ end
26
+ end
27
+ end
@@ -0,0 +1,105 @@
1
+ module Liberic
2
+ # +Process+ encapsulates the main functionality of ERiC. (+eric_bearbeite_vorgang+).
3
+ #
4
+ # +Process+ must be initialized with an XML string containing the tax filing (or other data to be submitted) as well
5
+ # as the type of case.
6
+ #
7
+ # +Process+ exposes the +check+ method to let ERiC check the validity of the supplied XML schema. An Exception is thrown if
8
+ # validation fails.
9
+ #
10
+ # Calling +check+ is optional. See +execute+ to start the actual execution of the tax case. +execute+ will +check+ as well (not in this library,
11
+ # but ERiC will do this
12
+ class Process
13
+ class ExecutionError < StandardError
14
+ end
15
+
16
+ def initialize(xml, type)
17
+ @xml = xml
18
+ @type = type
19
+ end
20
+
21
+ def check
22
+ Helpers::Invocation.with_result_buffer do |handle|
23
+ SDK::API.check_xml(@xml, @type, handle)
24
+ end
25
+ end
26
+
27
+ # Executes the actual call to +EricBearbeiteVorgang()+
28
+ #
29
+ # Taken an optional hash with an +:action+ parameter, which can be one of the following:
30
+ #
31
+ # * +:validate+ validate the tax filing and return errors (local processing only)
32
+ # * +:print+ validate the tax filing and create summary PDF
33
+ # * +:print_and_submit+ validate the tax filing, create summary PDF and submit filing to ELSTER (server).
34
+ #
35
+ # Options for controlling the PDF output (printing)
36
+ #
37
+ # * +:filename+ (set a filename including path where to store the PDF file)
38
+ # * +:draft+ (set to +false+ to remove the the text "*** ENTWURF ***" on every page)
39
+ # * +:footer+ (set a string that will be printed on ever page footer)
40
+ # * +:cover_page+ (set to +true+ to include a cover page)
41
+ # * +:duplex+ (set to +true+ to generate pages for duplex printing (alternating margin left and right)
42
+ #
43
+ # Other options
44
+ # * +:encryption+ An instance of +SDK::Types::VerschluesselungsParameter+ (Leave this empty when requesting BescheidRueckuebermittlung with CEZ (locally generated certificate))
45
+ # No use case tested yet.
46
+ #
47
+ # TODO: Please note that some parameter combinations might result in errors and will return empty strings for the XML
48
+ # (these errors are currently not checked). One example is using +draft: false+ with test data
49
+ #
50
+ # Set +Liberic.config.data_path+ to the location where the PDF should be stored, if +:filename+ is not provided.
51
+ #
52
+ # Example:
53
+ #
54
+ # filing = Liberic::Process.new(xml_tax_filing, 'ESt_2011')
55
+ # filing.execute(action: :print)
56
+ #
57
+ # Will generate a PDF in the current directory if not specified otherwise.
58
+ # *WARNING* method signature and parameters are WIP and subject to change
59
+ def execute(options = {})
60
+ action = options[:action] ||= :validate
61
+ eric_action = ACTIONS[action] || (raise ExecutionError.new("Invalid action: #{action}. Valid actions are #{ACTIONS.keys.join(', ')}"))
62
+ print_params = create_print_params(options)
63
+ server_buffer = SDK::API.rueckgabepuffer_erzeugen
64
+ result = Helpers::Invocation.with_result_buffer(true) do |local_buffer|
65
+ SDK::API.bearbeite_vorgang(@xml, @type,
66
+ eric_action,
67
+ print_params,
68
+ options[:encryption],
69
+ nil, # transferHandle
70
+ local_buffer,
71
+ server_buffer)
72
+ end
73
+ server_result = SDK::API.rueckgabepuffer_inhalt(server_buffer)
74
+ SDK::API.rueckgabepuffer_freigeben(server_buffer)
75
+ print_params.pointer.free
76
+ {
77
+ result: result,
78
+ server_result: server_result
79
+ }
80
+ end
81
+
82
+ private
83
+
84
+ ACTIONS = {
85
+ validate: :validiere,
86
+ print: :drucke,
87
+ print_and_submit: :sende
88
+ }
89
+
90
+ def create_print_params(options)
91
+ params = SDK::Types::DruckParameter.new
92
+ params[:version] = 2
93
+ params[:ersteSeite] = options[:cover_page] ? 1 : 0
94
+ params[:duplexDruck] = options[:duplex] ? 1 : 0
95
+ params[:vorschau] = options.has_key?(:draft) ? (options[:draft] ? 1 : 0) : 1
96
+ {pdfName: :filename,
97
+ fussText: :footer}.each do |eric_param, ruby_param|
98
+ if options[ruby_param]
99
+ params[eric_param] = FFI::MemoryPointer.from_string(options[ruby_param]).address
100
+ end
101
+ end
102
+ params
103
+ end
104
+ end
105
+ end
@@ -0,0 +1,2 @@
1
+ require 'liberic/response/errors'
2
+ require 'liberic/response/version'
@@ -0,0 +1,9 @@
1
+ module Liberic
2
+ module Response
3
+ class ResponseError < StandardError
4
+ end
5
+
6
+ class LibraryNotFound < ResponseError
7
+ end
8
+ end
9
+ end
@@ -0,0 +1,38 @@
1
+ module Liberic
2
+ module Response
3
+ class Version
4
+ VERSION_NS = 'http://www.elster.de/EricXML/1.0/EricVersion'
5
+
6
+ attr_reader :response_xml, :response_dom
7
+ attr_reader :libs
8
+
9
+ def initialize(response_xml)
10
+ @response_xml = response_xml
11
+ @response_dom = Nokogiri::XML(@response_xml)
12
+ @libs = @response_dom.xpath('//version:Bibliothek', version: VERSION_NS).map do |lib|
13
+ fields = Hash[
14
+ {file: 'Name',
15
+ product_version: 'Produktversion',
16
+ file_version: 'Dateiversion'}.map do |key, german_field|
17
+ [key, lib.xpath("version:#{german_field}", version: VERSION_NS).text]
18
+ end
19
+ ]
20
+
21
+ fields[:name] = fields[:file].split('.').first
22
+
23
+ [:product_version, :file_version].each do |version_type|
24
+ fields[version_type] = fields[version_type].split(',').map(&:strip).join('.')
25
+ end
26
+ fields
27
+ end
28
+ end
29
+
30
+ def for_library(name)
31
+ (
32
+ @libs.find { |lib| lib[:name] == name } ||
33
+ (raise LibraryNotFound.new("Library #{name} could not be found in this ERiC installation"))
34
+ )[:product_version]
35
+ end
36
+ end
37
+ end
38
+ end
@@ -0,0 +1,5 @@
1
+ require 'liberic/sdk/configuration'
2
+ require 'liberic/sdk/fehlercodes'
3
+ require 'liberic/sdk/types'
4
+ require 'liberic/sdk/api'
5
+ require 'liberic/sdk/def'
@@ -0,0 +1,205 @@
1
+ module Liberic
2
+ module SDK
3
+ module API
4
+ extend FFI::Library
5
+ ffi_lib Liberic.library_path
6
+
7
+ def self.attach_eric_function(name, params, return_type, original_name = nil)
8
+ original_name ||= 'Eric' + name.to_s.capitalize.gsub(/(?:_|(\/))([a-z\d]*)/) { "#{$1}#{$2.capitalize}" }
9
+ attach_function(name, original_name, params, return_type)
10
+ end
11
+
12
+ # ERICAPI_DECL int STDCALL EricBearbeiteVorgang(
13
+ # const char* datenpuffer,
14
+ # const char* datenartVersion,
15
+ # uint32_t bearbeitungsFlags,
16
+ # const eric_druck_parameter_t* druckParameter,
17
+ # const eric_verschluesselungs_parameter_t* cryptoParameter,
18
+ # EricTransferHandle* transferHandle,
19
+ # EricRueckgabepufferHandle rueckgabeXmlPuffer,
20
+ # EricRueckgabepufferHandle serverantwortXmlPuffer);
21
+ attach_eric_function :bearbeite_vorgang, [:string, :string,
22
+ Types::BearbeitungFlag,
23
+ :pointer,
24
+ :pointer,
25
+ :pointer,
26
+
27
+ :pointer,
28
+ :pointer], :int
29
+
30
+ # ERICAPI_DECL int STDCALL EricChangePassword(const char* psePath, const char* oldPin,
31
+ # const char* newPin);
32
+ attach_eric_function :change_password, [:string, :string, :string], :int
33
+
34
+ # ERICAPI_DECL int STDCALL EricCheckBuFaNummer(const char* steuernummer);
35
+ attach_eric_function :check_bu_fa_nummer, [:string], :int
36
+
37
+ # ERICAPI_DECL int STDCALL EricCheckXML(const char* xml, const char* datenartVersion,
38
+ # EricRueckgabepufferHandle fehlertextPuffer);
39
+ attach_eric_function :check_xml, [:string, :string, :pointer], :int, :EricCheckXML
40
+
41
+ # ERICAPI_DECL int STDCALL EricCloseHandleToCertificate(EricZertifikatHandle hToken);
42
+ attach_eric_function :close_handle_to_certificate, [:uint], :int
43
+
44
+ # TODO
45
+ # ERICAPI_DECL int STDCALL EricCreateKey(const char* pin, const char* pfad,
46
+ # const eric_zertifikat_parameter_t* zertifikatInfo);
47
+ attach_eric_function :create_key, [:string, :string, :pointer], :int
48
+
49
+ # ERICAPI_DECL int STDCALL EricCreateTH(const char* xml, const char* verfahren,
50
+ # const char* datenart, const char* vorgang,
51
+ # const char* testmerker, const char* herstellerId,
52
+ # const char* datenLieferant, const char* versionClient,
53
+ # const char* publicKey,
54
+ # EricRueckgabepufferHandle xmlRueckgabePuffer);
55
+ attach_eric_function :create_th, [:string, :string, :string, :string,
56
+ :string, :string, :string, :string, :string, :pointer], :int, :EricCreateTH
57
+
58
+ # ERICAPI_DECL int STDCALL EricDekodiereDaten(
59
+ # EricZertifikatHandle zertifikatHandle,
60
+ # const char* pin,
61
+ # const char* base64Eingabe,
62
+ # EricRueckgabepufferHandle rueckgabePuffer);
63
+ attach_eric_function :dekodiere_daten, [:uint, :string, :string, :pointer], :int
64
+
65
+ # ERICAPI_DECL int STDCALL EricEinstellungAlleZuruecksetzen(void);
66
+ attach_eric_function :einstellung_alle_zuruecksetzen, [:void], :int
67
+
68
+ # ERICAPI_DECL int STDCALL EricEinstellungLesen(const char* name,
69
+ # EricRueckgabepufferHandle rueckgabePuffer);
70
+ attach_eric_function :einstellung_lesen, [:string, :pointer], :int
71
+
72
+ # ERICAPI_DECL int STDCALL EricEinstellungSetzen(const char* name, const char* wert);
73
+ attach_eric_function :einstellung_setzen, [:string, :string], :int
74
+
75
+ # ERICAPI_DECL int STDCALL EricEinstellungZuruecksetzen(const char* name);
76
+ attach_eric_function :einstellung_zuruecksetzen, [:string], :int
77
+
78
+ # ERICAPI_DECL int STDCALL EricEntladePlugins();
79
+ attach_eric_function :entlade_plugins, [], :int
80
+
81
+ # ERICAPI_DECL int STDCALL EricFormatStNr(const char* eingabeSteuernummer,
82
+ # EricRueckgabepufferHandle rueckgabePuffer);
83
+ attach_eric_function :format_st_nr, [:string, :pointer], :int
84
+
85
+ # ERICAPI_DECL int STDCALL EricGetAuswahlListen (const char* datenartVersion, const char* feldkennung,
86
+ # EricRueckgabepufferHandle rueckgabeXmlPuffer);
87
+ attach_eric_function :get_auswahl_listen, [:string, :string, :pointer], :int
88
+
89
+ # ERICAPI_DECL int STDCALL EricGetErrormessagesFromXMLAnswer(
90
+ # const char* xml,
91
+ # EricRueckgabepufferHandle transferticketPuffer,
92
+ # EricRueckgabepufferHandle returncodeTHPuffer,
93
+ # EricRueckgabepufferHandle fehlertextTHPuffer,
94
+ # EricRueckgabepufferHandle returncodesUndFehlertexteNDHXmlPuffer);
95
+ attach_eric_function :get_errormessages_from_xml_answer, [:string, :pointer, :pointer, :pointer, :pointer], :int, :EricGetErrormessagesFromXMLAnswer
96
+
97
+ # ERICAPI_DECL int STDCALL EricGetHandleToCertificate(EricZertifikatHandle* hToken,
98
+ # uint32_t* iInfoPinSupport,
99
+ # const char* pathToKeystore);
100
+ attach_eric_function :get_handle_to_certificate, [:pointer, :pointer, :string], :int
101
+
102
+ # ERICAPI_DECL int STDCALL EricGetPinStatus(EricZertifikatHandle hToken, uint32_t* pinStatus,
103
+ # uint32_t keyType);
104
+ attach_eric_function :get_pin_status, [:uint, :pointer, :uint], :int
105
+
106
+ # TODO
107
+ # ERICAPI_DECL int STDCALL EricGetPublicKey(const eric_verschluesselungs_parameter_t* cryptoParameter,
108
+ # EricRueckgabepufferHandle rueckgabePuffer);
109
+ # attach_eric_function :get_public_key, [:string, :pointer], :int
110
+
111
+ # ERICAPI_DECL int STDCALL EricHoleFehlerText(int fehlerkode,
112
+ # EricRueckgabepufferHandle rueckgabePuffer);
113
+ attach_eric_function :hole_fehler_text, [:int, :pointer], :int
114
+
115
+ # ERICAPI_DECL int STDCALL EricHoleFinanzaemter(const char* finanzamtLandNummer,
116
+ # EricRueckgabepufferHandle rueckgabeXmlPuffer);
117
+ attach_eric_function :hole_finanzaemter, [:string, :pointer], :int
118
+
119
+ # ERICAPI_DECL int STDCALL EricHoleFinanzamtLandNummern(EricRueckgabepufferHandle rueckgabeXmlPuffer);
120
+ attach_eric_function :hole_finanzamt_land_nummern, [:pointer], :int
121
+
122
+ # TODO
123
+ # ERICAPI_DECL int STDCALL EricHoleFinanzamtsdaten(const char bufaNr[5],
124
+ # struct Finanzamtsdaten *finanzamtsdaten);
125
+
126
+ # ERICAPI_DECL int STDCALL EricHoleTestfinanzaemter(EricRueckgabepufferHandle rueckgabeXmlPuffer);
127
+ attach_eric_function :hole_testfinanzaemter, [:pointer], :int
128
+
129
+ # ERICAPI_DECL int STDCALL EricHoleZertifikatFingerabdruck(
130
+ # const eric_verschluesselungs_parameter_t* cryptoParameter,
131
+ # EricRueckgabepufferHandle fingerabdruckPuffer,
132
+ # EricRueckgabepufferHandle signaturPuffer);
133
+ attach_eric_function :hole_zertifikat_fingerabdruck, [:pointer, :pointer, :pointer], :int
134
+
135
+ # ERICAPI_DECL int STDCALL EricKonvertiereZertifikat(const char* pin, const char* pse);
136
+ attach_eric_function :konvertiere_zertifikat, [:string, :string], :int
137
+
138
+ # ERICAPI_DECL int STDCALL EricMakeElsterStnr(const char* steuernrBescheid,
139
+ # const char landesnr[2+1],
140
+ # const char bundesfinanzamtsnr[4+1],
141
+ # EricRueckgabepufferHandle steuernrPuffer);
142
+ # FIXME: non-pointer string
143
+ attach_eric_function :make_elster_stnr, [:string, :string, :string, :pointer], :int
144
+
145
+ # ERICAPI_DECL int STDCALL EricPruefeBIC(const char* bic);
146
+ attach_eric_function :pruefe_bic, [:string], :int, :EricPruefeBIC
147
+
148
+ # ERICAPI_DECL int STDCALL EricPruefeIBAN(const char* iban);
149
+ attach_eric_function :pruefe_iban, [:string], :int, :EricPruefeIBAN
150
+
151
+ # ERICAPI_DECL int STDCALL EricPruefeIdentifikationsMerkmal(const char* steuerId);
152
+ attach_eric_function :pruefe_identifikations_merkmal, [:string], :int
153
+
154
+ # ERICAPI_DECL int STDCALL EricPruefeSteuernummer(const char* steuernummer);
155
+ attach_eric_function :pruefe_steuernummer, [:string], :int
156
+
157
+ # TODO
158
+ # ERICAPI_DECL int STDCALL EricRegistriereFortschrittCallback(
159
+ # EricFortschrittCallback funktion,
160
+ # void* benutzerdaten);
161
+
162
+ # TODO
163
+ # ERICAPI_DECL int STDCALL EricRegistriereGlobalenFortschrittCallback(
164
+ # EricFortschrittCallback funktion,
165
+ # void* benutzerdaten);
166
+
167
+ # typedef void(STDCALL *EricLogCallback)(
168
+ # const char* kategorie,
169
+ # eric_log_level_t loglevel,
170
+ # const char* nachricht,
171
+ # void* benutzerdaten);
172
+ callback :log_callback, [:string, :int, :string, :pointer], :void
173
+
174
+ # ERICAPI_DECL int STDCALL EricRegistriereLogCallback(
175
+ # EricLogCallback funktion,
176
+ # uint32_t schreibeEricLogDatei,
177
+ # void* benutzerdaten);
178
+ attach_eric_function :registriere_log_callback, [:log_callback, :uint, :pointer], :int
179
+
180
+ def self.generate_log_callback(&block)
181
+ FFI::Function.new(:void, [:string, :int, :string, :pointer]) do |category, level, message|
182
+ block.call(category, level, message)
183
+ end
184
+ end
185
+
186
+ # ERICAPI_DECL EricRueckgabepufferHandle STDCALL EricRueckgabepufferErzeugen();
187
+ attach_eric_function :rueckgabepuffer_erzeugen, [], :pointer
188
+
189
+ # ERICAPI_DECL int STDCALL EricRueckgabepufferFreigeben(EricRueckgabepufferHandle handle);
190
+ attach_eric_function :rueckgabepuffer_freigeben, [:pointer], :int
191
+
192
+ # ERICAPI_DECL const char* STDCALL EricRueckgabepufferInhalt(EricRueckgabepufferHandle handle);
193
+ attach_eric_function :rueckgabepuffer_inhalt, [:pointer], :string
194
+
195
+ # ERICAPI_DECL uint32_t STDCALL EricRueckgabepufferLaenge(EricRueckgabepufferHandle handle);
196
+ attach_eric_function :rueckgabepuffer_laenge, [:pointer], :uint
197
+
198
+ # ERICAPI_DECL int STDCALL EricSystemCheck();
199
+ attach_eric_function :system_check, [], :int
200
+
201
+ # ERICAPI_DECL int STDCALL EricVersion(EricRueckgabepufferHandle rueckgabeXmlPuffer);
202
+ attach_eric_function :version, [:pointer], :int
203
+ end
204
+ end
205
+ end
@@ -0,0 +1,8 @@
1
+ module Liberic
2
+ module SDK
3
+ module Configuration
4
+ LIBERICAPI_VERSION = %w(23.2.12.0 23.3.6.0 23.3.8.0 23.4.10.0)
5
+ ENCODING = 'iso-8859-15'
6
+ end
7
+ end
8
+ end
@@ -0,0 +1,6 @@
1
+ module Liberic
2
+ module SDK
3
+ module Def
4
+ end
5
+ end
6
+ end
@@ -0,0 +1,192 @@
1
+ module Liberic
2
+ module SDK
3
+ module Fehlercodes
4
+ CODES = {
5
+ 0 => 'OK',
6
+ 610001001 => 'GLOBAL_UNKNOWN',
7
+ 610001002 => 'GLOBAL_PRUEF_FEHLER',
8
+ 610001007 => 'GLOBAL_FEHLERMELDUNG_NICHT_VORHANDEN',
9
+ 610001008 => 'GLOBAL_KEINE_DATEN_VORHANDEN',
10
+ 610001013 => 'GLOBAL_NICHT_GENUEGEND_ARBEITSSPEICHER',
11
+ 610001014 => 'GLOBAL_DATEI_NICHT_GEFUNDEN',
12
+ 610001016 => 'GLOBAL_HERSTELLER_ID_NICHT_ERLAUBT',
13
+ 610001017 => 'GLOBAL_ILLEGAL_STATE',
14
+ 610001018 => 'GLOBAL_FUNKTION_NICHT_ERLAUBT',
15
+ 610001019 => 'GLOBAL_ECHTFALL_NICHT_ERLAUBT',
16
+ 610001020 => 'GLOBAL_NO_VERSAND_IN_BETA_VERSION',
17
+ 610001025 => 'GLOBAL_TESTMERKER_UNGUELTIG',
18
+ 610001026 => 'GLOBAL_DATENSATZ_ZU_GROSS',
19
+ 610001027 => 'GLOBAL_VERSCHLUESSELUNGS_PARAMETER_NICHT_ERLAUBT',
20
+ 610001028 => 'GLOBAL_NUR_PORTALZERTIFIKAT_ERLAUBT',
21
+ 610001029 => 'GLOBAL_ABRUFCODE_NICHT_ERLAUBT',
22
+ 610001030 => 'GLOBAL_ERROR_XML_CREATE',
23
+ 610001031 => 'GLOBAL_TEXTPUFFERGROESSE_FIX',
24
+ 610001032 => 'GLOBAL_INTERNER_FEHLER',
25
+ 610001033 => 'GLOBAL_ARITHMETIKFEHLER',
26
+ 610001034 => 'GLOBAL_STEUERNUMMER_UNGUELTIG',
27
+ 610001035 => 'GLOBAL_STEUERNUMMER_FALSCHE_LAENGE',
28
+ 610001036 => 'GLOBAL_STEUERNUMMER_NICHT_NUMERISCH',
29
+ 610001037 => 'GLOBAL_LANDESNUMMER_UNBEKANNT',
30
+ 610001038 => 'GLOBAL_BUFANR_UNBEKANNT',
31
+ 610001039 => 'GLOBAL_LANDESNUMMER_BUFANR',
32
+ 610001040 => 'GLOBAL_PUFFER_ZUGRIFFSKONFLIKT',
33
+ 610001041 => 'GLOBAL_PUFFER_UEBERLAUF',
34
+ 610001042 => 'GLOBAL_DATENARTVERSION_UNBEKANNT',
35
+ 610001044 => 'GLOBAL_DATENARTVERSION_XML_INKONSISTENT',
36
+ 610001045 => 'GLOBAL_COMMONDATA_NICHT_VERFUEGBAR',
37
+ 610001046 => 'GLOBAL_LOG_EXCEPTION',
38
+ 610001047 => 'GLOBAL_TRANSPORTSCHLUESSEL_NICHT_ERLAUBT',
39
+ 610001051 => 'GLOBAL_VORSATZ_UNGUELTIG',
40
+ 610001102 => 'GLOBAL_UNKNOWN_PARAMETER_ERROR',
41
+ 610001108 => 'GLOBAL_CHECK_CORRUPTED_NDS',
42
+ 610001206 => 'GLOBAL_VERSCHLUESSELUNGS_PARAMETER_NICHT_ANGEGEBEN',
43
+ 610001208 => 'GLOBAL_SEND_AUTH_PIN_NICHT_ANGEGEBEN_RESERVIERT',
44
+ 610001209 => 'GLOBAL_SEND_FLAG_MEHR_ALS_EINES',
45
+ 610001218 => 'GLOBAL_UNGUELTIGE_FLAG_KOMBINATION',
46
+ 610001220 => 'GLOBAL_ERSTE_SEITE_DRUCK_NICHT_UNTERSTUETZT',
47
+ 610001222 => 'GLOBAL_UNGUELTIGER_PARAMETER',
48
+ 610001223 => 'GLOBAL_EINGANGSDATENSATZ_ZU_GROSS',
49
+ 610001224 => 'GLOBAL_DRUCK_FUER_VERFAHREN_NICHT_ERLAUBT',
50
+ 610001225 => 'GLOBAL_VERSAND_ART_NICHT_UNTERSTUETZT',
51
+ 610001226 => 'GLOBAL_UNGUELTIGE_PARAMETER_VERSION',
52
+ 610001227 => 'GLOBAL_TRANSFERHANDLE',
53
+ 610001228 => 'GLOBAL_PLUGININITIALISIERUNG',
54
+ 610001229 => 'GLOBAL_INKOMPATIBLE_VERSIONEN',
55
+ 610001230 => 'GLOBAL_VERSCHLUESSELUNGSVERFAHREN_NICHT_UNTERSTUETZT',
56
+ 610001400 => 'GLOBAL_UTI_ERROR',
57
+ 610001404 => 'GLOBAL_UTI_COUNTRY_NOT_SUPPORTED',
58
+ 610001501 => 'GLOBAL_IBAN_FORMALER_FEHLER',
59
+ 610001502 => 'GLOBAL_IBAN_LAENDERCODE_FEHLER',
60
+ 610001503 => 'GLOBAL_IBAN_LANDESFORMAT_FEHLER',
61
+ 610001504 => 'GLOBAL_IBAN_PRUEFZIFFER_FEHLER',
62
+ 610001510 => 'GLOBAL_BIC_FORMALER_FEHLER',
63
+ 610001511 => 'GLOBAL_BIC_LAENDERCODE_FEHLER',
64
+ 610001519 => 'GLOBAL_ZULASSUNGSNUMMER_ZU_LANG',
65
+ 610001520 => 'GLOBAL_IDNUMMER_LAENGE_UNGUELTIG',
66
+ 610001521 => 'GLOBAL_IDNUMMER_NICHT_NUMERISCH',
67
+ 610001522 => 'GLOBAL_IDNUMMER_NICHT_GENAU_EINE_ZIFFER_DOPPELT',
68
+ 610001523 => 'GLOBAL_IDNUMMER_ERSTE_ZIFFER_UNGUELTIG',
69
+ 610001524 => 'GLOBAL_IDNUMMER_PRUEFZIFFER_UNGUELTIG',
70
+ 610001851 => 'GLOBAL_UPDATE_NECESSARY',
71
+ 610001860 => 'GLOBAL_EINSTELLUNG_NAME_UNGUELTIG',
72
+ 610001861 => 'GLOBAL_EINSTELLUNG_WERT_UNGUELTIG',
73
+ 610001862 => 'GLOBAL_ERR_DEKODIEREN',
74
+ 610001863 => 'GLOBAL_FUNKTION_NICHT_UNTERSTUETZT',
75
+ 610001865 => 'GLOBAL_NUTZDATENTICKETS_NICHT_EINDEUTIG',
76
+ 610001866 => 'GLOBAL_NUTZDATENHEADERVERSIONEN_UNEINHEITLICH',
77
+ 610001867 => 'GLOBAL_BUNDESLAENDER_UNEINHEITLICH',
78
+ 610001868 => 'GLOBAL_ZEITRAEUME_UNEINHEITLICH',
79
+ 610001869 => 'GLOBAL_NUTZDATENHEADER_EMPFAENGER_NICHT_KORREKT',
80
+
81
+ 610101200 => 'TRANSFER_COM_ERROR',
82
+ 610101201 => 'TRANSFER_VORGANG_NICHT_UNTERSTUETZT',
83
+ 610101210 => 'TRANSFER_ERR_XML_THEADER',
84
+ 610101251 => 'TRANSFER_ERR_PARAM',
85
+ 610101253 => 'TRANSFER_ERR_DATENTEILENDNOTFOUND',
86
+ 610101255 => 'TRANSFER_ERR_BEGINDATENLIEFERANT',
87
+ 610101256 => 'TRANSFER_ERR_ENDDATENLIEFERANT',
88
+ 610101257 => 'TRANSFER_ERR_BEGINTRANSPORTSCHLUESSEL',
89
+ 610101258 => 'TRANSFER_ERR_ENDTRANSPORTSCHLUESSEL',
90
+ 610101259 => 'TRANSFER_ERR_BEGINDATENGROESSE',
91
+ 610101260 => 'TRANSFER_ERR_ENDDATENGROESSE',
92
+ 610101271 => 'TRANSFER_ERR_SEND',
93
+ 610101274 => 'TRANSFER_ERR_NOTENCRYPTED',
94
+ 610101276 => 'TRANSFER_ERR_PROXYCONNECT',
95
+ 610101278 => 'TRANSFER_ERR_CONNECTSERVER',
96
+ 610101279 => 'TRANSFER_ERR_NORESPONSE',
97
+ 610101280 => 'TRANSFER_ERR_PROXYAUTH',
98
+ 610101282 => 'TRANSFER_ERR_SEND_INIT',
99
+ 610101283 => 'TRANSFER_ERR_TIMEOUT',
100
+ 610101291 => 'TRANSFER_ERR_OTHER',
101
+ 610101292 => 'TRANSFER_ERR_XML_NHEADER',
102
+ 610101293 => 'TRANSFER_ERR_XML_ENCODING',
103
+ 610101294 => 'TRANSFER_ERR_ENDSIGUSER',
104
+ 610101295 => 'TRANSFER_ERR_XMLTAG_NICHT_GEFUNDEN',
105
+ 610101297 => 'TRANSFER_ERR_DATENTEILFEHLER',
106
+
107
+ 610201016 => 'CRYPT_ERROR_CREATE_KEY',
108
+ 610201101 => 'CRYPT_E_INVALID_HANDLE',
109
+ 610201102 => 'CRYPT_E_MAX_SESSION',
110
+ 610201103 => 'CRYPT_E_BUSY',
111
+ 610201104 => 'CRYPT_E_OUT_OF_MEM',
112
+ 610201105 => 'CRYPT_E_PSE_PATH',
113
+ 610201106 => 'CRYPT_E_PIN_WRONG',
114
+ 610201107 => 'CRYPT_E_PIN_LOCKED',
115
+ 610201108 => 'CRYPT_E_P7_READ',
116
+ 610201109 => 'CRYPT_E_P7_DECODE',
117
+ 610201110 => 'CRYPT_E_P7_RECIPIENT',
118
+ 610201111 => 'CRYPT_E_P12_READ',
119
+ 610201112 => 'CRYPT_E_P12_DECODE',
120
+ 610201113 => 'CRYPT_E_P12_SIG_KEY',
121
+ 610201114 => 'CRYPT_E_P12_ENC_KEY',
122
+ 610201115 => 'CRYPT_E_P11_SIG_KEY',
123
+ 610201116 => 'CRYPT_E_P11_ENC_KEY',
124
+ 610201117 => 'CRYPT_E_XML_PARSE',
125
+ 610201118 => 'CRYPT_E_XML_SIG_ADD',
126
+ 610201119 => 'CRYPT_E_XML_SIG_TAG',
127
+ 610201120 => 'CRYPT_E_XML_SIG_SIGN',
128
+ 610201121 => 'CRYPT_E_ENCODE_UNKNOWN',
129
+ 610201122 => 'CRYPT_E_ENCODE_ERROR',
130
+ 610201123 => 'CRYPT_E_XML_INIT',
131
+ 610201124 => 'CRYPT_E_ENCRYPT',
132
+ 610201125 => 'CRYPT_E_DECRYPT',
133
+ 610201126 => 'CRYPT_E_P11_SLOT_EMPTY',
134
+ 610201127 => 'CRYPT_E_NO_SIG_ENC_KEY',
135
+ 610201144 => 'CRYPT_E_TOKEN_TYPE_MISMATCH',
136
+ 610201145 => 'CRYPT_E_TOKEN_UNKNOWN',
137
+ 610201200 => 'CRYPT_ZERTIFIKAT',
138
+ 610201201 => 'CRYPT_SIGNATUR',
139
+ 610201202 => 'CRYPT_PSE_PFAD',
140
+ 610201203 => 'CRYPT_NICHT_UNTERSTUETZTES_PSE_FORMAT',
141
+ 610201205 => 'CRYPT_PIN_BENOETIGT',
142
+ 610201206 => 'CRYPT_PIN_STAERKE_NICHT_AUSREICHEND',
143
+ 610201208 => 'CRYPT_E_INTERN',
144
+ 610201209 => 'CRYPT_ZERTIFIKATSPFAD_KEIN_VERZEICHNIS',
145
+ 610201210 => 'CRYPT_ZERTIFIKATSDATEI_EXISTIERT_BEREITS',
146
+ 610201211 => 'CRYPT_PIN_ENTHAELT_UNGUELTIGE_ZEICHEN',
147
+ 610201212 => 'CRYPT_E_INVALID_PARAM_ABC',
148
+ 610201213 => 'CRYPT_CORRUPTED',
149
+
150
+ 610301001 => 'IO_FEHLER',
151
+ 610301005 => 'IO_DATEI_INKORREKT',
152
+ 610301006 => 'IO_PARSE_FEHLER',
153
+ 610301007 => 'IO_NDS_GENERIERUNG_FEHLGESCHLAGEN',
154
+ 610301010 => 'IO_MASTERDATENSERVICE_NICHT_VERFUEGBAR',
155
+ 610301014 => 'IO_STEUERZEICHEN_IM_NDS',
156
+ 610301031 => 'IO_VERSIONSINFORMATIONEN_NICHT_GEFUNDEN',
157
+ 610301104 => 'IO_FALSCHES_VERFAHREN',
158
+ 610301105 => 'IO_READER_MEHRFACHE_STEUERFAELLE',
159
+ 610301106 => 'IO_READER_UNERWARTETE_ELEMENTE',
160
+ 610301107 => 'IO_READER_FORMALE_FEHLER',
161
+ 610301108 => 'IO_READER_FALSCHES_ENCODING',
162
+ 610301109 => 'IO_READER_MEHRFACHE_NUTZDATEN_ELEMENTE',
163
+ 610301110 => 'IO_READER_MEHRFACHE_NUTZDATENBLOCK_ELEMENTE',
164
+ 610301111 => 'IO_UNBEKANNTE_DATENART',
165
+ 610301114 => 'IO_READER_UNTERSACHBEREICH_UNGUELTIG',
166
+ 610301115 => 'IO_READER_ZU_VIELE_NUTZDATENBLOCK_ELEMENTE',
167
+ 610301150 => 'IO_READER_STEUERZEICHEN_IM_TRANSFERHEADER',
168
+ 610301151 => 'IO_READER_STEUERZEICHEN_IM_NUTZDATENHEADER',
169
+ 610301152 => 'IO_READER_STEUERZEICHEN_IN_DEN_NUTZDATEN',
170
+ 610301200 => 'IO_READER_SCHEMA_VALIDIERUNGSFEHLER',
171
+ 610301201 => 'IO_READER_UNBEKANNTE_XML_ENTITY',
172
+ 610301252 => 'IO_DATENTEILNOTFOUND',
173
+ 610301253 => 'IO_DATENTEILENDNOTFOUND',
174
+ 610301300 => 'IO_UEBERGABEPARAMETER_FEHLERHAFT',
175
+
176
+ 610501001 => 'PRINT_INTERNER_FEHLER',
177
+ 610501002 => 'PRINT_DRUCKVORLAGE_NICHT_GEFUNDEN',
178
+ 610501004 => 'PRINT_UNGUELTIGER_DATEI_PFAD',
179
+ 610501007 => 'PRINT_INITIALISIERUNG_FEHLERHAFT',
180
+ 610501008 => 'PRINT_AUSGABEZIEL_UNBEKANNT',
181
+ 610501009 => 'PRINT_ABBRUCH_DRUCKVORBEREITUNG',
182
+ 610501010 => 'PRINT_ABBRUCH_GENERIERUNG',
183
+ 610501011 => 'PRINT_STEUERFALL_NICHT_UNTERSTUETZT',
184
+ 610501012 => 'PRINT_FUSSTEXT_ZU_LANG'
185
+ }
186
+
187
+ CODES.each do |value, name|
188
+ const_set(name, value)
189
+ end
190
+ end
191
+ end
192
+ end