From 54dfba3e96aec279a5d04daec2572d825349d147 Mon Sep 17 00:00:00 2001 From: Edward Emanuel Date: Tue, 12 Mar 2024 15:21:13 -0500 Subject: [PATCH 1/2] 0.9.7 changes --- Pipfile | 2 +- quickbooks/objects/companycurrency.py | 2 +- quickbooks/objects/customer.py | 1 + tests/unit/objects/test_companycurrency.py | 3 ++- 4 files changed, 5 insertions(+), 3 deletions(-) diff --git a/Pipfile b/Pipfile index 85ad666..4d3612c 100644 --- a/Pipfile +++ b/Pipfile @@ -11,7 +11,7 @@ pytest-cov = "*" [packages] urllib3 = ">=2.1.0" -intuit-oauth = "==1.2.4" +intuit-oauth = "==1.2.5" requests = ">=2.31.0" simplejson = ">=3.19.1" requests_oauthlib = ">=1.3.1" diff --git a/quickbooks/objects/companycurrency.py b/quickbooks/objects/companycurrency.py index b4f788e..20f6b77 100644 --- a/quickbooks/objects/companycurrency.py +++ b/quickbooks/objects/companycurrency.py @@ -35,6 +35,6 @@ def to_ref(self): ref.name = self.Name ref.type = self.qbo_object_name - ref.value = self.Id + ref.value = self.Code return ref diff --git a/quickbooks/objects/customer.py b/quickbooks/objects/customer.py index 2bf0f19..87bf95a 100644 --- a/quickbooks/objects/customer.py +++ b/quickbooks/objects/customer.py @@ -71,6 +71,7 @@ def __init__(self): self.PaymentMethodRef = None self.ParentRef = None self.ARAccountRef = None + self.CurrencyRef = None def __str__(self): return self.DisplayName diff --git a/tests/unit/objects/test_companycurrency.py b/tests/unit/objects/test_companycurrency.py index 7582be3..34a1a10 100644 --- a/tests/unit/objects/test_companycurrency.py +++ b/tests/unit/objects/test_companycurrency.py @@ -13,11 +13,12 @@ def test_unicode(self): def test_to_ref(self): company_currency = CompanyCurrency() company_currency.Name = "test" + company_currency.Code = "USD" company_currency.Id = 23 ref = company_currency.to_ref() self.assertEqual(ref.name, "test") self.assertEqual(ref.type, "CompanyCurrency") - self.assertEqual(ref.value, 23) + self.assertEqual(ref.value, "USD") From d7c6d1918bde3f8c1763f50161453904269db3b3 Mon Sep 17 00:00:00 2001 From: Edward Emanuel Date: Tue, 12 Mar 2024 15:28:04 -0500 Subject: [PATCH 2/2] Update changelog and version --- CHANGELOG.rst | 6 ++++++ setup.py | 4 ++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 159fd97..8654075 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -1,5 +1,11 @@ Changelog ========= +* 0.9.7 (March 12, 2024) + * Update intuit-oauth dependency + * Updated CompanyCurrency to ref to use Code instead of Id + * Added missing CurrentRef property from customer object + * Made improvements to file attachment handling + * 0.9.6 (January 2, 2024) * Replace RAuth with requests_oauthlib * Removed python 2 code from client.py diff --git a/setup.py b/setup.py index f4620a5..55f0654 100644 --- a/setup.py +++ b/setup.py @@ -10,7 +10,7 @@ def read(*parts): return fp.read() -VERSION = (0, 9, 6) +VERSION = (0, 9, 7) version = '.'.join(map(str, VERSION)) setup( @@ -31,7 +31,7 @@ def read(*parts): install_requires=[ 'setuptools', - 'intuit-oauth==1.2.4', + 'intuit-oauth==1.2.5', 'requests_oauthlib>=1.3.1', 'requests>=2.31.0', 'simplejson>=3.19.1',