czech_post_b2b_client 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (397) hide show
  1. checksums.yaml +7 -0
  2. data/.rubocop.yml +40 -0
  3. data/CHANGELOG.md +14 -0
  4. data/CODE_OF_CONDUCT.md +74 -0
  5. data/Gemfile +8 -0
  6. data/LICENSE.txt +21 -0
  7. data/README.md +281 -0
  8. data/Rakefile +12 -0
  9. data/bin/console +15 -0
  10. data/bin/setup +8 -0
  11. data/certs/postsignum_qca4_root.pem +41 -0
  12. data/certs/postsignum_vca5_sub.pem +44 -0
  13. data/doc/CzechPostB2bClient.html +479 -0
  14. data/doc/CzechPostB2bClient/B2BErrors.html +242 -0
  15. data/doc/CzechPostB2bClient/B2BErrors/BadRequestError.html +145 -0
  16. data/doc/CzechPostB2bClient/B2BErrors/BaseError.html +376 -0
  17. data/doc/CzechPostB2bClient/B2BErrors/CustomerRequestsCountOverflowError.html +145 -0
  18. data/doc/CzechPostB2bClient/B2BErrors/InternalB2BServerError.html +145 -0
  19. data/doc/CzechPostB2bClient/B2BErrors/InternalBackendServerError.html +145 -0
  20. data/doc/CzechPostB2bClient/B2BErrors/InternalDataPersistenceServerError.html +145 -0
  21. data/doc/CzechPostB2bClient/B2BErrors/ProcessingUnfinishedYetError.html +145 -0
  22. data/doc/CzechPostB2bClient/B2BErrors/ServiceBusyError.html +145 -0
  23. data/doc/CzechPostB2bClient/B2BErrors/UnauthorizedContractAccessError.html +145 -0
  24. data/doc/CzechPostB2bClient/B2BErrors/UnauthorizedRoleAccessError.html +145 -0
  25. data/doc/CzechPostB2bClient/Configuration.html +1005 -0
  26. data/doc/CzechPostB2bClient/Error.html +128 -0
  27. data/doc/CzechPostB2bClient/PrintingTemplates.html +199 -0
  28. data/doc/CzechPostB2bClient/PrintingTemplates/AddressData3x8.html +129 -0
  29. data/doc/CzechPostB2bClient/PrintingTemplates/AdressLabel.html +117 -0
  30. data/doc/CzechPostB2bClient/PrintingTemplates/AdressLabel/Blank.html +129 -0
  31. data/doc/CzechPostB2bClient/PrintingTemplates/AdressLabel/Blank4OnPage.html +129 -0
  32. data/doc/CzechPostB2bClient/PrintingTemplates/AdressLabel/BlankLandscape.html +129 -0
  33. data/doc/CzechPostB2bClient/PrintingTemplates/AdressLabel/ForeignPackage.html +115 -0
  34. data/doc/CzechPostB2bClient/PrintingTemplates/AdressLabel/ForeignPackage/EMS.html +129 -0
  35. data/doc/CzechPostB2bClient/PrintingTemplates/AdressLabel/ForeignPackage/EMS2x4.html +129 -0
  36. data/doc/CzechPostB2bClient/PrintingTemplates/AdressLabel/ForeignPackage/Standard.html +129 -0
  37. data/doc/CzechPostB2bClient/PrintingTemplates/AdressLabel/ForeignPackage/Standard4OnPage.html +129 -0
  38. data/doc/CzechPostB2bClient/PrintingTemplates/AdressLabel/ForeignPackage/Valuable.html +129 -0
  39. data/doc/CzechPostB2bClient/PrintingTemplates/AdressLabel/ForeignPackage/Valuable4OnPage.html +129 -0
  40. data/doc/CzechPostB2bClient/PrintingTemplates/AdressLabel/Simple.html +129 -0
  41. data/doc/CzechPostB2bClient/PrintingTemplates/AdressLabel/SimpleWithCODVoucherA.html +129 -0
  42. data/doc/CzechPostB2bClient/PrintingTemplates/Base.html +279 -0
  43. data/doc/CzechPostB2bClient/PrintingTemplates/CODVoucherA.html +129 -0
  44. data/doc/CzechPostB2bClient/PrintingTemplates/CODVoucherA3OnPage.html +129 -0
  45. data/doc/CzechPostB2bClient/PrintingTemplates/CODVoucherC.html +129 -0
  46. data/doc/CzechPostB2bClient/PrintingTemplates/CODVoucherForCSOB.html +129 -0
  47. data/doc/CzechPostB2bClient/PrintingTemplates/CustomDeclarationCN22.html +129 -0
  48. data/doc/CzechPostB2bClient/PrintingTemplates/CustomDeclarationCN23.html +129 -0
  49. data/doc/CzechPostB2bClient/PrintingTemplates/DeliveryTicket.html +129 -0
  50. data/doc/CzechPostB2bClient/PrintingTemplates/Envelope.html +115 -0
  51. data/doc/CzechPostB2bClient/PrintingTemplates/Envelope/EnvelopeB4.html +129 -0
  52. data/doc/CzechPostB2bClient/PrintingTemplates/Envelope/EnvelopeC5.html +129 -0
  53. data/doc/CzechPostB2bClient/PrintingTemplates/Envelope/EnvelopeC6.html +129 -0
  54. data/doc/CzechPostB2bClient/PrintingTemplates/Envelope/EnvelopeDL.html +129 -0
  55. data/doc/CzechPostB2bClient/PrintingTemplates/HarmonizedLabel.html +141 -0
  56. data/doc/CzechPostB2bClient/PrintingTemplates/HarmonizedLabel4OnPage.html +129 -0
  57. data/doc/CzechPostB2bClient/PrintingTemplates/IntegratedDocument.html +129 -0
  58. data/doc/CzechPostB2bClient/PrintingTemplates/RRLabels3x8.html +129 -0
  59. data/doc/CzechPostB2bClient/RequestBuilders.html +117 -0
  60. data/doc/CzechPostB2bClient/RequestBuilders/BaseBuilder.html +396 -0
  61. data/doc/CzechPostB2bClient/RequestBuilders/GetParcelStateBuilder.html +329 -0
  62. data/doc/CzechPostB2bClient/RequestBuilders/GetParcelsPrintingBuilder.html +470 -0
  63. data/doc/CzechPostB2bClient/RequestBuilders/GetResultParcelsBuilder.html +329 -0
  64. data/doc/CzechPostB2bClient/RequestBuilders/GetStatsBuilder.html +403 -0
  65. data/doc/CzechPostB2bClient/RequestBuilders/SendParcelsBuilder.html +403 -0
  66. data/doc/CzechPostB2bClient/ResponseCodes.html +242 -0
  67. data/doc/CzechPostB2bClient/ResponseCodes/AddressAllowedForBalikovnaOnly.html +134 -0
  68. data/doc/CzechPostB2bClient/ResponseCodes/AddressIsNotValidForSubject.html +134 -0
  69. data/doc/CzechPostB2bClient/ResponseCodes/AddressNeedsPhoneNumber.html +134 -0
  70. data/doc/CzechPostB2bClient/ResponseCodes/AddressSuitableForLocalDelivery.html +134 -0
  71. data/doc/CzechPostB2bClient/ResponseCodes/AddressValidOnlyForNaPostu.html +134 -0
  72. data/doc/CzechPostB2bClient/ResponseCodes/AddressValidOnlyForNaPostuDuplicate.html +134 -0
  73. data/doc/CzechPostB2bClient/ResponseCodes/AddresseeCityRequired.html +134 -0
  74. data/doc/CzechPostB2bClient/ResponseCodes/AlreadyAssignedOrderNumber.html +134 -0
  75. data/doc/CzechPostB2bClient/ResponseCodes/BadAddressee.html +134 -0
  76. data/doc/CzechPostB2bClient/ResponseCodes/BadCODAmount.html +134 -0
  77. data/doc/CzechPostB2bClient/ResponseCodes/BadFormatReturnNumberDays.html +134 -0
  78. data/doc/CzechPostB2bClient/ResponseCodes/BadHeight.html +134 -0
  79. data/doc/CzechPostB2bClient/ResponseCodes/BadLength.html +134 -0
  80. data/doc/CzechPostB2bClient/ResponseCodes/BadPrefix.html +134 -0
  81. data/doc/CzechPostB2bClient/ResponseCodes/BadPrefixForAddress.html +134 -0
  82. data/doc/CzechPostB2bClient/ResponseCodes/BadPrice.html +134 -0
  83. data/doc/CzechPostB2bClient/ResponseCodes/BadVariableSymbol.html +134 -0
  84. data/doc/CzechPostB2bClient/ResponseCodes/BadWeight.html +134 -0
  85. data/doc/CzechPostB2bClient/ResponseCodes/BadWidth.html +134 -0
  86. data/doc/CzechPostB2bClient/ResponseCodes/BaseCode.html +550 -0
  87. data/doc/CzechPostB2bClient/ResponseCodes/BatchClosed.html +134 -0
  88. data/doc/CzechPostB2bClient/ResponseCodes/BatchInvalid.html +134 -0
  89. data/doc/CzechPostB2bClient/ResponseCodes/BatchUnfinished.html +134 -0
  90. data/doc/CzechPostB2bClient/ResponseCodes/CODAmountOutOfRange.html +134 -0
  91. data/doc/CzechPostB2bClient/ResponseCodes/CODAmountTooBig.html +134 -0
  92. data/doc/CzechPostB2bClient/ResponseCodes/CanceledOrderNumber.html +134 -0
  93. data/doc/CzechPostB2bClient/ResponseCodes/CustomGoodQuantityOutOfRange.html +134 -0
  94. data/doc/CzechPostB2bClient/ResponseCodes/CustomerIDNotInAccordanceWithParcelCode.html +134 -0
  95. data/doc/CzechPostB2bClient/ResponseCodes/DensityOutOfRange.html +134 -0
  96. data/doc/CzechPostB2bClient/ResponseCodes/DuplicateDuplicateParcelCode.html +134 -0
  97. data/doc/CzechPostB2bClient/ResponseCodes/DuplicateParcel.html +134 -0
  98. data/doc/CzechPostB2bClient/ResponseCodes/DuplicateParcelCode.html +134 -0
  99. data/doc/CzechPostB2bClient/ResponseCodes/DuplicitParcelCode.html +134 -0
  100. data/doc/CzechPostB2bClient/ResponseCodes/FullSequence.html +134 -0
  101. data/doc/CzechPostB2bClient/ResponseCodes/FullSequenceDuplicate.html +134 -0
  102. data/doc/CzechPostB2bClient/ResponseCodes/IllegalCombinationOfServices.html +134 -0
  103. data/doc/CzechPostB2bClient/ResponseCodes/InfoAddRequiredService75.html +134 -0
  104. data/doc/CzechPostB2bClient/ResponseCodes/InfoAddService1A.html +134 -0
  105. data/doc/CzechPostB2bClient/ResponseCodes/InfoAddService1B.html +134 -0
  106. data/doc/CzechPostB2bClient/ResponseCodes/InfoAddService1D.html +134 -0
  107. data/doc/CzechPostB2bClient/ResponseCodes/InfoAddService9.html +134 -0
  108. data/doc/CzechPostB2bClient/ResponseCodes/InfoAddressWasModified.html +134 -0
  109. data/doc/CzechPostB2bClient/ResponseCodes/InfoAddresseeToLong.html +134 -0
  110. data/doc/CzechPostB2bClient/ResponseCodes/InfoCancelCustCardNumber.html +134 -0
  111. data/doc/CzechPostB2bClient/ResponseCodes/InfoCancelCustCardNumberAddresseeDocument.html +134 -0
  112. data/doc/CzechPostB2bClient/ResponseCodes/InfoCancelHeight.html +134 -0
  113. data/doc/CzechPostB2bClient/ResponseCodes/InfoCancelLength.html +134 -0
  114. data/doc/CzechPostB2bClient/ResponseCodes/InfoCancelMobilePhoneOrEmailAddresseeDocument.html +134 -0
  115. data/doc/CzechPostB2bClient/ResponseCodes/InfoCancelPalettsNumber.html +134 -0
  116. data/doc/CzechPostB2bClient/ResponseCodes/InfoCancelPersonalIdentificationNumber.html +134 -0
  117. data/doc/CzechPostB2bClient/ResponseCodes/InfoCancelService1AB.html +134 -0
  118. data/doc/CzechPostB2bClient/ResponseCodes/InfoCancelService1ABForService40.html +134 -0
  119. data/doc/CzechPostB2bClient/ResponseCodes/InfoCancelService1AForPostCode.html +134 -0
  120. data/doc/CzechPostB2bClient/ResponseCodes/InfoCancelService1AForService40.html +134 -0
  121. data/doc/CzechPostB2bClient/ResponseCodes/InfoCancelService1AWith1B.html +134 -0
  122. data/doc/CzechPostB2bClient/ResponseCodes/InfoCancelService1B.html +134 -0
  123. data/doc/CzechPostB2bClient/ResponseCodes/InfoCancelService1BAddService1A.html +134 -0
  124. data/doc/CzechPostB2bClient/ResponseCodes/InfoCancelService1BForPostCode.html +134 -0
  125. data/doc/CzechPostB2bClient/ResponseCodes/InfoCancelService1BWith1A.html +134 -0
  126. data/doc/CzechPostB2bClient/ResponseCodes/InfoCancelService1D.html +134 -0
  127. data/doc/CzechPostB2bClient/ResponseCodes/InfoCancelService1E.html +134 -0
  128. data/doc/CzechPostB2bClient/ResponseCodes/InfoCancelService1V.html +134 -0
  129. data/doc/CzechPostB2bClient/ResponseCodes/InfoCancelService25.html +134 -0
  130. data/doc/CzechPostB2bClient/ResponseCodes/InfoCancelService27.html +134 -0
  131. data/doc/CzechPostB2bClient/ResponseCodes/InfoCancelService29.html +134 -0
  132. data/doc/CzechPostB2bClient/ResponseCodes/InfoCancelService30.html +134 -0
  133. data/doc/CzechPostB2bClient/ResponseCodes/InfoCancelService31.html +134 -0
  134. data/doc/CzechPostB2bClient/ResponseCodes/InfoCancelService34.html +134 -0
  135. data/doc/CzechPostB2bClient/ResponseCodes/InfoCancelService34InvalidPhoneNumber.html +134 -0
  136. data/doc/CzechPostB2bClient/ResponseCodes/InfoCancelService45.html +134 -0
  137. data/doc/CzechPostB2bClient/ResponseCodes/InfoCancelService45InvalidPhoneNumber.html +134 -0
  138. data/doc/CzechPostB2bClient/ResponseCodes/InfoCancelService46.html +134 -0
  139. data/doc/CzechPostB2bClient/ResponseCodes/InfoCancelService47.html +134 -0
  140. data/doc/CzechPostB2bClient/ResponseCodes/InfoCancelService5B.html +134 -0
  141. data/doc/CzechPostB2bClient/ResponseCodes/InfoCancelService5BAnd5C.html +134 -0
  142. data/doc/CzechPostB2bClient/ResponseCodes/InfoCancelService5BAnd5D.html +134 -0
  143. data/doc/CzechPostB2bClient/ResponseCodes/InfoCancelService5C.html +134 -0
  144. data/doc/CzechPostB2bClient/ResponseCodes/InfoCancelService5CAnd5D.html +134 -0
  145. data/doc/CzechPostB2bClient/ResponseCodes/InfoCancelService5D.html +134 -0
  146. data/doc/CzechPostB2bClient/ResponseCodes/InfoCancelVSVoucher.html +134 -0
  147. data/doc/CzechPostB2bClient/ResponseCodes/InfoCancelWidth.html +134 -0
  148. data/doc/CzechPostB2bClient/ResponseCodes/InfoCityChanged.html +134 -0
  149. data/doc/CzechPostB2bClient/ResponseCodes/InfoInexactAddress.html +134 -0
  150. data/doc/CzechPostB2bClient/ResponseCodes/InfoInvalidAccount.html +134 -0
  151. data/doc/CzechPostB2bClient/ResponseCodes/InfoInvalidBankCode.html +134 -0
  152. data/doc/CzechPostB2bClient/ResponseCodes/InfoInvalidBirthDay.html +134 -0
  153. data/doc/CzechPostB2bClient/ResponseCodes/InfoInvalidCODAmount.html +134 -0
  154. data/doc/CzechPostB2bClient/ResponseCodes/InfoInvalidCategoryCustomDecalaration.html +134 -0
  155. data/doc/CzechPostB2bClient/ResponseCodes/InfoInvalidEmail.html +134 -0
  156. data/doc/CzechPostB2bClient/ResponseCodes/InfoInvalidMobilePhoneNumber.html +134 -0
  157. data/doc/CzechPostB2bClient/ResponseCodes/InfoInvalidPhoneNumber.html +134 -0
  158. data/doc/CzechPostB2bClient/ResponseCodes/InfoInvalidPrefixAccount.html +134 -0
  159. data/doc/CzechPostB2bClient/ResponseCodes/InfoInvalidPrice.html +134 -0
  160. data/doc/CzechPostB2bClient/ResponseCodes/InfoInvalidSpecificSymbol.html +134 -0
  161. data/doc/CzechPostB2bClient/ResponseCodes/InfoInvalidTelephoneNumber.html +134 -0
  162. data/doc/CzechPostB2bClient/ResponseCodes/InfoInvalidWeight.html +134 -0
  163. data/doc/CzechPostB2bClient/ResponseCodes/InfoMissingPartCityServiceDeliveryOnSundayOrHolidayMayNotBeRealized.html +134 -0
  164. data/doc/CzechPostB2bClient/ResponseCodes/InfoPriceIsNotNumber.html +134 -0
  165. data/doc/CzechPostB2bClient/ResponseCodes/InfoPriceIsTooBig.html +134 -0
  166. data/doc/CzechPostB2bClient/ResponseCodes/InfoService29And47.html +134 -0
  167. data/doc/CzechPostB2bClient/ResponseCodes/InfoSpecialPackagingRequest.html +134 -0
  168. data/doc/CzechPostB2bClient/ResponseCodes/InternalApplicationError.html +134 -0
  169. data/doc/CzechPostB2bClient/ResponseCodes/InvalidAddressAddresseeDocumentForParcelType.html +134 -0
  170. data/doc/CzechPostB2bClient/ResponseCodes/InvalidAddressAddresseeDocumentObjectNotFound.html +134 -0
  171. data/doc/CzechPostB2bClient/ResponseCodes/InvalidAddressAddresseeDocumentWrongCity.html +134 -0
  172. data/doc/CzechPostB2bClient/ResponseCodes/InvalidAddressForBalikovna.html +134 -0
  173. data/doc/CzechPostB2bClient/ResponseCodes/InvalidAddressForBigPackage.html +134 -0
  174. data/doc/CzechPostB2bClient/ResponseCodes/InvalidAddressForCODAmountOver20000.html +134 -0
  175. data/doc/CzechPostB2bClient/ResponseCodes/InvalidAddressForParcelType.html +134 -0
  176. data/doc/CzechPostB2bClient/ResponseCodes/InvalidAddressee.html +134 -0
  177. data/doc/CzechPostB2bClient/ResponseCodes/InvalidAmount.html +134 -0
  178. data/doc/CzechPostB2bClient/ResponseCodes/InvalidAmountCurrency.html +134 -0
  179. data/doc/CzechPostB2bClient/ResponseCodes/InvalidAmountType.html +134 -0
  180. data/doc/CzechPostB2bClient/ResponseCodes/InvalidCODAmount.html +134 -0
  181. data/doc/CzechPostB2bClient/ResponseCodes/InvalidCODCurrency.html +134 -0
  182. data/doc/CzechPostB2bClient/ResponseCodes/InvalidCODCurrencyAccordance.html +134 -0
  183. data/doc/CzechPostB2bClient/ResponseCodes/InvalidCategoryCustomDecalaration.html +134 -0
  184. data/doc/CzechPostB2bClient/ResponseCodes/InvalidContentCustomGood.html +134 -0
  185. data/doc/CzechPostB2bClient/ResponseCodes/InvalidCurrencyCustomDecalaration.html +134 -0
  186. data/doc/CzechPostB2bClient/ResponseCodes/InvalidCustomGoodNumber.html +134 -0
  187. data/doc/CzechPostB2bClient/ResponseCodes/InvalidCustomerCardNumber.html +134 -0
  188. data/doc/CzechPostB2bClient/ResponseCodes/InvalidCustomerId.html +134 -0
  189. data/doc/CzechPostB2bClient/ResponseCodes/InvalidDensity.html +134 -0
  190. data/doc/CzechPostB2bClient/ResponseCodes/InvalidEmail.html +134 -0
  191. data/doc/CzechPostB2bClient/ResponseCodes/InvalidHeight.html +134 -0
  192. data/doc/CzechPostB2bClient/ResponseCodes/InvalidHsCodeCustomGood.html +134 -0
  193. data/doc/CzechPostB2bClient/ResponseCodes/InvalidIsoCustomGood.html +134 -0
  194. data/doc/CzechPostB2bClient/ResponseCodes/InvalidIsoCustomGoodFormat.html +134 -0
  195. data/doc/CzechPostB2bClient/ResponseCodes/InvalidLength.html +134 -0
  196. data/doc/CzechPostB2bClient/ResponseCodes/InvalidLocation.html +134 -0
  197. data/doc/CzechPostB2bClient/ResponseCodes/InvalidMRNCode.html +134 -0
  198. data/doc/CzechPostB2bClient/ResponseCodes/InvalidMRNCodeControl.html +134 -0
  199. data/doc/CzechPostB2bClient/ResponseCodes/InvalidNumberClosure.html +134 -0
  200. data/doc/CzechPostB2bClient/ResponseCodes/InvalidOrderNumber.html +134 -0
  201. data/doc/CzechPostB2bClient/ResponseCodes/InvalidParcelBarcode.html +134 -0
  202. data/doc/CzechPostB2bClient/ResponseCodes/InvalidParcelBarcodeDuplicate.html +145 -0
  203. data/doc/CzechPostB2bClient/ResponseCodes/InvalidParcelCode.html +134 -0
  204. data/doc/CzechPostB2bClient/ResponseCodes/InvalidParcelCodeControl.html +134 -0
  205. data/doc/CzechPostB2bClient/ResponseCodes/InvalidParcelResponseCode.html +134 -0
  206. data/doc/CzechPostB2bClient/ResponseCodes/InvalidParcelTypeForID.html +134 -0
  207. data/doc/CzechPostB2bClient/ResponseCodes/InvalidPartnerCode.html +134 -0
  208. data/doc/CzechPostB2bClient/ResponseCodes/InvalidPayday.html +134 -0
  209. data/doc/CzechPostB2bClient/ResponseCodes/InvalidPhoneNumber.html +134 -0
  210. data/doc/CzechPostB2bClient/ResponseCodes/InvalidPostCode.html +134 -0
  211. data/doc/CzechPostB2bClient/ResponseCodes/InvalidPrefixAccordance.html +134 -0
  212. data/doc/CzechPostB2bClient/ResponseCodes/InvalidPrefixCombination.html +134 -0
  213. data/doc/CzechPostB2bClient/ResponseCodes/InvalidPrefixForDimensionsAndFragile.html +134 -0
  214. data/doc/CzechPostB2bClient/ResponseCodes/InvalidPrice.html +134 -0
  215. data/doc/CzechPostB2bClient/ResponseCodes/InvalidPriceCurrency.html +134 -0
  216. data/doc/CzechPostB2bClient/ResponseCodes/InvalidPriceCurrencyAccordance.html +134 -0
  217. data/doc/CzechPostB2bClient/ResponseCodes/InvalidPriceCustomGood.html +134 -0
  218. data/doc/CzechPostB2bClient/ResponseCodes/InvalidQuantityCustomGood.html +134 -0
  219. data/doc/CzechPostB2bClient/ResponseCodes/InvalidResponsibleConsignmentNumber.html +134 -0
  220. data/doc/CzechPostB2bClient/ResponseCodes/InvalidReturnNumberDays.html +134 -0
  221. data/doc/CzechPostB2bClient/ResponseCodes/InvalidService18.html +134 -0
  222. data/doc/CzechPostB2bClient/ResponseCodes/InvalidService19.html +134 -0
  223. data/doc/CzechPostB2bClient/ResponseCodes/InvalidServiceCombination.html +134 -0
  224. data/doc/CzechPostB2bClient/ResponseCodes/InvalidServicesForDimensions.html +134 -0
  225. data/doc/CzechPostB2bClient/ResponseCodes/InvalidSignNumber.html +134 -0
  226. data/doc/CzechPostB2bClient/ResponseCodes/InvalidSubisoCountry.html +134 -0
  227. data/doc/CzechPostB2bClient/ResponseCodes/InvalidTareWeight.html +134 -0
  228. data/doc/CzechPostB2bClient/ResponseCodes/InvalidTiming.html +134 -0
  229. data/doc/CzechPostB2bClient/ResponseCodes/InvalidTransmissionDate.html +134 -0
  230. data/doc/CzechPostB2bClient/ResponseCodes/InvalidTypePrefix.html +134 -0
  231. data/doc/CzechPostB2bClient/ResponseCodes/InvalidUseOfService36.html +134 -0
  232. data/doc/CzechPostB2bClient/ResponseCodes/InvalidUseOfService37.html +134 -0
  233. data/doc/CzechPostB2bClient/ResponseCodes/InvalidUseOfService38.html +134 -0
  234. data/doc/CzechPostB2bClient/ResponseCodes/InvalidWeight.html +134 -0
  235. data/doc/CzechPostB2bClient/ResponseCodes/InvalidWeightCustomGood.html +134 -0
  236. data/doc/CzechPostB2bClient/ResponseCodes/InvalidWeightCustomGoodSummary.html +134 -0
  237. data/doc/CzechPostB2bClient/ResponseCodes/InvalidWeightForService11.html +134 -0
  238. data/doc/CzechPostB2bClient/ResponseCodes/InvalidWidth.html +134 -0
  239. data/doc/CzechPostB2bClient/ResponseCodes/InvalidZPROOrderNumber.html +134 -0
  240. data/doc/CzechPostB2bClient/ResponseCodes/InvalidZPROOrderNumberFormat.html +134 -0
  241. data/doc/CzechPostB2bClient/ResponseCodes/InvalidostCodeOrCity.html +134 -0
  242. data/doc/CzechPostB2bClient/ResponseCodes/MIssingParcelCode.html +134 -0
  243. data/doc/CzechPostB2bClient/ResponseCodes/MissingAddressee.html +134 -0
  244. data/doc/CzechPostB2bClient/ResponseCodes/MissingAddresseeCity.html +134 -0
  245. data/doc/CzechPostB2bClient/ResponseCodes/MissingAddresseeStreet.html +134 -0
  246. data/doc/CzechPostB2bClient/ResponseCodes/MissingAddresseeZipCode.html +134 -0
  247. data/doc/CzechPostB2bClient/ResponseCodes/MissingCODAmount.html +134 -0
  248. data/doc/CzechPostB2bClient/ResponseCodes/MissingCODAmountType.html +134 -0
  249. data/doc/CzechPostB2bClient/ResponseCodes/MissingCategoryCustomDecalaration.html +134 -0
  250. data/doc/CzechPostB2bClient/ResponseCodes/MissingCompanyName.html +134 -0
  251. data/doc/CzechPostB2bClient/ResponseCodes/MissingContentCustomGood.html +134 -0
  252. data/doc/CzechPostB2bClient/ResponseCodes/MissingCurrencyCustomDeclaration.html +134 -0
  253. data/doc/CzechPostB2bClient/ResponseCodes/MissingHandlingInstructions.html +134 -0
  254. data/doc/CzechPostB2bClient/ResponseCodes/MissingHeight.html +134 -0
  255. data/doc/CzechPostB2bClient/ResponseCodes/MissingHsCodeCustomGood.html +134 -0
  256. data/doc/CzechPostB2bClient/ResponseCodes/MissingIsoCustomGood.html +134 -0
  257. data/doc/CzechPostB2bClient/ResponseCodes/MissingLength.html +134 -0
  258. data/doc/CzechPostB2bClient/ResponseCodes/MissingPalettsNumber.html +134 -0
  259. data/doc/CzechPostB2bClient/ResponseCodes/MissingParcelCustomGood.html +134 -0
  260. data/doc/CzechPostB2bClient/ResponseCodes/MissingParcelCustomGoods.html +134 -0
  261. data/doc/CzechPostB2bClient/ResponseCodes/MissingPhoneNumber.html +134 -0
  262. data/doc/CzechPostB2bClient/ResponseCodes/MissingPrefix.html +134 -0
  263. data/doc/CzechPostB2bClient/ResponseCodes/MissingPrice.html +134 -0
  264. data/doc/CzechPostB2bClient/ResponseCodes/MissingPriceCustomGood.html +134 -0
  265. data/doc/CzechPostB2bClient/ResponseCodes/MissingQuantityCustomGood.html +134 -0
  266. data/doc/CzechPostB2bClient/ResponseCodes/MissingRequiredAddresseeDocument.html +134 -0
  267. data/doc/CzechPostB2bClient/ResponseCodes/MissingRequiredAddresseeDocumentDuplicate.html +134 -0
  268. data/doc/CzechPostB2bClient/ResponseCodes/MissingRequiredAddresseeEmail.html +134 -0
  269. data/doc/CzechPostB2bClient/ResponseCodes/MissingRequiredEmail.html +134 -0
  270. data/doc/CzechPostB2bClient/ResponseCodes/MissingRequiredFirstNameAddresseeDocument.html +134 -0
  271. data/doc/CzechPostB2bClient/ResponseCodes/MissingRequiredMRNCode.html +134 -0
  272. data/doc/CzechPostB2bClient/ResponseCodes/MissingRequiredMobileNumber.html +134 -0
  273. data/doc/CzechPostB2bClient/ResponseCodes/MissingRequiredMobileNumberOrEmail.html +134 -0
  274. data/doc/CzechPostB2bClient/ResponseCodes/MissingRequiredParcelCode.html +134 -0
  275. data/doc/CzechPostB2bClient/ResponseCodes/MissingRequiredPayday.html +134 -0
  276. data/doc/CzechPostB2bClient/ResponseCodes/MissingRequiredPhoneNumber.html +134 -0
  277. data/doc/CzechPostB2bClient/ResponseCodes/MissingRequiredPhoneNumberOrEmail.html +134 -0
  278. data/doc/CzechPostB2bClient/ResponseCodes/MissingRequiredPhoneNumberOrWhat.html +134 -0
  279. data/doc/CzechPostB2bClient/ResponseCodes/MissingRequiredPrice.html +134 -0
  280. data/doc/CzechPostB2bClient/ResponseCodes/MissingRequiredService.html +134 -0
  281. data/doc/CzechPostB2bClient/ResponseCodes/MissingRequiredService10.html +134 -0
  282. data/doc/CzechPostB2bClient/ResponseCodes/MissingRequiredService1AB.html +134 -0
  283. data/doc/CzechPostB2bClient/ResponseCodes/MissingRequiredService1X.html +134 -0
  284. data/doc/CzechPostB2bClient/ResponseCodes/MissingRequiredService2X.html +134 -0
  285. data/doc/CzechPostB2bClient/ResponseCodes/MissingRequiredService3X.html +134 -0
  286. data/doc/CzechPostB2bClient/ResponseCodes/MissingRequiredService3XTrinity.html +134 -0
  287. data/doc/CzechPostB2bClient/ResponseCodes/MissingRequiredService4.html +134 -0
  288. data/doc/CzechPostB2bClient/ResponseCodes/MissingRequiredService4X.html +134 -0
  289. data/doc/CzechPostB2bClient/ResponseCodes/MissingRequiredService4x.html +134 -0
  290. data/doc/CzechPostB2bClient/ResponseCodes/MissingRequiredVoucherPrice.html +134 -0
  291. data/doc/CzechPostB2bClient/ResponseCodes/MissingRequiredZPROOrderNumber.html +134 -0
  292. data/doc/CzechPostB2bClient/ResponseCodes/MissingReturnInstructions.html +134 -0
  293. data/doc/CzechPostB2bClient/ResponseCodes/MissingReturnNumberDays.html +134 -0
  294. data/doc/CzechPostB2bClient/ResponseCodes/MissingSenderEmail.html +134 -0
  295. data/doc/CzechPostB2bClient/ResponseCodes/MissingSizeCategory.html +134 -0
  296. data/doc/CzechPostB2bClient/ResponseCodes/MissingSurname.html +134 -0
  297. data/doc/CzechPostB2bClient/ResponseCodes/MissingVariableSymbol.html +134 -0
  298. data/doc/CzechPostB2bClient/ResponseCodes/MissingVariableSymbolDuplicate.html +134 -0
  299. data/doc/CzechPostB2bClient/ResponseCodes/MissingWeightCustomGood.html +134 -0
  300. data/doc/CzechPostB2bClient/ResponseCodes/MissingWidth.html +134 -0
  301. data/doc/CzechPostB2bClient/ResponseCodes/NfoCancelService9.html +134 -0
  302. data/doc/CzechPostB2bClient/ResponseCodes/NoContractService41.html +134 -0
  303. data/doc/CzechPostB2bClient/ResponseCodes/NoContractServiceReturnReceipt.html +134 -0
  304. data/doc/CzechPostB2bClient/ResponseCodes/NotExistingOrderNumber.html +134 -0
  305. data/doc/CzechPostB2bClient/ResponseCodes/Ok.html +134 -0
  306. data/doc/CzechPostB2bClient/ResponseCodes/OverenoVecerniDorucovani.html +134 -0
  307. data/doc/CzechPostB2bClient/ResponseCodes/PalettsNumberOutOfRange.html +134 -0
  308. data/doc/CzechPostB2bClient/ResponseCodes/ParcelCodeNotAllowed.html +134 -0
  309. data/doc/CzechPostB2bClient/ResponseCodes/ParcelCodeNotInAssignedRange.html +134 -0
  310. data/doc/CzechPostB2bClient/ResponseCodes/ParcelDoesNotMeetTheRequirementsForm.html +134 -0
  311. data/doc/CzechPostB2bClient/ResponseCodes/PriceAndCODAmountTooBig.html +134 -0
  312. data/doc/CzechPostB2bClient/ResponseCodes/PriceOutOfRange.html +134 -0
  313. data/doc/CzechPostB2bClient/ResponseCodes/PriceTooBig.html +134 -0
  314. data/doc/CzechPostB2bClient/ResponseCodes/PriceTooLow.html +134 -0
  315. data/doc/CzechPostB2bClient/ResponseCodes/ResponsibleConsignmentNumberCannotBeImported.html +134 -0
  316. data/doc/CzechPostB2bClient/ResponseCodes/ResponsibleConsignmentNumberOutOfRange.html +134 -0
  317. data/doc/CzechPostB2bClient/ResponseCodes/ServicesCombinationNotAllowed.html +134 -0
  318. data/doc/CzechPostB2bClient/ResponseCodes/TransmissionAlreadyClosed.html +134 -0
  319. data/doc/CzechPostB2bClient/ResponseCodes/TransmissionNotExists.html +134 -0
  320. data/doc/CzechPostB2bClient/ResponseCodes/TransmissionOpened.html +134 -0
  321. data/doc/CzechPostB2bClient/ResponseCodes/TransmissionUnfinished.html +134 -0
  322. data/doc/CzechPostB2bClient/ResponseCodes/UnauthorizedAccess.html +134 -0
  323. data/doc/CzechPostB2bClient/ResponseCodes/UnknownAddresseeCity.html +134 -0
  324. data/doc/CzechPostB2bClient/ResponseCodes/UnknownAddresseePostCode.html +134 -0
  325. data/doc/CzechPostB2bClient/ResponseCodes/UnknownPrefix.html +134 -0
  326. data/doc/CzechPostB2bClient/ResponseCodes/VariableSymbolIsNotNumber.html +134 -0
  327. data/doc/CzechPostB2bClient/ResponseCodes/WeightCustomGoodOutOfRange.html +134 -0
  328. data/doc/CzechPostB2bClient/ResponseCodes/WeightIsOutOfRange.html +134 -0
  329. data/doc/CzechPostB2bClient/ResponseCodes/WeightIsOutOfRangeDuplicate.html +134 -0
  330. data/doc/CzechPostB2bClient/ResponseParsers.html +117 -0
  331. data/doc/CzechPostB2bClient/ResponseParsers/BaseParser.html +283 -0
  332. data/doc/CzechPostB2bClient/ResponseParsers/GetParcelStateParser.html +533 -0
  333. data/doc/CzechPostB2bClient/ResponseParsers/GetParcelsPrintingParser.html +463 -0
  334. data/doc/CzechPostB2bClient/ResponseParsers/GetResultParcelsParser.html +625 -0
  335. data/doc/CzechPostB2bClient/ResponseParsers/GetStatsParser.html +347 -0
  336. data/doc/CzechPostB2bClient/ResponseParsers/SendParcelsParser.html +231 -0
  337. data/doc/CzechPostB2bClient/Services.html +117 -0
  338. data/doc/CzechPostB2bClient/Services/AddressSheetsGenerator.html +451 -0
  339. data/doc/CzechPostB2bClient/Services/ApiCaller.html +307 -0
  340. data/doc/CzechPostB2bClient/Services/Communicator.html +220 -0
  341. data/doc/CzechPostB2bClient/Services/DeliveringInspector.html +324 -0
  342. data/doc/CzechPostB2bClient/Services/Orchestrator.html +143 -0
  343. data/doc/CzechPostB2bClient/Services/ParcelsSendProcessUpdater.html +377 -0
  344. data/doc/CzechPostB2bClient/Services/ParcelsSender.html +402 -0
  345. data/doc/CzechPostB2bClient/Services/ParcelsSubmissionCloser.html +337 -0
  346. data/doc/CzechPostB2bClient/Services/TimePeriodStatisticator.html +398 -0
  347. data/doc/SteppedService.html +224 -0
  348. data/doc/SteppedService/Base.html +706 -0
  349. data/doc/SteppedService/Errors.html +365 -0
  350. data/doc/_index.html +2607 -0
  351. data/doc/class_list.html +51 -0
  352. data/doc/css/common.css +1 -0
  353. data/doc/css/full_list.css +58 -0
  354. data/doc/css/style.css +496 -0
  355. data/doc/file.README.html +357 -0
  356. data/doc/file_list.html +56 -0
  357. data/doc/frames.html +17 -0
  358. data/doc/index.html +357 -0
  359. data/doc/js/app.js +303 -0
  360. data/doc/js/full_list.js +216 -0
  361. data/doc/js/jquery.js +4 -0
  362. data/doc/method_list.html +923 -0
  363. data/doc/top-level-namespace.html +110 -0
  364. data/lib/czech_post_b2b_client.rb +37 -0
  365. data/lib/czech_post_b2b_client/b2b_errors.rb +105 -0
  366. data/lib/czech_post_b2b_client/configuration.rb +34 -0
  367. data/lib/czech_post_b2b_client/printing_templates.rb +166 -0
  368. data/lib/czech_post_b2b_client/request_builders.rb +8 -0
  369. data/lib/czech_post_b2b_client/request_builders/base_builder.rb +90 -0
  370. data/lib/czech_post_b2b_client/request_builders/get_parcel_state_builder.rb +44 -0
  371. data/lib/czech_post_b2b_client/request_builders/get_parcels_printing_builder.rb +79 -0
  372. data/lib/czech_post_b2b_client/request_builders/get_result_parcels_builder.rb +28 -0
  373. data/lib/czech_post_b2b_client/request_builders/get_stats_builder.rb +30 -0
  374. data/lib/czech_post_b2b_client/request_builders/send_parcels_builder.rb +294 -0
  375. data/lib/czech_post_b2b_client/response_codes.rb +1900 -0
  376. data/lib/czech_post_b2b_client/response_parsers.rb +8 -0
  377. data/lib/czech_post_b2b_client/response_parsers/base_parser.rb +95 -0
  378. data/lib/czech_post_b2b_client/response_parsers/get_parcel_state_parser.rb +54 -0
  379. data/lib/czech_post_b2b_client/response_parsers/get_parcels_printing_parser.rb +42 -0
  380. data/lib/czech_post_b2b_client/response_parsers/get_result_parcels_parser.rb +56 -0
  381. data/lib/czech_post_b2b_client/response_parsers/get_stats_parser.rb +27 -0
  382. data/lib/czech_post_b2b_client/response_parsers/send_parcels_parser.rb +13 -0
  383. data/lib/czech_post_b2b_client/services.rb +10 -0
  384. data/lib/czech_post_b2b_client/services/address_sheets_generator.rb +55 -0
  385. data/lib/czech_post_b2b_client/services/api_caller.rb +115 -0
  386. data/lib/czech_post_b2b_client/services/communicator.rb +28 -0
  387. data/lib/czech_post_b2b_client/services/delivering_inspector.rb +50 -0
  388. data/lib/czech_post_b2b_client/services/orchestrator.rb +27 -0
  389. data/lib/czech_post_b2b_client/services/parcels_send_process_updater.rb +71 -0
  390. data/lib/czech_post_b2b_client/services/parcels_sender.rb +53 -0
  391. data/lib/czech_post_b2b_client/services/parcels_submission_closer.rb +23 -0
  392. data/lib/czech_post_b2b_client/services/time_period_statisticator.rb +44 -0
  393. data/lib/czech_post_b2b_client/version.rb +5 -0
  394. data/lib/stepped_service.rb +4 -0
  395. data/lib/stepped_service/base.rb +139 -0
  396. data/lib/stepped_service/errors.rb +29 -0
  397. metadata +571 -0
@@ -0,0 +1,303 @@
1
+ (function() {
2
+
3
+ var localStorage = {}, sessionStorage = {};
4
+ try { localStorage = window.localStorage; } catch (e) { }
5
+ try { sessionStorage = window.sessionStorage; } catch (e) { }
6
+
7
+ function createSourceLinks() {
8
+ $('.method_details_list .source_code').
9
+ before("<span class='showSource'>[<a href='#' class='toggleSource'>View source</a>]</span>");
10
+ $('.toggleSource').toggle(function() {
11
+ $(this).parent().nextAll('.source_code').slideDown(100);
12
+ $(this).text("Hide source");
13
+ },
14
+ function() {
15
+ $(this).parent().nextAll('.source_code').slideUp(100);
16
+ $(this).text("View source");
17
+ });
18
+ }
19
+
20
+ function createDefineLinks() {
21
+ var tHeight = 0;
22
+ $('.defines').after(" <a href='#' class='toggleDefines'>more...</a>");
23
+ $('.toggleDefines').toggle(function() {
24
+ tHeight = $(this).parent().prev().height();
25
+ $(this).prev().css('display', 'inline');
26
+ $(this).parent().prev().height($(this).parent().height());
27
+ $(this).text("(less)");
28
+ },
29
+ function() {
30
+ $(this).prev().hide();
31
+ $(this).parent().prev().height(tHeight);
32
+ $(this).text("more...");
33
+ });
34
+ }
35
+
36
+ function createFullTreeLinks() {
37
+ var tHeight = 0;
38
+ $('.inheritanceTree').toggle(function() {
39
+ tHeight = $(this).parent().prev().height();
40
+ $(this).parent().toggleClass('showAll');
41
+ $(this).text("(hide)");
42
+ $(this).parent().prev().height($(this).parent().height());
43
+ },
44
+ function() {
45
+ $(this).parent().toggleClass('showAll');
46
+ $(this).parent().prev().height(tHeight);
47
+ $(this).text("show all");
48
+ });
49
+ }
50
+
51
+ function searchFrameButtons() {
52
+ $('.full_list_link').click(function() {
53
+ toggleSearchFrame(this, $(this).attr('href'));
54
+ return false;
55
+ });
56
+ window.addEventListener('message', function(e) {
57
+ if (e.data === 'navEscape') {
58
+ $('#nav').slideUp(100);
59
+ $('#search a').removeClass('active inactive');
60
+ $(window).focus();
61
+ }
62
+ });
63
+
64
+ $(window).resize(function() {
65
+ if ($('#search:visible').length === 0) {
66
+ $('#nav').removeAttr('style');
67
+ $('#search a').removeClass('active inactive');
68
+ $(window).focus();
69
+ }
70
+ });
71
+ }
72
+
73
+ function toggleSearchFrame(id, link) {
74
+ var frame = $('#nav');
75
+ $('#search a').removeClass('active').addClass('inactive');
76
+ if (frame.attr('src') === link && frame.css('display') !== "none") {
77
+ frame.slideUp(100);
78
+ $('#search a').removeClass('active inactive');
79
+ }
80
+ else {
81
+ $(id).addClass('active').removeClass('inactive');
82
+ if (frame.attr('src') !== link) frame.attr('src', link);
83
+ frame.slideDown(100);
84
+ }
85
+ }
86
+
87
+ function linkSummaries() {
88
+ $('.summary_signature').click(function() {
89
+ document.location = $(this).find('a').attr('href');
90
+ });
91
+ }
92
+
93
+ function summaryToggle() {
94
+ $('.summary_toggle').click(function(e) {
95
+ e.preventDefault();
96
+ localStorage.summaryCollapsed = $(this).text();
97
+ $('.summary_toggle').each(function() {
98
+ $(this).text($(this).text() == "collapse" ? "expand" : "collapse");
99
+ var next = $(this).parent().parent().nextAll('ul.summary').first();
100
+ if (next.hasClass('compact')) {
101
+ next.toggle();
102
+ next.nextAll('ul.summary').first().toggle();
103
+ }
104
+ else if (next.hasClass('summary')) {
105
+ var list = $('<ul class="summary compact" />');
106
+ list.html(next.html());
107
+ list.find('.summary_desc, .note').remove();
108
+ list.find('a').each(function() {
109
+ $(this).html($(this).find('strong').html());
110
+ $(this).parent().html($(this)[0].outerHTML);
111
+ });
112
+ next.before(list);
113
+ next.toggle();
114
+ }
115
+ });
116
+ return false;
117
+ });
118
+ if (localStorage.summaryCollapsed == "collapse") {
119
+ $('.summary_toggle').first().click();
120
+ } else { localStorage.summaryCollapsed = "expand"; }
121
+ }
122
+
123
+ function constantSummaryToggle() {
124
+ $('.constants_summary_toggle').click(function(e) {
125
+ e.preventDefault();
126
+ localStorage.summaryCollapsed = $(this).text();
127
+ $('.constants_summary_toggle').each(function() {
128
+ $(this).text($(this).text() == "collapse" ? "expand" : "collapse");
129
+ var next = $(this).parent().parent().nextAll('dl.constants').first();
130
+ if (next.hasClass('compact')) {
131
+ next.toggle();
132
+ next.nextAll('dl.constants').first().toggle();
133
+ }
134
+ else if (next.hasClass('constants')) {
135
+ var list = $('<dl class="constants compact" />');
136
+ list.html(next.html());
137
+ list.find('dt').each(function() {
138
+ $(this).addClass('summary_signature');
139
+ $(this).text( $(this).text().split('=')[0]);
140
+ if ($(this).has(".deprecated").length) {
141
+ $(this).addClass('deprecated');
142
+ };
143
+ });
144
+ // Add the value of the constant as "Tooltip" to the summary object
145
+ list.find('pre.code').each(function() {
146
+ console.log($(this).parent());
147
+ var dt_element = $(this).parent().prev();
148
+ var tooltip = $(this).text();
149
+ if (dt_element.hasClass("deprecated")) {
150
+ tooltip = 'Deprecated. ' + tooltip;
151
+ };
152
+ dt_element.attr('title', tooltip);
153
+ });
154
+ list.find('.docstring, .tags, dd').remove();
155
+ next.before(list);
156
+ next.toggle();
157
+ }
158
+ });
159
+ return false;
160
+ });
161
+ if (localStorage.summaryCollapsed == "collapse") {
162
+ $('.constants_summary_toggle').first().click();
163
+ } else { localStorage.summaryCollapsed = "expand"; }
164
+ }
165
+
166
+ function generateTOC() {
167
+ if ($('#filecontents').length === 0) return;
168
+ var _toc = $('<ol class="top"></ol>');
169
+ var show = false;
170
+ var toc = _toc;
171
+ var counter = 0;
172
+ var tags = ['h2', 'h3', 'h4', 'h5', 'h6'];
173
+ var i;
174
+ if ($('#filecontents h1').length > 1) tags.unshift('h1');
175
+ for (i = 0; i < tags.length; i++) { tags[i] = '#filecontents ' + tags[i]; }
176
+ var lastTag = parseInt(tags[0][1], 10);
177
+ $(tags.join(', ')).each(function() {
178
+ if ($(this).parents('.method_details .docstring').length != 0) return;
179
+ if (this.id == "filecontents") return;
180
+ show = true;
181
+ var thisTag = parseInt(this.tagName[1], 10);
182
+ if (this.id.length === 0) {
183
+ var proposedId = $(this).attr('toc-id');
184
+ if (typeof(proposedId) != "undefined") this.id = proposedId;
185
+ else {
186
+ var proposedId = $(this).text().replace(/[^a-z0-9-]/ig, '_');
187
+ if ($('#' + proposedId).length > 0) { proposedId += counter; counter++; }
188
+ this.id = proposedId;
189
+ }
190
+ }
191
+ if (thisTag > lastTag) {
192
+ for (i = 0; i < thisTag - lastTag; i++) {
193
+ var tmp = $('<ol/>'); toc.append(tmp); toc = tmp;
194
+ }
195
+ }
196
+ if (thisTag < lastTag) {
197
+ for (i = 0; i < lastTag - thisTag; i++) toc = toc.parent();
198
+ }
199
+ var title = $(this).attr('toc-title');
200
+ if (typeof(title) == "undefined") title = $(this).text();
201
+ toc.append('<li><a href="#' + this.id + '">' + title + '</a></li>');
202
+ lastTag = thisTag;
203
+ });
204
+ if (!show) return;
205
+ html = '<div id="toc"><p class="title hide_toc"><a href="#"><strong>Table of Contents</strong></a></p></div>';
206
+ $('#content').prepend(html);
207
+ $('#toc').append(_toc);
208
+ $('#toc .hide_toc').toggle(function() {
209
+ $('#toc .top').slideUp('fast');
210
+ $('#toc').toggleClass('hidden');
211
+ $('#toc .title small').toggle();
212
+ }, function() {
213
+ $('#toc .top').slideDown('fast');
214
+ $('#toc').toggleClass('hidden');
215
+ $('#toc .title small').toggle();
216
+ });
217
+ }
218
+
219
+ function navResizeFn(e) {
220
+ if (e.which !== 1) {
221
+ navResizeFnStop();
222
+ return;
223
+ }
224
+
225
+ sessionStorage.navWidth = e.pageX.toString();
226
+ $('.nav_wrap').css('width', e.pageX);
227
+ $('.nav_wrap').css('-ms-flex', 'inherit');
228
+ }
229
+
230
+ function navResizeFnStop() {
231
+ $(window).unbind('mousemove', navResizeFn);
232
+ window.removeEventListener('message', navMessageFn, false);
233
+ }
234
+
235
+ function navMessageFn(e) {
236
+ if (e.data.action === 'mousemove') navResizeFn(e.data.event);
237
+ if (e.data.action === 'mouseup') navResizeFnStop();
238
+ }
239
+
240
+ function navResizer() {
241
+ $('#resizer').mousedown(function(e) {
242
+ e.preventDefault();
243
+ $(window).mousemove(navResizeFn);
244
+ window.addEventListener('message', navMessageFn, false);
245
+ });
246
+ $(window).mouseup(navResizeFnStop);
247
+
248
+ if (sessionStorage.navWidth) {
249
+ navResizeFn({which: 1, pageX: parseInt(sessionStorage.navWidth, 10)});
250
+ }
251
+ }
252
+
253
+ function navExpander() {
254
+ var done = false, timer = setTimeout(postMessage, 500);
255
+ function postMessage() {
256
+ if (done) return;
257
+ clearTimeout(timer);
258
+ var opts = { action: 'expand', path: pathId };
259
+ document.getElementById('nav').contentWindow.postMessage(opts, '*');
260
+ done = true;
261
+ }
262
+
263
+ window.addEventListener('message', function(event) {
264
+ if (event.data === 'navReady') postMessage();
265
+ return false;
266
+ }, false);
267
+ }
268
+
269
+ function mainFocus() {
270
+ var hash = window.location.hash;
271
+ if (hash !== '' && $(hash)[0]) {
272
+ $(hash)[0].scrollIntoView();
273
+ }
274
+
275
+ setTimeout(function() { $('#main').focus(); }, 10);
276
+ }
277
+
278
+ function navigationChange() {
279
+ // This works around the broken anchor navigation with the YARD template.
280
+ window.onpopstate = function() {
281
+ var hash = window.location.hash;
282
+ if (hash !== '' && $(hash)[0]) {
283
+ $(hash)[0].scrollIntoView();
284
+ }
285
+ };
286
+ }
287
+
288
+ $(document).ready(function() {
289
+ navResizer();
290
+ navExpander();
291
+ createSourceLinks();
292
+ createDefineLinks();
293
+ createFullTreeLinks();
294
+ searchFrameButtons();
295
+ linkSummaries();
296
+ summaryToggle();
297
+ constantSummaryToggle();
298
+ generateTOC();
299
+ mainFocus();
300
+ navigationChange();
301
+ });
302
+
303
+ })();
@@ -0,0 +1,216 @@
1
+ (function() {
2
+
3
+ var $clicked = $(null);
4
+ var searchTimeout = null;
5
+ var searchCache = [];
6
+ var caseSensitiveMatch = false;
7
+ var ignoreKeyCodeMin = 8;
8
+ var ignoreKeyCodeMax = 46;
9
+ var commandKey = 91;
10
+
11
+ RegExp.escape = function(text) {
12
+ return text.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, "\\$&");
13
+ }
14
+
15
+ function escapeShortcut() {
16
+ $(document).keydown(function(evt) {
17
+ if (evt.which == 27) {
18
+ window.parent.postMessage('navEscape', '*');
19
+ }
20
+ });
21
+ }
22
+
23
+ function navResizer() {
24
+ $(window).mousemove(function(e) {
25
+ window.parent.postMessage({
26
+ action: 'mousemove', event: {pageX: e.pageX, which: e.which}
27
+ }, '*');
28
+ }).mouseup(function(e) {
29
+ window.parent.postMessage({action: 'mouseup'}, '*');
30
+ });
31
+ window.parent.postMessage("navReady", "*");
32
+ }
33
+
34
+ function clearSearchTimeout() {
35
+ clearTimeout(searchTimeout);
36
+ searchTimeout = null;
37
+ }
38
+
39
+ function enableLinks() {
40
+ // load the target page in the parent window
41
+ $('#full_list li').on('click', function(evt) {
42
+ $('#full_list li').removeClass('clicked');
43
+ $clicked = $(this);
44
+ $clicked.addClass('clicked');
45
+ evt.stopPropagation();
46
+
47
+ if (evt.target.tagName === 'A') return true;
48
+
49
+ var elem = $clicked.find('> .item .object_link a')[0];
50
+ var e = evt.originalEvent;
51
+ var newEvent = new MouseEvent(evt.originalEvent.type);
52
+ newEvent.initMouseEvent(e.type, e.canBubble, e.cancelable, e.view, e.detail, e.screenX, e.screenY, e.clientX, e.clientY, e.ctrlKey, e.altKey, e.shiftKey, e.metaKey, e.button, e.relatedTarget);
53
+ elem.dispatchEvent(newEvent);
54
+ evt.preventDefault();
55
+ return false;
56
+ });
57
+ }
58
+
59
+ function enableToggles() {
60
+ // show/hide nested classes on toggle click
61
+ $('#full_list a.toggle').on('click', function(evt) {
62
+ evt.stopPropagation();
63
+ evt.preventDefault();
64
+ $(this).parent().parent().toggleClass('collapsed');
65
+ highlight();
66
+ });
67
+ }
68
+
69
+ function populateSearchCache() {
70
+ $('#full_list li .item').each(function() {
71
+ var $node = $(this);
72
+ var $link = $node.find('.object_link a');
73
+ if ($link.length > 0) {
74
+ searchCache.push({
75
+ node: $node,
76
+ link: $link,
77
+ name: $link.text(),
78
+ fullName: $link.attr('title').split(' ')[0]
79
+ });
80
+ }
81
+ });
82
+ }
83
+
84
+ function enableSearch() {
85
+ $('#search input').keyup(function(event) {
86
+ if (ignoredKeyPress(event)) return;
87
+ if (this.value === "") {
88
+ clearSearch();
89
+ } else {
90
+ performSearch(this.value);
91
+ }
92
+ });
93
+
94
+ $('#full_list').after("<div id='noresults' style='display:none'></div>");
95
+ }
96
+
97
+ function ignoredKeyPress(event) {
98
+ if (
99
+ (event.keyCode > ignoreKeyCodeMin && event.keyCode < ignoreKeyCodeMax) ||
100
+ (event.keyCode == commandKey)
101
+ ) {
102
+ return true;
103
+ } else {
104
+ return false;
105
+ }
106
+ }
107
+
108
+ function clearSearch() {
109
+ clearSearchTimeout();
110
+ $('#full_list .found').removeClass('found').each(function() {
111
+ var $link = $(this).find('.object_link a');
112
+ $link.text($link.text());
113
+ });
114
+ $('#full_list, #content').removeClass('insearch');
115
+ $clicked.parents().removeClass('collapsed');
116
+ highlight();
117
+ }
118
+
119
+ function performSearch(searchString) {
120
+ clearSearchTimeout();
121
+ $('#full_list, #content').addClass('insearch');
122
+ $('#noresults').text('').hide();
123
+ partialSearch(searchString, 0);
124
+ }
125
+
126
+ function partialSearch(searchString, offset) {
127
+ var lastRowClass = '';
128
+ var i = null;
129
+ for (i = offset; i < Math.min(offset + 50, searchCache.length); i++) {
130
+ var item = searchCache[i];
131
+ var searchName = (searchString.indexOf('::') != -1 ? item.fullName : item.name);
132
+ var matchString = buildMatchString(searchString);
133
+ var matchRegexp = new RegExp(matchString, caseSensitiveMatch ? "" : "i");
134
+ if (searchName.match(matchRegexp) == null) {
135
+ item.node.removeClass('found');
136
+ item.link.text(item.link.text());
137
+ }
138
+ else {
139
+ item.node.addClass('found');
140
+ item.node.removeClass(lastRowClass).addClass(lastRowClass == 'r1' ? 'r2' : 'r1');
141
+ lastRowClass = item.node.hasClass('r1') ? 'r1' : 'r2';
142
+ item.link.html(item.name.replace(matchRegexp, "<strong>$&</strong>"));
143
+ }
144
+ }
145
+ if(i == searchCache.length) {
146
+ searchDone();
147
+ } else {
148
+ searchTimeout = setTimeout(function() {
149
+ partialSearch(searchString, i);
150
+ }, 0);
151
+ }
152
+ }
153
+
154
+ function searchDone() {
155
+ searchTimeout = null;
156
+ highlight();
157
+ if ($('#full_list li:visible').size() === 0) {
158
+ $('#noresults').text('No results were found.').hide().fadeIn();
159
+ } else {
160
+ $('#noresults').text('').hide();
161
+ }
162
+ $('#content').removeClass('insearch');
163
+ }
164
+
165
+ function buildMatchString(searchString, event) {
166
+ caseSensitiveMatch = searchString.match(/[A-Z]/) != null;
167
+ var regexSearchString = RegExp.escape(searchString);
168
+ if (caseSensitiveMatch) {
169
+ regexSearchString += "|" +
170
+ $.map(searchString.split(''), function(e) { return RegExp.escape(e); }).
171
+ join('.+?');
172
+ }
173
+ return regexSearchString;
174
+ }
175
+
176
+ function highlight() {
177
+ $('#full_list li:visible').each(function(n) {
178
+ $(this).removeClass('even odd').addClass(n % 2 == 0 ? 'odd' : 'even');
179
+ });
180
+ }
181
+
182
+ /**
183
+ * Expands the tree to the target element and its immediate
184
+ * children.
185
+ */
186
+ function expandTo(path) {
187
+ var $target = $(document.getElementById('object_' + path));
188
+ $target.addClass('clicked');
189
+ $target.removeClass('collapsed');
190
+ $target.parentsUntil('#full_list', 'li').removeClass('collapsed');
191
+ if($target[0]) {
192
+ window.scrollTo(window.scrollX, $target.offset().top - 250);
193
+ highlight();
194
+ }
195
+ }
196
+
197
+ function windowEvents(event) {
198
+ var msg = event.data;
199
+ if (msg.action === "expand") {
200
+ expandTo(msg.path);
201
+ }
202
+ return false;
203
+ }
204
+
205
+ window.addEventListener("message", windowEvents, false);
206
+
207
+ $(document).ready(function() {
208
+ escapeShortcut();
209
+ navResizer();
210
+ enableLinks();
211
+ enableToggles();
212
+ populateSearchCache();
213
+ enableSearch();
214
+ });
215
+
216
+ })();