quaderno 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (55) hide show
  1. data/.document +5 -0
  2. data/Gemfile +23 -0
  3. data/Gemfile.lock +53 -0
  4. data/LICENSE.txt +20 -0
  5. data/README.md +264 -0
  6. data/Rakefile +53 -0
  7. data/VERSION +1 -0
  8. data/build_install.sh +2 -0
  9. data/lib/quaderno-ruby/base.rb +71 -0
  10. data/lib/quaderno-ruby/behavior/crud.rb +83 -0
  11. data/lib/quaderno-ruby/behavior/deliver.rb +18 -0
  12. data/lib/quaderno-ruby/behavior/payment.rb +38 -0
  13. data/lib/quaderno-ruby/contact.rb +8 -0
  14. data/lib/quaderno-ruby/estimate.rb +8 -0
  15. data/lib/quaderno-ruby/exceptions/exceptions.rb +42 -0
  16. data/lib/quaderno-ruby/expense.rb +8 -0
  17. data/lib/quaderno-ruby/invoice.rb +9 -0
  18. data/lib/quaderno-ruby/item.rb +4 -0
  19. data/lib/quaderno-ruby/payment.rb +6 -0
  20. data/lib/quaderno-ruby.rb +11 -0
  21. data/quaderno-ruby.gemspec +114 -0
  22. data/test/fixtures/quaderno_cassettes/all_contacts.yml +46 -0
  23. data/test/fixtures/quaderno_cassettes/all_estimates.yml +44 -0
  24. data/test/fixtures/quaderno_cassettes/all_expenses.yml +44 -0
  25. data/test/fixtures/quaderno_cassettes/all_invoices.yml +44 -0
  26. data/test/fixtures/quaderno_cassettes/deleted_contact.yml +127 -0
  27. data/test/fixtures/quaderno_cassettes/deleted_estimate.yml +123 -0
  28. data/test/fixtures/quaderno_cassettes/deleted_expense.yml +123 -0
  29. data/test/fixtures/quaderno_cassettes/deleted_invoice.yml +124 -0
  30. data/test/fixtures/quaderno_cassettes/delivered_estimate.yml +127 -0
  31. data/test/fixtures/quaderno_cassettes/delivered_invoice.yml +127 -0
  32. data/test/fixtures/quaderno_cassettes/found_contact.yml +87 -0
  33. data/test/fixtures/quaderno_cassettes/found_estimate.yml +85 -0
  34. data/test/fixtures/quaderno_cassettes/found_expense.yml +85 -0
  35. data/test/fixtures/quaderno_cassettes/found_invoice.yml +85 -0
  36. data/test/fixtures/quaderno_cassettes/new_contact.yml +44 -0
  37. data/test/fixtures/quaderno_cassettes/new_estimate.yml +87 -0
  38. data/test/fixtures/quaderno_cassettes/new_expense.yml +128 -0
  39. data/test/fixtures/quaderno_cassettes/new_invoice.yml +87 -0
  40. data/test/fixtures/quaderno_cassettes/paid_expense.yml +85 -0
  41. data/test/fixtures/quaderno_cassettes/paid_invoice.yml +86 -0
  42. data/test/fixtures/quaderno_cassettes/rate_limit.yml +44 -0
  43. data/test/fixtures/quaderno_cassettes/unpay_an_expense.yml +123 -0
  44. data/test/fixtures/quaderno_cassettes/unpay_an_invoice.yml +123 -0
  45. data/test/fixtures/quaderno_cassettes/updated_contact.yml +87 -0
  46. data/test/fixtures/quaderno_cassettes/updated_estimate.yml +86 -0
  47. data/test/fixtures/quaderno_cassettes/updated_expense.yml +85 -0
  48. data/test/fixtures/quaderno_cassettes/updated_invoice.yml +86 -0
  49. data/test/helper.rb +27 -0
  50. data/test/test_quaderno-ruby.rb +4 -0
  51. data/test/unit/test_quaderno_contacts.rb +86 -0
  52. data/test/unit/test_quaderno_estimates.rb +99 -0
  53. data/test/unit/test_quaderno_expenses.rb +110 -0
  54. data/test/unit/test_quaderno_invoices.rb +121 -0
  55. metadata +232 -0
@@ -0,0 +1,127 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: get
5
+ uri: http://xiZvifX5hwsxAiymYPk2@localhost:3000/recrea/api/v1/invoices.json
6
+ body:
7
+ encoding: US-ASCII
8
+ string: ''
9
+ headers:
10
+ authorization:
11
+ - Basic eGladmlmWDVod3N4QWl5bVlQazI6
12
+ response:
13
+ status:
14
+ code: 200
15
+ message: OK
16
+ headers:
17
+ x-ratelimit-limit:
18
+ - '1000'
19
+ x-ratelimit-remaining:
20
+ - '976'
21
+ content-type:
22
+ - application/json; charset=utf-8
23
+ x-ua-compatible:
24
+ - IE=Edge
25
+ etag:
26
+ - ! '"eda1b5b5344758448849b28a596dc8cc"'
27
+ cache-control:
28
+ - max-age=0, private, must-revalidate
29
+ x-request-id:
30
+ - 755f24e6c60292e191dcf477f5be7080
31
+ x-runtime:
32
+ - '0.144886'
33
+ content-length:
34
+ - '674'
35
+ connection:
36
+ - close
37
+ server:
38
+ - thin 1.5.0 codename Knife
39
+ body:
40
+ encoding: US-ASCII
41
+ string: ! '[{"id":"50ae0c1b2f412eeb20000003","number":"0000009","issue_date":"2012-11-22","contact":{"id":"50a23cb22f412eae4f000003","full_name":"100-499"},"po_number":null,"due_date":null,"currency":"EUR","items":[{"description":"Aircraft","quantity":"1.0","unit_price":"0.0","discount_rate":"0.0","tax_1_name":null,"tax_1_rate":null,"tax_2_name":null,"tax_2_rate":null,"subtotal":"\u20ac0.00","discount":"\u20ac0.00","gross_amount":"\u20ac0.00"}],"subtotal":"\u20ac0.00","discount":"\u20ac0.00","taxes":[],"total":"\u20ac0.00","payments":[],"tags":[],"payment_details":"","notes":"","state":"draft","url":"http://localhost:3000/recrea/api/v1/invoices/50ae0c1b2f412eeb20000003.json"}]'
42
+ http_version: '1.1'
43
+ recorded_at: Thu, 22 Nov 2012 11:27:24 GMT
44
+ - request:
45
+ method: get
46
+ uri: http://xiZvifX5hwsxAiymYPk2@localhost:3000/recrea/api/v1/ping.json
47
+ body:
48
+ encoding: US-ASCII
49
+ string: ''
50
+ headers:
51
+ authorization:
52
+ - Basic eGladmlmWDVod3N4QWl5bVlQazI6
53
+ response:
54
+ status:
55
+ code: 200
56
+ message: OK
57
+ headers:
58
+ x-ratelimit-limit:
59
+ - '1000'
60
+ x-ratelimit-remaining:
61
+ - '976'
62
+ content-type:
63
+ - application/json; charset=utf-8
64
+ x-ua-compatible:
65
+ - IE=Edge
66
+ etag:
67
+ - ! '"0c776997933eb60833b37beaf43814c8"'
68
+ cache-control:
69
+ - max-age=0, private, must-revalidate
70
+ x-request-id:
71
+ - c7557aa67d9d4238c860295fe690e508
72
+ x-runtime:
73
+ - '0.034133'
74
+ content-length:
75
+ - '15'
76
+ connection:
77
+ - close
78
+ server:
79
+ - thin 1.5.0 codename Knife
80
+ body:
81
+ encoding: US-ASCII
82
+ string: ! '{"status":"OK"}'
83
+ http_version: '1.1'
84
+ recorded_at: Thu, 22 Nov 2012 11:27:24 GMT
85
+ - request:
86
+ method: get
87
+ uri: http://xiZvifX5hwsxAiymYPk2@localhost:3000/recrea/api/v1/invoices/50ae0c1b2f412eeb20000003/deliver.json
88
+ body:
89
+ encoding: US-ASCII
90
+ string: ''
91
+ headers:
92
+ authorization:
93
+ - Basic eGladmlmWDVod3N4QWl5bVlQazI6
94
+ response:
95
+ status:
96
+ code: 200
97
+ message: OK
98
+ headers:
99
+ x-ratelimit-limit:
100
+ - '1000'
101
+ x-ratelimit-remaining:
102
+ - '975'
103
+ content-type:
104
+ - application/json; charset=utf-8
105
+ x-ua-compatible:
106
+ - IE=Edge
107
+ etag:
108
+ - ! '"675237b0d7338b822c4b351e74274273"'
109
+ cache-control:
110
+ - max-age=0, private, must-revalidate
111
+ x-request-id:
112
+ - ba6752321e30e01934cc32112008e3a5
113
+ x-runtime:
114
+ - '0.053727'
115
+ content-length:
116
+ - '1534'
117
+ connection:
118
+ - close
119
+ server:
120
+ - thin 1.5.0 codename Knife
121
+ body:
122
+ encoding: US-ASCII
123
+ string: ! '{"_id":"50ae0c1b2f412eeb20000003","account_id":"50a0ce4a2f412e5fad000001","activities":[{"_id":"50ae0c1b2f412eeb20000005","author":"John
124
+ Wu","created_at":null,"date":"2012-11-22T11:27:23+00:00","kind":"created","updated_at":null}],"contact_id":"50a23cb22f412eae4f000003","contact_name":"100-499","created_at":"2012-11-22T11:27:23Z","currency":"EUR","due_date":null,"due_days":null,"exchange":null,"exchange_rate":null,"gross_amount":{"cents":0,"currency":{"id":"eur","priority":2,"iso_code":"EUR","name":"Euro","symbol":"\u20ac","subunit":"Cent","subunit_to_unit":100,"symbol_first":true,"html_entity":"€","decimal_mark":",","thousands_separator":".","iso_numeric":"978"},"bank":{"rounding_method":null,"rates":{"EUR_TO_USD":"1.2845"},"mutex":{}}},"issue_date":"2012-11-22","items":[{"_id":"50ae0c1b2f412eeb20000004","description":"Aircraft","discount_rate":"0.0","quantity":"1.0","tax_1_name":null,"tax_1_rate":null,"tax_2_name":null,"tax_2_rate":null,"unit_price":"0.0"}],"notes":"","number":"0000009","payment_details":"","permalink":"24340dae991bbdfead204ed15933866ab18bf398","po_number":null,"state":"draft","subject":null,"subscription_id":null,"tags":[],"total":{"cents":0,"currency":{"id":"eur","priority":2,"iso_code":"EUR","name":"Euro","symbol":"\u20ac","subunit":"Cent","subunit_to_unit":100,"symbol_first":true,"html_entity":"€","decimal_mark":",","thousands_separator":".","iso_numeric":"978"},"bank":{"rounding_method":null,"rates":{"EUR_TO_USD":"1.2845"},"mutex":{}}},"updated_at":"2012-11-22T11:27:23Z"}'
125
+ http_version: '1.1'
126
+ recorded_at: Thu, 22 Nov 2012 11:27:24 GMT
127
+ recorded_with: VCR 2.3.0
@@ -0,0 +1,87 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: get
5
+ uri: http://xiZvifX5hwsxAiymYPk2@localhost:3000/recrea/api/v1/contacts.json
6
+ body:
7
+ encoding: US-ASCII
8
+ string: ''
9
+ headers:
10
+ authorization:
11
+ - Basic eGladmlmWDVod3N4QWl5bVlQazI6
12
+ response:
13
+ status:
14
+ code: 200
15
+ message: OK
16
+ headers:
17
+ x-ratelimit-limit:
18
+ - '1000'
19
+ x-ratelimit-remaining:
20
+ - '449'
21
+ content-type:
22
+ - application/json; charset=utf-8
23
+ x-ua-compatible:
24
+ - IE=Edge
25
+ etag:
26
+ - ! '"bb13a5d46652a7b601753ed913a01a27"'
27
+ cache-control:
28
+ - max-age=0, private, must-revalidate
29
+ x-request-id:
30
+ - 8a39c182ca0fbe04f45678b4274dee57
31
+ x-runtime:
32
+ - '0.221973'
33
+ content-length:
34
+ - '4505'
35
+ connection:
36
+ - close
37
+ server:
38
+ - thin 1.5.0 codename Knife
39
+ body:
40
+ encoding: US-ASCII
41
+ string: ! '[{"id":"50a23cb22f412eae4f000003","kind":"company","full_name":"100-499","contact_name":"","street_line_1":"Evergreen
42
+ Terrace","street_line_2":"","postal_code":"K0A 1B0","city":"Springfield","region":"Canada","country":"CA","phone_1":"3447277","phone_2":"3447277","fax":"","email":"vidadelaempresa@gmail.com","web":"","discount":null,"tax_id":"","language":"EN","notes":"","url":"http://localhost:3000/recrea/api/v1/contacts/50a23cb22f412eae4f000003"},{"id":"50a0d1eb2f412e58a700000b","kind":"company","full_name":"ACME","contact_name":null,"street_line_1":null,"street_line_2":null,"postal_code":null,"city":null,"region":null,"country":"US","phone_1":null,"phone_2":null,"fax":null,"email":null,"web":null,"discount":null,"tax_id":null,"language":"EN","notes":null,"url":"http://localhost:3000/recrea/api/v1/contacts/50a0d1eb2f412e58a700000b"},{"id":"50acb2b72f412eda52000041","kind":"company","full_name":"Tei","contact_name":null,"street_line_1":null,"street_line_2":null,"postal_code":null,"city":null,"region":null,"country":"US","phone_1":null,"phone_2":null,"fax":null,"email":null,"web":null,"discount":null,"tax_id":null,"language":"EN","notes":null,"url":"http://localhost:3000/recrea/api/v1/contacts/50acb2b72f412eda52000041"},{"id":"50a21c9e2f412e1a68000026","kind":"company","full_name":"Test_OCP","contact_name":"","street_line_1":"","street_line_2":"","postal_code":"","city":"","region":"","country":"US","phone_1":"","phone_2":"","fax":"","email":"dont@stop.believing","web":"","discount":null,"tax_id":"","language":"EN","notes":"","url":"http://localhost:3000/recrea/api/v1/contacts/50a21c9e2f412e1a68000026"},{"id":"50a0f5612f412ef720000019","kind":"company","full_name":"Test_OCP","contact_name":null,"street_line_1":"Evergreen
43
+ Terrace","street_line_2":"","postal_code":"K0A 1B0","city":"Springfield","region":"Canada","country":"CA","phone_1":"3447277","phone_2":null,"fax":null,"email":"dont@stop.believing","web":"","discount":null,"tax_id":"","language":"ES","notes":null,"url":"http://localhost:3000/recrea/api/v1/contacts/50a0f5612f412ef720000019"},{"id":"50aa3de82f412ec2ab000014","kind":"person","first_name":"Test_OCP","last_name":"","full_name":"Test_OCP","street_line_1":"","street_line_2":"","postal_code":"","city":"","region":"","country":"US","phone_1":"","phone_2":"","fax":"","email":"dont@stop.believing","web":"","discount":null,"tax_id":"","language":"EN","notes":"","url":"http://localhost:3000/recrea/api/v1/contacts/50aa3de82f412ec2ab000014"},{"id":"50aa3e162f412ec2ab000019","kind":"company","full_name":"Test_OCP","contact_name":"","street_line_1":"","street_line_2":"","postal_code":"","city":"","region":"","country":"US","phone_1":"","phone_2":"","fax":"","email":"dont@stop.believing","web":"","discount":null,"tax_id":"","language":"EN","notes":"","url":"http://localhost:3000/recrea/api/v1/contacts/50aa3e162f412ec2ab000019"},{"id":"50a21bf72f412e1a68000017","kind":"company","full_name":"Test_OCP","contact_name":null,"street_line_1":null,"street_line_2":null,"postal_code":null,"city":null,"region":null,"country":"US","phone_1":null,"phone_2":null,"fax":null,"email":"dont@stop.believing","web":null,"discount":null,"tax_id":null,"language":"EN","notes":null,"url":"http://localhost:3000/recrea/api/v1/contacts/50a21bf72f412e1a68000017"},{"id":"50a0d2e82f412e15bf000004","kind":"company","full_name":"Test_OCP","contact_name":null,"street_line_1":null,"street_line_2":null,"postal_code":null,"city":null,"region":null,"country":"US","phone_1":null,"phone_2":null,"fax":null,"email":"dont@stop.believing","web":null,"discount":null,"tax_id":null,"language":"EN","notes":null,"url":"http://localhost:3000/recrea/api/v1/contacts/50a0d2e82f412e15bf000004"},{"id":"50acc9842f412eda52000068","kind":"company","full_name":"Test_Skynet","contact_name":null,"street_line_1":null,"street_line_2":null,"postal_code":null,"city":null,"region":null,"country":"US","phone_1":null,"phone_2":null,"fax":null,"email":"my_little@po.ny","web":null,"discount":null,"tax_id":null,"language":"EN","notes":null,"url":"http://localhost:3000/recrea/api/v1/contacts/50acc9842f412eda52000068"},{"id":"50acb16e2f412eda5200003e","kind":"person","first_name":"Zed","last_name":"","full_name":"Zed","street_line_1":"","street_line_2":"","postal_code":"","city":"","region":"","country":"US","phone_1":"","phone_2":"","fax":"","email":"","web":"","discount":null,"tax_id":"","language":"EN","notes":"","url":"http://localhost:3000/recrea/api/v1/contacts/50acb16e2f412eda5200003e"}]'
44
+ http_version: '1.1'
45
+ recorded_at: Thu, 22 Nov 2012 09:37:38 GMT
46
+ - request:
47
+ method: get
48
+ uri: http://xiZvifX5hwsxAiymYPk2@localhost:3000/recrea/api/v1/contacts/50acb2b72f412eda52000041.json
49
+ body:
50
+ encoding: US-ASCII
51
+ string: ''
52
+ headers:
53
+ authorization:
54
+ - Basic eGladmlmWDVod3N4QWl5bVlQazI6
55
+ response:
56
+ status:
57
+ code: 200
58
+ message: OK
59
+ headers:
60
+ x-ratelimit-limit:
61
+ - '1000'
62
+ x-ratelimit-remaining:
63
+ - '448'
64
+ content-type:
65
+ - application/json; charset=utf-8
66
+ x-ua-compatible:
67
+ - IE=Edge
68
+ etag:
69
+ - ! '"216aef270ae83efd190a26969dc190c2"'
70
+ cache-control:
71
+ - max-age=0, private, must-revalidate
72
+ x-request-id:
73
+ - b282a353ce102787200cd09d623c4ec9
74
+ x-runtime:
75
+ - '0.040762'
76
+ content-length:
77
+ - '392'
78
+ connection:
79
+ - close
80
+ server:
81
+ - thin 1.5.0 codename Knife
82
+ body:
83
+ encoding: US-ASCII
84
+ string: ! '{"id":"50acb2b72f412eda52000041","kind":"company","full_name":"Tei","contact_name":null,"street_line_1":null,"street_line_2":null,"postal_code":null,"city":null,"region":null,"country":"US","phone_1":null,"phone_2":null,"fax":null,"email":null,"web":null,"discount":null,"tax_id":null,"language":"EN","notes":null,"url":"http://localhost:3000/recrea/api/v1/contacts/50acb2b72f412eda52000041"}'
85
+ http_version: '1.1'
86
+ recorded_at: Thu, 22 Nov 2012 09:37:38 GMT
87
+ recorded_with: VCR 2.3.0
@@ -0,0 +1,85 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: get
5
+ uri: http://xiZvifX5hwsxAiymYPk2@localhost:3000/recrea/api/v1/estimates.json
6
+ body:
7
+ encoding: US-ASCII
8
+ string: ''
9
+ headers:
10
+ authorization:
11
+ - Basic eGladmlmWDVod3N4QWl5bVlQazI6
12
+ response:
13
+ status:
14
+ code: 200
15
+ message: OK
16
+ headers:
17
+ x-ratelimit-limit:
18
+ - '1000'
19
+ x-ratelimit-remaining:
20
+ - '458'
21
+ content-type:
22
+ - application/json; charset=utf-8
23
+ x-ua-compatible:
24
+ - IE=Edge
25
+ etag:
26
+ - ! '"85a3b35f41c9e4773921349d0adad8d0"'
27
+ cache-control:
28
+ - max-age=0, private, must-revalidate
29
+ x-request-id:
30
+ - 999b7df96f192475bc3b9dfb80d1332d
31
+ x-runtime:
32
+ - '0.051110'
33
+ content-length:
34
+ - '1289'
35
+ connection:
36
+ - close
37
+ server:
38
+ - thin 1.5.0 codename Knife
39
+ body:
40
+ encoding: US-ASCII
41
+ string: ! '[{"id":"50adf1ca2f412ec281000020","number":"0000005","issue_date":"2012-11-22","contact":{"id":"50a23cb22f412eae4f000003","full_name":"100-499"},"po_number":null,"currency":"EUR","items":[{"description":"Aircraft","quantity":"1.0","unit_price":"0.0","discount_rate":"0.0","tax_1_name":null,"tax_1_rate":null,"tax_2_name":null,"tax_2_rate":null,"subtotal":"\u20ac0.00","discount":"\u20ac0.00","gross_amount":"\u20ac0.00"}],"subtotal":"\u20ac0.00","discount":"\u20ac0.00","taxes":[],"total":"\u20ac0.00","tags":[],"payment_details":"","notes":"","state":"draft","url":"http://localhost:3000/recrea/api/v1/estimates/50adf1ca2f412ec281000020.json"},{"id":"50adf2572f412ec281000023","number":"0000006","issue_date":"2012-11-22","contact":{"id":"50a23cb22f412eae4f000003","full_name":"100-499"},"po_number":null,"currency":"EUR","items":[{"description":"Aircraft","quantity":"1.0","unit_price":"0.0","discount_rate":"0.0","tax_1_name":null,"tax_1_rate":null,"tax_2_name":null,"tax_2_rate":null,"subtotal":"\u20ac0.00","discount":"\u20ac0.00","gross_amount":"\u20ac0.00"}],"subtotal":"\u20ac0.00","discount":"\u20ac0.00","taxes":[],"total":"\u20ac0.00","tags":[],"payment_details":"","notes":"","state":"draft","url":"http://localhost:3000/recrea/api/v1/estimates/50adf2572f412ec281000023.json"}]'
42
+ http_version: '1.1'
43
+ recorded_at: Thu, 22 Nov 2012 09:37:28 GMT
44
+ - request:
45
+ method: get
46
+ uri: http://xiZvifX5hwsxAiymYPk2@localhost:3000/recrea/api/v1/estimates/50adf1ca2f412ec281000020.json
47
+ body:
48
+ encoding: US-ASCII
49
+ string: ''
50
+ headers:
51
+ authorization:
52
+ - Basic eGladmlmWDVod3N4QWl5bVlQazI6
53
+ response:
54
+ status:
55
+ code: 200
56
+ message: OK
57
+ headers:
58
+ x-ratelimit-limit:
59
+ - '1000'
60
+ x-ratelimit-remaining:
61
+ - '457'
62
+ content-type:
63
+ - application/json; charset=utf-8
64
+ x-ua-compatible:
65
+ - IE=Edge
66
+ etag:
67
+ - ! '"01b9f48278635c082042d8b0cb7515ab"'
68
+ cache-control:
69
+ - max-age=0, private, must-revalidate
70
+ x-request-id:
71
+ - e2cd0b0673f733cf5214201a2d13cb7c
72
+ x-runtime:
73
+ - '0.067278'
74
+ content-length:
75
+ - '643'
76
+ connection:
77
+ - close
78
+ server:
79
+ - thin 1.5.0 codename Knife
80
+ body:
81
+ encoding: US-ASCII
82
+ string: ! '{"id":"50adf1ca2f412ec281000020","number":"0000005","issue_date":"2012-11-22","contact":{"id":"50a23cb22f412eae4f000003","full_name":"100-499"},"po_number":null,"currency":"EUR","items":[{"description":"Aircraft","quantity":"1.0","unit_price":"0.0","discount_rate":"0.0","tax_1_name":null,"tax_1_rate":null,"tax_2_name":null,"tax_2_rate":null,"subtotal":"\u20ac0.00","discount":"\u20ac0.00","gross_amount":"\u20ac0.00"}],"subtotal":"\u20ac0.00","discount":"\u20ac0.00","taxes":[],"total":"\u20ac0.00","tags":[],"payment_details":"","notes":"","state":"draft","url":"http://localhost:3000/recrea/api/v1/estimates/50adf1ca2f412ec281000020.json"}'
83
+ http_version: '1.1'
84
+ recorded_at: Thu, 22 Nov 2012 09:37:28 GMT
85
+ recorded_with: VCR 2.3.0
@@ -0,0 +1,85 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: get
5
+ uri: http://xiZvifX5hwsxAiymYPk2@localhost:3000/recrea/api/v1/expenses.json
6
+ body:
7
+ encoding: US-ASCII
8
+ string: ''
9
+ headers:
10
+ authorization:
11
+ - Basic eGladmlmWDVod3N4QWl5bVlQazI6
12
+ response:
13
+ status:
14
+ code: 200
15
+ message: OK
16
+ headers:
17
+ x-ratelimit-limit:
18
+ - '1000'
19
+ x-ratelimit-remaining:
20
+ - '991'
21
+ content-type:
22
+ - application/json; charset=utf-8
23
+ x-ua-compatible:
24
+ - IE=Edge
25
+ etag:
26
+ - ! '"411652f1251603eb146e8531a1385a3f"'
27
+ cache-control:
28
+ - max-age=0, private, must-revalidate
29
+ x-request-id:
30
+ - 7eb27ba02eed2408ae8f61cb710e3875
31
+ x-runtime:
32
+ - '0.173665'
33
+ content-length:
34
+ - '7282'
35
+ connection:
36
+ - close
37
+ server:
38
+ - thin 1.5.0 codename Knife
39
+ body:
40
+ encoding: US-ASCII
41
+ string: ! '[{"id":"50adf88a2f412ec28100005a","number":"0003","issue_date":"2012-11-22","contact":{"id":"50a23cb22f412eae4f000003","full_name":"100-499"},"po_number":"","currency":"EUR","items":[{"description":"fyfjhj","quantity":"1.0","unit_price":"0.0","discount_rate":"0.0","tax_1_name":"","tax_1_rate":"","tax_2_name":"","tax_2_rate":"","subtotal":"\u20ac0.00","discount":"\u20ac0.00","gross_amount":"\u20ac0.00"}],"subtotal":"\u20ac0.00","discount":"\u20ac0.00","taxes":[],"total":"\u20ac0.00","payments":[{"id":"50adfb422f412ec281000062","date":"2012-11-22","payment_method":"cash","amount":"\u20ac100,000,000.00","url":"http://localhost:3000/recrea/api/v1/expenses/50adf88a2f412ec28100005a/payments/50adfb422f412ec281000062.json"},{"id":"50adfc9c2f412ec28100006a","date":"2012-11-22","payment_method":"cash","amount":"\u20ac100,000,000.00","url":"http://localhost:3000/recrea/api/v1/expenses/50adf88a2f412ec28100005a/payments/50adfc9c2f412ec28100006a.json"},{"id":"50adfd232f412ec281000072","date":"2012-11-22","payment_method":"cash","amount":"\u20ac100,000,000.00","url":"http://localhost:3000/recrea/api/v1/expenses/50adf88a2f412ec28100005a/payments/50adfd232f412ec281000072.json"},{"id":"50adfe012f412ec28100007a","date":"2012-11-22","payment_method":"cash","amount":"\u20ac100,000,000.00","url":"http://localhost:3000/recrea/api/v1/expenses/50adf88a2f412ec28100005a/payments/50adfe012f412ec28100007a.json"},{"id":"50adfe382f412ec281000082","date":"2012-11-22","payment_method":"cash","amount":"\u20ac100,000,000.00","url":"http://localhost:3000/recrea/api/v1/expenses/50adf88a2f412ec28100005a/payments/50adfe382f412ec281000082.json"},{"id":"50adfec72f412ec28100008a","date":"2012-11-22","payment_method":"cash","amount":"\u20ac100,000,000.00","url":"http://localhost:3000/recrea/api/v1/expenses/50adf88a2f412ec28100005a/payments/50adfec72f412ec28100008a.json"},{"id":"50ae001e2f412ec281000093","date":"2012-11-22","payment_method":"cash","amount":"\u20ac100,000,000.00","url":"http://localhost:3000/recrea/api/v1/expenses/50adf88a2f412ec28100005a/payments/50ae001e2f412ec281000093.json"},{"id":"50ae01172f412ec28100009c","date":"2012-11-22","payment_method":"cash","amount":"\u20ac100,000,000.00","url":"http://localhost:3000/recrea/api/v1/expenses/50adf88a2f412ec28100005a/payments/50ae01172f412ec28100009c.json"},{"id":"50ae07652f412ec2810000d8","date":"2012-11-22","payment_method":"cash","amount":"\u20ac100,000,000.00","url":"http://localhost:3000/recrea/api/v1/expenses/50adf88a2f412ec28100005a/payments/50ae07652f412ec2810000d8.json"},{"id":"50ae07bf2f412ec2810000e0","date":"2012-11-22","payment_method":"cash","amount":"\u20ac100,000,000.00","url":"http://localhost:3000/recrea/api/v1/expenses/50adf88a2f412ec28100005a/payments/50ae07bf2f412ec2810000e0.json"},{"id":"50ae07f42f412ec2810000e8","date":"2012-11-22","payment_method":"cash","amount":"\u20ac100,000,000.00","url":"http://localhost:3000/recrea/api/v1/expenses/50adf88a2f412ec28100005a/payments/50ae07f42f412ec2810000e8.json"},{"id":"50ae086e2f412ec2810000f0","date":"2012-11-22","payment_method":"cash","amount":"\u20ac100,000,000.00","url":"http://localhost:3000/recrea/api/v1/expenses/50adf88a2f412ec28100005a/payments/50ae086e2f412ec2810000f0.json"},{"id":"50ae08e42f412ec2810000f8","date":"2012-11-22","payment_method":"cash","amount":"\u20ac100,000,000.00","url":"http://localhost:3000/recrea/api/v1/expenses/50adf88a2f412ec28100005a/payments/50ae08e42f412ec2810000f8.json"},{"id":"50ae092e2f412ec281000100","date":"2012-11-22","payment_method":"cash","amount":"\u20ac100,000,000.00","url":"http://localhost:3000/recrea/api/v1/expenses/50adf88a2f412ec28100005a/payments/50ae092e2f412ec281000100.json"},{"id":"50ae0b382f412ec281000107","date":"2012-11-22","payment_method":"cash","amount":"\u20ac100,000,000.00","url":"http://localhost:3000/recrea/api/v1/expenses/50adf88a2f412ec28100005a/payments/50ae0b382f412ec281000107.json"}],"tags":[],"notes":"","state":"paid","url":"http://localhost:3000/recrea/api/v1/expenses/50adf88a2f412ec28100005a.json"},{"id":"50adf26b2f412ec28100002a","number":"2","issue_date":"2012-11-22","contact":{"id":"50a23cb22f412eae4f000003","full_name":"100-499"},"po_number":null,"currency":"EUR","items":[{"description":"Aircraft","quantity":"1.0","unit_price":"0.0","discount_rate":"0.0","tax_1_name":null,"tax_1_rate":null,"tax_2_name":null,"tax_2_rate":null,"subtotal":"\u20ac0.00","discount":"\u20ac0.00","gross_amount":"\u20ac0.00"}],"subtotal":"\u20ac0.00","discount":"\u20ac0.00","taxes":[],"total":"\u20ac0.00","payments":[{"id":"50adf3562f412ec281000030","date":"2012-11-22","payment_method":"cash","amount":"\u20ac100,000,000.00","url":"http://localhost:3000/recrea/api/v1/expenses/50adf26b2f412ec28100002a/payments/50adf3562f412ec281000030.json"},{"id":"50adf3582f412ec281000035","date":"2012-11-22","payment_method":"cash","amount":"\u20ac100,000,000.00","url":"http://localhost:3000/recrea/api/v1/expenses/50adf26b2f412ec28100002a/payments/50adf3582f412ec281000035.json"},{"id":"50adf3902f412ec281000037","date":"2012-11-22","payment_method":"cash","amount":"\u20ac100,000,000.00","url":"http://localhost:3000/recrea/api/v1/expenses/50adf26b2f412ec28100002a/payments/50adf3902f412ec281000037.json"},{"id":"50adf4372f412ec28100003e","date":"2012-11-22","payment_method":"cash","amount":"\u20ac100,000,000.00","url":"http://localhost:3000/recrea/api/v1/expenses/50adf26b2f412ec28100002a/payments/50adf4372f412ec28100003e.json"},{"id":"50adf49a2f412ec281000045","date":"2012-11-22","payment_method":"cash","amount":"\u20ac100,000,000.00","url":"http://localhost:3000/recrea/api/v1/expenses/50adf26b2f412ec28100002a/payments/50adf49a2f412ec281000045.json"},{"id":"50adf6d62f412ec28100004c","date":"2012-11-22","payment_method":"cash","amount":"\u20ac100,000,000.00","url":"http://localhost:3000/recrea/api/v1/expenses/50adf26b2f412ec28100002a/payments/50adf6d62f412ec28100004c.json"},{"id":"50adf8552f412ec281000053","date":"2012-11-22","payment_method":"cash","amount":"\u20ac100,000,000.00","url":"http://localhost:3000/recrea/api/v1/expenses/50adf26b2f412ec28100002a/payments/50adf8552f412ec281000053.json"}],"tags":[],"notes":"","state":"paid","url":"http://localhost:3000/recrea/api/v1/expenses/50adf26b2f412ec28100002a.json"},{"id":"50adeefe2f412ec28100000b","number":"002","issue_date":"2012-11-22","contact":{"id":"50a23cb22f412eae4f000003","full_name":"100-499"},"po_number":"","currency":"USD","items":[{"description":"mamamama","quantity":"1.0","unit_price":"0.0","discount_rate":"0.0","tax_1_name":"","tax_1_rate":"","tax_2_name":"","tax_2_rate":"","subtotal":"$0.00","discount":"$0.00","gross_amount":"$0.00"}],"subtotal":"$0.00","discount":"$0.00","taxes":[],"total":"$0.00","payments":[{"id":"50adef1e2f412ec28100000e","date":"2012-11-22","payment_method":"cash","amount":"\u20ac100,000.00","url":"http://localhost:3000/recrea/api/v1/expenses/50adeefe2f412ec28100000b/payments/50adef1e2f412ec28100000e.json"},{"id":"50adf26b2f412ec281000028","date":"2012-11-22","payment_method":"cash","amount":"\u20ac100,000,000.00","url":"http://localhost:3000/recrea/api/v1/expenses/50adeefe2f412ec28100000b/payments/50adf26b2f412ec281000028.json"}],"tags":[],"notes":"","state":"paid","url":"http://localhost:3000/recrea/api/v1/expenses/50adeefe2f412ec28100000b.json"}]'
42
+ http_version: '1.1'
43
+ recorded_at: Thu, 22 Nov 2012 11:23:38 GMT
44
+ - request:
45
+ method: get
46
+ uri: http://xiZvifX5hwsxAiymYPk2@localhost:3000/recrea/api/v1/expenses/50adf88a2f412ec28100005a.json
47
+ body:
48
+ encoding: US-ASCII
49
+ string: ''
50
+ headers:
51
+ authorization:
52
+ - Basic eGladmlmWDVod3N4QWl5bVlQazI6
53
+ response:
54
+ status:
55
+ code: 200
56
+ message: OK
57
+ headers:
58
+ x-ratelimit-limit:
59
+ - '1000'
60
+ x-ratelimit-remaining:
61
+ - '990'
62
+ content-type:
63
+ - application/json; charset=utf-8
64
+ x-ua-compatible:
65
+ - IE=Edge
66
+ etag:
67
+ - ! '"7b0574382dce4a5236966ac9b77e29a4"'
68
+ cache-control:
69
+ - max-age=0, private, must-revalidate
70
+ x-request-id:
71
+ - c90b9d9bda336303068ad2bdfee54640
72
+ x-runtime:
73
+ - '0.371777'
74
+ content-length:
75
+ - '4023'
76
+ connection:
77
+ - close
78
+ server:
79
+ - thin 1.5.0 codename Knife
80
+ body:
81
+ encoding: US-ASCII
82
+ string: ! '{"id":"50adf88a2f412ec28100005a","number":"0003","issue_date":"2012-11-22","contact":{"id":"50a23cb22f412eae4f000003","full_name":"100-499"},"po_number":"","currency":"EUR","items":[{"description":"fyfjhj","quantity":"1.0","unit_price":"0.0","discount_rate":"0.0","tax_1_name":"","tax_1_rate":"","tax_2_name":"","tax_2_rate":"","subtotal":"\u20ac0.00","discount":"\u20ac0.00","gross_amount":"\u20ac0.00"}],"subtotal":"\u20ac0.00","discount":"\u20ac0.00","taxes":[],"total":"\u20ac0.00","payments":[{"id":"50adfb422f412ec281000062","date":"2012-11-22","payment_method":"cash","amount":"\u20ac100,000,000.00","url":"http://localhost:3000/recrea/api/v1/expenses/50adf88a2f412ec28100005a/payments/50adfb422f412ec281000062.json"},{"id":"50adfc9c2f412ec28100006a","date":"2012-11-22","payment_method":"cash","amount":"\u20ac100,000,000.00","url":"http://localhost:3000/recrea/api/v1/expenses/50adf88a2f412ec28100005a/payments/50adfc9c2f412ec28100006a.json"},{"id":"50adfd232f412ec281000072","date":"2012-11-22","payment_method":"cash","amount":"\u20ac100,000,000.00","url":"http://localhost:3000/recrea/api/v1/expenses/50adf88a2f412ec28100005a/payments/50adfd232f412ec281000072.json"},{"id":"50adfe012f412ec28100007a","date":"2012-11-22","payment_method":"cash","amount":"\u20ac100,000,000.00","url":"http://localhost:3000/recrea/api/v1/expenses/50adf88a2f412ec28100005a/payments/50adfe012f412ec28100007a.json"},{"id":"50adfe382f412ec281000082","date":"2012-11-22","payment_method":"cash","amount":"\u20ac100,000,000.00","url":"http://localhost:3000/recrea/api/v1/expenses/50adf88a2f412ec28100005a/payments/50adfe382f412ec281000082.json"},{"id":"50adfec72f412ec28100008a","date":"2012-11-22","payment_method":"cash","amount":"\u20ac100,000,000.00","url":"http://localhost:3000/recrea/api/v1/expenses/50adf88a2f412ec28100005a/payments/50adfec72f412ec28100008a.json"},{"id":"50ae001e2f412ec281000093","date":"2012-11-22","payment_method":"cash","amount":"\u20ac100,000,000.00","url":"http://localhost:3000/recrea/api/v1/expenses/50adf88a2f412ec28100005a/payments/50ae001e2f412ec281000093.json"},{"id":"50ae01172f412ec28100009c","date":"2012-11-22","payment_method":"cash","amount":"\u20ac100,000,000.00","url":"http://localhost:3000/recrea/api/v1/expenses/50adf88a2f412ec28100005a/payments/50ae01172f412ec28100009c.json"},{"id":"50ae07652f412ec2810000d8","date":"2012-11-22","payment_method":"cash","amount":"\u20ac100,000,000.00","url":"http://localhost:3000/recrea/api/v1/expenses/50adf88a2f412ec28100005a/payments/50ae07652f412ec2810000d8.json"},{"id":"50ae07bf2f412ec2810000e0","date":"2012-11-22","payment_method":"cash","amount":"\u20ac100,000,000.00","url":"http://localhost:3000/recrea/api/v1/expenses/50adf88a2f412ec28100005a/payments/50ae07bf2f412ec2810000e0.json"},{"id":"50ae07f42f412ec2810000e8","date":"2012-11-22","payment_method":"cash","amount":"\u20ac100,000,000.00","url":"http://localhost:3000/recrea/api/v1/expenses/50adf88a2f412ec28100005a/payments/50ae07f42f412ec2810000e8.json"},{"id":"50ae086e2f412ec2810000f0","date":"2012-11-22","payment_method":"cash","amount":"\u20ac100,000,000.00","url":"http://localhost:3000/recrea/api/v1/expenses/50adf88a2f412ec28100005a/payments/50ae086e2f412ec2810000f0.json"},{"id":"50ae08e42f412ec2810000f8","date":"2012-11-22","payment_method":"cash","amount":"\u20ac100,000,000.00","url":"http://localhost:3000/recrea/api/v1/expenses/50adf88a2f412ec28100005a/payments/50ae08e42f412ec2810000f8.json"},{"id":"50ae092e2f412ec281000100","date":"2012-11-22","payment_method":"cash","amount":"\u20ac100,000,000.00","url":"http://localhost:3000/recrea/api/v1/expenses/50adf88a2f412ec28100005a/payments/50ae092e2f412ec281000100.json"},{"id":"50ae0b382f412ec281000107","date":"2012-11-22","payment_method":"cash","amount":"\u20ac100,000,000.00","url":"http://localhost:3000/recrea/api/v1/expenses/50adf88a2f412ec28100005a/payments/50ae0b382f412ec281000107.json"}],"tags":[],"notes":"","state":"paid","url":"http://localhost:3000/recrea/api/v1/expenses/50adf88a2f412ec28100005a.json"}'
83
+ http_version: '1.1'
84
+ recorded_at: Thu, 22 Nov 2012 11:23:38 GMT
85
+ recorded_with: VCR 2.3.0
@@ -0,0 +1,85 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: get
5
+ uri: http://xiZvifX5hwsxAiymYPk2@localhost:3000/recrea/api/v1/invoices.json
6
+ body:
7
+ encoding: US-ASCII
8
+ string: ''
9
+ headers:
10
+ authorization:
11
+ - Basic eGladmlmWDVod3N4QWl5bVlQazI6
12
+ response:
13
+ status:
14
+ code: 200
15
+ message: OK
16
+ headers:
17
+ x-ratelimit-limit:
18
+ - '1000'
19
+ x-ratelimit-remaining:
20
+ - '974'
21
+ content-type:
22
+ - application/json; charset=utf-8
23
+ x-ua-compatible:
24
+ - IE=Edge
25
+ etag:
26
+ - ! '"eda1b5b5344758448849b28a596dc8cc"'
27
+ cache-control:
28
+ - max-age=0, private, must-revalidate
29
+ x-request-id:
30
+ - 6ac6401dd1632ddf44383b8a82393944
31
+ x-runtime:
32
+ - '0.050941'
33
+ content-length:
34
+ - '674'
35
+ connection:
36
+ - close
37
+ server:
38
+ - thin 1.5.0 codename Knife
39
+ body:
40
+ encoding: US-ASCII
41
+ string: ! '[{"id":"50ae0c1b2f412eeb20000003","number":"0000009","issue_date":"2012-11-22","contact":{"id":"50a23cb22f412eae4f000003","full_name":"100-499"},"po_number":null,"due_date":null,"currency":"EUR","items":[{"description":"Aircraft","quantity":"1.0","unit_price":"0.0","discount_rate":"0.0","tax_1_name":null,"tax_1_rate":null,"tax_2_name":null,"tax_2_rate":null,"subtotal":"\u20ac0.00","discount":"\u20ac0.00","gross_amount":"\u20ac0.00"}],"subtotal":"\u20ac0.00","discount":"\u20ac0.00","taxes":[],"total":"\u20ac0.00","payments":[],"tags":[],"payment_details":"","notes":"","state":"draft","url":"http://localhost:3000/recrea/api/v1/invoices/50ae0c1b2f412eeb20000003.json"}]'
42
+ http_version: '1.1'
43
+ recorded_at: Thu, 22 Nov 2012 11:27:24 GMT
44
+ - request:
45
+ method: get
46
+ uri: http://xiZvifX5hwsxAiymYPk2@localhost:3000/recrea/api/v1/invoices/50ae0c1b2f412eeb20000003.json
47
+ body:
48
+ encoding: US-ASCII
49
+ string: ''
50
+ headers:
51
+ authorization:
52
+ - Basic eGladmlmWDVod3N4QWl5bVlQazI6
53
+ response:
54
+ status:
55
+ code: 200
56
+ message: OK
57
+ headers:
58
+ x-ratelimit-limit:
59
+ - '1000'
60
+ x-ratelimit-remaining:
61
+ - '973'
62
+ content-type:
63
+ - application/json; charset=utf-8
64
+ x-ua-compatible:
65
+ - IE=Edge
66
+ etag:
67
+ - ! '"7e2e7660df3db20338ca9e36d92605ce"'
68
+ cache-control:
69
+ - max-age=0, private, must-revalidate
70
+ x-request-id:
71
+ - 68a90b23b1ff7f34dbc16350a28b1895
72
+ x-runtime:
73
+ - '0.048060'
74
+ content-length:
75
+ - '672'
76
+ connection:
77
+ - close
78
+ server:
79
+ - thin 1.5.0 codename Knife
80
+ body:
81
+ encoding: US-ASCII
82
+ string: ! '{"id":"50ae0c1b2f412eeb20000003","number":"0000009","issue_date":"2012-11-22","contact":{"id":"50a23cb22f412eae4f000003","full_name":"100-499"},"po_number":null,"due_date":null,"currency":"EUR","items":[{"description":"Aircraft","quantity":"1.0","unit_price":"0.0","discount_rate":"0.0","tax_1_name":null,"tax_1_rate":null,"tax_2_name":null,"tax_2_rate":null,"subtotal":"\u20ac0.00","discount":"\u20ac0.00","gross_amount":"\u20ac0.00"}],"subtotal":"\u20ac0.00","discount":"\u20ac0.00","taxes":[],"total":"\u20ac0.00","payments":[],"tags":[],"payment_details":"","notes":"","state":"draft","url":"http://localhost:3000/recrea/api/v1/invoices/50ae0c1b2f412eeb20000003.json"}'
83
+ http_version: '1.1'
84
+ recorded_at: Thu, 22 Nov 2012 11:27:24 GMT
85
+ recorded_with: VCR 2.3.0
@@ -0,0 +1,44 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: post
5
+ uri: http://xiZvifX5hwsxAiymYPk2@localhost:3000/recrea/api/v1/contacts.json
6
+ body:
7
+ encoding: US-ASCII
8
+ string: kind=company&first_name=Test_Skynet&email=my_little%40po.ny
9
+ headers:
10
+ authorization:
11
+ - Basic eGladmlmWDVod3N4QWl5bVlQazI6
12
+ response:
13
+ status:
14
+ code: 200
15
+ message: OK
16
+ headers:
17
+ x-ratelimit-limit:
18
+ - '1000'
19
+ x-ratelimit-remaining:
20
+ - '453'
21
+ content-type:
22
+ - application/json; charset=utf-8
23
+ x-ua-compatible:
24
+ - IE=Edge
25
+ etag:
26
+ - ! '"1de4ee61d38870705317ff34f303558c"'
27
+ cache-control:
28
+ - max-age=0, private, must-revalidate
29
+ x-request-id:
30
+ - 14785e7dea56ca20167a5bf6416bab50
31
+ x-runtime:
32
+ - '0.042335'
33
+ content-length:
34
+ - '413'
35
+ connection:
36
+ - close
37
+ server:
38
+ - thin 1.5.0 codename Knife
39
+ body:
40
+ encoding: US-ASCII
41
+ string: ! '{"id":"50adf2612f412ec281000027","kind":"company","full_name":"Test_Skynet","contact_name":null,"street_line_1":null,"street_line_2":null,"postal_code":null,"city":null,"region":null,"country":"US","phone_1":null,"phone_2":null,"fax":null,"email":"my_little@po.ny","web":null,"discount":null,"tax_id":null,"language":"EN","notes":null,"url":"http://localhost:3000/recrea/api/v1/contacts/50adf2612f412ec281000027"}'
42
+ http_version: '1.1'
43
+ recorded_at: Thu, 22 Nov 2012 09:37:37 GMT
44
+ recorded_with: VCR 2.3.0