toJson method

Map<String, dynamic> toJson()

Converts the InitializeCustomerRequest object to a JSON map.

This method is typically used internally by the json_serializable package to serialize the object before sending it to the Gameball API. Null values are automatically removed from the final JSON output.

Implementation

Map<String, dynamic> toJson() {
  final json = _$InitializeCustomerRequestToJson(this);
  // Remove null values before sending
  json.removeWhere((key, value) => value == null);
  return json;
}