forked from routablehq/python-quickbooks
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbudget.py
More file actions
56 lines (43 loc) · 1.58 KB
/
budget.py
File metadata and controls
56 lines (43 loc) · 1.58 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
from six import python_2_unicode_compatible
from .base import QuickbooksBaseObject, Ref, QuickbooksManagedObject, QuickbooksTransactionEntity
@python_2_unicode_compatible
class BudgetDetail(QuickbooksBaseObject):
class_dict = {
"AccountRef": Ref,
"CustomerRef": Ref,
"ClassRef": Ref,
"DepartmentRef": Ref,
}
def __init__(self):
super(BudgetDetail, self).__init__()
self.BudgetDate = ""
self.Amount = 0
self.AccountRef = None
self.CustomerRef = None
self.ClassRef = None
self.DepartmentRef = None
def __str__(self):
return str(self.Amount)
@python_2_unicode_compatible
class Budget(QuickbooksManagedObject, QuickbooksTransactionEntity):
"""
QBO definition: The Budget endpoint allows you to retrieve the current state of budgets already set up in the user's
company file. A budget allows for an amount to be assigned on a monthly, quarterly, or annual basis for a specific
account or customer and are created to give a business measurable expense goals. This amount represents how much
should be spent against that account or customer in the give time period.
"""
list_dict = {
"BudgetDetail": BudgetDetail,
}
qbo_object_name = "Budget"
def __init__(self):
super(Budget, self).__init__()
self.Name = ""
self.StartDate = ""
self.EndDate = ""
self.BudgetType = ""
self.BudgetEntryType = ""
self.Active = True
self.BudgetDetail = []
def __str__(self):
return self.Name