encode<V> static method

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

Implementation

static V encode<V>(
  PaymentMethodOptionsBancontact instance,
  Encoder<V> encoder,
) {
  final container = encoder.container<String>();
  InvoicePaymentMethodOptionsBancontactPreferredLanguage.encode(
    instance.preferredLanguage,
    container.nestedSingleValueContainer('preferred_language').encoder,
  );
  if (instance.setupFutureUsage != null) {
    CheckoutLinkPaymentMethodOptionsSetupFutureUsage.encode(
      instance.setupFutureUsage!,
      container.nestedSingleValueContainer('setup_future_usage').encoder,
    );
  }
  return container.value;
}