badbill 0.0.1 → 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (57) hide show
  1. data/CONTRIBUTING.md +5 -2
  2. data/Gemfile +14 -3
  3. data/Gemfile.lock +51 -15
  4. data/Guardfile +6 -0
  5. data/LICENSE +1 -1
  6. data/README.md +8 -3
  7. data/Rakefile +5 -1
  8. data/badbill.gemspec +86 -0
  9. data/lib/badbill.rb +32 -2
  10. data/lib/badbill/base_resource.rb +51 -9
  11. data/lib/badbill/client.rb +1 -1
  12. data/lib/badbill/faraday_gzip.rb +18 -0
  13. data/lib/badbill/forward_methods.rb +6 -0
  14. data/lib/badbill/invoice.rb +31 -1
  15. data/lib/badbill/invoice_comment.rb +24 -0
  16. data/lib/badbill/invoice_item.rb +17 -0
  17. data/lib/badbill/invoice_payment.rb +28 -0
  18. data/lib/badbill/recurring.rb +11 -0
  19. data/spec/badbill/base_resource_spec.rb +1 -1
  20. data/spec/badbill/client_spec.rb +72 -68
  21. data/spec/badbill/invoice_comment_spec.rb +33 -0
  22. data/spec/badbill/invoice_item_spec.rb +17 -0
  23. data/spec/badbill/invoice_payment_spec.rb +17 -0
  24. data/spec/badbill/invoice_spec.rb +77 -176
  25. data/spec/badbill/recurring_spec.rb +18 -0
  26. data/spec/badbill_spec.rb +19 -17
  27. data/spec/fixtures/vcr_cassettes/aggregated_invoices.yml +64 -0
  28. data/spec/fixtures/vcr_cassettes/all_clients.yml +72 -0
  29. data/spec/fixtures/vcr_cassettes/all_invoices.yml +134 -0
  30. data/spec/fixtures/vcr_cassettes/all_recurring_invoices.yml +131 -0
  31. data/spec/fixtures/vcr_cassettes/client_on_change.yml +54 -0
  32. data/spec/fixtures/vcr_cassettes/draft_item.yml +71 -0
  33. data/spec/fixtures/vcr_cassettes/existent_client.yml +71 -0
  34. data/spec/fixtures/vcr_cassettes/fetched_invoice_pdf.yml +2111 -0
  35. data/spec/fixtures/vcr_cassettes/fetches_invoice-item_by_id.yml +123 -0
  36. data/spec/fixtures/vcr_cassettes/invoice-comments_by_invoice_id.yml +68 -0
  37. data/spec/fixtures/vcr_cassettes/invoice-comments_by_invoice_id_and_actionkey_PAYMENT.yml +131 -0
  38. data/spec/fixtures/vcr_cassettes/invoice-comments_by_invoice_id_and_actionkeys.yml +67 -0
  39. data/spec/fixtures/vcr_cassettes/invoice_canceled.yml +50 -0
  40. data/spec/fixtures/vcr_cassettes/invoice_deleted.yml +46 -0
  41. data/spec/fixtures/vcr_cassettes/invoice_info.yml +131 -0
  42. data/spec/fixtures/vcr_cassettes/invoice_marked_as_complete.yml +95 -0
  43. data/spec/fixtures/vcr_cassettes/invoice_payments.yml +123 -0
  44. data/spec/fixtures/vcr_cassettes/invoice_send_email_with_basic_info.yml +48 -0
  45. data/spec/fixtures/vcr_cassettes/invoice_send_email_with_basic_info_and_from.yml +48 -0
  46. data/spec/fixtures/vcr_cassettes/invoice_send_email_with_basic_info_from_and_subject.yml +48 -0
  47. data/spec/fixtures/vcr_cassettes/invoice_send_mail.yml +48 -0
  48. data/spec/fixtures/vcr_cassettes/invoice_send_mail_invalid_address.yml +48 -0
  49. data/spec/fixtures/vcr_cassettes/invoice_uploaded_signature.yml +48 -0
  50. data/spec/fixtures/vcr_cassettes/myself_client.yml +70 -0
  51. data/spec/fixtures/vcr_cassettes/new_client.yml +50 -0
  52. data/spec/fixtures/vcr_cassettes/non_existent_client.yml +303 -0
  53. data/spec/fixtures/vcr_cassettes/save_for_non-existent_client.yml +48 -0
  54. data/spec/fixtures/vcr_cassettes/wrong_data_for_client.yml +50 -0
  55. data/spec/spec_helper.rb +50 -0
  56. metadata +43 -4
  57. data/spec/helper.rb +0 -24
@@ -0,0 +1,48 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: post
5
+ uri: http://rediger.billomat.net/api/invoices/352709/email
6
+ body:
7
+ encoding: UTF-8
8
+ string: ! '{"email":{"recipients":{"cc":"mail@test.example","to":"M8R-10apg01@mailinator.com"},"from":"sender@test.example","subject":"subject"}}'
9
+ headers:
10
+ X-Billomatapikey:
11
+ - e1923a9ab25fc955be3321725be882bd
12
+ Accept:
13
+ - application/json
14
+ Content-Type:
15
+ - application/json
16
+ User-Agent:
17
+ - Ruby
18
+ response:
19
+ status:
20
+ code: 200
21
+ message: OK
22
+ headers:
23
+ Date:
24
+ - Wed, 14 Nov 2012 19:57:16 GMT
25
+ Server:
26
+ - Apache
27
+ X-Powered-By:
28
+ - PHP/5.3.3-7+squeeze14
29
+ Expires:
30
+ - Thu, 19 Nov 1981 08:52:00 GMT
31
+ Cache-Control:
32
+ - no-store, no-cache, must-revalidate, post-check=0, pre-check=0
33
+ Pragma:
34
+ - no-cache
35
+ Set-Cookie:
36
+ - language=de_DE; expires=Thu, 14-Nov-2013 19:57:16 GMT; path=/
37
+ Vary:
38
+ - Accept-Encoding
39
+ Content-Length:
40
+ - '0'
41
+ Content-Type:
42
+ - application/json
43
+ body:
44
+ encoding: US-ASCII
45
+ string: ''
46
+ http_version:
47
+ recorded_at: Wed, 14 Nov 2012 19:57:17 GMT
48
+ recorded_with: VCR 2.2.5
@@ -0,0 +1,48 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: post
5
+ uri: http://rediger.billomat.net/api/invoices/352709/email
6
+ body:
7
+ encoding: UTF-8
8
+ string: ! '{"email":{"recipients":{"cc":"f4a269895b2c7eccd43296d2b@mailinator.com","to":"M8R-10apg01@mailinator.com"},"from":"janerik@badbill.net","subject":"subject","body":"body","filename":"invoice","attachments":{"attachment":{"filename":"more.pdf","mimetype":"application/pdf","base64file":"Zm9vYmFyCg=="}}}}'
9
+ headers:
10
+ X-Billomatapikey:
11
+ - e1923a9ab25fc955be3321725be882bd
12
+ Accept:
13
+ - application/json
14
+ Content-Type:
15
+ - application/json
16
+ User-Agent:
17
+ - Ruby
18
+ response:
19
+ status:
20
+ code: 200
21
+ message: OK
22
+ headers:
23
+ Date:
24
+ - Wed, 14 Nov 2012 19:57:14 GMT
25
+ Server:
26
+ - Apache
27
+ X-Powered-By:
28
+ - PHP/5.3.3-7+squeeze14
29
+ Expires:
30
+ - Thu, 19 Nov 1981 08:52:00 GMT
31
+ Cache-Control:
32
+ - no-store, no-cache, must-revalidate, post-check=0, pre-check=0
33
+ Pragma:
34
+ - no-cache
35
+ Set-Cookie:
36
+ - language=de_DE; expires=Thu, 14-Nov-2013 19:57:14 GMT; path=/
37
+ Vary:
38
+ - Accept-Encoding
39
+ Content-Length:
40
+ - '0'
41
+ Content-Type:
42
+ - application/json
43
+ body:
44
+ encoding: US-ASCII
45
+ string: ''
46
+ http_version:
47
+ recorded_at: Wed, 14 Nov 2012 19:57:14 GMT
48
+ recorded_with: VCR 2.2.5
@@ -0,0 +1,48 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: post
5
+ uri: http://rediger.billomat.net/api/invoices/352709/email
6
+ body:
7
+ encoding: UTF-8
8
+ string: ! '{"email":{"recipients":{"to":"foo.bar.baz"},"from":"sender@test.example","subject":"subject"}}'
9
+ headers:
10
+ X-Billomatapikey:
11
+ - e1923a9ab25fc955be3321725be882bd
12
+ Accept:
13
+ - application/json
14
+ Content-Type:
15
+ - application/json
16
+ User-Agent:
17
+ - Ruby
18
+ response:
19
+ status:
20
+ code: 200
21
+ message: OK
22
+ headers:
23
+ Date:
24
+ - Wed, 14 Nov 2012 19:58:18 GMT
25
+ Server:
26
+ - Apache
27
+ X-Powered-By:
28
+ - PHP/5.3.3-7+squeeze14
29
+ Expires:
30
+ - Thu, 19 Nov 1981 08:52:00 GMT
31
+ Cache-Control:
32
+ - no-store, no-cache, must-revalidate, post-check=0, pre-check=0
33
+ Pragma:
34
+ - no-cache
35
+ Set-Cookie:
36
+ - language=de_DE; expires=Thu, 14-Nov-2013 19:58:18 GMT; path=/
37
+ Vary:
38
+ - Accept-Encoding
39
+ Content-Length:
40
+ - '0'
41
+ Content-Type:
42
+ - application/json
43
+ body:
44
+ encoding: US-ASCII
45
+ string: ''
46
+ http_version:
47
+ recorded_at: Wed, 14 Nov 2012 19:58:18 GMT
48
+ recorded_with: VCR 2.2.5
@@ -0,0 +1,48 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: put
5
+ uri: http://rediger.billomat.net/api/invoices/352709/upload-signature
6
+ body:
7
+ encoding: UTF-8
8
+ string: ! '{"signature":{"base64file":"cnVieQ==\n"}}'
9
+ headers:
10
+ X-Billomatapikey:
11
+ - e1923a9ab25fc955be3321725be882bd
12
+ Accept:
13
+ - application/json
14
+ Content-Type:
15
+ - application/json
16
+ User-Agent:
17
+ - Ruby
18
+ response:
19
+ status:
20
+ code: 200
21
+ message: OK
22
+ headers:
23
+ Date:
24
+ - Wed, 14 Nov 2012 19:38:18 GMT
25
+ Server:
26
+ - Apache
27
+ X-Powered-By:
28
+ - PHP/5.3.3-7+squeeze14
29
+ Expires:
30
+ - Thu, 19 Nov 1981 08:52:00 GMT
31
+ Cache-Control:
32
+ - no-store, no-cache, must-revalidate, post-check=0, pre-check=0
33
+ Pragma:
34
+ - no-cache
35
+ Set-Cookie:
36
+ - language=de_DE; expires=Thu, 14-Nov-2013 19:38:18 GMT; path=/
37
+ Vary:
38
+ - Accept-Encoding
39
+ Content-Length:
40
+ - '0'
41
+ Content-Type:
42
+ - application/json
43
+ body:
44
+ encoding: US-ASCII
45
+ string: ''
46
+ http_version:
47
+ recorded_at: Wed, 14 Nov 2012 19:38:18 GMT
48
+ recorded_with: VCR 2.2.5
@@ -0,0 +1,70 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: get
5
+ uri: http://rediger.billomat.net/api/clients/myself
6
+ body:
7
+ encoding: US-ASCII
8
+ string: ''
9
+ headers:
10
+ X-Billomatapikey:
11
+ - e1923a9ab25fc955be3321725be882bd
12
+ Accept:
13
+ - application/json
14
+ Accept-Encoding:
15
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
16
+ User-Agent:
17
+ - Ruby
18
+ response:
19
+ status:
20
+ code: 200
21
+ message: !binary |-
22
+ T0s=
23
+ headers:
24
+ !binary "RGF0ZQ==":
25
+ - !binary |-
26
+ TW9uLCAwNSBOb3YgMjAxMiAxNTowODo1NyBHTVQ=
27
+ !binary "U2VydmVy":
28
+ - !binary |-
29
+ QXBhY2hl
30
+ !binary "WC1Qb3dlcmVkLUJ5":
31
+ - !binary |-
32
+ UEhQLzUuMy4zLTcrc3F1ZWV6ZTE0
33
+ !binary "RXhwaXJlcw==":
34
+ - !binary |-
35
+ VGh1LCAxOSBOb3YgMTk4MSAwODo1MjowMCBHTVQ=
36
+ !binary "Q2FjaGUtQ29udHJvbA==":
37
+ - !binary |-
38
+ bm8tc3RvcmUsIG5vLWNhY2hlLCBtdXN0LXJldmFsaWRhdGUsIHBvc3QtY2hl
39
+ Y2s9MCwgcHJlLWNoZWNrPTA=
40
+ !binary "UHJhZ21h":
41
+ - !binary |-
42
+ bm8tY2FjaGU=
43
+ !binary "U2V0LUNvb2tpZQ==":
44
+ - !binary |-
45
+ bGFuZ3VhZ2U9ZGVfREU7IGV4cGlyZXM9VHVlLCAwNS1Ob3YtMjAxMyAxNTow
46
+ ODo1NyBHTVQ7IHBhdGg9Lw==
47
+ !binary "Q29udGVudC1FbmNvZGluZw==":
48
+ - !binary |-
49
+ Z3ppcA==
50
+ !binary "Q29udGVudC1MZW5ndGg=":
51
+ - !binary |-
52
+ MzY0
53
+ !binary "Q29udGVudC1UeXBl":
54
+ - !binary |-
55
+ YXBwbGljYXRpb24vanNvbg==
56
+ body:
57
+ encoding: ASCII-8BIT
58
+ string: !binary |-
59
+ H4sIAAAAAAAAA32Sy27CMBBF/8VboDKhPJpV1QqhdkElSBddRUPi0CmJHTkO
60
+ IUX8e8dxJF6FTTRz7r3jR7xnUYpCGubvGcbMZ/3HyWAyYl0WaQFGWOTxvtfj
61
+ T73+OODc5yPf4x3u+ZxbV5MOZZmthCbvYDAc9onfAGGuBUHbQ2arHzJ1WQFp
62
+ acCgkk5MUBc01FneQfamGjfEUzjihYhx7dJGC2Fc8hdzV0RoalcVNLldNFKl
63
+ NLoOIxVbMnshln8r2coJ7FyRqRWmLRQZYGp3ClLQLjqkpOo5kUrT+g80p8uq
64
+ qnJeA7vjVVC/BXPWr0BuQoiabYSqkmf8ytge9DJ35SsqTMxJj/Q97keXzUle
65
+ Pz7nweKLYIyFG6TpXkJT51ZeToPgbT5bXuok8VMWQ13cy1i9eUUWluKmv5WI
66
+ jqnVIkMZ0/O4E7nytFmVJAS3kGJMv/xW+h9Xe7RcYyTCtVZl3pDD4Q/ntycB
67
+ FAMAAA==
68
+ http_version:
69
+ recorded_at: Mon, 05 Nov 2012 15:08:58 GMT
70
+ recorded_with: VCR 2.2.5
@@ -0,0 +1,50 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: post
5
+ uri: http://rediger.billomat.net/api/clients/
6
+ body:
7
+ encoding: UTF-8
8
+ string: ! '{"client":{"name":"Musterfirma","salutation":"Herr","first_name":"Max","last_name":"Muster","street":"Musterstraße
9
+ 123","zip":"12345","city":"Musterstadt","state":"Bundesland","country_code":"DE"}}'
10
+ headers:
11
+ X-Billomatapikey:
12
+ - e1923a9ab25fc955be3321725be882bd
13
+ Accept:
14
+ - application/json
15
+ Content-Type:
16
+ - application/json
17
+ User-Agent:
18
+ - Ruby
19
+ response:
20
+ status:
21
+ code: 201
22
+ message: Created
23
+ headers:
24
+ Date:
25
+ - Mon, 05 Nov 2012 15:44:26 GMT
26
+ Server:
27
+ - Apache
28
+ X-Powered-By:
29
+ - PHP/5.3.3-7+squeeze14
30
+ Expires:
31
+ - Thu, 19 Nov 1981 08:52:00 GMT
32
+ Cache-Control:
33
+ - no-store, no-cache, must-revalidate, post-check=0, pre-check=0
34
+ Pragma:
35
+ - no-cache
36
+ Set-Cookie:
37
+ - language=de_DE; expires=Tue, 05-Nov-2013 15:44:26 GMT; path=/
38
+ Vary:
39
+ - Accept-Encoding
40
+ Content-Length:
41
+ - '857'
42
+ Content-Type:
43
+ - application/json
44
+ body:
45
+ encoding: US-ASCII
46
+ string: ! '{"client":{"id":"170675","created":"2012-11-05T16:44:26+01:00","client_number":"5","number":"5","number_pre":"","name":"Musterfirma","salutation":"Herr","first_name":"Max","last_name":"Muster","street":"Musterstra\u00dfe
47
+ 123","zip":"12345","city":"Musterstadt","state":"Bundesland","country_code":"GB","phone":"","fax":"","mobile":"","email":"","www":"","tax_number":"","vat_number":"","bank_account_owner":"","bank_number":"","bank_name":"","bank_account_number":"","bank_swift":"","bank_iban":"","tax_rule":"COUNTRY","discount_rate_type":"SETTINGS","discount_rate":"","discount_days_type":"SETTINGS","discount_days":"14","due_days_type":"SETTINGS","due_days":"31","reminder_due_days_type":"SETTINGS","reminder_due_days":"7","offer_validity_days_type":"SETTINGS","offer_validity_days":"0","price_group":"0","note":"","revenue_gross":"0","revenue_net":"0"}}'
48
+ http_version:
49
+ recorded_at: Mon, 05 Nov 2012 15:44:26 GMT
50
+ recorded_with: VCR 2.2.5
@@ -0,0 +1,303 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: get
5
+ uri: http://rediger.billomat.net/api/clients/1111111
6
+ body:
7
+ encoding: US-ASCII
8
+ string: ''
9
+ headers:
10
+ X-Billomatapikey:
11
+ - e1923a9ab25fc955be3321725be882bd
12
+ Accept:
13
+ - application/json
14
+ Accept-Encoding:
15
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
16
+ User-Agent:
17
+ - Ruby
18
+ response:
19
+ status:
20
+ code: 404
21
+ message: !binary |-
22
+ Tm90IEZvdW5k
23
+ headers:
24
+ !binary "RGF0ZQ==":
25
+ - !binary |-
26
+ TW9uLCAwNSBOb3YgMjAxMiAxNToxNDozMSBHTVQ=
27
+ !binary "U2VydmVy":
28
+ - !binary |-
29
+ QXBhY2hl
30
+ !binary "WC1Qb3dlcmVkLUJ5":
31
+ - !binary |-
32
+ UEhQLzUuMy4zLTcrc3F1ZWV6ZTE0
33
+ !binary "RXhwaXJlcw==":
34
+ - !binary |-
35
+ VGh1LCAxOSBOb3YgMTk4MSAwODo1MjowMCBHTVQ=
36
+ !binary "Q2FjaGUtQ29udHJvbA==":
37
+ - !binary |-
38
+ bm8tc3RvcmUsIG5vLWNhY2hlLCBtdXN0LXJldmFsaWRhdGUsIHBvc3QtY2hl
39
+ Y2s9MCwgcHJlLWNoZWNrPTA=
40
+ !binary "UHJhZ21h":
41
+ - !binary |-
42
+ bm8tY2FjaGU=
43
+ !binary "U2V0LUNvb2tpZQ==":
44
+ - !binary |-
45
+ bGFuZ3VhZ2U9ZGVfREU7IGV4cGlyZXM9VHVlLCAwNS1Ob3YtMjAxMyAxNTox
46
+ NDozMSBHTVQ7IHBhdGg9Lw==
47
+ !binary "Q29udGVudC1FbmNvZGluZw==":
48
+ - !binary |-
49
+ Z3ppcA==
50
+ !binary "Q29udGVudC1MZW5ndGg=":
51
+ - !binary |-
52
+ NTE=
53
+ !binary "Q29udGVudC1UeXBl":
54
+ - !binary |-
55
+ YXBwbGljYXRpb24vanNvbg==
56
+ body:
57
+ encoding: ASCII-8BIT
58
+ string: !binary |-
59
+ H4sIAAAAAAAAA6tWSi0qyi8qVrKqhrCUrJSC8ssV8vJLFNLyS/NSlGprAel/
60
+ syMkAAAA
61
+ http_version:
62
+ recorded_at: Mon, 05 Nov 2012 15:14:31 GMT
63
+ - request:
64
+ method: get
65
+ uri: http://rediger.billomat.net/api/clients/1111
66
+ body:
67
+ encoding: US-ASCII
68
+ string: ''
69
+ headers:
70
+ X-Billomatapikey:
71
+ - e1923a9ab25fc955be3321725be882bd
72
+ Accept:
73
+ - application/json
74
+ Accept-Encoding:
75
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
76
+ User-Agent:
77
+ - Ruby
78
+ response:
79
+ status:
80
+ code: 404
81
+ message: !binary |-
82
+ Tm90IEZvdW5k
83
+ headers:
84
+ !binary "RGF0ZQ==":
85
+ - !binary |-
86
+ TW9uLCAwNSBOb3YgMjAxMiAxNToxNDo0OSBHTVQ=
87
+ !binary "U2VydmVy":
88
+ - !binary |-
89
+ QXBhY2hl
90
+ !binary "WC1Qb3dlcmVkLUJ5":
91
+ - !binary |-
92
+ UEhQLzUuMy4zLTcrc3F1ZWV6ZTE0
93
+ !binary "RXhwaXJlcw==":
94
+ - !binary |-
95
+ VGh1LCAxOSBOb3YgMTk4MSAwODo1MjowMCBHTVQ=
96
+ !binary "Q2FjaGUtQ29udHJvbA==":
97
+ - !binary |-
98
+ bm8tc3RvcmUsIG5vLWNhY2hlLCBtdXN0LXJldmFsaWRhdGUsIHBvc3QtY2hl
99
+ Y2s9MCwgcHJlLWNoZWNrPTA=
100
+ !binary "UHJhZ21h":
101
+ - !binary |-
102
+ bm8tY2FjaGU=
103
+ !binary "U2V0LUNvb2tpZQ==":
104
+ - !binary |-
105
+ bGFuZ3VhZ2U9ZGVfREU7IGV4cGlyZXM9VHVlLCAwNS1Ob3YtMjAxMyAxNTox
106
+ NDo0OSBHTVQ7IHBhdGg9Lw==
107
+ !binary "Q29udGVudC1FbmNvZGluZw==":
108
+ - !binary |-
109
+ Z3ppcA==
110
+ !binary "Q29udGVudC1MZW5ndGg=":
111
+ - !binary |-
112
+ NTE=
113
+ !binary "Q29udGVudC1UeXBl":
114
+ - !binary |-
115
+ YXBwbGljYXRpb24vanNvbg==
116
+ body:
117
+ encoding: ASCII-8BIT
118
+ string: !binary |-
119
+ H4sIAAAAAAAAA6tWSi0qyi8qVrKqhrCUrJSC8ssV8vJLFNLyS/NSlGprAel/
120
+ syMkAAAA
121
+ http_version:
122
+ recorded_at: Mon, 05 Nov 2012 15:14:49 GMT
123
+ - request:
124
+ method: get
125
+ uri: http://rediger.billomat.net/api/clients/111
126
+ body:
127
+ encoding: US-ASCII
128
+ string: ''
129
+ headers:
130
+ X-Billomatapikey:
131
+ - e1923a9ab25fc955be3321725be882bd
132
+ Accept:
133
+ - application/json
134
+ Accept-Encoding:
135
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
136
+ User-Agent:
137
+ - Ruby
138
+ response:
139
+ status:
140
+ code: 401
141
+ message: !binary |-
142
+ QXV0aG9yaXphdGlvbiBSZXF1aXJlZA==
143
+ headers:
144
+ !binary "RGF0ZQ==":
145
+ - !binary |-
146
+ TW9uLCAwNSBOb3YgMjAxMiAxNToxNTo0MiBHTVQ=
147
+ !binary "U2VydmVy":
148
+ - !binary |-
149
+ QXBhY2hl
150
+ !binary "WC1Qb3dlcmVkLUJ5":
151
+ - !binary |-
152
+ UEhQLzUuMy4zLTcrc3F1ZWV6ZTE0
153
+ !binary "RXhwaXJlcw==":
154
+ - !binary |-
155
+ VGh1LCAxOSBOb3YgMTk4MSAwODo1MjowMCBHTVQ=
156
+ !binary "Q2FjaGUtQ29udHJvbA==":
157
+ - !binary |-
158
+ bm8tc3RvcmUsIG5vLWNhY2hlLCBtdXN0LXJldmFsaWRhdGUsIHBvc3QtY2hl
159
+ Y2s9MCwgcHJlLWNoZWNrPTA=
160
+ !binary "UHJhZ21h":
161
+ - !binary |-
162
+ bm8tY2FjaGU=
163
+ !binary "U2V0LUNvb2tpZQ==":
164
+ - !binary |-
165
+ bGFuZ3VhZ2U9ZGVfREU7IGV4cGlyZXM9VHVlLCAwNS1Ob3YtMjAxMyAxNTox
166
+ NTo0MiBHTVQ7IHBhdGg9Lw==
167
+ !binary "Q29udGVudC1FbmNvZGluZw==":
168
+ - !binary |-
169
+ Z3ppcA==
170
+ !binary "Q29udGVudC1MZW5ndGg=":
171
+ - !binary |-
172
+ NTA=
173
+ !binary "Q29udGVudC1UeXBl":
174
+ - !binary |-
175
+ YXBwbGljYXRpb24vanNvbg==
176
+ body:
177
+ encoding: ASCII-8BIT
178
+ string: !binary |-
179
+ H4sIAAAAAAAAA6tWSi0qyi8qVrKqhrCUrJRC8xJLSzLyizKrUlOUamsBNBdv
180
+ pyMAAAA=
181
+ http_version:
182
+ recorded_at: Mon, 05 Nov 2012 15:15:48 GMT
183
+ - request:
184
+ method: get
185
+ uri: http://rediger.billomat.net/api/clients/11
186
+ body:
187
+ encoding: US-ASCII
188
+ string: ''
189
+ headers:
190
+ X-Billomatapikey:
191
+ - e1923a9ab25fc955be3321725be882bd
192
+ Accept:
193
+ - application/json
194
+ Accept-Encoding:
195
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
196
+ User-Agent:
197
+ - Ruby
198
+ response:
199
+ status:
200
+ code: 401
201
+ message: !binary |-
202
+ QXV0aG9yaXphdGlvbiBSZXF1aXJlZA==
203
+ headers:
204
+ !binary "RGF0ZQ==":
205
+ - !binary |-
206
+ TW9uLCAwNSBOb3YgMjAxMiAxNToxNjo1NSBHTVQ=
207
+ !binary "U2VydmVy":
208
+ - !binary |-
209
+ QXBhY2hl
210
+ !binary "WC1Qb3dlcmVkLUJ5":
211
+ - !binary |-
212
+ UEhQLzUuMy4zLTcrc3F1ZWV6ZTE0
213
+ !binary "RXhwaXJlcw==":
214
+ - !binary |-
215
+ VGh1LCAxOSBOb3YgMTk4MSAwODo1MjowMCBHTVQ=
216
+ !binary "Q2FjaGUtQ29udHJvbA==":
217
+ - !binary |-
218
+ bm8tc3RvcmUsIG5vLWNhY2hlLCBtdXN0LXJldmFsaWRhdGUsIHBvc3QtY2hl
219
+ Y2s9MCwgcHJlLWNoZWNrPTA=
220
+ !binary "UHJhZ21h":
221
+ - !binary |-
222
+ bm8tY2FjaGU=
223
+ !binary "U2V0LUNvb2tpZQ==":
224
+ - !binary |-
225
+ bGFuZ3VhZ2U9ZGVfREU7IGV4cGlyZXM9VHVlLCAwNS1Ob3YtMjAxMyAxNTox
226
+ Njo1NSBHTVQ7IHBhdGg9Lw==
227
+ !binary "Q29udGVudC1FbmNvZGluZw==":
228
+ - !binary |-
229
+ Z3ppcA==
230
+ !binary "Q29udGVudC1MZW5ndGg=":
231
+ - !binary |-
232
+ NTA=
233
+ !binary "Q29udGVudC1UeXBl":
234
+ - !binary |-
235
+ YXBwbGljYXRpb24vanNvbg==
236
+ body:
237
+ encoding: ASCII-8BIT
238
+ string: !binary |-
239
+ H4sIAAAAAAAAA6tWSi0qyi8qVrKqhrCUrJRC8xJLSzLyizKrUlOUamsBNBdv
240
+ pyMAAAA=
241
+ http_version:
242
+ recorded_at: Mon, 05 Nov 2012 15:17:01 GMT
243
+ - request:
244
+ method: get
245
+ uri: http://rediger.billomat.net/api/clients/11111
246
+ body:
247
+ encoding: US-ASCII
248
+ string: ''
249
+ headers:
250
+ X-Billomatapikey:
251
+ - e1923a9ab25fc955be3321725be882bd
252
+ Accept:
253
+ - application/json
254
+ Accept-Encoding:
255
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
256
+ User-Agent:
257
+ - Ruby
258
+ response:
259
+ status:
260
+ code: 404
261
+ message: !binary |-
262
+ Tm90IEZvdW5k
263
+ headers:
264
+ !binary "RGF0ZQ==":
265
+ - !binary |-
266
+ TW9uLCAwNSBOb3YgMjAxMiAxNTozNDo1MCBHTVQ=
267
+ !binary "U2VydmVy":
268
+ - !binary |-
269
+ QXBhY2hl
270
+ !binary "WC1Qb3dlcmVkLUJ5":
271
+ - !binary |-
272
+ UEhQLzUuMy4zLTcrc3F1ZWV6ZTE0
273
+ !binary "RXhwaXJlcw==":
274
+ - !binary |-
275
+ VGh1LCAxOSBOb3YgMTk4MSAwODo1MjowMCBHTVQ=
276
+ !binary "Q2FjaGUtQ29udHJvbA==":
277
+ - !binary |-
278
+ bm8tc3RvcmUsIG5vLWNhY2hlLCBtdXN0LXJldmFsaWRhdGUsIHBvc3QtY2hl
279
+ Y2s9MCwgcHJlLWNoZWNrPTA=
280
+ !binary "UHJhZ21h":
281
+ - !binary |-
282
+ bm8tY2FjaGU=
283
+ !binary "U2V0LUNvb2tpZQ==":
284
+ - !binary |-
285
+ bGFuZ3VhZ2U9ZGVfREU7IGV4cGlyZXM9VHVlLCAwNS1Ob3YtMjAxMyAxNToz
286
+ NDo1MCBHTVQ7IHBhdGg9Lw==
287
+ !binary "Q29udGVudC1FbmNvZGluZw==":
288
+ - !binary |-
289
+ Z3ppcA==
290
+ !binary "Q29udGVudC1MZW5ndGg=":
291
+ - !binary |-
292
+ NTE=
293
+ !binary "Q29udGVudC1UeXBl":
294
+ - !binary |-
295
+ YXBwbGljYXRpb24vanNvbg==
296
+ body:
297
+ encoding: ASCII-8BIT
298
+ string: !binary |-
299
+ H4sIAAAAAAAAA6tWSi0qyi8qVrKqhrCUrJSC8ssV8vJLFNLyS/NSlGprAel/
300
+ syMkAAAA
301
+ http_version:
302
+ recorded_at: Mon, 05 Nov 2012 15:34:50 GMT
303
+ recorded_with: VCR 2.2.5