Open gmariani opened 3 years ago
Managed to patch this by adding this to /src/Data/IPPRecurringTransaction.php
/**
* @xmlType element
* @xmlName JournalEntry
* @varz com\intuit\schema\finance\v3\JournalEntry
* @var IPPJournalEntry
*/
public $JournalEntry;
/**
* @xmlType element
* @xmlName Purchase
* @varz com\intuit\schema\finance\v3\Purchase
* @var IPPPurchase
*/
public $Purchase;
/**
* @xmlType element
* @xmlName Invoice
* @varz com\intuit\schema\finance\v3\Invoice
* @var IPPInvoice
*/
public $Invoice;
Had to also add this:
/**
* @xmlType element
* @xmlName SalesReceipt
* @varz com\intuit\schema\finance\v3\SalesReceipt
* @var IPPSalesReceipt
*/
public $SalesReceipt;
In order to get the correct error message, I have to modify error message in /src/DataService/DataService.php
with this in order to get the actual error message:
try {
$responseXmlObj = simplexml_load_string($responseBody);
if ($responseXmlObj && $responseXmlObj->QueryResponse) {
$tmpXML = $responseXmlObj->QueryResponse->asXML();
$parsedResponseBody = $this->responseSerializer->Deserialize($tmpXML, false);
$this->serviceContext->IppConfiguration->Logger->CustomLogger->Log(TraceLevel::Info, $parsedResponseBody);
}
} catch (\Exception $e) {
throw new \Exception("Exception appears in converting Response to XML.");
}
to
try {
$responseXmlObj = simplexml_load_string($responseBody);
if ($responseXmlObj && $responseXmlObj->QueryResponse) {
$tmpXML = $responseXmlObj->QueryResponse->asXML();
$parsedResponseBody = $this->responseSerializer->Deserialize($tmpXML, false);
$this->serviceContext->IppConfiguration->Logger->CustomLogger->Log(TraceLevel::Info, $parsedResponseBody);
}
} catch (\Exception $e) {
echo print_r($e);
throw new \Exception("Exception appears in converting Response to XML.");
}
Looks like this is the complete list of types that should probably be added to support: Bill, Purchase, CreditMemo, Deposit, Estimate, Invoice, JournalEntry, RefundReceipt, SalesReceipt, Transfer, VendorCredit, and PurchaseOrder
Here is the entire list of types:
/**
* @xmlType element
* @xmlName JournalEntry
* @varz com\intuit\schema\finance\v3\JournalEntry
* @var IPPJournalEntry
*/
public $JournalEntry;
/**
* @xmlType element
* @xmlName Purchase
* @varz com\intuit\schema\finance\v3\Purchase
* @var IPPPurchase
*/
public $Purchase;
/**
* @xmlType element
* @xmlName SalesReceipt
* @varz com\intuit\schema\finance\v3\SalesReceipt
* @var IPPSalesReceipt
*/
public $SalesReceipt;
/**
* @xmlType element
* @xmlName Invoice
* @varz com\intuit\schema\finance\v3\Invoice
* @var IPPInvoice
*/
public $Invoice;
/**
* @xmlType element
* @xmlName Bill
* @varz com\intuit\schema\finance\v3\Invoice
* @var IPPBill
*/
public $Bill;
/**
* @xmlType element
* @xmlName PurchaseOrder
* @varz com\intuit\schema\finance\v3\Invoice
* @var IPPPurchaseOrder
*/
public $PurchaseOrder;
/**
* @xmlType element
* @xmlName VendorCredit
* @varz com\intuit\schema\finance\v3\Invoice
* @var IPPVendorCredit
*/
public $VendorCredit;
/**
* @xmlType element
* @xmlName Transfer
* @varz com\intuit\schema\finance\v3\Invoice
* @var IPPTransfer
*/
public $Transfer;
/**
* @xmlType element
* @xmlName RefundReceipt
* @varz com\intuit\schema\finance\v3\Invoice
* @var IPPRefundReceipt
*/
public $RefundReceipt;
/**
* @xmlType element
* @xmlName Estimate
* @varz com\intuit\schema\finance\v3\Invoice
* @var IPPEstimate
*/
public $Estimate;
/**
* @xmlType element
* @xmlName Deposit
* @varz com\intuit\schema\finance\v3\Invoice
* @var IPPDeposit
*/
public $Deposit;
/**
* @xmlType element
* @xmlName CreditMemo
* @varz com\intuit\schema\finance\v3\Invoice
* @var IPPCreditMemo
*/
public $CreditMemo;
This fixed all issues with recurring transactions for me
Trying to retrieve a list of RecurringTransactions and I get this error.
$dataService->Query("select * from RecurringTransaction");
I am getting the following exception in
PhpObjFromXml
in/src/Core/Http/Serialization/XmlObjectSerializer.php
of the SDK. I"m using version 6.0.1 of the SDK.Property JournalEntry does not exist. Class QuickBooksOnline\API\Data\IPPRecurringTransaction