toString method

  1. @override
String toString()
override

A string representation of this object.

Some classes have a default textual representation, often paired with a static parse function (like int.parse). These classes will provide the textual representation as their string representation.

Other classes have no meaningful textual representation that a program will care about. Such classes will typically override toString to provide useful information when inspecting the object, mainly for debugging or logging.

Implementation

@override
String toString() {
  final $buf = StringBuffer()..writeln('PaymentMethodInteracPresent(');
  if (brand != null) {
    $buf
      ..writeln()
      ..write('  brand: ')
      ..write(brand)
      ..write(',');
  }
  if (cardholderName != null) {
    $buf
      ..writeln()
      ..write('  cardholder_name: ')
      ..write(cardholderName)
      ..write(',');
  }
  if (country != null) {
    $buf
      ..writeln()
      ..write('  country: ')
      ..write(country)
      ..write(',');
  }
  if (description != null) {
    $buf
      ..writeln()
      ..write('  description: ')
      ..write(description)
      ..write(',');
  }
  $buf
    ..writeln()
    ..write('  exp_month: ')
    ..write(expMonth)
    ..write(',');
  $buf
    ..writeln()
    ..write('  exp_year: ')
    ..write(expYear)
    ..write(',');
  if (fingerprint != null) {
    $buf
      ..writeln()
      ..write('  fingerprint: ')
      ..write(fingerprint)
      ..write(',');
  }
  if (funding != null) {
    $buf
      ..writeln()
      ..write('  funding: ')
      ..write(funding)
      ..write(',');
  }
  if (iin != null) {
    $buf
      ..writeln()
      ..write('  iin: ')
      ..write(iin)
      ..write(',');
  }
  if (issuer != null) {
    $buf
      ..writeln()
      ..write('  issuer: ')
      ..write(issuer)
      ..write(',');
  }
  if (last4 != null) {
    $buf
      ..writeln()
      ..write('  last4: ')
      ..write(last4)
      ..write(',');
  }
  if (networks != null) {
    $buf
      ..writeln()
      ..write('  networks: ')
      ..write(networks)
      ..write(',');
  }
  if (preferredLocales != null) {
    $buf
      ..writeln()
      ..write('  preferred_locales: ')
      ..write(preferredLocales)
      ..write(',');
  }
  if (readMethod != null) {
    $buf
      ..writeln()
      ..write('  read_method: ')
      ..write(readMethod)
      ..write(',');
  }
  $buf.write(')');
  return $buf.toString();
}