pharmaobservatory 0.1.21 → 0.1.23

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.
Files changed (65) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +40 -4
  3. data/docs/BiomarkersApi.md +80 -0
  4. data/docs/InvestigatorsApi.md +80 -0
  5. data/docs/ProviderBiomarkerCapabilityRow.md +9 -9
  6. data/docs/ProviderBiomarkerCapabilitySummaryResponse.md +58 -0
  7. data/docs/ProviderBiomarkerCapabilitySummaryRow.md +70 -0
  8. data/docs/ProviderCliaLicensureRow.md +1 -1
  9. data/docs/ProviderRwdDeliveryResponse.md +58 -0
  10. data/docs/ProviderRwdDeliveryRow.md +76 -0
  11. data/docs/ProviderRwdDeliveryStudyResponse.md +58 -0
  12. data/docs/ProviderRwdDeliveryStudyRow.md +60 -0
  13. data/docs/ProviderRwdFootprintResponse.md +58 -0
  14. data/docs/ProviderRwdFootprintRow.md +74 -0
  15. data/docs/RwdConductorsApi.md +160 -0
  16. data/docs/RwdInstitutionsApi.md +80 -0
  17. data/docs/RwdSourcesRow.md +1 -1
  18. data/docs/RwdStudiesApi.md +80 -0
  19. data/docs/RwdUsNetworkMembershipsResponse.md +58 -0
  20. data/docs/RwdUsNetworkMembershipsRow.md +98 -0
  21. data/docs/RwdUsNetworkProjectsResponse.md +58 -0
  22. data/docs/RwdUsNetworkProjectsRow.md +80 -0
  23. data/docs/RwdUsNetworksApi.md +313 -0
  24. data/docs/RwdUsNetworksRecord.md +38 -0
  25. data/docs/RwdUsNetworksResponse.md +58 -0
  26. data/docs/RwdUsNetworksRow.md +60 -0
  27. data/docs/SupplierRwdDeclarationsResponse.md +58 -0
  28. data/docs/SupplierRwdDeclarationsRow.md +74 -0
  29. data/docs/SuppliersApi.md +480 -0
  30. data/docs/TrialPublicationsResponse.md +58 -0
  31. data/docs/TrialPublicationsRow.md +34 -0
  32. data/docs/TrialsApi.md +80 -0
  33. data/lib/pharmaobservatory/api/biomarkers_api.rb +84 -0
  34. data/lib/pharmaobservatory/api/investigators_api.rb +84 -0
  35. data/lib/pharmaobservatory/api/rwd_conductors_api.rb +168 -0
  36. data/lib/pharmaobservatory/api/rwd_institutions_api.rb +84 -0
  37. data/lib/pharmaobservatory/api/rwd_studies_api.rb +84 -0
  38. data/lib/pharmaobservatory/api/rwd_us_networks_api.rb +329 -0
  39. data/lib/pharmaobservatory/api/suppliers_api.rb +504 -0
  40. data/lib/pharmaobservatory/api/trials_api.rb +84 -0
  41. data/lib/pharmaobservatory/models/provider_biomarker_capability_row.rb +9 -9
  42. data/lib/pharmaobservatory/models/provider_biomarker_capability_summary_response.rb +478 -0
  43. data/lib/pharmaobservatory/models/provider_biomarker_capability_summary_row.rb +509 -0
  44. data/lib/pharmaobservatory/models/provider_clia_licensure_row.rb +1 -1
  45. data/lib/pharmaobservatory/models/provider_rwd_delivery_response.rb +478 -0
  46. data/lib/pharmaobservatory/models/provider_rwd_delivery_row.rb +546 -0
  47. data/lib/pharmaobservatory/models/provider_rwd_delivery_study_response.rb +478 -0
  48. data/lib/pharmaobservatory/models/provider_rwd_delivery_study_row.rb +454 -0
  49. data/lib/pharmaobservatory/models/provider_rwd_footprint_response.rb +478 -0
  50. data/lib/pharmaobservatory/models/provider_rwd_footprint_row.rb +539 -0
  51. data/lib/pharmaobservatory/models/rwd_sources_row.rb +1 -1
  52. data/lib/pharmaobservatory/models/rwd_us_network_memberships_response.rb +478 -0
  53. data/lib/pharmaobservatory/models/rwd_us_network_memberships_row.rb +663 -0
  54. data/lib/pharmaobservatory/models/rwd_us_network_projects_response.rb +478 -0
  55. data/lib/pharmaobservatory/models/rwd_us_network_projects_row.rb +564 -0
  56. data/lib/pharmaobservatory/models/rwd_us_networks_record.rb +385 -0
  57. data/lib/pharmaobservatory/models/rwd_us_networks_response.rb +478 -0
  58. data/lib/pharmaobservatory/models/rwd_us_networks_row.rb +454 -0
  59. data/lib/pharmaobservatory/models/supplier_rwd_declarations_response.rb +478 -0
  60. data/lib/pharmaobservatory/models/supplier_rwd_declarations_row.rb +539 -0
  61. data/lib/pharmaobservatory/models/trial_publications_response.rb +478 -0
  62. data/lib/pharmaobservatory/models/trial_publications_row.rb +313 -0
  63. data/lib/pharmaobservatory/version.rb +1 -1
  64. data/lib/pharmaobservatory.rb +20 -0
  65. metadata +42 -2
@@ -0,0 +1,509 @@
1
+ =begin
2
+ #Pharma Observatory Public REST API
3
+
4
+ #Read-only REST API over the Pharma Observatory biomedical data platform. Reference: https://pharmaobservatory.com/api-reference
5
+
6
+ The version of the OpenAPI document: 1.0.0
7
+
8
+ Generated by: https://openapi-generator.tech
9
+ Generator version: 7.13.0
10
+
11
+ =end
12
+
13
+ require 'date'
14
+ require 'time'
15
+
16
+ module PharmaObservatory
17
+ # One row of the provider_biomarker_capability_summary dataset: one row per RX provider, biomarker, evidence lane, role, match method, evidence values and tier. A grouped request returns the group columns and the measures instead, as additional properties.
18
+ class ProviderBiomarkerCapabilitySummaryRow
19
+ # The summary row id: a hash of the grain columns.
20
+ attr_accessor :summary_id
21
+
22
+ # The supplier id: the Scientist.com provider id as text, the id in the supplier page address (/suppliers/<id>). A supplier is not a company.
23
+ attr_accessor :provider_id
24
+
25
+ # The Scientist.com public provider uuid, the join key to the RX marketplace. Present on every row, including providers the marketplace does not publish.
26
+ attr_accessor :provider_uuid
27
+
28
+ # The supplier's marketplace slug.
29
+ attr_accessor :provider_slug
30
+
31
+ # The supplier's name.
32
+ attr_accessor :provider_name
33
+
34
+ # The biomarker's route key, the entry key for the biomarkers object type; the gene symbol for a gene biomarker.
35
+ attr_accessor :route_key
36
+
37
+ # The canonical biomarker entity id.
38
+ attr_accessor :biomarker_id
39
+
40
+ # The gene symbol; null for a source-scoped biomarker that names no gene.
41
+ attr_accessor :gene_symbol
42
+
43
+ # The biomarker's display name.
44
+ attr_accessor :biomarker_display_name
45
+
46
+ # The source path of the group: ladder_trial and ladder_clinvar (the evidence ladder), fda_cdx (FDA companion diagnostic list), fda_bqp (FDA Biomarker Qualification Program), literature_assay (assay providers named in PubMed full text), supplier_survey (the supplier's own declaration) clinvar_submission (ClinVar clinical-testing submissions by a laboratory the supplier carries by name, tier null) and supplier_service_listing (a Scientist.com marketplace catalogue service the supplier listed, whose name names the gene; tier null, no evidence sense). Nothing is merged across lanes.
47
+ attr_accessor :evidence_lane
48
+
49
+ # The role the supplier played in the evidence: a ladder role, the literature provider role verbatim, respondent for the survey, or marketplace_listing for a service listing.
50
+ attr_accessor :org_role
51
+
52
+ # How the evidence was attached to the supplier: org_member_exact (through the supplier's resolved organization), rx_name_key_exact (an exact name match, not a verified identity) or rx_provider_direct (the supplier's own marketplace listing, no name matched).
53
+ attr_accessor :match_method
54
+
55
+ # Analytical validation of the group (literature_assay lane only): fda_cleared_specific_assay, fda_cleared_for_biomarker or literature_reported.
56
+ attr_accessor :analytical_validation_evidence
57
+
58
+ # Clinical-use evidence of the group: the ladder tier label, literature_reported, or on the clinvar_submission lane the ClinVar review status verbatim.
59
+ attr_accessor :clinical_use_evidence
60
+
61
+ # FDA qualification (fda_bqp lane only): fda_qualified.
62
+ attr_accessor :regulatory_qualification
63
+
64
+ # FDA companion diagnostic authorization (fda_cdx lane only): fda_authorized_companion_diagnostic.
65
+ attr_accessor :companion_diagnostic
66
+
67
+ # The supplier's own declaration, never mapped into the four evidence kinds: the survey's assay status on supplier_survey, supplier_declared_service_listed on supplier_service_listing.
68
+ attr_accessor :supplier_declared_status
69
+
70
+ # The ladder rung of the group, 1 to 4, a kind of evidence and never a score; null on literature_assay, supplier_survey, clinvar_submission and supplier_service_listing.
71
+ attr_accessor :tier
72
+
73
+ # How many evidence assertions the row stands for; sums to the row count of provider_biomarker_capability under the same filter.
74
+ attr_accessor :assertion_count
75
+
76
+ # How many distinct evidence references (one ClinVar record, one trial, one paper) the assertions cite.
77
+ attr_accessor :distinct_evidence_ref_count
78
+
79
+ # The smallest evidence reference of the group: a deterministic example to link, not a ranking.
80
+ attr_accessor :example_evidence_ref
81
+
82
+ # Which identifier example_evidence_ref is: nct_id, clinvar_scv, fda_cdx_entry_biomarker, fda_bqp_project, pmid, assay_ledger_row, survey_response_biomarker or rx_ware.
83
+ attr_accessor :example_evidence_ref_kind
84
+
85
+ # The citation page of the example reference; null where the source offers no resolvable page.
86
+ attr_accessor :example_citation_url
87
+
88
+ # The latest publication date in the group (literature_assay lane only).
89
+ attr_accessor :most_recent_evidence_date
90
+
91
+ # The license statement of the group's source lane. No lane carries a usage restriction.
92
+ attr_accessor :source_license
93
+
94
+ # The credit the group's source lane is owed.
95
+ attr_accessor :attribution
96
+
97
+ # The build date.
98
+ attr_accessor :as_of
99
+
100
+ # Attribute mapping from ruby-style variable name to JSON key.
101
+ def self.attribute_map
102
+ {
103
+ :'summary_id' => :'summary_id',
104
+ :'provider_id' => :'provider_id',
105
+ :'provider_uuid' => :'provider_uuid',
106
+ :'provider_slug' => :'provider_slug',
107
+ :'provider_name' => :'provider_name',
108
+ :'route_key' => :'route_key',
109
+ :'biomarker_id' => :'biomarker_id',
110
+ :'gene_symbol' => :'gene_symbol',
111
+ :'biomarker_display_name' => :'biomarker_display_name',
112
+ :'evidence_lane' => :'evidence_lane',
113
+ :'org_role' => :'org_role',
114
+ :'match_method' => :'match_method',
115
+ :'analytical_validation_evidence' => :'analytical_validation_evidence',
116
+ :'clinical_use_evidence' => :'clinical_use_evidence',
117
+ :'regulatory_qualification' => :'regulatory_qualification',
118
+ :'companion_diagnostic' => :'companion_diagnostic',
119
+ :'supplier_declared_status' => :'supplier_declared_status',
120
+ :'tier' => :'tier',
121
+ :'assertion_count' => :'assertion_count',
122
+ :'distinct_evidence_ref_count' => :'distinct_evidence_ref_count',
123
+ :'example_evidence_ref' => :'example_evidence_ref',
124
+ :'example_evidence_ref_kind' => :'example_evidence_ref_kind',
125
+ :'example_citation_url' => :'example_citation_url',
126
+ :'most_recent_evidence_date' => :'most_recent_evidence_date',
127
+ :'source_license' => :'source_license',
128
+ :'attribution' => :'attribution',
129
+ :'as_of' => :'as_of'
130
+ }
131
+ end
132
+
133
+ # Returns attribute mapping this model knows about
134
+ def self.acceptable_attribute_map
135
+ attribute_map
136
+ end
137
+
138
+ # Returns all the JSON keys this model knows about
139
+ def self.acceptable_attributes
140
+ acceptable_attribute_map.values
141
+ end
142
+
143
+ # Attribute type mapping.
144
+ def self.openapi_types
145
+ {
146
+ :'summary_id' => :'String',
147
+ :'provider_id' => :'String',
148
+ :'provider_uuid' => :'String',
149
+ :'provider_slug' => :'String',
150
+ :'provider_name' => :'String',
151
+ :'route_key' => :'String',
152
+ :'biomarker_id' => :'String',
153
+ :'gene_symbol' => :'String',
154
+ :'biomarker_display_name' => :'String',
155
+ :'evidence_lane' => :'String',
156
+ :'org_role' => :'String',
157
+ :'match_method' => :'String',
158
+ :'analytical_validation_evidence' => :'String',
159
+ :'clinical_use_evidence' => :'String',
160
+ :'regulatory_qualification' => :'String',
161
+ :'companion_diagnostic' => :'String',
162
+ :'supplier_declared_status' => :'String',
163
+ :'tier' => :'Integer',
164
+ :'assertion_count' => :'Integer',
165
+ :'distinct_evidence_ref_count' => :'Integer',
166
+ :'example_evidence_ref' => :'String',
167
+ :'example_evidence_ref_kind' => :'String',
168
+ :'example_citation_url' => :'String',
169
+ :'most_recent_evidence_date' => :'Date',
170
+ :'source_license' => :'String',
171
+ :'attribution' => :'String',
172
+ :'as_of' => :'Date'
173
+ }
174
+ end
175
+
176
+ # List of attributes with nullable: true
177
+ def self.openapi_nullable
178
+ Set.new([
179
+ :'summary_id',
180
+ :'provider_id',
181
+ :'provider_uuid',
182
+ :'provider_slug',
183
+ :'provider_name',
184
+ :'route_key',
185
+ :'biomarker_id',
186
+ :'gene_symbol',
187
+ :'biomarker_display_name',
188
+ :'evidence_lane',
189
+ :'org_role',
190
+ :'match_method',
191
+ :'analytical_validation_evidence',
192
+ :'clinical_use_evidence',
193
+ :'regulatory_qualification',
194
+ :'companion_diagnostic',
195
+ :'supplier_declared_status',
196
+ :'tier',
197
+ :'assertion_count',
198
+ :'distinct_evidence_ref_count',
199
+ :'example_evidence_ref',
200
+ :'example_evidence_ref_kind',
201
+ :'example_citation_url',
202
+ :'most_recent_evidence_date',
203
+ :'source_license',
204
+ :'attribution',
205
+ :'as_of'
206
+ ])
207
+ end
208
+
209
+ # Initializes the object
210
+ # @param [Hash] attributes Model attributes in the form of hash
211
+ def initialize(attributes = {})
212
+ if (!attributes.is_a?(Hash))
213
+ fail ArgumentError, "The input argument (attributes) must be a hash in `PharmaObservatory::ProviderBiomarkerCapabilitySummaryRow` initialize method"
214
+ end
215
+
216
+ # check to see if the attribute exists and convert string to symbol for hash key
217
+ acceptable_attribute_map = self.class.acceptable_attribute_map
218
+ attributes = attributes.each_with_object({}) { |(k, v), h|
219
+ if (!acceptable_attribute_map.key?(k.to_sym))
220
+ fail ArgumentError, "`#{k}` is not a valid attribute in `PharmaObservatory::ProviderBiomarkerCapabilitySummaryRow`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
221
+ end
222
+ h[k.to_sym] = v
223
+ }
224
+
225
+ if attributes.key?(:'summary_id')
226
+ self.summary_id = attributes[:'summary_id']
227
+ end
228
+
229
+ if attributes.key?(:'provider_id')
230
+ self.provider_id = attributes[:'provider_id']
231
+ end
232
+
233
+ if attributes.key?(:'provider_uuid')
234
+ self.provider_uuid = attributes[:'provider_uuid']
235
+ end
236
+
237
+ if attributes.key?(:'provider_slug')
238
+ self.provider_slug = attributes[:'provider_slug']
239
+ end
240
+
241
+ if attributes.key?(:'provider_name')
242
+ self.provider_name = attributes[:'provider_name']
243
+ end
244
+
245
+ if attributes.key?(:'route_key')
246
+ self.route_key = attributes[:'route_key']
247
+ end
248
+
249
+ if attributes.key?(:'biomarker_id')
250
+ self.biomarker_id = attributes[:'biomarker_id']
251
+ end
252
+
253
+ if attributes.key?(:'gene_symbol')
254
+ self.gene_symbol = attributes[:'gene_symbol']
255
+ end
256
+
257
+ if attributes.key?(:'biomarker_display_name')
258
+ self.biomarker_display_name = attributes[:'biomarker_display_name']
259
+ end
260
+
261
+ if attributes.key?(:'evidence_lane')
262
+ self.evidence_lane = attributes[:'evidence_lane']
263
+ end
264
+
265
+ if attributes.key?(:'org_role')
266
+ self.org_role = attributes[:'org_role']
267
+ end
268
+
269
+ if attributes.key?(:'match_method')
270
+ self.match_method = attributes[:'match_method']
271
+ end
272
+
273
+ if attributes.key?(:'analytical_validation_evidence')
274
+ self.analytical_validation_evidence = attributes[:'analytical_validation_evidence']
275
+ end
276
+
277
+ if attributes.key?(:'clinical_use_evidence')
278
+ self.clinical_use_evidence = attributes[:'clinical_use_evidence']
279
+ end
280
+
281
+ if attributes.key?(:'regulatory_qualification')
282
+ self.regulatory_qualification = attributes[:'regulatory_qualification']
283
+ end
284
+
285
+ if attributes.key?(:'companion_diagnostic')
286
+ self.companion_diagnostic = attributes[:'companion_diagnostic']
287
+ end
288
+
289
+ if attributes.key?(:'supplier_declared_status')
290
+ self.supplier_declared_status = attributes[:'supplier_declared_status']
291
+ end
292
+
293
+ if attributes.key?(:'tier')
294
+ self.tier = attributes[:'tier']
295
+ end
296
+
297
+ if attributes.key?(:'assertion_count')
298
+ self.assertion_count = attributes[:'assertion_count']
299
+ end
300
+
301
+ if attributes.key?(:'distinct_evidence_ref_count')
302
+ self.distinct_evidence_ref_count = attributes[:'distinct_evidence_ref_count']
303
+ end
304
+
305
+ if attributes.key?(:'example_evidence_ref')
306
+ self.example_evidence_ref = attributes[:'example_evidence_ref']
307
+ end
308
+
309
+ if attributes.key?(:'example_evidence_ref_kind')
310
+ self.example_evidence_ref_kind = attributes[:'example_evidence_ref_kind']
311
+ end
312
+
313
+ if attributes.key?(:'example_citation_url')
314
+ self.example_citation_url = attributes[:'example_citation_url']
315
+ end
316
+
317
+ if attributes.key?(:'most_recent_evidence_date')
318
+ self.most_recent_evidence_date = attributes[:'most_recent_evidence_date']
319
+ end
320
+
321
+ if attributes.key?(:'source_license')
322
+ self.source_license = attributes[:'source_license']
323
+ end
324
+
325
+ if attributes.key?(:'attribution')
326
+ self.attribution = attributes[:'attribution']
327
+ end
328
+
329
+ if attributes.key?(:'as_of')
330
+ self.as_of = attributes[:'as_of']
331
+ end
332
+ end
333
+
334
+ # Show invalid properties with the reasons. Usually used together with valid?
335
+ # @return Array for valid properties with the reasons
336
+ def list_invalid_properties
337
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
338
+ invalid_properties = Array.new
339
+ invalid_properties
340
+ end
341
+
342
+ # Check to see if the all the properties in the model are valid
343
+ # @return true if the model is valid
344
+ def valid?
345
+ warn '[DEPRECATED] the `valid?` method is obsolete'
346
+ true
347
+ end
348
+
349
+ # Checks equality by comparing each attribute.
350
+ # @param [Object] Object to be compared
351
+ def ==(o)
352
+ return true if self.equal?(o)
353
+ self.class == o.class &&
354
+ summary_id == o.summary_id &&
355
+ provider_id == o.provider_id &&
356
+ provider_uuid == o.provider_uuid &&
357
+ provider_slug == o.provider_slug &&
358
+ provider_name == o.provider_name &&
359
+ route_key == o.route_key &&
360
+ biomarker_id == o.biomarker_id &&
361
+ gene_symbol == o.gene_symbol &&
362
+ biomarker_display_name == o.biomarker_display_name &&
363
+ evidence_lane == o.evidence_lane &&
364
+ org_role == o.org_role &&
365
+ match_method == o.match_method &&
366
+ analytical_validation_evidence == o.analytical_validation_evidence &&
367
+ clinical_use_evidence == o.clinical_use_evidence &&
368
+ regulatory_qualification == o.regulatory_qualification &&
369
+ companion_diagnostic == o.companion_diagnostic &&
370
+ supplier_declared_status == o.supplier_declared_status &&
371
+ tier == o.tier &&
372
+ assertion_count == o.assertion_count &&
373
+ distinct_evidence_ref_count == o.distinct_evidence_ref_count &&
374
+ example_evidence_ref == o.example_evidence_ref &&
375
+ example_evidence_ref_kind == o.example_evidence_ref_kind &&
376
+ example_citation_url == o.example_citation_url &&
377
+ most_recent_evidence_date == o.most_recent_evidence_date &&
378
+ source_license == o.source_license &&
379
+ attribution == o.attribution &&
380
+ as_of == o.as_of
381
+ end
382
+
383
+ # @see the `==` method
384
+ # @param [Object] Object to be compared
385
+ def eql?(o)
386
+ self == o
387
+ end
388
+
389
+ # Calculates hash code according to all attributes.
390
+ # @return [Integer] Hash code
391
+ def hash
392
+ [summary_id, provider_id, provider_uuid, provider_slug, provider_name, route_key, biomarker_id, gene_symbol, biomarker_display_name, evidence_lane, org_role, match_method, analytical_validation_evidence, clinical_use_evidence, regulatory_qualification, companion_diagnostic, supplier_declared_status, tier, assertion_count, distinct_evidence_ref_count, example_evidence_ref, example_evidence_ref_kind, example_citation_url, most_recent_evidence_date, source_license, attribution, as_of].hash
393
+ end
394
+
395
+ # Builds the object from hash
396
+ # @param [Hash] attributes Model attributes in the form of hash
397
+ # @return [Object] Returns the model itself
398
+ def self.build_from_hash(attributes)
399
+ return nil unless attributes.is_a?(Hash)
400
+ attributes = attributes.transform_keys(&:to_sym)
401
+ transformed_hash = {}
402
+ openapi_types.each_pair do |key, type|
403
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
404
+ transformed_hash["#{key}"] = nil
405
+ elsif type =~ /\AArray<(.*)>/i
406
+ # check to ensure the input is an array given that the attribute
407
+ # is documented as an array but the input is not
408
+ if attributes[attribute_map[key]].is_a?(Array)
409
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
410
+ end
411
+ elsif !attributes[attribute_map[key]].nil?
412
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
413
+ end
414
+ end
415
+ new(transformed_hash)
416
+ end
417
+
418
+ # Deserializes the data based on type
419
+ # @param string type Data type
420
+ # @param string value Value to be deserialized
421
+ # @return [Object] Deserialized data
422
+ def self._deserialize(type, value)
423
+ case type.to_sym
424
+ when :Time
425
+ Time.parse(value)
426
+ when :Date
427
+ Date.parse(value)
428
+ when :String
429
+ value.to_s
430
+ when :Integer
431
+ value.to_i
432
+ when :Float
433
+ value.to_f
434
+ when :Boolean
435
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
436
+ true
437
+ else
438
+ false
439
+ end
440
+ when :Object
441
+ # generic object (usually a Hash), return directly
442
+ value
443
+ when /\AArray<(?<inner_type>.+)>\z/
444
+ inner_type = Regexp.last_match[:inner_type]
445
+ value.map { |v| _deserialize(inner_type, v) }
446
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
447
+ k_type = Regexp.last_match[:k_type]
448
+ v_type = Regexp.last_match[:v_type]
449
+ {}.tap do |hash|
450
+ value.each do |k, v|
451
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
452
+ end
453
+ end
454
+ else # model
455
+ # models (e.g. Pet) or oneOf
456
+ klass = PharmaObservatory.const_get(type)
457
+ klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
458
+ end
459
+ end
460
+
461
+ # Returns the string representation of the object
462
+ # @return [String] String presentation of the object
463
+ def to_s
464
+ to_hash.to_s
465
+ end
466
+
467
+ # to_body is an alias to to_hash (backward compatibility)
468
+ # @return [Hash] Returns the object in the form of hash
469
+ def to_body
470
+ to_hash
471
+ end
472
+
473
+ # Returns the object in the form of hash
474
+ # @return [Hash] Returns the object in the form of hash
475
+ def to_hash
476
+ hash = {}
477
+ self.class.attribute_map.each_pair do |attr, param|
478
+ value = self.send(attr)
479
+ if value.nil?
480
+ is_nullable = self.class.openapi_nullable.include?(attr)
481
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
482
+ end
483
+
484
+ hash[param] = _to_hash(value)
485
+ end
486
+ hash
487
+ end
488
+
489
+ # Outputs non-array value in the form of hash
490
+ # For object, use to_hash. Otherwise, just return the value
491
+ # @param [Object] value Any valid value
492
+ # @return [Hash] Returns the value in the form of hash
493
+ def _to_hash(value)
494
+ if value.is_a?(Array)
495
+ value.compact.map { |v| _to_hash(v) }
496
+ elsif value.is_a?(Hash)
497
+ {}.tap do |hash|
498
+ value.each { |k, v| hash[k] = _to_hash(v) }
499
+ end
500
+ elsif value.respond_to? :to_hash
501
+ value.to_hash
502
+ else
503
+ value
504
+ end
505
+ end
506
+
507
+ end
508
+
509
+ end
@@ -19,7 +19,7 @@ module PharmaObservatory
19
19
  # The supplier id: the Scientist.com provider id as text, the id in the supplier page address (/suppliers/<id>). The entry key for the suppliers object type.
20
20
  attr_accessor :provider_id
21
21
 
22
- # The supplier's public Scientist.com uuid.
22
+ # The supplier's public Scientist.com uuid, the join key to the RX marketplace. Present on every row, including providers the marketplace does not publish.
23
23
  attr_accessor :provider_uuid
24
24
 
25
25
  # The supplier's marketplace slug.