Skip to content

Commit d32a328

Browse files
committed
Added optional send_to parameter to SendMixin and fixed bug in SendMixin.
1 parent af8d6bd commit d32a328

File tree

4 files changed

+12
-5
lines changed

4 files changed

+12
-5
lines changed

CHANGELOG.rst

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,18 @@
11
Changelog
22
========
33

4+
* 0.7.4 (November 29th, 2017)
5+
* Added optional send_to parameter to SendMixin.
6+
* Fixed bug in SendMixin.
7+
48
* 0.7.3 (November 28th, 2017)
59
* Fixed bug in ListMixin count method.
610

711
* 0.7.1 (November 28th, 2017)
812
* Added support for sending invoices.
913
* Added count to ListMixin.
1014
* Fixed issue with PDF file attachments in Python 2.
11-
* Removed duplicate coverage depnedency.
15+
* Removed duplicate coverage dependency.
1216

1317
* 0.7.0 (August 31st, 2017)
1418
* Added support for OAuth 2.0
@@ -70,7 +74,6 @@ Changelog
7074
* Removed the following objects: CreditMemoLine, BillLine, JournalEntryLine, PurchaseLine, and PurchaseOrderLine.
7175
* Corrected spelling of object SaleItemLine to SalesItemLine.
7276

73-
7477
* 0.4.0 (June 15, 2016)
7578
* Added a way of disconnecting a Quickbooks Account to client.
7679
* Added support for Quickbooks Reports.

quickbooks/client.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -293,7 +293,7 @@ def batch_operation(self, request_body):
293293

294294
return results
295295

296-
def misc_operation(self, end_point, request_body):
296+
def misc_operation(self, end_point, request_body=""):
297297
url = self.api_url + "/company/{0}/{1}".format(self.company_id, end_point)
298298
results = self.make_request("POST", url, request_body)
299299

quickbooks/mixins.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,11 +100,15 @@ def get(cls, id, qb=None):
100100

101101

102102
class SendMixin(object):
103-
def send(self, qb=None):
103+
def send(self, send_to="", qb=None):
104104
if not qb:
105105
qb = QuickBooks()
106106

107107
end_point = "{0}/{1}/send".format(self.qbo_object_name, self.Id)
108+
109+
if send_to:
110+
end_point = "{0}?sendTo={1}".format(end_point, send_to)
111+
108112
results = qb.misc_operation(end_point)
109113

110114
return results

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ def read(*parts):
1010
return fp.read()
1111

1212

13-
VERSION = (0, 7, 3)
13+
VERSION = (0, 7, 4)
1414
version = '.'.join(map(str, VERSION))
1515

1616
setup(

0 commit comments

Comments
 (0)