diff --git a/CHANGELOG.md b/CHANGELOG.md index 16fad6f..5366106 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,10 @@ Records breaking changes from major version bumps +## 27.0.0 + +Require the agreement details when creating a framework agreement + ## 26.0.0 Rename Supplier Evaluation methods to Lot Questions Response diff --git a/dmapiclient/__init__.py b/dmapiclient/__init__.py index 955e73f..1bf70d0 100644 --- a/dmapiclient/__init__.py +++ b/dmapiclient/__init__.py @@ -1,4 +1,4 @@ -__version__ = '26.7.0' +__version__ = '27.0.0' from .errors import APIError, HTTPError, InvalidResponse # noqa from .errors import REQUEST_ERROR_STATUS_CODE, REQUEST_ERROR_MESSAGE # noqa diff --git a/dmapiclient/data.py b/dmapiclient/data.py index eb0a24c..f188ea4 100644 --- a/dmapiclient/data.py +++ b/dmapiclient/data.py @@ -1089,11 +1089,15 @@ def get_supplier_framework_agreement(self, framework_slug): return self._get( "/agreements/{}".format(framework_slug)) - def create_framework_agreement(self, supplier_id, framework_slug, user=None): + def create_framework_agreement(self, supplier_id, framework_slug, signed_agreement_details, user=None): return self._post_with_updated_by( "/agreements", data={ - "agreement": {"supplierId": supplier_id, "frameworkSlug": framework_slug}, + "agreement": { + "supplierId": supplier_id, + "frameworkSlug": framework_slug, + "signedAgreementDetails": signed_agreement_details + }, }, user=user ) diff --git a/tests/test_data_api_client.py b/tests/test_data_api_client.py index 2e7cdec..b2eb233 100644 --- a/tests/test_data_api_client.py +++ b/tests/test_data_api_client.py @@ -2401,11 +2401,26 @@ def test_create_framework_agreement(self, data_client, rmock): json={"agreement": {'details': 'here'}}, status_code=201) - result = data_client.create_framework_agreement(10, 'g-cloud-8', "user@example.com") + result = data_client.create_framework_agreement( + 10, + 'g-cloud-8', + { + "signerName": "Rex", + "signerRole": "Driver of the Aegis" + }, + "user@example.com" + ) assert result == {"agreement": {'details': 'here'}} assert rmock.last_request.json() == { - "agreement": {"supplierId": 10, "frameworkSlug": "g-cloud-8"}, + "agreement": { + "supplierId": 10, + "frameworkSlug": "g-cloud-8", + "signedAgreementDetails": { + "signerName": "Rex", + "signerRole": "Driver of the Aegis" + } + }, "updated_by": "user@example.com", }