LineItem
extends DataTransferObject
in package
Invoice lines are used to determine the amount of an invoice, in addition to being able to tie the invoice to rebilled expenses. The invoice line type determines whether a line is an amount or whether it refers to an unbilled expense.
Note: When updating lines with a PUT request, the request payload must contain all the lines of the invoice that you wish to remain.
Table of Contents
Properties
- $amount : Money
- $description : string
- $expenseId : int
- $lineId : int
- $name : string
- $quantity : int
- $taxAmount1 : string
- $taxAmount2 : string
- $taxName1 : string
- $taxName2 : string
- $taxNumber1 : string
- $taxNumber2 : string
- $type : int
- $unitCost : Money
- $updated : DateTimeImmutable
- $exceptKeys : array<string|int, mixed>
Properties
$amount
public
Money
$amount
Amount total of a line item, calculated from unit cost, quantity and tax.
Money object containing amount and currency code.
$description
public
string
$description
Description for the line item.
$expenseId
public
int
$expenseId
Id of unbilled expense
Required when invoice line type is rebilling expense (type = 1
), otherwise should be excluded.
$lineId
public
int
$lineId
Unique-to-this-invoice line id.
$name
public
string
$name
Name for the line item.
$quantity
public
int
$quantity
Quantity of the line unit, multiplied against unit_cost to get amount.
$taxAmount1
public
string
$taxAmount1
First tax amount, in percentage, up to 3 decimal places.
$taxAmount2
public
string
$taxAmount2
Second tax amount, in percentage, up to 3 decimal places.
$taxName1
public
string
$taxName1
Name for the first tax on the line item.
$taxName2
public
string
$taxName2
Name for the second tax on the line item.
$taxNumber1
public
string
$taxNumber1
First tax number on the line item.
$taxNumber2
public
string
$taxNumber2
Second tax number on the line item.
$type
public
int
$type
Line item type. Either 0
(normal) or 1
for a rebilling expense line.
$unitCost
public
Money
$unitCost
Unit cost of the line item.
Money object containing amount and currency code.
$updated
public
DateTimeImmutable
$updated
The time of last modification.
$exceptKeys
protected
array<string|int, mixed>
$exceptKeys
= ['amount', 'taxNumber1', 'taxNumber2', 'updated']