Skip to content

Commit 5d29d1f

Browse files
authored
Merge pull request #314 from ej2/0.9.4
0.9.4 Release
2 parents 9d7e4a5 + e9d8606 commit 5d29d1f

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

54 files changed

+340
-457
lines changed

CHANGELOG.rst

+6
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
Changelog
22
=========
3+
* 0.9.4 (August 29, 2023)
4+
* Removed python 2 compatible decorators
5+
* Removed python 2 dependencies
6+
* Fixed issue with MarkupInfo field on AccountBasedExpenseLineDetail
7+
* Removed test files from package
8+
39
* 0.9.3 (March 7, 2023)
410
* Added support for Recurring Transaction
511
* Added support for optional query params

MANIFEST.in

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
include README.md
22
include LICENSE
3-
recursive-include tests *
3+
recursive-exclude tests *

Makefile

-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
21
publish: clean
32
python setup.py sdist
43
twine upload dist/*

Pipfile

+2-3
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,8 @@ urllib3 = ">=1.26.5"
1010
bleach = ">=3.3.0"
1111
intuit-oauth = "==1.2.4"
1212
rauth = ">=0.7.3"
13-
requests = ">=2.26.0"
14-
simplejson = ">=3.17.0"
15-
six = ">=1.14.0"
13+
requests = ">=2.31.0"
14+
simplejson = ">=3.19.1"
1615
nose = "*"
1716
coverage = "*"
1817
twine = "*"

Pipfile.lock

+289-280
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

README.md

+8
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ python-quickbooks
44
[![Python package](https://github.com/ej2/python-quickbooks/actions/workflows/python-package.yml/badge.svg)](https://github.com/ej2/python-quickbooks/actions/workflows/python-package.yml)
55
[![Coverage Status](https://coveralls.io/repos/github/ej2/python-quickbooks/badge.svg?branch=master)](https://coveralls.io/github/ej2/python-quickbooks?branch=master)
66
[![](https://img.shields.io/badge/License-MIT-yellow.svg)](https://github.com/ej2/python-quickbooks/blob/master/LICENSE)
7+
[![PyPI](https://img.shields.io/pypi/v/python-quickbooks)](https://pypi.org/project/python-quickbooks/)
78

89
A Python 3 library for accessing the Quickbooks API. Complete rework of
910
[quickbooks-python](https://github.com/troolee/quickbooks-python).
@@ -14,6 +15,13 @@ You can find additional examples of usage in [Integration tests folder](https://
1415

1516
For information about contributing, see the [Contributing Page](https://github.com/ej2/python-quickbooks/blob/master/contributing.md).
1617

18+
Installation
19+
------------
20+
21+
```bash
22+
pip install python-quickbooks
23+
```
24+
1725
QuickBooks OAuth
1826
------------------------------------------------
1927

dev_requirements.txt

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
coverage==6.4.2
2-
ipdb==0.13.9
3-
mock==2.0.0
1+
coverage==7.3.0
2+
ipdb==0.13.13
3+
mock==5.1.0
44
nose==1.3.7

quickbooks/mixins.py

+4-10
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
1-
from future.moves.urllib.parse import quote
1+
from urllib.parse import quote
22

33
try: import simplejson as json
44
except ImportError: import json
55

6-
import six
76
from .utils import build_where_clause, build_choose_clause
87
from .client import QuickBooks
98
from .exceptions import QuickbooksException
@@ -70,14 +69,9 @@ def to_dict(obj, classkey=None):
7069
elif hasattr(obj, "__iter__") and not isinstance(obj, str):
7170
return [to_dict(v, classkey) for v in obj]
7271
elif hasattr(obj, "__dict__"):
73-
if six.PY2:
74-
data = dict([(key, to_dict(value, classkey))
75-
for key, value in obj.__dict__.iteritems()
76-
if not callable(value) and not key.startswith('_')])
77-
else:
78-
data = dict([(key, to_dict(value, classkey))
79-
for key, value in obj.__dict__.items()
80-
if not callable(value) and not key.startswith('_')])
72+
data = dict([(key, to_dict(value, classkey))
73+
for key, value in obj.__dict__.items()
74+
if not callable(value) and not key.startswith('_')])
8175

8276
if classkey is not None and hasattr(obj, "__class__"):
8377
data[classkey] = obj.__class__.__name__

quickbooks/objects/account.py

-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
1-
from six import python_2_unicode_compatible
21
from .base import Ref, QuickbooksManagedObject, QuickbooksTransactionEntity
32

43

5-
@python_2_unicode_compatible
64
class Account(QuickbooksManagedObject, QuickbooksTransactionEntity):
75
"""
86
QBO definition: Account is a component of a Chart Of Accounts, and is part of a Ledger. Used to record a total

quickbooks/objects/attachable.py

-2
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,8 @@
1-
from six import python_2_unicode_compatible
21
from .base import Ref, QuickbooksManagedObject, QuickbooksTransactionEntity, AttachableRef
32
from ..client import QuickBooks
43
from ..mixins import DeleteMixin
54

65

7-
@python_2_unicode_compatible
86
class Attachable(DeleteMixin, QuickbooksManagedObject, QuickbooksTransactionEntity):
97
"""
108
QBO definition: This page covers the Attachable, Upload, and Download resources used for attachment management. Attachments are supplemental information linked to a transaction or Item object. They can be files, notes, or a combination of both.

quickbooks/objects/base.py

-10
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
from six import python_2_unicode_compatible
21
from ..mixins import ToDictMixin, ToJsonMixin, FromJsonMixin, ListMixin, ReadMixin, UpdateMixin
32

43

@@ -24,7 +23,6 @@ class QuickbooksReadOnlyObject(QuickbooksBaseObject, ReadMixin, ListMixin):
2423
pass
2524

2625

27-
@python_2_unicode_compatible
2826
class MetaData(FromJsonMixin):
2927
def __init__(self):
3028
self.CreateTime = ""
@@ -44,7 +42,6 @@ def to_linked_txn(self):
4442
return linked_txn
4543

4644

47-
@python_2_unicode_compatible
4845
class Address(QuickbooksBaseObject):
4946
def __init__(self):
5047
self.Id = None
@@ -65,7 +62,6 @@ def __str__(self):
6562
return "{0} {1}, {2} {3}".format(self.Line1, self.City, self.CountrySubDivisionCode, self.PostalCode)
6663

6764

68-
@python_2_unicode_compatible
6965
class PhoneNumber(ToJsonMixin, FromJsonMixin, ToDictMixin):
7066
def __init__(self):
7167
self.FreeFormNumber = ""
@@ -74,7 +70,6 @@ def __str__(self):
7470
return self.FreeFormNumber
7571

7672

77-
@python_2_unicode_compatible
7873
class EmailAddress(QuickbooksBaseObject):
7974
def __init__(self):
8075
self.Address = ""
@@ -83,7 +78,6 @@ def __str__(self):
8378
return self.Address
8479

8580

86-
@python_2_unicode_compatible
8781
class WebAddress(QuickbooksBaseObject):
8882
def __init__(self):
8983
self.URI = ""
@@ -92,7 +86,6 @@ def __str__(self):
9286
return self.URI
9387

9488

95-
@python_2_unicode_compatible
9689
class Ref(QuickbooksBaseObject):
9790
def __init__(self):
9891
self.value = ""
@@ -103,7 +96,6 @@ def __str__(self):
10396
return self.name
10497

10598

106-
@python_2_unicode_compatible
10799
class CustomField(QuickbooksBaseObject):
108100
def __init__(self):
109101
self.DefinitionId = ""
@@ -115,7 +107,6 @@ def __str__(self):
115107
return self.Name
116108

117109

118-
@python_2_unicode_compatible
119110
class LinkedTxn(QuickbooksBaseObject):
120111
qbo_object_name = "LinkedTxn"
121112

@@ -129,7 +120,6 @@ def __str__(self):
129120
return str(self.TxnId)
130121

131122

132-
@python_2_unicode_compatible
133123
class CustomerMemo(QuickbooksBaseObject):
134124
def __init__(self):
135125
super(CustomerMemo, self).__init__()

quickbooks/objects/batchrequest.py

-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
from six import python_2_unicode_compatible
21
from ..mixins import ToJsonMixin, FromJsonMixin
32

43

@@ -8,7 +7,6 @@ class BatchOperation(object):
87
DELETE = "delete"
98

109

11-
@python_2_unicode_compatible
1210
class FaultError(FromJsonMixin):
1311
qbo_object_name = "Error"
1412

quickbooks/objects/bill.py

-4
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
from six import python_2_unicode_compatible
2-
31
from quickbooks.objects.detailline import DetailLine, ItemBasedExpenseLine, AccountBasedExpenseLine, \
42
TDSLine
53
from .base import Ref, LinkedTxn, QuickbooksManagedObject, QuickbooksTransactionEntity, \
@@ -8,7 +6,6 @@
86
from ..mixins import DeleteMixin
97

108

11-
@python_2_unicode_compatible
129
class Bill(DeleteMixin, QuickbooksManagedObject, QuickbooksTransactionEntity, LinkedTxnMixin):
1310
"""
1411
QBO definition: A Bill entity is an AP transaction representing a request-for-payment from a third party for
@@ -79,4 +76,3 @@ def to_ref(self):
7976
ref.value = self.Id
8077

8178
return ref
82-

quickbooks/objects/billpayment.py

-4
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,8 @@
1-
from six import python_2_unicode_compatible
21
from .base import QuickbooksBaseObject, Ref, LinkedTxn, QuickbooksManagedObject, LinkedTxnMixin, \
32
QuickbooksTransactionEntity
43
from ..mixins import DeleteMixin
54

65

7-
@python_2_unicode_compatible
86
class CheckPayment(QuickbooksBaseObject):
97
class_dict = {
108
"BankAccountRef": Ref
@@ -33,7 +31,6 @@ def __init__(self):
3331
self.CCAccountRef = None
3432

3533

36-
@python_2_unicode_compatible
3734
class BillPaymentLine(QuickbooksBaseObject):
3835
list_dict = {
3936
"LinkedTxn": LinkedTxn
@@ -50,7 +47,6 @@ def __str__(self):
5047
return str(self.Amount)
5148

5249

53-
@python_2_unicode_compatible
5450
class BillPayment(DeleteMixin, QuickbooksManagedObject, QuickbooksTransactionEntity, LinkedTxnMixin):
5551
"""
5652
QBO definition: A BillPayment entity represents the financial transaction of payment

quickbooks/objects/budget.py

-4
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,7 @@
1-
from six import python_2_unicode_compatible
21
from .base import QuickbooksBaseObject, Ref, QuickbooksTransactionEntity, \
32
QuickbooksReadOnlyObject
43

54

6-
@python_2_unicode_compatible
75
class BudgetDetail(QuickbooksBaseObject):
86
class_dict = {
97
"AccountRef": Ref,
@@ -26,7 +24,6 @@ def __str__(self):
2624
return str(self.Amount)
2725

2826

29-
@python_2_unicode_compatible
3027
class Budget(QuickbooksReadOnlyObject, QuickbooksTransactionEntity):
3128
"""
3229
QBO definition: The Budget endpoint allows you to retrieve the current state of budgets already set up in the user's
@@ -56,4 +53,3 @@ def __init__(self):
5653

5754
def __str__(self):
5855
return self.Name
59-

quickbooks/objects/changedatacapture.py

+6-6
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,14 @@
22

33

44
class CDCResponse(FromJsonMixin):
5-
qbo_object_name = "CDCResponse"
5+
qbo_object_name = "CDCResponse"
66

7-
def __init__(self):
8-
super(CDCResponse, self).__init__()
7+
def __init__(self):
8+
super(CDCResponse, self).__init__()
99

1010

1111
class QueryResponse(FromJsonMixin, ObjectListMixin):
12-
qbo_object_name = "QueryResponse"
12+
qbo_object_name = "QueryResponse"
1313

14-
def __init__(self):
15-
super(QueryResponse, self).__init__()
14+
def __init__(self):
15+
super(QueryResponse, self).__init__()

quickbooks/objects/company_info.py

-2
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,7 @@
1-
from six import python_2_unicode_compatible
21
from .base import Address, PhoneNumber, EmailAddress, WebAddress, \
32
QuickbooksManagedObject, Ref, MetaData
43

54

6-
@python_2_unicode_compatible
75
class CompanyInfo(QuickbooksManagedObject):
86
"""
97
QBO definition: The CompanyInfo entity contains basic company information.

quickbooks/objects/companycurrency.py

-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
1-
from six import python_2_unicode_compatible
21
from .base import QuickbooksManagedObject, QuickbooksTransactionEntity, Ref, CustomField, MetaData
32

43

5-
@python_2_unicode_compatible
64
class CompanyCurrency(QuickbooksManagedObject, QuickbooksTransactionEntity):
75
"""
86
QBO definition: Applicable only for those companies that enable multicurrency, a companycurrency object

quickbooks/objects/creditcardpayment_entity.py

-2
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,7 @@
1-
from six import python_2_unicode_compatible
21
from .base import Ref, QuickbooksManagedObject, QuickbooksTransactionEntity, LinkedTxnMixin, MetaData
32
from ..mixins import DeleteMixin
43

54

6-
@python_2_unicode_compatible
75
class CreditCardPayment(DeleteMixin, QuickbooksManagedObject, QuickbooksTransactionEntity, LinkedTxnMixin):
86
"""
97
QBO definition: A Represents a financial transaction to record a Credit Card balance payment

quickbooks/objects/creditmemo.py

-3
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,10 @@
1-
from six import python_2_unicode_compatible
2-
31
from quickbooks.objects.detailline import SalesItemLine, SubtotalLine, DiscountLine, DescriptionOnlyLine, DetailLine
42
from .base import Address, EmailAddress, Ref, CustomField, CustomerMemo, QuickbooksManagedObject, \
53
LinkedTxnMixin, QuickbooksTransactionEntity
64
from .tax import TxnTaxDetail
75
from ..mixins import DeleteMixin
86

97

10-
@python_2_unicode_compatible
118
class CreditMemo(DeleteMixin, QuickbooksTransactionEntity, QuickbooksManagedObject, LinkedTxnMixin):
129
"""
1310
QBO definition: The CreditMemo is a financial transaction representing a refund or credit of payment or part

quickbooks/objects/customer.py

-2
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,7 @@
1-
from six import python_2_unicode_compatible
21
from .base import Address, PhoneNumber, EmailAddress, WebAddress, Ref, QuickbooksManagedObject, \
32
QuickbooksTransactionEntity
43

54

6-
@python_2_unicode_compatible
75
class Customer(QuickbooksManagedObject, QuickbooksTransactionEntity):
86
"""
97
QBO definition: A customer is a consumer of the service or product that your business offers. The Customer object

quickbooks/objects/customertype.py

-2
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,7 @@
1-
from six import python_2_unicode_compatible
21
from .base import Address, PhoneNumber, EmailAddress, WebAddress, MetaData, QuickbooksReadOnlyObject, \
32
QuickbooksTransactionEntity
43

54

6-
@python_2_unicode_compatible
75
class CustomerType(QuickbooksReadOnlyObject, QuickbooksTransactionEntity):
86
"""
97
QBO definition: Customer types allow categorizing customers in ways that are meaningful to the business.

quickbooks/objects/department.py

-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
1-
from six import python_2_unicode_compatible
21
from .base import QuickbooksManagedObject, QuickbooksTransactionEntity, Ref
32

43

5-
@python_2_unicode_compatible
64
class Department(QuickbooksManagedObject, QuickbooksTransactionEntity):
75
"""
86
QBO definition: The Department entity provides a way to track different segments of the business, divisions, or

quickbooks/objects/deposit.py

-3
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
from six import python_2_unicode_compatible
21
from .base import QuickbooksBaseObject, Ref, LinkedTxn, QuickbooksManagedObject, LinkedTxnMixin, \
32
QuickbooksTransactionEntity, CustomField, AttachableRef
43
from ..mixins import DeleteMixin
@@ -35,7 +34,6 @@ def __init__(self):
3534
self.PaymentMethodRef = None
3635

3736

38-
@python_2_unicode_compatible
3937
class DepositLine(QuickbooksBaseObject):
4038
class_dict = {
4139
"DepositToAccountRef": Ref,
@@ -63,7 +61,6 @@ def __str__(self):
6361
return str(self.Amount)
6462

6563

66-
@python_2_unicode_compatible
6764
class Deposit(DeleteMixin, QuickbooksManagedObject, QuickbooksTransactionEntity, LinkedTxnMixin):
6865
"""
6966
QBO definition: A deposit object is a transaction that records one or more deposits of the following types:

0 commit comments

Comments
 (0)