toString method
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('Charge(');
$buf
..writeln()
..write(' amount: ')
..write(amount)
..write(',');
$buf
..writeln()
..write(' amount_captured: ')
..write(amountCaptured)
..write(',');
$buf
..writeln()
..write(' amount_refunded: ')
..write(amountRefunded)
..write(',');
if (application != null) {
$buf
..writeln()
..write(' application: ')
..write(application)
..write(',');
}
if (applicationFee != null) {
$buf
..writeln()
..write(' application_fee: ')
..write(applicationFee)
..write(',');
}
if (applicationFeeAmount != null) {
$buf
..writeln()
..write(' application_fee_amount: ')
..write(applicationFeeAmount)
..write(',');
}
if (authorizationCode != null) {
$buf
..writeln()
..write(' authorization_code: ')
..write(authorizationCode)
..write(',');
}
if (balanceTransaction != null) {
$buf
..writeln()
..write(' balance_transaction: ')
..write(balanceTransaction)
..write(',');
}
$buf
..writeln()
..write(' billing_details: ')
..write(billingDetails)
..write(',');
if (calculatedStatementDescriptor != null) {
$buf
..writeln()
..write(' calculated_statement_descriptor: ')
..write(calculatedStatementDescriptor)
..write(',');
}
$buf
..writeln()
..write(' captured: ')
..write(captured)
..write(',');
$buf
..writeln()
..write(' created: ')
..write(created)
..write(',');
$buf
..writeln()
..write(' currency: ')
..write(currency)
..write(',');
if (customer != null) {
$buf
..writeln()
..write(' customer: ')
..write(customer)
..write(',');
}
if (description != null) {
$buf
..writeln()
..write(' description: ')
..write(description)
..write(',');
}
$buf
..writeln()
..write(' disputed: ')
..write(disputed)
..write(',');
if (failureBalanceTransaction != null) {
$buf
..writeln()
..write(' failure_balance_transaction: ')
..write(failureBalanceTransaction)
..write(',');
}
if (failureCode != null) {
$buf
..writeln()
..write(' failure_code: ')
..write(failureCode)
..write(',');
}
if (failureMessage != null) {
$buf
..writeln()
..write(' failure_message: ')
..write(failureMessage)
..write(',');
}
if (fraudDetails != null) {
$buf
..writeln()
..write(' fraud_details: ')
..write(fraudDetails)
..write(',');
}
$buf
..writeln()
..write(' id: ')
..write(id)
..write(',');
if (invoice != null) {
$buf
..writeln()
..write(' invoice: ')
..write(invoice)
..write(',');
}
if (level3 != null) {
$buf
..writeln()
..write(' level3: ')
..write(level3)
..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 (outcome != null) {
$buf
..writeln()
..write(' outcome: ')
..write(outcome)
..write(',');
}
$buf
..writeln()
..write(' paid: ')
..write(paid)
..write(',');
if (paymentIntent != null) {
$buf
..writeln()
..write(' payment_intent: ')
..write(paymentIntent)
..write(',');
}
if (paymentMethod != null) {
$buf
..writeln()
..write(' payment_method: ')
..write(paymentMethod)
..write(',');
}
if (paymentMethodDetails != null) {
$buf
..writeln()
..write(' payment_method_details: ')
..write(paymentMethodDetails)
..write(',');
}
if (radarOptions != null) {
$buf
..writeln()
..write(' radar_options: ')
..write(radarOptions)
..write(',');
}
if (receiptEmail != null) {
$buf
..writeln()
..write(' receipt_email: ')
..write(receiptEmail)
..write(',');
}
if (receiptNumber != null) {
$buf
..writeln()
..write(' receipt_number: ')
..write(receiptNumber)
..write(',');
}
if (receiptUrl != null) {
$buf
..writeln()
..write(' receipt_url: ')
..write(receiptUrl)
..write(',');
}
$buf
..writeln()
..write(' refunded: ')
..write(refunded)
..write(',');
if (refunds != null) {
$buf
..writeln()
..write(' refunds: ')
..write(refunds)
..write(',');
}
if (review != null) {
$buf
..writeln()
..write(' review: ')
..write(review)
..write(',');
}
if (shipping != null) {
$buf
..writeln()
..write(' shipping: ')
..write(shipping)
..write(',');
}
if (source != null) {
$buf
..writeln()
..write(' source: ')
..write(source)
..write(',');
}
if (sourceTransfer != null) {
$buf
..writeln()
..write(' source_transfer: ')
..write(sourceTransfer)
..write(',');
}
if (statementDescriptor != null) {
$buf
..writeln()
..write(' statement_descriptor: ')
..write(statementDescriptor)
..write(',');
}
if (statementDescriptorSuffix != null) {
$buf
..writeln()
..write(' statement_descriptor_suffix: ')
..write(statementDescriptorSuffix)
..write(',');
}
$buf
..writeln()
..write(' status: ')
..write(status)
..write(',');
if (transfer != null) {
$buf
..writeln()
..write(' transfer: ')
..write(transfer)
..write(',');
}
if (transferData != null) {
$buf
..writeln()
..write(' transfer_data: ')
..write(transferData)
..write(',');
}
if (transferGroup != null) {
$buf
..writeln()
..write(' transfer_group: ')
..write(transferGroup)
..write(',');
}
$buf.write(')');
return $buf.toString();
}