toJson method
Implementation
@override
Map<String, Object?> toJson() => {
"id": encodeValue(id),
"status": encodeValue(status),
"statement_descriptor": encodeValue(statementDescriptor),
"amount": encodeValue(amount),
if (billingDetails != null)
"billing_details": encodeValue(billingDetails),
if (balanceTransaction != null)
"balance_transaction": encodeValue(balanceTransaction),
if (paymentMethod != null) "payment_method": encodeValue(paymentMethod),
if (customer != null) "customer": encodeValue(customer),
if (receipt != null) "receipt": encodeValue(receipt),
if (latestAttempt != null) "latest_attempt": encodeValue(latestAttempt),
if (nextAction != null) "next_action": encodeValue(nextAction),
if (latestError != null) "latest_error": encodeValue(latestError),
"initiated_at": encodeValue(initiatedAt),
if (executedAt != null) "executed_at": encodeValue(executedAt),
if (paidAt != null) "paid_at": encodeValue(paidAt),
if (canceledAt != null) "canceled_at": encodeValue(canceledAt),
if (dueAt != null) "due_at": encodeValue(dueAt),
if (expiredAt != null) "expired_at": encodeValue(expiredAt),
if (failedAt != null) "failed_at": encodeValue(failedAt),
if (paidOffline != null) "paid_offline": encodeValue(paidOffline),
if (paymentMethodTypes != null)
"payment_method_types": encodeValue(paymentMethodTypes),
if (payoutConfiguration != null)
"payout_configuration": encodeValue(payoutConfiguration),
};