primary_connect_client 1.4.0 → 1.5.1
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/CHANGELOG.md +6 -0
- data/README.md +8 -6
- data/docs/DefaultApi.md +133 -0
- data/docs/Ids.md +18 -0
- data/docs/Measurement.md +22 -0
- data/docs/OrderOrder.md +2 -0
- data/docs/Subject.md +10 -39
- data/lib/primary_connect_client/api/default_api.rb +116 -0
- data/lib/primary_connect_client/models/{subject_one_of1.rb → ids.rb} +13 -10
- data/lib/primary_connect_client/models/{result_specimen.rb → measurement.rb} +25 -25
- data/lib/primary_connect_client/models/order.rb +0 -1
- data/lib/primary_connect_client/models/order_order.rb +13 -1
- data/lib/primary_connect_client/models/subject.rb +196 -74
- data/lib/primary_connect_client/version.rb +1 -1
- data/lib/primary_connect_client.rb +2 -2
- data/primary_connect_client.gemspec +1 -0
- data/spec/api/default_api_spec.rb +21 -0
- data/spec/models/ids_spec.rb +34 -0
- data/spec/models/measurement_spec.rb +46 -0
- data/spec/models/order_order_spec.rb +6 -0
- data/spec/models/subject_spec.rb +14 -5
- metadata +39 -16
- data/lib/primary_connect_client/models/order_order_specimen.rb +0 -239
- data/lib/primary_connect_client/models/patient_demographics.rb +0 -466
- data/lib/primary_connect_client/models/subject_one_of.rb +0 -218
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c21b6c5d8e7df842065531543644b17933fc1e96ddd6a90649be582f1331ad98
|
4
|
+
data.tar.gz: 711d0a09341d53c78db0b9c4762cfbc92bbec5b12faf103f857581a82d32056c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: aec6d001df9b89210d9a24ddd345e707fd3ac0dbfbf3ac0c3c5ed908c2628c68c65181adf6fc3887d170d3aebb7c5029ce93b46cf11f90d40efbc974b212a6c0
|
7
|
+
data.tar.gz: 071b97faec6f8a08dfe35899b9c080d0e485b6809092ba955ffe53aab6065f66cb712f36ee57aad39fda8c86cc821eaf986eef461146925e0df5a589615905f4
|
data/CHANGELOG.md
CHANGED
data/README.md
CHANGED
@@ -7,7 +7,7 @@ Client Library to interface with Primary Connect
|
|
7
7
|
This SDK is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project:
|
8
8
|
|
9
9
|
- API version: v1
|
10
|
-
- Package version: 1.
|
10
|
+
- Package version: 1.5.1
|
11
11
|
- Build package: org.openapitools.codegen.languages.RubyClientCodegen
|
12
12
|
|
13
13
|
## Installation
|
@@ -23,16 +23,16 @@ gem build primary_connect_client.gemspec
|
|
23
23
|
Then either install the gem locally:
|
24
24
|
|
25
25
|
```shell
|
26
|
-
gem install ./primary_connect_client-1.
|
26
|
+
gem install ./primary_connect_client-1.5.1.gem
|
27
27
|
```
|
28
28
|
|
29
|
-
(for development, run `gem install --dev ./primary_connect_client-1.
|
29
|
+
(for development, run `gem install --dev ./primary_connect_client-1.5.1.gem` to install the development dependencies)
|
30
30
|
|
31
31
|
or publish the gem to a gem hosting service, e.g. [RubyGems](https://rubygems.org/).
|
32
32
|
|
33
33
|
Finally add this to the Gemfile:
|
34
34
|
|
35
|
-
gem 'primary_connect_client', '~> 1.
|
35
|
+
gem 'primary_connect_client', '~> 1.5.1'
|
36
36
|
|
37
37
|
### Install from Git
|
38
38
|
|
@@ -86,9 +86,11 @@ Class | Method | HTTP request | Description
|
|
86
86
|
*PrimaryConnectClient::DefaultApi* | [**accession_order**](docs/DefaultApi.md#accession_order) | **PUT** /api/v1/orders/{id}/accession | accession order by ULID
|
87
87
|
*PrimaryConnectClient::DefaultApi* | [**accession_order_by_specimen_id**](docs/DefaultApi.md#accession_order_by_specimen_id) | **PUT** /api/v1/orders/accession | accession order by Specimen ID
|
88
88
|
*PrimaryConnectClient::DefaultApi* | [**cancel_order**](docs/DefaultApi.md#cancel_order) | **DELETE** /api/v1/orders/{id} | cancel order
|
89
|
+
*PrimaryConnectClient::DefaultApi* | [**create_measurement**](docs/DefaultApi.md#create_measurement) | **POST** /api/v1/measurements | create Measurement
|
89
90
|
*PrimaryConnectClient::DefaultApi* | [**create_order**](docs/DefaultApi.md#create_order) | **POST** /api/v1/orders | create order
|
90
91
|
*PrimaryConnectClient::DefaultApi* | [**create_result**](docs/DefaultApi.md#create_result) | **POST** /api/v1/orders/{order_id}/results | create result
|
91
92
|
*PrimaryConnectClient::DefaultApi* | [**get_lab_report**](docs/DefaultApi.md#get_lab_report) | **GET** /api/v1/results/{result_id}/lab_report | show lab report
|
93
|
+
*PrimaryConnectClient::DefaultApi* | [**get_measurement**](docs/DefaultApi.md#get_measurement) | **GET** /api/v1/measurements/{id} | show measurement
|
92
94
|
*PrimaryConnectClient::DefaultApi* | [**get_order**](docs/DefaultApi.md#get_order) | **GET** /api/v1/orders/{id} | show order
|
93
95
|
*PrimaryConnectClient::DefaultApi* | [**list_events**](docs/DefaultApi.md#list_events) | **GET** /api/v1/events | list events
|
94
96
|
*PrimaryConnectClient::DefaultApi* | [**list_orders**](docs/DefaultApi.md#list_orders) | **GET** /api/v1/orders | list orders
|
@@ -109,7 +111,9 @@ Class | Method | HTTP request | Description
|
|
109
111
|
- [PrimaryConnectClient::Event](docs/Event.md)
|
110
112
|
- [PrimaryConnectClient::Events](docs/Events.md)
|
111
113
|
- [PrimaryConnectClient::Identifier](docs/Identifier.md)
|
114
|
+
- [PrimaryConnectClient::Ids](docs/Ids.md)
|
112
115
|
- [PrimaryConnectClient::Location](docs/Location.md)
|
116
|
+
- [PrimaryConnectClient::Measurement](docs/Measurement.md)
|
113
117
|
- [PrimaryConnectClient::Medication](docs/Medication.md)
|
114
118
|
- [PrimaryConnectClient::MedicationAdministration](docs/MedicationAdministration.md)
|
115
119
|
- [PrimaryConnectClient::Meta](docs/Meta.md)
|
@@ -138,8 +142,6 @@ Class | Method | HTTP request | Description
|
|
138
142
|
- [PrimaryConnectClient::Results](docs/Results.md)
|
139
143
|
- [PrimaryConnectClient::Specimen](docs/Specimen.md)
|
140
144
|
- [PrimaryConnectClient::Subject](docs/Subject.md)
|
141
|
-
- [PrimaryConnectClient::SubjectOneOf](docs/SubjectOneOf.md)
|
142
|
-
- [PrimaryConnectClient::SubjectOneOf1](docs/SubjectOneOf1.md)
|
143
145
|
- [PrimaryConnectClient::V2Device](docs/V2Device.md)
|
144
146
|
- [PrimaryConnectClient::V2Dosage](docs/V2Dosage.md)
|
145
147
|
- [PrimaryConnectClient::V2Medication](docs/V2Medication.md)
|
data/docs/DefaultApi.md
CHANGED
@@ -7,9 +7,11 @@ All URIs are relative to *https://connect.primary.health*
|
|
7
7
|
| [**accession_order**](DefaultApi.md#accession_order) | **PUT** /api/v1/orders/{id}/accession | accession order by ULID |
|
8
8
|
| [**accession_order_by_specimen_id**](DefaultApi.md#accession_order_by_specimen_id) | **PUT** /api/v1/orders/accession | accession order by Specimen ID |
|
9
9
|
| [**cancel_order**](DefaultApi.md#cancel_order) | **DELETE** /api/v1/orders/{id} | cancel order |
|
10
|
+
| [**create_measurement**](DefaultApi.md#create_measurement) | **POST** /api/v1/measurements | create Measurement |
|
10
11
|
| [**create_order**](DefaultApi.md#create_order) | **POST** /api/v1/orders | create order |
|
11
12
|
| [**create_result**](DefaultApi.md#create_result) | **POST** /api/v1/orders/{order_id}/results | create result |
|
12
13
|
| [**get_lab_report**](DefaultApi.md#get_lab_report) | **GET** /api/v1/results/{result_id}/lab_report | show lab report |
|
14
|
+
| [**get_measurement**](DefaultApi.md#get_measurement) | **GET** /api/v1/measurements/{id} | show measurement |
|
13
15
|
| [**get_order**](DefaultApi.md#get_order) | **GET** /api/v1/orders/{id} | show order |
|
14
16
|
| [**list_events**](DefaultApi.md#list_events) | **GET** /api/v1/events | list events |
|
15
17
|
| [**list_orders**](DefaultApi.md#list_orders) | **GET** /api/v1/orders | list orders |
|
@@ -223,6 +225,70 @@ nil (empty response body)
|
|
223
225
|
- **Accept**: application/json
|
224
226
|
|
225
227
|
|
228
|
+
## create_measurement
|
229
|
+
|
230
|
+
> <Ids> create_measurement
|
231
|
+
|
232
|
+
create Measurement
|
233
|
+
|
234
|
+
### Examples
|
235
|
+
|
236
|
+
```ruby
|
237
|
+
require 'time'
|
238
|
+
require 'primary_connect_client'
|
239
|
+
# setup authorization
|
240
|
+
PrimaryConnectClient.configure do |config|
|
241
|
+
# Configure Bearer authorization: bearer_auth
|
242
|
+
config.access_token = 'YOUR_BEARER_TOKEN'
|
243
|
+
end
|
244
|
+
|
245
|
+
api_instance = PrimaryConnectClient::DefaultApi.new
|
246
|
+
|
247
|
+
begin
|
248
|
+
# create Measurement
|
249
|
+
result = api_instance.create_measurement
|
250
|
+
p result
|
251
|
+
rescue PrimaryConnectClient::ApiError => e
|
252
|
+
puts "Error when calling DefaultApi->create_measurement: #{e}"
|
253
|
+
end
|
254
|
+
```
|
255
|
+
|
256
|
+
#### Using the create_measurement_with_http_info variant
|
257
|
+
|
258
|
+
This returns an Array which contains the response data, status code and headers.
|
259
|
+
|
260
|
+
> <Array(<Ids>, Integer, Hash)> create_measurement_with_http_info
|
261
|
+
|
262
|
+
```ruby
|
263
|
+
begin
|
264
|
+
# create Measurement
|
265
|
+
data, status_code, headers = api_instance.create_measurement_with_http_info
|
266
|
+
p status_code # => 2xx
|
267
|
+
p headers # => { ... }
|
268
|
+
p data # => <Ids>
|
269
|
+
rescue PrimaryConnectClient::ApiError => e
|
270
|
+
puts "Error when calling DefaultApi->create_measurement_with_http_info: #{e}"
|
271
|
+
end
|
272
|
+
```
|
273
|
+
|
274
|
+
### Parameters
|
275
|
+
|
276
|
+
This endpoint does not need any parameter.
|
277
|
+
|
278
|
+
### Return type
|
279
|
+
|
280
|
+
[**Ids**](Ids.md)
|
281
|
+
|
282
|
+
### Authorization
|
283
|
+
|
284
|
+
[bearer_auth](../README.md#bearer_auth)
|
285
|
+
|
286
|
+
### HTTP request headers
|
287
|
+
|
288
|
+
- **Content-Type**: Not defined
|
289
|
+
- **Accept**: application/json
|
290
|
+
|
291
|
+
|
226
292
|
## create_order
|
227
293
|
|
228
294
|
> <OrderIds> create_order(opts)
|
@@ -429,6 +495,73 @@ nil (empty response body)
|
|
429
495
|
- **Accept**: application/json
|
430
496
|
|
431
497
|
|
498
|
+
## get_measurement
|
499
|
+
|
500
|
+
> <Measurement> get_measurement(id)
|
501
|
+
|
502
|
+
show measurement
|
503
|
+
|
504
|
+
### Examples
|
505
|
+
|
506
|
+
```ruby
|
507
|
+
require 'time'
|
508
|
+
require 'primary_connect_client'
|
509
|
+
# setup authorization
|
510
|
+
PrimaryConnectClient.configure do |config|
|
511
|
+
# Configure Bearer authorization: bearer_auth
|
512
|
+
config.access_token = 'YOUR_BEARER_TOKEN'
|
513
|
+
end
|
514
|
+
|
515
|
+
api_instance = PrimaryConnectClient::DefaultApi.new
|
516
|
+
id = '01FGD44Q6MVCG2VNSMC4ZMOTQM' # String | Measurement ID
|
517
|
+
|
518
|
+
begin
|
519
|
+
# show measurement
|
520
|
+
result = api_instance.get_measurement(id)
|
521
|
+
p result
|
522
|
+
rescue PrimaryConnectClient::ApiError => e
|
523
|
+
puts "Error when calling DefaultApi->get_measurement: #{e}"
|
524
|
+
end
|
525
|
+
```
|
526
|
+
|
527
|
+
#### Using the get_measurement_with_http_info variant
|
528
|
+
|
529
|
+
This returns an Array which contains the response data, status code and headers.
|
530
|
+
|
531
|
+
> <Array(<Measurement>, Integer, Hash)> get_measurement_with_http_info(id)
|
532
|
+
|
533
|
+
```ruby
|
534
|
+
begin
|
535
|
+
# show measurement
|
536
|
+
data, status_code, headers = api_instance.get_measurement_with_http_info(id)
|
537
|
+
p status_code # => 2xx
|
538
|
+
p headers # => { ... }
|
539
|
+
p data # => <Measurement>
|
540
|
+
rescue PrimaryConnectClient::ApiError => e
|
541
|
+
puts "Error when calling DefaultApi->get_measurement_with_http_info: #{e}"
|
542
|
+
end
|
543
|
+
```
|
544
|
+
|
545
|
+
### Parameters
|
546
|
+
|
547
|
+
| Name | Type | Description | Notes |
|
548
|
+
| ---- | ---- | ----------- | ----- |
|
549
|
+
| **id** | **String** | Measurement ID | |
|
550
|
+
|
551
|
+
### Return type
|
552
|
+
|
553
|
+
[**Measurement**](Measurement.md)
|
554
|
+
|
555
|
+
### Authorization
|
556
|
+
|
557
|
+
[bearer_auth](../README.md#bearer_auth)
|
558
|
+
|
559
|
+
### HTTP request headers
|
560
|
+
|
561
|
+
- **Content-Type**: Not defined
|
562
|
+
- **Accept**: application/json
|
563
|
+
|
564
|
+
|
432
565
|
## get_order
|
433
566
|
|
434
567
|
> <OrderWithEventErrors> get_order(id)
|
data/docs/Ids.md
ADDED
@@ -0,0 +1,18 @@
|
|
1
|
+
# PrimaryConnectClient::Ids
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
|
5
|
+
| Name | Type | Description | Notes |
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
7
|
+
| **ids** | **Array<String>** | List of IDs | [optional] |
|
8
|
+
|
9
|
+
## Example
|
10
|
+
|
11
|
+
```ruby
|
12
|
+
require 'primary_connect_client'
|
13
|
+
|
14
|
+
instance = PrimaryConnectClient::Ids.new(
|
15
|
+
ids: null
|
16
|
+
)
|
17
|
+
```
|
18
|
+
|
data/docs/Measurement.md
ADDED
@@ -0,0 +1,22 @@
|
|
1
|
+
# PrimaryConnectClient::Measurement
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
|
5
|
+
| Name | Type | Description | Notes |
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
7
|
+
| **meta** | [**Meta**](Meta.md) | | [optional] |
|
8
|
+
| **subject** | [**Subject**](Subject.md) | | [optional] |
|
9
|
+
| **metrics** | [**Array<Result>**](Result.md) | List of result components | [optional] |
|
10
|
+
|
11
|
+
## Example
|
12
|
+
|
13
|
+
```ruby
|
14
|
+
require 'primary_connect_client'
|
15
|
+
|
16
|
+
instance = PrimaryConnectClient::Measurement.new(
|
17
|
+
meta: null,
|
18
|
+
subject: null,
|
19
|
+
metrics: null
|
20
|
+
)
|
21
|
+
```
|
22
|
+
|
data/docs/OrderOrder.md
CHANGED
@@ -16,6 +16,7 @@
|
|
16
16
|
| **specimen** | [**Specimen**](Specimen.md) | | [optional] |
|
17
17
|
| **medication_administrations** | [**Array<MedicationAdministration>**](MedicationAdministration.md) | Array of medications administered to the subject | [optional] |
|
18
18
|
| **procedure** | [**CodedValue**](CodedValue.md) | | [optional] |
|
19
|
+
| **procedures** | [**Array<CodedValue>**](CodedValue.md) | Array of Procedures ordered | [optional] |
|
19
20
|
| **ordering_provider** | [**Provider**](Provider.md) | | [optional] |
|
20
21
|
| **result_copy_providers** | [**Array<Provider>**](Provider.md) | Array of providers to be copied on the results | [optional] |
|
21
22
|
| **ordering_facility** | [**OrderOrderOrderingFacility**](OrderOrderOrderingFacility.md) | | [optional] |
|
@@ -47,6 +48,7 @@ instance = PrimaryConnectClient::OrderOrder.new(
|
|
47
48
|
specimen: null,
|
48
49
|
medication_administrations: null,
|
49
50
|
procedure: null,
|
51
|
+
procedures: null,
|
50
52
|
ordering_provider: null,
|
51
53
|
result_copy_providers: null,
|
52
54
|
ordering_facility: null,
|
data/docs/Subject.md
CHANGED
@@ -1,49 +1,20 @@
|
|
1
1
|
# PrimaryConnectClient::Subject
|
2
2
|
|
3
|
-
##
|
3
|
+
## Properties
|
4
4
|
|
5
|
-
|
5
|
+
| Name | Type | Description | Notes |
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
7
|
+
| **patient** | [**Patient**](Patient.md) | | [optional] |
|
8
|
+
| **device** | [**Device**](Device.md) | | [optional] |
|
6
9
|
|
7
|
-
|
8
|
-
|
9
|
-
#### Example
|
10
|
-
|
11
|
-
```ruby
|
12
|
-
require 'primary_connect_client'
|
13
|
-
|
14
|
-
PrimaryConnectClient::Subject.openapi_one_of
|
15
|
-
# =>
|
16
|
-
# [
|
17
|
-
# :'SubjectOneOf',
|
18
|
-
# :'SubjectOneOf1'
|
19
|
-
# ]
|
20
|
-
```
|
21
|
-
|
22
|
-
### build
|
23
|
-
|
24
|
-
Find the appropriate object from the `openapi_one_of` list and casts the data into it.
|
25
|
-
|
26
|
-
#### Example
|
10
|
+
## Example
|
27
11
|
|
28
12
|
```ruby
|
29
13
|
require 'primary_connect_client'
|
30
14
|
|
31
|
-
PrimaryConnectClient::Subject.
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
# => nil
|
15
|
+
instance = PrimaryConnectClient::Subject.new(
|
16
|
+
patient: null,
|
17
|
+
device: null
|
18
|
+
)
|
36
19
|
```
|
37
20
|
|
38
|
-
#### Parameters
|
39
|
-
|
40
|
-
| Name | Type | Description |
|
41
|
-
| ---- | ---- | ----------- |
|
42
|
-
| **data** | **Mixed** | data to be matched against the list of oneOf items |
|
43
|
-
|
44
|
-
#### Return type
|
45
|
-
|
46
|
-
- `SubjectOneOf`
|
47
|
-
- `SubjectOneOf1`
|
48
|
-
- `nil` (if no type matches)
|
49
|
-
|
@@ -213,6 +213,61 @@ module PrimaryConnectClient
|
|
213
213
|
return data, status_code, headers
|
214
214
|
end
|
215
215
|
|
216
|
+
# create Measurement
|
217
|
+
# @param [Hash] opts the optional parameters
|
218
|
+
# @return [Ids]
|
219
|
+
def create_measurement(opts = {})
|
220
|
+
data, _status_code, _headers = create_measurement_with_http_info(opts)
|
221
|
+
data
|
222
|
+
end
|
223
|
+
|
224
|
+
# create Measurement
|
225
|
+
# @param [Hash] opts the optional parameters
|
226
|
+
# @return [Array<(Ids, Integer, Hash)>] Ids data, response status code and response headers
|
227
|
+
def create_measurement_with_http_info(opts = {})
|
228
|
+
if @api_client.config.debugging
|
229
|
+
@api_client.config.logger.debug 'Calling API: DefaultApi.create_measurement ...'
|
230
|
+
end
|
231
|
+
# resource path
|
232
|
+
local_var_path = '/api/v1/measurements'
|
233
|
+
|
234
|
+
# query parameters
|
235
|
+
query_params = opts[:query_params] || {}
|
236
|
+
|
237
|
+
# header parameters
|
238
|
+
header_params = opts[:header_params] || {}
|
239
|
+
# HTTP header 'Accept' (if needed)
|
240
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
241
|
+
|
242
|
+
# form parameters
|
243
|
+
form_params = opts[:form_params] || {}
|
244
|
+
|
245
|
+
# http body (model)
|
246
|
+
post_body = opts[:debug_body]
|
247
|
+
|
248
|
+
# return_type
|
249
|
+
return_type = opts[:debug_return_type] || 'Ids'
|
250
|
+
|
251
|
+
# auth_names
|
252
|
+
auth_names = opts[:debug_auth_names] || ['bearer_auth']
|
253
|
+
|
254
|
+
new_options = opts.merge(
|
255
|
+
:operation => :"DefaultApi.create_measurement",
|
256
|
+
:header_params => header_params,
|
257
|
+
:query_params => query_params,
|
258
|
+
:form_params => form_params,
|
259
|
+
:body => post_body,
|
260
|
+
:auth_names => auth_names,
|
261
|
+
:return_type => return_type
|
262
|
+
)
|
263
|
+
|
264
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
265
|
+
if @api_client.config.debugging
|
266
|
+
@api_client.config.logger.debug "API called: DefaultApi#create_measurement\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
267
|
+
end
|
268
|
+
return data, status_code, headers
|
269
|
+
end
|
270
|
+
|
216
271
|
# create order
|
217
272
|
# @param [Hash] opts the optional parameters
|
218
273
|
# @option opts [Order] :order
|
@@ -404,6 +459,67 @@ module PrimaryConnectClient
|
|
404
459
|
return data, status_code, headers
|
405
460
|
end
|
406
461
|
|
462
|
+
# show measurement
|
463
|
+
# @param id [String] Measurement ID
|
464
|
+
# @param [Hash] opts the optional parameters
|
465
|
+
# @return [Measurement]
|
466
|
+
def get_measurement(id, opts = {})
|
467
|
+
data, _status_code, _headers = get_measurement_with_http_info(id, opts)
|
468
|
+
data
|
469
|
+
end
|
470
|
+
|
471
|
+
# show measurement
|
472
|
+
# @param id [String] Measurement ID
|
473
|
+
# @param [Hash] opts the optional parameters
|
474
|
+
# @return [Array<(Measurement, Integer, Hash)>] Measurement data, response status code and response headers
|
475
|
+
def get_measurement_with_http_info(id, opts = {})
|
476
|
+
if @api_client.config.debugging
|
477
|
+
@api_client.config.logger.debug 'Calling API: DefaultApi.get_measurement ...'
|
478
|
+
end
|
479
|
+
# verify the required parameter 'id' is set
|
480
|
+
if @api_client.config.client_side_validation && id.nil?
|
481
|
+
fail ArgumentError, "Missing the required parameter 'id' when calling DefaultApi.get_measurement"
|
482
|
+
end
|
483
|
+
# resource path
|
484
|
+
local_var_path = '/api/v1/measurements/{id}'.sub('{' + 'id' + '}', CGI.escape(id.to_s))
|
485
|
+
|
486
|
+
# query parameters
|
487
|
+
query_params = opts[:query_params] || {}
|
488
|
+
|
489
|
+
# header parameters
|
490
|
+
header_params = opts[:header_params] || {}
|
491
|
+
# HTTP header 'Accept' (if needed)
|
492
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
493
|
+
|
494
|
+
# form parameters
|
495
|
+
form_params = opts[:form_params] || {}
|
496
|
+
|
497
|
+
# http body (model)
|
498
|
+
post_body = opts[:debug_body]
|
499
|
+
|
500
|
+
# return_type
|
501
|
+
return_type = opts[:debug_return_type] || 'Measurement'
|
502
|
+
|
503
|
+
# auth_names
|
504
|
+
auth_names = opts[:debug_auth_names] || ['bearer_auth']
|
505
|
+
|
506
|
+
new_options = opts.merge(
|
507
|
+
:operation => :"DefaultApi.get_measurement",
|
508
|
+
:header_params => header_params,
|
509
|
+
:query_params => query_params,
|
510
|
+
:form_params => form_params,
|
511
|
+
:body => post_body,
|
512
|
+
:auth_names => auth_names,
|
513
|
+
:return_type => return_type
|
514
|
+
)
|
515
|
+
|
516
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
517
|
+
if @api_client.config.debugging
|
518
|
+
@api_client.config.logger.debug "API called: DefaultApi#get_measurement\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
519
|
+
end
|
520
|
+
return data, status_code, headers
|
521
|
+
end
|
522
|
+
|
407
523
|
# show order
|
408
524
|
# @param id [String] Order ID
|
409
525
|
# @param [Hash] opts the optional parameters
|
@@ -14,13 +14,14 @@ require 'date'
|
|
14
14
|
require 'time'
|
15
15
|
|
16
16
|
module PrimaryConnectClient
|
17
|
-
class
|
18
|
-
|
17
|
+
class Ids
|
18
|
+
# List of IDs
|
19
|
+
attr_accessor :ids
|
19
20
|
|
20
21
|
# Attribute mapping from ruby-style variable name to JSON key.
|
21
22
|
def self.attribute_map
|
22
23
|
{
|
23
|
-
:'
|
24
|
+
:'ids' => :'ids'
|
24
25
|
}
|
25
26
|
end
|
26
27
|
|
@@ -32,7 +33,7 @@ module PrimaryConnectClient
|
|
32
33
|
# Attribute type mapping.
|
33
34
|
def self.openapi_types
|
34
35
|
{
|
35
|
-
:'
|
36
|
+
:'ids' => :'Array<String>'
|
36
37
|
}
|
37
38
|
end
|
38
39
|
|
@@ -46,19 +47,21 @@ module PrimaryConnectClient
|
|
46
47
|
# @param [Hash] attributes Model attributes in the form of hash
|
47
48
|
def initialize(attributes = {})
|
48
49
|
if (!attributes.is_a?(Hash))
|
49
|
-
fail ArgumentError, "The input argument (attributes) must be a hash in `PrimaryConnectClient::
|
50
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `PrimaryConnectClient::Ids` initialize method"
|
50
51
|
end
|
51
52
|
|
52
53
|
# check to see if the attribute exists and convert string to symbol for hash key
|
53
54
|
attributes = attributes.each_with_object({}) { |(k, v), h|
|
54
55
|
if (!self.class.attribute_map.key?(k.to_sym))
|
55
|
-
fail ArgumentError, "`#{k}` is not a valid attribute in `PrimaryConnectClient::
|
56
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `PrimaryConnectClient::Ids`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
56
57
|
end
|
57
58
|
h[k.to_sym] = v
|
58
59
|
}
|
59
60
|
|
60
|
-
if attributes.key?(:'
|
61
|
-
|
61
|
+
if attributes.key?(:'ids')
|
62
|
+
if (value = attributes[:'ids']).is_a?(Array)
|
63
|
+
self.ids = value
|
64
|
+
end
|
62
65
|
end
|
63
66
|
end
|
64
67
|
|
@@ -80,7 +83,7 @@ module PrimaryConnectClient
|
|
80
83
|
def ==(o)
|
81
84
|
return true if self.equal?(o)
|
82
85
|
self.class == o.class &&
|
83
|
-
|
86
|
+
ids == o.ids
|
84
87
|
end
|
85
88
|
|
86
89
|
# @see the `==` method
|
@@ -92,7 +95,7 @@ module PrimaryConnectClient
|
|
92
95
|
# Calculates hash code according to all attributes.
|
93
96
|
# @return [Integer] Hash code
|
94
97
|
def hash
|
95
|
-
[
|
98
|
+
[ids].hash
|
96
99
|
end
|
97
100
|
|
98
101
|
# Builds the object from hash
|
@@ -14,22 +14,20 @@ require 'date'
|
|
14
14
|
require 'time'
|
15
15
|
|
16
16
|
module PrimaryConnectClient
|
17
|
-
class
|
18
|
-
|
19
|
-
attr_accessor :id
|
17
|
+
class Measurement
|
18
|
+
attr_accessor :meta
|
20
19
|
|
21
|
-
|
22
|
-
attr_accessor :source
|
20
|
+
attr_accessor :subject
|
23
21
|
|
24
|
-
#
|
25
|
-
attr_accessor :
|
22
|
+
# List of result components
|
23
|
+
attr_accessor :metrics
|
26
24
|
|
27
25
|
# Attribute mapping from ruby-style variable name to JSON key.
|
28
26
|
def self.attribute_map
|
29
27
|
{
|
30
|
-
:'
|
31
|
-
:'
|
32
|
-
:'
|
28
|
+
:'meta' => :'meta',
|
29
|
+
:'subject' => :'subject',
|
30
|
+
:'metrics' => :'metrics'
|
33
31
|
}
|
34
32
|
end
|
35
33
|
|
@@ -41,9 +39,9 @@ module PrimaryConnectClient
|
|
41
39
|
# Attribute type mapping.
|
42
40
|
def self.openapi_types
|
43
41
|
{
|
44
|
-
:'
|
45
|
-
:'
|
46
|
-
:'
|
42
|
+
:'meta' => :'Meta',
|
43
|
+
:'subject' => :'Subject',
|
44
|
+
:'metrics' => :'Array<Result>'
|
47
45
|
}
|
48
46
|
end
|
49
47
|
|
@@ -57,27 +55,29 @@ module PrimaryConnectClient
|
|
57
55
|
# @param [Hash] attributes Model attributes in the form of hash
|
58
56
|
def initialize(attributes = {})
|
59
57
|
if (!attributes.is_a?(Hash))
|
60
|
-
fail ArgumentError, "The input argument (attributes) must be a hash in `PrimaryConnectClient::
|
58
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `PrimaryConnectClient::Measurement` initialize method"
|
61
59
|
end
|
62
60
|
|
63
61
|
# check to see if the attribute exists and convert string to symbol for hash key
|
64
62
|
attributes = attributes.each_with_object({}) { |(k, v), h|
|
65
63
|
if (!self.class.attribute_map.key?(k.to_sym))
|
66
|
-
fail ArgumentError, "`#{k}` is not a valid attribute in `PrimaryConnectClient::
|
64
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `PrimaryConnectClient::Measurement`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
67
65
|
end
|
68
66
|
h[k.to_sym] = v
|
69
67
|
}
|
70
68
|
|
71
|
-
if attributes.key?(:'
|
72
|
-
self.
|
69
|
+
if attributes.key?(:'meta')
|
70
|
+
self.meta = attributes[:'meta']
|
73
71
|
end
|
74
72
|
|
75
|
-
if attributes.key?(:'
|
76
|
-
self.
|
73
|
+
if attributes.key?(:'subject')
|
74
|
+
self.subject = attributes[:'subject']
|
77
75
|
end
|
78
76
|
|
79
|
-
if attributes.key?(:'
|
80
|
-
|
77
|
+
if attributes.key?(:'metrics')
|
78
|
+
if (value = attributes[:'metrics']).is_a?(Array)
|
79
|
+
self.metrics = value
|
80
|
+
end
|
81
81
|
end
|
82
82
|
end
|
83
83
|
|
@@ -99,9 +99,9 @@ module PrimaryConnectClient
|
|
99
99
|
def ==(o)
|
100
100
|
return true if self.equal?(o)
|
101
101
|
self.class == o.class &&
|
102
|
-
|
103
|
-
|
104
|
-
|
102
|
+
meta == o.meta &&
|
103
|
+
subject == o.subject &&
|
104
|
+
metrics == o.metrics
|
105
105
|
end
|
106
106
|
|
107
107
|
# @see the `==` method
|
@@ -113,7 +113,7 @@ module PrimaryConnectClient
|
|
113
113
|
# Calculates hash code according to all attributes.
|
114
114
|
# @return [Integer] Hash code
|
115
115
|
def hash
|
116
|
-
[
|
116
|
+
[meta, subject, metrics].hash
|
117
117
|
end
|
118
118
|
|
119
119
|
# Builds the object from hash
|