encode<V> static method

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

Implementation

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