xsys 0.0.19 → 0.0.20

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: 5379d4de5ddf8f9013e7e6e614a0b2dcbd7cc18a
4
- data.tar.gz: 010793332229e88b9cd8de7d49c7454a92aefa31
3
+ metadata.gz: 6c76da81b4985a62fbb59953395e74e1b621d5bc
4
+ data.tar.gz: 2dd961f33dd02d9b2652ba878cfd3af80c1944fd
5
5
  SHA512:
6
- metadata.gz: cd08f0752e767ca528cfcba3815aee2f7271aa6cea1ae9e2f4ae58e4be4845bccee6e187b1a46288653acc79d935b094719f668c6c30a6850829469c94a85e85
7
- data.tar.gz: f8f8798eef0c27ac2f1c0a70c5bbca2691737562f7ad1e0943502ee05d06b2e4a3bbf2e08180cb37d902a3e0b94540349fe7117f844637e4ae9e21d5afd7e8d7
6
+ metadata.gz: fa3f00530bbb40b82281e5aa1600722f56a9129db29cf669c38efe4209db0b1b27cb9eb8575301c013977635ba9ab8c147f33841b94258c050e310dabd327855
7
+ data.tar.gz: 8b33cf4be69c2799df96318e7fe29239a4141a5f9c41cecb6a6930d82ca39824216633f96cfea2f78e5181f3d05806a6b6ca75bd9b20250a019f7e8efc3818d4
data/CHANGELOG.md CHANGED
@@ -73,3 +73,7 @@
73
73
  ## v0.0.19
74
74
 
75
75
  * Added stock control
76
+
77
+ ## v0.0.20
78
+
79
+ * Added users
data/lib/xsys.rb CHANGED
@@ -6,13 +6,16 @@ require 'xsys/model/product_category'
6
6
  require 'xsys/model/product_provider'
7
7
  require 'xsys/model/provider_kind'
8
8
  require 'xsys/model/purchase_order_item'
9
+ require 'xsys/model/purchases_position'
9
10
  require 'xsys/model/sale_item'
10
11
  require 'xsys/model/sales_period'
12
+ require 'xsys/model/sales_position'
11
13
  require 'xsys/model/seller'
12
14
  require 'xsys/model/shop'
13
15
  require 'xsys/model/stock'
14
- require 'xsys/model/purchases_position'
15
- require 'xsys/model/sales_position'
16
+ require 'xsys/model/stock_control'
17
+ require 'xsys/model/stock_control_item'
18
+ require 'xsys/model/user'
16
19
 
17
20
  require 'xsys/api'
18
21
  require 'xsys/pagination'
data/lib/xsys/api.rb CHANGED
@@ -101,7 +101,7 @@ module Xsys
101
101
  request.map { |r| Model::PurchasesPosition.new(r) }
102
102
  end
103
103
 
104
- def self.get_stock_controls(params)
104
+ def self.get_stock_controls(params={})
105
105
  request = get_request('/stock_controls', params)
106
106
 
107
107
  request.map { |r| Model::StockControl.new(r) }
@@ -125,6 +125,9 @@ module Xsys
125
125
  request.map { |r| Model::StockControlItem.new(r) }
126
126
  end
127
127
 
128
+ def self.get_users
129
+ get_request('/users').map { |r| Model::User.new(r) }
130
+ end
128
131
 
129
132
  private
130
133
 
@@ -5,7 +5,7 @@ module Xsys
5
5
 
6
6
  def initialize(attributes={})
7
7
  attributes.each do |k,v|
8
- self.send("#{k}=", v)
8
+ self.send("#{k}=", v) if self.respond_to?(k)
9
9
  end
10
10
  end
11
11
  end
data/lib/xsys/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Xsys
2
- VERSION = "0.0.19"
2
+ VERSION = "0.0.20"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: xsys
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.19
4
+ version: 0.0.20
5
5
  platform: ruby
6
6
  authors:
7
7
  - Matias Hick