Skip to main content

Interface: GlobalPropertyTemplate

Methods​

applyToBundle()​

applyToBundle(bundle): Promise<void>

Applies this template to the provided Bundle.

If you want to apply this template to a new Bundle, call SpiffCommerceClient.getNewBundle, then call this function with your new Bundle.

Parameters​

bundle​

Bundle

Returns​

Promise<void>


delete()​

delete(): Promise<void>

Deletes this template from the server. Note that this object will no longer be valid for updates.

Returns​

Promise<void>


getAspects()​

getAspects(): GlobalPropertyStateAspect[]

Returns​

GlobalPropertyStateAspect[]


getCreatedDate()​

getCreatedDate(): Date

Returns the time this entity was created, as a new Date object.

Returns​

Date


getEditor()​

getEditor(autoUpdate?): GlobalPropertyTemplateEditor

Returns an object with interaction functionality for this template. Note that this function will always return the same reference.

Parameters​

autoUpdate?​

boolean

Providing false will require you to call GlobalPropertyTemplateEditor.save() to update the template. If you don't provide an input for this parameter, the current setting on the Editor will be retained.

Returns​

GlobalPropertyTemplateEditor


getGlobalPropertyConfiguration()​

getGlobalPropertyConfiguration(): GlobalPropertyConfiguration

Returns the Global Property Configuration used to create this template.

Returns​

GlobalPropertyConfiguration


getId()​

getId(): string

Returns the identifier for this template.

Returns​

string


getLocked()​

getLocked(): boolean

If the template is locked, customers may not edit but owning Partners can. When this is being presented to a customer, you should block changes to the template since any requests to change the template will be denied.

Returns​

boolean


getName()​

getName(): string

Returns the human-readable name for this template.

Returns​

string


getUpdatedDate()​

getUpdatedDate(): Date

Returns the time this entity was last updated, as a new Date object.

Returns​

Date


setName()​

setName(name): Promise<void>

Updates the template's name on the server.

Parameters​

name​

string

Returns​

Promise<void>


updateFromBundle()​

updateFromBundle(bundle): Promise<void>

Updates this template's values from the provided Bundle's Global Property State.

Parameters​

bundle​

Bundle

Returns​

Promise<void>


updateFromState()​

updateFromState(globalPropertyState): Promise<void>

Updates this template's values from the provided Global Property State. You will typically fetch this from Bundle.getGlobalPropertyStateManager().getGlobalPropertyState()

Parameters​

globalPropertyState​

GlobalPropertyState

Returns​

Promise<void>