economic-rest 0.5.14 → 0.6.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +25 -23
- data/README.md +1 -1
- data/lib/economic/base_repo.rb +0 -1
- data/lib/economic/invoices/booked_repo.rb +1 -1
- data/lib/economic/journal_voucher_repo.rb +1 -1
- data/lib/economic/pricing_repo.rb +1 -1
- data/lib/economic/product_repo.rb +1 -1
- data/lib/economic/rest/version.rb +1 -1
- data/lib/economic/self_repo.rb +1 -1
- metadata +3 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 278962b344fb0863870814da49a72d359c3db946e2a391e4a7cc8e02a0af4663
|
4
|
+
data.tar.gz: 3bdd8ebd9455c297fd2a8f426c7d39aa1b7906f584de8055e32be3439ef538ef
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 13b95c8dae49a0f77c9aead2a101366a60f5c6bd388996b45a6caa8ff715f922ba5fde9c259fd2a7f3579d6ec165f0e772d4430884d58cdd6a999a1a4d37cfe2
|
7
|
+
data.tar.gz: 29c4391f5aa1d187753a8297a9455e43860e94f5b91860076a7fb8e4226b1f8e980a6deacf94114eb14ff5df83ccc2a87213ee7f32f63e6fb64e512a7aebe763
|
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
economic-rest (0.
|
4
|
+
economic-rest (0.6.0)
|
5
5
|
activesupport
|
6
6
|
rest-client
|
7
7
|
savon
|
@@ -9,12 +9,12 @@ PATH
|
|
9
9
|
GEM
|
10
10
|
remote: https://rubygems.org/
|
11
11
|
specs:
|
12
|
-
activesupport (6.
|
12
|
+
activesupport (6.1.3.1)
|
13
13
|
concurrent-ruby (~> 1.0, >= 1.0.2)
|
14
|
-
i18n (>=
|
15
|
-
minitest (
|
16
|
-
tzinfo (~>
|
17
|
-
zeitwerk (~> 2.
|
14
|
+
i18n (>= 1.6, < 2)
|
15
|
+
minitest (>= 5.1)
|
16
|
+
tzinfo (~> 2.0)
|
17
|
+
zeitwerk (~> 2.3)
|
18
18
|
addressable (2.5.2)
|
19
19
|
public_suffix (>= 2.0.2, < 4.0)
|
20
20
|
akami (1.3.1)
|
@@ -22,8 +22,8 @@ GEM
|
|
22
22
|
nokogiri
|
23
23
|
ast (2.4.0)
|
24
24
|
awesome_print (1.8.0)
|
25
|
-
builder (3.2.
|
26
|
-
concurrent-ruby (1.1.
|
25
|
+
builder (3.2.4)
|
26
|
+
concurrent-ruby (1.1.8)
|
27
27
|
coveralls (0.8.23)
|
28
28
|
json (>= 1.8, < 3)
|
29
29
|
simplecov (~> 0.16.1)
|
@@ -42,10 +42,10 @@ GEM
|
|
42
42
|
http-accept (1.7.0)
|
43
43
|
http-cookie (1.0.3)
|
44
44
|
domain_name (~> 0.5)
|
45
|
-
httpi (2.4.
|
45
|
+
httpi (2.4.5)
|
46
46
|
rack
|
47
47
|
socksify
|
48
|
-
i18n (1.
|
48
|
+
i18n (1.8.10)
|
49
49
|
concurrent-ruby (~> 1.0)
|
50
50
|
jaro_winkler (1.5.3)
|
51
51
|
json (2.1.0)
|
@@ -54,22 +54,24 @@ GEM
|
|
54
54
|
rake (>= 0.9.2.2)
|
55
55
|
metaclass (0.0.4)
|
56
56
|
method_source (0.9.2)
|
57
|
-
mime-types (3.3)
|
57
|
+
mime-types (3.3.1)
|
58
58
|
mime-types-data (~> 3.2015)
|
59
|
-
mime-types-data (3.
|
60
|
-
mini_portile2 (2.
|
59
|
+
mime-types-data (3.2021.0225)
|
60
|
+
mini_portile2 (2.5.0)
|
61
61
|
minitest (5.11.3)
|
62
62
|
mocha (1.9.0)
|
63
63
|
metaclass (~> 0.0.1)
|
64
64
|
netrc (0.11.0)
|
65
|
-
nokogiri (1.
|
66
|
-
mini_portile2 (~> 2.
|
65
|
+
nokogiri (1.11.3)
|
66
|
+
mini_portile2 (~> 2.5.0)
|
67
|
+
racc (~> 1.4)
|
67
68
|
nori (2.6.0)
|
68
69
|
parallel (1.17.0)
|
69
70
|
parser (2.6.4.1)
|
70
71
|
ast (~> 2.4.0)
|
71
72
|
public_suffix (3.0.3)
|
72
|
-
|
73
|
+
racc (1.5.2)
|
74
|
+
rack (2.2.3)
|
73
75
|
rainbow (3.0.0)
|
74
76
|
rake (10.5.0)
|
75
77
|
rest-client (2.1.0)
|
@@ -88,7 +90,7 @@ GEM
|
|
88
90
|
rubocop (>= 0.71.0)
|
89
91
|
ruby-progressbar (1.10.1)
|
90
92
|
safe_yaml (1.0.4)
|
91
|
-
savon (2.12.
|
93
|
+
savon (2.12.1)
|
92
94
|
akami (~> 1.2)
|
93
95
|
builder (>= 2.1.2)
|
94
96
|
gyoku (~> 1.2)
|
@@ -108,22 +110,22 @@ GEM
|
|
108
110
|
term-ansicolor (1.7.1)
|
109
111
|
tins (~> 1.0)
|
110
112
|
thor (0.20.3)
|
111
|
-
thread_safe (0.3.6)
|
112
113
|
tins (1.22.1)
|
113
|
-
tzinfo (
|
114
|
-
|
114
|
+
tzinfo (2.0.4)
|
115
|
+
concurrent-ruby (~> 1.0)
|
115
116
|
unf (0.1.4)
|
116
117
|
unf_ext
|
117
|
-
unf_ext (0.0.7.
|
118
|
+
unf_ext (0.0.7.7)
|
118
119
|
unicode-display_width (1.6.0)
|
119
|
-
wasabi (3.
|
120
|
+
wasabi (3.6.1)
|
121
|
+
addressable
|
120
122
|
httpi (~> 2.0)
|
121
123
|
nokogiri (>= 1.4.2)
|
122
124
|
webmock (3.5.1)
|
123
125
|
addressable (>= 2.3.6)
|
124
126
|
crack (>= 0.3.2)
|
125
127
|
hashdiff
|
126
|
-
zeitwerk (2.
|
128
|
+
zeitwerk (2.4.2)
|
127
129
|
|
128
130
|
PLATFORMS
|
129
131
|
ruby
|
data/README.md
CHANGED
@@ -65,7 +65,7 @@ copy pasta from https://restdocs.e-conomic.com/#specifying-operator-affinity
|
|
65
65
|
|
66
66
|
## Development
|
67
67
|
|
68
|
-
After checking out the repo, run `bin/setup` to install dependencies. Then, run `
|
68
|
+
After checking out the repo, run `bin/setup` to install dependencies. Then, run `bundle exec m` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
|
69
69
|
|
70
70
|
To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
|
71
71
|
|
data/lib/economic/base_repo.rb
CHANGED
@@ -3,7 +3,7 @@ module Economic
|
|
3
3
|
class BookedRepo < Economic::Invoices::Repo
|
4
4
|
class << self
|
5
5
|
def send(invoice, book_with_number: nil)
|
6
|
-
response = send_request(method: :post, url:
|
6
|
+
response = send_request(method: :post, url: endpoint_url, payload: payload(invoice, book_with_number: book_with_number))
|
7
7
|
|
8
8
|
entry_hash = JSON.parse(response.body)
|
9
9
|
|
@@ -1,7 +1,7 @@
|
|
1
1
|
module Economic
|
2
2
|
class JournalVoucherRepo < Economic::BaseRepo
|
3
3
|
def self.save(voucher)
|
4
|
-
response = send_request(method: :post, url:
|
4
|
+
response = send_request(method: :post, url: "#{Economic::JournalRepo.endpoint_url}/#{voucher.journal.journalNumber}/vouchers", payload: voucher.to_h.to_json)
|
5
5
|
|
6
6
|
Voucher.new(JSON.parse(response.body).first)
|
7
7
|
end
|
@@ -6,7 +6,7 @@ module Economic
|
|
6
6
|
|
7
7
|
id = Economic::BaseRepo.id_to_url_formatted_id(id)
|
8
8
|
end_point = [superclass.endpoint_url, id, "pricing", "currency-specific-sales-prices"].join("/")
|
9
|
-
response = send_request(method: :get, url:
|
9
|
+
response = send_request(method: :get, url: end_point)
|
10
10
|
entry_hash = JSON.parse(response.body)
|
11
11
|
pricings = []
|
12
12
|
|
@@ -5,7 +5,7 @@ module Economic
|
|
5
5
|
id ||= product_group_or_product_group_number
|
6
6
|
|
7
7
|
end_point = [ProductGroupRepo.endpoint_url, id, "products"].join("/")
|
8
|
-
response = send_request(method: :get, url:
|
8
|
+
response = send_request(method: :get, url: end_point)
|
9
9
|
entry_hash = JSON.parse(response.body)
|
10
10
|
products = []
|
11
11
|
|
data/lib/economic/self_repo.rb
CHANGED
@@ -4,7 +4,7 @@ module Economic
|
|
4
4
|
|
5
5
|
class << self
|
6
6
|
def self
|
7
|
-
response = send_request(method: :get, url:
|
7
|
+
response = send_request(method: :get, url: Economic::SelfRepo.endpoint_url)
|
8
8
|
entry_hash = JSON.parse(response.body)
|
9
9
|
model.new(entry_hash)
|
10
10
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: economic-rest
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.6.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Peter Klogborg
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2021-04-29 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -324,8 +324,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
324
324
|
- !ruby/object:Gem::Version
|
325
325
|
version: '0'
|
326
326
|
requirements: []
|
327
|
-
|
328
|
-
rubygems_version: 2.7.6
|
327
|
+
rubygems_version: 3.1.2
|
329
328
|
signing_key:
|
330
329
|
specification_version: 4
|
331
330
|
summary: Ruby wrapper for the e-conomic REST API, that aims at making working with
|