File tree Expand file tree Collapse file tree 2 files changed +21
-0
lines changed
Expand file tree Collapse file tree 2 files changed +21
-0
lines changed Original file line number Diff line number Diff line change @@ -134,3 +134,13 @@ def to_linked_txn(self):
134134 linked_txn .TxnLineId = 1
135135
136136 return linked_txn
137+
138+ def to_ref (self ):
139+ ref = Ref ()
140+
141+ ref .name = self .DisplayName
142+ ref .type = self .qbo_object_name
143+ ref .value = self .Id
144+
145+ return ref
146+
Original file line number Diff line number Diff line change @@ -36,6 +36,17 @@ def test_valid_object_name(self):
3636
3737 self .assertTrue (result )
3838
39+ def test_to_ref (self ):
40+ bill = Bill ()
41+ bill .DisplayName = "test"
42+ bill .Id = 100
43+
44+ ref = bill .to_ref ()
45+
46+ self .assertEquals (ref .name , "test" )
47+ self .assertEquals (ref .type , "Bill" )
48+ self .assertEquals (ref .value , 100 )
49+
3950
4051class BillLineTests (unittest .TestCase ):
4152 def test_unicode (self ):
You can’t perform that action at this time.
0 commit comments