intuit / QuickBooks-V3-Java-SDK

Java SDK for QuickBooks REST API v3 services
Apache License 2.0
70 stars 144 forks source link

Docs are missing fields for `Line` in `PurchaseOrder` #207

Open bseib opened 1 year ago

bseib commented 1 year ago

In the docs for the PurchaseOrder object, it shows that Line is a list of objects, but it does not document the fields that are available in a Line object.

For example, in issue #206 the Received field is not documented for the Line objects that are in a PurchaseOrder:

image

But the Received field (and others) are clearly present in the source code:

public class Line implements Serializable, Equals2, HashCode2
{

    private final static long serialVersionUID = 1L;
    @XmlElement(name = "Id")
    protected String id;
    @XmlElement(name = "LineNum")
    @XmlSchemaType(name = "positiveInteger")
    protected BigInteger lineNum;
    @XmlElement(name = "Description")
    protected String description;
    @XmlElement(name = "Amount")
    protected BigDecimal amount;
    @XmlElement(name = "Received")
    protected BigDecimal received;
    @XmlElement(name = "LinkedTxn")
    protected List<LinkedTxn> linkedTxn;
    @XmlElement(name = "DetailType")
    @XmlSchemaType(name = "string")
    protected LineDetailTypeEnum detailType;
    @XmlElement(name = "PaymentLineDetail")
    protected PaymentLineDetail paymentLineDetail;
    @XmlElement(name = "DiscountLineDetail")
    protected DiscountLineDetail discountLineDetail;
    @XmlElement(name = "TaxLineDetail")
    protected TaxLineDetail taxLineDetail;
    @XmlElement(name = "SalesItemLineDetail")
    protected SalesItemLineDetail salesItemLineDetail;
    @XmlElement(name = "DescriptionLineDetail")
    protected DescriptionLineDetail descriptionLineDetail;
    @XmlElement(name = "ItemBasedExpenseLineDetail")
    protected ItemBasedExpenseLineDetail itemBasedExpenseLineDetail;
    @XmlElement(name = "AccountBasedExpenseLineDetail")
    protected AccountBasedExpenseLineDetail accountBasedExpenseLineDetail;
    @XmlElement(name = "ReimburseLineDetail")
    protected ReimburseLineDetail reimburseLineDetail;
    @XmlElement(name = "DepositLineDetail")
    protected DepositLineDetail depositLineDetail;
    @XmlElement(name = "PurchaseOrderItemLineDetail")
    protected PurchaseOrderItemLineDetail purchaseOrderItemLineDetail;
    @XmlElement(name = "SalesOrderItemLineDetail")
    protected SalesOrderItemLineDetail salesOrderItemLineDetail;
    @XmlElement(name = "ItemReceiptLineDetail")
    protected ItemReceiptLineDetail itemReceiptLineDetail;
    @XmlElement(name = "JournalEntryLineDetail")
    protected JournalEntryLineDetail journalEntryLineDetail;
    @XmlElement(name = "GroupLineDetail")
    protected GroupLineDetail groupLineDetail;
    @XmlElement(name = "SubTotalLineDetail")
    protected SubTotalLineDetail subTotalLineDetail;
    @XmlElement(name = "TDSLineDetail")
    protected TDSLineDetail tdsLineDetail;
    @XmlElement(name = "ItemAdjustmentLineDetail")
    protected ItemAdjustmentLineDetail itemAdjustmentLineDetail;
    @XmlElement(name = "CustomField")
    protected List<CustomField> customField;
    @XmlElement(name = "LineEx")
    protected IntuitAnyType lineEx;
    @XmlElement(name = "ProjectRef")
    protected ReferenceType projectRef;

    // ...
}

There was no documentation on how to get the Received value for the lines in a purchase order.

This might be a broader problem with the documentation generator. It might happen anytime a list of objects is documented, not just for Lines in a PurchaseOrder.

sujitharamadass commented 1 year ago

@bseib Thanks for bringing this up. Will work with our internal team to update the documentation.

jeromeli-brex commented 1 year ago

+1 Also missing Lines in Purchase, Bill, and JournalEntry as well. Not sure any other way to upload line along with those data type?

jeromeli-brex commented 1 year ago

+1 Also missing Lines in Purchase, Bill, and JournalEntry as well. Not sure any other way to upload line along with those data type?

NVM, I resolved myself. Purchase, Bill, and JournalEntry are all implementations of Transaction and Transaction does have Line field.

bseib commented 1 year ago

NVM, I resolved myself. Purchase, Bill, and JournalEntry are all implementations of Transaction and Transaction does have Line field.

Hi @jeromeli-brex -- Are you saying that you found the Line fields in the documentation for these? (Do you have the urls?) Or were you just seeing the data on the wire?

I was seeing it on the wire just fine, but opened this issue because Line[] details were missing from the docs.