forked from routablehq/python-quickbooks
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcompanycurrency.py
More file actions
42 lines (31 loc) · 1.2 KB
/
companycurrency.py
File metadata and controls
42 lines (31 loc) · 1.2 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
from six import python_2_unicode_compatible
from .base import QuickbooksManagedObject, QuickbooksTransactionEntity, Ref, CustomField, MetaData
@python_2_unicode_compatible
class CompanyCurrency(QuickbooksManagedObject, QuickbooksTransactionEntity):
"""
QBO definition: Applicable only for those companies that enable multicurrency, a companycurrency object
defines a currency that is active in the QuickBooks Online company. One or more companycurrency objects
are active based on the company's multicurrency business requirements and correspond to the list
displayed by the Currency Center in the QuickBooks Online UI
"""
class_dict = {
"CustomField": CustomField,
"MetaData": MetaData,
}
qbo_object_name = "CompanyCurrency"
def __init__(self):
super(CompanyCurrency, self).__init__()
self.Id = None
self.Code = ""
self.Name = ""
self.Active = True
self.CustomField = None
self.MetaData = None
def __str__(self):
return self.Name
def to_ref(self):
ref = Ref()
ref.name = self.Name
ref.type = self.qbo_object_name
ref.value = self.Id
return ref