Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: ej2/python-quickbooks
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 0.7.5
Choose a base ref
...
head repository: ej2/python-quickbooks
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: master
Choose a head ref
Loading
Showing with 27,652 additions and 2,549 deletions.
  1. +23 −0 .github/workflows/pylint.yml
  2. +44 −0 .github/workflows/python-package.yml
  3. +0 −14 .travis.yml
  4. +119 −1 CHANGELOG.rst
  5. +76 −0 CODE_OF_CONDUCT.md
  6. +2 −2 MANIFEST.in
  7. +0 −1 Makefile
  8. +17 −0 Pipfile
  9. +734 −0 Pipfile.lock
  10. +328 −0 README.md
  11. +0 −471 README.rst
  12. +44 −0 contributing.md
  13. +3 −3 dev_requirements.txt
  14. +23,682 −0 get-pip.py
  15. +1 −2 quickbooks/__init__.py
  16. +0 −273 quickbooks/auth.py
  17. +9 −6 quickbooks/cdc.py
  18. +92 −103 quickbooks/client.py
  19. +17 −7 quickbooks/exceptions.py
  20. +158 −31 quickbooks/mixins.py
  21. +9 −3 quickbooks/objects/__init__.py
  22. +0 −2 quickbooks/objects/account.py
  23. +2 −4 quickbooks/objects/attachable.py
  24. +2 −12 quickbooks/objects/base.py
  25. +0 −2 quickbooks/objects/batchrequest.py
  26. +6 −6 quickbooks/objects/bill.py
  27. +2 −6 quickbooks/objects/billpayment.py
  28. +0 −4 quickbooks/objects/budget.py
  29. +6 −6 quickbooks/objects/changedatacapture.py
  30. +5 −5 quickbooks/objects/company_info.py
  31. +40 −0 quickbooks/objects/companycurrency.py
  32. +40 −0 quickbooks/objects/creditcardpayment_entity.py
  33. +10 −5 quickbooks/objects/creditmemo.py
  34. +3 −2 quickbooks/objects/customer.py
  35. +26 −0 quickbooks/objects/customertype.py
  36. +0 −2 quickbooks/objects/department.py
  37. +0 −3 quickbooks/objects/deposit.py
  38. +35 −22 quickbooks/objects/detailline.py
  39. +8 −4 quickbooks/objects/employee.py
  40. +15 −6 quickbooks/objects/estimate.py
  41. +36 −0 quickbooks/objects/exchangerate.py
  42. +34 −7 quickbooks/objects/invoice.py
  43. +0 −2 quickbooks/objects/item.py
  44. +2 −4 quickbooks/objects/journalentry.py
  45. +9 −6 quickbooks/objects/payment.py
  46. +8 −3 quickbooks/objects/paymentmethod.py
  47. +240 −0 quickbooks/objects/preferences.py
  48. +5 −6 quickbooks/objects/purchase.py
  49. +7 −6 quickbooks/objects/purchaseorder.py
  50. +130 −0 quickbooks/objects/recurringtransaction.py
  51. +28 −9 quickbooks/objects/refundreceipt.py
  52. +2 −4 quickbooks/objects/salesreceipt.py
  53. +0 −4 quickbooks/objects/tax.py
  54. +0 −2 quickbooks/objects/taxagency.py
  55. +0 −2 quickbooks/objects/taxcode.py
  56. +0 −5 quickbooks/objects/taxrate.py
  57. +0 −3 quickbooks/objects/taxservice.py
  58. +10 −3 quickbooks/objects/term.py
  59. +0 −2 quickbooks/objects/timeactivity.py
  60. +0 −2 quickbooks/objects/trackingclass.py
  61. +0 −2 quickbooks/objects/transfer.py
  62. +2 −3 quickbooks/objects/vendor.py
  63. +3 −6 quickbooks/objects/vendorcredit.py
  64. 0 quickbooks/tools/__init__.py
  65. +0 −161 quickbooks/tools/auth.py
  66. +0 −44 quickbooks/tools/cli.py
  67. +2 −14 quickbooks/utils.py
  68. +3 −4 requirements.txt
  69. +8 −0 setup.cfg
  70. +17 −15 setup.py
  71. +17 −22 tests/integration/test_account.py
  72. +21 −24 tests/integration/test_attachable.py
  73. +46 −0 tests/integration/test_base.py
  74. +26 −23 tests/integration/test_bill.py
  75. +51 −30 tests/integration/test_billpayment.py
  76. +13 −0 tests/integration/test_companycurrency.py
  77. +62 −0 tests/integration/test_creditcardpayment_entity.py
  78. +12 −31 tests/integration/test_creditmemo.py
  79. +4 −21 tests/integration/test_customer.py
  80. +3 −19 tests/integration/test_department.py
  81. +2 −23 tests/integration/test_deposit.py
  82. +2 −22 tests/integration/test_employee.py
  83. +16 −22 tests/integration/test_estimate.py
  84. +21 −0 tests/integration/test_exchangerate.py
  85. +89 −46 tests/integration/test_invoice.py
  86. +13 −26 tests/integration/test_item.py
  87. +60 −0 tests/integration/test_payment.py
  88. +31 −0 tests/integration/test_preferences.py
  89. +56 −0 tests/integration/test_purchase.py
  90. +11 −30 tests/integration/test_purchaseorder.py
  91. +170 −0 tests/integration/test_recurringtransaction.py
  92. +51 −0 tests/integration/test_refundreceipt.py
  93. +59 −0 tests/integration/test_salesreceipt.py
  94. +24 −0 tests/integration/test_taxagency.py
  95. +3 −22 tests/integration/test_taxcode.py
  96. +3 −22 tests/integration/test_taxrate.py
  97. +8 −23 tests/integration/test_taxservice.py
  98. +8 −23 tests/integration/test_term.py
  99. +10 −25 tests/integration/test_timeactivity.py
  100. +7 −22 tests/integration/test_trackingclass.py
  101. +10 −23 tests/integration/test_transfer.py
  102. +25 −40 tests/integration/test_vendor.py
  103. +4 −4 tests/unit/objects/test_account.py
  104. +4 −4 tests/unit/objects/test_attachable.py
  105. +21 −21 tests/unit/objects/test_base.py
  106. +9 −9 tests/unit/objects/test_batchrequest.py
  107. +7 −7 tests/unit/objects/test_bill.py
  108. +4 −4 tests/unit/objects/test_billpayment.py
  109. +2 −2 tests/unit/objects/test_budget.py
  110. +4 −4 tests/unit/objects/test_company_info.py
  111. +24 −0 tests/unit/objects/test_companycurrency.py
  112. +14 −14 tests/unit/objects/test_creditcardpayment.py
  113. +19 −0 tests/unit/objects/test_creditcardpayment_entity.py
  114. +20 −12 tests/unit/objects/test_creditmemo.py
  115. +4 −4 tests/unit/objects/test_customer.py
  116. +19 −0 tests/unit/objects/test_customertype.py
  117. +4 −4 tests/unit/objects/test_department.py
  118. +11 −11 tests/unit/objects/test_deposit.py
  119. +34 −43 tests/unit/objects/test_detailline.py
  120. +4 −4 tests/unit/objects/test_employee.py
  121. +1 −1 tests/unit/objects/test_estimate.py
  122. +23 −0 tests/unit/objects/test_exchangerate.py
  123. +18 −6 tests/unit/objects/test_invoice.py
  124. +4 −4 tests/unit/objects/test_item.py
  125. +14 −14 tests/unit/objects/test_journalentry.py
  126. +2 −2 tests/unit/objects/test_payment.py
  127. +12 −1 tests/unit/objects/test_paymentmethod.py
  128. +19 −0 tests/unit/objects/test_preferences.py
  129. +1 −1 tests/unit/objects/test_purchase.py
  130. +1 −1 tests/unit/objects/test_purchaseorder.py
  131. +29 −0 tests/unit/objects/test_recurringtransaction.py
  132. +1 −1 tests/unit/objects/test_refundreceipt.py
  133. +1 −1 tests/unit/objects/test_salesreceipt.py
  134. +3 −3 tests/unit/objects/test_tax.py
  135. +1 −1 tests/unit/objects/test_taxagency.py
  136. +7 −7 tests/unit/objects/test_taxcode.py
  137. +1 −1 tests/unit/objects/test_taxrate.py
  138. +2 −2 tests/unit/objects/test_taxservice.py
  139. +12 −1 tests/unit/objects/test_term.py
  140. +10 −10 tests/unit/objects/test_timeactivity.py
  141. +4 −4 tests/unit/objects/test_trackingclass.py
  142. +1 −1 tests/unit/objects/test_transfer.py
  143. +6 −6 tests/unit/objects/test_vendor.py
  144. +1 −1 tests/unit/objects/test_vendorcredit.py
  145. +0 −215 tests/unit/test_auth.py
  146. +5 −5 tests/unit/test_batch.py
  147. +23 −4 tests/unit/test_cdc.py
  148. +82 −87 tests/unit/test_client.py
  149. +4 −4 tests/unit/test_exception.py
  150. +3 −3 tests/unit/test_helpers.py
  151. +115 −118 tests/unit/test_mixins.py
  152. 0 tests/unit/tools/__init__.py
  153. +0 −31 tests/unit/tools/test_auth.py
23 changes: 23 additions & 0 deletions .github/workflows/pylint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: Pylint

on: [push]

jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install pylint
- name: Analysing the code with pylint
run: |
pylint $(git ls-files '*.py')
44 changes: 44 additions & 0 deletions .github/workflows/python-package.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
# This workflow will install Python dependencies, run tests and lint with a variety of Python versions
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python

name: Python package

on:
push:
branches: [ "master" ]
pull_request:
branches: [ "master" ]

jobs:
build:

runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: ["3.7", "3.8", "3.9", "3.10", "3.11", "3.12"]

steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install flake8 pytest coverage pytest-cov
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
- name: Lint with flake8
run: |
# stop the build if there are Python syntax errors or undefined names
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
- name: Test with pytest
run: |
pytest tests/unit --cov
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v3
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
14 changes: 0 additions & 14 deletions .travis.yml

This file was deleted.

120 changes: 119 additions & 1 deletion CHANGELOG.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,124 @@
Changelog
=========

* 0.9.10 (August 7, 2024)
* Update intuit-oauth dependency
* Fix issues with Invoice Sharable Link
* Added optional params to get

* 0.9.9 (July 9, 2024)
* Removed simplejson
* Added use_decimal option (See PR: https://github.com/ej2/python-quickbooks/pull/356 for details)

* 0.9.8 (May 20, 2024)
* Added ItemAccountRef to SalesItemLineDetail
* Updated from_json example in readme

* 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
* Removed unused dependencies from Pipfile
* Added new fields to Employee object
* Added VendorAddr to Bill object
* Added new fields to Estimate object
* Fix TaxInclusiveAmt and vendor setting 1099 creation
* Updated readme and contributing

* 0.9.5 (November 1, 2023)
* Added the ability to void all voidable QB types
* Added to_ref to CreditMemo object
* Added ProjectRef and ShipFromAddr to Estimate
* Added missing initialization for objects on DiscountLineDetail, Estimate, Employee, and Invoice

* 0.9.4 (August 29, 2023)
* Removed python 2 compatible decorators
* Removed python 2 dependencies
* Fixed issue with MarkupInfo field on AccountBasedExpenseLineDetail
* Removed test files from package

* 0.9.3 (March 7, 2023)
* Added support for Recurring Transaction
* Added support for optional query params
* Fixed errors in example code on the readme
* Removed enable_global and disable_global

* 0.9.2 (August 3, 2022)
* Removed pycparser dependency
* Added new fields to CreditCardPayment object
* Added new fields to Invoice object
* Added new fields to Payment object
* Added to_linked_txn method to Payment object
* Added new object CustomerType
* Added MetaData to CompanyInfo
* Added update support to CompanyInfo
* Added new fields to Preferences object
* Improved exception object

* 0.9.1 (November 30, 2021)
* Added response status code when raising unauthorized exceptions
* Added pending deprecation warnings to enable_global and disable_global
* Added more detailed messages in raised exceptions
* Added void method to Payment object
* Added option for invoice link
* Added support for idempotent behavior using Request ID parameter

* 0.9.0 (July 20, 2021)
* Added missing TxnDate to Invoice
* Updated requirements
* Added BillRate to Vendor
* Added IsProject to Customer
* Added Refresh Token to Client Instance
* Updated Estimate and CreditMemo to use DescriptionOnlyLine
* Removed unused DescriptionLine object
* Added support for Preferences entity
* Added support for ExchangeRate entity

* 0.8.4 (October 11, 2020)
* Added support for the CreditCardPayment entity
* Updated readme
* Added missing property InvoiceLink and AllowOnlineACHPayment to Invoice object

* 0.8.3 (August 24, 2020)
* Fixed issue with CompanyCurrency object
* Added to_ref method to the Term object
* Added to_ref method to the Invoice object
* Fixed issues with RefundReceipt
* Added RefundReceiptCheckPayment object to RefundReceipt object
* Added from_json method to MetaData
* Added SendMixin to Estimate object
* Added SendMixin to PurchaseOrder object
* Added Memo field to PurchaseOrder
* Added support for TDS (special type of tax applied to Indian companies)

* 0.8.2 (April 22nd, 2020)
* Added PrimaryTaxIdentifier to Customer object
* Fixed issue with PaymentMethod to_ref
* Fixed typo in EntityRef on purchase object
* Updated readme
* Updated requirements

* 0.8.1 (September 18th, 2019)
* Dropped support for Python 2.7 and 3.3
* Updated the Invoice to include an AllowOnlineCreditCardPayment attribute.
* Updated the SendMixin class to url encode input emails.

* 0.8.0 (June 25th, 2019)
* Removed support for OAuth 1.0
* Replace OAuth Session Manager and CLI with intuit-oauth client.
* Removed disconnect_account and reconnect_account from client.
* Fixed on Invoice object that caused the DocNumber to be set to an empty string.
* Added to_ref method to PaymentMethod object.
* Added CompanyCurrency object.
* Fixed issue that prevented creation of TaxAgencies.
* Fixed issues with GroupLine, SubtotalLine, and DescriptionOnlyLine objects.
* Fixed issue with CDC when there are no changes within a given timestamp.

* 0.7.5 (October 18th, 2018)
* Fixed bug with reporting authentication failure when attempting to download PDF (previously the error details were "lost").
* Added refresh_access_tokens to Oauth2SessionManager.
@@ -23,7 +141,7 @@ Changelog
* Added support for sending invoices.
* Added count to ListMixin.
* Fixed issue with PDF file attachments in Python 2.
* Removed duplicate coverage depnedency.
* Removed duplicate coverage dependency.

* 0.7.0 (August 31st, 2017)
* Added support for OAuth 2.0
76 changes: 76 additions & 0 deletions CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
# Contributor Covenant Code of Conduct

## Our Pledge

In the interest of fostering an open and welcoming environment, we as
contributors and maintainers pledge to making participation in our project and
our community a harassment-free experience for everyone, regardless of age, body
size, disability, ethnicity, sex characteristics, gender identity and expression,
level of experience, education, socio-economic status, nationality, personal
appearance, race, religion, or sexual identity and orientation.

## Our Standards

Examples of behavior that contributes to creating a positive environment
include:

* Using welcoming and inclusive language
* Being respectful of differing viewpoints and experiences
* Gracefully accepting constructive criticism
* Focusing on what is best for the community
* Showing empathy towards other community members

Examples of unacceptable behavior by participants include:

* The use of sexualized language or imagery and unwelcome sexual attention or
advances
* Trolling, insulting/derogatory comments, and personal or political attacks
* Public or private harassment
* Publishing others' private information, such as a physical or electronic
address, without explicit permission
* Other conduct which could reasonably be considered inappropriate in a
professional setting

## Our Responsibilities

Project maintainers are responsible for clarifying the standards of acceptable
behavior and are expected to take appropriate and fair corrective action in
response to any instances of unacceptable behavior.

Project maintainers have the right and responsibility to remove, edit, or
reject comments, commits, code, wiki edits, issues, and other contributions
that are not aligned to this Code of Conduct, or to ban temporarily or
permanently any contributor for other behaviors that they deem inappropriate,
threatening, offensive, or harmful.

## Scope

This Code of Conduct applies both within project spaces and in public spaces
when an individual is representing the project or its community. Examples of
representing a project or community include using an official project e-mail
address, posting via an official social media account, or acting as an appointed
representative at an online or offline event. Representation of a project may be
further defined and clarified by project maintainers.

## Enforcement

Instances of abusive, harassing, or otherwise unacceptable behavior may be
reported by contacting the project team at edward.emanuel@gmail.com. All
complaints will be reviewed and investigated and will result in a response that
is deemed necessary and appropriate to the circumstances. The project team is
obligated to maintain confidentiality with regard to the reporter of an incident.
Further details of specific enforcement policies may be posted separately.

Project maintainers who do not follow or enforce the Code of Conduct in good
faith may face temporary or permanent repercussions as determined by other
members of the project's leadership.

## Attribution

This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
available at https://www.contributor-covenant.org/version/1/4/code-of-conduct.html

[homepage]: https://www.contributor-covenant.org

For answers to common questions about this code of conduct, see
https://www.contributor-covenant.org/faq
4 changes: 2 additions & 2 deletions MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
include README.rst
include README.md
include LICENSE
recursive-include tests *
recursive-exclude tests *
1 change: 0 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

publish: clean
python setup.py sdist
twine upload dist/*
17 changes: 17 additions & 0 deletions Pipfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
[[source]]
name = "pypi"
url = "https://pypi.org/simple"
verify_ssl = true

[dev-packages]
coverage = "*"
twine = "*"
pytest = "*"
pytest-cov = "*"

[packages]
urllib3 = ">=2.1.0"
intuit-oauth = "==1.2.6"
requests = ">=2.31.0"
requests_oauthlib = ">=1.3.1"
setuptools = "*"
Loading