Members
-
componentName :string
-
Description
A name that identifies the component. Use the name to register a new component and get a component implementation with BackendComponentContainer.
Details
Methods
-
addLine( data ) → {Deferred}
-
Description
This method has been deprecated. Use methods in the frontend extensibility API, or SuiteScript 2.0 methods instead.
Adds a new line to the cart. Returns a Deferred object. If the promise is resolved, the line is added to the cart. If the promise is rejected, it returns an error.
Parameters
Name Type Description dataObject A Line object.
Returns
Details
-
extend( componentDefinition ) → {BackendBaseComponent}
-
Description
Extends the current component and returns a child component.
Parameters
Name Type Description componentDefinitionObject Any object that has properties and methods.
Returns
Details
-
cancelableOn( event_name, handler ) → {void}
-
Description
Attaches an event handler to an event.
Parameters
Name Type Description event_nameString The event name that the handler will be attached to.
handlerfunction The event handler (function) that will be invoked when event_name is triggered. The event handler can accept one optional callback parameter. The event handler can return a Deferred object, which if resolved, executes the callback function. If the promise is rejected, the callback function does not execute.
Returns
Details
-
on( event_name, handler ) → {void}
-
Description
Attaches an event handler to an event name. Alias for BackendCancelableEvents#cancelableOn.
Parameters
Name Type Description event_namestring The event name that the handler will be attached to.
handlerfunction The event handler (function) that will be invoked when event_name is triggered. The event handler can accept one optional callback parameter. The event handler can return a Deferred object, which if resolved, executes the callback function. If the promise is rejected, the callback function does not execute.
Returns
Details
-
addLineSync( data ) → {String}
-
Description
This method has been deprecated. Use methods in the frontend extensibility API, or SuiteScript 2.0 methods instead.
The synchronous version of addLine.
Parameters
Name Type Description dataObject Returns
Details
-
off( event_name, handler ) → {void}
-
Description
Detaches an event handler from an event name. Alias for BackendCancelableEvents#cancelableOff.
Parameters
Name Type Description event_namestring The event name that the handler will be detached from. Optional.
handlerfunction The event handler (function) that will be removed from the list of registered handlers.
Returns
Details
-
cancelableOff( event_name, handler ) → {void}
-
Description
Detaches an event handler from an event.
Parameters
Name Type Description event_nameString The event name that the handler will be detached from. This argument is required.
handlerfunction The event handler (function) that will be removed from the list of registered handlers. This argument is required.
Returns
Details
-
addLines( lines ) → {Deferred}
-
Description
This method has been deprecated. Use methods in the frontend extensibility API, or SuiteScript 2.0 methods instead.
Adds multiple lines to the cart. Returns a Deferered object. If the object is resolved, the lines (as an array of strings) are added to the cart. If the object is rejected, it returns an error.
Parameters
Name Type Description linesObject Returns
Details
-
cancelableDisable( event_name ) → {void}
-
Description
Disables all event handlers attached to an event.
Parameters
Name Type Description event_nameString The name of the event for which event handlers will be disabled.
Returns
Details
-
addLinesSync( lines ) → {Array.<String>}
-
Description
This method has been deprecated. Use methods in the frontend extensibility API, or SuiteScript 2.0 methods instead.
The synchronous version of addLines.
Parameters
Name Type Description linesObject Returns
-
cancelableEnable( event_name ) → {Void}
-
Description
Re-enables all event handlers attached to an event.
Parameters
Name Type Description event_nameString The name of the event for which event handlers will be re-enabled.
Returns
Details
-
getLines() → {Deferred}
-
Description
This method has been deprecated. Use methods in the frontend extensibility API, or SuiteScript 2.0 methods instead.
Gets the lines in the cart and returns a Deferred object. If the promise is resolved, it returns an array of Line objects. If the promise is rejected, it returns an error.
Returns
-
cancelableTrigger( event_name, ...args ) → {Deferred}
-
Description
Triggers an event with one or more arguments. If any of the event handlers associated with the event are rejected, callbacks will not be executed.
Parameters
Name Type Attributes Description event_nameString The name of the event to trigger.
argsparams <repeatable> Any arguments to be passed to all event handlers attached to the event.
Returns
Details
-
getLinesSync() → {Array.<Line>}
-
Description
This method has been deprecated. Use methods in the frontend extensibility API, or SuiteScript 2.0 methods instead.
Synchronous version of BackendCartComponent#getLines.
Returns
-
cancelableTriggerUnsafe( event_name, ...args ) → {Deferred}
-
Description
Triggers an event with one or more unsanitized arguments. If any of the event handlers associated with the event are rejected, callbacks will not be executed.
Parameters
Name Type Attributes Description event_nameString The name of the event to trigger.
argsparams <repeatable> Any arguments to be passed to all event handlers attached to the event.
Returns
Details
-
removeLine( internalid ) → {Deferred}
-
Description
This method has been deprecated. Use methods in the frontend extensibility API, or SuiteScript 2.0 methods instead.
Removes a line from the cart. Returns a Deferred that is resolved in the case the operation was done successfully or rejected with an error message.
Parameters
Name Type Description internalidString id of the line to remove
Returns
-
removeLineSync() → {undefined|string}
-
Description
This method has been deprecated. Use methods in the frontend extensibility API, or SuiteScript 2.0 methods instead.
Synchronous version of BackendCartComponent#removeLine.
Returns
-
updateLine( line ) → {Deferred}
-
Description
This method has been deprecated. Use methods in the frontend extensibility API, or SuiteScript 2.0 methods instead.
Updates a cart's line. Returns a Deferred that is resolved with Line in the case the operation was done successfully,
or rejected with an error message.Parameters
Name Type Description lineLine Returns
-
updateLineSync( line ) → {Line|string}
-
Description
This method has been deprecated. Use methods in the frontend extensibility API, or SuiteScript 2.0 methods instead.
Synchronous version of BackendCartComponent#updateLine.
Parameters
Name Type Description lineObject Returns
-
getSummary() → {Deferred}
-
Description
This method has been deprecated. Use methods in the frontend extensibility API, or SuiteScript 2.0 methods instead.
Returns the summary of the cart as a Deferred that is resolved with a Summary in the case the operation was done successfully or
rejected with an error message.Returns
-
getSummarySync() → {Summary}
-
Description
This method has been deprecated. Use methods in the frontend extensibility API, or SuiteScript 2.0 methods instead.
Synchronous version of BackendCartComponent#getSummary.
Returns
-
submit() → {Deferred}
-
Description
This method has been deprecated. Use methods in the frontend extensibility API, or SuiteScript 2.0 methods instead.
Submits the order. Returns a Deferred that is resolved with a ConfirmationSubmit object in the case
the operation was done successfully, or rejected with an error message.Returns
-
submitSync() → {ConfirmationSubmit}
-
Description
This method has been deprecated. Use methods in the frontend extensibility API, or SuiteScript 2.0 methods instead.
Synchronous version of BackendCartComponent#submitSync.
Returns
-
addPayment()
-
Description
This method has been deprecated. Use methods in the frontend extensibility API, or SuiteScript 2.0 methods instead.
Adds a payment method
-
addPaymentSync()
-
Description
This method has been deprecated. Use methods in the frontend extensibility API, or SuiteScript 2.0 methods instead.
Synchronous version of BackendCartComponent#addPayment.
-
getPaymentMethods() → {Deferred}
-
Description
This method has been deprecated. Use methods in the frontend extensibility API, or SuiteScript 2.0 methods instead.
Returns the payment methods added to the order
Returns
-
getPaymentMethodsSync()
-
Description
This method has been deprecated. Use methods in the frontend extensibility API, or SuiteScript 2.0 methods instead.
Synchronous version of BackendCartComponent#addPayment.
-
addPromotion( the )
-
Description
This method has been deprecated. Use methods in the frontend extensibility API, or SuiteScript 2.0 methods instead.
Adds a promotion
Parameters
Name Type Description theObject promocode to add
-
addPromotionSync()
-
Description
This method has been deprecated. Use methods in the frontend extensibility API, or SuiteScript 2.0 methods instead.
Synchronous version of BackendCartComponent#addPromotion.
-
removePromotion( data ) → {Deferred}
-
Description
This method has been deprecated. Use methods in the frontend extensibility API, or SuiteScript 2.0 methods instead.
Removes a promotion.
Parameters
Name Type Description dataObject Returns
-
removePromotionSync()
-
Description
This method has been deprecated. Use methods in the frontend extensibility API, or SuiteScript 2.0 methods instead.
Synchronous version of BackendCartComponent#removePromotion.
-
getPromotions() → {Deferred}
-
Description
This method has been deprecated. Use methods in the frontend extensibility API, or SuiteScript 2.0 methods instead.
Returns the promotion codes added to the cart.
Returns
-
getPromotionsSync()
-
Description
This method has been deprecated. Use methods in the frontend extensibility API, or SuiteScript 2.0 methods instead.
Synchronous version of BackendCartComponent#getPromotions.
-
estimateShipping( locationData )
-
Description
This method has been deprecated. Use methods in the frontend extensibility API, or SuiteScript 2.0 methods instead.
Returns the estimated shipping costs.
Parameters
Name Type Description locationDataObject -
estimateShippingSync()
-
Description
This method has been deprecated. Use methods in the frontend extensibility API, or SuiteScript 2.0 methods instead.
Synchronous version of BackendCartComponent#estimateShipping.
-
removeShipping()
-
Description
This method has been deprecated. Use methods in the frontend extensibility API, or SuiteScript 2.0 methods instead.
Removes the shipping method
-
removeShippingSync()
-
Description
This method has been deprecated. Use methods in the frontend extensibility API, or SuiteScript 2.0 methods instead.
Synchronous version of BackendCartComponent#removeShipping.
-
clearEstimateShipping()
-
Description
This method has been deprecated. Use methods in the frontend extensibility API, or SuiteScript 2.0 methods instead.
Clears the shopping estimations in the cart.
-
clearEstimateShippingSync()
-
Description
This method has been deprecated. Use methods in the frontend extensibility API, or SuiteScript 2.0 methods instead.
Synchronous version of BackendCartComponent#clearEstimateShipping.
-
getAddresses() → {Deferred}
-
Description
This method has been deprecated. Use methods in the frontend extensibility API, or SuiteScript 2.0 methods instead.
Returns the addresses of the order.
Returns
-
getAddressesSync()
-
Description
This method has been deprecated. Use methods in the frontend extensibility API, or SuiteScript 2.0 methods instead.
Synchronous version of BackendCartComponent#getAddresses.
-
getShipAddress() → {Deferred}
-
Description
This method has been deprecated. Use methods in the frontend extensibility API, or SuiteScript 2.0 methods instead.
Returns the shipping address of the order.
Returns
-
getShipAddressSync()
-
Description
This method has been deprecated. Use methods in the frontend extensibility API, or SuiteScript 2.0 methods instead.
Synchronous version of BackendCartComponent#getShipAddress.
-
getBillAddress() → {Deferred}
-
Description
This method has been deprecated. Use methods in the frontend extensibility API, or SuiteScript 2.0 methods instead.
Returns the billing address of the order
Returns
-
getBillAddressSync()
-
Description
This method has been deprecated. Use methods in the frontend extensibility API, or SuiteScript 2.0 methods instead.
Synchronous version of BackendCartComponent#getBillAddress.
-
getShipMethods() → {Deferred}
-
Description
This method has been deprecated. Use methods in the frontend extensibility API, or SuiteScript 2.0 methods instead.
Returns the ship methods of the order.
Returns
-
getShipMethodsSync()
-
Description
This method has been deprecated. Use methods in the frontend extensibility API, or SuiteScript 2.0 methods instead.
Synchronous version of BackendCartComponent#getShipMethods.
-
getShipMethod() → {Deferred}
-
Description
This method has been deprecated. Use methods in the frontend extensibility API, or SuiteScript 2.0 methods instead.
Returns the selected shipping method of the order.
Returns
-
getShipMethodSync()
-
Description
This method has been deprecated. Use methods in the frontend extensibility API, or SuiteScript 2.0 methods instead.
Synchronous version of BackendCartComponent#getShipMethod.
-
voidLine()
-
Description
This method has been deprecated. Use methods in the frontend extensibility API, or SuiteScript 2.0 methods instead.
Voids a line. Implemented only for SCIS.
-
voidLineSync()
-
Description
This method has been deprecated. Use methods in the frontend extensibility API, or SuiteScript 2.0 methods instead.
Synchronous version of BackendCartComponent#voidLine.
-
unvoidLine()
-
Description
This method has been deprecated. Use methods in the frontend extensibility API, or SuiteScript 2.0 methods instead.
Unvoids a line. Implemented only for SCIS.
-
unvoidLineSync()
-
Description
This method has been deprecated. Use methods in the frontend extensibility API, or SuiteScript 2.0 methods instead.
Synchronous version of BackendCartComponent#unvoidLine.
-
updateCustomer()
-
Description
This method has been deprecated. Use methods in the frontend extensibility API, or SuiteScript 2.0 methods instead.
Updates a customer data. Implemented only for SCIS.
-
updateCustomerSync()
-
Description
This method has been deprecated. Use methods in the frontend extensibility API, or SuiteScript 2.0 methods instead.
Synchronous version of BackendCartComponent#updateCustomer.
Events
-
beforeUpdateLine
-
Description
Cancelable event triggered before a cart's line is updated. See BackendCancelableEvents
Properties
Type Description boolean -
afterUpdateLine
-
Description
Triggered after a cart's line is updated See
Properties
Type Description boolean -
beforeRemoveLine
-
Description
Cancelable event triggered before a cart's line is removed. See BackendCancelableEvents
Properties
Type Description boolean -
afterRemoveLine
-
Description
Triggered after a cart's line is removed
Properties
Type Description boolean -
beforeEstimateShipping
-
Description
Cancelable event triggered before doing an estimate shipping in the cart. See BackendCancelableEvents
Properties
Type Description boolean -
afterEstimateShipping
-
Description
Triggered after an estimate shipping is done in the cart
Properties
Type Description boolean -
beforeClearEstimateShipping
-
Description
Cancelable event triggered before clearing an estimate shipping in the cart. See BackendCancelableEvents
Properties
Type Description boolean -
afterClearEstimateShipping
-
Description
Triggered after an estimate shipping is cleared in the cart
Properties
Type Description boolean -
beforeAddPromotion
-
Description
Triggered before a promotion is added to the cart. See BackendCancelableEvents
Properties
Type Description boolean -
afterAddPromotion
-
Description
Triggered before a promotion is added to the cart
Properties
Type Description boolean -
beforeRemovePromotion
-
Description
Triggered before a promocode is removed from the cart. See BackendCancelableEvents
Properties
Type Description boolean -
afterRemovePromotion
-
Description
Triggered after a promocode is removed from the cart
Properties
Type Description boolean -
beforeAddPayment
-
Description
Triggered before a payment method is added to the order. See BackendCancelableEvents
Properties
Type Description boolean -
afterAddPayment
-
Description
Triggered after a payment method is added to the order
Properties
Type Description boolean -
beforeSubmit
-
Description
Triggered before the order is submitted. See BackendCancelableEvents
Properties
Type Description boolean -
afterSubmit
-
Description
Triggered after the order is submitted
Properties
Type Description boolean -
beforeAddLine
-
Description
Cancelable event triggered before adding a new cart's line. See BackendCancelableEvents
Properties
Type Description boolean -
afterAddLine
-
Description
Triggered after a new line is added in the cart
Properties
Type Description boolean