accodeing/fortnox-api

View on GitHub
spec/vcr_cassettes/articles/save_new.yml

Summary

Maintainability
Test Coverage
---
http_interactions:
- request:
    method: post
    uri: https://api.fortnox.se/3/articles/
    body:
      encoding: UTF-8
      string: '{"Article":{"Description":"A value","SalesAccount":1250}}'
    headers:
      Content-Type:
      - application/json
      Accept:
      - application/json
      Authorization:
      - "<AUTHORIZATION>"
      Accept-Encoding:
      - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
      User-Agent:
      - Ruby
  response:
    status:
      code: 201
      message: Created
    headers:
      Content-Length:
      - '882'
      Content-Type:
      - application/json
      Date:
      - Mon, 30 Jan 2023 10:35:03 GMT
      Location:
      - articles
      X-Build:
      - 16d854443d
      X-Frame-Options:
      - sameorigin
      X-Rack-Responsetime:
      - '123'
      X-Uid:
      - 9425a369
      Server:
      - Fortnox
      X-Content-Type-Options:
      - nosniff
      X-Xss-Protection:
      - '0'
      Referrer-Policy:
      - strict-origin-when-cross-origin
      Content-Security-Policy:
      - 'upgrade-insecure-requests;frame-ancestors https://*.fortnox.se;report-uri
        /api/cspreport;connect-src ''self'' https://a.storyblok.com wss://*.fortnox.se
        *.fortnox.se *.findity.com mybusiness.pwc.se themes.googleusercontent.com
        s3.amazonaws.com/helpjuice-static/ *.helpjuice.com *.vimeo.com fonts.googleapis.com
        fonts.gstatic.com api.cling.se wss://api.cling.se ''unsafe-inline'' ''unsafe-eval''
        blob: data:'
      Strict-Transport-Security:
      - max-age=31536000; includeSubdomains
    body:
      encoding: UTF-8
      string: '{"Article":{"@url":"https:\/\/api.fortnox.se\/3\/articles\/102","ArticleNumber":"102","Bulky":false,"ConstructionAccount":0,"Depth":0,"Description":"A
        value","DisposableQuantity":0,"EAN":"","EUAccount":3108,"EUVATAccount":3106,"ExportAccount":3105,"Height":0,"Housework":false,"HouseworkType":null,"Active":true,"Manufacturer":null,"ManufacturerArticleNumber":"","Note":"","PurchaseAccount":4000,"PurchasePrice":0,"QuantityInStock":0,"ReservedQuantity":0,"SalesAccount":1250,"StockGoods":false,"StockPlace":null,"StockValue":0,"StockWarning":0,"SupplierName":null,"SupplierNumber":null,"Type":"STOCK","Unit":null,"VAT":0,"WebshopArticle":false,"Weight":0,"Width":0,"Expired":false,"SalesPrice":null,"CostCalculationMethod":null,"StockAccount":null,"StockChangeAccount":null,"DirectCost":null,"FreightCost":null,"OtherCost":null,"DefaultStockPoint":null,"DefaultStockLocation":null}}'
  recorded_at: Mon, 30 Jan 2023 10:35:03 GMT
recorded_with: VCR 6.1.0