updox 0.7.0 → 0.8.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 +8 -1
- data/lib/updox/connection.rb +4 -1
- data/lib/updox/models/appointment.rb +1 -0
- data/lib/updox/models/appointment_status.rb +0 -4
- data/lib/updox/models/calendar.rb +0 -4
- data/lib/updox/models/location.rb +0 -4
- data/lib/updox/models/model.rb +5 -0
- data/lib/updox/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: fca147e076b5e76f0b8d8f27ddcb6e60549759eff142a04a87bccf7062a415f5
|
4
|
+
data.tar.gz: 0cc871b61d72c3c957b6b8a80deb12498df8825dbc06fafa4eeee516e948a384
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a521d5ca966afff2f700e6a69f42af44568afb3313f1894113bdfcc04f08eb7518481213cb9913dc9fb92d4a65bdb576d99bbefeee161d4b27b02809c558c2a8
|
7
|
+
data.tar.gz: 75f0714582c950c2e4c0ef9d601c024ea0a4812c32bb23d385b7f36090d5bb1de4936ac96de590e9804854c943b63f04e0eb154a7d7f3c63b24fa9a61ccf296f
|
data/CHANGELOG.md
CHANGED
@@ -4,7 +4,14 @@ 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.8.0] - [UNRELEASED]
|
8
|
+
### Added
|
9
|
+
- Model#exists? for all models to share if `find` is implemented
|
10
|
+
|
11
|
+
### Fixed
|
12
|
+
- Rails uses `as_json` to serialize so date in appointment was incorrect string
|
13
|
+
|
14
|
+
## [0.7.0] - [2020-02-14]
|
8
15
|
### Added
|
9
16
|
- AppointmentStatus
|
10
17
|
- Reminder
|
data/lib/updox/connection.rb
CHANGED
@@ -1,8 +1,11 @@
|
|
1
1
|
module Updox
|
2
2
|
class Connection
|
3
|
+
TEST_HOST = 'updoxqa.com'
|
4
|
+
PROD_HOST = 'xxxxxxx.com'
|
5
|
+
|
3
6
|
include HTTParty
|
4
7
|
|
5
|
-
base_uri
|
8
|
+
base_uri "https://#{TEST_HOST}/api/io/".freeze
|
6
9
|
|
7
10
|
headers 'Content-Type' => 'application/json'
|
8
11
|
|
@@ -15,10 +15,6 @@ module Updox
|
|
15
15
|
alias_method :external_appointment_id, :externalAppointmentId
|
16
16
|
alias_method :appointment_status, :appointmentStatus
|
17
17
|
|
18
|
-
def self.exists?(appointment_id, account_id: , cached_query: nil)
|
19
|
-
false == self.find(appointment_id, account_id: account_id, cached_query: cached_query).nil?
|
20
|
-
end
|
21
|
-
|
22
18
|
def self.find(appointment_id, account_id: , cached_query: nil)
|
23
19
|
obj = cached_query || self.query([appointment_id], account_id: account_id)
|
24
20
|
|
@@ -26,10 +26,6 @@ module Updox
|
|
26
26
|
self.class.request(endpoint: SYNC_ENDPOINT, body: self.to_h, auth: {accountId: account_id}, required_auths: Updox::Models::Auth::AUTH_ACCT)
|
27
27
|
end
|
28
28
|
|
29
|
-
def self.exists?(calendar_id, account_id: , cached_query: nil)
|
30
|
-
false == self.find(calendar_id, account_id: account_id, cached_query: cached_query).nil?
|
31
|
-
end
|
32
|
-
|
33
29
|
def self.find(calendar_id, account_id: , cached_query: nil)
|
34
30
|
obj = cached_query || self.query(account_id: account_id)
|
35
31
|
|
@@ -38,10 +38,6 @@ module Updox
|
|
38
38
|
self.class.sync([self], account_id: account_id)
|
39
39
|
end
|
40
40
|
|
41
|
-
def self.exists?(location_id, account_id: , cached_query: nil)
|
42
|
-
false == self.find(location_id, account_id: account_id, cached_query: cached_query).nil?
|
43
|
-
end
|
44
|
-
|
45
41
|
def self.find(location_id, account_id: , cached_query: nil)
|
46
42
|
obj = cached_query || self.query(account_id: account_id)
|
47
43
|
|
data/lib/updox/models/model.rb
CHANGED
@@ -33,6 +33,11 @@ module Updox
|
|
33
33
|
"#{response_code}: #{response_message}"
|
34
34
|
end
|
35
35
|
|
36
|
+
def self.exists?(item_id, account_id: , cached_query: nil)
|
37
|
+
raise UpdoxException.new('Not implemented on this model.') unless self.respond_to?(:find)
|
38
|
+
false == self.find(item_id, account_id: account_id, cached_query: cached_query).nil?
|
39
|
+
end
|
40
|
+
|
36
41
|
def self.sync(items, account_id: , batch_size: RECOMMENDED_BATCH_SIZE, endpoint: self.const_get(:SYNC_ENDPOINT))
|
37
42
|
response = nil
|
38
43
|
list_type = self.const_get(:SYNC_LIST_TYPE)
|
data/lib/updox/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: updox
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.8.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Mike Crockett
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-02-
|
11
|
+
date: 2020-02-19 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: httparty
|