XeroAPI / Xero-NetStandard

A wrapper of the Xero API in the .NetStandard 2.0 framework. Supports Accounting, Payroll AU/US, and Files
MIT License
120 stars 119 forks source link

Allow Descriptive LineItem Without UnitAmount and Quantity #462

Open arahmancsd opened 1 year ago

arahmancsd commented 1 year ago

SDK you're using (please complete the following information):

Xero.Api.SDK.Core 1.1.4

Is your feature request related to a problem? Please describe.

Currently, a LineItem object in the invoice doesn't allow a descriptive line. Every LineItem object must have UnitAmount and Quantity. However, we need a descriptive line in the invoice without those fields as in the below picture.

Screenshot 2023-01-26 091425

Describe the solution you'd like Allow descriptive LineItem without UnitAmount and Quantity fields. The UnitAmount & Quantity are both nullable, however, it doesn't allow creating an invoice without them.

Below are the two fields from the LineItem documentation, Both are nullable and don't emit default values as well. So the implementation shouldn't bring huge changes in the invoices.

        //
        // Summary:
        //     LineItem Quantity
        //
        // Value:
        //     LineItem Quantity
        [DataMember(Name = "Quantity", EmitDefaultValue = false)]
        public decimal? Quantity { get; set; }

        //
        // Summary:
        //     LineItem Unit Amount
        //
        // Value:
        //     LineItem Unit Amount
        [DataMember(Name = "UnitAmount", EmitDefaultValue = false)]
        public decimal? UnitAmount { get; set; }
itsisaf commented 1 year ago

Any update on this?