xsys 0.0.13 → 0.0.14
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -0
- data/lib/xsys/api.rb +10 -0
- data/lib/xsys/model/purchases_position.rb +14 -0
- data/lib/xsys/model/sales_position.rb +14 -0
- data/lib/xsys/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: df84c8736633a9c41b8f2d1d0271621a96412544
|
4
|
+
data.tar.gz: 46bf9ac5472121cf9627715edf214dc191e88ad4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7e98aeb05ba04a1e503614316aa1ed8dc534f2a6b2165fc3891ee1ad7bd9f062cba0e3bfb20cd5ff3a6b175f0cab7eca4d027394ac473f03972109618691931a
|
7
|
+
data.tar.gz: 549f43f793f988f8378d2ecb0c965bd1db0e91b2c0584112aeecc6898892d7dda0404ccfca87c09ad72c1e184dd4d027756703eca961e32445206025d49be8a0
|
data/CHANGELOG.md
CHANGED
data/lib/xsys/api.rb
CHANGED
@@ -91,6 +91,16 @@ module Xsys
|
|
91
91
|
request
|
92
92
|
end
|
93
93
|
|
94
|
+
def self.get_sales_position(period)
|
95
|
+
request = get_request("/sales_position/#{period}")
|
96
|
+
request.map { |r| Model::SalesPosition.new(r) }
|
97
|
+
end
|
98
|
+
|
99
|
+
def self.get_purchases_position(period)
|
100
|
+
request = get_request("/purchases_position/#{period}")
|
101
|
+
request.map { |r| Model::PurchasesPosition.new(r) }
|
102
|
+
end
|
103
|
+
|
94
104
|
private
|
95
105
|
|
96
106
|
def self.get_request(action, params={})
|
@@ -0,0 +1,14 @@
|
|
1
|
+
module Xsys
|
2
|
+
module Model
|
3
|
+
class PurchasesPosition
|
4
|
+
attr_accessor :business_unit, :amount_taxes_21, :amount_taxes_27,
|
5
|
+
:amount_taxes_10_5, :amount_total, :amount_iva_perception, :amount_iva_retention
|
6
|
+
|
7
|
+
def initialize(attributes={})
|
8
|
+
attributes.each do |k,v|
|
9
|
+
self.send("#{k}=", v)
|
10
|
+
end
|
11
|
+
end
|
12
|
+
end
|
13
|
+
end
|
14
|
+
end
|
@@ -0,0 +1,14 @@
|
|
1
|
+
module Xsys
|
2
|
+
module Model
|
3
|
+
class SalesPosition
|
4
|
+
attr_accessor :shop_code, :business_unit, :amount_taxes_21,
|
5
|
+
:amount_taxes_10_5, :amount_total, :extra_payments_total
|
6
|
+
|
7
|
+
def initialize(attributes={})
|
8
|
+
attributes.each do |k,v|
|
9
|
+
self.send("#{k}=", v)
|
10
|
+
end
|
11
|
+
end
|
12
|
+
end
|
13
|
+
end
|
14
|
+
end
|
data/lib/xsys/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: xsys
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.14
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Matias Hick
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-
|
11
|
+
date: 2014-02-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -72,8 +72,10 @@ files:
|
|
72
72
|
- lib/xsys/model/product_provider.rb
|
73
73
|
- lib/xsys/model/provider_kind.rb
|
74
74
|
- lib/xsys/model/purchase_order_item.rb
|
75
|
+
- lib/xsys/model/purchases_position.rb
|
75
76
|
- lib/xsys/model/sale_item.rb
|
76
77
|
- lib/xsys/model/sales_period.rb
|
78
|
+
- lib/xsys/model/sales_position.rb
|
77
79
|
- lib/xsys/model/seller.rb
|
78
80
|
- lib/xsys/model/shop.rb
|
79
81
|
- lib/xsys/model/stock.rb
|