provet-client 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.github/workflows/brakeman.yml +29 -0
- data/.github/workflows/rspec.yml +29 -0
- data/.github/workflows/rubocop.yml +36 -0
- data/.rspec +3 -0
- data/.rubocop.yml +34 -0
- data/CHANGELOG.md +53 -0
- data/CODE_OF_CONDUCT.md +84 -0
- data/Gemfile +15 -0
- data/Gemfile.lock +88 -0
- data/LICENSE.txt +21 -0
- data/README.md +184 -0
- data/Rakefile +8 -0
- data/bin/console +15 -0
- data/bin/setup +8 -0
- data/lib/provet.rb +83 -0
- data/lib/provet/appointment.rb +23 -0
- data/lib/provet/availability.rb +13 -0
- data/lib/provet/base.rb +135 -0
- data/lib/provet/client.rb +15 -0
- data/lib/provet/consultation.rb +23 -0
- data/lib/provet/consultation_discharge_instruction.rb +19 -0
- data/lib/provet/consultation_item.rb +23 -0
- data/lib/provet/consultation_item_template.rb +23 -0
- data/lib/provet/department.rb +23 -0
- data/lib/provet/invoice.rb +19 -0
- data/lib/provet/invoice_row.rb +23 -0
- data/lib/provet/item.rb +19 -0
- data/lib/provet/item_list.rb +23 -0
- data/lib/provet/item_template.rb +11 -0
- data/lib/provet/item_template_item.rb +15 -0
- data/lib/provet/laboratory_analysis_group.rb +11 -0
- data/lib/provet/patient.rb +15 -0
- data/lib/provet/phone_number.rb +11 -0
- data/lib/provet/reason.rb +15 -0
- data/lib/provet/reason_group.rb +11 -0
- data/lib/provet/reminder.rb +11 -0
- data/lib/provet/reminder_template.rb +11 -0
- data/lib/provet/shift.rb +11 -0
- data/lib/provet/shift_type.rb +23 -0
- data/lib/provet/user.rb +27 -0
- data/lib/provet/user_details.rb +11 -0
- data/lib/provet/user_group.rb +23 -0
- data/lib/provet/vat_group.rb +23 -0
- data/lib/provet/version.rb +5 -0
- data/provet-client.gemspec +27 -0
- metadata +105 -0
@@ -0,0 +1,23 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Provet
|
4
|
+
class InvoiceRow < Provet::Base
|
5
|
+
def create(_body)
|
6
|
+
raise MethodNotAllowedError
|
7
|
+
end
|
8
|
+
|
9
|
+
def update(*_args)
|
10
|
+
raise MethodNotAllowedError
|
11
|
+
end
|
12
|
+
|
13
|
+
def destroy(_id)
|
14
|
+
raise MethodNotAllowedError
|
15
|
+
end
|
16
|
+
|
17
|
+
private
|
18
|
+
|
19
|
+
def endpoint_name
|
20
|
+
'invoicerow'
|
21
|
+
end
|
22
|
+
end
|
23
|
+
end
|
data/lib/provet/item.rb
ADDED
@@ -0,0 +1,19 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Provet
|
4
|
+
class Item < Provet::Base
|
5
|
+
def initialize(type_code:)
|
6
|
+
@type_code = type_code
|
7
|
+
end
|
8
|
+
|
9
|
+
private
|
10
|
+
|
11
|
+
def endpoint_name
|
12
|
+
@type_code
|
13
|
+
end
|
14
|
+
|
15
|
+
def soft_deletable?
|
16
|
+
true
|
17
|
+
end
|
18
|
+
end
|
19
|
+
end
|
@@ -0,0 +1,23 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Provet
|
4
|
+
class ItemList < Provet::Base
|
5
|
+
def create(_body)
|
6
|
+
raise MethodNotAllowedError
|
7
|
+
end
|
8
|
+
|
9
|
+
def update(*_args)
|
10
|
+
raise MethodNotAllowedError
|
11
|
+
end
|
12
|
+
|
13
|
+
def destroy(_id)
|
14
|
+
raise MethodNotAllowedError
|
15
|
+
end
|
16
|
+
|
17
|
+
private
|
18
|
+
|
19
|
+
def endpoint_name
|
20
|
+
'itemlist'
|
21
|
+
end
|
22
|
+
end
|
23
|
+
end
|
data/lib/provet/shift.rb
ADDED
@@ -0,0 +1,23 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Provet
|
4
|
+
class ShiftType < Provet::Base
|
5
|
+
def create(_body)
|
6
|
+
raise MethodNotAllowedError
|
7
|
+
end
|
8
|
+
|
9
|
+
def update(*_args)
|
10
|
+
raise MethodNotAllowedError
|
11
|
+
end
|
12
|
+
|
13
|
+
def destroy(_id)
|
14
|
+
raise MethodNotAllowedError
|
15
|
+
end
|
16
|
+
|
17
|
+
private
|
18
|
+
|
19
|
+
def endpoint_name
|
20
|
+
'shifttype'
|
21
|
+
end
|
22
|
+
end
|
23
|
+
end
|
data/lib/provet/user.rb
ADDED
@@ -0,0 +1,27 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Provet
|
4
|
+
class User < Provet::Base
|
5
|
+
def really_destroy!(_id)
|
6
|
+
raise MethodNotAllowedError
|
7
|
+
end
|
8
|
+
|
9
|
+
private
|
10
|
+
|
11
|
+
def soft_deletable?
|
12
|
+
true
|
13
|
+
end
|
14
|
+
|
15
|
+
def endpoint_name
|
16
|
+
'user'
|
17
|
+
end
|
18
|
+
|
19
|
+
def archive_payload
|
20
|
+
{ is_active: 0 }.to_json
|
21
|
+
end
|
22
|
+
|
23
|
+
def restore_payload
|
24
|
+
{ is_active: 1 }.to_json
|
25
|
+
end
|
26
|
+
end
|
27
|
+
end
|
@@ -0,0 +1,23 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Provet
|
4
|
+
class UserGroup < Provet::Base
|
5
|
+
def create(_body)
|
6
|
+
raise MethodNotAllowedError
|
7
|
+
end
|
8
|
+
|
9
|
+
def update(*_args)
|
10
|
+
raise MethodNotAllowedError
|
11
|
+
end
|
12
|
+
|
13
|
+
def destroy(_id)
|
14
|
+
raise MethodNotAllowedError
|
15
|
+
end
|
16
|
+
|
17
|
+
private
|
18
|
+
|
19
|
+
def endpoint_name
|
20
|
+
'usergroup'
|
21
|
+
end
|
22
|
+
end
|
23
|
+
end
|
@@ -0,0 +1,23 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Provet
|
4
|
+
class VatGroup < Provet::Base
|
5
|
+
def create(_body)
|
6
|
+
raise MethodNotAllowedError
|
7
|
+
end
|
8
|
+
|
9
|
+
def update(*_args)
|
10
|
+
raise MethodNotAllowedError
|
11
|
+
end
|
12
|
+
|
13
|
+
def destroy(_id)
|
14
|
+
raise MethodNotAllowedError
|
15
|
+
end
|
16
|
+
|
17
|
+
private
|
18
|
+
|
19
|
+
def endpoint_name
|
20
|
+
'vatgroup'
|
21
|
+
end
|
22
|
+
end
|
23
|
+
end
|
@@ -0,0 +1,27 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require File.expand_path('lib/provet/version', __dir__)
|
4
|
+
|
5
|
+
Gem::Specification.new do |spec|
|
6
|
+
spec.name = 'provet-client'
|
7
|
+
spec.version = Provet::VERSION
|
8
|
+
spec.authors = ['EmCousin']
|
9
|
+
spec.email = ['emmanuel@hey.com']
|
10
|
+
spec.summary = 'A Provet Cloud client for ruby'
|
11
|
+
spec.license = 'MIT'
|
12
|
+
spec.required_ruby_version = Gem::Requirement.new('>= 2.4.0')
|
13
|
+
spec.homepage = 'https://github.com/EmCousin/provet-client'
|
14
|
+
|
15
|
+
spec.metadata['homepage_uri'] = spec.homepage
|
16
|
+
spec.metadata['source_code_uri'] = spec.homepage
|
17
|
+
spec.metadata['changelog_uri'] = 'https://github.com/EmCousin/provet-client/blob/main/CHANGELOG.md'
|
18
|
+
|
19
|
+
spec.files = Dir.chdir(File.expand_path(__dir__)) do
|
20
|
+
`git ls-files -z`.split("\x0").reject { |f| f.match(%r{\A(?:test|spec|features)/}) }
|
21
|
+
end
|
22
|
+
spec.bindir = 'exe'
|
23
|
+
spec.executables = spec.files.grep(%r{\Aexe/}) { |f| File.basename(f) }
|
24
|
+
spec.require_paths = ['lib']
|
25
|
+
|
26
|
+
spec.add_dependency 'httparty'
|
27
|
+
end
|
metadata
ADDED
@@ -0,0 +1,105 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: provet-client
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.1.0
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- EmCousin
|
8
|
+
autorequire:
|
9
|
+
bindir: exe
|
10
|
+
cert_chain: []
|
11
|
+
date: 2021-07-20 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: httparty
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - ">="
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '0'
|
20
|
+
type: :runtime
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - ">="
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '0'
|
27
|
+
description:
|
28
|
+
email:
|
29
|
+
- emmanuel@hey.com
|
30
|
+
executables: []
|
31
|
+
extensions: []
|
32
|
+
extra_rdoc_files: []
|
33
|
+
files:
|
34
|
+
- ".github/workflows/brakeman.yml"
|
35
|
+
- ".github/workflows/rspec.yml"
|
36
|
+
- ".github/workflows/rubocop.yml"
|
37
|
+
- ".rspec"
|
38
|
+
- ".rubocop.yml"
|
39
|
+
- CHANGELOG.md
|
40
|
+
- CODE_OF_CONDUCT.md
|
41
|
+
- Gemfile
|
42
|
+
- Gemfile.lock
|
43
|
+
- LICENSE.txt
|
44
|
+
- README.md
|
45
|
+
- Rakefile
|
46
|
+
- bin/console
|
47
|
+
- bin/setup
|
48
|
+
- lib/provet.rb
|
49
|
+
- lib/provet/appointment.rb
|
50
|
+
- lib/provet/availability.rb
|
51
|
+
- lib/provet/base.rb
|
52
|
+
- lib/provet/client.rb
|
53
|
+
- lib/provet/consultation.rb
|
54
|
+
- lib/provet/consultation_discharge_instruction.rb
|
55
|
+
- lib/provet/consultation_item.rb
|
56
|
+
- lib/provet/consultation_item_template.rb
|
57
|
+
- lib/provet/department.rb
|
58
|
+
- lib/provet/invoice.rb
|
59
|
+
- lib/provet/invoice_row.rb
|
60
|
+
- lib/provet/item.rb
|
61
|
+
- lib/provet/item_list.rb
|
62
|
+
- lib/provet/item_template.rb
|
63
|
+
- lib/provet/item_template_item.rb
|
64
|
+
- lib/provet/laboratory_analysis_group.rb
|
65
|
+
- lib/provet/patient.rb
|
66
|
+
- lib/provet/phone_number.rb
|
67
|
+
- lib/provet/reason.rb
|
68
|
+
- lib/provet/reason_group.rb
|
69
|
+
- lib/provet/reminder.rb
|
70
|
+
- lib/provet/reminder_template.rb
|
71
|
+
- lib/provet/shift.rb
|
72
|
+
- lib/provet/shift_type.rb
|
73
|
+
- lib/provet/user.rb
|
74
|
+
- lib/provet/user_details.rb
|
75
|
+
- lib/provet/user_group.rb
|
76
|
+
- lib/provet/vat_group.rb
|
77
|
+
- lib/provet/version.rb
|
78
|
+
- provet-client.gemspec
|
79
|
+
homepage: https://github.com/EmCousin/provet-client
|
80
|
+
licenses:
|
81
|
+
- MIT
|
82
|
+
metadata:
|
83
|
+
homepage_uri: https://github.com/EmCousin/provet-client
|
84
|
+
source_code_uri: https://github.com/EmCousin/provet-client
|
85
|
+
changelog_uri: https://github.com/EmCousin/provet-client/blob/main/CHANGELOG.md
|
86
|
+
post_install_message:
|
87
|
+
rdoc_options: []
|
88
|
+
require_paths:
|
89
|
+
- lib
|
90
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
91
|
+
requirements:
|
92
|
+
- - ">="
|
93
|
+
- !ruby/object:Gem::Version
|
94
|
+
version: 2.4.0
|
95
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
96
|
+
requirements:
|
97
|
+
- - ">="
|
98
|
+
- !ruby/object:Gem::Version
|
99
|
+
version: '0'
|
100
|
+
requirements: []
|
101
|
+
rubygems_version: 3.2.3
|
102
|
+
signing_key:
|
103
|
+
specification_version: 4
|
104
|
+
summary: A Provet Cloud client for ruby
|
105
|
+
test_files: []
|