luma 0.1.1 → 0.1.2

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: 7ba2fd974740d61c1665cefa352759fb62aa9a104740362a419bf105891faa14
4
- data.tar.gz: c1557993c05a3b72da33217b5f2ec919ee2effdce2f33c0c7125a60571766c17
3
+ metadata.gz: '0871b808e3b0a1f5b1a1781146de35a15ddbccc56c9a7b85a665de32f6ac7512'
4
+ data.tar.gz: 6a9dafee86762e0ff5deb116710b2ae2a7bbb7b9748e54c7d0b760e4577a6afd
5
5
  SHA512:
6
- metadata.gz: e03019b01901ac0718cebd31ebcce588707ac84459f29031b9a6b006a9e8a1847a88908754b9620e19720d634e7b54f5b703d103d4e27884ee22447b4ac8973a
7
- data.tar.gz: 9d2b8aaba0b48ef57c17a6b51d0257af898753c664ed9502111125dfc6bcb35e0206d5e8b0756a5254fb45bb38550c72a140b29bfe3bf144acc01ebc490c866b
6
+ metadata.gz: 0251c298510a2e4e5afa7e565b32228e66f80c5037636d32784fe72f26ea6a27f70ac8272d7bf56c250481ecb9f69658f1ee1eb2617cea1130b248fe064a4902
7
+ data.tar.gz: e25a6f8b08eb7c1241916b352e23126f978a6851bc3cfadc0165f28602125794f31ac24f13e7c14ec1dbb65ea67c5fda6c119faebdfc856b0e0480344bfe5381
data/CHANGELOG.md CHANGED
@@ -4,6 +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.1.2] - 2022-01-13
8
+
9
+ ### Changed
10
+
11
+ - Added API access for updating a patient (PUT)
12
+
7
13
  ## [0.1.1] - 2021-11-16
8
14
 
9
15
  ### Changed
@@ -69,6 +75,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
69
75
 
70
76
  - Initial Create
71
77
 
78
+ [0.1.2]: https://github.com/WeInfuse/luma/compare/v0.1.1...v0.1.2
72
79
  [0.1.1]: https://github.com/WeInfuse/luma/compare/v0.1.0...v0.1.1
73
80
  [0.1.0]: https://github.com/WeInfuse/luma/compare/v0.0.8...v0.1.0
74
81
  [0.0.8]: https://github.com/WeInfuse/luma/compare/v0.0.7...v0.0.8
data/README.md CHANGED
@@ -66,6 +66,14 @@ body = Luma::Models::Patient.new(first_name: 'Ruby',
66
66
  Luma::Patient.new(email: email, password: password).create_patient(body: body)
67
67
  ```
68
68
 
69
+ ### Update Patient
70
+ ```ruby
71
+ body = Luma::Models::Patient.new(address: '456 Old Main')
72
+ patient_identifier = '12345a45b67c89101d2e3456'
73
+
74
+ Luma::Patient.new(email: email, password: password).update_patient(identifier: patient_identifier, body: body)
75
+ ```
76
+
69
77
  ### Create Appointment
70
78
  ```ruby
71
79
  body = Luma::Models::Appointment.new(
data/lib/luma/patient.rb CHANGED
@@ -1,14 +1,23 @@
1
1
  module Luma
2
2
  class Patient < Connection
3
- PATIENT_ENDPOINT = '/api/patients'.freeze
3
+ PATIENT_ENDPOINT = '/api/patients'.freeze
4
4
 
5
- base_uri 'https://api.lumahealth.io/'.freeze
5
+ base_uri 'https://api.lumahealth.io/'.freeze
6
6
 
7
- def create_patient(endpoint: PATIENT_ENDPOINT, body: nil, headers: {}, auth: true, verb: :post, debug_output: $stdout)
8
- @body = body
9
- self.add_headers_and_body if auth
7
+ def create_patient(endpoint: PATIENT_ENDPOINT, body: nil, headers: {}, auth: true, verb: :post, debug_output: $stdout)
8
+ @body = body
9
+ self.add_headers_and_body if auth
10
10
 
11
- self.class.send(verb.to_s, endpoint, body: @body, headers: @headers)
12
- end
11
+ self.class.send(verb.to_s, endpoint, body: @body, headers: @headers)
12
+ end
13
+
14
+ def update_patient(identifier:, endpoint: PATIENT_ENDPOINT, body: nil, headers: {}, auth: true, verb: :put, debug_output: $stdout)
15
+ @body = body
16
+ self.add_headers_and_body if auth
17
+
18
+ endpoint = "#{endpoint}/#{identifier}"
19
+
20
+ self.class.send(verb.to_s, endpoint, body: @body, headers: @headers)
21
+ end
13
22
  end
14
23
  end
data/lib/luma/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Luma
2
- VERSION = '0.1.1'.freeze
2
+ VERSION = '0.1.2'.freeze
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: luma
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Angela Rodriguez
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2021-11-16 00:00:00.000000000 Z
11
+ date: 2022-01-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: httparty
@@ -189,7 +189,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
189
189
  - !ruby/object:Gem::Version
190
190
  version: '0'
191
191
  requirements: []
192
- rubygems_version: 3.0.3
192
+ rubygems_version: 3.1.4
193
193
  signing_key:
194
194
  specification_version: 4
195
195
  summary: Ruby wrapper for the Luma Health API