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,7 @@ public class SdkConfig {
6874 Boolean allowHandoff ,
6975 AttemptsConfiguration attemptsConfiguration ,
7076 String brandId ,
71- String biometricConsentFlow ) {
77+ String biometricConsentFlow , List < String > suppressedScreens ) {
7278 this .allowedCaptureMethods = allowedCaptureMethods ;
7379 this .primaryColour = primaryColour ;
7480 this .primaryColourDarkMode = primaryColourDarkMode ;
@@ -84,6 +90,7 @@ public class SdkConfig {
8490 this .attemptsConfiguration = attemptsConfiguration ;
8591 this .brandId = brandId ;
8692 this .biometricConsentFlow = biometricConsentFlow ;
93+ this .suppressedScreens = suppressedScreens ;
8794 }
8895
8996 public static SdkConfig .Builder builder () {
@@ -225,6 +232,15 @@ public String getBiometricConsentFlow() {
225232 return biometricConsentFlow ;
226233 }
227234
235+ /**
236+ * The list of screens to suppress in the end-user flow
237+ *
238+ * @return the list of suppressed screens
239+ */
240+ public List <String > getSuppressedScreens () {
241+ return suppressedScreens ;
242+ }
243+
228244 /**
229245 * Builder to assist in the creation of {@link SdkConfig}.
230246 */
@@ -245,8 +261,10 @@ public static class Builder {
245261 private AttemptsConfiguration attemptsConfiguration ;
246262 private String brandId ;
247263 private String biometricConsentFlow ;
264+ private List <String > suppressedScreens ;
248265
249- private Builder () {}
266+ private Builder () {
267+ }
250268
251269 /**
252270 * Sets the allowed capture method to "CAMERA"
@@ -476,6 +494,20 @@ public Builder withBiometricConsentFlowJustInTime() {
476494 return withBiometricConsentFlow (DocScanConstants .JUST_IN_TIME );
477495 }
478496
497+ /**
498+ * Add a named screen to the list of suppressed screen in the end-user flow
499+ *
500+ * @param suppressedScreen the name of the screen to suppress
501+ * @return the builder
502+ */
503+ public Builder withSuppressedScreen (String suppressedScreen ) {
504+ if (suppressedScreens == null ) {
505+ suppressedScreens = new ArrayList <>();
506+ }
507+ suppressedScreens .add (suppressedScreen );
508+ return this ;
509+ }
510+
479511 /**
480512 * Builds the {@link SdkConfig} using the values supplied to the builder
481513 *
@@ -497,7 +529,8 @@ public SdkConfig build() {
497529 allowHandoff ,
498530 attemptsConfiguration ,
499531 brandId ,
500- biometricConsentFlow
532+ biometricConsentFlow ,
533+ suppressedScreens
501534 );
502535 }
503536 }
@@ -519,8 +552,10 @@ private static final class Property {
519552 private static final String ATTEMPTS_CONFIGURATION = "attempts_configuration" ;
520553 private static final String BRAND_ID = "brand_id" ;
521554 private static final String BIOMETRIC_CONSENT_FLOW = "biometric_consent_flow" ;
555+ private static final String SUPPRESSED_SCREENS = "suppressed_screens" ;
522556
523- private Property () {}
557+ private Property () {
558+ }
524559
525560 }
526561
0 commit comments