Skip to content

Library sends booleans not in the expected way #2

Description

@PhilippSchreiber

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" => "ps@schreiber-freunde.de" "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" => "ps@schreiber-freunde.de" "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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions