czech_post_b2b_client 1.0.2 → 1.2.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (478) hide show
  1. checksums.yaml +4 -4
  2. data/.rubocop.yml +3 -1
  3. data/CHANGELOG.md +27 -2
  4. data/README.md +227 -199
  5. data/doc/CzechPostB2bClient.html +31 -35
  6. data/doc/CzechPostB2bClient/B2BErrors.html +26 -13
  7. data/doc/CzechPostB2bClient/B2BErrors/BadRequestError.html +7 -7
  8. data/doc/CzechPostB2bClient/B2BErrors/BaseError.html +75 -40
  9. data/doc/CzechPostB2bClient/B2BErrors/CustomerRequestsCountOverflowError.html +7 -7
  10. data/doc/CzechPostB2bClient/B2BErrors/InternalB2BServerError.html +7 -7
  11. data/doc/CzechPostB2bClient/B2BErrors/InternalBackendServerError.html +7 -7
  12. data/doc/CzechPostB2bClient/B2BErrors/InternalDataPersistenceServerError.html +7 -7
  13. data/doc/CzechPostB2bClient/B2BErrors/ProcessingUnfinishedYetError.html +7 -7
  14. data/doc/CzechPostB2bClient/B2BErrors/ServiceBusyError.html +7 -7
  15. data/doc/CzechPostB2bClient/B2BErrors/UnauthorizedContractAccessError.html +7 -7
  16. data/doc/CzechPostB2bClient/B2BErrors/UnauthorizedRoleAccessError.html +7 -7
  17. data/doc/CzechPostB2bClient/Configuration.html +33 -25
  18. data/doc/CzechPostB2bClient/Error.html +6 -6
  19. data/doc/CzechPostB2bClient/PostServices.html +197 -0
  20. data/doc/CzechPostB2bClient/PostServices/AddreseeVerification.html +129 -0
  21. data/doc/CzechPostB2bClient/PostServices/AddresseeAlertOfArrivalByEmail.html +129 -0
  22. data/doc/CzechPostB2bClient/PostServices/AddresseeAlertOfArrivalBySms.html +140 -0
  23. data/doc/CzechPostB2bClient/PostServices/AddresseeAlertOfArrivalBySmsAndEmail.html +129 -0
  24. data/doc/CzechPostB2bClient/PostServices/AddresseeVerificationOnDelivery.html +129 -0
  25. data/doc/CzechPostB2bClient/PostServices/AfternoonDelivery.html +129 -0
  26. data/doc/CzechPostB2bClient/PostServices/Base.html +351 -0
  27. data/doc/CzechPostB2bClient/PostServices/CashOnDeliveryByPKA.html +129 -0
  28. data/doc/CzechPostB2bClient/PostServices/CashOnDeliveryByPKC.html +129 -0
  29. data/doc/CzechPostB2bClient/PostServices/CashOnDeliveryInternational.html +129 -0
  30. data/doc/CzechPostB2bClient/PostServices/CertificateOfDelivery.html +148 -0
  31. data/doc/CzechPostB2bClient/PostServices/CertificateOfDeliveryWithDeliverToAdresseeOnly.html +140 -0
  32. data/doc/CzechPostB2bClient/PostServices/CertificateOfDeliveryWithDeliverToAdresseePersonOnly.html +129 -0
  33. data/doc/CzechPostB2bClient/PostServices/CompanyRegisteredMail.html +141 -0
  34. data/doc/CzechPostB2bClient/PostServices/CompleteDelivery.html +129 -0
  35. data/doc/CzechPostB2bClient/PostServices/Consignment.html +129 -0
  36. data/doc/CzechPostB2bClient/PostServices/CumbersomeParcel.html +129 -0
  37. data/doc/CzechPostB2bClient/PostServices/DeliverToAdresseeOnly.html +129 -0
  38. data/doc/CzechPostB2bClient/PostServices/DeliverToAdresseePersonOnly.html +129 -0
  39. data/doc/CzechPostB2bClient/PostServices/DeliverToCompany.html +147 -0
  40. data/doc/CzechPostB2bClient/PostServices/DepositFor10Days.html +129 -0
  41. data/doc/CzechPostB2bClient/PostServices/DepositFor10WorkingDays.html +129 -0
  42. data/doc/CzechPostB2bClient/PostServices/DepositFor3Days.html +129 -0
  43. data/doc/CzechPostB2bClient/PostServices/DepositFor7Days.html +129 -0
  44. data/doc/CzechPostB2bClient/PostServices/DepositFor90Days.html +129 -0
  45. data/doc/CzechPostB2bClient/PostServices/DepositIfAdresseeIsUnreachable.html +141 -0
  46. data/doc/CzechPostB2bClient/PostServices/DiscountForCollectiveShippment.html +129 -0
  47. data/doc/CzechPostB2bClient/PostServices/DiscountForOnlinePosting.html +129 -0
  48. data/doc/CzechPostB2bClient/PostServices/DoNotDeposit.html +129 -0
  49. data/doc/CzechPostB2bClient/PostServices/DoNotExtendCollectionTime.html +148 -0
  50. data/doc/CzechPostB2bClient/PostServices/DoNotPutIntoMailbox.html +129 -0
  51. data/doc/CzechPostB2bClient/PostServices/DoNotResend.html +129 -0
  52. data/doc/CzechPostB2bClient/PostServices/DoNotReturnLeaveItInMailbox.html +129 -0
  53. data/doc/CzechPostB2bClient/PostServices/DoNotReturnToSender.html +129 -0
  54. data/doc/CzechPostB2bClient/PostServices/Document.html +129 -0
  55. data/doc/CzechPostB2bClient/PostServices/DocumentlessCashOnDelivery.html +147 -0
  56. data/doc/CzechPostB2bClient/PostServices/DocumentsSignedAtDelivery.html +129 -0
  57. data/doc/CzechPostB2bClient/PostServices/EAlertOfDeliveryEmail.html +129 -0
  58. data/doc/CzechPostB2bClient/PostServices/EAlertOfDeliverySms.html +140 -0
  59. data/doc/CzechPostB2bClient/PostServices/EAlertOfDeliverySmsAndEmail.html +129 -0
  60. data/doc/CzechPostB2bClient/PostServices/EconomyDelivery.html +140 -0
  61. data/doc/CzechPostB2bClient/PostServices/ExtendedCollectionTime.html +129 -0
  62. data/doc/CzechPostB2bClient/PostServices/ForenoonDelivery.html +129 -0
  63. data/doc/CzechPostB2bClient/PostServices/Fragile.html +129 -0
  64. data/doc/CzechPostB2bClient/PostServices/GiftOrNonCommercialGoods.html +148 -0
  65. data/doc/CzechPostB2bClient/PostServices/GoodsWithExportDocumentsProcessed.html +148 -0
  66. data/doc/CzechPostB2bClient/PostServices/GuaranteedDeliveryTimeAtSaturday.html +129 -0
  67. data/doc/CzechPostB2bClient/PostServices/GuaranteedDeliveryTimeAtWeekend.html +129 -0
  68. data/doc/CzechPostB2bClient/PostServices/GuaranteedDeliveryTimeTo2PM.html +129 -0
  69. data/doc/CzechPostB2bClient/PostServices/HeavyParcelDeliveryToHand.html +129 -0
  70. data/doc/CzechPostB2bClient/PostServices/InformSenderAboutDelivery.html +129 -0
  71. data/doc/CzechPostB2bClient/PostServices/InternationalMail.html +129 -0
  72. data/doc/CzechPostB2bClient/PostServices/InternationalMailForBlinds.html +129 -0
  73. data/doc/CzechPostB2bClient/PostServices/InternationalPrintedMatterBag.html +129 -0
  74. data/doc/CzechPostB2bClient/PostServices/InternationalRegisteredMail.html +129 -0
  75. data/doc/CzechPostB2bClient/PostServices/InternationalRegisteredMailForBlinds.html +129 -0
  76. data/doc/CzechPostB2bClient/PostServices/InternationalRegisteredPrintedMatterBag.html +129 -0
  77. data/doc/CzechPostB2bClient/PostServices/ListedPrice.html +129 -0
  78. data/doc/CzechPostB2bClient/PostServices/Missed.html +129 -0
  79. data/doc/CzechPostB2bClient/PostServices/Missive.html +129 -0
  80. data/doc/CzechPostB2bClient/PostServices/MissiveStandard.html +129 -0
  81. data/doc/CzechPostB2bClient/PostServices/MultiParcelShippment.html +129 -0
  82. data/doc/CzechPostB2bClient/PostServices/MultiParcelShippmentBig.html +129 -0
  83. data/doc/CzechPostB2bClient/PostServices/NonStandardPackage.html +148 -0
  84. data/doc/CzechPostB2bClient/PostServices/OldApplianceRemoval.html +129 -0
  85. data/doc/CzechPostB2bClient/PostServices/OnPalette.html +140 -0
  86. data/doc/CzechPostB2bClient/PostServices/ParcelSizeL.html +129 -0
  87. data/doc/CzechPostB2bClient/PostServices/ParcelSizeM.html +129 -0
  88. data/doc/CzechPostB2bClient/PostServices/ParcelSizeS.html +129 -0
  89. data/doc/CzechPostB2bClient/PostServices/ParcelSizeXL.html +129 -0
  90. data/doc/CzechPostB2bClient/PostServices/PickupByThirdPerson.html +129 -0
  91. data/doc/CzechPostB2bClient/PostServices/PosteRestante.html +129 -0
  92. data/doc/CzechPostB2bClient/PostServices/PreprocessedBySorting.html +148 -0
  93. data/doc/CzechPostB2bClient/PostServices/PrioritaireByAir.html +129 -0
  94. data/doc/CzechPostB2bClient/PostServices/RegisteredMail.html +129 -0
  95. data/doc/CzechPostB2bClient/PostServices/RegisteredMailForBlinds.html +129 -0
  96. data/doc/CzechPostB2bClient/PostServices/RegisteredMailStandard.html +129 -0
  97. data/doc/CzechPostB2bClient/PostServices/ResendToOtherAddress.html +129 -0
  98. data/doc/CzechPostB2bClient/PostServices/ResponseEnvelope.html +129 -0
  99. data/doc/CzechPostB2bClient/PostServices/ResponseShipment.html +129 -0
  100. data/doc/CzechPostB2bClient/PostServices/ReturnByAir.html +129 -0
  101. data/doc/CzechPostB2bClient/PostServices/ReturnEconomically.html +129 -0
  102. data/doc/CzechPostB2bClient/PostServices/ReturnOfGoods.html +129 -0
  103. data/doc/CzechPostB2bClient/PostServices/ReturnToSenderAfterXDays.html +148 -0
  104. data/doc/CzechPostB2bClient/PostServices/ReturnToSenderImmediately.html +129 -0
  105. data/doc/CzechPostB2bClient/PostServices/SaveKey.html +148 -0
  106. data/doc/CzechPostB2bClient/PostServices/SubmissionByPostbox.html +129 -0
  107. data/doc/CzechPostB2bClient/PostServices/SubmissionReceiptCopy.html +129 -0
  108. data/doc/CzechPostB2bClient/PostServices/ThisSideUp.html +148 -0
  109. data/doc/CzechPostB2bClient/PostServices/ValuableContent.html +129 -0
  110. data/doc/CzechPostB2bClient/PrintingTemplates.html +16 -16
  111. data/doc/CzechPostB2bClient/PrintingTemplates/AddressData3x8.html +6 -6
  112. data/doc/CzechPostB2bClient/PrintingTemplates/AdressLabel.html +6 -6
  113. data/doc/CzechPostB2bClient/PrintingTemplates/AdressLabel/Blank.html +6 -6
  114. data/doc/CzechPostB2bClient/PrintingTemplates/AdressLabel/Blank4OnPage.html +6 -6
  115. data/doc/CzechPostB2bClient/PrintingTemplates/AdressLabel/BlankLandscape.html +6 -6
  116. data/doc/CzechPostB2bClient/PrintingTemplates/AdressLabel/ForeignPackage.html +7 -7
  117. data/doc/CzechPostB2bClient/PrintingTemplates/AdressLabel/ForeignPackage/EMS.html +6 -6
  118. data/doc/CzechPostB2bClient/PrintingTemplates/AdressLabel/ForeignPackage/EMS2x4.html +6 -6
  119. data/doc/CzechPostB2bClient/PrintingTemplates/AdressLabel/ForeignPackage/HarmonizedLabel.html +141 -0
  120. data/doc/CzechPostB2bClient/PrintingTemplates/AdressLabel/ForeignPackage/HarmonizedLabel4OnPage.html +129 -0
  121. data/doc/CzechPostB2bClient/PrintingTemplates/AdressLabel/ForeignPackage/Standard.html +6 -6
  122. data/doc/CzechPostB2bClient/PrintingTemplates/AdressLabel/ForeignPackage/Standard2OnPage.html +129 -0
  123. data/doc/CzechPostB2bClient/PrintingTemplates/AdressLabel/ForeignPackage/Valuable.html +6 -6
  124. data/doc/CzechPostB2bClient/PrintingTemplates/AdressLabel/ForeignPackage/Valuable4OnPage.html +6 -6
  125. data/doc/CzechPostB2bClient/PrintingTemplates/AdressLabel/Simple.html +6 -6
  126. data/doc/CzechPostB2bClient/PrintingTemplates/AdressLabel/SimpleWithCODVoucherA.html +6 -6
  127. data/doc/CzechPostB2bClient/PrintingTemplates/Base.html +16 -16
  128. data/doc/CzechPostB2bClient/PrintingTemplates/CODVoucherA.html +6 -6
  129. data/doc/CzechPostB2bClient/PrintingTemplates/CODVoucherA3OnPage.html +6 -6
  130. data/doc/CzechPostB2bClient/PrintingTemplates/CODVoucherC.html +6 -6
  131. data/doc/CzechPostB2bClient/PrintingTemplates/CODVoucherForCSOB.html +6 -6
  132. data/doc/CzechPostB2bClient/PrintingTemplates/CustomDeclaration.html +115 -0
  133. data/doc/CzechPostB2bClient/PrintingTemplates/CustomDeclaration/CN22.html +129 -0
  134. data/doc/CzechPostB2bClient/PrintingTemplates/CustomDeclaration/CN224OnPage.html +129 -0
  135. data/doc/CzechPostB2bClient/PrintingTemplates/CustomDeclaration/CN22WithCK.html +129 -0
  136. data/doc/CzechPostB2bClient/PrintingTemplates/CustomDeclaration/CN22WithCK4OnPage.html +129 -0
  137. data/doc/CzechPostB2bClient/PrintingTemplates/CustomDeclaration/CN23.html +129 -0
  138. data/doc/CzechPostB2bClient/PrintingTemplates/DeliveryTicket.html +6 -6
  139. data/doc/CzechPostB2bClient/PrintingTemplates/Envelope.html +6 -6
  140. data/doc/CzechPostB2bClient/PrintingTemplates/Envelope/EnvelopeB4.html +6 -6
  141. data/doc/CzechPostB2bClient/PrintingTemplates/Envelope/EnvelopeC5.html +6 -6
  142. data/doc/CzechPostB2bClient/PrintingTemplates/Envelope/EnvelopeC6.html +6 -6
  143. data/doc/CzechPostB2bClient/PrintingTemplates/Envelope/EnvelopeDL.html +6 -6
  144. data/doc/CzechPostB2bClient/PrintingTemplates/IntegratedDocument.html +6 -6
  145. data/doc/CzechPostB2bClient/PrintingTemplates/RRLabels3x8.html +6 -6
  146. data/doc/CzechPostB2bClient/RequestBuilders.html +8 -8
  147. data/doc/CzechPostB2bClient/RequestBuilders/BaseBuilder.html +9 -9
  148. data/doc/CzechPostB2bClient/RequestBuilders/GetParcelStateBuilder.html +8 -8
  149. data/doc/CzechPostB2bClient/RequestBuilders/GetParcelsPrintingBuilder.html +26 -26
  150. data/doc/CzechPostB2bClient/RequestBuilders/GetResultParcelsBuilder.html +8 -8
  151. data/doc/CzechPostB2bClient/RequestBuilders/GetStatsBuilder.html +9 -9
  152. data/doc/CzechPostB2bClient/RequestBuilders/ParcelServiceSyncBuilder.html +414 -0
  153. data/doc/CzechPostB2bClient/RequestBuilders/SendParcelsBuilder.html +32 -21
  154. data/doc/CzechPostB2bClient/ResponseCodes.html +51 -27
  155. data/doc/CzechPostB2bClient/ResponseCodes/AddressAllowedForBalikovnaOnly.html +7 -7
  156. data/doc/CzechPostB2bClient/ResponseCodes/AddressIsNotValidForSubject.html +7 -7
  157. data/doc/CzechPostB2bClient/ResponseCodes/AddressNeedsPhoneNumber.html +7 -7
  158. data/doc/CzechPostB2bClient/ResponseCodes/AddressSuitableForLocalDelivery.html +7 -7
  159. data/doc/CzechPostB2bClient/ResponseCodes/AddressValidOnlyForNaPostu.html +7 -7
  160. data/doc/CzechPostB2bClient/ResponseCodes/AddressValidOnlyForNaPostuDuplicate.html +7 -7
  161. data/doc/CzechPostB2bClient/ResponseCodes/AddresseeCityRequired.html +7 -7
  162. data/doc/CzechPostB2bClient/ResponseCodes/AlreadyAssignedOrderNumber.html +7 -7
  163. data/doc/CzechPostB2bClient/ResponseCodes/BadAddressee.html +7 -7
  164. data/doc/CzechPostB2bClient/ResponseCodes/BadCODAmount.html +7 -7
  165. data/doc/CzechPostB2bClient/ResponseCodes/BadFormatReturnNumberDays.html +7 -7
  166. data/doc/CzechPostB2bClient/ResponseCodes/BadHeight.html +7 -7
  167. data/doc/CzechPostB2bClient/ResponseCodes/BadLength.html +7 -7
  168. data/doc/CzechPostB2bClient/ResponseCodes/BadPrefix.html +7 -7
  169. data/doc/CzechPostB2bClient/ResponseCodes/BadPrefixForAddress.html +7 -7
  170. data/doc/CzechPostB2bClient/ResponseCodes/BadPrice.html +7 -7
  171. data/doc/CzechPostB2bClient/ResponseCodes/BadVariableSymbol.html +7 -7
  172. data/doc/CzechPostB2bClient/ResponseCodes/BadWeight.html +7 -7
  173. data/doc/CzechPostB2bClient/ResponseCodes/BadWidth.html +7 -7
  174. data/doc/CzechPostB2bClient/ResponseCodes/BaseCode.html +211 -121
  175. data/doc/CzechPostB2bClient/ResponseCodes/BatchClosed.html +7 -7
  176. data/doc/CzechPostB2bClient/ResponseCodes/BatchInvalid.html +7 -7
  177. data/doc/CzechPostB2bClient/ResponseCodes/BatchUnfinished.html +7 -7
  178. data/doc/CzechPostB2bClient/ResponseCodes/CODAmountOutOfRange.html +7 -7
  179. data/doc/CzechPostB2bClient/ResponseCodes/CODAmountTooBig.html +7 -7
  180. data/doc/CzechPostB2bClient/ResponseCodes/CanceledOrderNumber.html +7 -7
  181. data/doc/CzechPostB2bClient/ResponseCodes/CustomGoodQuantityOutOfRange.html +7 -7
  182. data/doc/CzechPostB2bClient/ResponseCodes/CustomerIDNotInAccordanceWithParcelCode.html +7 -7
  183. data/doc/CzechPostB2bClient/ResponseCodes/DensityOutOfRange.html +7 -7
  184. data/doc/CzechPostB2bClient/ResponseCodes/DuplicateDuplicateParcelCode.html +7 -7
  185. data/doc/CzechPostB2bClient/ResponseCodes/DuplicateParcel.html +7 -7
  186. data/doc/CzechPostB2bClient/ResponseCodes/DuplicateParcelCode.html +7 -7
  187. data/doc/CzechPostB2bClient/ResponseCodes/DuplicitParcelCode.html +7 -7
  188. data/doc/CzechPostB2bClient/ResponseCodes/FullSequence.html +7 -7
  189. data/doc/CzechPostB2bClient/ResponseCodes/FullSequenceDuplicate.html +7 -7
  190. data/doc/CzechPostB2bClient/ResponseCodes/IllegalCombinationOfServices.html +7 -7
  191. data/doc/CzechPostB2bClient/ResponseCodes/InfoAddRequiredService75.html +7 -7
  192. data/doc/CzechPostB2bClient/ResponseCodes/InfoAddService1A.html +7 -7
  193. data/doc/CzechPostB2bClient/ResponseCodes/InfoAddService1B.html +7 -7
  194. data/doc/CzechPostB2bClient/ResponseCodes/InfoAddService1D.html +7 -7
  195. data/doc/CzechPostB2bClient/ResponseCodes/InfoAddService9.html +7 -7
  196. data/doc/CzechPostB2bClient/ResponseCodes/InfoAddressWasModified.html +7 -7
  197. data/doc/CzechPostB2bClient/ResponseCodes/InfoAddresseeToLong.html +7 -7
  198. data/doc/CzechPostB2bClient/ResponseCodes/InfoCancelCustCardNumber.html +7 -7
  199. data/doc/CzechPostB2bClient/ResponseCodes/InfoCancelCustCardNumberAddresseeDocument.html +7 -7
  200. data/doc/CzechPostB2bClient/ResponseCodes/InfoCancelHeight.html +7 -7
  201. data/doc/CzechPostB2bClient/ResponseCodes/InfoCancelLength.html +7 -7
  202. data/doc/CzechPostB2bClient/ResponseCodes/InfoCancelMobilePhoneOrEmailAddresseeDocument.html +7 -7
  203. data/doc/CzechPostB2bClient/ResponseCodes/InfoCancelPalettsNumber.html +7 -7
  204. data/doc/CzechPostB2bClient/ResponseCodes/InfoCancelPersonalIdentificationNumber.html +7 -7
  205. data/doc/CzechPostB2bClient/ResponseCodes/InfoCancelService1AB.html +7 -7
  206. data/doc/CzechPostB2bClient/ResponseCodes/InfoCancelService1ABForService40.html +7 -7
  207. data/doc/CzechPostB2bClient/ResponseCodes/InfoCancelService1AForPostCode.html +7 -7
  208. data/doc/CzechPostB2bClient/ResponseCodes/InfoCancelService1AForService40.html +7 -7
  209. data/doc/CzechPostB2bClient/ResponseCodes/InfoCancelService1AWith1B.html +7 -7
  210. data/doc/CzechPostB2bClient/ResponseCodes/InfoCancelService1B.html +7 -7
  211. data/doc/CzechPostB2bClient/ResponseCodes/InfoCancelService1BAddService1A.html +7 -7
  212. data/doc/CzechPostB2bClient/ResponseCodes/InfoCancelService1BForPostCode.html +7 -7
  213. data/doc/CzechPostB2bClient/ResponseCodes/InfoCancelService1BWith1A.html +7 -7
  214. data/doc/CzechPostB2bClient/ResponseCodes/InfoCancelService1D.html +7 -7
  215. data/doc/CzechPostB2bClient/ResponseCodes/InfoCancelService1E.html +7 -7
  216. data/doc/CzechPostB2bClient/ResponseCodes/InfoCancelService1V.html +7 -7
  217. data/doc/CzechPostB2bClient/ResponseCodes/InfoCancelService25.html +7 -7
  218. data/doc/CzechPostB2bClient/ResponseCodes/InfoCancelService27.html +7 -7
  219. data/doc/CzechPostB2bClient/ResponseCodes/InfoCancelService29.html +7 -7
  220. data/doc/CzechPostB2bClient/ResponseCodes/InfoCancelService30.html +7 -7
  221. data/doc/CzechPostB2bClient/ResponseCodes/InfoCancelService31.html +7 -7
  222. data/doc/CzechPostB2bClient/ResponseCodes/InfoCancelService34.html +7 -7
  223. data/doc/CzechPostB2bClient/ResponseCodes/InfoCancelService34InvalidPhoneNumber.html +7 -7
  224. data/doc/CzechPostB2bClient/ResponseCodes/InfoCancelService45.html +7 -7
  225. data/doc/CzechPostB2bClient/ResponseCodes/InfoCancelService45InvalidPhoneNumber.html +7 -7
  226. data/doc/CzechPostB2bClient/ResponseCodes/InfoCancelService46.html +7 -7
  227. data/doc/CzechPostB2bClient/ResponseCodes/InfoCancelService47.html +7 -7
  228. data/doc/CzechPostB2bClient/ResponseCodes/InfoCancelService5B.html +7 -7
  229. data/doc/CzechPostB2bClient/ResponseCodes/InfoCancelService5BAnd5C.html +7 -7
  230. data/doc/CzechPostB2bClient/ResponseCodes/InfoCancelService5BAnd5D.html +7 -7
  231. data/doc/CzechPostB2bClient/ResponseCodes/InfoCancelService5C.html +7 -7
  232. data/doc/CzechPostB2bClient/ResponseCodes/InfoCancelService5CAnd5D.html +7 -7
  233. data/doc/CzechPostB2bClient/ResponseCodes/InfoCancelService5D.html +7 -7
  234. data/doc/CzechPostB2bClient/ResponseCodes/InfoCancelService9.html +134 -0
  235. data/doc/CzechPostB2bClient/ResponseCodes/InfoCancelVSVoucher.html +7 -7
  236. data/doc/CzechPostB2bClient/ResponseCodes/InfoCancelWidth.html +7 -7
  237. data/doc/CzechPostB2bClient/ResponseCodes/InfoCityChanged.html +7 -7
  238. data/doc/CzechPostB2bClient/ResponseCodes/InfoInexactAddress.html +7 -7
  239. data/doc/CzechPostB2bClient/ResponseCodes/InfoInvalidAccount.html +7 -7
  240. data/doc/CzechPostB2bClient/ResponseCodes/InfoInvalidBankCode.html +7 -7
  241. data/doc/CzechPostB2bClient/ResponseCodes/InfoInvalidBirthDay.html +7 -7
  242. data/doc/CzechPostB2bClient/ResponseCodes/InfoInvalidCODAmount.html +7 -7
  243. data/doc/CzechPostB2bClient/ResponseCodes/InfoInvalidCategoryCustomDecalaration.html +7 -7
  244. data/doc/CzechPostB2bClient/ResponseCodes/InfoInvalidEmail.html +7 -7
  245. data/doc/CzechPostB2bClient/ResponseCodes/InfoInvalidMobilePhoneNumber.html +7 -7
  246. data/doc/CzechPostB2bClient/ResponseCodes/InfoInvalidPhoneNumber.html +7 -7
  247. data/doc/CzechPostB2bClient/ResponseCodes/InfoInvalidPrefixAccount.html +7 -7
  248. data/doc/CzechPostB2bClient/ResponseCodes/InfoInvalidPrice.html +7 -7
  249. data/doc/CzechPostB2bClient/ResponseCodes/InfoInvalidSpecificSymbol.html +7 -7
  250. data/doc/CzechPostB2bClient/ResponseCodes/InfoInvalidTelephoneNumber.html +7 -7
  251. data/doc/CzechPostB2bClient/ResponseCodes/InfoInvalidWeight.html +7 -7
  252. data/doc/CzechPostB2bClient/ResponseCodes/InfoMissingPartCityServiceDeliveryOnSundayOrHolidayMayNotBeRealized.html +18 -7
  253. data/doc/CzechPostB2bClient/ResponseCodes/InfoPriceIsNotNumber.html +7 -7
  254. data/doc/CzechPostB2bClient/ResponseCodes/InfoPriceIsTooBig.html +7 -7
  255. data/doc/CzechPostB2bClient/ResponseCodes/InfoService29And47.html +7 -7
  256. data/doc/CzechPostB2bClient/ResponseCodes/InfoSpecialPackagingRequest.html +7 -7
  257. data/doc/CzechPostB2bClient/ResponseCodes/InternalApplicationError.html +7 -7
  258. data/doc/CzechPostB2bClient/ResponseCodes/InvalidAddressAddresseeDocumentForParcelType.html +7 -7
  259. data/doc/CzechPostB2bClient/ResponseCodes/InvalidAddressAddresseeDocumentObjectNotFound.html +7 -7
  260. data/doc/CzechPostB2bClient/ResponseCodes/InvalidAddressAddresseeDocumentWrongCity.html +7 -7
  261. data/doc/CzechPostB2bClient/ResponseCodes/InvalidAddressForBalikovna.html +7 -7
  262. data/doc/CzechPostB2bClient/ResponseCodes/InvalidAddressForBigPackage.html +7 -7
  263. data/doc/CzechPostB2bClient/ResponseCodes/InvalidAddressForCODAmountOver20000.html +7 -7
  264. data/doc/CzechPostB2bClient/ResponseCodes/InvalidAddressForParcelType.html +7 -7
  265. data/doc/CzechPostB2bClient/ResponseCodes/InvalidAddressee.html +7 -7
  266. data/doc/CzechPostB2bClient/ResponseCodes/InvalidAmount.html +7 -7
  267. data/doc/CzechPostB2bClient/ResponseCodes/InvalidAmountCurrency.html +7 -7
  268. data/doc/CzechPostB2bClient/ResponseCodes/InvalidAmountType.html +7 -7
  269. data/doc/CzechPostB2bClient/ResponseCodes/InvalidCODAmount.html +7 -7
  270. data/doc/CzechPostB2bClient/ResponseCodes/InvalidCODCurrency.html +7 -7
  271. data/doc/CzechPostB2bClient/ResponseCodes/InvalidCODCurrencyAccordance.html +7 -7
  272. data/doc/CzechPostB2bClient/ResponseCodes/InvalidCategoryCustomDecalaration.html +7 -7
  273. data/doc/CzechPostB2bClient/ResponseCodes/InvalidContentCustomGood.html +7 -7
  274. data/doc/CzechPostB2bClient/ResponseCodes/InvalidCurrencyCustomDecalaration.html +7 -7
  275. data/doc/CzechPostB2bClient/ResponseCodes/InvalidCustomGoodNumber.html +7 -7
  276. data/doc/CzechPostB2bClient/ResponseCodes/InvalidCustomerCardNumber.html +7 -7
  277. data/doc/CzechPostB2bClient/ResponseCodes/InvalidCustomerId.html +7 -7
  278. data/doc/CzechPostB2bClient/ResponseCodes/InvalidDensity.html +7 -7
  279. data/doc/CzechPostB2bClient/ResponseCodes/InvalidEmail.html +7 -7
  280. data/doc/CzechPostB2bClient/ResponseCodes/InvalidHeight.html +7 -7
  281. data/doc/CzechPostB2bClient/ResponseCodes/InvalidHsCodeCustomGood.html +7 -7
  282. data/doc/CzechPostB2bClient/ResponseCodes/InvalidIsoCustomGood.html +7 -7
  283. data/doc/CzechPostB2bClient/ResponseCodes/InvalidIsoCustomGoodFormat.html +7 -7
  284. data/doc/CzechPostB2bClient/ResponseCodes/InvalidLength.html +7 -7
  285. data/doc/CzechPostB2bClient/ResponseCodes/InvalidLocation.html +7 -7
  286. data/doc/CzechPostB2bClient/ResponseCodes/InvalidMRNCode.html +7 -7
  287. data/doc/CzechPostB2bClient/ResponseCodes/InvalidMRNCodeControl.html +7 -7
  288. data/doc/CzechPostB2bClient/ResponseCodes/InvalidNumberClosure.html +7 -7
  289. data/doc/CzechPostB2bClient/ResponseCodes/InvalidOrderNumber.html +7 -7
  290. data/doc/CzechPostB2bClient/ResponseCodes/InvalidParcelBarcode.html +7 -7
  291. data/doc/CzechPostB2bClient/ResponseCodes/InvalidParcelBarcodeDuplicate.html +7 -7
  292. data/doc/CzechPostB2bClient/ResponseCodes/InvalidParcelCode.html +7 -7
  293. data/doc/CzechPostB2bClient/ResponseCodes/InvalidParcelCodeControl.html +7 -7
  294. data/doc/CzechPostB2bClient/ResponseCodes/InvalidParcelResponseCode.html +7 -7
  295. data/doc/CzechPostB2bClient/ResponseCodes/InvalidParcelTypeForID.html +7 -7
  296. data/doc/CzechPostB2bClient/ResponseCodes/InvalidPartnerCode.html +7 -7
  297. data/doc/CzechPostB2bClient/ResponseCodes/InvalidPayday.html +7 -7
  298. data/doc/CzechPostB2bClient/ResponseCodes/InvalidPhoneNumber.html +7 -7
  299. data/doc/CzechPostB2bClient/ResponseCodes/InvalidPostCode.html +7 -7
  300. data/doc/CzechPostB2bClient/ResponseCodes/InvalidPrefixAccordance.html +7 -7
  301. data/doc/CzechPostB2bClient/ResponseCodes/InvalidPrefixCombination.html +7 -7
  302. data/doc/CzechPostB2bClient/ResponseCodes/InvalidPrefixForDimensionsAndFragile.html +7 -7
  303. data/doc/CzechPostB2bClient/ResponseCodes/InvalidPrice.html +7 -7
  304. data/doc/CzechPostB2bClient/ResponseCodes/InvalidPriceCurrency.html +7 -7
  305. data/doc/CzechPostB2bClient/ResponseCodes/InvalidPriceCurrencyAccordance.html +7 -7
  306. data/doc/CzechPostB2bClient/ResponseCodes/InvalidPriceCustomGood.html +7 -7
  307. data/doc/CzechPostB2bClient/ResponseCodes/InvalidQuantityCustomGood.html +7 -7
  308. data/doc/CzechPostB2bClient/ResponseCodes/InvalidResponsibleConsignmentNumber.html +7 -7
  309. data/doc/CzechPostB2bClient/ResponseCodes/InvalidReturnNumberDays.html +7 -7
  310. data/doc/CzechPostB2bClient/ResponseCodes/InvalidService18.html +7 -7
  311. data/doc/CzechPostB2bClient/ResponseCodes/InvalidService19.html +7 -7
  312. data/doc/CzechPostB2bClient/ResponseCodes/InvalidServiceCombination.html +7 -7
  313. data/doc/CzechPostB2bClient/ResponseCodes/InvalidServicesForDimensions.html +7 -7
  314. data/doc/CzechPostB2bClient/ResponseCodes/InvalidSignNumber.html +7 -7
  315. data/doc/CzechPostB2bClient/ResponseCodes/InvalidSubisoCountry.html +7 -7
  316. data/doc/CzechPostB2bClient/ResponseCodes/InvalidTareWeight.html +7 -7
  317. data/doc/CzechPostB2bClient/ResponseCodes/InvalidTiming.html +7 -7
  318. data/doc/CzechPostB2bClient/ResponseCodes/InvalidTransmissionDate.html +7 -7
  319. data/doc/CzechPostB2bClient/ResponseCodes/InvalidTypePrefix.html +7 -7
  320. data/doc/CzechPostB2bClient/ResponseCodes/InvalidUseOfService36.html +7 -7
  321. data/doc/CzechPostB2bClient/ResponseCodes/InvalidUseOfService37.html +7 -7
  322. data/doc/CzechPostB2bClient/ResponseCodes/InvalidUseOfService38.html +7 -7
  323. data/doc/CzechPostB2bClient/ResponseCodes/InvalidWeight.html +7 -7
  324. data/doc/CzechPostB2bClient/ResponseCodes/InvalidWeightCustomGood.html +7 -7
  325. data/doc/CzechPostB2bClient/ResponseCodes/InvalidWeightCustomGoodSummary.html +7 -7
  326. data/doc/CzechPostB2bClient/ResponseCodes/InvalidWeightForService11.html +7 -7
  327. data/doc/CzechPostB2bClient/ResponseCodes/InvalidWidth.html +7 -7
  328. data/doc/CzechPostB2bClient/ResponseCodes/InvalidZPROOrderNumber.html +7 -7
  329. data/doc/CzechPostB2bClient/ResponseCodes/InvalidZPROOrderNumberFormat.html +7 -7
  330. data/doc/CzechPostB2bClient/ResponseCodes/InvalidostCodeOrCity.html +7 -7
  331. data/doc/CzechPostB2bClient/ResponseCodes/MIssingParcelCode.html +7 -7
  332. data/doc/CzechPostB2bClient/ResponseCodes/MissingAddressee.html +7 -7
  333. data/doc/CzechPostB2bClient/ResponseCodes/MissingAddresseeCity.html +7 -7
  334. data/doc/CzechPostB2bClient/ResponseCodes/MissingAddresseeStreet.html +7 -7
  335. data/doc/CzechPostB2bClient/ResponseCodes/MissingAddresseeZipCode.html +7 -7
  336. data/doc/CzechPostB2bClient/ResponseCodes/MissingCODAmount.html +7 -7
  337. data/doc/CzechPostB2bClient/ResponseCodes/MissingCODAmountType.html +7 -7
  338. data/doc/CzechPostB2bClient/ResponseCodes/MissingCategoryCustomDecalaration.html +7 -7
  339. data/doc/CzechPostB2bClient/ResponseCodes/MissingCompanyName.html +7 -7
  340. data/doc/CzechPostB2bClient/ResponseCodes/MissingContentCustomGood.html +7 -7
  341. data/doc/CzechPostB2bClient/ResponseCodes/MissingCurrencyCustomDeclaration.html +7 -7
  342. data/doc/CzechPostB2bClient/ResponseCodes/MissingHandlingInstructions.html +7 -7
  343. data/doc/CzechPostB2bClient/ResponseCodes/MissingHeight.html +7 -7
  344. data/doc/CzechPostB2bClient/ResponseCodes/MissingHsCodeCustomGood.html +7 -7
  345. data/doc/CzechPostB2bClient/ResponseCodes/MissingIsoCustomGood.html +7 -7
  346. data/doc/CzechPostB2bClient/ResponseCodes/MissingLength.html +7 -7
  347. data/doc/CzechPostB2bClient/ResponseCodes/MissingPalettsNumber.html +7 -7
  348. data/doc/CzechPostB2bClient/ResponseCodes/MissingParcelCustomGood.html +7 -7
  349. data/doc/CzechPostB2bClient/ResponseCodes/MissingParcelCustomGoods.html +7 -7
  350. data/doc/CzechPostB2bClient/ResponseCodes/MissingPhoneNumber.html +7 -7
  351. data/doc/CzechPostB2bClient/ResponseCodes/MissingPrefix.html +7 -7
  352. data/doc/CzechPostB2bClient/ResponseCodes/MissingPrice.html +7 -7
  353. data/doc/CzechPostB2bClient/ResponseCodes/MissingPriceCustomGood.html +7 -7
  354. data/doc/CzechPostB2bClient/ResponseCodes/MissingQuantityCustomGood.html +7 -7
  355. data/doc/CzechPostB2bClient/ResponseCodes/MissingRequiredAddresseeDocument.html +7 -7
  356. data/doc/CzechPostB2bClient/ResponseCodes/MissingRequiredAddresseeDocumentDuplicate.html +7 -7
  357. data/doc/CzechPostB2bClient/ResponseCodes/MissingRequiredAddresseeEmail.html +7 -7
  358. data/doc/CzechPostB2bClient/ResponseCodes/MissingRequiredEmail.html +7 -7
  359. data/doc/CzechPostB2bClient/ResponseCodes/MissingRequiredFirstNameAddresseeDocument.html +7 -7
  360. data/doc/CzechPostB2bClient/ResponseCodes/MissingRequiredMRNCode.html +7 -7
  361. data/doc/CzechPostB2bClient/ResponseCodes/MissingRequiredMobileNumber.html +7 -7
  362. data/doc/CzechPostB2bClient/ResponseCodes/MissingRequiredMobileNumberOrEmail.html +7 -7
  363. data/doc/CzechPostB2bClient/ResponseCodes/MissingRequiredParcelCode.html +7 -7
  364. data/doc/CzechPostB2bClient/ResponseCodes/MissingRequiredPayday.html +7 -7
  365. data/doc/CzechPostB2bClient/ResponseCodes/MissingRequiredPhoneNumber.html +7 -7
  366. data/doc/CzechPostB2bClient/ResponseCodes/MissingRequiredPhoneNumberOrEmail.html +7 -7
  367. data/doc/CzechPostB2bClient/ResponseCodes/MissingRequiredPhoneNumberOrWhat.html +7 -7
  368. data/doc/CzechPostB2bClient/ResponseCodes/MissingRequiredPrice.html +7 -7
  369. data/doc/CzechPostB2bClient/ResponseCodes/MissingRequiredService.html +7 -7
  370. data/doc/CzechPostB2bClient/ResponseCodes/MissingRequiredService10.html +7 -7
  371. data/doc/CzechPostB2bClient/ResponseCodes/MissingRequiredService1AB.html +7 -7
  372. data/doc/CzechPostB2bClient/ResponseCodes/MissingRequiredService1X.html +7 -7
  373. data/doc/CzechPostB2bClient/ResponseCodes/MissingRequiredService2X.html +7 -7
  374. data/doc/CzechPostB2bClient/ResponseCodes/MissingRequiredService3X.html +7 -7
  375. data/doc/CzechPostB2bClient/ResponseCodes/MissingRequiredService3XTrinity.html +7 -7
  376. data/doc/CzechPostB2bClient/ResponseCodes/MissingRequiredService4.html +7 -7
  377. data/doc/CzechPostB2bClient/ResponseCodes/MissingRequiredService4X.html +7 -7
  378. data/doc/CzechPostB2bClient/ResponseCodes/MissingRequiredService4x.html +7 -7
  379. data/doc/CzechPostB2bClient/ResponseCodes/MissingRequiredVoucherPrice.html +7 -7
  380. data/doc/CzechPostB2bClient/ResponseCodes/MissingRequiredZPROOrderNumber.html +7 -7
  381. data/doc/CzechPostB2bClient/ResponseCodes/MissingReturnInstructions.html +7 -7
  382. data/doc/CzechPostB2bClient/ResponseCodes/MissingReturnNumberDays.html +7 -7
  383. data/doc/CzechPostB2bClient/ResponseCodes/MissingSenderEmail.html +7 -7
  384. data/doc/CzechPostB2bClient/ResponseCodes/MissingSizeCategory.html +7 -7
  385. data/doc/CzechPostB2bClient/ResponseCodes/MissingSurname.html +7 -7
  386. data/doc/CzechPostB2bClient/ResponseCodes/MissingVariableSymbol.html +7 -7
  387. data/doc/CzechPostB2bClient/ResponseCodes/MissingVariableSymbolDuplicate.html +7 -7
  388. data/doc/CzechPostB2bClient/ResponseCodes/MissingWeightCustomGood.html +7 -7
  389. data/doc/CzechPostB2bClient/ResponseCodes/MissingWidth.html +7 -7
  390. data/doc/CzechPostB2bClient/ResponseCodes/NoContractService41.html +7 -7
  391. data/doc/CzechPostB2bClient/ResponseCodes/NoContractServiceReturnReceipt.html +7 -7
  392. data/doc/CzechPostB2bClient/ResponseCodes/NotExistingOrderNumber.html +7 -7
  393. data/doc/CzechPostB2bClient/ResponseCodes/Ok.html +7 -7
  394. data/doc/CzechPostB2bClient/ResponseCodes/OverenoVecerniDorucovani.html +7 -7
  395. data/doc/CzechPostB2bClient/ResponseCodes/PalettsNumberOutOfRange.html +7 -7
  396. data/doc/CzechPostB2bClient/ResponseCodes/ParcelCodeNotAllowed.html +7 -7
  397. data/doc/CzechPostB2bClient/ResponseCodes/ParcelCodeNotInAssignedRange.html +7 -7
  398. data/doc/CzechPostB2bClient/ResponseCodes/ParcelDoesNotMeetTheRequirementsForm.html +7 -7
  399. data/doc/CzechPostB2bClient/ResponseCodes/PriceAndCODAmountTooBig.html +7 -7
  400. data/doc/CzechPostB2bClient/ResponseCodes/PriceOutOfRange.html +7 -7
  401. data/doc/CzechPostB2bClient/ResponseCodes/PriceTooBig.html +7 -7
  402. data/doc/CzechPostB2bClient/ResponseCodes/PriceTooLow.html +7 -7
  403. data/doc/CzechPostB2bClient/ResponseCodes/ResponsibleConsignmentNumberCannotBeImported.html +7 -7
  404. data/doc/CzechPostB2bClient/ResponseCodes/ResponsibleConsignmentNumberOutOfRange.html +7 -7
  405. data/doc/CzechPostB2bClient/ResponseCodes/ServicesCombinationNotAllowed.html +7 -7
  406. data/doc/CzechPostB2bClient/ResponseCodes/TransmissionAlreadyClosed.html +7 -7
  407. data/doc/CzechPostB2bClient/ResponseCodes/TransmissionNotExists.html +7 -7
  408. data/doc/CzechPostB2bClient/ResponseCodes/TransmissionOpened.html +7 -7
  409. data/doc/CzechPostB2bClient/ResponseCodes/TransmissionUnfinished.html +7 -7
  410. data/doc/CzechPostB2bClient/ResponseCodes/UnauthorizedAccess.html +7 -7
  411. data/doc/CzechPostB2bClient/ResponseCodes/UnknownAddresseeCity.html +7 -7
  412. data/doc/CzechPostB2bClient/ResponseCodes/UnknownAddresseePostCode.html +7 -7
  413. data/doc/CzechPostB2bClient/ResponseCodes/UnknownPrefix.html +7 -7
  414. data/doc/CzechPostB2bClient/ResponseCodes/VariableSymbolIsNotNumber.html +7 -7
  415. data/doc/CzechPostB2bClient/ResponseCodes/WeightCustomGoodOutOfRange.html +7 -7
  416. data/doc/CzechPostB2bClient/ResponseCodes/WeightIsOutOfRange.html +7 -7
  417. data/doc/CzechPostB2bClient/ResponseCodes/WeightIsOutOfRangeDuplicate.html +7 -7
  418. data/doc/CzechPostB2bClient/ResponseParsers.html +8 -8
  419. data/doc/CzechPostB2bClient/ResponseParsers/BaseParser.html +8 -8
  420. data/doc/CzechPostB2bClient/ResponseParsers/GetParcelStateParser.html +31 -16
  421. data/doc/CzechPostB2bClient/ResponseParsers/GetParcelsPrintingParser.html +21 -21
  422. data/doc/CzechPostB2bClient/ResponseParsers/GetResultParcelsParser.html +18 -12
  423. data/doc/CzechPostB2bClient/ResponseParsers/GetStatsParser.html +6 -6
  424. data/doc/CzechPostB2bClient/ResponseParsers/ParcelServiceSyncParser.html +805 -0
  425. data/doc/CzechPostB2bClient/ResponseParsers/SendParcelsParser.html +153 -10
  426. data/doc/CzechPostB2bClient/Services.html +8 -8
  427. data/doc/CzechPostB2bClient/Services/AddressSheetsGenerator.html +9 -9
  428. data/doc/CzechPostB2bClient/Services/ApiCaller.html +11 -7
  429. data/doc/CzechPostB2bClient/Services/Communicator.html +7 -7
  430. data/doc/CzechPostB2bClient/Services/DeliveringInspector.html +8 -8
  431. data/doc/CzechPostB2bClient/Services/Orchestrator.html +6 -6
  432. data/doc/CzechPostB2bClient/Services/ParcelsAsyncSender.html +402 -0
  433. data/doc/CzechPostB2bClient/Services/ParcelsSendProcessUpdater.html +8 -8
  434. data/doc/CzechPostB2bClient/Services/ParcelsSender.html +21 -233
  435. data/doc/CzechPostB2bClient/Services/ParcelsSubmissionCloser.html +12 -12
  436. data/doc/CzechPostB2bClient/Services/ParcelsSyncSender.html +464 -0
  437. data/doc/CzechPostB2bClient/Services/TimePeriodStatisticator.html +10 -10
  438. data/doc/CzechPostB2bClient/Services/XsdsDownloader.html +289 -0
  439. data/doc/SteppedService.html +8 -7
  440. data/doc/SteppedService/Base.html +31 -31
  441. data/doc/SteppedService/Errors.html +6 -6
  442. data/doc/_index.html +739 -23
  443. data/doc/class_list.html +3 -3
  444. data/doc/css/style.css +2 -2
  445. data/doc/file.README.html +219 -194
  446. data/doc/file_list.html +2 -2
  447. data/doc/frames.html +2 -2
  448. data/doc/index.html +219 -194
  449. data/doc/js/app.js +14 -3
  450. data/doc/method_list.html +278 -70
  451. data/doc/top-level-namespace.html +6 -6
  452. data/lib/czech_post_b2b_client/b2b_errors.rb +6 -7
  453. data/lib/czech_post_b2b_client/configuration.rb +12 -7
  454. data/lib/czech_post_b2b_client/post_services.rb +22 -12
  455. data/lib/czech_post_b2b_client/printing_templates.rb +143 -41
  456. data/lib/czech_post_b2b_client/request_builders.rb +1 -0
  457. data/lib/czech_post_b2b_client/request_builders/get_parcels_printing_builder.rb +6 -2
  458. data/lib/czech_post_b2b_client/request_builders/parcel_service_sync_builder.rb +286 -0
  459. data/lib/czech_post_b2b_client/request_builders/send_parcels_builder.rb +46 -20
  460. data/lib/czech_post_b2b_client/response_codes.rb +19 -16
  461. data/lib/czech_post_b2b_client/response_parsers.rb +1 -0
  462. data/lib/czech_post_b2b_client/response_parsers/base_parser.rb +7 -1
  463. data/lib/czech_post_b2b_client/response_parsers/get_parcel_state_parser.rb +4 -3
  464. data/lib/czech_post_b2b_client/response_parsers/get_result_parcels_parser.rb +4 -3
  465. data/lib/czech_post_b2b_client/response_parsers/parcel_service_sync_parser.rb +82 -0
  466. data/lib/czech_post_b2b_client/response_parsers/send_parcels_parser.rb +24 -2
  467. data/lib/czech_post_b2b_client/services.rb +4 -2
  468. data/lib/czech_post_b2b_client/services/api_caller.rb +25 -9
  469. data/lib/czech_post_b2b_client/services/delivering_inspector.rb +0 -2
  470. data/lib/czech_post_b2b_client/services/parcels_async_sender.rb +53 -0
  471. data/lib/czech_post_b2b_client/services/parcels_send_process_updater.rb +1 -1
  472. data/lib/czech_post_b2b_client/services/parcels_sender.rb +4 -45
  473. data/lib/czech_post_b2b_client/services/parcels_submission_closer.rb +1 -1
  474. data/lib/czech_post_b2b_client/services/{parcels_immediate_sender.rb → parcels_sync_sender.rb} +10 -9
  475. data/lib/czech_post_b2b_client/services/xsds_downloader.rb +61 -0
  476. data/lib/czech_post_b2b_client/version.rb +1 -1
  477. data/lib/stepped_service/base.rb +2 -1
  478. metadata +117 -7
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 4ccd8a99118f5ef7d0ecea94ff0f54fabcf9b463
4
- data.tar.gz: 48b1cf59bc7507cdf999300da9c808cb84039aba
3
+ metadata.gz: 2a85b06fa34faeb7213e1441a6545383e8643f33
4
+ data.tar.gz: 91bc102f0d2f2686b9d0e64fdb42db9ba7f295e6
5
5
  SHA512:
6
- metadata.gz: c5be2e12fc57bf7409f75401c50327ca07bae5120de0976ec6b190fd437031351f494106339876e1505ea55d975eabb1be3fec0a2c79260e2d6ffabe8e4b90bc
7
- data.tar.gz: 296c77c8b88f0ddb86d20d63d2ef5beee702b64d2231d32fc20437e803bcd28ea0f3f89b7815320010131dc458a8b8f8ae6742d5583731199ff2dbe3b9efd038
6
+ metadata.gz: 25c9c40f2da073568cdb86f391caf378b6a2005c17433486d8e88354e24bad2e0b388e3c2e4331e0b15f241fee1845b6ad9d541db2f2c624e86d869a9e649196
7
+ data.tar.gz: 6ef1357723687047dc2483f262214a2a01b91f368119af7b1c2608713c7a12d9649bb22da65f28d8b3d005106b07e3a192fa581a668cb0529c0fdbf51d3a478c
@@ -14,7 +14,7 @@ AllCops:
14
14
  - "bin/*"
15
15
  Documentation:
16
16
  Enabled: false
17
- Metrics/LineLength:
17
+ Layout/LineLength:
18
18
  Max: 120
19
19
  Metrics/AbcSize:
20
20
  Max: 20
@@ -50,3 +50,5 @@ Style/HashTransformKeys:
50
50
  Enabled: true
51
51
  Style/HashTransformValues:
52
52
  Enabled: true
53
+ Naming/VariableNumber:
54
+ Enabled: false
@@ -2,14 +2,39 @@
2
2
 
3
3
  All changes to the gem are documented here.
4
4
 
5
+ ## [1.2.3] - 2020-08-21
6
+
7
+ - Corrected order in XML `sequence` elements
8
+ - Added `schemaLocation` to root element and placed publicly accessible XSDs into Github repo
9
+
10
+ ## [1.2.2] - 2020-08-19
11
+
12
+ - Printing templates now include @page_dimensions
13
+ - Forced secure SSL ciphers for requests
14
+ - `examples/try_api_call.rb` refactored to be more versatile (download XSDs [:do not work], pritn_selected_combinations)
15
+
16
+ ## [1.2.0] - 2020-06-07
17
+
18
+ - **Breaking** Introducing new Printing templates, improved some template names and scopes
19
+ - Added options `custom_card_number` and `print_options` to `Configuration`
20
+
21
+ ## [1.1.0] - 2020-05-28
22
+
23
+ - Introducing new API documentation from Czech Post
24
+ - Added service `ParcelSyncSender` service which uses newly discovered `parcelsServiceSync` API endpoint
25
+ - Renamed `ParcelSender` to `ParcelAsyncSender` . And created deprecating clone `ParcelSender`, so no Breaking change! If You usit it calls `ParcelAsyncSender` and displays deprecation message.
26
+
27
+ ## [1.0.3] - 2020-05-20
28
+
29
+ - Added Czech Post service DiscountForOnlinePosting.
30
+ - **Breaking**: Renamed Post service "Size" classes `CzechPostB2bClient::PostServices::Size???` to `CzechPostB2bClient::PostServices::ParcelSize???` (eg. : `CzechPostB2bClient::PostServices::ParcelSizeXL`)
31
+ I know, that I have **breaking** in every new version, I hope You are not fast enough.
5
32
 
6
33
  ## [1.0.2] - 2020-05-08
7
34
 
8
35
  - Added Czech Post services as classes, not just list in docs.
9
36
  - **Breaking**: Renamed methods `CzechPostB2bClient::PrintingTemplate.all_template_classes` and `CzechPostB2bClient::ResponseCodes.all_code_classes` to `CzechPostB2bClient::PrintingTemplate.all_classes` , and `CzechPostB2bClient::ResponseCodes.all_classes`
10
37
 
11
-
12
-
13
38
  ## [1.0.0] - 2020-03-19
14
39
 
15
40
  Production ready release
data/README.md CHANGED
@@ -2,12 +2,16 @@
2
2
  Accessing B2B API of Czech Post for bulk processing of parcels ("B2B - WS PodáníOnline").
3
3
 
4
4
  There are these supported operations of API:
5
+ - *parcelServiceSync* - stores data of one parcel and return package_code and optional PDF adress sheet [HTTP POST - sync response]
6
+ Seems to me, that there are is no place extensive Cash On Delivery data, just `amount` and `currency`
5
7
  - *sendParcels* - stores data of parcels for async processing [HTTP POST - async response]
6
8
  - *getResultParcels* - return results of such processing [HTTP GET - sync response]
7
9
  - *getStats* - returns statistics of parcels sent in time period [HTTP GET - sync response]
8
10
  - *getParcelState* - returns all known states for listed parcels [HTTP GET - sync response]
9
11
  - *getParcelsPrinting* - returns PDF with address labels/stickers for listed parcels [HTTP GET - sync response]
10
12
 
13
+ ## Development of this gem is donated by [Squared s.r.o.](https://www.vyvolej.to)
14
+
11
15
  ## Installation
12
16
  ### 1) Registration at Czech Post (CP)
13
17
  The longterm and hardest part.
@@ -35,216 +39,236 @@ gem 'czech_post_b2b_client'
35
39
 
36
40
  And then execute:
37
41
 
38
- $ bundle
42
+ ```
43
+ $ bundle
44
+ ```
39
45
 
40
46
  Or install it yourself as:
41
47
 
42
48
  $ gem install czech_post_b2b_client
43
49
 
44
50
  ### 4) Setting up gem
45
- Set up your `contract_id`, `customer_id` (both from CP signed contract), `certificate_path`, `private_key_path` and `private_key_password` in configuration:
46
- ```
47
- CzechPostB2bClient.configure do |config|
48
- config.contract_id = 'contract_id'
49
- config.customer_id = 'customer_id'
50
- config.certificate_path = 'full_path/to/your/postsignum_certificate.pem'
51
- config.private_key_path = 'full_path/to/your/postsignum_private.key'
52
- config.private_key_password = 'your_password or nil'
53
-
54
- # this actually do not work, I have to use `sending_post_office_location_number`. But it is REQUIRED!
55
- config.sending_post_office_code = 12_345 # PSC of post office where parcels will be physically delivered and submitted
56
-
57
- # and You can override defaults
58
- # config.sending_post_office_location_number => 1
59
- # config.namespaces #XML namespaces
60
- # config.language => :cs # other languages are not supported now
61
- # config.logger => ::Rails.logger or ::Logger.new(STDOUT),
62
- # config.b2b_api_base_uri => 'https://b2b.postaonline.cz/services/POLService/v1'
63
- end
64
- ```
65
-
66
- - `contract_id` is _"ID CČK"_ (can be found in contract; eg.: _"2511327004"_)
67
- - `customer_id` is _"Technologické číslo"_ (can be found in contract; eg.: _"U123"_ or _"L03022"_; also is visible at [PodaníOnline](https://www.postaonline.cz/podanionline/PrednastaveniUdajuZasilky.action)
68
-
69
- Because PostSignum Certificate Authority is not trusted by default, correct certificate chain is in `certs/` folder. If You have problem with them, create a issue here. Maybe they are outdated now.
51
+ Set up your `contract_id`, `customer_id` (both from CP signed contract), `certificate_path`, `private_key_path` and `private_key_password` in configuration:
52
+ ```
53
+ CzechPostB2bClient.configure do |config|
54
+ config.contract_id = 'contract_id'
55
+ config.customer_id = 'customer_id'
56
+ config.certificate_path = 'full_path/to/your/postsignum_certificate.pem'
57
+ config.private_key_path = 'full_path/to/your/postsignum_private.key'
58
+ config.private_key_password = 'your_password or nil'
59
+
60
+ # these two just save Your time, can be overwritten for each call
61
+ config.custom_card_number = 'ABCD123456'
62
+ config.print_options = { template_id: 21, # 'adresní štítek bianco - samostatný'
63
+ margin_in_mm: { top: 0, left: 0 } }
64
+
65
+ # this actually do not work, I have to use `sending_post_office_location_number`. But it is REQUIRED!
66
+ config.sending_post_office_code = 12_345 # PSC of post office where parcels will be physically delivered and submitted
67
+
68
+ # and You can override defaults
69
+ # config.sending_post_office_location_number => 1
70
+ # config.namespaces #XML namespaces
71
+ # config.language => :cs # other languages are not supported now
72
+ # config.logger => ::Rails.logger or ::Logger.new(STDOUT),
73
+ # config.b2b_api_base_uri => 'https://b2b.postaonline.cz/services/POLService/v1'
74
+ end
75
+ ```
76
+
77
+ - `contract_id` is _"ID CČK"_ (can be found in contract; eg.: _"2511327004"_)
78
+ - `customer_id` is _"Technologické číslo"_ (can be found in contract; eg.: _"U123"_ or _"L03022"_; also is visible at [PodaníOnline](https://www.postaonline.cz/podanionline/PrednastaveniUdajuZasilky.action)
79
+
80
+ Because PostSignum Certificate Authority is not trusted by default, correct certificate chain is in `certs/` folder. If You have problem with them, create a issue here. Maybe they are outdated now.
70
81
 
71
82
  ## Usage
72
- **You have to know which parcel type (according to CP) you sending!** Eg. 'BA' or 'RR'. See [`documents/parcel_types.md`](./documents/parcel_types.md).
73
-
74
- **And what services You will use for each parcel**, see [`documents/services_list.md`](./documents/services_list.md) and [`documents/parcels_type_and_services_restrictions.md`](./documents/parcels_type_and_services_restrictions.md).
75
-
76
- Hashes used is service calls bellow:
77
- ```
78
- short_sender_data = { address: {
79
- company_name: 'Oriflame',
80
- addition_to_name: 'perfume', # optional
81
- street: 'V olšinách',
82
- house_number: '16',
83
- city_part: 'Strašnice',
84
- city: 'Praha',
85
- post_code: 10_000,
86
- },
87
- mobile_phone: '+420777888999',
88
- email: 'rehor.jan@cpost.cz' }
89
- sending_data = { contract_id: configuration.contract_id,
90
- parcels_sending_date: Date.today,
91
- sending_post_office_location_number: 1,
92
- sender: short_sender_data,
93
- cash_on_delivery: {
94
- address: short_sender_data[:address]
95
- bank_account: '123456-1234567890/1234'
96
- } }
97
-
98
- short_addressee_data = { address: {
99
- first_name: 'Petr',
100
- last_name: 'Foton',
101
- street: 'Fischerova',
102
- house_number: '686',
103
- sequence_number: '32',
104
- city_part: 'Nové Sady',
105
- city: 'Olomouc',
106
- post_code: 77_900
107
- },
108
- email: 'foton@github.com',
109
- mobile_phone: '+420777888999' }
110
-
111
- parcels = [
112
- {
113
- addressee: short_addressee_data,
114
- params: { parcel_id: 'package_1of2',
115
- parcel_code_prefix: 'BA',
116
- weight_in_kg: 1.0,
117
- parcel_order: 1,
118
- parcels_count: 2 },
119
- services: [70, 7, 'S']
120
- },
121
- {
122
- addressee: short_addressee_data,
123
- params: { parcel_id: 'package_2of2',
124
- parcel_code_prefix: 'BA',
125
- weight_in_kg: 1.6,
126
- parcel_order: 2,
127
- parcels_count: 2 },
128
- services: [70,'S']
129
- },
130
- {
131
- addressee: short_addressee_data,
132
- params: { parcel_id: 'package_3',
133
- parcel_code_prefix: 'BA',
134
- weight_in_kg: 1.9 },
135
- services: [7,'M']
136
- }
137
- ]
83
+ **You have to know which parcel type (according to CP) you sending!** Eg. 'BA' or 'RR'. See [`documents/parcel_types.md`](./documents/parcel_types.md).
84
+
85
+ **And what services You will use for each parcel**, see [`documents/services_list.md`](./documents/services_list.md) and [`documents/parcels_type_and_services_restrictions.md`](./documents/parcels_type_and_services_restrictions.md).
86
+
87
+ Hashes used is service calls bellow:
88
+
89
+ ```
90
+ short_sender_data = { address: {
91
+ company_name: 'Oriflame',
92
+ addition_to_name: 'perfume', # optional
93
+ street: 'V olšinách',
94
+ house_number: '16',
95
+ city_part: 'Strašnice',
96
+ city: 'Praha',
97
+ post_code: 10_000,
98
+ },
99
+ mobile_phone: '+420777888999',
100
+ email: 'rehor.jan@cpost.cz' }
101
+ sending_data = { contract_id: configuration.contract_id,
102
+ parcels_sending_date: Date.today,
103
+ sending_post_office_location_number: 1,
104
+ sender: short_sender_data,
105
+ cash_on_delivery: {
106
+ address: short_sender_data[:address]
107
+ bank_account: '123456-1234567890/1234'
108
+ } }
109
+
110
+ short_addressee_data = { address: {
111
+ first_name: 'Petr',
112
+ last_name: 'Foton',
113
+ street: 'Fischerova',
114
+ house_number: '686',
115
+ sequence_number: '32',
116
+ city_part: 'Nové Sady',
117
+ city: 'Olomouc',
118
+ post_code: 77_900
119
+ },
120
+ email: 'foton@github.com',
121
+ mobile_phone: '+420777888999' }
122
+
123
+ parcels = [
124
+ {
125
+ addressee: short_addressee_data,
126
+ params: { parcel_id: 'package_1of2',
127
+ parcel_code_prefix: 'BA',
128
+ weight_in_kg: 1.0,
129
+ parcel_order: 1,
130
+ parcels_count: 2 },
131
+ services: [70, 7, 'S']
132
+ },
133
+ {
134
+ addressee: short_addressee_data,
135
+ params: { parcel_id: 'package_2of2',
136
+ parcel_code_prefix: 'BA',
137
+ weight_in_kg: 1.6,
138
+ parcel_order: 2,
139
+ parcels_count: 2 },
140
+ services: [70,'S']
141
+ },
142
+ {
143
+ addressee: short_addressee_data,
144
+ params: { parcel_id: 'package_3',
145
+ parcel_code_prefix: 'BA',
146
+ weight_in_kg: 1.9 },
147
+ services: [7,'M']
148
+ }
149
+ ]
138
150
  ```
139
151
 
140
152
 
141
- 1) Pack your parcel(s)
142
-
143
- 2) Call `ParcelsSender`, this will store in `result` `transmission_id` and expected time to ask for results.
144
- ```
145
- psender = CzechPostB2bClient::Services::ParcelsSender.call(sending_data: sending_data, parcels: parcels)
146
-
147
- if psender.success?
148
- result = psender.result
149
- processing_end_time_utc = (result.processing_end_expected_at - (60 *60)).utc # API returns time in CET but marked as UTC
150
- transaction_id = result.transaction_id
151
- else
152
- puts psender.errors.full_messages
153
- end
154
- ```
155
- For now, `parcels` is array of complicated hashes; each parcel must have `parcel_id` key (your ID of parcel).
156
-
157
- 3) When such expected time pass, ask for results by calling `ParcelsSendProcessUpdater`.
158
-
159
- You can get error `Processing is not yet finished` or hash based on `parcel_id` keys.
160
- Eg. :
161
- ```
162
- pudater = CzechPostB2bClient::Services::ParcelsSendProcessUpdater.call(transmission_id: transmission_id)
163
-
164
- if pupdater.success?
165
- update_my_parcels_with(pupdater.result) # => { 'parcel_1of2' => { parcel_code: 'BA12354678', states: [{ code: 1, text: 'OK' }]},
166
- # 'parcel_2of2' => { parcel_code: 'BA12354679', states: [{ code: 1, text: 'OK' }]},
167
- # 'parcel_3' => { parcel_code: 'BA12354680', states: [{ code: 1, text: 'OK' }]}
168
- else
169
- puts psender.errors.full_messages # => "response_state: ResponseCode[19 BATCH_INVALID] V dávce se vyskytují chybné záznamy"
170
- # "parcels: Parcel[parcel_2of2] => ResponseCode[104 INVALID_WEIGHT] Hmotnost mimo povolený rozsah"
171
- # "parcels: Parcel[parcel_2of2] => ResponseCode[261 MISSING_SIZE_CATEGORY] Neuvedena rozměrová kategorie zásilky"
172
- # "parcels: Parcel[parcel_3] => ResponseCode[310 INVALID_PREFIX] Neplatný typ zásilky"
173
- end
174
- ```
175
- `parcel_code` is CzechPost ID of parcel and is used in following calls.
176
-
177
- 4) Print address sheets of parcels(s) by calling `AddressSheetsGenerator`.
178
- See [template_classes](./lib/czech_post_b2b_client/printing_templates.rb) for available templates.
179
- Eg. :
180
- ```
181
- parcel_codes = %w[RA123456789 RR123456789F RR123456789G] # beware of parcel_id!
182
- options = {
183
- customer_id: configuration.customer_id, # required
184
- contract_number: configuration.contract_id, # not required
185
- template_id: 24, # 'obalka 3 - B4' #
186
- margin_in_mm: { top: 5, left: 3 } # required
187
- }
188
-
189
- adrprinter = CzechPostB2bClient::Services::AddressSheetsGenerator.call(parcel_codes: parcel_codes, options: options )
190
-
191
- if adrprinter.success?
192
- File.write("adrsheet.pdf", adrprinter.result.pdf_content)
193
- else
194
- puts(adrprinter.errors.full_messages)
195
- end
196
- ```
197
-
198
- 5) Repeat steps 1-4 until You decide to deliver packages to post office.
199
-
200
- 6) Close your parcels submission with call `ParcelsSubmissionCloser.call(sending_data: sender_data)`.
201
-
202
- 7) _They will await You at post office with warm welcome (hopefully). Parcels which are not delivered within 60 days are removed from CzechPost systems for free :-)_
203
-
204
- 8) You can check current status of delivering with `DeliveringInspector`, which will return hash based on `parcel_code` keys.
205
- Eg. :
206
- ```
207
- delivery_boy = CzechPostB2bClient::Services::DeliveringInspector.call(parcel_codes: parcel_codes)
208
-
209
- if delivery_boy.success?
210
- update_my_parcels_delivery_status_with(delivery_boy.result)
211
- # result is like:
212
- # { 'RA12345687' => { current_state: { id: '91',
213
- date: Date.parse('2015-09-04'),
214
- text: 'Dodání zásilky.',
215
- post_code: '25756',
216
- post_name: 'Neveklov'},
217
- deposited_until: Date.new(2015, 9, 2),
218
- deposited_for_days: 15,
219
- all_states: [
220
- { id: '21', date: Date.parse('2015-09-02'), text: 'Podání zásilky.', post_code: '26701', post_name: 'Králův Dvůr u Berouna' },
221
- { id: '-F', date: Date.parse('2015-09-03'), text: 'Vstup zásilky na SPU.', post_code: '22200', post_name: 'SPU Praha 022' },
222
- { id: '-I', date: Date.parse('2015-09-03'), text: 'Výstup zásilky z SPU.', post_code: '22200', post_name: 'SPU Praha 022' },
223
- { id: '-B', date: Date.parse('2015-09-03'), text: 'Přeprava zásilky k dodací poště.', post_code: nil, post_name: nil },
224
- { id: '51', date: Date.parse('2015-09-04'), text: 'Příprava zásilky k doručení.', post_code: '25607', post_name: 'Depo Benešov 70' },
225
- { id: '53', date: Date.parse('2015-09-04'), text: 'Doručování zásilky.', post_code: '25756', post_name: 'Neveklov' },
226
- { id: '91', date: Date.parse('2015-09-04'), text: 'Dodání zásilky.', post_code: '25756', post_name: 'Neveklov' }
227
- ]},
228
- 'BA56487125' => {...}
229
- }
230
- else
231
- puts(delivery_boy.errors.full_messages)
232
- end
233
- ```
234
-
235
- 9) And You can always ask for statistics!
236
- ```
237
- tps = CzechPostB2bClient::Services::TimePeriodStatisticator.call(from_date: Date.today - 5, to_date: Date.today)
238
- if tps.success?
239
- result = tps.result
240
- result.requests.total # => 26,
241
- result.requests.with_errors # => 16
242
- result.requests.successful # => 10
243
- result.imported_parcels # => 3
244
- else
245
- puts(tps.errors.full_messages)
246
- end
247
- ```
153
+ 1 ) Pack your parcel(s)
154
+
155
+ 2 ) If you have many parcels and treats them as bulk, use ASYNC registration process (steps 3a - 7a)[15 000 calls per day allowed]. If You want to register parcel and get parcel_code and address sheet immediatelly (3 sec), use SYNC process (step 3b)[1 000 calls per day allowed]
156
+
157
+ 3a) Call `ParcelsAsyncSender`, this will setup `transmission_id` and expected time to ask for results.
158
+ ```
159
+ psender = CzechPostB2bClient::Services::ParcelsAsyncSender.call(sending_data: sending_data, parcels: parcels)
160
+
161
+ if psender.success?
162
+ result = psender.result
163
+ processing_end_time_utc = (result.processing_end_expected_at - (60 *60)).utc # API returns time in CET but marked as UTC
164
+ transaction_id = result.transaction_id
165
+ else
166
+ puts psender.errors.full_messages
167
+ end
168
+ ```
169
+ For now, `parcels` is array of complicated hashes; each parcel must have `parcel_id` key (your ID of parcel).
170
+
171
+ 4a) When such expected time pass, ask for results by calling `ParcelsSendProcessUpdater`. You can get error `Processing is not yet finished` or hash based on `parcel_id` keys.
172
+ ```
173
+ pudater = CzechPostB2bClient::Services::ParcelsSendProcessUpdater.call(transmission_id: transmission_id)
174
+
175
+ if pupdater.success?
176
+ update_my_parcels_with(pupdater.result) # => { 'parcel_1of2' => { parcel_code: 'BA12354678', states: [{ code: 1, text: 'OK' }]},
177
+ # 'parcel_2of2' => { parcel_code: 'BA12354679', states: [{ code: 1, text: 'OK' }]},
178
+ # 'parcel_3' => { parcel_code: 'BA12354680', states: [{ code: 1, text: 'OK' }]}
179
+ else
180
+ puts psender.errors.full_messages # => "response_state: ResponseCode[19 BATCH_INVALID] V dávce se vyskytují chybné záznamy"
181
+ # "parcels: Parcel[parcel_2of2] => ResponseCode[104 INVALID_WEIGHT] Hmotnost mimo povolený rozsah"
182
+ # "parcels: Parcel[parcel_2of2] => ResponseCode[261 MISSING_SIZE_CATEGORY] Neuvedena rozměrová kategorie zásilky"
183
+ # "parcels: Parcel[parcel_3] => ResponseCode[310 INVALID_PREFIX] Neplatný typ zásilky"
184
+ end
185
+ ```
186
+ `parcel_code` is CzechPost Tracking number of parcel and is used in following calls.
187
+
188
+ 5a) Print address sheets of parcel(s) by calling `AddressSheetsGenerator`.
189
+ See [template_classes](./lib/czech_post_b2b_client/printing_templates.rb) for available templates.
190
+ ```
191
+ parcel_codes = %w[RA123456789 RR123456789F RR123456789G] # beware of parcel_id!
192
+ options = {
193
+ customer_id: configuration.customer_id, # required
194
+ contract_number: configuration.contract_id, # not required
195
+ template_id: 24, # 'obalka 3 - B4' #
196
+ margin_in_mm: { top: 5, left: 3 } # required
197
+ }
198
+
199
+ adrprinter = CzechPostB2bClient::Services::AddressSheetsGenerator.call(parcel_codes: parcel_codes, options: options )
200
+
201
+ if adrprinter.success?
202
+ File.write("adrsheet.pdf", adrprinter.result.pdf_content)
203
+ else
204
+ puts(adrprinter.errors.full_messages)
205
+ end
206
+ ```
207
+
208
+ 6a) Repeat steps 1-4 until You decide to deliver packages to post office.
209
+
210
+ 7a) Close your parcels submission with call `ParcelsSubmissionCloser.call(sending_data: sender_data)`.
211
+
212
+ 3b) For immediate (one) parcel registering call `ParcelsSyncSender`. You can optionally request address sheet pdf in response (see step 5a for info)
213
+ ```
214
+ s_data = sending_data.merge(print_params: { template_id: 40, margin_in_mm: { top: 1, left: 1 }})
215
+ psender = CzechPostB2bClient::Services::ParcelsSyncSender.call(sending_data: s_data, parcels: [parcels.first])
216
+
217
+ if psender.success?
218
+ result = psender.result
219
+ update_my_parcels_with(result) # => { 'parcel_1of2' => { parcel_code: 'BA12354678', states: [{ code: 1, text: 'OK' }]},
220
+ File.write("adrsheet.pdf", result.pdf_content)
221
+ else
222
+ puts psender.errors.full_messages
223
+ end
224
+ ```
225
+ `parcel_code` is CzechPost Tracking number of parcel and is used in following calls.
226
+
227
+ 8_) _They will await You at post office with warm welcome (hopefully). Parcels which are not delivered within 60 days are removed from CzechPost systems for free :-)_
228
+
229
+ 9_) You can check current status of delivering with `DeliveringInspector`, which will return hash based on `parcel_code` keys.
230
+ ```
231
+ delivery_boy = CzechPostB2bClient::Services::DeliveringInspector.call(parcel_codes: parcel_codes)
232
+
233
+ if delivery_boy.success?
234
+ update_my_parcels_delivery_status_with(delivery_boy.result)
235
+ # result is like:
236
+ # { 'RA12345687' => { current_state: { id: '91',
237
+ date: Date.parse('2015-09-04'),
238
+ text: 'Dodání zásilky.',
239
+ post_code: '25756',
240
+ post_name: 'Neveklov'},
241
+ deposited_until: Date.new(2015, 9, 2),
242
+ deposited_for_days: 15,
243
+ all_states: [
244
+ { id: '21', date: Date.parse('2015-09-02'), text: 'Podání zásilky.', post_code: '26701', post_name: 'Králův Dvůr u Berouna' },
245
+ { id: '-F', date: Date.parse('2015-09-03'), text: 'Vstup zásilky na SPU.', post_code: '22200', post_name: 'SPU Praha 022' },
246
+ { id: '-I', date: Date.parse('2015-09-03'), text: 'Výstup zásilky z SPU.', post_code: '22200', post_name: 'SPU Praha 022' },
247
+ { id: '-B', date: Date.parse('2015-09-03'), text: 'Přeprava zásilky k dodací poště.', post_code: nil, post_name: nil },
248
+ { id: '51', date: Date.parse('2015-09-04'), text: 'Příprava zásilky k doručení.', post_code: '25607', post_name: 'Depo Benešov 70' },
249
+ { id: '53', date: Date.parse('2015-09-04'), text: 'Doručování zásilky.', post_code: '25756', post_name: 'Neveklov' },
250
+ { id: '91', date: Date.parse('2015-09-04'), text: 'Dodání zásilky.', post_code: '25756', post_name: 'Neveklov' }
251
+ ]},
252
+ 'BA56487125' => {...}
253
+ }
254
+ else
255
+ puts(delivery_boy.errors.full_messages)
256
+ end
257
+ ```
258
+
259
+ 10_) And You can always ask for statistics!
260
+ ```
261
+ tps = CzechPostB2bClient::Services::TimePeriodStatisticator.call(from_date: Date.today - 5, to_date: Date.today)
262
+ if tps.success?
263
+ result = tps.result
264
+ result.requests.total # => 26,
265
+ result.requests.with_errors # => 16
266
+ result.requests.successful # => 10
267
+ result.imported_parcels # => 3
268
+ else
269
+ puts(tps.errors.full_messages)
270
+ end
271
+ ```
248
272
 
249
273
  ### Example usage
250
274
 
@@ -254,6 +278,8 @@ Or install it yourself as:
254
278
 
255
279
  ## Troubleshooting
256
280
 
281
+ You can validate request XML against XSD in [`documents/latest_xsds`](./documents/latest_xsds) (There are no public files from Czech Post :-( )
282
+
257
283
  1) Read all stuff in [`./documents`](./documents/) and [Yard docs](./doc/index.html), maybe it helps.
258
284
  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.
259
285
  You can always try `TimePeriodStatisticator` for that check, it do not need any "before" actions.
@@ -261,6 +287,8 @@ Or install it yourself as:
261
287
  4) Error `11: INVALID_LOCATION` was occuring when only `sending_post_office_code` was used. Try to use `sending_post_office_location_number`.
262
288
  5) And last tip `261 MISSING_SIZE_CATEGORY` -> add correct "size service" to services (eg: 'S', 'M')
263
289
  6) Compare resulting request XML with examples in `test/request_builders`
290
+ 7) If You get strings like `"Obdr\xC5\xBEeny \xC3\xBAdaje k z\xC3\xA1silce."` instead of `"Obdrženy údaje k zásilce."`, You need to `str.force_encoding('UTF-8')`. It happens to me, after I started to use gem in app. Something like backward influence.
291
+
264
292
 
265
293
  ## Development
266
294