easybill-rest-client 2.0.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (87) hide show
  1. checksums.yaml +7 -0
  2. data/Gemfile +6 -0
  3. data/Gemfile.lock +152 -0
  4. data/README.md +8 -0
  5. data/Rakefile +4 -0
  6. data/config.json +5 -0
  7. data/easybill-rest-client.gemspec +29 -0
  8. data/lib/easybill-rest-client.rb +15 -0
  9. data/lib/easybill_rest_client/.document_address.rb.swp +0 -0
  10. data/lib/easybill_rest_client/.document_item.rb.swp +0 -0
  11. data/lib/easybill_rest_client/.document_payment.rb.swp +0 -0
  12. data/lib/easybill_rest_client/.document_recurring_options.rb.swp +0 -0
  13. data/lib/easybill_rest_client/.easybill_error.rb.swp +0 -0
  14. data/lib/easybill_rest_client/.log_formatter.rb.swp +0 -0
  15. data/lib/easybill_rest_client/.request_builder.rb.swp +0 -0
  16. data/lib/easybill_rest_client/.too_many_requests_error.rb.swp +0 -0
  17. data/lib/easybill_rest_client/api_client.rb +61 -0
  18. data/lib/easybill_rest_client/client.rb +39 -0
  19. data/lib/easybill_rest_client/customer.rb +70 -0
  20. data/lib/easybill_rest_client/customer_api.rb +15 -0
  21. data/lib/easybill_rest_client/document.rb +53 -0
  22. data/lib/easybill_rest_client/document_address.rb +19 -0
  23. data/lib/easybill_rest_client/document_api.rb +31 -0
  24. data/lib/easybill_rest_client/document_item.rb +34 -0
  25. data/lib/easybill_rest_client/document_payment.rb +15 -0
  26. data/lib/easybill_rest_client/document_payment_api.rb +15 -0
  27. data/lib/easybill_rest_client/document_recurring_options.rb +23 -0
  28. data/lib/easybill_rest_client/document_service_date.rb +12 -0
  29. data/lib/easybill_rest_client/generic_api.rb +39 -0
  30. data/lib/easybill_rest_client/pdf.rb +21 -0
  31. data/lib/easybill_rest_client/post_box.rb +24 -0
  32. data/lib/easybill_rest_client/post_box_api.rb +15 -0
  33. data/lib/easybill_rest_client/request.rb +107 -0
  34. data/lib/easybill_rest_client/request_logger.rb +24 -0
  35. data/lib/easybill_rest_client/response.rb +36 -0
  36. data/lib/easybill_rest_client/retry_on.rb +46 -0
  37. data/lib/easybill_rest_client/version.rb +5 -0
  38. data/log/.gitkeep +0 -0
  39. data/log/test.log +5723 -0
  40. data/script/.generate.swo +0 -0
  41. data/spec/.spec_helper.rb.swp +0 -0
  42. data/spec/fixtures/vcr/EasybillRestClient_CustomerApi/_customers_get/.returns_customers.yml.swo +0 -0
  43. data/spec/fixtures/vcr/EasybillRestClient_CustomerApi/_customers_get/.returns_customers.yml.swp +0 -0
  44. data/spec/fixtures/vcr/EasybillRestClient_CustomerApi/a_list_of_customers/gets_all_customers.yml +84 -0
  45. data/spec/fixtures/vcr/EasybillRestClient_CustomerApi/a_list_of_customers/gets_customers_matching_a_filter.yml +72 -0
  46. data/spec/fixtures/vcr/EasybillRestClient_CustomerApi/creates_updates_and_deletes_customer.yml +377 -0
  47. data/spec/fixtures/vcr/EasybillRestClient_Document/_all/returns_documents.yml +44 -0
  48. data/spec/fixtures/vcr/EasybillRestClient_DocumentApi/_cancel/cancels_a_document.yml +212 -0
  49. data/spec/fixtures/vcr/EasybillRestClient_DocumentApi/_create/creates_a_document.yml +53 -0
  50. data/spec/fixtures/vcr/EasybillRestClient_DocumentApi/_delete/deletes_a_document.yml +174 -0
  51. data/spec/fixtures/vcr/EasybillRestClient_DocumentApi/_find/returns_a_document.yml +57 -0
  52. data/spec/fixtures/vcr/EasybillRestClient_DocumentApi/_find_all/paid_and_unpaid_documents_exist/returns_only_unpaid_documents.yml +795 -0
  53. data/spec/fixtures/vcr/EasybillRestClient_DocumentApi/_find_all/returns_documents.yml +58 -0
  54. data/spec/fixtures/vcr/EasybillRestClient_DocumentApi/_find_all/returns_documents_by_number.yml +58 -0
  55. data/spec/fixtures/vcr/EasybillRestClient_DocumentApi/_finish/marks_a_drafted_document_as_finished.yml +212 -0
  56. data/spec/fixtures/vcr/EasybillRestClient_DocumentApi/_get_pdf/returns_a_PDF.yml +3889 -0
  57. data/spec/fixtures/vcr/EasybillRestClient_DocumentApi/_send_email/passes_on_additional_params.yml +63 -0
  58. data/spec/fixtures/vcr/EasybillRestClient_DocumentApi/_send_email/sends_an_email.yml +63 -0
  59. data/spec/fixtures/vcr/EasybillRestClient_DocumentApi/_update/updates_a_document.yml +107 -0
  60. data/spec/fixtures/vcr/EasybillRestClient_DocumentPaymentApi/_create/creates_a_document_payment.yml +195 -0
  61. data/spec/fixtures/vcr/EasybillRestClient_DocumentPaymentApi/_delete/deletes_a_document_payment.yml +168 -0
  62. data/spec/fixtures/vcr/EasybillRestClient_DocumentPaymentApi/_document_payments_get/returns_a_document_s_payments.yml +460 -0
  63. data/spec/fixtures/vcr/EasybillRestClient_DocumentPaymentApi/_document_payments_post/creates_a_document_payment.yml +47 -0
  64. data/spec/fixtures/vcr/EasybillRestClient_DocumentPaymentApi/_find/returns_a_document_payment.yml +66 -0
  65. data/spec/fixtures/vcr/EasybillRestClient_DocumentPaymentApi/_find_all/returns_document_payments.yml +66 -0
  66. data/spec/fixtures/vcr/EasybillRestClient_PostBoxApi/_delete/deletes_a_post_box.yml +174 -0
  67. data/spec/fixtures/vcr/EasybillRestClient_PostBoxApi/_find/returns_a_post_box.yml +72 -0
  68. data/spec/fixtures/vcr/EasybillRestClient_PostBoxApi/_find_all/returns_post_boxes.yml +73 -0
  69. data/spec/fixtures/vcr/EasybillRestClient_PostBoxApi/_post_boxes_get/returns_post_boxes.yml +52 -0
  70. data/spec/integration/.customer_api_spec.rb.swn +0 -0
  71. data/spec/integration/.customer_api_spec.rb.swo +0 -0
  72. data/spec/integration/customer_api_spec.rb +47 -0
  73. data/spec/integration/easybill_rest_client/document_api_spec.rb +129 -0
  74. data/spec/integration/easybill_rest_client/document_payment_api_spec.rb +55 -0
  75. data/spec/integration/easybill_rest_client/post_box_api_spec.rb +31 -0
  76. data/spec/lib/easybill_rest_client/.api_client_spec.rb.swp +0 -0
  77. data/spec/lib/easybill_rest_client/easybill_rest_api/.generic_api_spec.rb.swp +0 -0
  78. data/spec/lib/easybill_rest_client/generic_api_spec.rb +55 -0
  79. data/spec/lib/easybill_rest_client/pdf_spec.rb +29 -0
  80. data/spec/lib/easybill_rest_client/request_logger_spec.rb +14 -0
  81. data/spec/lib/easybill_rest_client/request_spec.rb +32 -0
  82. data/spec/lib/easybill_rest_client/retry_on_spec.rb +37 -0
  83. data/spec/spec_helper.rb +33 -0
  84. data/spec/support/.setup_api_client.rb.swo +0 -0
  85. data/spec/support/setup_client.rb +12 -0
  86. data/swagger.json +3964 -0
  87. metadata +257 -0
@@ -0,0 +1,460 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: get
5
+ uri: https://api.easybill.de/rest/v1/customers?number=test-123
6
+ body:
7
+ encoding: US-ASCII
8
+ string: ''
9
+ headers:
10
+ User-Agent:
11
+ - ruby-swagger-0.0.1
12
+ Content-Type:
13
+ - application/json
14
+ Accept:
15
+ - application/json
16
+ Authorization:
17
+ - Basic easybill-basic-auth-key
18
+ response:
19
+ status:
20
+ code: 200
21
+ message: OK
22
+ headers:
23
+ Server:
24
+ - nginx/1.8.1
25
+ Date:
26
+ - Mon, 22 Feb 2016 10:45:44 GMT
27
+ Content-Type:
28
+ - application/json
29
+ Transfer-Encoding:
30
+ - chunked
31
+ Connection:
32
+ - keep-alive
33
+ Vary:
34
+ - Accept-Encoding
35
+ - Accept-Encoding
36
+ Cache-Control:
37
+ - private, must-revalidate
38
+ Pragma:
39
+ - no-cache
40
+ Expires:
41
+ - "-1"
42
+ Strict-Transport-Security:
43
+ - max-age=31536000
44
+ body:
45
+ encoding: UTF-8
46
+ string: '{"page":1,"pages":0,"limit":100,"total":0,"items":[]}'
47
+ http_version:
48
+ recorded_at: Mon, 22 Feb 2016 10:45:44 GMT
49
+ - request:
50
+ method: post
51
+ uri: https://api.easybill.de/rest/v1/customers
52
+ body:
53
+ encoding: UTF-8
54
+ string: '{"number":"test-123","company_name":"ACME Inc.","last_name":"Patternman"}'
55
+ headers:
56
+ User-Agent:
57
+ - ruby-swagger-0.0.1
58
+ Content-Type:
59
+ - application/json
60
+ Accept:
61
+ - application/json
62
+ Authorization:
63
+ - Basic easybill-basic-auth-key
64
+ response:
65
+ status:
66
+ code: 201
67
+ message: Created
68
+ headers:
69
+ Server:
70
+ - nginx/1.8.1
71
+ Date:
72
+ - Mon, 22 Feb 2016 10:45:44 GMT
73
+ Content-Type:
74
+ - application/json
75
+ Transfer-Encoding:
76
+ - chunked
77
+ Connection:
78
+ - keep-alive
79
+ Cache-Control:
80
+ - private, must-revalidate
81
+ Pragma:
82
+ - no-cache
83
+ Expires:
84
+ - "-1"
85
+ Strict-Transport-Security:
86
+ - max-age=31536000
87
+ body:
88
+ encoding: UTF-8
89
+ string: '{"acquire_options":null,"bank_account":null,"bank_account_owner":null,"bank_bic":null,"bank_code":null,"bank_iban":null,"bank_name":null,"birth_date":null,"cash_allowance":null,"cash_allowance_days":"0","cash_discount":null,"cash_discount_type":null,"city":null,"company_name":"ACME
90
+ Inc.","country":null,"delivery_city":null,"delivery_company_name":null,"delivery_country":null,"delivery_first_name":null,"delivery_last_name":null,"delivery_personal":null,"delivery_salutation":"0","delivery_street":null,"delivery_suffix_1":null,"delivery_suffix_2":null,"delivery_zip_code":null,"emails":[],"fax":null,"first_name":null,"grace_period":null,"group_id":null,"id":56536920,"info_1":null,"info_2":null,"internet":null,"last_name":"Patternman","mobile":null,"note":null,"number":"test-123","payment_options":null,"personal":false,"phone_1":null,"phone_2":null,"postbox":null,"postbox_city":null,"postbox_country":null,"postbox_zip_code":null,"sale_price_level":null,"salutation":"0","sepa_agreement":null,"sepa_agreement_date":null,"sepa_mandate_reference":"test-123","since_date":null,"street":null,"suffix_1":null,"suffix_2":null,"tax_number":null,"tax_options":null,"title":null,"vat_identifier":null,"zip_code":null}'
91
+ http_version:
92
+ recorded_at: Mon, 22 Feb 2016 10:45:44 GMT
93
+ - request:
94
+ method: post
95
+ uri: https://api.easybill.de/rest/v1/documents
96
+ body:
97
+ encoding: UTF-8
98
+ string: '{"amount":12345,"customer_id":56536920}'
99
+ headers:
100
+ User-Agent:
101
+ - ruby-swagger-0.0.1
102
+ Content-Type:
103
+ - application/json
104
+ Accept:
105
+ - application/json
106
+ Authorization:
107
+ - Basic easybill-basic-auth-key
108
+ response:
109
+ status:
110
+ code: 201
111
+ message: Created
112
+ headers:
113
+ Server:
114
+ - nginx/1.8.1
115
+ Date:
116
+ - Mon, 22 Feb 2016 10:45:44 GMT
117
+ Content-Type:
118
+ - application/json
119
+ Transfer-Encoding:
120
+ - chunked
121
+ Connection:
122
+ - keep-alive
123
+ Cache-Control:
124
+ - private, must-revalidate
125
+ Pragma:
126
+ - no-cache
127
+ Expires:
128
+ - "-1"
129
+ Strict-Transport-Security:
130
+ - max-age=31536000
131
+ body:
132
+ encoding: UTF-8
133
+ string: '{"address":{"city":null,"company_name":"ACME Inc.","country":null,"first_name":null,"last_name":"Patternman","personal":false,"salutation":"0","street":null,"suffix_1":null,"suffix_2":null,"title":null,"zip_code":null},"amount":0,"amount_net":0,"bank_debit_form":null,"cash_allowance":null,"cash_allowance_days":null,"cash_allowance_text":null,"contact_id":null,"contact_label":"","contact_text":"","created_at":"2016-02-22
134
+ 11:45:44","currency":"EUR","customer_id":56536920,"discount":null,"discount_type":null,"document_date":"2016-02-22","due_date":null,"edited_at":"2016-02-22
135
+ 11:45:44","grace_period":10,"id":67644362,"is_archive":false,"is_draft":true,"items":[],"label_address":{"city":null,"company_name":null,"country":null,"first_name":null,"last_name":null,"personal":null,"salutation":"0","street":null,"suffix_1":null,"suffix_2":null,"zip_code":null},"last_postbox_id":null,"number":null,"paid_amount":0,"paid_at":null,"pdf_pages":1,"pdf_template":null,"project_id":null,"ref_id":null,"service_date":{"type":"DEFAULT","date":"2016-02-22","date_from":null,"date_to":null,"text":null},"status":null,"text":"","text_prefix":"","title":null,"type":"INVOICE","use_shipping_address":false,"vat_option":null}'
136
+ http_version:
137
+ recorded_at: Mon, 22 Feb 2016 10:45:44 GMT
138
+ - request:
139
+ method: put
140
+ uri: https://api.easybill.de/rest/v1/documents/67644362/done
141
+ body:
142
+ encoding: US-ASCII
143
+ string: ''
144
+ headers:
145
+ User-Agent:
146
+ - ruby-swagger-0.0.1
147
+ Content-Type:
148
+ - application/json
149
+ Accept:
150
+ - application/json
151
+ Authorization:
152
+ - Basic easybill-basic-auth-key
153
+ response:
154
+ status:
155
+ code: 200
156
+ message: OK
157
+ headers:
158
+ Server:
159
+ - nginx/1.8.1
160
+ Date:
161
+ - Mon, 22 Feb 2016 10:45:45 GMT
162
+ Content-Type:
163
+ - application/json
164
+ Transfer-Encoding:
165
+ - chunked
166
+ Connection:
167
+ - keep-alive
168
+ Vary:
169
+ - Accept-Encoding
170
+ - Accept-Encoding
171
+ Cache-Control:
172
+ - private, must-revalidate
173
+ Pragma:
174
+ - no-cache
175
+ Expires:
176
+ - "-1"
177
+ Strict-Transport-Security:
178
+ - max-age=31536000
179
+ body:
180
+ encoding: UTF-8
181
+ string: '{"address":{"city":null,"company_name":"ACME Inc.","country":null,"first_name":null,"last_name":"Patternman","personal":false,"salutation":"0","street":null,"suffix_1":null,"suffix_2":null,"title":null,"zip_code":null},"amount":0,"amount_net":0,"bank_debit_form":null,"cash_allowance":null,"cash_allowance_days":null,"cash_allowance_text":null,"contact_id":null,"contact_label":null,"contact_text":null,"created_at":"2016-02-22
182
+ 11:45:44","currency":"EUR","customer_id":56536920,"discount":null,"discount_type":null,"document_date":"2016-02-22","due_date":"2016-03-03","edited_at":"2016-02-22
183
+ 11:45:45","grace_period":10,"id":67644362,"is_archive":false,"is_draft":false,"items":[],"label_address":{"city":null,"company_name":null,"country":null,"first_name":null,"last_name":null,"personal":null,"salutation":"0","street":null,"suffix_1":null,"suffix_2":null,"zip_code":null},"last_postbox_id":null,"number":"C1602-13421","paid_amount":0,"paid_at":null,"pdf_pages":1,"pdf_template":null,"project_id":null,"ref_id":null,"service_date":{"type":"DEFAULT","date":"2016-02-22","date_from":null,"date_to":null,"text":null},"status":null,"text":null,"text_prefix":null,"title":null,"type":"INVOICE","use_shipping_address":false,"vat_option":null}'
184
+ http_version:
185
+ recorded_at: Mon, 22 Feb 2016 10:45:45 GMT
186
+ - request:
187
+ method: post
188
+ uri: https://api.easybill.de/rest/v1/document-payments
189
+ body:
190
+ encoding: UTF-8
191
+ string: '{"document_id":67644362,"amount":12345,"payment_at":"2016-02-22 00:00:00
192
+ UTC"}'
193
+ headers:
194
+ User-Agent:
195
+ - ruby-swagger-0.0.1
196
+ Content-Type:
197
+ - application/json
198
+ Accept:
199
+ - application/json
200
+ Authorization:
201
+ - Basic easybill-basic-auth-key
202
+ response:
203
+ status:
204
+ code: 201
205
+ message: Created
206
+ headers:
207
+ Server:
208
+ - nginx/1.8.1
209
+ Date:
210
+ - Mon, 22 Feb 2016 10:45:45 GMT
211
+ Content-Type:
212
+ - application/json
213
+ Transfer-Encoding:
214
+ - chunked
215
+ Connection:
216
+ - keep-alive
217
+ Cache-Control:
218
+ - private, must-revalidate
219
+ Pragma:
220
+ - no-cache
221
+ Expires:
222
+ - "-1"
223
+ Strict-Transport-Security:
224
+ - max-age=31536000
225
+ body:
226
+ encoding: UTF-8
227
+ string: '{"amount":12345,"document_id":67644362,"id":59032526,"notice":null,"payment_at":"2016-02-22","type":null}'
228
+ http_version:
229
+ recorded_at: Mon, 22 Feb 2016 10:45:45 GMT
230
+ - request:
231
+ method: get
232
+ uri: https://api.easybill.de/rest/v1/customers?number=test-123
233
+ body:
234
+ encoding: US-ASCII
235
+ string: ''
236
+ headers:
237
+ User-Agent:
238
+ - ruby-swagger-0.0.1
239
+ Content-Type:
240
+ - application/json
241
+ Accept:
242
+ - application/json
243
+ Authorization:
244
+ - Basic easybill-basic-auth-key
245
+ response:
246
+ status:
247
+ code: 200
248
+ message: OK
249
+ headers:
250
+ Server:
251
+ - nginx/1.8.1
252
+ Date:
253
+ - Mon, 22 Feb 2016 10:45:45 GMT
254
+ Content-Type:
255
+ - application/json
256
+ Transfer-Encoding:
257
+ - chunked
258
+ Connection:
259
+ - keep-alive
260
+ Vary:
261
+ - Accept-Encoding
262
+ - Accept-Encoding
263
+ Cache-Control:
264
+ - private, must-revalidate
265
+ Pragma:
266
+ - no-cache
267
+ Expires:
268
+ - "-1"
269
+ Strict-Transport-Security:
270
+ - max-age=31536000
271
+ body:
272
+ encoding: UTF-8
273
+ string: '{"page":1,"pages":1,"limit":100,"total":1,"items":[{"acquire_options":null,"bank_account":null,"bank_account_owner":null,"bank_bic":null,"bank_code":null,"bank_iban":null,"bank_name":null,"birth_date":null,"cash_allowance":null,"cash_allowance_days":"0","cash_discount":null,"cash_discount_type":null,"city":null,"company_name":"ACME
274
+ Inc.","country":null,"delivery_city":null,"delivery_company_name":null,"delivery_country":null,"delivery_first_name":null,"delivery_last_name":null,"delivery_personal":null,"delivery_salutation":"0","delivery_street":null,"delivery_suffix_1":null,"delivery_suffix_2":null,"delivery_zip_code":null,"emails":[],"fax":null,"first_name":null,"grace_period":null,"group_id":null,"id":56536920,"info_1":null,"info_2":null,"internet":null,"last_name":"Patternman","mobile":null,"note":null,"number":"test-123","payment_options":null,"personal":false,"phone_1":null,"phone_2":null,"postbox":null,"postbox_city":null,"postbox_country":null,"postbox_zip_code":null,"sale_price_level":null,"salutation":"0","sepa_agreement":null,"sepa_agreement_date":null,"sepa_mandate_reference":"test-123","since_date":null,"street":null,"suffix_1":null,"suffix_2":null,"tax_number":null,"tax_options":null,"title":null,"vat_identifier":null,"zip_code":null}]}'
275
+ http_version:
276
+ recorded_at: Mon, 22 Feb 2016 10:45:45 GMT
277
+ - request:
278
+ method: post
279
+ uri: https://api.easybill.de/rest/v1/documents
280
+ body:
281
+ encoding: UTF-8
282
+ string: '{"amount":23456,"customer_id":56536920}'
283
+ headers:
284
+ User-Agent:
285
+ - ruby-swagger-0.0.1
286
+ Content-Type:
287
+ - application/json
288
+ Accept:
289
+ - application/json
290
+ Authorization:
291
+ - Basic easybill-basic-auth-key
292
+ response:
293
+ status:
294
+ code: 201
295
+ message: Created
296
+ headers:
297
+ Server:
298
+ - nginx/1.8.1
299
+ Date:
300
+ - Mon, 22 Feb 2016 10:45:46 GMT
301
+ Content-Type:
302
+ - application/json
303
+ Transfer-Encoding:
304
+ - chunked
305
+ Connection:
306
+ - keep-alive
307
+ Cache-Control:
308
+ - private, must-revalidate
309
+ Pragma:
310
+ - no-cache
311
+ Expires:
312
+ - "-1"
313
+ Strict-Transport-Security:
314
+ - max-age=31536000
315
+ body:
316
+ encoding: UTF-8
317
+ string: '{"address":{"city":null,"company_name":"ACME Inc.","country":null,"first_name":null,"last_name":"Patternman","personal":false,"salutation":"0","street":null,"suffix_1":null,"suffix_2":null,"title":null,"zip_code":null},"amount":0,"amount_net":0,"bank_debit_form":null,"cash_allowance":null,"cash_allowance_days":null,"cash_allowance_text":null,"contact_id":null,"contact_label":"","contact_text":"","created_at":"2016-02-22
318
+ 11:45:45","currency":"EUR","customer_id":56536920,"discount":null,"discount_type":null,"document_date":"2016-02-22","due_date":null,"edited_at":"2016-02-22
319
+ 11:45:46","grace_period":10,"id":67644370,"is_archive":false,"is_draft":true,"items":[],"label_address":{"city":null,"company_name":null,"country":null,"first_name":null,"last_name":null,"personal":null,"salutation":"0","street":null,"suffix_1":null,"suffix_2":null,"zip_code":null},"last_postbox_id":null,"number":null,"paid_amount":0,"paid_at":null,"pdf_pages":1,"pdf_template":null,"project_id":null,"ref_id":null,"service_date":{"type":"DEFAULT","date":"2016-02-22","date_from":null,"date_to":null,"text":null},"status":null,"text":"","text_prefix":"","title":null,"type":"INVOICE","use_shipping_address":false,"vat_option":null}'
320
+ http_version:
321
+ recorded_at: Mon, 22 Feb 2016 10:45:46 GMT
322
+ - request:
323
+ method: put
324
+ uri: https://api.easybill.de/rest/v1/documents/67644370/done
325
+ body:
326
+ encoding: US-ASCII
327
+ string: ''
328
+ headers:
329
+ User-Agent:
330
+ - ruby-swagger-0.0.1
331
+ Content-Type:
332
+ - application/json
333
+ Accept:
334
+ - application/json
335
+ Authorization:
336
+ - Basic easybill-basic-auth-key
337
+ response:
338
+ status:
339
+ code: 200
340
+ message: OK
341
+ headers:
342
+ Server:
343
+ - nginx/1.8.1
344
+ Date:
345
+ - Mon, 22 Feb 2016 10:45:46 GMT
346
+ Content-Type:
347
+ - application/json
348
+ Transfer-Encoding:
349
+ - chunked
350
+ Connection:
351
+ - keep-alive
352
+ Vary:
353
+ - Accept-Encoding
354
+ - Accept-Encoding
355
+ Cache-Control:
356
+ - private, must-revalidate
357
+ Pragma:
358
+ - no-cache
359
+ Expires:
360
+ - "-1"
361
+ Strict-Transport-Security:
362
+ - max-age=31536000
363
+ body:
364
+ encoding: UTF-8
365
+ string: '{"address":{"city":null,"company_name":"ACME Inc.","country":null,"first_name":null,"last_name":"Patternman","personal":false,"salutation":"0","street":null,"suffix_1":null,"suffix_2":null,"title":null,"zip_code":null},"amount":0,"amount_net":0,"bank_debit_form":null,"cash_allowance":null,"cash_allowance_days":null,"cash_allowance_text":null,"contact_id":null,"contact_label":null,"contact_text":null,"created_at":"2016-02-22
366
+ 11:45:45","currency":"EUR","customer_id":56536920,"discount":null,"discount_type":null,"document_date":"2016-02-22","due_date":"2016-03-03","edited_at":"2016-02-22
367
+ 11:45:46","grace_period":10,"id":67644370,"is_archive":false,"is_draft":false,"items":[],"label_address":{"city":null,"company_name":null,"country":null,"first_name":null,"last_name":null,"personal":null,"salutation":"0","street":null,"suffix_1":null,"suffix_2":null,"zip_code":null},"last_postbox_id":null,"number":"C1602-13422","paid_amount":0,"paid_at":null,"pdf_pages":1,"pdf_template":null,"project_id":null,"ref_id":null,"service_date":{"type":"DEFAULT","date":"2016-02-22","date_from":null,"date_to":null,"text":null},"status":null,"text":null,"text_prefix":null,"title":null,"type":"INVOICE","use_shipping_address":false,"vat_option":null}'
368
+ http_version:
369
+ recorded_at: Mon, 22 Feb 2016 10:45:46 GMT
370
+ - request:
371
+ method: post
372
+ uri: https://api.easybill.de/rest/v1/document-payments
373
+ body:
374
+ encoding: UTF-8
375
+ string: '{"document_id":67644370,"amount":23456,"payment_at":"2016-02-22 00:00:00
376
+ UTC"}'
377
+ headers:
378
+ User-Agent:
379
+ - ruby-swagger-0.0.1
380
+ Content-Type:
381
+ - application/json
382
+ Accept:
383
+ - application/json
384
+ Authorization:
385
+ - Basic easybill-basic-auth-key
386
+ response:
387
+ status:
388
+ code: 201
389
+ message: Created
390
+ headers:
391
+ Server:
392
+ - nginx/1.8.1
393
+ Date:
394
+ - Mon, 22 Feb 2016 10:45:46 GMT
395
+ Content-Type:
396
+ - application/json
397
+ Transfer-Encoding:
398
+ - chunked
399
+ Connection:
400
+ - keep-alive
401
+ Cache-Control:
402
+ - private, must-revalidate
403
+ Pragma:
404
+ - no-cache
405
+ Expires:
406
+ - "-1"
407
+ Strict-Transport-Security:
408
+ - max-age=31536000
409
+ body:
410
+ encoding: UTF-8
411
+ string: '{"amount":23456,"document_id":67644370,"id":59032531,"notice":null,"payment_at":"2016-02-22","type":null}'
412
+ http_version:
413
+ recorded_at: Mon, 22 Feb 2016 10:45:46 GMT
414
+ - request:
415
+ method: get
416
+ uri: https://api.easybill.de/rest/v1/document-payments?document_id=67644362
417
+ body:
418
+ encoding: US-ASCII
419
+ string: ''
420
+ headers:
421
+ User-Agent:
422
+ - ruby-swagger-0.0.1
423
+ Content-Type:
424
+ - application/json
425
+ Accept:
426
+ - application/json
427
+ Authorization:
428
+ - Basic easybill-basic-auth-key
429
+ response:
430
+ status:
431
+ code: 200
432
+ message: OK
433
+ headers:
434
+ Server:
435
+ - nginx/1.8.1
436
+ Date:
437
+ - Mon, 22 Feb 2016 10:45:46 GMT
438
+ Content-Type:
439
+ - application/json
440
+ Transfer-Encoding:
441
+ - chunked
442
+ Connection:
443
+ - keep-alive
444
+ Vary:
445
+ - Accept-Encoding
446
+ - Accept-Encoding
447
+ Cache-Control:
448
+ - private, must-revalidate
449
+ Pragma:
450
+ - no-cache
451
+ Expires:
452
+ - "-1"
453
+ Strict-Transport-Security:
454
+ - max-age=31536000
455
+ body:
456
+ encoding: UTF-8
457
+ string: '{"page":1,"pages":1,"limit":100,"total":1,"items":[{"amount":12345,"document_id":67644362,"id":59032526,"notice":null,"payment_at":"2016-02-22","type":null}]}'
458
+ http_version:
459
+ recorded_at: Mon, 22 Feb 2016 10:45:46 GMT
460
+ recorded_with: VCR 3.0.1
@@ -0,0 +1,47 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: post
5
+ uri: https://api.easybill.de/rest/v1/document-payments
6
+ body:
7
+ encoding: UTF-8
8
+ string: '{"document_id":61145172,"amount":1,"payment_at":"2016-01-11 14:17:31
9
+ UTC"}'
10
+ headers:
11
+ User-Agent:
12
+ - ruby-swagger-0.0.1
13
+ Content-Type:
14
+ - application/json
15
+ Accept:
16
+ - application/json
17
+ Authorization:
18
+ - Basic easybill-basic-auth-key
19
+ response:
20
+ status:
21
+ code: 201
22
+ message: Created
23
+ headers:
24
+ Server:
25
+ - nginx/1.8.0
26
+ Date:
27
+ - Mon, 11 Jan 2016 13:17:32 GMT
28
+ Content-Type:
29
+ - application/json
30
+ Transfer-Encoding:
31
+ - chunked
32
+ Connection:
33
+ - keep-alive
34
+ Cache-Control:
35
+ - private, must-revalidate
36
+ Pragma:
37
+ - no-cache
38
+ Expires:
39
+ - "-1"
40
+ Strict-Transport-Security:
41
+ - max-age=31536000
42
+ body:
43
+ encoding: UTF-8
44
+ string: '{"amount":1,"document_id":61145172,"id":53744398,"notice":null,"payment_at":"2016-01-11","type":null}'
45
+ http_version:
46
+ recorded_at: Mon, 11 Jan 2016 13:17:32 GMT
47
+ recorded_with: VCR 3.0.1
@@ -0,0 +1,66 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: get
5
+ uri: https://api.easybill.de/rest/v1/document-payments/74692458
6
+ body:
7
+ encoding: US-ASCII
8
+ string: ''
9
+ headers:
10
+ User-Agent:
11
+ - Faraday v0.9.2
12
+ Authorization:
13
+ - Basic easybill-basic-auth-key
14
+ Accept-Encoding:
15
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
16
+ Accept:
17
+ - "*/*"
18
+ response:
19
+ status:
20
+ code: 200
21
+ message: OK
22
+ headers:
23
+ Server:
24
+ - nginx
25
+ Date:
26
+ - Fri, 10 Jun 2016 10:58:57 GMT
27
+ Content-Type:
28
+ - application/json
29
+ Transfer-Encoding:
30
+ - chunked
31
+ Connection:
32
+ - keep-alive
33
+ Vary:
34
+ - Accept-Encoding
35
+ - Accept-Encoding
36
+ Cache-Control:
37
+ - private, must-revalidate
38
+ Pragma:
39
+ - no-cache
40
+ Expires:
41
+ - "-1"
42
+ Strict-Transport-Security:
43
+ - max-age=31536000
44
+ X-Frame-Options:
45
+ - SAMEORIGIN
46
+ X-Content-Type-Options:
47
+ - nosniff
48
+ X-Xss-Protection:
49
+ - 1; mode=block
50
+ Content-Security-Policy:
51
+ - 'default-src ''self''; connect-src ''self'' *.easybill.de *.paymill.de *.paymill.com;
52
+ script-src ''self'' ''unsafe-inline'' ''unsafe-eval'' *.paymill.de *.paymill.com
53
+ *.google-analytics.com *.googleadservices.com d2wy8f7a9ursnm.cloudfront.net;
54
+ img-src ''self'' data: *.doubleclick.net notify.bugsnag.com *.paypalobjects.com
55
+ online.swagger.io *.google-analytics.com *.google.com *.google.de *.google.at
56
+ *.google.ch; style-src ''self'' ''unsafe-inline'' fonts.googleapis.com; font-src
57
+ ''self'' themes.googleusercontent.com fonts.gstatic.com; frame-src ''self''
58
+ *.googleadservices.com ssl.kaptcha.com *.paymill.de *.paymill.com *.mediafinanz.de
59
+ *.google.de *.google.com *.google.at *.google.ch *.doubleclick.net player.vimeo.com
60
+ *.facebook.com; object-src ''self'''
61
+ body:
62
+ encoding: ASCII-8BIT
63
+ string: '{"amount":3367,"document_id":84730384,"id":74692458,"notice":"Blah!","payment_at":"2016-06-10","type":"\u00dcberweisung"}'
64
+ http_version:
65
+ recorded_at: Fri, 10 Jun 2016 10:58:57 GMT
66
+ recorded_with: VCR 3.0.3
@@ -0,0 +1,66 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: get
5
+ uri: https://api.easybill.de/rest/v1/document-payments?limit=1000&page=1
6
+ body:
7
+ encoding: US-ASCII
8
+ string: ''
9
+ headers:
10
+ User-Agent:
11
+ - Faraday v0.9.2
12
+ Authorization:
13
+ - Basic easybill-basic-auth-key
14
+ Accept-Encoding:
15
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
16
+ Accept:
17
+ - "*/*"
18
+ response:
19
+ status:
20
+ code: 200
21
+ message: OK
22
+ headers:
23
+ Server:
24
+ - nginx
25
+ Date:
26
+ - Fri, 10 Jun 2016 10:57:54 GMT
27
+ Content-Type:
28
+ - application/json
29
+ Transfer-Encoding:
30
+ - chunked
31
+ Connection:
32
+ - keep-alive
33
+ Vary:
34
+ - Accept-Encoding
35
+ - Accept-Encoding
36
+ Cache-Control:
37
+ - private, must-revalidate
38
+ Pragma:
39
+ - no-cache
40
+ Expires:
41
+ - "-1"
42
+ Strict-Transport-Security:
43
+ - max-age=31536000
44
+ X-Frame-Options:
45
+ - SAMEORIGIN
46
+ X-Content-Type-Options:
47
+ - nosniff
48
+ X-Xss-Protection:
49
+ - 1; mode=block
50
+ Content-Security-Policy:
51
+ - 'default-src ''self''; connect-src ''self'' *.easybill.de *.paymill.de *.paymill.com;
52
+ script-src ''self'' ''unsafe-inline'' ''unsafe-eval'' *.paymill.de *.paymill.com
53
+ *.google-analytics.com *.googleadservices.com d2wy8f7a9ursnm.cloudfront.net;
54
+ img-src ''self'' data: *.doubleclick.net notify.bugsnag.com *.paypalobjects.com
55
+ online.swagger.io *.google-analytics.com *.google.com *.google.de *.google.at
56
+ *.google.ch; style-src ''self'' ''unsafe-inline'' fonts.googleapis.com; font-src
57
+ ''self'' themes.googleusercontent.com fonts.gstatic.com; frame-src ''self''
58
+ *.googleadservices.com ssl.kaptcha.com *.paymill.de *.paymill.com *.mediafinanz.de
59
+ *.google.de *.google.com *.google.at *.google.ch *.doubleclick.net player.vimeo.com
60
+ *.facebook.com; object-src ''self'''
61
+ body:
62
+ encoding: ASCII-8BIT
63
+ string: '{"page":1,"pages":1,"limit":100,"total":3,"items":[{"amount":2208,"document_id":80136851,"id":70458051,"notice":"","payment_at":"2016-05-13","type":null},{"amount":1800,"document_id":80022376,"id":71078047,"notice":"","payment_at":"2016-05-18","type":null},{"amount":3367,"document_id":84730384,"id":74692458,"notice":"Blah!","payment_at":"2016-06-10","type":"\u00dcberweisung"}]}'
64
+ http_version:
65
+ recorded_at: Fri, 10 Jun 2016 10:57:54 GMT
66
+ recorded_with: VCR 3.0.3