我正在使用v3-php-sdk,创建项目非类型类型效果很好。
问题是该项目被用作类别时,例如
Array
(
[Name] => Item
[FullyQualifiedName] => Item
[Type] => Category
)
,如果我打电话
Item::create($arrayItem)
它像这样生成对象。
QuickBooksOnlineAPIDataIPPItem Object
(
[Name] => Item
[Sku] =>
[Description] =>
[Active] =>
[SubItem] =>
[ParentRef] =>
[Level] =>
[FullyQualifiedName] => Item
[Taxable] =>
[SalesTaxIncluded] =>
[PercentBased] =>
[UnitPrice] =>
[RatePercent] =>
[Type] => QuickBooksOnlineAPIDataIPPCustomFieldTypeEnum Object
(
[value] => Category
)
[PaymentMethodRef] =>
[UOMSetRef] =>
[IncomeAccountRef] =>
[PurchaseDesc] =>
[PurchaseTaxIncluded] =>
[PurchaseCost] =>
[ExpenseAccountRef] =>
[COGSAccountRef] =>
[AssetAccountRef] =>
[PrefVendorRef] =>
[AvgCost] =>
[TrackQtyOnHand] =>
[QtyOnHand] =>
[QtyOnPurchaseOrder] =>
[QtyOnSalesOrder] =>
[ReorderPoint] =>
[ManPartNum] =>
[DepositToAccountRef] =>
[SalesTaxCodeRef] =>
[PurchaseTaxCodeRef] =>
[InvStartDate] =>
[BuildPoint] =>
[PrintGroupedItems] =>
[SpecialItem] =>
[SpecialItemType] =>
[ItemGroupDetail] =>
[ItemAssemblyDetail] =>
[AbatementRate] =>
[ReverseChargeRate] =>
[ServiceType] =>
[ItemCategoryType] =>
[ItemEx] =>
[Id] =>
[SyncToken] =>
[MetaData] =>
[CustomField] =>
[AttachableRef] =>
[domain] =>
[status] =>
[sparse] =>
)
但是,在我的研究中,它总是给这个对象丢下错误,他们说我们不应该通过0或负数为EG。UnitPrice或其他字段,但是如果是这样,SDK是生成此对象的一个,我只是提供我拥有的数据。
对此有任何想法吗?
"对于沙盒,默认情况下不启用类别。类别移民
尝试创建一家自由审判的制作公司,一切都应该正确地工作"
根据hao_lu(intuit开发人员组(
单击此链接以获取更多信息。
那是因为 [UnitPrice] =>
是空。如果您收到的错误消息
Array
(
[Name] => Item
[FullyQualifiedName] => Item
[Type] => Category
[UnitPrice] => 1
)