1
1
package com .yoti .api .client .docs .session .create ;
2
2
3
+ import java .util .ArrayList ;
4
+ import java .util .List ;
5
+
3
6
import com .yoti .api .client .docs .DocScanConstants ;
4
7
5
8
import com .fasterxml .jackson .annotation .JsonProperty ;
@@ -54,6 +57,9 @@ public class SdkConfig {
54
57
@ JsonProperty (Property .BIOMETRIC_CONSENT_FLOW )
55
58
private final String biometricConsentFlow ;
56
59
60
+ @ JsonProperty (Property .SUPPRESSED_SCREENS )
61
+ private final List <String > suppressedScreens ;
62
+
57
63
SdkConfig (String allowedCaptureMethods ,
58
64
String primaryColour ,
59
65
String primaryColourDarkMode ,
@@ -68,7 +74,8 @@ public class SdkConfig {
68
74
Boolean allowHandoff ,
69
75
AttemptsConfiguration attemptsConfiguration ,
70
76
String brandId ,
71
- String biometricConsentFlow ) {
77
+ String biometricConsentFlow ,
78
+ List <String > suppressedScreens ) {
72
79
this .allowedCaptureMethods = allowedCaptureMethods ;
73
80
this .primaryColour = primaryColour ;
74
81
this .primaryColourDarkMode = primaryColourDarkMode ;
@@ -84,6 +91,7 @@ public class SdkConfig {
84
91
this .attemptsConfiguration = attemptsConfiguration ;
85
92
this .brandId = brandId ;
86
93
this .biometricConsentFlow = biometricConsentFlow ;
94
+ this .suppressedScreens = suppressedScreens ;
87
95
}
88
96
89
97
public static SdkConfig .Builder builder () {
@@ -225,6 +233,15 @@ public String getBiometricConsentFlow() {
225
233
return biometricConsentFlow ;
226
234
}
227
235
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
+
228
245
/**
229
246
* Builder to assist in the creation of {@link SdkConfig}.
230
247
*/
@@ -245,8 +262,10 @@ public static class Builder {
245
262
private AttemptsConfiguration attemptsConfiguration ;
246
263
private String brandId ;
247
264
private String biometricConsentFlow ;
265
+ private List <String > suppressedScreens ;
248
266
249
- private Builder () {}
267
+ private Builder () {
268
+ }
250
269
251
270
/**
252
271
* Sets the allowed capture method to "CAMERA"
@@ -476,6 +495,20 @@ public Builder withBiometricConsentFlowJustInTime() {
476
495
return withBiometricConsentFlow (DocScanConstants .JUST_IN_TIME );
477
496
}
478
497
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
+
479
512
/**
480
513
* Builds the {@link SdkConfig} using the values supplied to the builder
481
514
*
@@ -497,7 +530,8 @@ public SdkConfig build() {
497
530
allowHandoff ,
498
531
attemptsConfiguration ,
499
532
brandId ,
500
- biometricConsentFlow
533
+ biometricConsentFlow ,
534
+ suppressedScreens
501
535
);
502
536
}
503
537
}
@@ -519,6 +553,7 @@ private static final class Property {
519
553
private static final String ATTEMPTS_CONFIGURATION = "attempts_configuration" ;
520
554
private static final String BRAND_ID = "brand_id" ;
521
555
private static final String BIOMETRIC_CONSENT_FLOW = "biometric_consent_flow" ;
556
+ private static final String SUPPRESSED_SCREENS = "suppressed_screens" ;
522
557
523
558
private Property () {}
524
559
0 commit comments