encode<V> static method

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

Implementation

static V encode<V>(
  GelatoVerificationSessionOptions instance,
  Encoder<V> encoder,
) {
  final container = encoder.container<String>();
  if (instance.document != null) {
    GelatoSessionDocumentOptions.encode(
      instance.document!,
      container.nestedSingleValueContainer('document').encoder,
    );
  }
  if (instance.idNumber != null) {
    GelatoSessionIdNumberOptions.encode(
      instance.idNumber!,
      container.nestedSingleValueContainer('id_number').encoder,
    );
  }
  return container.value;
}