fortnox-api 0.7.2 → 0.9.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (255) hide show
  1. checksums.yaml +4 -4
  2. data/.codeclimate.yml +1 -0
  3. data/.env.template +7 -0
  4. data/.env.test +11 -3
  5. data/.gitignore +7 -1
  6. data/.rubocop.yml +18 -2
  7. data/.tool-versions +1 -0
  8. data/.travis.yml +15 -19
  9. data/CHANGELOG.md +66 -1
  10. data/CONTRIBUTE.md +21 -9
  11. data/DEVELOPER_README.md +72 -0
  12. data/Guardfile +13 -4
  13. data/README.md +226 -61
  14. data/Rakefile +133 -0
  15. data/bin/get_tokens +79 -0
  16. data/bin/renew_tokens +28 -0
  17. data/fortnox-api.gemspec +31 -25
  18. data/lib/fortnox/api/mappers/article.rb +1 -1
  19. data/lib/fortnox/api/mappers/base/from_json.rb +7 -6
  20. data/lib/fortnox/api/mappers/base/to_json.rb +4 -5
  21. data/lib/fortnox/api/mappers/base.rb +3 -3
  22. data/lib/fortnox/api/mappers/customer.rb +1 -1
  23. data/lib/fortnox/api/mappers/default_delivery_types.rb +1 -1
  24. data/lib/fortnox/api/mappers/default_templates.rb +1 -1
  25. data/lib/fortnox/api/mappers/edi_information.rb +1 -1
  26. data/lib/fortnox/api/mappers/email_information.rb +1 -1
  27. data/lib/fortnox/api/mappers/invoice.rb +4 -4
  28. data/lib/fortnox/api/mappers/invoice_row.rb +1 -1
  29. data/lib/fortnox/api/mappers/order.rb +4 -4
  30. data/lib/fortnox/api/mappers/order_row.rb +1 -1
  31. data/lib/fortnox/api/mappers/project.rb +1 -1
  32. data/lib/fortnox/api/mappers/terms_of_payment.rb +1 -1
  33. data/lib/fortnox/api/mappers/unit.rb +1 -1
  34. data/lib/fortnox/api/mappers/value/country_string.rb +1 -1
  35. data/lib/fortnox/api/mappers.rb +18 -18
  36. data/lib/fortnox/api/models/article.rb +2 -2
  37. data/lib/fortnox/api/models/base.rb +23 -21
  38. data/lib/fortnox/api/models/customer.rb +57 -57
  39. data/lib/fortnox/api/models/document.rb +5 -2
  40. data/lib/fortnox/api/models/invoice.rb +2 -2
  41. data/lib/fortnox/api/models/label.rb +3 -3
  42. data/lib/fortnox/api/models/order.rb +2 -2
  43. data/lib/fortnox/api/models/project.rb +2 -2
  44. data/lib/fortnox/api/models/terms_of_payment.rb +2 -2
  45. data/lib/fortnox/api/models/unit.rb +2 -2
  46. data/lib/fortnox/api/models.rb +7 -7
  47. data/lib/fortnox/api/repositories/article.rb +3 -3
  48. data/lib/fortnox/api/repositories/authentication.rb +61 -0
  49. data/lib/fortnox/api/repositories/base/savers.rb +3 -1
  50. data/lib/fortnox/api/repositories/base.rb +25 -38
  51. data/lib/fortnox/api/repositories/customer.rb +3 -3
  52. data/lib/fortnox/api/repositories/invoice.rb +3 -3
  53. data/lib/fortnox/api/repositories/order.rb +3 -3
  54. data/lib/fortnox/api/repositories/project.rb +3 -3
  55. data/lib/fortnox/api/repositories/terms_of_payment.rb +3 -3
  56. data/lib/fortnox/api/repositories/unit.rb +3 -3
  57. data/lib/fortnox/api/repositories.rb +8 -7
  58. data/lib/fortnox/api/request_handling.rb +30 -18
  59. data/lib/fortnox/api/types/default_delivery_types.rb +0 -2
  60. data/lib/fortnox/api/types/default_templates.rb +0 -2
  61. data/lib/fortnox/api/types/document_row.rb +3 -3
  62. data/lib/fortnox/api/types/edi_information.rb +0 -2
  63. data/lib/fortnox/api/types/email_information.rb +0 -2
  64. data/lib/fortnox/api/types/enums.rb +54 -10
  65. data/lib/fortnox/api/types/invoice_row.rb +1 -1
  66. data/lib/fortnox/api/types/model.rb +5 -9
  67. data/lib/fortnox/api/types/nullable.rb +13 -9
  68. data/lib/fortnox/api/types/order_row.rb +1 -1
  69. data/lib/fortnox/api/types/required.rb +3 -3
  70. data/lib/fortnox/api/types/sized.rb +4 -4
  71. data/lib/fortnox/api/types.rb +37 -24
  72. data/lib/fortnox/api/version.rb +1 -1
  73. data/lib/fortnox/api.rb +21 -39
  74. data/spec/fortnox/api/mappers/base/canonical_name_sym_spec.rb +13 -11
  75. data/spec/fortnox/api/mappers/base/from_json_spec.rb +10 -12
  76. data/spec/fortnox/api/mappers/base/to_json_spec.rb +48 -57
  77. data/spec/fortnox/api/mappers/base_spec.rb +4 -7
  78. data/spec/fortnox/api/mappers/contexts/json_conversion.rb +38 -33
  79. data/spec/fortnox/api/mappers/default_delivery_types_spec.rb +1 -1
  80. data/spec/fortnox/api/mappers/examples/mapper.rb +1 -1
  81. data/spec/fortnox/api/mappers/unit_spec.rb +3 -4
  82. data/spec/fortnox/api/models/base_spec.rb +33 -22
  83. data/spec/fortnox/api/models/unit_spec.rb +5 -3
  84. data/spec/fortnox/api/repositories/article_spec.rb +14 -9
  85. data/spec/fortnox/api/repositories/authentication_spec.rb +103 -0
  86. data/spec/fortnox/api/repositories/base_spec.rb +105 -326
  87. data/spec/fortnox/api/repositories/customer_spec.rb +37 -7
  88. data/spec/fortnox/api/repositories/examples/all.rb +0 -1
  89. data/spec/fortnox/api/repositories/examples/find.rb +5 -8
  90. data/spec/fortnox/api/repositories/examples/only.rb +4 -13
  91. data/spec/fortnox/api/repositories/examples/save.rb +32 -18
  92. data/spec/fortnox/api/repositories/examples/save_with_nested_model.rb +0 -5
  93. data/spec/fortnox/api/repositories/examples/save_with_specially_named_attribute.rb +1 -4
  94. data/spec/fortnox/api/repositories/examples/search.rb +4 -7
  95. data/spec/fortnox/api/repositories/invoice_spec.rb +72 -29
  96. data/spec/fortnox/api/repositories/order_spec.rb +11 -9
  97. data/spec/fortnox/api/repositories/project_spec.rb +7 -6
  98. data/spec/fortnox/api/repositories/terms_of_payment_spec.rb +9 -7
  99. data/spec/fortnox/api/repositories/unit_spec.rb +13 -11
  100. data/spec/fortnox/api/types/country_spec.rb +1 -1
  101. data/spec/fortnox/api/types/email_spec.rb +2 -2
  102. data/spec/fortnox/api/types/enums_spec.rb +1 -0
  103. data/spec/fortnox/api/types/examples/document_row.rb +3 -3
  104. data/spec/fortnox/api/types/examples/enum.rb +4 -4
  105. data/spec/fortnox/api/types/examples/types.rb +1 -3
  106. data/spec/fortnox/api/types/housework_types_spec.rb +124 -43
  107. data/spec/fortnox/api/types/model_spec.rb +13 -23
  108. data/spec/fortnox/api/types/nullable_spec.rb +30 -10
  109. data/spec/fortnox/api/types/order_row_spec.rb +2 -2
  110. data/spec/fortnox/api/types/required_spec.rb +7 -15
  111. data/spec/fortnox/api/types/sales_account_spec.rb +57 -0
  112. data/spec/fortnox/api_spec.rb +19 -124
  113. data/spec/spec_helper.rb +0 -14
  114. data/spec/support/helpers/configuration_helper.rb +30 -3
  115. data/spec/support/helpers.rb +1 -1
  116. data/spec/support/matchers/type/attribute_matcher.rb +2 -2
  117. data/spec/support/matchers/type/enum_matcher.rb +1 -1
  118. data/spec/support/matchers/type/have_account_number_matcher.rb +1 -1
  119. data/spec/support/matchers/type/have_email_matcher.rb +1 -1
  120. data/spec/support/matchers/type/have_nullable_date_matcher.rb +7 -5
  121. data/spec/support/matchers/type/have_nullable_matcher.rb +1 -1
  122. data/spec/support/matchers/type/have_nullable_string_matcher.rb +5 -5
  123. data/spec/support/matchers/type/require_attribute_matcher.rb +5 -5
  124. data/spec/support/matchers/type/type_matcher.rb +1 -1
  125. data/spec/support/vcr_setup.rb +16 -0
  126. data/spec/vcr_cassettes/articles/all.yml +41 -42
  127. data/spec/vcr_cassettes/articles/find_by_hash_failure.yml +36 -19
  128. data/spec/vcr_cassettes/articles/find_failure.yml +36 -19
  129. data/spec/vcr_cassettes/articles/find_id_1.yml +38 -20
  130. data/spec/vcr_cassettes/articles/find_new.yml +39 -22
  131. data/spec/vcr_cassettes/articles/multi_param_find_by_hash.yml +38 -21
  132. data/spec/vcr_cassettes/articles/save_new.yml +37 -19
  133. data/spec/vcr_cassettes/articles/save_old.yml +39 -22
  134. data/spec/vcr_cassettes/articles/save_with_specially_named_attribute.yml +37 -19
  135. data/spec/vcr_cassettes/articles/search_by_name.yml +41 -21
  136. data/spec/vcr_cassettes/articles/search_miss.yml +36 -19
  137. data/spec/vcr_cassettes/articles/search_with_special_char.yml +36 -19
  138. data/spec/vcr_cassettes/articles/single_param_find_by_hash.yml +38 -32
  139. data/spec/vcr_cassettes/authentication/expired_token.yml +54 -0
  140. data/spec/vcr_cassettes/authentication/invalid_authorization.yml +57 -0
  141. data/spec/vcr_cassettes/authentication/invalid_refresh_token.yml +58 -0
  142. data/spec/vcr_cassettes/authentication/valid_request.yml +63 -0
  143. data/spec/vcr_cassettes/customers/all.yml +44 -132
  144. data/spec/vcr_cassettes/customers/find_by_hash_failure.yml +36 -19
  145. data/spec/vcr_cassettes/customers/find_failure.yml +36 -19
  146. data/spec/vcr_cassettes/customers/find_id_1.yml +39 -21
  147. data/spec/vcr_cassettes/customers/find_new.yml +38 -21
  148. data/spec/vcr_cassettes/customers/find_with_sales_account.yml +63 -0
  149. data/spec/vcr_cassettes/customers/multi_param_find_by_hash.yml +38 -21
  150. data/spec/vcr_cassettes/customers/save_new.yml +36 -18
  151. data/spec/vcr_cassettes/customers/save_new_with_country_code_SE.yml +32 -24
  152. data/spec/vcr_cassettes/customers/save_new_with_sales_account.yml +63 -0
  153. data/spec/vcr_cassettes/customers/save_old.yml +38 -21
  154. data/spec/vcr_cassettes/customers/save_with_specially_named_attribute.yml +36 -18
  155. data/spec/vcr_cassettes/customers/search_by_name.yml +38 -48
  156. data/spec/vcr_cassettes/customers/search_miss.yml +36 -19
  157. data/spec/vcr_cassettes/customers/search_with_special_char.yml +36 -19
  158. data/spec/vcr_cassettes/customers/single_param_find_by_hash.yml +39 -22
  159. data/spec/vcr_cassettes/invoices/all.yml +71 -114
  160. data/spec/vcr_cassettes/invoices/filter_hit.yml +39 -24
  161. data/spec/vcr_cassettes/invoices/filter_invalid.yml +35 -17
  162. data/spec/vcr_cassettes/invoices/find_by_hash_failure.yml +36 -19
  163. data/spec/vcr_cassettes/invoices/find_failure.yml +36 -19
  164. data/spec/vcr_cassettes/invoices/find_id_1.yml +40 -22
  165. data/spec/vcr_cassettes/invoices/find_new.yml +41 -24
  166. data/spec/vcr_cassettes/invoices/multi_param_find_by_hash.yml +38 -21
  167. data/spec/vcr_cassettes/invoices/row_description_limit.yml +65 -0
  168. data/spec/vcr_cassettes/invoices/save_new.yml +39 -21
  169. data/spec/vcr_cassettes/invoices/save_new_with_comments.yml +39 -21
  170. data/spec/vcr_cassettes/invoices/save_new_with_country.yml +35 -26
  171. data/spec/vcr_cassettes/invoices/save_new_with_country_GB.yml +36 -27
  172. data/spec/vcr_cassettes/invoices/save_new_with_country_Norge.yml +35 -26
  173. data/spec/vcr_cassettes/invoices/save_new_with_country_Norway.yml +35 -26
  174. data/spec/vcr_cassettes/invoices/save_new_with_country_Sverige.yml +35 -26
  175. data/spec/vcr_cassettes/invoices/save_new_with_country_VA.yml +36 -27
  176. data/spec/vcr_cassettes/invoices/save_new_with_country_VI.yml +36 -27
  177. data/spec/vcr_cassettes/invoices/save_new_with_country_empty_string.yml +35 -26
  178. data/spec/vcr_cassettes/invoices/save_new_with_country_nil.yml +35 -26
  179. data/spec/vcr_cassettes/invoices/save_new_with_unsaved_parent.yml +65 -0
  180. data/spec/vcr_cassettes/invoices/save_old.yml +41 -24
  181. data/spec/vcr_cassettes/invoices/save_old_with_empty_comments.yml +41 -24
  182. data/spec/vcr_cassettes/invoices/save_old_with_empty_country.yml +37 -29
  183. data/spec/vcr_cassettes/invoices/save_old_with_nil_comments.yml +41 -24
  184. data/spec/vcr_cassettes/invoices/save_old_with_nil_country.yml +37 -29
  185. data/spec/vcr_cassettes/invoices/save_with_nested_model.yml +40 -21
  186. data/spec/vcr_cassettes/invoices/save_with_specially_named_attribute.yml +39 -20
  187. data/spec/vcr_cassettes/invoices/search_by_name.yml +38 -27
  188. data/spec/vcr_cassettes/invoices/search_miss.yml +36 -19
  189. data/spec/vcr_cassettes/invoices/search_with_special_char.yml +36 -19
  190. data/spec/vcr_cassettes/invoices/single_param_find_by_hash.yml +39 -22
  191. data/spec/vcr_cassettes/orders/all.yml +44 -119
  192. data/spec/vcr_cassettes/orders/filter_hit.yml +39 -26
  193. data/spec/vcr_cassettes/orders/filter_invalid.yml +35 -17
  194. data/spec/vcr_cassettes/orders/find_by_hash_failure.yml +36 -19
  195. data/spec/vcr_cassettes/orders/find_failure.yml +36 -19
  196. data/spec/vcr_cassettes/orders/find_id_1.yml +42 -23
  197. data/spec/vcr_cassettes/orders/find_new.yml +41 -24
  198. data/spec/vcr_cassettes/orders/housework_invalid_tax_reduction_type.yml +61 -0
  199. data/spec/vcr_cassettes/orders/housework_othercoses_invalid.yml +61 -0
  200. data/spec/vcr_cassettes/orders/housework_type_babysitting.yml +40 -21
  201. data/spec/vcr_cassettes/orders/housework_type_cleaning.yml +40 -21
  202. data/spec/vcr_cassettes/orders/housework_type_construction.yml +40 -21
  203. data/spec/vcr_cassettes/orders/housework_type_cooking.yml +36 -18
  204. data/spec/vcr_cassettes/orders/housework_type_electricity.yml +40 -21
  205. data/spec/vcr_cassettes/orders/housework_type_gardening.yml +40 -21
  206. data/spec/vcr_cassettes/orders/housework_type_glassmetalwork.yml +40 -21
  207. data/spec/vcr_cassettes/orders/housework_type_grounddrainagework.yml +40 -21
  208. data/spec/vcr_cassettes/orders/housework_type_hvac.yml +40 -21
  209. data/spec/vcr_cassettes/orders/housework_type_itservices.yml +65 -0
  210. data/spec/vcr_cassettes/orders/housework_type_majorappliancerepair.yml +65 -0
  211. data/spec/vcr_cassettes/orders/housework_type_masonry.yml +40 -21
  212. data/spec/vcr_cassettes/orders/housework_type_movingservices.yml +65 -0
  213. data/spec/vcr_cassettes/orders/housework_type_othercare.yml +40 -21
  214. data/spec/vcr_cassettes/orders/housework_type_othercosts.yml +40 -21
  215. data/spec/vcr_cassettes/orders/housework_type_paintingwallpapering.yml +40 -21
  216. data/spec/vcr_cassettes/orders/housework_type_snowplowing.yml +40 -21
  217. data/spec/vcr_cassettes/orders/housework_type_textileclothing.yml +40 -21
  218. data/spec/vcr_cassettes/orders/housework_type_tutoring.yml +36 -18
  219. data/spec/vcr_cassettes/orders/multi_param_find_by_hash.yml +38 -21
  220. data/spec/vcr_cassettes/orders/save_new.yml +40 -22
  221. data/spec/vcr_cassettes/orders/save_old.yml +41 -24
  222. data/spec/vcr_cassettes/orders/save_with_nested_model.yml +40 -21
  223. data/spec/vcr_cassettes/orders/search_by_name.yml +38 -23
  224. data/spec/vcr_cassettes/orders/search_miss.yml +36 -19
  225. data/spec/vcr_cassettes/orders/search_with_special_char.yml +36 -19
  226. data/spec/vcr_cassettes/orders/single_param_find_by_hash.yml +39 -22
  227. data/spec/vcr_cassettes/projects/all.yml +39 -37
  228. data/spec/vcr_cassettes/projects/find_by_hash_failure.yml +36 -19
  229. data/spec/vcr_cassettes/projects/find_failure.yml +36 -19
  230. data/spec/vcr_cassettes/projects/find_id_1.yml +38 -21
  231. data/spec/vcr_cassettes/projects/find_new.yml +39 -22
  232. data/spec/vcr_cassettes/projects/multi_param_find_by_hash.yml +40 -22
  233. data/spec/vcr_cassettes/projects/save_new.yml +37 -19
  234. data/spec/vcr_cassettes/projects/save_old.yml +39 -22
  235. data/spec/vcr_cassettes/projects/single_param_find_by_hash.yml +38 -21
  236. data/spec/vcr_cassettes/termsofpayments/all.yml +43 -29
  237. data/spec/vcr_cassettes/termsofpayments/find_failure.yml +36 -19
  238. data/spec/vcr_cassettes/termsofpayments/find_id_1.yml +38 -22
  239. data/spec/vcr_cassettes/termsofpayments/find_new.yml +38 -21
  240. data/spec/vcr_cassettes/termsofpayments/save_new.yml +37 -19
  241. data/spec/vcr_cassettes/termsofpayments/save_old.yml +38 -21
  242. data/spec/vcr_cassettes/units/all.yml +38 -26
  243. data/spec/vcr_cassettes/units/find_failure.yml +36 -19
  244. data/spec/vcr_cassettes/units/find_id_1.yml +38 -21
  245. data/spec/vcr_cassettes/units/find_new.yml +38 -21
  246. data/spec/vcr_cassettes/units/save_new.yml +37 -19
  247. data/spec/vcr_cassettes/units/save_old.yml +38 -21
  248. data/spec/vcr_cassettes/units/save_with_specially_named_attribute.yml +37 -19
  249. metadata +133 -252
  250. data/lib/fortnox/api/circular_queue.rb +0 -39
  251. data/spec/fortnox/api/circular_queue_spec.rb +0 -52
  252. data/spec/support/helpers/dummy_class_helper.rb +0 -38
  253. data/spec/support/helpers/when_performing_helper.rb +0 -7
  254. data/spec/vcr_cassettes/invoices/save_new_with_country_KR.yml +0 -57
  255. data/temp.txt +0 -1
@@ -2,7 +2,7 @@
2
2
  http_interactions:
3
3
  - request:
4
4
  method: put
5
- uri: https://api.fortnox.se/3/invoices/133
5
+ uri: https://api.fortnox.se/3/invoices/30
6
6
  body:
7
7
  encoding: UTF-8
8
8
  string: '{"Invoice":{"Comments":""}}'
@@ -11,38 +11,55 @@ http_interactions:
11
11
  - application/json
12
12
  Accept:
13
13
  - application/json
14
- Client-Secret:
15
- - 9aBA8ZgsvR
16
- Access-Token:
17
- - ccaef817-d5d8-4b1c-a316-54f3e55c5c54
14
+ Authorization:
15
+ - "<AUTHORIZATION>"
16
+ Accept-Encoding:
17
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
18
+ User-Agent:
19
+ - Ruby
18
20
  response:
19
21
  status:
20
22
  code: 200
21
23
  message: OK
22
24
  headers:
23
- Server:
24
- - nginx
25
- Date:
26
- - Tue, 04 Jun 2019 10:00:19 GMT
25
+ Content-Length:
26
+ - '2204'
27
27
  Content-Type:
28
28
  - application/json
29
- Connection:
30
- - close
29
+ Date:
30
+ - Mon, 30 Jan 2023 10:11:03 GMT
31
31
  Vary:
32
32
  - Accept-Encoding
33
- - Accept-Encoding
33
+ X-Build:
34
+ - 16d854443d
35
+ X-Frame-Options:
36
+ - sameorigin
34
37
  X-Rack-Responsetime:
35
- - '84'
38
+ - '392'
36
39
  X-Uid:
37
- - bb98ed6a
38
- X-Build:
39
- - e930a91c78
40
+ - 12f4deae
41
+ Server:
42
+ - Fortnox
43
+ X-Content-Type-Options:
44
+ - nosniff
45
+ X-Xss-Protection:
46
+ - '0'
47
+ Referrer-Policy:
48
+ - strict-origin-when-cross-origin
49
+ Content-Security-Policy:
50
+ - 'upgrade-insecure-requests;frame-ancestors https://*.fortnox.se;report-uri
51
+ /api/cspreport;connect-src ''self'' https://a.storyblok.com wss://*.fortnox.se
52
+ *.fortnox.se *.findity.com mybusiness.pwc.se themes.googleusercontent.com
53
+ s3.amazonaws.com/helpjuice-static/ *.helpjuice.com *.vimeo.com fonts.googleapis.com
54
+ fonts.gstatic.com api.cling.se wss://api.cling.se ''unsafe-inline'' ''unsafe-eval''
55
+ blob: data:'
56
+ Strict-Transport-Security:
57
+ - max-age=31536000; includeSubdomains
40
58
  body:
41
- encoding: UTF-8
42
- string: '{"Invoice":{"@url":"https:\/\/api.fortnox.se\/3\/invoices\/133","@urlTaxReductionList":"https:\/\/api.fortnox.se\/3\/taxreductions?filter=invoices&referencenumber=133","AdministrationFee":0,"AdministrationFeeVAT":0,"Address1":"","Address2":"","Balance":0,"BasisTaxReduction":0,"Booked":false,"Cancelled":false,"City":"","Comments":"A
43
- comment to be reset","ContractReference":0,"ContributionPercent":0,"ContributionValue":0,"Country":"","CostCenter":"","Credit":"false","CreditInvoiceReference":"0","Currency":"SEK","CurrencyRate":1,"CurrencyUnit":1,"CustomerName":"Old
44
- name","CustomerNumber":"1","DeliveryAddress1":"","DeliveryAddress2":"","DeliveryCity":"","DeliveryCountry":"","DeliveryDate":null,"DeliveryName":"","DeliveryZipCode":"","DocumentNumber":"133","DueDate":"2019-06-03","EDIInformation":{"EDIGlobalLocationNumber":"","EDIGlobalLocationNumberDelivery":"","EDIInvoiceExtra1":"","EDIInvoiceExtra2":"","EDIOurElectronicReference":"","EDIYourElectronicReference":""},"EmailInformation":{"EmailAddressFrom":null,"EmailAddressTo":"","EmailAddressCC":null,"EmailAddressBCC":null,"EmailSubject":"Faktura
45
- {no} bifogas","EmailBody":" "},"EUQuarterlyReport":false,"ExternalInvoiceReference1":"","ExternalInvoiceReference2":"","Freight":0,"FreightVAT":0,"Gross":0,"HouseWork":false,"InvoiceDate":"2019-06-03","InvoicePeriodStart":"","InvoicePeriodEnd":"","InvoiceReference":"0","InvoiceRows":[],"InvoiceType":"INVOICE","Labels":[],"Language":"SV","LastRemindDate":null,"Net":0,"NotCompleted":false,"NoxFinans":false,"OCR":"13359","OfferReference":"0","OrderReference":"0","OrganisationNumber":"860101-8735","OurReference":"","PaymentWay":"","Phone1":"","Phone2":"","PriceList":"A","PrintTemplate":"st","Project":"","WarehouseReady":true,"OutboundDate":"2019-06-03","Remarks":"","Reminders":0,"RoundOff":0,"Sent":false,"TaxReduction":null,"TermsOfDelivery":"","TermsOfPayment":"0","Total":0,"TotalToPay":0,"TotalVAT":0,"VATIncluded":false,"VoucherNumber":null,"VoucherSeries":null,"VoucherYear":null,"WayOfDelivery":"","YourOrderNumber":"","YourReference":"","ZipCode":"","AccountingMethod":"ACCRUAL","FinalPayDate":null}}'
46
- http_version:
47
- recorded_at: Tue, 04 Jun 2019 10:00:19 GMT
48
- recorded_with: VCR 4.0.0
59
+ encoding: ASCII-8BIT
60
+ string: '{"Invoice":{"@url":"https:\/\/api.fortnox.se\/3\/invoices\/30","@urlTaxReductionList":"https:\/\/api.fortnox.se\/3\/taxreductions?filter=invoices&referencenumber=30","AdministrationFee":0,"AdministrationFeeVAT":0,"Address1":"","Address2":"","Balance":0,"BasisTaxReduction":0,"Booked":false,"Cancelled":false,"City":"New
61
+ York","Comments":"A comment to be reset","ContractReference":0,"ContributionPercent":0,"ContributionValue":0,"Country":"","CostCenter":"","Credit":"false","CreditInvoiceReference":"0","Currency":"SEK","CurrencyRate":1,"CurrencyUnit":1,"CustomerName":"Updated
62
+ name","CustomerNumber":"1","DeliveryAddress1":"","DeliveryAddress2":"","DeliveryCity":"","DeliveryCountry":"","DeliveryDate":null,"DeliveryName":"","DeliveryZipCode":"","DocumentNumber":"30","DueDate":"2023-03-01","EDIInformation":{"EDIGlobalLocationNumber":null,"EDIGlobalLocationNumberDelivery":null,"EDIInvoiceExtra1":null,"EDIInvoiceExtra2":null,"EDIOurElectronicReference":null,"EDIYourElectronicReference":null,"EDIStatus":""},"EmailInformation":{"EmailAddressFrom":null,"EmailAddressTo":"","EmailAddressCC":null,"EmailAddressBCC":null,"EmailSubject":"Faktura
63
+ {no} bifogas","EmailBody":" "},"EUQuarterlyReport":false,"ExternalInvoiceReference1":"","ExternalInvoiceReference2":"","Freight":0,"FreightVAT":0,"Gross":0,"HouseWork":false,"InvoiceDate":"2023-01-30","InvoicePeriodStart":"","InvoicePeriodEnd":"","InvoiceReference":"0","InvoiceRows":[],"InvoiceType":"INVOICE","Labels":[],"Language":"SV","LastRemindDate":null,"Net":0,"NotCompleted":false,"NoxFinans":false,"OCR":"3046","OfferReference":"0","OrderReference":"0","OrganisationNumber":"","OurReference":"","PaymentWay":"","Phone1":"","Phone2":"","PriceList":"A","PrintTemplate":"st","Project":"","WarehouseReady":true,"OutboundDate":"2023-01-30","Remarks":"","Reminders":0,"RoundOff":0,"Sent":false,"TaxReduction":null,"TermsOfDelivery":"","TermsOfPayment":"30","TimeBasisReference":null,"Total":0,"TotalToPay":0,"TotalVAT":0,"VATIncluded":false,"VoucherNumber":null,"VoucherSeries":null,"VoucherYear":null,"WayOfDelivery":"","YourOrderNumber":"","YourReference":"","ZipCode":"10001","AccountingMethod":"ACCRUAL","FinalPayDate":null,"TaxReductionType":"none"}}'
64
+ recorded_at: Mon, 30 Jan 2023 10:11:03 GMT
65
+ recorded_with: VCR 6.1.0
@@ -2,7 +2,7 @@
2
2
  http_interactions:
3
3
  - request:
4
4
  method: put
5
- uri: https://api.fortnox.se/3/invoices/144
5
+ uri: https://api.fortnox.se/3/invoices/31
6
6
  body:
7
7
  encoding: UTF-8
8
8
  string: '{"Invoice":{"Country":""}}'
@@ -11,47 +11,55 @@ http_interactions:
11
11
  - application/json
12
12
  Accept:
13
13
  - application/json
14
- Client-Secret:
15
- - 9aBA8ZgsvR
16
- Access-Token:
17
- - ccaef817-d5d8-4b1c-a316-54f3e55c5c54
14
+ Authorization:
15
+ - "<AUTHORIZATION>"
16
+ Accept-Encoding:
17
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
18
+ User-Agent:
19
+ - Ruby
18
20
  response:
19
21
  status:
20
22
  code: 200
21
23
  message: OK
22
24
  headers:
23
- Server:
24
- - nginx
25
- Date:
26
- - Sun, 01 Sep 2019 07:02:20 GMT
25
+ Content-Length:
26
+ - '2190'
27
27
  Content-Type:
28
28
  - application/json
29
- Connection:
30
- - close
29
+ Date:
30
+ - Mon, 30 Jan 2023 10:11:04 GMT
31
31
  Vary:
32
32
  - Accept-Encoding
33
- - Accept-Encoding
33
+ X-Build:
34
+ - 16d854443d
35
+ X-Frame-Options:
36
+ - sameorigin
34
37
  X-Rack-Responsetime:
35
- - '93'
38
+ - '373'
36
39
  X-Uid:
37
- - 12fbdad7
38
- X-Build:
39
- - b1e7c74853
40
- Strict-Transport-Security:
41
- - max-age=31536000; includeSubdomains
42
- X-Xss-Protection:
43
- - 1; mode=block
40
+ - ef6e6bf9
41
+ Server:
42
+ - Fortnox
44
43
  X-Content-Type-Options:
45
44
  - nosniff
46
- X-Frame-Options:
47
- - sameorigin
45
+ X-Xss-Protection:
46
+ - '0'
48
47
  Referrer-Policy:
49
48
  - strict-origin-when-cross-origin
49
+ Content-Security-Policy:
50
+ - 'upgrade-insecure-requests;frame-ancestors https://*.fortnox.se;report-uri
51
+ /api/cspreport;connect-src ''self'' https://a.storyblok.com wss://*.fortnox.se
52
+ *.fortnox.se *.findity.com mybusiness.pwc.se themes.googleusercontent.com
53
+ s3.amazonaws.com/helpjuice-static/ *.helpjuice.com *.vimeo.com fonts.googleapis.com
54
+ fonts.gstatic.com api.cling.se wss://api.cling.se ''unsafe-inline'' ''unsafe-eval''
55
+ blob: data:'
56
+ Strict-Transport-Security:
57
+ - max-age=31536000; includeSubdomains
50
58
  body:
51
- encoding: UTF-8
52
- string: '{"Invoice":{"@url":"https:\/\/api.fortnox.se\/3\/invoices\/144","@urlTaxReductionList":"https:\/\/api.fortnox.se\/3\/taxreductions?filter=invoices&referencenumber=144","AdministrationFee":0,"AdministrationFeeVAT":0,"Address1":"","Address2":"","Balance":0,"BasisTaxReduction":0,"Booked":false,"Cancelled":false,"City":"","Comments":"","ContractReference":0,"ContributionPercent":0,"ContributionValue":0,"Country":"Sverige","CostCenter":"","Credit":"false","CreditInvoiceReference":"0","Currency":"SEK","CurrencyRate":1,"CurrencyUnit":1,"CustomerName":"Old
53
- name","CustomerNumber":"1","DeliveryAddress1":"","DeliveryAddress2":"","DeliveryCity":"","DeliveryCountry":"","DeliveryDate":null,"DeliveryName":"","DeliveryZipCode":"","DocumentNumber":"144","DueDate":"2019-09-01","EDIInformation":{"EDIGlobalLocationNumber":"","EDIGlobalLocationNumberDelivery":"","EDIInvoiceExtra1":"","EDIInvoiceExtra2":"","EDIOurElectronicReference":"","EDIYourElectronicReference":""},"EmailInformation":{"EmailAddressFrom":null,"EmailAddressTo":"","EmailAddressCC":null,"EmailAddressBCC":null,"EmailSubject":"Faktura
54
- {no} bifogas","EmailBody":" "},"EUQuarterlyReport":false,"ExternalInvoiceReference1":"","ExternalInvoiceReference2":"","Freight":0,"FreightVAT":0,"Gross":0,"HouseWork":false,"InvoiceDate":"2019-09-01","InvoicePeriodStart":"","InvoicePeriodEnd":"","InvoiceReference":"0","InvoiceRows":[],"InvoiceType":"INVOICE","Labels":[],"Language":"SV","LastRemindDate":null,"Net":0,"NotCompleted":false,"NoxFinans":false,"OCR":"14456","OfferReference":"0","OrderReference":"0","OrganisationNumber":"860101-8735","OurReference":"","PaymentWay":"","Phone1":"","Phone2":"","PriceList":"A","PrintTemplate":"st","Project":"","WarehouseReady":true,"OutboundDate":"2019-09-01","Remarks":"","Reminders":0,"RoundOff":0,"Sent":false,"TaxReduction":null,"TermsOfDelivery":"","TermsOfPayment":"0","Total":0,"TotalToPay":0,"TotalVAT":0,"VATIncluded":false,"VoucherNumber":null,"VoucherSeries":null,"VoucherYear":null,"WayOfDelivery":"","YourOrderNumber":"","YourReference":"","ZipCode":"","AccountingMethod":"ACCRUAL","FinalPayDate":null}}'
55
- http_version:
56
- recorded_at: Sun, 01 Sep 2019 07:02:20 GMT
57
- recorded_with: VCR 4.0.0
59
+ encoding: ASCII-8BIT
60
+ string: '{"Invoice":{"@url":"https:\/\/api.fortnox.se\/3\/invoices\/31","@urlTaxReductionList":"https:\/\/api.fortnox.se\/3\/taxreductions?filter=invoices&referencenumber=31","AdministrationFee":0,"AdministrationFeeVAT":0,"Address1":"","Address2":"","Balance":0,"BasisTaxReduction":0,"Booked":false,"Cancelled":false,"City":"New
61
+ York","Comments":"","ContractReference":0,"ContributionPercent":0,"ContributionValue":0,"Country":"Sverige","CostCenter":"","Credit":"false","CreditInvoiceReference":"0","Currency":"SEK","CurrencyRate":1,"CurrencyUnit":1,"CustomerName":"Updated
62
+ name","CustomerNumber":"1","DeliveryAddress1":"","DeliveryAddress2":"","DeliveryCity":"","DeliveryCountry":"","DeliveryDate":null,"DeliveryName":"","DeliveryZipCode":"","DocumentNumber":"31","DueDate":"2023-03-01","EDIInformation":{"EDIGlobalLocationNumber":null,"EDIGlobalLocationNumberDelivery":null,"EDIInvoiceExtra1":null,"EDIInvoiceExtra2":null,"EDIOurElectronicReference":null,"EDIYourElectronicReference":null,"EDIStatus":""},"EmailInformation":{"EmailAddressFrom":null,"EmailAddressTo":"","EmailAddressCC":null,"EmailAddressBCC":null,"EmailSubject":"Faktura
63
+ {no} bifogas","EmailBody":" "},"EUQuarterlyReport":false,"ExternalInvoiceReference1":"","ExternalInvoiceReference2":"","Freight":0,"FreightVAT":0,"Gross":0,"HouseWork":false,"InvoiceDate":"2023-01-30","InvoicePeriodStart":"","InvoicePeriodEnd":"","InvoiceReference":"0","InvoiceRows":[],"InvoiceType":"INVOICE","Labels":[],"Language":"SV","LastRemindDate":null,"Net":0,"NotCompleted":false,"NoxFinans":false,"OCR":"3145","OfferReference":"0","OrderReference":"0","OrganisationNumber":"","OurReference":"","PaymentWay":"","Phone1":"","Phone2":"","PriceList":"A","PrintTemplate":"st","Project":"","WarehouseReady":true,"OutboundDate":"2023-01-30","Remarks":"","Reminders":0,"RoundOff":0,"Sent":false,"TaxReduction":null,"TermsOfDelivery":"","TermsOfPayment":"30","TimeBasisReference":null,"Total":0,"TotalToPay":0,"TotalVAT":0,"VATIncluded":false,"VoucherNumber":null,"VoucherSeries":null,"VoucherYear":null,"WayOfDelivery":"","YourOrderNumber":"","YourReference":"","ZipCode":"10001","AccountingMethod":"ACCRUAL","FinalPayDate":null,"TaxReductionType":"none"}}'
64
+ recorded_at: Mon, 30 Jan 2023 10:11:04 GMT
65
+ recorded_with: VCR 6.1.0
@@ -2,7 +2,7 @@
2
2
  http_interactions:
3
3
  - request:
4
4
  method: put
5
- uri: https://api.fortnox.se/3/invoices/133
5
+ uri: https://api.fortnox.se/3/invoices/30
6
6
  body:
7
7
  encoding: UTF-8
8
8
  string: '{"Invoice":{"Comments":"A comment to be reset"}}'
@@ -11,38 +11,55 @@ http_interactions:
11
11
  - application/json
12
12
  Accept:
13
13
  - application/json
14
- Client-Secret:
15
- - 9aBA8ZgsvR
16
- Access-Token:
17
- - ccaef817-d5d8-4b1c-a316-54f3e55c5c54
14
+ Authorization:
15
+ - "<AUTHORIZATION>"
16
+ Accept-Encoding:
17
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
18
+ User-Agent:
19
+ - Ruby
18
20
  response:
19
21
  status:
20
22
  code: 200
21
23
  message: OK
22
24
  headers:
23
- Server:
24
- - nginx
25
- Date:
26
- - Tue, 04 Jun 2019 10:00:19 GMT
25
+ Content-Length:
26
+ - '2204'
27
27
  Content-Type:
28
28
  - application/json
29
- Connection:
30
- - close
29
+ Date:
30
+ - Mon, 30 Jan 2023 10:11:02 GMT
31
31
  Vary:
32
32
  - Accept-Encoding
33
- - Accept-Encoding
33
+ X-Build:
34
+ - 16d854443d
35
+ X-Frame-Options:
36
+ - sameorigin
34
37
  X-Rack-Responsetime:
35
- - '145'
38
+ - '309'
36
39
  X-Uid:
37
- - 73a919c3
38
- X-Build:
39
- - e930a91c78
40
+ - a8562353
41
+ Server:
42
+ - Fortnox
43
+ X-Content-Type-Options:
44
+ - nosniff
45
+ X-Xss-Protection:
46
+ - '0'
47
+ Referrer-Policy:
48
+ - strict-origin-when-cross-origin
49
+ Content-Security-Policy:
50
+ - 'upgrade-insecure-requests;frame-ancestors https://*.fortnox.se;report-uri
51
+ /api/cspreport;connect-src ''self'' https://a.storyblok.com wss://*.fortnox.se
52
+ *.fortnox.se *.findity.com mybusiness.pwc.se themes.googleusercontent.com
53
+ s3.amazonaws.com/helpjuice-static/ *.helpjuice.com *.vimeo.com fonts.googleapis.com
54
+ fonts.gstatic.com api.cling.se wss://api.cling.se ''unsafe-inline'' ''unsafe-eval''
55
+ blob: data:'
56
+ Strict-Transport-Security:
57
+ - max-age=31536000; includeSubdomains
40
58
  body:
41
- encoding: UTF-8
42
- string: '{"Invoice":{"@url":"https:\/\/api.fortnox.se\/3\/invoices\/133","@urlTaxReductionList":"https:\/\/api.fortnox.se\/3\/taxreductions?filter=invoices&referencenumber=133","AdministrationFee":0,"AdministrationFeeVAT":0,"Address1":"","Address2":"","Balance":0,"BasisTaxReduction":0,"Booked":false,"Cancelled":false,"City":"","Comments":"A
43
- comment to be reset","ContractReference":0,"ContributionPercent":0,"ContributionValue":0,"Country":"","CostCenter":"","Credit":"false","CreditInvoiceReference":"0","Currency":"SEK","CurrencyRate":1,"CurrencyUnit":1,"CustomerName":"Old
44
- name","CustomerNumber":"1","DeliveryAddress1":"","DeliveryAddress2":"","DeliveryCity":"","DeliveryCountry":"","DeliveryDate":null,"DeliveryName":"","DeliveryZipCode":"","DocumentNumber":"133","DueDate":"2019-06-03","EDIInformation":{"EDIGlobalLocationNumber":"","EDIGlobalLocationNumberDelivery":"","EDIInvoiceExtra1":"","EDIInvoiceExtra2":"","EDIOurElectronicReference":"","EDIYourElectronicReference":""},"EmailInformation":{"EmailAddressFrom":null,"EmailAddressTo":"","EmailAddressCC":null,"EmailAddressBCC":null,"EmailSubject":"Faktura
45
- {no} bifogas","EmailBody":" "},"EUQuarterlyReport":false,"ExternalInvoiceReference1":"","ExternalInvoiceReference2":"","Freight":0,"FreightVAT":0,"Gross":0,"HouseWork":false,"InvoiceDate":"2019-06-03","InvoicePeriodStart":"","InvoicePeriodEnd":"","InvoiceReference":"0","InvoiceRows":[],"InvoiceType":"INVOICE","Labels":[],"Language":"SV","LastRemindDate":null,"Net":0,"NotCompleted":false,"NoxFinans":false,"OCR":"13359","OfferReference":"0","OrderReference":"0","OrganisationNumber":"860101-8735","OurReference":"","PaymentWay":"","Phone1":"","Phone2":"","PriceList":"A","PrintTemplate":"st","Project":"","WarehouseReady":true,"OutboundDate":"2019-06-03","Remarks":"","Reminders":0,"RoundOff":0,"Sent":false,"TaxReduction":null,"TermsOfDelivery":"","TermsOfPayment":"0","Total":0,"TotalToPay":0,"TotalVAT":0,"VATIncluded":false,"VoucherNumber":null,"VoucherSeries":null,"VoucherYear":null,"WayOfDelivery":"","YourOrderNumber":"","YourReference":"","ZipCode":"","AccountingMethod":"ACCRUAL","FinalPayDate":null}}'
46
- http_version:
47
- recorded_at: Tue, 04 Jun 2019 10:00:19 GMT
48
- recorded_with: VCR 4.0.0
59
+ encoding: ASCII-8BIT
60
+ string: '{"Invoice":{"@url":"https:\/\/api.fortnox.se\/3\/invoices\/30","@urlTaxReductionList":"https:\/\/api.fortnox.se\/3\/taxreductions?filter=invoices&referencenumber=30","AdministrationFee":0,"AdministrationFeeVAT":0,"Address1":"","Address2":"","Balance":0,"BasisTaxReduction":0,"Booked":false,"Cancelled":false,"City":"New
61
+ York","Comments":"A comment to be reset","ContractReference":0,"ContributionPercent":0,"ContributionValue":0,"Country":"","CostCenter":"","Credit":"false","CreditInvoiceReference":"0","Currency":"SEK","CurrencyRate":1,"CurrencyUnit":1,"CustomerName":"Updated
62
+ name","CustomerNumber":"1","DeliveryAddress1":"","DeliveryAddress2":"","DeliveryCity":"","DeliveryCountry":"","DeliveryDate":null,"DeliveryName":"","DeliveryZipCode":"","DocumentNumber":"30","DueDate":"2023-03-01","EDIInformation":{"EDIGlobalLocationNumber":null,"EDIGlobalLocationNumberDelivery":null,"EDIInvoiceExtra1":null,"EDIInvoiceExtra2":null,"EDIOurElectronicReference":null,"EDIYourElectronicReference":null,"EDIStatus":""},"EmailInformation":{"EmailAddressFrom":null,"EmailAddressTo":"","EmailAddressCC":null,"EmailAddressBCC":null,"EmailSubject":"Faktura
63
+ {no} bifogas","EmailBody":" "},"EUQuarterlyReport":false,"ExternalInvoiceReference1":"","ExternalInvoiceReference2":"","Freight":0,"FreightVAT":0,"Gross":0,"HouseWork":false,"InvoiceDate":"2023-01-30","InvoicePeriodStart":"","InvoicePeriodEnd":"","InvoiceReference":"0","InvoiceRows":[],"InvoiceType":"INVOICE","Labels":[],"Language":"SV","LastRemindDate":null,"Net":0,"NotCompleted":false,"NoxFinans":false,"OCR":"3046","OfferReference":"0","OrderReference":"0","OrganisationNumber":"","OurReference":"","PaymentWay":"","Phone1":"","Phone2":"","PriceList":"A","PrintTemplate":"st","Project":"","WarehouseReady":true,"OutboundDate":"2023-01-30","Remarks":"","Reminders":0,"RoundOff":0,"Sent":false,"TaxReduction":null,"TermsOfDelivery":"","TermsOfPayment":"30","TimeBasisReference":null,"Total":0,"TotalToPay":0,"TotalVAT":0,"VATIncluded":false,"VoucherNumber":null,"VoucherSeries":null,"VoucherYear":null,"WayOfDelivery":"","YourOrderNumber":"","YourReference":"","ZipCode":"10001","AccountingMethod":"ACCRUAL","FinalPayDate":null,"TaxReductionType":"none"}}'
64
+ recorded_at: Mon, 30 Jan 2023 10:11:02 GMT
65
+ recorded_with: VCR 6.1.0
@@ -2,7 +2,7 @@
2
2
  http_interactions:
3
3
  - request:
4
4
  method: put
5
- uri: https://api.fortnox.se/3/invoices/144
5
+ uri: https://api.fortnox.se/3/invoices/31
6
6
  body:
7
7
  encoding: UTF-8
8
8
  string: '{"Invoice":{"Country":"Sverige"}}'
@@ -11,47 +11,55 @@ http_interactions:
11
11
  - application/json
12
12
  Accept:
13
13
  - application/json
14
- Client-Secret:
15
- - 9aBA8ZgsvR
16
- Access-Token:
17
- - ccaef817-d5d8-4b1c-a316-54f3e55c5c54
14
+ Authorization:
15
+ - "<AUTHORIZATION>"
16
+ Accept-Encoding:
17
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
18
+ User-Agent:
19
+ - Ruby
18
20
  response:
19
21
  status:
20
22
  code: 200
21
23
  message: OK
22
24
  headers:
23
- Server:
24
- - nginx
25
- Date:
26
- - Sun, 01 Sep 2019 07:02:19 GMT
25
+ Content-Length:
26
+ - '2190'
27
27
  Content-Type:
28
28
  - application/json
29
- Connection:
30
- - close
29
+ Date:
30
+ - Mon, 30 Jan 2023 10:11:04 GMT
31
31
  Vary:
32
32
  - Accept-Encoding
33
- - Accept-Encoding
33
+ X-Build:
34
+ - 16d854443d
35
+ X-Frame-Options:
36
+ - sameorigin
34
37
  X-Rack-Responsetime:
35
- - '252'
38
+ - '335'
36
39
  X-Uid:
37
- - feace4e3
38
- X-Build:
39
- - b1e7c74853
40
- Strict-Transport-Security:
41
- - max-age=31536000; includeSubdomains
42
- X-Xss-Protection:
43
- - 1; mode=block
40
+ - bfbad97b
41
+ Server:
42
+ - Fortnox
44
43
  X-Content-Type-Options:
45
44
  - nosniff
46
- X-Frame-Options:
47
- - sameorigin
45
+ X-Xss-Protection:
46
+ - '0'
48
47
  Referrer-Policy:
49
48
  - strict-origin-when-cross-origin
49
+ Content-Security-Policy:
50
+ - 'upgrade-insecure-requests;frame-ancestors https://*.fortnox.se;report-uri
51
+ /api/cspreport;connect-src ''self'' https://a.storyblok.com wss://*.fortnox.se
52
+ *.fortnox.se *.findity.com mybusiness.pwc.se themes.googleusercontent.com
53
+ s3.amazonaws.com/helpjuice-static/ *.helpjuice.com *.vimeo.com fonts.googleapis.com
54
+ fonts.gstatic.com api.cling.se wss://api.cling.se ''unsafe-inline'' ''unsafe-eval''
55
+ blob: data:'
56
+ Strict-Transport-Security:
57
+ - max-age=31536000; includeSubdomains
50
58
  body:
51
- encoding: UTF-8
52
- string: '{"Invoice":{"@url":"https:\/\/api.fortnox.se\/3\/invoices\/144","@urlTaxReductionList":"https:\/\/api.fortnox.se\/3\/taxreductions?filter=invoices&referencenumber=144","AdministrationFee":0,"AdministrationFeeVAT":0,"Address1":"","Address2":"","Balance":0,"BasisTaxReduction":0,"Booked":false,"Cancelled":false,"City":"","Comments":"","ContractReference":0,"ContributionPercent":0,"ContributionValue":0,"Country":"Sverige","CostCenter":"","Credit":"false","CreditInvoiceReference":"0","Currency":"SEK","CurrencyRate":1,"CurrencyUnit":1,"CustomerName":"Old
53
- name","CustomerNumber":"1","DeliveryAddress1":"","DeliveryAddress2":"","DeliveryCity":"","DeliveryCountry":"","DeliveryDate":null,"DeliveryName":"","DeliveryZipCode":"","DocumentNumber":"144","DueDate":"2019-09-01","EDIInformation":{"EDIGlobalLocationNumber":"","EDIGlobalLocationNumberDelivery":"","EDIInvoiceExtra1":"","EDIInvoiceExtra2":"","EDIOurElectronicReference":"","EDIYourElectronicReference":""},"EmailInformation":{"EmailAddressFrom":null,"EmailAddressTo":"","EmailAddressCC":null,"EmailAddressBCC":null,"EmailSubject":"Faktura
54
- {no} bifogas","EmailBody":" "},"EUQuarterlyReport":false,"ExternalInvoiceReference1":"","ExternalInvoiceReference2":"","Freight":0,"FreightVAT":0,"Gross":0,"HouseWork":false,"InvoiceDate":"2019-09-01","InvoicePeriodStart":"","InvoicePeriodEnd":"","InvoiceReference":"0","InvoiceRows":[],"InvoiceType":"INVOICE","Labels":[],"Language":"SV","LastRemindDate":null,"Net":0,"NotCompleted":false,"NoxFinans":false,"OCR":"14456","OfferReference":"0","OrderReference":"0","OrganisationNumber":"860101-8735","OurReference":"","PaymentWay":"","Phone1":"","Phone2":"","PriceList":"A","PrintTemplate":"st","Project":"","WarehouseReady":true,"OutboundDate":"2019-09-01","Remarks":"","Reminders":0,"RoundOff":0,"Sent":false,"TaxReduction":null,"TermsOfDelivery":"","TermsOfPayment":"0","Total":0,"TotalToPay":0,"TotalVAT":0,"VATIncluded":false,"VoucherNumber":null,"VoucherSeries":null,"VoucherYear":null,"WayOfDelivery":"","YourOrderNumber":"","YourReference":"","ZipCode":"","AccountingMethod":"ACCRUAL","FinalPayDate":null}}'
55
- http_version:
56
- recorded_at: Sun, 01 Sep 2019 07:02:19 GMT
57
- recorded_with: VCR 4.0.0
59
+ encoding: ASCII-8BIT
60
+ string: '{"Invoice":{"@url":"https:\/\/api.fortnox.se\/3\/invoices\/31","@urlTaxReductionList":"https:\/\/api.fortnox.se\/3\/taxreductions?filter=invoices&referencenumber=31","AdministrationFee":0,"AdministrationFeeVAT":0,"Address1":"","Address2":"","Balance":0,"BasisTaxReduction":0,"Booked":false,"Cancelled":false,"City":"New
61
+ York","Comments":"","ContractReference":0,"ContributionPercent":0,"ContributionValue":0,"Country":"Sverige","CostCenter":"","Credit":"false","CreditInvoiceReference":"0","Currency":"SEK","CurrencyRate":1,"CurrencyUnit":1,"CustomerName":"Updated
62
+ name","CustomerNumber":"1","DeliveryAddress1":"","DeliveryAddress2":"","DeliveryCity":"","DeliveryCountry":"","DeliveryDate":null,"DeliveryName":"","DeliveryZipCode":"","DocumentNumber":"31","DueDate":"2023-03-01","EDIInformation":{"EDIGlobalLocationNumber":null,"EDIGlobalLocationNumberDelivery":null,"EDIInvoiceExtra1":null,"EDIInvoiceExtra2":null,"EDIOurElectronicReference":null,"EDIYourElectronicReference":null,"EDIStatus":""},"EmailInformation":{"EmailAddressFrom":null,"EmailAddressTo":"","EmailAddressCC":null,"EmailAddressBCC":null,"EmailSubject":"Faktura
63
+ {no} bifogas","EmailBody":" "},"EUQuarterlyReport":false,"ExternalInvoiceReference1":"","ExternalInvoiceReference2":"","Freight":0,"FreightVAT":0,"Gross":0,"HouseWork":false,"InvoiceDate":"2023-01-30","InvoicePeriodStart":"","InvoicePeriodEnd":"","InvoiceReference":"0","InvoiceRows":[],"InvoiceType":"INVOICE","Labels":[],"Language":"SV","LastRemindDate":null,"Net":0,"NotCompleted":false,"NoxFinans":false,"OCR":"3145","OfferReference":"0","OrderReference":"0","OrganisationNumber":"","OurReference":"","PaymentWay":"","Phone1":"","Phone2":"","PriceList":"A","PrintTemplate":"st","Project":"","WarehouseReady":true,"OutboundDate":"2023-01-30","Remarks":"","Reminders":0,"RoundOff":0,"Sent":false,"TaxReduction":null,"TermsOfDelivery":"","TermsOfPayment":"30","TimeBasisReference":null,"Total":0,"TotalToPay":0,"TotalVAT":0,"VATIncluded":false,"VoucherNumber":null,"VoucherSeries":null,"VoucherYear":null,"WayOfDelivery":"","YourOrderNumber":"","YourReference":"","ZipCode":"10001","AccountingMethod":"ACCRUAL","FinalPayDate":null,"TaxReductionType":"none"}}'
64
+ recorded_at: Mon, 30 Jan 2023 10:11:04 GMT
65
+ recorded_with: VCR 6.1.0
@@ -5,42 +5,61 @@ http_interactions:
5
5
  uri: https://api.fortnox.se/3/invoices/
6
6
  body:
7
7
  encoding: UTF-8
8
- string: '{"Invoice":{"CustomerNumber":"1","InvoiceRows":[{"ArticleNumber":"0000","Price":10.0}]}}'
8
+ string: '{"Invoice":{"CustomerNumber":"1","InvoiceRows":[{"ArticleNumber":"101","Price":10.0}]}}'
9
9
  headers:
10
10
  Content-Type:
11
11
  - application/json
12
12
  Accept:
13
13
  - application/json
14
- Client-Secret:
15
- - 9aBA8ZgsvR
16
- Access-Token:
17
- - ccaef817-d5d8-4b1c-a316-54f3e55c5c54
14
+ Authorization:
15
+ - "<AUTHORIZATION>"
16
+ Accept-Encoding:
17
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
18
+ User-Agent:
19
+ - Ruby
18
20
  response:
19
21
  status:
20
22
  code: 201
21
23
  message: Created
22
24
  headers:
23
- Server:
24
- - nginx
25
- Date:
26
- - Wed, 29 May 2019 07:52:49 GMT
27
25
  Content-Type:
28
26
  - application/json
29
- Connection:
30
- - close
27
+ Date:
28
+ - Mon, 30 Jan 2023 10:10:55 GMT
31
29
  Location:
32
30
  - invoices
31
+ X-Build:
32
+ - 16d854443d
33
+ X-Frame-Options:
34
+ - sameorigin
33
35
  X-Rack-Responsetime:
34
- - '119'
36
+ - '439'
35
37
  X-Uid:
36
- - dc1af1a1
37
- X-Build:
38
- - e930a91c78
38
+ - 1e51abdf
39
+ Transfer-Encoding:
40
+ - chunked
41
+ Server:
42
+ - Fortnox
43
+ X-Content-Type-Options:
44
+ - nosniff
45
+ X-Xss-Protection:
46
+ - '0'
47
+ Referrer-Policy:
48
+ - strict-origin-when-cross-origin
49
+ Content-Security-Policy:
50
+ - 'upgrade-insecure-requests;frame-ancestors https://*.fortnox.se;report-uri
51
+ /api/cspreport;connect-src ''self'' https://a.storyblok.com wss://*.fortnox.se
52
+ *.fortnox.se *.findity.com mybusiness.pwc.se themes.googleusercontent.com
53
+ s3.amazonaws.com/helpjuice-static/ *.helpjuice.com *.vimeo.com fonts.googleapis.com
54
+ fonts.gstatic.com api.cling.se wss://api.cling.se ''unsafe-inline'' ''unsafe-eval''
55
+ blob: data:'
56
+ Strict-Transport-Security:
57
+ - max-age=31536000; includeSubdomains
39
58
  body:
40
59
  encoding: UTF-8
41
- string: '{"Invoice":{"@url":"https:\/\/api.fortnox.se\/3\/invoices\/96","@urlTaxReductionList":"https:\/\/api.fortnox.se\/3\/taxreductions?filter=invoices&referencenumber=96","AdministrationFee":0,"AdministrationFeeVAT":0,"Address1":"","Address2":"","Balance":0,"BasisTaxReduction":0,"Booked":false,"Cancelled":false,"City":"","Comments":"","ContractReference":0,"ContributionPercent":0,"ContributionValue":0,"Country":"","CostCenter":"","Credit":"false","CreditInvoiceReference":0,"Currency":"SEK","CurrencyRate":1,"CurrencyUnit":1,"CustomerName":"Old
42
- name","CustomerNumber":"1","DeliveryAddress1":"","DeliveryAddress2":"","DeliveryCity":"","DeliveryCountry":"","DeliveryDate":null,"DeliveryName":"","DeliveryZipCode":"","DocumentNumber":"96","DueDate":"2019-05-29","EDIInformation":{"EDIGlobalLocationNumber":"","EDIGlobalLocationNumberDelivery":"","EDIInvoiceExtra1":"","EDIInvoiceExtra2":"","EDIOurElectronicReference":"","EDIYourElectronicReference":""},"EmailInformation":{"EmailAddressFrom":null,"EmailAddressTo":"","EmailAddressCC":null,"EmailAddressBCC":null,"EmailSubject":"Faktura
43
- {no} bifogas","EmailBody":" "},"EUQuarterlyReport":false,"ExternalInvoiceReference1":"","ExternalInvoiceReference2":"","Freight":0,"FreightVAT":0,"Gross":0,"HouseWork":false,"InvoiceDate":"2019-05-29","InvoicePeriodStart":"","InvoicePeriodEnd":"","InvoiceReference":0,"InvoiceRows":[{"AccountNumber":1250,"ArticleNumber":"0000","ContributionPercent":"0","ContributionValue":"0","CostCenter":"","DeliveredQuantity":"0.00","Description":"Testartikel","Discount":0,"DiscountType":"PERCENT","HouseWork":false,"HouseWorkHoursToReport":null,"HouseWorkType":null,"Price":10,"PriceExcludingVAT":10,"Project":"","StockPointCode":null,"Total":0,"TotalExcludingVAT":0,"Unit":"","VAT":0}],"InvoiceType":"INVOICE","Labels":[],"Language":"SV","LastRemindDate":null,"Net":0,"NotCompleted":false,"NoxFinans":false,"OCR":"9647","OfferReference":0,"OrderReference":0,"OrganisationNumber":"860101-8735","OurReference":"","PaymentWay":"","Phone1":"","Phone2":"","PriceList":"A","PrintTemplate":"st","Project":"","WarehouseReady":true,"OutboundDate":"2019-05-29","Remarks":"","Reminders":0,"RoundOff":0,"Sent":false,"TaxReduction":null,"TermsOfDelivery":"","TermsOfPayment":0,"Total":0,"TotalToPay":0,"TotalVAT":0,"VATIncluded":false,"VoucherNumber":null,"VoucherSeries":null,"VoucherYear":null,"WayOfDelivery":"","YourOrderNumber":"","YourReference":"","ZipCode":"","AccountingMethod":"ACCRUAL","FinalPayDate":null}}'
44
- http_version:
45
- recorded_at: Wed, 29 May 2019 07:52:49 GMT
46
- recorded_with: VCR 4.0.0
60
+ string: '{"Invoice":{"@url":"https:\/\/api.fortnox.se\/3\/invoices\/20","@urlTaxReductionList":"https:\/\/api.fortnox.se\/3\/taxreductions?filter=invoices&referencenumber=20","AdministrationFee":0,"AdministrationFeeVAT":0,"Address1":"","Address2":"","Balance":0,"BasisTaxReduction":0,"Booked":false,"Cancelled":false,"City":"New
61
+ York","Comments":"","ContractReference":0,"ContributionPercent":0,"ContributionValue":0,"Country":"","CostCenter":"","Credit":"false","CreditInvoiceReference":"0","Currency":"SEK","CurrencyRate":1,"CurrencyUnit":1,"CustomerName":"Updated
62
+ name","CustomerNumber":"1","DeliveryAddress1":"","DeliveryAddress2":"","DeliveryCity":"","DeliveryCountry":"","DeliveryDate":null,"DeliveryName":"","DeliveryZipCode":"","DocumentNumber":"20","DueDate":"2023-03-01","EDIInformation":{"EDIGlobalLocationNumber":null,"EDIGlobalLocationNumberDelivery":null,"EDIInvoiceExtra1":null,"EDIInvoiceExtra2":null,"EDIOurElectronicReference":null,"EDIYourElectronicReference":null,"EDIStatus":""},"EmailInformation":{"EmailAddressFrom":null,"EmailAddressTo":"","EmailAddressCC":null,"EmailAddressBCC":null,"EmailSubject":"Faktura
63
+ {no} bifogas","EmailBody":" "},"EUQuarterlyReport":false,"ExternalInvoiceReference1":"","ExternalInvoiceReference2":"","Freight":0,"FreightVAT":0,"Gross":0,"HouseWork":false,"InvoiceDate":"2023-01-30","InvoicePeriodStart":"","InvoicePeriodEnd":"","InvoiceReference":"0","InvoiceRows":[{"AccountNumber":3001,"ArticleNumber":"101","ContributionPercent":"0","ContributionValue":"0","Cost":0,"CostCenter":"","DeliveredQuantity":"0","Description":"Hammer","Discount":0,"DiscountType":"PERCENT","HouseWork":false,"HouseWorkHoursToReport":null,"HouseWorkType":null,"Price":10,"PriceExcludingVAT":10,"Project":"","RowId":2,"StockPointCode":null,"Total":0,"TotalExcludingVAT":0,"Unit":"","VAT":0}],"InvoiceType":"INVOICE","Labels":[],"Language":"SV","LastRemindDate":null,"Net":0,"NotCompleted":false,"NoxFinans":false,"OCR":"2048","OfferReference":"0","OrderReference":"0","OrganisationNumber":"","OurReference":"","PaymentWay":"","Phone1":"","Phone2":"","PriceList":"A","PrintTemplate":"st","Project":"","WarehouseReady":true,"OutboundDate":"2023-01-30","Remarks":"","Reminders":0,"RoundOff":0,"Sent":false,"TaxReduction":null,"TermsOfDelivery":"","TermsOfPayment":"30","TimeBasisReference":null,"Total":0,"TotalToPay":0,"TotalVAT":0,"VATIncluded":false,"VoucherNumber":null,"VoucherSeries":null,"VoucherYear":null,"WayOfDelivery":"","YourOrderNumber":"","YourReference":"","ZipCode":"10001","AccountingMethod":"ACCRUAL","FinalPayDate":null,"TaxReductionType":"none"}}'
64
+ recorded_at: Mon, 30 Jan 2023 10:10:55 GMT
65
+ recorded_with: VCR 6.1.0
@@ -11,36 +11,55 @@ http_interactions:
11
11
  - application/json
12
12
  Accept:
13
13
  - application/json
14
- Client-Secret:
15
- - 9aBA8ZgsvR
16
- Access-Token:
17
- - ccaef817-d5d8-4b1c-a316-54f3e55c5c54
14
+ Authorization:
15
+ - "<AUTHORIZATION>"
16
+ Accept-Encoding:
17
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
18
+ User-Agent:
19
+ - Ruby
18
20
  response:
19
21
  status:
20
22
  code: 201
21
23
  message: Created
22
24
  headers:
23
- Server:
24
- - nginx
25
- Date:
26
- - Wed, 29 May 2019 07:52:49 GMT
27
25
  Content-Type:
28
26
  - application/json
29
- Connection:
30
- - close
27
+ Date:
28
+ - Mon, 30 Jan 2023 10:10:55 GMT
31
29
  Location:
32
30
  - invoices
31
+ X-Build:
32
+ - 16d854443d
33
+ X-Frame-Options:
34
+ - sameorigin
33
35
  X-Rack-Responsetime:
34
- - '94'
36
+ - '344'
35
37
  X-Uid:
36
- - d2fc2df6
37
- X-Build:
38
- - e930a91c78
38
+ - 5806b785
39
+ Transfer-Encoding:
40
+ - chunked
41
+ Server:
42
+ - Fortnox
43
+ X-Content-Type-Options:
44
+ - nosniff
45
+ X-Xss-Protection:
46
+ - '0'
47
+ Referrer-Policy:
48
+ - strict-origin-when-cross-origin
49
+ Content-Security-Policy:
50
+ - 'upgrade-insecure-requests;frame-ancestors https://*.fortnox.se;report-uri
51
+ /api/cspreport;connect-src ''self'' https://a.storyblok.com wss://*.fortnox.se
52
+ *.fortnox.se *.findity.com mybusiness.pwc.se themes.googleusercontent.com
53
+ s3.amazonaws.com/helpjuice-static/ *.helpjuice.com *.vimeo.com fonts.googleapis.com
54
+ fonts.gstatic.com api.cling.se wss://api.cling.se ''unsafe-inline'' ''unsafe-eval''
55
+ blob: data:'
56
+ Strict-Transport-Security:
57
+ - max-age=31536000; includeSubdomains
39
58
  body:
40
59
  encoding: UTF-8
41
- string: '{"Invoice":{"@url":"https:\/\/api.fortnox.se\/3\/invoices\/97","@urlTaxReductionList":"https:\/\/api.fortnox.se\/3\/taxreductions?filter=invoices&referencenumber=97","AdministrationFee":0,"AdministrationFeeVAT":0,"Address1":"","Address2":"","Balance":0,"BasisTaxReduction":0,"Booked":false,"Cancelled":false,"City":"","Comments":"","ContractReference":0,"ContributionPercent":0,"ContributionValue":0,"Country":"","CostCenter":"","Credit":"false","CreditInvoiceReference":0,"Currency":"SEK","CurrencyRate":1,"CurrencyUnit":1,"CustomerName":"Old
42
- name","CustomerNumber":"1","DeliveryAddress1":"","DeliveryAddress2":"","DeliveryCity":"","DeliveryCountry":"","DeliveryDate":null,"DeliveryName":"","DeliveryZipCode":"","DocumentNumber":"97","DueDate":"2019-05-29","EDIInformation":{"EDIGlobalLocationNumber":"","EDIGlobalLocationNumberDelivery":"","EDIInvoiceExtra1":"","EDIInvoiceExtra2":"","EDIOurElectronicReference":"","EDIYourElectronicReference":""},"EmailInformation":{"EmailAddressFrom":null,"EmailAddressTo":"","EmailAddressCC":null,"EmailAddressBCC":null,"EmailSubject":"Faktura
43
- {no} bifogas","EmailBody":" "},"EUQuarterlyReport":false,"ExternalInvoiceReference1":"","ExternalInvoiceReference2":"","Freight":0,"FreightVAT":0,"Gross":0,"HouseWork":false,"InvoiceDate":"2019-05-29","InvoicePeriodStart":"","InvoicePeriodEnd":"","InvoiceReference":0,"InvoiceRows":[],"InvoiceType":"INVOICE","Labels":[],"Language":"SV","LastRemindDate":null,"Net":0,"NotCompleted":false,"NoxFinans":false,"OCR":"426523791","OfferReference":0,"OrderReference":0,"OrganisationNumber":"860101-8735","OurReference":"","PaymentWay":"","Phone1":"","Phone2":"","PriceList":"A","PrintTemplate":"st","Project":"","WarehouseReady":true,"OutboundDate":"2019-05-29","Remarks":"","Reminders":0,"RoundOff":0,"Sent":false,"TaxReduction":null,"TermsOfDelivery":"","TermsOfPayment":0,"Total":0,"TotalToPay":0,"TotalVAT":0,"VATIncluded":false,"VoucherNumber":null,"VoucherSeries":null,"VoucherYear":null,"WayOfDelivery":"","YourOrderNumber":"","YourReference":"","ZipCode":"","AccountingMethod":"ACCRUAL","FinalPayDate":null}}'
44
- http_version:
45
- recorded_at: Wed, 29 May 2019 07:52:49 GMT
46
- recorded_with: VCR 4.0.0
60
+ string: '{"Invoice":{"@url":"https:\/\/api.fortnox.se\/3\/invoices\/21","@urlTaxReductionList":"https:\/\/api.fortnox.se\/3\/taxreductions?filter=invoices&referencenumber=21","AdministrationFee":0,"AdministrationFeeVAT":0,"Address1":"","Address2":"","Balance":0,"BasisTaxReduction":0,"Booked":false,"Cancelled":false,"City":"New
61
+ York","Comments":"","ContractReference":0,"ContributionPercent":0,"ContributionValue":0,"Country":"","CostCenter":"","Credit":"false","CreditInvoiceReference":"0","Currency":"SEK","CurrencyRate":1,"CurrencyUnit":1,"CustomerName":"Updated
62
+ name","CustomerNumber":"1","DeliveryAddress1":"","DeliveryAddress2":"","DeliveryCity":"","DeliveryCountry":"","DeliveryDate":null,"DeliveryName":"","DeliveryZipCode":"","DocumentNumber":"21","DueDate":"2023-03-01","EDIInformation":{"EDIGlobalLocationNumber":null,"EDIGlobalLocationNumberDelivery":null,"EDIInvoiceExtra1":null,"EDIInvoiceExtra2":null,"EDIOurElectronicReference":null,"EDIYourElectronicReference":null,"EDIStatus":""},"EmailInformation":{"EmailAddressFrom":null,"EmailAddressTo":"","EmailAddressCC":null,"EmailAddressBCC":null,"EmailSubject":"Faktura
63
+ {no} bifogas","EmailBody":" "},"EUQuarterlyReport":false,"ExternalInvoiceReference1":"","ExternalInvoiceReference2":"","Freight":0,"FreightVAT":0,"Gross":0,"HouseWork":false,"InvoiceDate":"2023-01-30","InvoicePeriodStart":"","InvoicePeriodEnd":"","InvoiceReference":"0","InvoiceRows":[],"InvoiceType":"INVOICE","Labels":[],"Language":"SV","LastRemindDate":null,"Net":0,"NotCompleted":false,"NoxFinans":false,"OCR":"426523791","OfferReference":"0","OrderReference":"0","OrganisationNumber":"","OurReference":"","PaymentWay":"","Phone1":"","Phone2":"","PriceList":"A","PrintTemplate":"st","Project":"","WarehouseReady":true,"OutboundDate":"2023-01-30","Remarks":"","Reminders":0,"RoundOff":0,"Sent":false,"TaxReduction":null,"TermsOfDelivery":"","TermsOfPayment":"30","TimeBasisReference":null,"Total":0,"TotalToPay":0,"TotalVAT":0,"VATIncluded":false,"VoucherNumber":null,"VoucherSeries":null,"VoucherYear":null,"WayOfDelivery":"","YourOrderNumber":"","YourReference":"","ZipCode":"10001","AccountingMethod":"ACCRUAL","FinalPayDate":null,"TaxReductionType":"none"}}'
64
+ recorded_at: Mon, 30 Jan 2023 10:10:55 GMT
65
+ recorded_with: VCR 6.1.0