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('SubscriptionUpdateOptions(');
  if (addInvoiceItems != null) {
    $buf
      ..writeln()
      ..write('  add_invoice_items: ')
      ..write(addInvoiceItems)
      ..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 (billingCycleAnchor != null) {
    $buf
      ..writeln()
      ..write('  billing_cycle_anchor: ')
      ..write(billingCycleAnchor)
      ..write(',');
  }
  if (billingThresholds != null) {
    $buf
      ..writeln()
      ..write('  billing_thresholds: ')
      ..write(billingThresholds)
      ..write(',');
  }
  if (cancelAt != null) {
    $buf
      ..writeln()
      ..write('  cancel_at: ')
      ..write(cancelAt)
      ..write(',');
  }
  if (cancelAtPeriodEnd != null) {
    $buf
      ..writeln()
      ..write('  cancel_at_period_end: ')
      ..write(cancelAtPeriodEnd)
      ..write(',');
  }
  if (cancellationDetails != null) {
    $buf
      ..writeln()
      ..write('  cancellation_details: ')
      ..write(cancellationDetails)
      ..write(',');
  }
  if (collectionMethod != null) {
    $buf
      ..writeln()
      ..write('  collection_method: ')
      ..write(collectionMethod)
      ..write(',');
  }
  if (coupon != null) {
    $buf
      ..writeln()
      ..write('  coupon: ')
      ..write(coupon)
      ..write(',');
  }
  if (daysUntilDue != null) {
    $buf
      ..writeln()
      ..write('  days_until_due: ')
      ..write(daysUntilDue)
      ..write(',');
  }
  if (defaultPaymentMethod != null) {
    $buf
      ..writeln()
      ..write('  default_payment_method: ')
      ..write(defaultPaymentMethod)
      ..write(',');
  }
  if (defaultSource != null) {
    $buf
      ..writeln()
      ..write('  default_source: ')
      ..write(defaultSource)
      ..write(',');
  }
  if (defaultTaxRates != null) {
    $buf
      ..writeln()
      ..write('  default_tax_rates: ')
      ..write(defaultTaxRates)
      ..write(',');
  }
  if (description != null) {
    $buf
      ..writeln()
      ..write('  description: ')
      ..write(description)
      ..write(',');
  }
  if (expand != null) {
    $buf
      ..writeln()
      ..write('  expand: ')
      ..write(expand)
      ..write(',');
  }
  if (invoiceSettings != null) {
    $buf
      ..writeln()
      ..write('  invoice_settings: ')
      ..write(invoiceSettings)
      ..write(',');
  }
  if (items != null) {
    $buf
      ..writeln()
      ..write('  items: ')
      ..write(items)
      ..write(',');
  }
  if (metadata != null) {
    $buf
      ..writeln()
      ..write('  metadata: ')
      ..write(metadata)
      ..write(',');
  }
  if (offSession != null) {
    $buf
      ..writeln()
      ..write('  off_session: ')
      ..write(offSession)
      ..write(',');
  }
  if (onBehalfOf != null) {
    $buf
      ..writeln()
      ..write('  on_behalf_of: ')
      ..write(onBehalfOf)
      ..write(',');
  }
  if (pauseCollection != null) {
    $buf
      ..writeln()
      ..write('  pause_collection: ')
      ..write(pauseCollection)
      ..write(',');
  }
  if (paymentBehavior != null) {
    $buf
      ..writeln()
      ..write('  payment_behavior: ')
      ..write(paymentBehavior)
      ..write(',');
  }
  if (paymentSettings != null) {
    $buf
      ..writeln()
      ..write('  payment_settings: ')
      ..write(paymentSettings)
      ..write(',');
  }
  if (pendingInvoiceItemInterval != null) {
    $buf
      ..writeln()
      ..write('  pending_invoice_item_interval: ')
      ..write(pendingInvoiceItemInterval)
      ..write(',');
  }
  if (promotionCode != null) {
    $buf
      ..writeln()
      ..write('  promotion_code: ')
      ..write(promotionCode)
      ..write(',');
  }
  if (prorationBehavior != null) {
    $buf
      ..writeln()
      ..write('  proration_behavior: ')
      ..write(prorationBehavior)
      ..write(',');
  }
  if (prorationDate != null) {
    $buf
      ..writeln()
      ..write('  proration_date: ')
      ..write(prorationDate)
      ..write(',');
  }
  if (transferData != null) {
    $buf
      ..writeln()
      ..write('  transfer_data: ')
      ..write(transferData)
      ..write(',');
  }
  if (trialEnd != null) {
    $buf
      ..writeln()
      ..write('  trial_end: ')
      ..write(trialEnd)
      ..write(',');
  }
  if (trialFromPlan != null) {
    $buf
      ..writeln()
      ..write('  trial_from_plan: ')
      ..write(trialFromPlan)
      ..write(',');
  }
  if (trialSettings != null) {
    $buf
      ..writeln()
      ..write('  trial_settings: ')
      ..write(trialSettings)
      ..write(',');
  }
  $buf.write(')');
  return $buf.toString();
}