updox 0.3.0 → 0.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: e8d53b82b8a9df00b465dc9607e8cda54f35d75b8f105955782a97226062ace5
4
- data.tar.gz: 5eb1c0ed24e6a059e13ddb650710a89e87c14a9827353677f3136beefc7ba4e8
3
+ metadata.gz: 6ec52e4b2310bf45c257d8c4092d3c65f2d9586e49ef18b9600943af750d8af5
4
+ data.tar.gz: 26a29009d85aab28861408b7266910c752486e9e93771e6d01601a3a76b426a5
5
5
  SHA512:
6
- metadata.gz: 22546efb10290de0b7770cd5783eefb456c63470afe11f98083297df95dfa621c730285799adde45cf75d802a009044483b66ffb030617f4896d9c4831e96ea7
7
- data.tar.gz: e7246b973cd2d73ecad2e49ebcb5a5ff5e2b9e8e964e3d79a53f7497c06aa861292cea15d8ac81471962d0cf16eda76131004624e28bc944f53f800641685223
6
+ metadata.gz: 0c539a3fc2bc50adafb03ec452e2c3a738fe476bbcd3bde154f8f6e16f861584770bfaceea9f2461ade369cbc6f617b95204840ba94ef6d29e340bfee7caaebe
7
+ data.tar.gz: 8a6fd9fd5711d3e6ba8dc8d3d607ffee81ca51f1980572f3364f1761c9c02fd596f89ed61939137dd5ae4e2152201734a3d9d78089a462c4707892af30ed2518
data/CHANGELOG.md CHANGED
@@ -4,9 +4,10 @@ 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.x.x] - UNRELEASED
7
+ ## [0.4.0] - 2020-02-11
8
8
  ### Changed
9
- - None
9
+ - Minor grammar fixes
10
+ - Added `alias_method` to models for snake to camel case
10
11
 
11
12
  ## [0.3.0] - 2020-02-06
12
13
  ### Added
@@ -24,7 +25,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
24
25
  ### Added
25
26
  - Initial Release with ability to ping Updox api
26
27
 
27
- [0.x.x]: https://github.com/WeInfuse/updox/compare/v0.3.0...HEAD
28
+ [0.4.0]: https://github.com/WeInfuse/updox/compare/v0.3.0...v0.4.0
28
29
  [0.3.0]: https://github.com/WeInfuse/updox/compare/v0.2.0...v0.3.0
29
30
  [0.2.0]: https://github.com/WeInfuse/updox/compare/v0.1.0...v0.2.0
30
31
  [0.1.0]: https://github.com/WeInfuse/updox/compare/v0.1.0
data/Gemfile CHANGED
@@ -1,4 +1,4 @@
1
1
  source 'https://rubygems.org'
2
2
 
3
- # Specify your gem's dependencies in redox.gemspec
3
+ # Specify your gem's dependencies in updox.gemspec
4
4
  gemspec
@@ -3,10 +3,12 @@ module Updox
3
3
  class Application < Model
4
4
  OPEN_ENDPOINT = '/ApplicationOpen'.freeze
5
5
 
6
- property :ipAddress
6
+ property :ipAddress, from: :ip_address
7
7
  property :timeout
8
8
  property :metadata
9
9
 
10
+ alias_method :ip_address, :ipAddress
11
+
10
12
  def url(account_id: , user_id: , base_uri: nil)
11
13
  response = self.open(account_id: account_id, user_id: user_id)
12
14
 
@@ -8,8 +8,8 @@ module Updox
8
8
  property :calendarId, required: true, from: :calendar_id
9
9
  property :date, required: true
10
10
  property :duration
11
- property :patientId
12
- property :typeId
11
+ property :patientId, from: :patient_id
12
+ property :typeId, from: :type_id
13
13
  property :summary
14
14
  property :details
15
15
  property :blocked, required: true, transform_with: ->(v) { true == v }, default: false
@@ -17,6 +17,13 @@ module Updox
17
17
  property :locationId, from: :location_id
18
18
  property :reminderTokens, from: :reminder_tokens
19
19
 
20
+ alias_method :updox_id, :updoxId
21
+ alias_method :calendar_id, :calendarId
22
+ alias_method :patient_id, :patientId
23
+ alias_method :type_id, :typeId
24
+ alias_method :location_id, :locationId
25
+ alias_method :reminder_tokens, :reminderTokens
26
+
20
27
  def to_h
21
28
  result = super.to_h
22
29
 
@@ -16,6 +16,11 @@ module Updox
16
16
  property :accountId, from: :account_id
17
17
  property :userId, from: :user_id
18
18
 
19
+ alias_method :application_id, :applicationId
20
+ alias_method :application_password, :applicationPassword
21
+ alias_method :account_id, :accountId
22
+ alias_method :user_id, :userId
23
+
19
24
  def to_h
20
25
  { auth: super.to_h }
21
26
  end
@@ -5,11 +5,15 @@ module Updox
5
5
 
6
6
  property :id, required: true
7
7
  property :title, required: true
8
- property :color, required: true, default: '#000000'
9
- property :textColor, required: true, default: '#FFFFFF'
10
- property :publicCalendar, default: false, from: :public_calendar, with: ->(v) { true == v}, transform_with: ->(v) { true == v }
8
+ property :color, required: true, default: '#2DA2C8'
9
+ property :textColor, required: true, from: :text_color, default: '#FFFFFF'
10
+ property :publicCalendar, default: false, from: :public_calendar
11
11
  property :active, default: true
12
- property :reminderTurnOff, default: false, from: :reminder_turn_off, with: ->(v) { true == v}, transform_with: ->(v) { true == v }
12
+ property :reminderTurnOff, default: false, from: :reminder_turn_off
13
+
14
+ alias_method :text_color, :textColor
15
+ alias_method :public_calendar, :publicCalendar
16
+ alias_method :reminder_turn_off, :reminderTurnOff
13
17
 
14
18
  def create(account_id: )
15
19
  self.class.from_response(UpdoxClient.connection.request(endpoint: SYNC_ENDPOINT, body: self.to_h, auth: {accountId: account_id}, required_auths: Updox::Models::Auth::AUTH_ACCT))
@@ -6,9 +6,11 @@ module Updox
6
6
  property :id
7
7
  property :code
8
8
  property :name
9
- property :showInPortal, default: false, from: :show_in_portal, with: ->(v) { true == v }, transform_with: ->(v) { true == v }
9
+ property :showInPortal, default: false, from: :show_in_portal
10
10
  property :active, default: true
11
11
 
12
+ alias_method :show_in_portal, :showInPortal
13
+
12
14
  def save(account_id: )
13
15
  self.class.sync([self], account_id: account_id)
14
16
  end
@@ -14,6 +14,17 @@ module Updox
14
14
  property :mobileNumber, from: :mobile_number
15
15
  property :active, default: true
16
16
 
17
+ alias_method :email, :emailAddress
18
+ alias_method :email_address, :emailAddress
19
+ alias_method :internal_id, :internalId
20
+ alias_method :first_name, :firstName
21
+ alias_method :middle_name, :middleName
22
+ alias_method :last_name, :lastName
23
+ alias_method :home_phone, :homePhone
24
+ alias_method :work_phone, :workPhone
25
+ alias_method :mobile_number, :mobileNumber
26
+ alias_method :mobile_phone, :mobileNumber
27
+
17
28
  def save(account_id: )
18
29
  self.class.sync([self], account_id: account_id)
19
30
  end
@@ -26,6 +26,7 @@ module Updox
26
26
  alias_method :user_id, :userId
27
27
  alias_method :first_name, :firstName
28
28
  alias_method :last_name, :lastName
29
+ alias_method :login_password, :loginPassword
29
30
 
30
31
  def create
31
32
  UpdoxClient.connection.request(endpoint: SAVE_ENDPOINT, body: self.to_h, required_auths: Updox::Models::Auth::AUTH_APP)
data/lib/updox/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Updox
2
- VERSION = '0.3.0'.freeze
2
+ VERSION = '0.4.0'.freeze
3
3
  end
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.3.0
4
+ version: 0.4.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-06 00:00:00.000000000 Z
11
+ date: 2020-02-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: httparty