Closed vasct closed 8 months ago
Example usage would look like this:
Kotlin
CleverTapApi.register { templatesSet( function(isVisual = false) { name("function") stringArgument("string", "") booleanArgument("bool", true) }, template { name("template") mapArgument("map", mapOf("int" to 5)) }, ) }
or
TemplatesManager.register { setOf( FunctionBuilder(isVisual = false) .name("function") .stringArgument("string", "") .booleanArgument("bool", true) .build(), TemplateBuilder() .name("template") .mapArgument("map", mapOf("int" to 5)) .build() ) }
Java:
CleverTapApi.register(ctConfig -> { Set<CustomTemplate> templates = new HashSet<>(); templates.add( new FunctionBuilder(false) .name("function") .stringArgument("string", "") .booleanArgument("bool", true) .build()); Map<String, Object> mapArgument = new HashMap<>(); mapArgument.put("int", 5); templates.add( new TemplateBuilder() .name("template") .mapArgument("map", mapArgument) .build() ); return templates; });
CleverTapApi.register(ctConfig -> templatesSet( new TemplateBuilder() .name("name") .booleanArgument("bool", true) .fileArgument("file") .build(), new FunctionBuilder(true) .name("asd") .build() ) );
Added a few more test cases.
Example usage would look like this:
Kotlin
or
Java:
or