encode<V> static method

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

Implementation

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