From de4e0a2cb9e03961ce4a4924482eda4fd5d8c034 Mon Sep 17 00:00:00 2001 From: Hassansin Date: Tue, 3 Sep 2019 15:33:25 +0600 Subject: [PATCH] Allow customer_external_id field (#30) --- chartmogul/__init__.py | 2 +- chartmogul/api/invoice.py | 1 + test/api/test_invoice.py | 2 ++ 3 files changed, 4 insertions(+), 1 deletion(-) diff --git a/chartmogul/__init__.py b/chartmogul/__init__.py index 786a754..4468ff9 100644 --- a/chartmogul/__init__.py +++ b/chartmogul/__init__.py @@ -29,7 +29,7 @@ """ __title__ = 'chartmogul' -__version__ = '1.2.3' +__version__ = '1.2.4' __build__ = 0x000000 __author__ = 'ChartMogul Ltd' __license__ = 'MIT' diff --git a/chartmogul/api/invoice.py b/chartmogul/api/invoice.py index 1ed1f52..d2442b3 100644 --- a/chartmogul/api/invoice.py +++ b/chartmogul/api/invoice.py @@ -42,6 +42,7 @@ class _Schema(Schema): uuid = fields.String() external_id = fields.String(allow_none=True) customer_uuid = fields.String(allow_none=True) + customer_external_id = fields.String(allow_none=True) data_source_uuid = fields.String(allow_none=True) currency = fields.String() diff --git a/test/api/test_invoice.py b/test/api/test_invoice.py index 498021f..23a9cca 100644 --- a/test/api/test_invoice.py +++ b/test/api/test_invoice.py @@ -17,6 +17,7 @@ "external_id": "INV0001", "date": datetime(2015, 11, 1, 0, 0, 0), # "2015-11-01 00:00:00", "currency": "USD", + "customer_external_id": "ext-id", # "2015-11-15 00:00:00", "due_date": datetime(2015, 11, 15, 0, 0, 0), "line_items": [ @@ -63,6 +64,7 @@ u"date": u"2015-11-01T00:00:00", u"currency": u"USD", u"due_date": u"2015-11-15T00:00:00", + u"customer_external_id": u"ext-id", u"line_items": [ { u"type": "subscription",