toJson method
Implementation
@override
Map<String, Object?> toJson() => {
"amount": encodeValue(amount),
if (allocations != null) "allocations": encodeValue(allocations),
if (availableAmount != null)
"available_amount": encodeValue(availableAmount),
if (pendingAmount != null) "pending_amount": encodeValue(pendingAmount),
if (spentAmount != null) "spent_amount": encodeValue(spentAmount),
if (availableAt != null) "available_at": encodeValue(availableAt),
if (claimedAt != null) "claimed_at": encodeValue(claimedAt),
"created_at": encodeValue(createdAt),
"id": encodeValue(id),
if (orderId != null) "order_id": encodeValue(orderId),
if (paidAt != null) "paid_at": encodeValue(paidAt),
if (paymentId != null) "payment_id": encodeValue(paymentId),
if (payoutId != null) "payout_id": encodeValue(payoutId),
if (payoutConfiguration != null)
"payout_configuration": encodeValue(payoutConfiguration),
if (refundId != null) "refund_id": encodeValue(refundId),
"type": encodeValue(type),
};