updox 0.8.0 → 0.9.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +9 -2
- data/lib/updox/models/model.rb +6 -1
- data/lib/updox/models/user.rb +2 -2
- data/lib/updox/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f843a1291c9ff0193399fb046a0ff896ae91b572fa538b4c9f12fb8f60033c75
|
4
|
+
data.tar.gz: ee983a76110a37992d4b5a3c1df2635a7960e61e426a39922cae72a242b417bb
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 209cf6d78a8ed693e050022ef4fe5c9e201b94a3754d562f03538c33172549beb751b8c639027d2f205d3e546fd503f31c35d921ff82983fdb16cd4deb143e95
|
7
|
+
data.tar.gz: 764c3e8086b75bfd7517daefe85c968fabfa23567059f6314ccead6d2e69734cf43c37d158f3b33cd1fbfc6d1053eb58e08f6cc692f14791944c9106e5e18914
|
data/CHANGELOG.md
CHANGED
@@ -4,7 +4,12 @@ All notable changes to this project will be documented in this file.
|
|
4
4
|
The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
|
5
5
|
and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).
|
6
6
|
|
7
|
-
## [0.
|
7
|
+
## [0.9.0] - [2020-02-19]
|
8
|
+
### Fixed
|
9
|
+
- User#create had wrong authorization
|
10
|
+
- User#exists? had bug in call type
|
11
|
+
|
12
|
+
## [0.8.0] - [2020-02-19]
|
8
13
|
### Added
|
9
14
|
- Model#exists? for all models to share if `find` is implemented
|
10
15
|
|
@@ -67,7 +72,9 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
|
|
67
72
|
### Added
|
68
73
|
- Initial Release with ability to ping Updox api
|
69
74
|
|
70
|
-
[0.
|
75
|
+
[0.9.0]: https://github.com/WeInfuse/updox/compare/v0.8.0...HEAD
|
76
|
+
[0.8.0]: https://github.com/WeInfuse/updox/compare/v0.7.0...v0.8.0
|
77
|
+
[0.7.0]: https://github.com/WeInfuse/updox/compare/v0.6.0...v0.7.0
|
71
78
|
[0.6.0]: https://github.com/WeInfuse/updox/compare/v0.5.0...v0.6.0
|
72
79
|
[0.5.0]: https://github.com/WeInfuse/updox/compare/v0.4.0...v0.5.0
|
73
80
|
[0.4.0]: https://github.com/WeInfuse/updox/compare/v0.3.0...v0.4.0
|
data/lib/updox/models/model.rb
CHANGED
@@ -35,7 +35,12 @@ module Updox
|
|
35
35
|
|
36
36
|
def self.exists?(item_id, account_id: , cached_query: nil)
|
37
37
|
raise UpdoxException.new('Not implemented on this model.') unless self.respond_to?(:find)
|
38
|
-
|
38
|
+
opts = { account_id: account_id }
|
39
|
+
opts[:cached_query] = cached_query unless cached_query.nil?
|
40
|
+
|
41
|
+
response = self.find(item_id, **opts)
|
42
|
+
|
43
|
+
false == response.nil? && (false == response.class.const_defined?(:FIND_ENDPOINT) || response.successful?)
|
39
44
|
end
|
40
45
|
|
41
46
|
def self.sync(items, account_id: , batch_size: RECOMMENDED_BATCH_SIZE, endpoint: self.const_get(:SYNC_ENDPOINT))
|
data/lib/updox/models/user.rb
CHANGED
@@ -30,8 +30,8 @@ module Updox
|
|
30
30
|
alias_method :last_name, :lastName
|
31
31
|
alias_method :login_password, :loginPassword
|
32
32
|
|
33
|
-
def create
|
34
|
-
self.class.request(endpoint: SAVE_ENDPOINT, body: self.to_h, required_auths: Updox::Models::Auth::
|
33
|
+
def create(account_id: )
|
34
|
+
self.class.request(endpoint: SAVE_ENDPOINT, body: self.to_h, auth: {accountId: account_id}, required_auths: Updox::Models::Auth::AUTH_ACCT)
|
35
35
|
end
|
36
36
|
|
37
37
|
def self.find(user_id, account_id: )
|
data/lib/updox/version.rb
CHANGED