Closed mobrad1 closed 7 months ago
Hello, I'll investigate this issue this weekend and get back to you, thanks for reporting it
@mobrad1 Seems like you have an older version of the library which doesn't have this fix, but yes, you are right, it is only throwing a type error, not an actual logical error so updating the phpdoc and adding the UpdateCustomerRequest
will fix the error. If for any reason you are not able to have the latest version of the library, you are free to fork and make your own fix with the version you are using.
Altho I would suggest to upgrade to the latest version of the library as soon as possible.
This Error gets thrown when setCustomer is called and an existing customer is passed in
{ "message": "Cannot assign Square\\Models\\UpdateCustomerRequest to property Nikolag\\Square\\SquareService::$createCustomerRequest of type Square\\Models\\CreateCustomerRequest", "exception": "TypeError", "file": "/var/www/html/vendor/nikolag/laravel-square/src/SquareService.php", "line": 391, "trace": [ { "file": "/var/www/html/vendor/nikolag/laravel-square/src/SquareService.php", "line": 433, "function": "setCreateCustomerRequest", "class": "Nikolag\\Square\\SquareService", "type": "->" },