encode<V> static method

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

Implementation

static V encode<V>(
  IssuingCardholderRequirements instance,
  Encoder<V> encoder,
) {
  final container = encoder.container<String>();
  if (instance.disabledReason != null) {
    container.encodeString(
      'disabled_reason',
      instance.disabledReason!,
    );
  }
  if (instance.pastDue != null) {
    container.encodeList(
      'past_due',
      (container) =>
          instance.pastDue!.forEach((el) => container.encodeString(el)),
    );
  }
  return container.value;
}