From 86bffe47e2cf11c4c00b9b5ac445f6478fa17f7e Mon Sep 17 00:00:00 2001 From: 8eth Date: Thu, 1 Feb 2024 11:45:30 -0800 Subject: [PATCH] add-revrec-for-business-entities --- recurly/__init__.py | 4 +++- tests/fixtures/business_entity/get.xml | 2 ++ tests/fixtures/business_entity/list.xml | 4 ++++ tests/test_resources.py | 2 ++ 4 files changed, 11 insertions(+), 1 deletion(-) diff --git a/recurly/__init__.py b/recurly/__init__.py index b35d3df7..29f54d02 100644 --- a/recurly/__init__.py +++ b/recurly/__init__.py @@ -490,7 +490,9 @@ class BusinessEntity(Resource): 'default_vat_number', 'default_registration_number', 'created_at', - 'updated_at' + 'updated_at', + 'default_revenue_gl_account_id', + 'default_liability_gl_account_id', ) _classes_for_nodename = { diff --git a/tests/fixtures/business_entity/get.xml b/tests/fixtures/business_entity/get.xml index 96407ea4..e5946c23 100644 --- a/tests/fixtures/business_entity/get.xml +++ b/tests/fixtures/business_entity/get.xml @@ -40,4 +40,6 @@ Content-Type: application/xml; charset=utf-8 ab1 2023-05-13T17:28:47Z 2023-10-13T17:28:48Z + t5ejtge1xw0x + t5ejtgf1vxh1 diff --git a/tests/fixtures/business_entity/list.xml b/tests/fixtures/business_entity/list.xml index 5d7c88a4..ab4f8008 100644 --- a/tests/fixtures/business_entity/list.xml +++ b/tests/fixtures/business_entity/list.xml @@ -39,6 +39,8 @@ Content-Type: application/xml; charset=utf-8 2023-05-25T15:56:47Z 2023-05-25T15:56:47Z + + @@ -69,5 +71,7 @@ Content-Type: application/xml; charset=utf-8 2023-04-12T15:11:58Z 2023-05-15T15:34:01Z + t5ejtge1xw0x + t5ejtgf1vxh1 diff --git a/tests/test_resources.py b/tests/test_resources.py index 33727eef..d77e5dd2 100644 --- a/tests/test_resources.py +++ b/tests/test_resources.py @@ -3210,6 +3210,8 @@ def test_get_business_entity(self): self.assertIsInstance(entity.invoice_display_address, Address) self.assertEqual(entity.created_at, datetime(2023, 5, 13, 17, 28, 47, tzinfo=entity.created_at.tzinfo)) self.assertEqual(entity.updated_at, datetime(2023, 10, 13, 17, 28, 48, tzinfo=entity.updated_at.tzinfo)) + self.assertEqual(entity.default_liability_gl_account_id, 't5ejtge1xw0x') + self.assertEqual(entity.default_revenue_gl_account_id, 't5ejtgf1vxh1') def test_list_business_entities(self): with self.mock_request('business_entity/list.xml'):