forked from routablehq/python-quickbooks
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbillpayment.py
More file actions
97 lines (74 loc) · 2.68 KB
/
Copy pathbillpayment.py
File metadata and controls
97 lines (74 loc) · 2.68 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
from six import python_2_unicode_compatible
from .base import QuickbooksBaseObject, Ref, LinkedTxn, QuickbooksManagedObject, LinkedTxnMixin, \
QuickbooksTransactionEntity
from ..mixins import DeleteMixin
@python_2_unicode_compatible
class CheckPayment(QuickbooksBaseObject):
class_dict = {
"BankAccountRef": Ref
}
qbo_object_name = "CheckPayment"
def __init__(self):
super(CheckPayment, self).__init__()
self.PrintStatus = "NotSet"
self.BankAccountRef = None
def __str__(self):
return self.PrintStatus
class BillPaymentCreditCard(QuickbooksBaseObject):
class_dict = {
"CCAccountRef": Ref
}
qbo_object_name = "BillPaymentCreditCard"
def __init__(self):
super(BillPaymentCreditCard, self).__init__()
self.CCAccountRef = None
@python_2_unicode_compatible
class BillPaymentLine(QuickbooksBaseObject):
list_dict = {
"LinkedTxn": LinkedTxn
}
qbo_object_name = "Line"
def __init__(self):
super(BillPaymentLine, self).__init__()
self.Amount = 0
self.LinkedTxn = []
def __str__(self):
return str(self.Amount)
@python_2_unicode_compatible
class BillPayment(DeleteMixin, QuickbooksManagedObject, QuickbooksTransactionEntity, LinkedTxnMixin):
"""
QBO definition: A BillPayment entity represents the financial transaction of payment
of bills that the business owner receives from a vendor for goods or services purchased
from the vendor. QuickBooks Online supports bill payments through a credit card or a
checking account. BillPayment.TotalAmt is the total amount associated with this payment.
This includes the total of all the payments from the payment line details. If TotalAmt is
greater than the total on the lines being paid, the overpayment is treated as a credit and
exposed as such on the QuickBooks UI. The total amount cannot be negative.
"""
class_dict = {
"VendorRef": Ref,
"CheckPayment": CheckPayment,
"CreditCardPayment": BillPaymentCreditCard,
"APAccountRef": Ref,
"DepartmentRef": Ref,
"CurrencyRef": Ref
}
list_dict = {
"Line": BillPaymentLine
}
qbo_object_name = "BillPayment"
def __init__(self):
super(BillPayment, self).__init__()
self.PayType = ""
self.TotalAmt = 0
self.PrivateNote = ""
self.DocNumber = ""
self.VendorRef = None
self.CheckPayment = None
self.APAccountRef = None
self.DepartmentRef = None
self.CreditCardPayment = None
self.CurrencyRef = None
self.Line = []
def __str__(self):
return str(self.TotalAmt)