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,212 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: get
5
+ uri: https://api.easybill.de/rest/v1/documents/84727902
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 09:07:20 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: '{"address":{"city":null,"company_name":"Test","country":"DE","first_name":"Test","last_name":"Test","personal":false,"salutation":"0","street":null,"suffix_1":null,"suffix_2":null,"title":null,"zip_code":null},"amount":3367,"amount_net":2829,"bank_debit_form":null,"cancel_id":null,"cash_allowance":null,"cash_allowance_days":null,"cash_allowance_text":null,"contact_id":null,"contact_label":null,"contact_text":null,"created_at":"2016-06-10
64
+ 11:03:44","currency":"EUR","customer_id":25699514,"discount":null,"discount_type":null,"document_date":"2016-06-10","due_date":"2016-06-20","edited_at":"2016-06-10
65
+ 11:05:52","grace_period":10,"id":84727902,"is_archive":false,"is_draft":false,"items":[{"booking_account":null,"cost_price_charge":null,"cost_price_charge_type":"AMOUNT","cost_price_net":null,"cost_price_total":null,"description":"Foo","discount":null,"discount_type":null,"export_cost_1":null,"export_cost_2":null,"id":173321720,"number":"1","position":1,"position_id":null,"quantity":23,"serial_number":null,"serial_number_id":null,"single_price_gross":146.37,"single_price_net":123,"total_price_gross":3366.51,"total_price_net":2829,"total_vat":537.51,"type":"POSITION","unit":null,"vat_percent":19}],"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":"C1606-16180","paid_amount":0,"paid_at":null,"pdf_pages":1,"pdf_template":"DE","project_id":null,"ref_id":null,"service_date":{"type":"DEFAULT","date":"2016-06-10","date_from":null,"date_to":null,"text":null},"status":null,"text":"Vielen
66
+ Dank f\u00fcr Ihren Auftrag!\u003Cbr\u003E\u003Cbr\u003EBitte begleichen Sie
67
+ den offenen Betrag bis zum %DOKUMENT.DATUM-FAELLIG%.\u003Cbr\u003E\u003Cbr\u003EMit
68
+ freundlichen Gr\u00fc\u00dfen\u003Cbr\u003E\u003Cbr\u003E%FIRMA.FIRMA%\u003Cbr\u003E","text_prefix":"%KUNDE.ANREDE%,\u003Cbr\u003Enachfolgend
69
+ berechnen wir Ihnen wie vorab besprochen:\u003Cbr\u003E","title":null,"type":"INVOICE","use_shipping_address":false,"vat_option":null}'
70
+ http_version:
71
+ recorded_at: Fri, 10 Jun 2016 09:07:20 GMT
72
+ - request:
73
+ method: post
74
+ uri: https://api.easybill.de/rest/v1/documents/84727902/cancel
75
+ body:
76
+ encoding: UTF-8
77
+ string: "{}"
78
+ headers:
79
+ User-Agent:
80
+ - Faraday v0.9.2
81
+ Authorization:
82
+ - Basic easybill-basic-auth-key
83
+ Content-Type:
84
+ - application/x-www-form-urlencoded
85
+ Accept-Encoding:
86
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
87
+ Accept:
88
+ - "*/*"
89
+ response:
90
+ status:
91
+ code: 200
92
+ message: OK
93
+ headers:
94
+ Server:
95
+ - nginx
96
+ Date:
97
+ - Fri, 10 Jun 2016 09:07:21 GMT
98
+ Content-Type:
99
+ - application/json
100
+ Transfer-Encoding:
101
+ - chunked
102
+ Connection:
103
+ - keep-alive
104
+ Vary:
105
+ - Accept-Encoding
106
+ - Accept-Encoding
107
+ Cache-Control:
108
+ - private, must-revalidate
109
+ Pragma:
110
+ - no-cache
111
+ Expires:
112
+ - "-1"
113
+ Strict-Transport-Security:
114
+ - max-age=31536000
115
+ X-Frame-Options:
116
+ - SAMEORIGIN
117
+ X-Content-Type-Options:
118
+ - nosniff
119
+ X-Xss-Protection:
120
+ - 1; mode=block
121
+ Content-Security-Policy:
122
+ - 'default-src ''self''; connect-src ''self'' *.easybill.de *.paymill.de *.paymill.com;
123
+ script-src ''self'' ''unsafe-inline'' ''unsafe-eval'' *.paymill.de *.paymill.com
124
+ *.google-analytics.com *.googleadservices.com d2wy8f7a9ursnm.cloudfront.net;
125
+ img-src ''self'' data: *.doubleclick.net notify.bugsnag.com *.paypalobjects.com
126
+ online.swagger.io *.google-analytics.com *.google.com *.google.de *.google.at
127
+ *.google.ch; style-src ''self'' ''unsafe-inline'' fonts.googleapis.com; font-src
128
+ ''self'' themes.googleusercontent.com fonts.gstatic.com; frame-src ''self''
129
+ *.googleadservices.com ssl.kaptcha.com *.paymill.de *.paymill.com *.mediafinanz.de
130
+ *.google.de *.google.com *.google.at *.google.ch *.doubleclick.net player.vimeo.com
131
+ *.facebook.com; object-src ''self'''
132
+ body:
133
+ encoding: ASCII-8BIT
134
+ string: '{"address":{"city":null,"company_name":"Test","country":"DE","first_name":"Test","last_name":"Test","personal":false,"salutation":"0","street":null,"suffix_1":null,"suffix_2":null,"title":null,"zip_code":null},"amount":-3367,"amount_net":-2829,"bank_debit_form":null,"cancel_id":null,"cash_allowance":null,"cash_allowance_days":null,"cash_allowance_text":null,"contact_id":null,"contact_label":null,"contact_text":null,"created_at":"2016-06-10
135
+ 11:07:20","currency":"EUR","customer_id":25699514,"discount":0,"discount_type":null,"document_date":"2016-06-10","due_date":null,"edited_at":"2016-06-10
136
+ 11:07:21","grace_period":10,"id":84728555,"is_archive":false,"is_draft":false,"items":[],"label_address":{},"last_postbox_id":null,"number":"C1606-16180","paid_amount":0,"paid_at":null,"pdf_pages":1,"pdf_template":"DE","project_id":null,"ref_id":84727902,"status":null,"text":"Vielen
137
+ Dank f\u00fcr Ihren Auftrag!\u003Cbr\u003E\u003Cbr\u003EBitte begleichen Sie
138
+ den offenen Betrag bis zum %DOKUMENT.DATUM-FAELLIG%.\u003Cbr\u003E\u003Cbr\u003EMit
139
+ freundlichen Gr\u00fc\u00dfen\u003Cbr\u003E\u003Cbr\u003E%FIRMA.FIRMA%\u003Cbr\u003E","text_prefix":"%KUNDE.ANREDE%,\u003Cbr\u003Enachfolgend
140
+ berechnen wir Ihnen wie vorab besprochen:\u003Cbr\u003E","title":null,"type":"STORNO","use_shipping_address":false,"vat_option":null}'
141
+ http_version:
142
+ recorded_at: Fri, 10 Jun 2016 09:07:21 GMT
143
+ - request:
144
+ method: get
145
+ uri: https://api.easybill.de/rest/v1/documents/84727902
146
+ body:
147
+ encoding: US-ASCII
148
+ string: ''
149
+ headers:
150
+ User-Agent:
151
+ - Faraday v0.9.2
152
+ Authorization:
153
+ - Basic easybill-basic-auth-key
154
+ Accept-Encoding:
155
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
156
+ Accept:
157
+ - "*/*"
158
+ response:
159
+ status:
160
+ code: 200
161
+ message: OK
162
+ headers:
163
+ Server:
164
+ - nginx
165
+ Date:
166
+ - Fri, 10 Jun 2016 09:07:21 GMT
167
+ Content-Type:
168
+ - application/json
169
+ Transfer-Encoding:
170
+ - chunked
171
+ Connection:
172
+ - keep-alive
173
+ Vary:
174
+ - Accept-Encoding
175
+ - Accept-Encoding
176
+ Cache-Control:
177
+ - private, must-revalidate
178
+ Pragma:
179
+ - no-cache
180
+ Expires:
181
+ - "-1"
182
+ Strict-Transport-Security:
183
+ - max-age=31536000
184
+ X-Frame-Options:
185
+ - SAMEORIGIN
186
+ X-Content-Type-Options:
187
+ - nosniff
188
+ X-Xss-Protection:
189
+ - 1; mode=block
190
+ Content-Security-Policy:
191
+ - 'default-src ''self''; connect-src ''self'' *.easybill.de *.paymill.de *.paymill.com;
192
+ script-src ''self'' ''unsafe-inline'' ''unsafe-eval'' *.paymill.de *.paymill.com
193
+ *.google-analytics.com *.googleadservices.com d2wy8f7a9ursnm.cloudfront.net;
194
+ img-src ''self'' data: *.doubleclick.net notify.bugsnag.com *.paypalobjects.com
195
+ online.swagger.io *.google-analytics.com *.google.com *.google.de *.google.at
196
+ *.google.ch; style-src ''self'' ''unsafe-inline'' fonts.googleapis.com; font-src
197
+ ''self'' themes.googleusercontent.com fonts.gstatic.com; frame-src ''self''
198
+ *.googleadservices.com ssl.kaptcha.com *.paymill.de *.paymill.com *.mediafinanz.de
199
+ *.google.de *.google.com *.google.at *.google.ch *.doubleclick.net player.vimeo.com
200
+ *.facebook.com; object-src ''self'''
201
+ body:
202
+ encoding: ASCII-8BIT
203
+ string: '{"address":{"city":null,"company_name":"Test","country":"DE","first_name":"Test","last_name":"Test","personal":false,"salutation":"0","street":null,"suffix_1":null,"suffix_2":null,"title":null,"zip_code":null},"amount":3367,"amount_net":2829,"bank_debit_form":null,"cancel_id":84728555,"cash_allowance":null,"cash_allowance_days":null,"cash_allowance_text":null,"contact_id":null,"contact_label":null,"contact_text":null,"created_at":"2016-06-10
204
+ 11:03:44","currency":"EUR","customer_id":25699514,"discount":null,"discount_type":null,"document_date":"2016-06-10","due_date":"2016-06-20","edited_at":"2016-06-10
205
+ 11:07:21","grace_period":10,"id":84727902,"is_archive":false,"is_draft":false,"items":[{"booking_account":null,"cost_price_charge":null,"cost_price_charge_type":"AMOUNT","cost_price_net":null,"cost_price_total":null,"description":"Foo","discount":null,"discount_type":null,"export_cost_1":null,"export_cost_2":null,"id":173321720,"number":"1","position":1,"position_id":null,"quantity":23,"serial_number":null,"serial_number_id":null,"single_price_gross":146.37,"single_price_net":123,"total_price_gross":3366.51,"total_price_net":2829,"total_vat":537.51,"type":"POSITION","unit":null,"vat_percent":19}],"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":"C1606-16180","paid_amount":0,"paid_at":null,"pdf_pages":1,"pdf_template":"DE","project_id":null,"ref_id":null,"service_date":{"type":"DEFAULT","date":"2016-06-10","date_from":null,"date_to":null,"text":null},"status":null,"text":"Vielen
206
+ Dank f\u00fcr Ihren Auftrag!\u003Cbr\u003E\u003Cbr\u003EBitte begleichen Sie
207
+ den offenen Betrag bis zum %DOKUMENT.DATUM-FAELLIG%.\u003Cbr\u003E\u003Cbr\u003EMit
208
+ freundlichen Gr\u00fc\u00dfen\u003Cbr\u003E\u003Cbr\u003E%FIRMA.FIRMA%\u003Cbr\u003E","text_prefix":"%KUNDE.ANREDE%,\u003Cbr\u003Enachfolgend
209
+ berechnen wir Ihnen wie vorab besprochen:\u003Cbr\u003E","title":null,"type":"INVOICE","use_shipping_address":false,"vat_option":null}'
210
+ http_version:
211
+ recorded_at: Fri, 10 Jun 2016 09:07:21 GMT
212
+ recorded_with: VCR 3.0.3
@@ -0,0 +1,53 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: post
5
+ uri: https://api.easybill.de/rest/v1/documents
6
+ body:
7
+ encoding: UTF-8
8
+ string: '{"items":[],"number":"Y"}'
9
+ headers:
10
+ User-Agent:
11
+ - Faraday v0.9.2
12
+ Authorization:
13
+ - Basic easybill-basic-auth-key
14
+ Content-Type:
15
+ - application/x-www-form-urlencoded
16
+ Accept-Encoding:
17
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
18
+ Accept:
19
+ - "*/*"
20
+ response:
21
+ status:
22
+ code: 201
23
+ message: Created
24
+ headers:
25
+ Server:
26
+ - nginx/1.10.0
27
+ Date:
28
+ - Fri, 06 May 2016 15:42:33 GMT
29
+ Content-Type:
30
+ - application/json
31
+ Transfer-Encoding:
32
+ - chunked
33
+ Connection:
34
+ - keep-alive
35
+ Cache-Control:
36
+ - private, must-revalidate
37
+ Pragma:
38
+ - no-cache
39
+ Expires:
40
+ - "-1"
41
+ Strict-Transport-Security:
42
+ - max-age=31536000
43
+ body:
44
+ encoding: UTF-8
45
+ string: '{"address":{},"amount":0,"amount_net":0,"bank_debit_form":null,"cancel_id":null,"cash_allowance":null,"cash_allowance_days":null,"cash_allowance_text":null,"contact_id":null,"contact_label":"","contact_text":"","created_at":"2016-05-06
46
+ 17:42:33","currency":"EUR","customer_id":null,"discount":null,"discount_type":null,"document_date":"2016-05-06","due_date":null,"edited_at":"2016-05-06
47
+ 17:42:33","grace_period":10,"id":79126074,"is_archive":false,"is_draft":true,"items":[],"label_address":{},"last_postbox_id":null,"number":"Y","paid_amount":0,"paid_at":null,"pdf_pages":1,"pdf_template":null,"project_id":null,"ref_id":null,"service_date":{"type":"DEFAULT","date":"2016-05-06","date_from":null,"date_to":null,"text":null},"status":null,"text":"Vielen
48
+ Dank f\u00fcr Ihren Auftrag!\n\nBitte begleichen Sie den offenen Betrag bis
49
+ zum %DOKUMENT.DATUM-FAELLIG%.\n\nMit freundlichen Gr\u00fc\u00dfen\n\n%FIRMA.FIRMA%","text_prefix":"%KUNDE.ANREDE%,\nnachfolgend
50
+ berechnen wir Ihnen wie vorab besprochen:\n","title":null,"type":"INVOICE","use_shipping_address":false,"vat_option":null}'
51
+ http_version:
52
+ recorded_at: Fri, 06 May 2016 15:42:33 GMT
53
+ recorded_with: VCR 3.0.1
@@ -0,0 +1,174 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: get
5
+ uri: https://api.easybill.de/rest/v1/documents/84718807
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 09:00:13 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: '{"address":{"city":null,"company_name":"Test","country":"DE","first_name":"Test","last_name":"Test","personal":false,"salutation":"0","street":null,"suffix_1":null,"suffix_2":null,"title":null,"zip_code":null},"amount":3367,"amount_net":2829,"bank_debit_form":null,"cancel_id":null,"cash_allowance":null,"cash_allowance_days":null,"cash_allowance_text":null,"contact_id":null,"contact_label":null,"contact_text":null,"created_at":"2016-06-10
64
+ 10:04:38","currency":"EUR","customer_id":25699514,"discount":null,"discount_type":null,"document_date":"2016-06-10","due_date":"2016-06-20","edited_at":"2016-06-10
65
+ 10:05:40","grace_period":10,"id":84718807,"is_archive":false,"is_draft":false,"items":[{"booking_account":null,"cost_price_charge":null,"cost_price_charge_type":"AMOUNT","cost_price_net":null,"cost_price_total":null,"description":"Foo","discount":null,"discount_type":null,"export_cost_1":null,"export_cost_2":null,"id":173300781,"number":"1","position":1,"position_id":null,"quantity":23,"serial_number":null,"serial_number_id":null,"single_price_gross":146.37,"single_price_net":123,"total_price_gross":3366.51,"total_price_net":2829,"total_vat":537.51,"type":"POSITION","unit":null,"vat_percent":19}],"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":58938467,"number":"C1606-16178","paid_amount":0,"paid_at":null,"pdf_pages":1,"pdf_template":"DE","project_id":null,"ref_id":null,"service_date":{"type":"DEFAULT","date":"2016-06-10","date_from":null,"date_to":null,"text":null},"status":null,"text":"Vielen
66
+ Dank f\u00fcr Ihren Auftrag!\u003Cbr\u003E\u003Cbr\u003EBitte begleichen Sie
67
+ den offenen Betrag bis zum %DOKUMENT.DATUM-FAELLIG%.\u003Cbr\u003E\u003Cbr\u003EMit
68
+ freundlichen Gr\u00fc\u00dfen\u003Cbr\u003E\u003Cbr\u003E%FIRMA.FIRMA%\u003Cbr\u003E","text_prefix":"%KUNDE.ANREDE%,\u003Cbr\u003Enachfolgend
69
+ berechnen wir Ihnen wie vorab besprochen:\u003Cbr\u003E","title":null,"type":"INVOICE","use_shipping_address":false,"vat_option":null}'
70
+ http_version:
71
+ recorded_at: Fri, 10 Jun 2016 09:00:13 GMT
72
+ - request:
73
+ method: delete
74
+ uri: https://api.easybill.de/rest/v1/documents/84718807
75
+ body:
76
+ encoding: US-ASCII
77
+ string: ''
78
+ headers:
79
+ User-Agent:
80
+ - Faraday v0.9.2
81
+ Authorization:
82
+ - Basic easybill-basic-auth-key
83
+ Accept-Encoding:
84
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
85
+ Accept:
86
+ - "*/*"
87
+ response:
88
+ status:
89
+ code: 204
90
+ message: No Content
91
+ headers:
92
+ Server:
93
+ - nginx
94
+ Date:
95
+ - Fri, 10 Jun 2016 09:00:14 GMT
96
+ Content-Type:
97
+ - text/html; charset=UTF-8
98
+ Connection:
99
+ - keep-alive
100
+ Cache-Control:
101
+ - private, must-revalidate
102
+ Pragma:
103
+ - no-cache
104
+ Expires:
105
+ - "-1"
106
+ Strict-Transport-Security:
107
+ - max-age=31536000
108
+ X-Frame-Options:
109
+ - SAMEORIGIN
110
+ X-Content-Type-Options:
111
+ - nosniff
112
+ X-Xss-Protection:
113
+ - 1; mode=block
114
+ Content-Security-Policy:
115
+ - 'default-src ''self''; connect-src ''self'' *.easybill.de *.paymill.de *.paymill.com;
116
+ script-src ''self'' ''unsafe-inline'' ''unsafe-eval'' *.paymill.de *.paymill.com
117
+ *.google-analytics.com *.googleadservices.com d2wy8f7a9ursnm.cloudfront.net;
118
+ img-src ''self'' data: *.doubleclick.net notify.bugsnag.com *.paypalobjects.com
119
+ online.swagger.io *.google-analytics.com *.google.com *.google.de *.google.at
120
+ *.google.ch; style-src ''self'' ''unsafe-inline'' fonts.googleapis.com; font-src
121
+ ''self'' themes.googleusercontent.com fonts.gstatic.com; frame-src ''self''
122
+ *.googleadservices.com ssl.kaptcha.com *.paymill.de *.paymill.com *.mediafinanz.de
123
+ *.google.de *.google.com *.google.at *.google.ch *.doubleclick.net player.vimeo.com
124
+ *.facebook.com; object-src ''self'''
125
+ body:
126
+ encoding: UTF-8
127
+ string: ''
128
+ http_version:
129
+ recorded_at: Fri, 10 Jun 2016 09:00:14 GMT
130
+ - request:
131
+ method: get
132
+ uri: https://api.easybill.de/rest/v1/documents/84718807
133
+ body:
134
+ encoding: US-ASCII
135
+ string: ''
136
+ headers:
137
+ User-Agent:
138
+ - Faraday v0.9.2
139
+ Authorization:
140
+ - Basic easybill-basic-auth-key
141
+ Accept-Encoding:
142
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
143
+ Accept:
144
+ - "*/*"
145
+ response:
146
+ status:
147
+ code: 404
148
+ message: Not Found
149
+ headers:
150
+ Server:
151
+ - nginx
152
+ Date:
153
+ - Fri, 10 Jun 2016 09:00:15 GMT
154
+ Content-Type:
155
+ - application/json
156
+ Transfer-Encoding:
157
+ - chunked
158
+ Connection:
159
+ - keep-alive
160
+ Vary:
161
+ - Accept-Encoding
162
+ - Accept-Encoding
163
+ Cache-Control:
164
+ - private, must-revalidate
165
+ Pragma:
166
+ - no-cache
167
+ Expires:
168
+ - "-1"
169
+ body:
170
+ encoding: ASCII-8BIT
171
+ string: '{"code":404,"message":"Document#84718807 not found."}'
172
+ http_version:
173
+ recorded_at: Fri, 10 Jun 2016 09:00:15 GMT
174
+ recorded_with: VCR 3.0.3
@@ -0,0 +1,57 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: get
5
+ uri: https://api.easybill.de/rest/v1/documents/79121874
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/1.10.0
25
+ Date:
26
+ - Fri, 06 May 2016 14:55:04 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: ASCII-8BIT
46
+ string: '{"address":{"city":"Atlantis","company_name":"Yellow Submarine","country":"DE","first_name":"Simon","last_name":"Moon","personal":false,"salutation":"1","street":"Sesame
47
+ Street 23","suffix_1":null,"suffix_2":null,"title":null,"zip_code":"12345"},"amount":119000000,"amount_net":100000000,"bank_debit_form":null,"cancel_id":null,"cash_allowance":null,"cash_allowance_days":null,"cash_allowance_text":null,"contact_id":null,"contact_label":null,"contact_text":null,"created_at":"2016-05-06
48
+ 16:43:03","currency":"EUR","customer_id":65789440,"discount":null,"discount_type":null,"document_date":"2016-05-06","due_date":"2016-05-16","edited_at":"2016-05-06
49
+ 16:45:05","grace_period":10,"id":79121874,"is_archive":false,"is_draft":false,"items":[{"booking_account":null,"cost_price_charge":null,"cost_price_charge_type":"AMOUNT","cost_price_net":null,"cost_price_total":null,"description":"Golden
50
+ apple","discount":null,"discount_type":null,"export_cost_1":null,"export_cost_2":null,"id":161919800,"number":"23","position":1,"position_id":null,"quantity":1,"serial_number":null,"serial_number_id":null,"single_price_gross":119000000,"single_price_net":100000000,"total_price_gross":119000000,"total_price_net":100000000,"total_vat":19000000,"type":"POSITION","unit":null,"vat_percent":19}],"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":"XYZ-123","paid_amount":0,"paid_at":null,"pdf_pages":1,"pdf_template":"DE","project_id":null,"ref_id":null,"service_date":{"type":"DEFAULT","date":"2016-05-06","date_from":null,"date_to":null,"text":null},"status":null,"text":"Vielen
51
+ Dank f\u00fcr Ihren Auftrag!\u003Cbr\u003E\u003Cbr\u003EBitte begleichen Sie
52
+ den offenen Betrag bis zum %DOKUMENT.DATUM-FAELLIG%.\u003Cbr\u003E\u003Cbr\u003EMit
53
+ freundlichen Gr\u00fc\u00dfen\u003Cbr\u003E\u003Cbr\u003E%FIRMA.FIRMA%","text_prefix":"%KUNDE.ANREDE%,\u003Cbr\u003Enachfolgend
54
+ berechnen wir Ihnen wie vorab besprochen:\u003Cbr\u003E","title":null,"type":"INVOICE","use_shipping_address":false,"vat_option":null}'
55
+ http_version:
56
+ recorded_at: Fri, 06 May 2016 14:55:04 GMT
57
+ recorded_with: VCR 3.0.1