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('TreasuryReceivedCredit(');
  $buf
    ..writeln()
    ..write('  amount: ')
    ..write(amount)
    ..write(',');
  $buf
    ..writeln()
    ..write('  created: ')
    ..write(created)
    ..write(',');
  $buf
    ..writeln()
    ..write('  currency: ')
    ..write(currency)
    ..write(',');
  $buf
    ..writeln()
    ..write('  description: ')
    ..write(description)
    ..write(',');
  if (failureCode != null) {
    $buf
      ..writeln()
      ..write('  failure_code: ')
      ..write(failureCode)
      ..write(',');
  }
  if (financialAccount != null) {
    $buf
      ..writeln()
      ..write('  financial_account: ')
      ..write(financialAccount)
      ..write(',');
  }
  if (hostedRegulatoryReceiptUrl != null) {
    $buf
      ..writeln()
      ..write('  hosted_regulatory_receipt_url: ')
      ..write(hostedRegulatoryReceiptUrl)
      ..write(',');
  }
  $buf
    ..writeln()
    ..write('  id: ')
    ..write(id)
    ..write(',');
  $buf
    ..writeln()
    ..write('  initiating_payment_method_details: ')
    ..write(initiatingPaymentMethodDetails)
    ..write(',');
  $buf
    ..writeln()
    ..write('  linked_flows: ')
    ..write(linkedFlows)
    ..write(',');
  $buf
    ..writeln()
    ..write('  livemode: ')
    ..write(livemode)
    ..write(',');
  $buf
    ..writeln()
    ..write('  network: ')
    ..write(network)
    ..write(',');
  $buf
    ..writeln()
    ..write('  object: ')
    ..write(object)
    ..write(',');
  if (reversalDetails != null) {
    $buf
      ..writeln()
      ..write('  reversal_details: ')
      ..write(reversalDetails)
      ..write(',');
  }
  $buf
    ..writeln()
    ..write('  status: ')
    ..write(status)
    ..write(',');
  if (transaction != null) {
    $buf
      ..writeln()
      ..write('  transaction: ')
      ..write(transaction)
      ..write(',');
  }
  $buf.write(')');
  return $buf.toString();
}