encode<V> static method

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

Implementation

static V encode<V>(
  TreasuryFinancialAccountsResourceAbaRecord instance,
  Encoder<V> encoder,
) {
  final container = encoder.container<String>();
  container.encodeString(
    'account_holder_name',
    instance.accountHolderName,
  );
  if (instance.accountNumber != null) {
    container.encodeString(
      'account_number',
      instance.accountNumber!,
    );
  }
  container.encodeString(
    'account_number_last4',
    instance.accountNumberLast4,
  );
  container.encodeString(
    'bank_name',
    instance.bankName,
  );
  container.encodeString(
    'routing_number',
    instance.routingNumber,
  );
  return container.value;
}