ModelInvoices module

Refund

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

Invoices\Models\Frontend\Refund Invoices\Models\Api\Refund Invoices\Models\Backend\Refund Also in Invoices: Invoice InvoiceCustomFieldValue Item MockPayPaymentMethod PayPalDonatePaymentMethod PayPalPaymentMethod RefundItem 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 36

Take no arguments.

# getCurrency()
Currency
Get the currency
# getItemTotalAsMoney()
Money
Gets the item total as a Money object. Represents the sum of all items' Amount values.
# getShippingTotalAsMoney()
Money
Gets the shipping total as a Money object. Represents the net shipping total. Tax and discount on shipping are tracked in Tax Total and Discount Total.
# getHandlingTotalAsMoney()
Money
Gets the handling total as a Money object. Represents the net handling total. Tax and discount on handling are tracked in Tax Total and Discount Total.
# getInsuranceTotalAsMoney()
Money
Gets the insurance total as a Money object. Represents the net insurance total. Tax and discount on insurance are tracked in Tax Total and Discount Total.
# getDiscountTotalAsMoney()
Money
Gets the discount total as a Money object. Represents the sum of discount values across all line items, including shipping, handling, etc.
# getTaxTotalAsMoney()
Money
Gets the tax total as a Money object. Represents the sum of tax values across all line items, including shipping, handling, etc.
# getSurchargeTotalAsMoney()
Money
Gets the surcharge total as a Money object. Represents the surcharge total.
# getAdjustmentTotalAsMoney()
Money
Gets the adjustment total as a Money object. Represents a manual financial adjustment (positive or negative).
# getTotalExcludingAdjustmentAsMoney()
Money
Gets the total excluding adjustment as a Money object. Represents the grand total minus the adjustment total.
# getTotalAsMoney()
Money
Gets the grand total as a Money object. Represents the final value calculated as Item Total + Shipping Total + Handling Total + Insurance Total - Discount Total + Tax Total + Surcharge Total + Adjustment Total.
# isFullRefund()
bool
Returns whether the refund is a full refund
# getErrorMessage()
?string
Get the error message if the refund failed
# getId()
?int
# getStatus()
?string
# getItemTotal()
?string
Represents the sum of all items' Amount values.
# getShippingTotal()
?string
Represents the net shipping total. Tax and discount on shipping are tracked in Tax Total and Discount Total.
# getHandlingTotal()
?string
Represents the net handling total. Tax and discount on handling are tracked in Tax Total and Discount Total.
# getInsuranceTotal()
?string
Represents the net insurance total. Tax and discount on insurance are tracked in Tax Total and Discount Total.
# getDiscountTotal()
?string
Represents the sum of discount values across all line items, including shipping, handling, etc.
# getTaxTotal()
?string
Represents the sum of tax values across all line items, including shipping, handling, etc.
# getSurchargeTotal()
?string
Represents the surcharge total.
# getAdjustmentTotal()
?string
Represents a manual financial adjustment (positive or negative).
# getTotal()
?string
Represents the final value calculated as Item Total + Shipping Total + Handling Total + Insurance Total - Discount Total + Tax Total + Surcharge Total + Adjustment Total.
# getReason()
?string
# getExternalId()
?string
# getCreated()
?DateTime
Date the record was created.
# getModified()
?DateTime
Last modification date for the record.
# getRefunded()
?DateTime
# getTransaction()
?Transaction
# getInvoice()
?Invoice
# getCreatedBy()
?User
# getRefundItems()
?Collection<RefundItem>
# 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 33

Read-only values on the record.

# currency
Currency
Get the currency
# itemTotalAsMoney
Money
Gets the item total as a Money object. Represents the sum of all items' Amount values.
# shippingTotalAsMoney
Money
Gets the shipping total as a Money object. Represents the net shipping total. Tax and discount on shipping are tracked in Tax Total and Discount Total.
# handlingTotalAsMoney
Money
Gets the handling total as a Money object. Represents the net handling total. Tax and discount on handling are tracked in Tax Total and Discount Total.
# insuranceTotalAsMoney
Money
Gets the insurance total as a Money object. Represents the net insurance total. Tax and discount on insurance are tracked in Tax Total and Discount Total.
# discountTotalAsMoney
Money
Gets the discount total as a Money object. Represents the sum of discount values across all line items, including shipping, handling, etc.
# taxTotalAsMoney
Money
Gets the tax total as a Money object. Represents the sum of tax values across all line items, including shipping, handling, etc.
# surchargeTotalAsMoney
Money
Gets the surcharge total as a Money object. Represents the surcharge total.
# adjustmentTotalAsMoney
Money
Gets the adjustment total as a Money object. Represents a manual financial adjustment (positive or negative).
# totalExcludingAdjustmentAsMoney
Money
Gets the total excluding adjustment as a Money object. Represents the grand total minus the adjustment total.
# totalAsMoney
Money
Gets the grand total as a Money object. Represents the final value calculated as Item Total + Shipping Total + Handling Total + Insurance Total - Discount Total + Tax Total + Surcharge Total + Adjustment Total.
# fullRefund
bool
Returns whether the refund is a full refund
# errorMessage
?string
Get the error message if the refund failed
# id
?int
# status
?string
# itemTotal
?string
Represents the sum of all items' Amount values.
# shippingTotal
?string
Represents the net shipping total. Tax and discount on shipping are tracked in Tax Total and Discount Total.
# handlingTotal
?string
Represents the net handling total. Tax and discount on handling are tracked in Tax Total and Discount Total.
# insuranceTotal
?string
Represents the net insurance total. Tax and discount on insurance are tracked in Tax Total and Discount Total.
# discountTotal
?string
Represents the sum of discount values across all line items, including shipping, handling, etc.
# taxTotal
?string
Represents the sum of tax values across all line items, including shipping, handling, etc.
# surchargeTotal
?string
Represents the surcharge total.
# adjustmentTotal
?string
Represents a manual financial adjustment (positive or negative).
# total
?string
Represents the final value calculated as Item Total + Shipping Total + Handling Total + Insurance Total - Discount Total + Tax Total + Surcharge Total + Adjustment Total.
# reason
?string
# externalId
?string
# created
?DateTime
Date the record was created.
# modified
?DateTime
Last modification date for the record.
# refunded
?DateTime
# transaction
?Transaction
# invoice
?Invoice
# createdBy
?User
# refundItems
?Collection<RefundItem>

Admin view

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

Properties 36

Take no arguments.

# getCurrency()
Currency
Get the currency
# getItemTotalAsMoney()
Money
Gets the item total as a Money object. Represents the sum of all items' Amount values.
# getShippingTotalAsMoney()
Money
Gets the shipping total as a Money object. Represents the net shipping total. Tax and discount on shipping are tracked in Tax Total and Discount Total.
# getHandlingTotalAsMoney()
Money
Gets the handling total as a Money object. Represents the net handling total. Tax and discount on handling are tracked in Tax Total and Discount Total.
# getInsuranceTotalAsMoney()
Money
Gets the insurance total as a Money object. Represents the net insurance total. Tax and discount on insurance are tracked in Tax Total and Discount Total.
# getDiscountTotalAsMoney()
Money
Gets the discount total as a Money object. Represents the sum of discount values across all line items, including shipping, handling, etc.
# getTaxTotalAsMoney()
Money
Gets the tax total as a Money object. Represents the sum of tax values across all line items, including shipping, handling, etc.
# getSurchargeTotalAsMoney()
Money
Gets the surcharge total as a Money object. Represents the surcharge total.
# getAdjustmentTotalAsMoney()
Money
Gets the adjustment total as a Money object. Represents a manual financial adjustment (positive or negative).
# getTotalExcludingAdjustmentAsMoney()
Money
Gets the total excluding adjustment as a Money object. Represents the grand total minus the adjustment total.
# getTotalAsMoney()
Money
Gets the grand total as a Money object. Represents the final value calculated as Item Total + Shipping Total + Handling Total + Insurance Total - Discount Total + Tax Total + Surcharge Total + Adjustment Total.
# isFullRefund()
bool
Returns whether the refund is a full refund
# getErrorMessage()
?string
Get the error message if the refund failed
# getId()
?int
# getStatus()
?string
# getItemTotal()
?string
Represents the sum of all items' Amount values.
# getShippingTotal()
?string
Represents the net shipping total. Tax and discount on shipping are tracked in Tax Total and Discount Total.
# getHandlingTotal()
?string
Represents the net handling total. Tax and discount on handling are tracked in Tax Total and Discount Total.
# getInsuranceTotal()
?string
Represents the net insurance total. Tax and discount on insurance are tracked in Tax Total and Discount Total.
# getDiscountTotal()
?string
Represents the sum of discount values across all line items, including shipping, handling, etc.
# getTaxTotal()
?string
Represents the sum of tax values across all line items, including shipping, handling, etc.
# getSurchargeTotal()
?string
Represents the surcharge total.
# getAdjustmentTotal()
?string
Represents a manual financial adjustment (positive or negative).
# getTotal()
?string
Represents the final value calculated as Item Total + Shipping Total + Handling Total + Insurance Total - Discount Total + Tax Total + Surcharge Total + Adjustment Total.
# getReason()
?string
# getExternalId()
?string
# getCreated()
?DateTime
Date the record was created.
# getModified()
?DateTime
Last modification date for the record.
# getRefunded()
?DateTime
# getTransaction()
?Transaction
# getInvoice()
?Invoice
# getCreatedBy()
?User
# getRefundItems()
?Collection<RefundItem>
# 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