new Discount()
- Source:
Methods
(static) Discount#getAmount() → {Null|Number}
Get the field value
Discount amount in fraction of currency unit (e.g. cents) based on currency fraction digits supported
- Source:
Returns:
must be a long integer
- Type
- Null | Number
(static) Discount#getApprover() → {Null|base.Reference}
Get the field value
The person that authorized a discount
- Source:
Returns:
- Type
- Null | base.Reference
(static) Discount#getDiscount() → {Null|base.Reference}
Get the field value
If this item is based on a standard discount, this will point to the appropriate inventory.Discount
- Source:
Returns:
- Type
- Null | base.Reference
(static) Discount#getId() → {String}
Get the field value
Unique identifier
- Source:
Returns:
- Type
- String
(static) Discount#getLineItemRef() → {Null|base.Reference}
Get the field value
The lineItem with which the discount is associated
- Source:
Returns:
- Type
- Null | base.Reference
(static) Discount#getName() → {String}
Get the field value
Name of the discount
- Source:
Returns:
- Type
- String
(static) Discount#getOrderRef() → {Null|base.Reference}
Get the field value
The order with which the discount is associated
- Source:
Returns:
- Type
- Null | base.Reference
(static) Discount#getPercentage() → {Null|Number}
Get the field value
Discount amount in percent
- Source:
Returns:
must be a long integer
- Type
- Null | Number
(static) Discount#setAmount(amount)
Set the field value
Discount amount in fraction of currency unit (e.g. cents) based on currency fraction digits supported
Parameters:
Name | Type | Description |
---|---|---|
amount |
Null | Number | must be a long integer |
- Source:
(static) Discount#setApprover(approver)
Set the field value
The person that authorized a discount
Parameters:
Name | Type | Description |
---|---|---|
approver |
Null | base.Reference |
- Source:
(static) Discount#setDiscount(discount)
Set the field value
If this item is based on a standard discount, this will point to the appropriate inventory.Discount
Parameters:
Name | Type | Description |
---|---|---|
discount |
Null | base.Reference |
- Source:
(static) Discount#setId(id)
Set the field value
Unique identifier
Parameters:
Name | Type | Description |
---|---|---|
id |
String |
- Source:
(static) Discount#setLineItemRef(lineItemRef)
Set the field value
The lineItem with which the discount is associated
Parameters:
Name | Type | Description |
---|---|---|
lineItemRef |
Null | base.Reference |
- Source:
(static) Discount#setName(name)
Set the field value
Name of the discount
Parameters:
Name | Type | Description |
---|---|---|
name |
String |
- Source:
(static) Discount#setOrderRef(orderRef)
Set the field value
The order with which the discount is associated
Parameters:
Name | Type | Description |
---|---|---|
orderRef |
Null | base.Reference |
- Source:
(static) Discount#setPercentage(percentage)
Set the field value
Discount amount in percent
Parameters:
Name | Type | Description |
---|---|---|
percentage |
Null | Number | must be a long integer |
- Source: