From 9be0479d1ec4c5dc0a892d2b3a68223428bba213 Mon Sep 17 00:00:00 2001 From: Samuel Nilsson Date: Mon, 14 May 2018 22:03:07 +0200 Subject: [PATCH 1/6] Add mapper for metadata --- lib/fortnox/api/mappers/metadata.rb | 20 ++++++++++++++++++++ spec/fortnox/api/mappers/metadata_spec.rb | 15 +++++++++++++++ 2 files changed, 35 insertions(+) create mode 100644 lib/fortnox/api/mappers/metadata.rb create mode 100644 spec/fortnox/api/mappers/metadata_spec.rb diff --git a/lib/fortnox/api/mappers/metadata.rb b/lib/fortnox/api/mappers/metadata.rb new file mode 100644 index 00000000..958c9760 --- /dev/null +++ b/lib/fortnox/api/mappers/metadata.rb @@ -0,0 +1,20 @@ +# frozen_string_literal: true + +require 'fortnox/api/mappers/base' + +module Fortnox + module API + module Mapper + class Metadata < Fortnox::API::Mapper::Base + KEY_MAP = { + total_resources: '@TotalResources', + total_pages: '@TotalPages', + current_page: '@CurrentPage' + }.freeze + JSON_ENTITY_WRAPPER = 'MetaInformation' + end + + Registry.register(Metadata.canonical_name_sym, Metadata) + end + end +end diff --git a/spec/fortnox/api/mappers/metadata_spec.rb b/spec/fortnox/api/mappers/metadata_spec.rb new file mode 100644 index 00000000..19df3b2f --- /dev/null +++ b/spec/fortnox/api/mappers/metadata_spec.rb @@ -0,0 +1,15 @@ +# frozen_string_literal: true + +require 'spec_helper' +require 'fortnox/api' +require 'fortnox/api/mappers/metadata' +require 'fortnox/api/mappers/examples/mapper' + +describe Fortnox::API::Mapper::Metadata do + key_map = Fortnox::API::Mapper::Metadata::KEY_MAP + json_entity_type = 'MetaInformation' + + it_behaves_like 'mapper', key_map, json_entity_type, nil do + let(:mapper) { described_class.new } + end +end From d90e9ac383f54e0f0d389d9f1e1daf7bfbecee39 Mon Sep 17 00:00:00 2001 From: Samuel Nilsson Date: Mon, 14 May 2018 22:03:58 +0200 Subject: [PATCH 2/6] Add model for Metadata --- lib/fortnox/api/models.rb | 1 + lib/fortnox/api/models/metadata.rb | 17 +++++++++++++++++ spec/fortnox/api/models/metadata_spec.rb | 19 +++++++++++++++++++ 3 files changed, 37 insertions(+) create mode 100644 lib/fortnox/api/models/metadata.rb create mode 100644 spec/fortnox/api/models/metadata_spec.rb diff --git a/lib/fortnox/api/models.rb b/lib/fortnox/api/models.rb index 6d70e4c3..fcfe633a 100644 --- a/lib/fortnox/api/models.rb +++ b/lib/fortnox/api/models.rb @@ -7,3 +7,4 @@ require 'fortnox/api/models/project' require 'fortnox/api/models/unit' require 'fortnox/api/models/terms_of_payment' +require 'fortnox/api/models/metadata' diff --git a/lib/fortnox/api/models/metadata.rb b/lib/fortnox/api/models/metadata.rb new file mode 100644 index 00000000..9fbd1dcb --- /dev/null +++ b/lib/fortnox/api/models/metadata.rb @@ -0,0 +1,17 @@ +# frozen_string_literal: true + +require 'fortnox/api/types' + +module Fortnox + module API + module Model + class Metadata < Model::Base + STUB = {}.freeze + + attribute :current_page, Types::Required::Integer.is(:read_only) + attribute :total_resources, Types::Required::Integer.is(:read_only) + attribute :total_pages, Types::Required::Integer.is(:read_only) + end + end + end +end diff --git a/spec/fortnox/api/models/metadata_spec.rb b/spec/fortnox/api/models/metadata_spec.rb new file mode 100644 index 00000000..b167f241 --- /dev/null +++ b/spec/fortnox/api/models/metadata_spec.rb @@ -0,0 +1,19 @@ +# frozen_string_literal: true + +require 'spec_helper' +require 'fortnox/api/models/metadata' +require 'fortnox/api/models/examples/model' + +describe Fortnox::API::Model::Metadata, type: :model do + let(:required_attributes) do + { + current_page: 1, + total_resources: 2, + total_pages: 1 + } + end + + it 'can be initialized' do + expect { described_class.new(required_attributes) }.not_to raise_error + end +end From a932c5543b304e9af396c7da09a31eb3fe115dcb Mon Sep 17 00:00:00 2001 From: Samuel Nilsson Date: Mon, 14 May 2018 22:07:23 +0200 Subject: [PATCH 3/6] Set metadata on repository when instantiating collection --- lib/fortnox/api/repositories/base.rb | 4 +++- lib/fortnox/api/repositories/base/loaders.rb | 3 +++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/lib/fortnox/api/repositories/base.rb b/lib/fortnox/api/repositories/base.rb index 89bdbdd5..d2d363e2 100755 --- a/lib/fortnox/api/repositories/base.rb +++ b/lib/fortnox/api/repositories/base.rb @@ -4,6 +4,7 @@ require 'fortnox/api/request_handling' require 'fortnox/api/repositories/base/loaders' require 'fortnox/api/repositories/base/savers' +require 'fortnox/api/mappers/metadata' module Fortnox module API @@ -24,7 +25,7 @@ class Base HTTP_METHODS = %i[get put post delete].freeze attr_accessor :headers - attr_reader :mapper, :keys_filtered_on_save + attr_reader :mapper, :keys_filtered_on_save, :metadata def self.set_headers(headers = {}) # rubocop:disable Naming/AccessorMethodName self.headers.merge!(headers) @@ -49,6 +50,7 @@ def initialize(keys_filtered_on_save: [:url], token_store: :default) @keys_filtered_on_save = keys_filtered_on_save @token_store = token_store @mapper = Registry[Mapper::Base.canonical_name_sym(self.class::MODEL)].new + @metadata_mapper = Mapper::Metadata.new end def next_access_token diff --git a/lib/fortnox/api/repositories/base/loaders.rb b/lib/fortnox/api/repositories/base/loaders.rb index 2fae1347..7dc47825 100755 --- a/lib/fortnox/api/repositories/base/loaders.rb +++ b/lib/fortnox/api/repositories/base/loaders.rb @@ -53,6 +53,9 @@ def escape(key, value) private def instantiate_collection_response(response_hash) + metadata_hash = @metadata_mapper.wrapped_json_hash_to_entity_hash(response_hash) + @metadata = Model::Metadata.new(metadata_hash) + entities_hash = @mapper.wrapped_json_collection_to_entities_hash(response_hash) entities_hash.map do |entity_hash| instantiate(entity_hash) From 0586b8c138e64f26686060a46c756b8d9977b4f0 Mon Sep 17 00:00:00 2001 From: Samuel Nilsson Date: Mon, 14 May 2018 22:31:52 +0200 Subject: [PATCH 4/6] Add simple pagination implementation --- lib/fortnox/api/repositories/base.rb | 2 + lib/fortnox/api/repositories/base/loaders.rb | 11 +- .../api/repositories/base/pagination.rb | 25 ++ spec/fortnox/api/repositories/article_spec.rb | 2 +- spec/fortnox/api/repositories/base_spec.rb | 2 +- .../fortnox/api/repositories/customer_spec.rb | 2 +- spec/fortnox/api/repositories/invoice_spec.rb | 2 +- spec/fortnox/api/repositories/order_spec.rb | 2 +- spec/fortnox/api/repositories/project_spec.rb | 2 +- .../api/repositories/terms_of_payment_spec.rb | 2 +- spec/fortnox/api/repositories/unit_spec.rb | 2 +- spec/vcr_cassettes/articles/all.yml | 24 +- spec/vcr_cassettes/customers/all.yml | 292 +++++++++++++- spec/vcr_cassettes/invoices/all.yml | 41 +- spec/vcr_cassettes/orders/all.yml | 367 +++++++++++++++++- spec/vcr_cassettes/projects/all.yml | 21 +- spec/vcr_cassettes/termsofpayments/all.yml | 15 +- spec/vcr_cassettes/units/all.yml | 20 +- 18 files changed, 762 insertions(+), 72 deletions(-) create mode 100644 lib/fortnox/api/repositories/base/pagination.rb diff --git a/lib/fortnox/api/repositories/base.rb b/lib/fortnox/api/repositories/base.rb index d2d363e2..bf0693e5 100755 --- a/lib/fortnox/api/repositories/base.rb +++ b/lib/fortnox/api/repositories/base.rb @@ -4,6 +4,7 @@ require 'fortnox/api/request_handling' require 'fortnox/api/repositories/base/loaders' require 'fortnox/api/repositories/base/savers' +require 'fortnox/api/repositories/base/pagination' require 'fortnox/api/mappers/metadata' module Fortnox @@ -14,6 +15,7 @@ class Base include Fortnox::API::RequestHandling include Loaders include Savers + include Pagination HTTParty::Parser::SupportedFormats['text/html'] = :json diff --git a/lib/fortnox/api/repositories/base/loaders.rb b/lib/fortnox/api/repositories/base/loaders.rb index 7dc47825..1722084b 100755 --- a/lib/fortnox/api/repositories/base/loaders.rb +++ b/lib/fortnox/api/repositories/base/loaders.rb @@ -7,8 +7,15 @@ module API module Repository module Loaders def all - response_hash = get(self.class::URI) - instantiate_collection_response(response_hash) + results = [] + + loop do + response_hash = get(self.class::URI, query: { page: next_page }) + results += instantiate_collection_response(response_hash) + break if last_page? + end + + results end def only(filter) diff --git a/lib/fortnox/api/repositories/base/pagination.rb b/lib/fortnox/api/repositories/base/pagination.rb new file mode 100644 index 00000000..67022193 --- /dev/null +++ b/lib/fortnox/api/repositories/base/pagination.rb @@ -0,0 +1,25 @@ +# frozen_string_literal: true + +module Fortnox + module API + module Repository + module Pagination + def last_page? + current_page == total_pages + end + + def next_page + current_page + 1 + end + + def current_page + metadata&.current_page || 0 + end + + def total_pages + metadata&.total_pages || 0 + end + end + end + end +end diff --git a/spec/fortnox/api/repositories/article_spec.rb b/spec/fortnox/api/repositories/article_spec.rb index 06be5770..8c587fef 100755 --- a/spec/fortnox/api/repositories/article_spec.rb +++ b/spec/fortnox/api/repositories/article_spec.rb @@ -26,7 +26,7 @@ :ean, '5901234123457' - include_examples '.all', 12 + include_examples '.all', 20 include_examples '.find', '1' do let(:find_by_hash_failure) { { description: 'Not Found' } } diff --git a/spec/fortnox/api/repositories/base_spec.rb b/spec/fortnox/api/repositories/base_spec.rb index c47d8a74..a4a45d68 100755 --- a/spec/fortnox/api/repositories/base_spec.rb +++ b/spec/fortnox/api/repositories/base_spec.rb @@ -328,7 +328,7 @@ class Test < Fortnox::API::Repository::Base context 'when raising error from remote server' do error_message = 'Räkenskapsår finns inte upplagt. '\ - 'För att kunna skapa en faktura krävs det att det finns ett räkenskapsår' + 'För att kunna skapa en faktura krävs det att det finns ett räkenskapsår' before do Fortnox::API.configure do |conf| diff --git a/spec/fortnox/api/repositories/customer_spec.rb b/spec/fortnox/api/repositories/customer_spec.rb index 028291ea..d05792bb 100755 --- a/spec/fortnox/api/repositories/customer_spec.rb +++ b/spec/fortnox/api/repositories/customer_spec.rb @@ -27,7 +27,7 @@ # It is not yet possible to delete Customers. Therefore, expected nr of # Customers when running .all will continue to increase # (until 100, which is max by default). - include_examples '.all', 100 + include_examples '.all', 209 include_examples '.find', '1' do let(:find_by_hash_failure) { { city: 'Not Found' } } diff --git a/spec/fortnox/api/repositories/invoice_spec.rb b/spec/fortnox/api/repositories/invoice_spec.rb index e01dfe84..2dd68d6a 100644 --- a/spec/fortnox/api/repositories/invoice_spec.rb +++ b/spec/fortnox/api/repositories/invoice_spec.rb @@ -37,7 +37,7 @@ # It is not possible to delete Invoces. Therefore, expected nr of Orders # when running .all will continue to increase (until 100, which is max by default). - include_examples '.all', 60 + include_examples '.all', 84 include_examples '.find', 1 do let(:find_by_hash_failure) { { yourreference: 'Not found' } } diff --git a/spec/fortnox/api/repositories/order_spec.rb b/spec/fortnox/api/repositories/order_spec.rb index 29cde19d..efe5a42e 100644 --- a/spec/fortnox/api/repositories/order_spec.rb +++ b/spec/fortnox/api/repositories/order_spec.rb @@ -31,7 +31,7 @@ # It is not possible to delete Orders. Therefore, expected nr of Orders # when running .all will continue to increase (until 100, which is max by default). - include_examples '.all', 100 + include_examples '.all', 325 include_examples '.find', 1 do let(:find_by_hash_failure) { { ourreference: 'Not found' } } diff --git a/spec/fortnox/api/repositories/project_spec.rb b/spec/fortnox/api/repositories/project_spec.rb index 701c0133..cd3c6afe 100644 --- a/spec/fortnox/api/repositories/project_spec.rb +++ b/spec/fortnox/api/repositories/project_spec.rb @@ -22,7 +22,7 @@ # It is not yet possible to delete Projects. Therefore, expected nr of # Projects when running .all will continue to increase # (until 100, which is max by default). - include_examples '.all', 8 + include_examples '.all', 26 include_examples '.find', '1' do let(:find_by_hash_failure) { { offset: 10_000 } } diff --git a/spec/fortnox/api/repositories/terms_of_payment_spec.rb b/spec/fortnox/api/repositories/terms_of_payment_spec.rb index 7eb76443..e688f346 100644 --- a/spec/fortnox/api/repositories/terms_of_payment_spec.rb +++ b/spec/fortnox/api/repositories/terms_of_payment_spec.rb @@ -21,7 +21,7 @@ include_examples '.save', :description, additional_attrs: required_hash - include_examples '.all', 9 + include_examples '.all', 10 include_examples '.find', '15DAYS', find_by_hash: false do let(:find_by_hash_failure) { { code: '15days' } } diff --git a/spec/fortnox/api/repositories/unit_spec.rb b/spec/fortnox/api/repositories/unit_spec.rb index fc5324ba..22e20d5a 100644 --- a/spec/fortnox/api/repositories/unit_spec.rb +++ b/spec/fortnox/api/repositories/unit_spec.rb @@ -25,7 +25,7 @@ :code, 'woooh' - include_examples '.all', 6 + include_examples '.all', 8 include_examples '.find', 'blarg', find_by_hash: false do let(:find_by_hash_failure) { { code: 'notfound' } } diff --git a/spec/vcr_cassettes/articles/all.yml b/spec/vcr_cassettes/articles/all.yml index 83ea00f2..06d36bd3 100644 --- a/spec/vcr_cassettes/articles/all.yml +++ b/spec/vcr_cassettes/articles/all.yml @@ -2,7 +2,7 @@ http_interactions: - request: method: get - uri: https://api.fortnox.se/3/articles/ + uri: https://api.fortnox.se/3/articles/?page=1 body: encoding: US-ASCII string: '' @@ -23,7 +23,7 @@ http_interactions: Server: - nginx Date: - - Sun, 08 Oct 2017 21:51:31 GMT + - Mon, 14 May 2018 19:17:33 GMT Content-Type: - application/json Connection: @@ -32,14 +32,14 @@ http_interactions: - Accept-Encoding - Accept-Encoding X-Rack-Responsetime: - - '21' + - '52' X-Uid: - - 1aa0352f + - e3215349 X-Build: - - e1392b4cf7 + - 06fdff7705 body: encoding: UTF-8 - string: '{"MetaInformation":{"@TotalResources":12,"@TotalPages":1,"@CurrentPage":1},"Articles":[{"@url":"https:\/\/api.fortnox.se\/3\/articles\/0000","ArticleNumber":"0000","Description":"Testartikel","DisposableQuantity":"0","EAN":"","Housework":false,"PurchasePrice":"0","SalesPrice":null,"QuantityInStock":"0","ReservedQuantity":"0","StockPlace":"","StockValue":"0","Unit":null,"VAT":null,"WebshopArticle":false},{"@url":"https:\/\/api.fortnox.se\/3\/articles\/0001","ArticleNumber":"0001","Description":"Cykelpump","DisposableQuantity":"0","EAN":"","Housework":false,"PurchasePrice":"0","SalesPrice":"100","QuantityInStock":"0","ReservedQuantity":"0","StockPlace":"","StockValue":"0","Unit":null,"VAT":null,"WebshopArticle":false},{"@url":"https:\/\/api.fortnox.se\/3\/articles\/1","ArticleNumber":"1","Description":"Testartikel","DisposableQuantity":"0","EAN":"","Housework":false,"PurchasePrice":"0","SalesPrice":"100","QuantityInStock":"0","ReservedQuantity":"0","StockPlace":"","StockValue":"0","Unit":null,"VAT":null,"WebshopArticle":false},{"@url":"https:\/\/api.fortnox.se\/3\/articles\/2","ArticleNumber":"2","Description":"A + string: '{"MetaInformation":{"@TotalResources":20,"@TotalPages":1,"@CurrentPage":1},"Articles":[{"@url":"https:\/\/api.fortnox.se\/3\/articles\/0000","ArticleNumber":"0000","Description":"Testartikel","DisposableQuantity":"0","EAN":"","Housework":false,"PurchasePrice":"0","SalesPrice":null,"QuantityInStock":"0","ReservedQuantity":"0","StockPlace":"","StockValue":"0","Unit":null,"VAT":null,"WebshopArticle":false},{"@url":"https:\/\/api.fortnox.se\/3\/articles\/0001","ArticleNumber":"0001","Description":"Cykelpump","DisposableQuantity":"0","EAN":"","Housework":false,"PurchasePrice":"0","SalesPrice":"100","QuantityInStock":"0","ReservedQuantity":"0","StockPlace":"","StockValue":"0","Unit":null,"VAT":null,"WebshopArticle":false},{"@url":"https:\/\/api.fortnox.se\/3\/articles\/1","ArticleNumber":"1","Description":"Testartikel","DisposableQuantity":"0","EAN":"","Housework":false,"PurchasePrice":"0","SalesPrice":"100","QuantityInStock":"0","ReservedQuantity":"0","StockPlace":"","StockValue":"0","Unit":null,"VAT":null,"WebshopArticle":false},{"@url":"https:\/\/api.fortnox.se\/3\/articles\/2","ArticleNumber":"2","Description":"A value","DisposableQuantity":"0","EAN":"","Housework":false,"PurchasePrice":"0","SalesPrice":null,"QuantityInStock":"0","ReservedQuantity":"0","StockPlace":null,"StockValue":"0","Unit":"","VAT":null,"WebshopArticle":false},{"@url":"https:\/\/api.fortnox.se\/3\/articles\/3","ArticleNumber":"3","Description":"Test article","DisposableQuantity":"0","EAN":"","Housework":false,"PurchasePrice":"0","SalesPrice":null,"QuantityInStock":"0","ReservedQuantity":"0","StockPlace":null,"StockValue":"0","Unit":"","VAT":null,"WebshopArticle":false},{"@url":"https:\/\/api.fortnox.se\/3\/articles\/4","ArticleNumber":"4","Description":"Test article","DisposableQuantity":"0","EAN":"","Housework":false,"PurchasePrice":"0","SalesPrice":null,"QuantityInStock":"0","ReservedQuantity":"0","StockPlace":null,"StockValue":"0","Unit":"","VAT":null,"WebshopArticle":false},{"@url":"https:\/\/api.fortnox.se\/3\/articles\/5","ArticleNumber":"5","Description":"Test @@ -48,7 +48,15 @@ http_interactions: article","DisposableQuantity":"0","EAN":"5901234123457","Housework":false,"PurchasePrice":"0","SalesPrice":null,"QuantityInStock":"0","ReservedQuantity":"0","StockPlace":null,"StockValue":"0","Unit":"","VAT":null,"WebshopArticle":false},{"@url":"https:\/\/api.fortnox.se\/3\/articles\/8","ArticleNumber":"8","Description":"A value","DisposableQuantity":"0","EAN":"","Housework":false,"PurchasePrice":"0","SalesPrice":null,"QuantityInStock":"0","ReservedQuantity":"0","StockPlace":null,"StockValue":"0","Unit":"","VAT":null,"WebshopArticle":false},{"@url":"https:\/\/api.fortnox.se\/3\/articles\/9","ArticleNumber":"9","Description":"A value","DisposableQuantity":"0","EAN":"","Housework":false,"PurchasePrice":"0","SalesPrice":null,"QuantityInStock":"0","ReservedQuantity":"0","StockPlace":null,"StockValue":"0","Unit":"","VAT":null,"WebshopArticle":false},{"@url":"https:\/\/api.fortnox.se\/3\/articles\/10","ArticleNumber":"10","Description":"Abc - 123","DisposableQuantity":"0","EAN":"","Housework":false,"PurchasePrice":"0","SalesPrice":null,"QuantityInStock":"0","ReservedQuantity":"0","StockPlace":null,"StockValue":"0","Unit":"","VAT":null,"WebshopArticle":false}]}' + 123","DisposableQuantity":"0","EAN":"","Housework":false,"PurchasePrice":"0","SalesPrice":null,"QuantityInStock":"0","ReservedQuantity":"0","StockPlace":null,"StockValue":"0","Unit":"","VAT":null,"WebshopArticle":false},{"@url":"https:\/\/api.fortnox.se\/3\/articles\/11","ArticleNumber":"11","Description":"A + value","DisposableQuantity":"0","EAN":"","Housework":false,"PurchasePrice":"0","SalesPrice":null,"QuantityInStock":"0","ReservedQuantity":"0","StockPlace":null,"StockValue":"0","Unit":"","VAT":null,"WebshopArticle":false},{"@url":"https:\/\/api.fortnox.se\/3\/articles\/12","ArticleNumber":"12","Description":"Test + article","DisposableQuantity":"0","EAN":"5901234123457","Housework":false,"PurchasePrice":"0","SalesPrice":null,"QuantityInStock":"0","ReservedQuantity":"0","StockPlace":null,"StockValue":"0","Unit":"","VAT":null,"WebshopArticle":false},{"@url":"https:\/\/api.fortnox.se\/3\/articles\/13","ArticleNumber":"13","Description":"Test + article","DisposableQuantity":"0","EAN":"5901234123457","Housework":false,"PurchasePrice":"0","SalesPrice":null,"QuantityInStock":"0","ReservedQuantity":"0","StockPlace":null,"StockValue":"0","Unit":"","VAT":null,"WebshopArticle":false},{"@url":"https:\/\/api.fortnox.se\/3\/articles\/14","ArticleNumber":"14","Description":"A + value","DisposableQuantity":"0","EAN":"","Housework":false,"PurchasePrice":"0","SalesPrice":null,"QuantityInStock":"0","ReservedQuantity":"0","StockPlace":null,"StockValue":"0","Unit":"","VAT":null,"WebshopArticle":false},{"@url":"https:\/\/api.fortnox.se\/3\/articles\/15","ArticleNumber":"15","Description":"A + value","DisposableQuantity":"0","EAN":"","Housework":false,"PurchasePrice":"0","SalesPrice":null,"QuantityInStock":"0","ReservedQuantity":"0","StockPlace":null,"StockValue":"0","Unit":"","VAT":null,"WebshopArticle":false},{"@url":"https:\/\/api.fortnox.se\/3\/articles\/16","ArticleNumber":"16","Description":"Test + article","DisposableQuantity":"0","EAN":"5901234123457","Housework":false,"PurchasePrice":"0","SalesPrice":null,"QuantityInStock":"0","ReservedQuantity":"0","StockPlace":null,"StockValue":"0","Unit":"","VAT":null,"WebshopArticle":false},{"@url":"https:\/\/api.fortnox.se\/3\/articles\/17","ArticleNumber":"17","Description":"A + value","DisposableQuantity":"0","EAN":"","Housework":false,"PurchasePrice":"0","SalesPrice":null,"QuantityInStock":"0","ReservedQuantity":"0","StockPlace":null,"StockValue":"0","Unit":"","VAT":null,"WebshopArticle":false},{"@url":"https:\/\/api.fortnox.se\/3\/articles\/18","ArticleNumber":"18","Description":"Updated + description","DisposableQuantity":"0","EAN":"","Housework":false,"PurchasePrice":"0","SalesPrice":null,"QuantityInStock":"0","ReservedQuantity":"0","StockPlace":null,"StockValue":"0","Unit":null,"VAT":null,"WebshopArticle":false}]}' http_version: - recorded_at: Sun, 08 Oct 2017 21:51:31 GMT + recorded_at: Mon, 14 May 2018 19:17:33 GMT recorded_with: VCR 3.0.3 diff --git a/spec/vcr_cassettes/customers/all.yml b/spec/vcr_cassettes/customers/all.yml index e07c8fd9..6ed1bc2b 100644 --- a/spec/vcr_cassettes/customers/all.yml +++ b/spec/vcr_cassettes/customers/all.yml @@ -2,7 +2,7 @@ http_interactions: - request: method: get - uri: https://api.fortnox.se/3/customers/ + uri: https://api.fortnox.se/3/customers/?page=1 body: encoding: US-ASCII string: '' @@ -23,7 +23,7 @@ http_interactions: Server: - nginx Date: - - Tue, 25 Oct 2016 10:21:50 GMT + - Mon, 14 May 2018 19:17:34 GMT Content-Type: - application/json Connection: @@ -32,17 +32,17 @@ http_interactions: - Accept-Encoding - Accept-Encoding X-Rack-Responsetime: - - '24' + - '20' X-Uid: - - 325442f1 + - acfda647 X-Build: - - 76600b8d0c + - 06fdff7705 body: encoding: UTF-8 - string: '{"MetaInformation":{"@TotalResources":146,"@TotalPages":2,"@CurrentPage":1},"Customers":[{"@url":"https:\/\/api.fortnox.se\/3\/customers\/1","Address1":"","Address2":"","City":"","CustomerNumber":"1","Email":"","Name":"Old - name","OrganisationNumber":"860101-8735","Phone":"","ZipCode":""},{"@url":"https:\/\/api.fortnox.se\/3\/customers\/2","Address1":"","Address2":"","City":"","CustomerNumber":"2","Email":"","Name":"A - customer","OrganisationNumber":"600102-7447","Phone":"","ZipCode":""},{"@url":"https:\/\/api.fortnox.se\/3\/customers\/3","Address1":"","Address2":"","City":"","CustomerNumber":"3","Email":"","Name":"Test - customer","OrganisationNumber":"400101-8383","Phone":"","ZipCode":""},{"@url":"https:\/\/api.fortnox.se\/3\/customers\/4","Address1":"","Address2":"","City":"","CustomerNumber":"4","Email":"","Name":"Arthur + string: '{"MetaInformation":{"@TotalResources":209,"@TotalPages":3,"@CurrentPage":1},"Customers":[{"@url":"https:\/\/api.fortnox.se\/3\/customers\/1","Address1":"","Address2":"","City":"","CustomerNumber":"1","Email":"","Name":"Old + name","OrganisationNumber":"860101-8735","Phone":"","ZipCode":""},{"@url":"https:\/\/api.fortnox.se\/3\/customers\/2","Address1":"","Address2":"","City":"New + York","CustomerNumber":"2","Email":"","Name":"A customer","OrganisationNumber":"600102-7447","Phone":"","ZipCode":"10001"},{"@url":"https:\/\/api.fortnox.se\/3\/customers\/3","Address1":"","Address2":"","City":"New + York","CustomerNumber":"3","Email":"","Name":"Test customer","OrganisationNumber":"400101-8383","Phone":"","ZipCode":""},{"@url":"https:\/\/api.fortnox.se\/3\/customers\/4","Address1":"","Address2":"","City":"","CustomerNumber":"4","Email":"","Name":"Arthur Dent","OrganisationNumber":"","Phone":"","ZipCode":""},{"@url":"https:\/\/api.fortnox.se\/3\/customers\/5","Address1":"","Address2":"","City":"","CustomerNumber":"5","Email":"","Name":"Arthur Dent","OrganisationNumber":"","Phone":"","ZipCode":""},{"@url":"https:\/\/api.fortnox.se\/3\/customers\/6","Address1":"","Address2":"","City":"","CustomerNumber":"6","Email":"","Name":"Arthur Dent","OrganisationNumber":"","Phone":"","ZipCode":""},{"@url":"https:\/\/api.fortnox.se\/3\/customers\/7","Address1":"","Address2":"","City":"","CustomerNumber":"7","Email":"","Name":"Arthur @@ -153,5 +153,275 @@ http_interactions: 6","Address2":"","City":"teststan","CustomerNumber":"100","Email":"test@email.com","Name":"test12313","OrganisationNumber":"","Phone":"123141","ZipCode":"111 11"}]}' http_version: - recorded_at: Tue, 25 Oct 2016 10:21:50 GMT -recorded_with: VCR 3.0.1 + recorded_at: Mon, 14 May 2018 19:17:34 GMT +- request: + method: get + uri: https://api.fortnox.se/3/customers/?page=2 + body: + encoding: US-ASCII + string: '' + headers: + Content-Type: + - application/json + Accept: + - application/json + Client-Secret: + - 9aBA8ZgsvR + Access-Token: + - ccaef817-d5d8-4b1c-a316-54f3e55c5c54 + response: + status: + code: 200 + message: OK + headers: + Server: + - nginx + Date: + - Mon, 14 May 2018 19:17:34 GMT + Content-Type: + - application/json + Connection: + - close + Vary: + - Accept-Encoding + - Accept-Encoding + X-Rack-Responsetime: + - '16' + X-Uid: + - dfc7aab9 + X-Build: + - 06fdff7705 + body: + encoding: UTF-8 + string: '{"MetaInformation":{"@TotalResources":209,"@TotalPages":3,"@CurrentPage":2},"Customers":[{"@url":"https:\/\/api.fortnox.se\/3\/customers\/101","Address1":"F\u00e4llev\u00e4gen + 7","Address2":"","City":"Kramfors","CustomerNumber":"101","Email":"nilsolofsson@live.se","Name":"Nils + Olofsson","OrganisationNumber":"1990-01-01","Phone":"+46761312268","ZipCode":"872 + 43"},{"@url":"https:\/\/api.fortnox.se\/3\/customers\/102","Address1":"Some + long and complicated address","Address2":"","City":"Paris","CustomerNumber":"102","Email":"an_email-address@email.com","Name":"A + company","OrganisationNumber":"","Phone":"Phone number 123","ZipCode":"A zip + code"},{"@url":"https:\/\/api.fortnox.se\/3\/customers\/103","Address1":"","Address2":"","City":"","CustomerNumber":"103","Email":"","Name":"123","OrganisationNumber":"","Phone":"","ZipCode":""},{"@url":"https:\/\/api.fortnox.se\/3\/customers\/104","Address1":"","Address2":"","City":"","CustomerNumber":"104","Email":"","Name":"132","OrganisationNumber":"","Phone":"","ZipCode":""},{"@url":"https:\/\/api.fortnox.se\/3\/customers\/105","Address1":"BOX + 44","Address2":"","City":"TINGSRYD","CustomerNumber":"105","Email":"","Name":"BolagsBemanning + i Tingsryd AB","OrganisationNumber":"556716-1855","Phone":"","ZipCode":"36221"},{"@url":"https:\/\/api.fortnox.se\/3\/customers\/106","Address1":"Myrliden + 10","Address2":"","City":"Mullsj\u00f6","CustomerNumber":"106","Email":"","Name":"Hannes + Elvemyr","OrganisationNumber":"1990-01-01","Phone":"","ZipCode":"565 32"},{"@url":"https:\/\/api.fortnox.se\/3\/customers\/107","Address1":"BOX + 44","Address2":"","City":"TINGSRYD","CustomerNumber":"107","Email":"","Name":"BolagsBemanning + i Tingsryd AB","OrganisationNumber":"556716-1855","Phone":"","ZipCode":"36221"},{"@url":"https:\/\/api.fortnox.se\/3\/customers\/108","Address1":"Myrliden + 10","Address2":"","City":"Mullsj\u00f6","CustomerNumber":"108","Email":"","Name":"Hannes + Elvemyr","OrganisationNumber":"1990-01-01","Phone":"","ZipCode":"565 32"},{"@url":"https:\/\/api.fortnox.se\/3\/customers\/109","Address1":"","Address2":"","City":"","CustomerNumber":"109","Email":"","Name":"Test + customer","OrganisationNumber":"","Phone":"","ZipCode":""},{"@url":"https:\/\/api.fortnox.se\/3\/customers\/110","Address1":"","Address2":"","City":"","CustomerNumber":"110","Email":"","Name":"Test + customer","OrganisationNumber":"","Phone":"","ZipCode":""},{"@url":"https:\/\/api.fortnox.se\/3\/customers\/111","Address1":"","Address2":"","City":"","CustomerNumber":"111","Email":"","Name":"Test + customer","OrganisationNumber":"","Phone":"","ZipCode":""},{"@url":"https:\/\/api.fortnox.se\/3\/customers\/112","Address1":"","Address2":"","City":"","CustomerNumber":"112","Email":"","Name":"Test + customer","OrganisationNumber":"","Phone":"","ZipCode":""},{"@url":"https:\/\/api.fortnox.se\/3\/customers\/113","Address1":"","Address2":"","City":"","CustomerNumber":"113","Email":"","Name":"Test + customer","OrganisationNumber":"","Phone":"","ZipCode":""},{"@url":"https:\/\/api.fortnox.se\/3\/customers\/114","Address1":"","Address2":"","City":"","CustomerNumber":"114","Email":"","Name":"Easy + Translate Ltd","OrganisationNumber":"","Phone":"","ZipCode":""},{"@url":"https:\/\/api.fortnox.se\/3\/customers\/115","Address1":"","Address2":"","City":"","CustomerNumber":"115","Email":"","Name":"Updated + name","OrganisationNumber":"","Phone":"","ZipCode":""},{"@url":"https:\/\/api.fortnox.se\/3\/customers\/116","Address1":"","Address2":"","City":"","CustomerNumber":"116","Email":"","Name":"A + value","OrganisationNumber":"","Phone":"","ZipCode":""},{"@url":"https:\/\/api.fortnox.se\/3\/customers\/117","Address1":"","Address2":"","City":"","CustomerNumber":"117","Email":"","Name":"Test + customer","OrganisationNumber":"","Phone":"","ZipCode":""},{"@url":"https:\/\/api.fortnox.se\/3\/customers\/118","Address1":"","Address2":"","City":"","CustomerNumber":"118","Email":"","Name":"A + value","OrganisationNumber":"","Phone":"","ZipCode":""},{"@url":"https:\/\/api.fortnox.se\/3\/customers\/119","Address1":"","Address2":"","City":"","CustomerNumber":"119","Email":"","Name":"Test + customer","OrganisationNumber":"","Phone":"","ZipCode":""},{"@url":"https:\/\/api.fortnox.se\/3\/customers\/120","Address1":"","Address2":"","City":"","CustomerNumber":"120","Email":"","Name":"Updated + name","OrganisationNumber":"","Phone":"","ZipCode":""},{"@url":"https:\/\/api.fortnox.se\/3\/customers\/121","Address1":"","Address2":"","City":"","CustomerNumber":"121","Email":"","Name":"Test + customer","OrganisationNumber":"","Phone":"","ZipCode":""},{"@url":"https:\/\/api.fortnox.se\/3\/customers\/122","Address1":"","Address2":"","City":"","CustomerNumber":"122","Email":"","Name":"Arthur + Dent","OrganisationNumber":"","Phone":"","ZipCode":""},{"@url":"https:\/\/api.fortnox.se\/3\/customers\/123","Address1":"Some + long and complicated address","Address2":"","City":"Paris","CustomerNumber":"123","Email":"an_email-address@email.com","Name":"A + company","OrganisationNumber":"001122-1122","Phone":"Phone number 123","ZipCode":"A + zip code"},{"@url":"https:\/\/api.fortnox.se\/3\/customers\/124","Address1":"Some + long and complicated address","Address2":"","City":"Paris","CustomerNumber":"124","Email":"an_email-address@email.com","Name":"A + company","OrganisationNumber":"","Phone":"Phone number 123","ZipCode":"A zip + code"},{"@url":"https:\/\/api.fortnox.se\/3\/customers\/125","Address1":"Some + long and complicated address","Address2":"","City":"Paris","CustomerNumber":"125","Email":"an_email-address@email.com","Name":"A + company","OrganisationNumber":"","Phone":"Phone number 123","ZipCode":"A zip + code"},{"@url":"https:\/\/api.fortnox.se\/3\/customers\/126","Address1":"Myrliden + 10","Address2":"","City":"Mullsj\u00f6","CustomerNumber":"126","Email":"","Name":"Hannes + Elvemyr","OrganisationNumber":"1990-01-01","Phone":"","ZipCode":"565 32"},{"@url":"https:\/\/api.fortnox.se\/3\/customers\/127","Address1":"BOX + 44","Address2":"","City":"TINGSRYD","CustomerNumber":"127","Email":"","Name":"BolagsBemanning + i Tingsryd AB","OrganisationNumber":"556716-1855","Phone":"","ZipCode":"36221"},{"@url":"https:\/\/api.fortnox.se\/3\/customers\/128","Address1":"Myrliden + 10","Address2":"","City":"Mullsj\u00f6","CustomerNumber":"128","Email":"","Name":"Hannes + Elvemyr","OrganisationNumber":"1990-01-01","Phone":"","ZipCode":"565 32"},{"@url":"https:\/\/api.fortnox.se\/3\/customers\/129","Address1":"BOX + 44","Address2":"","City":"TINGSRYD","CustomerNumber":"129","Email":"","Name":"BolagsBemanning + i Tingsryd AB","OrganisationNumber":"556716-1855","Phone":"","ZipCode":"36221"},{"@url":"https:\/\/api.fortnox.se\/3\/customers\/130","Address1":"Some + long and complicated address","Address2":"","City":"Paris","CustomerNumber":"130","Email":"an_email-address@email.com","Name":"A + company","OrganisationNumber":"","Phone":"Phone number 123","ZipCode":"A zip + code"},{"@url":"https:\/\/api.fortnox.se\/3\/customers\/131","Address1":"Myrliden + 10","Address2":"","City":"Mullsj\u00f6","CustomerNumber":"131","Email":"","Name":"Hannes + Elvemyr","OrganisationNumber":"1990-01-01","Phone":"","ZipCode":"565 32"},{"@url":"https:\/\/api.fortnox.se\/3\/customers\/132","Address1":"Some + long and complicated address","Address2":"","City":"Paris","CustomerNumber":"132","Email":"an_email-address@email.com","Name":"A + company","OrganisationNumber":"","Phone":"Phone number 123","ZipCode":"A zip + code"},{"@url":"https:\/\/api.fortnox.se\/3\/customers\/133","Address1":"Some + long and complicated address","Address2":"","City":"Paris","CustomerNumber":"133","Email":"an_email-address@email.com","Name":"A + company","OrganisationNumber":"001122-1122","Phone":"Phone number 123","ZipCode":"A + zip code"},{"@url":"https:\/\/api.fortnox.se\/3\/customers\/134","Address1":"","Address2":"","City":"","CustomerNumber":"134","Email":"","Name":"Arthur + Dent","OrganisationNumber":"","Phone":"","ZipCode":""},{"@url":"https:\/\/api.fortnox.se\/3\/customers\/135","Address1":"","Address2":"","City":"","CustomerNumber":"135","Email":"","Name":"Updated + name","OrganisationNumber":"","Phone":"","ZipCode":""},{"@url":"https:\/\/api.fortnox.se\/3\/customers\/136","Address1":"","Address2":"","City":"","CustomerNumber":"136","Email":"","Name":"Test + customer","OrganisationNumber":"","Phone":"","ZipCode":""},{"@url":"https:\/\/api.fortnox.se\/3\/customers\/137","Address1":"","Address2":"","City":"","CustomerNumber":"137","Email":"","Name":"Updated + name","OrganisationNumber":"","Phone":"","ZipCode":""},{"@url":"https:\/\/api.fortnox.se\/3\/customers\/138","Address1":"","Address2":"","City":"","CustomerNumber":"138","Email":"","Name":"Test + customer","OrganisationNumber":"","Phone":"","ZipCode":""},{"@url":"https:\/\/api.fortnox.se\/3\/customers\/139","Address1":"","Address2":"","City":"","CustomerNumber":"139","Email":"","Name":"Updated + name","OrganisationNumber":"","Phone":"","ZipCode":""},{"@url":"https:\/\/api.fortnox.se\/3\/customers\/140","Address1":"","Address2":"","City":"","CustomerNumber":"140","Email":"","Name":"Test + customer","OrganisationNumber":"","Phone":"","ZipCode":""},{"@url":"https:\/\/api.fortnox.se\/3\/customers\/141","Address1":"","Address2":"","City":"","CustomerNumber":"141","Email":"","Name":"Updated + name","OrganisationNumber":"","Phone":"","ZipCode":""},{"@url":"https:\/\/api.fortnox.se\/3\/customers\/142","Address1":"","Address2":"","City":"","CustomerNumber":"142","Email":"","Name":"Test + customer","OrganisationNumber":"","Phone":"","ZipCode":""},{"@url":"https:\/\/api.fortnox.se\/3\/customers\/143","Address1":"","Address2":"","City":"","CustomerNumber":"143","Email":"","Name":"Updated + name","OrganisationNumber":"","Phone":"","ZipCode":""},{"@url":"https:\/\/api.fortnox.se\/3\/customers\/144","Address1":"","Address2":"","City":"","CustomerNumber":"144","Email":"","Name":"Test + customer","OrganisationNumber":"","Phone":"","ZipCode":""},{"@url":"https:\/\/api.fortnox.se\/3\/customers\/145","Address1":"","Address2":"","City":"","CustomerNumber":"145","Email":"","Name":"Updated + name","OrganisationNumber":"","Phone":"","ZipCode":""},{"@url":"https:\/\/api.fortnox.se\/3\/customers\/146","Address1":"","Address2":"","City":"","CustomerNumber":"146","Email":"","Name":"Test + customer","OrganisationNumber":"","Phone":"","ZipCode":""},{"@url":"https:\/\/api.fortnox.se\/3\/customers\/147","Address1":"Some + long and complicated address","Address2":"","City":"Paris","CustomerNumber":"147","Email":"an_email-address@email.com","Name":"A + company","OrganisationNumber":"001122-1122","Phone":"Phone number 123","ZipCode":"A + zip code"},{"@url":"https:\/\/api.fortnox.se\/3\/customers\/148","Address1":"","Address2":"","City":"","CustomerNumber":"148","Email":"","Name":"Arthur + Dent","OrganisationNumber":"","Phone":"","ZipCode":""},{"@url":"https:\/\/api.fortnox.se\/3\/customers\/149","Address1":"BOX + 44","Address2":"","City":"TINGSRYD","CustomerNumber":"149","Email":"","Name":"BolagsBemanning + i Tingsryd AB","OrganisationNumber":"556716-1855","Phone":"","ZipCode":"36221"},{"@url":"https:\/\/api.fortnox.se\/3\/customers\/150","Address1":"BOX + 44","Address2":"","City":"TINGSRYD","CustomerNumber":"150","Email":"","Name":"BolagsBemanning + i Tingsryd AB","OrganisationNumber":"556716-1855","Phone":"","ZipCode":"36221"},{"@url":"https:\/\/api.fortnox.se\/3\/customers\/151","Address1":"Some + long and complicated address","Address2":"","City":"Paris","CustomerNumber":"151","Email":"an_email-address@email.com","Name":"A + company","OrganisationNumber":"","Phone":"Phone number 123","ZipCode":"A zip + code"},{"@url":"https:\/\/api.fortnox.se\/3\/customers\/152","Address1":"Myrliden + 10","Address2":"","City":"Mullsj\u00f6","CustomerNumber":"152","Email":"","Name":"Hannes + Elvemyr","OrganisationNumber":"1990-01-01","Phone":"","ZipCode":"565 32"},{"@url":"https:\/\/api.fortnox.se\/3\/customers\/153","Address1":"Some + long and complicated address","Address2":"","City":"Paris","CustomerNumber":"153","Email":"an_email-address@email.com","Name":"A + company","OrganisationNumber":"001122-1122","Phone":"Phone number 123","ZipCode":"A + zip code"},{"@url":"https:\/\/api.fortnox.se\/3\/customers\/154","Address1":"","Address2":"","City":"","CustomerNumber":"154","Email":"","Name":"Arthur + Dent","OrganisationNumber":"","Phone":"","ZipCode":""},{"@url":"https:\/\/api.fortnox.se\/3\/customers\/155","Address1":"Some + long and complicated address","Address2":"","City":"Paris","CustomerNumber":"155","Email":"an_email-address@email.com","Name":"A + company","OrganisationNumber":"","Phone":"Phone number 123","ZipCode":"A zip + code"},{"@url":"https:\/\/api.fortnox.se\/3\/customers\/156","Address1":"Some + long and complicated address","Address2":"","City":"Paris","CustomerNumber":"156","Email":"an_email-address@email.com","Name":"A + company","OrganisationNumber":"","Phone":"Phone number 123","ZipCode":"A zip + code"},{"@url":"https:\/\/api.fortnox.se\/3\/customers\/157","Address1":"Myrliden + 10","Address2":"","City":"Mullsj\u00f6","CustomerNumber":"157","Email":"","Name":"Hannes + Elvemyr","OrganisationNumber":"1990-01-01","Phone":"","ZipCode":"565 32"},{"@url":"https:\/\/api.fortnox.se\/3\/customers\/158","Address1":"BOX + 44","Address2":"","City":"TINGSRYD","CustomerNumber":"158","Email":"","Name":"BolagsBemanning + i Tingsryd AB","OrganisationNumber":"556716-1855","Phone":"","ZipCode":"36221"},{"@url":"https:\/\/api.fortnox.se\/3\/customers\/159","Address1":"Pejlingsv\u00e4gen + 1 B","Address2":"","City":"Fruf\u00e4llan","CustomerNumber":"159","Email":"","Name":"Anna-Karin + Nilsson","OrganisationNumber":"1990-01-01","Phone":"","ZipCode":"506 70"},{"@url":"https:\/\/api.fortnox.se\/3\/customers\/160","Address1":"Gullbuskev\u00e4gen + 5","Address2":"","City":"Fristad","CustomerNumber":"160","Email":"","Name":"Lars + Gustafsson","OrganisationNumber":"471206-5517","Phone":"","ZipCode":"513 32"},{"@url":"https:\/\/api.fortnox.se\/3\/customers\/161","Address1":"Liev\u00e4gen + 6","Address2":"","City":"Spars\u00f6r","CustomerNumber":"161","Email":"","Name":"Fanny + Dreier","OrganisationNumber":"950619-7061","Phone":"","ZipCode":"513 50"},{"@url":"https:\/\/api.fortnox.se\/3\/customers\/162","Address1":"Liev\u00e4gen + 6","Address2":"","City":"Spars\u00f6r","CustomerNumber":"162","Email":"","Name":"Fanny + Dreier","OrganisationNumber":"950619-7061","Phone":"","ZipCode":"513 50"},{"@url":"https:\/\/api.fortnox.se\/3\/customers\/163","Address1":"Dill\u00f6 + Steglan 10","Address2":"","City":"Tors\u00f6","CustomerNumber":"163","Email":"","Name":"Emma + Karlsson","OrganisationNumber":"960316-7041","Phone":"","ZipCode":"542 91"},{"@url":"https:\/\/api.fortnox.se\/3\/customers\/164","Address1":"BRYGGAREGATAN + 19","Address2":"","City":"BOR\u00c5S","CustomerNumber":"164","Email":"","Name":"Ertan + AB","OrganisationNumber":"556818-2173","Phone":"","ZipCode":"50338"},{"@url":"https:\/\/api.fortnox.se\/3\/customers\/165","Address1":"S\u00c5GAREGATAN + 16","Address2":"","City":"NYBRO","CustomerNumber":"165","Email":"","Name":"D\u00e4ck-City + i Nybro AB","OrganisationNumber":"556762-5024","Phone":"","ZipCode":"38245"},{"@url":"https:\/\/api.fortnox.se\/3\/customers\/166","Address1":"Myrliden + 10","Address2":"","City":"Mullsj\u00f6","CustomerNumber":"166","Email":"","Name":"Hannes + Eriksson","OrganisationNumber":"1990-01-01","Phone":"","ZipCode":"565 32"},{"@url":"https:\/\/api.fortnox.se\/3\/customers\/167","Address1":"Duvgatan + 23 lgh 1001","Address2":"","City":"J\u00f6nk\u00f6ping","CustomerNumber":"167","Email":"nils@enappstudio.se","Name":"Nils + Olofsson","OrganisationNumber":"920916-1992","Phone":"0709501577","ZipCode":"554 + 64"},{"@url":"https:\/\/api.fortnox.se\/3\/customers\/168","Address1":"Myrliden + 10","Address2":"","City":"Mullsj\u00f6","CustomerNumber":"168","Email":"","Name":"Hannes + Eriksson","OrganisationNumber":"1990-01-01","Phone":"","ZipCode":"565 32"},{"@url":"https:\/\/api.fortnox.se\/3\/customers\/169","Address1":"Grym\u00e4ngsgatan + 5 lgh 1201","Address2":"","City":"J\u00f6nk\u00f6ping","CustomerNumber":"169","Email":"","Name":"Robin + Kochauf","OrganisationNumber":"840218-5659","Phone":"","ZipCode":"554 45"},{"@url":"https:\/\/api.fortnox.se\/3\/customers\/170","Address1":"BOX + 27","Address2":"","City":"J\u00d6NK\u00d6PING","CustomerNumber":"170","Email":"info@enappstudio.se","Name":"En + Appstudio i J\u00f6nk\u00f6ping AB","OrganisationNumber":"559093-1530","Phone":"","ZipCode":"55112"},{"@url":"https:\/\/api.fortnox.se\/3\/customers\/171","Address1":"","Address2":"","City":"","CustomerNumber":"171","Email":"","Name":"Arthur + Dent","OrganisationNumber":"","Phone":"","ZipCode":""},{"@url":"https:\/\/api.fortnox.se\/3\/customers\/172","Address1":"","Address2":"","City":"","CustomerNumber":"172","Email":"","Name":"Arthur + Dent","OrganisationNumber":"","Phone":"","ZipCode":""},{"@url":"https:\/\/api.fortnox.se\/3\/customers\/173","Address1":"S\u00f6r\u00e4ngsv\u00e4gen + 1","Address2":"","City":"Huskvarna","CustomerNumber":"173","Email":"isak@enappstudio.se","Name":"Isak + Fagerlund","OrganisationNumber":"950519-2139","Phone":"07070707070","ZipCode":"561 + 46"},{"@url":"https:\/\/api.fortnox.se\/3\/customers\/174","Address1":"BRYGGAREGATAN + 19","Address2":"","City":"BOR\u00c5S","CustomerNumber":"174","Email":"","Name":"Ertan + AB","OrganisationNumber":"556818-2173","Phone":"","ZipCode":"50338"},{"@url":"https:\/\/api.fortnox.se\/3\/customers\/175","Address1":"BRYGGAREGATAN + 19","Address2":"","City":"BOR\u00c5S","CustomerNumber":"175","Email":"anna@uppdragshuset.nu","Name":"Uppdragshuset + i V\u00e4st AB","OrganisationNumber":"556765-1327","Phone":"0723583742","ZipCode":"50338"},{"@url":"https:\/\/api.fortnox.se\/3\/customers\/176","Address1":"Gyllby + 114","Address2":"","City":"\u00d6rbyhus","CustomerNumber":"176","Email":"","Name":"Hannes + Elvemyr","OrganisationNumber":"880917-5931","Phone":"","ZipCode":"748 94"},{"@url":"https:\/\/api.fortnox.se\/3\/customers\/177","Address1":"BOX + 44","Address2":"","City":"TINGSRYD","CustomerNumber":"177","Email":"","Name":"BolagsBemanning + i Tingsryd AB","OrganisationNumber":"556716-1855","Phone":"","ZipCode":"36221"},{"@url":"https:\/\/api.fortnox.se\/3\/customers\/178","Address1":"Myrliden + 10","Address2":"","City":"Mullsj\u00f6","CustomerNumber":"178","Email":"","Name":"Hannes + Eriksson","OrganisationNumber":"1990-01-01","Phone":"","ZipCode":"565 32"},{"@url":"https:\/\/api.fortnox.se\/3\/customers\/179","Address1":"Some + long and complicated address","Address2":"","City":"Paris","CustomerNumber":"179","Email":"an_email-address@email.com","Name":"A + company","OrganisationNumber":"","Phone":"Phone number 123","ZipCode":"A zip + code"},{"@url":"https:\/\/api.fortnox.se\/3\/customers\/180","Address1":"123","Address2":"","City":"Wee","CustomerNumber":"180","Email":"benjamin@andersson.se","Name":"Lennart + Lindeberg","OrganisationNumber":"","Phone":"123","ZipCode":"123"},{"@url":"https:\/\/api.fortnox.se\/3\/customers\/181","Address1":"address + 1","Address2":"","City":"city 1","CustomerNumber":"181","Email":"tennis@test.com","Name":"Tennisklubben","OrganisationNumber":"","Phone":"phone + 1","ZipCode":"zip 123"},{"@url":"https:\/\/api.fortnox.se\/3\/customers\/182","Address1":"","Address2":"","City":"","CustomerNumber":"182","Email":"","Name":"kjh","OrganisationNumber":"","Phone":"","ZipCode":""},{"@url":"https:\/\/api.fortnox.se\/3\/customers\/183","Address1":"postaddress + 1234","Address2":"","City":"ort 123","CustomerNumber":"183","Email":"spanien@tennis.se","Name":"Spanska + tennisklubbern","OrganisationNumber":"","Phone":"tel 123","ZipCode":"post + 123"},{"@url":"https:\/\/api.fortnox.se\/3\/customers\/184","Address1":"address + 1","Address2":"","City":"city 1","CustomerNumber":"184","Email":"tennis@test.com","Name":"Tennisklubben","OrganisationNumber":"","Phone":"phone + 1","ZipCode":"zip 123"},{"@url":"https:\/\/api.fortnox.se\/3\/customers\/185","Address1":"123","Address2":"","City":"hee","CustomerNumber":"185","Email":"dsa@tse.se","Name":"Klara + Henriksson","OrganisationNumber":"","Phone":"123","ZipCode":"123"},{"@url":"https:\/\/api.fortnox.se\/3\/customers\/186","Address1":"Post + 1","Address2":"","City":"Ort 1","CustomerNumber":"186","Email":"","Name":"Test + Testsson","OrganisationNumber":"","Phone":"Tel 123","ZipCode":"Nr 1"},{"@url":"https:\/\/api.fortnox.se\/3\/customers\/187","Address1":"BOX + 27","Address2":"","City":"J\u00d6NK\u00d6PING","CustomerNumber":"187","Email":"test@example.com","Name":"En + Appstudio i J\u00f6nk\u00f6ping AB","OrganisationNumber":"559093-1530","Phone":"12345","ZipCode":"55112"},{"@url":"https:\/\/api.fortnox.se\/3\/customers\/188","Address1":"post + 123","Address2":"","City":"ort 123","CustomerNumber":"188","Email":"123@example.com","Name":"Blaha","OrganisationNumber":"","Phone":"tel + 123","ZipCode":"nr 123"},{"@url":"https:\/\/api.fortnox.se\/3\/customers\/189","Address1":"Knutgatan","Address2":"","City":"Kosta","CustomerNumber":"189","Email":"anna@uppdragshuset.nu","Name":"Kajsa + Varg","OrganisationNumber":"","Phone":"0726-582500","ZipCode":"52222"},{"@url":"https:\/\/api.fortnox.se\/3\/customers\/190","Address1":"Stengatan + a","Address2":"","City":"BOR\u00c5S","CustomerNumber":"190","Email":"anna@ertan.nu","Name":"Anna + Norman","OrganisationNumber":"","Phone":"0736-379150","ZipCode":"50453"},{"@url":"https:\/\/api.fortnox.se\/3\/customers\/191","Address1":"123","Address2":"","City":"67","CustomerNumber":"191","Email":"kor@belgien.se","Name":"Belgiska + kor AB","OrganisationNumber":"","Phone":"","ZipCode":"45"},{"@url":"https:\/\/api.fortnox.se\/3\/customers\/192","Address1":"123","Address2":"","City":"67","CustomerNumber":"192","Email":"svets@smide.se","Name":"Svets + och smide","OrganisationNumber":"","Phone":"","ZipCode":"45"},{"@url":"https:\/\/api.fortnox.se\/3\/customers\/193","Address1":"123","Address2":"","City":"123","CustomerNumber":"193","Email":"bank@danmark.se","Name":"Danska + handelsbanken","OrganisationNumber":"","Phone":"","ZipCode":"123"},{"@url":"https:\/\/api.fortnox.se\/3\/customers\/194","Address1":"123","Address2":"","City":"123","CustomerNumber":"194","Email":"vik@finland.se","Name":"Finska + viken","OrganisationNumber":"","Phone":"","ZipCode":"123"},{"@url":"https:\/\/api.fortnox.se\/3\/customers\/195","Address1":"123","Address2":"","City":"123","CustomerNumber":"195","Email":"","Name":"F\u00f6retag + utan email","OrganisationNumber":"","Phone":"","ZipCode":"123"},{"@url":"https:\/\/api.fortnox.se\/3\/customers\/196","Address1":"123","Address2":"","City":"123","CustomerNumber":"196","Email":"farg@estland.est","Name":"Estlands + F\u00e4rg","OrganisationNumber":"","Phone":"","ZipCode":"123"},{"@url":"https:\/\/api.fortnox.se\/3\/customers\/197","Address1":"","Address2":"","City":"","CustomerNumber":"197","Email":"","Name":"Arthur + Dent","OrganisationNumber":"","Phone":"","ZipCode":""},{"@url":"https:\/\/api.fortnox.se\/3\/customers\/198","Address1":"Some + long and complicated address","Address2":"","City":"Paris","CustomerNumber":"198","Email":"an_email-address@email.com","Name":"A + company","OrganisationNumber":"001122-1122","Phone":"Phone number 123","ZipCode":"A + zip code"},{"@url":"https:\/\/api.fortnox.se\/3\/customers\/199","Address1":"BOX + 44","Address2":"","City":"TINGSRYD","CustomerNumber":"199","Email":"","Name":"BolagsBemanning + i Tingsryd AB","OrganisationNumber":"556716-1855","Phone":"","ZipCode":"36221"},{"@url":"https:\/\/api.fortnox.se\/3\/customers\/200","Address1":"Some + long and complicated address","Address2":"","City":"Paris","CustomerNumber":"200","Email":"an_email-address@email.com","Name":"A + company","OrganisationNumber":"","Phone":"Phone number 123","ZipCode":"A zip + code"}]}' + http_version: + recorded_at: Mon, 14 May 2018 19:17:34 GMT +- request: + method: get + uri: https://api.fortnox.se/3/customers/?page=3 + body: + encoding: US-ASCII + string: '' + headers: + Content-Type: + - application/json + Accept: + - application/json + Client-Secret: + - 9aBA8ZgsvR + Access-Token: + - ccaef817-d5d8-4b1c-a316-54f3e55c5c54 + response: + status: + code: 200 + message: OK + headers: + Server: + - nginx + Date: + - Mon, 14 May 2018 19:17:35 GMT + Content-Type: + - application/json + Connection: + - close + Vary: + - Accept-Encoding + - Accept-Encoding + X-Rack-Responsetime: + - '18' + X-Uid: + - 3a6e1600 + X-Build: + - 06fdff7705 + body: + encoding: UTF-8 + string: '{"MetaInformation":{"@TotalResources":209,"@TotalPages":3,"@CurrentPage":3},"Customers":[{"@url":"https:\/\/api.fortnox.se\/3\/customers\/201","Address1":"Myrliden + 10","Address2":"","City":"Mullsj\u00f6","CustomerNumber":"201","Email":"","Name":"Hannes + Eriksson","OrganisationNumber":"1990-01-01","Phone":"","ZipCode":"565 32"},{"@url":"https:\/\/api.fortnox.se\/3\/customers\/202","Address1":"TEst","Address2":"","City":"TEst","CustomerNumber":"202","Email":"mail@example.com","Name":"Hej + pa dig","OrganisationNumber":"","Phone":"tel1","ZipCode":"TEst"},{"@url":"https:\/\/api.fortnox.se\/3\/customers\/203","Address1":"Some + long and complicated address","Address2":"","City":"Paris","CustomerNumber":"203","Email":"an_email-address@email.com","Name":"A + company","OrganisationNumber":"","Phone":"Phone number 123","ZipCode":"A zip + code"},{"@url":"https:\/\/api.fortnox.se\/3\/customers\/204","Address1":"Myrliden + 10","Address2":"","City":"Mullsj\u00f6","CustomerNumber":"204","Email":"","Name":"Hannes + Eriksson","OrganisationNumber":"1990-01-01","Phone":"","ZipCode":"565 32"},{"@url":"https:\/\/api.fortnox.se\/3\/customers\/205","Address1":"BOX + 44","Address2":"","City":"TINGSRYD","CustomerNumber":"205","Email":"","Name":"BolagsBemanning + i Tingsryd AB","OrganisationNumber":"556716-1855","Phone":"","ZipCode":"36221"},{"@url":"https:\/\/api.fortnox.se\/3\/customers\/206","Address1":"Some + long and complicated address","Address2":"","City":"Paris","CustomerNumber":"206","Email":"an_email-address@email.com","Name":"A + company","OrganisationNumber":"","Phone":"Phone number 123","ZipCode":"A zip + code"},{"@url":"https:\/\/api.fortnox.se\/3\/customers\/207","Address1":"1","Address2":"","City":"1","CustomerNumber":"207","Email":"","Name":"123","OrganisationNumber":"","Phone":"","ZipCode":"1"},{"@url":"https:\/\/api.fortnox.se\/3\/customers\/208","Address1":"","Address2":"","City":"","CustomerNumber":"208","Email":"","Name":"Anna&Lisa","OrganisationNumber":"","Phone":"","ZipCode":""},{"@url":"https:\/\/api.fortnox.se\/3\/customers\/209","Address1":"","Address2":"","City":"","CustomerNumber":"209","Email":"","Name":"Tor + & Bj\u00f6rn","OrganisationNumber":"","Phone":"","ZipCode":""}]}' + http_version: + recorded_at: Mon, 14 May 2018 19:17:35 GMT +recorded_with: VCR 3.0.3 diff --git a/spec/vcr_cassettes/invoices/all.yml b/spec/vcr_cassettes/invoices/all.yml index 387468da..386622d1 100644 --- a/spec/vcr_cassettes/invoices/all.yml +++ b/spec/vcr_cassettes/invoices/all.yml @@ -2,7 +2,7 @@ http_interactions: - request: method: get - uri: https://api.fortnox.se/3/invoices/ + uri: https://api.fortnox.se/3/invoices/?page=1 body: encoding: US-ASCII string: '' @@ -23,7 +23,7 @@ http_interactions: Server: - nginx Date: - - Tue, 25 Oct 2016 10:21:47 GMT + - Mon, 14 May 2018 19:17:30 GMT Content-Type: - application/json Connection: @@ -32,14 +32,14 @@ http_interactions: - Accept-Encoding - Accept-Encoding X-Rack-Responsetime: - - '246' + - '200' X-Uid: - - 9e23b15b + - b6ac60f9 X-Build: - - 76600b8d0c + - 06fdff7705 body: encoding: UTF-8 - string: '{"MetaInformation":{"@TotalResources":60,"@TotalPages":1,"@CurrentPage":1},"Invoices":[{"@url":"https:\/\/api.fortnox.se\/3\/invoices\/1","Balance":0,"Booked":false,"Cancelled":false,"Currency":"SEK","CurrencyRate":"1","CurrencyUnit":1,"CustomerName":"Test","CustomerNumber":"1","DocumentNumber":"1","DueDate":"2016-02-04","ExternalInvoiceReference1":"","ExternalInvoiceReference2":"","InvoiceDate":"2016-02-04","NoxFinans":false,"OCR":"133","WayOfDelivery":"","TermsOfPayment":"0","Project":"","Sent":true,"Total":0},{"@url":"https:\/\/api.fortnox.se\/3\/invoices\/2","Balance":0,"Booked":false,"Cancelled":false,"Currency":"SEK","CurrencyRate":"1","CurrencyUnit":1,"CustomerName":"Updated + string: '{"MetaInformation":{"@TotalResources":84,"@TotalPages":1,"@CurrentPage":1},"Invoices":[{"@url":"https:\/\/api.fortnox.se\/3\/invoices\/1","Balance":0,"Booked":false,"Cancelled":false,"Currency":"SEK","CurrencyRate":"1","CurrencyUnit":1,"CustomerName":"Test","CustomerNumber":"1","DocumentNumber":"1","DueDate":"2016-02-04","ExternalInvoiceReference1":"","ExternalInvoiceReference2":"","InvoiceDate":"2016-02-04","NoxFinans":false,"OCR":"133","WayOfDelivery":"","TermsOfPayment":"0","Project":"","Sent":true,"Total":0},{"@url":"https:\/\/api.fortnox.se\/3\/invoices\/2","Balance":0,"Booked":false,"Cancelled":false,"Currency":"SEK","CurrencyRate":"1","CurrencyUnit":1,"CustomerName":"Updated customer","CustomerNumber":"1","DocumentNumber":"2","DueDate":"2016-03-18","ExternalInvoiceReference1":"","ExternalInvoiceReference2":"","InvoiceDate":"2016-03-16","NoxFinans":false,"OCR":"232","WayOfDelivery":"","TermsOfPayment":"0","Project":"","Sent":false,"Total":0},{"@url":"https:\/\/api.fortnox.se\/3\/invoices\/3","Balance":200,"Booked":false,"Cancelled":false,"Currency":"SEK","CurrencyRate":"1","CurrencyUnit":1,"CustomerName":"Updated customer","CustomerNumber":"1","DocumentNumber":"3","DueDate":"2016-03-17","ExternalInvoiceReference1":"","ExternalInvoiceReference2":"","InvoiceDate":"2016-03-16","NoxFinans":false,"OCR":"331","WayOfDelivery":"","TermsOfPayment":"0","Project":"","Sent":false,"Total":200},{"@url":"https:\/\/api.fortnox.se\/3\/invoices\/4","Balance":0,"Booked":false,"Cancelled":false,"Currency":"SEK","CurrencyRate":"1","CurrencyUnit":1,"CustomerName":"Updated customer","CustomerNumber":"1","DocumentNumber":"4","DueDate":"2016-04-14","ExternalInvoiceReference1":"","ExternalInvoiceReference2":"","InvoiceDate":"2016-03-16","NoxFinans":false,"OCR":"430","WayOfDelivery":"","TermsOfPayment":"0","Project":"","Sent":false,"Total":0},{"@url":"https:\/\/api.fortnox.se\/3\/invoices\/5","Balance":100,"Booked":false,"Cancelled":false,"Currency":"SEK","CurrencyRate":"1","CurrencyUnit":1,"CustomerName":"Updated @@ -98,7 +98,30 @@ http_interactions: name","CustomerNumber":"1","DocumentNumber":"57","DueDate":"2016-10-25","ExternalInvoiceReference1":"","ExternalInvoiceReference2":"","InvoiceDate":"2016-10-25","NoxFinans":false,"OCR":"426523791","WayOfDelivery":"","TermsOfPayment":"0","Project":"","Sent":false,"Total":0},{"@url":"https:\/\/api.fortnox.se\/3\/invoices\/58","Balance":0,"Booked":false,"Cancelled":false,"Currency":"SEK","CurrencyRate":"1","CurrencyUnit":1,"CustomerName":"Old name","CustomerNumber":"1","DocumentNumber":"58","DueDate":"2016-10-25","ExternalInvoiceReference1":"","ExternalInvoiceReference2":"","InvoiceDate":"2016-10-25","NoxFinans":false,"OCR":"5843","WayOfDelivery":"","TermsOfPayment":"0","Project":"","Sent":false,"Total":0},{"@url":"https:\/\/api.fortnox.se\/3\/invoices\/59","Balance":0,"Booked":false,"Cancelled":false,"Currency":"SEK","CurrencyRate":"1","CurrencyUnit":1,"CustomerName":"Old name","CustomerNumber":"1","DocumentNumber":"59","DueDate":"2016-10-25","ExternalInvoiceReference1":"","ExternalInvoiceReference2":"","InvoiceDate":"2016-10-25","NoxFinans":false,"OCR":"5942","WayOfDelivery":"","TermsOfPayment":"0","Project":"","Sent":false,"Total":0},{"@url":"https:\/\/api.fortnox.se\/3\/invoices\/60","Balance":0,"Booked":false,"Cancelled":false,"Currency":"SEK","CurrencyRate":"1","CurrencyUnit":1,"CustomerName":"Old - name","CustomerNumber":"1","DocumentNumber":"60","DueDate":"2016-10-25","ExternalInvoiceReference1":"","ExternalInvoiceReference2":"","InvoiceDate":"2016-10-25","NoxFinans":false,"OCR":"426523791","WayOfDelivery":"","TermsOfPayment":"0","Project":"","Sent":false,"Total":0}]}' + name","CustomerNumber":"1","DocumentNumber":"60","DueDate":"2016-10-25","ExternalInvoiceReference1":"","ExternalInvoiceReference2":"","InvoiceDate":"2016-10-25","NoxFinans":false,"OCR":"426523791","WayOfDelivery":"","TermsOfPayment":"0","Project":"","Sent":false,"Total":0},{"@url":"https:\/\/api.fortnox.se\/3\/invoices\/61","Balance":0,"Booked":false,"Cancelled":false,"Currency":"SEK","CurrencyRate":"1","CurrencyUnit":1,"CustomerName":"Old + name","CustomerNumber":"1","DocumentNumber":"61","DueDate":"2016-10-27","ExternalInvoiceReference1":"","ExternalInvoiceReference2":"","InvoiceDate":"2016-10-27","NoxFinans":false,"OCR":"6148","WayOfDelivery":"","TermsOfPayment":"0","Project":"","Sent":false,"Total":0},{"@url":"https:\/\/api.fortnox.se\/3\/invoices\/62","Balance":0,"Booked":false,"Cancelled":false,"Currency":"SEK","CurrencyRate":"1","CurrencyUnit":1,"CustomerName":"Old + name","CustomerNumber":"1","DocumentNumber":"62","DueDate":"2016-10-27","ExternalInvoiceReference1":"","ExternalInvoiceReference2":"","InvoiceDate":"2016-10-27","NoxFinans":false,"OCR":"6247","WayOfDelivery":"","TermsOfPayment":"0","Project":"","Sent":false,"Total":0},{"@url":"https:\/\/api.fortnox.se\/3\/invoices\/63","Balance":0,"Booked":false,"Cancelled":false,"Currency":"SEK","CurrencyRate":"1","CurrencyUnit":1,"CustomerName":"Old + name","CustomerNumber":"1","DocumentNumber":"63","DueDate":"2016-10-27","ExternalInvoiceReference1":"","ExternalInvoiceReference2":"","InvoiceDate":"2016-10-27","NoxFinans":false,"OCR":"6346","WayOfDelivery":"","TermsOfPayment":"0","Project":"","Sent":false,"Total":0},{"@url":"https:\/\/api.fortnox.se\/3\/invoices\/64","Balance":0,"Booked":true,"Cancelled":false,"Currency":"SEK","CurrencyRate":"1","CurrencyUnit":1,"CustomerName":"Anna + Norman","CustomerNumber":"82","DocumentNumber":"64","DueDate":"2016-11-25","ExternalInvoiceReference1":"","ExternalInvoiceReference2":"","InvoiceDate":"2016-11-25","NoxFinans":false,"OCR":"6445","WayOfDelivery":"","TermsOfPayment":"0","Project":"3","Sent":false,"Total":875},{"@url":"https:\/\/api.fortnox.se\/3\/invoices\/65","Balance":0,"Booked":false,"Cancelled":true,"Currency":"SEK","CurrencyRate":"1","CurrencyUnit":1,"CustomerName":"Anna + Norman","CustomerNumber":"82","DocumentNumber":"65","DueDate":"2016-11-25","ExternalInvoiceReference1":"","ExternalInvoiceReference2":"","InvoiceDate":"2016-11-25","NoxFinans":false,"OCR":"6544","WayOfDelivery":"","TermsOfPayment":"0","Project":"3","Sent":false,"Total":0},{"@url":"https:\/\/api.fortnox.se\/3\/invoices\/66","Balance":0,"Booked":true,"Cancelled":false,"Currency":"SEK","CurrencyRate":"1","CurrencyUnit":1,"CustomerName":"Ertan + AB","CustomerNumber":"164","DocumentNumber":"66","DueDate":"2016-11-25","ExternalInvoiceReference1":"","ExternalInvoiceReference2":"","InvoiceDate":"2016-11-25","NoxFinans":false,"OCR":"6643","WayOfDelivery":"","TermsOfPayment":"0","Project":"3","Sent":false,"Total":1250},{"@url":"https:\/\/api.fortnox.se\/3\/invoices\/67","Balance":938,"Booked":false,"Cancelled":false,"Currency":"SEK","CurrencyRate":"1","CurrencyUnit":1,"CustomerName":"Easy + Translate GmbH","CustomerNumber":"64","DocumentNumber":"67","DueDate":"2016-11-25","ExternalInvoiceReference1":"","ExternalInvoiceReference2":"","InvoiceDate":"2016-11-25","NoxFinans":false,"OCR":"6742","WayOfDelivery":"","TermsOfPayment":"0","Project":"3","Sent":false,"Total":938},{"@url":"https:\/\/api.fortnox.se\/3\/invoices\/68","Balance":1,"Booked":false,"Cancelled":false,"Currency":"SEK","CurrencyRate":"1","CurrencyUnit":1,"CustomerName":"Test + customer","CustomerNumber":"3","DocumentNumber":"68","DueDate":"2017-06-16","ExternalInvoiceReference1":"","ExternalInvoiceReference2":"","InvoiceDate":"2017-06-16","NoxFinans":false,"OCR":"6841","WayOfDelivery":"","TermsOfPayment":"0","Project":"1","Sent":false,"Total":1},{"@url":"https:\/\/api.fortnox.se\/3\/invoices\/69","Balance":6,"Booked":false,"Cancelled":false,"Currency":"SEK","CurrencyRate":"1","CurrencyUnit":1,"CustomerName":"Anna + Norman","CustomerNumber":"82","DocumentNumber":"69","DueDate":"2017-08-14","ExternalInvoiceReference1":"","ExternalInvoiceReference2":"","InvoiceDate":"2017-08-14","NoxFinans":false,"OCR":"6940","WayOfDelivery":"","TermsOfPayment":"0","Project":"17","Sent":false,"Total":6},{"@url":"https:\/\/api.fortnox.se\/3\/invoices\/70","Balance":625,"Booked":false,"Cancelled":false,"Currency":"SEK","CurrencyRate":"1","CurrencyUnit":1,"CustomerName":"Nils + Olofsson","CustomerNumber":"101","DocumentNumber":"70","DueDate":"2017-08-14","ExternalInvoiceReference1":"","ExternalInvoiceReference2":"","InvoiceDate":"2017-08-14","NoxFinans":false,"OCR":"7047","WayOfDelivery":"","TermsOfPayment":"0","Project":"5569","Sent":false,"Total":625},{"@url":"https:\/\/api.fortnox.se\/3\/invoices\/71","Balance":2000,"Booked":true,"Cancelled":false,"Currency":"SEK","CurrencyRate":"1","CurrencyUnit":1,"CustomerName":"En + Appstudio i J\u00f6nk\u00f6ping AB","CustomerNumber":"170","DocumentNumber":"71","DueDate":"2017-08-14","ExternalInvoiceReference1":"","ExternalInvoiceReference2":"","InvoiceDate":"2017-08-14","NoxFinans":false,"OCR":"7146","WayOfDelivery":"","TermsOfPayment":"0","Project":"5569","Sent":false,"Total":2000},{"@url":"https:\/\/api.fortnox.se\/3\/invoices\/72","Balance":395,"Booked":false,"Cancelled":false,"Currency":"SEK","CurrencyRate":"1","CurrencyUnit":1,"CustomerName":"Test + customer","CustomerNumber":"3","DocumentNumber":"72","DueDate":"2017-08-25","ExternalInvoiceReference1":"","ExternalInvoiceReference2":"","InvoiceDate":"2017-08-25","NoxFinans":false,"OCR":"7245","WayOfDelivery":"","TermsOfPayment":"0","Project":"1","Sent":false,"Total":395},{"@url":"https:\/\/api.fortnox.se\/3\/invoices\/73","Balance":1543,"Booked":false,"Cancelled":false,"Currency":"SEK","CurrencyRate":"1","CurrencyUnit":1,"CustomerName":"En + Appstudio i J\u00f6nk\u00f6ping AB","CustomerNumber":"170","DocumentNumber":"73","DueDate":"2017-08-25","ExternalInvoiceReference1":"","ExternalInvoiceReference2":"","InvoiceDate":"2017-08-25","NoxFinans":false,"OCR":"7344","WayOfDelivery":"","TermsOfPayment":"0","Project":"5575","Sent":false,"Total":1543},{"@url":"https:\/\/api.fortnox.se\/3\/invoices\/74","Balance":6000,"Booked":false,"Cancelled":false,"Currency":"SEK","CurrencyRate":"1","CurrencyUnit":1,"CustomerName":"Arthur + Dent","CustomerNumber":"4","DocumentNumber":"74","DueDate":"2017-10-19","ExternalInvoiceReference1":"","ExternalInvoiceReference2":"","InvoiceDate":"2017-10-19","NoxFinans":false,"OCR":"7443","WayOfDelivery":"","TermsOfPayment":"0","Project":"5576","Sent":false,"Total":6000},{"@url":"https:\/\/api.fortnox.se\/3\/invoices\/75","Balance":0,"Booked":false,"Cancelled":true,"Currency":"SEK","CurrencyRate":"1","CurrencyUnit":1,"CustomerName":"Test + customer","CustomerNumber":"3","DocumentNumber":"75","DueDate":"2017-10-19","ExternalInvoiceReference1":"","ExternalInvoiceReference2":"","InvoiceDate":"2017-10-19","NoxFinans":false,"OCR":"7542","WayOfDelivery":"","TermsOfPayment":"0","Project":"5576","Sent":false,"Total":0},{"@url":"https:\/\/api.fortnox.se\/3\/invoices\/76","Balance":50000,"Booked":false,"Cancelled":false,"Currency":"SEK","CurrencyRate":"1","CurrencyUnit":1,"CustomerName":"Test + customer","CustomerNumber":"3","DocumentNumber":"76","DueDate":"2017-10-19","ExternalInvoiceReference1":"","ExternalInvoiceReference2":"","InvoiceDate":"2017-10-19","NoxFinans":false,"OCR":"7641","WayOfDelivery":"","TermsOfPayment":"0","Project":"5576","Sent":false,"Total":50000},{"@url":"https:\/\/api.fortnox.se\/3\/invoices\/77","Balance":0,"Booked":true,"Cancelled":false,"Currency":"SEK","CurrencyRate":"1","CurrencyUnit":1,"CustomerName":"En + Appstudio i J\u00f6nk\u00f6ping AB","CustomerNumber":"170","DocumentNumber":"77","DueDate":"2017-01-15","ExternalInvoiceReference1":"","ExternalInvoiceReference2":"","InvoiceDate":"2017-01-15","NoxFinans":false,"OCR":"7740","WayOfDelivery":"","TermsOfPayment":"0","Project":"1","Sent":false,"Total":3000},{"@url":"https:\/\/api.fortnox.se\/3\/invoices\/78","Balance":225,"Booked":true,"Cancelled":false,"Currency":"SEK","CurrencyRate":"1","CurrencyUnit":1,"CustomerName":"Hannes + Elvemyr","CustomerNumber":"66","DocumentNumber":"78","DueDate":"2017-01-15","ExternalInvoiceReference1":"","ExternalInvoiceReference2":"","InvoiceDate":"2017-01-15","NoxFinans":false,"OCR":"7849","WayOfDelivery":"","TermsOfPayment":"0","Project":"1","Sent":false,"Total":450},{"@url":"https:\/\/api.fortnox.se\/3\/invoices\/79","Balance":75,"Booked":false,"Cancelled":false,"Currency":"SEK","CurrencyRate":"1","CurrencyUnit":1,"CustomerName":"BolagsBemanning + i Tingsryd AB","CustomerNumber":"67","DocumentNumber":"79","DueDate":"2018-01-29","ExternalInvoiceReference1":"","ExternalInvoiceReference2":"","InvoiceDate":"2018-01-29","NoxFinans":false,"OCR":"7948","WayOfDelivery":"","TermsOfPayment":"0","Project":"5579","Sent":false,"Total":75},{"@url":"https:\/\/api.fortnox.se\/3\/invoices\/80","Balance":0,"Booked":false,"Cancelled":false,"Currency":"SEK","CurrencyRate":"1","CurrencyUnit":1,"CustomerName":"Arthur + Dent","CustomerNumber":"12","DocumentNumber":"80","DueDate":"2018-02-13","ExternalInvoiceReference1":"","ExternalInvoiceReference2":"","InvoiceDate":"2018-02-13","NoxFinans":false,"OCR":"8045","WayOfDelivery":"","TermsOfPayment":"","Project":"1","Sent":false,"Total":0},{"@url":"https:\/\/api.fortnox.se\/3\/invoices\/81","Balance":18,"Booked":false,"Cancelled":false,"Currency":"SEK","CurrencyRate":"1","CurrencyUnit":1,"CustomerName":"Blaha","CustomerNumber":"188","DocumentNumber":"81","DueDate":"2018-05-06","ExternalInvoiceReference1":"","ExternalInvoiceReference2":"","InvoiceDate":"2018-04-06","NoxFinans":false,"OCR":"8144","WayOfDelivery":"","TermsOfPayment":"30","Project":"1","Sent":false,"Total":18},{"@url":"https:\/\/api.fortnox.se\/3\/invoices\/82","Balance":0,"Booked":false,"Cancelled":false,"Currency":"SEK","CurrencyRate":"1","CurrencyUnit":1,"CustomerName":"Old + name","CustomerNumber":"1","DocumentNumber":"82","DueDate":"2018-05-14","ExternalInvoiceReference1":"","ExternalInvoiceReference2":"","InvoiceDate":"2018-05-14","NoxFinans":false,"OCR":"8243","WayOfDelivery":"","TermsOfPayment":"0","Project":"","Sent":false,"Total":0},{"@url":"https:\/\/api.fortnox.se\/3\/invoices\/83","Balance":0,"Booked":false,"Cancelled":false,"Currency":"SEK","CurrencyRate":"1","CurrencyUnit":1,"CustomerName":"Old + name","CustomerNumber":"1","DocumentNumber":"83","DueDate":"2018-05-14","ExternalInvoiceReference1":"","ExternalInvoiceReference2":"","InvoiceDate":"2018-05-14","NoxFinans":false,"OCR":"8342","WayOfDelivery":"","TermsOfPayment":"0","Project":"","Sent":false,"Total":0},{"@url":"https:\/\/api.fortnox.se\/3\/invoices\/84","Balance":0,"Booked":false,"Cancelled":false,"Currency":"SEK","CurrencyRate":"1","CurrencyUnit":1,"CustomerName":"Old + name","CustomerNumber":"1","DocumentNumber":"84","DueDate":"2018-05-14","ExternalInvoiceReference1":"","ExternalInvoiceReference2":"","InvoiceDate":"2018-05-14","NoxFinans":false,"OCR":"426523791","WayOfDelivery":"","TermsOfPayment":"0","Project":"","Sent":false,"Total":0}]}' http_version: - recorded_at: Tue, 25 Oct 2016 10:21:47 GMT -recorded_with: VCR 3.0.1 + recorded_at: Mon, 14 May 2018 19:17:30 GMT +recorded_with: VCR 3.0.3 diff --git a/spec/vcr_cassettes/orders/all.yml b/spec/vcr_cassettes/orders/all.yml index 97b665f4..74eb476c 100644 --- a/spec/vcr_cassettes/orders/all.yml +++ b/spec/vcr_cassettes/orders/all.yml @@ -2,7 +2,7 @@ http_interactions: - request: method: get - uri: https://api.fortnox.se/3/orders/ + uri: https://api.fortnox.se/3/orders/?page=1 body: encoding: US-ASCII string: '' @@ -23,7 +23,7 @@ http_interactions: Server: - nginx Date: - - Tue, 25 Oct 2016 10:21:56 GMT + - Mon, 14 May 2018 19:17:31 GMT Content-Type: - application/json Connection: @@ -32,14 +32,14 @@ http_interactions: - Accept-Encoding - Accept-Encoding X-Rack-Responsetime: - - '68' + - '39' X-Uid: - - 6413a0c9 + - b0b214a4 X-Build: - - 76600b8d0c + - 06fdff7705 body: encoding: UTF-8 - string: '{"MetaInformation":{"@TotalResources":216,"@TotalPages":3,"@CurrentPage":1},"Orders":[{"@url":"https:\/\/api.fortnox.se\/3\/orders\/1","Cancelled":false,"Currency":"SEK","CustomerName":"An + string: '{"MetaInformation":{"@TotalResources":325,"@TotalPages":4,"@CurrentPage":1},"Orders":[{"@url":"https:\/\/api.fortnox.se\/3\/orders\/1","Cancelled":false,"Currency":"SEK","CustomerName":"An updated value","CustomerNumber":"1","DeliveryDate":null,"DocumentNumber":"1","ExternalInvoiceReference1":"","ExternalInvoiceReference2":"","OrderDate":"2016-04-20","Project":"1","Sent":false,"Total":0},{"@url":"https:\/\/api.fortnox.se\/3\/orders\/2","Cancelled":true,"Currency":"SEK","CustomerName":"An updated value","CustomerNumber":"1","DeliveryDate":null,"DocumentNumber":"2","ExternalInvoiceReference1":"","ExternalInvoiceReference2":"","OrderDate":"2016-04-20","Project":"","Sent":false,"Total":0},{"@url":"https:\/\/api.fortnox.se\/3\/orders\/3","Cancelled":true,"Currency":"SEK","CustomerName":"An updated value","CustomerNumber":"1","DeliveryDate":null,"DocumentNumber":"3","ExternalInvoiceReference1":"","ExternalInvoiceReference2":"","OrderDate":"2016-04-20","Project":"","Sent":false,"Total":0},{"@url":"https:\/\/api.fortnox.se\/3\/orders\/4","Cancelled":false,"Currency":"SEK","CustomerName":"A @@ -111,7 +111,7 @@ http_interactions: customer","CustomerNumber":"3","DeliveryDate":null,"DocumentNumber":"69","ExternalInvoiceReference1":"","ExternalInvoiceReference2":"","OrderDate":"2016-05-15","Project":"2","Sent":false,"Total":0},{"@url":"https:\/\/api.fortnox.se\/3\/orders\/70","Cancelled":false,"Currency":"SEK","CustomerName":"Old name","CustomerNumber":"1","DeliveryDate":null,"DocumentNumber":"70","ExternalInvoiceReference1":"","ExternalInvoiceReference2":"","OrderDate":"2016-05-15","Project":"2","Sent":false,"Total":63},{"@url":"https:\/\/api.fortnox.se\/3\/orders\/71","Cancelled":false,"Currency":"SEK","CustomerName":"Test customer","CustomerNumber":"3","DeliveryDate":null,"DocumentNumber":"71","ExternalInvoiceReference1":"","ExternalInvoiceReference2":"","OrderDate":"2016-06-08","Project":"","Sent":false,"Total":25},{"@url":"https:\/\/api.fortnox.se\/3\/orders\/72","Cancelled":false,"Currency":"SEK","CustomerName":"Test - customer","CustomerNumber":"3","DeliveryDate":null,"DocumentNumber":"72","ExternalInvoiceReference1":"","ExternalInvoiceReference2":"","OrderDate":"2016-06-08","Project":"","Sent":false,"Total":25},{"@url":"https:\/\/api.fortnox.se\/3\/orders\/73","Cancelled":false,"Currency":"SEK","CustomerName":"Test + customer","CustomerNumber":"3","DeliveryDate":null,"DocumentNumber":"72","ExternalInvoiceReference1":"","ExternalInvoiceReference2":"","OrderDate":"2016-06-08","Project":"","Sent":false,"Total":94},{"@url":"https:\/\/api.fortnox.se\/3\/orders\/73","Cancelled":false,"Currency":"SEK","CustomerName":"Test customer","CustomerNumber":"3","DeliveryDate":null,"DocumentNumber":"73","ExternalInvoiceReference1":"","ExternalInvoiceReference2":"","OrderDate":"2016-06-09","Project":"","Sent":false,"Total":3},{"@url":"https:\/\/api.fortnox.se\/3\/orders\/74","Cancelled":false,"Currency":"SEK","CustomerName":"Anna Norman","CustomerNumber":"82","DeliveryDate":null,"DocumentNumber":"74","ExternalInvoiceReference1":"","ExternalInvoiceReference2":"","OrderDate":"2016-06-13","Project":"2","Sent":false,"Total":625},{"@url":"https:\/\/api.fortnox.se\/3\/orders\/75","Cancelled":false,"Currency":"SEK","CustomerName":"Ertan AB","CustomerNumber":"83","DeliveryDate":null,"DocumentNumber":"75","ExternalInvoiceReference1":"","ExternalInvoiceReference2":"","OrderDate":"2016-06-13","Project":"2","Sent":false,"Total":625},{"@url":"https:\/\/api.fortnox.se\/3\/orders\/76","Cancelled":false,"Currency":"SEK","CustomerName":"Easy @@ -140,5 +140,354 @@ http_interactions: name","CustomerNumber":"1","DeliveryDate":"2016-09-08","DocumentNumber":"100","ExternalInvoiceReference1":"External reference","ExternalInvoiceReference2":"","OrderDate":"2016-09-08","Project":"1","Sent":true,"Total":0}]}' http_version: - recorded_at: Tue, 25 Oct 2016 10:21:56 GMT -recorded_with: VCR 3.0.1 + recorded_at: Mon, 14 May 2018 19:17:31 GMT +- request: + method: get + uri: https://api.fortnox.se/3/orders/?page=2 + body: + encoding: US-ASCII + string: '' + headers: + Content-Type: + - application/json + Accept: + - application/json + Client-Secret: + - 9aBA8ZgsvR + Access-Token: + - ccaef817-d5d8-4b1c-a316-54f3e55c5c54 + response: + status: + code: 200 + message: OK + headers: + Server: + - nginx + Date: + - Mon, 14 May 2018 19:17:31 GMT + Content-Type: + - application/json + Connection: + - close + Vary: + - Accept-Encoding + - Accept-Encoding + X-Rack-Responsetime: + - '37' + X-Uid: + - feeb2d07 + X-Build: + - 06fdff7705 + body: + encoding: UTF-8 + string: '{"MetaInformation":{"@TotalResources":325,"@TotalPages":4,"@CurrentPage":2},"Orders":[{"@url":"https:\/\/api.fortnox.se\/3\/orders\/101","Cancelled":false,"Currency":"SEK","CustomerName":"Test + customer","CustomerNumber":"3","DeliveryDate":null,"DocumentNumber":"101","ExternalInvoiceReference1":"An + external reference","ExternalInvoiceReference2":"","OrderDate":"2016-09-09","Project":"1","Sent":false,"Total":26},{"@url":"https:\/\/api.fortnox.se\/3\/orders\/102","Cancelled":false,"Currency":"DKK","CustomerName":"Old + name","CustomerNumber":"1","DeliveryDate":"2016-09-08","DocumentNumber":"102","ExternalInvoiceReference1":"","ExternalInvoiceReference2":"","OrderDate":"2016-09-08","Project":"1","Sent":false,"Total":0},{"@url":"https:\/\/api.fortnox.se\/3\/orders\/103","Cancelled":false,"Currency":"DKK","CustomerName":"Old + name","CustomerNumber":"1","DeliveryDate":"2016-09-08","DocumentNumber":"103","ExternalInvoiceReference1":"","ExternalInvoiceReference2":"","OrderDate":"2016-09-08","Project":"1","Sent":false,"Total":0},{"@url":"https:\/\/api.fortnox.se\/3\/orders\/104","Cancelled":false,"Currency":"SEK","CustomerName":"Test + customer","CustomerNumber":"3","DeliveryDate":null,"DocumentNumber":"104","ExternalInvoiceReference1":"","ExternalInvoiceReference2":"","OrderDate":"2016-09-09","Project":"1","Sent":false,"Total":26},{"@url":"https:\/\/api.fortnox.se\/3\/orders\/105","Cancelled":false,"Currency":"EUR","CustomerName":"Utlandskund","CustomerNumber":"63","DeliveryDate":null,"DocumentNumber":"105","ExternalInvoiceReference1":"","ExternalInvoiceReference2":"","OrderDate":"2016-09-28","Project":"3","Sent":false,"Total":1000},{"@url":"https:\/\/api.fortnox.se\/3\/orders\/106","Cancelled":false,"Currency":"SEK","CustomerName":"Old + name","CustomerNumber":"1","DeliveryDate":null,"DocumentNumber":"106","ExternalInvoiceReference1":"","ExternalInvoiceReference2":"","OrderDate":"2016-10-13","Project":"","Sent":false,"Total":0},{"@url":"https:\/\/api.fortnox.se\/3\/orders\/107","Cancelled":false,"Currency":"SEK","CustomerName":"Old + name","CustomerNumber":"1","DeliveryDate":null,"DocumentNumber":"107","ExternalInvoiceReference1":"","ExternalInvoiceReference2":"","OrderDate":"2016-10-13","Project":"","Sent":false,"Total":0},{"@url":"https:\/\/api.fortnox.se\/3\/orders\/108","Cancelled":false,"Currency":"SEK","CustomerName":"Old + name","CustomerNumber":"1","DeliveryDate":null,"DocumentNumber":"108","ExternalInvoiceReference1":"","ExternalInvoiceReference2":"","OrderDate":"2016-10-13","Project":"","Sent":false,"Total":0},{"@url":"https:\/\/api.fortnox.se\/3\/orders\/109","Cancelled":false,"Currency":"SEK","CustomerName":"Old + name","CustomerNumber":"1","DeliveryDate":null,"DocumentNumber":"109","ExternalInvoiceReference1":"","ExternalInvoiceReference2":"","OrderDate":"2016-10-13","Project":"","Sent":false,"Total":0},{"@url":"https:\/\/api.fortnox.se\/3\/orders\/110","Cancelled":false,"Currency":"SEK","CustomerName":"Old + name","CustomerNumber":"1","DeliveryDate":null,"DocumentNumber":"110","ExternalInvoiceReference1":"","ExternalInvoiceReference2":"","OrderDate":"2016-10-13","Project":"","Sent":false,"Total":0},{"@url":"https:\/\/api.fortnox.se\/3\/orders\/111","Cancelled":false,"Currency":"SEK","CustomerName":"Old + name","CustomerNumber":"1","DeliveryDate":null,"DocumentNumber":"111","ExternalInvoiceReference1":"","ExternalInvoiceReference2":"","OrderDate":"2016-10-13","Project":"1","Sent":false,"Total":100},{"@url":"https:\/\/api.fortnox.se\/3\/orders\/112","Cancelled":false,"Currency":"SEK","CustomerName":"BolagsBemanning + i Tingsryd AB","CustomerNumber":"67","DeliveryDate":null,"DocumentNumber":"112","ExternalInvoiceReference1":"","ExternalInvoiceReference2":"","OrderDate":"2016-10-13","Project":"1","Sent":false,"Total":3},{"@url":"https:\/\/api.fortnox.se\/3\/orders\/113","Cancelled":false,"Currency":"SEK","CustomerName":"BolagsBemanning + i Tingsryd AB","CustomerNumber":"67","DeliveryDate":null,"DocumentNumber":"113","ExternalInvoiceReference1":"","ExternalInvoiceReference2":"","OrderDate":"2016-10-13","Project":"1","Sent":false,"Total":3},{"@url":"https:\/\/api.fortnox.se\/3\/orders\/114","Cancelled":false,"Currency":"SEK","CustomerName":"Old + name","CustomerNumber":"1","DeliveryDate":null,"DocumentNumber":"114","ExternalInvoiceReference1":"","ExternalInvoiceReference2":"","OrderDate":"2016-10-13","Project":"","Sent":false,"Total":0},{"@url":"https:\/\/api.fortnox.se\/3\/orders\/115","Cancelled":false,"Currency":"SEK","CustomerName":"Old + name","CustomerNumber":"1","DeliveryDate":null,"DocumentNumber":"115","ExternalInvoiceReference1":"","ExternalInvoiceReference2":"","OrderDate":"2016-10-13","Project":"","Sent":false,"Total":0},{"@url":"https:\/\/api.fortnox.se\/3\/orders\/116","Cancelled":false,"Currency":"SEK","CustomerName":"Old + name","CustomerNumber":"1","DeliveryDate":null,"DocumentNumber":"116","ExternalInvoiceReference1":"","ExternalInvoiceReference2":"","OrderDate":"2016-10-13","Project":"","Sent":false,"Total":0},{"@url":"https:\/\/api.fortnox.se\/3\/orders\/117","Cancelled":false,"Currency":"SEK","CustomerName":"Old + name","CustomerNumber":"1","DeliveryDate":"2016-10-14","DocumentNumber":"117","ExternalInvoiceReference1":"","ExternalInvoiceReference2":"","OrderDate":"2016-10-14","Project":"","Sent":false,"Total":0},{"@url":"https:\/\/api.fortnox.se\/3\/orders\/118","Cancelled":false,"Currency":"SEK","CustomerName":"Old + name","CustomerNumber":"1","DeliveryDate":null,"DocumentNumber":"118","ExternalInvoiceReference1":"","ExternalInvoiceReference2":"","OrderDate":"2016-10-17","Project":"","Sent":false,"Total":0},{"@url":"https:\/\/api.fortnox.se\/3\/orders\/119","Cancelled":false,"Currency":"SEK","CustomerName":"Old + name","CustomerNumber":"1","DeliveryDate":null,"DocumentNumber":"119","ExternalInvoiceReference1":"","ExternalInvoiceReference2":"","OrderDate":"2016-10-17","Project":"","Sent":false,"Total":0},{"@url":"https:\/\/api.fortnox.se\/3\/orders\/120","Cancelled":false,"Currency":"SEK","CustomerName":"Old + name","CustomerNumber":"1","DeliveryDate":null,"DocumentNumber":"120","ExternalInvoiceReference1":"","ExternalInvoiceReference2":"","OrderDate":"2016-10-17","Project":"","Sent":false,"Total":0},{"@url":"https:\/\/api.fortnox.se\/3\/orders\/121","Cancelled":false,"Currency":"SEK","CustomerName":"Old + name","CustomerNumber":"1","DeliveryDate":null,"DocumentNumber":"121","ExternalInvoiceReference1":"","ExternalInvoiceReference2":"","OrderDate":"2016-10-17","Project":"","Sent":false,"Total":0},{"@url":"https:\/\/api.fortnox.se\/3\/orders\/122","Cancelled":false,"Currency":"SEK","CustomerName":"Old + name","CustomerNumber":"1","DeliveryDate":null,"DocumentNumber":"122","ExternalInvoiceReference1":"","ExternalInvoiceReference2":"","OrderDate":"2016-10-17","Project":"","Sent":false,"Total":0},{"@url":"https:\/\/api.fortnox.se\/3\/orders\/123","Cancelled":false,"Currency":"SEK","CustomerName":"Old + name","CustomerNumber":"1","DeliveryDate":null,"DocumentNumber":"123","ExternalInvoiceReference1":"","ExternalInvoiceReference2":"","OrderDate":"2016-10-17","Project":"","Sent":false,"Total":0},{"@url":"https:\/\/api.fortnox.se\/3\/orders\/124","Cancelled":false,"Currency":"SEK","CustomerName":"Old + name","CustomerNumber":"1","DeliveryDate":null,"DocumentNumber":"124","ExternalInvoiceReference1":"","ExternalInvoiceReference2":"","OrderDate":"2016-10-17","Project":"","Sent":false,"Total":0},{"@url":"https:\/\/api.fortnox.se\/3\/orders\/125","Cancelled":false,"Currency":"SEK","CustomerName":"Old + name","CustomerNumber":"1","DeliveryDate":null,"DocumentNumber":"125","ExternalInvoiceReference1":"","ExternalInvoiceReference2":"","OrderDate":"2016-10-17","Project":"1","Sent":false,"Total":0},{"@url":"https:\/\/api.fortnox.se\/3\/orders\/126","Cancelled":false,"Currency":"SEK","CustomerName":"Test + customer","CustomerNumber":"3","DeliveryDate":null,"DocumentNumber":"126","ExternalInvoiceReference1":"","ExternalInvoiceReference2":"","OrderDate":"2016-10-17","Project":"1","Sent":false,"Total":26},{"@url":"https:\/\/api.fortnox.se\/3\/orders\/127","Cancelled":false,"Currency":"DKK","CustomerName":"Old + name","CustomerNumber":"1","DeliveryDate":null,"DocumentNumber":"127","ExternalInvoiceReference1":"","ExternalInvoiceReference2":"","OrderDate":"2016-10-17","Project":"1","Sent":false,"Total":0},{"@url":"https:\/\/api.fortnox.se\/3\/orders\/128","Cancelled":false,"Currency":"SEK","CustomerName":"Old + name","CustomerNumber":"1","DeliveryDate":null,"DocumentNumber":"128","ExternalInvoiceReference1":"","ExternalInvoiceReference2":"","OrderDate":"2016-10-17","Project":"1","Sent":false,"Total":968510},{"@url":"https:\/\/api.fortnox.se\/3\/orders\/129","Cancelled":false,"Currency":"SEK","CustomerName":"Old + name","CustomerNumber":"1","DeliveryDate":null,"DocumentNumber":"129","ExternalInvoiceReference1":"","ExternalInvoiceReference2":"","OrderDate":"2016-10-17","Project":"","Sent":false,"Total":0},{"@url":"https:\/\/api.fortnox.se\/3\/orders\/130","Cancelled":false,"Currency":"SEK","CustomerName":"Old + name","CustomerNumber":"1","DeliveryDate":null,"DocumentNumber":"130","ExternalInvoiceReference1":"","ExternalInvoiceReference2":"","OrderDate":"2016-10-17","Project":"","Sent":false,"Total":0},{"@url":"https:\/\/api.fortnox.se\/3\/orders\/131","Cancelled":false,"Currency":"SEK","CustomerName":"Old + name","CustomerNumber":"1","DeliveryDate":null,"DocumentNumber":"131","ExternalInvoiceReference1":"","ExternalInvoiceReference2":"","OrderDate":"2016-10-17","Project":"","Sent":false,"Total":0},{"@url":"https:\/\/api.fortnox.se\/3\/orders\/132","Cancelled":false,"Currency":"SEK","CustomerName":"Old + name","CustomerNumber":"1","DeliveryDate":null,"DocumentNumber":"132","ExternalInvoiceReference1":"","ExternalInvoiceReference2":"","OrderDate":"2016-10-17","Project":"","Sent":false,"Total":0},{"@url":"https:\/\/api.fortnox.se\/3\/orders\/133","Cancelled":false,"Currency":"SEK","CustomerName":"Old + name","CustomerNumber":"1","DeliveryDate":null,"DocumentNumber":"133","ExternalInvoiceReference1":"","ExternalInvoiceReference2":"","OrderDate":"2016-10-17","Project":"","Sent":false,"Total":0},{"@url":"https:\/\/api.fortnox.se\/3\/orders\/134","Cancelled":false,"Currency":"SEK","CustomerName":"Old + name","CustomerNumber":"1","DeliveryDate":null,"DocumentNumber":"134","ExternalInvoiceReference1":"","ExternalInvoiceReference2":"","OrderDate":"2016-10-17","Project":"","Sent":false,"Total":0},{"@url":"https:\/\/api.fortnox.se\/3\/orders\/135","Cancelled":false,"Currency":"SEK","CustomerName":"Old + name","CustomerNumber":"1","DeliveryDate":null,"DocumentNumber":"135","ExternalInvoiceReference1":"","ExternalInvoiceReference2":"","OrderDate":"2016-10-17","Project":"","Sent":false,"Total":0},{"@url":"https:\/\/api.fortnox.se\/3\/orders\/136","Cancelled":false,"Currency":"SEK","CustomerName":"Old + name","CustomerNumber":"1","DeliveryDate":null,"DocumentNumber":"136","ExternalInvoiceReference1":"","ExternalInvoiceReference2":"","OrderDate":"2016-10-17","Project":"","Sent":false,"Total":0},{"@url":"https:\/\/api.fortnox.se\/3\/orders\/137","Cancelled":false,"Currency":"SEK","CustomerName":"Old + name","CustomerNumber":"1","DeliveryDate":null,"DocumentNumber":"137","ExternalInvoiceReference1":"","ExternalInvoiceReference2":"","OrderDate":"2016-10-17","Project":"","Sent":false,"Total":0},{"@url":"https:\/\/api.fortnox.se\/3\/orders\/138","Cancelled":false,"Currency":"SEK","CustomerName":"Old + name","CustomerNumber":"1","DeliveryDate":null,"DocumentNumber":"138","ExternalInvoiceReference1":"","ExternalInvoiceReference2":"","OrderDate":"2016-10-17","Project":"","Sent":false,"Total":0},{"@url":"https:\/\/api.fortnox.se\/3\/orders\/139","Cancelled":false,"Currency":"SEK","CustomerName":"Old + name","CustomerNumber":"1","DeliveryDate":null,"DocumentNumber":"139","ExternalInvoiceReference1":"","ExternalInvoiceReference2":"","OrderDate":"2016-10-17","Project":"","Sent":false,"Total":0},{"@url":"https:\/\/api.fortnox.se\/3\/orders\/140","Cancelled":false,"Currency":"SEK","CustomerName":"Old + name","CustomerNumber":"1","DeliveryDate":null,"DocumentNumber":"140","ExternalInvoiceReference1":"","ExternalInvoiceReference2":"","OrderDate":"2016-10-17","Project":"","Sent":false,"Total":0},{"@url":"https:\/\/api.fortnox.se\/3\/orders\/141","Cancelled":false,"Currency":"SEK","CustomerName":"Old + name","CustomerNumber":"1","DeliveryDate":null,"DocumentNumber":"141","ExternalInvoiceReference1":"","ExternalInvoiceReference2":"","OrderDate":"2016-10-17","Project":"","Sent":false,"Total":0},{"@url":"https:\/\/api.fortnox.se\/3\/orders\/142","Cancelled":false,"Currency":"SEK","CustomerName":"Old + name","CustomerNumber":"1","DeliveryDate":null,"DocumentNumber":"142","ExternalInvoiceReference1":"","ExternalInvoiceReference2":"","OrderDate":"2016-10-17","Project":"","Sent":false,"Total":0},{"@url":"https:\/\/api.fortnox.se\/3\/orders\/143","Cancelled":false,"Currency":"SEK","CustomerName":"Test + customer","CustomerNumber":"3","DeliveryDate":null,"DocumentNumber":"143","ExternalInvoiceReference1":"","ExternalInvoiceReference2":"","OrderDate":"2016-10-17","Project":"1","Sent":false,"Total":219},{"@url":"https:\/\/api.fortnox.se\/3\/orders\/144","Cancelled":false,"Currency":"SEK","CustomerName":"A + company","CustomerNumber":"132","DeliveryDate":null,"DocumentNumber":"144","ExternalInvoiceReference1":"","ExternalInvoiceReference2":"","OrderDate":"2016-10-17","Project":"1","Sent":false,"Total":0},{"@url":"https:\/\/api.fortnox.se\/3\/orders\/145","Cancelled":false,"Currency":"SEK","CustomerName":"Test + customer","CustomerNumber":"3","DeliveryDate":null,"DocumentNumber":"145","ExternalInvoiceReference1":"","ExternalInvoiceReference2":"","OrderDate":"2016-10-17","Project":"1","Sent":false,"Total":26},{"@url":"https:\/\/api.fortnox.se\/3\/orders\/146","Cancelled":false,"Currency":"SEK","CustomerName":"Old + name","CustomerNumber":"1","DeliveryDate":null,"DocumentNumber":"146","ExternalInvoiceReference1":"","ExternalInvoiceReference2":"","OrderDate":"2016-10-17","Project":"1","Sent":false,"Total":968510},{"@url":"https:\/\/api.fortnox.se\/3\/orders\/147","Cancelled":false,"Currency":"DKK","CustomerName":"Old + name","CustomerNumber":"1","DeliveryDate":null,"DocumentNumber":"147","ExternalInvoiceReference1":"","ExternalInvoiceReference2":"","OrderDate":"2016-10-17","Project":"1","Sent":false,"Total":0},{"@url":"https:\/\/api.fortnox.se\/3\/orders\/148","Cancelled":false,"Currency":"SEK","CustomerName":"Old + name","CustomerNumber":"1","DeliveryDate":null,"DocumentNumber":"148","ExternalInvoiceReference1":"","ExternalInvoiceReference2":"","OrderDate":"2016-10-17","Project":"1","Sent":false,"Total":0},{"@url":"https:\/\/api.fortnox.se\/3\/orders\/149","Cancelled":false,"Currency":"SEK","CustomerName":"Test + customer","CustomerNumber":"3","DeliveryDate":null,"DocumentNumber":"149","ExternalInvoiceReference1":"","ExternalInvoiceReference2":"","OrderDate":"2016-10-17","Project":"1","Sent":false,"Total":219},{"@url":"https:\/\/api.fortnox.se\/3\/orders\/150","Cancelled":false,"Currency":"SEK","CustomerName":"Test + customer","CustomerNumber":"3","DeliveryDate":null,"DocumentNumber":"150","ExternalInvoiceReference1":"","ExternalInvoiceReference2":"","OrderDate":"2016-10-17","Project":"1","Sent":false,"Total":26},{"@url":"https:\/\/api.fortnox.se\/3\/orders\/151","Cancelled":false,"Currency":"SEK","CustomerName":"Test + customer","CustomerNumber":"3","DeliveryDate":null,"DocumentNumber":"151","ExternalInvoiceReference1":"","ExternalInvoiceReference2":"","OrderDate":"2016-10-17","Project":"1","Sent":false,"Total":26},{"@url":"https:\/\/api.fortnox.se\/3\/orders\/152","Cancelled":false,"Currency":"SEK","CustomerName":"Test + customer","CustomerNumber":"3","DeliveryDate":null,"DocumentNumber":"152","ExternalInvoiceReference1":"","ExternalInvoiceReference2":"","OrderDate":"2016-10-18","Project":"1","Sent":false,"Total":26},{"@url":"https:\/\/api.fortnox.se\/3\/orders\/153","Cancelled":false,"Currency":"SEK","CustomerName":"Old + name","CustomerNumber":"1","DeliveryDate":null,"DocumentNumber":"153","ExternalInvoiceReference1":"","ExternalInvoiceReference2":"","OrderDate":"2016-10-18","Project":"","Sent":false,"Total":0},{"@url":"https:\/\/api.fortnox.se\/3\/orders\/154","Cancelled":false,"Currency":"SEK","CustomerName":"Old + name","CustomerNumber":"1","DeliveryDate":null,"DocumentNumber":"154","ExternalInvoiceReference1":"","ExternalInvoiceReference2":"","OrderDate":"2016-10-18","Project":"","Sent":false,"Total":0},{"@url":"https:\/\/api.fortnox.se\/3\/orders\/155","Cancelled":false,"Currency":"SEK","CustomerName":"Old + name","CustomerNumber":"1","DeliveryDate":null,"DocumentNumber":"155","ExternalInvoiceReference1":"","ExternalInvoiceReference2":"","OrderDate":"2016-10-25","Project":"","Sent":false,"Total":0},{"@url":"https:\/\/api.fortnox.se\/3\/orders\/156","Cancelled":false,"Currency":"SEK","CustomerName":"Old + name","CustomerNumber":"1","DeliveryDate":null,"DocumentNumber":"156","ExternalInvoiceReference1":"","ExternalInvoiceReference2":"","OrderDate":"2016-10-25","Project":"","Sent":false,"Total":0},{"@url":"https:\/\/api.fortnox.se\/3\/orders\/157","Cancelled":false,"Currency":"SEK","CustomerName":"Old + name","CustomerNumber":"1","DeliveryDate":null,"DocumentNumber":"157","ExternalInvoiceReference1":"","ExternalInvoiceReference2":"","OrderDate":"2016-10-25","Project":"","Sent":false,"Total":0},{"@url":"https:\/\/api.fortnox.se\/3\/orders\/158","Cancelled":false,"Currency":"SEK","CustomerName":"Old + name","CustomerNumber":"1","DeliveryDate":null,"DocumentNumber":"158","ExternalInvoiceReference1":"","ExternalInvoiceReference2":"","OrderDate":"2016-10-25","Project":"","Sent":false,"Total":0},{"@url":"https:\/\/api.fortnox.se\/3\/orders\/159","Cancelled":false,"Currency":"SEK","CustomerName":"Old + name","CustomerNumber":"1","DeliveryDate":null,"DocumentNumber":"159","ExternalInvoiceReference1":"","ExternalInvoiceReference2":"","OrderDate":"2016-10-25","Project":"","Sent":false,"Total":0},{"@url":"https:\/\/api.fortnox.se\/3\/orders\/160","Cancelled":false,"Currency":"SEK","CustomerName":"Old + name","CustomerNumber":"1","DeliveryDate":null,"DocumentNumber":"160","ExternalInvoiceReference1":"","ExternalInvoiceReference2":"","OrderDate":"2016-10-25","Project":"","Sent":false,"Total":0},{"@url":"https:\/\/api.fortnox.se\/3\/orders\/161","Cancelled":false,"Currency":"SEK","CustomerName":"Old + name","CustomerNumber":"1","DeliveryDate":null,"DocumentNumber":"161","ExternalInvoiceReference1":"","ExternalInvoiceReference2":"","OrderDate":"2016-10-25","Project":"","Sent":false,"Total":0},{"@url":"https:\/\/api.fortnox.se\/3\/orders\/162","Cancelled":false,"Currency":"SEK","CustomerName":"Old + name","CustomerNumber":"1","DeliveryDate":null,"DocumentNumber":"162","ExternalInvoiceReference1":"","ExternalInvoiceReference2":"","OrderDate":"2016-10-25","Project":"","Sent":false,"Total":0},{"@url":"https:\/\/api.fortnox.se\/3\/orders\/163","Cancelled":false,"Currency":"SEK","CustomerName":"Old + name","CustomerNumber":"1","DeliveryDate":null,"DocumentNumber":"163","ExternalInvoiceReference1":"","ExternalInvoiceReference2":"","OrderDate":"2016-10-25","Project":"","Sent":false,"Total":0},{"@url":"https:\/\/api.fortnox.se\/3\/orders\/164","Cancelled":false,"Currency":"SEK","CustomerName":"Old + name","CustomerNumber":"1","DeliveryDate":null,"DocumentNumber":"164","ExternalInvoiceReference1":"","ExternalInvoiceReference2":"","OrderDate":"2016-10-25","Project":"","Sent":false,"Total":0},{"@url":"https:\/\/api.fortnox.se\/3\/orders\/165","Cancelled":false,"Currency":"SEK","CustomerName":"Old + name","CustomerNumber":"1","DeliveryDate":null,"DocumentNumber":"165","ExternalInvoiceReference1":"","ExternalInvoiceReference2":"","OrderDate":"2016-10-25","Project":"","Sent":false,"Total":0},{"@url":"https:\/\/api.fortnox.se\/3\/orders\/166","Cancelled":false,"Currency":"SEK","CustomerName":"Old + name","CustomerNumber":"1","DeliveryDate":null,"DocumentNumber":"166","ExternalInvoiceReference1":"","ExternalInvoiceReference2":"","OrderDate":"2016-10-25","Project":"","Sent":false,"Total":0},{"@url":"https:\/\/api.fortnox.se\/3\/orders\/167","Cancelled":false,"Currency":"SEK","CustomerName":"Old + name","CustomerNumber":"1","DeliveryDate":null,"DocumentNumber":"167","ExternalInvoiceReference1":"","ExternalInvoiceReference2":"","OrderDate":"2016-10-25","Project":"","Sent":false,"Total":0},{"@url":"https:\/\/api.fortnox.se\/3\/orders\/168","Cancelled":false,"Currency":"SEK","CustomerName":"Old + name","CustomerNumber":"1","DeliveryDate":null,"DocumentNumber":"168","ExternalInvoiceReference1":"","ExternalInvoiceReference2":"","OrderDate":"2016-10-25","Project":"","Sent":false,"Total":0},{"@url":"https:\/\/api.fortnox.se\/3\/orders\/169","Cancelled":false,"Currency":"SEK","CustomerName":"Old + name","CustomerNumber":"1","DeliveryDate":null,"DocumentNumber":"169","ExternalInvoiceReference1":"","ExternalInvoiceReference2":"","OrderDate":"2016-10-25","Project":"","Sent":false,"Total":0},{"@url":"https:\/\/api.fortnox.se\/3\/orders\/170","Cancelled":false,"Currency":"SEK","CustomerName":"Old + name","CustomerNumber":"1","DeliveryDate":null,"DocumentNumber":"170","ExternalInvoiceReference1":"","ExternalInvoiceReference2":"","OrderDate":"2016-10-25","Project":"","Sent":false,"Total":0},{"@url":"https:\/\/api.fortnox.se\/3\/orders\/171","Cancelled":false,"Currency":"SEK","CustomerName":"Old + name","CustomerNumber":"1","DeliveryDate":null,"DocumentNumber":"171","ExternalInvoiceReference1":"","ExternalInvoiceReference2":"","OrderDate":"2016-10-25","Project":"","Sent":false,"Total":0},{"@url":"https:\/\/api.fortnox.se\/3\/orders\/172","Cancelled":false,"Currency":"SEK","CustomerName":"Old + name","CustomerNumber":"1","DeliveryDate":null,"DocumentNumber":"172","ExternalInvoiceReference1":"","ExternalInvoiceReference2":"","OrderDate":"2016-10-25","Project":"","Sent":false,"Total":0},{"@url":"https:\/\/api.fortnox.se\/3\/orders\/173","Cancelled":false,"Currency":"SEK","CustomerName":"Old + name","CustomerNumber":"1","DeliveryDate":null,"DocumentNumber":"173","ExternalInvoiceReference1":"","ExternalInvoiceReference2":"","OrderDate":"2016-10-25","Project":"","Sent":false,"Total":0},{"@url":"https:\/\/api.fortnox.se\/3\/orders\/174","Cancelled":false,"Currency":"SEK","CustomerName":"Old + name","CustomerNumber":"1","DeliveryDate":null,"DocumentNumber":"174","ExternalInvoiceReference1":"","ExternalInvoiceReference2":"","OrderDate":"2016-10-25","Project":"","Sent":false,"Total":0},{"@url":"https:\/\/api.fortnox.se\/3\/orders\/175","Cancelled":false,"Currency":"SEK","CustomerName":"Old + name","CustomerNumber":"1","DeliveryDate":null,"DocumentNumber":"175","ExternalInvoiceReference1":"","ExternalInvoiceReference2":"","OrderDate":"2016-10-25","Project":"","Sent":false,"Total":0},{"@url":"https:\/\/api.fortnox.se\/3\/orders\/176","Cancelled":false,"Currency":"SEK","CustomerName":"Old + name","CustomerNumber":"1","DeliveryDate":null,"DocumentNumber":"176","ExternalInvoiceReference1":"","ExternalInvoiceReference2":"","OrderDate":"2016-10-25","Project":"","Sent":false,"Total":0},{"@url":"https:\/\/api.fortnox.se\/3\/orders\/177","Cancelled":false,"Currency":"SEK","CustomerName":"Old + name","CustomerNumber":"1","DeliveryDate":null,"DocumentNumber":"177","ExternalInvoiceReference1":"","ExternalInvoiceReference2":"","OrderDate":"2016-10-25","Project":"","Sent":false,"Total":0},{"@url":"https:\/\/api.fortnox.se\/3\/orders\/178","Cancelled":false,"Currency":"SEK","CustomerName":"Old + name","CustomerNumber":"1","DeliveryDate":null,"DocumentNumber":"178","ExternalInvoiceReference1":"","ExternalInvoiceReference2":"","OrderDate":"2016-10-25","Project":"","Sent":false,"Total":0},{"@url":"https:\/\/api.fortnox.se\/3\/orders\/179","Cancelled":false,"Currency":"SEK","CustomerName":"Old + name","CustomerNumber":"1","DeliveryDate":null,"DocumentNumber":"179","ExternalInvoiceReference1":"","ExternalInvoiceReference2":"","OrderDate":"2016-10-25","Project":"","Sent":false,"Total":0},{"@url":"https:\/\/api.fortnox.se\/3\/orders\/180","Cancelled":false,"Currency":"SEK","CustomerName":"Old + name","CustomerNumber":"1","DeliveryDate":null,"DocumentNumber":"180","ExternalInvoiceReference1":"","ExternalInvoiceReference2":"","OrderDate":"2016-10-25","Project":"","Sent":false,"Total":0},{"@url":"https:\/\/api.fortnox.se\/3\/orders\/181","Cancelled":false,"Currency":"SEK","CustomerName":"Old + name","CustomerNumber":"1","DeliveryDate":null,"DocumentNumber":"181","ExternalInvoiceReference1":"","ExternalInvoiceReference2":"","OrderDate":"2016-10-25","Project":"","Sent":false,"Total":0},{"@url":"https:\/\/api.fortnox.se\/3\/orders\/182","Cancelled":false,"Currency":"SEK","CustomerName":"Old + name","CustomerNumber":"1","DeliveryDate":null,"DocumentNumber":"182","ExternalInvoiceReference1":"","ExternalInvoiceReference2":"","OrderDate":"2016-10-25","Project":"","Sent":false,"Total":0},{"@url":"https:\/\/api.fortnox.se\/3\/orders\/183","Cancelled":false,"Currency":"SEK","CustomerName":"Old + name","CustomerNumber":"1","DeliveryDate":null,"DocumentNumber":"183","ExternalInvoiceReference1":"","ExternalInvoiceReference2":"","OrderDate":"2016-10-25","Project":"","Sent":false,"Total":0},{"@url":"https:\/\/api.fortnox.se\/3\/orders\/184","Cancelled":false,"Currency":"SEK","CustomerName":"Old + name","CustomerNumber":"1","DeliveryDate":null,"DocumentNumber":"184","ExternalInvoiceReference1":"","ExternalInvoiceReference2":"","OrderDate":"2016-10-25","Project":"","Sent":false,"Total":0},{"@url":"https:\/\/api.fortnox.se\/3\/orders\/185","Cancelled":false,"Currency":"SEK","CustomerName":"Old + name","CustomerNumber":"1","DeliveryDate":null,"DocumentNumber":"185","ExternalInvoiceReference1":"","ExternalInvoiceReference2":"","OrderDate":"2016-10-25","Project":"","Sent":false,"Total":0},{"@url":"https:\/\/api.fortnox.se\/3\/orders\/186","Cancelled":false,"Currency":"SEK","CustomerName":"Old + name","CustomerNumber":"1","DeliveryDate":null,"DocumentNumber":"186","ExternalInvoiceReference1":"","ExternalInvoiceReference2":"","OrderDate":"2016-10-25","Project":"","Sent":false,"Total":0},{"@url":"https:\/\/api.fortnox.se\/3\/orders\/187","Cancelled":false,"Currency":"SEK","CustomerName":"Old + name","CustomerNumber":"1","DeliveryDate":null,"DocumentNumber":"187","ExternalInvoiceReference1":"","ExternalInvoiceReference2":"","OrderDate":"2016-10-25","Project":"","Sent":false,"Total":0},{"@url":"https:\/\/api.fortnox.se\/3\/orders\/188","Cancelled":false,"Currency":"SEK","CustomerName":"Old + name","CustomerNumber":"1","DeliveryDate":null,"DocumentNumber":"188","ExternalInvoiceReference1":"","ExternalInvoiceReference2":"","OrderDate":"2016-10-25","Project":"","Sent":false,"Total":0},{"@url":"https:\/\/api.fortnox.se\/3\/orders\/189","Cancelled":false,"Currency":"SEK","CustomerName":"Old + name","CustomerNumber":"1","DeliveryDate":null,"DocumentNumber":"189","ExternalInvoiceReference1":"","ExternalInvoiceReference2":"","OrderDate":"2016-10-25","Project":"","Sent":false,"Total":0},{"@url":"https:\/\/api.fortnox.se\/3\/orders\/190","Cancelled":false,"Currency":"SEK","CustomerName":"Old + name","CustomerNumber":"1","DeliveryDate":null,"DocumentNumber":"190","ExternalInvoiceReference1":"","ExternalInvoiceReference2":"","OrderDate":"2016-10-25","Project":"","Sent":false,"Total":0},{"@url":"https:\/\/api.fortnox.se\/3\/orders\/191","Cancelled":false,"Currency":"SEK","CustomerName":"Old + name","CustomerNumber":"1","DeliveryDate":null,"DocumentNumber":"191","ExternalInvoiceReference1":"","ExternalInvoiceReference2":"","OrderDate":"2016-10-25","Project":"","Sent":false,"Total":0},{"@url":"https:\/\/api.fortnox.se\/3\/orders\/192","Cancelled":false,"Currency":"SEK","CustomerName":"Old + name","CustomerNumber":"1","DeliveryDate":null,"DocumentNumber":"192","ExternalInvoiceReference1":"","ExternalInvoiceReference2":"","OrderDate":"2016-10-25","Project":"","Sent":false,"Total":0},{"@url":"https:\/\/api.fortnox.se\/3\/orders\/193","Cancelled":false,"Currency":"SEK","CustomerName":"Old + name","CustomerNumber":"1","DeliveryDate":null,"DocumentNumber":"193","ExternalInvoiceReference1":"","ExternalInvoiceReference2":"","OrderDate":"2016-10-25","Project":"","Sent":false,"Total":0},{"@url":"https:\/\/api.fortnox.se\/3\/orders\/194","Cancelled":false,"Currency":"SEK","CustomerName":"Old + name","CustomerNumber":"1","DeliveryDate":null,"DocumentNumber":"194","ExternalInvoiceReference1":"","ExternalInvoiceReference2":"","OrderDate":"2016-10-25","Project":"","Sent":false,"Total":0},{"@url":"https:\/\/api.fortnox.se\/3\/orders\/195","Cancelled":false,"Currency":"SEK","CustomerName":"Old + name","CustomerNumber":"1","DeliveryDate":null,"DocumentNumber":"195","ExternalInvoiceReference1":"","ExternalInvoiceReference2":"","OrderDate":"2016-10-25","Project":"","Sent":false,"Total":0},{"@url":"https:\/\/api.fortnox.se\/3\/orders\/196","Cancelled":false,"Currency":"SEK","CustomerName":"Old + name","CustomerNumber":"1","DeliveryDate":null,"DocumentNumber":"196","ExternalInvoiceReference1":"","ExternalInvoiceReference2":"","OrderDate":"2016-10-25","Project":"","Sent":false,"Total":0},{"@url":"https:\/\/api.fortnox.se\/3\/orders\/197","Cancelled":false,"Currency":"SEK","CustomerName":"Old + name","CustomerNumber":"1","DeliveryDate":null,"DocumentNumber":"197","ExternalInvoiceReference1":"","ExternalInvoiceReference2":"","OrderDate":"2016-10-25","Project":"","Sent":false,"Total":0},{"@url":"https:\/\/api.fortnox.se\/3\/orders\/198","Cancelled":false,"Currency":"SEK","CustomerName":"Old + name","CustomerNumber":"1","DeliveryDate":null,"DocumentNumber":"198","ExternalInvoiceReference1":"","ExternalInvoiceReference2":"","OrderDate":"2016-10-25","Project":"","Sent":false,"Total":0},{"@url":"https:\/\/api.fortnox.se\/3\/orders\/199","Cancelled":false,"Currency":"SEK","CustomerName":"Old + name","CustomerNumber":"1","DeliveryDate":null,"DocumentNumber":"199","ExternalInvoiceReference1":"","ExternalInvoiceReference2":"","OrderDate":"2016-10-25","Project":"","Sent":false,"Total":0},{"@url":"https:\/\/api.fortnox.se\/3\/orders\/200","Cancelled":false,"Currency":"SEK","CustomerName":"Old + name","CustomerNumber":"1","DeliveryDate":null,"DocumentNumber":"200","ExternalInvoiceReference1":"","ExternalInvoiceReference2":"","OrderDate":"2016-10-25","Project":"","Sent":false,"Total":0}]}' + http_version: + recorded_at: Mon, 14 May 2018 19:17:31 GMT +- request: + method: get + uri: https://api.fortnox.se/3/orders/?page=3 + body: + encoding: US-ASCII + string: '' + headers: + Content-Type: + - application/json + Accept: + - application/json + Client-Secret: + - 9aBA8ZgsvR + Access-Token: + - ccaef817-d5d8-4b1c-a316-54f3e55c5c54 + response: + status: + code: 200 + message: OK + headers: + Server: + - nginx + Date: + - Mon, 14 May 2018 19:17:32 GMT + Content-Type: + - application/json + Connection: + - close + Vary: + - Accept-Encoding + - Accept-Encoding + X-Rack-Responsetime: + - '36' + X-Uid: + - 36cd5c67 + X-Build: + - 06fdff7705 + body: + encoding: UTF-8 + string: '{"MetaInformation":{"@TotalResources":325,"@TotalPages":4,"@CurrentPage":3},"Orders":[{"@url":"https:\/\/api.fortnox.se\/3\/orders\/201","Cancelled":false,"Currency":"SEK","CustomerName":"Old + name","CustomerNumber":"1","DeliveryDate":null,"DocumentNumber":"201","ExternalInvoiceReference1":"","ExternalInvoiceReference2":"","OrderDate":"2016-10-25","Project":"","Sent":false,"Total":0},{"@url":"https:\/\/api.fortnox.se\/3\/orders\/202","Cancelled":false,"Currency":"SEK","CustomerName":"Old + name","CustomerNumber":"1","DeliveryDate":null,"DocumentNumber":"202","ExternalInvoiceReference1":"","ExternalInvoiceReference2":"","OrderDate":"2016-10-25","Project":"","Sent":false,"Total":0},{"@url":"https:\/\/api.fortnox.se\/3\/orders\/203","Cancelled":false,"Currency":"SEK","CustomerName":"Old + name","CustomerNumber":"1","DeliveryDate":null,"DocumentNumber":"203","ExternalInvoiceReference1":"","ExternalInvoiceReference2":"","OrderDate":"2016-10-25","Project":"","Sent":false,"Total":0},{"@url":"https:\/\/api.fortnox.se\/3\/orders\/204","Cancelled":false,"Currency":"SEK","CustomerName":"Old + name","CustomerNumber":"1","DeliveryDate":null,"DocumentNumber":"204","ExternalInvoiceReference1":"","ExternalInvoiceReference2":"","OrderDate":"2016-10-25","Project":"","Sent":false,"Total":0},{"@url":"https:\/\/api.fortnox.se\/3\/orders\/205","Cancelled":false,"Currency":"SEK","CustomerName":"Old + name","CustomerNumber":"1","DeliveryDate":null,"DocumentNumber":"205","ExternalInvoiceReference1":"","ExternalInvoiceReference2":"","OrderDate":"2016-10-25","Project":"","Sent":false,"Total":0},{"@url":"https:\/\/api.fortnox.se\/3\/orders\/206","Cancelled":false,"Currency":"SEK","CustomerName":"Old + name","CustomerNumber":"1","DeliveryDate":null,"DocumentNumber":"206","ExternalInvoiceReference1":"","ExternalInvoiceReference2":"","OrderDate":"2016-10-25","Project":"","Sent":false,"Total":0},{"@url":"https:\/\/api.fortnox.se\/3\/orders\/207","Cancelled":false,"Currency":"SEK","CustomerName":"Old + name","CustomerNumber":"1","DeliveryDate":null,"DocumentNumber":"207","ExternalInvoiceReference1":"","ExternalInvoiceReference2":"","OrderDate":"2016-10-25","Project":"","Sent":false,"Total":0},{"@url":"https:\/\/api.fortnox.se\/3\/orders\/208","Cancelled":false,"Currency":"SEK","CustomerName":"Old + name","CustomerNumber":"1","DeliveryDate":null,"DocumentNumber":"208","ExternalInvoiceReference1":"","ExternalInvoiceReference2":"","OrderDate":"2016-10-25","Project":"","Sent":false,"Total":0},{"@url":"https:\/\/api.fortnox.se\/3\/orders\/209","Cancelled":false,"Currency":"SEK","CustomerName":"Old + name","CustomerNumber":"1","DeliveryDate":null,"DocumentNumber":"209","ExternalInvoiceReference1":"","ExternalInvoiceReference2":"","OrderDate":"2016-10-25","Project":"","Sent":false,"Total":0},{"@url":"https:\/\/api.fortnox.se\/3\/orders\/210","Cancelled":false,"Currency":"SEK","CustomerName":"Old + name","CustomerNumber":"1","DeliveryDate":null,"DocumentNumber":"210","ExternalInvoiceReference1":"","ExternalInvoiceReference2":"","OrderDate":"2016-10-25","Project":"","Sent":false,"Total":0},{"@url":"https:\/\/api.fortnox.se\/3\/orders\/211","Cancelled":false,"Currency":"SEK","CustomerName":"Old + name","CustomerNumber":"1","DeliveryDate":null,"DocumentNumber":"211","ExternalInvoiceReference1":"","ExternalInvoiceReference2":"","OrderDate":"2016-10-25","Project":"","Sent":false,"Total":0},{"@url":"https:\/\/api.fortnox.se\/3\/orders\/212","Cancelled":false,"Currency":"SEK","CustomerName":"Old + name","CustomerNumber":"1","DeliveryDate":null,"DocumentNumber":"212","ExternalInvoiceReference1":"","ExternalInvoiceReference2":"","OrderDate":"2016-10-25","Project":"","Sent":false,"Total":0},{"@url":"https:\/\/api.fortnox.se\/3\/orders\/213","Cancelled":false,"Currency":"SEK","CustomerName":"Old + name","CustomerNumber":"1","DeliveryDate":null,"DocumentNumber":"213","ExternalInvoiceReference1":"","ExternalInvoiceReference2":"","OrderDate":"2016-10-25","Project":"","Sent":false,"Total":0},{"@url":"https:\/\/api.fortnox.se\/3\/orders\/214","Cancelled":false,"Currency":"SEK","CustomerName":"Old + name","CustomerNumber":"1","DeliveryDate":null,"DocumentNumber":"214","ExternalInvoiceReference1":"","ExternalInvoiceReference2":"","OrderDate":"2016-10-25","Project":"","Sent":false,"Total":0},{"@url":"https:\/\/api.fortnox.se\/3\/orders\/215","Cancelled":false,"Currency":"SEK","CustomerName":"Old + name","CustomerNumber":"1","DeliveryDate":null,"DocumentNumber":"215","ExternalInvoiceReference1":"","ExternalInvoiceReference2":"","OrderDate":"2016-10-25","Project":"","Sent":false,"Total":0},{"@url":"https:\/\/api.fortnox.se\/3\/orders\/216","Cancelled":false,"Currency":"SEK","CustomerName":"Old + name","CustomerNumber":"1","DeliveryDate":null,"DocumentNumber":"216","ExternalInvoiceReference1":"","ExternalInvoiceReference2":"","OrderDate":"2016-10-25","Project":"","Sent":false,"Total":0},{"@url":"https:\/\/api.fortnox.se\/3\/orders\/217","Cancelled":false,"Currency":"SEK","CustomerName":"Old + name","CustomerNumber":"1","DeliveryDate":null,"DocumentNumber":"217","ExternalInvoiceReference1":"","ExternalInvoiceReference2":"","OrderDate":"2016-10-25","Project":"1","Sent":false,"Total":968510},{"@url":"https:\/\/api.fortnox.se\/3\/orders\/218","Cancelled":false,"Currency":"DKK","CustomerName":"Old + name","CustomerNumber":"1","DeliveryDate":null,"DocumentNumber":"218","ExternalInvoiceReference1":"","ExternalInvoiceReference2":"","OrderDate":"2016-10-25","Project":"1","Sent":false,"Total":0},{"@url":"https:\/\/api.fortnox.se\/3\/orders\/219","Cancelled":false,"Currency":"SEK","CustomerName":"Old + name","CustomerNumber":"1","DeliveryDate":null,"DocumentNumber":"219","ExternalInvoiceReference1":"","ExternalInvoiceReference2":"","OrderDate":"2016-10-25","Project":"1","Sent":false,"Total":0},{"@url":"https:\/\/api.fortnox.se\/3\/orders\/220","Cancelled":false,"Currency":"SEK","CustomerName":"BolagsBemanning + i Tingsryd AB","CustomerNumber":"150","DeliveryDate":null,"DocumentNumber":"220","ExternalInvoiceReference1":"","ExternalInvoiceReference2":"","OrderDate":"2016-10-25","Project":"1","Sent":false,"Total":0},{"@url":"https:\/\/api.fortnox.se\/3\/orders\/221","Cancelled":false,"Currency":"SEK","CustomerName":"Test + customer","CustomerNumber":"3","DeliveryDate":null,"DocumentNumber":"221","ExternalInvoiceReference1":"","ExternalInvoiceReference2":"","OrderDate":"2016-10-25","Project":"1","Sent":false,"Total":219},{"@url":"https:\/\/api.fortnox.se\/3\/orders\/222","Cancelled":false,"Currency":"SEK","CustomerName":"Test + customer","CustomerNumber":"3","DeliveryDate":null,"DocumentNumber":"222","ExternalInvoiceReference1":"","ExternalInvoiceReference2":"","OrderDate":"2016-10-27","Project":"1","Sent":false,"Total":26},{"@url":"https:\/\/api.fortnox.se\/3\/orders\/223","Cancelled":false,"Currency":"SEK","CustomerName":"Old + name","CustomerNumber":"1","DeliveryDate":null,"DocumentNumber":"223","ExternalInvoiceReference1":"","ExternalInvoiceReference2":"","OrderDate":"2016-10-27","Project":"1","Sent":false,"Total":0},{"@url":"https:\/\/api.fortnox.se\/3\/orders\/224","Cancelled":false,"Currency":"DKK","CustomerName":"Old + name","CustomerNumber":"1","DeliveryDate":null,"DocumentNumber":"224","ExternalInvoiceReference1":"","ExternalInvoiceReference2":"","OrderDate":"2016-10-27","Project":"1","Sent":false,"Total":0},{"@url":"https:\/\/api.fortnox.se\/3\/orders\/225","Cancelled":false,"Currency":"SEK","CustomerName":"Old + name","CustomerNumber":"1","DeliveryDate":null,"DocumentNumber":"225","ExternalInvoiceReference1":"","ExternalInvoiceReference2":"","OrderDate":"2016-10-27","Project":"1","Sent":false,"Total":968510},{"@url":"https:\/\/api.fortnox.se\/3\/orders\/226","Cancelled":false,"Currency":"SEK","CustomerName":"Test + customer","CustomerNumber":"3","DeliveryDate":null,"DocumentNumber":"226","ExternalInvoiceReference1":"","ExternalInvoiceReference2":"","OrderDate":"2016-10-27","Project":"1","Sent":false,"Total":219},{"@url":"https:\/\/api.fortnox.se\/3\/orders\/227","Cancelled":false,"Currency":"SEK","CustomerName":"A + company","CustomerNumber":"155","DeliveryDate":null,"DocumentNumber":"227","ExternalInvoiceReference1":"","ExternalInvoiceReference2":"","OrderDate":"2016-10-27","Project":"1","Sent":false,"Total":0},{"@url":"https:\/\/api.fortnox.se\/3\/orders\/228","Cancelled":false,"Currency":"SEK","CustomerName":"Anna + Norman","CustomerNumber":"82","DeliveryDate":null,"DocumentNumber":"228","ExternalInvoiceReference1":"","ExternalInvoiceReference2":"","OrderDate":"2016-10-28","Project":"3","Sent":false,"Total":625},{"@url":"https:\/\/api.fortnox.se\/3\/orders\/229","Cancelled":false,"Currency":"SEK","CustomerName":"Easy + Translate GmbH","CustomerNumber":"64","DeliveryDate":null,"DocumentNumber":"229","ExternalInvoiceReference1":"","ExternalInvoiceReference2":"","OrderDate":"2016-10-28","Project":"3","Sent":false,"Total":938},{"@url":"https:\/\/api.fortnox.se\/3\/orders\/230","Cancelled":false,"Currency":"SEK","CustomerName":"Anna-Karin + Nilsson","CustomerNumber":"159","DeliveryDate":null,"DocumentNumber":"230","ExternalInvoiceReference1":"","ExternalInvoiceReference2":"","OrderDate":"2016-10-28","Project":"3","Sent":false,"Total":656},{"@url":"https:\/\/api.fortnox.se\/3\/orders\/231","Cancelled":false,"Currency":"SEK","CustomerName":"BolagsBemanning + i Tingsryd AB","CustomerNumber":"67","DeliveryDate":null,"DocumentNumber":"231","ExternalInvoiceReference1":"","ExternalInvoiceReference2":"","OrderDate":"2016-11-13","Project":"1","Sent":false,"Total":0},{"@url":"https:\/\/api.fortnox.se\/3\/orders\/232","Cancelled":true,"Currency":"SEK","CustomerName":"BolagsBemanning + i Tingsryd AB","CustomerNumber":"67","DeliveryDate":null,"DocumentNumber":"232","ExternalInvoiceReference1":"","ExternalInvoiceReference2":"","OrderDate":"2016-11-14","Project":"1","Sent":false,"Total":0},{"@url":"https:\/\/api.fortnox.se\/3\/orders\/233","Cancelled":false,"Currency":"SEK","CustomerName":"Anna + Norman","CustomerNumber":"82","DeliveryDate":null,"DocumentNumber":"233","ExternalInvoiceReference1":"","ExternalInvoiceReference2":"","OrderDate":"2016-11-25","Project":"3","Sent":false,"Total":875},{"@url":"https:\/\/api.fortnox.se\/3\/orders\/234","Cancelled":false,"Currency":"SEK","CustomerName":"Anna + Norman","CustomerNumber":"82","DeliveryDate":null,"DocumentNumber":"234","ExternalInvoiceReference1":"","ExternalInvoiceReference2":"","OrderDate":"2016-11-25","Project":"3","Sent":false,"Total":0},{"@url":"https:\/\/api.fortnox.se\/3\/orders\/235","Cancelled":true,"Currency":"SEK","CustomerName":"Anna + Norman","CustomerNumber":"82","DeliveryDate":null,"DocumentNumber":"235","ExternalInvoiceReference1":"","ExternalInvoiceReference2":"","OrderDate":"2016-11-25","Project":"3","Sent":false,"Total":0},{"@url":"https:\/\/api.fortnox.se\/3\/orders\/236","Cancelled":false,"Currency":"SEK","CustomerName":"Ertan + AB","CustomerNumber":"164","DeliveryDate":null,"DocumentNumber":"236","ExternalInvoiceReference1":"","ExternalInvoiceReference2":"","OrderDate":"2016-11-25","Project":"3","Sent":false,"Total":1250},{"@url":"https:\/\/api.fortnox.se\/3\/orders\/237","Cancelled":false,"Currency":"SEK","CustomerName":"Test + customer","CustomerNumber":"3","DeliveryDate":null,"DocumentNumber":"237","ExternalInvoiceReference1":"","ExternalInvoiceReference2":"","OrderDate":"2017-05-08","Project":"1","Sent":false,"Total":1},{"@url":"https:\/\/api.fortnox.se\/3\/orders\/238","Cancelled":false,"Currency":"SEK","CustomerName":"Nils + Olofsson","CustomerNumber":"101","DeliveryDate":null,"DocumentNumber":"238","ExternalInvoiceReference1":"","ExternalInvoiceReference2":"","OrderDate":"2017-05-18","Project":"5569","Sent":false,"Total":625},{"@url":"https:\/\/api.fortnox.se\/3\/orders\/239","Cancelled":false,"Currency":"SEK","CustomerName":"Test + customer","CustomerNumber":"3","DeliveryDate":null,"DocumentNumber":"239","ExternalInvoiceReference1":"","ExternalInvoiceReference2":"","OrderDate":"2017-06-16","Project":"18","Sent":false,"Total":15},{"@url":"https:\/\/api.fortnox.se\/3\/orders\/240","Cancelled":false,"Currency":"SEK","CustomerName":"Anna + Norman","CustomerNumber":"82","DeliveryDate":null,"DocumentNumber":"240","ExternalInvoiceReference1":"","ExternalInvoiceReference2":"","OrderDate":"2017-06-16","Project":"17","Sent":false,"Total":6},{"@url":"https:\/\/api.fortnox.se\/3\/orders\/241","Cancelled":false,"Currency":"SEK","CustomerName":"Anna-Karin + Nilsson","CustomerNumber":"159","DeliveryDate":null,"DocumentNumber":"241","ExternalInvoiceReference1":"","ExternalInvoiceReference2":"","OrderDate":"2017-06-16","Project":"18","Sent":false,"Total":1745},{"@url":"https:\/\/api.fortnox.se\/3\/orders\/242","Cancelled":false,"Currency":"SEK","CustomerName":"En + Appstudio i J\u00f6nk\u00f6ping AB","CustomerNumber":"170","DeliveryDate":null,"DocumentNumber":"242","ExternalInvoiceReference1":"","ExternalInvoiceReference2":"","OrderDate":"2017-06-21","Project":"17","Sent":false,"Total":7},{"@url":"https:\/\/api.fortnox.se\/3\/orders\/243","Cancelled":false,"Currency":"SEK","CustomerName":"En + Appstudio i J\u00f6nk\u00f6ping AB","CustomerNumber":"170","DeliveryDate":null,"DocumentNumber":"243","ExternalInvoiceReference1":"","ExternalInvoiceReference2":"","OrderDate":"2017-08-11","Project":"5569","Sent":false,"Total":2000},{"@url":"https:\/\/api.fortnox.se\/3\/orders\/244","Cancelled":false,"Currency":"SEK","CustomerName":"Test + customer","CustomerNumber":"3","DeliveryDate":null,"DocumentNumber":"244","ExternalInvoiceReference1":"","ExternalInvoiceReference2":"","OrderDate":"2017-08-14","Project":"1","Sent":false,"Total":0},{"@url":"https:\/\/api.fortnox.se\/3\/orders\/245","Cancelled":false,"Currency":"SEK","CustomerName":"En + Appstudio i J\u00f6nk\u00f6ping AB","CustomerNumber":"170","DeliveryDate":null,"DocumentNumber":"245","ExternalInvoiceReference1":"","ExternalInvoiceReference2":"","OrderDate":"2017-08-25","Project":"5575","Sent":false,"Total":1543},{"@url":"https:\/\/api.fortnox.se\/3\/orders\/246","Cancelled":true,"Currency":"SEK","CustomerName":"BolagsBemanning + i Tingsryd AB","CustomerNumber":"67","DeliveryDate":null,"DocumentNumber":"246","ExternalInvoiceReference1":"","ExternalInvoiceReference2":"","OrderDate":"2017-10-19","Project":"5576","Sent":false,"Total":0},{"@url":"https:\/\/api.fortnox.se\/3\/orders\/247","Cancelled":false,"Currency":"SEK","CustomerName":"Arthur + Dent","CustomerNumber":"4","DeliveryDate":null,"DocumentNumber":"247","ExternalInvoiceReference1":"","ExternalInvoiceReference2":"","OrderDate":"2017-10-19","Project":"5576","Sent":false,"Total":6000},{"@url":"https:\/\/api.fortnox.se\/3\/orders\/248","Cancelled":false,"Currency":"SEK","CustomerName":"Test + customer","CustomerNumber":"3","DeliveryDate":null,"DocumentNumber":"248","ExternalInvoiceReference1":"","ExternalInvoiceReference2":"","OrderDate":"2017-10-19","Project":"5576","Sent":false,"Total":50000},{"@url":"https:\/\/api.fortnox.se\/3\/orders\/249","Cancelled":false,"Currency":"SEK","CustomerName":"Arthur + Dent","CustomerNumber":"8","DeliveryDate":null,"DocumentNumber":"249","ExternalInvoiceReference1":"","ExternalInvoiceReference2":"","OrderDate":"2017-10-19","Project":"5576","Sent":false,"Total":1250000},{"@url":"https:\/\/api.fortnox.se\/3\/orders\/250","Cancelled":false,"Currency":"SEK","CustomerName":"testata","CustomerNumber":"97","DeliveryDate":null,"DocumentNumber":"250","ExternalInvoiceReference1":"","ExternalInvoiceReference2":"","OrderDate":"2017-10-19","Project":"5576","Sent":false,"Total":33},{"@url":"https:\/\/api.fortnox.se\/3\/orders\/251","Cancelled":false,"Currency":"DKK","CustomerName":"Old + name","CustomerNumber":"1","DeliveryDate":null,"DocumentNumber":"251","ExternalInvoiceReference1":"","ExternalInvoiceReference2":"","OrderDate":"2017-10-22","Project":"1","Sent":false,"Total":0},{"@url":"https:\/\/api.fortnox.se\/3\/orders\/252","Cancelled":false,"Currency":"DKK","CustomerName":"Old + name","CustomerNumber":"1","DeliveryDate":null,"DocumentNumber":"252","ExternalInvoiceReference1":"","ExternalInvoiceReference2":"","OrderDate":"2017-10-22","Project":"1","Sent":false,"Total":0},{"@url":"https:\/\/api.fortnox.se\/3\/orders\/253","Cancelled":false,"Currency":"DKK","CustomerName":"Old + name","CustomerNumber":"1","DeliveryDate":null,"DocumentNumber":"253","ExternalInvoiceReference1":"","ExternalInvoiceReference2":"","OrderDate":"2017-10-22","Project":"1","Sent":false,"Total":0},{"@url":"https:\/\/api.fortnox.se\/3\/orders\/254","Cancelled":false,"Currency":"DKK","CustomerName":"Old + name","CustomerNumber":"1","DeliveryDate":null,"DocumentNumber":"254","ExternalInvoiceReference1":"","ExternalInvoiceReference2":"","OrderDate":"2017-10-22","Project":"1","Sent":false,"Total":0},{"@url":"https:\/\/api.fortnox.se\/3\/orders\/255","Cancelled":false,"Currency":"DKK","CustomerName":"Old + name","CustomerNumber":"1","DeliveryDate":null,"DocumentNumber":"255","ExternalInvoiceReference1":"","ExternalInvoiceReference2":"","OrderDate":"2017-10-22","Project":"1","Sent":false,"Total":0},{"@url":"https:\/\/api.fortnox.se\/3\/orders\/256","Cancelled":false,"Currency":"DKK","CustomerName":"Old + name","CustomerNumber":"1","DeliveryDate":null,"DocumentNumber":"256","ExternalInvoiceReference1":"","ExternalInvoiceReference2":"","OrderDate":"2017-10-22","Project":"1","Sent":false,"Total":0},{"@url":"https:\/\/api.fortnox.se\/3\/orders\/257","Cancelled":false,"Currency":"DKK","CustomerName":"Old + name","CustomerNumber":"1","DeliveryDate":null,"DocumentNumber":"257","ExternalInvoiceReference1":"","ExternalInvoiceReference2":"","OrderDate":"2017-10-22","Project":"1","Sent":false,"Total":0},{"@url":"https:\/\/api.fortnox.se\/3\/orders\/258","Cancelled":false,"Currency":"SEK","CustomerName":"Uppdragshuset + i V\u00e4st AB","CustomerNumber":"175","DeliveryDate":null,"DocumentNumber":"258","ExternalInvoiceReference1":"","ExternalInvoiceReference2":"","OrderDate":"2017-11-14","Project":"5577","Sent":false,"Total":13000},{"@url":"https:\/\/api.fortnox.se\/3\/orders\/259","Cancelled":false,"Currency":"SEK","CustomerName":"Uppdragshuset + i V\u00e4st AB","CustomerNumber":"175","DeliveryDate":null,"DocumentNumber":"259","ExternalInvoiceReference1":"","ExternalInvoiceReference2":"","OrderDate":"2017-11-15","Project":"5577","Sent":false,"Total":1750},{"@url":"https:\/\/api.fortnox.se\/3\/orders\/260","Cancelled":false,"Currency":"SEK","CustomerName":"En + Appstudio i J\u00f6nk\u00f6ping AB","CustomerNumber":"170","DeliveryDate":null,"DocumentNumber":"260","ExternalInvoiceReference1":"","ExternalInvoiceReference2":"","OrderDate":"2017-11-27","Project":"1","Sent":false,"Total":1},{"@url":"https:\/\/api.fortnox.se\/3\/orders\/261","Cancelled":false,"Currency":"SEK","CustomerName":"En + Appstudio i J\u00f6nk\u00f6ping AB","CustomerNumber":"170","DeliveryDate":null,"DocumentNumber":"261","ExternalInvoiceReference1":"","ExternalInvoiceReference2":"","OrderDate":"2017-11-27","Project":"1","Sent":false,"Total":3},{"@url":"https:\/\/api.fortnox.se\/3\/orders\/262","Cancelled":false,"Currency":"SEK","CustomerName":"En + Appstudio i J\u00f6nk\u00f6ping AB","CustomerNumber":"170","DeliveryDate":null,"DocumentNumber":"262","ExternalInvoiceReference1":"","ExternalInvoiceReference2":"","OrderDate":"2017-11-27","Project":"1","Sent":false,"Total":4},{"@url":"https:\/\/api.fortnox.se\/3\/orders\/263","Cancelled":false,"Currency":"SEK","CustomerName":"BolagsBemanning + i Tingsryd AB","CustomerNumber":"67","DeliveryDate":null,"DocumentNumber":"263","ExternalInvoiceReference1":"","ExternalInvoiceReference2":"","OrderDate":"2017-11-27","Project":"1","Sent":false,"Total":125},{"@url":"https:\/\/api.fortnox.se\/3\/orders\/264","Cancelled":false,"Currency":"SEK","CustomerName":"BolagsBemanning + i Tingsryd AB","CustomerNumber":"67","DeliveryDate":null,"DocumentNumber":"264","ExternalInvoiceReference1":"","ExternalInvoiceReference2":"","OrderDate":"2017-11-27","Project":"1","Sent":false,"Total":2178},{"@url":"https:\/\/api.fortnox.se\/3\/orders\/265","Cancelled":false,"Currency":"SEK","CustomerName":"En + Appstudio i J\u00f6nk\u00f6ping AB","CustomerNumber":"170","DeliveryDate":null,"DocumentNumber":"265","ExternalInvoiceReference1":"","ExternalInvoiceReference2":"","OrderDate":"2017-11-28","Project":"1","Sent":false,"Total":750},{"@url":"https:\/\/api.fortnox.se\/3\/orders\/266","Cancelled":false,"Currency":"SEK","CustomerName":"Hannes + Elvemyr","CustomerNumber":"176","DeliveryDate":null,"DocumentNumber":"266","ExternalInvoiceReference1":"","ExternalInvoiceReference2":"","OrderDate":"2017-12-14","Project":"1","Sent":false,"Total":0},{"@url":"https:\/\/api.fortnox.se\/3\/orders\/267","Cancelled":false,"Currency":"SEK","CustomerName":"En + Appstudio i J\u00f6nk\u00f6ping AB","CustomerNumber":"170","DeliveryDate":null,"DocumentNumber":"267","ExternalInvoiceReference1":"","ExternalInvoiceReference2":"","OrderDate":"2017-12-27","Project":"1","Sent":false,"Total":58},{"@url":"https:\/\/api.fortnox.se\/3\/orders\/268","Cancelled":false,"Currency":"SEK","CustomerName":"BolagsBemanning + i Tingsryd AB","CustomerNumber":"67","DeliveryDate":null,"DocumentNumber":"268","ExternalInvoiceReference1":"","ExternalInvoiceReference2":"","OrderDate":"2017-12-27","Project":"5579","Sent":false,"Total":75},{"@url":"https:\/\/api.fortnox.se\/3\/orders\/269","Cancelled":false,"Currency":"SEK","CustomerName":"A + customer","CustomerNumber":"2","DeliveryDate":null,"DocumentNumber":"269","ExternalInvoiceReference1":"","ExternalInvoiceReference2":"","OrderDate":"2018-01-02","Project":"5582","Sent":false,"Total":1250},{"@url":"https:\/\/api.fortnox.se\/3\/orders\/270","Cancelled":false,"Currency":"SEK","CustomerName":"Hannes + Elvemyr","CustomerNumber":"66","DeliveryDate":null,"DocumentNumber":"270","ExternalInvoiceReference1":"","ExternalInvoiceReference2":"","OrderDate":"2018-01-03","Project":"1","Sent":false,"Total":0},{"@url":"https:\/\/api.fortnox.se\/3\/orders\/271","Cancelled":false,"Currency":"SEK","CustomerName":"Hannes + Elvemyr","CustomerNumber":"66","DeliveryDate":null,"DocumentNumber":"271","ExternalInvoiceReference1":"","ExternalInvoiceReference2":"","OrderDate":"2018-01-03","Project":"1","Sent":false,"Total":0},{"@url":"https:\/\/api.fortnox.se\/3\/orders\/272","Cancelled":false,"Currency":"SEK","CustomerName":"En + Appstudio i J\u00f6nk\u00f6ping AB","CustomerNumber":"170","DeliveryDate":null,"DocumentNumber":"272","ExternalInvoiceReference1":"","ExternalInvoiceReference2":"","OrderDate":"2018-01-15","Project":"1","Sent":false,"Total":3000},{"@url":"https:\/\/api.fortnox.se\/3\/orders\/273","Cancelled":false,"Currency":"SEK","CustomerName":"Hannes + Elvemyr","CustomerNumber":"66","DeliveryDate":null,"DocumentNumber":"273","ExternalInvoiceReference1":"","ExternalInvoiceReference2":"","OrderDate":"2018-01-15","Project":"1","Sent":false,"Total":563},{"@url":"https:\/\/api.fortnox.se\/3\/orders\/274","Cancelled":false,"Currency":"SEK","CustomerName":"En + Appstudio i J\u00f6nk\u00f6ping AB","CustomerNumber":"170","DeliveryDate":null,"DocumentNumber":"274","ExternalInvoiceReference1":"","ExternalInvoiceReference2":"","OrderDate":"2018-01-20","Project":"5582","Sent":false,"Total":13340},{"@url":"https:\/\/api.fortnox.se\/3\/orders\/275","Cancelled":false,"Currency":"SEK","CustomerName":"Hannes + Elvemyr","CustomerNumber":"66","DeliveryDate":null,"DocumentNumber":"275","ExternalInvoiceReference1":"","ExternalInvoiceReference2":"","OrderDate":"2018-01-24","Project":"1","Sent":false,"Total":625},{"@url":"https:\/\/api.fortnox.se\/3\/orders\/276","Cancelled":false,"Currency":"SEK","CustomerName":"Hannes + Elvemyr","CustomerNumber":"66","DeliveryDate":null,"DocumentNumber":"276","ExternalInvoiceReference1":"","ExternalInvoiceReference2":"","OrderDate":"2018-01-24","Project":"1","Sent":false,"Total":156},{"@url":"https:\/\/api.fortnox.se\/3\/orders\/277","Cancelled":false,"Currency":"SEK","CustomerName":"En + Appstudio i J\u00f6nk\u00f6ping AB","CustomerNumber":"187","DeliveryDate":null,"DocumentNumber":"277","ExternalInvoiceReference1":"","ExternalInvoiceReference2":"","OrderDate":"2018-01-29","Project":"5579","Sent":false,"Total":93750},{"@url":"https:\/\/api.fortnox.se\/3\/orders\/278","Cancelled":false,"Currency":"SEK","CustomerName":"Kajsa + Varg","CustomerNumber":"189","DeliveryDate":null,"DocumentNumber":"278","ExternalInvoiceReference1":"","ExternalInvoiceReference2":"","OrderDate":"2018-01-29","Project":"1","Sent":false,"Total":6250},{"@url":"https:\/\/api.fortnox.se\/3\/orders\/279","Cancelled":false,"Currency":"SEK","CustomerName":"En + Appstudio i J\u00f6nk\u00f6ping AB","CustomerNumber":"170","DeliveryDate":null,"DocumentNumber":"279","ExternalInvoiceReference1":"","ExternalInvoiceReference2":"","OrderDate":"2018-01-30","Project":"5579","Sent":false,"Total":3},{"@url":"https:\/\/api.fortnox.se\/3\/orders\/280","Cancelled":false,"Currency":"SEK","CustomerName":"En + Appstudio i J\u00f6nk\u00f6ping AB","CustomerNumber":"170","DeliveryDate":null,"DocumentNumber":"280","ExternalInvoiceReference1":"","ExternalInvoiceReference2":"","OrderDate":"2018-01-30","Project":"5579","Sent":false,"Total":3},{"@url":"https:\/\/api.fortnox.se\/3\/orders\/281","Cancelled":false,"Currency":"SEK","CustomerName":"En + Appstudio i J\u00f6nk\u00f6ping AB","CustomerNumber":"187","DeliveryDate":null,"DocumentNumber":"281","ExternalInvoiceReference1":"","ExternalInvoiceReference2":"","OrderDate":"2018-01-30","Project":"5579","Sent":false,"Total":0},{"@url":"https:\/\/api.fortnox.se\/3\/orders\/282","Cancelled":false,"Currency":"SEK","CustomerName":"Hannes + Elvemyr","CustomerNumber":"66","DeliveryDate":null,"DocumentNumber":"282","ExternalInvoiceReference1":"","ExternalInvoiceReference2":"","OrderDate":"2018-02-24","Project":"1","Sent":false,"Total":625},{"@url":"https:\/\/api.fortnox.se\/3\/orders\/283","Cancelled":false,"Currency":"SEK","CustomerName":"Uppdragshuset + i V\u00e4st AB","CustomerNumber":"175","DeliveryDate":null,"DocumentNumber":"283","ExternalInvoiceReference1":"","ExternalInvoiceReference2":"","OrderDate":"2018-02-24","Project":"1","Sent":false,"Total":3125},{"@url":"https:\/\/api.fortnox.se\/3\/orders\/284","Cancelled":false,"Currency":"SEK","CustomerName":"Uppdragshuset + i V\u00e4st AB","CustomerNumber":"175","DeliveryDate":null,"DocumentNumber":"284","ExternalInvoiceReference1":"","ExternalInvoiceReference2":"","OrderDate":"2018-02-24","Project":"1","Sent":false,"Total":625},{"@url":"https:\/\/api.fortnox.se\/3\/orders\/285","Cancelled":false,"Currency":"SEK","CustomerName":"Old + name","CustomerNumber":"1","DeliveryDate":null,"DocumentNumber":"285","ExternalInvoiceReference1":"","ExternalInvoiceReference2":"","OrderDate":"2018-03-01","Project":"","Sent":false,"Total":0},{"@url":"https:\/\/api.fortnox.se\/3\/orders\/286","Cancelled":false,"Currency":"SEK","CustomerName":"Old + name","CustomerNumber":"1","DeliveryDate":null,"DocumentNumber":"286","ExternalInvoiceReference1":"","ExternalInvoiceReference2":"","OrderDate":"2018-03-01","Project":"","Sent":false,"Total":0},{"@url":"https:\/\/api.fortnox.se\/3\/orders\/287","Cancelled":false,"Currency":"SEK","CustomerName":"Old + name","CustomerNumber":"1","DeliveryDate":null,"DocumentNumber":"287","ExternalInvoiceReference1":"","ExternalInvoiceReference2":"","OrderDate":"2018-03-01","Project":"","Sent":false,"Total":0},{"@url":"https:\/\/api.fortnox.se\/3\/orders\/288","Cancelled":false,"Currency":"SEK","CustomerName":"Old + name","CustomerNumber":"1","DeliveryDate":null,"DocumentNumber":"288","ExternalInvoiceReference1":"","ExternalInvoiceReference2":"","OrderDate":"2018-03-01","Project":"","Sent":false,"Total":0},{"@url":"https:\/\/api.fortnox.se\/3\/orders\/289","Cancelled":false,"Currency":"SEK","CustomerName":"Old + name","CustomerNumber":"1","DeliveryDate":null,"DocumentNumber":"289","ExternalInvoiceReference1":"","ExternalInvoiceReference2":"","OrderDate":"2018-03-01","Project":"","Sent":false,"Total":0},{"@url":"https:\/\/api.fortnox.se\/3\/orders\/290","Cancelled":false,"Currency":"SEK","CustomerName":"Old + name","CustomerNumber":"1","DeliveryDate":null,"DocumentNumber":"290","ExternalInvoiceReference1":"","ExternalInvoiceReference2":"","OrderDate":"2018-03-01","Project":"","Sent":false,"Total":0},{"@url":"https:\/\/api.fortnox.se\/3\/orders\/291","Cancelled":false,"Currency":"SEK","CustomerName":"Old + name","CustomerNumber":"1","DeliveryDate":null,"DocumentNumber":"291","ExternalInvoiceReference1":"","ExternalInvoiceReference2":"","OrderDate":"2018-03-01","Project":"","Sent":false,"Total":0},{"@url":"https:\/\/api.fortnox.se\/3\/orders\/292","Cancelled":false,"Currency":"SEK","CustomerName":"Old + name","CustomerNumber":"1","DeliveryDate":null,"DocumentNumber":"292","ExternalInvoiceReference1":"","ExternalInvoiceReference2":"","OrderDate":"2018-03-01","Project":"","Sent":false,"Total":0},{"@url":"https:\/\/api.fortnox.se\/3\/orders\/293","Cancelled":false,"Currency":"SEK","CustomerName":"Old + name","CustomerNumber":"1","DeliveryDate":null,"DocumentNumber":"293","ExternalInvoiceReference1":"","ExternalInvoiceReference2":"","OrderDate":"2018-03-01","Project":"","Sent":false,"Total":0},{"@url":"https:\/\/api.fortnox.se\/3\/orders\/294","Cancelled":false,"Currency":"SEK","CustomerName":"Old + name","CustomerNumber":"1","DeliveryDate":null,"DocumentNumber":"294","ExternalInvoiceReference1":"","ExternalInvoiceReference2":"","OrderDate":"2018-03-01","Project":"","Sent":false,"Total":0},{"@url":"https:\/\/api.fortnox.se\/3\/orders\/295","Cancelled":false,"Currency":"SEK","CustomerName":"Old + name","CustomerNumber":"1","DeliveryDate":null,"DocumentNumber":"295","ExternalInvoiceReference1":"","ExternalInvoiceReference2":"","OrderDate":"2018-03-01","Project":"","Sent":false,"Total":0},{"@url":"https:\/\/api.fortnox.se\/3\/orders\/296","Cancelled":false,"Currency":"SEK","CustomerName":"Old + name","CustomerNumber":"1","DeliveryDate":null,"DocumentNumber":"296","ExternalInvoiceReference1":"","ExternalInvoiceReference2":"","OrderDate":"2018-03-01","Project":"","Sent":false,"Total":0},{"@url":"https:\/\/api.fortnox.se\/3\/orders\/297","Cancelled":false,"Currency":"SEK","CustomerName":"Old + name","CustomerNumber":"1","DeliveryDate":null,"DocumentNumber":"297","ExternalInvoiceReference1":"","ExternalInvoiceReference2":"","OrderDate":"2018-03-01","Project":"","Sent":false,"Total":0},{"@url":"https:\/\/api.fortnox.se\/3\/orders\/298","Cancelled":false,"Currency":"SEK","CustomerName":"Old + name","CustomerNumber":"1","DeliveryDate":null,"DocumentNumber":"298","ExternalInvoiceReference1":"","ExternalInvoiceReference2":"","OrderDate":"2018-03-01","Project":"","Sent":false,"Total":0},{"@url":"https:\/\/api.fortnox.se\/3\/orders\/299","Cancelled":false,"Currency":"GBP","CustomerName":"En + Appstudio i J\u00f6nk\u00f6ping AB","CustomerNumber":"187","DeliveryDate":null,"DocumentNumber":"299","ExternalInvoiceReference1":"","ExternalInvoiceReference2":"","OrderDate":"2018-03-02","Project":"5579","Sent":false,"Total":250},{"@url":"https:\/\/api.fortnox.se\/3\/orders\/300","Cancelled":false,"Currency":"SEK","CustomerName":"Old + name","CustomerNumber":"1","DeliveryDate":null,"DocumentNumber":"300","ExternalInvoiceReference1":"","ExternalInvoiceReference2":"","OrderDate":"2018-03-05","Project":"","Sent":false,"Total":0}]}' + http_version: + recorded_at: Mon, 14 May 2018 19:17:32 GMT +- request: + method: get + uri: https://api.fortnox.se/3/orders/?page=4 + body: + encoding: US-ASCII + string: '' + headers: + Content-Type: + - application/json + Accept: + - application/json + Client-Secret: + - 9aBA8ZgsvR + Access-Token: + - ccaef817-d5d8-4b1c-a316-54f3e55c5c54 + response: + status: + code: 200 + message: OK + headers: + Server: + - nginx + Date: + - Mon, 14 May 2018 19:17:32 GMT + Content-Type: + - application/json + Connection: + - close + Vary: + - Accept-Encoding + - Accept-Encoding + X-Rack-Responsetime: + - '32' + X-Uid: + - 36d4e180 + X-Build: + - 06fdff7705 + body: + encoding: UTF-8 + string: '{"MetaInformation":{"@TotalResources":325,"@TotalPages":4,"@CurrentPage":4},"Orders":[{"@url":"https:\/\/api.fortnox.se\/3\/orders\/301","Cancelled":false,"Currency":"SEK","CustomerName":"Old + name","CustomerNumber":"1","DeliveryDate":null,"DocumentNumber":"301","ExternalInvoiceReference1":"","ExternalInvoiceReference2":"","OrderDate":"2018-03-05","Project":"","Sent":false,"Total":0},{"@url":"https:\/\/api.fortnox.se\/3\/orders\/302","Cancelled":false,"Currency":"SEK","CustomerName":"En + Appstudio i J\u00f6nk\u00f6ping AB","CustomerNumber":"170","DeliveryDate":null,"DocumentNumber":"302","ExternalInvoiceReference1":"","ExternalInvoiceReference2":"","OrderDate":"2018-03-26","Project":"1","Sent":false,"Total":163},{"@url":"https:\/\/api.fortnox.se\/3\/orders\/303","Cancelled":false,"Currency":"SEK","CustomerName":"En + Appstudio i J\u00f6nk\u00f6ping AB","CustomerNumber":"170","DeliveryDate":null,"DocumentNumber":"303","ExternalInvoiceReference1":"","ExternalInvoiceReference2":"","OrderDate":"2018-03-26","Project":"1","Sent":false,"Total":1250},{"@url":"https:\/\/api.fortnox.se\/3\/orders\/304","Cancelled":false,"Currency":"SEK","CustomerName":"En + Appstudio i J\u00f6nk\u00f6ping AB","CustomerNumber":"170","DeliveryDate":null,"DocumentNumber":"304","ExternalInvoiceReference1":"","ExternalInvoiceReference2":"","OrderDate":"2018-03-26","Project":"1","Sent":false,"Total":1538},{"@url":"https:\/\/api.fortnox.se\/3\/orders\/305","Cancelled":false,"Currency":"SEK","CustomerName":"BolagsBemanning + i Tingsryd AB","CustomerNumber":"67","DeliveryDate":null,"DocumentNumber":"305","ExternalInvoiceReference1":"","ExternalInvoiceReference2":"","OrderDate":"2018-03-26","Project":"5582","Sent":false,"Total":13},{"@url":"https:\/\/api.fortnox.se\/3\/orders\/306","Cancelled":false,"Currency":"SEK","CustomerName":"Old + name","CustomerNumber":"1","DeliveryDate":null,"DocumentNumber":"306","ExternalInvoiceReference1":"","ExternalInvoiceReference2":"","OrderDate":"2018-03-28","Project":"","Sent":false,"Total":0},{"@url":"https:\/\/api.fortnox.se\/3\/orders\/307","Cancelled":false,"Currency":"SEK","CustomerName":"Old + name","CustomerNumber":"1","DeliveryDate":null,"DocumentNumber":"307","ExternalInvoiceReference1":"","ExternalInvoiceReference2":"","OrderDate":"2018-03-28","Project":"","Sent":false,"Total":0},{"@url":"https:\/\/api.fortnox.se\/3\/orders\/308","Cancelled":false,"Currency":"SEK","CustomerName":"Old + name","CustomerNumber":"1","DeliveryDate":null,"DocumentNumber":"308","ExternalInvoiceReference1":"","ExternalInvoiceReference2":"","OrderDate":"2018-03-28","Project":"","Sent":false,"Total":0},{"@url":"https:\/\/api.fortnox.se\/3\/orders\/309","Cancelled":false,"Currency":"SEK","CustomerName":"Old + name","CustomerNumber":"1","DeliveryDate":null,"DocumentNumber":"309","ExternalInvoiceReference1":"","ExternalInvoiceReference2":"","OrderDate":"2018-03-28","Project":"","Sent":false,"Total":0},{"@url":"https:\/\/api.fortnox.se\/3\/orders\/310","Cancelled":false,"Currency":"SEK","CustomerName":"Old + name","CustomerNumber":"1","DeliveryDate":null,"DocumentNumber":"310","ExternalInvoiceReference1":"","ExternalInvoiceReference2":"","OrderDate":"2018-03-28","Project":"","Sent":false,"Total":0},{"@url":"https:\/\/api.fortnox.se\/3\/orders\/311","Cancelled":false,"Currency":"SEK","CustomerName":"Old + name","CustomerNumber":"1","DeliveryDate":null,"DocumentNumber":"311","ExternalInvoiceReference1":"","ExternalInvoiceReference2":"","OrderDate":"2018-03-28","Project":"","Sent":false,"Total":0},{"@url":"https:\/\/api.fortnox.se\/3\/orders\/312","Cancelled":false,"Currency":"SEK","CustomerName":"Old + name","CustomerNumber":"1","DeliveryDate":null,"DocumentNumber":"312","ExternalInvoiceReference1":"","ExternalInvoiceReference2":"","OrderDate":"2018-03-28","Project":"","Sent":false,"Total":0},{"@url":"https:\/\/api.fortnox.se\/3\/orders\/313","Cancelled":false,"Currency":"SEK","CustomerName":"Old + name","CustomerNumber":"1","DeliveryDate":null,"DocumentNumber":"313","ExternalInvoiceReference1":"","ExternalInvoiceReference2":"","OrderDate":"2018-03-28","Project":"","Sent":false,"Total":0},{"@url":"https:\/\/api.fortnox.se\/3\/orders\/314","Cancelled":false,"Currency":"SEK","CustomerName":"Old + name","CustomerNumber":"1","DeliveryDate":null,"DocumentNumber":"314","ExternalInvoiceReference1":"","ExternalInvoiceReference2":"","OrderDate":"2018-03-28","Project":"","Sent":false,"Total":0},{"@url":"https:\/\/api.fortnox.se\/3\/orders\/315","Cancelled":false,"Currency":"SEK","CustomerName":"Old + name","CustomerNumber":"1","DeliveryDate":null,"DocumentNumber":"315","ExternalInvoiceReference1":"","ExternalInvoiceReference2":"","OrderDate":"2018-03-28","Project":"","Sent":false,"Total":0},{"@url":"https:\/\/api.fortnox.se\/3\/orders\/316","Cancelled":false,"Currency":"SEK","CustomerName":"Blaha","CustomerNumber":"188","DeliveryDate":null,"DocumentNumber":"316","ExternalInvoiceReference1":"","ExternalInvoiceReference2":"","OrderDate":"2018-04-05","Project":"1","Sent":false,"Total":18},{"@url":"https:\/\/api.fortnox.se\/3\/orders\/317","Cancelled":false,"Currency":"SEK","CustomerName":"En + Appstudio i J\u00f6nk\u00f6ping AB","CustomerNumber":"187","DeliveryDate":null,"DocumentNumber":"317","ExternalInvoiceReference1":"","ExternalInvoiceReference2":"","OrderDate":"2018-04-06","Project":"1","Sent":false,"Total":180},{"@url":"https:\/\/api.fortnox.se\/3\/orders\/318","Cancelled":false,"Currency":"SEK","CustomerName":"Some + company","CustomerNumber":"42","DeliveryDate":null,"DocumentNumber":"318","ExternalInvoiceReference1":"","ExternalInvoiceReference2":"","OrderDate":"2018-04-06","Project":"1","Sent":false,"Total":18},{"@url":"https:\/\/api.fortnox.se\/3\/orders\/319","Cancelled":false,"Currency":"SEK","CustomerName":"Some + company","CustomerNumber":"42","DeliveryDate":null,"DocumentNumber":"319","ExternalInvoiceReference1":"","ExternalInvoiceReference2":"","OrderDate":"2018-04-06","Project":"1","Sent":false,"Total":210},{"@url":"https:\/\/api.fortnox.se\/3\/orders\/320","Cancelled":false,"Currency":"SEK","CustomerName":"Hannes + Eriksson","CustomerNumber":"201","DeliveryDate":null,"DocumentNumber":"320","ExternalInvoiceReference1":"","ExternalInvoiceReference2":"","OrderDate":"2018-04-09","Project":"1","Sent":false,"Total":0},{"@url":"https:\/\/api.fortnox.se\/3\/orders\/321","Cancelled":false,"Currency":"SEK","CustomerName":"Hannes + Eriksson","CustomerNumber":"204","DeliveryDate":null,"DocumentNumber":"321","ExternalInvoiceReference1":"","ExternalInvoiceReference2":"","OrderDate":"2018-04-09","Project":"1","Sent":false,"Total":0},{"@url":"https:\/\/api.fortnox.se\/3\/orders\/322","Cancelled":false,"Currency":"SEK","CustomerName":"BolagsBemanning + i Tingsryd AB","CustomerNumber":"205","DeliveryDate":null,"DocumentNumber":"322","ExternalInvoiceReference1":"","ExternalInvoiceReference2":"","OrderDate":"2018-04-09","Project":"1","Sent":false,"Total":0},{"@url":"https:\/\/api.fortnox.se\/3\/orders\/323","Cancelled":false,"Currency":"SEK","CustomerName":"A + company","CustomerNumber":"206","DeliveryDate":null,"DocumentNumber":"323","ExternalInvoiceReference1":"","ExternalInvoiceReference2":"","OrderDate":"2018-04-09","Project":"1","Sent":false,"Total":0},{"@url":"https:\/\/api.fortnox.se\/3\/orders\/324","Cancelled":false,"Currency":"SEK","CustomerName":"Test + customer","CustomerNumber":"3","DeliveryDate":null,"DocumentNumber":"324","ExternalInvoiceReference1":"","ExternalInvoiceReference2":"","OrderDate":"2018-04-16","Project":"1","Sent":false,"Total":150},{"@url":"https:\/\/api.fortnox.se\/3\/orders\/325","Cancelled":false,"Currency":"SEK","CustomerName":"En + Appstudio i J\u00f6nk\u00f6ping AB","CustomerNumber":"187","DeliveryDate":null,"DocumentNumber":"325","ExternalInvoiceReference1":"","ExternalInvoiceReference2":"","OrderDate":"2018-04-19","Project":"1","Sent":false,"Total":250}]}' + http_version: + recorded_at: Mon, 14 May 2018 19:17:32 GMT +recorded_with: VCR 3.0.3 diff --git a/spec/vcr_cassettes/projects/all.yml b/spec/vcr_cassettes/projects/all.yml index b19e68ea..50440893 100644 --- a/spec/vcr_cassettes/projects/all.yml +++ b/spec/vcr_cassettes/projects/all.yml @@ -2,7 +2,7 @@ http_interactions: - request: method: get - uri: https://api.fortnox.se/3/projects/ + uri: https://api.fortnox.se/3/projects/?page=1 body: encoding: US-ASCII string: '' @@ -23,7 +23,7 @@ http_interactions: Server: - nginx Date: - - Wed, 12 Jul 2017 19:13:42 GMT + - Mon, 14 May 2018 19:17:29 GMT Content-Type: - application/json Connection: @@ -32,21 +32,26 @@ http_interactions: - Accept-Encoding - Accept-Encoding X-Rack-Responsetime: - - '13' + - '26' X-Uid: - - bcdb41d9 + - 7ec45496 X-Build: - - 401ff9d5e0 + - 06fdff7705 body: encoding: UTF-8 - string: '{"MetaInformation":{"@TotalResources":8,"@TotalPages":1,"@CurrentPage":1},"Projects":[{"@url":"https:\/\/api.fortnox.se\/3\/projects\/1","Description":"Test + string: '{"MetaInformation":{"@TotalResources":26,"@TotalPages":1,"@CurrentPage":1},"Projects":[{"@url":"https:\/\/api.fortnox.se\/3\/projects\/1","Description":"Test project","EndDate":null,"ProjectNumber":"1","Status":"ONGOING","StartDate":"2016-05-02"},{"@url":"https:\/\/api.fortnox.se\/3\/projects\/17","Description":"Benjamin Andersson","EndDate":null,"ProjectNumber":"17","Status":"ONGOING","StartDate":"2017-06-16"},{"@url":"https:\/\/api.fortnox.se\/3\/projects\/18","Description":"Andrea Johansson","EndDate":null,"ProjectNumber":"18","Status":"ONGOING","StartDate":"2017-06-16"},{"@url":"https:\/\/api.fortnox.se\/3\/projects\/2","Description":"BolagsKraft","EndDate":null,"ProjectNumber":"2","Status":"ONGOING","StartDate":"2016-05-13"},{"@url":"https:\/\/api.fortnox.se\/3\/projects\/3","Description":"AK Bolagskraft","EndDate":null,"ProjectNumber":"3","Status":"ONGOING","StartDate":"2016-09-01"},{"@url":"https:\/\/api.fortnox.se\/3\/projects\/5568","Description":"Thom Andersson","EndDate":null,"ProjectNumber":"5568","Status":"ONGOING","StartDate":"2016-12-28"},{"@url":"https:\/\/api.fortnox.se\/3\/projects\/5569","Description":"Nji Nij","EndDate":null,"ProjectNumber":"5569","Status":"ONGOING","StartDate":"2017-05-18"},{"@url":"https:\/\/api.fortnox.se\/3\/projects\/5570","Description":"Some - important project","EndDate":null,"ProjectNumber":"5570","Status":"ONGOING","StartDate":null}]}' + important project1","EndDate":null,"ProjectNumber":"5570","Status":"ONGOING","StartDate":null},{"@url":"https:\/\/api.fortnox.se\/3\/projects\/5571","Description":"19890102-3286","EndDate":null,"ProjectNumber":"5571","Status":"ONGOING","StartDate":null},{"@url":"https:\/\/api.fortnox.se\/3\/projects\/5572","Description":"19890102-3286","EndDate":null,"ProjectNumber":"5572","Status":"ONGOING","StartDate":null},{"@url":"https:\/\/api.fortnox.se\/3\/projects\/5573","Description":"19921212-1234","EndDate":null,"ProjectNumber":"5573","Status":"ONGOING","StartDate":null},{"@url":"https:\/\/api.fortnox.se\/3\/projects\/5574","Description":"19921212-1234","EndDate":null,"ProjectNumber":"5574","Status":"ONGOING","StartDate":null},{"@url":"https:\/\/api.fortnox.se\/3\/projects\/5575","Description":"19801010-1234","EndDate":null,"ProjectNumber":"5575","Status":"ONGOING","StartDate":null},{"@url":"https:\/\/api.fortnox.se\/3\/projects\/5576","Description":"19801010-1234","EndDate":null,"ProjectNumber":"5576","Status":"ONGOING","StartDate":null},{"@url":"https:\/\/api.fortnox.se\/3\/projects\/5577","Description":"19720316-5985","EndDate":null,"ProjectNumber":"5577","Status":"ONGOING","StartDate":null},{"@url":"https:\/\/api.fortnox.se\/3\/projects\/5578","Description":"19900101-1234","EndDate":null,"ProjectNumber":"5578","Status":"ONGOING","StartDate":null},{"@url":"https:\/\/api.fortnox.se\/3\/projects\/5579","Description":"19901010-1234","EndDate":null,"ProjectNumber":"5579","Status":"ONGOING","StartDate":null},{"@url":"https:\/\/api.fortnox.se\/3\/projects\/5580","Description":"19800101-0101","EndDate":null,"ProjectNumber":"5580","Status":"ONGOING","StartDate":null},{"@url":"https:\/\/api.fortnox.se\/3\/projects\/5581","Description":"19800101-0101","EndDate":null,"ProjectNumber":"5581","Status":"ONGOING","StartDate":null},{"@url":"https:\/\/api.fortnox.se\/3\/projects\/5582","Description":"19801010-1234","EndDate":null,"ProjectNumber":"5582","Status":"ONGOING","StartDate":null},{"@url":"https:\/\/api.fortnox.se\/3\/projects\/5583","Description":"Gabriel + Nygren, 19171213-4568","EndDate":null,"ProjectNumber":"5583","Status":"ONGOING","StartDate":null},{"@url":"https:\/\/api.fortnox.se\/3\/projects\/5584","Description":"A + description","EndDate":null,"ProjectNumber":"5584","Status":"ONGOING","StartDate":null},{"@url":"https:\/\/api.fortnox.se\/3\/projects\/5585","Description":"A","EndDate":null,"ProjectNumber":"5585","Status":"ONGOING","StartDate":"2017-01-01"},{"@url":"https:\/\/api.fortnox.se\/3\/projects\/5586","Description":"A + B, 19800101-0101","EndDate":null,"ProjectNumber":"5586","Status":"ONGOING","StartDate":null},{"@url":"https:\/\/api.fortnox.se\/3\/projects\/5587","Description":"h + h, 19800101-0101","EndDate":null,"ProjectNumber":"5587","Status":"ONGOING","StartDate":"2018-03-29"},{"@url":"https:\/\/api.fortnox.se\/3\/projects\/5588","Description":"Test + Testsson, 19900101-1234","EndDate":null,"ProjectNumber":"5588","Status":"ONGOING","StartDate":"2018-03-29"}]}' http_version: - recorded_at: Wed, 12 Jul 2017 19:13:42 GMT + recorded_at: Mon, 14 May 2018 19:17:29 GMT recorded_with: VCR 3.0.3 diff --git a/spec/vcr_cassettes/termsofpayments/all.yml b/spec/vcr_cassettes/termsofpayments/all.yml index 13c8faa1..e8b8f421 100644 --- a/spec/vcr_cassettes/termsofpayments/all.yml +++ b/spec/vcr_cassettes/termsofpayments/all.yml @@ -2,7 +2,7 @@ http_interactions: - request: method: get - uri: https://api.fortnox.se/3/termsofpayments/ + uri: https://api.fortnox.se/3/termsofpayments/?page=1 body: encoding: US-ASCII string: '' @@ -23,7 +23,7 @@ http_interactions: Server: - nginx Date: - - Sat, 24 Feb 2018 06:23:28 GMT + - Mon, 14 May 2018 19:17:35 GMT Content-Type: - application/json Connection: @@ -32,20 +32,21 @@ http_interactions: - Accept-Encoding - Accept-Encoding X-Rack-Responsetime: - - '18' + - '19' X-Uid: - - a4f6e251 + - '98906360' X-Build: - - bec4a33b2e + - 06fdff7705 body: encoding: UTF-8 - string: '{"MetaInformation":{"@TotalResources":9,"@TotalPages":1,"@CurrentPage":1},"TermsOfPayments":[{"@url":"https:\/\/api.fortnox.se\/3\/termsofpayment\/0","Code":"0","Description":"0 + string: '{"MetaInformation":{"@TotalResources":10,"@TotalPages":1,"@CurrentPage":1},"TermsOfPayments":[{"@url":"https:\/\/api.fortnox.se\/3\/termsofpayment\/0","Code":"0","Description":"0 dagar"},{"@url":"https:\/\/api.fortnox.se\/3\/termsofpayment\/10","Code":"10","Description":"10 dagar"},{"@url":"https:\/\/api.fortnox.se\/3\/termsofpayment\/15","Code":"15","Description":"15 dagar"},{"@url":"https:\/\/api.fortnox.se\/3\/termsofpayment\/20","Code":"20","Description":"20 dagar"},{"@url":"https:\/\/api.fortnox.se\/3\/termsofpayment\/30","Code":"30","Description":"30 dagar"},{"@url":"https:\/\/api.fortnox.se\/3\/termsofpayment\/K","Code":"K","Description":"Kontant"},{"@url":"https:\/\/api.fortnox.se\/3\/termsofpayment\/PF","Code":"PF","Description":"Postf\u00f6rskott"},{"@url":"https:\/\/api.fortnox.se\/3\/termsofpayment\/AG","Code":"AG","Description":"Autogiro"},{"@url":"https:\/\/api.fortnox.se\/3\/termsofpayment\/30DAYS","Code":"30DAYS","Description":"Updated + description"},{"@url":"https:\/\/api.fortnox.se\/3\/termsofpayment\/15DAYS","Code":"15DAYS","Description":"Updated description"}]}' http_version: - recorded_at: Sat, 24 Feb 2018 06:23:28 GMT + recorded_at: Mon, 14 May 2018 19:17:35 GMT recorded_with: VCR 3.0.3 diff --git a/spec/vcr_cassettes/units/all.yml b/spec/vcr_cassettes/units/all.yml index 0e89f354..fb5c48ba 100644 --- a/spec/vcr_cassettes/units/all.yml +++ b/spec/vcr_cassettes/units/all.yml @@ -2,7 +2,7 @@ http_interactions: - request: method: get - uri: https://api.fortnox.se/3/units/ + uri: https://api.fortnox.se/3/units/?page=1 body: encoding: US-ASCII string: '' @@ -11,8 +11,6 @@ http_interactions: - application/json Accept: - application/json - Authorization-Code: - - ea3862b0-189c-464b-8e23-1b9702365ea1 Client-Secret: - 9aBA8ZgsvR Access-Token: @@ -25,7 +23,7 @@ http_interactions: Server: - nginx Date: - - Thu, 22 Feb 2018 14:59:55 GMT + - Mon, 14 May 2018 19:17:33 GMT Content-Type: - application/json Connection: @@ -34,15 +32,17 @@ http_interactions: - Accept-Encoding - Accept-Encoding X-Rack-Responsetime: - - '13' + - '15' X-Uid: - - 1cc7190f + - 26fa0cb4 X-Build: - - bec4a33b2e + - 06fdff7705 body: encoding: UTF-8 - string: '{"MetaInformation":{"@TotalResources":6,"@TotalPages":1,"@CurrentPage":1},"Units":[{"@url":"https:\/\/api.fortnox.se\/3\/units\/f%C3%B6rp","Code":"f\u00f6rp","Description":"f\u00f6rpackning"},{"@url":"https:\/\/api.fortnox.se\/3\/units\/h","Code":"h","Description":"timmar"},{"@url":"https:\/\/api.fortnox.se\/3\/units\/km","Code":"km","Description":"Kilometer"},{"@url":"https:\/\/api.fortnox.se\/3\/units\/st","Code":"st","Description":"styck"},{"@url":"https:\/\/api.fortnox.se\/3\/units\/test","Code":"test","Description":"A - value"},{"@url":"https:\/\/api.fortnox.se\/3\/units\/utl","Code":"utl","Description":"Utl\u00e4gg"}]}' + string: '{"MetaInformation":{"@TotalResources":8,"@TotalPages":1,"@CurrentPage":1},"Units":[{"@url":"https:\/\/api.fortnox.se\/3\/units\/blarg","Code":"blarg","Description":"Updated + description"},{"@url":"https:\/\/api.fortnox.se\/3\/units\/f%C3%B6rp","Code":"f\u00f6rp","Description":"f\u00f6rpackning"},{"@url":"https:\/\/api.fortnox.se\/3\/units\/h","Code":"h","Description":"timmar"},{"@url":"https:\/\/api.fortnox.se\/3\/units\/km","Code":"km","Description":"Kilometer"},{"@url":"https:\/\/api.fortnox.se\/3\/units\/st","Code":"st","Description":"styck"},{"@url":"https:\/\/api.fortnox.se\/3\/units\/test","Code":"test","Description":"A + value"},{"@url":"https:\/\/api.fortnox.se\/3\/units\/utl","Code":"utl","Description":"Utl\u00e4gg"},{"@url":"https:\/\/api.fortnox.se\/3\/units\/woooh","Code":"woooh","Description":"Happy + clouds"}]}' http_version: - recorded_at: Thu, 22 Feb 2018 14:59:56 GMT + recorded_at: Mon, 14 May 2018 19:17:33 GMT recorded_with: VCR 3.0.3 From f84639d88f83e9dd8af7ec07ce6f4301229e99e1 Mon Sep 17 00:00:00 2001 From: Samuel Nilsson Date: Tue, 15 May 2018 07:35:17 +0200 Subject: [PATCH 5/6] Pin dry-types to < 0.13.0 due to breaking changes --- fortnox-api.gemspec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fortnox-api.gemspec b/fortnox-api.gemspec index ac1f0563..f0a05e9f 100755 --- a/fortnox-api.gemspec +++ b/fortnox-api.gemspec @@ -25,7 +25,7 @@ Gem::Specification.new do |spec| # rubocop:disable Metrics/BlockLength spec.required_ruby_version = '>= 2.3' spec.add_dependency 'dry-struct', '~> 0.1' - spec.add_dependency 'dry-types', '~> 0.8' + spec.add_dependency 'dry-types', '~> 0.8', '< 0.13.0' # TODO: Temporary lockdown. See issue #103 for more info. spec.add_dependency 'httparty', '~> 0.14.0' From 035e4f03d87dcfaa7beef129130e4b59349325dc Mon Sep 17 00:00:00 2001 From: Samuel Nilsson Date: Mon, 4 Jun 2018 20:50:10 +0200 Subject: [PATCH 6/6] Add STUB to Metadata model --- lib/fortnox/api/models/metadata.rb | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lib/fortnox/api/models/metadata.rb b/lib/fortnox/api/models/metadata.rb index 9fbd1dcb..dda4844b 100644 --- a/lib/fortnox/api/models/metadata.rb +++ b/lib/fortnox/api/models/metadata.rb @@ -6,7 +6,11 @@ module Fortnox module API module Model class Metadata < Model::Base - STUB = {}.freeze + STUB = { + current_page: '', + total_resources: '', + total_pages: '' + }.freeze attribute :current_page, Types::Required::Integer.is(:read_only) attribute :total_resources, Types::Required::Integer.is(:read_only)