czech_post_b2b_client 1.0.2 → 1.2.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.rubocop.yml +3 -1
- data/CHANGELOG.md +27 -2
- data/README.md +227 -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/b2b_errors.rb +6 -7
- data/lib/czech_post_b2b_client/configuration.rb +12 -7
- data/lib/czech_post_b2b_client/post_services.rb +22 -12
- data/lib/czech_post_b2b_client/printing_templates.rb +143 -41
- data/lib/czech_post_b2b_client/request_builders.rb +1 -0
- data/lib/czech_post_b2b_client/request_builders/get_parcels_printing_builder.rb +6 -2
- 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 +46 -20
- data/lib/czech_post_b2b_client/response_codes.rb +19 -16
- 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_parcel_state_parser.rb +4 -3
- 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/response_parsers/send_parcels_parser.rb +24 -2
- data/lib/czech_post_b2b_client/services.rb +4 -2
- data/lib/czech_post_b2b_client/services/api_caller.rb +25 -9
- 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_send_process_updater.rb +1 -1
- 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} +10 -9
- data/lib/czech_post_b2b_client/services/xsds_downloader.rb +61 -0
- data/lib/czech_post_b2b_client/version.rb +1 -1
- data/lib/stepped_service/base.rb +2 -1
- metadata +117 -7
@@ -5,7 +5,7 @@
|
|
5
5
|
# Do not miss `CzechPostB2bClient::ResponseCodes.all_classes` and `CzechPostB2bClient::ResponseCodes.new_by_code`,
|
6
6
|
# they have to be at end of module to work properly
|
7
7
|
module CzechPostB2bClient
|
8
|
-
module ResponseCodes
|
8
|
+
module ResponseCodes # rubocop:disable Metrics/ModuleLength
|
9
9
|
class BaseCode
|
10
10
|
@code = 'undefined'
|
11
11
|
@text = '_NONE_'
|
@@ -281,7 +281,8 @@ module CzechPostB2bClient
|
|
281
281
|
class InvalidAddressForBigPackage < CzechPostB2bClient::ResponseCodes::BaseCode
|
282
282
|
@code = 119
|
283
283
|
@text = 'INVALID_ADRESS'
|
284
|
-
@description = 'Adresa odesílatele není vhodná pro produkt Nadrozměrná zásilka
|
284
|
+
@description = 'Adresa odesílatele není vhodná pro produkt Nadrozměrná zásilka' \
|
285
|
+
'(adresa obsahuje údaj P.O.Box nebo Poste restante)!'
|
285
286
|
@type = :chyba
|
286
287
|
end
|
287
288
|
|
@@ -589,21 +590,24 @@ module CzechPostB2bClient
|
|
589
590
|
class CODAmountTooBig < CzechPostB2bClient::ResponseCodes::BaseCode
|
590
591
|
@code = 177
|
591
592
|
@text = 'INVALID_AMOUNT'
|
592
|
-
@description = 'Limit pro uložení zásilky na Výdejním místě je pro Dobírku max. 50.000,- Kč.
|
593
|
+
@description = 'Limit pro uložení zásilky na Výdejním místě je pro Dobírku max. 50.000,- Kč.' \
|
594
|
+
' Zásilka bude uložena na poště, která je Výdejnímu místu nadřízená.'
|
593
595
|
@type = :chyba
|
594
596
|
end
|
595
597
|
|
596
598
|
class PriceTooBig < CzechPostB2bClient::ResponseCodes::BaseCode
|
597
599
|
@code = 178
|
598
600
|
@text = 'INVALID_PRICE'
|
599
|
-
@description = 'Limit pro uložení zásilky na Výdejním místě je pro Udanou cenu a Dobírku max. 50.000,- Kč.
|
601
|
+
@description = 'Limit pro uložení zásilky na Výdejním místě je pro Udanou cenu a Dobírku max. 50.000,- Kč.' \
|
602
|
+
' Zásilka bude uložena na poště, která je Výdejnímu místu nadřízená.'
|
600
603
|
@type = :chyba
|
601
604
|
end
|
602
605
|
|
603
606
|
class PriceAndCODAmountTooBig < CzechPostB2bClient::ResponseCodes::BaseCode
|
604
607
|
@code = 179
|
605
608
|
@text = 'INVALID_PRICE_AND_AMOUNT'
|
606
|
-
@description = 'Limit pro uložení zásilky na Výdejním místě je pro Udanou cenu a Dobírku max. 50.000,- Kč.
|
609
|
+
@description = 'Limit pro uložení zásilky na Výdejním místě je pro Udanou cenu a Dobírku max. 50.000,- Kč.' \
|
610
|
+
' Zásilka bude uložena na poště, která je Výdejnímu místu nadřízená.'
|
607
611
|
@type = :chyba
|
608
612
|
end
|
609
613
|
|
@@ -1290,7 +1294,8 @@ module CzechPostB2bClient
|
|
1290
1294
|
class InfoService29And47 < CzechPostB2bClient::ResponseCodes::BaseCode
|
1291
1295
|
@code = 324
|
1292
1296
|
@text = 'INFO_SERVICE_29+47'
|
1293
|
-
@description = 'Zásilku s výškou nad 150cm nelze podat jako Balík Do ruky se sl.47,
|
1297
|
+
@description = 'Zásilku s výškou nad 150cm nelze podat jako Balík Do ruky se sl.47,' \
|
1298
|
+
' ale musí být využit Balík Nadrozměr v kategorii NZ 2'
|
1294
1299
|
@type = :info
|
1295
1300
|
end
|
1296
1301
|
|
@@ -1756,14 +1761,14 @@ module CzechPostB2bClient
|
|
1756
1761
|
@type = :info
|
1757
1762
|
end
|
1758
1763
|
|
1759
|
-
class InfoMissingPartCityServiceDeliveryOnSundayOrHolidayMayNotBeRealized < CzechPostB2bClient::ResponseCodes::BaseCode
|
1764
|
+
class InfoMissingPartCityServiceDeliveryOnSundayOrHolidayMayNotBeRealized < CzechPostB2bClient::ResponseCodes::BaseCode # rubocop:disable Layout/LineLength
|
1760
1765
|
@code = 391
|
1761
1766
|
@text = 'INFO_MISSING_PART_CITY_SERVICE_DELIVERY_ON_SUNDAY/HOLIDAY_MAY_NOT_BE_REALIZED'
|
1762
|
-
@description = 'Neuvedena část obce -
|
1767
|
+
@description = 'Neuvedena část obce - služba Garantovaný čas dodání v Ne/Sv nemusí být realizována'
|
1763
1768
|
@type = :info
|
1764
1769
|
end
|
1765
1770
|
|
1766
|
-
class
|
1771
|
+
class InfoCancelService9 < CzechPostB2bClient::ResponseCodes::BaseCode
|
1767
1772
|
@code = 392
|
1768
1773
|
@text = 'NFO_CANCEL_SERVICE_9'
|
1769
1774
|
@description = 'Zrušena nepovolená služba 9 Prioritně'
|
@@ -1882,19 +1887,17 @@ module CzechPostB2bClient
|
|
1882
1887
|
@type = :info
|
1883
1888
|
end
|
1884
1889
|
|
1885
|
-
|
1886
|
-
|
1890
|
+
# must be at end to collect all classes defined before
|
1891
|
+
def self.all_classes
|
1892
|
+
base_class = CzechPostB2bClient::ResponseCodes::BaseCode
|
1893
|
+
ObjectSpace.each_object(base_class.singleton_class).reject { |c| c == base_class }
|
1887
1894
|
end
|
1888
1895
|
|
1889
|
-
|
1890
|
-
|
1891
|
-
def new_by_code(code)
|
1896
|
+
def self.new_by_code(code)
|
1892
1897
|
klass = all_classes.detect { |k| k.code == code }
|
1893
1898
|
raise "ResponseCode with code: #{code} is unknown!" unless klass
|
1894
1899
|
|
1895
1900
|
klass.new
|
1896
1901
|
end
|
1897
|
-
|
1898
|
-
module_function :new_by_code
|
1899
1902
|
end
|
1900
1903
|
end
|
@@ -6,3 +6,4 @@ require 'czech_post_b2b_client/response_parsers/get_parcels_printing_parser'
|
|
6
6
|
require 'czech_post_b2b_client/response_parsers/get_parcel_state_parser'
|
7
7
|
require 'czech_post_b2b_client/response_parsers/get_result_parcels_parser'
|
8
8
|
require 'czech_post_b2b_client/response_parsers/send_parcels_parser'
|
9
|
+
require 'czech_post_b2b_client/response_parsers/parcel_service_sync_parser'
|
@@ -37,7 +37,7 @@ module CzechPostB2bClient
|
|
37
37
|
request: { created_at: request_data.time_stamp,
|
38
38
|
contract_id: request_data.id_contract,
|
39
39
|
request_id: request_data.id_ext_transaction },
|
40
|
-
response: { created_at:
|
40
|
+
response: { created_at: response_time }
|
41
41
|
}
|
42
42
|
end
|
43
43
|
|
@@ -69,6 +69,12 @@ module CzechPostB2bClient
|
|
69
69
|
id_contract: b2b_request_hash.dig('idContract').to_s)
|
70
70
|
end
|
71
71
|
|
72
|
+
def response_time
|
73
|
+
Time.parse(response_header.dig('timeStamp'))
|
74
|
+
rescue TypeError
|
75
|
+
Time.now.utc
|
76
|
+
end
|
77
|
+
|
72
78
|
def state_hash_from(hash)
|
73
79
|
state_hash = hash || { 'responseCode' => '999', 'responseText' => 'Unknown' }
|
74
80
|
state_hash = state_hash.first if state_hash.is_a?(Array) # more <doParcelStateResponse> elements
|
@@ -24,11 +24,12 @@ module CzechPostB2bClient
|
|
24
24
|
[response_root_node.dig('parcel')].flatten.compact # to always get array of hash(es)
|
25
25
|
end
|
26
26
|
|
27
|
-
def parcel_data_from(rp_hash)
|
27
|
+
def parcel_data_from(rp_hash) # rubocop:disable Metrics/AbcSize
|
28
28
|
{
|
29
29
|
parcel_type: rp_hash['parcelType'].to_s,
|
30
|
-
weight_in_kg: rp_hash['weight'].nil? ? nil : rp_hash['weight'].to_f,
|
31
|
-
cash_on_delivery: { amount: (rp_hash['amount'] || 0).to_f,
|
30
|
+
weight_in_kg: rp_hash['weight'].nil? ? nil : rp_hash['weight'].to_f,
|
31
|
+
cash_on_delivery: { amount: (rp_hash['amount'] || 0).to_f,
|
32
|
+
currency_iso_code: rp_hash['currency'].to_s },
|
32
33
|
pieces: (rp_hash['quantityParcel'] || 1).to_i,
|
33
34
|
deposited_until: rp_hash['depositTo'].nil? ? nil : Date.parse(rp_hash['depositTo']),
|
34
35
|
deposited_for_days: rp_hash['timeDeposit'].nil? ? nil : rp_hash['timeDeposit'].to_i,
|
@@ -42,11 +42,12 @@ module CzechPostB2bClient
|
|
42
42
|
|
43
43
|
return pd_hash if value.nil?
|
44
44
|
|
45
|
-
#
|
45
|
+
# merging states
|
46
|
+
value[:states] = (value[:states] + pd_hash[:states]).sort { |a, b| a[:code] <=> b[:code] }
|
47
|
+
|
48
|
+
# more parcel_codes for one parcel_id => probably errors
|
46
49
|
old_p_code = value[:parcel_code]
|
47
50
|
new_p_code = pd_hash[:parcel_code]
|
48
|
-
|
49
|
-
value[:states] = (value[:states] + pd_hash[:states]).sort { |a, b| a[:code] <=> b[:code] }
|
50
51
|
if old_p_code != new_p_code
|
51
52
|
raise "Two different parcel_codes [#{old_p_code}, #{new_p_code}] for parcel_id:'#{parcel_id}'"
|
52
53
|
end
|
@@ -0,0 +1,82 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require 'base64'
|
4
|
+
|
5
|
+
module CzechPostB2bClient
|
6
|
+
module ResponseParsers
|
7
|
+
class ParcelServiceSyncParser < BaseParser
|
8
|
+
def build_result
|
9
|
+
super
|
10
|
+
@result[:response][:state] = state_hash_from(response_state_response)
|
11
|
+
@result[:parcel] = parcel_data_hash
|
12
|
+
end
|
13
|
+
|
14
|
+
def parcel_data_hash
|
15
|
+
parcel_id = nil
|
16
|
+
pdh = response_parcel_hashes.each_with_object({}) do |rp_hash, result|
|
17
|
+
parcel_id = parcel_parcel_id_from(rp_hash)
|
18
|
+
result[parcel_id] = updated_result_value_for(result[parcel_id], rp_hash)
|
19
|
+
end
|
20
|
+
pdh[parcel_id].merge!(printings: print_data_from(response_print_hash))
|
21
|
+
|
22
|
+
pdh
|
23
|
+
end
|
24
|
+
|
25
|
+
def response_root_node_name
|
26
|
+
'parcelServiceSyncResponse'
|
27
|
+
end
|
28
|
+
|
29
|
+
def response_state_response
|
30
|
+
response_root_node.dig('responseHeader', 'resultHeader')
|
31
|
+
end
|
32
|
+
|
33
|
+
def response_parcel_hashes
|
34
|
+
[response_root_node.dig('responseHeader', 'resultParcelData')].flatten.compact # to always get array of hash(es)
|
35
|
+
end
|
36
|
+
|
37
|
+
def response_print_hash
|
38
|
+
response_root_node.dig('responsePrintParams')
|
39
|
+
end
|
40
|
+
|
41
|
+
def parcel_parcel_id_from(rp_hash)
|
42
|
+
rp_hash['recordNumber'].to_s
|
43
|
+
end
|
44
|
+
|
45
|
+
def parcel_data_from(rp_hash)
|
46
|
+
{ parcel_code: rp_hash['parcelCode'],
|
47
|
+
states: [state_hash_from(rp_hash.dig('parcelDataResponse'))] }
|
48
|
+
end
|
49
|
+
|
50
|
+
def print_data_from(print_hash)
|
51
|
+
return nil if print_hash.nil? || print_hash.empty?
|
52
|
+
|
53
|
+
{ pdf_content: pdf_content_from(print_hash.dig('file')),
|
54
|
+
state: state_hash_from(print_hash.dig('printParamsResponse')) }
|
55
|
+
end
|
56
|
+
|
57
|
+
def pdf_content_from(pdf_content_encoded)
|
58
|
+
return nil if pdf_content_encoded.nil?
|
59
|
+
|
60
|
+
::Base64.decode64(pdf_content_encoded)
|
61
|
+
end
|
62
|
+
|
63
|
+
def updated_result_value_for(value, parcel_params_result_hash)
|
64
|
+
pd_hash = parcel_data_from(parcel_params_result_hash)
|
65
|
+
|
66
|
+
return pd_hash if value.nil?
|
67
|
+
|
68
|
+
# merging states
|
69
|
+
value[:states] = (value[:states] + pd_hash[:states]).sort { |a, b| a[:code] <=> b[:code] }
|
70
|
+
|
71
|
+
# more parcel_codes for one parcel_id => probably errors
|
72
|
+
old_p_code = value[:parcel_code]
|
73
|
+
new_p_code = pd_hash[:parcel_code]
|
74
|
+
if old_p_code != new_p_code
|
75
|
+
raise "Two different parcel_codes [#{old_p_code}, #{new_p_code}] for parcel_id:'#{parcel_id}'"
|
76
|
+
end
|
77
|
+
|
78
|
+
value
|
79
|
+
end
|
80
|
+
end
|
81
|
+
end
|
82
|
+
end
|
@@ -5,8 +5,30 @@ module CzechPostB2bClient
|
|
5
5
|
class SendParcelsParser < BaseParser
|
6
6
|
def build_result
|
7
7
|
super
|
8
|
-
|
9
|
-
|
8
|
+
|
9
|
+
@result[:async_result] = {
|
10
|
+
transaction_id: response_header.dig('idTransaction'),
|
11
|
+
processing_end_expected_at: parse_time_with_correction(response_header.dig('timeStampProcessing'))
|
12
|
+
}
|
13
|
+
end
|
14
|
+
|
15
|
+
def parse_time_with_correction(b2b_time_str)
|
16
|
+
# b2b time in XML is NOT CORRECT! They return CET time value with UTC timezone
|
17
|
+
# Like `2016-02-25T09:30:03.678Z`, which is actually `2016-02-25T09:30:03.678+0100` (CET)
|
18
|
+
# Or `2016-05-25T09:30:03.678Z`, which is actually `2016-05-25T09:30:03.678+0200` (CET + DST)
|
19
|
+
# But we must be prepare for unnoticed fix by CPost
|
20
|
+
|
21
|
+
# unfortunattely this can be done for only freshly generated XMLs (comparing b2b_time with Time.now.utc)
|
22
|
+
# but we have to kepp it compatible for old XML
|
23
|
+
# so we pass it up and leave comments in documenation
|
24
|
+
# Users of this gem will have to care of it
|
25
|
+
|
26
|
+
Time.parse(b2b_time_str)
|
27
|
+
end
|
28
|
+
|
29
|
+
# just for info
|
30
|
+
def cpost_time_zone
|
31
|
+
timezone('Europe/Prague')
|
10
32
|
end
|
11
33
|
end
|
12
34
|
end
|
@@ -3,10 +3,12 @@
|
|
3
3
|
require 'czech_post_b2b_client/services/orchestrator'
|
4
4
|
require 'czech_post_b2b_client/services/communicator'
|
5
5
|
require 'czech_post_b2b_client/services/api_caller'
|
6
|
-
require 'czech_post_b2b_client/services/
|
7
|
-
require 'czech_post_b2b_client/services/
|
6
|
+
require 'czech_post_b2b_client/services/parcels_async_sender'
|
7
|
+
require 'czech_post_b2b_client/services/parcels_sync_sender'
|
8
|
+
require 'czech_post_b2b_client/services/parcels_sender' # deprecated
|
8
9
|
require 'czech_post_b2b_client/services/parcels_send_process_updater'
|
9
10
|
require 'czech_post_b2b_client/services/address_sheets_generator'
|
10
11
|
require 'czech_post_b2b_client/services/parcels_submission_closer'
|
11
12
|
require 'czech_post_b2b_client/services/delivering_inspector'
|
12
13
|
require 'czech_post_b2b_client/services/time_period_statisticator'
|
14
|
+
require 'czech_post_b2b_client/services/xsds_downloader'
|
@@ -32,14 +32,9 @@ module CzechPostB2bClient
|
|
32
32
|
attr_accessor :request_xml, :response, :endpoint_path
|
33
33
|
|
34
34
|
def call_api
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
begin
|
39
|
-
self.response = https_conn.request(request)
|
40
|
-
rescue *KNOWN_CONNECTION_ERRORS => e
|
41
|
-
handle_connection_error(e)
|
42
|
-
end
|
35
|
+
self.response = https_conn.request(request)
|
36
|
+
rescue *KNOWN_CONNECTION_ERRORS => e
|
37
|
+
handle_connection_error(e)
|
43
38
|
end
|
44
39
|
|
45
40
|
def handle_response
|
@@ -56,6 +51,16 @@ module CzechPostB2bClient
|
|
56
51
|
@https_conn ||= Net::HTTP.start(service_uri.host, service_uri.port, connection_options)
|
57
52
|
end
|
58
53
|
|
54
|
+
def request
|
55
|
+
request = Net::HTTP::Post.new service_uri.request_uri, headers
|
56
|
+
request.body = request_xml
|
57
|
+
|
58
|
+
debug_msg = "CzechPost B2B REQUEST: #{request} to #{service_uri.request_uri} with body:\n#{request.body}"
|
59
|
+
CzechPostB2bClient.logger.debug(debug_msg)
|
60
|
+
|
61
|
+
request
|
62
|
+
end
|
63
|
+
|
59
64
|
def service_uri
|
60
65
|
@service_uri ||= URI.parse(configuration.b2b_api_base_uri + endpoint_path)
|
61
66
|
end
|
@@ -69,6 +74,7 @@ module CzechPostB2bClient
|
|
69
74
|
use_ssl: true,
|
70
75
|
verify_mode: OpenSSL::SSL::VERIFY_PEER,
|
71
76
|
keep_alive_timeout: 30,
|
77
|
+
ciphers: secure_and_available_ciphers,
|
72
78
|
cert: OpenSSL::X509::Certificate.new(File.read(configuration.certificate_path)),
|
73
79
|
# cert_password: configuration.certificate_password,
|
74
80
|
key: OpenSSL::PKey::RSA.new(File.read(configuration.private_key_path), configuration.private_key_password),
|
@@ -95,7 +101,8 @@ module CzechPostB2bClient
|
|
95
101
|
end
|
96
102
|
|
97
103
|
def b2b_error_text
|
98
|
-
|
104
|
+
err_code_without_namespace_regexp = %r{<(?:\w+\:)?errorCode>(\d+)</(?:\w+\:)?errorCode>}
|
105
|
+
error_match = result.xml.match(err_code_without_namespace_regexp)
|
99
106
|
return 'error code not found in XML' unless error_match
|
100
107
|
|
101
108
|
error_code = error_match[1].to_i
|
@@ -110,6 +117,15 @@ module CzechPostB2bClient
|
|
110
117
|
errors.add(:connection, "#{error.class} > #{service_uri} - #{error}")
|
111
118
|
fail!
|
112
119
|
end
|
120
|
+
|
121
|
+
def secure_and_available_ciphers
|
122
|
+
# Available non-weak suites for b2b.postaonline.cz (https://www.ssllabs.com/ssltest/analyze.html?d=b2b.postaonline.cz)
|
123
|
+
# TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (0xc030) ECDH secp384r1 (eq. 7680 bits RSA) FS 256
|
124
|
+
# TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (0xc02f) ECDH secp384r1 (eq. 7680 bits RSA) FS
|
125
|
+
# which have following names in OpenSSL (see `openssl ciphers`)
|
126
|
+
|
127
|
+
%w[ECDHE-RSA-AES256-GCM-SHA384 ECDHE-RSA-AES128-GCM-SHA256]
|
128
|
+
end
|
113
129
|
end
|
114
130
|
end
|
115
131
|
end
|
@@ -32,7 +32,6 @@ module CzechPostB2bClient
|
|
32
32
|
end
|
33
33
|
|
34
34
|
def build_result_from(response_hash)
|
35
|
-
puts("RESPONSE_HASH: #{response_hash}")
|
36
35
|
result_hash = {}
|
37
36
|
response_hash[:parcels].each_pair do |parcel_code, delivering_hash|
|
38
37
|
result_hash[parcel_code] = {
|
@@ -42,7 +41,6 @@ module CzechPostB2bClient
|
|
42
41
|
all_states: delivering_hash[:states]
|
43
42
|
}
|
44
43
|
end
|
45
|
-
puts("RESULT_HASH: #{result_hash}")
|
46
44
|
result_hash
|
47
45
|
end
|
48
46
|
end
|
@@ -0,0 +1,53 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module CzechPostB2bClient
|
4
|
+
module Services
|
5
|
+
class ParcelsAsyncSender < CzechPostB2bClient::Services::Communicator
|
6
|
+
attr_reader :sending_data, :parcels
|
7
|
+
|
8
|
+
def initialize(sending_data:, parcels:)
|
9
|
+
@sending_data = sending_data
|
10
|
+
@parcels = parcels
|
11
|
+
end
|
12
|
+
|
13
|
+
private
|
14
|
+
|
15
|
+
def request_builder_args
|
16
|
+
{ common_data: common_data, parcels: parcels }
|
17
|
+
end
|
18
|
+
|
19
|
+
def request_builder_class
|
20
|
+
CzechPostB2bClient::RequestBuilders::SendParcelsBuilder
|
21
|
+
end
|
22
|
+
|
23
|
+
def api_caller_class
|
24
|
+
CzechPostB2bClient::Services::ApiCaller
|
25
|
+
end
|
26
|
+
|
27
|
+
def response_parser_class
|
28
|
+
CzechPostB2bClient::ResponseParsers::SendParcelsParser
|
29
|
+
end
|
30
|
+
|
31
|
+
def common_data
|
32
|
+
data_from_config.merge(sending_data)
|
33
|
+
end
|
34
|
+
|
35
|
+
def data_from_config
|
36
|
+
{
|
37
|
+
contract_id: configuration.contract_id,
|
38
|
+
customer_id: configuration.customer_id,
|
39
|
+
sending_post_office_code: configuration.sending_post_office_code
|
40
|
+
}
|
41
|
+
end
|
42
|
+
|
43
|
+
def endpoint_path
|
44
|
+
'/sendParcels'
|
45
|
+
end
|
46
|
+
|
47
|
+
def build_result_from(response_hash)
|
48
|
+
OpenStruct.new(transaction_id: response_hash.dig(:async_result, :transaction_id),
|
49
|
+
processing_end_expected_at: response_hash.dig(:async_result, :processing_end_expected_at))
|
50
|
+
end
|
51
|
+
end
|
52
|
+
end
|
53
|
+
end
|
@@ -63,7 +63,7 @@ module CzechPostB2bClient
|
|
63
63
|
response_code = response_state[:code]
|
64
64
|
next if response_code == CzechPostB2bClient::ResponseCodes::Ok.code
|
65
65
|
|
66
|
-
errors.add(:parcels, "Parcel[#{parcel_id}] => #{CzechPostB2bClient::ResponseCodes.new_by_code(response_code)}")
|
66
|
+
errors.add(:parcels, "Parcel[#{parcel_id}] => #{CzechPostB2bClient::ResponseCodes.new_by_code(response_code)}") # rubocop:disable Layout/LineLength
|
67
67
|
end
|
68
68
|
end
|
69
69
|
end
|
@@ -2,51 +2,10 @@
|
|
2
2
|
|
3
3
|
module CzechPostB2bClient
|
4
4
|
module Services
|
5
|
-
class ParcelsSender < CzechPostB2bClient::Services::
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
@sending_data = sending_data
|
10
|
-
@parcels = parcels
|
11
|
-
end
|
12
|
-
|
13
|
-
private
|
14
|
-
|
15
|
-
def request_builder_args
|
16
|
-
{ common_data: common_data, parcels: parcels }
|
17
|
-
end
|
18
|
-
|
19
|
-
def request_builder_class
|
20
|
-
CzechPostB2bClient::RequestBuilders::SendParcelsBuilder
|
21
|
-
end
|
22
|
-
|
23
|
-
def api_caller_class
|
24
|
-
CzechPostB2bClient::Services::ApiCaller
|
25
|
-
end
|
26
|
-
|
27
|
-
def response_parser_class
|
28
|
-
CzechPostB2bClient::ResponseParsers::SendParcelsParser
|
29
|
-
end
|
30
|
-
|
31
|
-
def common_data
|
32
|
-
data_from_config.merge(sending_data)
|
33
|
-
end
|
34
|
-
|
35
|
-
def data_from_config
|
36
|
-
{
|
37
|
-
contract_id: configuration.contract_id,
|
38
|
-
customer_id: configuration.customer_id,
|
39
|
-
sending_post_office_code: configuration.sending_post_office_code
|
40
|
-
}
|
41
|
-
end
|
42
|
-
|
43
|
-
def endpoint_path
|
44
|
-
'/sendParcels'
|
45
|
-
end
|
46
|
-
|
47
|
-
def build_result_from(response_hash)
|
48
|
-
OpenStruct.new(transaction_id: response_hash.dig(:async_result, :transaction_id),
|
49
|
-
processing_end_expected_at: response_hash.dig(:async_result, :processing_end_expected_at))
|
5
|
+
class ParcelsSender < CzechPostB2bClient::Services::ParcelsAsyncSender
|
6
|
+
class << self
|
7
|
+
extend Gem::Deprecate
|
8
|
+
deprecate :call, 'CzechPostB2bClient::Services::ParcelsAsyncSender.call', 2020, 8
|
50
9
|
end
|
51
10
|
end
|
52
11
|
end
|