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('CustomerUpdateOptions(');
  if (address != null) {
    $buf
      ..writeln()
      ..write('  address: ')
      ..write(address)
      ..write(',');
  }
  if (balance != null) {
    $buf
      ..writeln()
      ..write('  balance: ')
      ..write(balance)
      ..write(',');
  }
  if (cashBalance != null) {
    $buf
      ..writeln()
      ..write('  cash_balance: ')
      ..write(cashBalance)
      ..write(',');
  }
  if (coupon != null) {
    $buf
      ..writeln()
      ..write('  coupon: ')
      ..write(coupon)
      ..write(',');
  }
  if (defaultSource != null) {
    $buf
      ..writeln()
      ..write('  default_source: ')
      ..write(defaultSource)
      ..write(',');
  }
  if (description != null) {
    $buf
      ..writeln()
      ..write('  description: ')
      ..write(description)
      ..write(',');
  }
  if (email != null) {
    $buf
      ..writeln()
      ..write('  email: ')
      ..write(email)
      ..write(',');
  }
  if (expand != null) {
    $buf
      ..writeln()
      ..write('  expand: ')
      ..write(expand)
      ..write(',');
  }
  if (invoicePrefix != null) {
    $buf
      ..writeln()
      ..write('  invoice_prefix: ')
      ..write(invoicePrefix)
      ..write(',');
  }
  if (invoiceSettings != null) {
    $buf
      ..writeln()
      ..write('  invoice_settings: ')
      ..write(invoiceSettings)
      ..write(',');
  }
  if (metadata != null) {
    $buf
      ..writeln()
      ..write('  metadata: ')
      ..write(metadata)
      ..write(',');
  }
  if (name != null) {
    $buf
      ..writeln()
      ..write('  name: ')
      ..write(name)
      ..write(',');
  }
  if (nextInvoiceSequence != null) {
    $buf
      ..writeln()
      ..write('  next_invoice_sequence: ')
      ..write(nextInvoiceSequence)
      ..write(',');
  }
  if (phone != null) {
    $buf
      ..writeln()
      ..write('  phone: ')
      ..write(phone)
      ..write(',');
  }
  if (preferredLocales != null) {
    $buf
      ..writeln()
      ..write('  preferred_locales: ')
      ..write(preferredLocales)
      ..write(',');
  }
  if (promotionCode != null) {
    $buf
      ..writeln()
      ..write('  promotion_code: ')
      ..write(promotionCode)
      ..write(',');
  }
  if (shipping != null) {
    $buf
      ..writeln()
      ..write('  shipping: ')
      ..write(shipping)
      ..write(',');
  }
  if (source != null) {
    $buf
      ..writeln()
      ..write('  source: ')
      ..write(source)
      ..write(',');
  }
  if (tax != null) {
    $buf
      ..writeln()
      ..write('  tax: ')
      ..write(tax)
      ..write(',');
  }
  if (taxExempt != null) {
    $buf
      ..writeln()
      ..write('  tax_exempt: ')
      ..write(taxExempt)
      ..write(',');
  }
  if (validate != null) {
    $buf
      ..writeln()
      ..write('  validate: ')
      ..write(validate)
      ..write(',');
  }
  $buf.write(')');
  return $buf.toString();
}