11package com .yoti .api .client .docs .session .create ;
22
3+ import java .util .ArrayList ;
4+ import java .util .List ;
5+
36import com .yoti .api .client .docs .DocScanConstants ;
47
58import com .fasterxml .jackson .annotation .JsonProperty ;
@@ -54,6 +57,9 @@ public class SdkConfig {
5457 @ JsonProperty (Property .BIOMETRIC_CONSENT_FLOW )
5558 private final String biometricConsentFlow ;
5659
60+ @ JsonProperty (Property .SUPPRESSED_SCREENS )
61+ private final List <String > suppressedScreens ;
62+
5763 SdkConfig (String allowedCaptureMethods ,
5864 String primaryColour ,
5965 String primaryColourDarkMode ,
@@ -68,7 +74,8 @@ public class SdkConfig {
6874 Boolean allowHandoff ,
6975 AttemptsConfiguration attemptsConfiguration ,
7076 String brandId ,
71- String biometricConsentFlow ) {
77+ String biometricConsentFlow ,
78+ List <String > suppressedScreens ) {
7279 this .allowedCaptureMethods = allowedCaptureMethods ;
7380 this .primaryColour = primaryColour ;
7481 this .primaryColourDarkMode = primaryColourDarkMode ;
@@ -84,6 +91,7 @@ public class SdkConfig {
8491 this .attemptsConfiguration = attemptsConfiguration ;
8592 this .brandId = brandId ;
8693 this .biometricConsentFlow = biometricConsentFlow ;
94+ this .suppressedScreens = suppressedScreens ;
8795 }
8896
8997 public static SdkConfig .Builder builder () {
@@ -225,6 +233,15 @@ public String getBiometricConsentFlow() {
225233 return biometricConsentFlow ;
226234 }
227235
236+ /**
237+ * The list of screens to suppress in the end-user flow
238+ *
239+ * @return the list of suppressed screens
240+ */
241+ public List <String > getSuppressedScreens () {
242+ return suppressedScreens ;
243+ }
244+
228245 /**
229246 * Builder to assist in the creation of {@link SdkConfig}.
230247 */
@@ -245,8 +262,10 @@ public static class Builder {
245262 private AttemptsConfiguration attemptsConfiguration ;
246263 private String brandId ;
247264 private String biometricConsentFlow ;
265+ private List <String > suppressedScreens ;
248266
249- private Builder () {}
267+ private Builder () {
268+ }
250269
251270 /**
252271 * Sets the allowed capture method to "CAMERA"
@@ -476,6 +495,20 @@ public Builder withBiometricConsentFlowJustInTime() {
476495 return withBiometricConsentFlow (DocScanConstants .JUST_IN_TIME );
477496 }
478497
498+ /**
499+ * Add a named screen to the list of suppressed screen in the end-user flow
500+ *
501+ * @param suppressedScreen the name of the screen to suppress
502+ * @return the builder
503+ */
504+ public Builder withSuppressedScreen (String suppressedScreen ) {
505+ if (suppressedScreens == null ) {
506+ suppressedScreens = new ArrayList <>();
507+ }
508+ suppressedScreens .add (suppressedScreen );
509+ return this ;
510+ }
511+
479512 /**
480513 * Builds the {@link SdkConfig} using the values supplied to the builder
481514 *
@@ -497,7 +530,8 @@ public SdkConfig build() {
497530 allowHandoff ,
498531 attemptsConfiguration ,
499532 brandId ,
500- biometricConsentFlow
533+ biometricConsentFlow ,
534+ suppressedScreens
501535 );
502536 }
503537 }
@@ -519,6 +553,7 @@ private static final class Property {
519553 private static final String ATTEMPTS_CONFIGURATION = "attempts_configuration" ;
520554 private static final String BRAND_ID = "brand_id" ;
521555 private static final String BIOMETRIC_CONSENT_FLOW = "biometric_consent_flow" ;
556+ private static final String SUPPRESSED_SCREENS = "suppressed_screens" ;
522557
523558 private Property () {}
524559
0 commit comments