encode<V> static method

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

Implementation

static V encode<V>(
  IssuingCardholderIndividual instance,
  Encoder<V> encoder,
) {
  final container = encoder.container<String>();
  if (instance.cardIssuing != null) {
    IssuingCardholderIndividualCardIssuing.encode(
      instance.cardIssuing!,
      container.nestedSingleValueContainer('card_issuing').encoder,
    );
  }
  if (instance.dob != null) {
    GelatoDataVerifiedOutputsDate.encode(
      instance.dob!,
      container.nestedSingleValueContainer('dob').encoder,
    );
  }
  if (instance.firstName != null) {
    container.encodeString(
      'first_name',
      instance.firstName!,
    );
  }
  if (instance.lastName != null) {
    container.encodeString(
      'last_name',
      instance.lastName!,
    );
  }
  if (instance.verification != null) {
    IssuingCardholderIndividualVerification.encode(
      instance.verification!,
      container.nestedSingleValueContainer('verification').encoder,
    );
  }
  return container.value;
}