encode<V> static method

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

Implementation

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