encode<V> static method

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

Implementation

static V encode<V>(
  PaymentIntentPaymentMethodOptionsSepaDebit instance,
  Encoder<V> encoder,
) {
  final container = encoder.container<String>();
  if (instance.mandateOptions != null) {
    PaymentIntentPaymentMethodOptionsMandateOptionsSepaDebit.encode(
      instance.mandateOptions!,
      container.nestedSingleValueContainer('mandate_options').encoder,
    );
  }
  if (instance.setupFutureUsage != null) {
    CheckoutAcssDebitPaymentMethodOptionsSetupFutureUsage.encode(
      instance.setupFutureUsage!,
      container.nestedSingleValueContainer('setup_future_usage').encoder,
    );
  }
  return container.value;
}