From f5203bc83cf0c828374045055cda437340045eba Mon Sep 17 00:00:00 2001 From: Velina Date: Fri, 20 Sep 2019 11:08:54 +0200 Subject: [PATCH] Update client get endpoints for MCS [chch16182] (#31) * Add subscription_set_external_id to the response from Subscription and Invoice * Change version and copyright year --- chartmogul/__init__.py | 4 ++-- chartmogul/api/invoice.py | 1 + chartmogul/api/subscription.py | 1 + test/api/test_subscription.py | 1 + 4 files changed, 5 insertions(+), 2 deletions(-) diff --git a/chartmogul/__init__.py b/chartmogul/__init__.py index 4468ff9..6094751 100644 --- a/chartmogul/__init__.py +++ b/chartmogul/__init__.py @@ -29,8 +29,8 @@ """ __title__ = 'chartmogul' -__version__ = '1.2.4' +__version__ = '1.2.5' __build__ = 0x000000 __author__ = 'ChartMogul Ltd' __license__ = 'MIT' -__copyright__ = 'Copyright 2017 ChartMogul Ltd' +__copyright__ = 'Copyright 2019 ChartMogul Ltd' diff --git a/chartmogul/api/invoice.py b/chartmogul/api/invoice.py index d2442b3..fce6ab7 100644 --- a/chartmogul/api/invoice.py +++ b/chartmogul/api/invoice.py @@ -12,6 +12,7 @@ class _Schema(Schema): type = fields.String() subscription_uuid = fields.String(allow_none=True) subscription_external_id = fields.String(allow_none=True) + subscription_set_external_id = fields.String(allow_none=True) plan_uuid = fields.String(allow_none=True) prorated = fields.Boolean() service_period_start = fields.DateTime(allow_none=True) diff --git a/chartmogul/api/subscription.py b/chartmogul/api/subscription.py index 10ab80f..1cff52e 100644 --- a/chartmogul/api/subscription.py +++ b/chartmogul/api/subscription.py @@ -29,6 +29,7 @@ class _Schema(Schema): # /import namespace uuid = fields.String(allow_none=True) external_id = fields.String(allow_none=True) + subscription_set_external_id = fields.String(allow_none=True) plan_uuid = fields.String(allow_none=True) customer_uuid = fields.String(allow_none=True) data_source_uuid = fields.String(allow_none=True) diff --git a/test/api/test_subscription.py b/test/api/test_subscription.py index 229a467..f827524 100644 --- a/test/api/test_subscription.py +++ b/test/api/test_subscription.py @@ -95,6 +95,7 @@ def test_list_imported_subscriptions(self, mock_requests): { "uuid": "sub_e6bc5407-e258-4de0-bb43-61faaf062035", "external_id": "sub_0001", + "subscription_set_external_id": "sub_set_0001", "plan_uuid": "pl_eed05d54-75b4-431b-adb2-eb6b9e543206", "data_source_uuid": "ds_fef05d54-47b4-431b-aed2-eb6b9e545430", "cancellation_dates":[]