clearbooks 0.16.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/AUTHORS.md +31 -0
- data/CHANGELOG.md +0 -0
- data/COPYING.md +12 -0
- data/FAQ.md +8 -0
- data/Gemfile +105 -0
- data/LICENSE.md +14 -0
- data/MAINTAINERS.md +40 -0
- data/README.md +549 -0
- data/Rakefile +94 -0
- data/Thorfile +80 -0
- data/bin/clearbooks +28 -0
- data/clearbooks.gemspec +119 -0
- data/examples/demo.rb +8 -0
- data/lib/clearbooks.rb +92 -0
- data/lib/clearbooks/core_ext.rb +8 -0
- data/lib/clearbooks/core_ext/array.rb +51 -0
- data/lib/clearbooks/core_ext/hash.rb +47 -0
- data/lib/clearbooks/core_ext/io_binary_read.rb +20 -0
- data/lib/clearbooks/core_ext/string.rb +21 -0
- data/lib/clearbooks/error.rb +8 -0
- data/lib/clearbooks/error/errors.rb +228 -0
- data/lib/clearbooks/interface/rake/cucumber.rb +36 -0
- data/lib/clearbooks/interface/rake/default.rb +28 -0
- data/lib/clearbooks/interface/rake/documentation.rb +45 -0
- data/lib/clearbooks/interface/rake/guard.rb +13 -0
- data/lib/clearbooks/interface/rake/helpers.rb +27 -0
- data/lib/clearbooks/interface/rake/library.rb +126 -0
- data/lib/clearbooks/interface/rake/metric.rb +15 -0
- data/lib/clearbooks/interface/rake/rspec.rb +31 -0
- data/lib/clearbooks/interface/thor/info.thor +292 -0
- data/lib/clearbooks/interface/thor/mixin/config_choice.rb +27 -0
- data/lib/clearbooks/interface/thor/mixin/configuration.rb +28 -0
- data/lib/clearbooks/interface/thor/mixin/default.rb +30 -0
- data/lib/clearbooks/interface/thor/mixin/default_config.rb +31 -0
- data/lib/clearbooks/interface/thor/mixin/guess.rb +57 -0
- data/lib/clearbooks/interface/thor/mixin/shell.rb +225 -0
- data/lib/clearbooks/interface/thor/version.thor +34 -0
- data/lib/clearbooks/library/client.rb +257 -0
- data/lib/clearbooks/library/configuration.rb +34 -0
- data/lib/clearbooks/model/account_code.rb +65 -0
- data/lib/clearbooks/model/base.rb +67 -0
- data/lib/clearbooks/model/entity.rb +225 -0
- data/lib/clearbooks/model/invoice.rb +163 -0
- data/lib/clearbooks/model/item.rb +78 -0
- data/lib/clearbooks/model/journal.rb +74 -0
- data/lib/clearbooks/model/ledger.rb +52 -0
- data/lib/clearbooks/model/payment.rb +113 -0
- data/lib/clearbooks/model/project.rb +58 -0
- data/lib/clearbooks/version.rb +12 -0
- data/spec/clearbooks/clearbooks_spec.rb +27 -0
- data/spec/clearbooks/model/account_code_spec.rb +52 -0
- data/spec/clearbooks/model/entity_spec.rb +107 -0
- data/spec/clearbooks/model/invoice_spec.rb +109 -0
- data/spec/clearbooks/model/journal_spec.rb +77 -0
- data/spec/clearbooks/model/payment_spec.rb +103 -0
- data/spec/clearbooks/model/project_spec.rb +72 -0
- data/spec/fixtures/response/allocate_payment.xml +12 -0
- data/spec/fixtures/response/create_entity.xml +12 -0
- data/spec/fixtures/response/create_invoice.xml +11 -0
- data/spec/fixtures/response/create_journal.xml +12 -0
- data/spec/fixtures/response/create_payment.xml +12 -0
- data/spec/fixtures/response/create_project.xml +12 -0
- data/spec/fixtures/response/delete_entity.xml +12 -0
- data/spec/fixtures/response/delete_journal.xml +12 -0
- data/spec/fixtures/response/list_account_codes.xml +168 -0
- data/spec/fixtures/response/list_entities.xml +45 -0
- data/spec/fixtures/response/list_invoices.xml +56 -0
- data/spec/fixtures/response/list_projects.xml +16 -0
- data/spec/fixtures/response/no_api_key_fault.xml +8 -0
- data/spec/fixtures/response/well_formed_request.xml +10 -0
- data/spec/fixtures/response/wrong_api_key_fault.xml +8 -0
- data/spec/spec_helper.rb +26 -0
- metadata +212 -0
@@ -0,0 +1,12 @@
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
2
|
+
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
|
3
|
+
xmlns:ns1="https://secure.clearbooks.co.uk/api/soap/">
|
4
|
+
<SOAP-ENV:Header>
|
5
|
+
<ns1:authenticate>true</ns1:authenticate>
|
6
|
+
</SOAP-ENV:Header>
|
7
|
+
<SOAP-ENV:Body>
|
8
|
+
<SOAP-ENV:allocatePaymentResponse>
|
9
|
+
<status success="true" msg="The payment has been allocated"/>
|
10
|
+
</SOAP-ENV:allocatePaymentResponse>
|
11
|
+
</SOAP-ENV:Body>
|
12
|
+
</SOAP-ENV:Envelope>
|
@@ -0,0 +1,12 @@
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
2
|
+
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
|
3
|
+
xmlns:ns1="https://secure.clearbooks.co.uk/api/soap/">
|
4
|
+
<SOAP-ENV:Header>
|
5
|
+
<ns1:authenticate>true</ns1:authenticate>
|
6
|
+
</SOAP-ENV:Header>
|
7
|
+
<SOAP-ENV:Body>
|
8
|
+
<SOAP-ENV:createEntityResponse>
|
9
|
+
<createEntityReturn>6</createEntityReturn>
|
10
|
+
</SOAP-ENV:createEntityResponse>
|
11
|
+
</SOAP-ENV:Body>
|
12
|
+
</SOAP-ENV:Envelope>
|
@@ -0,0 +1,11 @@
|
|
1
|
+
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
|
2
|
+
xmlns:ns1="https://secure.clearbooks.co.uk/api/soap/">
|
3
|
+
<SOAP-ENV:Header>
|
4
|
+
<ns1:authenticate>true</ns1:authenticate>
|
5
|
+
</SOAP-ENV:Header>
|
6
|
+
<SOAP-ENV:Body>
|
7
|
+
<SOAP-ENV:createInvoiceResponse>
|
8
|
+
<createInvoiceReturn due="50" invoice_id="3" invoice_prefix="PUR" invoice_number="3"/>
|
9
|
+
</SOAP-ENV:createInvoiceResponse>
|
10
|
+
</SOAP-ENV:Body>
|
11
|
+
</SOAP-ENV:Envelope>
|
@@ -0,0 +1,12 @@
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
2
|
+
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
|
3
|
+
xmlns:ns1="https://secure.clearbooks.co.uk/api/soap/">
|
4
|
+
<SOAP-ENV:Header>
|
5
|
+
<ns1:authenticate>true</ns1:authenticate>
|
6
|
+
</SOAP-ENV:Header>
|
7
|
+
<SOAP-ENV:Body>
|
8
|
+
<SOAP-ENV:createJournalResponse>
|
9
|
+
<createJournalReturn journal_id="8"/>
|
10
|
+
</SOAP-ENV:createJournalResponse>
|
11
|
+
</SOAP-ENV:Body>
|
12
|
+
</SOAP-ENV:Envelope>
|
@@ -0,0 +1,12 @@
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
2
|
+
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
|
3
|
+
xmlns:ns1="https://secure.clearbooks.co.uk/api/soap/">
|
4
|
+
<SOAP-ENV:Header>
|
5
|
+
<ns1:authenticate>true</ns1:authenticate>
|
6
|
+
</SOAP-ENV:Header>
|
7
|
+
<SOAP-ENV:Body>
|
8
|
+
<SOAP-ENV:createPaymentResponse>
|
9
|
+
<createPaymentReturn payment_id="1"/>
|
10
|
+
</SOAP-ENV:createPaymentResponse>
|
11
|
+
</SOAP-ENV:Body>
|
12
|
+
</SOAP-ENV:Envelope>
|
@@ -0,0 +1,12 @@
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
2
|
+
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
|
3
|
+
xmlns:ns1="https://secure.clearbooks.co.uk/api/soap/">
|
4
|
+
<SOAP-ENV:Header>
|
5
|
+
<ns1:authenticate>true</ns1:authenticate>
|
6
|
+
</SOAP-ENV:Header>
|
7
|
+
<SOAP-ENV:Body>
|
8
|
+
<SOAP-ENV:createProjectResponse>
|
9
|
+
<createProjectReturn project_id="1"/>
|
10
|
+
</SOAP-ENV:createProjectResponse>
|
11
|
+
</SOAP-ENV:Body>
|
12
|
+
</SOAP-ENV:Envelope>
|
@@ -0,0 +1,12 @@
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
2
|
+
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
|
3
|
+
xmlns:ns1="https://secure.clearbooks.co.uk/api/soap/">
|
4
|
+
<SOAP-ENV:Header>
|
5
|
+
<ns1:authenticate>true</ns1:authenticate>
|
6
|
+
</SOAP-ENV:Header>
|
7
|
+
<SOAP-ENV:Body>
|
8
|
+
<SOAP-ENV:deleteEntityResponse>
|
9
|
+
<deleteEntitySuccess>true</deleteEntitySuccess>
|
10
|
+
</SOAP-ENV:deleteEntityResponse>
|
11
|
+
</SOAP-ENV:Body>
|
12
|
+
</SOAP-ENV:Envelope>
|
@@ -0,0 +1,12 @@
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
2
|
+
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
|
3
|
+
xmlns:ns1="https://secure.clearbooks.co.uk/api/soap/">
|
4
|
+
<SOAP-ENV:Header>
|
5
|
+
<ns1:authenticate>true</ns1:authenticate>
|
6
|
+
</SOAP-ENV:Header>
|
7
|
+
<SOAP-ENV:Body>
|
8
|
+
<SOAP-ENV:deleteJournalResponse>
|
9
|
+
<journalSuccess>true</journalSuccess>
|
10
|
+
</SOAP-ENV:deleteJournalResponse>
|
11
|
+
</SOAP-ENV:Body>
|
12
|
+
</SOAP-ENV:Envelope>
|
@@ -0,0 +1,168 @@
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
2
|
+
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
|
3
|
+
xmlns:ns1="https://secure.clearbooks.co.uk/api/soap/">
|
4
|
+
<SOAP-ENV:Header>
|
5
|
+
<ns1:authenticate>true</ns1:authenticate>
|
6
|
+
</SOAP-ENV:Header>
|
7
|
+
<SOAP-ENV:Body>
|
8
|
+
<SOAP-ENV:listAccountCodesResponse>
|
9
|
+
<accountCodes>
|
10
|
+
<ns1:AccountCode id="4001001" account_name="Salaries" group_name="Administrative expenses"
|
11
|
+
default_vat_rate="0.00:Out" show_sales="false" show_purchases="true"/>
|
12
|
+
<ns1:AccountCode id="4001002" account_name="PAYE" group_name="Administrative expenses"
|
13
|
+
default_vat_rate="0.00:Out" show_sales="false" show_purchases="true"/>
|
14
|
+
<ns1:AccountCode id="4001003" account_name="Employees' NICs" group_name="Administrative expenses"
|
15
|
+
default_vat_rate="0.00:Out" show_sales="false" show_purchases="true"/>
|
16
|
+
<ns1:AccountCode id="4001004" account_name="Employers' NICs" group_name="Administrative expenses"
|
17
|
+
default_vat_rate="0.00:Out" show_sales="false" show_purchases="true"/>
|
18
|
+
<ns1:AccountCode id="4001005" account_name="Pension" group_name="Administrative expenses"
|
19
|
+
default_vat_rate="0.00:Out" show_sales="false" show_purchases="true"/>
|
20
|
+
<ns1:AccountCode id="4002001" account_name="Rent and rates" group_name="Administrative expenses"
|
21
|
+
default_vat_rate="" show_sales="false" show_purchases="true"/>
|
22
|
+
<ns1:AccountCode id="4002002" account_name="Heat and lighting" group_name="Administrative expenses"
|
23
|
+
default_vat_rate="" show_sales="false" show_purchases="true"/>
|
24
|
+
<ns1:AccountCode id="4002003" account_name="Insurance" group_name="Administrative expenses" default_vat_rate=""
|
25
|
+
show_sales="false" show_purchases="true"/>
|
26
|
+
<ns1:AccountCode id="4003001" account_name="Telephone" group_name="Administrative expenses" default_vat_rate=""
|
27
|
+
show_sales="false" show_purchases="true"/>
|
28
|
+
<ns1:AccountCode id="4003002" account_name="Internet" group_name="Administrative expenses" default_vat_rate=""
|
29
|
+
show_sales="false" show_purchases="true"/>
|
30
|
+
<ns1:AccountCode id="4004001" account_name="General admin" group_name="Administrative expenses"
|
31
|
+
default_vat_rate="" show_sales="false" show_purchases="true"/>
|
32
|
+
<ns1:AccountCode id="4004002" account_name="Subscriptions" group_name="Administrative expenses"
|
33
|
+
default_vat_rate="" show_sales="false" show_purchases="true"/>
|
34
|
+
<ns1:AccountCode id="4004003" account_name="Printing and stationery" group_name="Administrative expenses"
|
35
|
+
default_vat_rate="" show_sales="false" show_purchases="true"/>
|
36
|
+
<ns1:AccountCode id="4004004" account_name="Cleaning" group_name="Administrative expenses" default_vat_rate=""
|
37
|
+
show_sales="false" show_purchases="true"/>
|
38
|
+
<ns1:AccountCode id="4004005" account_name="Postage and packaging" group_name="Administrative expenses"
|
39
|
+
default_vat_rate="" show_sales="false" show_purchases="true"/>
|
40
|
+
<ns1:AccountCode id="4005001" account_name="Travel" group_name="Administrative expenses" default_vat_rate=""
|
41
|
+
show_sales="false" show_purchases="true"/>
|
42
|
+
<ns1:AccountCode id="4005002" account_name="Mileage" group_name="Administrative expenses" default_vat_rate=""
|
43
|
+
show_sales="false" show_purchases="true"/>
|
44
|
+
<ns1:AccountCode id="4005003" account_name="Subsistence" group_name="Administrative expenses"
|
45
|
+
default_vat_rate="" show_sales="false" show_purchases="true"/>
|
46
|
+
<ns1:AccountCode id="4006001" account_name="Advertising" group_name="Administrative expenses"
|
47
|
+
default_vat_rate="" show_sales="false" show_purchases="true"/>
|
48
|
+
<ns1:AccountCode id="4006002" account_name="Marketing" group_name="Administrative expenses" default_vat_rate=""
|
49
|
+
show_sales="false" show_purchases="true"/>
|
50
|
+
<ns1:AccountCode id="4007001" account_name="Accounting fees" group_name="Administrative expenses"
|
51
|
+
default_vat_rate="" show_sales="false" show_purchases="true"/>
|
52
|
+
<ns1:AccountCode id="4007002" account_name="Legal fees" group_name="Administrative expenses" default_vat_rate=""
|
53
|
+
show_sales="false" show_purchases="true"/>
|
54
|
+
<ns1:AccountCode id="4008001" account_name="Entertaining staff" group_name="Administrative expenses"
|
55
|
+
default_vat_rate="" show_sales="false" show_purchases="true"/>
|
56
|
+
<ns1:AccountCode id="4008002" account_name="Entertaining clients" group_name="Administrative expenses"
|
57
|
+
default_vat_rate="0.00:Out" show_sales="false" show_purchases="true"/>
|
58
|
+
<ns1:AccountCode id="4009001" account_name="Operating leases" group_name="Administrative expenses"
|
59
|
+
default_vat_rate="" show_sales="false" show_purchases="true"/>
|
60
|
+
<ns1:AccountCode id="4010001" account_name="Fixtures &amp; fittings dep"
|
61
|
+
group_name="Administrative expenses" default_vat_rate="0.00:Out" show_sales="false"
|
62
|
+
show_purchases="false"/>
|
63
|
+
<ns1:AccountCode id="4010002" account_name="Plant &amp; equipment dep" group_name="Administrative expenses"
|
64
|
+
default_vat_rate="0.00:Out" show_sales="false" show_purchases="false"/>
|
65
|
+
<ns1:AccountCode id="4010003" account_name="Land &amp; property dep" group_name="Administrative expenses"
|
66
|
+
default_vat_rate="0.00:Out" show_sales="false" show_purchases="false"/>
|
67
|
+
<ns1:AccountCode id="4010004" account_name="Motor vehicles dep" group_name="Administrative expenses"
|
68
|
+
default_vat_rate="0.00:Out" show_sales="false" show_purchases="false"/>
|
69
|
+
<ns1:AccountCode id="4011001" account_name="Bad debt expense" group_name="Administrative expenses"
|
70
|
+
default_vat_rate="0.00:Out" show_sales="false" show_purchases="false"/>
|
71
|
+
<ns1:AccountCode id="4012001" account_name="Amortisation" group_name="Administrative expenses"
|
72
|
+
default_vat_rate="0.00:Out" show_sales="false" show_purchases="false"/>
|
73
|
+
<ns1:AccountCode id="2001001" account_name="Cost of sales" group_name="Cost of sales" default_vat_rate=""
|
74
|
+
show_sales="false" show_purchases="true"/>
|
75
|
+
<ns1:AccountCode id="2001002" account_name="Labour" group_name="Cost of sales" default_vat_rate=""
|
76
|
+
show_sales="false" show_purchases="true"/>
|
77
|
+
<ns1:AccountCode id="2001003" account_name="Materials" group_name="Cost of sales" default_vat_rate=""
|
78
|
+
show_sales="false" show_purchases="true"/>
|
79
|
+
<ns1:AccountCode id="2002001" account_name="CIS labour cost (20%)" group_name="Cost of sales"
|
80
|
+
default_vat_rate="" show_sales="false" show_purchases="true"/>
|
81
|
+
<ns1:AccountCode id="2002002" account_name="CIS labour cost (30%)" group_name="Cost of sales"
|
82
|
+
default_vat_rate="" show_sales="false" show_purchases="true"/>
|
83
|
+
<ns1:AccountCode id="2002003" account_name="CIS labour cost (Gross)" group_name="Cost of sales"
|
84
|
+
default_vat_rate="" show_sales="false" show_purchases="true"/>
|
85
|
+
<ns1:AccountCode id="7501001" account_name="Trade debtors" group_name="Current assets"
|
86
|
+
default_vat_rate="0.00:Out" show_sales="false" show_purchases="false"/>
|
87
|
+
<ns1:AccountCode id="7501002" account_name="Bad debt provision" group_name="Current assets" default_vat_rate=""
|
88
|
+
show_sales="false" show_purchases="false"/>
|
89
|
+
<ns1:AccountCode id="7502001" account_name="Bank Account 1" group_name="Current assets"
|
90
|
+
default_vat_rate="0.00:Out" show_sales="false" show_purchases="false"/>
|
91
|
+
<ns1:AccountCode id="7503001" account_name="CIS debtor" group_name="Current assets" default_vat_rate="0.00:Out"
|
92
|
+
show_sales="false" show_purchases="false"/>
|
93
|
+
<ns1:AccountCode id="7503003" account_name="Loans receivable" group_name="Current assets"
|
94
|
+
default_vat_rate="0.00:Out" show_sales="true" show_purchases="true"/>
|
95
|
+
<ns1:AccountCode id="7504001" account_name="Inventory" group_name="Current assets" default_vat_rate="0.00:Out"
|
96
|
+
show_sales="false" show_purchases="false"/>
|
97
|
+
<ns1:AccountCode id="8501001" account_name="Trade creditors" group_name="Current liabilities"
|
98
|
+
default_vat_rate="0.00:Out" show_sales="false" show_purchases="false"/>
|
99
|
+
<ns1:AccountCode id="8502001" account_name="VAT control" group_name="Current liabilities"
|
100
|
+
default_vat_rate="0.00:Out" show_sales="false" show_purchases="false"/>
|
101
|
+
<ns1:AccountCode id="8502002" account_name="VAT cash control" group_name="Current liabilities"
|
102
|
+
default_vat_rate="0.00:Out" show_sales="false" show_purchases="false"/>
|
103
|
+
<ns1:AccountCode id="8502003" account_name="VAT payable" group_name="Current liabilities"
|
104
|
+
default_vat_rate="0.00:Out" show_sales="true" show_purchases="true"/>
|
105
|
+
<ns1:AccountCode id="8503001" account_name="CIS creditor" group_name="Current liabilities"
|
106
|
+
default_vat_rate="0.00:Out" show_sales="true" show_purchases="true"/>
|
107
|
+
<ns1:AccountCode id="8503002" account_name="Corporation tax" group_name="Current liabilities"
|
108
|
+
default_vat_rate="0.00:Out" show_sales="false" show_purchases="false"/>
|
109
|
+
<ns1:AccountCode id="8503005" account_name="Deferred revenue" group_name="Current liabilities"
|
110
|
+
default_vat_rate="0.00:Out" show_sales="false" show_purchases="false"/>
|
111
|
+
<ns1:AccountCode id="9501001" account_name="Dividends" group_name="Dividends" default_vat_rate="0.00:Out"
|
112
|
+
show_sales="false" show_purchases="true"/>
|
113
|
+
<ns1:AccountCode id="9001001" account_name="Share capital" group_name="Equity" default_vat_rate="0.00:Out"
|
114
|
+
show_sales="true" show_purchases="false"/>
|
115
|
+
<ns1:AccountCode id="9001002" account_name="Retained earnings" group_name="Equity" default_vat_rate="0.00:Out"
|
116
|
+
show_sales="false" show_purchases="false"/>
|
117
|
+
<ns1:AccountCode id="6001001" account_name="Interest expense" group_name="Finance costs"
|
118
|
+
default_vat_rate="0.00:Out" show_sales="false" show_purchases="true"/>
|
119
|
+
<ns1:AccountCode id="6001002" account_name="Bank charges" group_name="Finance costs" default_vat_rate="0.00:Out"
|
120
|
+
show_sales="false" show_purchases="true"/>
|
121
|
+
<ns1:AccountCode id="5501001" account_name="Interest income" group_name="Finance income"
|
122
|
+
default_vat_rate="0.00:Out" show_sales="true" show_purchases="false"/>
|
123
|
+
<ns1:AccountCode id="7001001" account_name="Fixtures &amp; fittings" group_name="Non current assets"
|
124
|
+
default_vat_rate="" show_sales="false" show_purchases="true"/>
|
125
|
+
<ns1:AccountCode id="7001002" account_name="Plant &amp; equipment" group_name="Non current assets"
|
126
|
+
default_vat_rate="" show_sales="false" show_purchases="true"/>
|
127
|
+
<ns1:AccountCode id="7001003" account_name="Land &amp; property" group_name="Non current assets"
|
128
|
+
default_vat_rate="" show_sales="false" show_purchases="true"/>
|
129
|
+
<ns1:AccountCode id="7001004" account_name="Motor vehicles" group_name="Non current assets" default_vat_rate=""
|
130
|
+
show_sales="false" show_purchases="true"/>
|
131
|
+
<ns1:AccountCode id="7002001" account_name="Fixtures &amp; fittings acc dep" group_name="Non current assets"
|
132
|
+
default_vat_rate="0.00:Out" show_sales="false" show_purchases="false"/>
|
133
|
+
<ns1:AccountCode id="7002002" account_name="Plant &amp; equipment acc dep" group_name="Non current assets"
|
134
|
+
default_vat_rate="0.00:Out" show_sales="false" show_purchases="false"/>
|
135
|
+
<ns1:AccountCode id="7002003" account_name="Land &amp; property acc dep" group_name="Non current assets"
|
136
|
+
default_vat_rate="0.00:Out" show_sales="false" show_purchases="false"/>
|
137
|
+
<ns1:AccountCode id="7002004" account_name="Motor vehicles acc dep" group_name="Non current assets"
|
138
|
+
default_vat_rate="0.00:Out" show_sales="false" show_purchases="false"/>
|
139
|
+
<ns1:AccountCode id="7004001" account_name="Intangible assets" group_name="Non current assets"
|
140
|
+
default_vat_rate="" show_sales="false" show_purchases="true"/>
|
141
|
+
<ns1:AccountCode id="7005001" account_name="Accumulated amortisation" group_name="Non current assets"
|
142
|
+
default_vat_rate="0.00:Out" show_sales="false" show_purchases="false"/>
|
143
|
+
<ns1:AccountCode id="8001001" account_name="Loans payable" group_name="Non current liabilities"
|
144
|
+
default_vat_rate="0.00:Out" show_sales="true" show_purchases="true"/>
|
145
|
+
<ns1:AccountCode id="5001001" account_name="Forex movement" group_name="Other expenses"
|
146
|
+
default_vat_rate="0.00:Out" show_sales="false" show_purchases="false"/>
|
147
|
+
<ns1:AccountCode id="3001001" account_name="Other income" group_name="Other income" default_vat_rate=""
|
148
|
+
show_sales="true" show_purchases="false"/>
|
149
|
+
<ns1:AccountCode id="3001002" account_name="Reclaimed expenses" group_name="Other income" default_vat_rate=""
|
150
|
+
show_sales="true" show_purchases="true"/>
|
151
|
+
<ns1:AccountCode id="1001001" account_name="Revenue" group_name="Revenue" default_vat_rate="" show_sales="true"
|
152
|
+
show_purchases="false"/>
|
153
|
+
<ns1:AccountCode id="1001002" account_name="Labour revenue" group_name="Revenue" default_vat_rate=""
|
154
|
+
show_sales="true" show_purchases="false"/>
|
155
|
+
<ns1:AccountCode id="1001003" account_name="Materials revenue" group_name="Revenue" default_vat_rate=""
|
156
|
+
show_sales="true" show_purchases="false"/>
|
157
|
+
<ns1:AccountCode id="1002001" account_name="CIS labour revenue (20%)" group_name="Revenue" default_vat_rate=""
|
158
|
+
show_sales="true" show_purchases="false"/>
|
159
|
+
<ns1:AccountCode id="1002002" account_name="CIS labour revenue (30%)" group_name="Revenue" default_vat_rate=""
|
160
|
+
show_sales="true" show_purchases="false"/>
|
161
|
+
<ns1:AccountCode id="1002003" account_name="CIS labour revenue (Gross)" group_name="Revenue" default_vat_rate=""
|
162
|
+
show_sales="false" show_purchases="true"/>
|
163
|
+
<ns1:AccountCode id="6501001" account_name="Corporation tax" group_name="Tax expense"
|
164
|
+
default_vat_rate="0.00:Out" show_sales="false" show_purchases="true"/>
|
165
|
+
</accountCodes>
|
166
|
+
</SOAP-ENV:listAccountCodesResponse>
|
167
|
+
</SOAP-ENV:Body>
|
168
|
+
</SOAP-ENV:Envelope>
|
@@ -0,0 +1,45 @@
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
2
|
+
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
|
3
|
+
xmlns:ns1="https://secure.clearbooks.co.uk/api/soap/">
|
4
|
+
<SOAP-ENV:Header>
|
5
|
+
<ns1:authenticate>true</ns1:authenticate>
|
6
|
+
</SOAP-ENV:Header>
|
7
|
+
<SOAP-ENV:Body>
|
8
|
+
<SOAP-ENV:listEntitiesResponse>
|
9
|
+
<entities>
|
10
|
+
<ns1:Entity id="1" company_name="Bank Account 1" contact_name="" address1="" town="" county="" postcode=""
|
11
|
+
email="" phone1="" building="" address2="" phone2="" fax="" website=""
|
12
|
+
date_modified="2010-03-04 11:32:14" external_id="0" company_number=""
|
13
|
+
statement_url="https://secure.clearbooks.co.uk/s/58055:5y6ve9PH-tZyCSVTi22g8Q">
|
14
|
+
<supplier/>
|
15
|
+
<customer/>
|
16
|
+
<bankAccount bankName="" name="" sortcode="" accountNumber=""/>
|
17
|
+
</ns1:Entity>
|
18
|
+
<ns1:Entity id="2" company_name="Doski LLC" contact_name="Mr John Foo" address1="1270 LONDON ROAD NORBURY"
|
19
|
+
town="London" county="" postcode="SW164DH" email="john.foo@datalogic.ua" phone1="380672382496"
|
20
|
+
building="DOSHI & CO 1ST FLOOR WINDSOR HOUSE" address2="" phone2="" fax="" website=""
|
21
|
+
date_modified="2015-04-27 17:39:23" external_id="" company_number="06889723"
|
22
|
+
statement_url="https://secure.clearbooks.co.uk/s/58055:IVm_rJOxQvRyPODa-U77HQ">
|
23
|
+
<supplier default_account_code="30" default_vat_rate="0" default_credit_terms="30"/>
|
24
|
+
<bankAccount bankName="" name="" sortcode="" accountNumber=""/>
|
25
|
+
</ns1:Entity>
|
26
|
+
<ns1:Entity id="6" company_name="DataLogic" contact_name=" Oleg Kukareka" address1="Kiev" town="" county=""
|
27
|
+
postcode="04073" email="info@datalogic.co.uk" phone1="01234 567890" building="" address2=""
|
28
|
+
phone2="" fax="" website="https://datalogic.co.uk" date_modified="2015-04-28 15:59:17"
|
29
|
+
external_id="0" company_number=""
|
30
|
+
statement_url="https://secure.clearbooks.co.uk/s/58055:oGADQmCXvwNPIsBANlv9Xg">
|
31
|
+
<supplier default_account_code="30" default_vat_rate="0" default_credit_terms="30"/>
|
32
|
+
<bankAccount bankName="" name="" sortcode="" accountNumber=""/>
|
33
|
+
</ns1:Entity>
|
34
|
+
<ns1:Entity id="7" company_name="DataLogic" contact_name="Oleg Kukareka" address1="Street 1" town="Kiev" county="Ukraine"
|
35
|
+
postcode="04073" email="info@datalogic.co.uk" phone1="01234 567890" building="Building2" address2="Street2"
|
36
|
+
phone2="1234 567890" fax="2345 67890" website="https://datalogic.co.uk" date_modified="2015-04-28 16:10:57"
|
37
|
+
external_id="3" company_number=""
|
38
|
+
statement_url="https://secure.clearbooks.co.uk/s/58055:YGD2d9_WFz6GvKUv4V4anw">
|
39
|
+
<supplier default_account_code="30" default_vat_rate="10" default_credit_terms="30"/>
|
40
|
+
<bankAccount bankName="" name="" sortcode="" accountNumber=""/>
|
41
|
+
</ns1:Entity>
|
42
|
+
</entities>
|
43
|
+
</SOAP-ENV:listEntitiesResponse>
|
44
|
+
</SOAP-ENV:Body>
|
45
|
+
</SOAP-ENV:Envelope>
|
@@ -0,0 +1,56 @@
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
2
|
+
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
|
3
|
+
xmlns:ns1="https://secure.clearbooks.co.uk/api/soap/">
|
4
|
+
<SOAP-ENV:Header>
|
5
|
+
<ns1:authenticate>true</ns1:authenticate>
|
6
|
+
</SOAP-ENV:Header>
|
7
|
+
<SOAP-ENV:Body>
|
8
|
+
<SOAP-ENV:listInvoicesResponse>
|
9
|
+
<createInvoicesReturn>
|
10
|
+
<ns1:Invoice entityId="1" invoice_id="1" invoice_prefix="INV" invoiceNumber="1" reference=""
|
11
|
+
dateCreated="2015-04-27 00:00:00" dateDue="2015-05-27 00:00:00" dateAccrual="2015-04-27 00:00:00"
|
12
|
+
creditTerms="30" project="0" status="paid"
|
13
|
+
statementPage="https://secure.clearbooks.co.uk/accounting/sales/invoice_html/?source=statement&type=invoice&c=58055&auth=XVExZSNLZFxnsJKvGyXKAg"
|
14
|
+
type="S" multicurrency="1" fxrate="0" gross="0" net="0" vat="0" paid="0" balance="0">
|
15
|
+
<items>
|
16
|
+
<ns1:Item unitPrice="0" vat="0" quantity="1" type="1001001" vatRate="0.00:Out" project="0">
|
17
|
+
<description>asdasd</description>
|
18
|
+
</ns1:Item>
|
19
|
+
</items>
|
20
|
+
<description>asddda</description>
|
21
|
+
</ns1:Invoice>
|
22
|
+
<ns1:Invoice entityId="1" invoice_id="2" invoice_prefix="INV" invoiceNumber="2" reference="112"
|
23
|
+
dateCreated="2015-04-27 00:00:00" dateDue="2015-05-27 00:00:00" dateAccrual="2015-04-27 00:00:00"
|
24
|
+
creditTerms="30" project="0" status="approved"
|
25
|
+
statementPage="https://secure.clearbooks.co.uk/accounting/sales/invoice_html/?source=statement&type=invoice&c=58055&auth=uauJHva1kKsRLAvxnhJBXg"
|
26
|
+
type="S" multicurrency="1" fxrate="0" gross="2" net="2" vat="0" paid="0" balance="2">
|
27
|
+
<items>
|
28
|
+
<ns1:Item unitPrice="2" vat="0" quantity="1" type="1001001" vatRate="0.00:Out" project="0">
|
29
|
+
<description>sasdfasdf</description>
|
30
|
+
</ns1:Item>
|
31
|
+
</items>
|
32
|
+
<description>wewerwer</description>
|
33
|
+
</ns1:Invoice>
|
34
|
+
<ns1:Invoice entityId="1" invoice_id="3" invoice_prefix="INV" invoiceNumber="3" reference="ref1"
|
35
|
+
dateCreated="2015-04-27 00:00:00" dateDue="2015-05-27 00:00:00" dateAccrual="2015-04-27 00:00:00"
|
36
|
+
creditTerms="30" project="7" status="approved"
|
37
|
+
statementPage="https://secure.clearbooks.co.uk/accounting/sales/invoice_html/?source=statement"
|
38
|
+
type="S" multicurrency="1" fxrate="0" gross="12" net="12" vat="4" paid="2" balance="12">
|
39
|
+
<items>
|
40
|
+
<ns1:Item unitPrice="3" vat="0" quantity="1" type="1001001" vatRate="0.00:Out" project="0">
|
41
|
+
<description>123123</description>
|
42
|
+
</ns1:Item>
|
43
|
+
<ns1:Item unitPrice="4" vat="0" quantity="1" type="1001001" vatRate="0.00:Out" project="0">
|
44
|
+
<description>123232</description>
|
45
|
+
</ns1:Item>
|
46
|
+
<ns1:Item unitPrice="5" vat="2" quantity="1" type="1001001" vatRate="0.00:Out" project="3">
|
47
|
+
<description>232323</description>
|
48
|
+
</ns1:Item>
|
49
|
+
</items>
|
50
|
+
<description>asasdasd</description>
|
51
|
+
</ns1:Invoice>
|
52
|
+
</createInvoicesReturn>
|
53
|
+
</SOAP-ENV:listInvoicesResponse>
|
54
|
+
</SOAP-ENV:Body>
|
55
|
+
</SOAP-ENV:Envelope>
|
56
|
+
|
@@ -0,0 +1,16 @@
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
2
|
+
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
|
3
|
+
xmlns:ns1="https://secure.clearbooks.co.uk/api/soap/">
|
4
|
+
<SOAP-ENV:Header>
|
5
|
+
<ns1:authenticate>true</ns1:authenticate>
|
6
|
+
</SOAP-ENV:Header>
|
7
|
+
<SOAP-ENV:Body>
|
8
|
+
<SOAP-ENV:listProjectsResponse>
|
9
|
+
<projects>
|
10
|
+
<ns1:Project projectName="Project 1 name" status="open" description="description1" id="1"/>
|
11
|
+
<ns1:Project projectName="Project 2 name" status="open" description="description1" id="2"/>
|
12
|
+
<ns1:Project projectName="Project 3 name" status="open" description="description3" id="3"/>
|
13
|
+
</projects>
|
14
|
+
</SOAP-ENV:listProjectsResponse>
|
15
|
+
</SOAP-ENV:Body>
|
16
|
+
</SOAP-ENV:Envelope>
|
@@ -0,0 +1,8 @@
|
|
1
|
+
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
|
2
|
+
<SOAP-ENV:Body>
|
3
|
+
<SOAP-ENV:Fault>
|
4
|
+
<faultcode>Receiver</faultcode>
|
5
|
+
<faultstring>Login Failed : no api key set</faultstring>
|
6
|
+
</SOAP-ENV:Fault>
|
7
|
+
</SOAP-ENV:Body>
|
8
|
+
</SOAP-ENV:Envelope>
|
@@ -0,0 +1,10 @@
|
|
1
|
+
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:soap="https://secure.clearbooks.co.uk/api/soap/">
|
2
|
+
<soapenv:Header>
|
3
|
+
<soap:authenticate apiKey="demo"/>
|
4
|
+
</soapenv:Header>
|
5
|
+
<soapenv:Body>
|
6
|
+
<soap:OperationName>
|
7
|
+
<query/>
|
8
|
+
</soap:OperationName>
|
9
|
+
</soapenv:Body>
|
10
|
+
</soapenv:Envelope>
|
data/spec/spec_helper.rb
ADDED
@@ -0,0 +1,26 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
|
3
|
+
|
4
|
+
# Custom include
|
5
|
+
require 'clearbooks'
|
6
|
+
require 'savon/mock/spec_helper'
|
7
|
+
|
8
|
+
|
9
|
+
RSpec.configure do |config|
|
10
|
+
config.include Savon::SpecHelper
|
11
|
+
|
12
|
+
# config.expect_with :rspec do |expectations|
|
13
|
+
# expectations.include_chain_clauses_in_custom_matcher_descriptions = true
|
14
|
+
# end
|
15
|
+
|
16
|
+
# config.mock_with :rspec do |mocks|
|
17
|
+
# mocks.verify_partial_doubles = true
|
18
|
+
# end
|
19
|
+
|
20
|
+
config.run_all_when_everything_filtered = true
|
21
|
+
config.filter_run :focus
|
22
|
+
config.order = 'random'
|
23
|
+
|
24
|
+
end # of RSpec.configure
|
25
|
+
|
26
|
+
# vim:ts=2:tw=100:wm=100:syntax=ruby
|