BrandAPI

@protocol BrandAPI <NSObject>

Protocol of the Brand API methods.

  • Returns the configuration information of the owner’s current model.

    To retrieve the configuration of a specific model the method -[BrandAPI getConfig:callback:] should be used.

    Declaration

    Objective-C

    - (void)getConfig:(nonnull void (^)(NSDictionary *_Nonnull))callback;

    Swift

    optional func getConfig(_ callback: ((UnsafeMutablePointer<Int32>?) -> Void)!)

    Parameters

    callback

    A Block that will the receive the configuration as parameter.

  • 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.

    The options map accepts the following keys:

    • 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 TRUE).

    Declaration

    Objective-C

    - (void)getConfig:(NSDictionary *_Nullable)options
             callback:(nonnull void (^)(NSDictionary *_Nonnull))callback;

    Swift

    optional func getConfig(_ options: Any!, callback: ((UnsafeMutablePointer<Int32>?) -> Void)!)

    Parameters

    options

    A map with options.

    callback

    A Block that will the receive the configuration as parameter.

  • Returns the configuration information of the owner’s current model.

    To retrieve the configuration of a specific model the method -[BrandAPI getConfigP:callback:] should be used.

    Declaration

    Objective-C

    - (nonnull Promise *)getConfigP;

    Swift

    optional func getConfigP() -> Any!

    Return Value

    A Promise that will be resolved with the configuration.

  • 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.

    The options map accepts the following keys:

    • 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 TRUE).

    Declaration

    Objective-C

    - (nonnull Promise *)getConfigP:(nonnull NSDictionary *)options;

    Swift

    optional func getConfigP(_ options: Any!) -> Any!

    Parameters

    options

    A map with options.

    Return Value

    A Promise that will be resolved with the configuration.