toJson method

  1. @override
Map<String, dynamic> toJson()
override

Converts the parameter to a JSON-serializable map.

Returns a map that can be serialized to JSON for the API request.

Implementation

@override
Map<String, dynamic> toJson() {
  return {
    'type': 'currency',
    'currency': {
      'code': currencyCode,
      'amount': amount,
    },
  };
}