freeagent_api 0.1.0 → 0.2.0
Sign up to get free protection for your applications and to get access to all the features.
- data/.gitignore +1 -1
- data/README.rdoc +194 -22
- data/Rakefile +4 -5
- data/VERSION +1 -1
- data/freeagent_api.gemspec +46 -17
- data/lib/freeagent_api.rb +78 -135
- data/test/authentication_test.rb +13 -0
- data/test/company_test.rb +33 -0
- data/test/contact_test.rb +62 -0
- data/test/invoice_item_test.rb +66 -0
- data/test/invoice_test.rb +70 -0
- data/test/project_test.rb +106 -0
- data/test/stubs/company/invoice_timeline +91 -0
- data/test/stubs/company/tax_timeline +28 -0
- data/test/stubs/contacts/find_all +391 -0
- data/test/stubs/contacts/find_single +29 -0
- data/test/stubs/http/200 +3 -0
- data/test/stubs/http/201 +4 -0
- data/test/stubs/invoice_items/find_all +40 -0
- data/test/stubs/invoice_items/find_single +15 -0
- data/test/stubs/invoices/find_all +239 -0
- data/test/stubs/invoices/find_single +57 -0
- data/test/stubs/projects/find_all +92 -0
- data/test/stubs/projects/find_single +22 -0
- data/test/stubs/projects/invoices +92 -0
- data/test/stubs/projects/timeslips +223 -0
- data/test/stubs/tasks/find_all +42 -0
- data/test/stubs/tasks/find_single +10 -0
- data/test/stubs/timeslips/find_all +52 -0
- data/test/stubs/timeslips/find_single +14 -0
- data/test/task_test.rb +60 -0
- data/test/test_helper.rb +83 -0
- data/test/timeslip_test.rb +62 -0
- metadata +41 -19
- data/test/freeagent_api_test.rb +0 -7
@@ -0,0 +1,391 @@
|
|
1
|
+
HTTP/1.1 200 OK
|
2
|
+
Status: 200
|
3
|
+
Content-Type: application/xml; charset=utf-8
|
4
|
+
|
5
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
6
|
+
<contacts type="array">
|
7
|
+
<contact>
|
8
|
+
<address1>Address 1</address1>
|
9
|
+
<address2>Address 2</address2>
|
10
|
+
<address3>Address 3</address3>
|
11
|
+
<charge-sales-tax type="integer">-1</charge-sales-tax>
|
12
|
+
<contact-name-on-invoices type="boolean">true</contact-name-on-invoices>
|
13
|
+
<country>United Kingdom</country>
|
14
|
+
<created-at type="datetime">2009-08-26T17:02:43Z</created-at>
|
15
|
+
<email>email@address.co.uk</email>
|
16
|
+
<first-name>Fred</first-name>
|
17
|
+
<id type="integer">27309</id>
|
18
|
+
<last-name>Bloggs</last-name>
|
19
|
+
<locale>en</locale>
|
20
|
+
<mobile nil="true"></mobile>
|
21
|
+
<organisation-name>Organisation Name</organisation-name>
|
22
|
+
<phone-number>01234 567890</phone-number>
|
23
|
+
<postcode>BS1 2AW</postcode>
|
24
|
+
<region></region>
|
25
|
+
<sales-tax-registration-number nil="true"></sales-tax-registration-number>
|
26
|
+
<town>Bristol</town>
|
27
|
+
<updated-at type="datetime">2009-08-26T17:02:43Z</updated-at>
|
28
|
+
<uploaded-at type="datetime">2009-08-26T17:02:43Z</uploaded-at>
|
29
|
+
<uses-contact-invoice-sequence type="boolean">false</uses-contact-invoice-sequence>
|
30
|
+
</contact>
|
31
|
+
<contact>
|
32
|
+
<address1>Address 1</address1>
|
33
|
+
<address2>Address 2</address2>
|
34
|
+
<address3>Address 3</address3>
|
35
|
+
<charge-sales-tax type="integer">-1</charge-sales-tax>
|
36
|
+
<contact-name-on-invoices type="boolean">true</contact-name-on-invoices>
|
37
|
+
<country>United Kingdom</country>
|
38
|
+
<created-at type="datetime">2009-08-26T21:41:24Z</created-at>
|
39
|
+
<email>email@address.co.uk</email>
|
40
|
+
<first-name>Fred</first-name>
|
41
|
+
<id type="integer">27335</id>
|
42
|
+
<last-name>Bloggs</last-name>
|
43
|
+
<locale>en</locale>
|
44
|
+
<mobile nil="true"></mobile>
|
45
|
+
<organisation-name>Organisation Name</organisation-name>
|
46
|
+
<phone-number>01234 567890</phone-number>
|
47
|
+
<postcode nil="true"></postcode>
|
48
|
+
<region nil="true"></region>
|
49
|
+
<sales-tax-registration-number nil="true"></sales-tax-registration-number>
|
50
|
+
<town nil="true"></town>
|
51
|
+
<updated-at type="datetime">2009-08-26T21:41:24Z</updated-at>
|
52
|
+
<uploaded-at type="datetime" nil="true"></uploaded-at>
|
53
|
+
<uses-contact-invoice-sequence type="boolean">false</uses-contact-invoice-sequence>
|
54
|
+
</contact>
|
55
|
+
<contact>
|
56
|
+
<address1>Address 1</address1>
|
57
|
+
<address2>Address 2</address2>
|
58
|
+
<address3>Address 3</address3>
|
59
|
+
<charge-sales-tax type="integer">-1</charge-sales-tax>
|
60
|
+
<contact-name-on-invoices type="boolean">true</contact-name-on-invoices>
|
61
|
+
<country>United Kingdom</country>
|
62
|
+
<created-at type="datetime">2009-08-26T17:02:43Z</created-at>
|
63
|
+
<email>email@address.co.uk</email>
|
64
|
+
<first-name>Fred</first-name>
|
65
|
+
<id type="integer">27307</id>
|
66
|
+
<last-name>Bloggs</last-name>
|
67
|
+
<locale>en</locale>
|
68
|
+
<mobile nil="true"></mobile>
|
69
|
+
<organisation-name>Organisation Name</organisation-name>
|
70
|
+
<phone-number>01234 567890</phone-number>
|
71
|
+
<postcode>33901</postcode>
|
72
|
+
<region>Florida</region>
|
73
|
+
<sales-tax-registration-number nil="true"></sales-tax-registration-number>
|
74
|
+
<town>Fort Myers</town>
|
75
|
+
<updated-at type="datetime">2009-08-26T17:02:43Z</updated-at>
|
76
|
+
<uploaded-at type="datetime">2009-08-26T17:02:43Z</uploaded-at>
|
77
|
+
<uses-contact-invoice-sequence type="boolean">false</uses-contact-invoice-sequence>
|
78
|
+
</contact>
|
79
|
+
<contact>
|
80
|
+
<address1>Address 1</address1>
|
81
|
+
<address2>Address 2</address2>
|
82
|
+
<address3>Address 3</address3>
|
83
|
+
<charge-sales-tax type="integer">-1</charge-sales-tax>
|
84
|
+
<contact-name-on-invoices type="boolean">true</contact-name-on-invoices>
|
85
|
+
<country>United Kingdom</country>
|
86
|
+
<created-at type="datetime">2009-09-20T12:47:30Z</created-at>
|
87
|
+
<email>email@address.co.uk</email>
|
88
|
+
<first-name>Fred</first-name>
|
89
|
+
<id type="integer">29899</id>
|
90
|
+
<last-name>Bloggs</last-name>
|
91
|
+
<locale>en</locale>
|
92
|
+
<mobile nil="true"></mobile>
|
93
|
+
<organisation-name>Organisation Name</organisation-name>
|
94
|
+
<phone-number>01234 567890</phone-number>
|
95
|
+
<postcode>SN10 2DS</postcode>
|
96
|
+
<region>Wiltshire</region>
|
97
|
+
<sales-tax-registration-number></sales-tax-registration-number>
|
98
|
+
<town>Devizes</town>
|
99
|
+
<updated-at type="datetime">2009-10-21T18:30:24Z</updated-at>
|
100
|
+
<uploaded-at type="datetime" nil="true"></uploaded-at>
|
101
|
+
<uses-contact-invoice-sequence type="boolean">false</uses-contact-invoice-sequence>
|
102
|
+
</contact>
|
103
|
+
<contact>
|
104
|
+
<address1>Address 1</address1>
|
105
|
+
<address2>Address 2</address2>
|
106
|
+
<address3>Address 3</address3>
|
107
|
+
<charge-sales-tax type="integer">-1</charge-sales-tax>
|
108
|
+
<contact-name-on-invoices type="boolean">true</contact-name-on-invoices>
|
109
|
+
<country>United Kingdom</country>
|
110
|
+
<created-at type="datetime">2009-10-09T15:09:58Z</created-at>
|
111
|
+
<email>email@address.co.uk</email>
|
112
|
+
<first-name>Fred</first-name>
|
113
|
+
<id type="integer">32847</id>
|
114
|
+
<last-name>Bloggs</last-name>
|
115
|
+
<locale>en</locale>
|
116
|
+
<mobile nil="true"></mobile>
|
117
|
+
<organisation-name>Organisation Name</organisation-name>
|
118
|
+
<phone-number>01234 567890</phone-number>
|
119
|
+
<postcode nil="true"></postcode>
|
120
|
+
<region nil="true"></region>
|
121
|
+
<sales-tax-registration-number nil="true"></sales-tax-registration-number>
|
122
|
+
<town nil="true"></town>
|
123
|
+
<updated-at type="datetime">2009-10-09T15:09:58Z</updated-at>
|
124
|
+
<uploaded-at type="datetime" nil="true"></uploaded-at>
|
125
|
+
<uses-contact-invoice-sequence type="boolean">false</uses-contact-invoice-sequence>
|
126
|
+
</contact>
|
127
|
+
<contact>
|
128
|
+
<address1>Address 1</address1>
|
129
|
+
<address2>Address 2</address2>
|
130
|
+
<address3>Address 3</address3>
|
131
|
+
<charge-sales-tax type="integer">-1</charge-sales-tax>
|
132
|
+
<contact-name-on-invoices type="boolean">true</contact-name-on-invoices>
|
133
|
+
<country>United Kingdom</country>
|
134
|
+
<created-at type="datetime">2009-08-26T17:02:43Z</created-at>
|
135
|
+
<email>email@address.co.uk</email>
|
136
|
+
<first-name>Fred</first-name>
|
137
|
+
<id type="integer">27313</id>
|
138
|
+
<last-name>Bloggs</last-name>
|
139
|
+
<locale>en</locale>
|
140
|
+
<mobile nil="true"></mobile>
|
141
|
+
<organisation-name>Organisation Name</organisation-name>
|
142
|
+
<phone-number>01234 567890</phone-number>
|
143
|
+
<postcode>SN1 1UJ</postcode>
|
144
|
+
<region>Wiltshire</region>
|
145
|
+
<sales-tax-registration-number></sales-tax-registration-number>
|
146
|
+
<town>Swindon</town>
|
147
|
+
<updated-at type="datetime">2009-08-26T21:17:58Z</updated-at>
|
148
|
+
<uploaded-at type="datetime">2009-08-26T17:02:43Z</uploaded-at>
|
149
|
+
<uses-contact-invoice-sequence type="boolean">false</uses-contact-invoice-sequence>
|
150
|
+
</contact>
|
151
|
+
<contact>
|
152
|
+
<address1>Address 1</address1>
|
153
|
+
<address2>Address 2</address2>
|
154
|
+
<address3>Address 3</address3>
|
155
|
+
<charge-sales-tax type="integer">-1</charge-sales-tax>
|
156
|
+
<contact-name-on-invoices type="boolean">true</contact-name-on-invoices>
|
157
|
+
<country>United Kingdom</country>
|
158
|
+
<created-at type="datetime">2009-09-27T19:30:49Z</created-at>
|
159
|
+
<email>email@address.co.uk</email>
|
160
|
+
<first-name>Fred</first-name>
|
161
|
+
<id type="integer">30530</id>
|
162
|
+
<last-name>Bloggs</last-name>
|
163
|
+
<locale>en</locale>
|
164
|
+
<mobile nil="true"></mobile>
|
165
|
+
<organisation-name>Organisation Name</organisation-name>
|
166
|
+
<phone-number>01234 567890</phone-number>
|
167
|
+
<postcode>NN5 7QS</postcode>
|
168
|
+
<region>Northamptonshire</region>
|
169
|
+
<sales-tax-registration-number></sales-tax-registration-number>
|
170
|
+
<town>Northampton</town>
|
171
|
+
<updated-at type="datetime">2009-09-27T19:30:49Z</updated-at>
|
172
|
+
<uploaded-at type="datetime" nil="true"></uploaded-at>
|
173
|
+
<uses-contact-invoice-sequence type="boolean">false</uses-contact-invoice-sequence>
|
174
|
+
</contact>
|
175
|
+
<contact>
|
176
|
+
<address1>Address 1</address1>
|
177
|
+
<address2>Address 2</address2>
|
178
|
+
<address3>Address 3</address3>
|
179
|
+
<charge-sales-tax type="integer">-1</charge-sales-tax>
|
180
|
+
<contact-name-on-invoices type="boolean">true</contact-name-on-invoices>
|
181
|
+
<country>United Kingdom</country>
|
182
|
+
<created-at type="datetime">2009-08-26T17:02:43Z</created-at>
|
183
|
+
<email>email@address.co.uk</email>
|
184
|
+
<first-name>Fred</first-name>
|
185
|
+
<id type="integer">27318</id>
|
186
|
+
<last-name>Bloggs</last-name>
|
187
|
+
<locale>en</locale>
|
188
|
+
<mobile nil="true"></mobile>
|
189
|
+
<organisation-name>Organisation Name</organisation-name>
|
190
|
+
<phone-number>01234 567890</phone-number>
|
191
|
+
<postcode>SN1 3LA</postcode>
|
192
|
+
<region></region>
|
193
|
+
<sales-tax-registration-number nil="true"></sales-tax-registration-number>
|
194
|
+
<town>Swindon</town>
|
195
|
+
<updated-at type="datetime">2009-08-26T17:02:43Z</updated-at>
|
196
|
+
<uploaded-at type="datetime">2009-08-26T17:02:43Z</uploaded-at>
|
197
|
+
<uses-contact-invoice-sequence type="boolean">false</uses-contact-invoice-sequence>
|
198
|
+
</contact>
|
199
|
+
<contact>
|
200
|
+
<address1>Address 1</address1>
|
201
|
+
<address2>Address 2</address2>
|
202
|
+
<address3>Address 3</address3>
|
203
|
+
<charge-sales-tax type="integer">-1</charge-sales-tax>
|
204
|
+
<contact-name-on-invoices type="boolean">true</contact-name-on-invoices>
|
205
|
+
<country>United Kingdom</country>
|
206
|
+
<created-at type="datetime">2009-08-26T17:02:43Z</created-at>
|
207
|
+
<email>email@address.co.uk</email>
|
208
|
+
<first-name>Fred</first-name>
|
209
|
+
<id type="integer">27314</id>
|
210
|
+
<last-name>Bloggs</last-name>
|
211
|
+
<locale>en</locale>
|
212
|
+
<mobile nil="true"></mobile>
|
213
|
+
<organisation-name>Organisation Name</organisation-name>
|
214
|
+
<phone-number>01234 567890</phone-number>
|
215
|
+
<postcode>SN3 4NE</postcode>
|
216
|
+
<region></region>
|
217
|
+
<sales-tax-registration-number></sales-tax-registration-number>
|
218
|
+
<town>Swindon</town>
|
219
|
+
<updated-at type="datetime">2009-09-14T19:57:42Z</updated-at>
|
220
|
+
<uploaded-at type="datetime">2009-08-26T17:02:43Z</uploaded-at>
|
221
|
+
<uses-contact-invoice-sequence type="boolean">false</uses-contact-invoice-sequence>
|
222
|
+
</contact>
|
223
|
+
<contact>
|
224
|
+
<address1>Address 1</address1>
|
225
|
+
<address2>Address 2</address2>
|
226
|
+
<address3>Address 3</address3>
|
227
|
+
<charge-sales-tax type="integer">-1</charge-sales-tax>
|
228
|
+
<contact-name-on-invoices type="boolean">true</contact-name-on-invoices>
|
229
|
+
<country>United Kingdom</country>
|
230
|
+
<created-at type="datetime">2009-08-26T17:02:43Z</created-at>
|
231
|
+
<email>email@address.co.uk</email>
|
232
|
+
<first-name>Fred</first-name>
|
233
|
+
<id type="integer">27305</id>
|
234
|
+
<last-name>Bloggs</last-name>
|
235
|
+
<locale>en</locale>
|
236
|
+
<mobile nil="true"></mobile>
|
237
|
+
<organisation-name>Organisation Name</organisation-name>
|
238
|
+
<phone-number>01234 567890</phone-number>
|
239
|
+
<postcode>OX4 2LH</postcode>
|
240
|
+
<region></region>
|
241
|
+
<sales-tax-registration-number></sales-tax-registration-number>
|
242
|
+
<town>Oxford</town>
|
243
|
+
<updated-at type="datetime">2009-10-02T13:50:56Z</updated-at>
|
244
|
+
<uploaded-at type="datetime">2009-08-26T17:02:43Z</uploaded-at>
|
245
|
+
<uses-contact-invoice-sequence type="boolean">false</uses-contact-invoice-sequence>
|
246
|
+
</contact>
|
247
|
+
<contact>
|
248
|
+
<address1>Address 1</address1>
|
249
|
+
<address2>Address 2</address2>
|
250
|
+
<address3>Address 3</address3>
|
251
|
+
<charge-sales-tax type="integer">-1</charge-sales-tax>
|
252
|
+
<contact-name-on-invoices type="boolean">true</contact-name-on-invoices>
|
253
|
+
<country>United Kingdom</country>
|
254
|
+
<created-at type="datetime">2009-08-26T17:02:43Z</created-at>
|
255
|
+
<email>email@address.co.uk</email>
|
256
|
+
<first-name>Fred</first-name>
|
257
|
+
<id type="integer">27311</id>
|
258
|
+
<last-name>Bloggs</last-name>
|
259
|
+
<locale>en</locale>
|
260
|
+
<mobile nil="true"></mobile>
|
261
|
+
<organisation-name>Organisation Name</organisation-name>
|
262
|
+
<phone-number>01234 567890</phone-number>
|
263
|
+
<postcode>SY23 3HQ</postcode>
|
264
|
+
<region></region>
|
265
|
+
<sales-tax-registration-number nil="true"></sales-tax-registration-number>
|
266
|
+
<town>Aberystwyth</town>
|
267
|
+
<updated-at type="datetime">2009-08-26T17:02:43Z</updated-at>
|
268
|
+
<uploaded-at type="datetime">2009-08-26T17:02:43Z</uploaded-at>
|
269
|
+
<uses-contact-invoice-sequence type="boolean">false</uses-contact-invoice-sequence>
|
270
|
+
</contact>
|
271
|
+
<contact>
|
272
|
+
<address1>Address 1</address1>
|
273
|
+
<address2>Address 2</address2>
|
274
|
+
<address3>Address 3</address3>
|
275
|
+
<charge-sales-tax type="integer">-1</charge-sales-tax>
|
276
|
+
<contact-name-on-invoices type="boolean">true</contact-name-on-invoices>
|
277
|
+
<country>United Kingdom</country>
|
278
|
+
<created-at type="datetime">2009-08-26T20:56:33Z</created-at>
|
279
|
+
<email>email@address.co.uk</email>
|
280
|
+
<first-name>Fred</first-name>
|
281
|
+
<id type="integer">27331</id>
|
282
|
+
<last-name>Bloggs</last-name>
|
283
|
+
<locale>en</locale>
|
284
|
+
<mobile nil="true"></mobile>
|
285
|
+
<organisation-name>Organisation Name</organisation-name>
|
286
|
+
<phone-number>01234 567890</phone-number>
|
287
|
+
<postcode nil="true"></postcode>
|
288
|
+
<region nil="true"></region>
|
289
|
+
<sales-tax-registration-number nil="true"></sales-tax-registration-number>
|
290
|
+
<town nil="true"></town>
|
291
|
+
<updated-at type="datetime">2009-08-26T20:56:33Z</updated-at>
|
292
|
+
<uploaded-at type="datetime" nil="true"></uploaded-at>
|
293
|
+
<uses-contact-invoice-sequence type="boolean">false</uses-contact-invoice-sequence>
|
294
|
+
</contact>
|
295
|
+
<contact>
|
296
|
+
<address1>Address 1</address1>
|
297
|
+
<address2>Address 2</address2>
|
298
|
+
<address3>Address 3</address3>
|
299
|
+
<charge-sales-tax type="integer">-1</charge-sales-tax>
|
300
|
+
<contact-name-on-invoices type="boolean">true</contact-name-on-invoices>
|
301
|
+
<country>United Kingdom</country>
|
302
|
+
<created-at type="datetime">2009-08-26T17:02:43Z</created-at>
|
303
|
+
<email>email@address.co.uk</email>
|
304
|
+
<first-name>Fred</first-name>
|
305
|
+
<id type="integer">27317</id>
|
306
|
+
<last-name>Bloggs</last-name>
|
307
|
+
<locale>en</locale>
|
308
|
+
<mobile nil="true"></mobile>
|
309
|
+
<organisation-name>Organisation Name</organisation-name>
|
310
|
+
<phone-number>01234 567890</phone-number>
|
311
|
+
<postcode>NN5 7QS</postcode>
|
312
|
+
<region>Northamptonshire</region>
|
313
|
+
<sales-tax-registration-number nil="true"></sales-tax-registration-number>
|
314
|
+
<town>Northampton</town>
|
315
|
+
<updated-at type="datetime">2009-08-26T17:02:43Z</updated-at>
|
316
|
+
<uploaded-at type="datetime">2009-08-26T17:02:43Z</uploaded-at>
|
317
|
+
<uses-contact-invoice-sequence type="boolean">false</uses-contact-invoice-sequence>
|
318
|
+
</contact>
|
319
|
+
<contact>
|
320
|
+
<address1>Address 1</address1>
|
321
|
+
<address2>Address 2</address2>
|
322
|
+
<address3>Address 3</address3>
|
323
|
+
<charge-sales-tax type="integer">-1</charge-sales-tax>
|
324
|
+
<contact-name-on-invoices type="boolean">true</contact-name-on-invoices>
|
325
|
+
<country>United Kingdom</country>
|
326
|
+
<created-at type="datetime">2009-08-26T17:02:43Z</created-at>
|
327
|
+
<email>email@address.co.uk</email>
|
328
|
+
<first-name>Fred</first-name>
|
329
|
+
<id type="integer">27308</id>
|
330
|
+
<last-name>Bloggs</last-name>
|
331
|
+
<locale>en</locale>
|
332
|
+
<mobile nil="true"></mobile>
|
333
|
+
<organisation-name>Organisation Name</organisation-name>
|
334
|
+
<phone-number>01234 567890</phone-number>
|
335
|
+
<postcode>EC1V 1NQ</postcode>
|
336
|
+
<region></region>
|
337
|
+
<sales-tax-registration-number nil="true"></sales-tax-registration-number>
|
338
|
+
<town>London</town>
|
339
|
+
<updated-at type="datetime">2009-08-26T17:02:43Z</updated-at>
|
340
|
+
<uploaded-at type="datetime">2009-08-26T17:02:43Z</uploaded-at>
|
341
|
+
<uses-contact-invoice-sequence type="boolean">false</uses-contact-invoice-sequence>
|
342
|
+
</contact>
|
343
|
+
<contact>
|
344
|
+
<address1>Address 1</address1>
|
345
|
+
<address2>Address 2</address2>
|
346
|
+
<address3>Address 3</address3>
|
347
|
+
<charge-sales-tax type="integer">-1</charge-sales-tax>
|
348
|
+
<contact-name-on-invoices type="boolean">true</contact-name-on-invoices>
|
349
|
+
<country>United Kingdom</country>
|
350
|
+
<created-at type="datetime">2009-10-04T14:57:59Z</created-at>
|
351
|
+
<email>email@address.co.uk</email>
|
352
|
+
<first-name>Fred</first-name>
|
353
|
+
<id type="integer">31531</id>
|
354
|
+
<last-name>Bloggs</last-name>
|
355
|
+
<locale>en</locale>
|
356
|
+
<mobile nil="true"></mobile>
|
357
|
+
<organisation-name>Organisation Name</organisation-name>
|
358
|
+
<phone-number>01234 567890</phone-number>
|
359
|
+
<postcode nil="true"></postcode>
|
360
|
+
<region nil="true"></region>
|
361
|
+
<sales-tax-registration-number nil="true"></sales-tax-registration-number>
|
362
|
+
<town nil="true"></town>
|
363
|
+
<updated-at type="datetime">2009-10-04T14:57:59Z</updated-at>
|
364
|
+
<uploaded-at type="datetime" nil="true"></uploaded-at>
|
365
|
+
<uses-contact-invoice-sequence type="boolean">false</uses-contact-invoice-sequence>
|
366
|
+
</contact>
|
367
|
+
<contact>
|
368
|
+
<address1>Address 1</address1>
|
369
|
+
<address2>Address 2</address2>
|
370
|
+
<address3>Address 3</address3>
|
371
|
+
<charge-sales-tax type="integer">-1</charge-sales-tax>
|
372
|
+
<contact-name-on-invoices type="boolean">true</contact-name-on-invoices>
|
373
|
+
<country>United Kingdom</country>
|
374
|
+
<created-at type="datetime">2009-08-31T14:56:50Z</created-at>
|
375
|
+
<email>email@address.co.uk</email>
|
376
|
+
<first-name>Fred</first-name>
|
377
|
+
<id type="integer">27748</id>
|
378
|
+
<last-name>Bloggs</last-name>
|
379
|
+
<locale>en</locale>
|
380
|
+
<mobile nil="true"></mobile>
|
381
|
+
<organisation-name>Organisation Name</organisation-name>
|
382
|
+
<phone-number>01234 567890</phone-number>
|
383
|
+
<postcode>SN7 7LZ</postcode>
|
384
|
+
<region></region>
|
385
|
+
<sales-tax-registration-number></sales-tax-registration-number>
|
386
|
+
<town>Faringdon</town>
|
387
|
+
<updated-at type="datetime">2009-10-15T12:03:04Z</updated-at>
|
388
|
+
<uploaded-at type="datetime" nil="true"></uploaded-at>
|
389
|
+
<uses-contact-invoice-sequence type="boolean">false</uses-contact-invoice-sequence>
|
390
|
+
</contact>
|
391
|
+
</contacts>
|
@@ -0,0 +1,29 @@
|
|
1
|
+
HTTP/1.1 200 OK
|
2
|
+
Status: 200
|
3
|
+
Content-Type: application/xml; charset=utf-8
|
4
|
+
|
5
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
6
|
+
<contact>
|
7
|
+
<address1>Address 1</address1>
|
8
|
+
<address2>Address 2</address2>
|
9
|
+
<address3>Address 3</address3>
|
10
|
+
<charge-sales-tax type="integer">-1</charge-sales-tax>
|
11
|
+
<contact-name-on-invoices type="boolean">true</contact-name-on-invoices>
|
12
|
+
<country>United Kingdom</country>
|
13
|
+
<created-at type="datetime">2009-08-26T17:02:43Z</created-at>
|
14
|
+
<email>email@address.co.uk</email>
|
15
|
+
<first-name>Fred</first-name>
|
16
|
+
<id type="integer">27309</id>
|
17
|
+
<last-name>Bloggs</last-name>
|
18
|
+
<locale>en</locale>
|
19
|
+
<mobile nil="true"></mobile>
|
20
|
+
<organisation-name>Organisation Name</organisation-name>
|
21
|
+
<phone-number>01234 567890</phone-number>
|
22
|
+
<postcode>BS1 2AW</postcode>
|
23
|
+
<region></region>
|
24
|
+
<sales-tax-registration-number nil="true"></sales-tax-registration-number>
|
25
|
+
<town>Bristol</town>
|
26
|
+
<updated-at type="datetime">2009-08-26T17:02:43Z</updated-at>
|
27
|
+
<uploaded-at type="datetime">2009-08-26T17:02:43Z</uploaded-at>
|
28
|
+
<uses-contact-invoice-sequence type="boolean">false</uses-contact-invoice-sequence>
|
29
|
+
</contact>
|
data/test/stubs/http/200
ADDED
data/test/stubs/http/201
ADDED
@@ -0,0 +1,40 @@
|
|
1
|
+
HTTP/1.1 200 OK
|
2
|
+
Status: 200
|
3
|
+
Content-Type: application/xml; charset=utf-8
|
4
|
+
|
5
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
6
|
+
<invoice-items type="array">
|
7
|
+
<invoice-item>
|
8
|
+
<description>Email build, testing and delivery.</description>
|
9
|
+
<id type="integer">168981</id>
|
10
|
+
<invoice-id type="integer">73867</invoice-id>
|
11
|
+
<item-type>Hours</item-type>
|
12
|
+
<price type="decimal">35.0</price>
|
13
|
+
<project-id type="integer" nil="true"></project-id>
|
14
|
+
<quantity type="decimal">6.0</quantity>
|
15
|
+
<sales-tax-rate type="decimal">15.0</sales-tax-rate>
|
16
|
+
<second-sales-tax-rate type="decimal">0.0</second-sales-tax-rate>
|
17
|
+
</invoice-item>
|
18
|
+
<invoice-item>
|
19
|
+
<description>1/2 day training session.</description>
|
20
|
+
<id type="integer">169399</id>
|
21
|
+
<invoice-id type="integer">73867</invoice-id>
|
22
|
+
<item-type>Training</item-type>
|
23
|
+
<price type="decimal">350.0</price>
|
24
|
+
<project-id type="integer" nil="true"></project-id>
|
25
|
+
<quantity type="decimal">1.0</quantity>
|
26
|
+
<sales-tax-rate type="decimal">15.0</sales-tax-rate>
|
27
|
+
<second-sales-tax-rate type="decimal">0.0</second-sales-tax-rate>
|
28
|
+
</invoice-item>
|
29
|
+
<invoice-item>
|
30
|
+
<description>Travel costs</description>
|
31
|
+
<id type="integer">169403</id>
|
32
|
+
<invoice-id type="integer">73867</invoice-id>
|
33
|
+
<item-type>Expenses</item-type>
|
34
|
+
<price type="decimal">110.0</price>
|
35
|
+
<project-id type="integer" nil="true"></project-id>
|
36
|
+
<quantity type="decimal">1.0</quantity>
|
37
|
+
<sales-tax-rate type="decimal">15.0</sales-tax-rate>
|
38
|
+
<second-sales-tax-rate type="decimal">0.0</second-sales-tax-rate>
|
39
|
+
</invoice-item>
|
40
|
+
</invoice-items>
|
@@ -0,0 +1,15 @@
|
|
1
|
+
HTTP/1.1 200 OK
|
2
|
+
Status: 200
|
3
|
+
Content-Type: application/xml; charset=utf-8
|
4
|
+
|
5
|
+
<invoice-item>
|
6
|
+
<description>1/2 day training session.</description>
|
7
|
+
<id type="integer">169399</id>
|
8
|
+
<invoice-id type="integer">73867</invoice-id>
|
9
|
+
<item-type>Training</item-type>
|
10
|
+
<price type="decimal">350.0</price>
|
11
|
+
<project-id type="integer" nil="true"></project-id>
|
12
|
+
<quantity type="decimal">1.0</quantity>
|
13
|
+
<sales-tax-rate type="decimal">15.0</sales-tax-rate>
|
14
|
+
<second-sales-tax-rate type="decimal">0.0</second-sales-tax-rate>
|
15
|
+
</invoice-item>
|