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 +4 -4
- data/lib/economic/currency.rb +5 -0
- data/lib/economic/pricing.rb +7 -0
- data/lib/economic/product_repo.rb +11 -0
- data/lib/economic/rest.rb +2 -0
- data/lib/economic/rest/version.rb +1 -1
- metadata +4 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 00e89ae10985c67c56fdbca2dbfaed901c2431b3
|
4
|
+
data.tar.gz: f5445bb1821c2055c00d2fbce739a483912e89a3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0e58f62c99a197353b2071080ac7d08e54b0c4a84e542b1743194d2a482175216cc0fcebc08ac1f5c42ebf167a36f91ac28c523f024ad2008215aaa2f6cf6f6b
|
7
|
+
data.tar.gz: 47b86a8c50965e051c7e12523dccd566b0b12e5e3be8dd252d17d1d9b6e77a93f9d7881e939215a1240a577bf1e7c6458227d39918ee9e5489b0311c14abd541
|
@@ -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
|
data/lib/economic/rest.rb
CHANGED
@@ -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'
|
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
|
+
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-
|
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
|