fortnox-api 0.6.0 → 0.6.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/fortnox/api/mappers.rb +1 -1
- data/lib/fortnox/api/mappers/{terms_of_payments.rb → terms_of_payment.rb} +2 -2
- data/lib/fortnox/api/models.rb +1 -1
- data/lib/fortnox/api/models/{terms_of_payments.rb → terms_of_payment.rb} +1 -1
- data/lib/fortnox/api/repositories.rb +1 -1
- data/lib/fortnox/api/repositories/terms_of_payment.rb +17 -0
- data/lib/fortnox/api/version.rb +1 -1
- data/spec/fortnox/api/mappers/{terms_of_payments_spec.rb → terms_of_payment_spec.rb} +2 -2
- data/spec/fortnox/api/models/{terms_of_payments_spec.rb → terms_of_payment_spec.rb} +2 -2
- data/spec/fortnox/api/repositories/{terms_of_payments_spec.rb → terms_of_payment_spec.rb} +2 -2
- metadata +11 -11
- data/lib/fortnox/api/repositories/terms_of_payments.rb +0 -17
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 85b42d49811233c1c1d4e815722ffd44c7f3c6bd
|
|
4
|
+
data.tar.gz: f76f5a9d4ceb7dafb518500dec1e821ed9d2d594
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 79da1d99c4527507eeae03f28abaf0f40a591d8ee981dc10568c75a3e9356f5aac50a32d7de9315bb18c635607442e39ad7da9933fc7ee188c6d535886efe5b3
|
|
7
|
+
data.tar.gz: 2d8c4d40948e6640c25151c5f2c72a5a065081d5477013cd074e8cc7d566aec76237c7c15ff0d28f78ff5fa1c3d9d742dbeadae46893427303ae8328ec5461b1
|
data/lib/fortnox/api/mappers.rb
CHANGED
|
@@ -5,13 +5,13 @@ require 'fortnox/api/mappers/base'
|
|
|
5
5
|
module Fortnox
|
|
6
6
|
module API
|
|
7
7
|
module Mapper
|
|
8
|
-
class
|
|
8
|
+
class TermsOfPayment < Fortnox::API::Mapper::Base
|
|
9
9
|
KEY_MAP = {}.freeze
|
|
10
10
|
JSON_ENTITY_WRAPPER = 'TermsOfPayment'
|
|
11
11
|
JSON_COLLECTION_WRAPPER = 'TermsOfPayments'
|
|
12
12
|
end
|
|
13
13
|
|
|
14
|
-
Registry.register(
|
|
14
|
+
Registry.register(TermsOfPayment.canonical_name_sym, TermsOfPayment)
|
|
15
15
|
end
|
|
16
16
|
end
|
|
17
17
|
end
|
data/lib/fortnox/api/models.rb
CHANGED
|
@@ -6,4 +6,4 @@ require 'fortnox/api/repositories/invoice'
|
|
|
6
6
|
require 'fortnox/api/repositories/order'
|
|
7
7
|
require 'fortnox/api/repositories/project'
|
|
8
8
|
require 'fortnox/api/repositories/unit'
|
|
9
|
-
require 'fortnox/api/repositories/
|
|
9
|
+
require 'fortnox/api/repositories/terms_of_payment'
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
require 'fortnox/api/repositories/base'
|
|
4
|
+
require 'fortnox/api/models/terms_of_payment'
|
|
5
|
+
require 'fortnox/api/mappers/terms_of_payment'
|
|
6
|
+
|
|
7
|
+
module Fortnox
|
|
8
|
+
module API
|
|
9
|
+
module Repository
|
|
10
|
+
class TermsOfPayment < Base
|
|
11
|
+
MODEL = Model::TermsOfPayment
|
|
12
|
+
MAPPER = Mapper::TermsOfPayment
|
|
13
|
+
URI = '/termsofpayments/'
|
|
14
|
+
end
|
|
15
|
+
end
|
|
16
|
+
end
|
|
17
|
+
end
|
data/lib/fortnox/api/version.rb
CHANGED
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
|
|
3
3
|
require 'spec_helper'
|
|
4
4
|
require 'fortnox/api'
|
|
5
|
-
require 'fortnox/api/mappers/
|
|
5
|
+
require 'fortnox/api/mappers/terms_of_payment'
|
|
6
6
|
require 'fortnox/api/mappers/examples/mapper'
|
|
7
7
|
|
|
8
|
-
describe Fortnox::API::Mapper::
|
|
8
|
+
describe Fortnox::API::Mapper::TermsOfPayment do
|
|
9
9
|
key_map = {}
|
|
10
10
|
json_entity_type = 'TermsOfPayment'
|
|
11
11
|
json_entity_collection = 'TermsOfPayments'
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
|
|
3
3
|
require 'spec_helper'
|
|
4
|
-
require 'fortnox/api/models/
|
|
4
|
+
require 'fortnox/api/models/terms_of_payment'
|
|
5
5
|
require 'fortnox/api/models/examples/model'
|
|
6
6
|
|
|
7
|
-
describe Fortnox::API::Model::
|
|
7
|
+
describe Fortnox::API::Model::TermsOfPayment, type: :model do
|
|
8
8
|
it_behaves_like 'a model', '1'
|
|
9
9
|
end
|
|
@@ -3,14 +3,14 @@
|
|
|
3
3
|
require 'spec_helper'
|
|
4
4
|
require 'fortnox/api'
|
|
5
5
|
require 'fortnox/api/mappers'
|
|
6
|
-
require 'fortnox/api/repositories/
|
|
6
|
+
require 'fortnox/api/repositories/terms_of_payment'
|
|
7
7
|
require 'fortnox/api/repositories/examples/all'
|
|
8
8
|
require 'fortnox/api/repositories/examples/find'
|
|
9
9
|
require 'fortnox/api/repositories/examples/save'
|
|
10
10
|
require 'fortnox/api/repositories/examples/save_with_specially_named_attribute'
|
|
11
11
|
require 'fortnox/api/repositories/examples/search'
|
|
12
12
|
|
|
13
|
-
describe Fortnox::API::Repository::
|
|
13
|
+
describe Fortnox::API::Repository::TermsOfPayment, order: :defined, integration: true do
|
|
14
14
|
include Helpers::Configuration
|
|
15
15
|
|
|
16
16
|
subject(:repository) { described_class.new }
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: fortnox-api
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.6.
|
|
4
|
+
version: 0.6.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Jonas Schubert Erlandsson
|
|
@@ -10,7 +10,7 @@ authors:
|
|
|
10
10
|
autorequire:
|
|
11
11
|
bindir: bin
|
|
12
12
|
cert_chain: []
|
|
13
|
-
date: 2018-03-
|
|
13
|
+
date: 2018-03-05 00:00:00.000000000 Z
|
|
14
14
|
dependencies:
|
|
15
15
|
- !ruby/object:Gem::Dependency
|
|
16
16
|
name: dry-struct
|
|
@@ -264,7 +264,7 @@ files:
|
|
|
264
264
|
- lib/fortnox/api/mappers/order.rb
|
|
265
265
|
- lib/fortnox/api/mappers/order_row.rb
|
|
266
266
|
- lib/fortnox/api/mappers/project.rb
|
|
267
|
-
- lib/fortnox/api/mappers/
|
|
267
|
+
- lib/fortnox/api/mappers/terms_of_payment.rb
|
|
268
268
|
- lib/fortnox/api/mappers/unit.rb
|
|
269
269
|
- lib/fortnox/api/models.rb
|
|
270
270
|
- lib/fortnox/api/models/article.rb
|
|
@@ -275,7 +275,7 @@ files:
|
|
|
275
275
|
- lib/fortnox/api/models/label.rb
|
|
276
276
|
- lib/fortnox/api/models/order.rb
|
|
277
277
|
- lib/fortnox/api/models/project.rb
|
|
278
|
-
- lib/fortnox/api/models/
|
|
278
|
+
- lib/fortnox/api/models/terms_of_payment.rb
|
|
279
279
|
- lib/fortnox/api/models/unit.rb
|
|
280
280
|
- lib/fortnox/api/repositories.rb
|
|
281
281
|
- lib/fortnox/api/repositories/article.rb
|
|
@@ -286,7 +286,7 @@ files:
|
|
|
286
286
|
- lib/fortnox/api/repositories/invoice.rb
|
|
287
287
|
- lib/fortnox/api/repositories/order.rb
|
|
288
288
|
- lib/fortnox/api/repositories/project.rb
|
|
289
|
-
- lib/fortnox/api/repositories/
|
|
289
|
+
- lib/fortnox/api/repositories/terms_of_payment.rb
|
|
290
290
|
- lib/fortnox/api/repositories/unit.rb
|
|
291
291
|
- lib/fortnox/api/request_handling.rb
|
|
292
292
|
- lib/fortnox/api/types.rb
|
|
@@ -319,7 +319,7 @@ files:
|
|
|
319
319
|
- spec/fortnox/api/mappers/order_row_spec.rb
|
|
320
320
|
- spec/fortnox/api/mappers/order_spec.rb
|
|
321
321
|
- spec/fortnox/api/mappers/project_spec.rb
|
|
322
|
-
- spec/fortnox/api/mappers/
|
|
322
|
+
- spec/fortnox/api/mappers/terms_of_payment_spec.rb
|
|
323
323
|
- spec/fortnox/api/mappers/unit_spec.rb
|
|
324
324
|
- spec/fortnox/api/models/article_spec.rb
|
|
325
325
|
- spec/fortnox/api/models/base_spec.rb
|
|
@@ -329,7 +329,7 @@ files:
|
|
|
329
329
|
- spec/fortnox/api/models/invoice_spec.rb
|
|
330
330
|
- spec/fortnox/api/models/order_spec.rb
|
|
331
331
|
- spec/fortnox/api/models/project_spec.rb
|
|
332
|
-
- spec/fortnox/api/models/
|
|
332
|
+
- spec/fortnox/api/models/terms_of_payment_spec.rb
|
|
333
333
|
- spec/fortnox/api/models/unit_spec.rb
|
|
334
334
|
- spec/fortnox/api/repositories/article_spec.rb
|
|
335
335
|
- spec/fortnox/api/repositories/base_spec.rb
|
|
@@ -344,7 +344,7 @@ files:
|
|
|
344
344
|
- spec/fortnox/api/repositories/invoice_spec.rb
|
|
345
345
|
- spec/fortnox/api/repositories/order_spec.rb
|
|
346
346
|
- spec/fortnox/api/repositories/project_spec.rb
|
|
347
|
-
- spec/fortnox/api/repositories/
|
|
347
|
+
- spec/fortnox/api/repositories/terms_of_payment_spec.rb
|
|
348
348
|
- spec/fortnox/api/repositories/unit_spec.rb
|
|
349
349
|
- spec/fortnox/api/types/account_number_spec.rb
|
|
350
350
|
- spec/fortnox/api/types/default_delivery_types_spec.rb
|
|
@@ -527,7 +527,7 @@ test_files:
|
|
|
527
527
|
- spec/fortnox/api/mappers/order_row_spec.rb
|
|
528
528
|
- spec/fortnox/api/mappers/order_spec.rb
|
|
529
529
|
- spec/fortnox/api/mappers/project_spec.rb
|
|
530
|
-
- spec/fortnox/api/mappers/
|
|
530
|
+
- spec/fortnox/api/mappers/terms_of_payment_spec.rb
|
|
531
531
|
- spec/fortnox/api/mappers/unit_spec.rb
|
|
532
532
|
- spec/fortnox/api/models/article_spec.rb
|
|
533
533
|
- spec/fortnox/api/models/base_spec.rb
|
|
@@ -537,7 +537,7 @@ test_files:
|
|
|
537
537
|
- spec/fortnox/api/models/invoice_spec.rb
|
|
538
538
|
- spec/fortnox/api/models/order_spec.rb
|
|
539
539
|
- spec/fortnox/api/models/project_spec.rb
|
|
540
|
-
- spec/fortnox/api/models/
|
|
540
|
+
- spec/fortnox/api/models/terms_of_payment_spec.rb
|
|
541
541
|
- spec/fortnox/api/models/unit_spec.rb
|
|
542
542
|
- spec/fortnox/api/repositories/article_spec.rb
|
|
543
543
|
- spec/fortnox/api/repositories/base_spec.rb
|
|
@@ -552,7 +552,7 @@ test_files:
|
|
|
552
552
|
- spec/fortnox/api/repositories/invoice_spec.rb
|
|
553
553
|
- spec/fortnox/api/repositories/order_spec.rb
|
|
554
554
|
- spec/fortnox/api/repositories/project_spec.rb
|
|
555
|
-
- spec/fortnox/api/repositories/
|
|
555
|
+
- spec/fortnox/api/repositories/terms_of_payment_spec.rb
|
|
556
556
|
- spec/fortnox/api/repositories/unit_spec.rb
|
|
557
557
|
- spec/fortnox/api/types/account_number_spec.rb
|
|
558
558
|
- spec/fortnox/api/types/default_delivery_types_spec.rb
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
# frozen_string_literal: true
|
|
2
|
-
|
|
3
|
-
require 'fortnox/api/repositories/base'
|
|
4
|
-
require 'fortnox/api/models/terms_of_payments'
|
|
5
|
-
require 'fortnox/api/mappers/terms_of_payments'
|
|
6
|
-
|
|
7
|
-
module Fortnox
|
|
8
|
-
module API
|
|
9
|
-
module Repository
|
|
10
|
-
class TermsOfPayments < Base
|
|
11
|
-
MODEL = Model::TermsOfPayments
|
|
12
|
-
MAPPER = Mapper::TermsOfPayments
|
|
13
|
-
URI = '/termsofpayments/'
|
|
14
|
-
end
|
|
15
|
-
end
|
|
16
|
-
end
|
|
17
|
-
end
|