encode<V> static method

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

Implementation

static V encode<V>(
  SourceTypeAcssDebit instance,
  Encoder<V> encoder,
) {
  final container = encoder.container<String>();
  if (instance.bankAddressCity != null) {
    container.encodeString(
      'bank_address_city',
      instance.bankAddressCity!,
    );
  }
  if (instance.bankAddressLine1 != null) {
    container.encodeString(
      'bank_address_line_1',
      instance.bankAddressLine1!,
    );
  }
  if (instance.bankAddressLine2 != null) {
    container.encodeString(
      'bank_address_line_2',
      instance.bankAddressLine2!,
    );
  }
  if (instance.bankAddressPostalCode != null) {
    container.encodeString(
      'bank_address_postal_code',
      instance.bankAddressPostalCode!,
    );
  }
  if (instance.bankName != null) {
    container.encodeString(
      'bank_name',
      instance.bankName!,
    );
  }
  if (instance.category != null) {
    container.encodeString(
      'category',
      instance.category!,
    );
  }
  if (instance.country != null) {
    container.encodeString(
      'country',
      instance.country!,
    );
  }
  if (instance.fingerprint != null) {
    container.encodeString(
      'fingerprint',
      instance.fingerprint!,
    );
  }
  if (instance.last4 != null) {
    container.encodeString(
      'last4',
      instance.last4!,
    );
  }
  if (instance.routingNumber != null) {
    container.encodeString(
      'routing_number',
      instance.routingNumber!,
    );
  }
  return container.value;
}