primary_connect_client 0.7.0 → 1.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (147) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +23 -0
  3. data/README.md +63 -20
  4. data/docs/Address.md +32 -0
  5. data/docs/CodedValue.md +22 -0
  6. data/docs/DefaultApi.md +635 -0
  7. data/docs/Demographics.md +52 -0
  8. data/docs/Error.md +18 -0
  9. data/docs/Event.md +26 -0
  10. data/docs/Events.md +18 -0
  11. data/docs/Identifier.md +20 -0
  12. data/docs/Location.md +26 -0
  13. data/docs/Meta.md +34 -0
  14. data/docs/MetaDestinations.md +22 -0
  15. data/docs/MetaMessage.md +20 -0
  16. data/docs/MetaSource.md +20 -0
  17. data/docs/MetaTransmission.md +18 -0
  18. data/docs/Name.md +22 -0
  19. data/docs/Order.md +24 -0
  20. data/docs/OrderIds.md +18 -0
  21. data/docs/OrderOrder.md +58 -0
  22. data/docs/OrderOrderClinicalInfo.md +26 -0
  23. data/docs/OrderOrderDiagnoses.md +22 -0
  24. data/docs/OrderOrderOrderingFacility.md +22 -0
  25. data/docs/OrderOrderSpecimen.md +22 -0
  26. data/docs/OrderWithEventErrors.md +20 -0
  27. data/docs/Orders.md +18 -0
  28. data/docs/OrdersOrders.md +22 -0
  29. data/docs/Patient.md +24 -0
  30. data/docs/PatientContacts.md +28 -0
  31. data/docs/PatientDemographics.md +52 -0
  32. data/docs/PhoneNumber.md +20 -0
  33. data/docs/Provider.md +32 -0
  34. data/docs/Result.md +52 -0
  35. data/docs/ResultIds.md +18 -0
  36. data/docs/ResultReferenceRange.md +22 -0
  37. data/docs/ResultReport.md +22 -0
  38. data/docs/ResultSpecimen.md +22 -0
  39. data/docs/Results.md +20 -0
  40. data/docs/Specimen.md +22 -0
  41. data/docs/Visit.md +36 -0
  42. data/docs/VisitCompany.md +24 -0
  43. data/docs/VisitGuarantor.md +40 -0
  44. data/docs/VisitGuarantorEmployer.md +22 -0
  45. data/docs/VisitInsurances.md +40 -0
  46. data/docs/VisitInsured.md +30 -0
  47. data/docs/VisitPlan.md +22 -0
  48. data/git_push.sh +5 -6
  49. data/lib/primary_connect_client/api/default_api.rb +204 -66
  50. data/lib/primary_connect_client/api_client.rb +5 -6
  51. data/lib/primary_connect_client/api_error.rb +1 -1
  52. data/lib/primary_connect_client/configuration.rb +4 -3
  53. data/lib/primary_connect_client/models/address.rb +281 -0
  54. data/lib/primary_connect_client/models/coded_value.rb +238 -0
  55. data/lib/primary_connect_client/models/demographics.rb +466 -0
  56. data/lib/primary_connect_client/models/error.rb +218 -0
  57. data/lib/primary_connect_client/models/event.rb +254 -0
  58. data/lib/primary_connect_client/models/events.rb +221 -0
  59. data/lib/primary_connect_client/models/identifier.rb +228 -0
  60. data/lib/primary_connect_client/models/location.rb +255 -0
  61. data/lib/primary_connect_client/models/meta.rb +327 -0
  62. data/lib/primary_connect_client/models/meta_destinations.rb +242 -0
  63. data/lib/primary_connect_client/models/meta_message.rb +227 -0
  64. data/lib/primary_connect_client/models/meta_source.rb +227 -0
  65. data/lib/primary_connect_client/models/meta_transmission.rb +218 -0
  66. data/lib/primary_connect_client/models/name.rb +237 -0
  67. data/lib/primary_connect_client/models/order.rb +245 -0
  68. data/lib/primary_connect_client/models/order_ids.rb +221 -0
  69. data/lib/primary_connect_client/models/order_order.rb +496 -0
  70. data/lib/primary_connect_client/models/order_order_clinical_info.rb +260 -0
  71. data/lib/primary_connect_client/models/order_order_diagnoses.rb +272 -0
  72. data/lib/primary_connect_client/models/order_order_ordering_facility.rb +239 -0
  73. data/lib/primary_connect_client/models/order_order_specimen.rb +239 -0
  74. data/lib/primary_connect_client/models/order_with_event_errors.rb +229 -0
  75. data/lib/primary_connect_client/models/orders.rb +221 -0
  76. data/lib/primary_connect_client/models/orders_orders.rb +236 -0
  77. data/lib/primary_connect_client/models/patient.rb +253 -0
  78. data/lib/primary_connect_client/models/patient_contacts.rb +305 -0
  79. data/lib/primary_connect_client/models/patient_demographics.rb +466 -0
  80. data/lib/primary_connect_client/models/phone_number.rb +262 -0
  81. data/lib/primary_connect_client/models/provider.rb +288 -0
  82. data/lib/primary_connect_client/models/result.rb +443 -0
  83. data/lib/primary_connect_client/models/result_ids.rb +221 -0
  84. data/lib/primary_connect_client/models/result_reference_range.rb +240 -0
  85. data/lib/primary_connect_client/models/result_report.rb +240 -0
  86. data/lib/primary_connect_client/models/result_specimen.rb +239 -0
  87. data/lib/primary_connect_client/models/results.rb +230 -0
  88. data/lib/primary_connect_client/models/specimen.rb +239 -0
  89. data/lib/primary_connect_client/models/visit.rb +306 -0
  90. data/lib/primary_connect_client/models/visit_company.rb +248 -0
  91. data/lib/primary_connect_client/models/visit_guarantor.rb +358 -0
  92. data/lib/primary_connect_client/models/visit_guarantor_employer.rb +238 -0
  93. data/lib/primary_connect_client/models/visit_insurances.rb +386 -0
  94. data/lib/primary_connect_client/models/visit_insured.rb +322 -0
  95. data/lib/primary_connect_client/models/visit_plan.rb +238 -0
  96. data/lib/primary_connect_client/version.rb +12 -2
  97. data/lib/primary_connect_client.rb +45 -3
  98. data/primary_connect_client.gemspec +7 -5
  99. data/spec/api/default_api_spec.rb +55 -41
  100. data/spec/api_client_spec.rb +3 -3
  101. data/spec/configuration_spec.rb +1 -1
  102. data/spec/models/address_spec.rb +76 -0
  103. data/spec/models/coded_value_spec.rb +46 -0
  104. data/spec/models/demographics_spec.rb +168 -0
  105. data/spec/models/error_spec.rb +34 -0
  106. data/spec/models/event_spec.rb +58 -0
  107. data/spec/models/events_spec.rb +34 -0
  108. data/spec/models/identifier_spec.rb +40 -0
  109. data/spec/models/location_spec.rb +58 -0
  110. data/spec/models/meta_destinations_spec.rb +46 -0
  111. data/spec/models/meta_message_spec.rb +40 -0
  112. data/spec/models/meta_source_spec.rb +40 -0
  113. data/spec/models/meta_spec.rb +86 -0
  114. data/spec/models/meta_transmission_spec.rb +34 -0
  115. data/spec/models/name_spec.rb +46 -0
  116. data/spec/models/order_ids_spec.rb +34 -0
  117. data/spec/models/order_order_clinical_info_spec.rb +58 -0
  118. data/spec/models/order_order_diagnoses_spec.rb +50 -0
  119. data/spec/models/order_order_ordering_facility_spec.rb +46 -0
  120. data/spec/models/order_order_spec.rb +170 -0
  121. data/spec/models/order_order_specimen_spec.rb +46 -0
  122. data/spec/models/order_spec.rb +52 -0
  123. data/spec/models/order_with_event_errors_spec.rb +40 -0
  124. data/spec/models/orders_orders_spec.rb +46 -0
  125. data/spec/models/orders_spec.rb +34 -0
  126. data/spec/models/patient_contacts_spec.rb +68 -0
  127. data/spec/models/patient_demographics_spec.rb +168 -0
  128. data/spec/models/patient_spec.rb +52 -0
  129. data/spec/models/phone_number_spec.rb +44 -0
  130. data/spec/models/provider_spec.rb +76 -0
  131. data/spec/models/result_ids_spec.rb +34 -0
  132. data/spec/models/result_reference_range_spec.rb +46 -0
  133. data/spec/models/result_report_spec.rb +46 -0
  134. data/spec/models/result_spec.rb +148 -0
  135. data/spec/models/result_specimen_spec.rb +46 -0
  136. data/spec/models/results_spec.rb +40 -0
  137. data/spec/models/specimen_spec.rb +46 -0
  138. data/spec/models/visit_company_spec.rb +52 -0
  139. data/spec/models/visit_guarantor_employer_spec.rb +46 -0
  140. data/spec/models/visit_guarantor_spec.rb +104 -0
  141. data/spec/models/visit_insurances_spec.rb +112 -0
  142. data/spec/models/visit_insured_spec.rb +78 -0
  143. data/spec/models/visit_plan_spec.rb +46 -0
  144. data/spec/models/visit_spec.rb +88 -0
  145. data/spec/spec_helper.rb +1 -1
  146. metadata +177 -20
  147. data/Gemfile.lock +0 -74
@@ -6,7 +6,7 @@
6
6
  The version of the OpenAPI document: v1
7
7
 
8
8
  Generated by: https://openapi-generator.tech
9
- OpenAPI Generator version: 5.3.0-SNAPSHOT
9
+ OpenAPI Generator version: 5.3.0
10
10
 
11
11
  =end
12
12
 
@@ -19,10 +19,71 @@ 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
25
- # @return [Object]
86
+ # @return [OrderIds]
26
87
  def create_order(opts = {})
27
88
  data, _status_code, _headers = create_order_with_http_info(opts)
28
89
  data
@@ -31,7 +92,7 @@ module PrimaryConnectClient
31
92
  # create order
32
93
  # @param [Hash] opts the optional parameters
33
94
  # @option opts [Order] :order
34
- # @return [Array<(Object, Integer, Hash)>] Object data, response status code and response headers
95
+ # @return [Array<(OrderIds, Integer, Hash)>] OrderIds data, response status code and response headers
35
96
  def create_order_with_http_info(opts = {})
36
97
  if @api_client.config.debugging
37
98
  @api_client.config.logger.debug 'Calling API: DefaultApi.create_order ...'
@@ -47,7 +108,10 @@ module PrimaryConnectClient
47
108
  # HTTP header 'Accept' (if needed)
48
109
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
49
110
  # HTTP header 'Content-Type'
50
- header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
111
+ content_type = @api_client.select_header_content_type(['application/json'])
112
+ if !content_type.nil?
113
+ header_params['Content-Type'] = content_type
114
+ end
51
115
 
52
116
  # form parameters
53
117
  form_params = opts[:form_params] || {}
@@ -56,7 +120,7 @@ module PrimaryConnectClient
56
120
  post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'order'])
57
121
 
58
122
  # return_type
59
- return_type = opts[:debug_return_type] || 'Object'
123
+ return_type = opts[:debug_return_type] || 'OrderIds'
60
124
 
61
125
  # auth_names
62
126
  auth_names = opts[:debug_auth_names] || ['bearer_auth']
@@ -78,29 +142,31 @@ module PrimaryConnectClient
78
142
  return data, status_code, headers
79
143
  end
80
144
 
81
- # show order
82
- # @param id [String] id
145
+ # create result
146
+ # @param order_id [String] Order id
83
147
  # @param [Hash] opts the optional parameters
84
- # @return [Object]
85
- def get_order(id, opts = {})
86
- data, _status_code, _headers = get_order_with_http_info(id, opts)
148
+ # @option opts [Result] :result
149
+ # @return [ResultIds]
150
+ def create_result(order_id, opts = {})
151
+ data, _status_code, _headers = create_result_with_http_info(order_id, opts)
87
152
  data
88
153
  end
89
154
 
90
- # show order
91
- # @param id [String] id
155
+ # create result
156
+ # @param order_id [String] Order id
92
157
  # @param [Hash] opts the optional parameters
93
- # @return [Array<(Object, Integer, Hash)>] Object data, response status code and response headers
94
- def get_order_with_http_info(id, opts = {})
158
+ # @option opts [Result] :result
159
+ # @return [Array<(ResultIds, Integer, Hash)>] ResultIds data, response status code and response headers
160
+ def create_result_with_http_info(order_id, opts = {})
95
161
  if @api_client.config.debugging
96
- @api_client.config.logger.debug 'Calling API: DefaultApi.get_order ...'
162
+ @api_client.config.logger.debug 'Calling API: DefaultApi.create_result ...'
97
163
  end
98
- # verify the required parameter 'id' is set
99
- if @api_client.config.client_side_validation && id.nil?
100
- fail ArgumentError, "Missing the required parameter 'id' when calling DefaultApi.get_order"
164
+ # verify the required parameter 'order_id' is set
165
+ if @api_client.config.client_side_validation && order_id.nil?
166
+ fail ArgumentError, "Missing the required parameter 'order_id' when calling DefaultApi.create_result"
101
167
  end
102
168
  # resource path
103
- local_var_path = '/api/v1/orders/{id}'.sub('{' + 'id' + '}', CGI.escape(id.to_s))
169
+ local_var_path = '/api/v1/orders/{order_id}/results'.sub('{' + 'order_id' + '}', CGI.escape(order_id.to_s))
104
170
 
105
171
  # query parameters
106
172
  query_params = opts[:query_params] || {}
@@ -109,21 +175,26 @@ module PrimaryConnectClient
109
175
  header_params = opts[:header_params] || {}
110
176
  # HTTP header 'Accept' (if needed)
111
177
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
178
+ # HTTP header 'Content-Type'
179
+ content_type = @api_client.select_header_content_type(['application/json'])
180
+ if !content_type.nil?
181
+ header_params['Content-Type'] = content_type
182
+ end
112
183
 
113
184
  # form parameters
114
185
  form_params = opts[:form_params] || {}
115
186
 
116
187
  # http body (model)
117
- post_body = opts[:debug_body]
188
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'result'])
118
189
 
119
190
  # return_type
120
- return_type = opts[:debug_return_type] || 'Object'
191
+ return_type = opts[:debug_return_type] || 'ResultIds'
121
192
 
122
193
  # auth_names
123
194
  auth_names = opts[:debug_auth_names] || ['bearer_auth']
124
195
 
125
196
  new_options = opts.merge(
126
- :operation => :"DefaultApi.get_order",
197
+ :operation => :"DefaultApi.create_result",
127
198
  :header_params => header_params,
128
199
  :query_params => query_params,
129
200
  :form_params => form_params,
@@ -132,9 +203,9 @@ module PrimaryConnectClient
132
203
  :return_type => return_type
133
204
  )
134
205
 
135
- data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
206
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
136
207
  if @api_client.config.debugging
137
- @api_client.config.logger.debug "API called: DefaultApi#get_order\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
208
+ @api_client.config.logger.debug "API called: DefaultApi#create_result\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
138
209
  end
139
210
  return data, status_code, headers
140
211
  end
@@ -142,9 +213,10 @@ module PrimaryConnectClient
142
213
  # show lab report
143
214
  # @param result_id [String] Result id
144
215
  # @param [Hash] opts the optional parameters
145
- # @return report
216
+ # @return [nil]
146
217
  def get_lab_report(result_id, opts = {})
147
218
  get_lab_report_with_http_info(result_id, opts)
219
+ nil
148
220
  end
149
221
 
150
222
  # show lab report
@@ -167,6 +239,8 @@ module PrimaryConnectClient
167
239
 
168
240
  # header parameters
169
241
  header_params = opts[:header_params] || {}
242
+ # HTTP header 'Accept' (if needed)
243
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
170
244
 
171
245
  # form parameters
172
246
  form_params = opts[:form_params] || {}
@@ -175,7 +249,7 @@ module PrimaryConnectClient
175
249
  post_body = opts[:debug_body]
176
250
 
177
251
  # return_type
178
- return_type = opts[:debug_return_type] || 'String'
252
+ return_type = opts[:debug_return_type]
179
253
 
180
254
  # auth_names
181
255
  auth_names = opts[:debug_auth_names] || ['bearer_auth']
@@ -194,44 +268,40 @@ module PrimaryConnectClient
194
268
  if @api_client.config.debugging
195
269
  @api_client.config.logger.debug "API called: DefaultApi#get_lab_report\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
196
270
  end
197
- return data
271
+ return data, status_code, headers
198
272
  end
199
273
 
200
- # show result
201
- # @param order_id [String] Order id
202
- # @param id [String] Result id
274
+ # show order
275
+ # @param id [String] Order ID
203
276
  # @param [Hash] opts the optional parameters
204
- # @return [nil]
205
- def get_result(order_id, id, opts = {})
206
- get_result_with_http_info(order_id, id, opts)
207
- nil
277
+ # @return [OrderWithEventErrors]
278
+ def get_order(id, opts = {})
279
+ data, _status_code, _headers = get_order_with_http_info(id, opts)
280
+ data
208
281
  end
209
282
 
210
- # show result
211
- # @param order_id [String] Order id
212
- # @param id [String] Result id
283
+ # show order
284
+ # @param id [String] Order ID
213
285
  # @param [Hash] opts the optional parameters
214
- # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
215
- def get_result_with_http_info(order_id, id, opts = {})
286
+ # @return [Array<(OrderWithEventErrors, Integer, Hash)>] OrderWithEventErrors data, response status code and response headers
287
+ def get_order_with_http_info(id, opts = {})
216
288
  if @api_client.config.debugging
217
- @api_client.config.logger.debug 'Calling API: DefaultApi.get_result ...'
218
- end
219
- # verify the required parameter 'order_id' is set
220
- if @api_client.config.client_side_validation && order_id.nil?
221
- fail ArgumentError, "Missing the required parameter 'order_id' when calling DefaultApi.get_result"
289
+ @api_client.config.logger.debug 'Calling API: DefaultApi.get_order ...'
222
290
  end
223
291
  # verify the required parameter 'id' is set
224
292
  if @api_client.config.client_side_validation && id.nil?
225
- fail ArgumentError, "Missing the required parameter 'id' when calling DefaultApi.get_result"
293
+ fail ArgumentError, "Missing the required parameter 'id' when calling DefaultApi.get_order"
226
294
  end
227
295
  # resource path
228
- local_var_path = '/api/v1/orders/{order_id}/results/{id}'.sub('{' + 'order_id' + '}', CGI.escape(order_id.to_s)).sub('{' + 'id' + '}', CGI.escape(id.to_s))
296
+ local_var_path = '/api/v1/orders/{id}'.sub('{' + 'id' + '}', CGI.escape(id.to_s))
229
297
 
230
298
  # query parameters
231
299
  query_params = opts[:query_params] || {}
232
300
 
233
301
  # header parameters
234
302
  header_params = opts[:header_params] || {}
303
+ # HTTP header 'Accept' (if needed)
304
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
235
305
 
236
306
  # form parameters
237
307
  form_params = opts[:form_params] || {}
@@ -240,13 +310,13 @@ module PrimaryConnectClient
240
310
  post_body = opts[:debug_body]
241
311
 
242
312
  # return_type
243
- return_type = opts[:debug_return_type]
313
+ return_type = opts[:debug_return_type] || 'OrderWithEventErrors'
244
314
 
245
315
  # auth_names
246
316
  auth_names = opts[:debug_auth_names] || ['bearer_auth']
247
317
 
248
318
  new_options = opts.merge(
249
- :operation => :"DefaultApi.get_result",
319
+ :operation => :"DefaultApi.get_order",
250
320
  :header_params => header_params,
251
321
  :query_params => query_params,
252
322
  :form_params => form_params,
@@ -257,16 +327,16 @@ module PrimaryConnectClient
257
327
 
258
328
  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
259
329
  if @api_client.config.debugging
260
- @api_client.config.logger.debug "API called: DefaultApi#get_result\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
330
+ @api_client.config.logger.debug "API called: DefaultApi#get_order\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
261
331
  end
262
332
  return data, status_code, headers
263
333
  end
264
334
 
265
335
  # list events
266
336
  # @param [Hash] opts the optional parameters
267
- # @option opts [String] :last_event_id Paginate events with event id
268
- # @option opts [String] :event_types Filter event_types, comma delimited
269
- # @return [Object]
337
+ # @option opts [String] :last_event_id Paginate events with event id. 26 character, sortable id.
338
+ # @option opts [String] :event_types Filter event_types, comma delimited. [OrderComplete, OrderCreated, OrderError, OrderResulted, OrderUpdated, ResultError, SpecimenReceived]
339
+ # @return [Events]
270
340
  def list_events(opts = {})
271
341
  data, _status_code, _headers = list_events_with_http_info(opts)
272
342
  data
@@ -274,9 +344,9 @@ module PrimaryConnectClient
274
344
 
275
345
  # list events
276
346
  # @param [Hash] opts the optional parameters
277
- # @option opts [String] :last_event_id Paginate events with event id
278
- # @option opts [String] :event_types Filter event_types, comma delimited
279
- # @return [Array<(Object, Integer, Hash)>] Object data, response status code and response headers
347
+ # @option opts [String] :last_event_id Paginate events with event id. 26 character, sortable id.
348
+ # @option opts [String] :event_types Filter event_types, comma delimited. [OrderComplete, OrderCreated, OrderError, OrderResulted, OrderUpdated, ResultError, SpecimenReceived]
349
+ # @return [Array<(Events, Integer, Hash)>] Events data, response status code and response headers
280
350
  def list_events_with_http_info(opts = {})
281
351
  if @api_client.config.debugging
282
352
  @api_client.config.logger.debug 'Calling API: DefaultApi.list_events ...'
@@ -301,7 +371,7 @@ module PrimaryConnectClient
301
371
  post_body = opts[:debug_body]
302
372
 
303
373
  # return_type
304
- return_type = opts[:debug_return_type] || 'Object'
374
+ return_type = opts[:debug_return_type] || 'Events'
305
375
 
306
376
  # auth_names
307
377
  auth_names = opts[:debug_auth_names] || ['bearer_auth']
@@ -325,9 +395,9 @@ module PrimaryConnectClient
325
395
 
326
396
  # list orders
327
397
  # @param [Hash] opts the optional parameters
328
- # @option opts [String] :last_order_id Paginate orders with order id
329
- # @option opts [String] :state Filter orders by state, comma delimited
330
- # @return [Object]
398
+ # @option opts [String] :last_order_id Paginate orders with order id. 26 character, sortable id.
399
+ # @option opts [String] :state Filter orders by state, comma delimited.[new, updated, delivered, processing, resulted, errored, canceled, unprocessable]
400
+ # @return [Orders]
331
401
  def list_orders(opts = {})
332
402
  data, _status_code, _headers = list_orders_with_http_info(opts)
333
403
  data
@@ -335,9 +405,9 @@ module PrimaryConnectClient
335
405
 
336
406
  # list orders
337
407
  # @param [Hash] opts the optional parameters
338
- # @option opts [String] :last_order_id Paginate orders with order id
339
- # @option opts [String] :state Filter orders by state, comma delimited
340
- # @return [Array<(Object, Integer, Hash)>] Object data, response status code and response headers
408
+ # @option opts [String] :last_order_id Paginate orders with order id. 26 character, sortable id.
409
+ # @option opts [String] :state Filter orders by state, comma delimited.[new, updated, delivered, processing, resulted, errored, canceled, unprocessable]
410
+ # @return [Array<(Orders, Integer, Hash)>] Orders data, response status code and response headers
341
411
  def list_orders_with_http_info(opts = {})
342
412
  if @api_client.config.debugging
343
413
  @api_client.config.logger.debug 'Calling API: DefaultApi.list_orders ...'
@@ -362,7 +432,7 @@ module PrimaryConnectClient
362
432
  post_body = opts[:debug_body]
363
433
 
364
434
  # return_type
365
- return_type = opts[:debug_return_type] || 'Object'
435
+ return_type = opts[:debug_return_type] || 'Orders'
366
436
 
367
437
  # auth_names
368
438
  auth_names = opts[:debug_auth_names] || ['bearer_auth']
@@ -387,7 +457,7 @@ module PrimaryConnectClient
387
457
  # list results
388
458
  # @param order_id [String] Order id
389
459
  # @param [Hash] opts the optional parameters
390
- # @return [Object]
460
+ # @return [Results]
391
461
  def list_results(order_id, opts = {})
392
462
  data, _status_code, _headers = list_results_with_http_info(order_id, opts)
393
463
  data
@@ -396,7 +466,7 @@ module PrimaryConnectClient
396
466
  # list results
397
467
  # @param order_id [String] Order id
398
468
  # @param [Hash] opts the optional parameters
399
- # @return [Array<(Object, Integer, Hash)>] Object data, response status code and response headers
469
+ # @return [Array<(Results, Integer, Hash)>] Results data, response status code and response headers
400
470
  def list_results_with_http_info(order_id, opts = {})
401
471
  if @api_client.config.debugging
402
472
  @api_client.config.logger.debug 'Calling API: DefaultApi.list_results ...'
@@ -423,7 +493,7 @@ module PrimaryConnectClient
423
493
  post_body = opts[:debug_body]
424
494
 
425
495
  # return_type
426
- return_type = opts[:debug_return_type] || 'Object'
496
+ return_type = opts[:debug_return_type] || 'Results'
427
497
 
428
498
  # auth_names
429
499
  auth_names = opts[:debug_auth_names] || ['bearer_auth']
@@ -444,5 +514,73 @@ module PrimaryConnectClient
444
514
  end
445
515
  return data, status_code, headers
446
516
  end
517
+
518
+ # update order
519
+ # @param id [String] Order ID
520
+ # @param [Hash] opts the optional parameters
521
+ # @option opts [Order] :order
522
+ # @return [OrderIds]
523
+ def update_order(id, opts = {})
524
+ data, _status_code, _headers = update_order_with_http_info(id, opts)
525
+ data
526
+ end
527
+
528
+ # update order
529
+ # @param id [String] Order ID
530
+ # @param [Hash] opts the optional parameters
531
+ # @option opts [Order] :order
532
+ # @return [Array<(OrderIds, Integer, Hash)>] OrderIds data, response status code and response headers
533
+ def update_order_with_http_info(id, opts = {})
534
+ if @api_client.config.debugging
535
+ @api_client.config.logger.debug 'Calling API: DefaultApi.update_order ...'
536
+ end
537
+ # verify the required parameter 'id' is set
538
+ if @api_client.config.client_side_validation && id.nil?
539
+ fail ArgumentError, "Missing the required parameter 'id' when calling DefaultApi.update_order"
540
+ end
541
+ # resource path
542
+ local_var_path = '/api/v1/orders/{id}'.sub('{' + 'id' + '}', CGI.escape(id.to_s))
543
+
544
+ # query parameters
545
+ query_params = opts[:query_params] || {}
546
+
547
+ # header parameters
548
+ header_params = opts[:header_params] || {}
549
+ # HTTP header 'Accept' (if needed)
550
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
551
+ # HTTP header 'Content-Type'
552
+ content_type = @api_client.select_header_content_type(['application/json'])
553
+ if !content_type.nil?
554
+ header_params['Content-Type'] = content_type
555
+ end
556
+
557
+ # form parameters
558
+ form_params = opts[:form_params] || {}
559
+
560
+ # http body (model)
561
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'order'])
562
+
563
+ # return_type
564
+ return_type = opts[:debug_return_type] || 'OrderIds'
565
+
566
+ # auth_names
567
+ auth_names = opts[:debug_auth_names] || ['bearer_auth']
568
+
569
+ new_options = opts.merge(
570
+ :operation => :"DefaultApi.update_order",
571
+ :header_params => header_params,
572
+ :query_params => query_params,
573
+ :form_params => form_params,
574
+ :body => post_body,
575
+ :auth_names => auth_names,
576
+ :return_type => return_type
577
+ )
578
+
579
+ data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
580
+ if @api_client.config.debugging
581
+ @api_client.config.logger.debug "API called: DefaultApi#update_order\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
582
+ end
583
+ return data, status_code, headers
584
+ end
447
585
  end
448
586
  end
@@ -6,7 +6,7 @@
6
6
  The version of the OpenAPI document: v1
7
7
 
8
8
  Generated by: https://openapi-generator.tech
9
- OpenAPI Generator version: 5.2.1-SNAPSHOT
9
+ OpenAPI Generator version: 5.3.0
10
10
 
11
11
  =end
12
12
 
@@ -109,8 +109,7 @@ module PrimaryConnectClient
109
109
  :ssl_verifyhost => _verify_ssl_host,
110
110
  :sslcert => @config.cert_file,
111
111
  :sslkey => @config.key_file,
112
- :verbose => @config.debugging,
113
- :followlocation => true
112
+ :verbose => @config.debugging
114
113
  }
115
114
 
116
115
  # set custom cert, if provided
@@ -297,7 +296,7 @@ module PrimaryConnectClient
297
296
  @config.base_url(opts[:operation]) + path
298
297
  end
299
298
 
300
- # Update hearder and query params based on authentication settings.
299
+ # Update header and query params based on authentication settings.
301
300
  #
302
301
  # @param [Hash] header_params Header parameters
303
302
  # @param [Hash] query_params Query parameters
@@ -336,8 +335,8 @@ module PrimaryConnectClient
336
335
  # @param [Array] content_types array for Content-Type
337
336
  # @return [String] the Content-Type header (e.g. application/json)
338
337
  def select_header_content_type(content_types)
339
- # use application/json by default
340
- return 'application/json' if content_types.nil? || content_types.empty?
338
+ # return nil by default
339
+ return if content_types.nil? || content_types.empty?
341
340
  # use JSON when present, otherwise use the first one
342
341
  json_content_type = content_types.find { |s| json_mime?(s) }
343
342
  json_content_type || content_types.first
@@ -6,7 +6,7 @@
6
6
  The version of the OpenAPI document: v1
7
7
 
8
8
  Generated by: https://openapi-generator.tech
9
- OpenAPI Generator version: 5.2.1-SNAPSHOT
9
+ OpenAPI Generator version: 5.3.0
10
10
 
11
11
  =end
12
12
 
@@ -6,7 +6,7 @@
6
6
  The version of the OpenAPI document: v1
7
7
 
8
8
  Generated by: https://openapi-generator.tech
9
- OpenAPI Generator version: 5.2.1-SNAPSHOT
9
+ OpenAPI Generator version: 5.3.0
10
10
 
11
11
  =end
12
12
 
@@ -147,14 +147,14 @@ module PrimaryConnectClient
147
147
  @server_operation_variables = {}
148
148
  @api_key = {}
149
149
  @api_key_prefix = {}
150
- @timeout = 0
151
150
  @client_side_validation = true
152
151
  @verify_ssl = true
153
152
  @verify_ssl_host = true
154
153
  @params_encoding = nil
155
154
  @cert_file = nil
156
155
  @key_file = nil
157
- @debugging = true
156
+ @timeout = 0
157
+ @debugging = false
158
158
  @inject_format = false
159
159
  @force_ending_format = false
160
160
  @logger = defined?(Rails) ? Rails.logger : Logger.new(STDOUT)
@@ -289,5 +289,6 @@ module PrimaryConnectClient
289
289
 
290
290
  url
291
291
  end
292
+
292
293
  end
293
294
  end