vericred_client 0.0.4 → 0.0.5
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 +4 -4
- data/README.md +31 -18
- data/docs/Applicant.md +3 -3
- data/docs/Carrier.md +1 -1
- data/docs/County.md +3 -3
- data/docs/Drug.md +3 -3
- data/docs/DrugCoverage.md +4 -4
- data/docs/DrugCoverageResponse.md +3 -1
- data/docs/DrugPackage.md +1 -1
- data/docs/DrugSearchResponse.md +2 -1
- data/docs/DrugsApi.md +71 -10
- data/docs/Meta.md +1 -1
- data/docs/Network.md +9 -0
- data/docs/NetworkSearchResponse.md +9 -0
- data/docs/NetworksApi.md +58 -0
- data/docs/Plan.md +10 -10
- data/docs/PlanCounty.md +1 -1
- data/docs/PlanCountyBulk.md +1 -1
- data/docs/{PlanFindResponse.md → PlanSearchResponse.md} +2 -1
- data/docs/PlanSearchResult.md +14 -14
- data/docs/PlansApi.md +69 -6
- data/docs/Provider.md +7 -6
- data/docs/ProvidersApi.md +39 -30
- data/docs/{ProviderResponse.md → ProvidersSearchResponse.md} +1 -1
- data/docs/RequestPlanFind.md +3 -2
- data/docs/RequestPlanFindApplicant.md +8 -0
- data/docs/RequestPlanFindProvider.md +8 -0
- data/docs/RequestProvidersSearch.md +17 -0
- data/docs/State.md +4 -4
- data/docs/ZipCountiesApi.md +11 -4
- data/docs/ZipCountiesResponse.md +11 -0
- data/docs/ZipCountyBulk.md +1 -1
- data/docs/ZipCountyResponse.md +2 -1
- data/lib/vericred_client/api/drugs_api.rb +86 -14
- data/lib/vericred_client/api/networks_api.rb +198 -0
- data/lib/vericred_client/api/plans_api.rb +134 -14
- data/lib/vericred_client/api/providers_api.rb +65 -59
- data/lib/vericred_client/api/zip_counties_api.rb +8 -5
- data/lib/vericred_client/api_client.rb +1 -1
- data/lib/vericred_client/api_error.rb +1 -1
- data/lib/vericred_client/models/applicant.rb +13 -15
- data/lib/vericred_client/models/base.rb +1 -1
- data/lib/vericred_client/models/carrier.rb +15 -15
- data/lib/vericred_client/models/carrier_subsidiary.rb +1 -1
- data/lib/vericred_client/models/county.rb +12 -16
- data/lib/vericred_client/models/county_bulk.rb +1 -1
- data/lib/vericred_client/models/drug.rb +26 -26
- data/lib/vericred_client/models/drug_coverage.rb +32 -38
- data/lib/vericred_client/models/drug_coverage_response.rb +40 -16
- data/lib/vericred_client/models/drug_package.rb +15 -15
- data/lib/vericred_client/models/drug_search_response.rb +21 -9
- data/lib/vericred_client/models/meta.rb +8 -8
- data/lib/vericred_client/models/network.rb +308 -0
- data/lib/vericred_client/models/{plan_find_response.rb → network_search_response.rb} +11 -11
- data/lib/vericred_client/models/plan.rb +62 -72
- data/lib/vericred_client/models/plan_county.rb +15 -15
- data/lib/vericred_client/models/plan_county_bulk.rb +15 -15
- data/lib/vericred_client/models/plan_search_response.rb +322 -0
- data/lib/vericred_client/models/plan_search_result.rb +102 -112
- data/lib/vericred_client/models/pricing.rb +1 -1
- data/lib/vericred_client/models/provider.rb +24 -22
- data/lib/vericred_client/models/{provider_response.rb → providers_search_response.rb} +2 -2
- data/lib/vericred_client/models/rating_area.rb +1 -1
- data/lib/vericred_client/models/request_plan_find.rb +16 -4
- data/lib/vericred_client/models/request_plan_find_applicant.rb +298 -0
- data/lib/vericred_client/models/request_plan_find_provider.rb +298 -0
- data/lib/vericred_client/models/request_providers_search.rb +372 -0
- data/lib/vericred_client/models/state.rb +25 -29
- data/lib/vericred_client/models/zip_code.rb +1 -1
- data/lib/vericred_client/models/zip_counties_response.rb +336 -0
- data/lib/vericred_client/models/zip_county.rb +1 -1
- data/lib/vericred_client/models/zip_county_bulk.rb +12 -12
- data/lib/vericred_client/models/zip_county_response.rb +21 -11
- data/lib/vericred_client/version.rb +2 -2
- data/lib/vericred_client.rb +10 -3
- data/spec/api/drugs_api_spec.rb +26 -5
- data/spec/api/networks_api_spec.rb +166 -0
- data/spec/api/plans_api_spec.rb +66 -6
- data/spec/api/providers_api_spec.rb +27 -19
- data/spec/api/zip_counties_api_spec.rb +4 -3
- metadata +22 -6
@@ -6,7 +6,7 @@ accepts.
|
|
6
6
|
|
7
7
|
## Getting Started
|
8
8
|
|
9
|
-
Visit our [Developer Portal](https://vericred.3scale.net
|
9
|
+
Visit our [Developer Portal](https://vericred.3scale.net) to
|
10
10
|
create an account.
|
11
11
|
|
12
12
|
Once you have created an account, you can create one Application for
|
@@ -127,25 +127,25 @@ require 'date'
|
|
127
127
|
|
128
128
|
module VericredClient
|
129
129
|
class DrugPackage
|
130
|
+
# National Drug Code ID (Package)
|
131
|
+
attr_accessor :id
|
132
|
+
|
130
133
|
# Package description
|
131
134
|
attr_accessor :description
|
132
135
|
|
133
|
-
# National Drug Code ID (Package)
|
134
|
-
attr_accessor :ndc_package_code
|
135
|
-
|
136
136
|
# Attribute mapping from ruby-style variable name to JSON key.
|
137
137
|
def self.attribute_map
|
138
138
|
{
|
139
|
-
:'
|
140
|
-
:'
|
139
|
+
:'id' => :'id',
|
140
|
+
:'description' => :'description'
|
141
141
|
}
|
142
142
|
end
|
143
143
|
|
144
144
|
# Attribute type mapping.
|
145
145
|
def self.swagger_types
|
146
146
|
{
|
147
|
-
:'
|
148
|
-
:'
|
147
|
+
:'id' => :'String',
|
148
|
+
:'description' => :'String'
|
149
149
|
}
|
150
150
|
end
|
151
151
|
|
@@ -157,12 +157,12 @@ module VericredClient
|
|
157
157
|
# convert string to symbol for hash key
|
158
158
|
attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
|
159
159
|
|
160
|
-
if attributes.has_key?(:'
|
161
|
-
self.
|
160
|
+
if attributes.has_key?(:'id')
|
161
|
+
self.id = attributes[:'id']
|
162
162
|
end
|
163
163
|
|
164
|
-
if attributes.has_key?(:'
|
165
|
-
self.
|
164
|
+
if attributes.has_key?(:'description')
|
165
|
+
self.description = attributes[:'description']
|
166
166
|
end
|
167
167
|
|
168
168
|
end
|
@@ -184,8 +184,8 @@ module VericredClient
|
|
184
184
|
def ==(o)
|
185
185
|
return true if self.equal?(o)
|
186
186
|
self.class == o.class &&
|
187
|
-
|
188
|
-
|
187
|
+
id == o.id &&
|
188
|
+
description == o.description
|
189
189
|
end
|
190
190
|
|
191
191
|
# @see the `==` method
|
@@ -197,7 +197,7 @@ module VericredClient
|
|
197
197
|
# Calculates hash code according to all attributes.
|
198
198
|
# @return [Fixnum] Hash code
|
199
199
|
def hash
|
200
|
-
[
|
200
|
+
[id, description].hash
|
201
201
|
end
|
202
202
|
|
203
203
|
# Builds the object from hash
|
@@ -6,7 +6,7 @@ accepts.
|
|
6
6
|
|
7
7
|
## Getting Started
|
8
8
|
|
9
|
-
Visit our [Developer Portal](https://vericred.3scale.net
|
9
|
+
Visit our [Developer Portal](https://vericred.3scale.net) to
|
10
10
|
create an account.
|
11
11
|
|
12
12
|
Once you have created an account, you can create one Application for
|
@@ -127,25 +127,30 @@ require 'date'
|
|
127
127
|
|
128
128
|
module VericredClient
|
129
129
|
class DrugSearchResponse
|
130
|
+
# Metadata for query
|
131
|
+
attr_accessor :meta
|
132
|
+
|
130
133
|
# Drugs found in query
|
131
134
|
attr_accessor :drugs
|
132
135
|
|
133
|
-
#
|
134
|
-
attr_accessor :
|
136
|
+
# DrugPackages
|
137
|
+
attr_accessor :drug_packages
|
135
138
|
|
136
139
|
# Attribute mapping from ruby-style variable name to JSON key.
|
137
140
|
def self.attribute_map
|
138
141
|
{
|
142
|
+
:'meta' => :'meta',
|
139
143
|
:'drugs' => :'drugs',
|
140
|
-
:'
|
144
|
+
:'drug_packages' => :'drug_packages'
|
141
145
|
}
|
142
146
|
end
|
143
147
|
|
144
148
|
# Attribute type mapping.
|
145
149
|
def self.swagger_types
|
146
150
|
{
|
151
|
+
:'meta' => :'Meta',
|
147
152
|
:'drugs' => :'Array<Drug>',
|
148
|
-
:'
|
153
|
+
:'drug_packages' => :'Array<DrugPackage>'
|
149
154
|
}
|
150
155
|
end
|
151
156
|
|
@@ -157,14 +162,20 @@ module VericredClient
|
|
157
162
|
# convert string to symbol for hash key
|
158
163
|
attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
|
159
164
|
|
165
|
+
if attributes.has_key?(:'meta')
|
166
|
+
self.meta = attributes[:'meta']
|
167
|
+
end
|
168
|
+
|
160
169
|
if attributes.has_key?(:'drugs')
|
161
170
|
if (value = attributes[:'drugs']).is_a?(Array)
|
162
171
|
self.drugs = value
|
163
172
|
end
|
164
173
|
end
|
165
174
|
|
166
|
-
if attributes.has_key?(:'
|
167
|
-
|
175
|
+
if attributes.has_key?(:'drug_packages')
|
176
|
+
if (value = attributes[:'drug_packages']).is_a?(Array)
|
177
|
+
self.drug_packages = value
|
178
|
+
end
|
168
179
|
end
|
169
180
|
|
170
181
|
end
|
@@ -186,8 +197,9 @@ module VericredClient
|
|
186
197
|
def ==(o)
|
187
198
|
return true if self.equal?(o)
|
188
199
|
self.class == o.class &&
|
200
|
+
meta == o.meta &&
|
189
201
|
drugs == o.drugs &&
|
190
|
-
|
202
|
+
drug_packages == o.drug_packages
|
191
203
|
end
|
192
204
|
|
193
205
|
# @see the `==` method
|
@@ -199,7 +211,7 @@ module VericredClient
|
|
199
211
|
# Calculates hash code according to all attributes.
|
200
212
|
# @return [Fixnum] Hash code
|
201
213
|
def hash
|
202
|
-
[drugs,
|
214
|
+
[meta, drugs, drug_packages].hash
|
203
215
|
end
|
204
216
|
|
205
217
|
# Builds the object from hash
|
@@ -6,7 +6,7 @@ accepts.
|
|
6
6
|
|
7
7
|
## Getting Started
|
8
8
|
|
9
|
-
Visit our [Developer Portal](https://vericred.3scale.net
|
9
|
+
Visit our [Developer Portal](https://vericred.3scale.net) to
|
10
10
|
create an account.
|
11
11
|
|
12
12
|
Once you have created an account, you can create one Application for
|
@@ -128,19 +128,19 @@ require 'date'
|
|
128
128
|
module VericredClient
|
129
129
|
class Meta
|
130
130
|
# Number of entities returned
|
131
|
-
attr_accessor :
|
131
|
+
attr_accessor :total
|
132
132
|
|
133
133
|
# Attribute mapping from ruby-style variable name to JSON key.
|
134
134
|
def self.attribute_map
|
135
135
|
{
|
136
|
-
:'
|
136
|
+
:'total' => :'total'
|
137
137
|
}
|
138
138
|
end
|
139
139
|
|
140
140
|
# Attribute type mapping.
|
141
141
|
def self.swagger_types
|
142
142
|
{
|
143
|
-
:'
|
143
|
+
:'total' => :'Integer'
|
144
144
|
}
|
145
145
|
end
|
146
146
|
|
@@ -152,8 +152,8 @@ module VericredClient
|
|
152
152
|
# convert string to symbol for hash key
|
153
153
|
attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
|
154
154
|
|
155
|
-
if attributes.has_key?(:'
|
156
|
-
self.
|
155
|
+
if attributes.has_key?(:'total')
|
156
|
+
self.total = attributes[:'total']
|
157
157
|
end
|
158
158
|
|
159
159
|
end
|
@@ -175,7 +175,7 @@ module VericredClient
|
|
175
175
|
def ==(o)
|
176
176
|
return true if self.equal?(o)
|
177
177
|
self.class == o.class &&
|
178
|
-
|
178
|
+
total == o.total
|
179
179
|
end
|
180
180
|
|
181
181
|
# @see the `==` method
|
@@ -187,7 +187,7 @@ module VericredClient
|
|
187
187
|
# Calculates hash code according to all attributes.
|
188
188
|
# @return [Fixnum] Hash code
|
189
189
|
def hash
|
190
|
-
[
|
190
|
+
[total].hash
|
191
191
|
end
|
192
192
|
|
193
193
|
# Builds the object from hash
|
@@ -0,0 +1,308 @@
|
|
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 Network
|
130
|
+
# Primary key
|
131
|
+
attr_accessor :id
|
132
|
+
|
133
|
+
# Carrier name
|
134
|
+
attr_accessor :name
|
135
|
+
|
136
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
137
|
+
def self.attribute_map
|
138
|
+
{
|
139
|
+
:'id' => :'id',
|
140
|
+
:'name' => :'name'
|
141
|
+
}
|
142
|
+
end
|
143
|
+
|
144
|
+
# Attribute type mapping.
|
145
|
+
def self.swagger_types
|
146
|
+
{
|
147
|
+
:'id' => :'Integer',
|
148
|
+
:'name' => :'String'
|
149
|
+
}
|
150
|
+
end
|
151
|
+
|
152
|
+
# Initializes the object
|
153
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
154
|
+
def initialize(attributes = {})
|
155
|
+
return unless attributes.is_a?(Hash)
|
156
|
+
|
157
|
+
# convert string to symbol for hash key
|
158
|
+
attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
|
159
|
+
|
160
|
+
if attributes.has_key?(:'id')
|
161
|
+
self.id = attributes[:'id']
|
162
|
+
end
|
163
|
+
|
164
|
+
if attributes.has_key?(:'name')
|
165
|
+
self.name = attributes[:'name']
|
166
|
+
end
|
167
|
+
|
168
|
+
end
|
169
|
+
|
170
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
171
|
+
# @return Array for valid properies with the reasons
|
172
|
+
def list_invalid_properties
|
173
|
+
invalid_properties = Array.new
|
174
|
+
return invalid_properties
|
175
|
+
end
|
176
|
+
|
177
|
+
# Check to see if the all the properties in the model are valid
|
178
|
+
# @return true if the model is valid
|
179
|
+
def valid?
|
180
|
+
end
|
181
|
+
|
182
|
+
# Checks equality by comparing each attribute.
|
183
|
+
# @param [Object] Object to be compared
|
184
|
+
def ==(o)
|
185
|
+
return true if self.equal?(o)
|
186
|
+
self.class == o.class &&
|
187
|
+
id == o.id &&
|
188
|
+
name == o.name
|
189
|
+
end
|
190
|
+
|
191
|
+
# @see the `==` method
|
192
|
+
# @param [Object] Object to be compared
|
193
|
+
def eql?(o)
|
194
|
+
self == o
|
195
|
+
end
|
196
|
+
|
197
|
+
# Calculates hash code according to all attributes.
|
198
|
+
# @return [Fixnum] Hash code
|
199
|
+
def hash
|
200
|
+
[id, name].hash
|
201
|
+
end
|
202
|
+
|
203
|
+
# Builds the object from hash
|
204
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
205
|
+
# @return [Object] Returns the model itself
|
206
|
+
def build_from_hash(attributes)
|
207
|
+
return nil unless attributes.is_a?(Hash)
|
208
|
+
self.class.swagger_types.each_pair do |key, type|
|
209
|
+
if type =~ /^Array<(.*)>/i
|
210
|
+
# check to ensure the input is an array given that the the attribute
|
211
|
+
# is documented as an array but the input is not
|
212
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
213
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| _deserialize($1, v) } )
|
214
|
+
end
|
215
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
216
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
217
|
+
end # or else data not found in attributes(hash), not an issue as the data can be optional
|
218
|
+
end
|
219
|
+
|
220
|
+
self
|
221
|
+
end
|
222
|
+
|
223
|
+
# Deserializes the data based on type
|
224
|
+
# @param string type Data type
|
225
|
+
# @param string value Value to be deserialized
|
226
|
+
# @return [Object] Deserialized data
|
227
|
+
def _deserialize(type, value)
|
228
|
+
case type.to_sym
|
229
|
+
when :DateTime
|
230
|
+
DateTime.parse(value)
|
231
|
+
when :Date
|
232
|
+
Date.parse(value)
|
233
|
+
when :String
|
234
|
+
value.to_s
|
235
|
+
when :Integer
|
236
|
+
value.to_i
|
237
|
+
when :Float
|
238
|
+
value.to_f
|
239
|
+
when :BOOLEAN
|
240
|
+
if value.to_s =~ /^(true|t|yes|y|1)$/i
|
241
|
+
true
|
242
|
+
else
|
243
|
+
false
|
244
|
+
end
|
245
|
+
when :Object
|
246
|
+
# generic object (usually a Hash), return directly
|
247
|
+
value
|
248
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
249
|
+
inner_type = Regexp.last_match[:inner_type]
|
250
|
+
value.map { |v| _deserialize(inner_type, v) }
|
251
|
+
when /\AHash<(?<k_type>.+), (?<v_type>.+)>\z/
|
252
|
+
k_type = Regexp.last_match[:k_type]
|
253
|
+
v_type = Regexp.last_match[:v_type]
|
254
|
+
{}.tap do |hash|
|
255
|
+
value.each do |k, v|
|
256
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
257
|
+
end
|
258
|
+
end
|
259
|
+
else # model
|
260
|
+
temp_model = VericredClient.const_get(type).new
|
261
|
+
temp_model.build_from_hash(value)
|
262
|
+
end
|
263
|
+
end
|
264
|
+
|
265
|
+
# Returns the string representation of the object
|
266
|
+
# @return [String] String presentation of the object
|
267
|
+
def to_s
|
268
|
+
to_hash.to_s
|
269
|
+
end
|
270
|
+
|
271
|
+
# to_body is an alias to to_hash (backward compatibility)
|
272
|
+
# @return [Hash] Returns the object in the form of hash
|
273
|
+
def to_body
|
274
|
+
to_hash
|
275
|
+
end
|
276
|
+
|
277
|
+
# Returns the object in the form of hash
|
278
|
+
# @return [Hash] Returns the object in the form of hash
|
279
|
+
def to_hash
|
280
|
+
hash = {}
|
281
|
+
self.class.attribute_map.each_pair do |attr, param|
|
282
|
+
value = self.send(attr)
|
283
|
+
next if value.nil?
|
284
|
+
hash[param] = _to_hash(value)
|
285
|
+
end
|
286
|
+
hash
|
287
|
+
end
|
288
|
+
|
289
|
+
# Outputs non-array value in the form of hash
|
290
|
+
# For object, use to_hash. Otherwise, just return the value
|
291
|
+
# @param [Object] value Any valid value
|
292
|
+
# @return [Hash] Returns the value in the form of hash
|
293
|
+
def _to_hash(value)
|
294
|
+
if value.is_a?(Array)
|
295
|
+
value.compact.map{ |v| _to_hash(v) }
|
296
|
+
elsif value.is_a?(Hash)
|
297
|
+
{}.tap do |hash|
|
298
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
299
|
+
end
|
300
|
+
elsif value.respond_to? :to_hash
|
301
|
+
value.to_hash
|
302
|
+
else
|
303
|
+
value
|
304
|
+
end
|
305
|
+
end
|
306
|
+
|
307
|
+
end
|
308
|
+
end
|
@@ -6,7 +6,7 @@ accepts.
|
|
6
6
|
|
7
7
|
## Getting Started
|
8
8
|
|
9
|
-
Visit our [Developer Portal](https://vericred.3scale.net
|
9
|
+
Visit our [Developer Portal](https://vericred.3scale.net) to
|
10
10
|
create an account.
|
11
11
|
|
12
12
|
Once you have created an account, you can create one Application for
|
@@ -126,18 +126,18 @@ Generated by: https://github.com/swagger-api/swagger-codegen.git
|
|
126
126
|
require 'date'
|
127
127
|
|
128
128
|
module VericredClient
|
129
|
-
class
|
129
|
+
class NetworkSearchResponse
|
130
130
|
# Metadata for query
|
131
131
|
attr_accessor :meta
|
132
132
|
|
133
|
-
#
|
134
|
-
attr_accessor :
|
133
|
+
# Networks that fit the requested criterion.
|
134
|
+
attr_accessor :networks
|
135
135
|
|
136
136
|
# Attribute mapping from ruby-style variable name to JSON key.
|
137
137
|
def self.attribute_map
|
138
138
|
{
|
139
139
|
:'meta' => :'meta',
|
140
|
-
:'
|
140
|
+
:'networks' => :'networks'
|
141
141
|
}
|
142
142
|
end
|
143
143
|
|
@@ -145,7 +145,7 @@ module VericredClient
|
|
145
145
|
def self.swagger_types
|
146
146
|
{
|
147
147
|
:'meta' => :'Meta',
|
148
|
-
:'
|
148
|
+
:'networks' => :'Array<Network>'
|
149
149
|
}
|
150
150
|
end
|
151
151
|
|
@@ -161,9 +161,9 @@ module VericredClient
|
|
161
161
|
self.meta = attributes[:'meta']
|
162
162
|
end
|
163
163
|
|
164
|
-
if attributes.has_key?(:'
|
165
|
-
if (value = attributes[:'
|
166
|
-
self.
|
164
|
+
if attributes.has_key?(:'networks')
|
165
|
+
if (value = attributes[:'networks']).is_a?(Array)
|
166
|
+
self.networks = value
|
167
167
|
end
|
168
168
|
end
|
169
169
|
|
@@ -187,7 +187,7 @@ module VericredClient
|
|
187
187
|
return true if self.equal?(o)
|
188
188
|
self.class == o.class &&
|
189
189
|
meta == o.meta &&
|
190
|
-
|
190
|
+
networks == o.networks
|
191
191
|
end
|
192
192
|
|
193
193
|
# @see the `==` method
|
@@ -199,7 +199,7 @@ module VericredClient
|
|
199
199
|
# Calculates hash code according to all attributes.
|
200
200
|
# @return [Fixnum] Hash code
|
201
201
|
def hash
|
202
|
-
[meta,
|
202
|
+
[meta, networks].hash
|
203
203
|
end
|
204
204
|
|
205
205
|
# Builds the object from hash
|