Repository navigation
Expand file tree
/
Copy pathcompany_info.py
More file actions
57 lines (46 loc) · 1.65 KB
/
Copy pathcompany_info.py
File metadata and controls
57 lines (46 loc) · 1.65 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
from six import python_2_unicode_compatible
from .base import Address, PhoneNumber, EmailAddress, WebAddress, \
QuickbooksReadOnlyObject, Ref
@python_2_unicode_compatible
class CompanyInfo(QuickbooksReadOnlyObject):
"""
QBO definition: The CompanyInfo entity contains basic company information.
In QuickBooks Online, company info and preferences are displayed in the
same place under preferences, so it may be confusing to figure out from
user interface which fields may belong to this entity. But in general,
properties such as company addresses or name are considered company
information. Some attributes may exist in both CompanyInfo and Preferences
entities.
"""
class_dict = {
"CompanyAddr": Address,
"CustomerCommunicationAddr": Address,
"LegalAddr": Address,
"PrimaryPhone": PhoneNumber,
"Email": EmailAddress,
"WebAddr": WebAddress
}
qbo_object_name = "CompanyInfo"
def __init__(self):
super(CompanyInfo, self).__init__()
self.Id = None
self.CompanyName = ""
self.LegalName = ""
self.CompanyStartDate = ""
self.FiscalYearStartMonth = ""
self.Country = ""
self.SupportedLanguages = ""
self.CompanyAddr = None
self.CustomerCommunicationAddr = None
self.LegalAddr = None
self.PrimaryPhone = None
self.Email = None
self.WebAddr = None
def __str__(self):
return self.CompanyName
def to_ref(self):
ref = Ref()
ref.name = self.CompanyName
ref.type = self.qbo_object_name
ref.value = self.Id
return ref