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('PaymentLink(');
  $buf
    ..writeln()
    ..write('  active: ')
    ..write(active)
    ..write(',');
  $buf
    ..writeln()
    ..write('  after_completion: ')
    ..write(afterCompletion)
    ..write(',');
  $buf
    ..writeln()
    ..write('  allow_promotion_codes: ')
    ..write(allowPromotionCodes)
    ..write(',');
  if (application != null) {
    $buf
      ..writeln()
      ..write('  application: ')
      ..write(application)
      ..write(',');
  }
  if (applicationFeeAmount != null) {
    $buf
      ..writeln()
      ..write('  application_fee_amount: ')
      ..write(applicationFeeAmount)
      ..write(',');
  }
  if (applicationFeePercent != null) {
    $buf
      ..writeln()
      ..write('  application_fee_percent: ')
      ..write(applicationFeePercent)
      ..write(',');
  }
  $buf
    ..writeln()
    ..write('  automatic_tax: ')
    ..write(automaticTax)
    ..write(',');
  $buf
    ..writeln()
    ..write('  billing_address_collection: ')
    ..write(billingAddressCollection)
    ..write(',');
  if (consentCollection != null) {
    $buf
      ..writeln()
      ..write('  consent_collection: ')
      ..write(consentCollection)
      ..write(',');
  }
  $buf
    ..writeln()
    ..write('  currency: ')
    ..write(currency)
    ..write(',');
  $buf
    ..writeln()
    ..write('  custom_fields: ')
    ..write(customFields)
    ..write(',');
  $buf
    ..writeln()
    ..write('  custom_text: ')
    ..write(customText)
    ..write(',');
  $buf
    ..writeln()
    ..write('  customer_creation: ')
    ..write(customerCreation)
    ..write(',');
  $buf
    ..writeln()
    ..write('  id: ')
    ..write(id)
    ..write(',');
  if (inactiveMessage != null) {
    $buf
      ..writeln()
      ..write('  inactive_message: ')
      ..write(inactiveMessage)
      ..write(',');
  }
  if (invoiceCreation != null) {
    $buf
      ..writeln()
      ..write('  invoice_creation: ')
      ..write(invoiceCreation)
      ..write(',');
  }
  if (lineItems != null) {
    $buf
      ..writeln()
      ..write('  line_items: ')
      ..write(lineItems)
      ..write(',');
  }
  $buf
    ..writeln()
    ..write('  livemode: ')
    ..write(livemode)
    ..write(',');
  $buf
    ..writeln()
    ..write('  metadata: ')
    ..write(metadata)
    ..write(',');
  $buf
    ..writeln()
    ..write('  object: ')
    ..write(object)
    ..write(',');
  if (onBehalfOf != null) {
    $buf
      ..writeln()
      ..write('  on_behalf_of: ')
      ..write(onBehalfOf)
      ..write(',');
  }
  if (paymentIntentData != null) {
    $buf
      ..writeln()
      ..write('  payment_intent_data: ')
      ..write(paymentIntentData)
      ..write(',');
  }
  $buf
    ..writeln()
    ..write('  payment_method_collection: ')
    ..write(paymentMethodCollection)
    ..write(',');
  if (paymentMethodTypes != null) {
    $buf
      ..writeln()
      ..write('  payment_method_types: ')
      ..write(paymentMethodTypes)
      ..write(',');
  }
  $buf
    ..writeln()
    ..write('  phone_number_collection: ')
    ..write(phoneNumberCollection)
    ..write(',');
  if (restrictions != null) {
    $buf
      ..writeln()
      ..write('  restrictions: ')
      ..write(restrictions)
      ..write(',');
  }
  if (shippingAddressCollection != null) {
    $buf
      ..writeln()
      ..write('  shipping_address_collection: ')
      ..write(shippingAddressCollection)
      ..write(',');
  }
  $buf
    ..writeln()
    ..write('  shipping_options: ')
    ..write(shippingOptions)
    ..write(',');
  $buf
    ..writeln()
    ..write('  submit_type: ')
    ..write(submitType)
    ..write(',');
  if (subscriptionData != null) {
    $buf
      ..writeln()
      ..write('  subscription_data: ')
      ..write(subscriptionData)
      ..write(',');
  }
  $buf
    ..writeln()
    ..write('  tax_id_collection: ')
    ..write(taxIdCollection)
    ..write(',');
  if (transferData != null) {
    $buf
      ..writeln()
      ..write('  transfer_data: ')
      ..write(transferData)
      ..write(',');
  }
  $buf
    ..writeln()
    ..write('  url: ')
    ..write(url)
    ..write(',');
  $buf.write(')');
  return $buf.toString();
}