ModelShipping module

Rate

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

Shipping\Models\Frontend\Rate Shipping\Models\Api\Rate Shipping\Models\Backend\Rate Also in Shipping: BaseMethod Category Group Location MethodZoneRule Shipment ShipmentLog TemplateMethod Zone
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 18

Take no arguments.

# getTaxAsMoney()
Money
Gets the shipping tax amount as a Money object. Represents the tax calculated on the shipping value.
# getTotalAsMoney()
Money
Gets the total amount as a Money object. Represents the shipping value excluding tax — the taxable base sent to the tax provider, not a tax-inclusive grand total.
# getId()
?int
# getName()
?string
# getServiceLevel()
?string
# getCourierName()
?string
# getTax()
?string
Represents the tax calculated on the shipping value.
# getTotal()
?string
Represents the shipping value excluding tax — the taxable base sent to the tax provider, not a tax-inclusive grand total.
# getEstimatedDelivery()
?DateTime
# getCreated()
?DateTime
Date the record was created.
# getExpiry()
?DateTime
# isExpired()
bool
Checks if the rate is expired.
# getCurrency()
?Currency
# getFulfillment()
?Fulfillment
# getMethod()
?BaseMethod
# 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 15

Read-only values on the record.

# taxAsMoney
Money
Gets the shipping tax amount as a Money object. Represents the tax calculated on the shipping value.
# totalAsMoney
Money
Gets the total amount as a Money object. Represents the shipping value excluding tax — the taxable base sent to the tax provider, not a tax-inclusive grand total.
# id
?int
# name
?string
# serviceLevel
?string
# courierName
?string
# tax
?string
Represents the tax calculated on the shipping value.
# total
?string
Represents the shipping value excluding tax — the taxable base sent to the tax provider, not a tax-inclusive grand total.
# estimatedDelivery
?DateTime
# created
?DateTime
Date the record was created.
# expiry
?DateTime
# expired
bool
Checks if the rate is expired.
# currency
?Currency
# fulfillment
?Fulfillment
# method
?BaseMethod

Admin view

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

Properties 18

Take no arguments.

# getTaxAsMoney()
Money
Gets the shipping tax amount as a Money object. Represents the tax calculated on the shipping value.
# getTotalAsMoney()
Money
Gets the total amount as a Money object. Represents the shipping value excluding tax — the taxable base sent to the tax provider, not a tax-inclusive grand total.
# getId()
?int
# getName()
?string
# getServiceLevel()
?string
# getCourierName()
?string
# getTax()
?string
Represents the tax calculated on the shipping value.
# getTotal()
?string
Represents the shipping value excluding tax — the taxable base sent to the tax provider, not a tax-inclusive grand total.
# getEstimatedDelivery()
?DateTime
# getCreated()
?DateTime
Date the record was created.
# getExpiry()
?DateTime
# isExpired()
bool
Checks if the rate is expired.
# getCurrency()
?Currency
# getFulfillment()
?Fulfillment
# getMethod()
?BaseMethod
# 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