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('PaymentMethodDetailsCard(');
  if (amountAuthorized != null) {
    $buf
      ..writeln()
      ..write('  amount_authorized: ')
      ..write(amountAuthorized)
      ..write(',');
  }
  if (brand != null) {
    $buf
      ..writeln()
      ..write('  brand: ')
      ..write(brand)
      ..write(',');
  }
  if (captureBefore != null) {
    $buf
      ..writeln()
      ..write('  capture_before: ')
      ..write(captureBefore)
      ..write(',');
  }
  if (checks != null) {
    $buf
      ..writeln()
      ..write('  checks: ')
      ..write(checks)
      ..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 (extendedAuthorization != null) {
    $buf
      ..writeln()
      ..write('  extended_authorization: ')
      ..write(extendedAuthorization)
      ..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 (incrementalAuthorization != null) {
    $buf
      ..writeln()
      ..write('  incremental_authorization: ')
      ..write(incrementalAuthorization)
      ..write(',');
  }
  if (installments != null) {
    $buf
      ..writeln()
      ..write('  installments: ')
      ..write(installments)
      ..write(',');
  }
  if (issuer != null) {
    $buf
      ..writeln()
      ..write('  issuer: ')
      ..write(issuer)
      ..write(',');
  }
  if (last4 != null) {
    $buf
      ..writeln()
      ..write('  last4: ')
      ..write(last4)
      ..write(',');
  }
  if (mandate != null) {
    $buf
      ..writeln()
      ..write('  mandate: ')
      ..write(mandate)
      ..write(',');
  }
  if (moto != null) {
    $buf
      ..writeln()
      ..write('  moto: ')
      ..write(moto)
      ..write(',');
  }
  if (multicapture != null) {
    $buf
      ..writeln()
      ..write('  multicapture: ')
      ..write(multicapture)
      ..write(',');
  }
  if (network != null) {
    $buf
      ..writeln()
      ..write('  network: ')
      ..write(network)
      ..write(',');
  }
  if (networkToken != null) {
    $buf
      ..writeln()
      ..write('  network_token: ')
      ..write(networkToken)
      ..write(',');
  }
  if (overcapture != null) {
    $buf
      ..writeln()
      ..write('  overcapture: ')
      ..write(overcapture)
      ..write(',');
  }
  if (threeDSecure != null) {
    $buf
      ..writeln()
      ..write('  three_d_secure: ')
      ..write(threeDSecure)
      ..write(',');
  }
  if (wallet != null) {
    $buf
      ..writeln()
      ..write('  wallet: ')
      ..write(wallet)
      ..write(',');
  }
  $buf.write(')');
  return $buf.toString();
}