encode<V> static method

V encode<V>(
  1. LegalEntityCompanyVerificationDocument instance,
  2. Encoder<V> encoder
)

Implementation

static V encode<V>(
  LegalEntityCompanyVerificationDocument instance,
  Encoder<V> encoder,
) {
  final container = encoder.container<String>();
  if (instance.back != null) {
    FileOrId.encode(
      instance.back!,
      container.nestedSingleValueContainer('back').encoder,
    );
  }
  if (instance.details != null) {
    container.encodeString(
      'details',
      instance.details!,
    );
  }
  if (instance.detailsCode != null) {
    container.encodeString(
      'details_code',
      instance.detailsCode!,
    );
  }
  if (instance.front != null) {
    FileOrId.encode(
      instance.front!,
      container.nestedSingleValueContainer('front').encoder,
    );
  }
  return container.value;
}