encode<V> static method

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

Implementation

static V encode<V>(
  SessionUsBankAccount instance,
  Encoder<V> encoder,
) {
  final container = encoder.container<String>();
  if (instance.financialConnections != null) {
    SessionFinancialConnections.encode(
      instance.financialConnections!,
      container.nestedSingleValueContainer('financial_connections').encoder,
    );
  }
  if (instance.setupFutureUsage != null) {
    CheckoutAcssDebitPaymentMethodOptionsSetupFutureUsage.encode(
      instance.setupFutureUsage!,
      container.nestedSingleValueContainer('setup_future_usage').encoder,
    );
  }
  if (instance.verificationMethod != null) {
    CheckoutUsBankAccountPaymentMethodOptionsVerificationMethod.encode(
      instance.verificationMethod!,
      container.nestedSingleValueContainer('verification_method').encoder,
    );
  }
  return container.value;
}