vericred_client 0.0.5 → 0.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: 9dfa77f224ef3e3817ea7102b5defed6eb4ff72e
4
- data.tar.gz: a3dfd8d3d191fd6f72f9f044489b46c99a9a81f5
3
+ metadata.gz: 8f7fabcaedc9fc83577ed750a81f709a96e0ce14
4
+ data.tar.gz: 3da9aac61d965345941b57d380973b2074b8d1d4
5
5
  SHA512:
6
- metadata.gz: e4bf3e8ccddf768b8d45216bc639b25bab4bff70942f53ea9d89ff132feb8f388e593bcc3b550515f0c214167c0ced0cb6cc9864f72d45b6de81586721febd7f
7
- data.tar.gz: b31143c1abf1cb1d29b70409bab2330eb743504a941c037470fec0efcd4699efa7f48edb1659b1cf0faae33b0117e55fd1617f86a3f807521b106bb8734a6546
6
+ metadata.gz: b37b2440222ec6376dec28c1841e9f393f5412143819afdfd4794acf4c6d431798034297a016067b6421a20fbaecc50342bdfcc75ac9e61fe3e52c710c49ab48
7
+ data.tar.gz: 75609434208a29f4897dc2a6338d5847f0196cb9fb3d1ab51daac0a86f86be3820fe05ccae4cbc2b74a7b1a08e0cfd2add97dcbc4958705a8da566a8f494edc7
data/README.md CHANGED
@@ -120,8 +120,8 @@ The response would be
120
120
  This SDK is automatically generated by the [Swagger Codegen](https://github.com/swagger-api/swagger-codegen) project:
121
121
 
122
122
  - API version: 1.0.0
123
- - Package version: 0.0.5
124
- - Build date: 2016-05-31T09:28:47.149-04:00
123
+ - Package version: 0.0.6
124
+ - Build date: 2016-06-01T14:01:54.755-04:00
125
125
  - Build package: class io.swagger.codegen.languages.RubyClientCodegen
126
126
 
127
127
  ## Installation
@@ -137,15 +137,15 @@ gem build vericred_client.gemspec
137
137
  Then either install the gem locally:
138
138
 
139
139
  ```shell
140
- gem install ./vericred_client-0.0.5.gem
140
+ gem install ./vericred_client-0.0.6.gem
141
141
  ```
142
- (for development, run `gem install --dev ./vericred_client-0.0.5.gem` to install the development dependencies)
142
+ (for development, run `gem install --dev ./vericred_client-0.0.6.gem` to install the development dependencies)
143
143
 
144
144
  or publish the gem to a gem hosting service, e.g. [RubyGems](https://rubygems.org/).
145
145
 
146
146
  Finally add this to the Gemfile:
147
147
 
148
- gem 'vericred_client', '~> 0.0.5'
148
+ gem 'vericred_client', '~> 0.0.6'
149
149
 
150
150
  ### Install from Git
151
151
 
@@ -228,6 +228,7 @@ Class | Method | HTTP request | Description
228
228
  - [VericredClient::PlanSearchResult](docs/PlanSearchResult.md)
229
229
  - [VericredClient::Pricing](docs/Pricing.md)
230
230
  - [VericredClient::Provider](docs/Provider.md)
231
+ - [VericredClient::ProviderShowResponse](docs/ProviderShowResponse.md)
231
232
  - [VericredClient::ProvidersSearchResponse](docs/ProvidersSearchResponse.md)
232
233
  - [VericredClient::RatingArea](docs/RatingArea.md)
233
234
  - [VericredClient::RequestPlanFind](docs/RequestPlanFind.md)
@@ -0,0 +1,8 @@
1
+ # VericredClient::ProviderShowResponse
2
+
3
+ ## Properties
4
+ Name | Type | Description | Notes
5
+ ------------ | ------------- | ------------- | -------------
6
+ **provider** | [**Provider**](Provider.md) | The requested provider. | [optional]
7
+
8
+
data/docs/ProvidersApi.md CHANGED
@@ -9,7 +9,7 @@ Method | HTTP request | Description
9
9
 
10
10
 
11
11
  # **get_provider**
12
- > Provider get_provider(npi, opts)
12
+ > ProviderShowResponse get_provider(npi, opts)
13
13
 
14
14
  Find a Provider
15
15
 
@@ -46,7 +46,7 @@ Name | Type | Description | Notes
46
46
 
47
47
  ### Return type
48
48
 
49
- [**Provider**](Provider.md)
49
+ [**ProviderShowResponse**](ProviderShowResponse.md)
50
50
 
51
51
  ### Authorization
52
52
 
@@ -138,7 +138,7 @@ module VericredClient
138
138
  # @param npi NPI number
139
139
  # @param [Hash] opts the optional parameters
140
140
  # @option opts [String] :vericred_api_key API Key
141
- # @return [Provider]
141
+ # @return [ProviderShowResponse]
142
142
  def get_provider(npi, opts = {})
143
143
  data, _status_code, _headers = get_provider_with_http_info(npi, opts)
144
144
  return data
@@ -149,7 +149,7 @@ module VericredClient
149
149
  # @param npi NPI number
150
150
  # @param [Hash] opts the optional parameters
151
151
  # @option opts [String] :vericred_api_key API Key
152
- # @return [Array<(Provider, Fixnum, Hash)>] Provider data, response status code and response headers
152
+ # @return [Array<(ProviderShowResponse, Fixnum, Hash)>] ProviderShowResponse data, response status code and response headers
153
153
  def get_provider_with_http_info(npi, opts = {})
154
154
  if @api_client.config.debugging
155
155
  @api_client.config.logger.debug "Calling API: ProvidersApi.get_provider ..."
@@ -186,7 +186,7 @@ module VericredClient
186
186
  :form_params => form_params,
187
187
  :body => post_body,
188
188
  :auth_names => auth_names,
189
- :return_type => 'Provider')
189
+ :return_type => 'ProviderShowResponse')
190
190
  if @api_client.config.debugging
191
191
  @api_client.config.logger.debug "API called: ProvidersApi#get_provider\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
192
192
  end
@@ -0,0 +1,298 @@
1
+ =begin
2
+ Vericred API
3
+
4
+ Vericred's API allows you to search for Health Plans that a specific doctor
5
+ accepts.
6
+
7
+ ## Getting Started
8
+
9
+ Visit our [Developer Portal](https://vericred.3scale.net) to
10
+ create an account.
11
+
12
+ Once you have created an account, you can create one Application for
13
+ Production and another for our Sandbox (select the appropriate Plan when
14
+ you create the Application).
15
+
16
+ ## Authentication
17
+
18
+ To authenticate, pass the API Key you created in the Developer Portal as
19
+ a `Vericred-Api-Key` header.
20
+
21
+ `curl -H 'Vericred-Api-Key: YOUR_KEY' "https://api.vericred.com/providers?search_term=Foo&zip_code=11215"`
22
+
23
+ ## Versioning
24
+
25
+ Vericred's API default to the latest version. However, if you need a specific
26
+ version, you can request it with an `Accept-Version` header.
27
+
28
+ The current version is `v3`. Previous versions are `v1` and `v2`.
29
+
30
+ `curl -H 'Vericred-Api-Key: YOUR_KEY' -H 'Accept-Version: v2' "https://api.vericred.com/providers?search_term=Foo&zip_code=11215"`
31
+
32
+ ## Pagination
33
+
34
+ Most endpoints are not paginated. It will be noted in the documentation if/when
35
+ an endpoint is paginated.
36
+
37
+ When pagination is present, a `meta` stanza will be present in the response
38
+ with the total number of records
39
+
40
+ ```
41
+ {
42
+ things: [{ id: 1 }, { id: 2 }],
43
+ meta: { total: 500 }
44
+ }
45
+ ```
46
+
47
+ ## Sideloading
48
+
49
+ When we return multiple levels of an object graph (e.g. `Provider`s and their `State`s
50
+ we sideload the associated data. In this example, we would provide an Array of
51
+ `State`s and a `state_id` for each provider. This is done primarily to reduce the
52
+ payload size since many of the `Provider`s will share a `State`
53
+
54
+ ```
55
+ {
56
+ providers: [{ id: 1, state_id: 1}, { id: 2, state_id: 1 }],
57
+ states: [{ id: 1, code: 'NY' }]
58
+ }
59
+ ```
60
+
61
+ If you need the second level of the object graph, you can just match the
62
+ corresponding id.
63
+
64
+ ## Selecting specific data
65
+
66
+ All endpoints allow you to specify which fields you would like to return.
67
+ This allows you to limit the response to contain only the data you need.
68
+
69
+ For example, let's take a request that returns the following JSON by default
70
+
71
+ ```
72
+ {
73
+ provider: {
74
+ id: 1,
75
+ name: 'John',
76
+ phone: '1234567890',
77
+ field_we_dont_care_about: 'value_we_dont_care_about'
78
+ },
79
+ states: [{
80
+ id: 1,
81
+ name: 'New York',
82
+ code: 'NY',
83
+ field_we_dont_care_about: 'value_we_dont_care_about'
84
+ }]
85
+ }
86
+ ```
87
+
88
+ To limit our results to only return the fields we care about, we specify the
89
+ `select` query string parameter for the corresponding fields in the JSON
90
+ document.
91
+
92
+ In this case, we want to select `name` and `phone` from the `provider` key,
93
+ so we would add the parameters `select=provider.name,provider.phone`.
94
+ We also want the `name` and `code` from the `states` key, so we would
95
+ add the parameters `select=states.name,staes.code`. The id field of
96
+ each document is always returned whether or not it is requested.
97
+
98
+ Our final request would be `GET /providers/12345?select=provider.name,provider.phone,states.name,states.code`
99
+
100
+ The response would be
101
+
102
+ ```
103
+ {
104
+ provider: {
105
+ id: 1,
106
+ name: 'John',
107
+ phone: '1234567890'
108
+ },
109
+ states: [{
110
+ id: 1,
111
+ name: 'New York',
112
+ code: 'NY'
113
+ }]
114
+ }
115
+ ```
116
+
117
+
118
+
119
+ OpenAPI spec version: 1.0.0
120
+
121
+ Generated by: https://github.com/swagger-api/swagger-codegen.git
122
+
123
+
124
+ =end
125
+
126
+ require 'date'
127
+
128
+ module VericredClient
129
+ class ProviderShowResponse
130
+ # The requested provider.
131
+ attr_accessor :provider
132
+
133
+ # Attribute mapping from ruby-style variable name to JSON key.
134
+ def self.attribute_map
135
+ {
136
+ :'provider' => :'provider'
137
+ }
138
+ end
139
+
140
+ # Attribute type mapping.
141
+ def self.swagger_types
142
+ {
143
+ :'provider' => :'Provider'
144
+ }
145
+ end
146
+
147
+ # Initializes the object
148
+ # @param [Hash] attributes Model attributes in the form of hash
149
+ def initialize(attributes = {})
150
+ return unless attributes.is_a?(Hash)
151
+
152
+ # convert string to symbol for hash key
153
+ attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
154
+
155
+ if attributes.has_key?(:'provider')
156
+ self.provider = attributes[:'provider']
157
+ end
158
+
159
+ end
160
+
161
+ # Show invalid properties with the reasons. Usually used together with valid?
162
+ # @return Array for valid properies with the reasons
163
+ def list_invalid_properties
164
+ invalid_properties = Array.new
165
+ return invalid_properties
166
+ end
167
+
168
+ # Check to see if the all the properties in the model are valid
169
+ # @return true if the model is valid
170
+ def valid?
171
+ end
172
+
173
+ # Checks equality by comparing each attribute.
174
+ # @param [Object] Object to be compared
175
+ def ==(o)
176
+ return true if self.equal?(o)
177
+ self.class == o.class &&
178
+ provider == o.provider
179
+ end
180
+
181
+ # @see the `==` method
182
+ # @param [Object] Object to be compared
183
+ def eql?(o)
184
+ self == o
185
+ end
186
+
187
+ # Calculates hash code according to all attributes.
188
+ # @return [Fixnum] Hash code
189
+ def hash
190
+ [provider].hash
191
+ end
192
+
193
+ # Builds the object from hash
194
+ # @param [Hash] attributes Model attributes in the form of hash
195
+ # @return [Object] Returns the model itself
196
+ def build_from_hash(attributes)
197
+ return nil unless attributes.is_a?(Hash)
198
+ self.class.swagger_types.each_pair do |key, type|
199
+ if type =~ /^Array<(.*)>/i
200
+ # check to ensure the input is an array given that the the attribute
201
+ # is documented as an array but the input is not
202
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
203
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| _deserialize($1, v) } )
204
+ end
205
+ elsif !attributes[self.class.attribute_map[key]].nil?
206
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
207
+ end # or else data not found in attributes(hash), not an issue as the data can be optional
208
+ end
209
+
210
+ self
211
+ end
212
+
213
+ # Deserializes the data based on type
214
+ # @param string type Data type
215
+ # @param string value Value to be deserialized
216
+ # @return [Object] Deserialized data
217
+ def _deserialize(type, value)
218
+ case type.to_sym
219
+ when :DateTime
220
+ DateTime.parse(value)
221
+ when :Date
222
+ Date.parse(value)
223
+ when :String
224
+ value.to_s
225
+ when :Integer
226
+ value.to_i
227
+ when :Float
228
+ value.to_f
229
+ when :BOOLEAN
230
+ if value.to_s =~ /^(true|t|yes|y|1)$/i
231
+ true
232
+ else
233
+ false
234
+ end
235
+ when :Object
236
+ # generic object (usually a Hash), return directly
237
+ value
238
+ when /\AArray<(?<inner_type>.+)>\z/
239
+ inner_type = Regexp.last_match[:inner_type]
240
+ value.map { |v| _deserialize(inner_type, v) }
241
+ when /\AHash<(?<k_type>.+), (?<v_type>.+)>\z/
242
+ k_type = Regexp.last_match[:k_type]
243
+ v_type = Regexp.last_match[:v_type]
244
+ {}.tap do |hash|
245
+ value.each do |k, v|
246
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
247
+ end
248
+ end
249
+ else # model
250
+ temp_model = VericredClient.const_get(type).new
251
+ temp_model.build_from_hash(value)
252
+ end
253
+ end
254
+
255
+ # Returns the string representation of the object
256
+ # @return [String] String presentation of the object
257
+ def to_s
258
+ to_hash.to_s
259
+ end
260
+
261
+ # to_body is an alias to to_hash (backward compatibility)
262
+ # @return [Hash] Returns the object in the form of hash
263
+ def to_body
264
+ to_hash
265
+ end
266
+
267
+ # Returns the object in the form of hash
268
+ # @return [Hash] Returns the object in the form of hash
269
+ def to_hash
270
+ hash = {}
271
+ self.class.attribute_map.each_pair do |attr, param|
272
+ value = self.send(attr)
273
+ next if value.nil?
274
+ hash[param] = _to_hash(value)
275
+ end
276
+ hash
277
+ end
278
+
279
+ # Outputs non-array value in the form of hash
280
+ # For object, use to_hash. Otherwise, just return the value
281
+ # @param [Object] value Any valid value
282
+ # @return [Hash] Returns the value in the form of hash
283
+ def _to_hash(value)
284
+ if value.is_a?(Array)
285
+ value.compact.map{ |v| _to_hash(v) }
286
+ elsif value.is_a?(Hash)
287
+ {}.tap do |hash|
288
+ value.each { |k, v| hash[k] = _to_hash(v) }
289
+ end
290
+ elsif value.respond_to? :to_hash
291
+ value.to_hash
292
+ else
293
+ value
294
+ end
295
+ end
296
+
297
+ end
298
+ end
@@ -124,5 +124,5 @@ Generated by: https://github.com/swagger-api/swagger-codegen.git
124
124
  =end
125
125
 
126
126
  module VericredClient
127
- VERSION = "0.0.5"
127
+ VERSION = "0.0.6"
128
128
  end
@@ -151,6 +151,7 @@ require 'vericred_client/models/plan_search_response'
151
151
  require 'vericred_client/models/plan_search_result'
152
152
  require 'vericred_client/models/pricing'
153
153
  require 'vericred_client/models/provider'
154
+ require 'vericred_client/models/provider_show_response'
154
155
  require 'vericred_client/models/providers_search_response'
155
156
  require 'vericred_client/models/rating_area'
156
157
  require 'vericred_client/models/request_plan_find'
@@ -151,7 +151,7 @@ describe 'ProvidersApi' do
151
151
  # @param npi NPI number
152
152
  # @param [Hash] opts the optional parameters
153
153
  # @option opts [String] :vericred_api_key API Key
154
- # @return [Provider]
154
+ # @return [ProviderShowResponse]
155
155
  describe 'get_provider test' do
156
156
  it "should work" do
157
157
  # assertion here
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: vericred_client
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.5
4
+ version: 0.0.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Vericred Inc.
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-05-31 00:00:00.000000000 Z
11
+ date: 2016-06-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: typhoeus
@@ -222,6 +222,7 @@ files:
222
222
  - docs/PlansApi.md
223
223
  - docs/Pricing.md
224
224
  - docs/Provider.md
225
+ - docs/ProviderShowResponse.md
225
226
  - docs/ProvidersApi.md
226
227
  - docs/ProvidersSearchResponse.md
227
228
  - docs/RatingArea.md
@@ -266,6 +267,7 @@ files:
266
267
  - lib/vericred_client/models/plan_search_result.rb
267
268
  - lib/vericred_client/models/pricing.rb
268
269
  - lib/vericred_client/models/provider.rb
270
+ - lib/vericred_client/models/provider_show_response.rb
269
271
  - lib/vericred_client/models/providers_search_response.rb
270
272
  - lib/vericred_client/models/rating_area.rb
271
273
  - lib/vericred_client/models/request_plan_find.rb