Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Library sends booleans not in the expected way #2

Open
PhilippSchreiber opened this issue Mar 17, 2016 · 0 comments
Open

Library sends booleans not in the expected way #2

PhilippSchreiber opened this issue Mar 17, 2016 · 0 comments

Comments

@PhilippSchreiber
Copy link

When using for example "create_shipping_label" and setting a boolean the api sends it as int (0|1). It does only work if sending the boolean as string. Sample request:

array:7 [ "to" => array:8 [ "company" => "Schreiber & Freunde GmbH & Co. KG" "first_name" => "Philipp" "last_name" => "Schreiber" "street" => "Heilbronner Straße" "street_no" => "12" "city" => "Neckarsulm" "zip_code" => "74172" "country" => "DE" ] "package" => array:4 [ "width" => 40 "length" => 40 "height" => 40 "weight" => 12 ] "carrier" => "dhl" "service" => "standard" "reference_number" => "abcde" "notification_email" => "[email protected]" "create_shipping_label" => true ]

This does not work. What works is the following (the difference is the "create_shipping_label" parameter):

array:7 [ "to" => array:8 [ "company" => "Schreiber & Freunde GmbH & Co. KG" "first_name" => "Philipp" "last_name" => "Schreiber" "street" => "Heilbronner Straße" "street_no" => "12" "city" => "Neckarsulm" "zip_code" => "74172" "country" => "DE" ] "package" => array:4 [ "width" => 40 "length" => 40 "height" => 40 "weight" => 12 ] "carrier" => "dhl" "service" => "standard" "reference_number" => "abcde" "notification_email" => "[email protected]" "create_shipping_label" => "true" ]

Shipcloud support says the following:

dass true als String angenommen wird ist derzeit noch ein Fallback der in Zukunft ausgebaut wird. Bitte überprüfe einmal, was genau ihr am Ende an Daten an uns sendet, denn bei uns kommt "create_shipping_label=1" an und das ist halt nicht korrekt.

Perhaps that will be fixed as side effect when fixing #1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant