encode<V> static method
Implementation
static V encode<V>(
PersonDocuments instance,
Encoder<V> encoder,
) {
final container = encoder.container<String>();
if (instance.companyAuthorization != null) {
PersonCompanyAuthorization.encode(
instance.companyAuthorization!,
container.nestedSingleValueContainer('company_authorization').encoder,
);
}
if (instance.passport != null) {
PersonCompanyAuthorization.encode(
instance.passport!,
container.nestedSingleValueContainer('passport').encoder,
);
}
if (instance.visa != null) {
PersonCompanyAuthorization.encode(
instance.visa!,
container.nestedSingleValueContainer('visa').encoder,
);
}
return container.value;
}