ModelHooks module
ShippingBatchEvent
Event of a shipping method job: the Request Job runs before the method creates the rates of a fulfillment, the Response Job after
A model in the Hooks module, with 21 members for templates, 18 API properties and 21 members for admin templates.
Templates view
Properties 21
Take no arguments.
-
#
getType() -
string - Gets the type of the event causing the hook execution. Always returns 'shipping' for shipping method jobs.
-
#
getFulfillment() -
?Fulfillment - Gets the fulfillment the shipping method creates the rates for. During the run it is the fulfillment of the checkout being built, which is not saved yet. Later, e.g. in the batch log, it is loaded by id, and it is null when the fulfillment was never saved.
-
#
getCheckout() -
?BaseOrder - Gets the checkout the rates are created for. Null in the batch log once the checkout became an order.
-
#
getDataDisplay() -
string - Gets a string representation of the stage, the shipping method and the checkout for the batch table
-
#
getStage() -
?string - Gets the stage of the shipping method the job runs at:
requestbefore the method creates its rates,responseafter -
#
getFulfillmentId() -
?int - Gets the id of the fulfillment the rates are created for. Null while the checkout is being built, as the fulfillment is not saved yet.
-
#
getRequestData() -
array - Gets the request the method is about to send, which the Request Job may change. Empty for a method without a carrier request, e.g. the Template method, and in the response stage.
-
#
getRates() -
array - Gets the rate list the method offers, as plain entries with
name,serviceLevel,courierName,amount,surcharge,estimatedDeliveryanddata, in the order the job refers to them by index. Empty in the request stage. -
#
getId() -
?int -
#
isHierarchicalModel()Not in API & Jobs -
bool - Check whether a model is a hierarchical model, i.e. can have children
No members match the filter.
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.
-
#
type -
string - Gets the type of the event causing the hook execution. Always returns 'shipping' for shipping method jobs.
-
#
fulfillment -
?Fulfillment - Gets the fulfillment the shipping method creates the rates for. During the run it is the fulfillment of the checkout being built, which is not saved yet. Later, e.g. in the batch log, it is loaded by id, and it is null when the fulfillment was never saved.
-
#
checkout -
?BaseOrder - Gets the checkout the rates are created for. Null in the batch log once the checkout became an order.
-
#
dataDisplay -
string - Gets a string representation of the stage, the shipping method and the checkout for the batch table
-
#
stage -
?string - Gets the stage of the shipping method the job runs at:
requestbefore the method creates its rates,responseafter -
#
fulfillmentId -
?int - Gets the id of the fulfillment the rates are created for. Null while the checkout is being built, as the fulfillment is not saved yet.
-
#
requestData -
array - Gets the request the method is about to send, which the Request Job may change. Empty for a method without a carrier request, e.g. the Template method, and in the response stage.
-
#
rates -
array - Gets the rate list the method offers, as plain entries with
name,serviceLevel,courierName,amount,surcharge,estimatedDeliveryanddata, in the order the job refers to them by index. Empty in the request stage. -
#
id -
?int
No members match the filter.
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.
-
#
getType() -
string - Gets the type of the event causing the hook execution. Always returns 'shipping' for shipping method jobs.
-
#
getFulfillment() -
?Fulfillment - Gets the fulfillment the shipping method creates the rates for. During the run it is the fulfillment of the checkout being built, which is not saved yet. Later, e.g. in the batch log, it is loaded by id, and it is null when the fulfillment was never saved.
-
#
getCheckout() -
?BaseOrder - Gets the checkout the rates are created for. Null in the batch log once the checkout became an order.
-
#
getDataDisplay() -
string - Gets a string representation of the stage, the shipping method and the checkout for the batch table
-
#
getStage() -
?string - Gets the stage of the shipping method the job runs at:
requestbefore the method creates its rates,responseafter -
#
getFulfillmentId() -
?int - Gets the id of the fulfillment the rates are created for. Null while the checkout is being built, as the fulfillment is not saved yet.
-
#
getRequestData() -
array - Gets the request the method is about to send, which the Request Job may change. Empty for a method without a carrier request, e.g. the Template method, and in the response stage.
-
#
getRates() -
array - Gets the rate list the method offers, as plain entries with
name,serviceLevel,courierName,amount,surcharge,estimatedDeliveryanddata, in the order the job refers to them by index. Empty in the request stage. -
#
getId() -
?int -
#
isHierarchicalModel()Not in API & Jobs -
bool - Check whether a model is a hierarchical model, i.e. can have children
No members match the filter.