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.
Files changed (165) hide show
  1. checksums.yaml +5 -5
  2. data/.rubocop.yml +5 -1
  3. data/.travis.yml +20 -22
  4. data/CHANGELOG.md +48 -0
  5. data/README.md +14 -19
  6. data/Rakefile +5 -0
  7. data/fortnox-api.gemspec +10 -10
  8. data/lib/fortnox/api/mappers.rb +5 -38
  9. data/lib/fortnox/api/mappers/base.rb +2 -24
  10. data/lib/fortnox/api/mappers/base/canonical_name_sym.rb +21 -0
  11. data/lib/fortnox/api/mappers/base/from_json.rb +6 -1
  12. data/lib/fortnox/api/mappers/value/array.rb +18 -0
  13. data/lib/fortnox/api/mappers/value/country_string.rb +24 -0
  14. data/lib/fortnox/api/mappers/value/date.rb +11 -0
  15. data/lib/fortnox/api/mappers/value/hash.rb +16 -0
  16. data/lib/fortnox/api/mappers/value/identity.rb +18 -0
  17. data/lib/fortnox/api/models/document.rb +6 -3
  18. data/lib/fortnox/api/models/invoice.rb +1 -1
  19. data/lib/fortnox/api/models/order.rb +1 -1
  20. data/lib/fortnox/api/repositories/base.rb +9 -11
  21. data/lib/fortnox/api/request_handling.rb +0 -1
  22. data/lib/fortnox/api/types.rb +40 -3
  23. data/lib/fortnox/api/types/enums.rb +36 -31
  24. data/lib/fortnox/api/types/shim/country_string.rb +10 -0
  25. data/lib/fortnox/api/version.rb +1 -1
  26. data/spec/fortnox/api/circular_queue_spec.rb +52 -0
  27. data/spec/fortnox/api/mappers/base/canonical_name_sym_spec.rb +34 -0
  28. data/spec/fortnox/api/mappers/base_spec.rb +33 -43
  29. data/spec/fortnox/api/mappers/contexts/json_conversion.rb +1 -1
  30. data/spec/fortnox/api/repositories/article_spec.rb +4 -2
  31. data/spec/fortnox/api/repositories/base_spec.rb +28 -8
  32. data/spec/fortnox/api/repositories/customer_spec.rb +29 -1
  33. data/spec/fortnox/api/repositories/invoice_spec.rb +147 -3
  34. data/spec/fortnox/api/repositories/order_spec.rb +2 -2
  35. data/spec/fortnox/api/repositories/project_spec.rb +1 -1
  36. data/spec/fortnox/api/repositories/terms_of_payment_spec.rb +4 -2
  37. data/spec/fortnox/api/repositories/unit_spec.rb +6 -3
  38. data/spec/fortnox/api/types/account_number_spec.rb +19 -15
  39. data/spec/fortnox/api/types/country_code_spec.rb +42 -0
  40. data/spec/fortnox/api/types/country_spec.rb +67 -0
  41. data/spec/fortnox/api/types/email_spec.rb +8 -7
  42. data/spec/fortnox/api/types/enums_spec.rb +1 -1
  43. data/spec/fortnox/api/types/examples/document_row.rb +1 -1
  44. data/spec/fortnox/api/types/housework_types_spec.rb +151 -34
  45. data/spec/fortnox/api_spec.rb +3 -1
  46. data/spec/vcr_cassettes/articles/all.yml +40 -10
  47. data/spec/vcr_cassettes/articles/find_by_hash_failure.yml +21 -8
  48. data/spec/vcr_cassettes/articles/find_failure.yml +21 -8
  49. data/spec/vcr_cassettes/articles/find_id_1.yml +22 -9
  50. data/spec/vcr_cassettes/articles/find_new.yml +24 -11
  51. data/spec/vcr_cassettes/articles/multi_param_find_by_hash.yml +21 -8
  52. data/spec/vcr_cassettes/articles/save_new.yml +22 -8
  53. data/spec/vcr_cassettes/articles/save_old.yml +24 -11
  54. data/spec/vcr_cassettes/articles/save_with_specially_named_attribute.yml +22 -8
  55. data/spec/vcr_cassettes/articles/search_by_name.yml +21 -8
  56. data/spec/vcr_cassettes/articles/search_miss.yml +21 -8
  57. data/spec/vcr_cassettes/articles/search_with_special_char.yml +21 -8
  58. data/spec/vcr_cassettes/articles/single_param_find_by_hash.yml +33 -10
  59. data/spec/vcr_cassettes/customers/all.yml +26 -13
  60. data/spec/vcr_cassettes/customers/find_by_hash_failure.yml +21 -8
  61. data/spec/vcr_cassettes/customers/find_failure.yml +21 -8
  62. data/spec/vcr_cassettes/customers/find_id_1.yml +22 -9
  63. data/spec/vcr_cassettes/customers/find_new.yml +24 -11
  64. data/spec/vcr_cassettes/customers/multi_param_find_by_hash.yml +21 -8
  65. data/spec/vcr_cassettes/customers/save_new.yml +21 -7
  66. data/spec/vcr_cassettes/customers/save_new_with_country_code_SE.yml +60 -0
  67. data/spec/vcr_cassettes/customers/save_old.yml +23 -10
  68. data/spec/vcr_cassettes/customers/save_with_specially_named_attribute.yml +21 -7
  69. data/spec/vcr_cassettes/customers/search_by_name.yml +32 -10
  70. data/spec/vcr_cassettes/customers/search_miss.yml +21 -8
  71. data/spec/vcr_cassettes/customers/search_with_special_char.yml +21 -8
  72. data/spec/vcr_cassettes/customers/single_param_find_by_hash.yml +22 -9
  73. data/spec/vcr_cassettes/invoices/all.yml +118 -67
  74. data/spec/vcr_cassettes/invoices/filter_hit.yml +26 -10
  75. data/spec/vcr_cassettes/invoices/filter_invalid.yml +20 -6
  76. data/spec/vcr_cassettes/invoices/find_by_hash_failure.yml +21 -8
  77. data/spec/vcr_cassettes/invoices/find_failure.yml +21 -8
  78. data/spec/vcr_cassettes/invoices/find_id_1.yml +23 -10
  79. data/spec/vcr_cassettes/invoices/find_new.yml +26 -14
  80. data/spec/vcr_cassettes/invoices/multi_param_find_by_hash.yml +23 -10
  81. data/spec/vcr_cassettes/invoices/save_new.yml +23 -10
  82. data/spec/vcr_cassettes/invoices/save_new_with_comments.yml +61 -0
  83. data/spec/vcr_cassettes/invoices/save_new_with_country.yml +60 -0
  84. data/spec/vcr_cassettes/invoices/save_new_with_country_GB.yml +61 -0
  85. data/spec/vcr_cassettes/invoices/save_new_with_country_KR.yml +61 -0
  86. data/spec/vcr_cassettes/invoices/save_new_with_country_Norge.yml +60 -0
  87. data/spec/vcr_cassettes/invoices/save_new_with_country_Norway.yml +60 -0
  88. data/spec/vcr_cassettes/invoices/save_new_with_country_Sverige.yml +60 -0
  89. data/spec/vcr_cassettes/invoices/save_new_with_country_VA.yml +61 -0
  90. data/spec/vcr_cassettes/invoices/save_new_with_country_VI.yml +61 -0
  91. data/spec/vcr_cassettes/invoices/save_new_with_country_empty_string.yml +60 -0
  92. data/spec/vcr_cassettes/invoices/save_new_with_country_nil.yml +60 -0
  93. data/spec/vcr_cassettes/invoices/save_old.yml +25 -13
  94. data/spec/vcr_cassettes/invoices/save_old_with_empty_comments.yml +61 -0
  95. data/spec/vcr_cassettes/invoices/save_old_with_empty_country.yml +60 -0
  96. data/spec/vcr_cassettes/invoices/save_old_with_nil_comments.yml +61 -0
  97. data/spec/vcr_cassettes/invoices/save_old_with_nil_country.yml +60 -0
  98. data/spec/vcr_cassettes/invoices/save_with_nested_model.yml +23 -10
  99. data/spec/vcr_cassettes/invoices/save_with_specially_named_attribute.yml +23 -10
  100. data/spec/vcr_cassettes/invoices/search_by_name.yml +28 -11
  101. data/spec/vcr_cassettes/invoices/search_miss.yml +21 -8
  102. data/spec/vcr_cassettes/invoices/search_with_special_char.yml +21 -8
  103. data/spec/vcr_cassettes/invoices/single_param_find_by_hash.yml +24 -11
  104. data/spec/vcr_cassettes/orders/all.yml +120 -107
  105. data/spec/vcr_cassettes/orders/filter_hit.yml +28 -12
  106. data/spec/vcr_cassettes/orders/filter_invalid.yml +20 -6
  107. data/spec/vcr_cassettes/orders/find_by_hash_failure.yml +21 -8
  108. data/spec/vcr_cassettes/orders/find_failure.yml +21 -8
  109. data/spec/vcr_cassettes/orders/find_id_1.yml +23 -10
  110. data/spec/vcr_cassettes/orders/find_new.yml +26 -14
  111. data/spec/vcr_cassettes/orders/housework_invalid_tax_reduction_type.yml +57 -0
  112. data/spec/vcr_cassettes/orders/housework_othercoses_invalid.yml +57 -0
  113. data/spec/vcr_cassettes/orders/housework_type_babysitting.yml +24 -10
  114. data/spec/vcr_cassettes/orders/housework_type_cleaning.yml +24 -10
  115. data/spec/vcr_cassettes/orders/housework_type_construction.yml +24 -10
  116. data/spec/vcr_cassettes/orders/housework_type_cooking.yml +21 -7
  117. data/spec/vcr_cassettes/orders/housework_type_electricity.yml +24 -10
  118. data/spec/vcr_cassettes/orders/housework_type_gardening.yml +24 -10
  119. data/spec/vcr_cassettes/orders/housework_type_glassmetalwork.yml +24 -10
  120. data/spec/vcr_cassettes/orders/housework_type_grounddrainagework.yml +24 -10
  121. data/spec/vcr_cassettes/orders/housework_type_hvac.yml +24 -10
  122. data/spec/vcr_cassettes/orders/housework_type_itservices.yml +60 -0
  123. data/spec/vcr_cassettes/orders/housework_type_majorappliancerepair.yml +60 -0
  124. data/spec/vcr_cassettes/orders/housework_type_masonry.yml +24 -10
  125. data/spec/vcr_cassettes/orders/housework_type_movingservices.yml +60 -0
  126. data/spec/vcr_cassettes/orders/housework_type_othercare.yml +24 -10
  127. data/spec/vcr_cassettes/orders/housework_type_othercosts.yml +24 -10
  128. data/spec/vcr_cassettes/orders/housework_type_paintingwallpapering.yml +24 -10
  129. data/spec/vcr_cassettes/orders/housework_type_snowplowing.yml +24 -10
  130. data/spec/vcr_cassettes/orders/housework_type_textileclothing.yml +24 -10
  131. data/spec/vcr_cassettes/orders/housework_type_tutoring.yml +21 -7
  132. data/spec/vcr_cassettes/orders/housework_without_tax_reduction_type.yml +57 -0
  133. data/spec/vcr_cassettes/orders/multi_param_find_by_hash.yml +22 -9
  134. data/spec/vcr_cassettes/orders/save_new.yml +23 -10
  135. data/spec/vcr_cassettes/orders/save_old.yml +25 -13
  136. data/spec/vcr_cassettes/orders/save_with_nested_model.yml +23 -10
  137. data/spec/vcr_cassettes/orders/search_by_name.yml +25 -11
  138. data/spec/vcr_cassettes/orders/search_miss.yml +21 -8
  139. data/spec/vcr_cassettes/orders/search_with_special_char.yml +21 -8
  140. data/spec/vcr_cassettes/orders/single_param_find_by_hash.yml +23 -10
  141. data/spec/vcr_cassettes/projects/all.yml +41 -16
  142. data/spec/vcr_cassettes/projects/find_by_hash_failure.yml +21 -8
  143. data/spec/vcr_cassettes/projects/find_failure.yml +21 -8
  144. data/spec/vcr_cassettes/projects/find_id_1.yml +21 -8
  145. data/spec/vcr_cassettes/projects/find_new.yml +24 -11
  146. data/spec/vcr_cassettes/projects/multi_param_find_by_hash.yml +23 -10
  147. data/spec/vcr_cassettes/projects/save_new.yml +22 -8
  148. data/spec/vcr_cassettes/projects/save_old.yml +24 -11
  149. data/spec/vcr_cassettes/projects/single_param_find_by_hash.yml +22 -9
  150. data/spec/vcr_cassettes/termsofpayments/all.yml +31 -14
  151. data/spec/vcr_cassettes/termsofpayments/find_failure.yml +21 -8
  152. data/spec/vcr_cassettes/termsofpayments/find_id_1.yml +22 -9
  153. data/spec/vcr_cassettes/termsofpayments/find_new.yml +23 -10
  154. data/spec/vcr_cassettes/termsofpayments/save_new.yml +22 -8
  155. data/spec/vcr_cassettes/termsofpayments/save_old.yml +23 -10
  156. data/spec/vcr_cassettes/units/all.yml +31 -12
  157. data/spec/vcr_cassettes/units/find_failure.yml +21 -8
  158. data/spec/vcr_cassettes/units/find_id_1.yml +21 -8
  159. data/spec/vcr_cassettes/units/find_new.yml +23 -12
  160. data/spec/vcr_cassettes/units/save_new.yml +22 -10
  161. data/spec/vcr_cassettes/units/save_old.yml +23 -12
  162. data/spec/vcr_cassettes/units/save_with_specially_named_attribute.yml +22 -10
  163. data/temp.txt +1 -0
  164. metadata +99 -21
  165. data/spec/support/matchers/type/have_country_code_matcher.rb +0 -15
@@ -5,7 +5,7 @@ http_interactions:
5
5
  uri: https://api.fortnox.se/3/orders/
6
6
  body:
7
7
  encoding: UTF-8
8
- string: '{"Order":{"CustomerNumber":"1","OrderRows":[{"ArticleNumber":"0000","HouseWorkType":"BABYSITTING","OrderedQuantity":1.0}]}}'
8
+ string: '{"Order":{"CustomerNumber":"1","TaxReductionType":"rut","OrderRows":[{"ArticleNumber":"0000","HouseWork":true,"HouseWorkType":"BABYSITTING","OrderedQuantity":1.0}]}}'
9
9
  headers:
10
10
  Content-Type:
11
11
  - application/json
@@ -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
- - Thu, 01 Mar 2018 13:58:18 GMT
30
+ - Tue, 22 Dec 2020 09:01:57 GMT
27
31
  Content-Type:
28
32
  - application/json
29
33
  Connection:
@@ -31,16 +35,26 @@ http_interactions:
31
35
  Location:
32
36
  - orders
33
37
  X-Rack-Responsetime:
34
- - '81'
38
+ - '126'
35
39
  X-Uid:
36
- - a28a017b
40
+ - 8c093161
37
41
  X-Build:
38
- - bec4a33b2e
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: '{"Order":{"@url":"https:\/\/api.fortnox.se\/3\/orders\/294","@urlTaxReductionList":"https:\/\/api.fortnox.se\/3\/taxreductions?filter=orders&referencenumber=294","AdministrationFee":0,"AdministrationFeeVAT":0,"Address1":"","Address2":"","BasisTaxReduction":0,"Cancelled":false,"City":"","Comments":"","ContributionPercent":0,"ContributionValue":0,"CopyRemarks":false,"Country":"","CostCenter":"","Currency":"SEK","CurrencyRate":1,"CurrencyUnit":1,"CustomerName":"Old
42
- name","CustomerNumber":"1","DeliveryState":"delivery","DeliveryAddress1":"","DeliveryAddress2":"","DeliveryCity":"","DeliveryCountry":"","DeliveryDate":null,"DeliveryName":"","DeliveryZipCode":"","DocumentNumber":"294","EmailInformation":{"EmailAddressFrom":null,"EmailAddressTo":"","EmailAddressCC":null,"EmailAddressBCC":null,"EmailSubject":"Order
43
- {no} bifogas","EmailBody":" "},"ExternalInvoiceReference1":"","ExternalInvoiceReference2":"","Freight":0,"FreightVAT":0,"Gross":0,"HouseWork":false,"InvoiceReference":0,"Labels":[],"Language":"SV","Net":0,"NotCompleted":false,"OfferReference":0,"OrderDate":"2018-03-01","OrderRows":[{"AccountNumber":1250,"ArticleNumber":"0000","ContributionPercent":0,"ContributionValue":0,"CostCenter":"","DeliveredQuantity":"0.00","Description":"Testartikel","Discount":0,"DiscountType":"PERCENT","HouseWork":false,"HouseWorkHoursToReport":null,"HouseWorkType":"BABYSITTING","OrderedQuantity":"1.00","Price":0,"Project":"","ReservedQuantity":0,"StockPointCode":null,"Total":0,"Unit":"","VAT":0}],"OrganisationNumber":"860101-8735","OurReference":"","Phone1":"","Phone2":"","PriceList":"A","PrintTemplate":"oc","Project":"","WarehouseReady":true,"OutboundDate":"2018-03-01","Remarks":"","RoundOff":0,"Sent":false,"TaxReduction":null,"TermsOfDelivery":"","TermsOfPayment":0,"Total":0,"TotalToPay":0,"TotalVAT":0,"VATIncluded":false,"WayOfDelivery":"","YourReference":"","YourOrderNumber":"","ZipCode":""}}'
55
+ string: '{"Order":{"@url":"https:\/\/api.fortnox.se\/3\/orders\/404","@urlTaxReductionList":"https:\/\/api.fortnox.se\/3\/taxreductions?filter=orders&referencenumber=404","AdministrationFee":0,"AdministrationFeeVAT":0,"Address1":"","Address2":"","BasisTaxReduction":0,"Cancelled":false,"City":"","Comments":"","ContributionPercent":0,"ContributionValue":0,"CopyRemarks":false,"Country":"","CostCenter":"","Currency":"SEK","CurrencyRate":1,"CurrencyUnit":1,"CustomerName":"Old
56
+ name","CustomerNumber":"1","DeliveryState":"delivery","DeliveryAddress1":"","DeliveryAddress2":"","DeliveryCity":"","DeliveryCountry":"","DeliveryDate":null,"DeliveryName":"","DeliveryZipCode":"","DocumentNumber":"404","EmailInformation":{"EmailAddressFrom":null,"EmailAddressTo":"","EmailAddressCC":null,"EmailAddressBCC":null,"EmailSubject":"Order
57
+ {no} bifogas","EmailBody":" "},"ExternalInvoiceReference1":"","ExternalInvoiceReference2":"","Freight":0,"FreightVAT":0,"Gross":0,"HouseWork":false,"InvoiceReference":0,"Labels":[],"Language":"SV","Net":0,"NotCompleted":false,"OfferReference":0,"OrderDate":"2020-12-22","OrderRows":[{"AccountNumber":1250,"ArticleNumber":"0000","ContributionPercent":0,"ContributionValue":0,"CostCenter":"","DeliveredQuantity":"0.00","Description":"Testartikel","Discount":0,"DiscountType":"PERCENT","HouseWork":true,"HouseWorkHoursToReport":null,"HouseWorkType":"BABYSITTING","OrderedQuantity":"1.00","Price":0,"Project":"","ReservedQuantity":"0.00","StockPointCode":null,"StockPointId":null,"Total":0,"Unit":"","VAT":0}],"OrderType":"Order","OrganisationNumber":"860101-8735","OurReference":"","Phone1":"","Phone2":"","PriceList":"A","PrintTemplate":"oc","Project":"","WarehouseReady":true,"OutboundDate":"2020-12-22","Remarks":"","RoundOff":0,"Sent":false,"TaxReduction":null,"TermsOfDelivery":"","TermsOfPayment":0,"TimeBasisReference":null,"Total":0,"TotalToPay":0,"TotalVAT":0,"VATIncluded":false,"WayOfDelivery":"","YourReference":"","YourOrderNumber":"","ZipCode":"","StockPointCode":null,"StockPointId":null,"TaxReductionType":"rut"}}'
44
58
  http_version:
45
- recorded_at: Thu, 01 Mar 2018 13:58:18 GMT
46
- recorded_with: VCR 3.0.3
59
+ recorded_at: Tue, 22 Dec 2020 09:01:57 GMT
60
+ recorded_with: VCR 4.0.0
@@ -5,7 +5,7 @@ http_interactions:
5
5
  uri: https://api.fortnox.se/3/orders/
6
6
  body:
7
7
  encoding: UTF-8
8
- string: '{"Order":{"CustomerNumber":"1","OrderRows":[{"ArticleNumber":"0000","HouseWorkType":"CLEANING","OrderedQuantity":1.0}]}}'
8
+ string: '{"Order":{"CustomerNumber":"1","TaxReductionType":"rut","OrderRows":[{"ArticleNumber":"0000","HouseWork":true,"HouseWorkType":"CLEANING","OrderedQuantity":1.0}]}}'
9
9
  headers:
10
10
  Content-Type:
11
11
  - application/json
@@ -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
- - Thu, 01 Mar 2018 13:58:16 GMT
30
+ - Tue, 22 Dec 2020 09:01:56 GMT
27
31
  Content-Type:
28
32
  - application/json
29
33
  Connection:
@@ -31,16 +35,26 @@ http_interactions:
31
35
  Location:
32
36
  - orders
33
37
  X-Rack-Responsetime:
34
- - '84'
38
+ - '154'
35
39
  X-Uid:
36
- - e8b8f852
40
+ - 6f07a415
37
41
  X-Build:
38
- - bec4a33b2e
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: '{"Order":{"@url":"https:\/\/api.fortnox.se\/3\/orders\/289","@urlTaxReductionList":"https:\/\/api.fortnox.se\/3\/taxreductions?filter=orders&referencenumber=289","AdministrationFee":0,"AdministrationFeeVAT":0,"Address1":"","Address2":"","BasisTaxReduction":0,"Cancelled":false,"City":"","Comments":"","ContributionPercent":0,"ContributionValue":0,"CopyRemarks":false,"Country":"","CostCenter":"","Currency":"SEK","CurrencyRate":1,"CurrencyUnit":1,"CustomerName":"Old
42
- name","CustomerNumber":"1","DeliveryState":"delivery","DeliveryAddress1":"","DeliveryAddress2":"","DeliveryCity":"","DeliveryCountry":"","DeliveryDate":null,"DeliveryName":"","DeliveryZipCode":"","DocumentNumber":"289","EmailInformation":{"EmailAddressFrom":null,"EmailAddressTo":"","EmailAddressCC":null,"EmailAddressBCC":null,"EmailSubject":"Order
43
- {no} bifogas","EmailBody":" "},"ExternalInvoiceReference1":"","ExternalInvoiceReference2":"","Freight":0,"FreightVAT":0,"Gross":0,"HouseWork":false,"InvoiceReference":0,"Labels":[],"Language":"SV","Net":0,"NotCompleted":false,"OfferReference":0,"OrderDate":"2018-03-01","OrderRows":[{"AccountNumber":1250,"ArticleNumber":"0000","ContributionPercent":0,"ContributionValue":0,"CostCenter":"","DeliveredQuantity":"0.00","Description":"Testartikel","Discount":0,"DiscountType":"PERCENT","HouseWork":false,"HouseWorkHoursToReport":null,"HouseWorkType":"CLEANING","OrderedQuantity":"1.00","Price":0,"Project":"","ReservedQuantity":0,"StockPointCode":null,"Total":0,"Unit":"","VAT":0}],"OrganisationNumber":"860101-8735","OurReference":"","Phone1":"","Phone2":"","PriceList":"A","PrintTemplate":"oc","Project":"","WarehouseReady":true,"OutboundDate":"2018-03-01","Remarks":"","RoundOff":0,"Sent":false,"TaxReduction":null,"TermsOfDelivery":"","TermsOfPayment":0,"Total":0,"TotalToPay":0,"TotalVAT":0,"VATIncluded":false,"WayOfDelivery":"","YourReference":"","YourOrderNumber":"","ZipCode":""}}'
55
+ string: '{"Order":{"@url":"https:\/\/api.fortnox.se\/3\/orders\/401","@urlTaxReductionList":"https:\/\/api.fortnox.se\/3\/taxreductions?filter=orders&referencenumber=401","AdministrationFee":0,"AdministrationFeeVAT":0,"Address1":"","Address2":"","BasisTaxReduction":0,"Cancelled":false,"City":"","Comments":"","ContributionPercent":0,"ContributionValue":0,"CopyRemarks":false,"Country":"","CostCenter":"","Currency":"SEK","CurrencyRate":1,"CurrencyUnit":1,"CustomerName":"Old
56
+ name","CustomerNumber":"1","DeliveryState":"delivery","DeliveryAddress1":"","DeliveryAddress2":"","DeliveryCity":"","DeliveryCountry":"","DeliveryDate":null,"DeliveryName":"","DeliveryZipCode":"","DocumentNumber":"401","EmailInformation":{"EmailAddressFrom":null,"EmailAddressTo":"","EmailAddressCC":null,"EmailAddressBCC":null,"EmailSubject":"Order
57
+ {no} bifogas","EmailBody":" "},"ExternalInvoiceReference1":"","ExternalInvoiceReference2":"","Freight":0,"FreightVAT":0,"Gross":0,"HouseWork":false,"InvoiceReference":0,"Labels":[],"Language":"SV","Net":0,"NotCompleted":false,"OfferReference":0,"OrderDate":"2020-12-22","OrderRows":[{"AccountNumber":1250,"ArticleNumber":"0000","ContributionPercent":0,"ContributionValue":0,"CostCenter":"","DeliveredQuantity":"0.00","Description":"Testartikel","Discount":0,"DiscountType":"PERCENT","HouseWork":true,"HouseWorkHoursToReport":null,"HouseWorkType":"CLEANING","OrderedQuantity":"1.00","Price":0,"Project":"","ReservedQuantity":"0.00","StockPointCode":null,"StockPointId":null,"Total":0,"Unit":"","VAT":0}],"OrderType":"Order","OrganisationNumber":"860101-8735","OurReference":"","Phone1":"","Phone2":"","PriceList":"A","PrintTemplate":"oc","Project":"","WarehouseReady":true,"OutboundDate":"2020-12-22","Remarks":"","RoundOff":0,"Sent":false,"TaxReduction":null,"TermsOfDelivery":"","TermsOfPayment":0,"TimeBasisReference":null,"Total":0,"TotalToPay":0,"TotalVAT":0,"VATIncluded":false,"WayOfDelivery":"","YourReference":"","YourOrderNumber":"","ZipCode":"","StockPointCode":null,"StockPointId":null,"TaxReductionType":"rut"}}'
44
58
  http_version:
45
- recorded_at: Thu, 01 Mar 2018 13:58:16 GMT
46
- recorded_with: VCR 3.0.3
59
+ recorded_at: Tue, 22 Dec 2020 09:01:56 GMT
60
+ recorded_with: VCR 4.0.0
@@ -5,7 +5,7 @@ http_interactions:
5
5
  uri: https://api.fortnox.se/3/orders/
6
6
  body:
7
7
  encoding: UTF-8
8
- string: '{"Order":{"CustomerNumber":"1","OrderRows":[{"ArticleNumber":"0000","HouseWorkType":"CONSTRUCTION","OrderedQuantity":1.0}]}}'
8
+ string: '{"Order":{"CustomerNumber":"1","TaxReductionType":"rot","OrderRows":[{"ArticleNumber":"0000","HouseWork":true,"HouseWorkType":"CONSTRUCTION","OrderedQuantity":1.0}]}}'
9
9
  headers:
10
10
  Content-Type:
11
11
  - application/json
@@ -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
- - Thu, 01 Mar 2018 13:58:20 GMT
30
+ - Tue, 22 Dec 2020 09:01:56 GMT
27
31
  Content-Type:
28
32
  - application/json
29
33
  Connection:
@@ -31,16 +35,26 @@ http_interactions:
31
35
  Location:
32
36
  - orders
33
37
  X-Rack-Responsetime:
34
- - '78'
38
+ - '151'
35
39
  X-Uid:
36
- - 8c316218
40
+ - '0800b522'
37
41
  X-Build:
38
- - bec4a33b2e
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: '{"Order":{"@url":"https:\/\/api.fortnox.se\/3\/orders\/298","@urlTaxReductionList":"https:\/\/api.fortnox.se\/3\/taxreductions?filter=orders&referencenumber=298","AdministrationFee":0,"AdministrationFeeVAT":0,"Address1":"","Address2":"","BasisTaxReduction":0,"Cancelled":false,"City":"","Comments":"","ContributionPercent":0,"ContributionValue":0,"CopyRemarks":false,"Country":"","CostCenter":"","Currency":"SEK","CurrencyRate":1,"CurrencyUnit":1,"CustomerName":"Old
42
- name","CustomerNumber":"1","DeliveryState":"delivery","DeliveryAddress1":"","DeliveryAddress2":"","DeliveryCity":"","DeliveryCountry":"","DeliveryDate":null,"DeliveryName":"","DeliveryZipCode":"","DocumentNumber":"298","EmailInformation":{"EmailAddressFrom":null,"EmailAddressTo":"","EmailAddressCC":null,"EmailAddressBCC":null,"EmailSubject":"Order
43
- {no} bifogas","EmailBody":" "},"ExternalInvoiceReference1":"","ExternalInvoiceReference2":"","Freight":0,"FreightVAT":0,"Gross":0,"HouseWork":false,"InvoiceReference":0,"Labels":[],"Language":"SV","Net":0,"NotCompleted":false,"OfferReference":0,"OrderDate":"2018-03-01","OrderRows":[{"AccountNumber":1250,"ArticleNumber":"0000","ContributionPercent":0,"ContributionValue":0,"CostCenter":"","DeliveredQuantity":"0.00","Description":"Testartikel","Discount":0,"DiscountType":"PERCENT","HouseWork":false,"HouseWorkHoursToReport":null,"HouseWorkType":"CONSTRUCTION","OrderedQuantity":"1.00","Price":0,"Project":"","ReservedQuantity":0,"StockPointCode":null,"Total":0,"Unit":"","VAT":0}],"OrganisationNumber":"860101-8735","OurReference":"","Phone1":"","Phone2":"","PriceList":"A","PrintTemplate":"oc","Project":"","WarehouseReady":true,"OutboundDate":"2018-03-01","Remarks":"","RoundOff":0,"Sent":false,"TaxReduction":null,"TermsOfDelivery":"","TermsOfPayment":0,"Total":0,"TotalToPay":0,"TotalVAT":0,"VATIncluded":false,"WayOfDelivery":"","YourReference":"","YourOrderNumber":"","ZipCode":""}}'
55
+ string: '{"Order":{"@url":"https:\/\/api.fortnox.se\/3\/orders\/402","@urlTaxReductionList":"https:\/\/api.fortnox.se\/3\/taxreductions?filter=orders&referencenumber=402","AdministrationFee":0,"AdministrationFeeVAT":0,"Address1":"","Address2":"","BasisTaxReduction":0,"Cancelled":false,"City":"","Comments":"","ContributionPercent":0,"ContributionValue":0,"CopyRemarks":false,"Country":"","CostCenter":"","Currency":"SEK","CurrencyRate":1,"CurrencyUnit":1,"CustomerName":"Old
56
+ name","CustomerNumber":"1","DeliveryState":"delivery","DeliveryAddress1":"","DeliveryAddress2":"","DeliveryCity":"","DeliveryCountry":"","DeliveryDate":null,"DeliveryName":"","DeliveryZipCode":"","DocumentNumber":"402","EmailInformation":{"EmailAddressFrom":null,"EmailAddressTo":"","EmailAddressCC":null,"EmailAddressBCC":null,"EmailSubject":"Order
57
+ {no} bifogas","EmailBody":" "},"ExternalInvoiceReference1":"","ExternalInvoiceReference2":"","Freight":0,"FreightVAT":0,"Gross":0,"HouseWork":false,"InvoiceReference":0,"Labels":[],"Language":"SV","Net":0,"NotCompleted":false,"OfferReference":0,"OrderDate":"2020-12-22","OrderRows":[{"AccountNumber":1250,"ArticleNumber":"0000","ContributionPercent":0,"ContributionValue":0,"CostCenter":"","DeliveredQuantity":"0.00","Description":"Testartikel","Discount":0,"DiscountType":"PERCENT","HouseWork":true,"HouseWorkHoursToReport":null,"HouseWorkType":"CONSTRUCTION","OrderedQuantity":"1.00","Price":0,"Project":"","ReservedQuantity":"0.00","StockPointCode":null,"StockPointId":null,"Total":0,"Unit":"","VAT":0}],"OrderType":"Order","OrganisationNumber":"860101-8735","OurReference":"","Phone1":"","Phone2":"","PriceList":"A","PrintTemplate":"oc","Project":"","WarehouseReady":true,"OutboundDate":"2020-12-22","Remarks":"","RoundOff":0,"Sent":false,"TaxReduction":null,"TermsOfDelivery":"","TermsOfPayment":0,"TimeBasisReference":null,"Total":0,"TotalToPay":0,"TotalVAT":0,"VATIncluded":false,"WayOfDelivery":"","YourReference":"","YourOrderNumber":"","ZipCode":"","StockPointCode":null,"StockPointId":null,"TaxReductionType":"rot"}}'
44
58
  http_version:
45
- recorded_at: Thu, 01 Mar 2018 13:58:20 GMT
46
- recorded_with: VCR 3.0.3
59
+ recorded_at: Tue, 22 Dec 2020 09:01:56 GMT
60
+ recorded_with: VCR 4.0.0
@@ -5,7 +5,7 @@ http_interactions:
5
5
  uri: https://api.fortnox.se/3/orders/
6
6
  body:
7
7
  encoding: UTF-8
8
- string: '{"Order":{"CustomerNumber":"1","OrderRows":[{"ArticleNumber":"0000","HouseWorkType":"COOKING","OrderedQuantity":1.0}]}}'
8
+ string: '{"Order":{"CustomerNumber":"1","TaxReductionType":"rut","OrderRows":[{"ArticleNumber":"0000","HouseWork":true,"HouseWorkType":"COOKING","OrderedQuantity":1.0}]}}'
9
9
  headers:
10
10
  Content-Type:
11
11
  - application/json
@@ -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: 400
@@ -23,21 +27,31 @@ http_interactions:
23
27
  Server:
24
28
  - nginx
25
29
  Date:
26
- - Thu, 01 Mar 2018 13:58:17 GMT
30
+ - Tue, 22 Dec 2020 09:01:55 GMT
27
31
  Content-Type:
28
32
  - application/json
29
33
  Connection:
30
34
  - close
31
35
  X-Rack-Responsetime:
32
- - '24'
36
+ - '51'
33
37
  X-Uid:
34
- - 49e1a51c
38
+ - b7baa582
35
39
  X-Build:
36
- - bec4a33b2e
40
+ - d59e2acefa
41
+ Strict-Transport-Security:
42
+ - max-age=31536000; includeSubdomains
43
+ X-Xss-Protection:
44
+ - 1; mode=block
45
+ X-Content-Type-Options:
46
+ - nosniff
47
+ X-Frame-Options:
48
+ - sameorigin
49
+ Referrer-Policy:
50
+ - strict-origin-when-cross-origin
37
51
  body:
38
52
  encoding: UTF-8
39
53
  string: '{"ErrorInformation":{"error":1,"message":"Skattereduktion f\u00f6r
40
54
  den valda typen av husarbete har upph\u00f6rt.","code":2003157}}'
41
55
  http_version:
42
- recorded_at: Thu, 01 Mar 2018 13:58:17 GMT
43
- recorded_with: VCR 3.0.3
56
+ recorded_at: Tue, 22 Dec 2020 09:01:55 GMT
57
+ recorded_with: VCR 4.0.0
@@ -5,7 +5,7 @@ http_interactions:
5
5
  uri: https://api.fortnox.se/3/orders/
6
6
  body:
7
7
  encoding: UTF-8
8
- string: '{"Order":{"CustomerNumber":"1","OrderRows":[{"ArticleNumber":"0000","HouseWorkType":"ELECTRICITY","OrderedQuantity":1.0}]}}'
8
+ string: '{"Order":{"CustomerNumber":"1","TaxReductionType":"rot","OrderRows":[{"ArticleNumber":"0000","HouseWork":true,"HouseWorkType":"ELECTRICITY","OrderedQuantity":1.0}]}}'
9
9
  headers:
10
10
  Content-Type:
11
11
  - application/json
@@ -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
- - Thu, 01 Mar 2018 13:58:19 GMT
30
+ - Tue, 22 Dec 2020 09:01:55 GMT
27
31
  Content-Type:
28
32
  - application/json
29
33
  Connection:
@@ -31,16 +35,26 @@ http_interactions:
31
35
  Location:
32
36
  - orders
33
37
  X-Rack-Responsetime:
34
- - '88'
38
+ - '177'
35
39
  X-Uid:
36
- - afcb32c7
40
+ - 4373fef1
37
41
  X-Build:
38
- - bec4a33b2e
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: '{"Order":{"@url":"https:\/\/api.fortnox.se\/3\/orders\/297","@urlTaxReductionList":"https:\/\/api.fortnox.se\/3\/taxreductions?filter=orders&referencenumber=297","AdministrationFee":0,"AdministrationFeeVAT":0,"Address1":"","Address2":"","BasisTaxReduction":0,"Cancelled":false,"City":"","Comments":"","ContributionPercent":0,"ContributionValue":0,"CopyRemarks":false,"Country":"","CostCenter":"","Currency":"SEK","CurrencyRate":1,"CurrencyUnit":1,"CustomerName":"Old
42
- name","CustomerNumber":"1","DeliveryState":"delivery","DeliveryAddress1":"","DeliveryAddress2":"","DeliveryCity":"","DeliveryCountry":"","DeliveryDate":null,"DeliveryName":"","DeliveryZipCode":"","DocumentNumber":"297","EmailInformation":{"EmailAddressFrom":null,"EmailAddressTo":"","EmailAddressCC":null,"EmailAddressBCC":null,"EmailSubject":"Order
43
- {no} bifogas","EmailBody":" "},"ExternalInvoiceReference1":"","ExternalInvoiceReference2":"","Freight":0,"FreightVAT":0,"Gross":0,"HouseWork":false,"InvoiceReference":0,"Labels":[],"Language":"SV","Net":0,"NotCompleted":false,"OfferReference":0,"OrderDate":"2018-03-01","OrderRows":[{"AccountNumber":1250,"ArticleNumber":"0000","ContributionPercent":0,"ContributionValue":0,"CostCenter":"","DeliveredQuantity":"0.00","Description":"Testartikel","Discount":0,"DiscountType":"PERCENT","HouseWork":false,"HouseWorkHoursToReport":null,"HouseWorkType":"ELECTRICITY","OrderedQuantity":"1.00","Price":0,"Project":"","ReservedQuantity":0,"StockPointCode":null,"Total":0,"Unit":"","VAT":0}],"OrganisationNumber":"860101-8735","OurReference":"","Phone1":"","Phone2":"","PriceList":"A","PrintTemplate":"oc","Project":"","WarehouseReady":true,"OutboundDate":"2018-03-01","Remarks":"","RoundOff":0,"Sent":false,"TaxReduction":null,"TermsOfDelivery":"","TermsOfPayment":0,"Total":0,"TotalToPay":0,"TotalVAT":0,"VATIncluded":false,"WayOfDelivery":"","YourReference":"","YourOrderNumber":"","ZipCode":""}}'
55
+ string: '{"Order":{"@url":"https:\/\/api.fortnox.se\/3\/orders\/398","@urlTaxReductionList":"https:\/\/api.fortnox.se\/3\/taxreductions?filter=orders&referencenumber=398","AdministrationFee":0,"AdministrationFeeVAT":0,"Address1":"","Address2":"","BasisTaxReduction":0,"Cancelled":false,"City":"","Comments":"","ContributionPercent":0,"ContributionValue":0,"CopyRemarks":false,"Country":"","CostCenter":"","Currency":"SEK","CurrencyRate":1,"CurrencyUnit":1,"CustomerName":"Old
56
+ name","CustomerNumber":"1","DeliveryState":"delivery","DeliveryAddress1":"","DeliveryAddress2":"","DeliveryCity":"","DeliveryCountry":"","DeliveryDate":null,"DeliveryName":"","DeliveryZipCode":"","DocumentNumber":"398","EmailInformation":{"EmailAddressFrom":null,"EmailAddressTo":"","EmailAddressCC":null,"EmailAddressBCC":null,"EmailSubject":"Order
57
+ {no} bifogas","EmailBody":" "},"ExternalInvoiceReference1":"","ExternalInvoiceReference2":"","Freight":0,"FreightVAT":0,"Gross":0,"HouseWork":false,"InvoiceReference":0,"Labels":[],"Language":"SV","Net":0,"NotCompleted":false,"OfferReference":0,"OrderDate":"2020-12-22","OrderRows":[{"AccountNumber":1250,"ArticleNumber":"0000","ContributionPercent":0,"ContributionValue":0,"CostCenter":"","DeliveredQuantity":"0.00","Description":"Testartikel","Discount":0,"DiscountType":"PERCENT","HouseWork":true,"HouseWorkHoursToReport":null,"HouseWorkType":"ELECTRICITY","OrderedQuantity":"1.00","Price":0,"Project":"","ReservedQuantity":"0.00","StockPointCode":null,"StockPointId":null,"Total":0,"Unit":"","VAT":0}],"OrderType":"Order","OrganisationNumber":"860101-8735","OurReference":"","Phone1":"","Phone2":"","PriceList":"A","PrintTemplate":"oc","Project":"","WarehouseReady":true,"OutboundDate":"2020-12-22","Remarks":"","RoundOff":0,"Sent":false,"TaxReduction":null,"TermsOfDelivery":"","TermsOfPayment":0,"TimeBasisReference":null,"Total":0,"TotalToPay":0,"TotalVAT":0,"VATIncluded":false,"WayOfDelivery":"","YourReference":"","YourOrderNumber":"","ZipCode":"","StockPointCode":null,"StockPointId":null,"TaxReductionType":"rot"}}'
44
58
  http_version:
45
- recorded_at: Thu, 01 Mar 2018 13:58:19 GMT
46
- recorded_with: VCR 3.0.3
59
+ recorded_at: Tue, 22 Dec 2020 09:01:55 GMT
60
+ recorded_with: VCR 4.0.0
@@ -5,7 +5,7 @@ http_interactions:
5
5
  uri: https://api.fortnox.se/3/orders/
6
6
  body:
7
7
  encoding: UTF-8
8
- string: '{"Order":{"CustomerNumber":"1","OrderRows":[{"ArticleNumber":"0000","HouseWorkType":"GARDENING","OrderedQuantity":1.0}]}}'
8
+ string: '{"Order":{"CustomerNumber":"1","TaxReductionType":"rut","OrderRows":[{"ArticleNumber":"0000","HouseWork":true,"HouseWorkType":"GARDENING","OrderedQuantity":1.0}]}}'
9
9
  headers:
10
10
  Content-Type:
11
11
  - application/json
@@ -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
- - Thu, 01 Mar 2018 13:58:16 GMT
30
+ - Tue, 22 Dec 2020 09:01:58 GMT
27
31
  Content-Type:
28
32
  - application/json
29
33
  Connection:
@@ -31,16 +35,26 @@ http_interactions:
31
35
  Location:
32
36
  - orders
33
37
  X-Rack-Responsetime:
34
- - '87'
38
+ - '141'
35
39
  X-Uid:
36
- - 15ad8981
40
+ - f5973b3c
37
41
  X-Build:
38
- - bec4a33b2e
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: '{"Order":{"@url":"https:\/\/api.fortnox.se\/3\/orders\/290","@urlTaxReductionList":"https:\/\/api.fortnox.se\/3\/taxreductions?filter=orders&referencenumber=290","AdministrationFee":0,"AdministrationFeeVAT":0,"Address1":"","Address2":"","BasisTaxReduction":0,"Cancelled":false,"City":"","Comments":"","ContributionPercent":0,"ContributionValue":0,"CopyRemarks":false,"Country":"","CostCenter":"","Currency":"SEK","CurrencyRate":1,"CurrencyUnit":1,"CustomerName":"Old
42
- name","CustomerNumber":"1","DeliveryState":"delivery","DeliveryAddress1":"","DeliveryAddress2":"","DeliveryCity":"","DeliveryCountry":"","DeliveryDate":null,"DeliveryName":"","DeliveryZipCode":"","DocumentNumber":"290","EmailInformation":{"EmailAddressFrom":null,"EmailAddressTo":"","EmailAddressCC":null,"EmailAddressBCC":null,"EmailSubject":"Order
43
- {no} bifogas","EmailBody":" "},"ExternalInvoiceReference1":"","ExternalInvoiceReference2":"","Freight":0,"FreightVAT":0,"Gross":0,"HouseWork":false,"InvoiceReference":0,"Labels":[],"Language":"SV","Net":0,"NotCompleted":false,"OfferReference":0,"OrderDate":"2018-03-01","OrderRows":[{"AccountNumber":1250,"ArticleNumber":"0000","ContributionPercent":0,"ContributionValue":0,"CostCenter":"","DeliveredQuantity":"0.00","Description":"Testartikel","Discount":0,"DiscountType":"PERCENT","HouseWork":false,"HouseWorkHoursToReport":null,"HouseWorkType":"GARDENING","OrderedQuantity":"1.00","Price":0,"Project":"","ReservedQuantity":0,"StockPointCode":null,"Total":0,"Unit":"","VAT":0}],"OrganisationNumber":"860101-8735","OurReference":"","Phone1":"","Phone2":"","PriceList":"A","PrintTemplate":"oc","Project":"","WarehouseReady":true,"OutboundDate":"2018-03-01","Remarks":"","RoundOff":0,"Sent":false,"TaxReduction":null,"TermsOfDelivery":"","TermsOfPayment":0,"Total":0,"TotalToPay":0,"TotalVAT":0,"VATIncluded":false,"WayOfDelivery":"","YourReference":"","YourOrderNumber":"","ZipCode":""}}'
55
+ string: '{"Order":{"@url":"https:\/\/api.fortnox.se\/3\/orders\/408","@urlTaxReductionList":"https:\/\/api.fortnox.se\/3\/taxreductions?filter=orders&referencenumber=408","AdministrationFee":0,"AdministrationFeeVAT":0,"Address1":"","Address2":"","BasisTaxReduction":0,"Cancelled":false,"City":"","Comments":"","ContributionPercent":0,"ContributionValue":0,"CopyRemarks":false,"Country":"","CostCenter":"","Currency":"SEK","CurrencyRate":1,"CurrencyUnit":1,"CustomerName":"Old
56
+ name","CustomerNumber":"1","DeliveryState":"delivery","DeliveryAddress1":"","DeliveryAddress2":"","DeliveryCity":"","DeliveryCountry":"","DeliveryDate":null,"DeliveryName":"","DeliveryZipCode":"","DocumentNumber":"408","EmailInformation":{"EmailAddressFrom":null,"EmailAddressTo":"","EmailAddressCC":null,"EmailAddressBCC":null,"EmailSubject":"Order
57
+ {no} bifogas","EmailBody":" "},"ExternalInvoiceReference1":"","ExternalInvoiceReference2":"","Freight":0,"FreightVAT":0,"Gross":0,"HouseWork":false,"InvoiceReference":0,"Labels":[],"Language":"SV","Net":0,"NotCompleted":false,"OfferReference":0,"OrderDate":"2020-12-22","OrderRows":[{"AccountNumber":1250,"ArticleNumber":"0000","ContributionPercent":0,"ContributionValue":0,"CostCenter":"","DeliveredQuantity":"0.00","Description":"Testartikel","Discount":0,"DiscountType":"PERCENT","HouseWork":true,"HouseWorkHoursToReport":null,"HouseWorkType":"GARDENING","OrderedQuantity":"1.00","Price":0,"Project":"","ReservedQuantity":"0.00","StockPointCode":null,"StockPointId":null,"Total":0,"Unit":"","VAT":0}],"OrderType":"Order","OrganisationNumber":"860101-8735","OurReference":"","Phone1":"","Phone2":"","PriceList":"A","PrintTemplate":"oc","Project":"","WarehouseReady":true,"OutboundDate":"2020-12-22","Remarks":"","RoundOff":0,"Sent":false,"TaxReduction":null,"TermsOfDelivery":"","TermsOfPayment":0,"TimeBasisReference":null,"Total":0,"TotalToPay":0,"TotalVAT":0,"VATIncluded":false,"WayOfDelivery":"","YourReference":"","YourOrderNumber":"","ZipCode":"","StockPointCode":null,"StockPointId":null,"TaxReductionType":"rut"}}'
44
58
  http_version:
45
- recorded_at: Thu, 01 Mar 2018 13:58:16 GMT
46
- recorded_with: VCR 3.0.3
59
+ recorded_at: Tue, 22 Dec 2020 09:01:58 GMT
60
+ recorded_with: VCR 4.0.0
@@ -5,7 +5,7 @@ http_interactions:
5
5
  uri: https://api.fortnox.se/3/orders/
6
6
  body:
7
7
  encoding: UTF-8
8
- string: '{"Order":{"CustomerNumber":"1","OrderRows":[{"ArticleNumber":"0000","HouseWorkType":"GLASSMETALWORK","OrderedQuantity":1.0}]}}'
8
+ string: '{"Order":{"CustomerNumber":"1","TaxReductionType":"rot","OrderRows":[{"ArticleNumber":"0000","HouseWork":true,"HouseWorkType":"GLASSMETALWORK","OrderedQuantity":1.0}]}}'
9
9
  headers:
10
10
  Content-Type:
11
11
  - application/json
@@ -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
- - Thu, 01 Mar 2018 13:58:15 GMT
30
+ - Tue, 22 Dec 2020 09:01:58 GMT
27
31
  Content-Type:
28
32
  - application/json
29
33
  Connection:
@@ -31,16 +35,26 @@ http_interactions:
31
35
  Location:
32
36
  - orders
33
37
  X-Rack-Responsetime:
34
- - '79'
38
+ - '153'
35
39
  X-Uid:
36
- - 379ce644
40
+ - a3f70b8c
37
41
  X-Build:
38
- - bec4a33b2e
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: '{"Order":{"@url":"https:\/\/api.fortnox.se\/3\/orders\/287","@urlTaxReductionList":"https:\/\/api.fortnox.se\/3\/taxreductions?filter=orders&referencenumber=287","AdministrationFee":0,"AdministrationFeeVAT":0,"Address1":"","Address2":"","BasisTaxReduction":0,"Cancelled":false,"City":"","Comments":"","ContributionPercent":0,"ContributionValue":0,"CopyRemarks":false,"Country":"","CostCenter":"","Currency":"SEK","CurrencyRate":1,"CurrencyUnit":1,"CustomerName":"Old
42
- name","CustomerNumber":"1","DeliveryState":"delivery","DeliveryAddress1":"","DeliveryAddress2":"","DeliveryCity":"","DeliveryCountry":"","DeliveryDate":null,"DeliveryName":"","DeliveryZipCode":"","DocumentNumber":"287","EmailInformation":{"EmailAddressFrom":null,"EmailAddressTo":"","EmailAddressCC":null,"EmailAddressBCC":null,"EmailSubject":"Order
43
- {no} bifogas","EmailBody":" "},"ExternalInvoiceReference1":"","ExternalInvoiceReference2":"","Freight":0,"FreightVAT":0,"Gross":0,"HouseWork":false,"InvoiceReference":0,"Labels":[],"Language":"SV","Net":0,"NotCompleted":false,"OfferReference":0,"OrderDate":"2018-03-01","OrderRows":[{"AccountNumber":1250,"ArticleNumber":"0000","ContributionPercent":0,"ContributionValue":0,"CostCenter":"","DeliveredQuantity":"0.00","Description":"Testartikel","Discount":0,"DiscountType":"PERCENT","HouseWork":false,"HouseWorkHoursToReport":null,"HouseWorkType":"GLASSMETALWORK","OrderedQuantity":"1.00","Price":0,"Project":"","ReservedQuantity":0,"StockPointCode":null,"Total":0,"Unit":"","VAT":0}],"OrganisationNumber":"860101-8735","OurReference":"","Phone1":"","Phone2":"","PriceList":"A","PrintTemplate":"oc","Project":"","WarehouseReady":true,"OutboundDate":"2018-03-01","Remarks":"","RoundOff":0,"Sent":false,"TaxReduction":null,"TermsOfDelivery":"","TermsOfPayment":0,"Total":0,"TotalToPay":0,"TotalVAT":0,"VATIncluded":false,"WayOfDelivery":"","YourReference":"","YourOrderNumber":"","ZipCode":""}}'
55
+ string: '{"Order":{"@url":"https:\/\/api.fortnox.se\/3\/orders\/409","@urlTaxReductionList":"https:\/\/api.fortnox.se\/3\/taxreductions?filter=orders&referencenumber=409","AdministrationFee":0,"AdministrationFeeVAT":0,"Address1":"","Address2":"","BasisTaxReduction":0,"Cancelled":false,"City":"","Comments":"","ContributionPercent":0,"ContributionValue":0,"CopyRemarks":false,"Country":"","CostCenter":"","Currency":"SEK","CurrencyRate":1,"CurrencyUnit":1,"CustomerName":"Old
56
+ name","CustomerNumber":"1","DeliveryState":"delivery","DeliveryAddress1":"","DeliveryAddress2":"","DeliveryCity":"","DeliveryCountry":"","DeliveryDate":null,"DeliveryName":"","DeliveryZipCode":"","DocumentNumber":"409","EmailInformation":{"EmailAddressFrom":null,"EmailAddressTo":"","EmailAddressCC":null,"EmailAddressBCC":null,"EmailSubject":"Order
57
+ {no} bifogas","EmailBody":" "},"ExternalInvoiceReference1":"","ExternalInvoiceReference2":"","Freight":0,"FreightVAT":0,"Gross":0,"HouseWork":false,"InvoiceReference":0,"Labels":[],"Language":"SV","Net":0,"NotCompleted":false,"OfferReference":0,"OrderDate":"2020-12-22","OrderRows":[{"AccountNumber":1250,"ArticleNumber":"0000","ContributionPercent":0,"ContributionValue":0,"CostCenter":"","DeliveredQuantity":"0.00","Description":"Testartikel","Discount":0,"DiscountType":"PERCENT","HouseWork":true,"HouseWorkHoursToReport":null,"HouseWorkType":"GLASSMETALWORK","OrderedQuantity":"1.00","Price":0,"Project":"","ReservedQuantity":"0.00","StockPointCode":null,"StockPointId":null,"Total":0,"Unit":"","VAT":0}],"OrderType":"Order","OrganisationNumber":"860101-8735","OurReference":"","Phone1":"","Phone2":"","PriceList":"A","PrintTemplate":"oc","Project":"","WarehouseReady":true,"OutboundDate":"2020-12-22","Remarks":"","RoundOff":0,"Sent":false,"TaxReduction":null,"TermsOfDelivery":"","TermsOfPayment":0,"TimeBasisReference":null,"Total":0,"TotalToPay":0,"TotalVAT":0,"VATIncluded":false,"WayOfDelivery":"","YourReference":"","YourOrderNumber":"","ZipCode":"","StockPointCode":null,"StockPointId":null,"TaxReductionType":"rot"}}'
44
58
  http_version:
45
- recorded_at: Thu, 01 Mar 2018 13:58:15 GMT
46
- recorded_with: VCR 3.0.3
59
+ recorded_at: Tue, 22 Dec 2020 09:01:58 GMT
60
+ recorded_with: VCR 4.0.0
@@ -5,7 +5,7 @@ http_interactions:
5
5
  uri: https://api.fortnox.se/3/orders/
6
6
  body:
7
7
  encoding: UTF-8
8
- string: '{"Order":{"CustomerNumber":"1","OrderRows":[{"ArticleNumber":"0000","HouseWorkType":"GROUNDDRAINAGEWORK","OrderedQuantity":1.0}]}}'
8
+ string: '{"Order":{"CustomerNumber":"1","TaxReductionType":"rot","OrderRows":[{"ArticleNumber":"0000","HouseWork":true,"HouseWorkType":"GROUNDDRAINAGEWORK","OrderedQuantity":1.0}]}}'
9
9
  headers:
10
10
  Content-Type:
11
11
  - application/json
@@ -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
- - Thu, 01 Mar 2018 13:58:15 GMT
30
+ - Tue, 22 Dec 2020 09:01:55 GMT
27
31
  Content-Type:
28
32
  - application/json
29
33
  Connection:
@@ -31,16 +35,26 @@ http_interactions:
31
35
  Location:
32
36
  - orders
33
37
  X-Rack-Responsetime:
34
- - '78'
38
+ - '157'
35
39
  X-Uid:
36
- - 98e26ba9
40
+ - 55510ad9
37
41
  X-Build:
38
- - bec4a33b2e
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: '{"Order":{"@url":"https:\/\/api.fortnox.se\/3\/orders\/288","@urlTaxReductionList":"https:\/\/api.fortnox.se\/3\/taxreductions?filter=orders&referencenumber=288","AdministrationFee":0,"AdministrationFeeVAT":0,"Address1":"","Address2":"","BasisTaxReduction":0,"Cancelled":false,"City":"","Comments":"","ContributionPercent":0,"ContributionValue":0,"CopyRemarks":false,"Country":"","CostCenter":"","Currency":"SEK","CurrencyRate":1,"CurrencyUnit":1,"CustomerName":"Old
42
- name","CustomerNumber":"1","DeliveryState":"delivery","DeliveryAddress1":"","DeliveryAddress2":"","DeliveryCity":"","DeliveryCountry":"","DeliveryDate":null,"DeliveryName":"","DeliveryZipCode":"","DocumentNumber":"288","EmailInformation":{"EmailAddressFrom":null,"EmailAddressTo":"","EmailAddressCC":null,"EmailAddressBCC":null,"EmailSubject":"Order
43
- {no} bifogas","EmailBody":" "},"ExternalInvoiceReference1":"","ExternalInvoiceReference2":"","Freight":0,"FreightVAT":0,"Gross":0,"HouseWork":false,"InvoiceReference":0,"Labels":[],"Language":"SV","Net":0,"NotCompleted":false,"OfferReference":0,"OrderDate":"2018-03-01","OrderRows":[{"AccountNumber":1250,"ArticleNumber":"0000","ContributionPercent":0,"ContributionValue":0,"CostCenter":"","DeliveredQuantity":"0.00","Description":"Testartikel","Discount":0,"DiscountType":"PERCENT","HouseWork":false,"HouseWorkHoursToReport":null,"HouseWorkType":"GROUNDDRAINAGEWORK","OrderedQuantity":"1.00","Price":0,"Project":"","ReservedQuantity":0,"StockPointCode":null,"Total":0,"Unit":"","VAT":0}],"OrganisationNumber":"860101-8735","OurReference":"","Phone1":"","Phone2":"","PriceList":"A","PrintTemplate":"oc","Project":"","WarehouseReady":true,"OutboundDate":"2018-03-01","Remarks":"","RoundOff":0,"Sent":false,"TaxReduction":null,"TermsOfDelivery":"","TermsOfPayment":0,"Total":0,"TotalToPay":0,"TotalVAT":0,"VATIncluded":false,"WayOfDelivery":"","YourReference":"","YourOrderNumber":"","ZipCode":""}}'
55
+ string: '{"Order":{"@url":"https:\/\/api.fortnox.se\/3\/orders\/399","@urlTaxReductionList":"https:\/\/api.fortnox.se\/3\/taxreductions?filter=orders&referencenumber=399","AdministrationFee":0,"AdministrationFeeVAT":0,"Address1":"","Address2":"","BasisTaxReduction":0,"Cancelled":false,"City":"","Comments":"","ContributionPercent":0,"ContributionValue":0,"CopyRemarks":false,"Country":"","CostCenter":"","Currency":"SEK","CurrencyRate":1,"CurrencyUnit":1,"CustomerName":"Old
56
+ name","CustomerNumber":"1","DeliveryState":"delivery","DeliveryAddress1":"","DeliveryAddress2":"","DeliveryCity":"","DeliveryCountry":"","DeliveryDate":null,"DeliveryName":"","DeliveryZipCode":"","DocumentNumber":"399","EmailInformation":{"EmailAddressFrom":null,"EmailAddressTo":"","EmailAddressCC":null,"EmailAddressBCC":null,"EmailSubject":"Order
57
+ {no} bifogas","EmailBody":" "},"ExternalInvoiceReference1":"","ExternalInvoiceReference2":"","Freight":0,"FreightVAT":0,"Gross":0,"HouseWork":false,"InvoiceReference":0,"Labels":[],"Language":"SV","Net":0,"NotCompleted":false,"OfferReference":0,"OrderDate":"2020-12-22","OrderRows":[{"AccountNumber":1250,"ArticleNumber":"0000","ContributionPercent":0,"ContributionValue":0,"CostCenter":"","DeliveredQuantity":"0.00","Description":"Testartikel","Discount":0,"DiscountType":"PERCENT","HouseWork":true,"HouseWorkHoursToReport":null,"HouseWorkType":"GROUNDDRAINAGEWORK","OrderedQuantity":"1.00","Price":0,"Project":"","ReservedQuantity":"0.00","StockPointCode":null,"StockPointId":null,"Total":0,"Unit":"","VAT":0}],"OrderType":"Order","OrganisationNumber":"860101-8735","OurReference":"","Phone1":"","Phone2":"","PriceList":"A","PrintTemplate":"oc","Project":"","WarehouseReady":true,"OutboundDate":"2020-12-22","Remarks":"","RoundOff":0,"Sent":false,"TaxReduction":null,"TermsOfDelivery":"","TermsOfPayment":0,"TimeBasisReference":null,"Total":0,"TotalToPay":0,"TotalVAT":0,"VATIncluded":false,"WayOfDelivery":"","YourReference":"","YourOrderNumber":"","ZipCode":"","StockPointCode":null,"StockPointId":null,"TaxReductionType":"rot"}}'
44
58
  http_version:
45
- recorded_at: Thu, 01 Mar 2018 13:58:15 GMT
46
- recorded_with: VCR 3.0.3
59
+ recorded_at: Tue, 22 Dec 2020 09:01:55 GMT
60
+ recorded_with: VCR 4.0.0