forked from ej2/python-quickbooks
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtaxcode.py
More file actions
59 lines (44 loc) · 1.61 KB
/
taxcode.py
File metadata and controls
59 lines (44 loc) · 1.61 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
from six import python_2_unicode_compatible
from .base import QuickbooksBaseObject, Ref, QuickbooksManagedObject, QuickbooksTransactionEntity
class TaxRateDetail(QuickbooksBaseObject):
class_dict = {
"TaxRateRef": Ref
}
qbo_object_name = "TaxRateDetail"
def __init__(self):
super(TaxRateDetail, self).__init__()
self.TaxTypeApplicable = ""
self.TaxOrder = 0
self.TaxRateRef = None
class TaxRateList(QuickbooksBaseObject):
list_dict = {
"TaxRateDetail": TaxRateDetail
}
qbo_object_name = "TaxRateList"
def __init__(self):
super(TaxRateList, self).__init__()
self.TaxRateDetail = []
@python_2_unicode_compatible
class TaxCode(QuickbooksManagedObject, QuickbooksTransactionEntity):
"""
QBO definition: The PaymentMethod entity provides the method of payment for received goods. Delete is achieved by setting the
Active attribute to false in an entity update request; thus, making it inactive. In this type of delete,
the record is not permanently deleted, but is hidden for display purposes. References to inactive objects are
left intact.
"""
class_dict = {
"SalesTaxRateList": TaxRateList,
"PurchaseTaxRateList": TaxRateList,
}
qbo_object_name = "TaxCode"
def __init__(self):
super(TaxCode, self).__init__()
self.Name = ""
self.Description = ""
self.Taxable = True
self.TaxGroup = True
self.Active = True
self.SalesTaxRateList = None
self.PurchaseTaxRateList = None
def __str__(self):
return self.Name