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('ConfirmationTokensResourcePaymentMethodPreview(');
  if (acssDebit != null) {
    $buf
      ..writeln()
      ..write('  acss_debit: ')
      ..write(acssDebit)
      ..write(',');
  }
  if (affirm != null) {
    $buf
      ..writeln()
      ..write('  affirm: ')
      ..write(affirm)
      ..write(',');
  }
  if (afterpayClearpay != null) {
    $buf
      ..writeln()
      ..write('  afterpay_clearpay: ')
      ..write(afterpayClearpay)
      ..write(',');
  }
  if (alipay != null) {
    $buf
      ..writeln()
      ..write('  alipay: ')
      ..write(alipay)
      ..write(',');
  }
  if (auBecsDebit != null) {
    $buf
      ..writeln()
      ..write('  au_becs_debit: ')
      ..write(auBecsDebit)
      ..write(',');
  }
  if (bacsDebit != null) {
    $buf
      ..writeln()
      ..write('  bacs_debit: ')
      ..write(bacsDebit)
      ..write(',');
  }
  if (bancontact != null) {
    $buf
      ..writeln()
      ..write('  bancontact: ')
      ..write(bancontact)
      ..write(',');
  }
  $buf
    ..writeln()
    ..write('  billing_details: ')
    ..write(billingDetails)
    ..write(',');
  if (blik != null) {
    $buf
      ..writeln()
      ..write('  blik: ')
      ..write(blik)
      ..write(',');
  }
  if (boleto != null) {
    $buf
      ..writeln()
      ..write('  boleto: ')
      ..write(boleto)
      ..write(',');
  }
  if (card != null) {
    $buf
      ..writeln()
      ..write('  card: ')
      ..write(card)
      ..write(',');
  }
  if (cardPresent != null) {
    $buf
      ..writeln()
      ..write('  card_present: ')
      ..write(cardPresent)
      ..write(',');
  }
  if (cashapp != null) {
    $buf
      ..writeln()
      ..write('  cashapp: ')
      ..write(cashapp)
      ..write(',');
  }
  if (customerBalance != null) {
    $buf
      ..writeln()
      ..write('  customer_balance: ')
      ..write(customerBalance)
      ..write(',');
  }
  if (eps != null) {
    $buf
      ..writeln()
      ..write('  eps: ')
      ..write(eps)
      ..write(',');
  }
  if (fpx != null) {
    $buf
      ..writeln()
      ..write('  fpx: ')
      ..write(fpx)
      ..write(',');
  }
  if (giropay != null) {
    $buf
      ..writeln()
      ..write('  giropay: ')
      ..write(giropay)
      ..write(',');
  }
  if (grabpay != null) {
    $buf
      ..writeln()
      ..write('  grabpay: ')
      ..write(grabpay)
      ..write(',');
  }
  if (ideal != null) {
    $buf
      ..writeln()
      ..write('  ideal: ')
      ..write(ideal)
      ..write(',');
  }
  if (interacPresent != null) {
    $buf
      ..writeln()
      ..write('  interac_present: ')
      ..write(interacPresent)
      ..write(',');
  }
  if (klarna != null) {
    $buf
      ..writeln()
      ..write('  klarna: ')
      ..write(klarna)
      ..write(',');
  }
  if (konbini != null) {
    $buf
      ..writeln()
      ..write('  konbini: ')
      ..write(konbini)
      ..write(',');
  }
  if (link != null) {
    $buf
      ..writeln()
      ..write('  link: ')
      ..write(link)
      ..write(',');
  }
  if (mobilepay != null) {
    $buf
      ..writeln()
      ..write('  mobilepay: ')
      ..write(mobilepay)
      ..write(',');
  }
  if (oxxo != null) {
    $buf
      ..writeln()
      ..write('  oxxo: ')
      ..write(oxxo)
      ..write(',');
  }
  if (p24 != null) {
    $buf
      ..writeln()
      ..write('  p24: ')
      ..write(p24)
      ..write(',');
  }
  if (paynow != null) {
    $buf
      ..writeln()
      ..write('  paynow: ')
      ..write(paynow)
      ..write(',');
  }
  if (paypal != null) {
    $buf
      ..writeln()
      ..write('  paypal: ')
      ..write(paypal)
      ..write(',');
  }
  if (pix != null) {
    $buf
      ..writeln()
      ..write('  pix: ')
      ..write(pix)
      ..write(',');
  }
  if (promptpay != null) {
    $buf
      ..writeln()
      ..write('  promptpay: ')
      ..write(promptpay)
      ..write(',');
  }
  if (revolutPay != null) {
    $buf
      ..writeln()
      ..write('  revolut_pay: ')
      ..write(revolutPay)
      ..write(',');
  }
  if (sepaDebit != null) {
    $buf
      ..writeln()
      ..write('  sepa_debit: ')
      ..write(sepaDebit)
      ..write(',');
  }
  if (sofort != null) {
    $buf
      ..writeln()
      ..write('  sofort: ')
      ..write(sofort)
      ..write(',');
  }
  if (swish != null) {
    $buf
      ..writeln()
      ..write('  swish: ')
      ..write(swish)
      ..write(',');
  }
  $buf
    ..writeln()
    ..write('  type: ')
    ..write(type)
    ..write(',');
  if (usBankAccount != null) {
    $buf
      ..writeln()
      ..write('  us_bank_account: ')
      ..write(usBankAccount)
      ..write(',');
  }
  if (wechatPay != null) {
    $buf
      ..writeln()
      ..write('  wechat_pay: ')
      ..write(wechatPay)
      ..write(',');
  }
  if (zip != null) {
    $buf
      ..writeln()
      ..write('  zip: ')
      ..write(zip)
      ..write(',');
  }
  $buf.write(')');
  return $buf.toString();
}