primary_connect_client 1.0.1 → 1.1.0

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
  SHA256:
3
- metadata.gz: 4309e09dce97c79a423855e4868eb6c5d0b787d885bab942e1f1ce5aeabf0c2c
4
- data.tar.gz: d5e06f08ac02237659e68c2faed491bbccccd9fb426b2c5f4f059ab9e1ad84e9
3
+ metadata.gz: 8e0055d5e48142beffc8ab7495ddc20d455c2f9c4b0dbccb34ba3e71abd7c752
4
+ data.tar.gz: 496b7bc07a672a590c32e7ef4f54ffe545ebf4a300d557a264fd217ccfbdce78
5
5
  SHA512:
6
- metadata.gz: 53475026d49473fb26ae7adc65ab02fe735ccf81d7d042d524ca0e95fa1af189ac8ae7093d1085faec9ddc9e003e9acb215716419b8553e36a7f98158b11da9c
7
- data.tar.gz: 2e5b7ca32fbfea38708e76d012fc56acd37268d91187225304ac5d9a2459cdf501f184d5707132c54737d7eae97ad27a159c099bf28562c8b73c1c17a60f7c6c
6
+ metadata.gz: b4e3c8339be5d814559b62ed300dd503b6ae7503334b86bf3dbf57399679b3c45193fc3745413f7c93e8a8f82150f7608e180206decd9dfafe42f230a4465dc0
7
+ data.tar.gz: 588ccf17788e6ead3147345242a419f066f96634e43756cba7dabbc305f2d44088231f8f1e9b2cc5cdbb56cee124ff12a7ff4f31d7638d119f8c9c33929296a8
data/CHANGELOG.md CHANGED
@@ -1,5 +1,9 @@
1
1
  # Change Log
2
2
 
3
+ ## 1.1.0
4
+
5
+ - Added cancel_order
6
+
3
7
  ## 1.0.1
4
8
 
5
9
  - Updated models to use camelCased keys
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.1
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.1.gem
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.1.gem` to install the development dependencies)
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.1'
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
- opts = {
67
- order: PrimaryConnectClient::Order.new # Order |
68
- }
66
+ id = '01FGD44Q6MVCG2VNSMC4ZMOTQM' # String | Order ID
69
67
 
70
68
  begin
71
- #create order
72
- result = api_instance.create_order(opts)
73
- p result
69
+ #cancel order
70
+ api_instance.cancel_order(id)
74
71
  rescue PrimaryConnectClient::ApiError => e
75
- puts "Exception when calling DefaultApi->create_order: #{e}"
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 = 'id_example' # String | 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** | id | |
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 = 'id_example' # String | 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** | id | |
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] id
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] id
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] id
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] id
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
@@ -11,5 +11,5 @@ OpenAPI Generator version: 5.3.0
11
11
  =end
12
12
 
13
13
  module PrimaryConnectClient
14
- VERSION = '1.0.1'
14
+ VERSION = '1.1.0'
15
15
  end
@@ -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 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 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.1
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-05-20 00:00:00.000000000 Z
11
+ date: 2022-06-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: typhoeus