ModelInvoices module

Transaction

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

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

Take no arguments.

# getCurrency()
Currency
Gets the currency of the transaction (from its invoice).
# getAmountAsMoney()
Money
Gets the amount as a Money object. Represents the raw transaction amount.
# getAuthorizedAmountAsMoney()
Money
Gets the authorized amount as a Money object. Represents the total authorized by this transaction and its children, minus any amounts that were subsequently voided or captured.
# getCapturedAmountAsMoney()
Money
Gets the captured amount as a Money object. Represents the total captured by this transaction and its children, minus any amounts that were subsequently refunded.
# getVoidedAmountAsMoney()
Money
Gets the voided amount as a Money object. Represents the total voided by this transaction and its children.
# getRefundedAmountAsMoney()
Money
Gets the refunded amount as a Money object. Represents the total refunded by this transaction and its children.
# getErrorMessage()
?string
Get the error message from the transaction data if it exists.
# getId()
?int
# getType()
?string
# getStatus()
?string
# getAmount()
?string
# getData()
?array
# getCreated()
?DateTime
Date the record was created.
# getInvoice()
?Invoice
# getParent()
?Transaction
# getChildren()
?Collection<Transaction>
# getExternalId()
?string
# 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 17

Read-only values on the record.

# currency
Currency
Gets the currency of the transaction (from its invoice).
# amountAsMoney
Money
Gets the amount as a Money object. Represents the raw transaction amount.
# authorizedAmountAsMoney
Money
Gets the authorized amount as a Money object. Represents the total authorized by this transaction and its children, minus any amounts that were subsequently voided or captured.
# capturedAmountAsMoney
Money
Gets the captured amount as a Money object. Represents the total captured by this transaction and its children, minus any amounts that were subsequently refunded.
# voidedAmountAsMoney
Money
Gets the voided amount as a Money object. Represents the total voided by this transaction and its children.
# refundedAmountAsMoney
Money
Gets the refunded amount as a Money object. Represents the total refunded by this transaction and its children.
# errorMessage
?string
Get the error message from the transaction data if it exists.
# id
?int
# type
?string
# status
?string
# amount
?string
# data
?array
# created
?DateTime
Date the record was created.
# invoice
?Invoice
# parent
?Transaction
# children
?Collection<Transaction>
# externalId
?string

Admin view

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

Properties 20

Take no arguments.

# getCurrency()
Currency
Gets the currency of the transaction (from its invoice).
# getAmountAsMoney()
Money
Gets the amount as a Money object. Represents the raw transaction amount.
# getAuthorizedAmountAsMoney()
Money
Gets the authorized amount as a Money object. Represents the total authorized by this transaction and its children, minus any amounts that were subsequently voided or captured.
# getCapturedAmountAsMoney()
Money
Gets the captured amount as a Money object. Represents the total captured by this transaction and its children, minus any amounts that were subsequently refunded.
# getVoidedAmountAsMoney()
Money
Gets the voided amount as a Money object. Represents the total voided by this transaction and its children.
# getRefundedAmountAsMoney()
Money
Gets the refunded amount as a Money object. Represents the total refunded by this transaction and its children.
# getErrorMessage()
?string
Get the error message from the transaction data if it exists.
# getId()
?int
# getType()
?string
# getStatus()
?string
# getAmount()
?string
# getData()
?array
# getCreated()
?DateTime
Date the record was created.
# getInvoice()
?Invoice
# getParent()
?Transaction
# getChildren()
?Collection<Transaction>
# getExternalId()
?string
# 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