VGSCollect

VGS Collect allows you to securely collect data and files from your users without having to have them pass through your systems. Entry-point to the Collect SDK.

Since

1.0.0

Constructors

Link copied to clipboard
constructor(context: Context, id: String, environment: String)
constructor(context: Context, id: String, environment: Environment = Environment.SANDBOX)
constructor(context: Context, id: String, environmentType: String, suffix: String)

Types

Link copied to clipboard
class Builder(context: Context, id: String)

Used to create VGSCollect instances with default and overridden settings.

Functions

Link copied to clipboard

This method adds a listener whose methods are called whenever VGS secure fields state changes.

Link copied to clipboard

Adds a listener to the list of those whose methods are called whenever the VGSCollect receive response from Server.

Link copied to clipboard
fun asyncSubmit(request: VGSRequest)
fun asyncSubmit(path: String, method: HTTPMethod)

This method executes and send data on VGS Server.

Link copied to clipboard
fun bindView(vararg views: InputFieldView?)

Allows VGS secure fields to interact with VGSCollect and collect data from this source.

Link copied to clipboard

Clear all response listeners attached before.

Link copied to clipboard

Returns the states of all fields bound before to VGSCollect.

Link copied to clipboard

Return instance for managing attached files to request.

Link copied to clipboard
fun onActivityResult(requestCode: Int, resultCode: Int, data: Intent?)

Called when an activity you launched exits, giving you the requestCode you started it with, the resultCode is returned, and any additional data for VGSCollect. Preferably call it inside onActivityResult system's callback.

Link copied to clipboard
fun onDestroy()

Clear all information collected before by VGSCollect. Preferably call it inside onDestroy system's callback.

Link copied to clipboard

Clear specific listener attached before.

Link copied to clipboard

Reset all static custom data which added before. This method has no impact on all custom data that were added with VGSRequest

Link copied to clipboard

Reset all static headers which added before. This method has no impact on all custom data that were added with VGSRequest

Link copied to clipboard

If you want to disable collecting analytics from VGS Collect SDK, you can set the value to false. This helps us to understand which areas require improvements. No personal information is tracked.

Link copied to clipboard
fun setCustomData(data: Map<String, Any>?)

It collect custom data which will be send to server. This is static custom data that are stored and attach for all requests until resetCustomData method will be called.

Link copied to clipboard

It collects headers that will be sent to the server. This is static headers that are stored and attach for all requests until @resetCustomHeaders method will be called.

Link copied to clipboard
fun submit(path: String, method: HTTPMethod = HTTPMethod.POST): VGSResponse

This method executes and send data on VGS Server. It could be useful if you want to handle multithreading by yourself. Do not use this method on the UI thread as this may crash.

Link copied to clipboard
suspend fun submitAsync(request: VGSRequest): VGSResponse
suspend fun submitAsync(path: String, method: HTTPMethod = HTTPMethod.POST): VGSResponse

This suspend method executes and send data on VGS Server on IO dispatcher.

Link copied to clipboard
fun tokenize()

The method sends data on VGS Server for tokenization.

Link copied to clipboard
fun unbindView(vararg views: InputFieldView?)

Allows to unsubscribe from a View updates.