Closed torkiljohnsen closed 6 years ago
@torkiljohnsen thanks for reporting this can you provide me with the full JSON return? (please anonymise sensitive data)
Due to the limited iZettle API docs, a lot of builders are created by the responses i got
Sorry, I have not looked at this for months. We have built our own client for this I'm afraid.
@torkiljohnsen no problem, as you mentions you contacted iZettle about this problem, can you tell me the outcome for this issue?
thanks
Huh? There should be a link just above here to the referenced issue? https://github.com/iZettle/api-documentation/issues/44
We have the same problem with null value in field fromEventLogUuid from json return. Part of the json which breaks in LibraryBuilder::buildFromJson:
....13e275741638","fromEventLogUuid":null,"products":[{"uuid":"f0.....
Will be fixed with next release
When testing I discovered this:
ProductClient->getLibrary()
does$this->libraryBuilder->buildFromJson($json)
.The
$json
in this case is the JSON return from my iZettle API, and it looks something like this:As you can see,
fromEventLogUuid
isnull
, but theLibraryBuilder
class' constructor incorrectly assumes that this is a UUID, when it can obviously also benull
.This exception is thrown:
Ramsey\\Uuid\\Exception\\InvalidUuidStringException(code: 0): Invalid UUID string:…
From iZettle's docs, it says that
fromEventLogUuid
should be a string, so I will report this with iZettle as well.