fortnox-api 0.7.2 → 0.8.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.rubocop.yml +1 -1
- data/.travis.yml +3 -10
- data/CHANGELOG.md +10 -0
- data/README.md +7 -4
- data/Rakefile +5 -0
- data/fortnox-api.gemspec +2 -2
- data/lib/fortnox/api/mappers/base/from_json.rb +2 -2
- data/lib/fortnox/api/models/document.rb +3 -0
- data/lib/fortnox/api/types.rb +6 -1
- data/lib/fortnox/api/types/enums.rb +36 -8
- data/lib/fortnox/api/version.rb +1 -1
- data/spec/fortnox/api/circular_queue_spec.rb +3 -3
- data/spec/fortnox/api/repositories/article_spec.rb +1 -1
- data/spec/fortnox/api/repositories/customer_spec.rb +1 -1
- data/spec/fortnox/api/repositories/invoice_spec.rb +13 -13
- data/spec/fortnox/api/repositories/project_spec.rb +1 -1
- data/spec/fortnox/api/repositories/terms_of_payment_spec.rb +2 -2
- data/spec/fortnox/api/repositories/unit_spec.rb +3 -3
- data/spec/fortnox/api/types/enums_spec.rb +1 -0
- data/spec/fortnox/api/types/housework_types_spec.rb +151 -34
- data/spec/vcr_cassettes/articles/all.yml +25 -9
- data/spec/vcr_cassettes/articles/find_by_hash_failure.yml +20 -7
- data/spec/vcr_cassettes/articles/find_failure.yml +20 -7
- data/spec/vcr_cassettes/articles/find_id_1.yml +21 -8
- data/spec/vcr_cassettes/articles/find_new.yml +23 -10
- data/spec/vcr_cassettes/articles/multi_param_find_by_hash.yml +20 -7
- data/spec/vcr_cassettes/articles/save_new.yml +21 -7
- data/spec/vcr_cassettes/articles/save_old.yml +23 -10
- data/spec/vcr_cassettes/articles/save_with_specially_named_attribute.yml +21 -7
- data/spec/vcr_cassettes/articles/search_by_name.yml +20 -7
- data/spec/vcr_cassettes/articles/search_miss.yml +20 -7
- data/spec/vcr_cassettes/articles/search_with_special_char.yml +20 -7
- data/spec/vcr_cassettes/articles/single_param_find_by_hash.yml +21 -8
- data/spec/vcr_cassettes/customers/all.yml +22 -9
- data/spec/vcr_cassettes/customers/find_by_hash_failure.yml +20 -7
- data/spec/vcr_cassettes/customers/find_failure.yml +20 -7
- data/spec/vcr_cassettes/customers/find_id_1.yml +20 -7
- data/spec/vcr_cassettes/customers/find_new.yml +22 -9
- data/spec/vcr_cassettes/customers/multi_param_find_by_hash.yml +20 -7
- data/spec/vcr_cassettes/customers/save_new.yml +20 -6
- data/spec/vcr_cassettes/customers/save_new_with_country_code_SE.yml +10 -6
- data/spec/vcr_cassettes/customers/save_old.yml +22 -9
- data/spec/vcr_cassettes/customers/save_with_specially_named_attribute.yml +20 -6
- data/spec/vcr_cassettes/customers/search_by_name.yml +22 -8
- data/spec/vcr_cassettes/customers/search_miss.yml +20 -7
- data/spec/vcr_cassettes/customers/search_with_special_char.yml +19 -6
- data/spec/vcr_cassettes/customers/single_param_find_by_hash.yml +20 -7
- data/spec/vcr_cassettes/invoices/all.yml +25 -9
- data/spec/vcr_cassettes/invoices/filter_hit.yml +20 -7
- data/spec/vcr_cassettes/invoices/filter_invalid.yml +19 -5
- data/spec/vcr_cassettes/invoices/find_by_hash_failure.yml +20 -7
- data/spec/vcr_cassettes/invoices/find_failure.yml +19 -6
- data/spec/vcr_cassettes/invoices/find_id_1.yml +22 -9
- data/spec/vcr_cassettes/invoices/find_new.yml +24 -11
- data/spec/vcr_cassettes/invoices/multi_param_find_by_hash.yml +20 -7
- data/spec/vcr_cassettes/invoices/save_new.yml +22 -8
- data/spec/vcr_cassettes/invoices/save_new_with_comments.yml +22 -8
- data/spec/vcr_cassettes/invoices/save_new_with_country.yml +12 -8
- data/spec/vcr_cassettes/invoices/save_new_with_country_GB.yml +12 -8
- data/spec/vcr_cassettes/invoices/save_new_with_country_KR.yml +12 -8
- data/spec/vcr_cassettes/invoices/save_new_with_country_Norge.yml +12 -8
- data/spec/vcr_cassettes/invoices/save_new_with_country_Norway.yml +12 -8
- data/spec/vcr_cassettes/invoices/save_new_with_country_Sverige.yml +12 -8
- data/spec/vcr_cassettes/invoices/save_new_with_country_VA.yml +12 -8
- data/spec/vcr_cassettes/invoices/save_new_with_country_VI.yml +12 -8
- data/spec/vcr_cassettes/invoices/save_new_with_country_empty_string.yml +12 -8
- data/spec/vcr_cassettes/invoices/save_new_with_country_nil.yml +12 -8
- data/spec/vcr_cassettes/invoices/save_old.yml +24 -11
- data/spec/vcr_cassettes/invoices/save_old_with_empty_comments.yml +24 -11
- data/spec/vcr_cassettes/invoices/save_old_with_empty_country.yml +14 -11
- data/spec/vcr_cassettes/invoices/save_old_with_nil_comments.yml +24 -11
- data/spec/vcr_cassettes/invoices/save_old_with_nil_country.yml +14 -11
- data/spec/vcr_cassettes/invoices/save_with_nested_model.yml +22 -8
- data/spec/vcr_cassettes/invoices/save_with_specially_named_attribute.yml +22 -8
- data/spec/vcr_cassettes/invoices/search_by_name.yml +20 -7
- data/spec/vcr_cassettes/invoices/search_miss.yml +20 -7
- data/spec/vcr_cassettes/invoices/search_with_special_char.yml +20 -7
- data/spec/vcr_cassettes/invoices/single_param_find_by_hash.yml +19 -6
- data/spec/vcr_cassettes/orders/all.yml +21 -8
- data/spec/vcr_cassettes/orders/filter_hit.yml +19 -6
- data/spec/vcr_cassettes/orders/filter_invalid.yml +19 -5
- data/spec/vcr_cassettes/orders/find_by_hash_failure.yml +20 -7
- data/spec/vcr_cassettes/orders/find_failure.yml +20 -7
- data/spec/vcr_cassettes/orders/find_id_1.yml +21 -8
- data/spec/vcr_cassettes/orders/find_new.yml +24 -11
- 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 +23 -9
- data/spec/vcr_cassettes/orders/housework_type_cleaning.yml +23 -9
- data/spec/vcr_cassettes/orders/housework_type_construction.yml +23 -9
- data/spec/vcr_cassettes/orders/housework_type_cooking.yml +20 -6
- data/spec/vcr_cassettes/orders/housework_type_electricity.yml +23 -9
- data/spec/vcr_cassettes/orders/housework_type_gardening.yml +23 -9
- data/spec/vcr_cassettes/orders/housework_type_glassmetalwork.yml +23 -9
- data/spec/vcr_cassettes/orders/housework_type_grounddrainagework.yml +23 -9
- data/spec/vcr_cassettes/orders/housework_type_hvac.yml +23 -9
- 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 +23 -9
- data/spec/vcr_cassettes/orders/housework_type_movingservices.yml +60 -0
- data/spec/vcr_cassettes/orders/housework_type_othercare.yml +23 -9
- data/spec/vcr_cassettes/orders/housework_type_othercosts.yml +23 -9
- data/spec/vcr_cassettes/orders/housework_type_paintingwallpapering.yml +23 -9
- data/spec/vcr_cassettes/orders/housework_type_snowplowing.yml +23 -9
- data/spec/vcr_cassettes/orders/housework_type_textileclothing.yml +23 -9
- data/spec/vcr_cassettes/orders/housework_type_tutoring.yml +20 -6
- data/spec/vcr_cassettes/orders/housework_without_tax_reduction_type.yml +57 -0
- data/spec/vcr_cassettes/orders/multi_param_find_by_hash.yml +20 -7
- data/spec/vcr_cassettes/orders/save_new.yml +22 -8
- data/spec/vcr_cassettes/orders/save_old.yml +24 -11
- data/spec/vcr_cassettes/orders/save_with_nested_model.yml +22 -8
- data/spec/vcr_cassettes/orders/search_by_name.yml +20 -7
- data/spec/vcr_cassettes/orders/search_miss.yml +20 -7
- data/spec/vcr_cassettes/orders/search_with_special_char.yml +19 -6
- data/spec/vcr_cassettes/orders/single_param_find_by_hash.yml +20 -7
- data/spec/vcr_cassettes/projects/all.yml +40 -25
- data/spec/vcr_cassettes/projects/find_by_hash_failure.yml +20 -7
- data/spec/vcr_cassettes/projects/find_failure.yml +20 -7
- data/spec/vcr_cassettes/projects/find_id_1.yml +20 -7
- data/spec/vcr_cassettes/projects/find_new.yml +23 -10
- data/spec/vcr_cassettes/projects/multi_param_find_by_hash.yml +22 -9
- data/spec/vcr_cassettes/projects/save_new.yml +21 -7
- data/spec/vcr_cassettes/projects/save_old.yml +23 -10
- data/spec/vcr_cassettes/projects/single_param_find_by_hash.yml +22 -9
- data/spec/vcr_cassettes/termsofpayments/all.yml +29 -15
- data/spec/vcr_cassettes/termsofpayments/find_failure.yml +20 -7
- data/spec/vcr_cassettes/termsofpayments/find_id_1.yml +21 -8
- data/spec/vcr_cassettes/termsofpayments/find_new.yml +22 -9
- data/spec/vcr_cassettes/termsofpayments/save_new.yml +21 -7
- data/spec/vcr_cassettes/termsofpayments/save_old.yml +22 -9
- data/spec/vcr_cassettes/units/all.yml +23 -8
- data/spec/vcr_cassettes/units/find_failure.yml +19 -6
- data/spec/vcr_cassettes/units/find_id_1.yml +20 -7
- data/spec/vcr_cassettes/units/find_new.yml +22 -9
- data/spec/vcr_cassettes/units/save_new.yml +21 -7
- data/spec/vcr_cassettes/units/save_old.yml +22 -9
- data/spec/vcr_cassettes/units/save_with_specially_named_attribute.yml +21 -7
- metadata +20 -8
@@ -2,7 +2,7 @@
|
|
2
2
|
http_interactions:
|
3
3
|
- request:
|
4
4
|
method: get
|
5
|
-
uri: https://api.fortnox.se/3/customers/
|
5
|
+
uri: https://api.fortnox.se/3/customers/231
|
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
|
-
-
|
30
|
+
- Mon, 21 Dec 2020 20:34:24 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
|
+
- '72'
|
36
39
|
X-Uid:
|
37
|
-
-
|
40
|
+
- ecfe45bf
|
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: '{"Customer":{"@url":"https:\/\/api.fortnox.se\/3\/customers\/
|
54
|
+
encoding: ASCII-8BIT
|
55
|
+
string: '{"Customer":{"@url":"https:\/\/api.fortnox.se\/3\/customers\/231","Address1":null,"Address2":null,"City":null,"Country":null,"Comments":null,"Currency":"SEK","CostCenter":null,"CountryCode":null,"Active":true,"CustomerNumber":"231","DefaultDeliveryTypes":{"Invoice":"PRINT","Order":"PRINT","Offer":"PRINT"},"DefaultTemplates":{"Order":"DEFAULTTEMPLATE","Offer":"DEFAULTTEMPLATE","Invoice":"DEFAULTTEMPLATE","CashInvoice":"DEFAULTTEMPLATE"},"DeliveryAddress1":null,"DeliveryAddress2":null,"DeliveryCity":null,"DeliveryCountry":null,"DeliveryCountryCode":null,"DeliveryFax":null,"DeliveryName":null,"DeliveryPhone1":null,"DeliveryPhone2":null,"DeliveryZipCode":null,"Email":"","EmailInvoice":"","EmailInvoiceBCC":"","EmailInvoiceCC":"","EmailOffer":"","EmailOfferBCC":"","EmailOfferCC":"","EmailOrder":"","EmailOrderBCC":"","EmailOrderCC":"","ExternalReference":null,"Fax":null,"GLN":null,"GLNDelivery":null,"InvoiceAdministrationFee":null,"InvoiceDiscount":null,"InvoiceFreight":null,"InvoiceRemark":"","Name":"A
|
43
56
|
value","OrganisationNumber":"","OurReference":"","Phone1":null,"Phone2":null,"PriceList":"A","Project":"","SalesAccount":null,"ShowPriceVATIncluded":false,"TermsOfDelivery":"","TermsOfPayment":"","Type":"COMPANY","VATNumber":"","VATType":"SEVAT","VisitingAddress":null,"VisitingCity":null,"VisitingCountry":null,"VisitingCountryCode":null,"VisitingZipCode":null,"WayOfDelivery":"","WWW":"","YourReference":"","ZipCode":null}}'
|
44
57
|
http_version:
|
45
|
-
recorded_at:
|
58
|
+
recorded_at: Mon, 21 Dec 2020 20:34:24 GMT
|
46
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,24 +27,33 @@ http_interactions:
|
|
23
27
|
Server:
|
24
28
|
- nginx
|
25
29
|
Date:
|
26
|
-
-
|
30
|
+
- Mon, 21 Dec 2020 20:34:25 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
|
+
- '16'
|
36
39
|
X-Uid:
|
37
|
-
-
|
40
|
+
- 59113dcf
|
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},"Customers":[{"@url":"https:\/\/api.fortnox.se\/3\/customers\/2","Address1":"","Address2":"","City":"New
|
43
56
|
York","CustomerNumber":"2","Email":"","Name":"A customer","OrganisationNumber":"600102-7447","Phone":"","ZipCode":"10001"}]}'
|
44
57
|
http_version:
|
45
|
-
recorded_at:
|
58
|
+
recorded_at: Mon, 21 Dec 2020 20:34:25 GMT
|
46
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
|
-
-
|
30
|
+
- Mon, 21 Dec 2020 20:34:24 GMT
|
27
31
|
Content-Type:
|
28
32
|
- application/json
|
29
33
|
Connection:
|
@@ -31,15 +35,25 @@ http_interactions:
|
|
31
35
|
Location:
|
32
36
|
- customers
|
33
37
|
X-Rack-Responsetime:
|
34
|
-
- '
|
38
|
+
- '351'
|
35
39
|
X-Uid:
|
36
|
-
-
|
40
|
+
- f1395f68
|
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: '{"Customer":{"@url":"https:\/\/api.fortnox.se\/3\/customers\/
|
55
|
+
string: '{"Customer":{"@url":"https:\/\/api.fortnox.se\/3\/customers\/231","Address1":null,"Address2":null,"City":null,"Country":null,"Comments":null,"Currency":"SEK","CostCenter":null,"CountryCode":null,"Active":true,"CustomerNumber":"231","DefaultDeliveryTypes":{"Invoice":"PRINT","Order":"PRINT","Offer":"PRINT"},"DefaultTemplates":{"Order":"DEFAULTTEMPLATE","Offer":"DEFAULTTEMPLATE","Invoice":"DEFAULTTEMPLATE","CashInvoice":"DEFAULTTEMPLATE"},"DeliveryAddress1":null,"DeliveryAddress2":null,"DeliveryCity":null,"DeliveryCountry":null,"DeliveryCountryCode":null,"DeliveryFax":null,"DeliveryName":null,"DeliveryPhone1":null,"DeliveryPhone2":null,"DeliveryZipCode":null,"Email":"","EmailInvoice":"","EmailInvoiceBCC":"","EmailInvoiceCC":"","EmailOffer":"","EmailOfferBCC":"","EmailOfferCC":"","EmailOrder":"","EmailOrderBCC":"","EmailOrderCC":"","ExternalReference":null,"Fax":null,"GLN":null,"GLNDelivery":null,"InvoiceAdministrationFee":null,"InvoiceDiscount":null,"InvoiceFreight":null,"InvoiceRemark":"","Name":"A
|
42
56
|
value","OrganisationNumber":"","OurReference":"","Phone1":null,"Phone2":null,"PriceList":"A","Project":"","SalesAccount":null,"ShowPriceVATIncluded":false,"TermsOfDelivery":"","TermsOfPayment":"","Type":"COMPANY","VATNumber":"","VATType":"SEVAT","VisitingAddress":null,"VisitingCity":null,"VisitingCountry":null,"VisitingCountryCode":null,"VisitingZipCode":null,"WayOfDelivery":"","WWW":"","YourReference":"","ZipCode":null}}'
|
43
57
|
http_version:
|
44
|
-
recorded_at:
|
58
|
+
recorded_at: Mon, 21 Dec 2020 20:34:24 GMT
|
45
59
|
recorded_with: VCR 4.0.0
|
@@ -16,6 +16,10 @@ http_interactions:
|
|
16
16
|
- 9aBA8ZgsvR
|
17
17
|
Access-Token:
|
18
18
|
- ccaef817-d5d8-4b1c-a316-54f3e55c5c54
|
19
|
+
Accept-Encoding:
|
20
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
21
|
+
User-Agent:
|
22
|
+
- Ruby
|
19
23
|
response:
|
20
24
|
status:
|
21
25
|
code: 201
|
@@ -24,7 +28,7 @@ http_interactions:
|
|
24
28
|
Server:
|
25
29
|
- nginx
|
26
30
|
Date:
|
27
|
-
-
|
31
|
+
- Mon, 21 Dec 2020 20:34:25 GMT
|
28
32
|
Content-Type:
|
29
33
|
- application/json
|
30
34
|
Connection:
|
@@ -32,11 +36,11 @@ http_interactions:
|
|
32
36
|
Location:
|
33
37
|
- customers
|
34
38
|
X-Rack-Responsetime:
|
35
|
-
- '
|
39
|
+
- '49'
|
36
40
|
X-Uid:
|
37
|
-
-
|
41
|
+
- 52ec5e8c
|
38
42
|
X-Build:
|
39
|
-
-
|
43
|
+
- d59e2acefa
|
40
44
|
Strict-Transport-Security:
|
41
45
|
- max-age=31536000; includeSubdomains
|
42
46
|
X-Xss-Protection:
|
@@ -49,8 +53,8 @@ http_interactions:
|
|
49
53
|
- strict-origin-when-cross-origin
|
50
54
|
body:
|
51
55
|
encoding: UTF-8
|
52
|
-
string: '{"Customer":{"@url":"https:\/\/api.fortnox.se\/3\/customers\/
|
56
|
+
string: '{"Customer":{"@url":"https:\/\/api.fortnox.se\/3\/customers\/233","Address1":null,"Address2":null,"City":null,"Country":"Sverige","Comments":null,"Currency":"SEK","CostCenter":null,"CountryCode":"SE","Active":true,"CustomerNumber":"233","DefaultDeliveryTypes":{"Invoice":"PRINT","Order":"PRINT","Offer":"PRINT"},"DefaultTemplates":{"Order":"DEFAULTTEMPLATE","Offer":"DEFAULTTEMPLATE","Invoice":"DEFAULTTEMPLATE","CashInvoice":"DEFAULTTEMPLATE"},"DeliveryAddress1":null,"DeliveryAddress2":null,"DeliveryCity":null,"DeliveryCountry":null,"DeliveryCountryCode":null,"DeliveryFax":null,"DeliveryName":null,"DeliveryPhone1":null,"DeliveryPhone2":null,"DeliveryZipCode":null,"Email":"","EmailInvoice":"","EmailInvoiceBCC":"","EmailInvoiceCC":"","EmailOffer":"","EmailOfferBCC":"","EmailOfferCC":"","EmailOrder":"","EmailOrderBCC":"","EmailOrderCC":"","ExternalReference":null,"Fax":null,"GLN":null,"GLNDelivery":null,"InvoiceAdministrationFee":null,"InvoiceDiscount":null,"InvoiceFreight":null,"InvoiceRemark":"","Name":"Customer
|
53
57
|
with Swedish country code","OrganisationNumber":"","OurReference":"","Phone1":null,"Phone2":null,"PriceList":"A","Project":"","SalesAccount":null,"ShowPriceVATIncluded":false,"TermsOfDelivery":"","TermsOfPayment":"","Type":"COMPANY","VATNumber":"","VATType":"SEVAT","VisitingAddress":null,"VisitingCity":null,"VisitingCountry":null,"VisitingCountryCode":null,"VisitingZipCode":null,"WayOfDelivery":"","WWW":"","YourReference":"","ZipCode":null}}'
|
54
58
|
http_version:
|
55
|
-
recorded_at:
|
59
|
+
recorded_at: Mon, 21 Dec 2020 20:34:25 GMT
|
56
60
|
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/customers/
|
5
|
+
uri: https://api.fortnox.se/3/customers/231
|
6
6
|
body:
|
7
7
|
encoding: UTF-8
|
8
8
|
string: '{"Customer":{"Name":"Updated name"}}'
|
@@ -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
|
-
-
|
30
|
+
- Mon, 21 Dec 2020 20:34:24 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
|
+
- '93'
|
36
39
|
X-Uid:
|
37
|
-
-
|
40
|
+
- 48f33edb
|
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: '{"Customer":{"@url":"https:\/\/api.fortnox.se\/3\/customers\/
|
54
|
+
encoding: ASCII-8BIT
|
55
|
+
string: '{"Customer":{"@url":"https:\/\/api.fortnox.se\/3\/customers\/231","Address1":null,"Address2":null,"City":null,"Country":null,"Comments":null,"Currency":"SEK","CostCenter":null,"CountryCode":null,"Active":true,"CustomerNumber":"231","DefaultDeliveryTypes":{"Invoice":"PRINT","Order":"PRINT","Offer":"PRINT"},"DefaultTemplates":{"Order":"DEFAULTTEMPLATE","Offer":"DEFAULTTEMPLATE","Invoice":"DEFAULTTEMPLATE","CashInvoice":"DEFAULTTEMPLATE"},"DeliveryAddress1":null,"DeliveryAddress2":null,"DeliveryCity":null,"DeliveryCountry":null,"DeliveryCountryCode":null,"DeliveryFax":null,"DeliveryName":null,"DeliveryPhone1":null,"DeliveryPhone2":null,"DeliveryZipCode":null,"Email":"","EmailInvoice":"","EmailInvoiceBCC":"","EmailInvoiceCC":"","EmailOffer":"","EmailOfferBCC":"","EmailOfferCC":"","EmailOrder":"","EmailOrderBCC":"","EmailOrderCC":"","ExternalReference":null,"Fax":null,"GLN":null,"GLNDelivery":null,"InvoiceAdministrationFee":null,"InvoiceDiscount":null,"InvoiceFreight":null,"InvoiceRemark":"","Name":"Updated
|
43
56
|
name","OrganisationNumber":"","OurReference":"","Phone1":null,"Phone2":null,"PriceList":"A","Project":"","SalesAccount":null,"ShowPriceVATIncluded":false,"TermsOfDelivery":"","TermsOfPayment":"","Type":"COMPANY","VATNumber":"","VATType":"SEVAT","VisitingAddress":null,"VisitingCity":null,"VisitingCountry":null,"VisitingCountryCode":null,"VisitingZipCode":null,"WayOfDelivery":"","WWW":"","YourReference":"","ZipCode":null}}'
|
44
57
|
http_version:
|
45
|
-
recorded_at:
|
58
|
+
recorded_at: Mon, 21 Dec 2020 20:34:24 GMT
|
46
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
|
-
-
|
30
|
+
- Mon, 21 Dec 2020 20:34:24 GMT
|
27
31
|
Content-Type:
|
28
32
|
- application/json
|
29
33
|
Connection:
|
@@ -31,15 +35,25 @@ http_interactions:
|
|
31
35
|
Location:
|
32
36
|
- customers
|
33
37
|
X-Rack-Responsetime:
|
34
|
-
- '
|
38
|
+
- '37'
|
35
39
|
X-Uid:
|
36
|
-
-
|
40
|
+
- 02a76035
|
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: '{"Customer":{"@url":"https:\/\/api.fortnox.se\/3\/customers\/
|
55
|
+
string: '{"Customer":{"@url":"https:\/\/api.fortnox.se\/3\/customers\/232","Address1":null,"Address2":null,"City":null,"Country":null,"Comments":null,"Currency":"SEK","CostCenter":null,"CountryCode":null,"Active":true,"CustomerNumber":"232","DefaultDeliveryTypes":{"Invoice":"PRINT","Order":"PRINT","Offer":"PRINT"},"DefaultTemplates":{"Order":"DEFAULTTEMPLATE","Offer":"DEFAULTTEMPLATE","Invoice":"DEFAULTTEMPLATE","CashInvoice":"DEFAULTTEMPLATE"},"DeliveryAddress1":null,"DeliveryAddress2":null,"DeliveryCity":null,"DeliveryCountry":null,"DeliveryCountryCode":null,"DeliveryFax":null,"DeliveryName":null,"DeliveryPhone1":null,"DeliveryPhone2":null,"DeliveryZipCode":null,"Email":"","EmailInvoice":"","EmailInvoiceBCC":"","EmailInvoiceCC":"test@example.com","EmailOffer":"","EmailOfferBCC":"","EmailOfferCC":"","EmailOrder":"","EmailOrderBCC":"","EmailOrderCC":"","ExternalReference":null,"Fax":null,"GLN":null,"GLNDelivery":null,"InvoiceAdministrationFee":null,"InvoiceDiscount":null,"InvoiceFreight":null,"InvoiceRemark":"","Name":"Test
|
42
56
|
customer","OrganisationNumber":"","OurReference":"","Phone1":null,"Phone2":null,"PriceList":"A","Project":"","SalesAccount":null,"ShowPriceVATIncluded":false,"TermsOfDelivery":"","TermsOfPayment":"","Type":"COMPANY","VATNumber":"","VATType":"SEVAT","VisitingAddress":null,"VisitingCity":null,"VisitingCountry":null,"VisitingCountryCode":null,"VisitingZipCode":null,"WayOfDelivery":"","WWW":"","YourReference":"","ZipCode":null}}'
|
43
57
|
http_version:
|
44
|
-
recorded_at:
|
58
|
+
recorded_at: Mon, 21 Dec 2020 20:34:24 GMT
|
45
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:34:25 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
|
+
- '17'
|
36
39
|
X-Uid:
|
37
|
-
-
|
40
|
+
- eddb1149
|
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":
|
54
|
+
encoding: ASCII-8BIT
|
55
|
+
string: '{"MetaInformation":{"@TotalResources":31,"@TotalPages":1,"@CurrentPage":1},"Customers":[{"@url":"https:\/\/api.fortnox.se\/3\/customers\/3","Address1":"","Address2":"","City":"New
|
43
56
|
York","CustomerNumber":"3","Email":"","Name":"Test customer","OrganisationNumber":"400101-8383","Phone":"","ZipCode":""},{"@url":"https:\/\/api.fortnox.se\/3\/customers\/93","Address1":"testgatan
|
44
57
|
6","Address2":"","City":"teststan","CustomerNumber":"93","Email":"","Name":"tester","OrganisationNumber":"","Phone":"","ZipCode":"414141"},{"@url":"https:\/\/api.fortnox.se\/3\/customers\/94","Address1":"","Address2":"","City":"1414141","CustomerNumber":"94","Email":"","Name":"test12313","OrganisationNumber":"","Phone":"","ZipCode":"1414141"},{"@url":"https:\/\/api.fortnox.se\/3\/customers\/95","Address1":"test","Address2":"","City":"teststan","CustomerNumber":"95","Email":"","Name":"test
|
45
58
|
kund utland","OrganisationNumber":"","Phone":"","ZipCode":"12314"},{"@url":"https:\/\/api.fortnox.se\/3\/customers\/96","Address1":"","Address2":"","City":"","CustomerNumber":"96","Email":"test@email.com","Name":"test123133","OrganisationNumber":"","Phone":"13132141","ZipCode":""},{"@url":"https:\/\/api.fortnox.se\/3\/customers\/97","Address1":"","Address2":"","City":"","CustomerNumber":"97","Email":"test@testarn.com","Name":"testata","OrganisationNumber":"","Phone":"0987654","ZipCode":""},{"@url":"https:\/\/api.fortnox.se\/3\/customers\/98","Address1":"","Address2":"","City":"","CustomerNumber":"98","Email":"test@email.com","Name":"test1231331","OrganisationNumber":"","Phone":"+1313131","ZipCode":""},{"@url":"https:\/\/api.fortnox.se\/3\/customers\/99","Address1":"testgatan
|
@@ -68,7 +81,8 @@ http_interactions:
|
|
68
81
|
3 lgh 1205","Address2":"","City":"Lundsbrunn","CustomerNumber":"224","Email":"","Name":"Linda
|
69
82
|
Hassan Ahmed test","OrganisationNumber":"19700110-2222","Phone":"","ZipCode":"53392"},{"@url":"https:\/\/api.fortnox.se\/3\/customers\/227","Address1":"","Address2":"","City":"","CustomerNumber":"227","Email":"","Name":"Test
|
70
83
|
customer","OrganisationNumber":"","Phone":"","ZipCode":""},{"@url":"https:\/\/api.fortnox.se\/3\/customers\/229","Address1":"","Address2":"","City":"","CustomerNumber":"229","Email":"","Name":"Test
|
84
|
+
customer","OrganisationNumber":"","Phone":"","ZipCode":""},{"@url":"https:\/\/api.fortnox.se\/3\/customers\/232","Address1":"","Address2":"","City":"","CustomerNumber":"232","Email":"","Name":"Test
|
71
85
|
customer","OrganisationNumber":"","Phone":"","ZipCode":""}]}'
|
72
86
|
http_version:
|
73
|
-
recorded_at:
|
87
|
+
recorded_at: Mon, 21 Dec 2020 20:34:25 GMT
|
74
88
|
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:34:25 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
|
+
- '25'
|
36
39
|
X-Uid:
|
37
|
-
-
|
40
|
+
- 76ea83cb
|
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},"Customers":[]}'
|
43
56
|
http_version:
|
44
|
-
recorded_at:
|
57
|
+
recorded_at: Mon, 21 Dec 2020 20:34:25 GMT
|
45
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:34:25 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
|
- '18'
|
36
39
|
X-Uid:
|
37
|
-
-
|
40
|
+
- fba71f23
|
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},"Customers":[]}'
|
43
56
|
http_version:
|
44
|
-
recorded_at:
|
57
|
+
recorded_at: Mon, 21 Dec 2020 20:34:25 GMT
|
45
58
|
recorded_with: VCR 4.0.0
|