encode<V> static method

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

Implementation

static V encode<V>(
  SourceTypeAchCreditTransfer instance,
  Encoder<V> encoder,
) {
  final container = encoder.container<String>();
  if (instance.accountNumber != null) {
    container.encodeString(
      'account_number',
      instance.accountNumber!,
    );
  }
  if (instance.bankName != null) {
    container.encodeString(
      'bank_name',
      instance.bankName!,
    );
  }
  if (instance.fingerprint != null) {
    container.encodeString(
      'fingerprint',
      instance.fingerprint!,
    );
  }
  if (instance.refundAccountHolderName != null) {
    container.encodeString(
      'refund_account_holder_name',
      instance.refundAccountHolderName!,
    );
  }
  if (instance.refundAccountHolderType != null) {
    container.encodeString(
      'refund_account_holder_type',
      instance.refundAccountHolderType!,
    );
  }
  if (instance.refundRoutingNumber != null) {
    container.encodeString(
      'refund_routing_number',
      instance.refundRoutingNumber!,
    );
  }
  if (instance.routingNumber != null) {
    container.encodeString(
      'routing_number',
      instance.routingNumber!,
    );
  }
  if (instance.swiftCode != null) {
    container.encodeString(
      'swift_code',
      instance.swiftCode!,
    );
  }
  return container.value;
}