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('PaymentLinkCreateOptions(');
  if (afterCompletion != null) {
    $buf
      ..writeln()
      ..write('  after_completion: ')
      ..write(afterCompletion)
      ..write(',');
  }
  if (allowPromotionCodes != null) {
    $buf
      ..writeln()
      ..write('  allow_promotion_codes: ')
      ..write(allowPromotionCodes)
      ..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(',');
  }
  if (automaticTax != null) {
    $buf
      ..writeln()
      ..write('  automatic_tax: ')
      ..write(automaticTax)
      ..write(',');
  }
  if (billingAddressCollection != null) {
    $buf
      ..writeln()
      ..write('  billing_address_collection: ')
      ..write(billingAddressCollection)
      ..write(',');
  }
  if (consentCollection != null) {
    $buf
      ..writeln()
      ..write('  consent_collection: ')
      ..write(consentCollection)
      ..write(',');
  }
  if (currency != null) {
    $buf
      ..writeln()
      ..write('  currency: ')
      ..write(currency)
      ..write(',');
  }
  if (customFields != null) {
    $buf
      ..writeln()
      ..write('  custom_fields: ')
      ..write(customFields)
      ..write(',');
  }
  if (customText != null) {
    $buf
      ..writeln()
      ..write('  custom_text: ')
      ..write(customText)
      ..write(',');
  }
  if (customerCreation != null) {
    $buf
      ..writeln()
      ..write('  customer_creation: ')
      ..write(customerCreation)
      ..write(',');
  }
  if (expand != null) {
    $buf
      ..writeln()
      ..write('  expand: ')
      ..write(expand)
      ..write(',');
  }
  if (inactiveMessage != null) {
    $buf
      ..writeln()
      ..write('  inactive_message: ')
      ..write(inactiveMessage)
      ..write(',');
  }
  if (invoiceCreation != null) {
    $buf
      ..writeln()
      ..write('  invoice_creation: ')
      ..write(invoiceCreation)
      ..write(',');
  }
  $buf
    ..writeln()
    ..write('  line_items: ')
    ..write(lineItems)
    ..write(',');
  if (metadata != null) {
    $buf
      ..writeln()
      ..write('  metadata: ')
      ..write(metadata)
      ..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(',');
  }
  if (paymentMethodCollection != null) {
    $buf
      ..writeln()
      ..write('  payment_method_collection: ')
      ..write(paymentMethodCollection)
      ..write(',');
  }
  if (paymentMethodTypes != null) {
    $buf
      ..writeln()
      ..write('  payment_method_types: ')
      ..write(paymentMethodTypes)
      ..write(',');
  }
  if (phoneNumberCollection != null) {
    $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(',');
  }
  if (shippingOptions != null) {
    $buf
      ..writeln()
      ..write('  shipping_options: ')
      ..write(shippingOptions)
      ..write(',');
  }
  if (submitType != null) {
    $buf
      ..writeln()
      ..write('  submit_type: ')
      ..write(submitType)
      ..write(',');
  }
  if (subscriptionData != null) {
    $buf
      ..writeln()
      ..write('  subscription_data: ')
      ..write(subscriptionData)
      ..write(',');
  }
  if (taxIdCollection != null) {
    $buf
      ..writeln()
      ..write('  tax_id_collection: ')
      ..write(taxIdCollection)
      ..write(',');
  }
  if (transferData != null) {
    $buf
      ..writeln()
      ..write('  transfer_data: ')
      ..write(transferData)
      ..write(',');
  }
  $buf.write(')');
  return $buf.toString();
}