encode<V> static method

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

Implementation

static V encode<V>(
  SetupAttemptPaymentMethodDetailsCardPresent instance,
  Encoder<V> encoder,
) {
  final container = encoder.container<String>();
  if (instance.generatedCard != null) {
    PaymentMethodOrId.encode(
      instance.generatedCard!,
      container.nestedSingleValueContainer('generated_card').encoder,
    );
  }
  return container.value;
}