InvoiceItem
instance with the provided values.ClassInvoice
InvoiceItemBuilder
Facilitates configuring and building a instance.
Technology
- Quantum
Pay Client
Declaration
class InvoiceItemBuilder
Topics
Initializers
Instance Methods
func build() throws -> InvoiceItem
Builds the
func price(unitPrice : Decimal, quantity: Decimal, includedTax : Decimal) -> InvoiceItemBuilder
Specify the price and quantity of the invoice item in the currency of the
Transaction
. Convenient for automatically setting the gross and net total using the unit price multiplied by the quantity.func productCode (String) -> InvoiceItemBuilder
Specify the product or service code or SKU for the invoice item. Required.
func productDescription (String) -> InvoiceItemBuilder
Describe the product or service on the invoice item. Required.
func quantity(Decimal) -> InvoiceItemBuilder
Specify the quantity of the invoice item. Optional. The default value is 1 when not provided.
func saleCode (SaleCode ) -> InvoiceItemBuilder
Specify the
QuantumPay.Client.Model.SaleCode
for the product or service on the invoice item. Optional. The default value is QuantumPay.Client.Model.SaleCode.Sale
when not provided.func setDiscountTotal (Decimal) -> InvoiceItemBuilder
Sets the total amount of discount on the invoice item in the currency of the
Transaction
func setGrossTotal (Decimal) -> InvoiceItemBuilder
Sets the gross total amount on the invoice item in the currency of the
Transaction
.func setNetTotal (Decimal) -> InvoiceItemBuilder
Sets the net total amount of the invoice item in the currency of the
Transaction
.func setTaxTotal (Decimal) -> InvoiceItemBuilder
Sets the total amount of tax on the invoice item in the currency of the
Transaction
.func unitOfMeasureCode (UnitOfMeasure ) -> InvoiceItemBuilder
Specify the
UnitOfMeasure
for the quantity of the invoice item. Optional. The default value is UnitOfMeasure.each
when not provided.func unitPrice (Decimal, priceIncludesTax : Bool) -> InvoiceItemBuilder
Specify the unit price of the invoice item in the currency of the
Transaction
. Required.