cover_my_meds 2.0.4 → 2.0.6

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 5c455a4493c64718a6b8f88e661a4d8c43cf0411
4
- data.tar.gz: 908659ebcb5d0afcfe4d2764329a531e0b07c9c8
3
+ metadata.gz: 58dcd7111532bf1d06ed6c079689d17703089dc0
4
+ data.tar.gz: 7d2132c84a591e9e597248ea2bb332c79237fabe
5
5
  SHA512:
6
- metadata.gz: 05f6a0be96e1e58bc3417c186cd35d21638c7ed946cdfab7fb76eab89a7a3fd8a6d91ee24de7748f0a5bba8400e11f5c8d29d189e1f6f564c0958ed21e496f5e
7
- data.tar.gz: 3ae494b13510f9fdaecf48eb19b3d3a8e52c87d829c24bf7159e068db975a8dc41e8eac7373f3db9786dd8b635e99acddd2459f4e967dc2591e4daec4ea6935a
6
+ metadata.gz: 7ec8bebb7da92835dcaaf642572dbd903e541b604ca095dd0d25ae67503119773acb146786070a65b26bf0a566e4d6e7100b1691bc0848bcbddb05b78b49a6dc
7
+ data.tar.gz: 4a1c86fec03a8b280a9220a0ed2768ffd0c5d3d41c267d35f0774805b9984b66bca9a2518903d1c1cb59853a3b516aa7f0a779b59a01a4ea34683e35a1e77f31
data/README.md CHANGED
@@ -83,7 +83,7 @@ end
83
83
  drugs = client.drug_search 'Boniva'
84
84
 
85
85
  drugs # => array of drugs
86
- drug = drug.first
86
+ drug = drugs.first
87
87
  drug.name # => 'Boniva'
88
88
  ```
89
89
 
@@ -137,3 +137,22 @@ request_page = client.get_request_page('NT5HL9','nhe44fu4g22upqqgstea', { remote
137
137
  request_page.keys # => values corresponding to a request page
138
138
  ```
139
139
  e.g ["data", "forms", "actions", "provided_coded_references", "validations"]
140
+
141
+ ## Create API Consumer
142
+ ```ruby
143
+ consumer = client.create_consumer(email: 'consumer@example.com')
144
+ consumer # => {"id"=>89517,
145
+ "key"=>"api-key",
146
+ "secret"=>"api-secret",
147
+ "email"=>"consumer@example.com",
148
+ "description"=>nil,
149
+ "callback_url"=>nil,
150
+ "callback_verb"=>"POST",
151
+ "theming"=>nil,
152
+ "created_at"=>"2015-12-22T14:33:25Z",
153
+ "updated_at"=>"2015-12-22T14:33:25Z",
154
+ "deleted_at"=>nil,
155
+ "service_user_id"=>826414,
156
+ "api_type"=>"NONE"}
157
+ ```
158
+ Can optionally send in `description`, `callback_url`, `callback_verb`, `theming`.
@@ -6,8 +6,8 @@ require 'cover_my_meds/version'
6
6
  Gem::Specification.new do |spec|
7
7
  spec.name = "cover_my_meds"
8
8
  spec.version = CoverMyMeds::VERSION
9
- spec.authors = ["Justin Rolston", "Mark Lorenz", "Dan Sajner", "Chad Cunningham", "Mike Gee", "Brandon Joyce", "Ryan Kowalick", "Shaun Hardin", "Jay Bobo", "Zach Serafini", "Rachel Twyford", "Ryan Stocker", "Corey Woodcox", "Nathan Demick"]
10
- spec.email = ["jrolston@covermymeds.com", "mlorenz@covermymeds.com", "dsajner@covermymeds.com", "ccunningham@covermymeds.com", "mgee@covermymeds.com", "bjoyce@covermymeds.com", "rkowalick@covermymeds.com", "shardin@covermymeds.com", "jbobo@covermymeds.com", "zserafini@covermymeds.com", "rtwyford@covermymeds.com", "rstocker@covermymeds.com", "cwoodcox@covermymeds.com", "ndemick@covermymeds.com"]
9
+ spec.authors = ["Justin Rolston", "Mark Lorenz", "Dan Sajner", "Chad Cunningham", "Mike Gee", "Brandon Joyce", "Ryan Kowalick", "Shaun Hardin", "Jay Bobo", "Zach Serafini", "Rachel Twyford", "Ryan Stocker", "Corey Woodcox", "Nathan Demick", "Ryan Bone", "Ben Beckwith"]
10
+ spec.email = ["jrolston@covermymeds.com", "mlorenz@covermymeds.com", "dsajner@covermymeds.com", "ccunningham@covermymeds.com", "mgee@covermymeds.com", "bjoyce@covermymeds.com", "rkowalick@covermymeds.com", "shardin@covermymeds.com", "jbobo@covermymeds.com", "zserafini@covermymeds.com", "rtwyford@covermymeds.com", "rstocker@covermymeds.com", "cwoodcox@covermymeds.com", "ndemick@covermymeds.com", "rbone@covermymeds.com", "bbeckwith@covermymeds.com"]
11
11
 
12
12
  spec.summary = %q{CoverMyMeds Public API}
13
13
  spec.description = %q{The public version of CoverMyMeds API}
@@ -24,7 +24,6 @@ Gem::Specification.new do |spec|
24
24
  spec.add_development_dependency "webmock", "~> 1.11"
25
25
  spec.add_development_dependency "rake"
26
26
  spec.add_development_dependency "pry"
27
- spec.add_development_dependency "vcr"
28
27
  spec.add_development_dependency "dotenv"
29
28
  spec.add_development_dependency "simplecov"
30
29
  spec.add_development_dependency "railties"
@@ -1,4 +1,5 @@
1
1
  require_relative 'api_request'
2
+ require_relative 'client/consumers'
2
3
  require_relative 'client/drugs'
3
4
  require_relative 'client/forms'
4
5
  require_relative 'client/requests'
@@ -10,6 +11,7 @@ require_relative 'client/indicators'
10
11
  module CoverMyMeds
11
12
  class Client
12
13
  include CoverMyMeds::ApiRequest
14
+ include CoverMyMeds::Consumers
13
15
  include CoverMyMeds::Drugs
14
16
  include CoverMyMeds::Forms
15
17
  include CoverMyMeds::Requests
@@ -0,0 +1,14 @@
1
+ module CoverMyMeds
2
+ module Consumers
3
+ include HostAndPath
4
+
5
+ CURRENT_VERSION = 1
6
+
7
+ def create_consumer consumer_params, version = CURRENT_VERSION
8
+ data = consumers_request POST, params: { v: version } do
9
+ { 'consumer' => consumer_params }
10
+ end
11
+ Hashie::Mash.new(data['root_consumer'])
12
+ end
13
+ end
14
+ end
@@ -36,6 +36,7 @@ module CoverMyMeds
36
36
  "urgent": "false",
37
37
  "form_id": "",
38
38
  "state": "",
39
+ "memo": "",
39
40
  "patient": {
40
41
  "first_name": "",
41
42
  "middle_name": "",
@@ -1,3 +1,3 @@
1
1
  module CoverMyMeds
2
- VERSION = "2.0.4"
2
+ VERSION = "2.0.6"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cover_my_meds
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.4
4
+ version: 2.0.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Justin Rolston
@@ -18,10 +18,12 @@ authors:
18
18
  - Ryan Stocker
19
19
  - Corey Woodcox
20
20
  - Nathan Demick
21
+ - Ryan Bone
22
+ - Ben Beckwith
21
23
  autorequire:
22
24
  bindir: exe
23
25
  cert_chain: []
24
- date: 2015-07-21 00:00:00.000000000 Z
26
+ date: 2015-12-22 00:00:00.000000000 Z
25
27
  dependencies:
26
28
  - !ruby/object:Gem::Dependency
27
29
  name: bundler
@@ -107,20 +109,6 @@ dependencies:
107
109
  - - '>='
108
110
  - !ruby/object:Gem::Version
109
111
  version: '0'
110
- - !ruby/object:Gem::Dependency
111
- name: vcr
112
- requirement: !ruby/object:Gem::Requirement
113
- requirements:
114
- - - '>='
115
- - !ruby/object:Gem::Version
116
- version: '0'
117
- type: :development
118
- prerelease: false
119
- version_requirements: !ruby/object:Gem::Requirement
120
- requirements:
121
- - - '>='
122
- - !ruby/object:Gem::Version
123
- version: '0'
124
112
  - !ruby/object:Gem::Dependency
125
113
  name: dotenv
126
114
  requirement: !ruby/object:Gem::Requirement
@@ -235,6 +223,8 @@ email:
235
223
  - rstocker@covermymeds.com
236
224
  - cwoodcox@covermymeds.com
237
225
  - ndemick@covermymeds.com
226
+ - rbone@covermymeds.com
227
+ - bbeckwith@covermymeds.com
238
228
  executables: []
239
229
  extensions: []
240
230
  extra_rdoc_files: []
@@ -249,6 +239,7 @@ files:
249
239
  - lib/cover_my_meds.rb
250
240
  - lib/cover_my_meds/api_request.rb
251
241
  - lib/cover_my_meds/client.rb
242
+ - lib/cover_my_meds/client/consumers.rb
252
243
  - lib/cover_my_meds/client/credentials.rb
253
244
  - lib/cover_my_meds/client/drugs.rb
254
245
  - lib/cover_my_meds/client/forms.rb
@@ -280,7 +271,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
280
271
  version: '0'
281
272
  requirements: []
282
273
  rubyforge_project:
283
- rubygems_version: 2.4.6
274
+ rubygems_version: 2.4.8
284
275
  signing_key:
285
276
  specification_version: 4
286
277
  summary: CoverMyMeds Public API