@@ -26,5 +26,80 @@ def test_array_of_strings
26
26
assert_equal h , qbxml . from_qbxml ( "<?qbxml version=\" 7.0\" ?>\n <QBXML>\n <QBXMLMsgsRq>\n <InvoiceQueryRq>\n <IncludeRetElement>TxnID</IncludeRetElement>\n <IncludeRetElement>RefNumber</IncludeRetElement>\n </InvoiceQueryRq>\n </QBXMLMsgsRq>\n </QBXML>\n " )
27
27
end
28
28
29
- end
29
+ def test_float_percentage
30
+ qbxml = Qbxml . new
30
31
32
+ h = {
33
+ "qbxml" => {
34
+ "xml_attributes" => { } ,
35
+ "qbxml_msgs_rs" => {
36
+ "xml_attributes" => { } ,
37
+ "item_query_rs" => {
38
+ "xml_attributes" => {
39
+ "requestID" => "Retrieve items" ,
40
+ "statusCode" => "0" ,
41
+ "statusSeverity" => "Info" ,
42
+ "statusMessage" => "Status OK" ,
43
+ "iteratorRemainingCount" => "0" ,
44
+ "iteratorID" => "{10c05cbd-b25b-4a85-8aa0-8bce89e6e900}"
45
+ } ,
46
+ "item_service_ret" => {
47
+ "xml_attributes" => { } ,
48
+ "list_id" => "80000005-1468535148" ,
49
+ "time_created" => "2016-07-14T15:25:48-08:00" ,
50
+ "time_modified" => "2016-07-14T15:25:48-08:00" ,
51
+ "edit_sequence" => "1468535148" ,
52
+ "name" => "let's get intuit" ,
53
+ "full_name" => "let's get intuit" ,
54
+ "is_active" => true ,
55
+ "sublevel" => 0 ,
56
+ "sales_or_purchase" => {
57
+ "xml_attributes" => { } ,
58
+ "price_percent" => 18.0 ,
59
+ "account_ref" => {
60
+ "xml_attributes" => { } ,
61
+ "list_id" => "80000015-1457547358" ,
62
+ "full_name" => "Repairs and Maintenance"
63
+ }
64
+ }
65
+ }
66
+ }
67
+ }
68
+ }
69
+ }
70
+
71
+ xml = <<-XML
72
+ <QBXML>
73
+ <QBXMLMsgsRs>
74
+ <ItemQueryRs requestID="Retrieve items"
75
+ statusCode="0"
76
+ statusSeverity="Info"
77
+ statusMessage="Status OK"
78
+ iteratorRemainingCount="0"
79
+ iteratorID="{10c05cbd-b25b-4a85-8aa0-8bce89e6e900}">
80
+ <ItemServiceRet>
81
+ <ListID>80000005-1468535148</ListID>
82
+ <TimeCreated>2016-07-14T15:25:48-08:00</TimeCreated>
83
+ <TimeModified>2016-07-14T15:25:48-08:00</TimeModified>
84
+ <EditSequence>1468535148</EditSequence>
85
+ <Name>let's get intuit</Name>
86
+ <FullName>let's get intuit</FullName>
87
+ <IsActive>true</IsActive>
88
+ <Sublevel>0</Sublevel>
89
+ <SalesOrPurchase>
90
+ <PricePercent>18.0%</PricePercent>
91
+ <AccountRef>
92
+ <ListID>80000015-1457547358</ListID>
93
+ <FullName>Repairs and Maintenance</FullName>
94
+ </AccountRef>
95
+ </SalesOrPurchase>
96
+ </ItemServiceRet>
97
+ </ItemQueryRs>
98
+ </QBXMLMsgsRs>
99
+ </QBXML>
100
+ XML
101
+
102
+ assert_equal h , qbxml . from_qbxml ( xml )
103
+ end
104
+
105
+ end
0 commit comments