encode<V> static method

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

Implementation

static V encode<V>(
  PaymentIntentUsBankAccount instance,
  Encoder<V> encoder,
) {
  final container = encoder.container<String>();
  if (instance.accountHolderType != null) {
    IssuingCardholderType.encode(
      instance.accountHolderType!,
      container.nestedSingleValueContainer('account_holder_type').encoder,
    );
  }
  if (instance.accountNumber != null) {
    container.encodeString(
      'account_number',
      instance.accountNumber!,
    );
  }
  if (instance.accountType != null) {
    container.encodeString(
      'account_type',
      instance.accountType!,
    );
  }
  if (instance.financialConnectionsAccount != null) {
    container.encodeString(
      'financial_connections_account',
      instance.financialConnectionsAccount!,
    );
  }
  if (instance.routingNumber != null) {
    container.encodeString(
      'routing_number',
      instance.routingNumber!,
    );
  }
  return container.value;
}