czech_post_b2b_client 1.2.4 → 1.2.5

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 468b92710ed75993d00a0f30f9a66a1e40ae8b23607ed92796c9682a0493f237
4
- data.tar.gz: c48017f58f179a0dae607662c309a1eabb0b7370f7372521acdfb655983eff44
3
+ metadata.gz: 5b3d8606fd4218b5344ee5b5f6e6f9fae333851654d0b869d57d1c1f98fc16a8
4
+ data.tar.gz: 8c2833143397c0b9d909f63da014f0228a1cd26d254765176b95b523e1ddf231
5
5
  SHA512:
6
- metadata.gz: 3b6dd0a6c4bb96f076cb37a42ec1dd0ce08346f28285109079831bf3fe94eb2d45d054156119b80e846b3f22ed9a18f2ded82856f2345b394e05c2c7e0560c2a
7
- data.tar.gz: 2a461713e123f67b66d45a02fab03123c75f7a9b968dede63351bbadc123baa74ab7a0be8648124643008602f35d372a5fcaf86d24e768bac4165ec85ceed773
6
+ metadata.gz: 248c7f29bdcbb1d7a50e55d7a81bc72eba16d0dfdbd4b980492501d62d280b8686823130eb3ceaf5853839825639d3aacca31e29777db0182da7407f73e98a67
7
+ data.tar.gz: e92e86057e70d34eb7cb70494545708fa865a6cec42f2c8c0e57106e076dd8fddef4857fe68e6af0503718dc52c7146e6cdd58d56138abda7715f572d26ed26f
@@ -15,7 +15,7 @@ AllCops:
15
15
  Documentation:
16
16
  Enabled: false
17
17
  Layout/LineLength:
18
- Max: 120
18
+ Max: 140
19
19
  Metrics/AbcSize:
20
20
  Max: 20
21
21
  Metrics/MethodLength:
@@ -2,6 +2,10 @@
2
2
 
3
3
  All changes to the gem are documented here.
4
4
 
5
+ ## [1.2.5] - 2020-10-06
6
+
7
+ - `errorDescription` from `B2BError` response is now merged into error message.
8
+
5
9
  ## [1.2.4] - 2020-10-06
6
10
 
7
11
  - Added `configuration.log_messages_at_least_as` option, to be able debug client behaviour when app log level is higher (eg. production)
@@ -48,4 +52,3 @@ Production ready release
48
52
  ### Added
49
53
  - All the stuff
50
54
 
51
-
data/README.md CHANGED
@@ -32,7 +32,7 @@ After full usage in production (vyvolej.to, squared.one), we found that Czech PO
32
32
 
33
33
  *Reality is, that Parcel IS NOT registered!*
34
34
 
35
- They say, that this should be fixed in v1.10 release. But nobody knows, when it will be deployed. And I do not know if there is some public way how to find, which version is now in production.
35
+ They say, that this should be fixed in 2020-10-01 release. But I still can not grab new XSD.
36
36
 
37
37
 
38
38
  # CzechPostB2bClient
@@ -35,12 +35,17 @@ module CzechPostB2bClient
35
35
  attr_reader :message
36
36
  end
37
37
 
38
+ def initialize(details = '')
39
+ self.details = details
40
+ end
41
+
42
+ attr_accessor :details
38
43
  def code
39
44
  self.class.code
40
45
  end
41
46
 
42
47
  def message
43
- self.class.message
48
+ "#{self.class.message} -- #{details}"
44
49
  end
45
50
  end
46
51
 
@@ -94,11 +99,11 @@ module CzechPostB2bClient
94
99
  ObjectSpace.each_object(CzechPostB2bClient::B2BErrors::BaseError.singleton_class)
95
100
  end
96
101
 
97
- def self.new_by_code(code)
102
+ def self.new_by_code(code, details = '')
98
103
  klass = all_error_classes.detect { |k| k.code == code }
99
104
  raise "B2BError with code: #{code} is unknown!" unless klass
100
105
 
101
- klass.new
106
+ klass.new(details)
102
107
  end
103
108
  end
104
109
  end
@@ -14,7 +14,6 @@ module CzechPostB2bClient
14
14
  end
15
15
 
16
16
  def log(original_level, message)
17
- puts("#{message} #{original_level} => #{modified_log_level(original_level)}")
18
17
  target_logger.send(modified_log_level(original_level), message)
19
18
  end
20
19
 
@@ -1,7 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- # rubocop:disable Layout/LineLength
4
-
5
3
  module CzechPostB2bClient
6
4
  module RequestBuilders
7
5
  class GetParcelsPrintingBuilder < BaseBuilder
@@ -79,5 +77,3 @@ module CzechPostB2bClient
79
77
  end
80
78
  end
81
79
  end
82
-
83
- # rubocop:enable Layout/LineLength
@@ -38,9 +38,7 @@ module CzechPostB2bClient
38
38
  [:customer_id],
39
39
  [:sending_post_office_code]].each do |key_chain|
40
40
  value = common_data.dig(*key_chain)
41
- if value.nil? || value == ''
42
- errors.add(:common_data, "Missing value for key { :#{key_chain.join(' => :')} }!")
43
- end
41
+ errors.add(:common_data, "Missing value for key { :#{key_chain.join(' => :')} }!") if value.nil? || value == ''
44
42
  end
45
43
  end
46
44
 
@@ -35,9 +35,7 @@ module CzechPostB2bClient
35
35
  [:customer_id],
36
36
  [:sending_post_office_code]].each do |key_chain|
37
37
  value = common_data.dig(*key_chain)
38
- if value.nil? || value == ''
39
- errors.add(:common_data, "Missing value for key { :#{key_chain.join(' => :')} }!")
40
- end
38
+ errors.add(:common_data, "Missing value for key { :#{key_chain.join(' => :')} }!") if value.nil? || value == ''
41
39
  end
42
40
  end
43
41
 
@@ -13,18 +13,23 @@ module CzechPostB2bClient
13
13
 
14
14
  class << self
15
15
  attr_reader :code
16
- end
16
+ end
17
17
 
18
18
  class << self
19
19
  attr_reader :text
20
- end
20
+ end
21
21
 
22
22
  class << self
23
23
  attr_reader :description
24
- end
24
+ end
25
+
26
+ attr_reader :details
27
+ def initialize(details = '')
28
+ @details = details
29
+ end
25
30
 
26
31
  def self.error?
27
- @type == :error
32
+ @type == :error || @type == :chyba
28
33
  end
29
34
 
30
35
  def self.info?
@@ -33,14 +38,18 @@ module CzechPostB2bClient
33
38
 
34
39
  class << self
35
40
  attr_reader :type
36
- end
41
+ end
37
42
 
38
43
  def self.to_s
39
44
  "ResponseCode[#{code} #{text}] #{description}"
40
45
  end
41
46
 
47
+ def to_s
48
+ "#{self.class} -- #{details}"
49
+ end
50
+
42
51
  # forwarding instance methods to class
43
- %i[code text description error? info? to_s].each do |mth|
52
+ %i[code text description error? info? type].each do |mth|
44
53
  define_method mth do
45
54
  self.class.send(mth)
46
55
  end
@@ -58,224 +67,224 @@ module CzechPostB2bClient
58
67
  @code = 2
59
68
  @text = 'INTERNAL_APPLICATION_ERROR'
60
69
  @description = 'Interní chyba aplikace'
61
- @type = :chyba
70
+ @type = :error
62
71
  end
63
72
 
64
73
  class UnauthorizedAccess < CzechPostB2bClient::ResponseCodes::BaseCode
65
74
  @code = 3
66
75
  @text = 'UNAUTHORIZED_ACCESS'
67
76
  @description = 'Login není evidován k uvedenému číslu podavatele'
68
- @type = :chyba
77
+ @type = :error
69
78
  end
70
79
 
71
80
  class InvalidCustomerId < CzechPostB2bClient::ResponseCodes::BaseCode
72
81
  @code = 10
73
82
  @text = 'INVALID_CUSTOMER_ID'
74
83
  @description = 'Neplatne technologické číslo (customer_id)'
75
- @type = :chyba
84
+ @type = :error
76
85
  end
77
86
 
78
87
  class InvalidLocation < CzechPostB2bClient::ResponseCodes::BaseCode
79
88
  @code = 11
80
89
  @text = 'INVALID_LOCATION'
81
90
  @description = 'Neplatné podací místo, zkuste použít `locationNumber`.'
82
- @type = :chyba
91
+ @type = :error
83
92
  end
84
93
 
85
94
  class InvalidPostCode < CzechPostB2bClient::ResponseCodes::BaseCode
86
95
  @code = 12
87
96
  @text = 'INVALID_POST_CODE'
88
97
  @description = 'Neplatné PSČ podací pošty'
89
- @type = :chyba
98
+ @type = :error
90
99
  end
91
100
 
92
101
  class InvalidTransmissionDate < CzechPostB2bClient::ResponseCodes::BaseCode
93
102
  @code = 13
94
103
  @text = 'INVALID_TRANSMISSION_DATE'
95
104
  @description = 'Chybné datum podání (menší než aktuální datum)'
96
- @type = :chyba
105
+ @type = :error
97
106
  end
98
107
 
99
108
  class TransmissionOpened < CzechPostB2bClient::ResponseCodes::BaseCode
100
109
  @code = 14
101
110
  @text = 'TRANSMISSION_OPENED'
102
111
  @description = 'Podání otevřeno'
103
- @type = :chyba
112
+ @type = :error
104
113
  end
105
114
 
106
115
  class TransmissionAlreadyClosed < CzechPostB2bClient::ResponseCodes::BaseCode
107
116
  @code = 15
108
117
  @text = 'TRANSMISSION_CLOSED'
109
118
  @description = 'Podání již bylo uzavřeno'
110
- @type = :chyba
119
+ @type = :error
111
120
  end
112
121
 
113
122
  class TransmissionUnfinished < CzechPostB2bClient::ResponseCodes::BaseCode
114
123
  @code = 16
115
124
  @text = 'TRANSMISSION_UNFINISHED'
116
125
  @description = 'Zpracování ještě není ukončeno'
117
- @type = :chyba
126
+ @type = :error
118
127
  end
119
128
 
120
129
  class BatchClosed < CzechPostB2bClient::ResponseCodes::BaseCode
121
130
  @code = 17
122
131
  @text = 'BATCH_CLOSED'
123
132
  @description = 'Dávka uzavřena'
124
- @type = :chyba
133
+ @type = :error
125
134
  end
126
135
 
127
136
  class BatchUnfinished < CzechPostB2bClient::ResponseCodes::BaseCode
128
137
  @code = 18
129
138
  @text = 'BATCH_UNFINISHED'
130
139
  @description = 'Zpracování ješte není ukončeno'
131
- @type = :chyba
140
+ @type = :error
132
141
  end
133
142
 
134
143
  class BatchInvalid < CzechPostB2bClient::ResponseCodes::BaseCode
135
144
  @code = 19
136
145
  @text = 'BATCH_INVALID'
137
146
  @description = 'V dávce se vyskytují chybné záznamy'
138
- @type = :chyba
147
+ @type = :error
139
148
  end
140
149
 
141
150
  class TransmissionNotExists < CzechPostB2bClient::ResponseCodes::BaseCode
142
151
  @code = 20
143
152
  @text = 'TRANSMISSION_NOT_EXISTS'
144
153
  @description = 'Podání neexistuje'
145
- @type = :chyba
154
+ @type = :error
146
155
  end
147
156
 
148
157
  class InvalidParcelCode < CzechPostB2bClient::ResponseCodes::BaseCode
149
158
  @code = 100
150
159
  @text = 'INVALID_PARCEL_CODE'
151
160
  @description = 'Neplatné ID zásilky'
152
- @type = :chyba
161
+ @type = :error
153
162
  end
154
163
 
155
164
  class DuplicateParcelCode < CzechPostB2bClient::ResponseCodes::BaseCode
156
165
  @code = 101
157
166
  @text = 'DUPLICATE_PARCEL_CODE'
158
167
  @description = 'Duplicitní ID zásilky v rámci 13-ti měsíců'
159
- @type = :chyba
168
+ @type = :error
160
169
  end
161
170
 
162
171
  class FullSequence < CzechPostB2bClient::ResponseCodes::BaseCode
163
172
  @code = 102
164
173
  @text = 'FULL_SEQUENCE'
165
174
  @description = 'Vyčerpaná řada podacích čísel'
166
- @type = :chyba
175
+ @type = :error
167
176
  end
168
177
 
169
178
  class UnknownPrefix < CzechPostB2bClient::ResponseCodes::BaseCode
170
179
  @code = 103
171
180
  @text = 'INVALID_PREFIX'
172
181
  @description = 'Neznámý typ zásilky (prefix)'
173
- @type = :chyba
182
+ @type = :error
174
183
  end
175
184
 
176
185
  class WeightIsOutOfRangeDuplicate < CzechPostB2bClient::ResponseCodes::BaseCode
177
186
  @code = 104
178
187
  @text = 'INVALID_WEIGHT'
179
188
  @description = 'Hmotnost mimo povolený rozsah'
180
- @type = :chyba
189
+ @type = :error
181
190
  end
182
191
 
183
192
  class InvalidPrice < CzechPostB2bClient::ResponseCodes::BaseCode
184
193
  @code = 105
185
194
  @text = 'INVALID_PRICE'
186
195
  @description = 'Udaná cena mimo povolený rozsah'
187
- @type = :chyba
196
+ @type = :error
188
197
  end
189
198
 
190
199
  class InvalidCODAmount < CzechPostB2bClient::ResponseCodes::BaseCode
191
200
  @code = 106
192
201
  @text = 'INVALID_AMOUNT'
193
202
  @description = 'Dobírka mimo povolený rozsah'
194
- @type = :chyba
203
+ @type = :error
195
204
  end
196
205
 
197
206
  class InvalidCODCurrency < CzechPostB2bClient::ResponseCodes::BaseCode
198
207
  @code = 107
199
208
  @text = 'INVALID_CURRENCY'
200
209
  @description = 'Neplatná měna dobírkové částky'
201
- @type = :chyba
210
+ @type = :error
202
211
  end
203
212
 
204
213
  class MissingVariableSymbol < CzechPostB2bClient::ResponseCodes::BaseCode
205
214
  @code = 108
206
215
  @text = 'MISSING_VS'
207
216
  @description = 'Neuveden variabilní symbol poukázky'
208
- @type = :chyba
217
+ @type = :error
209
218
  end
210
219
 
211
220
  class InvalidWidth < CzechPostB2bClient::ResponseCodes::BaseCode
212
221
  @code = 109
213
222
  @text = 'INVALID_WIDTH'
214
223
  @description = 'Šířka mimo povolený rozsah'
215
- @type = :chyba
224
+ @type = :error
216
225
  end
217
226
 
218
227
  class InvalidHeight < CzechPostB2bClient::ResponseCodes::BaseCode
219
228
  @code = 110
220
229
  @text = 'INVALID_HEIGHT'
221
230
  @description = 'Výška mimo povolený rozsah'
222
- @type = :chyba
231
+ @type = :error
223
232
  end
224
233
 
225
234
  class InvalidLength < CzechPostB2bClient::ResponseCodes::BaseCode
226
235
  @code = 111
227
236
  @text = 'INVALID_LENGTH'
228
237
  @description = 'Délka mimo povolený rozsah'
229
- @type = :chyba
238
+ @type = :error
230
239
  end
231
240
 
232
241
  class IllegalCombinationOfServices < CzechPostB2bClient::ResponseCodes::BaseCode
233
242
  @code = 112
234
243
  @text = 'ILLEGAL_COMBINATION_SERVICE'
235
244
  @description = 'Nepovolená kombinace doplňkových služeb'
236
- @type = :chyba
245
+ @type = :error
237
246
  end
238
247
 
239
248
  class MissingRequiredService < CzechPostB2bClient::ResponseCodes::BaseCode
240
249
  @code = 113
241
250
  @text = 'MISSING_REQUIRED_SERVICE'
242
251
  @description = 'Neuvedena alespoň jedna povinná doplňková služba'
243
- @type = :chyba
252
+ @type = :error
244
253
  end
245
254
 
246
255
  class MissingSurname < CzechPostB2bClient::ResponseCodes::BaseCode
247
256
  @code = 114
248
257
  @text = 'MISSING_SURNAME'
249
258
  @description = 'Neuvedeno příjmení fyzické osoby'
250
- @type = :chyba
259
+ @type = :error
251
260
  end
252
261
 
253
262
  class MissingCompanyName < CzechPostB2bClient::ResponseCodes::BaseCode
254
263
  @code = 115
255
264
  @text = 'MISSING_COMPANY_NAME'
256
265
  @description = 'Neuveden název právnické osoby'
257
- @type = :chyba
266
+ @type = :error
258
267
  end
259
268
 
260
269
  class UnknownAddresseeCity < CzechPostB2bClient::ResponseCodes::BaseCode
261
270
  @code = 116
262
271
  @text = 'UNKNOWN_CITY'
263
272
  @description = 'Neznámá obec adresáta'
264
- @type = :chyba
273
+ @type = :error
265
274
  end
266
275
 
267
276
  class UnknownAddresseePostCode < CzechPostB2bClient::ResponseCodes::BaseCode
268
277
  @code = 117
269
278
  @text = 'UNKNOWN_ZIP_CODE'
270
279
  @description = 'Neznámé PSC adresáta'
271
- @type = :chyba
280
+ @type = :error
272
281
  end
273
282
 
274
283
  class MissingPhoneNumber < CzechPostB2bClient::ResponseCodes::BaseCode
275
284
  @code = 118
276
285
  @text = 'MISSING_PHONE_NUMBER'
277
286
  @description = 'Neuvedeno telefonní číslo'
278
- @type = :chyba
287
+ @type = :error
279
288
  end
280
289
 
281
290
  class InvalidAddressForBigPackage < CzechPostB2bClient::ResponseCodes::BaseCode
@@ -283,308 +292,308 @@ module CzechPostB2bClient
283
292
  @text = 'INVALID_ADRESS'
284
293
  @description = 'Adresa odesílatele není vhodná pro produkt Nadrozměrná zásilka' \
285
294
  '(adresa obsahuje údaj P.O.Box nebo Poste restante)!'
286
- @type = :chyba
295
+ @type = :error
287
296
  end
288
297
 
289
298
  class DensityOutOfRange < CzechPostB2bClient::ResponseCodes::BaseCode
290
299
  @code = 120
291
300
  @text = 'INVALID_DENSITY'
292
301
  @description = 'Objemová hmotnost mimo povolený rozsah'
293
- @type = :chyba
302
+ @type = :error
294
303
  end
295
304
 
296
305
  class BadWeight < CzechPostB2bClient::ResponseCodes::BaseCode
297
306
  @code = 121
298
307
  @text = 'BAD_WEIGHT'
299
308
  @description = 'Hmotnost není číslo'
300
- @type = :chyba
309
+ @type = :error
301
310
  end
302
311
 
303
312
  class BadPrice < CzechPostB2bClient::ResponseCodes::BaseCode
304
313
  @code = 122
305
314
  @text = 'BAD_PRICE'
306
315
  @description = 'Udaná cena není číslo'
307
- @type = :chyba
316
+ @type = :error
308
317
  end
309
318
 
310
319
  class BadCODAmount < CzechPostB2bClient::ResponseCodes::BaseCode
311
320
  @code = 123
312
321
  @text = 'BAD_AMOUNT'
313
322
  @description = 'Dobírka není číslo'
314
- @type = :chyba
323
+ @type = :error
315
324
  end
316
325
 
317
326
  class MissingCODAmount < CzechPostB2bClient::ResponseCodes::BaseCode
318
327
  @code = 124
319
328
  @text = 'MISSING_AMOUNT'
320
329
  @description = 'Neuvedena částka dobírky'
321
- @type = :chyba
330
+ @type = :error
322
331
  end
323
332
 
324
333
  class MissingRequiredService2X < CzechPostB2bClient::ResponseCodes::BaseCode
325
334
  @code = 125
326
335
  @text = 'MISSING_REQUIRED_SERVICE 20/22/1U'
327
336
  @description = 'Neuvedena povinná služba 20 ani 22'
328
- @type = :chyba
337
+ @type = :error
329
338
  end
330
339
 
331
340
  class MissingRequiredService3X < CzechPostB2bClient::ResponseCodes::BaseCode
332
341
  @code = 126
333
342
  @text = 'MISSING_REQUIRED_SERVICE 37/38'
334
343
  @description = 'Neuvedena povinná služba 37 ani 38'
335
- @type = :chyba
344
+ @type = :error
336
345
  end
337
346
 
338
347
  class MissingRequiredService4X < CzechPostB2bClient::ResponseCodes::BaseCode
339
348
  @code = 127
340
349
  @text = 'MISSING_REQUIRED_SERVICE 42/43/44'
341
350
  @description = 'Neuvedena povinná služba 42 ani 43 ani 44'
342
- @type = :chyba
351
+ @type = :error
343
352
  end
344
353
 
345
354
  class MissingPrefix < CzechPostB2bClient::ResponseCodes::BaseCode
346
355
  @code = 128
347
356
  @text = 'MISSING_PREFIX'
348
357
  @description = 'Neuveden typ zásilky'
349
- @type = :chyba
358
+ @type = :error
350
359
  end
351
360
 
352
361
  class InvalidWeightForService11 < CzechPostB2bClient::ResponseCodes::BaseCode
353
362
  @code = 129
354
363
  @text = 'INVALID_WEIGHT_FOR_SERVICE_11'
355
364
  @description = 'Hmotnost mimo povolený rozsah služby 11'
356
- @type = :chyba
365
+ @type = :error
357
366
  end
358
367
 
359
368
  class MissingPrice < CzechPostB2bClient::ResponseCodes::BaseCode
360
369
  @code = 130
361
370
  @text = 'MISSING_PRICE'
362
371
  @description = 'Neuvedena částka udané ceny'
363
- @type = :chyba
372
+ @type = :error
364
373
  end
365
374
 
366
375
  class MissingCODAmountType < CzechPostB2bClient::ResponseCodes::BaseCode
367
376
  @code = 131
368
377
  @text = 'MISSING_AMOUNT_TYPE'
369
378
  @description = 'Neuveden typ dobírky'
370
- @type = :chyba
379
+ @type = :error
371
380
  end
372
381
 
373
382
  class BadVariableSymbol < CzechPostB2bClient::ResponseCodes::BaseCode
374
383
  @code = 132
375
384
  @text = 'BAD_VS'
376
385
  @description = 'Variabilní symbol poukázky není číslo'
377
- @type = :chyba
386
+ @type = :error
378
387
  end
379
388
 
380
389
  class BadWidth < CzechPostB2bClient::ResponseCodes::BaseCode
381
390
  @code = 133
382
391
  @text = 'BAD_WIDTH'
383
392
  @description = 'Šířka není celé číslo'
384
- @type = :chyba
393
+ @type = :error
385
394
  end
386
395
 
387
396
  class BadHeight < CzechPostB2bClient::ResponseCodes::BaseCode
388
397
  @code = 134
389
398
  @text = 'BAD_HEIGHT'
390
399
  @description = 'Výška není celé číslo'
391
- @type = :chyba
400
+ @type = :error
392
401
  end
393
402
 
394
403
  class BadLength < CzechPostB2bClient::ResponseCodes::BaseCode
395
404
  @code = 135
396
405
  @text = 'BAD_LENGTH'
397
406
  @description = 'Délka není celé číslo'
398
- @type = :chyba
407
+ @type = :error
399
408
  end
400
409
 
401
410
  class MissingRequiredPhoneNumber < CzechPostB2bClient::ResponseCodes::BaseCode
402
411
  @code = 136
403
412
  @text = 'MISSING_REQUIRED_PHONE_NUMBER'
404
413
  @description = 'Není uveden povinný údaj - telefonní číslo adresáta'
405
- @type = :chyba
414
+ @type = :error
406
415
  end
407
416
 
408
417
  class BadPrefixForAddress < CzechPostB2bClient::ResponseCodes::BaseCode
409
418
  @code = 137
410
419
  @text = 'BAD_PREFIX'
411
420
  @description = 'Zásilku tohoto typu nelze na uvedenou adresu odeslat'
412
- @type = :chyba
421
+ @type = :error
413
422
  end
414
423
 
415
424
  class MissingRequiredPhoneNumberOrEmail < CzechPostB2bClient::ResponseCodes::BaseCode
416
425
  @code = 138
417
426
  @text = 'MISSING_REQUIRED_PHONE_NUMBER_OR_EMAIL'
418
427
  @description = 'Není uveden povinný údaj - telefonní číslo nebo email adresáta'
419
- @type = :chyba
428
+ @type = :error
420
429
  end
421
430
 
422
431
  class InvalidAddressForCODAmountOver20000 < CzechPostB2bClient::ResponseCodes::BaseCode
423
432
  @code = 139
424
433
  @text = 'INVALID_ADRESS_FOR_AMOUNT_OVER_20000'
425
434
  @description = 'Zásilku tohoto typu s dobírkou vetší než 20 000 Kč nelze na uvedenou adresu odeslat'
426
- @type = :chyba
435
+ @type = :error
427
436
  end
428
437
 
429
438
  class BadPrefix < CzechPostB2bClient::ResponseCodes::BaseCode
430
439
  @code = 140
431
440
  @text = 'BAD_PREFIX'
432
441
  @description = 'Zásilku tohoto typu nelze na uvedenou adresu odeslat'
433
- @type = :chyba
442
+ @type = :error
434
443
  end
435
444
 
436
445
  class AddressValidOnlyForNaPostu < CzechPostB2bClient::ResponseCodes::BaseCode
437
446
  @code = 141
438
447
  @text = 'INVALID_ADRESS'
439
448
  @description = 'Adresa je vhodná pouze pro produkt Na poštu'
440
- @type = :chyba
449
+ @type = :error
441
450
  end
442
451
 
443
452
  class InvalidAddressForParcelType < CzechPostB2bClient::ResponseCodes::BaseCode
444
453
  @code = 142
445
454
  @text = 'INVALID_ADRESS'
446
455
  @description = 'Adresu nelze zvolit (adresa obsahuje údaj P.O.Box, Poste restante nebo Na poštu)!'
447
- @type = :chyba
456
+ @type = :error
448
457
  end
449
458
 
450
459
  class FullSequenceDuplicate < CzechPostB2bClient::ResponseCodes::BaseCode
451
460
  @code = 143
452
461
  @text = 'FULL_SEQUENCE'
453
462
  @description = 'Vyčerpaná řada podacích čísel'
454
- @type = :chyba
463
+ @type = :error
455
464
  end
456
465
 
457
466
  class DuplicateParcel < CzechPostB2bClient::ResponseCodes::BaseCode
458
467
  @code = 144
459
468
  @text = 'DUPLICATE_PARCEL_CODE'
460
469
  @description = 'Duplicitní zásilka'
461
- @type = :chyba
470
+ @type = :error
462
471
  end
463
472
 
464
473
  class InvalidParcelCodeControl < CzechPostB2bClient::ResponseCodes::BaseCode
465
474
  @code = 145
466
475
  @text = 'INVALID_PARCEL_CODE_CONTROL'
467
476
  @description = 'Nesouhlasí kontrolní číslo v ID zásilky'
468
- @type = :chyba
477
+ @type = :error
469
478
  end
470
479
 
471
480
  class MissingRequiredMRNCode < CzechPostB2bClient::ResponseCodes::BaseCode
472
481
  @code = 146
473
482
  @text = 'MISSING_REQUIRED_MRN_CODE'
474
483
  @description = 'Neuveden MRN kód'
475
- @type = :chyba
484
+ @type = :error
476
485
  end
477
486
 
478
487
  class InvalidMRNCodeControl < CzechPostB2bClient::ResponseCodes::BaseCode
479
488
  @code = 147
480
489
  @text = 'INVALID_MRN_CODE_CONTROL'
481
490
  @description = 'Neplatný kód MRN'
482
- @type = :chyba
491
+ @type = :error
483
492
  end
484
493
 
485
494
  class AddressValidOnlyForNaPostuDuplicate < CzechPostB2bClient::ResponseCodes::BaseCode
486
495
  @code = 150
487
496
  @text = 'INVALID_ADRESS'
488
497
  @description = 'Adresa je vhodná pouze pro produkt Na poštu'
489
- @type = :chyba
498
+ @type = :error
490
499
  end
491
500
 
492
501
  class AddressNeedsPhoneNumber < CzechPostB2bClient::ResponseCodes::BaseCode
493
502
  @code = 155
494
503
  @text = 'INVALID_ADRESS'
495
504
  @description = 'Adresát není vhodný pro produkt Nadrozměrná zásilka (nevyplněn mobil nebo telefon)'
496
- @type = :chyba
505
+ @type = :error
497
506
  end
498
507
 
499
508
  class MissingRequiredService1X < CzechPostB2bClient::ResponseCodes::BaseCode
500
509
  @code = 156
501
510
  @text = 'MISSING_REQUIRED_SERVICE 14/19'
502
511
  @description = 'Neuvedena povinná služba 14 ani 19'
503
- @type = :chyba
512
+ @type = :error
504
513
  end
505
514
 
506
515
  class MissingRequiredPhoneNumberOrWhat < CzechPostB2bClient::ResponseCodes::BaseCode
507
516
  @code = 159
508
517
  @text = 'MISSING_REQUIRED_PHONE_NUMBER'
509
518
  @description = 'Nevyplněn variabilní symbol zásilky' # nebo telefonni cislo?!
510
- @type = :chyba
519
+ @type = :error
511
520
  end
512
521
 
513
522
  class InvalidParcelResponseCode < CzechPostB2bClient::ResponseCodes::BaseCode
514
523
  @code = 160
515
524
  @text = 'INVALID_PARCEL_CODE'
516
525
  @description = 'Neuvedeno ID odpovědní zásilky'
517
- @type = :chyba
526
+ @type = :error
518
527
  end
519
528
 
520
529
  class MIssingParcelCode < CzechPostB2bClient::ResponseCodes::BaseCode
521
530
  @code = 161
522
531
  @text = 'INVALID_PARCEL_CODE'
523
532
  @description = 'Neuvedeno ID zásilky'
524
- @type = :chyba
533
+ @type = :error
525
534
  end
526
535
 
527
536
  class CustomerIDNotInAccordanceWithParcelCode < CzechPostB2bClient::ResponseCodes::BaseCode
528
537
  @code = 164
529
538
  @text = 'INVALID_PARCEL_CODE'
530
539
  @description = 'Nesouhlasí technologické číslo s ID zásilky'
531
- @type = :chyba
540
+ @type = :error
532
541
  end
533
542
 
534
543
  class BadAddressee < CzechPostB2bClient::ResponseCodes::BaseCode
535
544
  @code = 165
536
545
  @text = 'BAD_ADDRESSEE'
537
546
  @description = 'Chybný adresát'
538
- @type = :chyba
547
+ @type = :error
539
548
  end
540
549
 
541
550
  class MissingHeight < CzechPostB2bClient::ResponseCodes::BaseCode
542
551
  @code = 168
543
552
  @text = 'MISSING_HEIGHT'
544
553
  @description = 'Neuvedena výška'
545
- @type = :chyba
554
+ @type = :error
546
555
  end
547
556
 
548
557
  class MissingWidth < CzechPostB2bClient::ResponseCodes::BaseCode
549
558
  @code = 169
550
559
  @text = 'MISSING_WIDTH'
551
560
  @description = 'Neuvedena šířka'
552
- @type = :chyba
561
+ @type = :error
553
562
  end
554
563
 
555
564
  class MissingLength < CzechPostB2bClient::ResponseCodes::BaseCode
556
565
  @code = 170
557
566
  @text = 'MISSING_LENGTH'
558
567
  @description = 'Neuvedena délka'
559
- @type = :chyba
568
+ @type = :error
560
569
  end
561
570
 
562
571
  class PalettsNumberOutOfRange < CzechPostB2bClient::ResponseCodes::BaseCode
563
572
  @code = 171
564
573
  @text = 'MISSING_PALETTS_NUMBER'
565
574
  @description = 'Počet palet mimo povolený rozsah'
566
- @type = :chyba
575
+ @type = :error
567
576
  end
568
577
 
569
578
  class InvalidWeight < CzechPostB2bClient::ResponseCodes::BaseCode
570
579
  @code = 173
571
580
  @text = 'INVALID_WEIGHT'
572
581
  @description = 'Součet fyzických hmotností celé vícekusové zásilky mimo povolený rozsah'
573
- @type = :chyba
582
+ @type = :error
574
583
  end
575
584
 
576
585
  class InvalidDensity < CzechPostB2bClient::ResponseCodes::BaseCode
577
586
  @code = 174
578
587
  @text = 'INVALID_DENSITY'
579
588
  @description = 'Součet objemových hmotností celé vícekusové zásilky mimo povolený rozsah'
580
- @type = :chyba
589
+ @type = :error
581
590
  end
582
591
 
583
592
  class CODAmountOutOfRange < CzechPostB2bClient::ResponseCodes::BaseCode
584
593
  @code = 176
585
594
  @text = 'INVALID_AMOUNT'
586
595
  @description = 'Napočtená dobírka u hlavni zásilky je nad povolený rozsah'
587
- @type = :chyba
596
+ @type = :error
588
597
  end
589
598
 
590
599
  class CODAmountTooBig < CzechPostB2bClient::ResponseCodes::BaseCode
@@ -592,7 +601,7 @@ module CzechPostB2bClient
592
601
  @text = 'INVALID_AMOUNT'
593
602
  @description = 'Limit pro uložení zásilky na Výdejním místě je pro Dobírku max. 50.000,- Kč.' \
594
603
  ' Zásilka bude uložena na poště, která je Výdejnímu místu nadřízená.'
595
- @type = :chyba
604
+ @type = :error
596
605
  end
597
606
 
598
607
  class PriceTooBig < CzechPostB2bClient::ResponseCodes::BaseCode
@@ -600,7 +609,7 @@ module CzechPostB2bClient
600
609
  @text = 'INVALID_PRICE'
601
610
  @description = 'Limit pro uložení zásilky na Výdejním místě je pro Udanou cenu a Dobírku max. 50.000,- Kč.' \
602
611
  ' Zásilka bude uložena na poště, která je Výdejnímu místu nadřízená.'
603
- @type = :chyba
612
+ @type = :error
604
613
  end
605
614
 
606
615
  class PriceAndCODAmountTooBig < CzechPostB2bClient::ResponseCodes::BaseCode
@@ -608,7 +617,7 @@ module CzechPostB2bClient
608
617
  @text = 'INVALID_PRICE_AND_AMOUNT'
609
618
  @description = 'Limit pro uložení zásilky na Výdejním místě je pro Udanou cenu a Dobírku max. 50.000,- Kč.' \
610
619
  ' Zásilka bude uložena na poště, která je Výdejnímu místu nadřízená.'
611
- @type = :chyba
620
+ @type = :error
612
621
  end
613
622
 
614
623
  class InfoInvalidPhoneNumber < CzechPostB2bClient::ResponseCodes::BaseCode
@@ -629,413 +638,413 @@ module CzechPostB2bClient
629
638
  @code = 184
630
639
  @text = 'INVALID_PHONE_NUMBER'
631
640
  @description = 'Neplatný formát telefonního čísla'
632
- @type = :chyba
641
+ @type = :error
633
642
  end
634
643
 
635
644
  class InvalidEmail < CzechPostB2bClient::ResponseCodes::BaseCode
636
645
  @code = 185
637
646
  @text = 'INVALID_EMAIL'
638
647
  @description = 'Neplatný formát emailu'
639
- @type = :chyba
648
+ @type = :error
640
649
  end
641
650
 
642
651
  class MissingRequiredService4 < CzechPostB2bClient::ResponseCodes::BaseCode
643
652
  @code = 186
644
653
  @text = 'MISSING_REQUIRED_SERVICE 4'
645
654
  @description = 'Musí být vybraná služba "Dobírka Pk A" !'
646
- @type = :chyba
655
+ @type = :error
647
656
  end
648
657
 
649
658
  class ServicesCombinationNotAllowed < CzechPostB2bClient::ResponseCodes::BaseCode
650
659
  @code = 187
651
660
  @text = 'INVALID_PREFIX'
652
661
  @description = 'Nepovolená kombinace doplňkových služeb'
653
- @type = :chyba
662
+ @type = :error
654
663
  end
655
664
 
656
665
  class MissingSenderEmail < CzechPostB2bClient::ResponseCodes::BaseCode
657
666
  @code = 188
658
667
  @text = 'MISSING_SENDER_EMAIL'
659
668
  @description = 'Neuveden povinný údaj- email odesílatele'
660
- @type = :chyba
669
+ @type = :error
661
670
  end
662
671
 
663
672
  class MissingRequiredMobileNumber < CzechPostB2bClient::ResponseCodes::BaseCode
664
673
  @code = 189
665
674
  @text = 'MISSING_REQUIRED_MOBIL_NUMBER'
666
675
  @description = 'Není uveden povinný údaj - telefonní číslo nebo mobil adresáta'
667
- @type = :chyba
676
+ @type = :error
668
677
  end
669
678
 
670
679
  class InvalidSignNumber < CzechPostB2bClient::ResponseCodes::BaseCode
671
680
  @code = 190
672
681
  @text = 'INVALID_SIGN_NUMBER'
673
682
  @description = 'Neuveden počet dokumentů určených k podpisu'
674
- @type = :chyba
683
+ @type = :error
675
684
  end
676
685
 
677
686
  class InvalidUseOfService36 < CzechPostB2bClient::ResponseCodes::BaseCode
678
687
  @code = 191
679
688
  @text = 'INVALID_SERVICE_36'
680
689
  @description = 'Nepovolená kombinace adresy do Balíkomatu a služby 36 (Potvrzení dokumentace při dodání)'
681
- @type = :chyba
690
+ @type = :error
682
691
  end
683
692
 
684
693
  class InvalidUseOfService37 < CzechPostB2bClient::ResponseCodes::BaseCode
685
694
  @code = 192
686
695
  @text = 'INVALID_SERVICE_37'
687
696
  @description = 'Nepovolená kombinace adresy do Balíkomatu a služby 37 (Ověření údajů při dodání)'
688
- @type = :chyba
697
+ @type = :error
689
698
  end
690
699
 
691
700
  class InvalidUseOfService38 < CzechPostB2bClient::ResponseCodes::BaseCode
692
701
  @code = 193
693
702
  @text = 'INVALID_SERVICE_38'
694
703
  @description = 'Nepovolená kombinace adresy do Balíkomatu a služby 38 (Předání inf. z dod.)'
695
- @type = :chyba
704
+ @type = :error
696
705
  end
697
706
 
698
707
  class InvalidAddressAddresseeDocumentForParcelType < CzechPostB2bClient::ResponseCodes::BaseCode
699
708
  @code = 194
700
709
  @text = 'INVALID_ADDRESS_ADDRESSEE_DOCUMENT'
701
710
  @description = 'Zásilku tohoto typu nelze na uvedenou adresu adresáta dokumentů odeslat (obsahuje údaj Na poštu)'
702
- @type = :chyba
711
+ @type = :error
703
712
  end
704
713
 
705
714
  class MissingRequiredAddresseeDocument < CzechPostB2bClient::ResponseCodes::BaseCode
706
715
  @code = 195
707
716
  @text = 'MISSING_REQUIRED_ADDRESSEE_DOCUMENT'
708
717
  @description = 'Adresát dokumentů neuveden'
709
- @type = :chyba
718
+ @type = :error
710
719
  end
711
720
 
712
721
  class MissingRequiredMobileNumberOrEmail < CzechPostB2bClient::ResponseCodes::BaseCode
713
722
  @code = 196
714
723
  @text = 'MISSING_REQUIRED_MOBIL_OR_EMAIL'
715
724
  @description = 'Není uveden povinný údaj - mobilní telefonní číslo nebo email adresáta'
716
- @type = :chyba
725
+ @type = :error
717
726
  end
718
727
 
719
728
  class InvalidZPROOrderNumberFormat < CzechPostB2bClient::ResponseCodes::BaseCode
720
729
  @code = 197
721
730
  @text = 'INVALID_ZPRO_ORDER_NUMBER'
722
731
  @description = 'Nesprávný formát čísla objednávky ZPRO'
723
- @type = :chyba
732
+ @type = :error
724
733
  end
725
734
 
726
735
  class InvalidPartnerCode < CzechPostB2bClient::ResponseCodes::BaseCode
727
736
  @code = 198
728
737
  @text = 'INVALID_PARTNER_CODE'
729
738
  @description = 'Váš kód partnera neodpovídá zadanému kódu objednávky'
730
- @type = :chyba
739
+ @type = :error
731
740
  end
732
741
 
733
742
  class NotExistingOrderNumber < CzechPostB2bClient::ResponseCodes::BaseCode
734
743
  @code = 199
735
744
  @text = 'INVALID_ORDER_NUMBER'
736
745
  @description = 'Neexistující číslo objednávky'
737
- @type = :chyba
746
+ @type = :error
738
747
  end
739
748
 
740
749
  class CanceledOrderNumber < CzechPostB2bClient::ResponseCodes::BaseCode
741
750
  @code = 200
742
751
  @text = 'INVALID_ORDER_NUMBER'
743
752
  @description = 'Objednávka s tímto číslem byla stornována'
744
- @type = :chyba
753
+ @type = :error
745
754
  end
746
755
 
747
756
  class AlreadyAssignedOrderNumber < CzechPostB2bClient::ResponseCodes::BaseCode
748
757
  @code = 201
749
758
  @text = 'INVALID_ORDER_NUMBER'
750
759
  @description = 'K číslu objednávky již existuje přiřazená zásilka, číslo objednávky nelze použít'
751
- @type = :chyba
760
+ @type = :error
752
761
  end
753
762
 
754
763
  class InvalidAmount < CzechPostB2bClient::ResponseCodes::BaseCode
755
764
  @code = 202
756
765
  @text = 'INVALID_AMOUNT'
757
766
  @description = 'Dobírková částka je vyšší než celková cena objednávky'
758
- @type = :chyba
767
+ @type = :error
759
768
  end
760
769
 
761
770
  class MissingRequiredZPROOrderNumber < CzechPostB2bClient::ResponseCodes::BaseCode
762
771
  @code = 203
763
772
  @text = 'MISSING_REQUIRED_ZPRO_ORDER_NUMBER'
764
773
  @description = 'Neuvedeno číslo objednávky ZPRO'
765
- @type = :chyba
774
+ @type = :error
766
775
  end
767
776
 
768
777
  class VariableSymbolIsNotNumber < CzechPostB2bClient::ResponseCodes::BaseCode
769
778
  @code = 204
770
779
  @text = 'INVALID_VS_PARCEL'
771
780
  @description = 'Variabilní symbol není číslo'
772
- @type = :chyba
781
+ @type = :error
773
782
  end
774
783
 
775
784
  class ParcelCodeNotInAssignedRange < CzechPostB2bClient::ResponseCodes::BaseCode
776
785
  @code = 205
777
786
  @text = 'INVALID_PARCEL_CODE'
778
787
  @description = 'Zadané ID zásilky není v rozmezí vaší přidělené číselné řady'
779
- @type = :chyba
788
+ @type = :error
780
789
  end
781
790
 
782
791
  class MissingParcelCustomGoods < CzechPostB2bClient::ResponseCodes::BaseCode
783
792
  @code = 206
784
793
  @text = 'MISSING_PARCEL_CUSTOM_GOODS'
785
794
  @description = 'Neuvedena data celní prohlášky'
786
- @type = :chyba
795
+ @type = :error
787
796
  end
788
797
 
789
798
  class MissingCategoryCustomDecalaration < CzechPostB2bClient::ResponseCodes::BaseCode
790
799
  @code = 207
791
800
  @text = 'MISSING_CATEGORY_CUSTOM_DECALARATION'
792
801
  @description = 'Neuvedena kategorie zásilky'
793
- @type = :chyba
802
+ @type = :error
794
803
  end
795
804
 
796
805
  class MissingCurrencyCustomDeclaration < CzechPostB2bClient::ResponseCodes::BaseCode
797
806
  @code = 208
798
807
  @text = 'MISSING_CURRENCY_CUSTOM_DECALARATION' # or DECLARATION?
799
808
  @description = 'Neuvedena měna celní hodnoty'
800
- @type = :chyba
809
+ @type = :error
801
810
  end
802
811
 
803
812
  class CustomGoodQuantityOutOfRange < CzechPostB2bClient::ResponseCodes::BaseCode
804
813
  @code = 209
805
814
  @text = 'INVALID_QUANTITY_CUSTOM_GOOD'
806
815
  @description = 'Množství celního obsahu mimo povolený rozsah'
807
- @type = :chyba
816
+ @type = :error
808
817
  end
809
818
 
810
819
  class MissingQuantityCustomGood < CzechPostB2bClient::ResponseCodes::BaseCode
811
820
  @code = 210
812
821
  @text = 'MISSING_QUANTITY_CUSTOM_GOOD'
813
822
  @description = 'Neuvedeno množství celního obsahu'
814
- @type = :chyba
823
+ @type = :error
815
824
  end
816
825
 
817
826
  class WeightCustomGoodOutOfRange < CzechPostB2bClient::ResponseCodes::BaseCode
818
827
  @code = 211
819
828
  @text = 'INVALID_WEIGHT_CUSTOM_GOOD'
820
829
  @description = 'Hmotnost celního obsahu mimo povolený rozsah'
821
- @type = :chyba
830
+ @type = :error
822
831
  end
823
832
 
824
833
  class MissingWeightCustomGood < CzechPostB2bClient::ResponseCodes::BaseCode
825
834
  @code = 212
826
835
  @text = 'MISSING_WEIGHT_CUSTOM_GOOD'
827
836
  @description = 'Neuvedena hmotnost celního obsahu'
828
- @type = :chyba
837
+ @type = :error
829
838
  end
830
839
 
831
840
  class MissingPriceCustomGood < CzechPostB2bClient::ResponseCodes::BaseCode
832
841
  @code = 213
833
842
  @text = 'MISSING_PRICE_CUSTOM_GOOD'
834
843
  @description = 'Neuvedena celní hodnota položky'
835
- @type = :chyba
844
+ @type = :error
836
845
  end
837
846
 
838
847
  class MissingIsoCustomGood < CzechPostB2bClient::ResponseCodes::BaseCode
839
848
  @code = 214
840
849
  @text = 'MISSING_ISO_CUSTOM_GOOD'
841
850
  @description = 'Neuvedena země původu zboží'
842
- @type = :chyba
851
+ @type = :error
843
852
  end
844
853
 
845
854
  class MissingHsCodeCustomGood < CzechPostB2bClient::ResponseCodes::BaseCode
846
855
  @code = 215
847
856
  @text = 'MISSING_HS_CODE_CUSTOM_GOOD'
848
857
  @description = 'Neuveden tarifní kód'
849
- @type = :chyba
858
+ @type = :error
850
859
  end
851
860
 
852
861
  class MissingContentCustomGood < CzechPostB2bClient::ResponseCodes::BaseCode
853
862
  @code = 216
854
863
  @text = 'MISSING_CONTENT_CUSTOM_GOOD'
855
864
  @description = 'Neuveden popis obsahu zboží'
856
- @type = :chyba
865
+ @type = :error
857
866
  end
858
867
 
859
868
  class InvalidPriceCurrencyAccordance < CzechPostB2bClient::ResponseCodes::BaseCode
860
869
  @code = 217
861
870
  @text = 'INVALID_PRICE_CURRENCY'
862
871
  @description = 'Nesouhlasí měna udané ceny'
863
- @type = :chyba
872
+ @type = :error
864
873
  end
865
874
 
866
875
  class InvalidAmountCurrency < CzechPostB2bClient::ResponseCodes::BaseCode
867
876
  @code = 218
868
877
  @text = 'INVALID_AMOUNT_CURRENCY'
869
878
  @description = 'Nesouhlasí měna dobírky'
870
- @type = :chyba
879
+ @type = :error
871
880
  end
872
881
 
873
882
  class MissingAddresseeZipCode < CzechPostB2bClient::ResponseCodes::BaseCode
874
883
  @code = 219
875
884
  @text = 'MISSING_ADDRESSEE_ZIP_CODE'
876
885
  @description = 'PSČ adresáta musí být vyplněno'
877
- @type = :chyba
886
+ @type = :error
878
887
  end
879
888
 
880
889
  class MissingAddresseeCity < CzechPostB2bClient::ResponseCodes::BaseCode
881
890
  @code = 220
882
891
  @text = 'MISSING_ADDRESSEE_CITY'
883
892
  @description = 'Obec adresáta musí být vyplněna'
884
- @type = :chyba
893
+ @type = :error
885
894
  end
886
895
 
887
896
  class InvalidWeightCustomGoodSummary < CzechPostB2bClient::ResponseCodes::BaseCode
888
897
  @code = 221
889
898
  @text = 'INVALID_WEIGHT_CUSTOM_GOOD_SUMMARY'
890
899
  @description = 'Celková hmotnost zboží je vyšší než hmotnost uvedená u zásilky'
891
- @type = :chyba
900
+ @type = :error
892
901
  end
893
902
 
894
903
  class MissingParcelCustomGood < CzechPostB2bClient::ResponseCodes::BaseCode
895
904
  @code = 222
896
905
  @text = 'MISSING_PARCEL_CUSTOM_GOOD'
897
906
  @description = 'Neuvedena zásilka k položkám obsahu zboží'
898
- @type = :chyba
907
+ @type = :error
899
908
  end
900
909
 
901
910
  class WeightIsOutOfRange < CzechPostB2bClient::ResponseCodes::BaseCode
902
911
  @code = 223
903
912
  @text = 'INVALID_WEIGHT'
904
913
  @description = 'Váhové rozmezí je mimo povolený rozsah'
905
- @type = :chyba
914
+ @type = :error
906
915
  end
907
916
 
908
917
  class InvalidOrderNumber < CzechPostB2bClient::ResponseCodes::BaseCode
909
918
  @code = 224
910
919
  @text = 'INVALID_ORDER_NUMBER'
911
920
  @description = 'Číslo objednávky nelze použít, ještě nedošlo k jejímu odeslání'
912
- @type = :chyba
921
+ @type = :error
913
922
  end
914
923
 
915
924
  class InvalidPrefixAccordance < CzechPostB2bClient::ResponseCodes::BaseCode
916
925
  @code = 225
917
926
  @text = 'INVALID_PREFIX'
918
927
  @description = 'Nesouhlasí typ zásilky s typem produktu dané dávky'
919
- @type = :chyba
928
+ @type = :error
920
929
  end
921
930
 
922
931
  class InvalidContentCustomGood < CzechPostB2bClient::ResponseCodes::BaseCode
923
932
  @code = 226
924
933
  @text = 'INVALID_CONTENT_CUSTOM_GOOD'
925
934
  @description = 'Celní hodnota položky je mimo povolený rozsah'
926
- @type = :chyba
935
+ @type = :error
927
936
  end
928
937
 
929
938
  class InvalidCustomGoodNumber < CzechPostB2bClient::ResponseCodes::BaseCode
930
939
  @code = 227
931
940
  @text = 'INVALID_CUSTOM_GOOD_NUMBER'
932
941
  @description = 'Počet položek celního obsahu mimo povolený rozsah'
933
- @type = :chyba
942
+ @type = :error
934
943
  end
935
944
 
936
945
  class MissingRequiredVoucherPrice < CzechPostB2bClient::ResponseCodes::BaseCode
937
946
  @code = 228
938
947
  @text = 'MISSING_REQUIRED_VOUCHER_PRICE'
939
948
  @description = 'Neuvedena částka'
940
- @type = :chyba
949
+ @type = :error
941
950
  end
942
951
 
943
952
  class MissingRequiredPayday < CzechPostB2bClient::ResponseCodes::BaseCode
944
953
  @code = 230
945
954
  @text = 'MISSING_REQUIRED_PAYDAY'
946
955
  @description = 'Termín výplaty není uveden'
947
- @type = :chyba
956
+ @type = :error
948
957
  end
949
958
 
950
959
  class InvalidPayday < CzechPostB2bClient::ResponseCodes::BaseCode
951
960
  @code = 231
952
961
  @text = 'INVALID_PAYDAY'
953
962
  @description = 'Termín výplaty je mimo povolené rozmezí 365 dní'
954
- @type = :chyba
963
+ @type = :error
955
964
  end
956
965
 
957
966
  class OverenoVecerniDorucovani < CzechPostB2bClient::ResponseCodes::BaseCode
958
967
  @code = 232
959
968
  @text = 'overenoVecerniDorucovani' # WTF?
960
969
  @description = 'Termín výplaty není platné datum'
961
- @type = :chyba
970
+ @type = :error
962
971
  end
963
972
 
964
973
  class MissingRequiredService3XTrinity < CzechPostB2bClient::ResponseCodes::BaseCode
965
974
  @code = 240
966
975
  @text = 'MISSING_REQUIRED_SERVICE 3/32/33'
967
976
  @description = 'Neuvedena povinná služba 3 ani 32 ani 33'
968
- @type = :chyba
977
+ @type = :error
969
978
  end
970
979
 
971
980
  class MissingRequiredService10 < CzechPostB2bClient::ResponseCodes::BaseCode
972
981
  @code = 241
973
982
  @text = 'MISSING_REQUIRED_SERVICE_10'
974
983
  @description = 'Neuvedena služba 10'
975
- @type = :chyba
984
+ @type = :error
976
985
  end
977
986
 
978
987
  class MissingRequiredService1AB < CzechPostB2bClient::ResponseCodes::BaseCode
979
988
  @code = 242
980
989
  @text = 'MISSING_REQUIRED_SERVICE 1A/1B'
981
990
  @description = 'Neuvedena povinná služba 1A ani 1B'
982
- @type = :chyba
991
+ @type = :error
983
992
  end
984
993
 
985
994
  class MissingHandlingInstructions < CzechPostB2bClient::ResponseCodes::BaseCode
986
995
  @code = 243
987
996
  @text = 'MISSING_REQUIRED_SERVICE'
988
997
  @description = 'Neuvedeny dispozice pro nakládání se zásilkou'
989
- @type = :chyba
998
+ @type = :error
990
999
  end
991
1000
 
992
1001
  class MissingReturnInstructions < CzechPostB2bClient::ResponseCodes::BaseCode
993
1002
  @code = 243
994
1003
  @text = 'MISSING_REQUIRED_SERVICE'
995
1004
  @description = 'Neuveden způsob vrácení zásilky (ekonom./let.)'
996
- @type = :chyba
1005
+ @type = :error
997
1006
  end
998
1007
 
999
1008
  class MissingReturnNumberDays < CzechPostB2bClient::ResponseCodes::BaseCode
1000
1009
  @code = 245
1001
1010
  @text = 'MISSING_RETURN_NUMBER_DAYS'
1002
1011
  @description = 'Neuveden počet dní pro vrácení zásilky'
1003
- @type = :chyba
1012
+ @type = :error
1004
1013
  end
1005
1014
 
1006
1015
  class InvalidReturnNumberDays < CzechPostB2bClient::ResponseCodes::BaseCode
1007
1016
  @code = 246
1008
1017
  @text = 'INVALID_RETURN_NUMBER_DAYS'
1009
1018
  @description = 'Počet dní pro vrácení zásilky mimo povolený rozsah'
1010
- @type = :chyba
1019
+ @type = :error
1011
1020
  end
1012
1021
 
1013
1022
  class InvalidAddressForBalikovna < CzechPostB2bClient::ResponseCodes::BaseCode
1014
1023
  @code = 247
1015
1024
  @text = 'INVALID_ADRESS'
1016
1025
  @description = 'Nepovolená provozovna pro adresu typu Balíkovna'
1017
- @type = :chyba
1026
+ @type = :error
1018
1027
  end
1019
1028
 
1020
1029
  class AddressAllowedForBalikovnaOnly < CzechPostB2bClient::ResponseCodes::BaseCode
1021
1030
  @code = 248
1022
1031
  @text = 'INVALID_ADRESS'
1023
1032
  @description = 'Adresa je vhodná pouze pro produkt balík do Balíkovny'
1024
- @type = :chyba
1033
+ @type = :error
1025
1034
  end
1026
1035
 
1027
1036
  class MissingRequiredAddresseeEmail < CzechPostB2bClient::ResponseCodes::BaseCode
1028
1037
  @code = 250
1029
1038
  @text = 'MISSING_REQUIRED_EMAIL'
1030
1039
  @description = 'Není uveden povinný údaj - email adresáta'
1031
- @type = :chyba
1040
+ @type = :error
1032
1041
  end
1033
1042
 
1034
1043
  class MissingRequiredFirstNameAddresseeDocument < CzechPostB2bClient::ResponseCodes::BaseCode
1035
1044
  @code = 252
1036
1045
  @text = 'MISSING_REQUIRED_FIRST_NAME_ADDRESSEE_DOCUMENT'
1037
1046
  @description = 'Neuvedeno jméno adresáta dokumentů'
1038
- @type = :chyba
1047
+ @type = :error
1039
1048
  end
1040
1049
 
1041
1050
  class InfoInexactAddress < CzechPostB2bClient::ResponseCodes::BaseCode
@@ -1049,7 +1058,7 @@ module CzechPostB2bClient
1049
1058
  @code = 254
1050
1059
  @text = 'INVALID_PARCEL_CODE'
1051
1060
  @description = 'Chybné ID čárového kódu'
1052
- @type = :chyba
1061
+ @type = :error
1053
1062
  end
1054
1063
 
1055
1064
  # WHAT! AGAIN?
@@ -1057,56 +1066,56 @@ module CzechPostB2bClient
1057
1066
  @code = 255
1058
1067
  @text = 'INVALID_PARCEL_CODE'
1059
1068
  @description = 'Chybné ID čárového kódu'
1060
- @type = :chyba
1069
+ @type = :error
1061
1070
  end
1062
1071
 
1063
1072
  class DuplicateDuplicateParcelCode < CzechPostB2bClient::ResponseCodes::BaseCode
1064
1073
  @code = 256
1065
1074
  @text = 'DUPLICATE_PARCEL_CODE' # here we go again
1066
1075
  @description = 'Duplicitní ID čárového kódu'
1067
- @type = :chyba
1076
+ @type = :error
1068
1077
  end
1069
1078
 
1070
1079
  class AddressSuitableForLocalDelivery < CzechPostB2bClient::ResponseCodes::BaseCode
1071
1080
  @code = 257
1072
1081
  @text = 'INVALID_ADRESS' # no kidding! Like 6 times same text?
1073
1082
  @description = 'Adresa je vhodná pouze pro vnitrostátní zásilky'
1074
- @type = :chyba
1083
+ @type = :error
1075
1084
  end
1076
1085
 
1077
1086
  class MissingVariableSymbolDuplicate < CzechPostB2bClient::ResponseCodes::BaseCode
1078
1087
  @code = 258
1079
1088
  @text = 'MISSING_VS'
1080
1089
  @description = 'Nevyplněn variabilní symbol'
1081
- @type = :chyba
1090
+ @type = :error
1082
1091
  end
1083
1092
 
1084
1093
  class AddresseeCityRequired < CzechPostB2bClient::ResponseCodes::BaseCode
1085
1094
  @code = 259
1086
1095
  @text = 'MISSING_ADDRESSEE_CITY'
1087
1096
  @description = 'Není uveden povinný údaj - město adresáta'
1088
- @type = :chyba
1097
+ @type = :error
1089
1098
  end
1090
1099
 
1091
1100
  class MissingAddresseeStreet < CzechPostB2bClient::ResponseCodes::BaseCode
1092
1101
  @code = 260
1093
1102
  @text = 'MISSING_ADDRESSEE_STREET'
1094
1103
  @description = 'Není uveden povinný údaj – ulice adresáta'
1095
- @type = :chyba
1104
+ @type = :error
1096
1105
  end
1097
1106
 
1098
1107
  class MissingSizeCategory < CzechPostB2bClient::ResponseCodes::BaseCode
1099
1108
  @code = 261
1100
1109
  @text = 'MISSING_SIZE_CATEGORY'
1101
1110
  @description = 'Neuvedena rozměrová kategorie zásilky'
1102
- @type = :chyba
1111
+ @type = :error
1103
1112
  end
1104
1113
 
1105
1114
  class PriceOutOfRange < CzechPostB2bClient::ResponseCodes::BaseCode
1106
1115
  @code = 262
1107
1116
  @text = 'INVALID_PRICE'
1108
1117
  @description = 'Udaná cena mimo povolený rozsah'
1109
- @type = :chyba
1118
+ @type = :error
1110
1119
  end
1111
1120
 
1112
1121
  class InfoSpecialPackagingRequest < CzechPostB2bClient::ResponseCodes::BaseCode
@@ -1120,14 +1129,14 @@ module CzechPostB2bClient
1120
1129
  @code = 264
1121
1130
  @text = 'INVALID_PRICE'
1122
1131
  @description = 'Službu Cenný obsah je možné zvolit až od 10 tis. Kč'
1123
- @type = :chyba
1132
+ @type = :error
1124
1133
  end
1125
1134
 
1126
1135
  class MissingAddressee < CzechPostB2bClient::ResponseCodes::BaseCode
1127
1136
  @code = 300
1128
1137
  @text = 'MISSING_ADDRESSEE'
1129
1138
  @description = 'Adresát neuveden'
1130
- @type = :chyba
1139
+ @type = :error
1131
1140
  end
1132
1141
 
1133
1142
  class InfoCityChanged < CzechPostB2bClient::ResponseCodes::BaseCode
@@ -1141,7 +1150,7 @@ module CzechPostB2bClient
1141
1150
  @code = 302
1142
1151
  @text = 'MISSING_ADDRESS'
1143
1152
  @description = 'Nepovolená kombinace adresy a subjektu'
1144
- @type = :chyba
1153
+ @type = :error
1145
1154
  end
1146
1155
 
1147
1156
  class InfoInvalidBirthDay < CzechPostB2bClient::ResponseCodes::BaseCode
@@ -1190,21 +1199,21 @@ module CzechPostB2bClient
1190
1199
  @code = 309
1191
1200
  @text = 'INVALID_ADDRESS'
1192
1201
  @description = 'Chybná adresa - neexistující PSČ nebo obec'
1193
- @type = :chyba
1202
+ @type = :error
1194
1203
  end
1195
1204
 
1196
1205
  class InvalidTypePrefix < CzechPostB2bClient::ResponseCodes::BaseCode
1197
1206
  @code = 310
1198
1207
  @text = 'INVALID_PREFIX'
1199
1208
  @description = 'Neplatný typ zásilky'
1200
- @type = :chyba
1209
+ @type = :error
1201
1210
  end
1202
1211
 
1203
1212
  class InvalidParcelTypeForID < CzechPostB2bClient::ResponseCodes::BaseCode
1204
1213
  @code = 311
1205
1214
  @text = 'INVALID_PREFIX'
1206
1215
  @description = 'Nesouhlasí typ zásilky s ID zásilky'
1207
- @type = :chyba
1216
+ @type = :error
1208
1217
  end
1209
1218
 
1210
1219
  class InfoCancelService29 < CzechPostB2bClient::ResponseCodes::BaseCode
@@ -1239,7 +1248,7 @@ module CzechPostB2bClient
1239
1248
  @code = 316
1240
1249
  @text = 'INVALID_AMOUNT_CURRENCY'
1241
1250
  @description = 'Nesouhlasí měna dobírkove částky'
1242
- @type = :chyba
1251
+ @type = :error
1243
1252
  end
1244
1253
 
1245
1254
  class InfoInvalidSpecificSymbol < CzechPostB2bClient::ResponseCodes::BaseCode
@@ -1260,14 +1269,14 @@ module CzechPostB2bClient
1260
1269
  @code = 319
1261
1270
  @text = 'INVALID_SERVICE_18'
1262
1271
  @description = 'Nepovolena kombinace adresy a služby Doručení v Sobotu'
1263
- @type = :chyba
1272
+ @type = :error
1264
1273
  end
1265
1274
 
1266
1275
  class InvalidService19 < CzechPostB2bClient::ResponseCodes::BaseCode
1267
1276
  @code = 320
1268
1277
  @text = 'INVALID_SERVICE_19'
1269
1278
  @description = 'Nepovolena kombinace adresy a služby Doručení v Neděli/sv'
1270
- @type = :chyba
1279
+ @type = :error
1271
1280
  end
1272
1281
 
1273
1282
  class InfoCancelService30 < CzechPostB2bClient::ResponseCodes::BaseCode
@@ -1317,7 +1326,7 @@ module CzechPostB2bClient
1317
1326
  @code = 327
1318
1327
  @text = 'MISSING_REQUIRED_EMAIL'
1319
1328
  @description = 'Není uveden povinný údaj - email adresáta'
1320
- @type = :chyba
1329
+ @type = :error
1321
1330
  end
1322
1331
 
1323
1332
  class InfoCancelService25 < CzechPostB2bClient::ResponseCodes::BaseCode
@@ -1331,21 +1340,21 @@ module CzechPostB2bClient
1331
1340
  @code = 329
1332
1341
  @text = 'MISSING_REQUIRED_PARCEL_CODE'
1333
1342
  @description = 'Neuvedeno ID zásilky'
1334
- @type = :chyba
1343
+ @type = :error
1335
1344
  end
1336
1345
 
1337
1346
  class ParcelCodeNotAllowed < CzechPostB2bClient::ResponseCodes::BaseCode
1338
1347
  @code = 330
1339
1348
  @text = 'INVALID_PARCEL_CODE'
1340
1349
  @description = 'Nepovolené ID zásilky'
1341
- @type = :chyba
1350
+ @type = :error
1342
1351
  end
1343
1352
 
1344
1353
  class MissingPalettsNumber < CzechPostB2bClient::ResponseCodes::BaseCode
1345
1354
  @code = 331
1346
1355
  @text = 'MISSING_PALETTS_NUMBER'
1347
1356
  @description = 'Neuveden počet palet'
1348
- @type = :chyba
1357
+ @type = :error
1349
1358
  end
1350
1359
 
1351
1360
  class InfoCancelPalettsNumber < CzechPostB2bClient::ResponseCodes::BaseCode
@@ -1380,14 +1389,14 @@ module CzechPostB2bClient
1380
1389
  @code = 336
1381
1390
  @text = 'MISSING_REQUIRED_PRICE'
1382
1391
  @description = 'Neuvedena částka udané ceny'
1383
- @type = :chyba
1392
+ @type = :error
1384
1393
  end
1385
1394
 
1386
1395
  class InvalidAmountType < CzechPostB2bClient::ResponseCodes::BaseCode
1387
1396
  @code = 337
1388
1397
  @text = 'INVALID_AMOUNT_TYPE'
1389
1398
  @description = 'Neuveden typ dobírky'
1390
- @type = :chyba
1399
+ @type = :error
1391
1400
  end
1392
1401
 
1393
1402
  class InfoCancelVSVoucher < CzechPostB2bClient::ResponseCodes::BaseCode
@@ -1401,14 +1410,14 @@ module CzechPostB2bClient
1401
1410
  @code = 339
1402
1411
  @text = 'INVALID_SERVICE_COMBINATION'
1403
1412
  @description = 'Nepovolená kombinace doplňkových služeb službyZak'
1404
- @type = :chyba
1413
+ @type = :error
1405
1414
  end
1406
1415
 
1407
1416
  class InvalidMRNCode < CzechPostB2bClient::ResponseCodes::BaseCode
1408
1417
  @code = 340
1409
1418
  @text = 'INVALID_MRN_CODE'
1410
1419
  @description = 'neplatný kód MRN'
1411
- @type = :chyba
1420
+ @type = :error
1412
1421
  end
1413
1422
 
1414
1423
  class InfoCancelService34 < CzechPostB2bClient::ResponseCodes::BaseCode
@@ -1436,21 +1445,21 @@ module CzechPostB2bClient
1436
1445
  @code = 344
1437
1446
  @text = 'MISSING_REQUIRED_ADDRESSEE_DOCUMENT'
1438
1447
  @description = 'Adresát dokumentů neuveden'
1439
- @type = :chyba
1448
+ @type = :error
1440
1449
  end
1441
1450
 
1442
1451
  class InvalidAddressAddresseeDocumentWrongCity < CzechPostB2bClient::ResponseCodes::BaseCode
1443
1452
  @code = 345
1444
1453
  @text = 'INVALID_ADDRESS_ADDRESSEE_DOCUMENT'
1445
1454
  @description = 'Chybná adresa adresáta dokumentů - neexistující PSČ nebo obec'
1446
- @type = :chyba
1455
+ @type = :error
1447
1456
  end
1448
1457
 
1449
1458
  class InvalidAddressAddresseeDocumentObjectNotFound < CzechPostB2bClient::ResponseCodes::BaseCode
1450
1459
  @code = 346
1451
1460
  @text = 'INVALID_ADDRESS_ADDRESSEE_DOCUMENT'
1452
1461
  @description = 'Nepřesná adresa adresáta dokumentů - nenalezen objekt'
1453
- @type = :chyba
1462
+ @type = :error
1454
1463
  end
1455
1464
 
1456
1465
  class InfoCancelMobilePhoneOrEmailAddresseeDocument < CzechPostB2bClient::ResponseCodes::BaseCode
@@ -1478,7 +1487,7 @@ module CzechPostB2bClient
1478
1487
  @code = 350
1479
1488
  @text = 'INVALID_ZPRO_ORDER_NUMBER'
1480
1489
  @description = 'Nesprávný formát čísla objednávky ZPRO'
1481
- @type = :chyba
1490
+ @type = :error
1482
1491
  end
1483
1492
 
1484
1493
  class InfoAddRequiredService75 < CzechPostB2bClient::ResponseCodes::BaseCode
@@ -1492,70 +1501,70 @@ module CzechPostB2bClient
1492
1501
  @code = 352
1493
1502
  @text = 'INVALID_PRICE_CURRENCY'
1494
1503
  @description = 'Nesouhlasí měna udané ceny'
1495
- @type = :chyba
1504
+ @type = :error
1496
1505
  end
1497
1506
 
1498
1507
  class InvalidCategoryCustomDecalaration < CzechPostB2bClient::ResponseCodes::BaseCode
1499
1508
  @code = 353
1500
1509
  @text = 'INVALID_CATEGORY_CUSTOM_DECALARATION'
1501
1510
  @description = 'Nesprávný formát kategorie zásilky'
1502
- @type = :chyba
1511
+ @type = :error
1503
1512
  end
1504
1513
 
1505
1514
  class InvalidCurrencyCustomDecalaration < CzechPostB2bClient::ResponseCodes::BaseCode
1506
1515
  @code = 354
1507
1516
  @text = 'INVALID_CURRENCY_CUSTOM_DECALARATION'
1508
1517
  @description = 'Nesprávný formát měny celní hodnoty'
1509
- @type = :chyba
1518
+ @type = :error
1510
1519
  end
1511
1520
 
1512
1521
  class InvalidQuantityCustomGood < CzechPostB2bClient::ResponseCodes::BaseCode
1513
1522
  @code = 355
1514
1523
  @text = 'INVALID_QUANTITY_CUSTOM_GOOD'
1515
1524
  @description = 'Nesprávný formát množství celního obsahu'
1516
- @type = :chyba
1525
+ @type = :error
1517
1526
  end
1518
1527
 
1519
1528
  class InvalidWeightCustomGood < CzechPostB2bClient::ResponseCodes::BaseCode
1520
1529
  @code = 356
1521
1530
  @text = 'INVALID_WEIGHT_CUSTOM_GOOD'
1522
1531
  @description = 'Nesprávný formát hmotnosti celního obsahu'
1523
- @type = :chyba
1532
+ @type = :error
1524
1533
  end
1525
1534
 
1526
1535
  class InvalidPriceCustomGood < CzechPostB2bClient::ResponseCodes::BaseCode
1527
1536
  @code = 357
1528
1537
  @text = 'INVALID_PRICE_CUSTOM_GOOD'
1529
1538
  @description = 'Nesprávný formát celní hodnota položky'
1530
- @type = :chyba
1539
+ @type = :error
1531
1540
  end
1532
1541
 
1533
1542
  class InvalidIsoCustomGood < CzechPostB2bClient::ResponseCodes::BaseCode
1534
1543
  @code = 358
1535
1544
  @text = 'INVALID_ISO_CUSTOM_GOOD'
1536
1545
  @description = 'Neexistující země původu zboží'
1537
- @type = :chyba
1546
+ @type = :error
1538
1547
  end
1539
1548
 
1540
1549
  class InvalidIsoCustomGoodFormat < CzechPostB2bClient::ResponseCodes::BaseCode
1541
1550
  @code = 359
1542
1551
  @text = 'INVALID_ISO_CUSTOM_GOOD'
1543
1552
  @description = 'Nesprávný formát země původu zboží'
1544
- @type = :chyba
1553
+ @type = :error
1545
1554
  end
1546
1555
 
1547
1556
  class InvalidHsCodeCustomGood < CzechPostB2bClient::ResponseCodes::BaseCode
1548
1557
  @code = 360
1549
1558
  @text = 'INVALID_HS_CODE_CUSTOM_GOOD'
1550
1559
  @description = 'Nesprávný formát tarifního kódu'
1551
- @type = :chyba
1560
+ @type = :error
1552
1561
  end
1553
1562
 
1554
1563
  class MissingRequiredService4x < CzechPostB2bClient::ResponseCodes::BaseCode
1555
1564
  @code = 361
1556
1565
  @text = 'MISSING_REQUIRED_SERVICE_43/44'
1557
1566
  @description = 'Neuvedena povinná služba č. 43 nebo č. 44 k datům celní prohlášky'
1558
- @type = :chyba
1567
+ @type = :error
1559
1568
  end
1560
1569
 
1561
1570
  class InfoPriceIsNotNumber < CzechPostB2bClient::ResponseCodes::BaseCode
@@ -1583,28 +1592,28 @@ module CzechPostB2bClient
1583
1592
  @code = 365
1584
1593
  @text = 'INVALID_ADDRESSEE'
1585
1594
  @description = 'Chybný adresát'
1586
- @type = :chyba
1595
+ @type = :error
1587
1596
  end
1588
1597
 
1589
1598
  class ResponsibleConsignmentNumberOutOfRange < CzechPostB2bClient::ResponseCodes::BaseCode
1590
1599
  @code = 366
1591
1600
  @text = 'INVALID_RESPONSIBLE_CONSIGNMENT_NUMBER'
1592
1601
  @description = 'Hodnota "počet odpovědních zásilek" je mimo povolený rozsah'
1593
- @type = :chyba
1602
+ @type = :error
1594
1603
  end
1595
1604
 
1596
1605
  class InvalidResponsibleConsignmentNumber < CzechPostB2bClient::ResponseCodes::BaseCode
1597
1606
  @code = 367
1598
1607
  @text = 'INVALID_RESPONSIBLE_CONSIGNMENT_NUMBER'
1599
1608
  @description = 'Nesprávný formát počtu odpovědních zásilek'
1600
- @type = :chyba
1609
+ @type = :error
1601
1610
  end
1602
1611
 
1603
1612
  class ResponsibleConsignmentNumberCannotBeImported < CzechPostB2bClient::ResponseCodes::BaseCode
1604
1613
  @code = 368
1605
1614
  @text = 'INVALID_RESPONSIBLE_CONSIGNMENT_NUMBER'
1606
1615
  @description = 'Počet odpovědních zásilek při vyplnění ID zásilky nelze importovat'
1607
- @type = :chyba
1616
+ @type = :error
1608
1617
  end
1609
1618
 
1610
1619
  class InfoCancelService1ABForService40 < CzechPostB2bClient::ResponseCodes::BaseCode
@@ -1632,28 +1641,28 @@ module CzechPostB2bClient
1632
1641
  @code = 372
1633
1642
  @text = 'INVALID_TARE_WEIGHT'
1634
1643
  @description = 'Hmotnost obalu je mimo povolený rozsah'
1635
- @type = :chyba
1644
+ @type = :error
1636
1645
  end
1637
1646
 
1638
1647
  class InvalidNumberClosure < CzechPostB2bClient::ResponseCodes::BaseCode
1639
1648
  @code = 373
1640
1649
  @text = 'INVALID_NUMBER_CLOSURE'
1641
1650
  @description = 'Duplicitní číslo uzávěru'
1642
- @type = :chyba
1651
+ @type = :error
1643
1652
  end
1644
1653
 
1645
1654
  class DuplicitParcelCode < CzechPostB2bClient::ResponseCodes::BaseCode
1646
1655
  @code = 374
1647
1656
  @text = 'INVALID_PARCEL_CODE'
1648
1657
  @description = 'Duplicitní ID zásilky v rámci souboru'
1649
- @type = :chyba
1658
+ @type = :error
1650
1659
  end
1651
1660
 
1652
1661
  class InvalidTiming < CzechPostB2bClient::ResponseCodes::BaseCode
1653
1662
  @code = 375
1654
1663
  @text = 'INVALID_TIMING'
1655
1664
  @description = 'Nesprávný předstih podání'
1656
- @type = :chyba
1665
+ @type = :error
1657
1666
  end
1658
1667
 
1659
1668
  class InfoCancelService1AB < CzechPostB2bClient::ResponseCodes::BaseCode
@@ -1674,21 +1683,21 @@ module CzechPostB2bClient
1674
1683
  @code = 378
1675
1684
  @text = 'INVALID_PREFIX_COMBINATION'
1676
1685
  @description = 'Zásilka je chybně přiřazena k id tiskové šablony'
1677
- @type = :chyba
1686
+ @type = :error
1678
1687
  end
1679
1688
 
1680
1689
  class ParcelDoesNotMeetTheRequirementsForm < CzechPostB2bClient::ResponseCodes::BaseCode
1681
1690
  @code = 379
1682
1691
  @text = 'PARCEL_DOES_NOT_MEET_THE_REQUIREMENTS_FORM'
1683
1692
  @description = 'Parametry zásilky nesplňují podmínky požadovaného formuláře'
1684
- @type = :chyba
1693
+ @type = :error
1685
1694
  end
1686
1695
 
1687
1696
  class NoContractServiceReturnReceipt < CzechPostB2bClient::ResponseCodes::BaseCode
1688
1697
  @code = 380
1689
1698
  @text = 'NO_CONTRACT_SERVICE_RETURN_RECEIPT'
1690
1699
  @description = 'K formuláři není sjednána smlouva ke službě Dodejka'
1691
- @type = :chyba
1700
+ @type = :error
1692
1701
  end
1693
1702
 
1694
1703
  class InfoCancelService1BAddService1A < CzechPostB2bClient::ResponseCodes::BaseCode
@@ -1709,14 +1718,14 @@ module CzechPostB2bClient
1709
1718
  @code = 383
1710
1719
  @text = 'INVALID_CUSTOMER_CARD_NUMBER'
1711
1720
  @description = 'Chybné číslo zákaznické karty'
1712
- @type = :chyba
1721
+ @type = :error
1713
1722
  end
1714
1723
 
1715
1724
  class BadFormatReturnNumberDays < CzechPostB2bClient::ResponseCodes::BaseCode
1716
1725
  @code = 384
1717
1726
  @text = 'BAD_FORMAT_RETURN_NUMBER_DAYS'
1718
1727
  @description = 'Neplatný formát počtu dní pro vrácení zásilky'
1719
- @type = :chyba
1728
+ @type = :error
1720
1729
  end
1721
1730
 
1722
1731
  class InfoAddService1B < CzechPostB2bClient::ResponseCodes::BaseCode
@@ -1761,7 +1770,7 @@ module CzechPostB2bClient
1761
1770
  @type = :info
1762
1771
  end
1763
1772
 
1764
- class InfoMissingPartCityServiceDeliveryOnSundayOrHolidayMayNotBeRealized < CzechPostB2bClient::ResponseCodes::BaseCode # rubocop:disable Layout/LineLength
1773
+ class InfoMissingPartCityServiceDeliveryOnSundayOrHolidayMayNotBeRealized < CzechPostB2bClient::ResponseCodes::BaseCode
1765
1774
  @code = 391
1766
1775
  @text = 'INFO_MISSING_PART_CITY_SERVICE_DELIVERY_ON_SUNDAY/HOLIDAY_MAY_NOT_BE_REALIZED'
1767
1776
  @description = 'Neuvedena část obce - služba Garantovaný čas dodání v Ne/Sv nemusí být realizována'
@@ -1842,28 +1851,28 @@ module CzechPostB2bClient
1842
1851
  @code = 402
1843
1852
  @text = 'INVALID_SUBISO_COUNTRY'
1844
1853
  @description = 'Neexistující nebo nesprávný členský stát'
1845
- @type = :chyba
1854
+ @type = :error
1846
1855
  end
1847
1856
 
1848
1857
  class NoContractService41 < CzechPostB2bClient::ResponseCodes::BaseCode
1849
1858
  @code = 403
1850
1859
  @text = 'NO_CONTRACT_SERVICE_41'
1851
1860
  @description = 'Pro tech. číslo a produkt nesjednána služba Bezdokladová dobírka'
1852
- @type = :chyba
1861
+ @type = :error
1853
1862
  end
1854
1863
 
1855
1864
  class InvalidServicesForDimensions < CzechPostB2bClient::ResponseCodes::BaseCode
1856
1865
  @code = 404
1857
1866
  @text = 'INVALID_PREFIX'
1858
1867
  @description = 'Nepovolená kombinace doplňkových služeb – rozměr zásilky'
1859
- @type = :chyba
1868
+ @type = :error
1860
1869
  end
1861
1870
 
1862
1871
  class InvalidPrefixForDimensionsAndFragile < CzechPostB2bClient::ResponseCodes::BaseCode
1863
1872
  @code = 405
1864
1873
  @text = 'INVALID_PREFIX'
1865
1874
  @description = 'Nepovolená kombinace doplňkových služeb – rozměr zásilky a sl.11 (Křehce)'
1866
- @type = :chyba
1875
+ @type = :error
1867
1876
  end
1868
1877
 
1869
1878
  class InfoAddService1D < CzechPostB2bClient::ResponseCodes::BaseCode
@@ -1887,17 +1896,122 @@ module CzechPostB2bClient
1887
1896
  @type = :info
1888
1897
  end
1889
1898
 
1899
+ class InvalidAddresseeZipCode < CzechPostB2bClient::ResponseCodes::BaseCode
1900
+ @code = 409
1901
+ @text = 'INVALID_ADDRESSE_ZIP_CODE'
1902
+ @description = 'Chybný formát PSČ adresáta'
1903
+ @type = :error
1904
+ end
1905
+
1906
+ class InvalidAddresseeCountry < CzechPostB2bClient::ResponseCodes::BaseCode
1907
+ @code = 410
1908
+ @text = 'INVALID_ADDRESSEE'
1909
+ @description = 'nesouhlasí země určení s VDD'
1910
+ @type = :error
1911
+ end
1912
+
1913
+ class IncorrectParcelCount < CzechPostB2bClient::ResponseCodes::BaseCode
1914
+ @code = 411
1915
+ @text = 'INCORECT_NUMBER_OF_RECEIVED_PARCELS'
1916
+ @description = 'Nepořízeny všechny zásilky k VDD'
1917
+ @type = :error
1918
+ end
1919
+
1920
+ class InfoHsCodeWasModified < CzechPostB2bClient::ResponseCodes::BaseCode
1921
+ @code = 412
1922
+ @text = 'INFO_HS_CODE_WAS_MODIFIED'
1923
+ @description = 'Upraven tarifní kód na max. počet 6-ti znaků'
1924
+ @type = :info
1925
+ end
1926
+
1927
+ class InvalidCategoryOfCustomDeclaration < CzechPostB2bClient::ResponseCodes::BaseCode
1928
+ @code = 413
1929
+ @text = 'INVALID_CATEGORY_CUSTOM_DECALARATION' # not my typo, it is from official API docs
1930
+ @description = 'Nepovolená kategorie zásilky – dárek – jde pouze o zboží/komodity zasílané mezi dvěma fyzickými osobami'
1931
+ @type = :error
1932
+ end
1933
+
1934
+ class MissingDocumentType < CzechPostB2bClient::ResponseCodes::BaseCode
1935
+ @code = 414
1936
+ @text = 'MISSING_DOCUMENT_TYPE'
1937
+ @description = 'Neuveden typ dokumentu'
1938
+ @type = :error
1939
+ end
1940
+
1941
+ class DuplicitDocumentType < CzechPostB2bClient::ResponseCodes::BaseCode
1942
+ @code = 415
1943
+ @text = 'DUPLICIT_DOCUMENT_TYPE'
1944
+ @description = 'Duplicitní typ dokumentu'
1945
+ @type = :error
1946
+ end
1947
+
1948
+ class MissingLocationName < CzechPostB2bClient::ResponseCodes::BaseCode
1949
+ @code = 416
1950
+ @text = 'MISSING_LOCATION_NAME'
1951
+ @description = 'Název podacího místa musí být vyplněn'
1952
+ @type = :error
1953
+ end
1954
+
1955
+ class InfoInvalidIcFormat < CzechPostB2bClient::ResponseCodes::BaseCode
1956
+ @code = 417
1957
+ @text = 'INFO_INVALID_IC_FORMAT'
1958
+ @description = 'Nesprávný formát IČ'
1959
+ @type = :info
1960
+ end
1961
+
1962
+ class InfoInvalidIcFormatOfAddresseeDocument < CzechPostB2bClient::ResponseCodes::BaseCode
1963
+ @code = 418
1964
+ @text = 'INFO_INVALID_IC_FORMAT_ADDRESSEE_DOCUMENT'
1965
+ @description = 'Nesprávný formát IČ adresáta dokumentů'
1966
+ @type = :info
1967
+ end
1968
+
1969
+ class InvalidHsCode < CzechPostB2bClient::ResponseCodes::BaseCode
1970
+ @code = 419
1971
+ @text = 'INVALID_HS_CODE'
1972
+ @description = 'Neplatný tarifní kód'
1973
+ @type = :error
1974
+ end
1975
+
1976
+ class InvalidCustomGoodsContent < CzechPostB2bClient::ResponseCodes::BaseCode
1977
+ @code = 420
1978
+ @text = 'INVALID_CONTENT_CUSTOM_GOOD'
1979
+ @description = 'Neplatný popis celního obsahu'
1980
+ @type = :error
1981
+ end
1982
+
1983
+ class InfoHsCodeWasModified < CzechPostB2bClient::ResponseCodes::BaseCode
1984
+ @code = 421
1985
+ @text = 'INFO_HS_CODE_WAS_MODIFIED'
1986
+ @description = 'Tarifní kód upraven dle popisu celního obsahu'
1987
+ @type = :info
1988
+ end
1989
+
1990
+ class InfoCustomGoodsContentWasModified < CzechPostB2bClient::ResponseCodes::BaseCode
1991
+ @code = 422
1992
+ @text = 'INFO_CONTENT_CUSTOM_GOOD_WAS_MODIFIED'
1993
+ @description = 'Popis celního obsahu upraven dle tarifního kódu'
1994
+ @type = :info
1995
+ end
1996
+
1997
+ class InfoNonexistingZipCodeWasReplacedByConstant < CzechPostB2bClient::ResponseCodes::BaseCode
1998
+ @code = 423
1999
+ @text = 'INFO_NON_EXISTENT_ZIP_CODE_REPLACED'
2000
+ @description = 'Neexistující PSČ nahrazeno konstantou'
2001
+ @type = :info
2002
+ end
2003
+
1890
2004
  # must be at end to collect all classes defined before
1891
2005
  def self.all_classes
1892
2006
  base_class = CzechPostB2bClient::ResponseCodes::BaseCode
1893
2007
  ObjectSpace.each_object(base_class.singleton_class).reject { |c| c == base_class }
1894
2008
  end
1895
2009
 
1896
- def self.new_by_code(code)
2010
+ def self.new_by_code(code, details = '')
1897
2011
  klass = all_classes.detect { |k| k.code == code }
1898
2012
  raise "ResponseCode with code: #{code} is unknown!" unless klass
1899
2013
 
1900
- klass.new
2014
+ klass.new(details)
1901
2015
  end
1902
2016
  end
1903
2017
  end