encode<V> static method

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

Implementation

static V encode<V>(
  CheckoutAcssDebitPaymentMethodOptions instance,
  Encoder<V> encoder,
) {
  final container = encoder.container<String>();
  if (instance.currency != null) {
    container.encodeString(
      'currency',
      instance.currency!,
    );
  }
  if (instance.mandateOptions != null) {
    CheckoutAcssDebitMandateOptions.encode(
      instance.mandateOptions!,
      container.nestedSingleValueContainer('mandate_options').encoder,
    );
  }
  if (instance.setupFutureUsage != null) {
    container.encodeString(
      'setup_future_usage',
      instance.setupFutureUsage!,
    );
  }
  if (instance.verificationMethod != null) {
    container.encodeString(
      'verification_method',
      instance.verificationMethod!,
    );
  }
  return container.value;
}