fortnox-api 0.6.2 → 0.8.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 +5 -1
- data/.travis.yml +20 -22
- data/CHANGELOG.md +48 -0
- data/README.md +14 -19
- data/Rakefile +5 -0
- data/fortnox-api.gemspec +10 -10
- 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/base/from_json.rb +6 -1
- data/lib/fortnox/api/mappers/value/array.rb +18 -0
- data/lib/fortnox/api/mappers/value/country_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 +6 -3
- 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 +40 -3
- data/lib/fortnox/api/types/enums.rb +36 -31
- data/lib/fortnox/api/types/shim/country_string.rb +10 -0
- 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 +29 -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/account_number_spec.rb +19 -15
- data/spec/fortnox/api/types/country_code_spec.rb +42 -0
- data/spec/fortnox/api/types/country_spec.rb +67 -0
- data/spec/fortnox/api/types/email_spec.rb +8 -7
- data/spec/fortnox/api/types/enums_spec.rb +1 -1
- data/spec/fortnox/api/types/examples/document_row.rb +1 -1
- data/spec/fortnox/api/types/housework_types_spec.rb +151 -34
- data/spec/fortnox/api_spec.rb +3 -1
- data/spec/vcr_cassettes/articles/all.yml +40 -10
- data/spec/vcr_cassettes/articles/find_by_hash_failure.yml +21 -8
- data/spec/vcr_cassettes/articles/find_failure.yml +21 -8
- data/spec/vcr_cassettes/articles/find_id_1.yml +22 -9
- data/spec/vcr_cassettes/articles/find_new.yml +24 -11
- data/spec/vcr_cassettes/articles/multi_param_find_by_hash.yml +21 -8
- data/spec/vcr_cassettes/articles/save_new.yml +22 -8
- data/spec/vcr_cassettes/articles/save_old.yml +24 -11
- data/spec/vcr_cassettes/articles/save_with_specially_named_attribute.yml +22 -8
- data/spec/vcr_cassettes/articles/search_by_name.yml +21 -8
- data/spec/vcr_cassettes/articles/search_miss.yml +21 -8
- data/spec/vcr_cassettes/articles/search_with_special_char.yml +21 -8
- data/spec/vcr_cassettes/articles/single_param_find_by_hash.yml +33 -10
- data/spec/vcr_cassettes/customers/all.yml +26 -13
- data/spec/vcr_cassettes/customers/find_by_hash_failure.yml +21 -8
- data/spec/vcr_cassettes/customers/find_failure.yml +21 -8
- data/spec/vcr_cassettes/customers/find_id_1.yml +22 -9
- data/spec/vcr_cassettes/customers/find_new.yml +24 -11
- data/spec/vcr_cassettes/customers/multi_param_find_by_hash.yml +21 -8
- data/spec/vcr_cassettes/customers/save_new.yml +21 -7
- data/spec/vcr_cassettes/customers/save_new_with_country_code_SE.yml +60 -0
- data/spec/vcr_cassettes/customers/save_old.yml +23 -10
- data/spec/vcr_cassettes/customers/save_with_specially_named_attribute.yml +21 -7
- data/spec/vcr_cassettes/customers/search_by_name.yml +32 -10
- data/spec/vcr_cassettes/customers/search_miss.yml +21 -8
- data/spec/vcr_cassettes/customers/search_with_special_char.yml +21 -8
- data/spec/vcr_cassettes/customers/single_param_find_by_hash.yml +22 -9
- data/spec/vcr_cassettes/invoices/all.yml +118 -67
- data/spec/vcr_cassettes/invoices/filter_hit.yml +26 -10
- data/spec/vcr_cassettes/invoices/filter_invalid.yml +20 -6
- data/spec/vcr_cassettes/invoices/find_by_hash_failure.yml +21 -8
- data/spec/vcr_cassettes/invoices/find_failure.yml +21 -8
- data/spec/vcr_cassettes/invoices/find_id_1.yml +23 -10
- data/spec/vcr_cassettes/invoices/find_new.yml +26 -14
- data/spec/vcr_cassettes/invoices/multi_param_find_by_hash.yml +23 -10
- data/spec/vcr_cassettes/invoices/save_new.yml +23 -10
- data/spec/vcr_cassettes/invoices/save_new_with_comments.yml +61 -0
- data/spec/vcr_cassettes/invoices/save_new_with_country.yml +60 -0
- data/spec/vcr_cassettes/invoices/save_new_with_country_GB.yml +61 -0
- data/spec/vcr_cassettes/invoices/save_new_with_country_KR.yml +61 -0
- data/spec/vcr_cassettes/invoices/save_new_with_country_Norge.yml +60 -0
- data/spec/vcr_cassettes/invoices/save_new_with_country_Norway.yml +60 -0
- data/spec/vcr_cassettes/invoices/save_new_with_country_Sverige.yml +60 -0
- data/spec/vcr_cassettes/invoices/save_new_with_country_VA.yml +61 -0
- data/spec/vcr_cassettes/invoices/save_new_with_country_VI.yml +61 -0
- data/spec/vcr_cassettes/invoices/save_new_with_country_empty_string.yml +60 -0
- data/spec/vcr_cassettes/invoices/save_new_with_country_nil.yml +60 -0
- data/spec/vcr_cassettes/invoices/save_old.yml +25 -13
- data/spec/vcr_cassettes/invoices/save_old_with_empty_comments.yml +61 -0
- data/spec/vcr_cassettes/invoices/save_old_with_empty_country.yml +60 -0
- data/spec/vcr_cassettes/invoices/save_old_with_nil_comments.yml +61 -0
- data/spec/vcr_cassettes/invoices/save_old_with_nil_country.yml +60 -0
- data/spec/vcr_cassettes/invoices/save_with_nested_model.yml +23 -10
- data/spec/vcr_cassettes/invoices/save_with_specially_named_attribute.yml +23 -10
- data/spec/vcr_cassettes/invoices/search_by_name.yml +28 -11
- data/spec/vcr_cassettes/invoices/search_miss.yml +21 -8
- data/spec/vcr_cassettes/invoices/search_with_special_char.yml +21 -8
- data/spec/vcr_cassettes/invoices/single_param_find_by_hash.yml +24 -11
- data/spec/vcr_cassettes/orders/all.yml +120 -107
- data/spec/vcr_cassettes/orders/filter_hit.yml +28 -12
- data/spec/vcr_cassettes/orders/filter_invalid.yml +20 -6
- data/spec/vcr_cassettes/orders/find_by_hash_failure.yml +21 -8
- data/spec/vcr_cassettes/orders/find_failure.yml +21 -8
- data/spec/vcr_cassettes/orders/find_id_1.yml +23 -10
- data/spec/vcr_cassettes/orders/find_new.yml +26 -14
- data/spec/vcr_cassettes/orders/housework_invalid_tax_reduction_type.yml +57 -0
- data/spec/vcr_cassettes/orders/housework_othercoses_invalid.yml +57 -0
- data/spec/vcr_cassettes/orders/housework_type_babysitting.yml +24 -10
- data/spec/vcr_cassettes/orders/housework_type_cleaning.yml +24 -10
- data/spec/vcr_cassettes/orders/housework_type_construction.yml +24 -10
- data/spec/vcr_cassettes/orders/housework_type_cooking.yml +21 -7
- data/spec/vcr_cassettes/orders/housework_type_electricity.yml +24 -10
- data/spec/vcr_cassettes/orders/housework_type_gardening.yml +24 -10
- data/spec/vcr_cassettes/orders/housework_type_glassmetalwork.yml +24 -10
- data/spec/vcr_cassettes/orders/housework_type_grounddrainagework.yml +24 -10
- data/spec/vcr_cassettes/orders/housework_type_hvac.yml +24 -10
- data/spec/vcr_cassettes/orders/housework_type_itservices.yml +60 -0
- data/spec/vcr_cassettes/orders/housework_type_majorappliancerepair.yml +60 -0
- data/spec/vcr_cassettes/orders/housework_type_masonry.yml +24 -10
- data/spec/vcr_cassettes/orders/housework_type_movingservices.yml +60 -0
- data/spec/vcr_cassettes/orders/housework_type_othercare.yml +24 -10
- data/spec/vcr_cassettes/orders/housework_type_othercosts.yml +24 -10
- data/spec/vcr_cassettes/orders/housework_type_paintingwallpapering.yml +24 -10
- data/spec/vcr_cassettes/orders/housework_type_snowplowing.yml +24 -10
- data/spec/vcr_cassettes/orders/housework_type_textileclothing.yml +24 -10
- data/spec/vcr_cassettes/orders/housework_type_tutoring.yml +21 -7
- data/spec/vcr_cassettes/orders/housework_without_tax_reduction_type.yml +57 -0
- data/spec/vcr_cassettes/orders/multi_param_find_by_hash.yml +22 -9
- data/spec/vcr_cassettes/orders/save_new.yml +23 -10
- data/spec/vcr_cassettes/orders/save_old.yml +25 -13
- data/spec/vcr_cassettes/orders/save_with_nested_model.yml +23 -10
- data/spec/vcr_cassettes/orders/search_by_name.yml +25 -11
- data/spec/vcr_cassettes/orders/search_miss.yml +21 -8
- data/spec/vcr_cassettes/orders/search_with_special_char.yml +21 -8
- data/spec/vcr_cassettes/orders/single_param_find_by_hash.yml +23 -10
- data/spec/vcr_cassettes/projects/all.yml +41 -16
- data/spec/vcr_cassettes/projects/find_by_hash_failure.yml +21 -8
- data/spec/vcr_cassettes/projects/find_failure.yml +21 -8
- data/spec/vcr_cassettes/projects/find_id_1.yml +21 -8
- data/spec/vcr_cassettes/projects/find_new.yml +24 -11
- data/spec/vcr_cassettes/projects/multi_param_find_by_hash.yml +23 -10
- data/spec/vcr_cassettes/projects/save_new.yml +22 -8
- data/spec/vcr_cassettes/projects/save_old.yml +24 -11
- data/spec/vcr_cassettes/projects/single_param_find_by_hash.yml +22 -9
- data/spec/vcr_cassettes/termsofpayments/all.yml +31 -14
- data/spec/vcr_cassettes/termsofpayments/find_failure.yml +21 -8
- data/spec/vcr_cassettes/termsofpayments/find_id_1.yml +22 -9
- data/spec/vcr_cassettes/termsofpayments/find_new.yml +23 -10
- data/spec/vcr_cassettes/termsofpayments/save_new.yml +22 -8
- data/spec/vcr_cassettes/termsofpayments/save_old.yml +23 -10
- data/spec/vcr_cassettes/units/all.yml +31 -12
- data/spec/vcr_cassettes/units/find_failure.yml +21 -8
- data/spec/vcr_cassettes/units/find_id_1.yml +21 -8
- data/spec/vcr_cassettes/units/find_new.yml +23 -12
- data/spec/vcr_cassettes/units/save_new.yml +22 -10
- data/spec/vcr_cassettes/units/save_old.yml +23 -12
- data/spec/vcr_cassettes/units/save_with_specially_named_attribute.yml +22 -10
- data/temp.txt +1 -0
- metadata +99 -21
- data/spec/support/matchers/type/have_country_code_matcher.rb +0 -15
@@ -2,7 +2,7 @@
|
|
2
2
|
http_interactions:
|
3
3
|
- request:
|
4
4
|
method: get
|
5
|
-
uri: https://api.fortnox.se/3/articles/
|
5
|
+
uri: https://api.fortnox.se/3/articles/26
|
6
6
|
body:
|
7
7
|
encoding: US-ASCII
|
8
8
|
string: ''
|
@@ -15,6 +15,10 @@ http_interactions:
|
|
15
15
|
- 9aBA8ZgsvR
|
16
16
|
Access-Token:
|
17
17
|
- ccaef817-d5d8-4b1c-a316-54f3e55c5c54
|
18
|
+
Accept-Encoding:
|
19
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
20
|
+
User-Agent:
|
21
|
+
- Ruby
|
18
22
|
response:
|
19
23
|
status:
|
20
24
|
code: 200
|
@@ -23,24 +27,33 @@ http_interactions:
|
|
23
27
|
Server:
|
24
28
|
- nginx
|
25
29
|
Date:
|
26
|
-
- Mon,
|
30
|
+
- Mon, 21 Dec 2020 20:40:03 GMT
|
27
31
|
Content-Type:
|
28
32
|
- application/json
|
29
33
|
Connection:
|
30
34
|
- close
|
31
35
|
Vary:
|
32
36
|
- Accept-Encoding
|
33
|
-
- Accept-Encoding
|
34
37
|
X-Rack-Responsetime:
|
35
|
-
- '
|
38
|
+
- '34'
|
36
39
|
X-Uid:
|
37
|
-
-
|
40
|
+
- 3f843cae
|
38
41
|
X-Build:
|
39
|
-
-
|
42
|
+
- d59e2acefa
|
43
|
+
Strict-Transport-Security:
|
44
|
+
- max-age=31536000; includeSubdomains
|
45
|
+
X-Xss-Protection:
|
46
|
+
- 1; mode=block
|
47
|
+
X-Content-Type-Options:
|
48
|
+
- nosniff
|
49
|
+
X-Frame-Options:
|
50
|
+
- sameorigin
|
51
|
+
Referrer-Policy:
|
52
|
+
- strict-origin-when-cross-origin
|
40
53
|
body:
|
41
|
-
encoding:
|
42
|
-
string: '{"Article":{"@url":"https:\/\/api.fortnox.se\/3\/articles\/
|
43
|
-
value","DisposableQuantity":0,"EAN":"","EUAccount":3200,"EUVATAccount":3231,"ExportAccount":3200,"Height":0,"Housework":false,"HouseworkType":null,"Active":true,"Manufacturer":null,"ManufacturerArticleNumber":"","Note":"","PurchaseAccount":3100,"PurchasePrice":0,"QuantityInStock":0,"ReservedQuantity":0,"SalesAccount":1250,"StockGoods":false,"StockPlace":null,"StockValue":0,"StockWarning":0,"SupplierName":null,"SupplierNumber":null,"Type":"STOCK","Unit":null,"VAT":0,"WebshopArticle":false,"Weight":0,"Width":0,"Expired":false,"SalesPrice":null,"CostCalculationMethod":null,"StockAccount":null,"StockChangeAccount":null,"DirectCost":
|
54
|
+
encoding: ASCII-8BIT
|
55
|
+
string: '{"Article":{"@url":"https:\/\/api.fortnox.se\/3\/articles\/26","ArticleNumber":"26","Bulky":false,"ConstructionAccount":0,"Depth":0,"Description":"A
|
56
|
+
value","DisposableQuantity":0,"EAN":"","EUAccount":3200,"EUVATAccount":3231,"ExportAccount":3200,"Height":0,"Housework":false,"HouseworkType":null,"Active":true,"Manufacturer":null,"ManufacturerArticleNumber":"","Note":"","PurchaseAccount":3100,"PurchasePrice":0,"QuantityInStock":0,"ReservedQuantity":0,"SalesAccount":1250,"StockGoods":false,"StockPlace":null,"StockValue":0,"StockWarning":0,"SupplierName":null,"SupplierNumber":null,"Type":"STOCK","Unit":null,"VAT":0,"WebshopArticle":false,"Weight":0,"Width":0,"Expired":false,"SalesPrice":null,"CostCalculationMethod":null,"StockAccount":null,"StockChangeAccount":null,"DirectCost":null,"FreightCost":null,"OtherCost":null,"DefaultStockPoint":null,"DefaultStockLocation":null}}'
|
44
57
|
http_version:
|
45
|
-
recorded_at: Mon,
|
46
|
-
recorded_with: VCR
|
58
|
+
recorded_at: Mon, 21 Dec 2020 20:40:03 GMT
|
59
|
+
recorded_with: VCR 4.0.0
|
@@ -15,6 +15,10 @@ http_interactions:
|
|
15
15
|
- 9aBA8ZgsvR
|
16
16
|
Access-Token:
|
17
17
|
- ccaef817-d5d8-4b1c-a316-54f3e55c5c54
|
18
|
+
Accept-Encoding:
|
19
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
20
|
+
User-Agent:
|
21
|
+
- Ruby
|
18
22
|
response:
|
19
23
|
status:
|
20
24
|
code: 200
|
@@ -23,23 +27,32 @@ http_interactions:
|
|
23
27
|
Server:
|
24
28
|
- nginx
|
25
29
|
Date:
|
26
|
-
-
|
30
|
+
- Mon, 21 Dec 2020 20:40:04 GMT
|
27
31
|
Content-Type:
|
28
32
|
- application/json
|
29
33
|
Connection:
|
30
34
|
- close
|
31
35
|
Vary:
|
32
36
|
- Accept-Encoding
|
33
|
-
- Accept-Encoding
|
34
37
|
X-Rack-Responsetime:
|
35
|
-
- '
|
38
|
+
- '26'
|
36
39
|
X-Uid:
|
37
|
-
-
|
40
|
+
- '07807697'
|
38
41
|
X-Build:
|
39
|
-
-
|
42
|
+
- d59e2acefa
|
43
|
+
Strict-Transport-Security:
|
44
|
+
- max-age=31536000; includeSubdomains
|
45
|
+
X-Xss-Protection:
|
46
|
+
- 1; mode=block
|
47
|
+
X-Content-Type-Options:
|
48
|
+
- nosniff
|
49
|
+
X-Frame-Options:
|
50
|
+
- sameorigin
|
51
|
+
Referrer-Policy:
|
52
|
+
- strict-origin-when-cross-origin
|
40
53
|
body:
|
41
|
-
encoding:
|
54
|
+
encoding: ASCII-8BIT
|
42
55
|
string: '{"MetaInformation":{"@TotalResources":1,"@TotalPages":1,"@CurrentPage":1},"Articles":[{"@url":"https:\/\/api.fortnox.se\/3\/articles\/0001","ArticleNumber":"0001","Description":"Cykelpump","DisposableQuantity":"0","EAN":"","Housework":false,"PurchasePrice":"0","SalesPrice":"100","QuantityInStock":"0","ReservedQuantity":"0","StockPlace":"","StockValue":"0","Unit":null,"VAT":null,"WebshopArticle":false}]}'
|
43
56
|
http_version:
|
44
|
-
recorded_at:
|
45
|
-
recorded_with: VCR
|
57
|
+
recorded_at: Mon, 21 Dec 2020 20:40:04 GMT
|
58
|
+
recorded_with: VCR 4.0.0
|
@@ -15,6 +15,10 @@ http_interactions:
|
|
15
15
|
- 9aBA8ZgsvR
|
16
16
|
Access-Token:
|
17
17
|
- ccaef817-d5d8-4b1c-a316-54f3e55c5c54
|
18
|
+
Accept-Encoding:
|
19
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
20
|
+
User-Agent:
|
21
|
+
- Ruby
|
18
22
|
response:
|
19
23
|
status:
|
20
24
|
code: 201
|
@@ -23,7 +27,7 @@ http_interactions:
|
|
23
27
|
Server:
|
24
28
|
- nginx
|
25
29
|
Date:
|
26
|
-
- Mon,
|
30
|
+
- Mon, 21 Dec 2020 20:40:02 GMT
|
27
31
|
Content-Type:
|
28
32
|
- application/json
|
29
33
|
Connection:
|
@@ -31,15 +35,25 @@ http_interactions:
|
|
31
35
|
Location:
|
32
36
|
- articles
|
33
37
|
X-Rack-Responsetime:
|
34
|
-
- '
|
38
|
+
- '71'
|
35
39
|
X-Uid:
|
36
|
-
-
|
40
|
+
- 744983d4
|
37
41
|
X-Build:
|
38
|
-
-
|
42
|
+
- d59e2acefa
|
43
|
+
Strict-Transport-Security:
|
44
|
+
- max-age=31536000; includeSubdomains
|
45
|
+
X-Xss-Protection:
|
46
|
+
- 1; mode=block
|
47
|
+
X-Content-Type-Options:
|
48
|
+
- nosniff
|
49
|
+
X-Frame-Options:
|
50
|
+
- sameorigin
|
51
|
+
Referrer-Policy:
|
52
|
+
- strict-origin-when-cross-origin
|
39
53
|
body:
|
40
54
|
encoding: UTF-8
|
41
|
-
string: '{"Article":{"@url":"https:\/\/api.fortnox.se\/3\/articles\/
|
42
|
-
value","DisposableQuantity":0,"EAN":"","EUAccount":3200,"EUVATAccount":3231,"ExportAccount":3200,"Height":0,"Housework":false,"HouseworkType":null,"Active":true,"Manufacturer":null,"ManufacturerArticleNumber":"","Note":"","PurchaseAccount":3100,"PurchasePrice":0,"QuantityInStock":0,"ReservedQuantity":0,"SalesAccount":1250,"StockGoods":false,"StockPlace":null,"StockValue":0,"StockWarning":0,"SupplierName":null,"SupplierNumber":null,"Type":"STOCK","Unit":null,"VAT":0,"WebshopArticle":false,"Weight":0,"Width":0,"Expired":false,"SalesPrice":null,"CostCalculationMethod":null,"StockAccount":null,"StockChangeAccount":null,"DirectCost":
|
55
|
+
string: '{"Article":{"@url":"https:\/\/api.fortnox.se\/3\/articles\/26","ArticleNumber":"26","Bulky":false,"ConstructionAccount":0,"Depth":0,"Description":"A
|
56
|
+
value","DisposableQuantity":0,"EAN":"","EUAccount":3200,"EUVATAccount":3231,"ExportAccount":3200,"Height":0,"Housework":false,"HouseworkType":null,"Active":true,"Manufacturer":null,"ManufacturerArticleNumber":"","Note":"","PurchaseAccount":3100,"PurchasePrice":0,"QuantityInStock":0,"ReservedQuantity":0,"SalesAccount":1250,"StockGoods":false,"StockPlace":null,"StockValue":0,"StockWarning":0,"SupplierName":null,"SupplierNumber":null,"Type":"STOCK","Unit":null,"VAT":0,"WebshopArticle":false,"Weight":0,"Width":0,"Expired":false,"SalesPrice":null,"CostCalculationMethod":null,"StockAccount":null,"StockChangeAccount":null,"DirectCost":null,"FreightCost":null,"OtherCost":null,"DefaultStockPoint":null,"DefaultStockLocation":null}}'
|
43
57
|
http_version:
|
44
|
-
recorded_at: Mon,
|
45
|
-
recorded_with: VCR
|
58
|
+
recorded_at: Mon, 21 Dec 2020 20:40:03 GMT
|
59
|
+
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/articles/
|
5
|
+
uri: https://api.fortnox.se/3/articles/26
|
6
6
|
body:
|
7
7
|
encoding: UTF-8
|
8
8
|
string: '{"Article":{"Description":"Updated description"}}'
|
@@ -15,6 +15,10 @@ http_interactions:
|
|
15
15
|
- 9aBA8ZgsvR
|
16
16
|
Access-Token:
|
17
17
|
- ccaef817-d5d8-4b1c-a316-54f3e55c5c54
|
18
|
+
Accept-Encoding:
|
19
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
20
|
+
User-Agent:
|
21
|
+
- Ruby
|
18
22
|
response:
|
19
23
|
status:
|
20
24
|
code: 200
|
@@ -23,24 +27,33 @@ http_interactions:
|
|
23
27
|
Server:
|
24
28
|
- nginx
|
25
29
|
Date:
|
26
|
-
- Mon,
|
30
|
+
- Mon, 21 Dec 2020 20:40:03 GMT
|
27
31
|
Content-Type:
|
28
32
|
- application/json
|
29
33
|
Connection:
|
30
34
|
- close
|
31
35
|
Vary:
|
32
36
|
- Accept-Encoding
|
33
|
-
- Accept-Encoding
|
34
37
|
X-Rack-Responsetime:
|
35
|
-
- '
|
38
|
+
- '258'
|
36
39
|
X-Uid:
|
37
|
-
-
|
40
|
+
- 8245f02b
|
38
41
|
X-Build:
|
39
|
-
-
|
42
|
+
- d59e2acefa
|
43
|
+
Strict-Transport-Security:
|
44
|
+
- max-age=31536000; includeSubdomains
|
45
|
+
X-Xss-Protection:
|
46
|
+
- 1; mode=block
|
47
|
+
X-Content-Type-Options:
|
48
|
+
- nosniff
|
49
|
+
X-Frame-Options:
|
50
|
+
- sameorigin
|
51
|
+
Referrer-Policy:
|
52
|
+
- strict-origin-when-cross-origin
|
40
53
|
body:
|
41
|
-
encoding:
|
42
|
-
string: '{"Article":{"@url":"https:\/\/api.fortnox.se\/3\/articles\/
|
43
|
-
description","DisposableQuantity":0,"EAN":"","EUAccount":3200,"EUVATAccount":3231,"ExportAccount":3200,"Height":0,"Housework":false,"HouseworkType":null,"Active":true,"Manufacturer":null,"ManufacturerArticleNumber":"","Note":"","PurchaseAccount":3100,"PurchasePrice":0,"QuantityInStock":0,"ReservedQuantity":0,"SalesAccount":1250,"StockGoods":false,"StockPlace":null,"StockValue":0,"StockWarning":0,"SupplierName":null,"SupplierNumber":null,"Type":"STOCK","Unit":null,"VAT":0,"WebshopArticle":false,"Weight":0,"Width":0,"Expired":false,"SalesPrice":null,"CostCalculationMethod":null,"StockAccount":null,"StockChangeAccount":null,"DirectCost":
|
54
|
+
encoding: ASCII-8BIT
|
55
|
+
string: '{"Article":{"@url":"https:\/\/api.fortnox.se\/3\/articles\/26","ArticleNumber":"26","Bulky":false,"ConstructionAccount":0,"Depth":0,"Description":"Updated
|
56
|
+
description","DisposableQuantity":0,"EAN":"","EUAccount":3200,"EUVATAccount":3231,"ExportAccount":3200,"Height":0,"Housework":false,"HouseworkType":null,"Active":true,"Manufacturer":null,"ManufacturerArticleNumber":"","Note":"","PurchaseAccount":3100,"PurchasePrice":0,"QuantityInStock":0,"ReservedQuantity":0,"SalesAccount":1250,"StockGoods":false,"StockPlace":null,"StockValue":0,"StockWarning":0,"SupplierName":null,"SupplierNumber":null,"Type":"STOCK","Unit":null,"VAT":0,"WebshopArticle":false,"Weight":0,"Width":0,"Expired":false,"SalesPrice":null,"CostCalculationMethod":null,"StockAccount":null,"StockChangeAccount":null,"DirectCost":null,"FreightCost":null,"OtherCost":null,"DefaultStockPoint":null,"DefaultStockLocation":null}}'
|
44
57
|
http_version:
|
45
|
-
recorded_at: Mon,
|
46
|
-
recorded_with: VCR
|
58
|
+
recorded_at: Mon, 21 Dec 2020 20:40:03 GMT
|
59
|
+
recorded_with: VCR 4.0.0
|
@@ -15,6 +15,10 @@ http_interactions:
|
|
15
15
|
- 9aBA8ZgsvR
|
16
16
|
Access-Token:
|
17
17
|
- ccaef817-d5d8-4b1c-a316-54f3e55c5c54
|
18
|
+
Accept-Encoding:
|
19
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
20
|
+
User-Agent:
|
21
|
+
- Ruby
|
18
22
|
response:
|
19
23
|
status:
|
20
24
|
code: 201
|
@@ -23,7 +27,7 @@ http_interactions:
|
|
23
27
|
Server:
|
24
28
|
- nginx
|
25
29
|
Date:
|
26
|
-
- Mon,
|
30
|
+
- Mon, 21 Dec 2020 20:40:04 GMT
|
27
31
|
Content-Type:
|
28
32
|
- application/json
|
29
33
|
Connection:
|
@@ -31,15 +35,25 @@ http_interactions:
|
|
31
35
|
Location:
|
32
36
|
- articles
|
33
37
|
X-Rack-Responsetime:
|
34
|
-
- '
|
38
|
+
- '461'
|
35
39
|
X-Uid:
|
36
|
-
-
|
40
|
+
- 60ffb939
|
37
41
|
X-Build:
|
38
|
-
-
|
42
|
+
- d59e2acefa
|
43
|
+
Strict-Transport-Security:
|
44
|
+
- max-age=31536000; includeSubdomains
|
45
|
+
X-Xss-Protection:
|
46
|
+
- 1; mode=block
|
47
|
+
X-Content-Type-Options:
|
48
|
+
- nosniff
|
49
|
+
X-Frame-Options:
|
50
|
+
- sameorigin
|
51
|
+
Referrer-Policy:
|
52
|
+
- strict-origin-when-cross-origin
|
39
53
|
body:
|
40
54
|
encoding: UTF-8
|
41
|
-
string: '{"Article":{"@url":"https:\/\/api.fortnox.se\/3\/articles\/
|
42
|
-
article","DisposableQuantity":0,"EAN":"5901234123457","EUAccount":3200,"EUVATAccount":3231,"ExportAccount":3200,"Height":0,"Housework":false,"HouseworkType":null,"Active":true,"Manufacturer":null,"ManufacturerArticleNumber":"","Note":"","PurchaseAccount":3100,"PurchasePrice":0,"QuantityInStock":0,"ReservedQuantity":0,"SalesAccount":3011,"StockGoods":false,"StockPlace":null,"StockValue":0,"StockWarning":0,"SupplierName":null,"SupplierNumber":null,"Type":"STOCK","Unit":null,"VAT":0,"WebshopArticle":false,"Weight":0,"Width":0,"Expired":false,"SalesPrice":null,"CostCalculationMethod":null,"StockAccount":null,"StockChangeAccount":null,"DirectCost":
|
55
|
+
string: '{"Article":{"@url":"https:\/\/api.fortnox.se\/3\/articles\/27","ArticleNumber":"27","Bulky":false,"ConstructionAccount":0,"Depth":0,"Description":"Test
|
56
|
+
article","DisposableQuantity":0,"EAN":"5901234123457","EUAccount":3200,"EUVATAccount":3231,"ExportAccount":3200,"Height":0,"Housework":false,"HouseworkType":null,"Active":true,"Manufacturer":null,"ManufacturerArticleNumber":"","Note":"","PurchaseAccount":3100,"PurchasePrice":0,"QuantityInStock":0,"ReservedQuantity":0,"SalesAccount":3011,"StockGoods":false,"StockPlace":null,"StockValue":0,"StockWarning":0,"SupplierName":null,"SupplierNumber":null,"Type":"STOCK","Unit":null,"VAT":0,"WebshopArticle":false,"Weight":0,"Width":0,"Expired":false,"SalesPrice":null,"CostCalculationMethod":null,"StockAccount":null,"StockChangeAccount":null,"DirectCost":null,"FreightCost":null,"OtherCost":null,"DefaultStockPoint":null,"DefaultStockLocation":null}}'
|
43
57
|
http_version:
|
44
|
-
recorded_at: Mon,
|
45
|
-
recorded_with: VCR
|
58
|
+
recorded_at: Mon, 21 Dec 2020 20:40:04 GMT
|
59
|
+
recorded_with: VCR 4.0.0
|
@@ -15,6 +15,10 @@ http_interactions:
|
|
15
15
|
- 9aBA8ZgsvR
|
16
16
|
Access-Token:
|
17
17
|
- ccaef817-d5d8-4b1c-a316-54f3e55c5c54
|
18
|
+
Accept-Encoding:
|
19
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
20
|
+
User-Agent:
|
21
|
+
- Ruby
|
18
22
|
response:
|
19
23
|
status:
|
20
24
|
code: 200
|
@@ -23,23 +27,32 @@ http_interactions:
|
|
23
27
|
Server:
|
24
28
|
- nginx
|
25
29
|
Date:
|
26
|
-
-
|
30
|
+
- Mon, 21 Dec 2020 20:40:05 GMT
|
27
31
|
Content-Type:
|
28
32
|
- application/json
|
29
33
|
Connection:
|
30
34
|
- close
|
31
35
|
Vary:
|
32
36
|
- Accept-Encoding
|
33
|
-
- Accept-Encoding
|
34
37
|
X-Rack-Responsetime:
|
35
|
-
- '
|
38
|
+
- '37'
|
36
39
|
X-Uid:
|
37
|
-
-
|
40
|
+
- bd4b5ef3
|
38
41
|
X-Build:
|
39
|
-
-
|
42
|
+
- d59e2acefa
|
43
|
+
Strict-Transport-Security:
|
44
|
+
- max-age=31536000; includeSubdomains
|
45
|
+
X-Xss-Protection:
|
46
|
+
- 1; mode=block
|
47
|
+
X-Content-Type-Options:
|
48
|
+
- nosniff
|
49
|
+
X-Frame-Options:
|
50
|
+
- sameorigin
|
51
|
+
Referrer-Policy:
|
52
|
+
- strict-origin-when-cross-origin
|
40
53
|
body:
|
41
|
-
encoding:
|
54
|
+
encoding: ASCII-8BIT
|
42
55
|
string: '{"MetaInformation":{"@TotalResources":2,"@TotalPages":1,"@CurrentPage":1},"Articles":[{"@url":"https:\/\/api.fortnox.se\/3\/articles\/0000","ArticleNumber":"0000","Description":"Testartikel","DisposableQuantity":"0","EAN":"","Housework":false,"PurchasePrice":"0","SalesPrice":null,"QuantityInStock":"0","ReservedQuantity":"0","StockPlace":"","StockValue":"0","Unit":null,"VAT":null,"WebshopArticle":false},{"@url":"https:\/\/api.fortnox.se\/3\/articles\/1","ArticleNumber":"1","Description":"Testartikel","DisposableQuantity":"0","EAN":"","Housework":false,"PurchasePrice":"0","SalesPrice":"100","QuantityInStock":"0","ReservedQuantity":"0","StockPlace":"","StockValue":"0","Unit":null,"VAT":null,"WebshopArticle":false}]}'
|
43
56
|
http_version:
|
44
|
-
recorded_at:
|
45
|
-
recorded_with: VCR
|
57
|
+
recorded_at: Mon, 21 Dec 2020 20:40:05 GMT
|
58
|
+
recorded_with: VCR 4.0.0
|
@@ -15,6 +15,10 @@ http_interactions:
|
|
15
15
|
- 9aBA8ZgsvR
|
16
16
|
Access-Token:
|
17
17
|
- ccaef817-d5d8-4b1c-a316-54f3e55c5c54
|
18
|
+
Accept-Encoding:
|
19
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
20
|
+
User-Agent:
|
21
|
+
- Ruby
|
18
22
|
response:
|
19
23
|
status:
|
20
24
|
code: 200
|
@@ -23,23 +27,32 @@ http_interactions:
|
|
23
27
|
Server:
|
24
28
|
- nginx
|
25
29
|
Date:
|
26
|
-
-
|
30
|
+
- Mon, 21 Dec 2020 20:40:04 GMT
|
27
31
|
Content-Type:
|
28
32
|
- application/json
|
29
33
|
Connection:
|
30
34
|
- close
|
31
35
|
Vary:
|
32
36
|
- Accept-Encoding
|
33
|
-
- Accept-Encoding
|
34
37
|
X-Rack-Responsetime:
|
35
|
-
- '
|
38
|
+
- '31'
|
36
39
|
X-Uid:
|
37
|
-
-
|
40
|
+
- 2809bb14
|
38
41
|
X-Build:
|
39
|
-
-
|
42
|
+
- d59e2acefa
|
43
|
+
Strict-Transport-Security:
|
44
|
+
- max-age=31536000; includeSubdomains
|
45
|
+
X-Xss-Protection:
|
46
|
+
- 1; mode=block
|
47
|
+
X-Content-Type-Options:
|
48
|
+
- nosniff
|
49
|
+
X-Frame-Options:
|
50
|
+
- sameorigin
|
51
|
+
Referrer-Policy:
|
52
|
+
- strict-origin-when-cross-origin
|
40
53
|
body:
|
41
|
-
encoding:
|
54
|
+
encoding: ASCII-8BIT
|
42
55
|
string: '{"MetaInformation":{"@TotalResources":0,"@TotalPages":0,"@CurrentPage":1},"Articles":[]}'
|
43
56
|
http_version:
|
44
|
-
recorded_at:
|
45
|
-
recorded_with: VCR
|
57
|
+
recorded_at: Mon, 21 Dec 2020 20:40:04 GMT
|
58
|
+
recorded_with: VCR 4.0.0
|
@@ -15,6 +15,10 @@ http_interactions:
|
|
15
15
|
- 9aBA8ZgsvR
|
16
16
|
Access-Token:
|
17
17
|
- ccaef817-d5d8-4b1c-a316-54f3e55c5c54
|
18
|
+
Accept-Encoding:
|
19
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
20
|
+
User-Agent:
|
21
|
+
- Ruby
|
18
22
|
response:
|
19
23
|
status:
|
20
24
|
code: 200
|
@@ -23,23 +27,32 @@ http_interactions:
|
|
23
27
|
Server:
|
24
28
|
- nginx
|
25
29
|
Date:
|
26
|
-
-
|
30
|
+
- Mon, 21 Dec 2020 20:40:05 GMT
|
27
31
|
Content-Type:
|
28
32
|
- application/json
|
29
33
|
Connection:
|
30
34
|
- close
|
31
35
|
Vary:
|
32
36
|
- Accept-Encoding
|
33
|
-
- Accept-Encoding
|
34
37
|
X-Rack-Responsetime:
|
35
|
-
- '
|
38
|
+
- '28'
|
36
39
|
X-Uid:
|
37
|
-
-
|
40
|
+
- da707608
|
38
41
|
X-Build:
|
39
|
-
-
|
42
|
+
- d59e2acefa
|
43
|
+
Strict-Transport-Security:
|
44
|
+
- max-age=31536000; includeSubdomains
|
45
|
+
X-Xss-Protection:
|
46
|
+
- 1; mode=block
|
47
|
+
X-Content-Type-Options:
|
48
|
+
- nosniff
|
49
|
+
X-Frame-Options:
|
50
|
+
- sameorigin
|
51
|
+
Referrer-Policy:
|
52
|
+
- strict-origin-when-cross-origin
|
40
53
|
body:
|
41
|
-
encoding:
|
54
|
+
encoding: ASCII-8BIT
|
42
55
|
string: '{"MetaInformation":{"@TotalResources":0,"@TotalPages":0,"@CurrentPage":1},"Articles":[]}'
|
43
56
|
http_version:
|
44
|
-
recorded_at:
|
45
|
-
recorded_with: VCR
|
57
|
+
recorded_at: Mon, 21 Dec 2020 20:40:05 GMT
|
58
|
+
recorded_with: VCR 4.0.0
|
@@ -15,6 +15,10 @@ http_interactions:
|
|
15
15
|
- 9aBA8ZgsvR
|
16
16
|
Access-Token:
|
17
17
|
- ccaef817-d5d8-4b1c-a316-54f3e55c5c54
|
18
|
+
Accept-Encoding:
|
19
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
20
|
+
User-Agent:
|
21
|
+
- Ruby
|
18
22
|
response:
|
19
23
|
status:
|
20
24
|
code: 200
|
@@ -23,24 +27,43 @@ http_interactions:
|
|
23
27
|
Server:
|
24
28
|
- nginx
|
25
29
|
Date:
|
26
|
-
-
|
30
|
+
- Mon, 21 Dec 2020 20:40:04 GMT
|
27
31
|
Content-Type:
|
28
32
|
- application/json
|
29
33
|
Connection:
|
30
34
|
- close
|
31
35
|
Vary:
|
32
36
|
- Accept-Encoding
|
33
|
-
- Accept-Encoding
|
34
37
|
X-Rack-Responsetime:
|
35
|
-
- '
|
38
|
+
- '24'
|
36
39
|
X-Uid:
|
37
|
-
-
|
40
|
+
- 578fed92
|
38
41
|
X-Build:
|
39
|
-
-
|
42
|
+
- d59e2acefa
|
43
|
+
Strict-Transport-Security:
|
44
|
+
- max-age=31536000; includeSubdomains
|
45
|
+
X-Xss-Protection:
|
46
|
+
- 1; mode=block
|
47
|
+
X-Content-Type-Options:
|
48
|
+
- nosniff
|
49
|
+
X-Frame-Options:
|
50
|
+
- sameorigin
|
51
|
+
Referrer-Policy:
|
52
|
+
- strict-origin-when-cross-origin
|
40
53
|
body:
|
41
|
-
encoding:
|
42
|
-
string: '{"MetaInformation":{"@TotalResources":
|
43
|
-
123","DisposableQuantity":"0","EAN":"","Housework":false,"PurchasePrice":"0","SalesPrice":null,"QuantityInStock":"0","ReservedQuantity":"0","StockPlace":null,"StockValue":"0","Unit":"","VAT":null,"WebshopArticle":false}
|
54
|
+
encoding: ASCII-8BIT
|
55
|
+
string: '{"MetaInformation":{"@TotalResources":13,"@TotalPages":1,"@CurrentPage":1},"Articles":[{"@url":"https:\/\/api.fortnox.se\/3\/articles\/0001","ArticleNumber":"0001","Description":"Cykelpump","DisposableQuantity":"0","EAN":"","Housework":false,"PurchasePrice":"0","SalesPrice":"100","QuantityInStock":"0","ReservedQuantity":"0","StockPlace":"","StockValue":"0","Unit":null,"VAT":null,"WebshopArticle":false},{"@url":"https:\/\/api.fortnox.se\/3\/articles\/1","ArticleNumber":"1","Description":"Testartikel","DisposableQuantity":"0","EAN":"","Housework":false,"PurchasePrice":"0","SalesPrice":"100","QuantityInStock":"0","ReservedQuantity":"0","StockPlace":"","StockValue":"0","Unit":null,"VAT":null,"WebshopArticle":false},{"@url":"https:\/\/api.fortnox.se\/3\/articles\/10","ArticleNumber":"10","Description":"Abc
|
56
|
+
123","DisposableQuantity":"0","EAN":"","Housework":false,"PurchasePrice":"0","SalesPrice":null,"QuantityInStock":"0","ReservedQuantity":"0","StockPlace":null,"StockValue":"0","Unit":"","VAT":null,"WebshopArticle":false},{"@url":"https:\/\/api.fortnox.se\/3\/articles\/11","ArticleNumber":"11","Description":"A
|
57
|
+
value","DisposableQuantity":"0","EAN":"","Housework":false,"PurchasePrice":"0","SalesPrice":null,"QuantityInStock":"0","ReservedQuantity":"0","StockPlace":null,"StockValue":"0","Unit":"","VAT":null,"WebshopArticle":false},{"@url":"https:\/\/api.fortnox.se\/3\/articles\/12","ArticleNumber":"12","Description":"Test
|
58
|
+
article","DisposableQuantity":"0","EAN":"5901234123457","Housework":false,"PurchasePrice":"0","SalesPrice":null,"QuantityInStock":"0","ReservedQuantity":"0","StockPlace":null,"StockValue":"0","Unit":"","VAT":null,"WebshopArticle":false},{"@url":"https:\/\/api.fortnox.se\/3\/articles\/13","ArticleNumber":"13","Description":"Test
|
59
|
+
article","DisposableQuantity":"0","EAN":"5901234123457","Housework":false,"PurchasePrice":"0","SalesPrice":null,"QuantityInStock":"0","ReservedQuantity":"0","StockPlace":null,"StockValue":"0","Unit":"","VAT":null,"WebshopArticle":false},{"@url":"https:\/\/api.fortnox.se\/3\/articles\/14","ArticleNumber":"14","Description":"A
|
60
|
+
value","DisposableQuantity":"0","EAN":"","Housework":false,"PurchasePrice":"0","SalesPrice":null,"QuantityInStock":"0","ReservedQuantity":"0","StockPlace":null,"StockValue":"0","Unit":null,"VAT":null,"WebshopArticle":false},{"@url":"https:\/\/api.fortnox.se\/3\/articles\/15","ArticleNumber":"15","Description":"A
|
61
|
+
value","DisposableQuantity":"0","EAN":"","Housework":false,"PurchasePrice":"0","SalesPrice":null,"QuantityInStock":"0","ReservedQuantity":"0","StockPlace":null,"StockValue":"0","Unit":"","VAT":null,"WebshopArticle":false},{"@url":"https:\/\/api.fortnox.se\/3\/articles\/16","ArticleNumber":"16","Description":"Test
|
62
|
+
article","DisposableQuantity":"0","EAN":"5901234123457","Housework":false,"PurchasePrice":"0","SalesPrice":null,"QuantityInStock":"0","ReservedQuantity":"0","StockPlace":null,"StockValue":"0","Unit":"","VAT":null,"WebshopArticle":false},{"@url":"https:\/\/api.fortnox.se\/3\/articles\/17","ArticleNumber":"17","Description":"A
|
63
|
+
value","DisposableQuantity":"0","EAN":"","Housework":false,"PurchasePrice":"0","SalesPrice":null,"QuantityInStock":"0","ReservedQuantity":"0","StockPlace":null,"StockValue":"0","Unit":"","VAT":null,"WebshopArticle":false},{"@url":"https:\/\/api.fortnox.se\/3\/articles\/18","ArticleNumber":"18","Description":"Updated
|
64
|
+
description","DisposableQuantity":"0","EAN":"","Housework":false,"PurchasePrice":"0","SalesPrice":null,"QuantityInStock":"0","ReservedQuantity":"0","StockPlace":null,"StockValue":"0","Unit":null,"VAT":null,"WebshopArticle":false},{"@url":"https:\/\/api.fortnox.se\/3\/articles\/19","ArticleNumber":"19","Description":"Updated
|
65
|
+
description","DisposableQuantity":"0","EAN":"","Housework":false,"PurchasePrice":"0","SalesPrice":null,"QuantityInStock":"0","ReservedQuantity":"0","StockPlace":null,"StockValue":"0","Unit":null,"VAT":null,"WebshopArticle":false},{"@url":"https:\/\/api.fortnox.se\/3\/articles\/21","ArticleNumber":"21","Description":"Updated
|
66
|
+
description","DisposableQuantity":"0","EAN":"","Housework":false,"PurchasePrice":"0","SalesPrice":null,"QuantityInStock":"0","ReservedQuantity":"0","StockPlace":null,"StockValue":"0","Unit":null,"VAT":null,"WebshopArticle":false}]}'
|
44
67
|
http_version:
|
45
|
-
recorded_at:
|
46
|
-
recorded_with: VCR
|
68
|
+
recorded_at: Mon, 21 Dec 2020 20:40:04 GMT
|
69
|
+
recorded_with: VCR 4.0.0
|