Skip to main content

Survey

A survey the user qualifies for based on their receipt.

Package: com.microblink.core

Declaration

class Survey : Parcelable

Quick Reference​

Properties​

PropertyDescription
serverId()Server-assigned survey identifier
slug()Human-readable survey identifier
clientUserId()Client-supplied user identifier
startDate()Survey availability start date
endDate()Survey availability end date
rewardValue()Reward value awarded upon completion
questions()Ordered list of questions in this survey

Methods​

MethodDescription
newBuilder()Creates a Survey.Builder

Properties​

serverId()​

fun serverId(): Int

Server-assigned survey identifier.


slug()​

fun slug(): String?

Human-readable survey identifier.


clientUserId()​

fun clientUserId(): String?

Client-supplied user identifier associated with this survey instance.


startDate()​

fun startDate(): String?

Survey availability start date.


endDate()​

fun endDate(): String?

Survey availability end date.


rewardValue()​

fun rewardValue(): String?

Reward value awarded upon survey completion.


questions()​

fun questions(): List<SurveyQuestion>?

Ordered list of questions in this survey. See SurveyQuestion.


Methods​

newBuilder()​

// Java static method
fun newBuilder(): Survey.Builder

Returns a Survey.Builder with one setter per property (.serverId(Int), .slug(String?), .clientUserId(String?), .startDate(String?), .endDate(String?), .rewardValue(String?), .questions(List<SurveyQuestion>?)) and build(). Useful for test fixtures.