fields

Converts all natural person text KYC fields to a map for SEP-9 submission.

Only fields with non-null values are included in the result. Date fields are serialized as ISO 8601 date-only format (YYYY-MM-DD) using LocalDate.toString(). Nested financial account and card fields are automatically included.

Return

Map of field keys to string values for all non-null text fields

Example:

val person = NaturalPersonKYCFields(
firstName = "John",
lastName = "Doe",
birthDate = LocalDate(1990, 1, 15),
emailAddress = "john@example.com"
)

val fields = person.fields()
// Result: {
// "first_name": "John",
// "last_name": "Doe",
// "birth_date": "1990-01-15",
// "email_address": "john@example.com"
// }