ModelInvoices module

RefundItem

A model in the Invoices module, with 19 members for templates, 16 API properties and 19 members for admin templates.

Invoices\Models\Frontend\RefundItem Invoices\Models\Api\RefundItem Invoices\Models\Backend\RefundItem Also in Invoices: Invoice InvoiceCustomFieldValue Item MockPayPaymentMethod PayPalDonatePaymentMethod PayPalPaymentMethod Refund StripePaymentMethod Transaction
View
What Smarty and Twig templates receive. Properties in REST API responses and job payloads. What admin screen templates receive when you override them.

Templates view

Properties 19

Take no arguments.

# getCurrency()
Currency
Get the currency
# getUnitAmountAsMoney()
Money
Gets the amount for a single unit (quantity = 1) as a Money object. Represents the value per unit before tax and discount are applied.
# getUnitDiscountAsMoney()
Money
Gets the discount for a single unit (quantity = 1) as a Money object. Represents the discount value per unit.
# getUnitTaxAsMoney()
Money
Gets the tax for a single unit (quantity = 1) as a Money object. Represents the tax value per unit.
# getUnitTotalAsMoney()
Money
Gets the total for a single unit (quantity = 1) as a Money object. Represents the final value per unit calculated as Unit Amount - Unit Discount + Unit Tax.
# getAmountAsMoney()
Money
Gets the amount for the entire quantity as a Money object. Represents the value before applying tax and discount (Unit Amount × Quantity).
# getDiscountAsMoney()
Money
Gets the discount for the entire quantity as a Money object. Represents the total discount applied (Unit Discount × Quantity).
# getTaxAsMoney()
Money
Gets the tax for the entire quantity as a Money object. Represents the total tax calculated (Unit Tax × Quantity).
# getTotalAsMoney()
Money
Gets the total for the entire quantity as a Money object. Represents the final value calculated as Amount - Discount + Tax.
# getId()
?int
# getQuantity()
?int
# getAmount()
?string
Represents the value before applying tax and discount (Unit Amount × Quantity).
# getDiscount()
?string
Represents the total discount applied (Unit Discount × Quantity).
# getTax()
?string
Represents the total tax calculated (Unit Tax × Quantity).
# getInvoiceItem()
?Item
# getRefund()
?Refund
# isNewRecord() Not in API & Jobs
bool
Check if the record is a new record
# isHierarchicalModel() Not in API & Jobs
bool
Check whether a model is a hierarchical model, i.e. can have children
# isVersionedModel() Not in API & Jobs
bool
Check whether a model is versioned

API & Jobs view

API & JobsEach property is a key in REST API responses and job payloads. Its name is the template getter without get, is or has. Methods that need arguments are not available here.

Properties 16

Read-only values on the record.

# currency
Currency
Get the currency
# unitAmountAsMoney
Money
Gets the amount for a single unit (quantity = 1) as a Money object. Represents the value per unit before tax and discount are applied.
# unitDiscountAsMoney
Money
Gets the discount for a single unit (quantity = 1) as a Money object. Represents the discount value per unit.
# unitTaxAsMoney
Money
Gets the tax for a single unit (quantity = 1) as a Money object. Represents the tax value per unit.
# unitTotalAsMoney
Money
Gets the total for a single unit (quantity = 1) as a Money object. Represents the final value per unit calculated as Unit Amount - Unit Discount + Unit Tax.
# amountAsMoney
Money
Gets the amount for the entire quantity as a Money object. Represents the value before applying tax and discount (Unit Amount × Quantity).
# discountAsMoney
Money
Gets the discount for the entire quantity as a Money object. Represents the total discount applied (Unit Discount × Quantity).
# taxAsMoney
Money
Gets the tax for the entire quantity as a Money object. Represents the total tax calculated (Unit Tax × Quantity).
# totalAsMoney
Money
Gets the total for the entire quantity as a Money object. Represents the final value calculated as Amount - Discount + Tax.
# id
?int
# quantity
?int
# amount
?string
Represents the value before applying tax and discount (Unit Amount × Quantity).
# discount
?string
Represents the total discount applied (Unit Discount × Quantity).
# tax
?string
Represents the total tax calculated (Unit Tax × Quantity).
# invoiceItem
?Item
# refund
?Refund

Admin view

AdminAvailable in cdna-admin templates. Copy an admin template into your site repository to change how this record is edited.

Properties 19

Take no arguments.

# getCurrency()
Currency
Get the currency
# getUnitAmountAsMoney()
Money
Gets the amount for a single unit (quantity = 1) as a Money object. Represents the value per unit before tax and discount are applied.
# getUnitDiscountAsMoney()
Money
Gets the discount for a single unit (quantity = 1) as a Money object. Represents the discount value per unit.
# getUnitTaxAsMoney()
Money
Gets the tax for a single unit (quantity = 1) as a Money object. Represents the tax value per unit.
# getUnitTotalAsMoney()
Money
Gets the total for a single unit (quantity = 1) as a Money object. Represents the final value per unit calculated as Unit Amount - Unit Discount + Unit Tax.
# getAmountAsMoney()
Money
Gets the amount for the entire quantity as a Money object. Represents the value before applying tax and discount (Unit Amount × Quantity).
# getDiscountAsMoney()
Money
Gets the discount for the entire quantity as a Money object. Represents the total discount applied (Unit Discount × Quantity).
# getTaxAsMoney()
Money
Gets the tax for the entire quantity as a Money object. Represents the total tax calculated (Unit Tax × Quantity).
# getTotalAsMoney()
Money
Gets the total for the entire quantity as a Money object. Represents the final value calculated as Amount - Discount + Tax.
# getId()
?int
# getQuantity()
?int
# getAmount()
?string
Represents the value before applying tax and discount (Unit Amount × Quantity).
# getDiscount()
?string
Represents the total discount applied (Unit Discount × Quantity).
# getTax()
?string
Represents the total tax calculated (Unit Tax × Quantity).
# getInvoiceItem()
?Item
# getRefund()
?Refund
# isNewRecord() Not in API & Jobs
bool
Check if the record is a new record
# isHierarchicalModel() Not in API & Jobs
bool
Check whether a model is a hierarchical model, i.e. can have children
# isVersionedModel() Not in API & Jobs
bool
Check whether a model is versioned