Map<String, dynamic> toJson() { if (getId().isNumeric()) { return (this as BasicPaymentProduct).toJson(); } else { return (this as BasicPaymentProductGroup).toJson(); } }