1+ from six import python_2_unicode_compatible
12from ..mixins import ToJsonMixin , FromJsonMixin , ReadMixin , ListMixin , UpdateMixin
23
34
@@ -22,12 +23,13 @@ class QuickbooksManagedObject(QuickbooksBaseObject, ReadMixin, ListMixin, Update
2223 pass
2324
2425
26+ @python_2_unicode_compatible
2527class MetaData :
2628 def __init__ (self ):
2729 self .CreateTime = ""
2830 self .LastUpdatedTime = ""
2931
30- def __unicode__ (self ):
32+ def __str__ (self ):
3133 return "Created {0}" .format (self .CreateTime )
3234
3335
@@ -41,6 +43,7 @@ def to_linked_txn(self):
4143 return linked_txn
4244
4345
46+ @python_2_unicode_compatible
4447class Address (ToJsonMixin , FromJsonMixin ):
4548 def __init__ (self ):
4649 self .Id = None
@@ -52,34 +55,38 @@ def __init__(self):
5255 self .Lat = ""
5356 self .Long = ""
5457
55- def __unicode__ (self ):
58+ def __str__ (self ):
5659 return "{0} {1}, {2} {3}" .format (self .Line1 , self .City , self .CountrySubDivisionCode , self .PostalCode )
5760
5861
62+ @python_2_unicode_compatible
5963class PhoneNumber (ToJsonMixin , FromJsonMixin ):
6064 def __init__ (self ):
6165 self .FreeFormNumber = ""
6266
63- def __unicode__ (self ):
67+ def __str__ (self ):
6468 return self .FreeFormNumber
6569
6670
71+ @python_2_unicode_compatible
6772class EmailAddress (ToJsonMixin , FromJsonMixin ):
6873 def __init__ (self ):
6974 self .Address = ""
7075
71- def __unicode__ (self ):
76+ def __str__ (self ):
7277 return self .Address
7378
7479
80+ @python_2_unicode_compatible
7581class WebAddress (ToJsonMixin , FromJsonMixin ):
7682 def __init__ (self ):
7783 self .URI = ""
7884
79- def __unicode__ (self ):
85+ def __str__ (self ):
8086 return self .URI
8187
8288
89+ @python_2_unicode_compatible
8390class Ref (ToJsonMixin , FromJsonMixin ):
8491 class_dict = {}
8592 list_dict = {}
@@ -89,20 +96,22 @@ def __init__(self):
8996 self .name = ""
9097 self .type = ""
9198
92- def __unicode__ (self ):
99+ def __str__ (self ):
93100 return self .name
94101
95102
103+ @python_2_unicode_compatible
96104class CustomField (ToJsonMixin , FromJsonMixin ):
97105 def __init__ (self ):
98106 self .Type = ""
99107 self .Name = ""
100108 self .StringValue = ""
101109
102- def __unicode__ (self ):
110+ def __str__ (self ):
103111 return self .Name
104112
105113
114+ @python_2_unicode_compatible
106115class LinkedTxn (QuickbooksBaseObject ):
107116 qbo_object_name = "LinkedTxn"
108117
@@ -112,16 +121,17 @@ def __init__(self):
112121 self .TxnType = 0
113122 self .TxnLineId = 0
114123
115- def __unicode__ (self ):
124+ def __str__ (self ):
116125 return str (self .TxnId )
117126
118127
128+ @python_2_unicode_compatible
119129class CustomerMemo (QuickbooksBaseObject ):
120130 def __init__ (self ):
121131 super (CustomerMemo , self ).__init__ ()
122132 self .Value = ""
123133
124- def __unicode__ (self ):
134+ def __str__ (self ):
125135 return self .Value
126136
127137
0 commit comments