fakturan_nu 1.1.3 → 1.1.4

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: e1aecf12957e2e83564e6adb9379d46046227874
4
- data.tar.gz: 933daa1312d1a234a5f4128b7ed45ba48e1cea95
3
+ metadata.gz: 5501ee1e60ab587b727359c3bd163ea3fe3c8442
4
+ data.tar.gz: 86a6c09815b128c03dc479b33e46655e67eb9fb6
5
5
  SHA512:
6
- metadata.gz: ee3462adb38613b79126d689267a9b22b217a596cbf489d51238d9d0665d2003b0362e43a731171bac23a3a6e2730f664f4a4407438ea6b490fdce177aec9324
7
- data.tar.gz: 2cec508ae2f8c9810f323a325632cb14c705baced4b5de301d26b62aa2de9bd176b2d97df1ff3690ad1b9d4cd6773c17e74b85e0ac17a8f7836f6af70ec850cf
6
+ metadata.gz: 6e4e9a54718fd57b108e7b8f7e6697e2b62aa70d9ec2e26e19fe1c0c87d25d0a292661a01aefde065cb6743225f8444a20711b12d916d88112be5a80407e3e41
7
+ data.tar.gz: e838c643cba76d590bc423f6976011d556ea7cdf0de864c53d1c26d0011eeca31dc004c3177bcb059b118087b25f0574aa69081ac50f58429e5d46365d0c073c
data/fakturan_nu.gemspec CHANGED
@@ -1,8 +1,8 @@
1
1
  # -*- encoding: utf-8 -*-
2
2
  Gem::Specification.new do |s|
3
3
  s.name = 'fakturan_nu'
4
- s.version = '1.1.3'
5
- s.date = '2015-04-17'
4
+ s.version = '1.1.4'
5
+ s.date = '2015-04-30'
6
6
  s.summary = 'A ruby client for the Fakturan.nu - API'
7
7
  s.description = 'A ruby client for the Fakturan.nu - API. Fakturan.nu is a webbapp for billing.'
8
8
  s.authors = ['Jonathan Bourque Olivegren']
@@ -3,6 +3,7 @@ module Fakturan
3
3
  class ParseJSON < Faraday::Response::Middleware
4
4
  def parse(body)
5
5
  json = MultiJson.load(body, symbolize_keys: true)
6
+
6
7
  res = {
7
8
  data: json[:data],
8
9
  metadata: json[:paging],
@@ -13,7 +14,11 @@ module Fakturan
13
14
 
14
15
  def on_complete(env)
15
16
  begin # https://github.com/lostisland/faraday/blob/master/lib/faraday/response.rb
16
- env.body = parse(env.body) if env.parse_body?
17
+ if env.parse_body? # If we get a result
18
+ env.body = parse(env.body)
19
+ else # If we get 204 = request fine, but no content returned
20
+ env.body = { data: {}, metadata: {}, errors: {} }
21
+ end
17
22
  rescue MultiJson::ParseError => exception
18
23
  raise Fakturan::Error::ParseError, {:status => env.status, :headers => env.response_headers, :body => env.body}
19
24
  end
data/test/basics_test.rb CHANGED
@@ -10,7 +10,7 @@ module Fakturan
10
10
  def test_auth_with_token_and_back_to_basic
11
11
  basic_auth_endpoint = stub_api_request(:get, '/clients/1').to_return(body: '{"data":{"id": 1, "name":"DCT"}}', status: 200)
12
12
 
13
- token_endpoint = stub_request(:get, "http://#{BASE_URL}/clients/1")
13
+ token_endpoint = stub_request(:get, "#{PROTOCOL}#{BASE_URL}/clients/1")
14
14
  .with(headers: { authorization: "Token token=\"XYZ\""})
15
15
  .to_return(body: '{"data":{"id": 1, "name":"DCT"}}', status: 200)
16
16
 
data/test/models_test.rb CHANGED
@@ -23,7 +23,7 @@ module Fakturan
23
23
 
24
24
  def get_good_invoice
25
25
  return if @invoice # We won't change this instance so we really only need to do this once.
26
- @invoice = Fakturan::Invoice.find(7757)
26
+ @invoice = Fakturan::Invoice.find(5)
27
27
  end
28
28
 
29
29
  def test_find_one_and_access_attribute
@@ -33,21 +33,21 @@ module Fakturan
33
33
 
34
34
  def test_should_create_associated_objects
35
35
  get_good_invoice
36
- assert_equal @invoice.address.name, 'DCT'
36
+ assert_equal @invoice.address.name, 'A simple client'
37
37
  end
38
38
 
39
39
  def test_should_be_able_to_fetch_and_update_invoice
40
- skip "Not implemented server side yet"
41
- invoice = Fakturan::Invoice.find(71125)
40
+ #skip "Not implemented server side yet"
41
+ invoice = Fakturan::Invoice.find(10)
42
42
  invoice.days = 10
43
43
  assert invoice.save
44
44
  end
45
45
 
46
46
  def test_should_fetch_associated_record
47
47
  get_good_invoice
48
- client = Fakturan::Client.find(1)
48
+ client = Fakturan::Client.find(11)
49
49
  assert_equal Fakturan::Client, client.class
50
- assert_equal 'DCT', client.name
50
+ assert_equal 'A simple client', client.name
51
51
  assert_equal client.name, @invoice.client.name
52
52
  end
53
53
 
data/test/test_helper.rb CHANGED
@@ -22,17 +22,23 @@ end
22
22
  # Pretty colors
23
23
  Minitest::Reporters.use! Minitest::Reporters::SpecReporter.new
24
24
 
25
- API_USER, API_PASS = 'dUmziS9k9Q5x0u4wot1H', 'DAW96mbxui8B3_CBFFFMr0HgfaCfpv7ajUfcZ38B'
26
- BASE_URL = '0.0.0.0:3000/api/v2'
27
- #WebMock.disable! # Do this if we want to run tests against local server
25
+ API_USER, API_PASS = 'jWE56VnOHqu-6HgaZyL2', 'LpdLorG0fmPRGOpeOvHSLiuloEHK0O8YsKliVPNY'
26
+
27
+ PROTOCOL = 'https://'
28
28
 
29
29
  Fakturan.setup API_USER, API_PASS
30
- Fakturan.url = "http://#{BASE_URL}"
30
+ Fakturan.use_sandbox = true
31
+ Fakturan.debug_log = false
32
+
33
+ BASE_URL = Fakturan.url.split(PROTOCOL).last # '0.0.0.0:3000/api/v2'
34
+ #WebMock.disable! # Do this if we want to run tests against server
35
+
36
+ #Fakturan.url = "http://#{BASE_URL}"
31
37
 
32
38
  module WebMock
33
39
  module API
34
40
  def stub_api_request(method, abs_path)
35
- stub_request(method, "http://#{API_USER}:#{API_PASS}@#{BASE_URL}#{abs_path}")
41
+ stub_request(method, "#{PROTOCOL}#{API_USER}:#{API_PASS}@#{BASE_URL}#{abs_path}")
36
42
  end
37
43
  end
38
44
  end
@@ -2,7 +2,7 @@
2
2
  http_interactions:
3
3
  - request:
4
4
  method: post
5
- uri: http://dUmziS9k9Q5x0u4wot1H:DAW96mbxui8B3_CBFFFMr0HgfaCfpv7ajUfcZ38B@0.0.0.0:3000/api/v2/invoices
5
+ uri: https://jWE56VnOHqu-6HgaZyL2:LpdLorG0fmPRGOpeOvHSLiuloEHK0O8YsKliVPNY@sandbox.fakturan.nu/api/v2/invoices
6
6
  body:
7
7
  encoding: UTF-8
8
8
  string: '{"client":{"id":null,"company":"Imagine it AB"},"date":"2015-04-07","address":{"fakturan_invoice_id":null,"name":"Imagine
@@ -21,37 +21,45 @@ http_interactions:
21
21
  code: 201
22
22
  message: Created
23
23
  headers:
24
+ Date:
25
+ - Thu, 30 Apr 2015 08:19:19 GMT
26
+ Server:
27
+ - Apache/2.2.14 (Ubuntu)
28
+ Strict-Transport-Security:
29
+ - max-age=31536000
24
30
  X-Frame-Options:
25
31
  - SAMEORIGIN
26
32
  X-Xss-Protection:
27
33
  - 1; mode=block
28
34
  X-Content-Type-Options:
29
35
  - nosniff
30
- Location:
31
- - http://0.0.0.0:3000/api/v2/invoices/945625
32
- Content-Type:
33
- - application/json; charset=utf-8
34
36
  Etag:
35
- - '"83d632bbba8d44c5be3d68b79c5ebc61"'
37
+ - '"7221468cbd54ce8c593decc109d2cc6b"'
36
38
  Cache-Control:
37
39
  - max-age=0, private, must-revalidate
38
40
  X-Request-Id:
39
- - 1918ee86-8ffe-4d4d-a670-d1ad6d36c7b7
41
+ - 75ac366c-eadb-4042-86b7-dfa0736d25e7
40
42
  X-Runtime:
41
- - '2.491883'
42
- Connection:
43
- - close
44
- Server:
45
- - thin 1.6.2 codename Doc Brown
43
+ - '0.602880'
44
+ X-Powered-By:
45
+ - Phusion Passenger 4.0.50
46
+ Location:
47
+ - https://sandbox.fakturan.nu/api/v2/invoices/25
48
+ Status:
49
+ - 201 Created
50
+ Transfer-Encoding:
51
+ - chunked
52
+ Content-Type:
53
+ - application/json; charset=utf-8
46
54
  body:
47
55
  encoding: UTF-8
48
- string: '{"data":{"id":945625,"number":20151568,"date":"2015-04-07","client_id":299053,"days":30,"our_reference":"","your_reference":"","sent":false,"paid_at":null,"locale":"sv","currency":"SEK","recurring":false,"auto_send":false,"last_day_of_month":false,"start_recurring_from":null,"settings":{"invoice_template":"original","prices_inc_tax":"no","show_product_code":false},"sum":"0.0","net":"0.0","tax":"0.0","tax_details":{},"address":{"name":"Imagine
49
- it AB","street_address":"","care_of":"","zip_code":"","city":"","country":""},"rows":[]}}'
56
+ string: '{"data":{"id":25,"number":21,"date":"2015-04-07","client_id":26,"days":30,"our_reference":"","your_reference":"","sent":false,"paid_at":null,"locale":"sv","currency":"SEK","settings":{"invoice_template":"original","prices_inc_tax":"no","show_product_code":false},"sum":"0.0","net":"0.0","tax":"0.0","tax_details":{},"address":{"name":"Imagine
57
+ it AB","street_address":"","care_of":"","zip_code":"","city":"","country":"SE"},"rows":[]}}'
50
58
  http_version:
51
- recorded_at: Tue, 07 Apr 2015 10:44:27 GMT
59
+ recorded_at: Thu, 30 Apr 2015 08:19:20 GMT
52
60
  - request:
53
61
  method: post
54
- uri: http://dUmziS9k9Q5x0u4wot1H:DAW96mbxui8B3_CBFFFMr0HgfaCfpv7ajUfcZ38B@0.0.0.0:3000/api/v2/invoices
62
+ uri: https://jWE56VnOHqu-6HgaZyL2:LpdLorG0fmPRGOpeOvHSLiuloEHK0O8YsKliVPNY@sandbox.fakturan.nu/api/v2/invoices
55
63
  body:
56
64
  encoding: UTF-8
57
65
  string: "{}"
@@ -67,34 +75,42 @@ http_interactions:
67
75
  response:
68
76
  status:
69
77
  code: 422
70
- message: ''
78
+ message: Unprocessable Entity
71
79
  headers:
80
+ Date:
81
+ - Thu, 30 Apr 2015 08:19:20 GMT
82
+ Server:
83
+ - Apache/2.2.14 (Ubuntu)
84
+ Strict-Transport-Security:
85
+ - max-age=31536000
72
86
  X-Frame-Options:
73
87
  - SAMEORIGIN
74
88
  X-Xss-Protection:
75
89
  - 1; mode=block
76
90
  X-Content-Type-Options:
77
91
  - nosniff
78
- Content-Type:
79
- - application/json; charset=utf-8
80
92
  Cache-Control:
81
93
  - no-cache
82
94
  X-Request-Id:
83
- - 2f95fffb-184a-4a4f-a588-363eb2f39e37
95
+ - 55ca9bf1-5e53-4989-900c-5c7a6c9e4cce
84
96
  X-Runtime:
85
- - '0.061805'
86
- Connection:
87
- - close
88
- Server:
89
- - thin 1.6.2 codename Doc Brown
97
+ - '0.022408'
98
+ X-Powered-By:
99
+ - Phusion Passenger 4.0.50
100
+ Status:
101
+ - 422 Unprocessable Entity
102
+ Transfer-Encoding:
103
+ - chunked
104
+ Content-Type:
105
+ - application/json; charset=utf-8
90
106
  body:
91
107
  encoding: UTF-8
92
- string: '{"errors":{"client_id":[{"error":"must be present. Please check client_id."}],"date":[{"error":"blank"},{"error":"invalid_date"}]}}'
108
+ string: '{"errors":{"client_id":[{"error":"blank"}]}}'
93
109
  http_version:
94
- recorded_at: Tue, 07 Apr 2015 10:44:27 GMT
110
+ recorded_at: Thu, 30 Apr 2015 08:19:20 GMT
95
111
  - request:
96
112
  method: get
97
- uri: http://dUmziS9k9Q5x0u4wot1H:DAW96mbxui8B3_CBFFFMr0HgfaCfpv7ajUfcZ38B@0.0.0.0:3000/api/v2/invoices/7757
113
+ uri: https://jWE56VnOHqu-6HgaZyL2:LpdLorG0fmPRGOpeOvHSLiuloEHK0O8YsKliVPNY@sandbox.fakturan.nu/api/v2/invoices/5
98
114
  body:
99
115
  encoding: US-ASCII
100
116
  string: ''
@@ -110,37 +126,46 @@ http_interactions:
110
126
  code: 200
111
127
  message: OK
112
128
  headers:
129
+ Date:
130
+ - Thu, 30 Apr 2015 08:19:20 GMT
131
+ Server:
132
+ - Apache/2.2.14 (Ubuntu)
133
+ Strict-Transport-Security:
134
+ - max-age=31536000
113
135
  X-Frame-Options:
114
136
  - SAMEORIGIN
115
137
  X-Xss-Protection:
116
138
  - 1; mode=block
117
139
  X-Content-Type-Options:
118
140
  - nosniff
119
- Content-Type:
120
- - application/json; charset=utf-8
121
141
  Etag:
122
- - '"5ef98d5160d8b27f1b3034e636e74915"'
142
+ - '"e0b0edab8ff3de58646e5196ff224691"'
123
143
  Cache-Control:
124
144
  - max-age=0, private, must-revalidate
125
145
  X-Request-Id:
126
- - 74305069-ac58-44da-afd1-780eb73a2a24
146
+ - 77e1c15b-fa4b-4329-8d2c-33425dbfe572
127
147
  X-Runtime:
128
- - '0.057778'
129
- Connection:
130
- - close
131
- Server:
132
- - thin 1.6.2 codename Doc Brown
148
+ - '0.042405'
149
+ X-Powered-By:
150
+ - Phusion Passenger 4.0.50
151
+ Status:
152
+ - 200 OK
153
+ Transfer-Encoding:
154
+ - chunked
155
+ Content-Type:
156
+ - application/json; charset=utf-8
133
157
  body:
134
158
  encoding: UTF-8
135
- string: '{"data":{"id":7757,"number":20070311,"date":"2007-10-29","client_id":1,"days":30,"our_reference":"Jonathan
136
- Bourque","your_reference":"","sent":true,"paid_at":null,"locale":"sv","currency":"SEK","recurring":false,"auto_send":false,"last_day_of_month":false,"start_recurring_from":null,"settings":{"invoice_template":"original","prices_inc_tax":"no","show_product_code":false},"sum":"0.0","net":"0.0","tax":0,"tax_details":{"25":0},"address":{"name":"DCT","street_address":"Signalhornsgatan
137
- 124","care_of":"","zip_code":"656 34","city":"Karlstad","country":""},"rows":[{"id":20668,"product_id":31,"discount":0,"amount":"1.0","text":"","product_code":null,"product_name":".com
138
- domän","product_unit":"år","product_price":"49.0","product_tax":25,"text_row":false,"sort_order":0,"tax_deductable":false}]}}'
159
+ string: '{"data":{"id":5,"number":1,"date":"2015-01-01","client_id":11,"days":30,"our_reference":"","your_reference":"","sent":false,"paid_at":null,"locale":"sv","currency":"SEK","settings":{"invoice_template":"original","prices_inc_tax":"no","show_product_code":false},"sum":"956.0","net":"765.0","tax":"191.25","tax_details":{"25":"191.25"},"address":{"name":"A
160
+ simple client","street_address":"","care_of":"","zip_code":"","city":"","country":"SE"},"rows":[{"id":5,"product_id":2,"discount":0,"amount":"5.0","text":"","product_code":"","product_name":"A
161
+ simple product","product_unit":"ST","product_price":"50.0","product_tax":25,"text_row":false,"sort_order":0,"tax_deductable":false},{"id":6,"product_id":2,"discount":0,"amount":"5.0","text":"","product_code":"","product_name":"A
162
+ simple product","product_unit":"ST","product_price":"51.0","product_tax":25,"text_row":false,"sort_order":1,"tax_deductable":false},{"id":7,"product_id":2,"discount":0,"amount":"5.0","text":"","product_code":"","product_name":"A
163
+ simple product","product_unit":"ST","product_price":"52.0","product_tax":25,"text_row":false,"sort_order":2,"tax_deductable":false}]}}'
139
164
  http_version:
140
- recorded_at: Tue, 07 Apr 2015 10:44:27 GMT
165
+ recorded_at: Thu, 30 Apr 2015 08:19:20 GMT
141
166
  - request:
142
167
  method: get
143
- uri: http://dUmziS9k9Q5x0u4wot1H:DAW96mbxui8B3_CBFFFMr0HgfaCfpv7ajUfcZ38B@0.0.0.0:3000/api/v2/products
168
+ uri: https://jWE56VnOHqu-6HgaZyL2:LpdLorG0fmPRGOpeOvHSLiuloEHK0O8YsKliVPNY@sandbox.fakturan.nu/api/v2/products
144
169
  body:
145
170
  encoding: US-ASCII
146
171
  string: ''
@@ -156,57 +181,61 @@ http_interactions:
156
181
  code: 200
157
182
  message: OK
158
183
  headers:
184
+ Date:
185
+ - Thu, 30 Apr 2015 08:19:20 GMT
186
+ Server:
187
+ - Apache/2.2.14 (Ubuntu)
188
+ Strict-Transport-Security:
189
+ - max-age=31536000
159
190
  X-Frame-Options:
160
191
  - SAMEORIGIN
161
192
  X-Xss-Protection:
162
193
  - 1; mode=block
163
194
  X-Content-Type-Options:
164
195
  - nosniff
165
- Content-Type:
166
- - application/json; charset=utf-8
167
196
  Etag:
168
- - '"8e8569582d8accef4bc647021644fb0e"'
197
+ - '"1d18227d6b33cf8a7c5cbdb2411b1432"'
169
198
  Cache-Control:
170
199
  - max-age=0, private, must-revalidate
171
200
  X-Request-Id:
172
- - f70915b6-5e59-423c-a969-8273b1c6cd90
201
+ - 70a582aa-bf92-4cab-9f77-8b9f242feefc
173
202
  X-Runtime:
174
- - '0.080998'
175
- Connection:
176
- - close
177
- Server:
178
- - thin 1.6.2 codename Doc Brown
203
+ - '0.048723'
204
+ X-Powered-By:
205
+ - Phusion Passenger 4.0.50
206
+ Status:
207
+ - 200 OK
208
+ Transfer-Encoding:
209
+ - chunked
210
+ Content-Type:
211
+ - application/json; charset=utf-8
179
212
  body:
180
213
  encoding: UTF-8
181
- string: '{"data":[{"id":31,"product_code":"","name":".com domän","unit":"år","price":"49.0","price_inc_tax":"61.25","tax":25},{"id":64076,"product_code":"","name":"Administrativ
182
- avgift","unit":"st","price":"350.0","price_inc_tax":"437.5","tax":25},{"id":16,"product_code":"","name":"Anpassning
183
- av mjukvara","unit":"timmar","price":"750.0","price_inc_tax":"937.5","tax":25},{"id":1109,"product_code":"","name":"Aviavgift","unit":"st","price":"25.0","price_inc_tax":"31.25","tax":25},{"id":32234,"product_code":"","name":"Buggfixar","unit":"timmar","price":"0.0","price_inc_tax":"0.0","tax":25},{"id":25,"product_code":"","name":"Domänflytt","unit":"st","price":"100.0","price_inc_tax":"125.0","tax":25},{"id":22,"product_code":"","name":"Egen
184
- IP-adress","unit":"månader","price":"45.0","price_inc_tax":"56.25","tax":25},{"id":49,"product_code":"","name":"Extra
185
- trafik","unit":"GB / mån","price":"30.0","price_inc_tax":"37.5","tax":25},{"id":5498,"product_code":"","name":"Fakturan.nu
186
- - 1 extra användare","unit":"månader","price":"19.0","price_inc_tax":"23.75","tax":25},{"id":144,"product_code":"","name":"Fakturan.nu
187
- - Guldkonto","unit":"månader","price":"99.0","price_inc_tax":"123.75","tax":25},{"id":50510,"product_code":"","name":"Fakturan.nu
188
- - Guldkonto subway","unit":"månader","price":"59.0","price_inc_tax":"73.75","tax":25},{"id":145,"product_code":"","name":"Fakturan.nu
189
- - Silverkonto","unit":"månader","price":"59.0","price_inc_tax":"73.75","tax":25},{"id":2443,"product_code":"","name":"Fasta
190
- avgifter","unit":"månader","price":"5000.0","price_inc_tax":"6250.0","tax":25},{"id":19165,"product_code":"","name":"Frimärken
191
- (10)","unit":"st","price":"12.9","price_inc_tax":"16.13","tax":25},{"id":19167,"product_code":"","name":"Frimärken
192
- (100)","unit":"st","price":"10.9","price_inc_tax":"13.63","tax":25},{"id":19169,"product_code":"","name":"Frimärken
193
- (1000)","unit":"st","price":"9.5","price_inc_tax":"11.88","tax":25},{"id":19166,"product_code":"","name":"Frimärken
194
- (50)","unit":"st","price":"11.9","price_inc_tax":"14.88","tax":25},{"id":19168,"product_code":"","name":"Frimärken
195
- (500)","unit":"st","price":"9.9","price_inc_tax":"12.38","tax":25},{"id":415,"product_code":"","name":"Grafisk
196
- produktion","unit":"timmar","price":"750.0","price_inc_tax":"937.5","tax":25},{"id":48,"product_code":"","name":"Hemsidepaket
197
- 2","unit":"st","price":"14900.0","price_inc_tax":"18625.0","tax":25},{"id":330,"product_code":"","name":"Hyra
198
- DVCAM bandspelare","unit":"dagar","price":"500.0","price_inc_tax":"625.0","tax":25},{"id":40631,"product_code":"","name":"Internt","unit":"timmar","price":"0.0","price_inc_tax":"0.0","tax":25},{"id":197,"product_code":"","name":"Joomla","unit":"timmar","price":"850.0","price_inc_tax":"1062.5","tax":25},{"id":53,"product_code":"","name":"Joomla
199
- installation","unit":"timmar","price":"850.0","price_inc_tax":"1062.5","tax":25},{"id":317,"product_code":"","name":"Joomla
200
- Struktur","unit":"timmar","price":"850.0","price_inc_tax":"1062.5","tax":25},{"id":35,"product_code":"","name":"Joomla
201
- support","unit":"timmar","price":"590.0","price_inc_tax":"737.5","tax":25},{"id":59093,"product_code":"","name":"Joomla
202
- underhållssupport","unit":"år","price":"1495.0","price_inc_tax":"1868.75","tax":25},{"id":59094,"product_code":"","name":"Joomla
203
- underhållssupport - startavgift","unit":"st","price":"495.0","price_inc_tax":"618.75","tax":25},{"id":9847,"product_code":"","name":"Joomla
204
- Uppdateringar","unit":"timmar","price":"850.0","price_inc_tax":"1062.5","tax":25},{"id":52,"product_code":"","name":"Joomla-mall","unit":"st","price":"3900.0","price_inc_tax":"4875.0","tax":25}],"paging":{"total_pages":2,"current_page":1,"next":"http://0.0.0.0:3000/api/v2/products?page=2\u0026per_page=30","previous":null}}'
214
+ string: '{"data":[{"id":2,"product_code":"","name":"A simple product","unit":"ST","price":"200.0","price_inc_tax":"250.0","tax":25},{"id":33,"product_code":"","name":"A
215
+ simple product","unit":"","price":"200.0","price_inc_tax":"250.0","tax":25},{"id":34,"product_code":"","name":"A
216
+ simple product","unit":"","price":"200.0","price_inc_tax":"250.0","tax":25},{"id":35,"product_code":"","name":"A
217
+ simple product","unit":"","price":"200.0","price_inc_tax":"250.0","tax":25},{"id":32,"product_code":"","name":"Action
218
+ figure of Spooderman","unit":"st","price":"1054.0","price_inc_tax":"1317.5","tax":25},{"id":3,"product_code":"","name":"Another
219
+ simple product","unit":"KG","price":"123.0","price_inc_tax":"153.75","tax":25},{"id":24,"product_code":"","name":"Bleach","unit":"st","price":"2298.0","price_inc_tax":"2872.5","tax":25},{"id":18,"product_code":"","name":"Blue
220
+ whales","unit":"st","price":"2345.0","price_inc_tax":"2931.25","tax":25},{"id":4,"product_code":"","name":"Boxes
221
+ of salt","unit":"KG","price":"123.0","price_inc_tax":"153.75","tax":25},{"id":15,"product_code":"","name":"Candies
222
+ with random taste","unit":"st","price":"3484.0","price_inc_tax":"4355.0","tax":25},{"id":23,"product_code":"","name":"Cheeseburger","unit":"st","price":"1168.0","price_inc_tax":"1460.0","tax":25},{"id":14,"product_code":"","name":"Clicks
223
+ on button","unit":"st","price":"4927.0","price_inc_tax":"6158.75","tax":25},{"id":31,"product_code":"","name":"Cold
224
+ dogs","unit":"st","price":"708.0","price_inc_tax":"885.0","tax":25},{"id":6,"product_code":"","name":"Colored
225
+ feathers","unit":"KG","price":"2056.0","price_inc_tax":"2570.0","tax":25},{"id":16,"product_code":"","name":"Colors
226
+ for fingerpainters","unit":"st","price":"3786.0","price_inc_tax":"4732.5","tax":25},{"id":10,"product_code":"","name":"Foodtrucks","unit":"H","price":"1050.0","price_inc_tax":"1312.5","tax":25},{"id":5,"product_code":"","name":"Hairwigs","unit":"KG","price":"15134.0","price_inc_tax":"18917.5","tax":25},{"id":22,"product_code":"","name":"Hamburger","unit":"st","price":"1106.0","price_inc_tax":"1382.5","tax":25},{"id":28,"product_code":"","name":"Hand
227
+ dryers","unit":"st","price":"445.0","price_inc_tax":"556.25","tax":25},{"id":30,"product_code":"","name":"Hot
228
+ dogs","unit":"st","price":"3082.0","price_inc_tax":"3852.5","tax":25},{"id":19,"product_code":"","name":"Keychains","unit":"st","price":"2365.0","price_inc_tax":"2956.25","tax":25},{"id":9,"product_code":"","name":"Listening
229
+ to other people","unit":"H","price":"3416.0","price_inc_tax":"4270.0","tax":25},{"id":8,"product_code":"","name":"Movies
230
+ of people eating","unit":"ST","price":"880.0","price_inc_tax":"1100.0","tax":25},{"id":20,"product_code":"","name":"Mystic
231
+ snakes","unit":"st","price":"448.0","price_inc_tax":"560.0","tax":25},{"id":21,"product_code":"","name":"Newspaper","unit":"st","price":"514.0","price_inc_tax":"642.5","tax":25},{"id":26,"product_code":"","name":"Old
232
+ underwear","unit":"st","price":"1530.0","price_inc_tax":"1912.5","tax":25},{"id":17,"product_code":"","name":"Red
233
+ roses","unit":"st","price":"895.0","price_inc_tax":"1118.75","tax":25},{"id":45,"product_code":"","name":"Shoes","unit":"","price":"0.0","price_inc_tax":"0.0","tax":25},{"id":47,"product_code":"","name":"Shoes","unit":"","price":"0.0","price_inc_tax":"0.0","tax":25},{"id":49,"product_code":"","name":"Shoes","unit":"","price":"0.0","price_inc_tax":"0.0","tax":25}],"paging":{"total_pages":2,"current_page":1,"next":"https://sandbox.fakturan.nu/api/v2/products?page=2\u0026per_page=30","previous":null}}'
205
234
  http_version:
206
- recorded_at: Tue, 07 Apr 2015 10:44:27 GMT
235
+ recorded_at: Thu, 30 Apr 2015 08:19:20 GMT
207
236
  - request:
208
237
  method: post
209
- uri: http://dUmziS9k9Q5x0u4wot1H:DAW96mbxui8B3_CBFFFMr0HgfaCfpv7ajUfcZ38B@0.0.0.0:3000/api/v2/products
238
+ uri: https://jWE56VnOHqu-6HgaZyL2:LpdLorG0fmPRGOpeOvHSLiuloEHK0O8YsKliVPNY@sandbox.fakturan.nu/api/v2/products
210
239
  body:
211
240
  encoding: UTF-8
212
241
  string: '{"name":"Shoes"}'
@@ -224,36 +253,44 @@ http_interactions:
224
253
  code: 201
225
254
  message: Created
226
255
  headers:
256
+ Date:
257
+ - Thu, 30 Apr 2015 08:19:20 GMT
258
+ Server:
259
+ - Apache/2.2.14 (Ubuntu)
260
+ Strict-Transport-Security:
261
+ - max-age=31536000
227
262
  X-Frame-Options:
228
263
  - SAMEORIGIN
229
264
  X-Xss-Protection:
230
265
  - 1; mode=block
231
266
  X-Content-Type-Options:
232
267
  - nosniff
233
- Location:
234
- - http://0.0.0.0:3000/api/v2/products/80031
235
- Content-Type:
236
- - application/json; charset=utf-8
237
268
  Etag:
238
- - '"840f49a70155c63ed33d085252d7a0dc"'
269
+ - '"72d9fb39a2c1c8a571660b1316757ec0"'
239
270
  Cache-Control:
240
271
  - max-age=0, private, must-revalidate
241
272
  X-Request-Id:
242
- - 01ef1ce9-6730-4721-9993-72828adcf0e5
273
+ - 3260947c-082f-4d48-a552-5ff0fac3fd10
243
274
  X-Runtime:
244
- - '0.043745'
245
- Connection:
246
- - close
247
- Server:
248
- - thin 1.6.2 codename Doc Brown
275
+ - '0.103146'
276
+ X-Powered-By:
277
+ - Phusion Passenger 4.0.50
278
+ Location:
279
+ - https://sandbox.fakturan.nu/api/v2/products/57
280
+ Status:
281
+ - 201 Created
282
+ Transfer-Encoding:
283
+ - chunked
284
+ Content-Type:
285
+ - application/json; charset=utf-8
249
286
  body:
250
287
  encoding: UTF-8
251
- string: '{"data":{"id":80031,"product_code":"","name":"Shoes","unit":"","price":"0.0","price_inc_tax":"0.0","tax":25}}'
288
+ string: '{"data":{"id":57,"product_code":"","name":"Shoes","unit":"","price":"0.0","price_inc_tax":"0.0","tax":25}}'
252
289
  http_version:
253
- recorded_at: Tue, 07 Apr 2015 10:44:27 GMT
290
+ recorded_at: Thu, 30 Apr 2015 08:19:20 GMT
254
291
  - request:
255
292
  method: post
256
- uri: http://dUmziS9k9Q5x0u4wot1H:DAW96mbxui8B3_CBFFFMr0HgfaCfpv7ajUfcZ38B@0.0.0.0:3000/api/v2/products
293
+ uri: https://jWE56VnOHqu-6HgaZyL2:LpdLorG0fmPRGOpeOvHSLiuloEHK0O8YsKliVPNY@sandbox.fakturan.nu/api/v2/products
257
294
  body:
258
295
  encoding: UTF-8
259
296
  string: "{}"
@@ -269,34 +306,42 @@ http_interactions:
269
306
  response:
270
307
  status:
271
308
  code: 422
272
- message: ''
309
+ message: Unprocessable Entity
273
310
  headers:
311
+ Date:
312
+ - Thu, 30 Apr 2015 08:19:20 GMT
313
+ Server:
314
+ - Apache/2.2.14 (Ubuntu)
315
+ Strict-Transport-Security:
316
+ - max-age=31536000
274
317
  X-Frame-Options:
275
318
  - SAMEORIGIN
276
319
  X-Xss-Protection:
277
320
  - 1; mode=block
278
321
  X-Content-Type-Options:
279
322
  - nosniff
280
- Content-Type:
281
- - application/json; charset=utf-8
282
323
  Cache-Control:
283
324
  - no-cache
284
325
  X-Request-Id:
285
- - ca2c333c-7356-46e2-b749-e3d674903892
326
+ - 09611851-723c-43e3-9632-71398a2c2d89
286
327
  X-Runtime:
287
- - '0.033962'
288
- Connection:
289
- - close
290
- Server:
291
- - thin 1.6.2 codename Doc Brown
328
+ - '0.013382'
329
+ X-Powered-By:
330
+ - Phusion Passenger 4.0.50
331
+ Status:
332
+ - 422 Unprocessable Entity
333
+ Transfer-Encoding:
334
+ - chunked
335
+ Content-Type:
336
+ - application/json; charset=utf-8
292
337
  body:
293
338
  encoding: UTF-8
294
339
  string: '{"errors":{"name":[{"error":"blank"}]}}'
295
340
  http_version:
296
- recorded_at: Tue, 07 Apr 2015 10:44:27 GMT
341
+ recorded_at: Thu, 30 Apr 2015 08:19:20 GMT
297
342
  - request:
298
343
  method: post
299
- uri: http://dUmziS9k9Q5x0u4wot1H:DAW96mbxui8B3_CBFFFMr0HgfaCfpv7ajUfcZ38B@0.0.0.0:3000/api/v2/products
344
+ uri: https://jWE56VnOHqu-6HgaZyL2:LpdLorG0fmPRGOpeOvHSLiuloEHK0O8YsKliVPNY@sandbox.fakturan.nu/api/v2/products
300
345
  body:
301
346
  encoding: UTF-8
302
347
  string: '{"name":"Testing"}'
@@ -314,36 +359,154 @@ http_interactions:
314
359
  code: 201
315
360
  message: Created
316
361
  headers:
362
+ Date:
363
+ - Thu, 30 Apr 2015 08:19:21 GMT
364
+ Server:
365
+ - Apache/2.2.14 (Ubuntu)
366
+ Strict-Transport-Security:
367
+ - max-age=31536000
317
368
  X-Frame-Options:
318
369
  - SAMEORIGIN
319
370
  X-Xss-Protection:
320
371
  - 1; mode=block
321
372
  X-Content-Type-Options:
322
373
  - nosniff
374
+ Etag:
375
+ - '"0dac8863d0213ed075346b2a1d44ea79"'
376
+ Cache-Control:
377
+ - max-age=0, private, must-revalidate
378
+ X-Request-Id:
379
+ - 333c5c47-a959-4636-965a-ee238ec73bdf
380
+ X-Runtime:
381
+ - '0.092958'
382
+ X-Powered-By:
383
+ - Phusion Passenger 4.0.50
323
384
  Location:
324
- - http://0.0.0.0:3000/api/v2/products/80032
385
+ - https://sandbox.fakturan.nu/api/v2/products/58
386
+ Status:
387
+ - 201 Created
388
+ Transfer-Encoding:
389
+ - chunked
325
390
  Content-Type:
326
391
  - application/json; charset=utf-8
392
+ body:
393
+ encoding: UTF-8
394
+ string: '{"data":{"id":58,"product_code":"","name":"Testing","unit":"","price":"0.0","price_inc_tax":"0.0","tax":25}}'
395
+ http_version:
396
+ recorded_at: Thu, 30 Apr 2015 08:19:21 GMT
397
+ - request:
398
+ method: get
399
+ uri: https://jWE56VnOHqu-6HgaZyL2:LpdLorG0fmPRGOpeOvHSLiuloEHK0O8YsKliVPNY@sandbox.fakturan.nu/api/v2/invoices/10
400
+ body:
401
+ encoding: US-ASCII
402
+ string: ''
403
+ headers:
404
+ User-Agent:
405
+ - Faraday v0.9.1
406
+ Accept-Encoding:
407
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
408
+ Accept:
409
+ - "*/*"
410
+ response:
411
+ status:
412
+ code: 200
413
+ message: OK
414
+ headers:
415
+ Date:
416
+ - Thu, 30 Apr 2015 08:19:21 GMT
417
+ Server:
418
+ - Apache/2.2.14 (Ubuntu)
419
+ Strict-Transport-Security:
420
+ - max-age=31536000
421
+ X-Frame-Options:
422
+ - SAMEORIGIN
423
+ X-Xss-Protection:
424
+ - 1; mode=block
425
+ X-Content-Type-Options:
426
+ - nosniff
327
427
  Etag:
328
- - '"19211e0fc190040db4603edf79ed64f8"'
428
+ - '"0fb9f0347d70597f8d303fbdeb843861"'
329
429
  Cache-Control:
330
430
  - max-age=0, private, must-revalidate
331
431
  X-Request-Id:
332
- - 165b9613-443e-45e9-8e74-628f8117dced
432
+ - cb48ac5f-4e64-4b7c-85d0-0743120edeea
333
433
  X-Runtime:
334
- - '0.040158'
335
- Connection:
336
- - close
434
+ - '0.016048'
435
+ X-Powered-By:
436
+ - Phusion Passenger 4.0.50
437
+ Status:
438
+ - 200 OK
439
+ Transfer-Encoding:
440
+ - chunked
441
+ Content-Type:
442
+ - application/json; charset=utf-8
443
+ body:
444
+ encoding: UTF-8
445
+ string: '{"data":{"id":10,"number":6,"date":"2015-01-01","client_id":11,"days":10,"our_reference":"","your_reference":"","sent":false,"paid_at":null,"locale":"sv","currency":"SEK","settings":{"invoice_template":"original","prices_inc_tax":"no","show_product_code":false},"sum":"956.0","net":"765.0","tax":"191.25","tax_details":{"25":"191.25"},"address":{"name":"A
446
+ simple client","street_address":"","care_of":"","zip_code":"","city":"","country":"SE"},"rows":[{"id":20,"product_id":2,"discount":0,"amount":"5.0","text":"","product_code":"","product_name":"A
447
+ simple product","product_unit":"ST","product_price":"50.0","product_tax":25,"text_row":false,"sort_order":0,"tax_deductable":false},{"id":21,"product_id":2,"discount":0,"amount":"5.0","text":"","product_code":"","product_name":"A
448
+ simple product","product_unit":"ST","product_price":"51.0","product_tax":25,"text_row":false,"sort_order":1,"tax_deductable":false},{"id":22,"product_id":2,"discount":0,"amount":"5.0","text":"","product_code":"","product_name":"A
449
+ simple product","product_unit":"ST","product_price":"52.0","product_tax":25,"text_row":false,"sort_order":2,"tax_deductable":false}]}}'
450
+ http_version:
451
+ recorded_at: Thu, 30 Apr 2015 08:19:21 GMT
452
+ - request:
453
+ method: put
454
+ uri: https://jWE56VnOHqu-6HgaZyL2:LpdLorG0fmPRGOpeOvHSLiuloEHK0O8YsKliVPNY@sandbox.fakturan.nu/api/v2/invoices/10
455
+ body:
456
+ encoding: UTF-8
457
+ string: '{"number":6,"date":"2015-01-01","client_id":11,"days":10,"our_reference":"","your_reference":"","sent":false,"paid_at":null,"locale":"sv","currency":"SEK","settings":{"invoice_template":"original","prices_inc_tax":"no","show_product_code":false},"sum":"956.0","net":"765.0","tax":"191.25","tax_details":{"25":"191.25"},"address":{"fakturan_invoice_id":10,"name":"A
458
+ simple client","street_address":"","care_of":"","zip_code":"","city":"","country":"SE"},"rows":[{"fakturan_invoice_id":10,"id":20,"product_id":2,"discount":0,"amount":"5.0","text":"","product_code":"","product_name":"A
459
+ simple product","product_unit":"ST","product_price":"50.0","product_tax":25,"text_row":false,"sort_order":0,"tax_deductable":false},{"fakturan_invoice_id":10,"id":21,"product_id":2,"discount":0,"amount":"5.0","text":"","product_code":"","product_name":"A
460
+ simple product","product_unit":"ST","product_price":"51.0","product_tax":25,"text_row":false,"sort_order":1,"tax_deductable":false},{"fakturan_invoice_id":10,"id":22,"product_id":2,"discount":0,"amount":"5.0","text":"","product_code":"","product_name":"A
461
+ simple product","product_unit":"ST","product_price":"52.0","product_tax":25,"text_row":false,"sort_order":2,"tax_deductable":false}]}'
462
+ headers:
463
+ User-Agent:
464
+ - Faraday v0.9.1
465
+ Content-Type:
466
+ - application/json
467
+ Accept-Encoding:
468
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
469
+ Accept:
470
+ - "*/*"
471
+ response:
472
+ status:
473
+ code: 204
474
+ message: No Content
475
+ headers:
476
+ Date:
477
+ - Thu, 30 Apr 2015 08:19:21 GMT
337
478
  Server:
338
- - thin 1.6.2 codename Doc Brown
479
+ - Apache/2.2.14 (Ubuntu)
480
+ Strict-Transport-Security:
481
+ - max-age=31536000
482
+ X-Frame-Options:
483
+ - SAMEORIGIN
484
+ X-Xss-Protection:
485
+ - 1; mode=block
486
+ X-Content-Type-Options:
487
+ - nosniff
488
+ Cache-Control:
489
+ - no-cache
490
+ X-Request-Id:
491
+ - d2a57739-6e09-4083-b82c-1b2f46452bf7
492
+ X-Runtime:
493
+ - '0.103358'
494
+ X-Powered-By:
495
+ - Phusion Passenger 4.0.50
496
+ Status:
497
+ - 204 No Content
498
+ Content-Length:
499
+ - '0'
500
+ Content-Type:
501
+ - text/plain
339
502
  body:
340
503
  encoding: UTF-8
341
- string: '{"data":{"id":80032,"product_code":"","name":"Testing","unit":"","price":"0.0","price_inc_tax":"0.0","tax":25}}'
504
+ string: ''
342
505
  http_version:
343
- recorded_at: Tue, 07 Apr 2015 10:44:28 GMT
506
+ recorded_at: Thu, 30 Apr 2015 08:19:21 GMT
344
507
  - request:
345
508
  method: post
346
- uri: http://dUmziS9k9Q5x0u4wot1H:DAW96mbxui8B3_CBFFFMr0HgfaCfpv7ajUfcZ38B@0.0.0.0:3000/api/v2/invoices
509
+ uri: https://jWE56VnOHqu-6HgaZyL2:LpdLorG0fmPRGOpeOvHSLiuloEHK0O8YsKliVPNY@sandbox.fakturan.nu/api/v2/invoices
347
510
  body:
348
511
  encoding: UTF-8
349
512
  string: '{"date":"2015-04-07","client":{"id":null,"company":"Imagine it AB"}}'
@@ -361,37 +524,45 @@ http_interactions:
361
524
  code: 201
362
525
  message: Created
363
526
  headers:
527
+ Date:
528
+ - Thu, 30 Apr 2015 08:19:21 GMT
529
+ Server:
530
+ - Apache/2.2.14 (Ubuntu)
531
+ Strict-Transport-Security:
532
+ - max-age=31536000
364
533
  X-Frame-Options:
365
534
  - SAMEORIGIN
366
535
  X-Xss-Protection:
367
536
  - 1; mode=block
368
537
  X-Content-Type-Options:
369
538
  - nosniff
370
- Location:
371
- - http://0.0.0.0:3000/api/v2/invoices/945626
372
- Content-Type:
373
- - application/json; charset=utf-8
374
539
  Etag:
375
- - '"b751550fb11279b83e6354185a4beb10"'
540
+ - '"980a90fc5be004e389e094a4b169d4c1"'
376
541
  Cache-Control:
377
542
  - max-age=0, private, must-revalidate
378
543
  X-Request-Id:
379
- - aa62fca7-71ce-416b-ac08-63ee97a178b4
544
+ - 2d19de5b-b6f0-4f3a-8c6c-7f53da7176f4
380
545
  X-Runtime:
381
- - '0.103942'
382
- Connection:
383
- - close
384
- Server:
385
- - thin 1.6.2 codename Doc Brown
546
+ - '0.095712'
547
+ X-Powered-By:
548
+ - Phusion Passenger 4.0.50
549
+ Location:
550
+ - https://sandbox.fakturan.nu/api/v2/invoices/26
551
+ Status:
552
+ - 201 Created
553
+ Transfer-Encoding:
554
+ - chunked
555
+ Content-Type:
556
+ - application/json; charset=utf-8
386
557
  body:
387
558
  encoding: UTF-8
388
- string: '{"data":{"id":945626,"number":20151569,"date":"2015-04-07","client_id":299054,"days":30,"our_reference":"","your_reference":"","sent":false,"paid_at":null,"locale":"sv","currency":"SEK","recurring":false,"auto_send":false,"last_day_of_month":false,"start_recurring_from":null,"settings":{"invoice_template":"original","prices_inc_tax":"no","show_product_code":false},"sum":"0.0","net":"0.0","tax":"0.0","tax_details":{},"address":{"name":"Imagine
389
- it AB","street_address":"","care_of":"","zip_code":"","city":"","country":""},"rows":[]}}'
559
+ string: '{"data":{"id":26,"number":22,"date":"2015-04-07","client_id":27,"days":30,"our_reference":"","your_reference":"","sent":false,"paid_at":null,"locale":"sv","currency":"SEK","settings":{"invoice_template":"original","prices_inc_tax":"no","show_product_code":false},"sum":"0.0","net":"0.0","tax":"0.0","tax_details":{},"address":{"name":"Imagine
560
+ it AB","street_address":"","care_of":"","zip_code":"","city":"","country":"SE"},"rows":[]}}'
390
561
  http_version:
391
- recorded_at: Tue, 07 Apr 2015 10:44:28 GMT
562
+ recorded_at: Thu, 30 Apr 2015 08:19:21 GMT
392
563
  - request:
393
564
  method: get
394
- uri: http://dUmziS9k9Q5x0u4wot1H:DAW96mbxui8B3_CBFFFMr0HgfaCfpv7ajUfcZ38B@0.0.0.0:3000/api/v2/clients/1
565
+ uri: https://jWE56VnOHqu-6HgaZyL2:LpdLorG0fmPRGOpeOvHSLiuloEHK0O8YsKliVPNY@sandbox.fakturan.nu/api/v2/clients/11
395
566
  body:
396
567
  encoding: US-ASCII
397
568
  string: ''
@@ -407,35 +578,42 @@ http_interactions:
407
578
  code: 200
408
579
  message: OK
409
580
  headers:
581
+ Date:
582
+ - Thu, 30 Apr 2015 08:19:21 GMT
583
+ Server:
584
+ - Apache/2.2.14 (Ubuntu)
585
+ Strict-Transport-Security:
586
+ - max-age=31536000
410
587
  X-Frame-Options:
411
588
  - SAMEORIGIN
412
589
  X-Xss-Protection:
413
590
  - 1; mode=block
414
591
  X-Content-Type-Options:
415
592
  - nosniff
416
- Content-Type:
417
- - application/json; charset=utf-8
418
593
  Etag:
419
- - '"a2f65185054f9e8a841c6d6603fb33bc"'
594
+ - '"b3a2c8ff195e2dafb762e318ba8a0930"'
420
595
  Cache-Control:
421
596
  - max-age=0, private, must-revalidate
422
597
  X-Request-Id:
423
- - 14bd980e-b5e9-46e6-9fcc-ee7f7ed41c1f
598
+ - dbfaddf7-f220-433b-98e9-cb3e9bbf53e4
424
599
  X-Runtime:
425
- - '0.066699'
426
- Connection:
427
- - close
428
- Server:
429
- - thin 1.6.2 codename Doc Brown
600
+ - '0.019716'
601
+ X-Powered-By:
602
+ - Phusion Passenger 4.0.50
603
+ Status:
604
+ - 200 OK
605
+ Transfer-Encoding:
606
+ - chunked
607
+ Content-Type:
608
+ - application/json; charset=utf-8
430
609
  body:
431
610
  encoding: UTF-8
432
- string: '{"data":{"id":1,"number":1,"name":"DCT","first_name":"","last_name":"Bourque","email":"Jonathan@imagineit.se","fax":"","phone":"054-103520","home_phone":"08-55921099","mobile_phone":"","client_type":"company","org_number":"7807210591","settings":{"invoice_delivery_method":"letter","locale":"sv","invoice_days":"30","invoice_template":"original","tax":25,"prices_inc_tax":"no","show_product_code":false,"currency":"SEK"},"address":{"street_address":"Signalhornsgatan
433
- 124","care_of":"","zip_code":"656 34","city":"Karlstad","country":""}}}'
611
+ string: '{"data":{"id":11,"number":1,"name":"A simple client","first_name":"","last_name":"","email":"someones@email.com","fax":"","phone":"","home_phone":"","mobile_phone":"","client_type":"company","org_number":"1235412574","settings":{"invoice_delivery_method":"email","locale":"sv","invoice_days":30,"invoice_template":"original","tax":25,"prices_inc_tax":"no","show_product_code":false,"currency":"SEK"},"address":{"street_address":"","care_of":"","zip_code":"","city":"","country":"SE"}}}'
434
612
  http_version:
435
- recorded_at: Tue, 07 Apr 2015 10:44:28 GMT
613
+ recorded_at: Thu, 30 Apr 2015 08:19:21 GMT
436
614
  - request:
437
615
  method: get
438
- uri: http://dUmziS9k9Q5x0u4wot1H:DAW96mbxui8B3_CBFFFMr0HgfaCfpv7ajUfcZ38B@0.0.0.0:3000/api/v2/clients/1
616
+ uri: https://jWE56VnOHqu-6HgaZyL2:LpdLorG0fmPRGOpeOvHSLiuloEHK0O8YsKliVPNY@sandbox.fakturan.nu/api/v2/clients/11
439
617
  body:
440
618
  encoding: US-ASCII
441
619
  string: ''
@@ -451,30 +629,37 @@ http_interactions:
451
629
  code: 200
452
630
  message: OK
453
631
  headers:
632
+ Date:
633
+ - Thu, 30 Apr 2015 08:19:22 GMT
634
+ Server:
635
+ - Apache/2.2.14 (Ubuntu)
636
+ Strict-Transport-Security:
637
+ - max-age=31536000
454
638
  X-Frame-Options:
455
639
  - SAMEORIGIN
456
640
  X-Xss-Protection:
457
641
  - 1; mode=block
458
642
  X-Content-Type-Options:
459
643
  - nosniff
460
- Content-Type:
461
- - application/json; charset=utf-8
462
644
  Etag:
463
- - '"a2f65185054f9e8a841c6d6603fb33bc"'
645
+ - '"b3a2c8ff195e2dafb762e318ba8a0930"'
464
646
  Cache-Control:
465
647
  - max-age=0, private, must-revalidate
466
648
  X-Request-Id:
467
- - 0bdf6350-2390-41d8-aaab-9154f1fae807
649
+ - cd818535-3e24-44a8-bc63-436ede5c2ce0
468
650
  X-Runtime:
469
- - '0.038723'
470
- Connection:
471
- - close
472
- Server:
473
- - thin 1.6.2 codename Doc Brown
651
+ - '0.015333'
652
+ X-Powered-By:
653
+ - Phusion Passenger 4.0.50
654
+ Status:
655
+ - 200 OK
656
+ Transfer-Encoding:
657
+ - chunked
658
+ Content-Type:
659
+ - application/json; charset=utf-8
474
660
  body:
475
661
  encoding: UTF-8
476
- string: '{"data":{"id":1,"number":1,"name":"DCT","first_name":"","last_name":"Bourque","email":"Jonathan@imagineit.se","fax":"","phone":"054-103520","home_phone":"08-55921099","mobile_phone":"","client_type":"company","org_number":"7807210591","settings":{"invoice_delivery_method":"letter","locale":"sv","invoice_days":"30","invoice_template":"original","tax":25,"prices_inc_tax":"no","show_product_code":false,"currency":"SEK"},"address":{"street_address":"Signalhornsgatan
477
- 124","care_of":"","zip_code":"656 34","city":"Karlstad","country":""}}}'
662
+ string: '{"data":{"id":11,"number":1,"name":"A simple client","first_name":"","last_name":"","email":"someones@email.com","fax":"","phone":"","home_phone":"","mobile_phone":"","client_type":"company","org_number":"1235412574","settings":{"invoice_delivery_method":"email","locale":"sv","invoice_days":30,"invoice_template":"original","tax":25,"prices_inc_tax":"no","show_product_code":false,"currency":"SEK"},"address":{"street_address":"","care_of":"","zip_code":"","city":"","country":"SE"}}}'
478
663
  http_version:
479
- recorded_at: Tue, 07 Apr 2015 10:44:28 GMT
664
+ recorded_at: Thu, 30 Apr 2015 08:19:22 GMT
480
665
  recorded_with: VCR 2.9.3
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fakturan_nu
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.3
4
+ version: 1.1.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jonathan Bourque Olivegren
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-04-17 00:00:00.000000000 Z
11
+ date: 2015-04-30 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: spyke