primary_connect_client 1.0.1 → 1.1.0
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 +4 -0
- data/README.md +9 -11
- data/docs/DefaultApi.md +71 -4
- data/lib/primary_connect_client/api/default_api.rb +65 -4
- data/lib/primary_connect_client/version.rb +1 -1
- data/spec/api/default_api_spec.rb +13 -2
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8e0055d5e48142beffc8ab7495ddc20d455c2f9c4b0dbccb34ba3e71abd7c752
|
4
|
+
data.tar.gz: 496b7bc07a672a590c32e7ef4f54ffe545ebf4a300d557a264fd217ccfbdce78
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b4e3c8339be5d814559b62ed300dd503b6ae7503334b86bf3dbf57399679b3c45193fc3745413f7c93e8a8f82150f7608e180206decd9dfafe42f230a4465dc0
|
7
|
+
data.tar.gz: 588ccf17788e6ead3147345242a419f066f96634e43756cba7dabbc305f2d44088231f8f1e9b2cc5cdbb56cee124ff12a7ff4f31d7638d119f8c9c33929296a8
|
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.0
|
10
|
+
- Package version: 1.1.0
|
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.0.
|
26
|
+
gem install ./primary_connect_client-1.1.0.gem
|
27
27
|
```
|
28
28
|
|
29
|
-
(for development, run `gem install --dev ./primary_connect_client-1.0.
|
29
|
+
(for development, run `gem install --dev ./primary_connect_client-1.1.0.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.0
|
35
|
+
gem 'primary_connect_client', '~> 1.1.0'
|
36
36
|
|
37
37
|
### Install from Git
|
38
38
|
|
@@ -63,16 +63,13 @@ PrimaryConnectClient.configure do |config|
|
|
63
63
|
end
|
64
64
|
|
65
65
|
api_instance = PrimaryConnectClient::DefaultApi.new
|
66
|
-
|
67
|
-
order: PrimaryConnectClient::Order.new # Order |
|
68
|
-
}
|
66
|
+
id = '01FGD44Q6MVCG2VNSMC4ZMOTQM' # String | Order ID
|
69
67
|
|
70
68
|
begin
|
71
|
-
#
|
72
|
-
|
73
|
-
p result
|
69
|
+
#cancel order
|
70
|
+
api_instance.cancel_order(id)
|
74
71
|
rescue PrimaryConnectClient::ApiError => e
|
75
|
-
puts "Exception when calling DefaultApi->
|
72
|
+
puts "Exception when calling DefaultApi->cancel_order: #{e}"
|
76
73
|
end
|
77
74
|
|
78
75
|
```
|
@@ -83,6 +80,7 @@ All URIs are relative to *https://connect.primary.health*
|
|
83
80
|
|
84
81
|
Class | Method | HTTP request | Description
|
85
82
|
------------ | ------------- | ------------- | -------------
|
83
|
+
*PrimaryConnectClient::DefaultApi* | [**cancel_order**](docs/DefaultApi.md#cancel_order) | **DELETE** /api/v1/orders/{id} | cancel order
|
86
84
|
*PrimaryConnectClient::DefaultApi* | [**create_order**](docs/DefaultApi.md#create_order) | **POST** /api/v1/orders | create order
|
87
85
|
*PrimaryConnectClient::DefaultApi* | [**create_result**](docs/DefaultApi.md#create_result) | **POST** /api/v1/orders/{order_id}/results | create result
|
88
86
|
*PrimaryConnectClient::DefaultApi* | [**get_lab_report**](docs/DefaultApi.md#get_lab_report) | **GET** /api/v1/results/{result_id}/lab_report | show lab report
|
data/docs/DefaultApi.md
CHANGED
@@ -4,6 +4,7 @@ All URIs are relative to *https://connect.primary.health*
|
|
4
4
|
|
5
5
|
| Method | HTTP request | Description |
|
6
6
|
| ------ | ------------ | ----------- |
|
7
|
+
| [**cancel_order**](DefaultApi.md#cancel_order) | **DELETE** /api/v1/orders/{id} | cancel order |
|
7
8
|
| [**create_order**](DefaultApi.md#create_order) | **POST** /api/v1/orders | create order |
|
8
9
|
| [**create_result**](DefaultApi.md#create_result) | **POST** /api/v1/orders/{order_id}/results | create result |
|
9
10
|
| [**get_lab_report**](DefaultApi.md#get_lab_report) | **GET** /api/v1/results/{result_id}/lab_report | show lab report |
|
@@ -14,6 +15,72 @@ All URIs are relative to *https://connect.primary.health*
|
|
14
15
|
| [**update_order**](DefaultApi.md#update_order) | **PUT** /api/v1/orders/{id} | update order |
|
15
16
|
|
16
17
|
|
18
|
+
## cancel_order
|
19
|
+
|
20
|
+
> cancel_order(id)
|
21
|
+
|
22
|
+
cancel order
|
23
|
+
|
24
|
+
### Examples
|
25
|
+
|
26
|
+
```ruby
|
27
|
+
require 'time'
|
28
|
+
require 'primary_connect_client'
|
29
|
+
# setup authorization
|
30
|
+
PrimaryConnectClient.configure do |config|
|
31
|
+
# Configure Bearer authorization: bearer_auth
|
32
|
+
config.access_token = 'YOUR_BEARER_TOKEN'
|
33
|
+
end
|
34
|
+
|
35
|
+
api_instance = PrimaryConnectClient::DefaultApi.new
|
36
|
+
id = '01FGD44Q6MVCG2VNSMC4ZMOTQM' # String | Order ID
|
37
|
+
|
38
|
+
begin
|
39
|
+
# cancel order
|
40
|
+
api_instance.cancel_order(id)
|
41
|
+
rescue PrimaryConnectClient::ApiError => e
|
42
|
+
puts "Error when calling DefaultApi->cancel_order: #{e}"
|
43
|
+
end
|
44
|
+
```
|
45
|
+
|
46
|
+
#### Using the cancel_order_with_http_info variant
|
47
|
+
|
48
|
+
This returns an Array which contains the response data (`nil` in this case), status code and headers.
|
49
|
+
|
50
|
+
> <Array(nil, Integer, Hash)> cancel_order_with_http_info(id)
|
51
|
+
|
52
|
+
```ruby
|
53
|
+
begin
|
54
|
+
# cancel order
|
55
|
+
data, status_code, headers = api_instance.cancel_order_with_http_info(id)
|
56
|
+
p status_code # => 2xx
|
57
|
+
p headers # => { ... }
|
58
|
+
p data # => nil
|
59
|
+
rescue PrimaryConnectClient::ApiError => e
|
60
|
+
puts "Error when calling DefaultApi->cancel_order_with_http_info: #{e}"
|
61
|
+
end
|
62
|
+
```
|
63
|
+
|
64
|
+
### Parameters
|
65
|
+
|
66
|
+
| Name | Type | Description | Notes |
|
67
|
+
| ---- | ---- | ----------- | ----- |
|
68
|
+
| **id** | **String** | Order ID | |
|
69
|
+
|
70
|
+
### Return type
|
71
|
+
|
72
|
+
nil (empty response body)
|
73
|
+
|
74
|
+
### Authorization
|
75
|
+
|
76
|
+
[bearer_auth](../README.md#bearer_auth)
|
77
|
+
|
78
|
+
### HTTP request headers
|
79
|
+
|
80
|
+
- **Content-Type**: Not defined
|
81
|
+
- **Accept**: application/json
|
82
|
+
|
83
|
+
|
17
84
|
## create_order
|
18
85
|
|
19
86
|
> <OrderIds> create_order(opts)
|
@@ -238,7 +305,7 @@ PrimaryConnectClient.configure do |config|
|
|
238
305
|
end
|
239
306
|
|
240
307
|
api_instance = PrimaryConnectClient::DefaultApi.new
|
241
|
-
id = '
|
308
|
+
id = '01FGD44Q6MVCG2VNSMC4ZMOTQM' # String | Order ID
|
242
309
|
|
243
310
|
begin
|
244
311
|
# show order
|
@@ -271,7 +338,7 @@ end
|
|
271
338
|
|
272
339
|
| Name | Type | Description | Notes |
|
273
340
|
| ---- | ---- | ----------- | ----- |
|
274
|
-
| **id** | **String** |
|
341
|
+
| **id** | **String** | Order ID | |
|
275
342
|
|
276
343
|
### Return type
|
277
344
|
|
@@ -514,7 +581,7 @@ PrimaryConnectClient.configure do |config|
|
|
514
581
|
end
|
515
582
|
|
516
583
|
api_instance = PrimaryConnectClient::DefaultApi.new
|
517
|
-
id = '
|
584
|
+
id = '01FGD44Q6MVCG2VNSMC4ZMOTQM' # String | Order ID
|
518
585
|
opts = {
|
519
586
|
order: PrimaryConnectClient::Order.new # Order |
|
520
587
|
}
|
@@ -550,7 +617,7 @@ end
|
|
550
617
|
|
551
618
|
| Name | Type | Description | Notes |
|
552
619
|
| ---- | ---- | ----------- | ----- |
|
553
|
-
| **id** | **String** |
|
620
|
+
| **id** | **String** | Order ID | |
|
554
621
|
| **order** | [**Order**](Order.md) | | [optional] |
|
555
622
|
|
556
623
|
### Return type
|
@@ -19,6 +19,67 @@ module PrimaryConnectClient
|
|
19
19
|
def initialize(api_client = ApiClient.default)
|
20
20
|
@api_client = api_client
|
21
21
|
end
|
22
|
+
# cancel order
|
23
|
+
# @param id [String] Order ID
|
24
|
+
# @param [Hash] opts the optional parameters
|
25
|
+
# @return [nil]
|
26
|
+
def cancel_order(id, opts = {})
|
27
|
+
cancel_order_with_http_info(id, opts)
|
28
|
+
nil
|
29
|
+
end
|
30
|
+
|
31
|
+
# cancel order
|
32
|
+
# @param id [String] Order ID
|
33
|
+
# @param [Hash] opts the optional parameters
|
34
|
+
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
|
35
|
+
def cancel_order_with_http_info(id, opts = {})
|
36
|
+
if @api_client.config.debugging
|
37
|
+
@api_client.config.logger.debug 'Calling API: DefaultApi.cancel_order ...'
|
38
|
+
end
|
39
|
+
# verify the required parameter 'id' is set
|
40
|
+
if @api_client.config.client_side_validation && id.nil?
|
41
|
+
fail ArgumentError, "Missing the required parameter 'id' when calling DefaultApi.cancel_order"
|
42
|
+
end
|
43
|
+
# resource path
|
44
|
+
local_var_path = '/api/v1/orders/{id}'.sub('{' + 'id' + '}', CGI.escape(id.to_s))
|
45
|
+
|
46
|
+
# query parameters
|
47
|
+
query_params = opts[:query_params] || {}
|
48
|
+
|
49
|
+
# header parameters
|
50
|
+
header_params = opts[:header_params] || {}
|
51
|
+
# HTTP header 'Accept' (if needed)
|
52
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
53
|
+
|
54
|
+
# form parameters
|
55
|
+
form_params = opts[:form_params] || {}
|
56
|
+
|
57
|
+
# http body (model)
|
58
|
+
post_body = opts[:debug_body]
|
59
|
+
|
60
|
+
# return_type
|
61
|
+
return_type = opts[:debug_return_type]
|
62
|
+
|
63
|
+
# auth_names
|
64
|
+
auth_names = opts[:debug_auth_names] || ['bearer_auth']
|
65
|
+
|
66
|
+
new_options = opts.merge(
|
67
|
+
:operation => :"DefaultApi.cancel_order",
|
68
|
+
:header_params => header_params,
|
69
|
+
:query_params => query_params,
|
70
|
+
:form_params => form_params,
|
71
|
+
:body => post_body,
|
72
|
+
:auth_names => auth_names,
|
73
|
+
:return_type => return_type
|
74
|
+
)
|
75
|
+
|
76
|
+
data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
|
77
|
+
if @api_client.config.debugging
|
78
|
+
@api_client.config.logger.debug "API called: DefaultApi#cancel_order\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
79
|
+
end
|
80
|
+
return data, status_code, headers
|
81
|
+
end
|
82
|
+
|
22
83
|
# create order
|
23
84
|
# @param [Hash] opts the optional parameters
|
24
85
|
# @option opts [Order] :order
|
@@ -211,7 +272,7 @@ module PrimaryConnectClient
|
|
211
272
|
end
|
212
273
|
|
213
274
|
# show order
|
214
|
-
# @param id [String]
|
275
|
+
# @param id [String] Order ID
|
215
276
|
# @param [Hash] opts the optional parameters
|
216
277
|
# @return [OrderWithEventErrors]
|
217
278
|
def get_order(id, opts = {})
|
@@ -220,7 +281,7 @@ module PrimaryConnectClient
|
|
220
281
|
end
|
221
282
|
|
222
283
|
# show order
|
223
|
-
# @param id [String]
|
284
|
+
# @param id [String] Order ID
|
224
285
|
# @param [Hash] opts the optional parameters
|
225
286
|
# @return [Array<(OrderWithEventErrors, Integer, Hash)>] OrderWithEventErrors data, response status code and response headers
|
226
287
|
def get_order_with_http_info(id, opts = {})
|
@@ -455,7 +516,7 @@ module PrimaryConnectClient
|
|
455
516
|
end
|
456
517
|
|
457
518
|
# update order
|
458
|
-
# @param id [String]
|
519
|
+
# @param id [String] Order ID
|
459
520
|
# @param [Hash] opts the optional parameters
|
460
521
|
# @option opts [Order] :order
|
461
522
|
# @return [OrderIds]
|
@@ -465,7 +526,7 @@ module PrimaryConnectClient
|
|
465
526
|
end
|
466
527
|
|
467
528
|
# update order
|
468
|
-
# @param id [String]
|
529
|
+
# @param id [String] Order ID
|
469
530
|
# @param [Hash] opts the optional parameters
|
470
531
|
# @option opts [Order] :order
|
471
532
|
# @return [Array<(OrderIds, Integer, Hash)>] OrderIds data, response status code and response headers
|
@@ -32,6 +32,17 @@ describe 'DefaultApi' do
|
|
32
32
|
end
|
33
33
|
end
|
34
34
|
|
35
|
+
# unit tests for cancel_order
|
36
|
+
# cancel order
|
37
|
+
# @param id Order ID
|
38
|
+
# @param [Hash] opts the optional parameters
|
39
|
+
# @return [nil]
|
40
|
+
describe 'cancel_order test' do
|
41
|
+
it 'should work' do
|
42
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
43
|
+
end
|
44
|
+
end
|
45
|
+
|
35
46
|
# unit tests for create_order
|
36
47
|
# create order
|
37
48
|
# @param [Hash] opts the optional parameters
|
@@ -68,7 +79,7 @@ describe 'DefaultApi' do
|
|
68
79
|
|
69
80
|
# unit tests for get_order
|
70
81
|
# show order
|
71
|
-
# @param id
|
82
|
+
# @param id Order ID
|
72
83
|
# @param [Hash] opts the optional parameters
|
73
84
|
# @return [OrderWithEventErrors]
|
74
85
|
describe 'get_order test' do
|
@@ -114,7 +125,7 @@ describe 'DefaultApi' do
|
|
114
125
|
|
115
126
|
# unit tests for update_order
|
116
127
|
# update order
|
117
|
-
# @param id
|
128
|
+
# @param id Order ID
|
118
129
|
# @param [Hash] opts the optional parameters
|
119
130
|
# @option opts [Order] :order
|
120
131
|
# @return [OrderIds]
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: primary_connect_client
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0
|
4
|
+
version: 1.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- OpenAPI-Generator
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-
|
11
|
+
date: 2022-06-03 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: typhoeus
|