encode<V> static method

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

Implementation

static V encode<V>(
  IssuingCardApplePay instance,
  Encoder<V> encoder,
) {
  final container = encoder.container<String>();
  container.encodeBool(
    'eligible',
    instance.eligible,
  );
  if (instance.ineligibleReason != null) {
    container.encodeString(
      'ineligible_reason',
      instance.ineligibleReason!,
    );
  }
  return container.value;
}