@@ -285,6 +285,12 @@ private constructor(
285285 class Filters
286286 @JsonCreator
287287 private constructor (
288+ @JsonProperty(" exclude_countries" )
289+ @ExcludeMissing
290+ private val excludeCountries: JsonField <List <String >> = JsonMissing .of(),
291+ @JsonProperty(" exclude_mccs" )
292+ @ExcludeMissing
293+ private val excludeMccs: JsonField <List <String >> = JsonMissing .of(),
288294 @JsonProperty(" include_countries" )
289295 @ExcludeMissing
290296 private val includeCountries: JsonField <List <String >> = JsonMissing .of(),
@@ -295,6 +301,20 @@ private constructor(
295301 private val additionalProperties: Map <String , JsonValue > = immutableEmptyMap(),
296302 ) {
297303
304+ /* *
305+ * ISO-3166-1 alpha-3 Country Codes to exclude from the velocity calculation. Transactions
306+ * matching any of the provided will be excluded from the calculated velocity.
307+ */
308+ fun excludeCountries (): Optional <List <String >> =
309+ Optional .ofNullable(excludeCountries.getNullable(" exclude_countries" ))
310+
311+ /* *
312+ * Merchant Category Codes to exclude from the velocity calculation. Transactions matching
313+ * this MCC will be excluded from the calculated velocity.
314+ */
315+ fun excludeMccs (): Optional <List <String >> =
316+ Optional .ofNullable(excludeMccs.getNullable(" exclude_mccs" ))
317+
298318 /* *
299319 * ISO-3166-1 alpha-3 Country Codes to include in the velocity calculation. Transactions not
300320 * matching any of the provided will not be included in the calculated velocity.
@@ -309,6 +329,22 @@ private constructor(
309329 fun includeMccs (): Optional <List <String >> =
310330 Optional .ofNullable(includeMccs.getNullable(" include_mccs" ))
311331
332+ /* *
333+ * ISO-3166-1 alpha-3 Country Codes to exclude from the velocity calculation. Transactions
334+ * matching any of the provided will be excluded from the calculated velocity.
335+ */
336+ @JsonProperty(" exclude_countries" )
337+ @ExcludeMissing
338+ fun _excludeCountries (): JsonField <List <String >> = excludeCountries
339+
340+ /* *
341+ * Merchant Category Codes to exclude from the velocity calculation. Transactions matching
342+ * this MCC will be excluded from the calculated velocity.
343+ */
344+ @JsonProperty(" exclude_mccs" )
345+ @ExcludeMissing
346+ fun _excludeMccs (): JsonField <List <String >> = excludeMccs
347+
312348 /* *
313349 * ISO-3166-1 alpha-3 Country Codes to include in the velocity calculation. Transactions not
314350 * matching any of the provided will not be included in the calculated velocity.
@@ -336,6 +372,8 @@ private constructor(
336372 return @apply
337373 }
338374
375+ excludeCountries()
376+ excludeMccs()
339377 includeCountries()
340378 includeMccs()
341379 validated = true
@@ -352,17 +390,91 @@ private constructor(
352390 /* * A builder for [Filters]. */
353391 class Builder internal constructor() {
354392
393+ private var excludeCountries: JsonField <MutableList <String >>? = null
394+ private var excludeMccs: JsonField <MutableList <String >>? = null
355395 private var includeCountries: JsonField <MutableList <String >>? = null
356396 private var includeMccs: JsonField <MutableList <String >>? = null
357397 private var additionalProperties: MutableMap <String , JsonValue > = mutableMapOf ()
358398
359399 @JvmSynthetic
360400 internal fun from (filters : Filters ) = apply {
401+ excludeCountries = filters.excludeCountries.map { it.toMutableList() }
402+ excludeMccs = filters.excludeMccs.map { it.toMutableList() }
361403 includeCountries = filters.includeCountries.map { it.toMutableList() }
362404 includeMccs = filters.includeMccs.map { it.toMutableList() }
363405 additionalProperties = filters.additionalProperties.toMutableMap()
364406 }
365407
408+ /* *
409+ * ISO-3166-1 alpha-3 Country Codes to exclude from the velocity calculation.
410+ * Transactions matching any of the provided will be excluded from the calculated
411+ * velocity.
412+ */
413+ fun excludeCountries (excludeCountries : List <String >? ) =
414+ excludeCountries(JsonField .ofNullable(excludeCountries))
415+
416+ /* *
417+ * ISO-3166-1 alpha-3 Country Codes to exclude from the velocity calculation.
418+ * Transactions matching any of the provided will be excluded from the calculated
419+ * velocity.
420+ */
421+ fun excludeCountries (excludeCountries : Optional <List <String >>) =
422+ excludeCountries(excludeCountries.getOrNull())
423+
424+ /* *
425+ * ISO-3166-1 alpha-3 Country Codes to exclude from the velocity calculation.
426+ * Transactions matching any of the provided will be excluded from the calculated
427+ * velocity.
428+ */
429+ fun excludeCountries (excludeCountries : JsonField <List <String >>) = apply {
430+ this .excludeCountries = excludeCountries.map { it.toMutableList() }
431+ }
432+
433+ /* *
434+ * ISO-3166-1 alpha-3 Country Codes to exclude from the velocity calculation.
435+ * Transactions matching any of the provided will be excluded from the calculated
436+ * velocity.
437+ */
438+ fun addExcludeCountry (excludeCountry : String ) = apply {
439+ excludeCountries =
440+ (excludeCountries ? : JsonField .of(mutableListOf ())).also {
441+ checkKnown(" excludeCountries" , it).add(excludeCountry)
442+ }
443+ }
444+
445+ /* *
446+ * Merchant Category Codes to exclude from the velocity calculation. Transactions
447+ * matching this MCC will be excluded from the calculated velocity.
448+ */
449+ fun excludeMccs (excludeMccs : List <String >? ) =
450+ excludeMccs(JsonField .ofNullable(excludeMccs))
451+
452+ /* *
453+ * Merchant Category Codes to exclude from the velocity calculation. Transactions
454+ * matching this MCC will be excluded from the calculated velocity.
455+ */
456+ fun excludeMccs (excludeMccs : Optional <List <String >>) =
457+ excludeMccs(excludeMccs.getOrNull())
458+
459+ /* *
460+ * Merchant Category Codes to exclude from the velocity calculation. Transactions
461+ * matching this MCC will be excluded from the calculated velocity.
462+ */
463+ fun excludeMccs (excludeMccs : JsonField <List <String >>) = apply {
464+ this .excludeMccs = excludeMccs.map { it.toMutableList() }
465+ }
466+
467+ /* *
468+ * Merchant Category Codes to exclude from the velocity calculation. Transactions
469+ * matching this MCC will be excluded from the calculated velocity.
470+ */
471+ fun addExcludeMcc (excludeMcc : String ) = apply {
472+ excludeMccs =
473+ (excludeMccs ? : JsonField .of(mutableListOf ())).also {
474+ checkKnown(" excludeMccs" , it).add(excludeMcc)
475+ }
476+ }
477+
366478 /* *
367479 * ISO-3166-1 alpha-3 Country Codes to include in the velocity calculation. Transactions
368480 * not matching any of the provided will not be included in the calculated velocity.
@@ -450,6 +562,8 @@ private constructor(
450562
451563 fun build (): Filters =
452564 Filters (
565+ (excludeCountries ? : JsonMissing .of()).map { it.toImmutable() },
566+ (excludeMccs ? : JsonMissing .of()).map { it.toImmutable() },
453567 (includeCountries ? : JsonMissing .of()).map { it.toImmutable() },
454568 (includeMccs ? : JsonMissing .of()).map { it.toImmutable() },
455569 additionalProperties.toImmutable(),
@@ -461,17 +575,17 @@ private constructor(
461575 return true
462576 }
463577
464- return /* spotless:off */ other is Filters && includeCountries == other.includeCountries && includeMccs == other.includeMccs && additionalProperties == other.additionalProperties /* spotless:on */
578+ return /* spotless:off */ other is Filters && excludeCountries == other.excludeCountries && excludeMccs == other.excludeMccs && includeCountries == other.includeCountries && includeMccs == other.includeMccs && additionalProperties == other.additionalProperties /* spotless:on */
465579 }
466580
467581 /* spotless:off */
468- private val hashCode: Int by lazy { Objects .hash(includeCountries, includeMccs, additionalProperties) }
582+ private val hashCode: Int by lazy { Objects .hash(excludeCountries, excludeMccs, includeCountries, includeMccs, additionalProperties) }
469583 /* spotless:on */
470584
471585 override fun hashCode (): Int = hashCode
472586
473587 override fun toString () =
474- " Filters{includeCountries=$includeCountries , includeMccs=$includeMccs , additionalProperties=$additionalProperties }"
588+ " Filters{excludeCountries= $excludeCountries , excludeMccs= $excludeMccs , includeCountries=$includeCountries , includeMccs=$includeMccs , additionalProperties=$additionalProperties }"
475589 }
476590
477591 /* *
0 commit comments