ModelOrders module

RefundItem

A model in the Orders module, with 21 members for templates, 18 API properties and 21 members for admin templates.

Orders\Models\Frontend\RefundItem Orders\Models\Api\RefundItem Orders\Models\Backend\RefundItem Also in Orders: MetadataField MetadataFieldValue Order Refund
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 21

Take no arguments.

# getCurrency()
Currency
Gets the currency of the item (from its refund).
# 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.
# getUnitTaxAsMoney()
Money
Gets the tax for a single unit (quantity = 1) as a Money object. Represents the tax value per unit.
# getUnitDiscountAsMoney()
Money
Gets the discount for a single unit (quantity = 1) as a Money object. Represents the discount 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 Tax - Unit Discount.
# getAmountAsMoney()
Money
Gets the amount for the entire quantity as a Money object. Represents the value before applying tax and discount (Unit Amount × Quantity).
# getTaxAsMoney()
Money
Gets the tax for the entire quantity as a Money object. Represents the total tax calculated (Unit Tax × Quantity).
# getDiscountAsMoney()
Money
Gets the discount for the entire quantity as a Money object. Represents the total discount applied (Unit Discount × Quantity).
# getTotalAsMoney()
Money
Gets the total for the entire quantity as a Money object. Represents the final value calculated as Amount + Tax - Discount.
# getType()
string
Returns the type of the refund item.
# getId()
?int
# getQuantity()
?int
The number of units purchased. Quantity of the item. Integer positive (not 0) number.
# getAmount()
?string
Represents the value before applying tax and discount (Unit Amount × Quantity).
# getTax()
?string
Represents the total tax calculated (Unit Tax × Quantity).
# getDiscount()
?string
Represents the total discount applied (Unit Discount × Quantity).
# getCreated()
?DateTime
Date the record was created.
# 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 18

Read-only values on the record.

# currency
Currency
Gets the currency of the item (from its refund).
# 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.
# unitTaxAsMoney
Money
Gets the tax for a single unit (quantity = 1) as a Money object. Represents the tax value per unit.
# unitDiscountAsMoney
Money
Gets the discount for a single unit (quantity = 1) as a Money object. Represents the discount 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 Tax - Unit Discount.
# amountAsMoney
Money
Gets the amount for the entire quantity as a Money object. Represents the value before applying tax and discount (Unit Amount × Quantity).
# taxAsMoney
Money
Gets the tax for the entire quantity as a Money object. Represents the total tax calculated (Unit Tax × Quantity).
# discountAsMoney
Money
Gets the discount for the entire quantity as a Money object. Represents the total discount applied (Unit Discount × Quantity).
# totalAsMoney
Money
Gets the total for the entire quantity as a Money object. Represents the final value calculated as Amount + Tax - Discount.
# type
string
Returns the type of the refund item.
# id
?int
# quantity
?int
The number of units purchased. Quantity of the item. Integer positive (not 0) number.
# amount
?string
Represents the value before applying tax and discount (Unit Amount × Quantity).
# tax
?string
Represents the total tax calculated (Unit Tax × Quantity).
# discount
?string
Represents the total discount applied (Unit Discount × Quantity).
# created
?DateTime
Date the record was created.
# 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 21

Take no arguments.

# getCurrency()
Currency
Gets the currency of the item (from its refund).
# 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.
# getUnitTaxAsMoney()
Money
Gets the tax for a single unit (quantity = 1) as a Money object. Represents the tax value per unit.
# getUnitDiscountAsMoney()
Money
Gets the discount for a single unit (quantity = 1) as a Money object. Represents the discount 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 Tax - Unit Discount.
# getAmountAsMoney()
Money
Gets the amount for the entire quantity as a Money object. Represents the value before applying tax and discount (Unit Amount × Quantity).
# getTaxAsMoney()
Money
Gets the tax for the entire quantity as a Money object. Represents the total tax calculated (Unit Tax × Quantity).
# getDiscountAsMoney()
Money
Gets the discount for the entire quantity as a Money object. Represents the total discount applied (Unit Discount × Quantity).
# getTotalAsMoney()
Money
Gets the total for the entire quantity as a Money object. Represents the final value calculated as Amount + Tax - Discount.
# getType()
string
Returns the type of the refund item.
# getId()
?int
# getQuantity()
?int
The number of units purchased. Quantity of the item. Integer positive (not 0) number.
# getAmount()
?string
Represents the value before applying tax and discount (Unit Amount × Quantity).
# getTax()
?string
Represents the total tax calculated (Unit Tax × Quantity).
# getDiscount()
?string
Represents the total discount applied (Unit Discount × Quantity).
# getCreated()
?DateTime
Date the record was created.
# 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