czech_post_b2b_client 1.0.0 → 1.2.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (482) hide show
  1. checksums.yaml +4 -4
  2. data/.rubocop.yml +18 -4
  3. data/CHANGELOG.md +28 -0
  4. data/README.md +224 -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.rb +2 -0
  453. data/lib/czech_post_b2b_client/b2b_errors.rb +12 -11
  454. data/lib/czech_post_b2b_client/configuration.rb +13 -7
  455. data/lib/czech_post_b2b_client/post_services.rb +777 -0
  456. data/lib/czech_post_b2b_client/printing_templates.rb +145 -46
  457. data/lib/czech_post_b2b_client/request_builders.rb +1 -0
  458. data/lib/czech_post_b2b_client/request_builders/get_parcels_printing_builder.rb +7 -3
  459. data/lib/czech_post_b2b_client/request_builders/parcel_service_sync_builder.rb +312 -0
  460. data/lib/czech_post_b2b_client/request_builders/send_parcels_builder.rb +12 -7
  461. data/lib/czech_post_b2b_client/response_codes.rb +38 -35
  462. data/lib/czech_post_b2b_client/response_parsers.rb +1 -0
  463. data/lib/czech_post_b2b_client/response_parsers/base_parser.rb +15 -7
  464. data/lib/czech_post_b2b_client/response_parsers/get_parcel_state_parser.rb +4 -3
  465. data/lib/czech_post_b2b_client/response_parsers/get_parcels_printing_parser.rb +2 -1
  466. data/lib/czech_post_b2b_client/response_parsers/get_result_parcels_parser.rb +8 -5
  467. data/lib/czech_post_b2b_client/response_parsers/parcel_service_sync_parser.rb +82 -0
  468. data/lib/czech_post_b2b_client/response_parsers/send_parcels_parser.rb +24 -2
  469. data/lib/czech_post_b2b_client/services.rb +5 -1
  470. data/lib/czech_post_b2b_client/services/api_caller.rb +25 -9
  471. data/lib/czech_post_b2b_client/services/delivering_inspector.rb +4 -6
  472. data/lib/czech_post_b2b_client/services/orchestrator.rb +0 -1
  473. data/lib/czech_post_b2b_client/services/parcels_async_sender.rb +53 -0
  474. data/lib/czech_post_b2b_client/services/parcels_send_process_updater.rb +2 -2
  475. data/lib/czech_post_b2b_client/services/parcels_sender.rb +4 -45
  476. data/lib/czech_post_b2b_client/services/parcels_submission_closer.rb +1 -1
  477. data/lib/czech_post_b2b_client/services/parcels_sync_sender.rb +88 -0
  478. data/lib/czech_post_b2b_client/services/time_period_statisticator.rb +1 -1
  479. data/lib/czech_post_b2b_client/services/xsds_downloader.rb +61 -0
  480. data/lib/czech_post_b2b_client/version.rb +1 -1
  481. data/lib/stepped_service/base.rb +2 -1
  482. metadata +116 -4
@@ -1,8 +1,10 @@
1
1
  # frozen_string_literal: true
2
2
 
3
+ # rubocop:disable Layout/LineLength, Style/AsciiComments
4
+
3
5
  module CzechPostB2bClient
4
6
  module RequestBuilders
5
- class SendParcelsBuilder < BaseBuilder
7
+ class SendParcelsBuilder < BaseBuilder # rubocop:disable Metrics/ClassLength
6
8
  attr_reader :common_data, :parcels
7
9
 
8
10
  def initialize(common_data:, parcels:, request_id: 1)
@@ -34,7 +36,7 @@ module CzechPostB2bClient
34
36
  [:sending_post_office_code]].each do |key_chain|
35
37
  value = common_data.dig(*key_chain)
36
38
  if value.nil? || value == ''
37
- errors.add(:common_data, "Missing value for key { :#{key_chain.join(' => :') } }!")
39
+ errors.add(:common_data, "Missing value for key { :#{key_chain.join(' => :')} }!")
38
40
  end
39
41
  end
40
42
  end
@@ -72,7 +74,7 @@ module CzechPostB2bClient
72
74
  end
73
75
  end
74
76
 
75
- def do_parcel_header
77
+ def do_parcel_header # rubocop:disable Metrics/AbcSize
76
78
  new_element('ns2:doParcelHeader').tap do |parcel_header|
77
79
  add_element_to(parcel_header, 'ns2:transmissionDate', value: common_data[:parcels_sending_date].strftime('%d.%m.%Y')) # Predpokladane datum podani (format DD.MM.YYYY !)
78
80
  add_element_to(parcel_header, 'ns2:customerID', value: common_data[:customer_id]) # Technologicke cislo podavatele
@@ -133,7 +135,7 @@ module CzechPostB2bClient
133
135
  end
134
136
  end
135
137
 
136
- def do_parcel_params(parcel_data)
138
+ def do_parcel_params(parcel_data) # rubocop:disable Metrics/AbcSize, Metrics/MethodLength
137
139
  params = parcel_data[:params]
138
140
  cod = parcel_data[:cash_on_delivery] || {}
139
141
  new_element('ns2:doParcelParams').tap do |parcel_params|
@@ -183,7 +185,7 @@ module CzechPostB2bClient
183
185
  add_parcel_adress_element('ns2:doParcelAddressDocument', parcel_data[:document_addressee])
184
186
  end
185
187
 
186
- def add_parcel_adress_element(element_name, addressee_data)
188
+ def add_parcel_adress_element(element_name, addressee_data) # rubocop:disable Metrics/AbcSize
187
189
  return nil if addressee_data.nil?
188
190
 
189
191
  address_data = addressee_data[:address]
@@ -237,7 +239,8 @@ module CzechPostB2bClient
237
239
  end
238
240
  end
239
241
 
240
- def add_address_elements(parent_element, address_data, without: []) # Nepovinne. Adresa
242
+ # Nepovinne. Adresa
243
+ def add_address_elements(parent_element, address_data, without: [])
241
244
  return if address_data.nil?
242
245
 
243
246
  address_tags_and_values(address_data).each_pair do |xml_tag, value|
@@ -260,7 +263,7 @@ module CzechPostB2bClient
260
263
  'ns2:city' => address_data[:city], # Nepovinne: Obec
261
264
  'ns2:zipCode' => address_data[:post_code], # Nepovinne: PSC
262
265
  'ns2:isoCountry' => address_data[:country_iso_code], # Nepovinne, default 'CZ': ISO kod zeme
263
- 'ns2:subIsoCountry' => address_data[:subcountry_iso_code], # Nepovinne: ISO kod uzemi
266
+ 'ns2:subIsoCountry' => address_data[:subcountry_iso_code] # Nepovinne: ISO kod uzemi
264
267
  }
265
268
  end
266
269
 
@@ -292,3 +295,5 @@ module CzechPostB2bClient
292
295
  end
293
296
  end
294
297
  end
298
+
299
+ # rubocop:enable Layout/LineLength, Style/AsciiComments
@@ -1,25 +1,27 @@
1
+ # frozen_string_literal: true
2
+
1
3
  # Codes, which can be returned in response nodes `doParcelStateResponse`
2
4
  #
3
- # Do not miss `CzechPostB2bClient::ResponseCodes.all_code_classes` and `CzechPostB2bClient::ResponseCodes.new_by_code`,
5
+ # Do not miss `CzechPostB2bClient::ResponseCodes.all_classes` and `CzechPostB2bClient::ResponseCodes.new_by_code`,
4
6
  # they have to be at end of module to work properly
5
7
  module CzechPostB2bClient
6
- module ResponseCodes
8
+ module ResponseCodes # rubocop:disable Metrics/ModuleLength
7
9
  class BaseCode
8
- @code = 'undefined'
9
- @text = '_NONE_'
10
- @decription = 'Unspecified B2B response code, is it listed in /doc/.../ResponseCodes.ods'
10
+ @code = 'undefined'
11
+ @text = '_NONE_'
12
+ @decription = 'Unspecified B2B response code, is it listed in /doc/.../ResponseCodes.ods'
11
13
 
12
- def self.code
13
- @code
14
- end
14
+ class << self
15
+ attr_reader :code
16
+ end
15
17
 
16
- def self.text
17
- @text
18
- end
18
+ class << self
19
+ attr_reader :text
20
+ end
19
21
 
20
- def self.description
21
- @description
22
- end
22
+ class << self
23
+ attr_reader :description
24
+ end
23
25
 
24
26
  def self.error?
25
27
  @type == :error
@@ -29,9 +31,9 @@ module CzechPostB2bClient
29
31
  @type == :info
30
32
  end
31
33
 
32
- def self.type
33
- @type
34
- end
34
+ class << self
35
+ attr_reader :type
36
+ end
35
37
 
36
38
  def self.to_s
37
39
  "ResponseCode[#{code} #{text}] #{description}"
@@ -279,7 +281,8 @@ module CzechPostB2bClient
279
281
  class InvalidAddressForBigPackage < CzechPostB2bClient::ResponseCodes::BaseCode
280
282
  @code = 119
281
283
  @text = 'INVALID_ADRESS'
282
- @description = 'Adresa odesílatele není vhodná pro produkt Nadrozměrná zásilka(adresa obsahuje údaj P.O.Box nebo Poste restante)!'
284
+ @description = 'Adresa odesílatele není vhodná pro produkt Nadrozměrná zásilka' \
285
+ '(adresa obsahuje údaj P.O.Box nebo Poste restante)!'
283
286
  @type = :chyba
284
287
  end
285
288
 
@@ -587,21 +590,24 @@ module CzechPostB2bClient
587
590
  class CODAmountTooBig < CzechPostB2bClient::ResponseCodes::BaseCode
588
591
  @code = 177
589
592
  @text = 'INVALID_AMOUNT'
590
- @description = 'Limit pro uložení zásilky na Výdejním místě je pro Dobírku max. 50.000,- Kč. Zásilka bude uložena na poště, která je Výdejnímu místu nadřízená.'
593
+ @description = 'Limit pro uložení zásilky na Výdejním místě je pro Dobírku max. 50.000,- Kč.' \
594
+ ' Zásilka bude uložena na poště, která je Výdejnímu místu nadřízená.'
591
595
  @type = :chyba
592
596
  end
593
597
 
594
598
  class PriceTooBig < CzechPostB2bClient::ResponseCodes::BaseCode
595
599
  @code = 178
596
600
  @text = 'INVALID_PRICE'
597
- @description = 'Limit pro uložení zásilky na Výdejním místě je pro Udanou cenu a Dobírku max. 50.000,- Kč. Zásilka bude uložena na poště, která je Výdejnímu místu nadřízená.'
601
+ @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
+ ' Zásilka bude uložena na poště, která je Výdejnímu místu nadřízená.'
598
603
  @type = :chyba
599
604
  end
600
605
 
601
606
  class PriceAndCODAmountTooBig < CzechPostB2bClient::ResponseCodes::BaseCode
602
607
  @code = 179
603
608
  @text = 'INVALID_PRICE_AND_AMOUNT'
604
- @description = 'Limit pro uložení zásilky na Výdejním místě je pro Udanou cenu a Dobírku max. 50.000,- Kč. Zásilka bude uložena na poště, která je Výdejnímu místu nadřízená.'
609
+ @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
+ ' Zásilka bude uložena na poště, která je Výdejnímu místu nadřízená.'
605
611
  @type = :chyba
606
612
  end
607
613
 
@@ -1061,7 +1067,6 @@ module CzechPostB2bClient
1061
1067
  @type = :chyba
1062
1068
  end
1063
1069
 
1064
-
1065
1070
  class AddressSuitableForLocalDelivery < CzechPostB2bClient::ResponseCodes::BaseCode
1066
1071
  @code = 257
1067
1072
  @text = 'INVALID_ADRESS' # no kidding! Like 6 times same text?
@@ -1289,7 +1294,8 @@ module CzechPostB2bClient
1289
1294
  class InfoService29And47 < CzechPostB2bClient::ResponseCodes::BaseCode
1290
1295
  @code = 324
1291
1296
  @text = 'INFO_SERVICE_29+47'
1292
- @description = 'Zásilku s výškou nad 150cm nelze podat jako Balík Do ruky se sl.47, ale musí být využit Balík Nadrozměr v kategorii NZ 2'
1297
+ @description = 'Zásilku s výškou nad 150cm nelze podat jako Balík Do ruky se sl.47,' \
1298
+ ' ale musí být využit Balík Nadrozměr v kategorii NZ 2'
1293
1299
  @type = :info
1294
1300
  end
1295
1301
 
@@ -1755,14 +1761,14 @@ module CzechPostB2bClient
1755
1761
  @type = :info
1756
1762
  end
1757
1763
 
1758
- class InfoMissingPartCityServiceDeliveryOnSundayOrHolidayMayNotBeRealized < CzechPostB2bClient::ResponseCodes::BaseCode
1764
+ class InfoMissingPartCityServiceDeliveryOnSundayOrHolidayMayNotBeRealized < CzechPostB2bClient::ResponseCodes::BaseCode # rubocop:disable Layout/LineLength
1759
1765
  @code = 391
1760
1766
  @text = 'INFO_MISSING_PART_CITY_SERVICE_DELIVERY_ON_SUNDAY/HOLIDAY_MAY_NOT_BE_REALIZED'
1761
- @description = 'Neuvedena část obce - sl. Gar. čas dodání v Ne/Sv nemusí být realizována'
1767
+ @description = 'Neuvedena část obce - služba Garantovaný čas dodání v Ne/Sv nemusí být realizována'
1762
1768
  @type = :info
1763
1769
  end
1764
1770
 
1765
- class NfoCancelService9 < CzechPostB2bClient::ResponseCodes::BaseCode
1771
+ class InfoCancelService9 < CzechPostB2bClient::ResponseCodes::BaseCode
1766
1772
  @code = 392
1767
1773
  @text = 'NFO_CANCEL_SERVICE_9'
1768
1774
  @description = 'Zrušena nepovolená služba 9 Prioritně'
@@ -1881,20 +1887,17 @@ module CzechPostB2bClient
1881
1887
  @type = :info
1882
1888
  end
1883
1889
 
1884
- def all_code_classes
1885
- ObjectSpace.each_object(CzechPostB2bClient::ResponseCodes::BaseCode.singleton_class)
1890
+ # must be at end to collect all classes defined before
1891
+ def self.all_classes
1892
+ base_class = CzechPostB2bClient::ResponseCodes::BaseCode
1893
+ ObjectSpace.each_object(base_class.singleton_class).reject { |c| c == base_class }
1886
1894
  end
1887
1895
 
1888
- module_function :all_code_classes
1889
-
1890
- def new_by_code(code)
1891
- klass = all_code_classes.detect { |k| k.code == code }
1896
+ def self.new_by_code(code)
1897
+ klass = all_classes.detect { |k| k.code == code }
1892
1898
  raise "ResponseCode with code: #{code} is unknown!" unless klass
1893
1899
 
1894
1900
  klass.new
1895
1901
  end
1896
-
1897
- module_function :new_by_code
1898
1902
  end
1899
1903
  end
1900
-
@@ -6,3 +6,4 @@ require 'czech_post_b2b_client/response_parsers/get_parcels_printing_parser'
6
6
  require 'czech_post_b2b_client/response_parsers/get_parcel_state_parser'
7
7
  require 'czech_post_b2b_client/response_parsers/get_result_parcels_parser'
8
8
  require 'czech_post_b2b_client/response_parsers/send_parcels_parser'
9
+ require 'czech_post_b2b_client/response_parsers/parcel_service_sync_parser'
@@ -22,14 +22,14 @@ module CzechPostB2bClient
22
22
  strip_namespace: true,
23
23
  symbolize_keys: false,
24
24
  mode: :hash_no_attrs)
25
- rescue Ox::ParseError => error
26
- handle_parsing_error(error)
25
+ rescue Ox::ParseError => e
26
+ handle_parsing_error(e)
27
27
  end
28
28
 
29
29
  def safely_build_result
30
30
  build_result
31
- rescue NoMethodError => error # NoMethodError: undefined method `dig' for nil:NilClass
32
- handle_result_building_error(error)
31
+ rescue NoMethodError => e # NoMethodError: undefined method `dig' for nil:NilClass
32
+ handle_result_building_error(e)
33
33
  end
34
34
 
35
35
  def build_result
@@ -37,7 +37,7 @@ module CzechPostB2bClient
37
37
  request: { created_at: request_data.time_stamp,
38
38
  contract_id: request_data.id_contract,
39
39
  request_id: request_data.id_ext_transaction },
40
- response: { created_at: Time.parse(response_header.dig('timeStamp')) }
40
+ response: { created_at: response_time }
41
41
  }
42
42
  end
43
43
 
@@ -50,7 +50,9 @@ module CzechPostB2bClient
50
50
  end
51
51
 
52
52
  def response_root_node
53
- return response_service_data.dig(response_root_node_name) if response_service_data.keys.include?(response_root_node_name)
53
+ if response_service_data.keys.include?(response_root_node_name)
54
+ return response_service_data.dig(response_root_node_name)
55
+ end
54
56
 
55
57
  errors.add(:xml, "Cannot find `#{response_root_node_name}` in `serviceData` node.")
56
58
  fail_on_structure_parsing
@@ -67,11 +69,17 @@ module CzechPostB2bClient
67
69
  id_contract: b2b_request_hash.dig('idContract').to_s)
68
70
  end
69
71
 
72
+ def response_time
73
+ Time.parse(response_header.dig('timeStamp'))
74
+ rescue TypeError
75
+ Time.now.utc
76
+ end
77
+
70
78
  def state_hash_from(hash)
71
79
  state_hash = hash || { 'responseCode' => '999', 'responseText' => 'Unknown' }
72
80
  state_hash = state_hash.first if state_hash.is_a?(Array) # more <doParcelStateResponse> elements
73
81
 
74
- { code: state_hash['responseCode'].to_i, text: state_hash['responseText'].to_s}
82
+ { code: state_hash['responseCode'].to_i, text: state_hash['responseText'].to_s }
75
83
  end
76
84
 
77
85
  def handle_parsing_error(error)
@@ -24,11 +24,12 @@ module CzechPostB2bClient
24
24
  [response_root_node.dig('parcel')].flatten.compact # to always get array of hash(es)
25
25
  end
26
26
 
27
- def parcel_data_from(rp_hash)
27
+ def parcel_data_from(rp_hash) # rubocop:disable Metrics/AbcSize
28
28
  {
29
29
  parcel_type: rp_hash['parcelType'].to_s,
30
- weight_in_kg: rp_hash['weight'].nil? ? nil : rp_hash['weight'].to_f, # hopefully it is in KG
31
- cash_on_delivery: { amount: (rp_hash['amount'] || 0).to_f, currency_iso_code: rp_hash['currency'].to_s },
30
+ weight_in_kg: rp_hash['weight'].nil? ? nil : rp_hash['weight'].to_f,
31
+ cash_on_delivery: { amount: (rp_hash['amount'] || 0).to_f,
32
+ currency_iso_code: rp_hash['currency'].to_s },
32
33
  pieces: (rp_hash['quantityParcel'] || 1).to_i,
33
34
  deposited_until: rp_hash['depositTo'].nil? ? nil : Date.parse(rp_hash['depositTo']),
34
35
  deposited_for_days: rp_hash['timeDeposit'].nil? ? nil : rp_hash['timeDeposit'].to_i,
@@ -1,5 +1,6 @@
1
1
  # frozen_string_literal: true
2
- require "base64"
2
+
3
+ require 'base64'
3
4
 
4
5
  module CzechPostB2bClient
5
6
  module ResponseParsers
@@ -38,16 +38,19 @@ module CzechPostB2bClient
38
38
  end
39
39
 
40
40
  def updated_result_value_for(value, parcel_params_result_hash)
41
- pd_hash=parcel_data_from(parcel_params_result_hash)
41
+ pd_hash = parcel_data_from(parcel_params_result_hash)
42
42
 
43
43
  return pd_hash if value.nil?
44
44
 
45
- # more doParcelParamsResult nodes for one parcel_id => probably errors
45
+ # merging states
46
+ value[:states] = (value[:states] + pd_hash[:states]).sort { |a, b| a[:code] <=> b[:code] }
47
+
48
+ # more parcel_codes for one parcel_id => probably errors
46
49
  old_p_code = value[:parcel_code]
47
50
  new_p_code = pd_hash[:parcel_code]
48
-
49
- value[:states] = (value[:states] + pd_hash[:states]).sort { |a, b| a[:code] <=> b[:code] }
50
- raise "Two different parcel_codes [#{old_p_code}, #{new_p_code}] for parcel_id:'#{parcel_id}'" if old_p_code != new_p_code
51
+ if old_p_code != new_p_code
52
+ raise "Two different parcel_codes [#{old_p_code}, #{new_p_code}] for parcel_id:'#{parcel_id}'"
53
+ end
51
54
 
52
55
  value
53
56
  end
@@ -0,0 +1,82 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'base64'
4
+
5
+ module CzechPostB2bClient
6
+ module ResponseParsers
7
+ class ParcelServiceSyncParser < BaseParser
8
+ def build_result
9
+ super
10
+ @result[:response][:state] = state_hash_from(response_state_response)
11
+ @result[:parcel] = parcel_data_hash
12
+ end
13
+
14
+ def parcel_data_hash
15
+ parcel_id = nil
16
+ pdh = response_parcel_hashes.each_with_object({}) do |rp_hash, result|
17
+ parcel_id = parcel_parcel_id_from(rp_hash)
18
+ result[parcel_id] = updated_result_value_for(result[parcel_id], rp_hash)
19
+ end
20
+ pdh[parcel_id].merge!(printings: print_data_from(response_print_hash))
21
+
22
+ pdh
23
+ end
24
+
25
+ def response_root_node_name
26
+ 'parcelServiceSyncResponse'
27
+ end
28
+
29
+ def response_state_response
30
+ response_root_node.dig('responseHeader', 'resultHeader')
31
+ end
32
+
33
+ def response_parcel_hashes
34
+ [response_root_node.dig('responseHeader', 'resultParcelData')].flatten.compact # to always get array of hash(es)
35
+ end
36
+
37
+ def response_print_hash
38
+ response_root_node.dig('responsePrintParams')
39
+ end
40
+
41
+ def parcel_parcel_id_from(rp_hash)
42
+ rp_hash['recordNumber'].to_s
43
+ end
44
+
45
+ def parcel_data_from(rp_hash)
46
+ { parcel_code: rp_hash['parcelCode'],
47
+ states: [state_hash_from(rp_hash.dig('parcelDataResponse'))] }
48
+ end
49
+
50
+ def print_data_from(print_hash)
51
+ return nil if print_hash.nil? || print_hash.empty?
52
+
53
+ { pdf_content: pdf_content_from(print_hash.dig('file')),
54
+ state: state_hash_from(print_hash.dig('printParamsResponse')) }
55
+ end
56
+
57
+ def pdf_content_from(pdf_content_encoded)
58
+ return nil if pdf_content_encoded.nil?
59
+
60
+ ::Base64.decode64(pdf_content_encoded)
61
+ end
62
+
63
+ def updated_result_value_for(value, parcel_params_result_hash)
64
+ pd_hash = parcel_data_from(parcel_params_result_hash)
65
+
66
+ return pd_hash if value.nil?
67
+
68
+ # merging states
69
+ value[:states] = (value[:states] + pd_hash[:states]).sort { |a, b| a[:code] <=> b[:code] }
70
+
71
+ # more parcel_codes for one parcel_id => probably errors
72
+ old_p_code = value[:parcel_code]
73
+ new_p_code = pd_hash[:parcel_code]
74
+ if old_p_code != new_p_code
75
+ raise "Two different parcel_codes [#{old_p_code}, #{new_p_code}] for parcel_id:'#{parcel_id}'"
76
+ end
77
+
78
+ value
79
+ end
80
+ end
81
+ end
82
+ end
@@ -5,8 +5,30 @@ module CzechPostB2bClient
5
5
  class SendParcelsParser < BaseParser
6
6
  def build_result
7
7
  super
8
- @result[:async_result] = { transaction_id: response_header.dig('idTransaction'),
9
- processing_end_expected_at: Time.parse(response_header.dig('timeStampProcessing')) } # it is NOT CORRECT! They return CET time value with UTC timezone
8
+
9
+ @result[:async_result] = {
10
+ transaction_id: response_header.dig('idTransaction'),
11
+ processing_end_expected_at: parse_time_with_correction(response_header.dig('timeStampProcessing'))
12
+ }
13
+ end
14
+
15
+ def parse_time_with_correction(b2b_time_str)
16
+ # b2b time in XML is NOT CORRECT! They return CET time value with UTC timezone
17
+ # Like `2016-02-25T09:30:03.678Z`, which is actually `2016-02-25T09:30:03.678+0100` (CET)
18
+ # Or `2016-05-25T09:30:03.678Z`, which is actually `2016-05-25T09:30:03.678+0200` (CET + DST)
19
+ # But we must be prepare for unnoticed fix by CPost
20
+
21
+ # unfortunattely this can be done for only freshly generated XMLs (comparing b2b_time with Time.now.utc)
22
+ # but we have to kepp it compatible for old XML
23
+ # so we pass it up and leave comments in documenation
24
+ # Users of this gem will have to care of it
25
+
26
+ Time.parse(b2b_time_str)
27
+ end
28
+
29
+ # just for info
30
+ def cpost_time_zone
31
+ timezone('Europe/Prague')
10
32
  end
11
33
  end
12
34
  end