czech_post_b2b_client 1.1.0 → 1.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +11 -1
- data/README.md +221 -199
- data/doc/CzechPostB2bClient.html +31 -35
- data/doc/CzechPostB2bClient/B2BErrors.html +26 -13
- data/doc/CzechPostB2bClient/B2BErrors/BadRequestError.html +7 -7
- data/doc/CzechPostB2bClient/B2BErrors/BaseError.html +75 -40
- data/doc/CzechPostB2bClient/B2BErrors/CustomerRequestsCountOverflowError.html +7 -7
- data/doc/CzechPostB2bClient/B2BErrors/InternalB2BServerError.html +7 -7
- data/doc/CzechPostB2bClient/B2BErrors/InternalBackendServerError.html +7 -7
- data/doc/CzechPostB2bClient/B2BErrors/InternalDataPersistenceServerError.html +7 -7
- data/doc/CzechPostB2bClient/B2BErrors/ProcessingUnfinishedYetError.html +7 -7
- data/doc/CzechPostB2bClient/B2BErrors/ServiceBusyError.html +7 -7
- data/doc/CzechPostB2bClient/B2BErrors/UnauthorizedContractAccessError.html +7 -7
- data/doc/CzechPostB2bClient/B2BErrors/UnauthorizedRoleAccessError.html +7 -7
- data/doc/CzechPostB2bClient/Configuration.html +33 -25
- data/doc/CzechPostB2bClient/Error.html +6 -6
- data/doc/CzechPostB2bClient/PostServices.html +197 -0
- data/doc/CzechPostB2bClient/PostServices/AddreseeVerification.html +129 -0
- data/doc/CzechPostB2bClient/PostServices/AddresseeAlertOfArrivalByEmail.html +129 -0
- data/doc/CzechPostB2bClient/PostServices/AddresseeAlertOfArrivalBySms.html +140 -0
- data/doc/CzechPostB2bClient/PostServices/AddresseeAlertOfArrivalBySmsAndEmail.html +129 -0
- data/doc/CzechPostB2bClient/PostServices/AddresseeVerificationOnDelivery.html +129 -0
- data/doc/CzechPostB2bClient/PostServices/AfternoonDelivery.html +129 -0
- data/doc/CzechPostB2bClient/PostServices/Base.html +351 -0
- data/doc/CzechPostB2bClient/PostServices/CashOnDeliveryByPKA.html +129 -0
- data/doc/CzechPostB2bClient/PostServices/CashOnDeliveryByPKC.html +129 -0
- data/doc/CzechPostB2bClient/PostServices/CashOnDeliveryInternational.html +129 -0
- data/doc/CzechPostB2bClient/PostServices/CertificateOfDelivery.html +148 -0
- data/doc/CzechPostB2bClient/PostServices/CertificateOfDeliveryWithDeliverToAdresseeOnly.html +140 -0
- data/doc/CzechPostB2bClient/PostServices/CertificateOfDeliveryWithDeliverToAdresseePersonOnly.html +129 -0
- data/doc/CzechPostB2bClient/PostServices/CompanyRegisteredMail.html +141 -0
- data/doc/CzechPostB2bClient/PostServices/CompleteDelivery.html +129 -0
- data/doc/CzechPostB2bClient/PostServices/Consignment.html +129 -0
- data/doc/CzechPostB2bClient/PostServices/CumbersomeParcel.html +129 -0
- data/doc/CzechPostB2bClient/PostServices/DeliverToAdresseeOnly.html +129 -0
- data/doc/CzechPostB2bClient/PostServices/DeliverToAdresseePersonOnly.html +129 -0
- data/doc/CzechPostB2bClient/PostServices/DeliverToCompany.html +147 -0
- data/doc/CzechPostB2bClient/PostServices/DepositFor10Days.html +129 -0
- data/doc/CzechPostB2bClient/PostServices/DepositFor10WorkingDays.html +129 -0
- data/doc/CzechPostB2bClient/PostServices/DepositFor3Days.html +129 -0
- data/doc/CzechPostB2bClient/PostServices/DepositFor7Days.html +129 -0
- data/doc/CzechPostB2bClient/PostServices/DepositFor90Days.html +129 -0
- data/doc/CzechPostB2bClient/PostServices/DepositIfAdresseeIsUnreachable.html +141 -0
- data/doc/CzechPostB2bClient/PostServices/DiscountForCollectiveShippment.html +129 -0
- data/doc/CzechPostB2bClient/PostServices/DiscountForOnlinePosting.html +129 -0
- data/doc/CzechPostB2bClient/PostServices/DoNotDeposit.html +129 -0
- data/doc/CzechPostB2bClient/PostServices/DoNotExtendCollectionTime.html +148 -0
- data/doc/CzechPostB2bClient/PostServices/DoNotPutIntoMailbox.html +129 -0
- data/doc/CzechPostB2bClient/PostServices/DoNotResend.html +129 -0
- data/doc/CzechPostB2bClient/PostServices/DoNotReturnLeaveItInMailbox.html +129 -0
- data/doc/CzechPostB2bClient/PostServices/DoNotReturnToSender.html +129 -0
- data/doc/CzechPostB2bClient/PostServices/Document.html +129 -0
- data/doc/CzechPostB2bClient/PostServices/DocumentlessCashOnDelivery.html +147 -0
- data/doc/CzechPostB2bClient/PostServices/DocumentsSignedAtDelivery.html +129 -0
- data/doc/CzechPostB2bClient/PostServices/EAlertOfDeliveryEmail.html +129 -0
- data/doc/CzechPostB2bClient/PostServices/EAlertOfDeliverySms.html +140 -0
- data/doc/CzechPostB2bClient/PostServices/EAlertOfDeliverySmsAndEmail.html +129 -0
- data/doc/CzechPostB2bClient/PostServices/EconomyDelivery.html +140 -0
- data/doc/CzechPostB2bClient/PostServices/ExtendedCollectionTime.html +129 -0
- data/doc/CzechPostB2bClient/PostServices/ForenoonDelivery.html +129 -0
- data/doc/CzechPostB2bClient/PostServices/Fragile.html +129 -0
- data/doc/CzechPostB2bClient/PostServices/GiftOrNonCommercialGoods.html +148 -0
- data/doc/CzechPostB2bClient/PostServices/GoodsWithExportDocumentsProcessed.html +148 -0
- data/doc/CzechPostB2bClient/PostServices/GuaranteedDeliveryTimeAtSaturday.html +129 -0
- data/doc/CzechPostB2bClient/PostServices/GuaranteedDeliveryTimeAtWeekend.html +129 -0
- data/doc/CzechPostB2bClient/PostServices/GuaranteedDeliveryTimeTo2PM.html +129 -0
- data/doc/CzechPostB2bClient/PostServices/HeavyParcelDeliveryToHand.html +129 -0
- data/doc/CzechPostB2bClient/PostServices/InformSenderAboutDelivery.html +129 -0
- data/doc/CzechPostB2bClient/PostServices/InternationalMail.html +129 -0
- data/doc/CzechPostB2bClient/PostServices/InternationalMailForBlinds.html +129 -0
- data/doc/CzechPostB2bClient/PostServices/InternationalPrintedMatterBag.html +129 -0
- data/doc/CzechPostB2bClient/PostServices/InternationalRegisteredMail.html +129 -0
- data/doc/CzechPostB2bClient/PostServices/InternationalRegisteredMailForBlinds.html +129 -0
- data/doc/CzechPostB2bClient/PostServices/InternationalRegisteredPrintedMatterBag.html +129 -0
- data/doc/CzechPostB2bClient/PostServices/ListedPrice.html +129 -0
- data/doc/CzechPostB2bClient/PostServices/Missed.html +129 -0
- data/doc/CzechPostB2bClient/PostServices/Missive.html +129 -0
- data/doc/CzechPostB2bClient/PostServices/MissiveStandard.html +129 -0
- data/doc/CzechPostB2bClient/PostServices/MultiParcelShippment.html +129 -0
- data/doc/CzechPostB2bClient/PostServices/MultiParcelShippmentBig.html +129 -0
- data/doc/CzechPostB2bClient/PostServices/NonStandardPackage.html +148 -0
- data/doc/CzechPostB2bClient/PostServices/OldApplianceRemoval.html +129 -0
- data/doc/CzechPostB2bClient/PostServices/OnPalette.html +140 -0
- data/doc/CzechPostB2bClient/PostServices/ParcelSizeL.html +129 -0
- data/doc/CzechPostB2bClient/PostServices/ParcelSizeM.html +129 -0
- data/doc/CzechPostB2bClient/PostServices/ParcelSizeS.html +129 -0
- data/doc/CzechPostB2bClient/PostServices/ParcelSizeXL.html +129 -0
- data/doc/CzechPostB2bClient/PostServices/PickupByThirdPerson.html +129 -0
- data/doc/CzechPostB2bClient/PostServices/PosteRestante.html +129 -0
- data/doc/CzechPostB2bClient/PostServices/PreprocessedBySorting.html +148 -0
- data/doc/CzechPostB2bClient/PostServices/PrioritaireByAir.html +129 -0
- data/doc/CzechPostB2bClient/PostServices/RegisteredMail.html +129 -0
- data/doc/CzechPostB2bClient/PostServices/RegisteredMailForBlinds.html +129 -0
- data/doc/CzechPostB2bClient/PostServices/RegisteredMailStandard.html +129 -0
- data/doc/CzechPostB2bClient/PostServices/ResendToOtherAddress.html +129 -0
- data/doc/CzechPostB2bClient/PostServices/ResponseEnvelope.html +129 -0
- data/doc/CzechPostB2bClient/PostServices/ResponseShipment.html +129 -0
- data/doc/CzechPostB2bClient/PostServices/ReturnByAir.html +129 -0
- data/doc/CzechPostB2bClient/PostServices/ReturnEconomically.html +129 -0
- data/doc/CzechPostB2bClient/PostServices/ReturnOfGoods.html +129 -0
- data/doc/CzechPostB2bClient/PostServices/ReturnToSenderAfterXDays.html +148 -0
- data/doc/CzechPostB2bClient/PostServices/ReturnToSenderImmediately.html +129 -0
- data/doc/CzechPostB2bClient/PostServices/SaveKey.html +148 -0
- data/doc/CzechPostB2bClient/PostServices/SubmissionByPostbox.html +129 -0
- data/doc/CzechPostB2bClient/PostServices/SubmissionReceiptCopy.html +129 -0
- data/doc/CzechPostB2bClient/PostServices/ThisSideUp.html +148 -0
- data/doc/CzechPostB2bClient/PostServices/ValuableContent.html +129 -0
- data/doc/CzechPostB2bClient/PrintingTemplates.html +16 -16
- data/doc/CzechPostB2bClient/PrintingTemplates/AddressData3x8.html +6 -6
- data/doc/CzechPostB2bClient/PrintingTemplates/AdressLabel.html +6 -6
- data/doc/CzechPostB2bClient/PrintingTemplates/AdressLabel/Blank.html +6 -6
- data/doc/CzechPostB2bClient/PrintingTemplates/AdressLabel/Blank4OnPage.html +6 -6
- data/doc/CzechPostB2bClient/PrintingTemplates/AdressLabel/BlankLandscape.html +6 -6
- data/doc/CzechPostB2bClient/PrintingTemplates/AdressLabel/ForeignPackage.html +7 -7
- data/doc/CzechPostB2bClient/PrintingTemplates/AdressLabel/ForeignPackage/EMS.html +6 -6
- data/doc/CzechPostB2bClient/PrintingTemplates/AdressLabel/ForeignPackage/EMS2x4.html +6 -6
- data/doc/CzechPostB2bClient/PrintingTemplates/AdressLabel/ForeignPackage/HarmonizedLabel.html +141 -0
- data/doc/CzechPostB2bClient/PrintingTemplates/AdressLabel/ForeignPackage/HarmonizedLabel4OnPage.html +129 -0
- data/doc/CzechPostB2bClient/PrintingTemplates/AdressLabel/ForeignPackage/Standard.html +6 -6
- data/doc/CzechPostB2bClient/PrintingTemplates/AdressLabel/ForeignPackage/Standard2OnPage.html +129 -0
- data/doc/CzechPostB2bClient/PrintingTemplates/AdressLabel/ForeignPackage/Valuable.html +6 -6
- data/doc/CzechPostB2bClient/PrintingTemplates/AdressLabel/ForeignPackage/Valuable4OnPage.html +6 -6
- data/doc/CzechPostB2bClient/PrintingTemplates/AdressLabel/Simple.html +6 -6
- data/doc/CzechPostB2bClient/PrintingTemplates/AdressLabel/SimpleWithCODVoucherA.html +6 -6
- data/doc/CzechPostB2bClient/PrintingTemplates/Base.html +16 -16
- data/doc/CzechPostB2bClient/PrintingTemplates/CODVoucherA.html +6 -6
- data/doc/CzechPostB2bClient/PrintingTemplates/CODVoucherA3OnPage.html +6 -6
- data/doc/CzechPostB2bClient/PrintingTemplates/CODVoucherC.html +6 -6
- data/doc/CzechPostB2bClient/PrintingTemplates/CODVoucherForCSOB.html +6 -6
- data/doc/CzechPostB2bClient/PrintingTemplates/CustomDeclaration.html +115 -0
- data/doc/CzechPostB2bClient/PrintingTemplates/CustomDeclaration/CN22.html +129 -0
- data/doc/CzechPostB2bClient/PrintingTemplates/CustomDeclaration/CN224OnPage.html +129 -0
- data/doc/CzechPostB2bClient/PrintingTemplates/CustomDeclaration/CN22WithCK.html +129 -0
- data/doc/CzechPostB2bClient/PrintingTemplates/CustomDeclaration/CN22WithCK4OnPage.html +129 -0
- data/doc/CzechPostB2bClient/PrintingTemplates/CustomDeclaration/CN23.html +129 -0
- data/doc/CzechPostB2bClient/PrintingTemplates/DeliveryTicket.html +6 -6
- data/doc/CzechPostB2bClient/PrintingTemplates/Envelope.html +6 -6
- data/doc/CzechPostB2bClient/PrintingTemplates/Envelope/EnvelopeB4.html +6 -6
- data/doc/CzechPostB2bClient/PrintingTemplates/Envelope/EnvelopeC5.html +6 -6
- data/doc/CzechPostB2bClient/PrintingTemplates/Envelope/EnvelopeC6.html +6 -6
- data/doc/CzechPostB2bClient/PrintingTemplates/Envelope/EnvelopeDL.html +6 -6
- data/doc/CzechPostB2bClient/PrintingTemplates/IntegratedDocument.html +6 -6
- data/doc/CzechPostB2bClient/PrintingTemplates/RRLabels3x8.html +6 -6
- data/doc/CzechPostB2bClient/RequestBuilders.html +8 -8
- data/doc/CzechPostB2bClient/RequestBuilders/BaseBuilder.html +9 -9
- data/doc/CzechPostB2bClient/RequestBuilders/GetParcelStateBuilder.html +8 -8
- data/doc/CzechPostB2bClient/RequestBuilders/GetParcelsPrintingBuilder.html +26 -26
- data/doc/CzechPostB2bClient/RequestBuilders/GetResultParcelsBuilder.html +8 -8
- data/doc/CzechPostB2bClient/RequestBuilders/GetStatsBuilder.html +9 -9
- data/doc/CzechPostB2bClient/RequestBuilders/ParcelServiceSyncBuilder.html +414 -0
- data/doc/CzechPostB2bClient/RequestBuilders/SendParcelsBuilder.html +32 -21
- data/doc/CzechPostB2bClient/ResponseCodes.html +51 -27
- data/doc/CzechPostB2bClient/ResponseCodes/AddressAllowedForBalikovnaOnly.html +7 -7
- data/doc/CzechPostB2bClient/ResponseCodes/AddressIsNotValidForSubject.html +7 -7
- data/doc/CzechPostB2bClient/ResponseCodes/AddressNeedsPhoneNumber.html +7 -7
- data/doc/CzechPostB2bClient/ResponseCodes/AddressSuitableForLocalDelivery.html +7 -7
- data/doc/CzechPostB2bClient/ResponseCodes/AddressValidOnlyForNaPostu.html +7 -7
- data/doc/CzechPostB2bClient/ResponseCodes/AddressValidOnlyForNaPostuDuplicate.html +7 -7
- data/doc/CzechPostB2bClient/ResponseCodes/AddresseeCityRequired.html +7 -7
- data/doc/CzechPostB2bClient/ResponseCodes/AlreadyAssignedOrderNumber.html +7 -7
- data/doc/CzechPostB2bClient/ResponseCodes/BadAddressee.html +7 -7
- data/doc/CzechPostB2bClient/ResponseCodes/BadCODAmount.html +7 -7
- data/doc/CzechPostB2bClient/ResponseCodes/BadFormatReturnNumberDays.html +7 -7
- data/doc/CzechPostB2bClient/ResponseCodes/BadHeight.html +7 -7
- data/doc/CzechPostB2bClient/ResponseCodes/BadLength.html +7 -7
- data/doc/CzechPostB2bClient/ResponseCodes/BadPrefix.html +7 -7
- data/doc/CzechPostB2bClient/ResponseCodes/BadPrefixForAddress.html +7 -7
- data/doc/CzechPostB2bClient/ResponseCodes/BadPrice.html +7 -7
- data/doc/CzechPostB2bClient/ResponseCodes/BadVariableSymbol.html +7 -7
- data/doc/CzechPostB2bClient/ResponseCodes/BadWeight.html +7 -7
- data/doc/CzechPostB2bClient/ResponseCodes/BadWidth.html +7 -7
- data/doc/CzechPostB2bClient/ResponseCodes/BaseCode.html +211 -121
- data/doc/CzechPostB2bClient/ResponseCodes/BatchClosed.html +7 -7
- data/doc/CzechPostB2bClient/ResponseCodes/BatchInvalid.html +7 -7
- data/doc/CzechPostB2bClient/ResponseCodes/BatchUnfinished.html +7 -7
- data/doc/CzechPostB2bClient/ResponseCodes/CODAmountOutOfRange.html +7 -7
- data/doc/CzechPostB2bClient/ResponseCodes/CODAmountTooBig.html +7 -7
- data/doc/CzechPostB2bClient/ResponseCodes/CanceledOrderNumber.html +7 -7
- data/doc/CzechPostB2bClient/ResponseCodes/CustomGoodQuantityOutOfRange.html +7 -7
- data/doc/CzechPostB2bClient/ResponseCodes/CustomerIDNotInAccordanceWithParcelCode.html +7 -7
- data/doc/CzechPostB2bClient/ResponseCodes/DensityOutOfRange.html +7 -7
- data/doc/CzechPostB2bClient/ResponseCodes/DuplicateDuplicateParcelCode.html +7 -7
- data/doc/CzechPostB2bClient/ResponseCodes/DuplicateParcel.html +7 -7
- data/doc/CzechPostB2bClient/ResponseCodes/DuplicateParcelCode.html +7 -7
- data/doc/CzechPostB2bClient/ResponseCodes/DuplicitParcelCode.html +7 -7
- data/doc/CzechPostB2bClient/ResponseCodes/FullSequence.html +7 -7
- data/doc/CzechPostB2bClient/ResponseCodes/FullSequenceDuplicate.html +7 -7
- data/doc/CzechPostB2bClient/ResponseCodes/IllegalCombinationOfServices.html +7 -7
- data/doc/CzechPostB2bClient/ResponseCodes/InfoAddRequiredService75.html +7 -7
- data/doc/CzechPostB2bClient/ResponseCodes/InfoAddService1A.html +7 -7
- data/doc/CzechPostB2bClient/ResponseCodes/InfoAddService1B.html +7 -7
- data/doc/CzechPostB2bClient/ResponseCodes/InfoAddService1D.html +7 -7
- data/doc/CzechPostB2bClient/ResponseCodes/InfoAddService9.html +7 -7
- data/doc/CzechPostB2bClient/ResponseCodes/InfoAddressWasModified.html +7 -7
- data/doc/CzechPostB2bClient/ResponseCodes/InfoAddresseeToLong.html +7 -7
- data/doc/CzechPostB2bClient/ResponseCodes/InfoCancelCustCardNumber.html +7 -7
- data/doc/CzechPostB2bClient/ResponseCodes/InfoCancelCustCardNumberAddresseeDocument.html +7 -7
- data/doc/CzechPostB2bClient/ResponseCodes/InfoCancelHeight.html +7 -7
- data/doc/CzechPostB2bClient/ResponseCodes/InfoCancelLength.html +7 -7
- data/doc/CzechPostB2bClient/ResponseCodes/InfoCancelMobilePhoneOrEmailAddresseeDocument.html +7 -7
- data/doc/CzechPostB2bClient/ResponseCodes/InfoCancelPalettsNumber.html +7 -7
- data/doc/CzechPostB2bClient/ResponseCodes/InfoCancelPersonalIdentificationNumber.html +7 -7
- data/doc/CzechPostB2bClient/ResponseCodes/InfoCancelService1AB.html +7 -7
- data/doc/CzechPostB2bClient/ResponseCodes/InfoCancelService1ABForService40.html +7 -7
- data/doc/CzechPostB2bClient/ResponseCodes/InfoCancelService1AForPostCode.html +7 -7
- data/doc/CzechPostB2bClient/ResponseCodes/InfoCancelService1AForService40.html +7 -7
- data/doc/CzechPostB2bClient/ResponseCodes/InfoCancelService1AWith1B.html +7 -7
- data/doc/CzechPostB2bClient/ResponseCodes/InfoCancelService1B.html +7 -7
- data/doc/CzechPostB2bClient/ResponseCodes/InfoCancelService1BAddService1A.html +7 -7
- data/doc/CzechPostB2bClient/ResponseCodes/InfoCancelService1BForPostCode.html +7 -7
- data/doc/CzechPostB2bClient/ResponseCodes/InfoCancelService1BWith1A.html +7 -7
- data/doc/CzechPostB2bClient/ResponseCodes/InfoCancelService1D.html +7 -7
- data/doc/CzechPostB2bClient/ResponseCodes/InfoCancelService1E.html +7 -7
- data/doc/CzechPostB2bClient/ResponseCodes/InfoCancelService1V.html +7 -7
- data/doc/CzechPostB2bClient/ResponseCodes/InfoCancelService25.html +7 -7
- data/doc/CzechPostB2bClient/ResponseCodes/InfoCancelService27.html +7 -7
- data/doc/CzechPostB2bClient/ResponseCodes/InfoCancelService29.html +7 -7
- data/doc/CzechPostB2bClient/ResponseCodes/InfoCancelService30.html +7 -7
- data/doc/CzechPostB2bClient/ResponseCodes/InfoCancelService31.html +7 -7
- data/doc/CzechPostB2bClient/ResponseCodes/InfoCancelService34.html +7 -7
- data/doc/CzechPostB2bClient/ResponseCodes/InfoCancelService34InvalidPhoneNumber.html +7 -7
- data/doc/CzechPostB2bClient/ResponseCodes/InfoCancelService45.html +7 -7
- data/doc/CzechPostB2bClient/ResponseCodes/InfoCancelService45InvalidPhoneNumber.html +7 -7
- data/doc/CzechPostB2bClient/ResponseCodes/InfoCancelService46.html +7 -7
- data/doc/CzechPostB2bClient/ResponseCodes/InfoCancelService47.html +7 -7
- data/doc/CzechPostB2bClient/ResponseCodes/InfoCancelService5B.html +7 -7
- data/doc/CzechPostB2bClient/ResponseCodes/InfoCancelService5BAnd5C.html +7 -7
- data/doc/CzechPostB2bClient/ResponseCodes/InfoCancelService5BAnd5D.html +7 -7
- data/doc/CzechPostB2bClient/ResponseCodes/InfoCancelService5C.html +7 -7
- data/doc/CzechPostB2bClient/ResponseCodes/InfoCancelService5CAnd5D.html +7 -7
- data/doc/CzechPostB2bClient/ResponseCodes/InfoCancelService5D.html +7 -7
- data/doc/CzechPostB2bClient/ResponseCodes/InfoCancelService9.html +134 -0
- data/doc/CzechPostB2bClient/ResponseCodes/InfoCancelVSVoucher.html +7 -7
- data/doc/CzechPostB2bClient/ResponseCodes/InfoCancelWidth.html +7 -7
- data/doc/CzechPostB2bClient/ResponseCodes/InfoCityChanged.html +7 -7
- data/doc/CzechPostB2bClient/ResponseCodes/InfoInexactAddress.html +7 -7
- data/doc/CzechPostB2bClient/ResponseCodes/InfoInvalidAccount.html +7 -7
- data/doc/CzechPostB2bClient/ResponseCodes/InfoInvalidBankCode.html +7 -7
- data/doc/CzechPostB2bClient/ResponseCodes/InfoInvalidBirthDay.html +7 -7
- data/doc/CzechPostB2bClient/ResponseCodes/InfoInvalidCODAmount.html +7 -7
- data/doc/CzechPostB2bClient/ResponseCodes/InfoInvalidCategoryCustomDecalaration.html +7 -7
- data/doc/CzechPostB2bClient/ResponseCodes/InfoInvalidEmail.html +7 -7
- data/doc/CzechPostB2bClient/ResponseCodes/InfoInvalidMobilePhoneNumber.html +7 -7
- data/doc/CzechPostB2bClient/ResponseCodes/InfoInvalidPhoneNumber.html +7 -7
- data/doc/CzechPostB2bClient/ResponseCodes/InfoInvalidPrefixAccount.html +7 -7
- data/doc/CzechPostB2bClient/ResponseCodes/InfoInvalidPrice.html +7 -7
- data/doc/CzechPostB2bClient/ResponseCodes/InfoInvalidSpecificSymbol.html +7 -7
- data/doc/CzechPostB2bClient/ResponseCodes/InfoInvalidTelephoneNumber.html +7 -7
- data/doc/CzechPostB2bClient/ResponseCodes/InfoInvalidWeight.html +7 -7
- data/doc/CzechPostB2bClient/ResponseCodes/InfoMissingPartCityServiceDeliveryOnSundayOrHolidayMayNotBeRealized.html +18 -7
- data/doc/CzechPostB2bClient/ResponseCodes/InfoPriceIsNotNumber.html +7 -7
- data/doc/CzechPostB2bClient/ResponseCodes/InfoPriceIsTooBig.html +7 -7
- data/doc/CzechPostB2bClient/ResponseCodes/InfoService29And47.html +7 -7
- data/doc/CzechPostB2bClient/ResponseCodes/InfoSpecialPackagingRequest.html +7 -7
- data/doc/CzechPostB2bClient/ResponseCodes/InternalApplicationError.html +7 -7
- data/doc/CzechPostB2bClient/ResponseCodes/InvalidAddressAddresseeDocumentForParcelType.html +7 -7
- data/doc/CzechPostB2bClient/ResponseCodes/InvalidAddressAddresseeDocumentObjectNotFound.html +7 -7
- data/doc/CzechPostB2bClient/ResponseCodes/InvalidAddressAddresseeDocumentWrongCity.html +7 -7
- data/doc/CzechPostB2bClient/ResponseCodes/InvalidAddressForBalikovna.html +7 -7
- data/doc/CzechPostB2bClient/ResponseCodes/InvalidAddressForBigPackage.html +7 -7
- data/doc/CzechPostB2bClient/ResponseCodes/InvalidAddressForCODAmountOver20000.html +7 -7
- data/doc/CzechPostB2bClient/ResponseCodes/InvalidAddressForParcelType.html +7 -7
- data/doc/CzechPostB2bClient/ResponseCodes/InvalidAddressee.html +7 -7
- data/doc/CzechPostB2bClient/ResponseCodes/InvalidAmount.html +7 -7
- data/doc/CzechPostB2bClient/ResponseCodes/InvalidAmountCurrency.html +7 -7
- data/doc/CzechPostB2bClient/ResponseCodes/InvalidAmountType.html +7 -7
- data/doc/CzechPostB2bClient/ResponseCodes/InvalidCODAmount.html +7 -7
- data/doc/CzechPostB2bClient/ResponseCodes/InvalidCODCurrency.html +7 -7
- data/doc/CzechPostB2bClient/ResponseCodes/InvalidCODCurrencyAccordance.html +7 -7
- data/doc/CzechPostB2bClient/ResponseCodes/InvalidCategoryCustomDecalaration.html +7 -7
- data/doc/CzechPostB2bClient/ResponseCodes/InvalidContentCustomGood.html +7 -7
- data/doc/CzechPostB2bClient/ResponseCodes/InvalidCurrencyCustomDecalaration.html +7 -7
- data/doc/CzechPostB2bClient/ResponseCodes/InvalidCustomGoodNumber.html +7 -7
- data/doc/CzechPostB2bClient/ResponseCodes/InvalidCustomerCardNumber.html +7 -7
- data/doc/CzechPostB2bClient/ResponseCodes/InvalidCustomerId.html +7 -7
- data/doc/CzechPostB2bClient/ResponseCodes/InvalidDensity.html +7 -7
- data/doc/CzechPostB2bClient/ResponseCodes/InvalidEmail.html +7 -7
- data/doc/CzechPostB2bClient/ResponseCodes/InvalidHeight.html +7 -7
- data/doc/CzechPostB2bClient/ResponseCodes/InvalidHsCodeCustomGood.html +7 -7
- data/doc/CzechPostB2bClient/ResponseCodes/InvalidIsoCustomGood.html +7 -7
- data/doc/CzechPostB2bClient/ResponseCodes/InvalidIsoCustomGoodFormat.html +7 -7
- data/doc/CzechPostB2bClient/ResponseCodes/InvalidLength.html +7 -7
- data/doc/CzechPostB2bClient/ResponseCodes/InvalidLocation.html +7 -7
- data/doc/CzechPostB2bClient/ResponseCodes/InvalidMRNCode.html +7 -7
- data/doc/CzechPostB2bClient/ResponseCodes/InvalidMRNCodeControl.html +7 -7
- data/doc/CzechPostB2bClient/ResponseCodes/InvalidNumberClosure.html +7 -7
- data/doc/CzechPostB2bClient/ResponseCodes/InvalidOrderNumber.html +7 -7
- data/doc/CzechPostB2bClient/ResponseCodes/InvalidParcelBarcode.html +7 -7
- data/doc/CzechPostB2bClient/ResponseCodes/InvalidParcelBarcodeDuplicate.html +7 -7
- data/doc/CzechPostB2bClient/ResponseCodes/InvalidParcelCode.html +7 -7
- data/doc/CzechPostB2bClient/ResponseCodes/InvalidParcelCodeControl.html +7 -7
- data/doc/CzechPostB2bClient/ResponseCodes/InvalidParcelResponseCode.html +7 -7
- data/doc/CzechPostB2bClient/ResponseCodes/InvalidParcelTypeForID.html +7 -7
- data/doc/CzechPostB2bClient/ResponseCodes/InvalidPartnerCode.html +7 -7
- data/doc/CzechPostB2bClient/ResponseCodes/InvalidPayday.html +7 -7
- data/doc/CzechPostB2bClient/ResponseCodes/InvalidPhoneNumber.html +7 -7
- data/doc/CzechPostB2bClient/ResponseCodes/InvalidPostCode.html +7 -7
- data/doc/CzechPostB2bClient/ResponseCodes/InvalidPrefixAccordance.html +7 -7
- data/doc/CzechPostB2bClient/ResponseCodes/InvalidPrefixCombination.html +7 -7
- data/doc/CzechPostB2bClient/ResponseCodes/InvalidPrefixForDimensionsAndFragile.html +7 -7
- data/doc/CzechPostB2bClient/ResponseCodes/InvalidPrice.html +7 -7
- data/doc/CzechPostB2bClient/ResponseCodes/InvalidPriceCurrency.html +7 -7
- data/doc/CzechPostB2bClient/ResponseCodes/InvalidPriceCurrencyAccordance.html +7 -7
- data/doc/CzechPostB2bClient/ResponseCodes/InvalidPriceCustomGood.html +7 -7
- data/doc/CzechPostB2bClient/ResponseCodes/InvalidQuantityCustomGood.html +7 -7
- data/doc/CzechPostB2bClient/ResponseCodes/InvalidResponsibleConsignmentNumber.html +7 -7
- data/doc/CzechPostB2bClient/ResponseCodes/InvalidReturnNumberDays.html +7 -7
- data/doc/CzechPostB2bClient/ResponseCodes/InvalidService18.html +7 -7
- data/doc/CzechPostB2bClient/ResponseCodes/InvalidService19.html +7 -7
- data/doc/CzechPostB2bClient/ResponseCodes/InvalidServiceCombination.html +7 -7
- data/doc/CzechPostB2bClient/ResponseCodes/InvalidServicesForDimensions.html +7 -7
- data/doc/CzechPostB2bClient/ResponseCodes/InvalidSignNumber.html +7 -7
- data/doc/CzechPostB2bClient/ResponseCodes/InvalidSubisoCountry.html +7 -7
- data/doc/CzechPostB2bClient/ResponseCodes/InvalidTareWeight.html +7 -7
- data/doc/CzechPostB2bClient/ResponseCodes/InvalidTiming.html +7 -7
- data/doc/CzechPostB2bClient/ResponseCodes/InvalidTransmissionDate.html +7 -7
- data/doc/CzechPostB2bClient/ResponseCodes/InvalidTypePrefix.html +7 -7
- data/doc/CzechPostB2bClient/ResponseCodes/InvalidUseOfService36.html +7 -7
- data/doc/CzechPostB2bClient/ResponseCodes/InvalidUseOfService37.html +7 -7
- data/doc/CzechPostB2bClient/ResponseCodes/InvalidUseOfService38.html +7 -7
- data/doc/CzechPostB2bClient/ResponseCodes/InvalidWeight.html +7 -7
- data/doc/CzechPostB2bClient/ResponseCodes/InvalidWeightCustomGood.html +7 -7
- data/doc/CzechPostB2bClient/ResponseCodes/InvalidWeightCustomGoodSummary.html +7 -7
- data/doc/CzechPostB2bClient/ResponseCodes/InvalidWeightForService11.html +7 -7
- data/doc/CzechPostB2bClient/ResponseCodes/InvalidWidth.html +7 -7
- data/doc/CzechPostB2bClient/ResponseCodes/InvalidZPROOrderNumber.html +7 -7
- data/doc/CzechPostB2bClient/ResponseCodes/InvalidZPROOrderNumberFormat.html +7 -7
- data/doc/CzechPostB2bClient/ResponseCodes/InvalidostCodeOrCity.html +7 -7
- data/doc/CzechPostB2bClient/ResponseCodes/MIssingParcelCode.html +7 -7
- data/doc/CzechPostB2bClient/ResponseCodes/MissingAddressee.html +7 -7
- data/doc/CzechPostB2bClient/ResponseCodes/MissingAddresseeCity.html +7 -7
- data/doc/CzechPostB2bClient/ResponseCodes/MissingAddresseeStreet.html +7 -7
- data/doc/CzechPostB2bClient/ResponseCodes/MissingAddresseeZipCode.html +7 -7
- data/doc/CzechPostB2bClient/ResponseCodes/MissingCODAmount.html +7 -7
- data/doc/CzechPostB2bClient/ResponseCodes/MissingCODAmountType.html +7 -7
- data/doc/CzechPostB2bClient/ResponseCodes/MissingCategoryCustomDecalaration.html +7 -7
- data/doc/CzechPostB2bClient/ResponseCodes/MissingCompanyName.html +7 -7
- data/doc/CzechPostB2bClient/ResponseCodes/MissingContentCustomGood.html +7 -7
- data/doc/CzechPostB2bClient/ResponseCodes/MissingCurrencyCustomDeclaration.html +7 -7
- data/doc/CzechPostB2bClient/ResponseCodes/MissingHandlingInstructions.html +7 -7
- data/doc/CzechPostB2bClient/ResponseCodes/MissingHeight.html +7 -7
- data/doc/CzechPostB2bClient/ResponseCodes/MissingHsCodeCustomGood.html +7 -7
- data/doc/CzechPostB2bClient/ResponseCodes/MissingIsoCustomGood.html +7 -7
- data/doc/CzechPostB2bClient/ResponseCodes/MissingLength.html +7 -7
- data/doc/CzechPostB2bClient/ResponseCodes/MissingPalettsNumber.html +7 -7
- data/doc/CzechPostB2bClient/ResponseCodes/MissingParcelCustomGood.html +7 -7
- data/doc/CzechPostB2bClient/ResponseCodes/MissingParcelCustomGoods.html +7 -7
- data/doc/CzechPostB2bClient/ResponseCodes/MissingPhoneNumber.html +7 -7
- data/doc/CzechPostB2bClient/ResponseCodes/MissingPrefix.html +7 -7
- data/doc/CzechPostB2bClient/ResponseCodes/MissingPrice.html +7 -7
- data/doc/CzechPostB2bClient/ResponseCodes/MissingPriceCustomGood.html +7 -7
- data/doc/CzechPostB2bClient/ResponseCodes/MissingQuantityCustomGood.html +7 -7
- data/doc/CzechPostB2bClient/ResponseCodes/MissingRequiredAddresseeDocument.html +7 -7
- data/doc/CzechPostB2bClient/ResponseCodes/MissingRequiredAddresseeDocumentDuplicate.html +7 -7
- data/doc/CzechPostB2bClient/ResponseCodes/MissingRequiredAddresseeEmail.html +7 -7
- data/doc/CzechPostB2bClient/ResponseCodes/MissingRequiredEmail.html +7 -7
- data/doc/CzechPostB2bClient/ResponseCodes/MissingRequiredFirstNameAddresseeDocument.html +7 -7
- data/doc/CzechPostB2bClient/ResponseCodes/MissingRequiredMRNCode.html +7 -7
- data/doc/CzechPostB2bClient/ResponseCodes/MissingRequiredMobileNumber.html +7 -7
- data/doc/CzechPostB2bClient/ResponseCodes/MissingRequiredMobileNumberOrEmail.html +7 -7
- data/doc/CzechPostB2bClient/ResponseCodes/MissingRequiredParcelCode.html +7 -7
- data/doc/CzechPostB2bClient/ResponseCodes/MissingRequiredPayday.html +7 -7
- data/doc/CzechPostB2bClient/ResponseCodes/MissingRequiredPhoneNumber.html +7 -7
- data/doc/CzechPostB2bClient/ResponseCodes/MissingRequiredPhoneNumberOrEmail.html +7 -7
- data/doc/CzechPostB2bClient/ResponseCodes/MissingRequiredPhoneNumberOrWhat.html +7 -7
- data/doc/CzechPostB2bClient/ResponseCodes/MissingRequiredPrice.html +7 -7
- data/doc/CzechPostB2bClient/ResponseCodes/MissingRequiredService.html +7 -7
- data/doc/CzechPostB2bClient/ResponseCodes/MissingRequiredService10.html +7 -7
- data/doc/CzechPostB2bClient/ResponseCodes/MissingRequiredService1AB.html +7 -7
- data/doc/CzechPostB2bClient/ResponseCodes/MissingRequiredService1X.html +7 -7
- data/doc/CzechPostB2bClient/ResponseCodes/MissingRequiredService2X.html +7 -7
- data/doc/CzechPostB2bClient/ResponseCodes/MissingRequiredService3X.html +7 -7
- data/doc/CzechPostB2bClient/ResponseCodes/MissingRequiredService3XTrinity.html +7 -7
- data/doc/CzechPostB2bClient/ResponseCodes/MissingRequiredService4.html +7 -7
- data/doc/CzechPostB2bClient/ResponseCodes/MissingRequiredService4X.html +7 -7
- data/doc/CzechPostB2bClient/ResponseCodes/MissingRequiredService4x.html +7 -7
- data/doc/CzechPostB2bClient/ResponseCodes/MissingRequiredVoucherPrice.html +7 -7
- data/doc/CzechPostB2bClient/ResponseCodes/MissingRequiredZPROOrderNumber.html +7 -7
- data/doc/CzechPostB2bClient/ResponseCodes/MissingReturnInstructions.html +7 -7
- data/doc/CzechPostB2bClient/ResponseCodes/MissingReturnNumberDays.html +7 -7
- data/doc/CzechPostB2bClient/ResponseCodes/MissingSenderEmail.html +7 -7
- data/doc/CzechPostB2bClient/ResponseCodes/MissingSizeCategory.html +7 -7
- data/doc/CzechPostB2bClient/ResponseCodes/MissingSurname.html +7 -7
- data/doc/CzechPostB2bClient/ResponseCodes/MissingVariableSymbol.html +7 -7
- data/doc/CzechPostB2bClient/ResponseCodes/MissingVariableSymbolDuplicate.html +7 -7
- data/doc/CzechPostB2bClient/ResponseCodes/MissingWeightCustomGood.html +7 -7
- data/doc/CzechPostB2bClient/ResponseCodes/MissingWidth.html +7 -7
- data/doc/CzechPostB2bClient/ResponseCodes/NoContractService41.html +7 -7
- data/doc/CzechPostB2bClient/ResponseCodes/NoContractServiceReturnReceipt.html +7 -7
- data/doc/CzechPostB2bClient/ResponseCodes/NotExistingOrderNumber.html +7 -7
- data/doc/CzechPostB2bClient/ResponseCodes/Ok.html +7 -7
- data/doc/CzechPostB2bClient/ResponseCodes/OverenoVecerniDorucovani.html +7 -7
- data/doc/CzechPostB2bClient/ResponseCodes/PalettsNumberOutOfRange.html +7 -7
- data/doc/CzechPostB2bClient/ResponseCodes/ParcelCodeNotAllowed.html +7 -7
- data/doc/CzechPostB2bClient/ResponseCodes/ParcelCodeNotInAssignedRange.html +7 -7
- data/doc/CzechPostB2bClient/ResponseCodes/ParcelDoesNotMeetTheRequirementsForm.html +7 -7
- data/doc/CzechPostB2bClient/ResponseCodes/PriceAndCODAmountTooBig.html +7 -7
- data/doc/CzechPostB2bClient/ResponseCodes/PriceOutOfRange.html +7 -7
- data/doc/CzechPostB2bClient/ResponseCodes/PriceTooBig.html +7 -7
- data/doc/CzechPostB2bClient/ResponseCodes/PriceTooLow.html +7 -7
- data/doc/CzechPostB2bClient/ResponseCodes/ResponsibleConsignmentNumberCannotBeImported.html +7 -7
- data/doc/CzechPostB2bClient/ResponseCodes/ResponsibleConsignmentNumberOutOfRange.html +7 -7
- data/doc/CzechPostB2bClient/ResponseCodes/ServicesCombinationNotAllowed.html +7 -7
- data/doc/CzechPostB2bClient/ResponseCodes/TransmissionAlreadyClosed.html +7 -7
- data/doc/CzechPostB2bClient/ResponseCodes/TransmissionNotExists.html +7 -7
- data/doc/CzechPostB2bClient/ResponseCodes/TransmissionOpened.html +7 -7
- data/doc/CzechPostB2bClient/ResponseCodes/TransmissionUnfinished.html +7 -7
- data/doc/CzechPostB2bClient/ResponseCodes/UnauthorizedAccess.html +7 -7
- data/doc/CzechPostB2bClient/ResponseCodes/UnknownAddresseeCity.html +7 -7
- data/doc/CzechPostB2bClient/ResponseCodes/UnknownAddresseePostCode.html +7 -7
- data/doc/CzechPostB2bClient/ResponseCodes/UnknownPrefix.html +7 -7
- data/doc/CzechPostB2bClient/ResponseCodes/VariableSymbolIsNotNumber.html +7 -7
- data/doc/CzechPostB2bClient/ResponseCodes/WeightCustomGoodOutOfRange.html +7 -7
- data/doc/CzechPostB2bClient/ResponseCodes/WeightIsOutOfRange.html +7 -7
- data/doc/CzechPostB2bClient/ResponseCodes/WeightIsOutOfRangeDuplicate.html +7 -7
- data/doc/CzechPostB2bClient/ResponseParsers.html +8 -8
- data/doc/CzechPostB2bClient/ResponseParsers/BaseParser.html +8 -8
- data/doc/CzechPostB2bClient/ResponseParsers/GetParcelStateParser.html +31 -16
- data/doc/CzechPostB2bClient/ResponseParsers/GetParcelsPrintingParser.html +21 -21
- data/doc/CzechPostB2bClient/ResponseParsers/GetResultParcelsParser.html +18 -12
- data/doc/CzechPostB2bClient/ResponseParsers/GetStatsParser.html +6 -6
- data/doc/CzechPostB2bClient/ResponseParsers/ParcelServiceSyncParser.html +805 -0
- data/doc/CzechPostB2bClient/ResponseParsers/SendParcelsParser.html +153 -10
- data/doc/CzechPostB2bClient/Services.html +8 -8
- data/doc/CzechPostB2bClient/Services/AddressSheetsGenerator.html +9 -9
- data/doc/CzechPostB2bClient/Services/ApiCaller.html +11 -7
- data/doc/CzechPostB2bClient/Services/Communicator.html +7 -7
- data/doc/CzechPostB2bClient/Services/DeliveringInspector.html +8 -8
- data/doc/CzechPostB2bClient/Services/Orchestrator.html +6 -6
- data/doc/CzechPostB2bClient/Services/ParcelsAsyncSender.html +402 -0
- data/doc/CzechPostB2bClient/Services/ParcelsSendProcessUpdater.html +8 -8
- data/doc/CzechPostB2bClient/Services/ParcelsSender.html +21 -233
- data/doc/CzechPostB2bClient/Services/ParcelsSubmissionCloser.html +12 -12
- data/doc/CzechPostB2bClient/Services/ParcelsSyncSender.html +464 -0
- data/doc/CzechPostB2bClient/Services/TimePeriodStatisticator.html +10 -10
- data/doc/CzechPostB2bClient/Services/XsdsDownloader.html +289 -0
- data/doc/SteppedService.html +8 -7
- data/doc/SteppedService/Base.html +31 -31
- data/doc/SteppedService/Errors.html +6 -6
- data/doc/_index.html +739 -23
- data/doc/class_list.html +3 -3
- data/doc/css/style.css +2 -2
- data/doc/file.README.html +219 -194
- data/doc/file_list.html +2 -2
- data/doc/frames.html +2 -2
- data/doc/index.html +219 -194
- data/doc/js/app.js +14 -3
- data/doc/method_list.html +278 -70
- data/doc/top-level-namespace.html +6 -6
- data/lib/czech_post_b2b_client/configuration.rb +3 -1
- data/lib/czech_post_b2b_client/printing_templates.rb +75 -28
- data/lib/czech_post_b2b_client/request_builders/get_parcels_printing_builder.rb +1 -1
- data/lib/czech_post_b2b_client/response_parsers/parcel_service_sync_parser.rb +1 -1
- data/lib/czech_post_b2b_client/services/delivering_inspector.rb +0 -2
- data/lib/czech_post_b2b_client/services/parcels_sync_sender.rb +1 -0
- data/lib/czech_post_b2b_client/version.rb +1 -1
- metadata +112 -6
data/doc/class_list.html
CHANGED
|
@@ -4,9 +4,9 @@
|
|
|
4
4
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
5
5
|
<meta charset="utf-8" />
|
|
6
6
|
|
|
7
|
-
<link rel="stylesheet" href="css/full_list.css" type="text/css" media="screen"
|
|
7
|
+
<link rel="stylesheet" href="css/full_list.css" type="text/css" media="screen" />
|
|
8
8
|
|
|
9
|
-
<link rel="stylesheet" href="css/common.css" type="text/css" media="screen"
|
|
9
|
+
<link rel="stylesheet" href="css/common.css" type="text/css" media="screen" />
|
|
10
10
|
|
|
11
11
|
|
|
12
12
|
|
|
@@ -43,7 +43,7 @@
|
|
|
43
43
|
|
|
44
44
|
<ul id="full_list" class="class">
|
|
45
45
|
<li id="object_" class="odd"><div class="item" style="padding-left:30px"><span class='object_link'><a href="top-level-namespace.html" title="Top Level Namespace (root)">Top Level Namespace</a></span></div></li>
|
|
46
|
-
CzechPostB2bClientTop Level Namespace
SteppedServiceTop Level Namespace |
|
46
|
+
CzechPostB2bClientTop Level Namespace
SteppedServiceTop Level Namespace |
|
47
47
|
|
|
48
48
|
</ul>
|
|
49
49
|
</div>
|
data/doc/css/style.css
CHANGED
|
@@ -422,8 +422,8 @@ li.r2 { background: #fafafa; }
|
|
|
422
422
|
#toc ol { padding-left: 1.8em; }
|
|
423
423
|
#toc li { font-size: 1.1em; line-height: 1.7em; }
|
|
424
424
|
#toc > ol > li { font-size: 1.1em; font-weight: bold; }
|
|
425
|
-
#toc ol > ol { font-size: 0.9em; }
|
|
426
|
-
#toc ol ol > ol { padding-left: 2.3em; }
|
|
425
|
+
#toc ol > li > ol { font-size: 0.9em; }
|
|
426
|
+
#toc ol ol > li > ol { padding-left: 2.3em; }
|
|
427
427
|
#toc ol + li { margin-top: 0.3em; }
|
|
428
428
|
#toc.hidden { padding: 10px; background: #fefefe; box-shadow: none; }
|
|
429
429
|
#toc.hidden:hover { background: #fafafa; }
|
data/doc/file.README.html
CHANGED
|
@@ -6,15 +6,15 @@
|
|
|
6
6
|
<title>
|
|
7
7
|
File: README
|
|
8
8
|
|
|
9
|
-
— Documentation by YARD 0.9.
|
|
9
|
+
— Documentation by YARD 0.9.24
|
|
10
10
|
|
|
11
11
|
</title>
|
|
12
12
|
|
|
13
|
-
<link rel="stylesheet" href="css/style.css" type="text/css"
|
|
13
|
+
<link rel="stylesheet" href="css/style.css" type="text/css" />
|
|
14
14
|
|
|
15
|
-
<link rel="stylesheet" href="css/common.css" type="text/css"
|
|
15
|
+
<link rel="stylesheet" href="css/common.css" type="text/css" />
|
|
16
16
|
|
|
17
|
-
<script type="text/javascript"
|
|
17
|
+
<script type="text/javascript">
|
|
18
18
|
pathId = "README";
|
|
19
19
|
relpath = '';
|
|
20
20
|
</script>
|
|
@@ -57,39 +57,51 @@
|
|
|
57
57
|
<div class="clear"></div>
|
|
58
58
|
</div>
|
|
59
59
|
|
|
60
|
-
<div id="content"><div id='filecontents'><h1
|
|
61
|
-
<p>Accessing B2B API of Czech Post for bulk processing of parcels (“B2B - WS PodáníOnline”).</p>
|
|
60
|
+
<div id="content"><div id='filecontents'><h1>CzechPostB2bClient</h1>
|
|
62
61
|
|
|
63
|
-
<p>
|
|
64
|
-
- <em>sendParcels</em> - stores data of parcels for async processing [HTTP POST - async response]
|
|
65
|
-
- <em>getResultParcels</em> - return results of such processing [HTTP GET - sync response]
|
|
66
|
-
- <em>getStats</em> - returns statistics of parcels sent in time period [HTTP GET - sync response]
|
|
67
|
-
- <em>getParcelState</em> - returns all known states for listed parcels [HTTP GET - sync response]
|
|
68
|
-
- <em>getParcelsPrinting</em> - returns PDF with address labels/stickers for listed parcels [HTTP GET - sync response]</p>
|
|
62
|
+
<p>Accessing B2B API of Czech Post for bulk processing of parcels ("B2B - WS PodáníOnline").</p>
|
|
69
63
|
|
|
70
|
-
<
|
|
71
|
-
<p>### 1) Registration at Czech Post (CP)
|
|
72
|
-
The longterm and hardest part.
|
|
73
|
-
- Connect Czech Post representative and make a contract with them.
|
|
74
|
-
- Ask them for ALL documentation!(I have to ask 3 times to collect enough of it). They like to put files into DOCX file, so click on file icons!
|
|
75
|
-
- You have to obtain “komerční certifikát PostSignum”.</p>
|
|
64
|
+
<p>There are these supported operations of API:</p>
|
|
76
65
|
|
|
77
|
-
<
|
|
66
|
+
<ul>
|
|
67
|
+
<li><em>parcelServiceSync</em> - stores data of one parcel and return package_code and optional PDF adress sheet [HTTP POST - sync response]
|
|
68
|
+
Seems to me, that there are is no place extensive Cash On Delivery data, just <code>amount</code> and <code>currency</code></li>
|
|
69
|
+
<li><em>sendParcels</em> - stores data of parcels for async processing [HTTP POST - async response]</li>
|
|
70
|
+
<li><em>getResultParcels</em> - return results of such processing [HTTP GET - sync response]</li>
|
|
71
|
+
<li><em>getStats</em> - returns statistics of parcels sent in time period [HTTP GET - sync response]</li>
|
|
72
|
+
<li><em>getParcelState</em> - returns all known states for listed parcels [HTTP GET - sync response]</li>
|
|
73
|
+
<li><em>getParcelsPrinting</em> - returns PDF with address labels/stickers for listed parcels [HTTP GET - sync response]</li>
|
|
74
|
+
</ul>
|
|
75
|
+
|
|
76
|
+
<h2>Installation</h2>
|
|
77
|
+
|
|
78
|
+
<h3>1) Registration at Czech Post (CP)</h3>
|
|
79
|
+
|
|
80
|
+
<p>The longterm and hardest part.</p>
|
|
81
|
+
|
|
82
|
+
<ul>
|
|
83
|
+
<li>Connect Czech Post representative and make a contract with them.</li>
|
|
84
|
+
<li>Ask them for ALL documentation!(I have to ask 3 times to collect enough of it). They like to put files into DOCX file, so click on file icons!</li>
|
|
85
|
+
<li>You have to obtain "komerční certifikát PostSignum".</li>
|
|
86
|
+
</ul>
|
|
87
|
+
|
|
88
|
+
<p>Instructions (in czech) are in <a href="./documents/Postup_pro_zaveden%C3%AD_API_slu%C5%BEeb_%C4%8Cesk%C3%A9_po%C5%A1ty.docx"><code>documents/Postup_pro_zavedení_API_služeb_České_pošty.docx</code></a></p>
|
|
89
|
+
|
|
90
|
+
<h3>2) Preparations on PodaniOnline app</h3>
|
|
78
91
|
|
|
79
|
-
<h3 id="preparations-on-podanionline-app">2) Preparations on PodaniOnline app</h3>
|
|
80
92
|
<p>1) Sign in to <a href="https://www.postaonline.cz/rap/prihlaseni">PostaOnline</a>
|
|
81
|
-
2) Go to <a href="https://www.postaonline.cz/klientskazona?p_p_id=clientzone_WAR_clientZoneportlet&
|
|
93
|
+
2) Go to <a href="https://www.postaonline.cz/klientskazona?p_p_id=clientzone_WAR_clientZoneportlet&p_p_lifecycle=0&_clientzone_WAR_clientZoneportlet_action=showPol&_clientzone_WAR_clientZoneportlet_implicitModel=true">"Podání Online"</a>
|
|
82
94
|
3) When You are in, select tab <strong>Nastavení</strong> and menu <strong>Podací místa</strong>
|
|
83
|
-
4) Add <em>Podací místo</em> and write down it
|
|
95
|
+
4) Add <em>Podací místo</em> and write down it's ID (will be used in <code>sending_post_office_location_number</code>)
|
|
84
96
|
5) Switch tab to <strong>Zásilky</strong> and go to menu <strong>Zásilky => Přednastavení údajů</strong>
|
|
85
97
|
6) Write down value(s) in <em>Výběr technologického čísla</em> (it will be used as <code>customer_id</code>).</p>
|
|
86
98
|
|
|
87
|
-
<h3
|
|
88
|
-
<p>Add this line to your application’s Gemfile:</p>
|
|
99
|
+
<h3>3) Gem installation</h3>
|
|
89
100
|
|
|
90
|
-
<p
|
|
91
|
-
|
|
92
|
-
</
|
|
101
|
+
<p>Add this line to your application's Gemfile:</p>
|
|
102
|
+
|
|
103
|
+
<pre class="code ruby"><code class="ruby"><span class='id identifier rubyid_gem'>gem</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>czech_post_b2b_client</span><span class='tstring_end'>'</span></span>
|
|
104
|
+
</code></pre>
|
|
93
105
|
|
|
94
106
|
<p>And then execute:</p>
|
|
95
107
|
|
|
@@ -101,63 +113,65 @@ gem 'czech_post_b2b_client'
|
|
|
101
113
|
<pre class="code ruby"><code class="ruby">$ gem install czech_post_b2b_client
|
|
102
114
|
</code></pre>
|
|
103
115
|
|
|
104
|
-
<h3
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
116
|
+
<h3>4) Setting up gem</h3>
|
|
117
|
+
|
|
118
|
+
<p>Set up your <code>contract_id</code>, <code>customer_id</code> (both from CP signed contract), <code>certificate_path</code>, <code>private_key_path</code> and <code>private_key_password</code> in configuration:</p>
|
|
119
|
+
|
|
120
|
+
<pre class="code ruby"><code class="ruby"><span class='const'><span class='object_link'><a href="CzechPostB2bClient.html" title="CzechPostB2bClient (module)">CzechPostB2bClient</a></span></span><span class='period'>.</span><span class='id identifier rubyid_configure'><span class='object_link'><a href="CzechPostB2bClient.html#configure-class_method" title="CzechPostB2bClient.configure (method)">configure</a></span></span> <span class='kw'>do</span> <span class='op'>|</span><span class='id identifier rubyid_config'>config</span><span class='op'>|</span>
|
|
121
|
+
<span class='id identifier rubyid_config'>config</span><span class='period'>.</span><span class='id identifier rubyid_contract_id'>contract_id</span> <span class='op'>=</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>contract_id</span><span class='tstring_end'>'</span></span>
|
|
122
|
+
<span class='id identifier rubyid_config'>config</span><span class='period'>.</span><span class='id identifier rubyid_customer_id'>customer_id</span> <span class='op'>=</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>customer_id</span><span class='tstring_end'>'</span></span>
|
|
123
|
+
<span class='id identifier rubyid_config'>config</span><span class='period'>.</span><span class='id identifier rubyid_certificate_path'>certificate_path</span> <span class='op'>=</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>full_path/to/your/postsignum_certificate.pem</span><span class='tstring_end'>'</span></span>
|
|
124
|
+
<span class='id identifier rubyid_config'>config</span><span class='period'>.</span><span class='id identifier rubyid_private_key_path'>private_key_path</span> <span class='op'>=</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>full_path/to/your/postsignum_private.key</span><span class='tstring_end'>'</span></span>
|
|
125
|
+
<span class='id identifier rubyid_config'>config</span><span class='period'>.</span><span class='id identifier rubyid_private_key_password'>private_key_password</span> <span class='op'>=</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>your_password or nil</span><span class='tstring_end'>'</span></span>
|
|
126
|
+
|
|
127
|
+
<span class='comment'># this actually do not work, I have to use `sending_post_office_location_number`. But it is REQUIRED!
|
|
128
|
+
</span> <span class='id identifier rubyid_config'>config</span><span class='period'>.</span><span class='id identifier rubyid_sending_post_office_code'>sending_post_office_code</span> <span class='op'>=</span> <span class='int'>12_345</span> <span class='comment'># PSC of post office where parcels will be physically delivered and submitted
|
|
129
|
+
</span>
|
|
130
|
+
<span class='comment'># and You can override defaults
|
|
131
|
+
</span> <span class='comment'># config.sending_post_office_location_number => 1
|
|
132
|
+
</span> <span class='comment'># config.namespaces #XML namespaces
|
|
133
|
+
</span> <span class='comment'># config.language => :cs # other languages are not supported now
|
|
134
|
+
</span> <span class='comment'># config.logger => ::Rails.logger or ::Logger.new(STDOUT),
|
|
135
|
+
</span> <span class='comment'># config.b2b_api_base_uri => 'https://b2b.postaonline.cz/services/POLService/v1'
|
|
136
|
+
</span><span class='kw'>end</span>
|
|
124
137
|
</code></pre>
|
|
125
138
|
|
|
126
139
|
<ul>
|
|
127
|
-
|
|
128
|
-
|
|
140
|
+
<li><code>contract_id</code> is <em>"ID CČK"</em> (can be found in contract; eg.: <em>"2511327004"</em>)</li>
|
|
141
|
+
<li><code>customer_id</code> is <em>"Technologické číslo"</em> (can be found in contract; eg.: <em>"U123"</em> or <em>"L03022"</em>; also is visible at <a href="https://www.postaonline.cz/podanionline/PrednastaveniUdajuZasilky.action">PodaníOnline</a></li>
|
|
129
142
|
</ul>
|
|
130
143
|
|
|
131
144
|
<p>Because PostSignum Certificate Authority is not trusted by default, correct certificate chain is in <code>certs/</code> folder. If You have problem with them, create a issue here. Maybe they are outdated now.</p>
|
|
132
145
|
|
|
133
|
-
<h2
|
|
134
|
-
|
|
146
|
+
<h2>Usage</h2>
|
|
147
|
+
|
|
148
|
+
<p><strong>You have to know which parcel type (according to CP) you sending!</strong> Eg. 'BA' or 'RR'. See <a href="./documents/parcel_types.md"><code>documents/parcel_types.md</code></a>.</p>
|
|
135
149
|
|
|
136
150
|
<p><strong>And what services You will use for each parcel</strong>, see <a href="./documents/services_list.md"><code>documents/services_list.md</code></a> and <a href="./documents/parcels_type_and_services_restrictions.md"><code>documents/parcels_type_and_services_restrictions.md</code></a>.</p>
|
|
137
151
|
|
|
138
|
-
<p>Hashes used is service calls bellow
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
152
|
+
<p>Hashes used is service calls bellow:</p>
|
|
153
|
+
|
|
154
|
+
<pre class="code ruby"><code class="ruby">short_sender_data = { address: {
|
|
155
|
+
company_name: 'Oriflame',
|
|
156
|
+
addition_to_name: 'perfume', # optional
|
|
157
|
+
street: 'V olšinách',
|
|
158
|
+
house_number: '16',
|
|
159
|
+
city_part: 'Strašnice',
|
|
160
|
+
city: 'Praha',
|
|
161
|
+
post_code: 10_000,
|
|
162
|
+
},
|
|
163
|
+
mobile_phone: '+420777888999',
|
|
164
|
+
email: 'rehor.jan@cpost.cz' }
|
|
165
|
+
sending_data = { contract_id: configuration.contract_id,
|
|
166
|
+
parcels_sending_date: Date.today,
|
|
167
|
+
sending_post_office_location_number: 1,
|
|
168
|
+
sender: short_sender_data,
|
|
169
|
+
cash_on_delivery: {
|
|
170
|
+
address: short_sender_data[:address]
|
|
171
|
+
bank_account: '123456-1234567890/1234'
|
|
172
|
+
} }
|
|
173
|
+
|
|
174
|
+
short_addressee_data = { address: {
|
|
161
175
|
first_name: 'Petr',
|
|
162
176
|
last_name: 'Foton',
|
|
163
177
|
street: 'Fischerova',
|
|
@@ -196,160 +210,171 @@ parcels = [
|
|
|
196
210
|
weight_in_kg: 1.9 },
|
|
197
211
|
services: [7,'M']
|
|
198
212
|
}
|
|
199
|
-
]
|
|
213
|
+
]
|
|
214
|
+
</code></pre>
|
|
215
|
+
|
|
216
|
+
<p>1 ) Pack your parcel(s)</p>
|
|
217
|
+
|
|
218
|
+
<p>2 ) If you have many parcels and treats them as bulk, use ASYNC registration process (steps 3a - 7a)[15 000 calls per day allowed]. If You want to register parcel and get parcel_code and address sheet immediatelly (3 sec), use SYNC process (step 3b)[1 000 calls per day allowed]</p>
|
|
219
|
+
|
|
220
|
+
<p>3a) Call <code>ParcelsAsyncSender</code>, this will setup <code>transmission_id</code> and expected time to ask for results.</p>
|
|
221
|
+
|
|
222
|
+
<pre class="code ruby"><code class="ruby"><span class='id identifier rubyid_psender'>psender</span> <span class='op'>=</span> <span class='const'><span class='object_link'><a href="CzechPostB2bClient.html" title="CzechPostB2bClient (module)">CzechPostB2bClient</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="CzechPostB2bClient/Services.html" title="CzechPostB2bClient::Services (module)">Services</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="CzechPostB2bClient/Services/ParcelsAsyncSender.html" title="CzechPostB2bClient::Services::ParcelsAsyncSender (class)">ParcelsAsyncSender</a></span></span><span class='period'>.</span><span class='id identifier rubyid_call'><span class='object_link'><a href="SteppedService/Base.html#call-class_method" title="SteppedService::Base.call (method)">call</a></span></span><span class='lparen'>(</span><span class='label'>sending_data:</span> <span class='id identifier rubyid_sending_data'>sending_data</span><span class='comma'>,</span> <span class='label'>parcels:</span> <span class='id identifier rubyid_parcels'>parcels</span><span class='rparen'>)</span>
|
|
223
|
+
|
|
224
|
+
<span class='kw'>if</span> <span class='id identifier rubyid_psender'>psender</span><span class='period'>.</span><span class='id identifier rubyid_success?'>success?</span>
|
|
225
|
+
<span class='id identifier rubyid_result'>result</span> <span class='op'>=</span> <span class='id identifier rubyid_psender'>psender</span><span class='period'>.</span><span class='id identifier rubyid_result'>result</span>
|
|
226
|
+
<span class='id identifier rubyid_processing_end_time_utc'>processing_end_time_utc</span> <span class='op'>=</span> <span class='lparen'>(</span><span class='id identifier rubyid_result'>result</span><span class='period'>.</span><span class='id identifier rubyid_processing_end_expected_at'>processing_end_expected_at</span> <span class='op'>-</span> <span class='lparen'>(</span><span class='int'>60</span> <span class='op'>*</span><span class='int'>60</span><span class='rparen'>)</span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_utc'>utc</span> <span class='comment'># API returns time in CET but marked as UTC
|
|
227
|
+
</span> <span class='id identifier rubyid_transaction_id'>transaction_id</span> <span class='op'>=</span> <span class='id identifier rubyid_result'>result</span><span class='period'>.</span><span class='id identifier rubyid_transaction_id'>transaction_id</span>
|
|
228
|
+
<span class='kw'>else</span>
|
|
229
|
+
<span class='id identifier rubyid_puts'>puts</span> <span class='id identifier rubyid_psender'>psender</span><span class='period'>.</span><span class='id identifier rubyid_errors'>errors</span><span class='period'>.</span><span class='id identifier rubyid_full_messages'>full_messages</span>
|
|
230
|
+
<span class='kw'>end</span>
|
|
231
|
+
</code></pre>
|
|
232
|
+
|
|
233
|
+
<p>For now, <code>parcels</code> is array of complicated hashes; each parcel must have <code>parcel_id</code> key (your ID of parcel).</p>
|
|
234
|
+
|
|
235
|
+
<p>4a) When such expected time pass, ask for results by calling <code>ParcelsSendProcessUpdater</code>. You can get error <code>Processing is not yet finished</code> or hash based on <code>parcel_id</code> keys.</p>
|
|
236
|
+
|
|
237
|
+
<pre class="code ruby"><code class="ruby"><span class='id identifier rubyid_pudater'>pudater</span> <span class='op'>=</span> <span class='const'><span class='object_link'><a href="CzechPostB2bClient.html" title="CzechPostB2bClient (module)">CzechPostB2bClient</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="CzechPostB2bClient/Services.html" title="CzechPostB2bClient::Services (module)">Services</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="CzechPostB2bClient/Services/ParcelsSendProcessUpdater.html" title="CzechPostB2bClient::Services::ParcelsSendProcessUpdater (class)">ParcelsSendProcessUpdater</a></span></span><span class='period'>.</span><span class='id identifier rubyid_call'><span class='object_link'><a href="SteppedService/Base.html#call-class_method" title="SteppedService::Base.call (method)">call</a></span></span><span class='lparen'>(</span><span class='label'>transmission_id:</span> <span class='id identifier rubyid_transmission_id'>transmission_id</span><span class='rparen'>)</span>
|
|
238
|
+
|
|
239
|
+
<span class='kw'>if</span> <span class='id identifier rubyid_pupdater'>pupdater</span><span class='period'>.</span><span class='id identifier rubyid_success?'>success?</span>
|
|
240
|
+
<span class='id identifier rubyid_update_my_parcels_with'>update_my_parcels_with</span><span class='lparen'>(</span><span class='id identifier rubyid_pupdater'>pupdater</span><span class='period'>.</span><span class='id identifier rubyid_result'>result</span><span class='rparen'>)</span> <span class='comment'># => { 'parcel_1of2' => { parcel_code: 'BA12354678', states: [{ code: 1, text: 'OK' }]},
|
|
241
|
+
</span> <span class='comment'># 'parcel_2of2' => { parcel_code: 'BA12354679', states: [{ code: 1, text: 'OK' }]},
|
|
242
|
+
</span> <span class='comment'># 'parcel_3' => { parcel_code: 'BA12354680', states: [{ code: 1, text: 'OK' }]}
|
|
243
|
+
</span><span class='kw'>else</span>
|
|
244
|
+
<span class='id identifier rubyid_puts'>puts</span> <span class='id identifier rubyid_psender'>psender</span><span class='period'>.</span><span class='id identifier rubyid_errors'>errors</span><span class='period'>.</span><span class='id identifier rubyid_full_messages'>full_messages</span> <span class='comment'># => "response_state: ResponseCode[19 BATCH_INVALID] V dávce se vyskytují chybné záznamy"
|
|
245
|
+
</span> <span class='comment'># "parcels: Parcel[parcel_2of2] => ResponseCode[104 INVALID_WEIGHT] Hmotnost mimo povolený rozsah"
|
|
246
|
+
</span> <span class='comment'># "parcels: Parcel[parcel_2of2] => ResponseCode[261 MISSING_SIZE_CATEGORY] Neuvedena rozměrová kategorie zásilky"
|
|
247
|
+
</span> <span class='comment'># "parcels: Parcel[parcel_3] => ResponseCode[310 INVALID_PREFIX] Neplatný typ zásilky"
|
|
248
|
+
</span><span class='kw'>end</span>
|
|
200
249
|
</code></pre>
|
|
201
250
|
|
|
202
|
-
<p>
|
|
203
|
-
|
|
204
|
-
<p>
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
<
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
251
|
+
<p><code>parcel_code</code> is CzechPost Tracking number of parcel and is used in following calls.</p>
|
|
252
|
+
|
|
253
|
+
<p>5a) Print address sheets of parcel(s) by calling <code>AddressSheetsGenerator</code>.
|
|
254
|
+
See <a href="./lib/czech_post_b2b_client/printing_templates.rb">template_classes</a> for available templates.</p>
|
|
255
|
+
|
|
256
|
+
<pre class="code ruby"><code class="ruby"><span class='id identifier rubyid_parcel_codes'>parcel_codes</span> <span class='op'>=</span> <span class='qwords_beg'>%w[</span><span class='tstring_content'>RA123456789</span><span class='words_sep'> </span><span class='tstring_content'>RR123456789F</span><span class='words_sep'> </span><span class='tstring_content'>RR123456789G</span><span class='words_sep'>]</span> <span class='comment'># beware of parcel_id!
|
|
257
|
+
</span><span class='id identifier rubyid_options'>options</span> <span class='op'>=</span> <span class='lbrace'>{</span>
|
|
258
|
+
<span class='label'>customer_id:</span> <span class='id identifier rubyid_configuration'>configuration</span><span class='period'>.</span><span class='id identifier rubyid_customer_id'>customer_id</span><span class='comma'>,</span> <span class='comment'># required
|
|
259
|
+
</span> <span class='label'>contract_number:</span> <span class='id identifier rubyid_configuration'>configuration</span><span class='period'>.</span><span class='id identifier rubyid_contract_id'>contract_id</span><span class='comma'>,</span> <span class='comment'># not required
|
|
260
|
+
</span> <span class='label'>template_id:</span> <span class='int'>24</span><span class='comma'>,</span> <span class='comment'># 'obalka 3 - B4' #
|
|
261
|
+
</span> <span class='label'>margin_in_mm:</span> <span class='lbrace'>{</span> <span class='label'>top:</span> <span class='int'>5</span><span class='comma'>,</span> <span class='label'>left:</span> <span class='int'>3</span> <span class='rbrace'>}</span> <span class='comment'># required
|
|
262
|
+
</span> <span class='rbrace'>}</span>
|
|
263
|
+
|
|
264
|
+
<span class='id identifier rubyid_adrprinter'>adrprinter</span> <span class='op'>=</span> <span class='const'><span class='object_link'><a href="CzechPostB2bClient.html" title="CzechPostB2bClient (module)">CzechPostB2bClient</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="CzechPostB2bClient/Services.html" title="CzechPostB2bClient::Services (module)">Services</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="CzechPostB2bClient/Services/AddressSheetsGenerator.html" title="CzechPostB2bClient::Services::AddressSheetsGenerator (class)">AddressSheetsGenerator</a></span></span><span class='period'>.</span><span class='id identifier rubyid_call'><span class='object_link'><a href="SteppedService/Base.html#call-class_method" title="SteppedService::Base.call (method)">call</a></span></span><span class='lparen'>(</span><span class='label'>parcel_codes:</span> <span class='id identifier rubyid_parcel_codes'>parcel_codes</span><span class='comma'>,</span> <span class='label'>options:</span> <span class='id identifier rubyid_options'>options</span> <span class='rparen'>)</span>
|
|
265
|
+
|
|
266
|
+
<span class='kw'>if</span> <span class='id identifier rubyid_adrprinter'>adrprinter</span><span class='period'>.</span><span class='id identifier rubyid_success?'>success?</span>
|
|
267
|
+
<span class='const'>File</span><span class='period'>.</span><span class='id identifier rubyid_write'>write</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>adrsheet.pdf</span><span class='tstring_end'>"</span></span><span class='comma'>,</span> <span class='id identifier rubyid_adrprinter'>adrprinter</span><span class='period'>.</span><span class='id identifier rubyid_result'>result</span><span class='period'>.</span><span class='id identifier rubyid_pdf_content'>pdf_content</span><span class='rparen'>)</span>
|
|
268
|
+
<span class='kw'>else</span>
|
|
269
|
+
<span class='id identifier rubyid_puts'>puts</span><span class='lparen'>(</span><span class='id identifier rubyid_adrprinter'>adrprinter</span><span class='period'>.</span><span class='id identifier rubyid_errors'>errors</span><span class='period'>.</span><span class='id identifier rubyid_full_messages'>full_messages</span><span class='rparen'>)</span>
|
|
270
|
+
<span class='kw'>end</span>
|
|
217
271
|
</code></pre>
|
|
218
272
|
|
|
219
|
-
<p>
|
|
220
|
-
|
|
221
|
-
<
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
end
|
|
236
|
-
```
|
|
237
|
-
`parcel_code` is CzechPost ID of parcel and is used in following calls.
|
|
273
|
+
<p>6a) Repeat steps 1-4 until You decide to deliver packages to post office.</p>
|
|
274
|
+
|
|
275
|
+
<p>7a) Close your parcels submission with call <code>ParcelsSubmissionCloser.call(sending_data: sender_data)</code>.</p>
|
|
276
|
+
|
|
277
|
+
<p>3b) For immediate (one) parcel registering call <code>ParcelsSyncSender</code>. You can optionally request address sheet pdf in response (see step 5a for info)</p>
|
|
278
|
+
|
|
279
|
+
<pre class="code ruby"><code class="ruby"><span class='id identifier rubyid_s_data'>s_data</span> <span class='op'>=</span> <span class='id identifier rubyid_sending_data'>sending_data</span><span class='period'>.</span><span class='id identifier rubyid_merge'>merge</span><span class='lparen'>(</span><span class='label'>print_params:</span> <span class='lbrace'>{</span> <span class='label'>template_id:</span> <span class='int'>40</span><span class='comma'>,</span> <span class='label'>margin_in_mm:</span> <span class='lbrace'>{</span> <span class='label'>top:</span> <span class='int'>1</span><span class='comma'>,</span> <span class='label'>left:</span> <span class='int'>1</span> <span class='rbrace'>}</span><span class='rbrace'>}</span><span class='rparen'>)</span>
|
|
280
|
+
<span class='id identifier rubyid_psender'>psender</span> <span class='op'>=</span> <span class='const'><span class='object_link'><a href="CzechPostB2bClient.html" title="CzechPostB2bClient (module)">CzechPostB2bClient</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="CzechPostB2bClient/Services.html" title="CzechPostB2bClient::Services (module)">Services</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="CzechPostB2bClient/Services/ParcelsSyncSender.html" title="CzechPostB2bClient::Services::ParcelsSyncSender (class)">ParcelsSyncSender</a></span></span><span class='period'>.</span><span class='id identifier rubyid_call'><span class='object_link'><a href="SteppedService/Base.html#call-class_method" title="SteppedService::Base.call (method)">call</a></span></span><span class='lparen'>(</span><span class='label'>sending_data:</span> <span class='id identifier rubyid_s_data'>s_data</span><span class='comma'>,</span> <span class='label'>parcels:</span> <span class='lbracket'>[</span><span class='id identifier rubyid_parcels'>parcels</span><span class='period'>.</span><span class='id identifier rubyid_first'>first</span><span class='rbracket'>]</span><span class='rparen'>)</span>
|
|
281
|
+
|
|
282
|
+
<span class='kw'>if</span> <span class='id identifier rubyid_psender'>psender</span><span class='period'>.</span><span class='id identifier rubyid_success?'>success?</span>
|
|
283
|
+
<span class='id identifier rubyid_result'>result</span> <span class='op'>=</span> <span class='id identifier rubyid_psender'>psender</span><span class='period'>.</span><span class='id identifier rubyid_result'>result</span>
|
|
284
|
+
<span class='id identifier rubyid_update_my_parcels_with'>update_my_parcels_with</span><span class='lparen'>(</span><span class='id identifier rubyid_result'>result</span><span class='rparen'>)</span> <span class='comment'># => { 'parcel_1of2' => { parcel_code: 'BA12354678', states: [{ code: 1, text: 'OK' }]},
|
|
285
|
+
</span> <span class='const'>File</span><span class='period'>.</span><span class='id identifier rubyid_write'>write</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>adrsheet.pdf</span><span class='tstring_end'>"</span></span><span class='comma'>,</span> <span class='id identifier rubyid_result'>result</span><span class='period'>.</span><span class='id identifier rubyid_pdf_content'>pdf_content</span><span class='rparen'>)</span>
|
|
286
|
+
<span class='kw'>else</span>
|
|
287
|
+
<span class='id identifier rubyid_puts'>puts</span> <span class='id identifier rubyid_psender'>psender</span><span class='period'>.</span><span class='id identifier rubyid_errors'>errors</span><span class='period'>.</span><span class='id identifier rubyid_full_messages'>full_messages</span>
|
|
288
|
+
<span class='kw'>end</span>
|
|
238
289
|
</code></pre>
|
|
239
290
|
|
|
240
|
-
<p>
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
291
|
+
<p><code>parcel_code</code> is CzechPost Tracking number of parcel and is used in following calls.</p>
|
|
292
|
+
|
|
293
|
+
<p>8_) <em>They will await You at post office with warm welcome (hopefully). Parcels which are not delivered within 60 days are removed from CzechPost systems for free :-)</em></p>
|
|
294
|
+
|
|
295
|
+
<p>9_) You can check current status of delivering with <code>DeliveringInspector</code>, which will return hash based on <code>parcel_code</code> keys.</p>
|
|
296
|
+
|
|
297
|
+
<pre class="code ruby"><code class="ruby">delivery_boy = CzechPostB2bClient::Services::DeliveringInspector.call(parcel_codes: parcel_codes)
|
|
298
|
+
|
|
299
|
+
if delivery_boy.success?
|
|
300
|
+
update_my_parcels_delivery_status_with(delivery_boy.result)
|
|
301
|
+
# result is like:
|
|
302
|
+
# { 'RA12345687' => { current_state: { id: '91',
|
|
303
|
+
date: Date.parse('2015-09-04'),
|
|
304
|
+
text: 'Dodání zásilky.',
|
|
305
|
+
post_code: '25756',
|
|
306
|
+
post_name: 'Neveklov'},
|
|
307
|
+
deposited_until: Date.new(2015, 9, 2),
|
|
308
|
+
deposited_for_days: 15,
|
|
309
|
+
all_states: [
|
|
310
|
+
{ id: '21', date: Date.parse('2015-09-02'), text: 'Podání zásilky.', post_code: '26701', post_name: 'Králův Dvůr u Berouna' },
|
|
311
|
+
{ id: '-F', date: Date.parse('2015-09-03'), text: 'Vstup zásilky na SPU.', post_code: '22200', post_name: 'SPU Praha 022' },
|
|
312
|
+
{ id: '-I', date: Date.parse('2015-09-03'), text: 'Výstup zásilky z SPU.', post_code: '22200', post_name: 'SPU Praha 022' },
|
|
313
|
+
{ id: '-B', date: Date.parse('2015-09-03'), text: 'Přeprava zásilky k dodací poště.', post_code: nil, post_name: nil },
|
|
314
|
+
{ id: '51', date: Date.parse('2015-09-04'), text: 'Příprava zásilky k doručení.', post_code: '25607', post_name: 'Depo Benešov 70' },
|
|
315
|
+
{ id: '53', date: Date.parse('2015-09-04'), text: 'Doručování zásilky.', post_code: '25756', post_name: 'Neveklov' },
|
|
316
|
+
{ id: '91', date: Date.parse('2015-09-04'), text: 'Dodání zásilky.', post_code: '25756', post_name: 'Neveklov' }
|
|
317
|
+
]},
|
|
318
|
+
'BA56487125' => {...}
|
|
319
|
+
}
|
|
320
|
+
else
|
|
321
|
+
puts(delivery_boy.errors.full_messages)
|
|
322
|
+
end
|
|
260
323
|
</code></pre>
|
|
261
324
|
|
|
262
|
-
<p>
|
|
263
|
-
|
|
264
|
-
<
|
|
265
|
-
|
|
266
|
-
<
|
|
267
|
-
|
|
268
|
-
<
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
<
|
|
274
|
-
update_my_parcels_delivery_status_with(delivery_boy.result)
|
|
275
|
-
# result is like:
|
|
276
|
-
# { 'RA12345687' => { current_state: { id: '91',
|
|
277
|
-
date: Date.parse('2015-09-04'),
|
|
278
|
-
text: 'Dodání zásilky.',
|
|
279
|
-
post_code: '25756',
|
|
280
|
-
post_name: 'Neveklov'},
|
|
281
|
-
deposited_until: Date.new(2015, 9, 2),
|
|
282
|
-
deposited_for_days: 15,
|
|
283
|
-
all_states: [
|
|
284
|
-
{ id: '21', date: Date.parse('2015-09-02'), text: 'Podání zásilky.', post_code: '26701', post_name: 'Králův Dvůr u Berouna' },
|
|
285
|
-
{ id: '-F', date: Date.parse('2015-09-03'), text: 'Vstup zásilky na SPU.', post_code: '22200', post_name: 'SPU Praha 022' },
|
|
286
|
-
{ id: '-I', date: Date.parse('2015-09-03'), text: 'Výstup zásilky z SPU.', post_code: '22200', post_name: 'SPU Praha 022' },
|
|
287
|
-
{ id: '-B', date: Date.parse('2015-09-03'), text: 'Přeprava zásilky k dodací poště.', post_code: nil, post_name: nil },
|
|
288
|
-
{ id: '51', date: Date.parse('2015-09-04'), text: 'Příprava zásilky k doručení.', post_code: '25607', post_name: 'Depo Benešov 70' },
|
|
289
|
-
{ id: '53', date: Date.parse('2015-09-04'), text: 'Doručování zásilky.', post_code: '25756', post_name: 'Neveklov' },
|
|
290
|
-
{ id: '91', date: Date.parse('2015-09-04'), text: 'Dodání zásilky.', post_code: '25756', post_name: 'Neveklov' }
|
|
291
|
-
]},
|
|
292
|
-
'BA56487125' => {...}
|
|
293
|
-
}
|
|
294
|
-
else
|
|
295
|
-
puts(delivery_boy.errors.full_messages)
|
|
296
|
-
end
|
|
297
|
-
```
|
|
325
|
+
<p>10_) And You can always ask for statistics!</p>
|
|
326
|
+
|
|
327
|
+
<pre class="code ruby"><code class="ruby"><span class='id identifier rubyid_tps'>tps</span> <span class='op'>=</span> <span class='const'><span class='object_link'><a href="CzechPostB2bClient.html" title="CzechPostB2bClient (module)">CzechPostB2bClient</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="CzechPostB2bClient/Services.html" title="CzechPostB2bClient::Services (module)">Services</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="CzechPostB2bClient/Services/TimePeriodStatisticator.html" title="CzechPostB2bClient::Services::TimePeriodStatisticator (class)">TimePeriodStatisticator</a></span></span><span class='period'>.</span><span class='id identifier rubyid_call'><span class='object_link'><a href="SteppedService/Base.html#call-class_method" title="SteppedService::Base.call (method)">call</a></span></span><span class='lparen'>(</span><span class='label'>from_date:</span> <span class='const'>Date</span><span class='period'>.</span><span class='id identifier rubyid_today'>today</span> <span class='op'>-</span> <span class='int'>5</span><span class='comma'>,</span> <span class='label'>to_date:</span> <span class='const'>Date</span><span class='period'>.</span><span class='id identifier rubyid_today'>today</span><span class='rparen'>)</span>
|
|
328
|
+
<span class='kw'>if</span> <span class='id identifier rubyid_tps'>tps</span><span class='period'>.</span><span class='id identifier rubyid_success?'>success?</span>
|
|
329
|
+
<span class='id identifier rubyid_result'>result</span> <span class='op'>=</span> <span class='id identifier rubyid_tps'>tps</span><span class='period'>.</span><span class='id identifier rubyid_result'>result</span>
|
|
330
|
+
<span class='id identifier rubyid_result'>result</span><span class='period'>.</span><span class='id identifier rubyid_requests'>requests</span><span class='period'>.</span><span class='id identifier rubyid_total'>total</span> <span class='comment'># => 26,
|
|
331
|
+
</span> <span class='id identifier rubyid_result'>result</span><span class='period'>.</span><span class='id identifier rubyid_requests'>requests</span><span class='period'>.</span><span class='id identifier rubyid_with_errors'>with_errors</span> <span class='comment'># => 16
|
|
332
|
+
</span> <span class='id identifier rubyid_result'>result</span><span class='period'>.</span><span class='id identifier rubyid_requests'>requests</span><span class='period'>.</span><span class='id identifier rubyid_successful'>successful</span> <span class='comment'># => 10
|
|
333
|
+
</span> <span class='id identifier rubyid_result'>result</span><span class='period'>.</span><span class='id identifier rubyid_imported_parcels'>imported_parcels</span> <span class='comment'># => 3
|
|
334
|
+
</span><span class='kw'>else</span>
|
|
335
|
+
<span class='id identifier rubyid_puts'>puts</span><span class='lparen'>(</span><span class='id identifier rubyid_tps'>tps</span><span class='period'>.</span><span class='id identifier rubyid_errors'>errors</span><span class='period'>.</span><span class='id identifier rubyid_full_messages'>full_messages</span><span class='rparen'>)</span>
|
|
336
|
+
<span class='kw'>end</span>
|
|
298
337
|
</code></pre>
|
|
299
338
|
|
|
300
|
-
<
|
|
301
|
-
<code>
|
|
302
|
-
tps = TimePeriodStatisticator.call(from_date: Date.today - 5, to_date: Date.today)
|
|
303
|
-
if tps.success?
|
|
304
|
-
result = tps.result
|
|
305
|
-
result.requests.total # => 26,
|
|
306
|
-
result.requests.with_errors # => 16
|
|
307
|
-
result.requests.successful # => 10
|
|
308
|
-
result.imported_parcels # => 3
|
|
309
|
-
else
|
|
310
|
-
puts(tps.errors.full_messages)
|
|
311
|
-
end
|
|
312
|
-
</code></p>
|
|
313
|
-
|
|
314
|
-
<h3 id="example-usage">Example usage</h3>
|
|
339
|
+
<h3>Example usage</h3>
|
|
315
340
|
|
|
316
341
|
<p>See <code>test/integration_test.rb</code> for almost production usage. HTTP calls to B2B services are blocked and responses from them are stubbed.</p>
|
|
317
342
|
|
|
318
343
|
<p>You can quickly check you setup by altering config and run <code>ruby try_api_calls.rb</code> see <a href="./examples/try_api_calls.rb"><code>try_api_calls.rb</code></a>.</p>
|
|
319
344
|
|
|
320
|
-
<h2
|
|
345
|
+
<h2>Troubleshooting</h2>
|
|
321
346
|
|
|
322
|
-
<p>1) Read all stuff in <code>doc</
|
|
323
|
-
2) If You get
|
|
324
|
-
You can always try <code>TimePeriodStatisticator</code> for that check, it do not need any
|
|
325
|
-
3) Error <code>UNAUTHORIZED_ROLE_ACCESS</code> means wrong <code>customer_id</code> or You are not yet registered in
|
|
347
|
+
<p>1) Read all stuff in <a href="./documents/"><code>./documents</code></a> and <a href="./doc/index.html">Yard docs</a>, maybe it helps.
|
|
348
|
+
2) If You get "handshake protocol failed" You do not have correct setup for certificates. If You get any xml response (see logger in debug mode) certificates are ok.
|
|
349
|
+
You can always try <code>TimePeriodStatisticator</code> for that check, it do not need any "before" actions.
|
|
350
|
+
3) Error <code>UNAUTHORIZED_ROLE_ACCESS</code> means wrong <code>customer_id</code> or You are not yet registered in "PodáníOnline"
|
|
326
351
|
4) Error <code>11: INVALID_LOCATION</code> was occuring when only <code>sending_post_office_code</code> was used. Try to use <code>sending_post_office_location_number</code>.
|
|
327
|
-
5) And last tip <code>261 MISSING_SIZE_CATEGORY</code> -> add correct
|
|
352
|
+
5) And last tip <code>261 MISSING_SIZE_CATEGORY</code> -> add correct "size service" to services (eg: 'S', 'M')
|
|
328
353
|
6) Compare resulting request XML with examples in <code>test/request_builders</code></p>
|
|
329
354
|
|
|
330
|
-
<h2
|
|
355
|
+
<h2>Development</h2>
|
|
331
356
|
|
|
332
357
|
<p>After checking out the repo, run <code>bin/setup</code> to install dependencies. Then, run <code>rake test</code> to run the tests. You can also run <code>bin/console</code> for an interactive prompt that will allow you to experiment.</p>
|
|
333
358
|
|
|
334
359
|
<p>To install this gem onto your local machine, run <code>bundle exec rake install</code>. To release a new version, update the version number in <code>lib/czech_post_b2b_client/version.rb</code>, and then run <code>bundle exec rake release</code>, which will create a git tag for the version, push git commits and tags, and push the <code>.gem</code> file to <a href="https://rubygems.org">rubygems.org</a>.</p>
|
|
335
360
|
|
|
336
|
-
<h2
|
|
361
|
+
<h2>Contributing</h2>
|
|
337
362
|
|
|
338
|
-
<p>Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/czech_post_b2b_client
|
|
363
|
+
<p>Bug reports and pull requests are welcome on GitHub at <a href="https://github.com/%5BUSERNAME%5D/czech_post_b2b_client">https://github.com/[USERNAME]/czech_post_b2b_client</a>. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the <a href="http://contributor-covenant.org">Contributor Covenant</a> code of conduct.</p>
|
|
339
364
|
|
|
340
|
-
<h2
|
|
365
|
+
<h2>License</h2>
|
|
341
366
|
|
|
342
367
|
<p>The gem is available as open source under the terms of the <a href="https://opensource.org/licenses/MIT">MIT License</a>.</p>
|
|
343
368
|
|
|
344
|
-
<h2
|
|
369
|
+
<h2>Code of Conduct</h2>
|
|
345
370
|
|
|
346
|
-
<p>Everyone interacting in the CzechPostB2bClient project’s codebases, issue trackers, chat rooms and mailing lists is expected to follow the <a href="https://github.com/
|
|
371
|
+
<p>Everyone interacting in the CzechPostB2bClient project’s codebases, issue trackers, chat rooms and mailing lists is expected to follow the <a href="https://github.com/%5BUSERNAME%5D/czech_post_b2b_client/blob/master/CODE_OF_CONDUCT.md">code of conduct</a>.</p>
|
|
347
372
|
</div></div>
|
|
348
373
|
|
|
349
374
|
<div id="footer">
|
|
350
|
-
Generated on
|
|
375
|
+
Generated on Thu May 28 17:06:47 2020 by
|
|
351
376
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
|
352
|
-
0.9.
|
|
377
|
+
0.9.24 (ruby-2.4.1).
|
|
353
378
|
</div>
|
|
354
379
|
|
|
355
380
|
</div>
|