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('IssuingCardholder(');
  $buf
    ..writeln()
    ..write('  billing: ')
    ..write(billing)
    ..write(',');
  if (company != null) {
    $buf
      ..writeln()
      ..write('  company: ')
      ..write(company)
      ..write(',');
  }
  $buf
    ..writeln()
    ..write('  created: ')
    ..write(created)
    ..write(',');
  if (email != null) {
    $buf
      ..writeln()
      ..write('  email: ')
      ..write(email)
      ..write(',');
  }
  $buf
    ..writeln()
    ..write('  id: ')
    ..write(id)
    ..write(',');
  if (individual != null) {
    $buf
      ..writeln()
      ..write('  individual: ')
      ..write(individual)
      ..write(',');
  }
  $buf
    ..writeln()
    ..write('  livemode: ')
    ..write(livemode)
    ..write(',');
  $buf
    ..writeln()
    ..write('  metadata: ')
    ..write(metadata)
    ..write(',');
  $buf
    ..writeln()
    ..write('  name: ')
    ..write(name)
    ..write(',');
  $buf
    ..writeln()
    ..write('  object: ')
    ..write(object)
    ..write(',');
  if (phoneNumber != null) {
    $buf
      ..writeln()
      ..write('  phone_number: ')
      ..write(phoneNumber)
      ..write(',');
  }
  if (preferredLocales != null) {
    $buf
      ..writeln()
      ..write('  preferred_locales: ')
      ..write(preferredLocales)
      ..write(',');
  }
  $buf
    ..writeln()
    ..write('  requirements: ')
    ..write(requirements)
    ..write(',');
  if (spendingControls != null) {
    $buf
      ..writeln()
      ..write('  spending_controls: ')
      ..write(spendingControls)
      ..write(',');
  }
  $buf
    ..writeln()
    ..write('  status: ')
    ..write(status)
    ..write(',');
  $buf
    ..writeln()
    ..write('  type: ')
    ..write(type)
    ..write(',');
  $buf.write(')');
  return $buf.toString();
}