stripe-iiftoqbo 0.1.1 → 0.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/spec/iif_spec.rb +28 -16
- data/spec/sample-data/basic.csv +4 -4
- data/spec/sample-data/basic.iif +13 -12
- data/spec/sample-data/basic.qbo +1 -1
- data/stripe-iiftoqbo.gemspec +1 -1
- metadata +1 -1
data/spec/iif_spec.rb
CHANGED
@@ -10,34 +10,46 @@ describe IIF do
|
|
10
10
|
|
11
11
|
it "should parse basic IIF files" do
|
12
12
|
iif = IIF( basic_iif )
|
13
|
-
expect( iif.transactions.length ).to eq(
|
14
|
-
first_transaction = iif.transactions
|
15
|
-
expect( first_transaction.entries.length ).to eq(
|
13
|
+
expect( iif.transactions.length ).to eq(8)
|
14
|
+
first_transaction = iif.transactions[0]
|
15
|
+
expect( first_transaction.entries.length ).to eq(2)
|
16
16
|
first_entry = first_transaction.entries.first
|
17
17
|
|
18
18
|
expect( first_entry.type ).to eq("TRNS")
|
19
|
-
expect( first_entry.trnstype ).to eq("
|
19
|
+
expect( first_entry.trnstype ).to eq("CHECK")
|
20
20
|
expect( first_entry.date ).to eq(Date.new(2014,1,23))
|
21
|
-
expect( first_entry.accnt ).to eq("
|
22
|
-
expect( first_entry.amount ).to eq(135.15)
|
21
|
+
expect( first_entry.accnt ).to eq("Stripe Account")
|
22
|
+
expect( first_entry.amount ).to eq(-135.15)
|
23
23
|
expect( first_entry.memo ).to eq("Transfer from Stripe: tr_3MCmCnHFyYXFB5")
|
24
24
|
|
25
25
|
second_entry = first_transaction.entries[1]
|
26
26
|
|
27
27
|
expect( second_entry.type ).to eq("SPL")
|
28
|
-
expect( second_entry.trnstype ).to eq("
|
28
|
+
expect( second_entry.trnstype ).to eq("CHECK")
|
29
29
|
expect( second_entry.date ).to eq(Date.new(2014,1,23))
|
30
|
-
expect( second_entry.accnt ).to eq("Stripe Account")
|
31
|
-
expect( second_entry.amount ).to eq(
|
30
|
+
expect( second_entry.accnt ).to eq("Stripe Third-party Account")
|
31
|
+
expect( second_entry.amount ).to eq(135.15)
|
32
32
|
expect( second_entry.memo ).to eq("Transfer from Stripe: tr_3MCmCnHFyYXFB5")
|
33
|
+
expect( second_entry.name ).to eq("Nicole Chiu-Wang")
|
33
34
|
|
34
|
-
|
35
|
+
second_transaction = iif.transactions[1]
|
35
36
|
|
36
|
-
|
37
|
-
|
38
|
-
expect(
|
39
|
-
expect(
|
40
|
-
expect(
|
41
|
-
expect(
|
37
|
+
first_entry = second_transaction.entries[0]
|
38
|
+
|
39
|
+
expect( first_entry.type ).to eq("TRNS")
|
40
|
+
expect( first_entry.trnstype ).to eq("GENERAL JOURNAL")
|
41
|
+
expect( first_entry.date ).to eq(Date.new(2014,1,23))
|
42
|
+
expect( first_entry.accnt ).to eq("Stripe Account")
|
43
|
+
expect( first_entry.amount ).to eq(-0.25)
|
44
|
+
expect( first_entry.memo ).to eq("Fees for Transfer from Stripe: tr_3MCmCnHFyYXFB5")
|
45
|
+
|
46
|
+
second_entry = second_transaction.entries[1]
|
47
|
+
|
48
|
+
expect( second_entry.type ).to eq("SPL")
|
49
|
+
expect( second_entry.trnstype ).to eq("GENERAL JOURNAL")
|
50
|
+
expect( second_entry.date ).to eq(Date.new(2014,1,23))
|
51
|
+
expect( second_entry.accnt ).to eq("Stripe Payment Processing Fees")
|
52
|
+
expect( second_entry.amount ).to eq(0.25)
|
53
|
+
expect( second_entry.memo ).to eq("Fees for Transfer from Stripe: tr_3MCmCnHFyYXFB5")
|
42
54
|
end
|
43
55
|
end
|
data/spec/sample-data/basic.csv
CHANGED
@@ -1,12 +1,12 @@
|
|
1
1
|
Date,Name,Account,Memo,Amount
|
2
|
-
01/23/2014,
|
3
|
-
01/23/2014,Stripe,Stripe Payment Processing Fees,GENERAL JOURNAL Fees for
|
4
|
-
01/23/2014,Transfer to Checking Account,Checking Account,DEPOSIT Transfer from Stripe: tr_3MCmQsVsNuIX7J,-85.0
|
2
|
+
01/23/2014,Nicole Chiu-Wang,Stripe Third-party Account,CHECK Transfer from Stripe: tr_3MCmCnHFyYXFB5,-135.15
|
3
|
+
01/23/2014,Stripe,Stripe Payment Processing Fees,GENERAL JOURNAL Fees for Transfer from Stripe: tr_3MCmCnHFyYXFB5,-0.25
|
4
|
+
01/23/2014,Transfer to Stripe Checking Account,Stripe Checking Account,DEPOSIT Transfer from Stripe: tr_3MCmQsVsNuIX7J,-85.0
|
5
5
|
01/22/2014,Credit Card Charge,Stripe Sales,GENERAL JOURNAL Charge ID: ch_3M1PskZ2rglde3,249.0
|
6
6
|
01/22/2014,Stripe,Stripe Payment Processing Fees,GENERAL JOURNAL Fees for charge ID: ch_3M1PskZ2rglde3,-7.52
|
7
7
|
07/10/2013,Credit Card Refund,Stripe Returns,GENERAL JOURNAL Refund of charge ch_2AaUvVOXTJxqgU,-60.0
|
8
8
|
07/10/2013,Stripe,Stripe Payment Processing Fees,GENERAL JOURNAL Refund of fees for ch_2AaUvVOXTJxqgU,2.04
|
9
9
|
07/10/2013,Credit Card Charge,Stripe Sales,GENERAL JOURNAL Charge ID: ch_2AaUVt4SQVF5mE,60.0
|
10
10
|
07/10/2013,Stripe,Stripe Payment Processing Fees,GENERAL JOURNAL Fees for charge ID: ch_2AaUVt4SQVF5mE,-2.04
|
11
|
-
12/10/2012,Transfer to Checking Account,Checking Account,DEPOSIT Transfer from Stripe: ach_0qt6m5dlIL2XMq,-15.0
|
11
|
+
12/10/2012,Transfer to Stripe Checking Account,Stripe Checking Account,DEPOSIT Transfer from Stripe: ach_0qt6m5dlIL2XMq,-15.0
|
12
12
|
12/03/2012,Stripe Connect Charge,Stripe Sales,GENERAL JOURNAL Stripe Connect fee for transaction ID: ch_0qbUpzmgBi6WVJ,15.0
|
data/spec/sample-data/basic.iif
CHANGED
@@ -1,16 +1,17 @@
|
|
1
|
-
!TRNS TRNSID TRNSTYPE DATE ACCNT AMOUNT MEMO
|
2
|
-
!SPL TRNSID TRNSTYPE DATE ACCNT AMOUNT MEMO
|
1
|
+
!TRNS TRNSID TRNSTYPE DATE ACCNT AMOUNT MEMO NAME
|
2
|
+
!SPL TRNSID TRNSTYPE DATE ACCNT AMOUNT MEMO NAME
|
3
3
|
!ENDTRNS
|
4
|
-
TRNS
|
5
|
-
SPL
|
6
|
-
SPL GENERAL JOURNAL 01/23/2014 Stripe Payment Processing Fees 0.25 Fees for transfer ID: tr_3MCmCnHFyYXFB5
|
4
|
+
TRNS CHECK 01/23/2014 Stripe Account -135.15 Transfer from Stripe: tr_3MCmCnHFyYXFB5 Nicole Chiu-Wang
|
5
|
+
SPL CHECK 01/23/2014 Stripe Third-party Account 135.15 Transfer from Stripe: tr_3MCmCnHFyYXFB5 Nicole Chiu-Wang
|
7
6
|
ENDTRNS
|
8
|
-
TRNS
|
9
|
-
SPL
|
7
|
+
TRNS GENERAL JOURNAL 01/23/2014 Stripe Account -0.25 Fees for Transfer from Stripe: tr_3MCmCnHFyYXFB5
|
8
|
+
SPL GENERAL JOURNAL 01/23/2014 Stripe Payment Processing Fees 0.25 Fees for Transfer from Stripe: tr_3MCmCnHFyYXFB5
|
9
|
+
TRNS DEPOSIT 01/23/2014 Stripe Checking Account 85.0 Transfer from Stripe: tr_3MCmQsVsNuIX7J
|
10
|
+
SPL DEPOSIT 01/23/2014 Stripe Account -85.0 Transfer from Stripe: tr_3MCmQsVsNuIX7J
|
10
11
|
ENDTRNS
|
11
|
-
TRNS GENERAL JOURNAL 01/22/2014 Stripe Sales -249.0 Charge ID: ch_3M1PskZ2rglde3
|
12
|
-
SPL GENERAL JOURNAL 01/22/2014 Stripe Payment Processing Fees 7.52 Fees for charge ID: ch_3M1PskZ2rglde3
|
13
|
-
SPL GENERAL JOURNAL 01/22/2014 Stripe Account 241.48 Net for charge ID: ch_3M1PskZ2rglde3
|
12
|
+
TRNS GENERAL JOURNAL 01/22/2014 Stripe Sales -249.0 Charge ID: ch_3M1PskZ2rglde3
|
13
|
+
SPL GENERAL JOURNAL 01/22/2014 Stripe Payment Processing Fees 7.52 Fees for charge ID: ch_3M1PskZ2rglde3
|
14
|
+
SPL GENERAL JOURNAL 01/22/2014 Stripe Account 241.48 Net for charge ID: ch_3M1PskZ2rglde3
|
14
15
|
ENDTRNS
|
15
16
|
TRNS GENERAL JOURNAL 07/10/2013 Stripe Returns 60.0 Refund of charge ch_2AaUvVOXTJxqgU
|
16
17
|
SPL GENERAL JOURNAL 07/10/2013 Stripe Account -57.96 Refund for refunded charge ID: ch_2AaUvVOXTJxqgU
|
@@ -20,8 +21,8 @@ TRNS GENERAL JOURNAL 07/10/2013 Stripe Sales -60.0 Charge ID: ch_2AaUVt4SQVF5mE
|
|
20
21
|
SPL GENERAL JOURNAL 07/10/2013 Stripe Payment Processing Fees 2.04 Fees for charge ID: ch_2AaUVt4SQVF5mE
|
21
22
|
SPL GENERAL JOURNAL 07/10/2013 Stripe Account 57.96 Net for charge ID: ch_2AaUVt4SQVF5mE
|
22
23
|
ENDTRNS
|
23
|
-
TRNS DEPOSIT 12/10/2012 Checking Account 15.0 Transfer from Stripe: ach_0qt6m5dlIL2XMq
|
24
|
-
SPL DEPOSIT 12/10/2012 Stripe Account -15.0 Transfer from Stripe: ach_0qt6m5dlIL2XMq
|
24
|
+
TRNS DEPOSIT 12/10/2012 Stripe Checking Account 15.0 Transfer from Stripe: ach_0qt6m5dlIL2XMq
|
25
|
+
SPL DEPOSIT 12/10/2012 Stripe Account -15.0 Transfer from Stripe: ach_0qt6m5dlIL2XMq
|
25
26
|
ENDTRNS
|
26
27
|
TRNS GENERAL JOURNAL 12/03/2012 Stripe Sales -15.0 Stripe Connect fee for transaction ID: ch_0qbUpzmgBi6WVJ
|
27
28
|
SPL GENERAL JOURNAL 12/03/2012 Stripe Account 15.0 Stripe Connect fee for transaction ID: ch_0qbUpzmgBi6WVJ
|
data/spec/sample-data/basic.qbo
CHANGED
@@ -8,4 +8,4 @@ COMPRESSION:NONE
|
|
8
8
|
OLDFILEUID:NONE
|
9
9
|
NEWFILEUID:NONE
|
10
10
|
|
11
|
-
<OFX><SIGNONMSGSRSV1><SONRS><STATUS><CODE>0</CODE><SEVERITY>INFO</SEVERITY></STATUS><DTSERVER>20140211000000</DTSERVER><LANGUAGE>ENG</LANGUAGE><FI><ORG>Stripe</ORG><FID>0</FID></FI><INTU.BID>0</INTU.BID></SONRS></SIGNONMSGSRSV1><BANKMSGSRSV1><STMTTRNRS><TRNUID>0</TRNUID><STATUS><CODE>0</CODE><SEVERITY>INFO</SEVERITY></STATUS><STMTRS><CURDEF>USD</CURDEF><BANKACCTFROM><BANKID>123456789</BANKID><ACCTID/><ACCTTYPE>CHECKING</ACCTTYPE></BANKACCTFROM><BANKTRANLIST><DTSTART>20121203</DTSTART><DTEND>20140123</DTEND><STMTTRN><TRNTYPE>DEBIT</TRNTYPE><DTPOSTED>20140123</DTPOSTED><TRNAMT>-135.15</TRNAMT><FITID>Transfer from Stripe: tr_3MCmCnHFyYXFB5</FITID><NAME>
|
11
|
+
<OFX><SIGNONMSGSRSV1><SONRS><STATUS><CODE>0</CODE><SEVERITY>INFO</SEVERITY></STATUS><DTSERVER>20140211000000</DTSERVER><LANGUAGE>ENG</LANGUAGE><FI><ORG>Stripe</ORG><FID>0</FID></FI><INTU.BID>0</INTU.BID></SONRS></SIGNONMSGSRSV1><BANKMSGSRSV1><STMTTRNRS><TRNUID>0</TRNUID><STATUS><CODE>0</CODE><SEVERITY>INFO</SEVERITY></STATUS><STMTRS><CURDEF>USD</CURDEF><BANKACCTFROM><BANKID>123456789</BANKID><ACCTID/><ACCTTYPE>CHECKING</ACCTTYPE></BANKACCTFROM><BANKTRANLIST><DTSTART>20121203</DTSTART><DTEND>20140123</DTEND><STMTTRN><TRNTYPE>DEBIT</TRNTYPE><DTPOSTED>20140123</DTPOSTED><TRNAMT>-135.15</TRNAMT><FITID>Transfer from Stripe: tr_3MCmCnHFyYXFB5</FITID><NAME>Nicole Chiu-Wang</NAME><MEMO>Transfer from Stripe: tr_3MCmCnHFyYXFB5</MEMO></STMTTRN><STMTTRN><TRNTYPE>DEBIT</TRNTYPE><DTPOSTED>20140123</DTPOSTED><TRNAMT>-0.25</TRNAMT><FITID>Fees for Transfer from Stripe: tr_3MCmCnHFyYXFB5</FITID><NAME>Stripe</NAME><MEMO>Fees for Transfer from Stripe: tr_3MCmCnHFyYXFB5</MEMO></STMTTRN><STMTTRN><TRNTYPE>DEBIT</TRNTYPE><DTPOSTED>20140123</DTPOSTED><TRNAMT>-85.0</TRNAMT><FITID>Transfer from Stripe: tr_3MCmQsVsNuIX7J</FITID><NAME>Transfer to Stripe Checking Account</NAME><MEMO>Transfer from Stripe: tr_3MCmQsVsNuIX7J</MEMO></STMTTRN><STMTTRN><TRNTYPE>CREDIT</TRNTYPE><DTPOSTED>20140122</DTPOSTED><TRNAMT>+249.0</TRNAMT><FITID>Charge ID: ch_3M1PskZ2rglde3</FITID><NAME>Credit Card Charge</NAME><MEMO>Charge ID: ch_3M1PskZ2rglde3</MEMO></STMTTRN><STMTTRN><TRNTYPE>DEBIT</TRNTYPE><DTPOSTED>20140122</DTPOSTED><TRNAMT>-7.52</TRNAMT><FITID>Fees for charge ID: ch_3M1PskZ2rglde3</FITID><NAME>Stripe</NAME><MEMO>Fees for charge ID: ch_3M1PskZ2rglde3</MEMO></STMTTRN><STMTTRN><TRNTYPE>DEBIT</TRNTYPE><DTPOSTED>20130710</DTPOSTED><TRNAMT>-60.0</TRNAMT><FITID>Refund of charge ch_2AaUvVOXTJxqgU</FITID><NAME>Credit Card Refund</NAME><MEMO>Refund of charge ch_2AaUvVOXTJxqgU</MEMO></STMTTRN><STMTTRN><TRNTYPE>CREDIT</TRNTYPE><DTPOSTED>20130710</DTPOSTED><TRNAMT>+2.04</TRNAMT><FITID>Refund of fees for ch_2AaUvVOXTJxqgU</FITID><NAME>Stripe</NAME><MEMO>Refund of fees for ch_2AaUvVOXTJxqgU</MEMO></STMTTRN><STMTTRN><TRNTYPE>CREDIT</TRNTYPE><DTPOSTED>20130710</DTPOSTED><TRNAMT>+60.0</TRNAMT><FITID>Charge ID: ch_2AaUVt4SQVF5mE</FITID><NAME>Credit Card Charge</NAME><MEMO>Charge ID: ch_2AaUVt4SQVF5mE</MEMO></STMTTRN><STMTTRN><TRNTYPE>DEBIT</TRNTYPE><DTPOSTED>20130710</DTPOSTED><TRNAMT>-2.04</TRNAMT><FITID>Fees for charge ID: ch_2AaUVt4SQVF5mE</FITID><NAME>Stripe</NAME><MEMO>Fees for charge ID: ch_2AaUVt4SQVF5mE</MEMO></STMTTRN><STMTTRN><TRNTYPE>DEBIT</TRNTYPE><DTPOSTED>20121210</DTPOSTED><TRNAMT>-15.0</TRNAMT><FITID>Transfer from Stripe: ach_0qt6m5dlIL2XMq</FITID><NAME>Transfer to Stripe Checking Account</NAME><MEMO>Transfer from Stripe: ach_0qt6m5dlIL2XMq</MEMO></STMTTRN><STMTTRN><TRNTYPE>CREDIT</TRNTYPE><DTPOSTED>20121203</DTPOSTED><TRNAMT>+15.0</TRNAMT><FITID>Stripe Connect fee for transaction ID: ch_0qbUpzmgBi6WVJ</FITID><NAME>Stripe Connect Charge</NAME><MEMO>Stripe Connect fee for transaction ID: ch_0qbUpzmgBi6WVJ</MEMO></STMTTRN></BANKTRANLIST><LEDGERBAL><BALAMT>0.0</BALAMT><DTASOF>20140123</DTASOF></LEDGERBAL></STMTRS></STMTTRNRS></BANKMSGSRSV1></OFX>
|
data/stripe-iiftoqbo.gemspec
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
# encoding: utf-8
|
2
2
|
Gem::Specification.new do |s|
|
3
3
|
s.name = 'stripe-iiftoqbo'
|
4
|
-
s.version = '0.1.
|
4
|
+
s.version = '0.1.2'
|
5
5
|
s.summary = 'Stripe IIF-to-QBO converter for Quickbooks Online'
|
6
6
|
s.description = 'Converts Stripe\'s IIF transaction file into a QBO file for importing into Quickbooks Online. A QBO file is in OFX (Open Financial Exchange) format.'
|
7
7
|
s.homepage = 'https://github.com/gtolle/stripe-iiftoqbo'
|