toJson

open override fun toJson(): JsonObject(source)

Converts the CreditCard object to a JsonObject representation. By default, sensitive information like cardNumber and cvv are excluded.

Return

A JsonObject containing the credit card data.