czech_post_b2b_client 1.2.1 → 1.2.6

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: 195b8ec3ce8eb8a50a8e930a2629917fb7a452d9
4
- data.tar.gz: b78e4f92cc14b98265ab6d595fa7c2011ec32208
2
+ SHA256:
3
+ metadata.gz: 74fa378ca71040acf1adb94fb61fa1d371ae2491273b3585bed2ef14ce6911e8
4
+ data.tar.gz: efda7da207ddf3146be8181c4765f8cca645020131f3cda81e211fb5ff9ea828
5
5
  SHA512:
6
- metadata.gz: 54ef2187484cf754ee7fd92f903e3252472da1d30af90927ee64af447bea861df97581342af4dfe9d7193a123bd1a4c2d4f35ea2253836eb74bd2b4c1d05092b
7
- data.tar.gz: b72195f63bb3153ae95473211f68756ea162599e4f617e7b77d5e93ca35b3eb5eb5bfc4fa83cdd496a4a4b7d2b8bece76eb8b255e3f77c4a4bbe16510e3dd510
6
+ metadata.gz: 9752291d61873388331118b6167d212e40aab3ce344d0306f664ba245ac5e6515296dba98a97788b0604a39355a4514ac3d409b548d14e63efe3786f920cb627
7
+ data.tar.gz: 257ceece993bb225b3ec020667af0fab9c26edd0b2eb16c35d41c470f70c7b8377443da68dc7c057e9d1d237e4bc74743cf70a585a5ad7c6fe10152c86990a63
@@ -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,29 @@
2
2
 
3
3
  All changes to the gem are documented here.
4
4
 
5
+ ## [1.2.6] - 2020-10-27
6
+
7
+ - fixed passing all errors from `parcelsServiceSync` response.
8
+
9
+ ## [1.2.5] - 2020-10-06
10
+
11
+ - `errorDescription` from `B2BError` response is now merged into error message.
12
+
13
+ ## [1.2.4] - 2020-10-06
14
+
15
+ - Added `configuration.log_messages_at_least_as` option, to be able debug client behaviour when app log level is higher (eg. production)
16
+
17
+ ## [1.2.3] - 2020-08-21
18
+
19
+ - Corrected order in XML `sequence` elements
20
+ - Added `schemaLocation` to root element and placed publicly accessible XSDs into Github repo
21
+
22
+ ## [1.2.2] - 2020-08-19
23
+
24
+ - Printing templates now include @page_dimensions
25
+ - Forced secure SSL ciphers for requests
26
+ - `examples/try_api_call.rb` refactored to be more versatile (download XSDs [:do not work], pritn_selected_combinations)
27
+
5
28
  ## [1.2.0] - 2020-06-07
6
29
 
7
30
  - **Breaking** Introducing new Printing templates, improved some template names and scopes
@@ -33,4 +56,3 @@ Production ready release
33
56
  ### Added
34
57
  - All the stuff
35
58
 
36
-
data/README.md CHANGED
@@ -1,3 +1,40 @@
1
+
2
+ # FRESH NEWS
3
+ After full usage in production (vyvolej.to, squared.one), we found that Czech POst have trouble with `parcelServiceSync` (maybe `sendParcels` too). When You try to register package with `:customs_documents`, you get `INVALID_BATCH` response with no error, but with `parcelCode`:
4
+ ```
5
+ <?xml version="1.0" encoding="UTF-8"?>
6
+ <v1:b2bSyncResponse xmlns:v1="https://b2b.postaonline.cz/schema/B2BCommon-v1" xmlns:v1_1="https://b2b.postaonline.cz/schema/POLServices-v1">
7
+ <v1:header>
8
+ <v1:b2bRequestHeader>
9
+ <v1:idExtTransaction>1</v1:idExtTransaction>
10
+ <v1:timeStamp>2020-08-22T07:32:20.496Z</v1:timeStamp>
11
+ <v1:idContract>356936003</v1:idContract>
12
+ </v1:b2bRequestHeader>
13
+ </v1:header>
14
+ <v1:serviceData><v1_1:parcelServiceSyncResponse>
15
+ <v1_1:responseHeader>
16
+ <v1_1:resultHeader>
17
+ <v1_1:responseCode>19</v1_1:responseCode>
18
+ <v1_1:responseText>BATCH_INVALID</v1_1:responseText>
19
+ </v1_1:resultHeader>
20
+ <v1_1:resultParcelData>
21
+ <v1_1:recordNumber>52427</v1_1:recordNumber>
22
+ <v1_1:parcelCode>RR950819194CZ</v1_1:parcelCode>
23
+ <v1_1:parcelDataResponse>
24
+ <v1_1:responseCode>1</v1_1:responseCode>
25
+ <v1_1:responseText>OK</v1_1:responseText>
26
+ </v1_1:parcelDataResponse>
27
+ </v1_1:resultParcelData>
28
+ </v1_1:responseHeader>
29
+ </v1_1:parcelServiceSyncResponse></v1:serviceData>
30
+ </v1:b2bSyncResponse>
31
+ ```
32
+
33
+ *Reality is, that Parcel IS NOT registered!*
34
+
35
+ They say, that this should be fixed in 2020-10-01 release. But I still can not grab new XSD.
36
+
37
+
1
38
  # CzechPostB2bClient
2
39
  Accessing B2B API of Czech Post for bulk processing of parcels ("B2B - WS PodáníOnline").
3
40
 
@@ -10,6 +47,7 @@ There are these supported operations of API:
10
47
  - *getParcelState* - returns all known states for listed parcels [HTTP GET - sync response]
11
48
  - *getParcelsPrinting* - returns PDF with address labels/stickers for listed parcels [HTTP GET - sync response]
12
49
 
50
+ ## Development of this gem is donated by [Squared s.r.o.](https://www.vyvolej.to)
13
51
 
14
52
  ## Installation
15
53
  ### 1) Registration at Czech Post (CP)
@@ -70,6 +108,7 @@ CzechPostB2bClient.configure do |config|
70
108
  # config.language => :cs # other languages are not supported now
71
109
  # config.logger => ::Rails.logger or ::Logger.new(STDOUT),
72
110
  # config.b2b_api_base_uri => 'https://b2b.postaonline.cz/services/POLService/v1'
111
+ # config.log_messages_at_least_as = :debug
73
112
  end
74
113
  ```
75
114
 
@@ -277,6 +316,8 @@ end
277
316
 
278
317
  ## Troubleshooting
279
318
 
319
+ You can validate request XML against XSD in [`documents/latest_xsds`](./documents/latest_xsds) (There are no public files from Czech Post :-( )
320
+
280
321
  1) Read all stuff in [`./documents`](./documents/) and [Yard docs](./doc/index.html), maybe it helps.
281
322
  2) If You get "handshake protocol failed" You do not have correct setup for certificates. If You get any xml response (see logger in debug mode) certificates are ok.
282
323
  You can always try `TimePeriodStatisticator` for that check, it do not need any "before" actions.
@@ -5,6 +5,7 @@ require 'stepped_service'
5
5
 
6
6
  require 'czech_post_b2b_client/version'
7
7
  require 'czech_post_b2b_client/configuration'
8
+ require 'czech_post_b2b_client/logger'
8
9
 
9
10
  require 'czech_post_b2b_client/b2b_errors'
10
11
  require 'czech_post_b2b_client/response_codes'
@@ -26,7 +27,7 @@ module CzechPostB2bClient
26
27
  end
27
28
 
28
29
  def self.logger
29
- self.configuration.logger
30
+ CzechPostB2bClient::Logger.new(self.configuration)
30
31
  end
31
32
 
32
33
  def self.root
@@ -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
@@ -16,25 +16,28 @@ module CzechPostB2bClient
16
16
  :logger,
17
17
  :b2b_api_base_uri,
18
18
  :print_options,
19
- :custom_card_number
19
+ :custom_card_number,
20
+ :log_messages_at_least_as
20
21
 
21
22
  def initialize
22
23
  # set defaults here
23
24
 
24
25
  # ours, accessible, but maybe out of date, for test usage
25
- @namespaces = {
26
- 'xmlns' => 'https://raw.githubusercontent.com/foton/czech_post_b2b_client/master/documents/B2B_CP_POL_2020-05-21/B2BCommon-v1.1.xsd',
27
- 'xmlns:ns2' => 'https://raw.githubusercontent.com/foton/czech_post_b2b_client/master/documents/B2B_CP_POL_2020-05-21/B2B-POLServices-v1.8.xsd'
28
- }
29
- # original, accessible only with setup certificates
30
26
  @namespaces = {
31
27
  'xmlns' => 'https://b2b.postaonline.cz/schema/B2BCommon-v1',
32
- 'xmlns:ns2' => 'https://b2b.postaonline.cz/schema/POLServices-v1'
28
+ 'xmlns:ns2' => 'https://b2b.postaonline.cz/schema/POLServices-v1',
29
+ 'xmlns:xsi' => 'http://www.w3.org/2001/XMLSchema-instance',
30
+ 'xsi:noNamespaceSchemaLocation' => 'https://raw.githubusercontent.com/foton/czech_post_b2b_client/master/documents/latest_xsds/B2BCommon.xsd',
31
+ 'xsi:schemaLocation' => 'https://b2b.postaonline.cz/schema/POLServices-v1 https://raw.githubusercontent.com/foton/czech_post_b2b_client/master/documents/latest_xsds/B2BPOLServices.xsd'
33
32
  }
33
+
34
34
  @language = :cs
35
35
  @logger = defined?(Rails) ? ::Rails.logger : ::Logger.new(STDOUT)
36
36
  @b2b_api_base_uri = 'https://b2b.postaonline.cz/services/POLService/v1'
37
37
  @sending_post_office_location_number = 1
38
+
39
+ # set this to :error in production for API debug logs in production.log
40
+ @log_messages_at_least_as = :debug # so all logs keeps their level
38
41
  end
39
42
  end
40
43
  end
@@ -0,0 +1,30 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'logger'
4
+
5
+ module CzechPostB2bClient
6
+ class Logger
7
+ attr_reader :target_logger, :min_log_level
8
+
9
+ LEVELS = { debug: 0, info: 1, error: 2 }.freeze
10
+
11
+ def initialize(configuration)
12
+ @target_logger = configuration.logger
13
+ @min_log_level = configuration.log_messages_at_least_as
14
+ end
15
+
16
+ def log(original_level, message)
17
+ target_logger.send(modified_log_level(original_level), message)
18
+ end
19
+
20
+ LEVELS.each_key do |level|
21
+ define_method(level) { |message| log(level, message) }
22
+ end
23
+
24
+ private
25
+
26
+ def modified_log_level(original_level)
27
+ LEVELS[original_level] > LEVELS[min_log_level] ? original_level : min_log_level
28
+ end
29
+ end
30
+ end
@@ -768,7 +768,8 @@ module CzechPostB2bClient
768
768
 
769
769
  # has to be at the end, to load all subcasses before
770
770
  def self.all_classes
771
- ObjectSpace.each_object(CzechPostB2bClient::PostServices::Base.singleton_class)
771
+ base_class = CzechPostB2bClient::PostServices::Base
772
+ ObjectSpace.each_object(base_class.singleton_class).reject { |c| c == base_class }
772
773
  end
773
774
  end
774
775
  end
@@ -10,70 +10,82 @@ module CzechPostB2bClient
10
10
  module PrintingTemplates
11
11
  class Base
12
12
  class << self
13
- attr_reader :id, :description
13
+ attr_reader :id, :description, :page_dimensions
14
14
  end
15
15
  end
16
16
 
17
17
  module AddressLabel
18
18
  class Simple < Base
19
19
  @id = 7
20
- @description = 'adresní štítek (alonž) - samostatný'
20
+ @description = 'adresní štítek (alonž) [1x1/4 A4'
21
+ @page_dimensions = 'A4 portrait (210 × 297 mm)'
21
22
  end
22
23
 
23
24
  class SimpleA6FourOnPage < Base
24
25
  @id = 103
25
- @description = 'Adresní štítek A6 4x'
26
+ @description = 'Adresní štítek A6 : 4x'
27
+ @page_dimensions = 'A4 portrait (210 × 297 mm)'
26
28
  end
27
29
 
28
30
  class SimpleWithCODVoucherA < Base
29
31
  @id = 8
30
- @description = 'adresní štítek (alonž) + dobírková poukázka A'
32
+ @description = 'adresní štítek (alonž) + dobírková poukázka A [(1x1/4 A4 + 1x1/2 A4)'
33
+ @page_dimensions = 'A4 portrait (210 × 297 mm)'
31
34
  end
32
35
 
33
36
  class BiancoFourOnPage < Base
34
37
  @id = 20
35
- @description = 'adresní štítek bianco - 4x (A4)'
38
+ @description = 'adresní štítek bianco : 4x'
39
+ @page_dimensions = 'A4 landscape (297 × 210 mm)'
36
40
  end
37
41
 
38
42
  class Bianco < Base
39
43
  @id = 21
40
- @description = 'adresní štítek bianco - samostatný'
44
+ @description = 'adresní štítek bianco'
45
+ @page_dimensions = 'A6 portrait (105 × 148 mm)'
41
46
  end
42
47
 
43
48
  class BiancoLandscape < Base
44
49
  @id = 39
45
- @description = 'adresní štítek bianco - samostatný (na šířku)'
50
+ @description = 'adresní štítek bianco - na šířku'
51
+ @page_dimensions = 'A6 landscape (148 × 105 mm)'
46
52
  end
47
53
 
48
54
  module ForeignPackage
49
55
  class Standard < Base
50
56
  @id = 58
51
57
  @description = 'CP72 - standardní balík do zahraničí' # or 'AŠ - samostatný Standardní balík do zahraničí'
58
+ @page_dimensions = 'A5 landscape (210 × 148 mm)'
52
59
  end
53
60
 
54
61
  class StandardTwoOnPage < Base
55
62
  @id = 59
56
- @description = 'CP72 - standardní balík do zahraničí (2x A4 )' # or 'AŠ - 4xA4 Standardní balík do zahraničí'
63
+ @description = 'CP72 - standardní balík do zahraničí : 2x' # or 'AŠ - 4xA4 Standardní balík do zahraničí'
64
+ @page_dimensions = 'A4 portrait (297 × 210 mm)'
57
65
  end
58
66
 
59
67
  class Insured < Base
60
68
  @id = 60
61
69
  @description = 'CP72 - cenný balík do zahraničí' # or 'AŠ - samostatný Cenný balík do zahraničí'
70
+ @page_dimensions = 'A5 landscape (210 × 148 mm)'
62
71
  end
63
72
 
64
73
  class InsuredFourOnPage < Base
65
74
  @id = 61
66
- @description = 'CP72 - cenný balík do zahraničí (2x A4)' # or '4xA4 Cenný balík do zahraničí'
75
+ @description = 'CP72 - cenný balík do zahraničí : 2x' # or '4xA4 Cenný balík do zahraničí'
76
+ @page_dimensions = 'A4 portrait (297 × 210 mm)'
67
77
  end
68
78
 
69
79
  class EMS < Base
70
80
  @id = 62
71
81
  @description = 'AŠ - samostatný EMS zahraničí'
82
+ @page_dimensions = 'unverified'
72
83
  end
73
84
 
74
85
  class EMSTwoOnPage < Base
75
86
  @id = 63
76
- @description = 'AŠ - 2xA4 EMS do zahraničí'
87
+ @description = 'AŠ - EMS do zahraničí : 2x'
88
+ @page_dimensions = 'unverified A4'
77
89
  end
78
90
  end
79
91
  end
@@ -82,94 +94,112 @@ module CzechPostB2bClient
82
94
  class EnvelopeC6 < Base
83
95
  @id = 22
84
96
  @description = 'obálka 1 - C6'
97
+ @page_dimensions = 'C6 portrait (114 × 162 mm)'
85
98
  end
86
99
 
87
100
  class EnvelopeC5 < Base
88
101
  @id = 23
89
102
  @description = 'obálka 2 - C5'
103
+ @page_dimensions = 'C5/prc7 portrait (162 × 229 mm)'
90
104
  end
91
105
 
92
106
  class EnvelopeB4 < Base
93
107
  @id = 24
94
108
  @description = 'obálka 3 - B4'
109
+ @page_dimensions = 'B4 portrait (250 × 353 mm)'
95
110
  end
96
111
 
97
112
  class EnvelopeDL < Base
98
113
  @id = 25
99
114
  @description = 'obálka 4 - DL bez okénka'
115
+ @page_dimensions = 'DL/prc5 portrait (109 × 219 mm)'
100
116
  end
101
117
  end
102
118
 
103
119
  class CODVoucherA < Base
104
120
  @id = 10
105
121
  @description = 'poštovní dobírková poukázka A - samostatná'
122
+ @page_dimensions = '102 × 210 mm'
106
123
  end
107
124
 
108
125
  class CODVoucherAThreeOnPage < Base
109
126
  @id = 11
110
- @description = 'poštovní dobírková poukázka A - 3x (A4)'
127
+ @description = 'poštovní dobírková poukázka A - 3x'
128
+ @page_dimensions = '210 × 306 mm'
111
129
  end
112
130
 
113
131
  class CODVoucherC < Base
114
132
  @id = 12
115
133
  @description = 'Poštovní dobírková poukázka C'
134
+ @page_dimensions = 'unverified'
116
135
  end
117
136
 
118
137
  class CODVoucherForCSOB < Base
119
138
  @id = 13
120
139
  @description = 'Dobírková složenka ČSOB'
140
+ @page_dimensions = 'unverified'
121
141
  end
122
142
 
123
143
  class RRLabels3x8 < Base
124
144
  @id = 26
125
- @description = 'štítky pro RR - 3x8 (A4)'
145
+ @description = 'štítky pro RR : 3x8'
146
+ @page_dimensions = 'A4 portrait (210 × 297 mm)'
126
147
  end
127
148
 
128
149
  class IntegratedDocument < Base
129
150
  @id = 38
130
151
  @description = 'Integrovaný doklad'
152
+ @page_dimensions = 'unverified'
131
153
  end
132
154
 
133
155
  class AddressData3x8 < Base
134
156
  @id = 40
135
- @description = 'Adresní údaje 3x8 (A4)'
157
+ @description = 'Adresní údaje : 3x8'
158
+ @page_dimensions = 'A4 portrait (210 × 297 mm)'
136
159
  end
137
160
 
138
161
  class DeliveryTicket < Base
139
162
  @id = 41
140
163
  @description = 'Dodejka'
164
+ @page_dimensions = 'unverified'
141
165
  end
142
166
 
143
167
  module CustomsDeclaration
144
168
  class CN22 < Base
145
169
  @id = 56
146
- @description = 'Celní prohlášení CN22 - 1x (A4)'
170
+ @description = 'Celní prohlášení CN22 [samotný tisk je velikosti cca A6 vlevo nahořu od středu]'
171
+ @page_dimensions = 'A4 portrait (210 × 297 mm)'
147
172
  end
148
173
 
149
174
  class CN23 < Base
150
175
  @id = 57
151
- @description = 'Celní prohlášení CN23 - 1x (A4)'
176
+ @description = 'Celní prohlášení CN23'
177
+ @page_dimensions = 'A5 landscape (210 × 148 mm)'
152
178
  end
153
179
 
154
180
  class CN22FourOnPage < Base
155
181
  @id = 74
156
- @description = 'Celní prohlášení CN22 - 4x (A4)'
182
+ @description = 'Celní prohlášení CN22 : 4x (A4)'
183
+ @page_dimensions = 'unverified A4'
157
184
  end
158
185
 
159
186
  class CN22WithCK < Base
160
187
  @id = 75
161
- @description = 'Celní prohlášení CN22 s ČK - 1x (A4)'
188
+ @description = 'Celní prohlášení CN22 s ČK (A4)'
189
+ @page_dimensions = 'unverified A4'
162
190
  end
163
191
 
164
192
  class CN22WithCKFourOnPage < Base
165
193
  @id = 76
166
- @description = 'Celní prohlášení CN22 s ČK - 4x (A4)'
194
+ @description = 'Celní prohlášení CN22 s ČK : 4x (A4)'
195
+ @page_dimensions = 'unverified A4'
167
196
  end
168
197
  end
169
198
 
170
199
  class CN22FourOnPage < Base
171
200
  @id = 74
172
- @description = 'Celní prohlášení CN22 - 4x (A4)'
201
+ @description = 'Celní prohlášení CN22 : 4x'
202
+ @page_dimensions = 'A4 portrait (210 × 297 mm)'
173
203
  end
174
204
 
175
205
  module HarmonizedLabel
@@ -177,48 +207,57 @@ module CzechPostB2bClient
177
207
  # do zemi AT, DE, FR, GR, HR, CH, IS, LU, LV, NO, PL, SK
178
208
  class Simple < Base
179
209
  @id = 72
180
- @description = 'Obchodní balík do zahraničí – samostatný' # or 'Harmonizovaný štítek pro MZ produkty-samostatný'
210
+ @description = 'Obchodní balík do zahraničí' # or 'Harmonizovaný štítek pro MZ produkty-samostatný'
211
+ @page_dimensions = 'unverified'
181
212
  end
182
213
 
183
214
  class SimpleFourOnPage < Base
184
215
  @id = 73
185
- @description = 'Obchodní balík do zahraničí 4x (A4)' # or 'Harmonizovaný štítek pro MZ produkty – 4x (A4)'
216
+ @description = 'Obchodní balík do zahraničí : 4x (A4)' # or 'Harmonizovaný štítek pro MZ produkty – 4x (A4)'
217
+ @page_dimensions = 'unverified A4'
186
218
  end
187
219
 
188
220
  class BiancoFourOnPage < Base
189
221
  @id = 100
190
- @description = 'Harmonizovaný štítek bianco 4x (A4)'
222
+ @description = 'Harmonizovaný štítek bianco : 4x'
223
+ @page_dimensions = 'A4 portrait (210 × 297 mm)'
191
224
  end
192
225
 
193
226
  class Bianco < Base
194
227
  @id = 101
195
- @description = 'Harmonizovaný štítek bianco – samostatný'
228
+ @description = 'Harmonizovaný štítek bianco'
229
+ @page_dimensions = 'A6 portrait (105 × 148 mm)'
196
230
  end
197
231
 
198
232
  class BiancoPortrait < Base
199
233
  @id = 102
200
- @description = 'Harmonizovaný štítek bianco samostatný (na výšku)'
234
+ @description = 'Harmonizovaný štítek bianco - na výšku'
235
+ @page_dimensions = 'A6 landscape (148 × 105 mm)'
201
236
  end
202
237
 
203
238
  class ZebraBianco105x148 < Base
204
239
  @id = 200
205
- @description = 'Harmonizovaný štítek bianco - (Zebra - 105x148)'
240
+ @description = 'Harmonizovaný štítek bianco - (Zebra - 105x148); nejde o PDF'
241
+ @page_dimensions = 'unverified 105 × 148 mm'
206
242
  end
207
243
 
208
244
  class ZebraBianco100x150 < Base
209
245
  @id = 201
210
- @description = 'Harmonizovaný štítek bianco - (Zebra - 100x150)'
246
+ @description = 'Harmonizovaný štítek bianco - (Zebra - 100x150); nejde o PDF'
247
+ @page_dimensions = 'unverified 100 × 150 mm'
211
248
  end
212
249
 
213
250
  class ZebraBianco100x125 < Base
214
251
  @id = 202
215
- @description = 'Harmonizovaný štítek bianco - (Zebra - 100x125)'
252
+ @description = 'Harmonizovaný štítek bianco - (Zebra - 100x125); nejde o PDF'
253
+ @page_dimensions = 'unverified 100 × 125 mm'
216
254
  end
217
255
  end
218
256
 
219
257
  # has to be at the end, to load all subcasses before
220
258
  def self.all_classes
221
- ObjectSpace.each_object(CzechPostB2bClient::PrintingTemplates::Base.singleton_class)
259
+ base_class = CzechPostB2bClient::PrintingTemplates::Base
260
+ ObjectSpace.each_object(base_class.singleton_class).reject { |c| c == base_class }
222
261
  end
223
262
  end
224
263
  end