foton / czech_post_b2b_client Goto Github PK
View Code? Open in Web Editor NEWClient to leverage Czech Post B2B API
License: MIT License
Client to leverage Czech Post B2B API
License: MIT License
API version from 1.10 probabyl (I still do not have correct documentation) send in Error response also description field.
CzechPost B2B RESPONSE: #<Net::HTTPOK:0x000055750f595bf8> with body:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<v1:B2BFaultMessage xmlns:v1="https://b2b.postaonline.cz/schema/B2BCommon-v1" xmlns:v1_1="https://b2b.postaonline.cz/schema/POLServices-v1">
<v1:errorDetail>BAD_REQUEST</v1:errorDetail>
<v1:errorCode>7</v1:errorCode>
<v1:errorDescription>cvc-complex-type.2.4.a: Invalid content was found starting with element '{"https://b2b.postaonline.cz/schema/POLServices-v1":idForm}'. One of '{"https://b2b.postaonline.cz/schema/POLServices-v1":customerID}' is expected.</v1:errorDescription>
</v1:B2BFaultMessage>
Make it pass up in error message.
Discovered hidden at the end of docs
See attached docx
locationCreate - Uloží podací místo včetně adres, bankovních spojení a kontaktů
locationList - Seznam podacích míst, adres, bankovních spojení a kontaktů
locationDelete - Zruší podací místo včetně adres, bankovních spojení a kontaktů
So length of strings are in sync with XSD (eg. :advice_note
is max 15 chars)
CzechPost B2B REQUEST: #<Net::HTTP::Post:0x000056238bbcdf40> to /services/POLService/v1/getParcelState with headers: {:"Content-Type"=>"text/xml"}
and body:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<b2bRequest xmlns="https://b2b.postaonline.cz/schema/B2BCommon-v1" xmlns:ns2="https://b2b.postaonline.cz/schema/POLServices-v1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="https://raw.githubusercontent.com/foton/czech_post_b2b_client/master/documents/latest_xsds/B2BCommon.xsd" xsi:schemaLocation="https://b2b.postaonline.cz/schema/POLServices-v1 https://raw.githubusercontent.com/foton/czech_post_b2b_client/master/documents/latest_xsds/B2BPOLServices.xsd">
<header>
<idExtTransaction>1</idExtTransaction>
<timeStamp>2021-02-18T14:58:52.610+01:00</timeStamp>
<idContract>356936003</idContract>
</header>
<serviceData>
<ns2:getParcelState>
<ns2:idParcel>RR191839735CZ</ns2:idParcel>
<ns2:language>cs</ns2:language>
</ns2:getParcelState>
</serviceData>
</b2bRequest>
CzechPost B2B RESPONSE: #<Net::HTTPOK:0x000056238bbd6780> with body:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<v1:B2BFaultMessage xmlns:v1="https://b2b.postaonline.cz/schema/B2BCommon-v1" xmlns:v1_1="https://b2b.postaonline.cz/schema/POLServices-v1">
<v1:errorDetail>OVERFLOW_MAX_CALL_COUNT</v1:errorDetail>
<v1:errorCode>8</v1:errorCode>
</v1:B2BFaultMessage>
NoMethodError: undefined method `[]' for nil:NilClass
from /home/foton/.asdf/installs/ruby/2.6.6/lib/ruby/gems/2.6.0/gems/czech_post_b2b_client-1.2.6/lib/czech_post_b2b_client/services/api_caller.rb:111:in `b2b_error_text'
letterWithCN22 - Zajišťuje předání dat podaných zásilek pro OLZ
letterWithCN22Result - Operace slouží ke zjištění výsledku zpracování dat k letterWithCN22
They already have some Packages
and Addresses
So logging of request/response is configurable outside gem source
(+ mention Squared s.r.o.) as donator of this gem.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.