firstred / postnl-api-php

PostNL API PHP bindings
https://postnl-php.readthedocs.io
MIT License
26 stars 37 forks source link

Undefined property: stdClass::$Events #97

Open Swahjak opened 3 months ago

Swahjak commented 3 months ago

It seems like "Events" can be undefined when requesting PostNL status. One hell of an API for a company this size.

07:52:40 ERROR     [carrier] Warning: Undefined property: stdClass::$Events
[
  "exception" => ErrorException {
    #message: "Warning: Undefined property: stdClass::$Events"
    #code: 0
    #file: "./vendor/firstred/postnl-api-php/src/Service/ResponseProcessor/Rest/ShippingStatusServiceRestResponseProcessor.php"
    #line: 142
    #severity: E_WARNING
    trace: {
      ./vendor/firstred/postnl-api-php/src/Service/ResponseProcessor/Rest/ShippingStatusServiceRestResponseProcessor.php:142 { …}
      ./vendor/firstred/postnl-api-php/src/Service/ShippingStatusService.php:273 { …}
      ./vendor/firstred/postnl-api-php/src/PostNL.php:1757 { …}
Swahjak commented 3 months ago

(will create a PR when I get to it)

Swahjak commented 3 months ago

It gets even better "{"Barcode":"xxx","Status":{"StatusCode":"7","StatusDescription":"Zending in distributieproces","PhaseCode":"3","PhaseDescription":"Distributie"}}, this is missing the CreationDate

timmtim commented 2 weeks ago

@Swahjak did you already had a chance to fix this issue?