Ripe

Ripe

Represents a customizable model.

Constructor

new Ripe(brand, model, options)

Source:
Parameters:
Name Type Description
brand String The brand of the model.
model String The name of the model.
options Object An object with the options to configure the Ripe instance.

Extends

  • Observable

Members

unbindConfigurator

Unbinds ab Configurator from this Ripe instance.
Source:

unbindImage

Unbinds ab Image from this Ripe instance.
Source:

Methods

_errorHandler(error)

The default fallback error handler to be used for every single detached async context.
Source:
Parameters:
Name Type Description
error Error The error that is going to be handled.

_handleCtx(result)

Handles the changes in the provided resulting context (ctx) changing the internal state and triggering relevant events.
Source:
Parameters:
Name Type Description
result Object The resulting ctx object that is going to be used in the changing of the internal state.

_toChoices(loadedConfig) → {Object}

Builds the choices structure that is going to control the state for parts materials and colors under the current customization session.
Source:
Parameters:
Name Type Description
loadedConfig Object The configuration structure that has just been loaded.
Returns:
Type:
Object
The state object that can be used to control the state of parts, materials and colors;

accountMe(options, callback) → {XMLHttpRequest}

Retrieves the complete set of account data to the current session.
Source:
Parameters:
Name Type Description
options Object An object of options to configure the request.
callback function Function with the result of the request.
Returns:
Type:
XMLHttpRequest
The XMLHttpRequest instance of the API request.

accountMeP(options, callback) → {Promise}

Retrieves the complete set of account data to the current session.
Source:
Parameters:
Name Type Description
options Object An object of options to configure the request.
callback function Function with the result of the request.
Returns:
Type:
Promise
Resulting information for the callback execution.

addBundle(bundle, locale)

Adds a new bundle object to the currently set of registered bundles for the the given locale. This registration operation is global and will affect any user of the RIPE SDK package on the current VM.
Source:
Parameters:
Name Type Description
bundle Object The locale strings bundle that is going to be globally registered.
locale String The ISO 639-1 based locale identifier in the underscore based form to be used in registration

addPlugin(plugin)

Registers a plugin to this Ripe instance.
Source:
Parameters:
Name Type Description
plugin Plugin The plugin to be registered.

auth(username, password, options, callback) → {XMLHttpRequest}

Responsible for the beginning of the (username, password) based authentication process.
Source:
Parameters:
Name Type Description
username String The username to be authenticated.
password String The username's password.
options Object An object of options to configure the request.
callback function Function with the result of the request.
Returns:
Type:
XMLHttpRequest
The XMLHttpRequest instance of the API request.

authAdmin(username, password, options, callback) → {XMLHttpRequest}

Responsible for the beginning of the (username, password) based authentication process. This method uses the admin back-end instead of the RIPE Core simple authentication system.
Source:
Parameters:
Name Type Description
username String The username to be authenticated.
password String The username's password.
options Object An object of options to configure the request.
callback function Function with the result of the request.
Returns:
Type:
XMLHttpRequest
The XMLHttpRequest instance of the API request.

authAdminP(username, password, options) → {Promise}

Responsible for the beginning of the (username, password) based authentication process. This method uses the admin back-end instead of the RIPE Core simple authentication system.
Source:
Parameters:
Name Type Description
username String The username to be authenticated.
password String The username's password.
options Object An object of options to configure the request.
Returns:
Type:
Promise
The authentication data.

authKey(key, options, callback) → {XMLHttpRequest}

Responsible for the beginning of the key based authentication process. This method uses the admin back-end instead of the RIPE Core simple authentication system.
Source:
Parameters:
Name Type Description
key String The key to authenticate with.
options Object An object of options to configure the request.
callback function Function with the result of the request.
Returns:
Type:
XMLHttpRequest
The XMLHttpRequest instance of the API request.

authKeyP(key, options, callback) → {Promise}

Responsible for the beginning of the key based authentication process. This method uses the admin back-end instead of the RIPE Core simple authentication system.
Source:
Parameters:
Name Type Description
key String The key to authenticate with.
options Object An object of options to configure the request.
callback function Function with the result of the request.
Returns:
Type:
Promise
The authenticated account data.

authP(username, password, options) → {Promise}

Responsible for the beginning of the (username, password) based authentication process.
Source:
Parameters:
Name Type Description
username String The username to be authenticated.
password String The username's password.
options Object An object of options to configure the request.
Returns:
Type:
Promise
The authentication data.

authPid(token, options, callback) → {XMLHttpRequest}

Responsible for the beginning of the token based authentication process.
Source:
Parameters:
Name Type Description
token String The authentication token.
options Object An object of options to configure the authentication.
callback function Function with the result of the authentication.
Returns:
Type:
XMLHttpRequest
The XMLHttpRequest instance of the API request.

authPidP(token, options) → {Promise}

Responsible for the beginning of the token based authentication process.
Source:
Parameters:
Name Type Description
token String The authentication token.
options Object An object of options to configure the authentication.
Returns:
Type:
Promise
The authentication data.

bindConfigurator(element, options) → {Configurator}

Binds an Configurator to this Ripe instance.
Source:
Parameters:
Name Type Description
element Configurator The Configurator to be used by the Ripe instance.
options Object An Object with options to configure the Configurator instance.
Returns:
Type:
Configurator
The Configurator instance created.

bindImage(element, options) → {Image}

Binds an Image to this Ripe instance.
Source:
Parameters:
Name Type Description
element Image The Image to be used by the Ripe instance.
options Object An Object with options to configure the Image instance.
Returns:
Type:
Image
The Image instance created.

bindInteractable(element, options) → {Interactable}

Binds an Interactable to this Ripe instance.
Source:
Parameters:
Name Type Description
element Interactable The Interactable to be used by the Ripe instance.
options Object An Object with options to configure the Interactable instance.
Returns:
Type:
Interactable
The Interactable instance created.

cancelOrder(number, options, callback) → {XMLHttpRequest}

Sets the order status to 'cancel'.
Source:
Parameters:
Name Type Description
number Number The number of the order to update.
options Object An object of options to configure the request.
callback function Function with the result of the request.
Returns:
Type:
XMLHttpRequest
The XMLHttpRequest instance of the API request.

canRedo() → {Boolean}

Indicates if there are part changes to redo.
Source:
Returns:
Type:
Boolean
If there are changes to reapply pending in the history stack.

canUndo() → {Boolean}

Indicates if there are part changes to undo.
Source:
Returns:
Type:
Boolean
If there are changes to reverse in the current parts history stack.

config(brand, model, options)

Sets the model to be customised by providing both the brand and the model for the update.
Source:
Parameters:
Name Type Description
brand String The brand of the model.
model String The name of the model.
options Object An object with the options to configure the Ripe instance, such as: - 'parts' - The initial parts of the model. - 'initials' - The initial value for the initials of the model. - 'engraving' - The initial engraving value of the model. - 'initialsExtra' - The initial value for the initials extra. - 'country' - The country where the model will be sold. - 'currency' - The currency that should be used to calculate the price. - 'locale' - The locale to be used by default when localizing values. - 'flag' - A specific attribute of the model. - 'remoteCalls' - If the remote calls (eg: 'on_config') should be called in the middle of configuration. - 'useBundles' - If the bundles should be loaded during initial loading. - 'useDefaults' - If the default parts of the model should be used when no initials parts are set. - 'useCombinations' - If the combinations should be loaded as part of the initial RIPE loading. - 'usePrice' - If the price should be automatically retrieved whenever there is a customization change. - 'useDiag' - If the diagnostics module should be used. - 'safe' - If the call should 'await' for all the composing operations before returning or if instead should allow operations to be performed in a parallel and detached manner.

configDku(dku, options, callback) → {XMLHttpRequest}

Resolves the provided DKU value into a more structured set of model, brand, parts, etc. so that it can be used under RIPE.
Source:
Parameters:
Name Type Description
dku String The DKU identifier to be used in the resolution.
options Object An object of options to configure the request, such as: - 'url' - The base URL.
callback function Function with the result of the request.
Returns:
Type:
XMLHttpRequest
The XMLHttpRequest instance of the API request.

configDkuP(dku, options, callback)

Resolves the provided DKU value into a more structured set of mode, brand, parts, etc. so that it can be used under RIPE.
Source:
Parameters:
Name Type Description
dku String The DKU identifier to be used in the resolution.
options Object An object of options to configure the request, such as: - 'url' - The base URL.
callback function Function with the result of the request. s {Promise} The model's configuration data.

configGlobal(options) → {XMLHttpRequest}

Gets the global configuration object from the RIPE server (admin endpoint).
Source:
Parameters:
Name Type Description
options Object An object of options to configure the request.
Returns:
Type:
XMLHttpRequest
The XMLHttpRequest instance of the API request.

configGlobalP(options)

Gets the global configuration object from the RIPE server (admin endpoint).
Source:
Parameters:
Name Type Description
options Object An object of options to configure the request.

configInfo(options, callback) → {XMLHttpRequest}

Resolves the RIPE configuration options (includes DKU) from the provided set of options or in alternative the current RIPE instance state.
Source:
Parameters:
Name Type Description
options Object An object of options to configure the request, such as: - 'url' - The base URL.
callback function Function with the result of the request.
Returns:
Type:
XMLHttpRequest
The XMLHttpRequest instance of the API request.

configInfoP(options, callback)

Resolves the RIPE configuration options (includes DKU) from the provided set of options or in alternative the current RIPE instance state.
Source:
Parameters:
Name Type Description
options Object An object of options to configure the request, such as: - 'url' - The base URL.
callback function Function with the result of the request. s {Promise} The model's configuration data.

configResolve(productId, options, callback) → {XMLHttpRequest}

Gets the configuration of a product identified by its unique product ID.
Source:
Parameters:
Name Type Description
productId String The identifier of the product to be resolved.
options Object An object of options to configure the request, such as: - 'url' - The base URL.
callback function Function with the result of the request.
Returns:
Type:
XMLHttpRequest
The XMLHttpRequest instance of the API request.

configResolveP(productId, options)

Gets the configuration of a product identified by its unique product ID.
Source:
Parameters:
Name Type Description
productId String The identifier of the product to be resolved.
options Object An object of options to configure the request, such as: - 'url' - The base URL. s {Promise} The model's configuration data.

configResolveSku(domain, options, callback) → {XMLHttpRequest}

Resolves a customization to a mapped SKU.
Source:
Parameters:
Name Type Description
domain String The SKU domain (falls back to brand value).
options Object An object with options, such as: - 'brand' - The brand of the model - 'model' - The name of the model - 'variant' - The variant of the model. - 'parts' - The parts of the customized model. - 'initials' - The value for the initials of the personalized model. - 'engraving' - The value for the engraving value of the personalized model. - 'initialsExtra' - The value for the initials extra of the personalized model. - 'productId' - The product's unique identification.
callback function Function with the result of the request.
Returns:
Type:
XMLHttpRequest
The XMLHttpRequest instance of the API request.

configResolveSkuP(domain, options, callback) → {Promise}

Resolves a customization to a mapped SKU.
Source:
Parameters:
Name Type Description
domain String The SKU domain (falls back to brand value).
options Object An object with options, such as: - 'brand' - The brand of the model - 'model' - The name of the model - 'variant' - The variant of the model. - 'parts' - The parts of the customized model. - 'initials' - The value for the initials of the personalized model. - 'engraving' - The value for the engraving value of the personalized model. - 'initialsExtra' - The value for the initials extra of the personalized model. - 'productId' - The product's unique identification.
callback function Function with the result of the request.
Returns:
Type:
Promise
The model's configuration data.

configSku(sku, domain, options, callback) → {XMLHttpRequest}

Resolves the provided SKU value into a more structured set of model, brand, parts, etc. so that it can be used under RIPE.
Source:
Parameters:
Name Type Description
sku String The SKU identifier to be used in the resolution.
domain String The domain to be used in the resolution.
options Object An object of options to configure the request, such as: - 'url' - The base URL.
callback function Function with the result of the request.
Returns:
Type:
XMLHttpRequest
The XMLHttpRequest instance of the API request.

configSkuP(sku, domain, options, callback)

Resolves the provided SKU value into a more structured set of mode, brand, parts, etc. so that it can be used under RIPE.
Source:
Parameters:
Name Type Description
sku String The SKU identifier to be used in the resolution.
domain String The domain to be used in the resolution.
options Object An object of options to configure the request, such as: - 'url' - The base URL.
callback function Function with the result of the request. s {Promise} The model's configuration data.

createCountryGroup(countryGroup, options, callback, callback) → {XMLHttpRequest}

Creates a new country group.
Source:
Parameters:
Name Type Description
countryGroup Object An object with information needed to create a country group ex: {name: "Europe 1", currency: "EUR", countries: ["Portugal, Spain, France"]}.
options Object An object of options to configure the request.
callback function Function with the result of the request.
callback function Function with the result of the request.
Returns:
Type:
XMLHttpRequest
The XMLHttpRequest instance of the API request.

createCountryGroupP(countryGroup, options) → {Promise}

Creates a new country group.
Source:
Parameters:
Name Type Description
countryGroup Object An object with information needed to create a country group ex: {name: "Europe 1", currency: "EUR", countries: ["Portugal, Spain, France"]}.
options Object An object of options to configure the request.
Returns:
Type:
Promise
The orders result list.

createOrder(number, options, callback) → {XMLHttpRequest}

Sets the order status to 'create'.
Source:
Parameters:
Name Type Description
number Number The number of the order to update.
options Object An object of options to configure the request.
callback function Function with the result of the request.
Returns:
Type:
XMLHttpRequest
The XMLHttpRequest instance of the API request.

createPriceRule(priceRule, options, callback) → {XMLHttpRequest}

Creates a Price Rule on RIPE Core.
Source:
Parameters:
Name Type Description
priceRule Object The Price Rule object
options Object An object with options
callback function Function with the result of the request.
Returns:
Type:
XMLHttpRequest
Resulting information for the callback execution.

createPriceRuleP(priceRule, options) → {Promise}

Creates a Price Rule on RIPE Core.
Source:
Parameters:
Name Type Description
priceRule Object The Price Rule object
options Object An object with options
Returns:
Type:
Promise
The price rule's data.

createSku(identifier, domain, options, callback) → {XMLHttpRequest}

Creates a SKU on RIPE Core.
Source:
Parameters:
Name Type Description
identifier Number The SKU identifier.
domain Object The SKU's domain, within the SKU is going to be defined.
options Object An object with options, such as: - 'brand' - The brand of the model. - 'model' - The name of the model. - 'variant' - The variant of the model. - 'version' - The version of the build. - 'parts' - The parts of the customized model. - 'initials' - The value for the initials of the personalized model. - 'engraving' - The value for the engraving value of the personalized model. - 'initialsExtra' - The value for the initials extra of the personalized model.
callback function Function with the result of the request.
Returns:
Type:
XMLHttpRequest
Resulting information for the callback execution.

createSkuP(identifier, domain, options) → {Promise}

Creates a SKU on RIPE Core.
Source:
Parameters:
Name Type Description
identifier Number The SKU identifier.
domain Object The SKU's domain, within the SKU is going to be defined.
options Object An object with options, such as: - 'brand' - The brand of the model. - 'model' - The name of the model. - 'variant' - The variant of the model. - 'version' - The version of the build. - 'parts' - The parts of the customized model. - 'initials' - The value for the initials of the personalized model. - 'engraving' - The value for the engraving value of the personalized model. - 'initialsExtra' - The value for the initials extra of the personalized model.
Returns:
Type:
Promise
The SKU's data.

deinit()

The deinitializer to be called when it should stop responding to updates so that any necessary cleanup operations can be executed.
Source:

deleteCountryGroup(id, options, callback, callback) → {XMLHttpRequest}

Deletes an existing country group.
Source:
Parameters:
Name Type Description
id Object Id of the country group to be deleted.
options Object An object of options to configure the request.
callback function Function with the result of the request.
callback function Function with the result of the request.
Returns:
Type:
XMLHttpRequest
The XMLHttpRequest instance of the API request.

deleteCountryGroupP(id, options) → {Promise}

Deletes an existing country group.
Source:
Parameters:
Name Type Description
id Object Id of the country group to be deleted.
options Object An object of options to configure the request.
Returns:
Type:
Promise
The orders result list.

deletePriceRule(id, options, callback) → {XMLHttpRequest}

Deletes the existing price rules filtered by id, according to the provided filtering strategy as normalized values.
Source:
Parameters:
Name Type Description
id Number The Price Rule's Id.
options Object An object of options to configure the request
callback function Function with the result of the request.
Returns:
Type:
XMLHttpRequest
The XMLHttpRequest instance of the API request.

deletePriceRuleP(id, options) → {Promise}

Deletes the existing price rules filtered by id, according to the provided filtering strategy as normalized values.
Source:
Parameters:
Name Type Description
id Number The Price Rule's Id.
options Object An object of options to configure the request
Returns:
Type:
Promise
The price rules list.

deselectPart(part, options)

Deselects a part of the model. Triggers a 'deselected_part' event with the part.
Source:
Parameters:
Name Type Description
part String The name of the part to be deselected.
options Object An Object with options to configure the operation.

geoResolve(address, options, callback) → {XMLHttpRequest}

Runs the GeoIP resolution process so that it's possible to uncover more geographical information about the current user.
Source:
Parameters:
Name Type Description
address String The optional address to be used in case the address of the IP request is not desired.
options Object An object of options to configure the request.
callback function Function with the result of the request.
Returns:
Type:
XMLHttpRequest
The XMLHttpRequest instance of the API request.

getBuild(name, options) → {XMLHttpRequest}

Retrieves a build's information from the server side by name.
Source:
Parameters:
Name Type Description
name String The name of the of the build.
options Object An object of options to configure the request.
Returns:
Type:
XMLHttpRequest
The XMLHttpRequest instance of the API request.

getBuildArtifact(name, version, options) → {XMLHttpRequest}

Retrieves the build artifact information by brand name and version.
Source:
Parameters:
Name Type Description
name String The name of the brand of the build artifact.
version String The version of the build artifact.
options Object An object of options to configure the request.
Returns:
Type:
XMLHttpRequest
The XMLHttpRequest instance of the API request.

getBuildArtifactP(name, version, options) → {Promise}

Retrieves the build artifact information by name and version.
Source:
Parameters:
Name Type Description
name String The name of the build artifact.
version String The version of the build artifact.
options Object An object of options to configure the request.
Returns:
Type:
Promise
The build artifact (as a promise).

getBuildArtifacts(name, version, options) → {XMLHttpRequest}

Retrieves the build artifacts by name and version and for the requested branch.
Source:
Parameters:
Name Type Description
name String The name of the build artifacts.
version String The version of the build artifacts.
options Object An object of options to configure the request.
Returns:
Type:
XMLHttpRequest
The XMLHttpRequest instance of the API request.

getBuildArtifactsP(name, version, options) → {Promise}

Retrieves the build artifacts by brand name and version and for the requested branch.
Source:
Parameters:
Name Type Description
name String The name of the brand of the build artifacts.
version String The version of the build artifacts.
options Object An object of options to configure the request.
Returns:
Type:
Promise
The build artifacts (as a promise).

getBuildP(name, options) → {Promise}

Retrieves a build's information from the server side by name.
Source:
Parameters:
Name Type Description
name String The name of the build.
options Object An object of options to configure the request.
Returns:
Type:
Promise
The build's information (as a promise).

getBuilds(options) → {XMLHttpRequest}

Retrieves the complete list of builds available from the server.
Source:
Parameters:
Name Type Description
options Object An object of options to configure the request.
Returns:
Type:
XMLHttpRequest
The XMLHttpRequest instance of the API request.

getBuildsP(options) → {Promise}

Retrieves the complete list of builds available from the server.
Source:
Parameters:
Name Type Description
options Object An object of options to configure the request.
Returns:
Type:
Promise
The builds list (as a promise).

getChildren(type) → {Array}

Retrieves the complete set of child elements of this Ripe instance that fulfill the provided type criteria.
Source:
Parameters:
Name Type Description
type String The type of child as a string to filter children.
Returns:
Type:
Array
The child elements that fill the provided type.

getChoices() → {Object}

Returns the current state (eg: availability) for the parts materials and colors associated with the current customization session.
Source:
Returns:
Type:
Object
The object that contains the state for every single part, material, and color.

getCombinations(options) → {XMLHttpRequest}

Returns the possible customization combinations of a specific brand or model. If no model is provided then returns the defaults of the owner's current model.
Source:
Parameters:
Name Type Description
options Object An object with options, such as: - 'brand' - The brand of the model - 'model' - The name of the model
Returns:
Type:
XMLHttpRequest
The model's total set of combinations.

getCombinationsP(options) → {Promise}

Returns the possible customization combinations of a specific brand or model. If no model is provided then returns the defaults of the owner's current model.
Source:
Parameters:
Name Type Description
options Object An object with options, such as: - 'brand' - The brand of the model - 'model' - The name of the model
Returns:
Type:
Promise
The model's total set of combinations.

getConfig(options) → {XMLHttpRequest}

Returns the configuration information of a specific brand and model. If no model is provided then returns the information of the owner's current model.
Source:
Parameters:
Name Type Description
options Object A map with options, such as: - 'brand' - The brand of the model - 'model' - The name of the model - 'country' - The country where the model will be provided, some materials/colors might not be available. - 'flag' - A specific flag that may change the provided materials/colors available. - 'filter' - If the configuration should be filtered by the country and/or flag (defaults to 'true')
Returns:
Type:
XMLHttpRequest
The model's configuration data.

getConfigP(options) → {Promise}

Returns the configuration information of a specific brand and model. If no model is provided then returns the information of the owner's current model.
Source:
Parameters:
Name Type Description
options Object An object with options, such as: - 'brand' - The brand of the model - 'model' - The name of the model - 'country' - The country where the model will be provided, some materials/colors might not be available. - 'flag' - A specific flag that may change the provided materials/colors available. - 'filter' - If the configuration should be filtered by the country and/or flag (defaults to 'true')
Returns:
Type:
Promise
The model's configuration data.

getCountryGroup(id, options, callback, callback) → {XMLHttpRequest}

Gets a country group by its id.
Source:
Parameters:
Name Type Description
id Object Id of the intended country group.
options Object An object of options to configure the request.
callback function Function with the result of the request.
callback function Function with the result of the request.
Returns:
Type:
XMLHttpRequest
The XMLHttpRequest instance of the API request.

getCountryGroupP(id, options) → {Promise}

Gets a country group by its id.
Source:
Parameters:
Name Type Description
id Object Id of the intended country group.
options Object An object of options to configure the request.
Returns:
Type:
Promise
The orders result list.

getCountryGroups(options, callback, callback) → {XMLHttpRequest}

Gets the existing country groups, according to the provided filtering strategy as normalized values.
Source:
Parameters:
Name Type Description
options Object An object of options to configure the request, such as: - 'filters[]' - List of filters that the query will use to, operators such as ('in', 'not_in', 'like', 'contains'), for instance (eg: 'id:eq:42') would filter by the id that equals to 42. - 'sort' - List of arguments to sort the results by and which direction to sort them in (eg: 'id:ascending') would sort by the id attribute in ascending order, while (eg: 'id:descending')] would do it in descending order. - 'skip' - The number of the first record to retrieve from the results. - 'limit' - The number of results to retrieve.
callback function Function with the result of the request.
callback function Function with the result of the request.
Returns:
Type:
XMLHttpRequest
The XMLHttpRequest instance of the API request.

getCountryGroupsP(options) → {Promise}

Gets the existing country groups, according to the provided filtering strategy as normalized values.
Source:
Parameters:
Name Type Description
options Object An object of options to configure the request.
Returns:
Type:
Promise
The orders result list.

getCtx() → {Object}

Retrieves the value of the current base context defined in the instance.
Source:
Returns:
Type:
Object
The base context currently set.

getDefaults(options) → {XMLHttpRequest}

Returns the default customization of a specific brand or model. If no model is provided then returns the defaults of the owner's current model.
Source:
Parameters:
Name Type Description
options Object An object with options, such as: - 'brand' - The brand of the model - 'model' - The name of the model
Returns:
Type:
XMLHttpRequest
The model's default options.

getFactory(options, callback) → {XMLHttpRequest}

Returns the factory information where a model is made, specifically its name and the estimated production time in days. If no model is provided then returns the defaults of the owner's current model.
Source:
Parameters:
Name Type Description
options Object An object with options, such as: - 'brand' - The brand of the model - 'model' - The name of the model
callback function Function with the result of the request.
Returns:
Type:
XMLHttpRequest
The factory information for the provided model.

getFactoryP(options, callback) → {Promise}

Returns the factory information where a model is made, specifically its name and the estimated production time in days. If no model is provided then returns the defaults of the owner's current model.
Source:
Parameters:
Name Type Description
options Object An object with options, such as: - 'brand' - The brand of the model - 'model' - The name of the model
callback function Function with the result of the request.
Returns:
Type:
Promise
The factory information for the provided model.

getFrames() → {Object}

Returns the model's available frames, in an object structure that maps a certain face with the number of available frames for such face. This function makes use of the loaded config in case there's one, otherwise triggers the loading of the config.
Source:
Returns:
Type:
Object
The model's available frames.

getJustifications(options, callback, callback) → {XMLHttpRequest}

Gets the existing justifications, according to the provided filtering strategy as normalized values.
Source:
Parameters:
Name Type Description
options Object An object of options to configure the request, such as: - 'filters[]' - List of filters that the query will use to, operators such as ('in', 'not_in', 'like', 'contains'), for instance (eg: 'id:eq:42') would filter by the id that equals to 42. - 'sort' - List of arguments to sort the results by and which direction to sort them in (eg: 'id:ascending') would sort by the id attribute in ascending order, while (eg: 'id:descending')] would do it in descending order. - 'skip' - The number of the first record to retrieve from the results. - 'limit' - The number of results to retrieve.
callback function Function with the result of the request.
callback function Function with the result of the request.
Returns:
Type:
XMLHttpRequest
The XMLHttpRequest instance of the API request.

getJustificationsByContext(options, callback) → {XMLHttpRequest}

Gets the existing justifications filtered by context, according to the provided filtering strategy as normalized values.
Source:
Parameters:
Name Type Description
options Object An object of options to configure the request, such as: - 'filters[]' - List of filters that the query will use to, operators such as ('in', 'not_in', 'like', 'contains'), for instance (eg: 'id:eq:42') would filter by the id that equals to 42. - 'sort' - List of arguments to sort the results by and which direction to sort them in (eg: 'id:ascending') would sort by the id attribute in ascending order, while (eg: 'id:descending')] would do it in descending order. - 'skip' - The number of the first record to retrieve from the results. - 'limit' - The number of results to retrieve.
callback function Function with the result of the request.
Returns:
Type:
XMLHttpRequest
The XMLHttpRequest instance of the API request.

getJustificationsByContextP(options) → {Promise}

Gets the existing justifications filtered by context, according to the provided filtering strategy as normalized values.
Source:
Parameters:
Name Type Description
options Object An object of options to configure the request, such as: - 'filters[]' - List of filters that the query will use to, operators such as ('in', 'not_in', 'like', 'contains'), for instance (eg: 'id:eq:42') would filter by the id that equals to 42. - 'sort' - List of arguments to sort the results by and which direction to sort them in (eg: 'id:ascending') would sort by the id attribute in ascending order, while (eg: 'id:descending')] would do it in descending order. - 'skip' - The number of the first record to retrieve from the results. - 'limit' - The number of results to retrieve.
Returns:
Type:
Promise
The justifications result list.

getJustificationsP(options) → {Promise}

Gets the existing justifications, according to the provided filtering strategy as normalized values.
Source:
Parameters:
Name Type Description
options Object An object of options to configure the request.
Returns:
Type:
Promise
The orders result list.

getLoadedConfig() → {Object}

Returns the model's configuration loaded from the Platforme's system. The config version loaded by this method is the one "cached" in the instance, if there's any.
Source:
Returns:
Type:
Object
The model's configuration.

getLocaleModel(options, callback) → {XMLHttpRequest}

Retrieves the bundle of part, materials and colors translations of a specific brand and model If no model is defined the retrieves the bundle of the owner's current model.
Source:
Parameters:
Name Type Description
options Object An object of options to configure the request, such as: - 'brand' - The brand of the model. - 'model' - The name of the model. - 'locale' - The locale of the translations. - 'compatibility' - If compatibility mode should be enabled. - 'prefix' - A prefix to prepend to the locale keys (defaults to 'builds').
callback function Function with the result of the request.
Returns:
Type:
XMLHttpRequest
The XMLHttpRequest instance of the API request.

getLocaleModelP(options) → {Promise}

Retrieves the bundle of part, materials and colors translations of a specific brand and model If no model is defined the retrieves the bundle of the owner's current model.
Source:
Parameters:
Name Type Description
options Object An object of options to configure the request, such as: - 'brand' - The brand of the model. - 'model' - The name of the model. - 'locale' - The locale of the translations. - 'compatibility' - If compatibility mode should be enabled. - 'prefix' - A prefix to prepend to the locale keys (defaults to 'builds').
Returns:
Type:
Promise
The resolved locale data (as a promise).

getOptionals(options) → {Object}

Returns the default customization of a specific brand or model. If no model is provided then returns the defaults of the owner's current model.
Source:
Parameters:
Name Type Description
options Object An object with options, such as: - 'brand' - The brand of the model - 'model' - The name of the model
Returns:
Type:
Object
The model's optional parts.

getOrder(number, options, callback) → {XMLHttpRequest}

Gets an order by number.
Source:
Parameters:
Name Type Description
number Number The number of the order to find by.
options Object An object of options to configure the request.
callback function Function with the result of the request.
Returns:
Type:
XMLHttpRequest
The XMLHttpRequest instance of the API request.

getOrderP(number, options) → {Promise}

Gets an order by number.
Source:
Parameters:
Name Type Description
number Number The number of the order to find by.
options Object An object of options to configure the request.
Returns:
Type:
Promise
The orders result list.

getOrders(options, callback) → {XMLHttpRequest}

Gets the orders list, optionally filtered by a set of options.
Source:
Parameters:
Name Type Description
options Object An object of options to configure the query and its results, such as: - 'filters[]' - List of filters that the query will use to, operators such as ('in', 'not_in', 'like', 'likei', 'llike', 'llikei', 'rlike', 'rlikei', 'contains'), (eg: 'number:eq:42') would filter by the 'number' that equals to '42'. - 'sort' - List of arguments to sort the results by and which direction to sort them in (eg: 'id:ascending') would sort by the id attribute in ascending order, while (eg: 'id:descending')] would do it in descending order. - 'skip' - The number of the first record to retrieve from the results. - 'limit' - The number of results to retrieve.
callback function Function with the result of the request.
Returns:
Type:
XMLHttpRequest
The XMLHttpRequest instance of the API request.

getOrdersP(options) → {Promise}

Gets the orders list, optionally filtered by a set of options.
Source:
Parameters:
Name Type Description
options Object An object of options to configure the request. its results, such as: - 'filters[]' - List of filters that the query will use to, operators such as ('in', 'not_in', 'like', 'contains'), for instance (eg: 'id:eq:42') would filter by the id that equals to 42. - 'sort' - List of arguments to sort the results by and which direction to sort them in (eg: 'id:ascending') would sort by the id attribute in ascending order, while (eg: 'id:descending')] would do it in descending order. - 'skip' - The number of the first record to retrieve from the results. - 'limit' - The number of results to retrieve.
Returns:
Type:
Promise
The orders result list.

getPrice(options, callback) → {XMLHttpRequest}

Retrieves the price for current customization.
Source:
Parameters:
Name Type Description
options Object An Object containing customization information that can be used to override the current customization, allowing to set the 'brand', 'model' and 'parts'.
callback function Function with the result of the request.
Returns:
Type:
XMLHttpRequest
The XMLHttpRequest instance of the API request.

getPriceRule(id, options, callback) → {XMLHttpRequest}

Gets an existing price rule filtered by id and according to the provided filtering strategy as normalized values.
Source:
Parameters:
Name Type Description
id Number The Price Rule's Id.
options Object An object of options to configure the request
callback function Function with the result of the request.
Returns:
Type:
XMLHttpRequest
The XMLHttpRequest instance of the API request.

getPriceRuleP(id, options) → {Promise}

Gets an existing price rule filtered by id and according to the provided filtering strategy as normalized values.
Source:
Parameters:
Name Type Description
id Number The Price Rule's Id.
options Object An object of options to configure the request
Returns:
Type:
Promise
The price rules list.

getPriceRules(options, callback) → {XMLHttpRequest}

Gets the existing price rules, according to the provided filtering strategy as normalized values.
Source:
Parameters:
Name Type Description
options Object An object of options to configure the request
callback function Function with the result of the request.
Returns:
Type:
XMLHttpRequest
The XMLHttpRequest instance of the API request.

getPriceRulesP(options) → {Promise}

Gets the existing price rules, according to the provided filtering strategy as normalized values.
Source:
Parameters:
Name Type Description
options Object An object of options to configure the request.
Returns:
Type:
Promise
The orders result list.

getSizes(options, callback) → {XMLHttpRequest}

Provides a list of all the available size scales. To be used to know what scales are available for size conversions.
Source:
Parameters:
Name Type Description
options Object An object of options to configure the request.
callback function Function with the result of the request.
Returns:
Type:
XMLHttpRequest
The XMLHttpRequest instance of the API request.

hasBundles() → {Promise}

Returns a promise that is resolved once the remote locale bundles are retrieved from their remote locations. This is relevant for situations where proper location is required for a certain scenario (eg: sizes).
Source:
Returns:
Type:
Promise
The promise to be fulfilled on the base locale bundles are loaded.

hasFrame(frame) → {Boolean}

Determines if the model currently loaded (in case there's one) has the provided frame available in spec. Notice that this call does not assure that a render is possible it only determines that according to model's spec it should be possible to render such a frame.
Source:
Parameters:
Name Type Description
frame String The name of the frame to determine "renderability" according to the {face}-{index} format.
Returns:
Type:
Boolean
If it's possible to render such frame for the currently loaded model.

importOrder(ffOrderId, options, callback) → {XMLHttpRequest}

Imports a production order to RIPE Core.
Source:
Parameters:
Name Type Description
ffOrderId Number The e-commerce order identifier.
options Object An object with options, such as: - 'brand' - The brand of the model. - 'model' - The name of the model. - 'variant' - The variant of the model. - 'parts' - The parts of the customized model. - 'initials' - The value for the initials of the personalized model. - 'engraving' - The value for the engraving value of the personalized model. - 'initialsExtra' - The value for the initials extra of the personalized model. - 'gender' - The gender of the customized model. - 'size' - The native size of the customized model. - 'pending' - If the production order is to be imported at the pending, so it has to be confirmed. - 'notify' - Mark order to trigger notification after creation. - 'productId' - The product's unique identification. - 'currency' - The 'ISO 4217' currency code in which the order has been sold. - 'country' - The 'ISO 3166-2' country code where the order has been placed. - 'meta' - Complementary information to be added, as a key:value list (ie: '['key1:value1', 'key2:value2']).
callback function Function with the result of the request.
Returns:
Type:
XMLHttpRequest
Resulting information for the callback execution.

importOrderP(ffOrderId, options) → {Promise}

Imports a production order to RIPE Core.
Source:
Parameters:
Name Type Description
ffOrderId Number The e-commerce order identifier.
options Object An object with options, such as: - 'brand' - The brand of the model. - 'model' - The name of the model. - 'variant' - The variant of the model. - 'parts' - The parts of the customized model. - 'initials' - The value for the initials of the personalized model. - 'engraving' - The value for the engraving value of the personalized model. - 'initialsExtra' - The value for the initials extra of the personalized model. - 'gender' - The gender of the customized model. - 'size' - The native size of the customized model. - 'pending' - If the production order is to be imported at the pending, so it has to be confirmed. - 'notify' - Mark order to trigger notification after creation. - 'productId' - The product's unique identification. - 'currency' - The 'ISO 4217' currency code in which the order has been sold. - 'country' - The 'ISO 3166-2' country code where the order has been placed. - 'meta' - Complementary information to be added, as a key:value list (ie: '['key1:value1', 'key2:value2']).
Returns:
Type:
Promise
The production order's data.

init()

The initializer of the class, to be called whenever the instance is going to become active. Sets the various values for the Ripe instance taking into account the provided configuration and defaulting values policy.
Source:

installArtifact(name, version, options) → {XMLHttpRequest}

Installs a build artifact by build name and artifact version.
Source:
Parameters:
Name Type Description
name String The name of the build associated with the artifact.
version String The version of the build artifact.
options Object An object of options to configure the request.
Returns:
Type:
XMLHttpRequest
The XMLHttpRequest instance of the API request.

installArtifactP(name, version, options) → {Promise}

Installs a build artifact by build name and artifact version.
Source:
Parameters:
Name Type Description
name String The name of the build associated with the artifact.
version String The version of the build artifact.
options Object An object of options to configure the request.
Returns:
Type:
Promise
The build install (as a promise).

installBuild(name, options) → {XMLHttpRequest}

Installs a build on the server from remote repos for the given name.
Source:
Parameters:
Name Type Description
name String The build's name to be installed.
options Object An object with options, such as: - 'version' - The version of the build to install, if no version is given, installs the latest one.
Returns:
Type:
XMLHttpRequest
The XMLHttpRequest instance of the API request.

installBuildP(name, options) → {Promise}

Installs a build on the server from remote repos for the given name.
Source:
Parameters:
Name Type Description
name String The build's name to be installed.
options Object An object with options, such as: - 'version' - The version of the build to install, if no version is given, installs the latest one.
Returns:
Type:
Promise
The build install (as a promise).

isOAuthPending() → {Boolean}

Checks if a successfully OAuth process has been fulfilled.
Source:
Returns:
Type:
Boolean
Boolean representing if an OAuth process has been fulfilled.

isReady() → {Promise}

Returns a promise that is fulfilled once the RIPE instance is ready to be used. This can be used to actively wait for the initialization of the RIPE instance under an async environment.
Source:
Returns:
Type:
Promise
The promise to be fulfilled once the instance is ready to be used.

load() → {Object}

Explicit entry point to the initial update. This method should be called before any significant RIPE operation can be performed on the instance.
Source:
Returns:
Type:
Object
The current RIPE instance (for pipelining).

locale(value, locale, options, callback) → {XMLHttpRequest}

Localizes a value to the provided locale.
Source:
Parameters:
Name Type Description
value String The value to be localized.
locale String The locale to localize the value to.
options Object An object of options to configure the request.
callback function Function with the result of the request.
Returns:
Type:
XMLHttpRequest
The XMLHttpRequest instance of the API request.

localeBundle(locale, context, options, callback) → {XMLHttpRequest}

Retrieves a bundle of locales for the provided locale value.
Source:
Parameters:
Name Type Description
locale String The locale string to retrieve the bundle.
context String The inner context for the locale bundle.
options Object An object of options to configure the request.
callback function Function with the result of the request.
Returns:
Type:
XMLHttpRequest
The XMLHttpRequest instance of the API request.

localeLocal(value, fallback) → {String}

Runs a local based localization, meaning that the data source for the locale strings should be already loaded in memory. This means that the process should be immediate and not async.
Source:
Parameters:
Name Type Description
value String The base value string that is going to be used for the localization process.
fallback String The fallback string (default) to be used in case no localization is possible.
Returns:
Type:
String
The final localized string or the fallback in case localization is not possible.

localeMultiple(values, locale, options, callback) → {XMLHttpRequest}

Localizes a list of values to the provided locale.
Source:
Parameters:
Name Type Description
values String The values to be localized.
locale String The locale to localize the value to.
options Object An object of options to configure the request.
callback function Function with the result of the request.
Returns:
Type:
XMLHttpRequest
The XMLHttpRequest instance of the API request.

nativeToLocale(scale, value, gender, options, callback) → {XMLHttpRequest}

Converts a native size value in the specified scale to the corresponding localized size. The available scales, genders and sizes can be obtained with the method getSizes.
Source:
Parameters:
Name Type Description
scale String The scale which one wants to convert from.
value Number The value which one wants to convert.
gender String The gender of the scale and value to be converted.
options Object An object of options to configure the request.
callback function Function with the result of the request.
Returns:
Type:
XMLHttpRequest
The XMLHttpRequest instance of the API request.

nativeToLocaleB(scales, values, genders, options, callback) → {XMLHttpRequest}

Converts multiple native size values to the corresponding localized size. The available scales, genders and sizes can be obtained with the method getSizes.
Source:
Parameters:
Name Type Description
scales Array A list of scales to convert from.
values Array A list of values to convert.
genders Array A list of genders corresponding to the values.
options Object An object of options to configure the request.
callback function Function with the result of the request.
Returns:
Type:
XMLHttpRequest
The XMLHttpRequest instance of the API request.

nativeToSize(scale, value, gender, options, callback) → {XMLHttpRequest}

Converts a size value in the specified scale to the corresponding native size. The available scales, genders and sizes can be obtained with the method getSizes.
Source:
Parameters:
Name Type Description
scale String The scale which one wants to convert from.
value Number The value which one wants to convert.
gender String The gender of the scale and value to be converted.
options Object An object of options to configure the request.
callback function Function with the result of the request.
Returns:
Type:
XMLHttpRequest
The XMLHttpRequest instance of the API request.

nativeToSizeB(scales, values, genders, options, callback) → {XMLHttpRequest}

Converts multiple size values to the corresponding native size. The available scales, genders and sizes can be obtained with the method getSizes.
Source:
Parameters:
Name Type Description
scales Array A list of scales to convert from.
values Array A list of values to convert.
genders Array A list of genders corresponding to the values.
options Object An object of options to configure the request.
callback function Function with the result of the request.
Returns:
Type:
XMLHttpRequest
The XMLHttpRequest instance of the API request.

normalizeEngraving(engraving, properties) → {string}

Normalizes the provided engraving (material) value according to the expected standard, producing a sequence of dictionaries containing the resulting property values.
Source:
Parameters:
Name Type Description
engraving String The engraving to be normalized.
properties Array If provided overrides the default loaded config initials strategy for the retrieval of properties definition.
Returns:
Type:
string
The normalized engraving value.

normalizeParts(parts) → {Object}

Normalizes the parts dictionary by taking into account optional parts that should be set even for empty situations.
Source:
Parameters:
Name Type Description
parts Object The parts object that should be cloned and then ensured to have the optional parts set.
Returns:
Type:
Object
A copy of the provided parts with the optional parts set even if not defined.

oauth(options, callback) → {oauthAccessToken}

Responsible for the beginning of the OAuth based authentication process may either start the redirection process (in case no valid token is found) or try to revalidate the session with the currently existing tokens or session ID.
Source:
Parameters:
Name Type Description
options Object The set of options used for the OAuth process, should include client identifier and secret.
callback function The callback to be called once the logging or the access token retrieval functions are finished.
Returns:
Type:
oauthAccessToken
Either an invalid/unset value or the result of the login operation.

oauthAccessToken(code, options, callback) → {XMLHttpRequest}

Retrieves the complete set of OAuth elements to be used, such as: the access_token, token_type, expires_in, refresh_token, scope and tokens. Notice that both the scope and the tokens are retrieved providing the ability to modify experience taking that into account.
Source:
Parameters:
Name Type Description
code String The OAuth code.
options Object An object of options to configure the request, such as 'code', 'clientId', 'clientSecret', 'redirectUri' and the 'grantType'.
callback function Function with the result of the request.
Returns:
Type:
XMLHttpRequest
The XMLHttpRequest instance of the API request.

oauthLogin(accessToken, options, callback) → {XMLHttpRequest}

Retrieves the session identifier (SID) for the currently active session, this is going to be used on all requests to refer to the proper session.
Source:
Parameters:
Name Type Description
accessToken String The access token to be used.
options Object An object of options to configure the request.
callback function Function with the result of the request.
Returns:
Type:
XMLHttpRequest
The XMLHttpRequest instance of the API request.

onConfig(options, callback) → {XMLHttpRequest}

Server side callback method to be called for situations where a customization for a model has been started. This method allows the change of the current context of execution based on a server side implementation of the 3DB's business logic.
Source:
Parameters:
Name Type Description
options Object An object with options, such as: - 'brand' - The brand of the model - 'model' - The name of the model
callback function Function with the result of the request.
Returns:
Type:
XMLHttpRequest
Resulting information for the callback execution.

onConfigP(options, callback) → {Promise}

Server side callback method to be called for situations where a customization for a model has been started. This method allows the change of the current context of execution based on a server side implementation of the 3DB's business logic.
Source:
Parameters:
Name Type Description
options Object An object with options, such as: - 'brand' - The brand of the model - 'model' - The name of the model
callback function Function with the result of the request.
Returns:
Type:
Promise
Resulting information for the callback execution.

onInitials(options, callback) → {XMLHttpRequest}

Server side callback method to be called for situations where the initials or engraving values were changed. This method allows the change of the current context of execution based on a server side implementation of the 3DB's business logic.
Source:
Parameters:
Name Type Description
options Object An object with options, such as: - 'group' - The name of the group that is going to be changed - 'value' - The initials value to be changed - 'engraving' - The engraving value to be changed
callback function Function with the result of the request.
Returns:
Type:
XMLHttpRequest
Resulting information for the callback execution.

onInitialsP(options, callback) → {Promise}

Server side callback method to be called for situations where the initials or engraving values were changed. This method allows the change of the current context of execution based on a server side implementation of the 3DB's business logic.
Source:
Parameters:
Name Type Description
options Object An object with options, such as: - 'group' - The name of the group that is going to be changed - 'value' - The initials value to be changed - 'engraving' - The engraving value to be changed
callback function Function with the result of the request.
Returns:
Type:
Promise
Resulting information for the callback execution.

onPart(options, callback) → {XMLHttpRequest}

Server side callback method to be called for situations where a customization change was made on a part. This method allows the change of the current context of execution based on a server side implementation of the 3DB's business logic.
Source:
Parameters:
Name Type Description
options Object An object with options, such as: - 'name' - The name of the part to be changed - 'value' - The value (material and color) of the part to be changed
callback function Function with the result of the request.
Returns:
Type:
XMLHttpRequest
Resulting information for the callback execution.

onPartP(options, callback) → {Promise}

Server side callback method to be called for situations where a customization change was made on a part. This method allows the change of the current context of execution based on a server side implementation of the 3DB's business logic.
Source:
Parameters:
Name Type Description
options Object An object with options, such as: - 'name' - The name of the part to be changed - 'value' - The value (material and color) of the part to be changed
callback function Function with the result of the request.
Returns:
Type:
Promise
Resulting information for the callback execution.

parseEngraving(engraving, properties) → {Object}

Parses the provided normalized engraving string according to the standard `:` format, using the loaded configurations. The provided string may not be normalized but for that situation typical guessing heuristics are going to be applied.
Source:
Parameters:
Name Type Description
engraving String The engraving string to be parsed.
properties Array If provided overrides the default loaded config initials strategy for the retrieval of properties definition.
Returns:
Type:
Object
Returns an object with values and valuesM. valuesM is a map with (key = type, value = name) entries for each property defined in the engraving, where "type" is the type of the property (e.g. style) and "name" is the value for that property (e.g. gold) as defined in the engraving parameter. values is a list of (type, name) that respects the order of the properties.

ping(options, callback) → {XMLHttpRequest}

Runs a simple "ping" operation to validate the connection with the Core server-side.
Source:
Parameters:
Name Type Description
options Object An object of options to configure the request.
callback function Function with the result of the request.
Returns:
Type:
XMLHttpRequest
The XMLHttpRequest instance of the API request.

precustomizationOrder(ffId, options, callback) → {XMLHttpRequest}

Setups a pre-customization on RIPE Core.
Source:
Parameters:
Name Type Description
ffId Number The concrete identifier of the pre-customization, may represent just an entry point for a pre-customized product (used for mapping).
options Object An object with options, such as: - 'brand' - the brand of the model. - 'model' - the name of the model. - 'variant' - the variant of the model. - 'parts' - The parts of the customized model. - 'initials' - The value for the initials of the personalized model. - 'engraving' - The value for the engraving value of the personalized model. - 'gender' - The gender of the customized model. - 'size' - The native size of the customized model. - 'product_id' - The product identifier of the base product that is used for pre-customization mapping. - 'notify' - Mark pre-customization to trigger notification after creation. - 'meta' - Complementary information to be added, as a key:value list (ie: '['key1:value1', 'key2:value2']).
callback function Function with the result of the request.
Returns:
Type:
XMLHttpRequest
Resulting information for the callback execution.

precustomizationOrderP(ffId, options) → {Promise}

Setups a pre-customization on RIPE Core.
Source:
Parameters:
Name Type Description
ffId Number The concrete identifier of the pre-customization, may represent just an entry point for a pre-customized product (used for mapping).
options Object An object with options, such as: - 'brand' - The brand of the model. - 'model' - The name of the model. - 'variant' - The variant of the model. - 'parts' - The parts of the customized model. - 'initials' - The value for the initials of the personalized model. - 'engraving' - The value for the engraving value of the personalized model. - 'gender' - The gender of the customized model. - 'size' - The native size of the customized model. - 'productId' - The product identifier of the base product that is used for pre-customization mapping. - 'notify' - Mark pre-customization to trigger notification after creation. - 'meta' - Complementary information to be added, as a key:value list (ie: '['key1:value1', 'key2:value2']).
Returns:
Type:
Promise
The production order's data.

produceOrder(number, options, callback) → {XMLHttpRequest}

Sets the order status to 'produce'.
Source:
Parameters:
Name Type Description
number Number The number of the order to update.
options Object An object of options to configure the request.
callback function Function with the result of the request.
Returns:
Type:
XMLHttpRequest
The XMLHttpRequest instance of the API request.

readyOrder(number, options, callback) → {XMLHttpRequest}

Sets the order status to 'ready'.
Source:
Parameters:
Name Type Description
number Number The number of the order to update.
options Object An object of options to configure the request.
callback function Function with the result of the request.
Returns:
Type:
XMLHttpRequest
The XMLHttpRequest instance of the API request.

receiveOrder(number, options, callback) → {XMLHttpRequest}

Sets the order status to 'receive'.
Source:
Parameters:
Name Type Description
number Number The number of the order to update.
options Object An object of options to configure the request.
callback function Function with the result of the request.
Returns:
Type:
XMLHttpRequest
The XMLHttpRequest instance of the API request.

redo()

Reapplies the last change to the parts that was undone. Notice that if there's a change when the history pointer is in the middle of the stack the complete stack forward is removed (history re-written).
Source:

redoAll()

Executes the same operation as `redo` but goes all the way to the top of the stack that controls the history.
Source:

removeBundle(bundle, locale)

Removes the given set of locale strings from the globally defined locale registry.
Source:
Parameters:
Name Type Description
bundle Object The locale strings bundle that is going to be globally removed.
locale String The ISO 639-1 based locale identifier in the underscore based form to be used in removal

removePlugin(plugin)

Unregisters a plugin to this Ripe instance.
Source:
Parameters:
Name Type Description
plugin Plugin The plugin to be unregistered.

returnOrder(number, options, callback) → {XMLHttpRequest}

Sets the order status to 'return'.
Source:
Parameters:
Name Type Description
number Number The number of the order to update.
options Object An object of options to configure the request.
callback function Function with the result of the request.
Returns:
Type:
XMLHttpRequest
The XMLHttpRequest instance of the API request.

selectPart(part, options)

Selects a part of the model. Triggers a 'selected_part' event with the part.
Source:
Parameters:
Name Type Description
part String The name of the part to be selected.
options Object An Object with options to configure the operation.

setBackgroundColor(backgroundColor, override, update)

Updates the background color setting for the current ripe instance, propagating the change to any interested child. Optionally an update operation may be performed so that the background background color changes are reflected in the user interface.
Source:
Parameters:
Name Type Description
backgroundColor String The background color in hexadecimal to be set.
override Boolean If the options value should be override meaning that further config updates will have this new format set.
update Boolean If an update operation should be perform asynchronous.

setChoices(choices, events)

Updates the current internal state for parts material and colors, properly notifying any "listener" about these changes.
Source:
Parameters:
Name Type Description
choices Object The object that contains the state for every single part, material, and color.
events Boolean If the choices events should be triggered (defaults to 'true').

setCtx(ctx)

Changes the current base context object (ctx) that is going to be sent for (3D) build logic on crucial workflow state changes.
Source:
Parameters:
Name Type Description
ctx Object The new base context to be used.

setFormat(format, override, update)

Updates the format setting for the current ripe instance, propagating the change to any interested child. Optionally an update operation may be performed so that the format changes are reflected in the user interface.
Source:
Parameters:
Name Type Description
format String The image format to be used in the ripe instance (eg: png, webp, jpeg).
override Boolean If the options value should be override meaning that further config updates will have this new format set.
update Boolean If an update operation should be perform asynchronous.

setInitials(initials, engraving, events, params)

Changes the initials of the model, this is considered a simple legacy oriented strategy as the `setInitialsExtra` method should be used for more complex scenarios with multiple groups.
Source:
Parameters:
Name Type Description
initials String The initials value to be set.
engraving String The type of engraving to be set.
events Boolean If the events associated with the initials change should be triggered.
params Object Extra parameters that control the behaviour of the set initials operation.

setInitialsExtra(initialsExtra, events, params)

Changes the initials of the model using an object as the input which allows setting the initials for multiple groups at the same time.
Source:
Parameters:
Name Type Description
initialsExtra Object Object that contains the values of the initials and engraving for all the initial groups.
events Boolean If the events associated with the changing of the initials (extra) should be triggered.
params Object Extra parameters that control the behaviour of the set initials operation.

setOptions(options)

Sets Ripe instance options according to the defaulting policy.
Source:
Parameters:
Name Type Description
options Object An object with the options to configure the Ripe instance, such as: - 'variant' - The variant of the model. - 'version' - The version of the model, obtained from the containing build. - 'dku' - The DKU (Dynamic Keeping Unit) to be used in the configuration (if any). - 'parts' - The initial parts of the model. - 'country' - The country where the model will be sold. - 'currency' - The currency that should be used to calculate the price. - 'locale' - The locale to be used by default when localizing values. - 'flag' - A specific attribute of the model. - 'format' - The format of the image that is going to be retrieved in case of image visual and interactive. - 'backgroundColor' - The background color in RGB format to be used for images. - 'guess' - If the optimistic guess mode should be used for config resolution (internal). - 'guessUrl' - If base production URL should be guessed using GeoIP information. - 'remoteCalls' - If the remote calls (eg: 'on_config') should be called in the middle of configuration. - 'useBundles' - If the bundles should be loaded during initial loading. - 'useDefaults' - If the default parts of the model should be used when no initials parts are set. - 'useCombinations' - If the combinations should be loaded as part of the initial RIPE loading. - 'usePrice' - If the price should be automatically retrieved whenever there is a customization change. - 'useDiag' - If the diagnostics module should be used.

setPart(part, material, color, events, options)

Changes the material and color of the provided part. This operations is an expensive one and should be used carefully to avoid unwanted resource usage. If many operations are meant to be used at the same time the `setParts` parts method should be used instead, as it is better suited for bulk based operations.
Source:
Parameters:
Name Type Description
part String The name of the part to be changed.
material String The material to change to.
color String The color to change to.
events Boolean If the parts events should be triggered (defaults to 'true').
options Object The options to be used in the set part operations (for internal use)..

setParts(parts, events, options)

Allows changing the customization of a set of parts in bulk.
Source:
Parameters:
Name Type Description
parts Object An Object or array with part, material, color triplets to be set.
events Boolean If the parts events should be triggered (defaults to 'true').
options Object An object with options to configure the operation (for internal use).

setSize(size, override, update)

Updates the size setting for the current ripe instance, propagating the change to any interested child. Optionally an update operation may be performed so that the size changes are reflected in the user interface.
Source:
Parameters:
Name Type Description
size String The size (in pixels) of the image to be used.
override Boolean If the options value should be override meaning that further config updates will have this new format set.
update Boolean If an update operation should be perform asynchronous.

signin(username, password, options, callback) → {XMLHttpRequest}

Retrieves the complete set of session elements to be used, such as: the 'sid ', 'session_id', 'username ', 'name', 'email' and 'tokens'.
Source:
Parameters:
Name Type Description
username String The username to authenticate.
password String The username's password.
options Object An object of options to configure the request.
callback function Function with the result of the request.
Returns:
Type:
XMLHttpRequest
The XMLHttpRequest instance of the API request.

signinAdmin(username, password, options, callback) → {XMLHttpRequest}

Retrieves the complete set of session elements to be used, such as: the 'sid ', 'session_id', 'username ', 'name', 'email' and 'tokens'. This strategy uses the admin back-end for authentication.
Source:
Parameters:
Name Type Description
username String The username to authenticate.
password String The username's password.
options Object An object of options to configure the request.
callback function Function with the result of the request.
Returns:
Type:
XMLHttpRequest
The XMLHttpRequest instance of the API request.

signinPid(token, options, callback) → {XMLHttpRequest}

Retrieves the complete set of session elements to be used, such as: the 'sid ', 'session_id', 'username ', 'name', 'email'.
Source:
Parameters:
Name Type Description
token String The authentication token.
options Object An object of options to configure the request.
callback function Function with the result of the request.
Returns:
Type:
XMLHttpRequest
The XMLHttpRequest instance of the API request.

sizeToLocale(scale, value, gender, options, callback) → {XMLHttpRequest}

Converts a size value in the specified scale to the corresponding localized size. The available scales, genders and sizes can be obtained with the method getSizes.
Source:
Parameters:
Name Type Description
scale String The scale which one wants to convert from.
value Number The value which one wants to convert.
gender String The gender of the scale and value to be converted.
options Object An object of options to configure the request.
callback function Function with the result of the request.
Returns:
Type:
XMLHttpRequest
The XMLHttpRequest instance of the API request.

sizeToLocaleB(scales, values, genders, options, callback) → {XMLHttpRequest}

Converts multiple size values to the corresponding localized size. The available scales, genders and sizes can be obtained with the method getSizes.
Source:
Parameters:
Name Type Description
scales Array A list of scales to convert from.
values Array A list of values to convert.
genders Array A list of genders corresponding to the values.
options Object An object of options to configure the request.
callback function Function with the result of the request.
Returns:
Type:
XMLHttpRequest
The XMLHttpRequest instance of the API request.

sizeToNative(scale, value, gender, options, callback) → {XMLHttpRequest}

Converts a size value from the native scale to the corresponding value in the specified scale. The available scales, genders and sizes can be obtained with the getSizes.
Source:
Parameters:
Name Type Description
scale String The scale which one wants to convert to.
value Number The value which one wants to convert.
gender String The gender of the scale and value to be converted.
options Object An object of options to configure the request.
callback function Function with the result of the request.
Returns:
Type:
XMLHttpRequest
The XMLHttpRequest instance of the API request.

sizeToNativeB(scales, values, genders, options, callback) → {XMLHttpRequest}

Converts multiple size values from the native scale to the corresponding values in the specified scales. The available scales, genders and sizes can be obtained with the method getSizes.
Source:
Parameters:
Name Type Description
scales Array A list of scales to convert to.
values Array A list of values to convert.
genders Array A list of genders corresponding to the values.
options Object An object of options to configure the request.
callback function Function with the result of the request.
Returns:
Type:
XMLHttpRequest
The XMLHttpRequest instance of the API request.

switchArtifact(name, version, options) → {XMLHttpRequest}

Switches the active version of a build, changing the active version of the build to the version defined in the request.
Source:
Parameters:
Name Type Description
name String The name of the build to be switched.
version String The version of the build artifact.
options Object An object of options to configure the request.
Returns:
Type:
XMLHttpRequest
The XMLHttpRequest instance of the API request.

switchArtifactP(name, version, options) → {Promise}

Switches the active version of a build, changing the active version of the build to the version defined in the request.
Source:
Parameters:
Name Type Description
name String The name of the build to be switched.
version String The version of the build artifact.
options Object An object of options to configure the request.
Returns:
Type:
Promise
The build switch (as a promise).

switchBuild(name, options) → {XMLHttpRequest}

Switches the active version of a build, moving internal references to the newly selected build version.
Source:
Parameters:
Name Type Description
name String The name of the build to be switched.
options Object An object with options, such as: - 'version' - The version of the build to activate.
Returns:
Type:
XMLHttpRequest
The XMLHttpRequest instance of the API request.

switchBuildP(name, options) → {Promise}

Switches the active version of a build, moving internal references to the newly selected build version.
Source:
Parameters:
Name Type Description
name String The name of the build to be switched.
options Object An object with options, such as: - 'version' - The version of the build to activate.
Returns:
Type:
Promise
The build switch (as a promise).

unauth(options, callback)

Responsible for the beginning of the unauth process, triggering the 'unauth' event.
Source:
Parameters:
Name Type Description
options Object The set of options used for unauth process.
callback function The callback to be called once session is unauth'ed.

unbindInteractable(element) → {Interactable}

Unbinds ab Interactable from this Ripe instance.
Source:
Parameters:
Name Type Description
element Interactable The Interactable instance to be unbound.
Returns:
Type:
Interactable
Returns the unbounded Interactable.

undo()

Reverses the last change to the parts. It is possible to undo all the changes done from the initial state.
Source:

undoAll()

Executes the same operation as `undo` but goes all the way to the bottom of the stack that controls the history.
Source:

uninstallArtifact(name, version, options) → {XMLHttpRequest}

Uninstalls a build artifact by build name and artifact version.
Source:
Parameters:
Name Type Description
name String The name of the build associated with the artifact.
version String The version of the build artifact.
options Object An object of options to configure the request.
Returns:
Type:
XMLHttpRequest
The XMLHttpRequest instance of the API request.

uninstallArtifactP(name, version, options) → {Promise}

Uninstalls a build artifact by build name and artifact version.
Source:
Parameters:
Name Type Description
name String The name of the build associated with the artifact.
version String The version of the build artifact.
options Object An object of options to configure the request.
Returns:
Type:
Promise
The artifact uninstall (as a promise).

uninstallBuild(name, options) → {XMLHttpRequest}

Uninstalls a build from the server according to provided values.
Source:
Parameters:
Name Type Description
name String The name of the build to be uninstalled.
options Object An object with options, such as: - 'version' - The version of the build to uninstall, if no version is given, uninstalls all builds for the name.
Returns:
Type:
XMLHttpRequest
The XMLHttpRequest instance of the API request.

uninstallBuildP(name, options) → {Promise}

Uninstalls a build from the server according to provided values.
Source:
Parameters:
Name Type Description
name String The name of the build to be uninstalled.
options Object An object with options, such as: - 'version' - The version of the build to uninstall, if no version is given, uninstalls all builds for the name.
Returns:
Type:
Promise
The build uninstall (as a promise).

unload() → {Object}

Explicit entry point for the unloading of the RIPE instance. Should be called for a clean exit of the instance.
Source:
Returns:
Type:
Object
The current RIPE instance (for pipelining).

update(state, options, children)

Triggers the update of the children so that they represent the current state of the model. This is considered the many state change operation and should be called whenever a relevant internal state value is changed so that the visuals are updated in accordance.
Source:
Parameters:
Name Type Description
state Object An Object with the current customization and personalization, if not provided the current internal state of the instance will be used instead.
options Object Set of update options that change the way the update operation is going to be performed.
children Array The set of children that are going to be affected by the updated operation, if not provided all of the currently registered children in the instance will be used.
Returns:
The result of the update operation, meaning that if any child operation has been performed the result is true otherwise in case this is a no-op from the "visual" point of view the result is false.

updateBuild(name, options) → {XMLHttpRequest}

Updates a build to the latest version, maintaining the installation of the previous versions.
Source:
Parameters:
Name Type Description
name String The build's name of the build to update name.
options Object An object of options to configure the request.
Returns:
Type:
XMLHttpRequest
The XMLHttpRequest instance of the API request.

updateBuildP(name, options) → {Promise}

Updates a build to the latest version, maintaining the installation of the previous versions.
Source:
Parameters:
Name Type Description
name String The build's name of the build to update name.
options Object An object of options to configure the request.
Returns:
Type:
Promise
The build update (as a promise).

updateCountryGroup(id, countryGroup, options, callback, callback) → {XMLHttpRequest}

Updates an existing country group.
Source:
Parameters:
Name Type Description
id Object Id of the country group to be updated.
countryGroup Object An object with the updated information of the country group.
options Object An object of options to configure the request.
callback function Function with the result of the request.
callback function Function with the result of the request.
Returns:
Type:
XMLHttpRequest
The XMLHttpRequest instance of the API request.

updateCountryGroupP(id, countryGroup, options) → {Promise}

Updates an existing country group.
Source:
Parameters:
Name Type Description
id Object Id of the country group to be updated.
countryGroup Object An object with the updated information of the country group.
options Object An object of options to configure the request.
Returns:
Type:
Promise
The orders result list.

updatePriceRule(priceRule, options, callback) → {XMLHttpRequest}

Updates a Price Rule on RIPE Core.
Source:
Parameters:
Name Type Description
priceRule Object The Price Rule object
options Object An object of options to configure the request
callback function Function with the result of the request.
Returns:
Type:
XMLHttpRequest
Resulting information for the callback execution.

updatePriceRuleP(priceRule, options) → {Promise}

Updates a Price Rule on RIPE Core.
Source:
Parameters:
Name Type Description
priceRule Object The Price Rule object
options Object An object of options to configure the request
Returns:
Type:
Promise
The Price Rule's data.