Andrew Kothen
Andrew Kothen

Reputation: 13

Creating a Bill with .NET IPP Data Services SDK

I have a SaaS application that creates expenses within QuickBooks Online. In the the IPP documentation (https://ipp.developer.intuit.com/0010_Intuit_Partner_Platform/0050_Data_Services/0400_QuickBooks_Online/Bill) it shows that on a line object you can specify the AccountID (its the last field in the documentation) and that is required to create an account-based expense.

However, in the .NET object for BillLine, there appears to be no way to specify that data. Does anyone know how to create an "Account-based Bill Expense" using the .NET SDK?

Upvotes: 1

Views: 362

Answers (1)

Peter Lavelle
Peter Lavelle

Reputation: 1484

Intuit.Ipp.Data.Qbo.BillLine billLine = new Intuit.Ipp.Data.Qbo.BillLine();
billLine.ItemsElementName = new ItemsChoiceType1[] {ItemsChoiceType1.AccountId, ItemsChoiceType1.AccountName};
billLine.Items = new object[] {new IdType() {idDomain = idDomainEnum.QB, Value = "123"}, "MyAccountName"};

Any properties that are not exposed directly are defined in the ItemsElementName property, and the value is passed in the respective index in the Items object array. You will see this across most entities in the .NET DevKit.

Upvotes: 1

Related Questions