updateKey method

Implementation

Future<OpenRouterManagedApiKey> updateKey(
  String hash,
  OpenRouterUpdateApiKeyRequest request,
) async {
  final response = await _send(
    method: 'PATCH',
    path: '/keys/${Uri.encodeComponent(hash)}',
    body: request.toMap(),
    expectedStatusCodes: const {200},
  );

  return OpenRouterManagedApiKey.fromMap(
    _requireMap(response['data'], 'data'),
  );
}