czech_post_b2b_client 1.0.3 → 1.2.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/.rubocop.yml +1 -1
- data/CHANGELOG.md +26 -1
- data/README.md +265 -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.rb +2 -1
- data/lib/czech_post_b2b_client/configuration.rb +12 -7
- data/lib/czech_post_b2b_client/logger.rb +31 -0
- data/lib/czech_post_b2b_client/post_services.rb +2 -1
- data/lib/czech_post_b2b_client/printing_templates.rb +142 -39
- data/lib/czech_post_b2b_client/request_builders.rb +1 -0
- data/lib/czech_post_b2b_client/request_builders/get_parcels_printing_builder.rb +1 -1
- data/lib/czech_post_b2b_client/request_builders/parcel_service_sync_builder.rb +286 -0
- data/lib/czech_post_b2b_client/request_builders/send_parcels_builder.rb +38 -17
- data/lib/czech_post_b2b_client/response_codes.rb +2 -1
- data/lib/czech_post_b2b_client/response_parsers.rb +1 -0
- data/lib/czech_post_b2b_client/response_parsers/base_parser.rb +7 -1
- data/lib/czech_post_b2b_client/response_parsers/get_result_parcels_parser.rb +4 -3
- data/lib/czech_post_b2b_client/response_parsers/parcel_service_sync_parser.rb +82 -0
- data/lib/czech_post_b2b_client/services.rb +3 -2
- data/lib/czech_post_b2b_client/services/api_caller.rb +10 -0
- data/lib/czech_post_b2b_client/services/delivering_inspector.rb +0 -2
- data/lib/czech_post_b2b_client/services/parcels_async_sender.rb +53 -0
- data/lib/czech_post_b2b_client/services/parcels_sender.rb +4 -45
- data/lib/czech_post_b2b_client/services/parcels_submission_closer.rb +1 -1
- data/lib/czech_post_b2b_client/services/{parcels_immediate_sender.rb → parcels_sync_sender.rb} +9 -8
- data/lib/czech_post_b2b_client/services/xsds_downloader.rb +2 -0
- data/lib/czech_post_b2b_client/version.rb +1 -1
- metadata +118 -9
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 468b92710ed75993d00a0f30f9a66a1e40ae8b23607ed92796c9682a0493f237
|
4
|
+
data.tar.gz: c48017f58f179a0dae607662c309a1eabb0b7370f7372521acdfb655983eff44
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3b6dd0a6c4bb96f076cb37a42ec1dd0ce08346f28285109079831bf3fe94eb2d45d054156119b80e846b3f22ed9a18f2ded82856f2345b394e05c2c7e0560c2a
|
7
|
+
data.tar.gz: 2a461713e123f67b66d45a02fab03123c75f7a9b968dede63351bbadc123baa74ab7a0be8648124643008602f35d372a5fcaf86d24e768bac4165ec85ceed773
|
data/.rubocop.yml
CHANGED
data/CHANGELOG.md
CHANGED
@@ -2,11 +2,36 @@
|
|
2
2
|
|
3
3
|
All changes to the gem are documented here.
|
4
4
|
|
5
|
+
## [1.2.4] - 2020-10-06
|
6
|
+
|
7
|
+
- Added `configuration.log_messages_at_least_as` option, to be able debug client behaviour when app log level is higher (eg. production)
|
8
|
+
|
9
|
+
## [1.2.3] - 2020-08-21
|
10
|
+
|
11
|
+
- Corrected order in XML `sequence` elements
|
12
|
+
- Added `schemaLocation` to root element and placed publicly accessible XSDs into Github repo
|
13
|
+
|
14
|
+
## [1.2.2] - 2020-08-19
|
15
|
+
|
16
|
+
- Printing templates now include @page_dimensions
|
17
|
+
- Forced secure SSL ciphers for requests
|
18
|
+
- `examples/try_api_call.rb` refactored to be more versatile (download XSDs [:do not work], pritn_selected_combinations)
|
19
|
+
|
20
|
+
## [1.2.0] - 2020-06-07
|
21
|
+
|
22
|
+
- **Breaking** Introducing new Printing templates, improved some template names and scopes
|
23
|
+
- Added options `custom_card_number` and `print_options` to `Configuration`
|
24
|
+
|
25
|
+
## [1.1.0] - 2020-05-28
|
26
|
+
|
27
|
+
- Introducing new API documentation from Czech Post
|
28
|
+
- Added service `ParcelSyncSender` service which uses newly discovered `parcelsServiceSync` API endpoint
|
29
|
+
- Renamed `ParcelSender` to `ParcelAsyncSender` . And created deprecating clone `ParcelSender`, so no Breaking change! If You usit it calls `ParcelAsyncSender` and displays deprecation message.
|
5
30
|
|
6
31
|
## [1.0.3] - 2020-05-20
|
7
32
|
|
8
33
|
- Added Czech Post service DiscountForOnlinePosting.
|
9
|
-
- **Breaking**: Renamed Post service
|
34
|
+
- **Breaking**: Renamed Post service "Size" classes `CzechPostB2bClient::PostServices::Size???` to `CzechPostB2bClient::PostServices::ParcelSize???` (eg. : `CzechPostB2bClient::PostServices::ParcelSizeXL`)
|
10
35
|
I know, that I have **breaking** in every new version, I hope You are not fast enough.
|
11
36
|
|
12
37
|
## [1.0.2] - 2020-05-08
|
data/README.md
CHANGED
@@ -1,13 +1,54 @@
|
|
1
|
+
|
2
|
+
# FRESH NEWS
|
3
|
+
After full usage in production (vyvolej.to, squared.one), we found that Czech POst have trouble with `parcelServiceSync` (maybe `sendParcels` too). When You try to register package with `:customs_documents`, you get `INVALID_BATCH` response with no error, but with `parcelCode`:
|
4
|
+
```
|
5
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
6
|
+
<v1:b2bSyncResponse xmlns:v1="https://b2b.postaonline.cz/schema/B2BCommon-v1" xmlns:v1_1="https://b2b.postaonline.cz/schema/POLServices-v1">
|
7
|
+
<v1:header>
|
8
|
+
<v1:b2bRequestHeader>
|
9
|
+
<v1:idExtTransaction>1</v1:idExtTransaction>
|
10
|
+
<v1:timeStamp>2020-08-22T07:32:20.496Z</v1:timeStamp>
|
11
|
+
<v1:idContract>356936003</v1:idContract>
|
12
|
+
</v1:b2bRequestHeader>
|
13
|
+
</v1:header>
|
14
|
+
<v1:serviceData><v1_1:parcelServiceSyncResponse>
|
15
|
+
<v1_1:responseHeader>
|
16
|
+
<v1_1:resultHeader>
|
17
|
+
<v1_1:responseCode>19</v1_1:responseCode>
|
18
|
+
<v1_1:responseText>BATCH_INVALID</v1_1:responseText>
|
19
|
+
</v1_1:resultHeader>
|
20
|
+
<v1_1:resultParcelData>
|
21
|
+
<v1_1:recordNumber>52427</v1_1:recordNumber>
|
22
|
+
<v1_1:parcelCode>RR950819194CZ</v1_1:parcelCode>
|
23
|
+
<v1_1:parcelDataResponse>
|
24
|
+
<v1_1:responseCode>1</v1_1:responseCode>
|
25
|
+
<v1_1:responseText>OK</v1_1:responseText>
|
26
|
+
</v1_1:parcelDataResponse>
|
27
|
+
</v1_1:resultParcelData>
|
28
|
+
</v1_1:responseHeader>
|
29
|
+
</v1_1:parcelServiceSyncResponse></v1:serviceData>
|
30
|
+
</v1:b2bSyncResponse>
|
31
|
+
```
|
32
|
+
|
33
|
+
*Reality is, that Parcel IS NOT registered!*
|
34
|
+
|
35
|
+
They say, that this should be fixed in v1.10 release. But nobody knows, when it will be deployed. And I do not know if there is some public way how to find, which version is now in production.
|
36
|
+
|
37
|
+
|
1
38
|
# CzechPostB2bClient
|
2
39
|
Accessing B2B API of Czech Post for bulk processing of parcels ("B2B - WS PodáníOnline").
|
3
40
|
|
4
41
|
There are these supported operations of API:
|
42
|
+
- *parcelServiceSync* - stores data of one parcel and return package_code and optional PDF adress sheet [HTTP POST - sync response]
|
43
|
+
Seems to me, that there are is no place extensive Cash On Delivery data, just `amount` and `currency`
|
5
44
|
- *sendParcels* - stores data of parcels for async processing [HTTP POST - async response]
|
6
45
|
- *getResultParcels* - return results of such processing [HTTP GET - sync response]
|
7
46
|
- *getStats* - returns statistics of parcels sent in time period [HTTP GET - sync response]
|
8
47
|
- *getParcelState* - returns all known states for listed parcels [HTTP GET - sync response]
|
9
48
|
- *getParcelsPrinting* - returns PDF with address labels/stickers for listed parcels [HTTP GET - sync response]
|
10
49
|
|
50
|
+
## Development of this gem is donated by [Squared s.r.o.](https://www.vyvolej.to)
|
51
|
+
|
11
52
|
## Installation
|
12
53
|
### 1) Registration at Czech Post (CP)
|
13
54
|
The longterm and hardest part.
|
@@ -35,216 +76,237 @@ gem 'czech_post_b2b_client'
|
|
35
76
|
|
36
77
|
And then execute:
|
37
78
|
|
38
|
-
|
79
|
+
```
|
80
|
+
$ bundle
|
81
|
+
```
|
39
82
|
|
40
83
|
Or install it yourself as:
|
41
84
|
|
42
85
|
$ gem install czech_post_b2b_client
|
43
86
|
|
44
87
|
### 4) Setting up gem
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
88
|
+
Set up your `contract_id`, `customer_id` (both from CP signed contract), `certificate_path`, `private_key_path` and `private_key_password` in configuration:
|
89
|
+
```
|
90
|
+
CzechPostB2bClient.configure do |config|
|
91
|
+
config.contract_id = 'contract_id'
|
92
|
+
config.customer_id = 'customer_id'
|
93
|
+
config.certificate_path = 'full_path/to/your/postsignum_certificate.pem'
|
94
|
+
config.private_key_path = 'full_path/to/your/postsignum_private.key'
|
95
|
+
config.private_key_password = 'your_password or nil'
|
96
|
+
|
97
|
+
# these two just save Your time, can be overwritten for each call
|
98
|
+
config.custom_card_number = 'ABCD123456'
|
99
|
+
config.print_options = { template_id: 21, # 'adresní štítek bianco - samostatný'
|
100
|
+
margin_in_mm: { top: 0, left: 0 } }
|
101
|
+
|
102
|
+
# this actually do not work, I have to use `sending_post_office_location_number`. But it is REQUIRED!
|
103
|
+
config.sending_post_office_code = 12_345 # PSC of post office where parcels will be physically delivered and submitted
|
104
|
+
|
105
|
+
# and You can override defaults
|
106
|
+
# config.sending_post_office_location_number => 1
|
107
|
+
# config.namespaces #XML namespaces
|
108
|
+
# config.language => :cs # other languages are not supported now
|
109
|
+
# config.logger => ::Rails.logger or ::Logger.new(STDOUT),
|
110
|
+
# config.b2b_api_base_uri => 'https://b2b.postaonline.cz/services/POLService/v1'
|
111
|
+
# config.log_messages_at_least_as = :debug
|
112
|
+
end
|
113
|
+
```
|
114
|
+
|
115
|
+
- `contract_id` is _"ID CČK"_ (can be found in contract; eg.: _"2511327004"_)
|
116
|
+
- `customer_id` is _"Technologické číslo"_ (can be found in contract; eg.: _"U123"_ or _"L03022"_; also is visible at [PodaníOnline](https://www.postaonline.cz/podanionline/PrednastaveniUdajuZasilky.action)
|
117
|
+
|
118
|
+
Because PostSignum Certificate Authority is not trusted by default, correct certificate chain is in `certs/` folder. If You have problem with them, create a issue here. Maybe they are outdated now.
|
70
119
|
|
71
120
|
## Usage
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
|
131
|
-
|
132
|
-
|
133
|
-
|
134
|
-
|
135
|
-
|
136
|
-
|
137
|
-
|
121
|
+
**You have to know which parcel type (according to CP) you sending!** Eg. 'BA' or 'RR'. See [`documents/parcel_types.md`](./documents/parcel_types.md).
|
122
|
+
|
123
|
+
**And what services You will use for each parcel**, see [`documents/services_list.md`](./documents/services_list.md) and [`documents/parcels_type_and_services_restrictions.md`](./documents/parcels_type_and_services_restrictions.md).
|
124
|
+
|
125
|
+
Hashes used is service calls bellow:
|
126
|
+
|
127
|
+
```
|
128
|
+
short_sender_data = { address: {
|
129
|
+
company_name: 'Oriflame',
|
130
|
+
addition_to_name: 'perfume', # optional
|
131
|
+
street: 'V olšinách',
|
132
|
+
house_number: '16',
|
133
|
+
city_part: 'Strašnice',
|
134
|
+
city: 'Praha',
|
135
|
+
post_code: 10_000,
|
136
|
+
},
|
137
|
+
mobile_phone: '+420777888999',
|
138
|
+
email: 'rehor.jan@cpost.cz' }
|
139
|
+
sending_data = { contract_id: configuration.contract_id,
|
140
|
+
parcels_sending_date: Date.today,
|
141
|
+
sending_post_office_location_number: 1,
|
142
|
+
sender: short_sender_data,
|
143
|
+
cash_on_delivery: {
|
144
|
+
address: short_sender_data[:address]
|
145
|
+
bank_account: '123456-1234567890/1234'
|
146
|
+
} }
|
147
|
+
|
148
|
+
short_addressee_data = { address: {
|
149
|
+
first_name: 'Petr',
|
150
|
+
last_name: 'Foton',
|
151
|
+
street: 'Fischerova',
|
152
|
+
house_number: '686',
|
153
|
+
sequence_number: '32',
|
154
|
+
city_part: 'Nové Sady',
|
155
|
+
city: 'Olomouc',
|
156
|
+
post_code: 77_900
|
157
|
+
},
|
158
|
+
email: 'foton@github.com',
|
159
|
+
mobile_phone: '+420777888999' }
|
160
|
+
|
161
|
+
parcels = [
|
162
|
+
{
|
163
|
+
addressee: short_addressee_data,
|
164
|
+
params: { parcel_id: 'package_1of2',
|
165
|
+
parcel_code_prefix: 'BA',
|
166
|
+
weight_in_kg: 1.0,
|
167
|
+
parcel_order: 1,
|
168
|
+
parcels_count: 2 },
|
169
|
+
services: [70, 7, 'S']
|
170
|
+
},
|
171
|
+
{
|
172
|
+
addressee: short_addressee_data,
|
173
|
+
params: { parcel_id: 'package_2of2',
|
174
|
+
parcel_code_prefix: 'BA',
|
175
|
+
weight_in_kg: 1.6,
|
176
|
+
parcel_order: 2,
|
177
|
+
parcels_count: 2 },
|
178
|
+
services: [70,'S']
|
179
|
+
},
|
180
|
+
{
|
181
|
+
addressee: short_addressee_data,
|
182
|
+
params: { parcel_id: 'package_3',
|
183
|
+
parcel_code_prefix: 'BA',
|
184
|
+
weight_in_kg: 1.9 },
|
185
|
+
services: [7,'M']
|
186
|
+
}
|
187
|
+
]
|
188
|
+
```
|
189
|
+
|
190
|
+
|
191
|
+
1 ) Pack your parcel(s)
|
192
|
+
|
193
|
+
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]
|
194
|
+
|
195
|
+
3a) Call `ParcelsAsyncSender`, this will setup `transmission_id` and expected time to ask for results.
|
196
|
+
```
|
197
|
+
psender = CzechPostB2bClient::Services::ParcelsAsyncSender.call(sending_data: sending_data, parcels: parcels)
|
198
|
+
|
199
|
+
if psender.success?
|
200
|
+
result = psender.result
|
201
|
+
processing_end_time_utc = (result.processing_end_expected_at - (60 *60)).utc # API returns time in CET but marked as UTC
|
202
|
+
transaction_id = result.transaction_id
|
203
|
+
else
|
204
|
+
puts psender.errors.full_messages
|
205
|
+
end
|
138
206
|
```
|
207
|
+
For now, `parcels` is array of complicated hashes; each parcel must have `parcel_id` key (your ID of parcel).
|
139
208
|
|
209
|
+
4a) When such expected time pass, ask for results by calling `ParcelsSendProcessUpdater`. You can get error `Processing is not yet finished` or hash based on `parcel_id` keys.
|
210
|
+
```
|
211
|
+
pudater = CzechPostB2bClient::Services::ParcelsSendProcessUpdater.call(transmission_id: transmission_id)
|
212
|
+
|
213
|
+
if pupdater.success?
|
214
|
+
update_my_parcels_with(pupdater.result) # => { 'parcel_1of2' => { parcel_code: 'BA12354678', states: [{ code: 1, text: 'OK' }]},
|
215
|
+
# 'parcel_2of2' => { parcel_code: 'BA12354679', states: [{ code: 1, text: 'OK' }]},
|
216
|
+
# 'parcel_3' => { parcel_code: 'BA12354680', states: [{ code: 1, text: 'OK' }]}
|
217
|
+
else
|
218
|
+
puts psender.errors.full_messages # => "response_state: ResponseCode[19 BATCH_INVALID] V dávce se vyskytují chybné záznamy"
|
219
|
+
# "parcels: Parcel[parcel_2of2] => ResponseCode[104 INVALID_WEIGHT] Hmotnost mimo povolený rozsah"
|
220
|
+
# "parcels: Parcel[parcel_2of2] => ResponseCode[261 MISSING_SIZE_CATEGORY] Neuvedena rozměrová kategorie zásilky"
|
221
|
+
# "parcels: Parcel[parcel_3] => ResponseCode[310 INVALID_PREFIX] Neplatný typ zásilky"
|
222
|
+
end
|
223
|
+
```
|
224
|
+
`parcel_code` is CzechPost Tracking number of parcel and is used in following calls.
|
140
225
|
|
141
|
-
|
142
|
-
|
143
|
-
|
144
|
-
|
145
|
-
|
146
|
-
|
147
|
-
|
148
|
-
|
149
|
-
|
150
|
-
|
151
|
-
|
152
|
-
|
153
|
-
|
154
|
-
|
155
|
-
|
156
|
-
|
157
|
-
|
158
|
-
|
159
|
-
|
160
|
-
|
161
|
-
|
162
|
-
|
163
|
-
|
164
|
-
|
165
|
-
|
166
|
-
|
167
|
-
|
168
|
-
|
169
|
-
|
170
|
-
|
171
|
-
|
172
|
-
|
173
|
-
|
174
|
-
|
175
|
-
|
176
|
-
|
177
|
-
|
178
|
-
|
179
|
-
|
180
|
-
|
181
|
-
|
182
|
-
|
183
|
-
|
184
|
-
|
185
|
-
|
186
|
-
|
187
|
-
|
188
|
-
|
189
|
-
|
190
|
-
|
191
|
-
|
192
|
-
|
193
|
-
|
194
|
-
|
195
|
-
|
196
|
-
|
197
|
-
|
198
|
-
|
199
|
-
|
200
|
-
|
201
|
-
|
202
|
-
|
203
|
-
|
204
|
-
|
205
|
-
|
206
|
-
|
207
|
-
|
208
|
-
|
209
|
-
|
210
|
-
|
211
|
-
|
212
|
-
|
213
|
-
|
214
|
-
|
215
|
-
|
216
|
-
|
217
|
-
|
218
|
-
|
219
|
-
|
220
|
-
|
221
|
-
|
222
|
-
|
223
|
-
|
224
|
-
|
225
|
-
{ id: '53', date: Date.parse('2015-09-04'), text: 'Doručování zásilky.', post_code: '25756', post_name: 'Neveklov' },
|
226
|
-
{ id: '91', date: Date.parse('2015-09-04'), text: 'Dodání zásilky.', post_code: '25756', post_name: 'Neveklov' }
|
227
|
-
]},
|
228
|
-
'BA56487125' => {...}
|
229
|
-
}
|
230
|
-
else
|
231
|
-
puts(delivery_boy.errors.full_messages)
|
232
|
-
end
|
233
|
-
```
|
234
|
-
|
235
|
-
9) And You can always ask for statistics!
|
236
|
-
```
|
237
|
-
tps = CzechPostB2bClient::Services::TimePeriodStatisticator.call(from_date: Date.today - 5, to_date: Date.today)
|
238
|
-
if tps.success?
|
239
|
-
result = tps.result
|
240
|
-
result.requests.total # => 26,
|
241
|
-
result.requests.with_errors # => 16
|
242
|
-
result.requests.successful # => 10
|
243
|
-
result.imported_parcels # => 3
|
244
|
-
else
|
245
|
-
puts(tps.errors.full_messages)
|
246
|
-
end
|
247
|
-
```
|
226
|
+
5a) Print address sheets of parcel(s) by calling `AddressSheetsGenerator`.
|
227
|
+
See [template_classes](./lib/czech_post_b2b_client/printing_templates.rb) for available templates.
|
228
|
+
```
|
229
|
+
parcel_codes = %w[RA123456789 RR123456789F RR123456789G] # beware of parcel_id!
|
230
|
+
options = {
|
231
|
+
customer_id: configuration.customer_id, # required
|
232
|
+
contract_number: configuration.contract_id, # not required
|
233
|
+
template_id: 24, # 'obalka 3 - B4' #
|
234
|
+
margin_in_mm: { top: 5, left: 3 } # required
|
235
|
+
}
|
236
|
+
|
237
|
+
adrprinter = CzechPostB2bClient::Services::AddressSheetsGenerator.call(parcel_codes: parcel_codes, options: options )
|
238
|
+
|
239
|
+
if adrprinter.success?
|
240
|
+
File.write("adrsheet.pdf", adrprinter.result.pdf_content)
|
241
|
+
else
|
242
|
+
puts(adrprinter.errors.full_messages)
|
243
|
+
end
|
244
|
+
```
|
245
|
+
|
246
|
+
6a) Repeat steps 1-4 until You decide to deliver packages to post office.
|
247
|
+
|
248
|
+
7a) Close your parcels submission with call `ParcelsSubmissionCloser.call(sending_data: sender_data)`.
|
249
|
+
|
250
|
+
3b) For immediate (one) parcel registering call `ParcelsSyncSender`. You can optionally request address sheet pdf in response (see step 5a for info)
|
251
|
+
```
|
252
|
+
s_data = sending_data.merge(print_params: { template_id: 40, margin_in_mm: { top: 1, left: 1 }})
|
253
|
+
psender = CzechPostB2bClient::Services::ParcelsSyncSender.call(sending_data: s_data, parcels: [parcels.first])
|
254
|
+
|
255
|
+
if psender.success?
|
256
|
+
result = psender.result
|
257
|
+
update_my_parcels_with(result) # => { 'parcel_1of2' => { parcel_code: 'BA12354678', states: [{ code: 1, text: 'OK' }]},
|
258
|
+
File.write("adrsheet.pdf", result.pdf_content)
|
259
|
+
else
|
260
|
+
puts psender.errors.full_messages
|
261
|
+
end
|
262
|
+
```
|
263
|
+
`parcel_code` is CzechPost Tracking number of parcel and is used in following calls.
|
264
|
+
|
265
|
+
8_) _They will await You at post office with warm welcome (hopefully). Parcels which are not delivered within 60 days are removed from CzechPost systems for free :-)_
|
266
|
+
|
267
|
+
9_) You can check current status of delivering with `DeliveringInspector`, which will return hash based on `parcel_code` keys.
|
268
|
+
```
|
269
|
+
delivery_boy = CzechPostB2bClient::Services::DeliveringInspector.call(parcel_codes: parcel_codes)
|
270
|
+
|
271
|
+
if delivery_boy.success?
|
272
|
+
update_my_parcels_delivery_status_with(delivery_boy.result)
|
273
|
+
# result is like:
|
274
|
+
# { 'RA12345687' => { current_state: { id: '91',
|
275
|
+
date: Date.parse('2015-09-04'),
|
276
|
+
text: 'Dodání zásilky.',
|
277
|
+
post_code: '25756',
|
278
|
+
post_name: 'Neveklov'},
|
279
|
+
deposited_until: Date.new(2015, 9, 2),
|
280
|
+
deposited_for_days: 15,
|
281
|
+
all_states: [
|
282
|
+
{ 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' },
|
283
|
+
{ id: '-F', date: Date.parse('2015-09-03'), text: 'Vstup zásilky na SPU.', post_code: '22200', post_name: 'SPU Praha 022' },
|
284
|
+
{ id: '-I', date: Date.parse('2015-09-03'), text: 'Výstup zásilky z SPU.', post_code: '22200', post_name: 'SPU Praha 022' },
|
285
|
+
{ id: '-B', date: Date.parse('2015-09-03'), text: 'Přeprava zásilky k dodací poště.', post_code: nil, post_name: nil },
|
286
|
+
{ 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' },
|
287
|
+
{ id: '53', date: Date.parse('2015-09-04'), text: 'Doručování zásilky.', post_code: '25756', post_name: 'Neveklov' },
|
288
|
+
{ id: '91', date: Date.parse('2015-09-04'), text: 'Dodání zásilky.', post_code: '25756', post_name: 'Neveklov' }
|
289
|
+
]},
|
290
|
+
'BA56487125' => {...}
|
291
|
+
}
|
292
|
+
else
|
293
|
+
puts(delivery_boy.errors.full_messages)
|
294
|
+
end
|
295
|
+
```
|
296
|
+
|
297
|
+
10_) And You can always ask for statistics!
|
298
|
+
```
|
299
|
+
tps = CzechPostB2bClient::Services::TimePeriodStatisticator.call(from_date: Date.today - 5, to_date: Date.today)
|
300
|
+
if tps.success?
|
301
|
+
result = tps.result
|
302
|
+
result.requests.total # => 26,
|
303
|
+
result.requests.with_errors # => 16
|
304
|
+
result.requests.successful # => 10
|
305
|
+
result.imported_parcels # => 3
|
306
|
+
else
|
307
|
+
puts(tps.errors.full_messages)
|
308
|
+
end
|
309
|
+
```
|
248
310
|
|
249
311
|
### Example usage
|
250
312
|
|
@@ -254,6 +316,8 @@ Or install it yourself as:
|
|
254
316
|
|
255
317
|
## Troubleshooting
|
256
318
|
|
319
|
+
You can validate request XML against XSD in [`documents/latest_xsds`](./documents/latest_xsds) (There are no public files from Czech Post :-( )
|
320
|
+
|
257
321
|
1) Read all stuff in [`./documents`](./documents/) and [Yard docs](./doc/index.html), maybe it helps.
|
258
322
|
2) If You get "handshake protocol failed" You do not have correct setup for certificates. If You get any xml response (see logger in debug mode) certificates are ok.
|
259
323
|
You can always try `TimePeriodStatisticator` for that check, it do not need any "before" actions.
|
@@ -261,6 +325,8 @@ Or install it yourself as:
|
|
261
325
|
4) Error `11: INVALID_LOCATION` was occuring when only `sending_post_office_code` was used. Try to use `sending_post_office_location_number`.
|
262
326
|
5) And last tip `261 MISSING_SIZE_CATEGORY` -> add correct "size service" to services (eg: 'S', 'M')
|
263
327
|
6) Compare resulting request XML with examples in `test/request_builders`
|
328
|
+
7) If You get strings like `"Obdr\xC5\xBEeny \xC3\xBAdaje k z\xC3\xA1silce."` instead of `"Obdrženy údaje k zásilce."`, You need to `str.force_encoding('UTF-8')`. It happens to me, after I started to use gem in app. Something like backward influence.
|
329
|
+
|
264
330
|
|
265
331
|
## Development
|
266
332
|
|