This class contains the configuration required for communication with the Connect platform.

Constructor

new(apiUrl:String, apiKey:String, products:Collection<String>, data:Dictionary)

Creates a new Config object. You don't normally create objects of this class, since the SDK uses the default instance provided by Env.getConfig().

Methods

getApiKey():String

Returns:

Authorization key.

getApiUrl():String

Returns:

Endpoint to interact with Connect API.

getData(key:String):Dynamic

Returns:

The value of the data with the given key stored in the config. When config is loaded from a file, all the additional data found in the file is included in the config and can be retrieved with this method.

getProductsString():String

Get the entire list of products supported by this configuration, or an empty string if the configuration does not contain a product list.

Returns:

A string with a comma-separated list of products.

hasProduct(productId:String):Bool

Tells whether the configuration is setup to process the specified product.

Parameters:

productId

The id of the product.

Returns:

true if the configuration is setup to process the specified product, false otherwise.