encode<V> static method

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

Implementation

static V encode<V>(
  InvoicePaymentMethodOptionsUsBankAccount instance,
  Encoder<V> encoder,
) {
  final container = encoder.container<String>();
  if (instance.financialConnections != null) {
    InvoicePaymentMethodOptionsUsBankAccountLinkedAccountOptions.encode(
      instance.financialConnections!,
      container.nestedSingleValueContainer('financial_connections').encoder,
    );
  }
  if (instance.verificationMethod != null) {
    CheckoutAcssDebitPaymentMethodOptionsVerificationMethod.encode(
      instance.verificationMethod!,
      container.nestedSingleValueContainer('verification_method').encoder,
    );
  }
  return container.value;
}