"""API Client for ows_abacus_legacy_sync.""" import requests class AbacusLegacySyncAPIClient: """API Client for ows_abacus_legacy_sync.""" def __init__(self, base_url, headers): """Initialize ows_abacus_legacy_sync_APIClient class.""" self.base_url = base_url self.headers = headers def get_hello(self): """Execute a GET against /hello endpoint.""" endpoint = '{}/hello'.format(self.base_url) return requests.get(endpoint, headers=self.headers) def post_vendor_contract(self, body): """Execute a POST against /vendor-contract endpoint.""" endpoint = '{}/vendor-contract'.format(self.base_url) return requests.post(endpoint, headers=self.headers, json=body) def post_vendor_contract_distribution_type(self, body): """POST /vendor-contract-distribution-type endpoint.""" endpoint = '{}/vendor-contract-distribution-type'.format(self.base_url) return requests.post(endpoint, headers=self.headers, json=body) def put_vendor_contract(self, vendor_contract_id, body): """PUT /vendor-contract/ endpoint.""" endpoint = '{}/vendor-contract/{}'.format(self.base_url, vendor_contract_id) return requests.put(endpoint, headers=self.headers, json=body)