"""API Client for adjustments_apply dockerized lambda.""" from typing import Any import requests class DockerizedLambdaAPIClient: """API Client for adjustments_apply dockerized lambda.""" def __init__(self, base_url: str, headers: dict[str, str]) -> None: """Initialize DockerizedLambdaAPIClient class.""" self.base_url = base_url self.headers = headers def post_lambda(self, date: str, body: dict[str, Any]) -> requests.Response: """Invoke the lambda.""" endpoint = '{}/{}/functions/function/invocations'.format(self.base_url, date) return requests.post(endpoint, headers=self.headers, json=body)