I'm calling the Bill and/or VendorCredit facade like so:
Bill::create([
[
'DocNumber' => '12345678',
'TxnDate' => 2023-12-06,
'Line' => [
'DetailType' => 'AccountBasedExpenseLineDetail',
'Amount' => 23.12,
'AccountBasedExpenseLineDetail' => [
'AccountRef' => [
'value' => 150
]
]
],
'VendorRef' => [
'value' => 175
]
]
])
However, nothing gets returned. I added some logging to the bill class, and I can see the data that's passed in is correct, but it never gets to the second log statement. It seems to be silently failing somewhere and I can't figure out where.
Seems to be something in the FacadeHelper::reflectArrayToObject method.
Log::debug($data);
$BillObject = FacadeHelper::reflectArrayToObject("Bill", $data, $throwException);
Log::debug($BillObject); <-- never gets here
Has anyone else run into this? Oddly, I've used nearly this same code in a similar project and it works flawlessly. I just can't understand what's going on. I've got this in my QuickbooksService class:
$this->dataService->throwExceptionOnError(true);