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('ChargeCreateOptions(');
  if (amount != null) {
    $buf
      ..writeln()
      ..write('  amount: ')
      ..write(amount)
      ..write(',');
  }
  if (applicationFee != null) {
    $buf
      ..writeln()
      ..write('  application_fee: ')
      ..write(applicationFee)
      ..write(',');
  }
  if (applicationFeeAmount != null) {
    $buf
      ..writeln()
      ..write('  application_fee_amount: ')
      ..write(applicationFeeAmount)
      ..write(',');
  }
  if (capture != null) {
    $buf
      ..writeln()
      ..write('  capture: ')
      ..write(capture)
      ..write(',');
  }
  if (currency != null) {
    $buf
      ..writeln()
      ..write('  currency: ')
      ..write(currency)
      ..write(',');
  }
  if (customer != null) {
    $buf
      ..writeln()
      ..write('  customer: ')
      ..write(customer)
      ..write(',');
  }
  if (description != null) {
    $buf
      ..writeln()
      ..write('  description: ')
      ..write(description)
      ..write(',');
  }
  if (destination != null) {
    $buf
      ..writeln()
      ..write('  destination: ')
      ..write(destination)
      ..write(',');
  }
  if (expand != null) {
    $buf
      ..writeln()
      ..write('  expand: ')
      ..write(expand)
      ..write(',');
  }
  if (metadata != null) {
    $buf
      ..writeln()
      ..write('  metadata: ')
      ..write(metadata)
      ..write(',');
  }
  if (onBehalfOf != null) {
    $buf
      ..writeln()
      ..write('  on_behalf_of: ')
      ..write(onBehalfOf)
      ..write(',');
  }
  if (radarOptions != null) {
    $buf
      ..writeln()
      ..write('  radar_options: ')
      ..write(radarOptions)
      ..write(',');
  }
  if (receiptEmail != null) {
    $buf
      ..writeln()
      ..write('  receipt_email: ')
      ..write(receiptEmail)
      ..write(',');
  }
  if (shipping != null) {
    $buf
      ..writeln()
      ..write('  shipping: ')
      ..write(shipping)
      ..write(',');
  }
  if (source != null) {
    $buf
      ..writeln()
      ..write('  source: ')
      ..write(source)
      ..write(',');
  }
  if (statementDescriptor != null) {
    $buf
      ..writeln()
      ..write('  statement_descriptor: ')
      ..write(statementDescriptor)
      ..write(',');
  }
  if (statementDescriptorSuffix != null) {
    $buf
      ..writeln()
      ..write('  statement_descriptor_suffix: ')
      ..write(statementDescriptorSuffix)
      ..write(',');
  }
  if (transferData != null) {
    $buf
      ..writeln()
      ..write('  transfer_data: ')
      ..write(transferData)
      ..write(',');
  }
  if (transferGroup != null) {
    $buf
      ..writeln()
      ..write('  transfer_group: ')
      ..write(transferGroup)
      ..write(',');
  }
  $buf.write(')');
  return $buf.toString();
}