economic-rest 0.2.5 → 0.2.7

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: 00e89ae10985c67c56fdbca2dbfaed901c2431b3
4
- data.tar.gz: f5445bb1821c2055c00d2fbce739a483912e89a3
2
+ SHA256:
3
+ metadata.gz: bda5846955fe8abb517ad10015d12bb70075f14893c3b9af34b962502693ec75
4
+ data.tar.gz: 7fd6e3b9593968e4097d5400558ac0288771a0f663b83df7adfbc5d52ae06b8c
5
5
  SHA512:
6
- metadata.gz: 0e58f62c99a197353b2071080ac7d08e54b0c4a84e542b1743194d2a482175216cc0fcebc08ac1f5c42ebf167a36f91ac28c523f024ad2008215aaa2f6cf6f6b
7
- data.tar.gz: 47b86a8c50965e051c7e12523dccd566b0b12e5e3be8dd252d17d1d9b6e77a93f9d7881e939215a1240a577bf1e7c6458227d39918ee9e5489b0311c14abd541
6
+ metadata.gz: ded25ff22ac395bad102f13c0d5f5bbb4496389b578a4888f38670ebb52928debec168242f1bd900938fc2f2a68927acf325514cb8028babc6df578d16fdb549
7
+ data.tar.gz: c72d99e9b55a2018983f54b977534c2c627ae00928504d51a0823e0df58bee55f8a980aecc35615d1b7f74a8fa0a97e609aa4f03d98313d8d03832b6897b7a32
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- economic-rest (0.2.0)
4
+ economic-rest (0.2.5)
5
5
  rest-client
6
6
 
7
7
  GEM
@@ -24,7 +24,7 @@ GEM
24
24
  method_source (0.9.2)
25
25
  mime-types (3.2.2)
26
26
  mime-types-data (~> 3.2015)
27
- mime-types-data (3.2018.0812)
27
+ mime-types-data (3.2019.0331)
28
28
  minitest (5.11.3)
29
29
  netrc (0.11.0)
30
30
  public_suffix (3.0.3)
@@ -41,7 +41,7 @@ GEM
41
41
  simplecov-html (0.10.2)
42
42
  unf (0.1.4)
43
43
  unf_ext
44
- unf_ext (0.0.7.5)
44
+ unf_ext (0.0.7.6)
45
45
  webmock (3.5.1)
46
46
  addressable (>= 2.3.6)
47
47
  crack (>= 0.3.2)
@@ -60,4 +60,4 @@ DEPENDENCIES
60
60
  webmock (~> 3.5)
61
61
 
62
62
  BUNDLED WITH
63
- 1.17.2
63
+ 1.17.3
@@ -0,0 +1,15 @@
1
+ module Economic
2
+ class PricingRepo < Economic::ProductRepo
3
+ def self.currency_specific_sales_prices_for(entry_number)
4
+ end_point = [superclass.endpoint_url, entry_number, 'pricing', 'currency-specific-sales-prices'].join('/')
5
+ response = test_response(RestClient.get(end_point, headers))
6
+ entry_hash = JSON.parse(response.body)
7
+ pricings = []
8
+
9
+ entry_hash['collection'].each do |pricing|
10
+ pricings.push Pricing.new(pricing)
11
+ end
12
+ pricings
13
+ end
14
+ end
15
+ end
@@ -1,15 +1,4 @@
1
1
  module Economic
2
2
  class ProductGroupRepo < Economic::BaseRepo
3
- def self.find_products(entry_number)
4
- end_point = [endpoint_url, entry_number, 'products'].join('/')
5
- response = test_response(RestClient.get(end_point, headers))
6
- entry_hash = JSON.parse(response.body)
7
- products = []
8
-
9
- entry_hash['collection'].each do |product|
10
- products.push Product.new(product)
11
- end
12
- products
13
- end
14
3
  end
15
4
  end
@@ -11,5 +11,17 @@ module Economic
11
11
  end
12
12
  pricings
13
13
  end
14
+
15
+ def self.in_group(entry_number)
16
+ end_point = [ProductGroupRepo.endpoint_url, entry_number, 'products'].join('/')
17
+ response = test_response(RestClient.get(end_point, headers))
18
+ entry_hash = JSON.parse(response.body)
19
+ products = []
20
+
21
+ entry_hash['collection'].each do |product|
22
+ products.push Product.new(product)
23
+ end
24
+ products
25
+ end
14
26
  end
15
27
  end
@@ -24,6 +24,7 @@ require 'economic/customer_repo'
24
24
  require 'economic/customer'
25
25
  require 'economic/product_repo'
26
26
  require 'economic/product'
27
+ require 'economic/pricing_repo'
27
28
 
28
29
  require 'economic/orders/repo'
29
30
  require 'economic/order'
@@ -1,5 +1,5 @@
1
1
  module Economic
2
2
  module Rest
3
- VERSION = '0.2.5'.freeze
3
+ VERSION = '0.2.7'.freeze
4
4
  end
5
5
  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.2.5
4
+ version: 0.2.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Peter Klogborg
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2019-04-10 00:00:00.000000000 Z
11
+ date: 2019-04-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -147,6 +147,7 @@ files:
147
147
  - lib/economic/payment_terms.rb
148
148
  - lib/economic/pdf.rb
149
149
  - lib/economic/pricing.rb
150
+ - lib/economic/pricing_repo.rb
150
151
  - lib/economic/product.rb
151
152
  - lib/economic/product_group.rb
152
153
  - lib/economic/product_group_repo.rb
@@ -178,8 +179,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
178
179
  - !ruby/object:Gem::Version
179
180
  version: '0'
180
181
  requirements: []
181
- rubyforge_project:
182
- rubygems_version: 2.5.2.3
182
+ rubygems_version: 3.0.1
183
183
  signing_key:
184
184
  specification_version: 4
185
185
  summary: Ruby wrapper for the e-conomic REST API, that aims at making working with