fortnox-api 0.6.3 → 0.7.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/.rubocop.yml +4 -0
- data/.travis.yml +20 -15
- data/CHANGELOG.md +18 -0
- data/README.md +11 -19
- data/fortnox-api.gemspec +6 -6
- data/lib/fortnox/api/mappers.rb +5 -38
- data/lib/fortnox/api/mappers/base.rb +2 -24
- data/lib/fortnox/api/mappers/base/canonical_name_sym.rb +21 -0
- data/lib/fortnox/api/mappers/value/array.rb +18 -0
- data/lib/fortnox/api/mappers/value/country_code_string.rb +24 -0
- data/lib/fortnox/api/mappers/value/date.rb +11 -0
- data/lib/fortnox/api/mappers/value/hash.rb +16 -0
- data/lib/fortnox/api/mappers/value/identity.rb +18 -0
- data/lib/fortnox/api/models/document.rb +1 -1
- data/lib/fortnox/api/models/invoice.rb +1 -1
- data/lib/fortnox/api/models/order.rb +1 -1
- data/lib/fortnox/api/repositories/base.rb +9 -11
- data/lib/fortnox/api/request_handling.rb +0 -1
- data/lib/fortnox/api/types.rb +19 -3
- data/lib/fortnox/api/types/enums.rb +0 -23
- data/lib/fortnox/api/types/shim/country_code_string.rb +10 -0
- data/lib/fortnox/api/types/sized.rb +3 -16
- data/lib/fortnox/api/version.rb +1 -1
- data/spec/fortnox/api/circular_queue_spec.rb +52 -0
- data/spec/fortnox/api/mappers/base/canonical_name_sym_spec.rb +34 -0
- data/spec/fortnox/api/mappers/base_spec.rb +33 -43
- data/spec/fortnox/api/mappers/contexts/json_conversion.rb +1 -1
- data/spec/fortnox/api/repositories/article_spec.rb +4 -2
- data/spec/fortnox/api/repositories/base_spec.rb +28 -8
- data/spec/fortnox/api/repositories/customer_spec.rb +2 -1
- data/spec/fortnox/api/repositories/invoice_spec.rb +147 -3
- data/spec/fortnox/api/repositories/order_spec.rb +2 -2
- data/spec/fortnox/api/repositories/project_spec.rb +1 -1
- data/spec/fortnox/api/repositories/terms_of_payment_spec.rb +4 -2
- data/spec/fortnox/api/repositories/unit_spec.rb +6 -3
- data/spec/fortnox/api/types/country_code_spec.rb +76 -0
- data/spec/fortnox/api/types/email_spec.rb +8 -7
- data/spec/fortnox/api/types/enums_spec.rb +0 -1
- data/spec/fortnox/api/types/examples/document_row.rb +1 -1
- data/spec/fortnox/api_spec.rb +3 -1
- data/spec/vcr_cassettes/articles/all.yml +22 -8
- data/spec/vcr_cassettes/articles/find_by_hash_failure.yml +6 -6
- data/spec/vcr_cassettes/articles/find_failure.yml +6 -6
- data/spec/vcr_cassettes/articles/find_id_1.yml +7 -7
- data/spec/vcr_cassettes/articles/find_new.yml +9 -9
- data/spec/vcr_cassettes/articles/multi_param_find_by_hash.yml +6 -6
- data/spec/vcr_cassettes/articles/save_new.yml +8 -8
- data/spec/vcr_cassettes/articles/save_old.yml +9 -9
- data/spec/vcr_cassettes/articles/save_with_specially_named_attribute.yml +8 -8
- data/spec/vcr_cassettes/articles/search_by_name.yml +6 -6
- data/spec/vcr_cassettes/articles/search_miss.yml +6 -6
- data/spec/vcr_cassettes/articles/search_with_special_char.yml +6 -6
- data/spec/vcr_cassettes/articles/single_param_find_by_hash.yml +18 -8
- data/spec/vcr_cassettes/customers/all.yml +9 -9
- data/spec/vcr_cassettes/customers/find_by_hash_failure.yml +6 -6
- data/spec/vcr_cassettes/customers/find_failure.yml +6 -6
- data/spec/vcr_cassettes/customers/find_id_1.yml +7 -7
- data/spec/vcr_cassettes/customers/find_new.yml +9 -9
- data/spec/vcr_cassettes/customers/multi_param_find_by_hash.yml +5 -5
- data/spec/vcr_cassettes/customers/save_new.yml +7 -7
- data/spec/vcr_cassettes/customers/save_old.yml +8 -8
- data/spec/vcr_cassettes/customers/save_with_specially_named_attribute.yml +7 -7
- data/spec/vcr_cassettes/customers/search_by_name.yml +16 -8
- data/spec/vcr_cassettes/customers/search_miss.yml +6 -6
- data/spec/vcr_cassettes/customers/search_with_special_char.yml +6 -6
- data/spec/vcr_cassettes/customers/single_param_find_by_hash.yml +7 -7
- data/spec/vcr_cassettes/invoices/all.yml +100 -65
- data/spec/vcr_cassettes/invoices/filter_hit.yml +11 -8
- data/spec/vcr_cassettes/invoices/filter_invalid.yml +6 -6
- data/spec/vcr_cassettes/invoices/find_by_hash_failure.yml +6 -6
- data/spec/vcr_cassettes/invoices/find_failure.yml +6 -6
- data/spec/vcr_cassettes/invoices/find_id_1.yml +7 -7
- data/spec/vcr_cassettes/invoices/find_new.yml +11 -12
- data/spec/vcr_cassettes/invoices/multi_param_find_by_hash.yml +8 -8
- data/spec/vcr_cassettes/invoices/save_new.yml +9 -10
- data/spec/vcr_cassettes/invoices/save_new_with_comments.yml +47 -0
- data/spec/vcr_cassettes/invoices/save_new_with_country.yml +46 -0
- data/spec/vcr_cassettes/invoices/save_new_with_country_GB.yml +47 -0
- data/spec/vcr_cassettes/invoices/save_new_with_country_KR.yml +47 -0
- data/spec/vcr_cassettes/invoices/save_new_with_country_Norge.yml +46 -0
- data/spec/vcr_cassettes/invoices/save_new_with_country_Norway.yml +46 -0
- data/spec/vcr_cassettes/invoices/save_new_with_country_Sverige.yml +46 -0
- data/spec/vcr_cassettes/invoices/save_new_with_country_VA.yml +47 -0
- data/spec/vcr_cassettes/invoices/save_new_with_country_VI.yml +47 -0
- data/spec/vcr_cassettes/invoices/save_new_with_country_empty_string.yml +46 -0
- data/spec/vcr_cassettes/invoices/save_new_with_country_nil.yml +46 -0
- data/spec/vcr_cassettes/invoices/save_old.yml +10 -11
- data/spec/vcr_cassettes/invoices/save_old_with_empty_comments.yml +48 -0
- data/spec/vcr_cassettes/invoices/save_old_with_empty_country.yml +47 -0
- data/spec/vcr_cassettes/invoices/save_old_with_nil_comments.yml +48 -0
- data/spec/vcr_cassettes/invoices/save_old_with_nil_country.yml +47 -0
- data/spec/vcr_cassettes/invoices/save_with_nested_model.yml +9 -10
- data/spec/vcr_cassettes/invoices/save_with_specially_named_attribute.yml +9 -10
- data/spec/vcr_cassettes/invoices/search_by_name.yml +13 -9
- data/spec/vcr_cassettes/invoices/search_miss.yml +6 -6
- data/spec/vcr_cassettes/invoices/search_with_special_char.yml +6 -6
- data/spec/vcr_cassettes/invoices/single_param_find_by_hash.yml +9 -9
- data/spec/vcr_cassettes/orders/all.yml +105 -105
- data/spec/vcr_cassettes/orders/filter_hit.yml +13 -10
- data/spec/vcr_cassettes/orders/filter_invalid.yml +6 -6
- data/spec/vcr_cassettes/orders/find_by_hash_failure.yml +6 -6
- data/spec/vcr_cassettes/orders/find_failure.yml +6 -6
- data/spec/vcr_cassettes/orders/find_id_1.yml +8 -8
- data/spec/vcr_cassettes/orders/find_new.yml +11 -12
- data/spec/vcr_cassettes/orders/housework_type_babysitting.yml +9 -9
- data/spec/vcr_cassettes/orders/housework_type_cleaning.yml +9 -9
- data/spec/vcr_cassettes/orders/housework_type_construction.yml +9 -9
- data/spec/vcr_cassettes/orders/housework_type_cooking.yml +6 -6
- data/spec/vcr_cassettes/orders/housework_type_electricity.yml +9 -9
- data/spec/vcr_cassettes/orders/housework_type_gardening.yml +9 -9
- data/spec/vcr_cassettes/orders/housework_type_glassmetalwork.yml +9 -9
- data/spec/vcr_cassettes/orders/housework_type_grounddrainagework.yml +9 -9
- data/spec/vcr_cassettes/orders/housework_type_hvac.yml +9 -9
- data/spec/vcr_cassettes/orders/housework_type_masonry.yml +9 -9
- data/spec/vcr_cassettes/orders/housework_type_othercare.yml +9 -9
- data/spec/vcr_cassettes/orders/housework_type_othercosts.yml +9 -9
- data/spec/vcr_cassettes/orders/housework_type_paintingwallpapering.yml +9 -9
- data/spec/vcr_cassettes/orders/housework_type_snowplowing.yml +9 -9
- data/spec/vcr_cassettes/orders/housework_type_textileclothing.yml +9 -9
- data/spec/vcr_cassettes/orders/housework_type_tutoring.yml +6 -6
- data/spec/vcr_cassettes/orders/multi_param_find_by_hash.yml +7 -7
- data/spec/vcr_cassettes/orders/save_new.yml +9 -10
- data/spec/vcr_cassettes/orders/save_old.yml +10 -11
- data/spec/vcr_cassettes/orders/save_with_nested_model.yml +9 -10
- data/spec/vcr_cassettes/orders/search_by_name.yml +9 -8
- data/spec/vcr_cassettes/orders/search_miss.yml +6 -6
- data/spec/vcr_cassettes/orders/search_with_special_char.yml +6 -6
- data/spec/vcr_cassettes/orders/single_param_find_by_hash.yml +8 -8
- data/spec/vcr_cassettes/projects/all.yml +18 -8
- data/spec/vcr_cassettes/projects/find_by_hash_failure.yml +6 -6
- data/spec/vcr_cassettes/projects/find_failure.yml +6 -6
- data/spec/vcr_cassettes/projects/find_id_1.yml +6 -6
- data/spec/vcr_cassettes/projects/find_new.yml +9 -9
- data/spec/vcr_cassettes/projects/multi_param_find_by_hash.yml +7 -7
- data/spec/vcr_cassettes/projects/save_new.yml +8 -8
- data/spec/vcr_cassettes/projects/save_old.yml +8 -8
- data/spec/vcr_cassettes/projects/single_param_find_by_hash.yml +7 -7
- data/spec/vcr_cassettes/termsofpayments/all.yml +10 -7
- data/spec/vcr_cassettes/termsofpayments/find_failure.yml +6 -6
- data/spec/vcr_cassettes/termsofpayments/find_id_1.yml +6 -6
- data/spec/vcr_cassettes/termsofpayments/find_new.yml +8 -8
- data/spec/vcr_cassettes/termsofpayments/save_new.yml +8 -8
- data/spec/vcr_cassettes/termsofpayments/save_old.yml +8 -8
- data/spec/vcr_cassettes/units/all.yml +14 -10
- data/spec/vcr_cassettes/units/find_failure.yml +6 -6
- data/spec/vcr_cassettes/units/find_id_1.yml +6 -6
- data/spec/vcr_cassettes/units/find_new.yml +8 -10
- data/spec/vcr_cassettes/units/save_new.yml +8 -10
- data/spec/vcr_cassettes/units/save_old.yml +8 -10
- data/spec/vcr_cassettes/units/save_with_specially_named_attribute.yml +8 -10
- data/temp.txt +1 -0
- metadata +71 -13
@@ -23,7 +23,7 @@ http_interactions:
|
|
23
23
|
Server:
|
24
24
|
- nginx
|
25
25
|
Date:
|
26
|
-
- Wed,
|
26
|
+
- Wed, 29 May 2019 07:52:36 GMT
|
27
27
|
Content-Type:
|
28
28
|
- application/json
|
29
29
|
Connection:
|
@@ -32,16 +32,16 @@ http_interactions:
|
|
32
32
|
- Accept-Encoding
|
33
33
|
- Accept-Encoding
|
34
34
|
X-Rack-Responsetime:
|
35
|
-
- '
|
35
|
+
- '34'
|
36
36
|
X-Uid:
|
37
|
-
-
|
37
|
+
- 4d11ef49
|
38
38
|
X-Build:
|
39
|
-
-
|
39
|
+
- e930a91c78
|
40
40
|
body:
|
41
41
|
encoding: UTF-8
|
42
42
|
string: '{"MetaInformation":{"@TotalResources":2,"@TotalPages":1,"@CurrentPage":1},"Orders":[{"@url":"https:\/\/api.fortnox.se\/3\/orders\/8","Cancelled":false,"Currency":"SEK","CustomerName":"Old
|
43
|
-
name","CustomerNumber":"1","DeliveryDate":null,"DocumentNumber":"8","ExternalInvoiceReference1":"","ExternalInvoiceReference2":"","OrderDate":"2016-04-21","Project":"","Sent":false,"Total":0},{"@url":"https:\/\/api.fortnox.se\/3\/orders\/9","Cancelled":false,"Currency":"SEK","CustomerName":"Old
|
44
|
-
name","CustomerNumber":"1","DeliveryDate":null,"DocumentNumber":"9","ExternalInvoiceReference1":"","ExternalInvoiceReference2":"","OrderDate":"2016-04-21","Project":"","Sent":false,"Total":0}]}'
|
43
|
+
name","CustomerNumber":"1","DeliveryDate":null,"DocumentNumber":"8","ExternalInvoiceReference1":"","ExternalInvoiceReference2":"","OrderDate":"2016-04-21","OrderType":"Order","Project":"","Sent":false,"Total":0},{"@url":"https:\/\/api.fortnox.se\/3\/orders\/9","Cancelled":false,"Currency":"SEK","CustomerName":"Old
|
44
|
+
name","CustomerNumber":"1","DeliveryDate":null,"DocumentNumber":"9","ExternalInvoiceReference1":"","ExternalInvoiceReference2":"","OrderDate":"2016-04-21","OrderType":"Order","Project":"","Sent":false,"Total":0}]}'
|
45
45
|
http_version:
|
46
|
-
recorded_at: Wed,
|
47
|
-
recorded_with: VCR
|
46
|
+
recorded_at: Wed, 29 May 2019 07:52:36 GMT
|
47
|
+
recorded_with: VCR 4.0.0
|
@@ -23,7 +23,7 @@ http_interactions:
|
|
23
23
|
Server:
|
24
24
|
- nginx
|
25
25
|
Date:
|
26
|
-
- Wed,
|
26
|
+
- Wed, 29 May 2019 07:52:31 GMT
|
27
27
|
Content-Type:
|
28
28
|
- application/json
|
29
29
|
Connection:
|
@@ -32,21 +32,31 @@ http_interactions:
|
|
32
32
|
- Accept-Encoding
|
33
33
|
- Accept-Encoding
|
34
34
|
X-Rack-Responsetime:
|
35
|
-
- '
|
35
|
+
- '17'
|
36
36
|
X-Uid:
|
37
|
-
-
|
37
|
+
- 1f51e065
|
38
38
|
X-Build:
|
39
|
-
-
|
39
|
+
- e930a91c78
|
40
40
|
body:
|
41
41
|
encoding: UTF-8
|
42
|
-
string: '{"MetaInformation":{"@TotalResources":
|
42
|
+
string: '{"MetaInformation":{"@TotalResources":31,"@TotalPages":1,"@CurrentPage":1},"Projects":[{"@url":"https:\/\/api.fortnox.se\/3\/projects\/1","Description":"Test
|
43
43
|
project","EndDate":null,"ProjectNumber":"1","Status":"ONGOING","StartDate":"2016-05-02"},{"@url":"https:\/\/api.fortnox.se\/3\/projects\/17","Description":"Benjamin
|
44
44
|
Andersson","EndDate":null,"ProjectNumber":"17","Status":"ONGOING","StartDate":"2017-06-16"},{"@url":"https:\/\/api.fortnox.se\/3\/projects\/18","Description":"Andrea
|
45
45
|
Johansson","EndDate":null,"ProjectNumber":"18","Status":"ONGOING","StartDate":"2017-06-16"},{"@url":"https:\/\/api.fortnox.se\/3\/projects\/2","Description":"BolagsKraft","EndDate":null,"ProjectNumber":"2","Status":"ONGOING","StartDate":"2016-05-13"},{"@url":"https:\/\/api.fortnox.se\/3\/projects\/3","Description":"AK
|
46
46
|
Bolagskraft","EndDate":null,"ProjectNumber":"3","Status":"ONGOING","StartDate":"2016-09-01"},{"@url":"https:\/\/api.fortnox.se\/3\/projects\/5568","Description":"Thom
|
47
47
|
Andersson","EndDate":null,"ProjectNumber":"5568","Status":"ONGOING","StartDate":"2016-12-28"},{"@url":"https:\/\/api.fortnox.se\/3\/projects\/5569","Description":"Nji
|
48
48
|
Nij","EndDate":null,"ProjectNumber":"5569","Status":"ONGOING","StartDate":"2017-05-18"},{"@url":"https:\/\/api.fortnox.se\/3\/projects\/5570","Description":"Some
|
49
|
-
important
|
49
|
+
important project1","EndDate":null,"ProjectNumber":"5570","Status":"ONGOING","StartDate":null},{"@url":"https:\/\/api.fortnox.se\/3\/projects\/5571","Description":"19890102-3286","EndDate":null,"ProjectNumber":"5571","Status":"ONGOING","StartDate":null},{"@url":"https:\/\/api.fortnox.se\/3\/projects\/5572","Description":"19890102-3286","EndDate":null,"ProjectNumber":"5572","Status":"ONGOING","StartDate":null},{"@url":"https:\/\/api.fortnox.se\/3\/projects\/5573","Description":"19921212-1234","EndDate":null,"ProjectNumber":"5573","Status":"ONGOING","StartDate":null},{"@url":"https:\/\/api.fortnox.se\/3\/projects\/5574","Description":"19921212-1234","EndDate":null,"ProjectNumber":"5574","Status":"ONGOING","StartDate":null},{"@url":"https:\/\/api.fortnox.se\/3\/projects\/5575","Description":"19801010-1234","EndDate":null,"ProjectNumber":"5575","Status":"ONGOING","StartDate":null},{"@url":"https:\/\/api.fortnox.se\/3\/projects\/5576","Description":"19801010-1234","EndDate":null,"ProjectNumber":"5576","Status":"ONGOING","StartDate":null},{"@url":"https:\/\/api.fortnox.se\/3\/projects\/5577","Description":"19720316-5985","EndDate":null,"ProjectNumber":"5577","Status":"ONGOING","StartDate":null},{"@url":"https:\/\/api.fortnox.se\/3\/projects\/5578","Description":"19900101-1234","EndDate":null,"ProjectNumber":"5578","Status":"ONGOING","StartDate":null},{"@url":"https:\/\/api.fortnox.se\/3\/projects\/5579","Description":"19901010-1234","EndDate":null,"ProjectNumber":"5579","Status":"ONGOING","StartDate":null},{"@url":"https:\/\/api.fortnox.se\/3\/projects\/5580","Description":"19800101-0101","EndDate":null,"ProjectNumber":"5580","Status":"ONGOING","StartDate":null},{"@url":"https:\/\/api.fortnox.se\/3\/projects\/5581","Description":"19800101-0101","EndDate":null,"ProjectNumber":"5581","Status":"ONGOING","StartDate":null},{"@url":"https:\/\/api.fortnox.se\/3\/projects\/5582","Description":"19801010-1234","EndDate":null,"ProjectNumber":"5582","Status":"ONGOING","StartDate":null},{"@url":"https:\/\/api.fortnox.se\/3\/projects\/5583","Description":"Gabriel
|
50
|
+
Nygren, 19171213-4568","EndDate":null,"ProjectNumber":"5583","Status":"ONGOING","StartDate":null},{"@url":"https:\/\/api.fortnox.se\/3\/projects\/5584","Description":"A
|
51
|
+
description","EndDate":null,"ProjectNumber":"5584","Status":"ONGOING","StartDate":null},{"@url":"https:\/\/api.fortnox.se\/3\/projects\/5585","Description":"A","EndDate":null,"ProjectNumber":"5585","Status":"ONGOING","StartDate":"2017-01-01"},{"@url":"https:\/\/api.fortnox.se\/3\/projects\/5586","Description":"A
|
52
|
+
B, 19800101-0101","EndDate":null,"ProjectNumber":"5586","Status":"ONGOING","StartDate":null},{"@url":"https:\/\/api.fortnox.se\/3\/projects\/5587","Description":"h
|
53
|
+
h, 19800101-0101","EndDate":null,"ProjectNumber":"5587","Status":"ONGOING","StartDate":"2018-03-29"},{"@url":"https:\/\/api.fortnox.se\/3\/projects\/5588","Description":"Test
|
54
|
+
Testsson, 19900101-1234","EndDate":null,"ProjectNumber":"5588","Status":"ONGOING","StartDate":"2018-03-29"},{"@url":"https:\/\/api.fortnox.se\/3\/projects\/5589","Description":"Hannes
|
55
|
+
Elvemyr, 19771110-0805","EndDate":null,"ProjectNumber":"5589","Status":"ONGOING","StartDate":"2018-06-21"},{"@url":"https:\/\/api.fortnox.se\/3\/projects\/5590","Description":"Accodeing
|
56
|
+
to you, 19790827-3399","EndDate":null,"ProjectNumber":"5590","Status":"ONGOING","StartDate":"2019-02-20"},{"@url":"https:\/\/api.fortnox.se\/3\/projects\/5591","Description":"Some
|
57
|
+
important project","EndDate":null,"ProjectNumber":"5591","Status":"ONGOING","StartDate":null},{"@url":"https:\/\/api.fortnox.se\/3\/projects\/5592","Description":"Some
|
58
|
+
important project","EndDate":null,"ProjectNumber":"5592","Status":"ONGOING","StartDate":null},{"@url":"https:\/\/api.fortnox.se\/3\/projects\/5593","Description":"Some
|
59
|
+
important project","EndDate":null,"ProjectNumber":"5593","Status":"ONGOING","StartDate":null}]}'
|
50
60
|
http_version:
|
51
|
-
recorded_at: Wed,
|
52
|
-
recorded_with: VCR
|
61
|
+
recorded_at: Wed, 29 May 2019 07:52:31 GMT
|
62
|
+
recorded_with: VCR 4.0.0
|
@@ -23,7 +23,7 @@ http_interactions:
|
|
23
23
|
Server:
|
24
24
|
- nginx
|
25
25
|
Date:
|
26
|
-
- Wed,
|
26
|
+
- Wed, 29 May 2019 07:52:32 GMT
|
27
27
|
Content-Type:
|
28
28
|
- application/json
|
29
29
|
Connection:
|
@@ -32,14 +32,14 @@ http_interactions:
|
|
32
32
|
- Accept-Encoding
|
33
33
|
- Accept-Encoding
|
34
34
|
X-Rack-Responsetime:
|
35
|
-
- '
|
35
|
+
- '18'
|
36
36
|
X-Uid:
|
37
|
-
-
|
37
|
+
- 1dc6a3fe
|
38
38
|
X-Build:
|
39
|
-
-
|
39
|
+
- e930a91c78
|
40
40
|
body:
|
41
41
|
encoding: UTF-8
|
42
42
|
string: '{"MetaInformation":{"@TotalResources":0,"@TotalPages":0,"@CurrentPage":1},"Projects":[]}'
|
43
43
|
http_version:
|
44
|
-
recorded_at: Wed,
|
45
|
-
recorded_with: VCR
|
44
|
+
recorded_at: Wed, 29 May 2019 07:52:32 GMT
|
45
|
+
recorded_with: VCR 4.0.0
|
@@ -23,7 +23,7 @@ http_interactions:
|
|
23
23
|
Server:
|
24
24
|
- nginx
|
25
25
|
Date:
|
26
|
-
- Wed,
|
26
|
+
- Wed, 29 May 2019 07:52:31 GMT
|
27
27
|
Content-Type:
|
28
28
|
- application/json
|
29
29
|
Connection:
|
@@ -32,14 +32,14 @@ http_interactions:
|
|
32
32
|
- Accept-Encoding
|
33
33
|
- Accept-Encoding
|
34
34
|
X-Rack-Responsetime:
|
35
|
-
- '
|
35
|
+
- '20'
|
36
36
|
X-Uid:
|
37
|
-
-
|
37
|
+
- e8e1e3d8
|
38
38
|
X-Build:
|
39
|
-
-
|
39
|
+
- e930a91c78
|
40
40
|
body:
|
41
41
|
encoding: UTF-8
|
42
42
|
string: '{"ErrorInformation":{"Error":1,"Message":"Kan inte hitta projektet.","Code":2001161}}'
|
43
43
|
http_version:
|
44
|
-
recorded_at: Wed,
|
45
|
-
recorded_with: VCR
|
44
|
+
recorded_at: Wed, 29 May 2019 07:52:31 GMT
|
45
|
+
recorded_with: VCR 4.0.0
|
@@ -23,7 +23,7 @@ http_interactions:
|
|
23
23
|
Server:
|
24
24
|
- nginx
|
25
25
|
Date:
|
26
|
-
- Wed,
|
26
|
+
- Wed, 29 May 2019 07:52:31 GMT
|
27
27
|
Content-Type:
|
28
28
|
- application/json
|
29
29
|
Connection:
|
@@ -32,15 +32,15 @@ http_interactions:
|
|
32
32
|
- Accept-Encoding
|
33
33
|
- Accept-Encoding
|
34
34
|
X-Rack-Responsetime:
|
35
|
-
- '
|
35
|
+
- '17'
|
36
36
|
X-Uid:
|
37
|
-
-
|
37
|
+
- 6026f312
|
38
38
|
X-Build:
|
39
|
-
-
|
39
|
+
- e930a91c78
|
40
40
|
body:
|
41
41
|
encoding: UTF-8
|
42
42
|
string: '{"Project":{"@url":"https:\/\/api.fortnox.se\/3\/projects\/1","Comments":null,"ContactPerson":null,"Description":"Test
|
43
43
|
project","EndDate":null,"ProjectLeader":null,"ProjectNumber":"1","Status":"ONGOING","StartDate":"2016-05-02"}}'
|
44
44
|
http_version:
|
45
|
-
recorded_at: Wed,
|
46
|
-
recorded_with: VCR
|
45
|
+
recorded_at: Wed, 29 May 2019 07:52:31 GMT
|
46
|
+
recorded_with: VCR 4.0.0
|
@@ -2,7 +2,7 @@
|
|
2
2
|
http_interactions:
|
3
3
|
- request:
|
4
4
|
method: get
|
5
|
-
uri: https://api.fortnox.se/3/projects/
|
5
|
+
uri: https://api.fortnox.se/3/projects/5593
|
6
6
|
body:
|
7
7
|
encoding: US-ASCII
|
8
8
|
string: ''
|
@@ -23,7 +23,7 @@ http_interactions:
|
|
23
23
|
Server:
|
24
24
|
- nginx
|
25
25
|
Date:
|
26
|
-
- Wed,
|
26
|
+
- Wed, 29 May 2019 07:52:31 GMT
|
27
27
|
Content-Type:
|
28
28
|
- application/json
|
29
29
|
Connection:
|
@@ -32,15 +32,15 @@ http_interactions:
|
|
32
32
|
- Accept-Encoding
|
33
33
|
- Accept-Encoding
|
34
34
|
X-Rack-Responsetime:
|
35
|
-
- '
|
35
|
+
- '19'
|
36
36
|
X-Uid:
|
37
|
-
-
|
37
|
+
- 681773b0
|
38
38
|
X-Build:
|
39
|
-
-
|
39
|
+
- e930a91c78
|
40
40
|
body:
|
41
41
|
encoding: UTF-8
|
42
|
-
string: '{"Project":{"@url":"https:\/\/api.fortnox.se\/3\/projects\/
|
43
|
-
value","ContactPerson":null,"Description":"Some important project","EndDate":null,"ProjectLeader":null,"ProjectNumber":"
|
42
|
+
string: '{"Project":{"@url":"https:\/\/api.fortnox.se\/3\/projects\/5593","Comments":"A
|
43
|
+
value","ContactPerson":null,"Description":"Some important project","EndDate":null,"ProjectLeader":null,"ProjectNumber":"5593","Status":"ONGOING","StartDate":null}}'
|
44
44
|
http_version:
|
45
|
-
recorded_at: Wed,
|
46
|
-
recorded_with: VCR
|
45
|
+
recorded_at: Wed, 29 May 2019 07:52:31 GMT
|
46
|
+
recorded_with: VCR 4.0.0
|
@@ -23,7 +23,7 @@ http_interactions:
|
|
23
23
|
Server:
|
24
24
|
- nginx
|
25
25
|
Date:
|
26
|
-
- Wed,
|
26
|
+
- Wed, 29 May 2019 07:52:32 GMT
|
27
27
|
Content-Type:
|
28
28
|
- application/json
|
29
29
|
Connection:
|
@@ -32,15 +32,15 @@ http_interactions:
|
|
32
32
|
- Accept-Encoding
|
33
33
|
- Accept-Encoding
|
34
34
|
X-Rack-Responsetime:
|
35
|
-
- '
|
35
|
+
- '17'
|
36
36
|
X-Uid:
|
37
|
-
-
|
37
|
+
- 59fddc57
|
38
38
|
X-Build:
|
39
|
-
-
|
39
|
+
- e930a91c78
|
40
40
|
body:
|
41
41
|
encoding: UTF-8
|
42
|
-
string: '{"MetaInformation":{"@TotalResources":
|
42
|
+
string: '{"MetaInformation":{"@TotalResources":31,"@TotalPages":16,"@CurrentPage":1},"Projects":[{"@url":"https:\/\/api.fortnox.se\/3\/projects\/18","Description":"Andrea
|
43
43
|
Johansson","EndDate":null,"ProjectNumber":"18","Status":"ONGOING","StartDate":"2017-06-16"},{"@url":"https:\/\/api.fortnox.se\/3\/projects\/2","Description":"BolagsKraft","EndDate":null,"ProjectNumber":"2","Status":"ONGOING","StartDate":"2016-05-13"}]}'
|
44
44
|
http_version:
|
45
|
-
recorded_at: Wed,
|
46
|
-
recorded_with: VCR
|
45
|
+
recorded_at: Wed, 29 May 2019 07:52:32 GMT
|
46
|
+
recorded_with: VCR 4.0.0
|
@@ -23,7 +23,7 @@ http_interactions:
|
|
23
23
|
Server:
|
24
24
|
- nginx
|
25
25
|
Date:
|
26
|
-
- Wed,
|
26
|
+
- Wed, 29 May 2019 07:52:30 GMT
|
27
27
|
Content-Type:
|
28
28
|
- application/json
|
29
29
|
Connection:
|
@@ -31,15 +31,15 @@ http_interactions:
|
|
31
31
|
Location:
|
32
32
|
- project
|
33
33
|
X-Rack-Responsetime:
|
34
|
-
- '
|
34
|
+
- '160'
|
35
35
|
X-Uid:
|
36
|
-
-
|
36
|
+
- 3d6ffe61
|
37
37
|
X-Build:
|
38
|
-
-
|
38
|
+
- e930a91c78
|
39
39
|
body:
|
40
40
|
encoding: UTF-8
|
41
|
-
string: '{"Project":{"@url":"https:\/\/api.fortnox.se\/3\/projects\/
|
42
|
-
value","ContactPerson":null,"Description":"Some important project","EndDate":null,"ProjectLeader":null,"ProjectNumber":"
|
41
|
+
string: '{"Project":{"@url":"https:\/\/api.fortnox.se\/3\/projects\/5593","Comments":"A
|
42
|
+
value","ContactPerson":null,"Description":"Some important project","EndDate":null,"ProjectLeader":null,"ProjectNumber":"5593","Status":"ONGOING","StartDate":null}}'
|
43
43
|
http_version:
|
44
|
-
recorded_at: Wed,
|
45
|
-
recorded_with: VCR
|
44
|
+
recorded_at: Wed, 29 May 2019 07:52:30 GMT
|
45
|
+
recorded_with: VCR 4.0.0
|
@@ -2,7 +2,7 @@
|
|
2
2
|
http_interactions:
|
3
3
|
- request:
|
4
4
|
method: put
|
5
|
-
uri: https://api.fortnox.se/3/projects/
|
5
|
+
uri: https://api.fortnox.se/3/projects/5593
|
6
6
|
body:
|
7
7
|
encoding: UTF-8
|
8
8
|
string: '{"Project":{"Comments":"Updated comments"}}'
|
@@ -23,7 +23,7 @@ http_interactions:
|
|
23
23
|
Server:
|
24
24
|
- nginx
|
25
25
|
Date:
|
26
|
-
- Wed,
|
26
|
+
- Wed, 29 May 2019 07:52:31 GMT
|
27
27
|
Content-Type:
|
28
28
|
- application/json
|
29
29
|
Connection:
|
@@ -34,13 +34,13 @@ http_interactions:
|
|
34
34
|
X-Rack-Responsetime:
|
35
35
|
- '21'
|
36
36
|
X-Uid:
|
37
|
-
-
|
37
|
+
- f3959565
|
38
38
|
X-Build:
|
39
|
-
-
|
39
|
+
- e930a91c78
|
40
40
|
body:
|
41
41
|
encoding: UTF-8
|
42
|
-
string: '{"Project":{"@url":"https:\/\/api.fortnox.se\/3\/projects\/
|
43
|
-
comments","ContactPerson":null,"Description":"Some important project","EndDate":null,"ProjectLeader":null,"ProjectNumber":"
|
42
|
+
string: '{"Project":{"@url":"https:\/\/api.fortnox.se\/3\/projects\/5593","Comments":"Updated
|
43
|
+
comments","ContactPerson":null,"Description":"Some important project","EndDate":null,"ProjectLeader":null,"ProjectNumber":"5593","Status":"ONGOING","StartDate":null}}'
|
44
44
|
http_version:
|
45
|
-
recorded_at: Wed,
|
46
|
-
recorded_with: VCR
|
45
|
+
recorded_at: Wed, 29 May 2019 07:52:31 GMT
|
46
|
+
recorded_with: VCR 4.0.0
|
@@ -23,7 +23,7 @@ http_interactions:
|
|
23
23
|
Server:
|
24
24
|
- nginx
|
25
25
|
Date:
|
26
|
-
- Wed,
|
26
|
+
- Wed, 29 May 2019 07:52:32 GMT
|
27
27
|
Content-Type:
|
28
28
|
- application/json
|
29
29
|
Connection:
|
@@ -32,15 +32,15 @@ http_interactions:
|
|
32
32
|
- Accept-Encoding
|
33
33
|
- Accept-Encoding
|
34
34
|
X-Rack-Responsetime:
|
35
|
-
- '
|
35
|
+
- '18'
|
36
36
|
X-Uid:
|
37
|
-
-
|
37
|
+
- b9a72868
|
38
38
|
X-Build:
|
39
|
-
-
|
39
|
+
- e930a91c78
|
40
40
|
body:
|
41
41
|
encoding: UTF-8
|
42
|
-
string: '{"MetaInformation":{"@TotalResources":
|
42
|
+
string: '{"MetaInformation":{"@TotalResources":31,"@TotalPages":31,"@CurrentPage":1},"Projects":[{"@url":"https:\/\/api.fortnox.se\/3\/projects\/1","Description":"Test
|
43
43
|
project","EndDate":null,"ProjectNumber":"1","Status":"ONGOING","StartDate":"2016-05-02"}]}'
|
44
44
|
http_version:
|
45
|
-
recorded_at: Wed,
|
46
|
-
recorded_with: VCR
|
45
|
+
recorded_at: Wed, 29 May 2019 07:52:32 GMT
|
46
|
+
recorded_with: VCR 4.0.0
|
@@ -23,7 +23,7 @@ http_interactions:
|
|
23
23
|
Server:
|
24
24
|
- nginx
|
25
25
|
Date:
|
26
|
-
-
|
26
|
+
- Wed, 29 May 2019 07:52:48 GMT
|
27
27
|
Content-Type:
|
28
28
|
- application/json
|
29
29
|
Connection:
|
@@ -32,20 +32,23 @@ http_interactions:
|
|
32
32
|
- Accept-Encoding
|
33
33
|
- Accept-Encoding
|
34
34
|
X-Rack-Responsetime:
|
35
|
-
- '
|
35
|
+
- '30'
|
36
36
|
X-Uid:
|
37
|
-
-
|
37
|
+
- d265447a
|
38
38
|
X-Build:
|
39
|
-
-
|
39
|
+
- e930a91c78
|
40
40
|
body:
|
41
41
|
encoding: UTF-8
|
42
|
-
string: '{"MetaInformation":{"@TotalResources":
|
42
|
+
string: '{"MetaInformation":{"@TotalResources":12,"@TotalPages":1,"@CurrentPage":1},"TermsOfPayments":[{"@url":"https:\/\/api.fortnox.se\/3\/termsofpayment\/0","Code":"0","Description":"0
|
43
43
|
dagar"},{"@url":"https:\/\/api.fortnox.se\/3\/termsofpayment\/10","Code":"10","Description":"10
|
44
44
|
dagar"},{"@url":"https:\/\/api.fortnox.se\/3\/termsofpayment\/15","Code":"15","Description":"15
|
45
45
|
dagar"},{"@url":"https:\/\/api.fortnox.se\/3\/termsofpayment\/20","Code":"20","Description":"20
|
46
46
|
dagar"},{"@url":"https:\/\/api.fortnox.se\/3\/termsofpayment\/30","Code":"30","Description":"30
|
47
47
|
dagar"},{"@url":"https:\/\/api.fortnox.se\/3\/termsofpayment\/K","Code":"K","Description":"Kontant"},{"@url":"https:\/\/api.fortnox.se\/3\/termsofpayment\/PF","Code":"PF","Description":"Postf\u00f6rskott"},{"@url":"https:\/\/api.fortnox.se\/3\/termsofpayment\/AG","Code":"AG","Description":"Autogiro"},{"@url":"https:\/\/api.fortnox.se\/3\/termsofpayment\/30DAYS","Code":"30DAYS","Description":"Updated
|
48
|
+
description"},{"@url":"https:\/\/api.fortnox.se\/3\/termsofpayment\/15DAYS","Code":"15DAYS","Description":"Updated
|
49
|
+
description"},{"@url":"https:\/\/api.fortnox.se\/3\/termsofpayment\/17DAYS","Code":"17DAYS","Description":"Updated
|
50
|
+
description"},{"@url":"https:\/\/api.fortnox.se\/3\/termsofpayment\/16DAYS","Code":"16DAYS","Description":"Updated
|
48
51
|
description"}]}'
|
49
52
|
http_version:
|
50
|
-
recorded_at:
|
51
|
-
recorded_with: VCR
|
53
|
+
recorded_at: Wed, 29 May 2019 07:52:48 GMT
|
54
|
+
recorded_with: VCR 4.0.0
|
@@ -23,7 +23,7 @@ http_interactions:
|
|
23
23
|
Server:
|
24
24
|
- nginx
|
25
25
|
Date:
|
26
|
-
-
|
26
|
+
- Wed, 29 May 2019 07:52:48 GMT
|
27
27
|
Content-Type:
|
28
28
|
- application/json
|
29
29
|
Connection:
|
@@ -32,14 +32,14 @@ http_interactions:
|
|
32
32
|
- Accept-Encoding
|
33
33
|
- Accept-Encoding
|
34
34
|
X-Rack-Responsetime:
|
35
|
-
- '
|
35
|
+
- '15'
|
36
36
|
X-Uid:
|
37
|
-
-
|
37
|
+
- 5f1d14f1
|
38
38
|
X-Build:
|
39
|
-
-
|
39
|
+
- e930a91c78
|
40
40
|
body:
|
41
41
|
encoding: UTF-8
|
42
42
|
string: '{"ErrorInformation":{"Error":1,"Message":"Kan inte hitta betalningsvillkoret.","Code":2000429}}'
|
43
43
|
http_version:
|
44
|
-
recorded_at:
|
45
|
-
recorded_with: VCR
|
44
|
+
recorded_at: Wed, 29 May 2019 07:52:48 GMT
|
45
|
+
recorded_with: VCR 4.0.0
|
@@ -23,7 +23,7 @@ http_interactions:
|
|
23
23
|
Server:
|
24
24
|
- nginx
|
25
25
|
Date:
|
26
|
-
-
|
26
|
+
- Wed, 29 May 2019 07:52:48 GMT
|
27
27
|
Content-Type:
|
28
28
|
- application/json
|
29
29
|
Connection:
|
@@ -32,15 +32,15 @@ http_interactions:
|
|
32
32
|
- Accept-Encoding
|
33
33
|
- Accept-Encoding
|
34
34
|
X-Rack-Responsetime:
|
35
|
-
- '
|
35
|
+
- '15'
|
36
36
|
X-Uid:
|
37
|
-
-
|
37
|
+
- 2af0886c
|
38
38
|
X-Build:
|
39
|
-
-
|
39
|
+
- e930a91c78
|
40
40
|
body:
|
41
41
|
encoding: UTF-8
|
42
42
|
string: '{"TermsOfPayment":{"@url":"https:\/\/api.fortnox.se\/3\/termsofpayment\/15DAYS","Code":"15DAYS","Description":"Updated
|
43
43
|
description"}}'
|
44
44
|
http_version:
|
45
|
-
recorded_at:
|
46
|
-
recorded_with: VCR
|
45
|
+
recorded_at: Wed, 29 May 2019 07:52:48 GMT
|
46
|
+
recorded_with: VCR 4.0.0
|
@@ -2,7 +2,7 @@
|
|
2
2
|
http_interactions:
|
3
3
|
- request:
|
4
4
|
method: get
|
5
|
-
uri: https://api.fortnox.se/3/termsofpayments/
|
5
|
+
uri: https://api.fortnox.se/3/termsofpayments/18DAYS
|
6
6
|
body:
|
7
7
|
encoding: US-ASCII
|
8
8
|
string: ''
|
@@ -23,7 +23,7 @@ http_interactions:
|
|
23
23
|
Server:
|
24
24
|
- nginx
|
25
25
|
Date:
|
26
|
-
-
|
26
|
+
- Wed, 29 May 2019 07:54:46 GMT
|
27
27
|
Content-Type:
|
28
28
|
- application/json
|
29
29
|
Connection:
|
@@ -32,15 +32,15 @@ http_interactions:
|
|
32
32
|
- Accept-Encoding
|
33
33
|
- Accept-Encoding
|
34
34
|
X-Rack-Responsetime:
|
35
|
-
- '
|
35
|
+
- '15'
|
36
36
|
X-Uid:
|
37
|
-
-
|
37
|
+
- cfc02333
|
38
38
|
X-Build:
|
39
|
-
-
|
39
|
+
- e930a91c78
|
40
40
|
body:
|
41
41
|
encoding: UTF-8
|
42
|
-
string: '{"TermsOfPayment":{"@url":"https:\/\/api.fortnox.se\/3\/termsofpayment\/
|
42
|
+
string: '{"TermsOfPayment":{"@url":"https:\/\/api.fortnox.se\/3\/termsofpayment\/18DAYS","Code":"18DAYS","Description":"A
|
43
43
|
value"}}'
|
44
44
|
http_version:
|
45
|
-
recorded_at:
|
46
|
-
recorded_with: VCR
|
45
|
+
recorded_at: Wed, 29 May 2019 07:54:46 GMT
|
46
|
+
recorded_with: VCR 4.0.0
|