-
Notifications
You must be signed in to change notification settings - Fork 240
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unable to query RecurringTransaction
#459
Comments
This is the content of
|
I'm having the same issue and it appears to be a problem with the [2022-11-23 19:32:44] local.ERROR: Property QuickBooksOnline\API\Data\IPPRecurringTransaction::$Invoice does not exist.
Class QuickBooksOnline\API\Data\IPPRecurringTransaction {"exception":"[object] (RuntimeException(code: 0): Property QuickBooksOnline\\API\\Data\\IPPRecurringTransaction::$Invoice does not exist.
Class QuickBooksOnline\\API\\Data\\IPPRecurringTransaction at /app/vendor/quickbooks/v3-php-sdk/src/XSD2PHP/src/com/mikebevz/xsd2php/Bind.php:135) |
Bump. Running into the same issue and have confirmed the above reports. |
The problem is that the XSD, and the code extracted from there, doesn't match what comes back from the API. My hacky fix: <?php
// before API calls
if (!class_exists(\QuickBooksOnline\API\Data\IPPRecurringTransaction::class, false)) {
require_once __DIR__ . '/Polyfill_IPPRecurringTransaction.php';
} The "polyfill" with a fixed entity: <?php
// Polyfill_IPPRecurringTransaction.php
namespace QuickBooksOnline\API\Data;
use function get_class;
use function property_exists;
/**
* @xmlNamespace http://schema.intuit.com/finance/v3
* @xmlType IntuitEntity
* @xmlName IPPRecurringTransaction
* @var IPPRecurringTransaction
* @xmlDefinition The Recurrence Transaction Object
*/
class IPPRecurringTransaction extends IPPIntuitEntity
{
/**
* @xmlType element
* @xmlName IntuitObject
* @var com\intuit\schema\finance\v3\IntuitObject
*/
public $IntuitObject;
/**
* @xmlType element
* @xmlNamespace http://schema.intuit.com/finance/v3
* @xmlMinOccurs 0
* @xmlName Bill
* @var com\intuit\schema\finance\v3\IPPBill
*/
public $Bill;
/**
* @xmlType element
* @xmlNamespace http://schema.intuit.com/finance/v3
* @xmlMinOccurs 0
* @xmlName Purchase
* @var com\intuit\schema\finance\v3\IPPPurchase
*/
public $Purchase;
/**
* @xmlType element
* @xmlNamespace http://schema.intuit.com/finance/v3
* @xmlMinOccurs 0
* @xmlName CreditMemo
* @var com\intuit\schema\finance\v3\IPPCreditMemo
*/
public $CreditMemo;
/**
* @xmlType element
* @xmlNamespace http://schema.intuit.com/finance/v3
* @xmlMinOccurs 0
* @xmlName Deposit
* @var com\intuit\schema\finance\v3\IPPDeposit
*/
public $Deposit;
/**
* @xmlType element
* @xmlNamespace http://schema.intuit.com/finance/v3
* @xmlMinOccurs 0
* @xmlName Estimate
* @var com\intuit\schema\finance\v3\IPPEstimate
*/
public $Estimate;
/**
* @xmlType element
* @xmlNamespace http://schema.intuit.com/finance/v3
* @xmlMinOccurs 0
* @xmlName Invoice
* @var com\intuit\schema\finance\v3\IPPInvoice
*/
public $Invoice;
/**
* @xmlType element
* @xmlNamespace http://schema.intuit.com/finance/v3
* @xmlMinOccurs 0
* @xmlName JournalEntry
* @var com\intuit\schema\finance\v3\IPPJournalEntry
*/
public $JournalEntry;
/**
* @xmlType element
* @xmlNamespace http://schema.intuit.com/finance/v3
* @xmlMinOccurs 0
* @xmlName RefundReceipt
* @var com\intuit\schema\finance\v3\IPPRefundReceipt
*/
public $RefundReceipt;
/**
* @xmlType element
* @xmlNamespace http://schema.intuit.com/finance/v3
* @xmlMinOccurs 0
* @xmlName SalesReceipt
* @var com\intuit\schema\finance\v3\IPPSalesReceipt
*/
public $SalesReceipt;
/**
* @xmlType element
* @xmlNamespace http://schema.intuit.com/finance/v3
* @xmlMinOccurs 0
* @xmlName Transfer
* @var com\intuit\schema\finance\v3\IPPTransfer
*/
public $Transfer;
/**
* @xmlType element
* @xmlNamespace http://schema.intuit.com/finance/v3
* @xmlMinOccurs 0
* @xmlName VendorCredit
* @var com\intuit\schema\finance\v3\IPPVendorCredit
*/
public $VendorCredit;
/**
* @xmlType element
* @xmlNamespace http://schema.intuit.com/finance/v3
* @xmlMinOccurs 0
* @xmlName PurchaseOrder
* @var com\intuit\schema\finance\v3\IPPPurchaseOrder
*/
public $PurchaseOrder;
/**
* Initializes this object, optionally with pre-defined property values
*
* Initializes this object and it's property members, using the dictionary
* of key/value pairs passed as an optional argument.
*
* @param dictionary $keyValInitializers key/value pairs to be populated into object's properties
* @param boolean $verbose specifies whether object should echo warnings
*/
public function __construct($keyValInitializers = array(), $verbose = FALSE)
{
foreach ($keyValInitializers as $initPropName => $initPropVal) {
if (property_exists('IPPRecurringTransaction', $initPropName) || property_exists('QuickBooksOnline\API\Data\IPPRecurringTransaction', $initPropName)) {
$this->{$initPropName} = $initPropVal;
} else {
if ($verbose)
echo "Property does not exist ($initPropName) in class (" . get_class($this) . ")";
}
}
}
} // end class IPPRecurringTransaction |
I'm on version:
^6.0
and I'm trying to get allRecurringTransaction
:Then an exception is thrown:
I'm not getting this exception in other queries.
The text was updated successfully, but these errors were encountered: