economic-rest 0.2.4 → 0.2.5

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
2
  SHA1:
3
- metadata.gz: 50e51199686308f213801093d9d71ada8c1eb8f9
4
- data.tar.gz: 47f8d49ff77e70749635ba208199d784f90a9d0b
3
+ metadata.gz: 00e89ae10985c67c56fdbca2dbfaed901c2431b3
4
+ data.tar.gz: f5445bb1821c2055c00d2fbce739a483912e89a3
5
5
  SHA512:
6
- metadata.gz: ca5173c35e71a6ffe89114b24310200c1e2a19a52f5be339f37d77a122fc76fc31f7b369f4096358b3981854fd9b2ed5cba6e664ac386be772328adc551edf97
7
- data.tar.gz: 0e7ef9330338e8c3de3621298f56d36fe61f2ffa59e0063b0902f0ced2d8a7e3afe077676cce0724bc30c0bedf6699c19dc0130be99af78c7e22d92396c88912
6
+ metadata.gz: 0e58f62c99a197353b2071080ac7d08e54b0c4a84e542b1743194d2a482175216cc0fcebc08ac1f5c42ebf167a36f91ac28c523f024ad2008215aaa2f6cf6f6b
7
+ data.tar.gz: 47b86a8c50965e051c7e12523dccd566b0b12e5e3be8dd252d17d1d9b6e77a93f9d7881e939215a1240a577bf1e7c6458227d39918ee9e5489b0311c14abd541
@@ -0,0 +1,5 @@
1
+ module Economic
2
+ class Currency < Base
3
+ field :code
4
+ end
5
+ end
@@ -0,0 +1,7 @@
1
+ module Economic
2
+ class Pricing < Base
3
+ field :price
4
+ relation :currency, fields: [:code]
5
+ relation :product, fields: [:productNumber]
6
+ end
7
+ end
@@ -1,4 +1,15 @@
1
1
  module Economic
2
2
  class ProductRepo < Economic::BaseRepo
3
+ def self.find_currency_specific_sales_prices(entry_number)
4
+ end_point = [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
3
14
  end
4
15
  end
@@ -4,11 +4,13 @@ require 'rest-client'
4
4
  require 'economic/base_repo'
5
5
  require 'economic/base'
6
6
 
7
+ require 'economic/currency'
7
8
  require 'economic/vat_zone'
8
9
  require 'economic/inventory'
9
10
  require 'economic/customer_group'
10
11
  require 'economic/product_group'
11
12
 
13
+ require 'economic/pricing'
12
14
  require 'economic/delivery'
13
15
  require 'economic/layout'
14
16
  require 'economic/notes'
@@ -1,5 +1,5 @@
1
1
  module Economic
2
2
  module Rest
3
- VERSION = '0.2.4'.freeze
3
+ VERSION = '0.2.5'.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.4
4
+ version: 0.2.5
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-01 00:00:00.000000000 Z
11
+ date: 2019-04-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -128,6 +128,7 @@ files:
128
128
  - lib/economic/accounting_year.rb
129
129
  - lib/economic/base.rb
130
130
  - lib/economic/base_repo.rb
131
+ - lib/economic/currency.rb
131
132
  - lib/economic/customer.rb
132
133
  - lib/economic/customer_group.rb
133
134
  - lib/economic/customer_repo.rb
@@ -145,6 +146,7 @@ files:
145
146
  - lib/economic/orders/sent_repo.rb
146
147
  - lib/economic/payment_terms.rb
147
148
  - lib/economic/pdf.rb
149
+ - lib/economic/pricing.rb
148
150
  - lib/economic/product.rb
149
151
  - lib/economic/product_group.rb
150
152
  - lib/economic/product_group_repo.rb