primary_connect_client 0.8.0 → 1.0.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.
Files changed (147) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +15 -0
  3. data/README.md +61 -16
  4. data/docs/Address.md +32 -0
  5. data/docs/CodedValue.md +22 -0
  6. data/docs/DefaultApi.md +568 -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 +143 -67
  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 +3 -2
  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 +44 -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
 
@@ -22,7 +22,7 @@ module PrimaryConnectClient
22
22
  # create order
23
23
  # @param [Hash] opts the optional parameters
24
24
  # @option opts [Order] :order
25
- # @return [Object]
25
+ # @return [OrderIds]
26
26
  def create_order(opts = {})
27
27
  data, _status_code, _headers = create_order_with_http_info(opts)
28
28
  data
@@ -31,7 +31,7 @@ module PrimaryConnectClient
31
31
  # create order
32
32
  # @param [Hash] opts the optional parameters
33
33
  # @option opts [Order] :order
34
- # @return [Array<(Object, Integer, Hash)>] Object data, response status code and response headers
34
+ # @return [Array<(OrderIds, Integer, Hash)>] OrderIds data, response status code and response headers
35
35
  def create_order_with_http_info(opts = {})
36
36
  if @api_client.config.debugging
37
37
  @api_client.config.logger.debug 'Calling API: DefaultApi.create_order ...'
@@ -47,7 +47,10 @@ module PrimaryConnectClient
47
47
  # HTTP header 'Accept' (if needed)
48
48
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
49
49
  # HTTP header 'Content-Type'
50
- header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
50
+ content_type = @api_client.select_header_content_type(['application/json'])
51
+ if !content_type.nil?
52
+ header_params['Content-Type'] = content_type
53
+ end
51
54
 
52
55
  # form parameters
53
56
  form_params = opts[:form_params] || {}
@@ -56,7 +59,7 @@ module PrimaryConnectClient
56
59
  post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'order'])
57
60
 
58
61
  # return_type
59
- return_type = opts[:debug_return_type] || 'Object'
62
+ return_type = opts[:debug_return_type] || 'OrderIds'
60
63
 
61
64
  # auth_names
62
65
  auth_names = opts[:debug_auth_names] || ['bearer_auth']
@@ -78,29 +81,31 @@ module PrimaryConnectClient
78
81
  return data, status_code, headers
79
82
  end
80
83
 
81
- # show order
82
- # @param id [String] id
84
+ # create result
85
+ # @param order_id [String] Order id
83
86
  # @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)
87
+ # @option opts [Result] :result
88
+ # @return [ResultIds]
89
+ def create_result(order_id, opts = {})
90
+ data, _status_code, _headers = create_result_with_http_info(order_id, opts)
87
91
  data
88
92
  end
89
93
 
90
- # show order
91
- # @param id [String] id
94
+ # create result
95
+ # @param order_id [String] Order id
92
96
  # @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 = {})
97
+ # @option opts [Result] :result
98
+ # @return [Array<(ResultIds, Integer, Hash)>] ResultIds data, response status code and response headers
99
+ def create_result_with_http_info(order_id, opts = {})
95
100
  if @api_client.config.debugging
96
- @api_client.config.logger.debug 'Calling API: DefaultApi.get_order ...'
101
+ @api_client.config.logger.debug 'Calling API: DefaultApi.create_result ...'
97
102
  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"
103
+ # verify the required parameter 'order_id' is set
104
+ if @api_client.config.client_side_validation && order_id.nil?
105
+ fail ArgumentError, "Missing the required parameter 'order_id' when calling DefaultApi.create_result"
101
106
  end
102
107
  # resource path
103
- local_var_path = '/api/v1/orders/{id}'.sub('{' + 'id' + '}', CGI.escape(id.to_s))
108
+ local_var_path = '/api/v1/orders/{order_id}/results'.sub('{' + 'order_id' + '}', CGI.escape(order_id.to_s))
104
109
 
105
110
  # query parameters
106
111
  query_params = opts[:query_params] || {}
@@ -109,21 +114,26 @@ module PrimaryConnectClient
109
114
  header_params = opts[:header_params] || {}
110
115
  # HTTP header 'Accept' (if needed)
111
116
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
117
+ # HTTP header 'Content-Type'
118
+ content_type = @api_client.select_header_content_type(['application/json'])
119
+ if !content_type.nil?
120
+ header_params['Content-Type'] = content_type
121
+ end
112
122
 
113
123
  # form parameters
114
124
  form_params = opts[:form_params] || {}
115
125
 
116
126
  # http body (model)
117
- post_body = opts[:debug_body]
127
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'result'])
118
128
 
119
129
  # return_type
120
- return_type = opts[:debug_return_type] || 'Object'
130
+ return_type = opts[:debug_return_type] || 'ResultIds'
121
131
 
122
132
  # auth_names
123
133
  auth_names = opts[:debug_auth_names] || ['bearer_auth']
124
134
 
125
135
  new_options = opts.merge(
126
- :operation => :"DefaultApi.get_order",
136
+ :operation => :"DefaultApi.create_result",
127
137
  :header_params => header_params,
128
138
  :query_params => query_params,
129
139
  :form_params => form_params,
@@ -132,9 +142,9 @@ module PrimaryConnectClient
132
142
  :return_type => return_type
133
143
  )
134
144
 
135
- data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
145
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
136
146
  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}"
147
+ @api_client.config.logger.debug "API called: DefaultApi#create_result\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
138
148
  end
139
149
  return data, status_code, headers
140
150
  end
@@ -142,9 +152,10 @@ module PrimaryConnectClient
142
152
  # show lab report
143
153
  # @param result_id [String] Result id
144
154
  # @param [Hash] opts the optional parameters
145
- # @return report SS: previously generated as nil
155
+ # @return [nil]
146
156
  def get_lab_report(result_id, opts = {})
147
157
  get_lab_report_with_http_info(result_id, opts)
158
+ nil
148
159
  end
149
160
 
150
161
  # show lab report
@@ -167,6 +178,8 @@ module PrimaryConnectClient
167
178
 
168
179
  # header parameters
169
180
  header_params = opts[:header_params] || {}
181
+ # HTTP header 'Accept' (if needed)
182
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
170
183
 
171
184
  # form parameters
172
185
  form_params = opts[:form_params] || {}
@@ -175,7 +188,7 @@ module PrimaryConnectClient
175
188
  post_body = opts[:debug_body]
176
189
 
177
190
  # return_type
178
- return_type = opts[:debug_return_type] || 'String' # SS: set lab report return type as String
191
+ return_type = opts[:debug_return_type]
179
192
 
180
193
  # auth_names
181
194
  auth_names = opts[:debug_auth_names] || ['bearer_auth']
@@ -190,49 +203,44 @@ module PrimaryConnectClient
190
203
  :return_type => return_type
191
204
  )
192
205
 
193
- # SS: Previously generated as nil so nothing was returned. Added below to get the lab report
194
206
  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
195
207
  if @api_client.config.debugging
196
208
  @api_client.config.logger.debug "API called: DefaultApi#get_lab_report\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
197
209
  end
198
- return data
210
+ return data, status_code, headers
199
211
  end
200
212
 
201
- # show result
202
- # @param order_id [String] Order id
203
- # @param id [String] Result id
213
+ # show order
214
+ # @param id [String] id
204
215
  # @param [Hash] opts the optional parameters
205
- # @return [nil]
206
- def get_result(order_id, id, opts = {})
207
- get_result_with_http_info(order_id, id, opts)
208
- nil
216
+ # @return [OrderWithEventErrors]
217
+ def get_order(id, opts = {})
218
+ data, _status_code, _headers = get_order_with_http_info(id, opts)
219
+ data
209
220
  end
210
221
 
211
- # show result
212
- # @param order_id [String] Order id
213
- # @param id [String] Result id
222
+ # show order
223
+ # @param id [String] id
214
224
  # @param [Hash] opts the optional parameters
215
- # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
216
- def get_result_with_http_info(order_id, id, opts = {})
225
+ # @return [Array<(OrderWithEventErrors, Integer, Hash)>] OrderWithEventErrors data, response status code and response headers
226
+ def get_order_with_http_info(id, opts = {})
217
227
  if @api_client.config.debugging
218
- @api_client.config.logger.debug 'Calling API: DefaultApi.get_result ...'
219
- end
220
- # verify the required parameter 'order_id' is set
221
- if @api_client.config.client_side_validation && order_id.nil?
222
- fail ArgumentError, "Missing the required parameter 'order_id' when calling DefaultApi.get_result"
228
+ @api_client.config.logger.debug 'Calling API: DefaultApi.get_order ...'
223
229
  end
224
230
  # verify the required parameter 'id' is set
225
231
  if @api_client.config.client_side_validation && id.nil?
226
- fail ArgumentError, "Missing the required parameter 'id' when calling DefaultApi.get_result"
232
+ fail ArgumentError, "Missing the required parameter 'id' when calling DefaultApi.get_order"
227
233
  end
228
234
  # resource path
229
- 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))
235
+ local_var_path = '/api/v1/orders/{id}'.sub('{' + 'id' + '}', CGI.escape(id.to_s))
230
236
 
231
237
  # query parameters
232
238
  query_params = opts[:query_params] || {}
233
239
 
234
240
  # header parameters
235
241
  header_params = opts[:header_params] || {}
242
+ # HTTP header 'Accept' (if needed)
243
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
236
244
 
237
245
  # form parameters
238
246
  form_params = opts[:form_params] || {}
@@ -241,13 +249,13 @@ module PrimaryConnectClient
241
249
  post_body = opts[:debug_body]
242
250
 
243
251
  # return_type
244
- return_type = opts[:debug_return_type]
252
+ return_type = opts[:debug_return_type] || 'OrderWithEventErrors'
245
253
 
246
254
  # auth_names
247
255
  auth_names = opts[:debug_auth_names] || ['bearer_auth']
248
256
 
249
257
  new_options = opts.merge(
250
- :operation => :"DefaultApi.get_result",
258
+ :operation => :"DefaultApi.get_order",
251
259
  :header_params => header_params,
252
260
  :query_params => query_params,
253
261
  :form_params => form_params,
@@ -258,16 +266,16 @@ module PrimaryConnectClient
258
266
 
259
267
  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
260
268
  if @api_client.config.debugging
261
- @api_client.config.logger.debug "API called: DefaultApi#get_result\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
269
+ @api_client.config.logger.debug "API called: DefaultApi#get_order\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
262
270
  end
263
271
  return data, status_code, headers
264
272
  end
265
273
 
266
274
  # list events
267
275
  # @param [Hash] opts the optional parameters
268
- # @option opts [String] :last_event_id Paginate events with event id
269
- # @option opts [String] :event_types Filter event_types, comma delimited
270
- # @return [Object]
276
+ # @option opts [String] :last_event_id Paginate events with event id. 26 character, sortable id.
277
+ # @option opts [String] :event_types Filter event_types, comma delimited. [OrderComplete, OrderCreated, OrderError, OrderResulted, OrderUpdated, ResultError, SpecimenReceived]
278
+ # @return [Events]
271
279
  def list_events(opts = {})
272
280
  data, _status_code, _headers = list_events_with_http_info(opts)
273
281
  data
@@ -275,9 +283,9 @@ module PrimaryConnectClient
275
283
 
276
284
  # list events
277
285
  # @param [Hash] opts the optional parameters
278
- # @option opts [String] :last_event_id Paginate events with event id
279
- # @option opts [String] :event_types Filter event_types, comma delimited
280
- # @return [Array<(Object, Integer, Hash)>] Object data, response status code and response headers
286
+ # @option opts [String] :last_event_id Paginate events with event id. 26 character, sortable id.
287
+ # @option opts [String] :event_types Filter event_types, comma delimited. [OrderComplete, OrderCreated, OrderError, OrderResulted, OrderUpdated, ResultError, SpecimenReceived]
288
+ # @return [Array<(Events, Integer, Hash)>] Events data, response status code and response headers
281
289
  def list_events_with_http_info(opts = {})
282
290
  if @api_client.config.debugging
283
291
  @api_client.config.logger.debug 'Calling API: DefaultApi.list_events ...'
@@ -302,7 +310,7 @@ module PrimaryConnectClient
302
310
  post_body = opts[:debug_body]
303
311
 
304
312
  # return_type
305
- return_type = opts[:debug_return_type] || 'Object'
313
+ return_type = opts[:debug_return_type] || 'Events'
306
314
 
307
315
  # auth_names
308
316
  auth_names = opts[:debug_auth_names] || ['bearer_auth']
@@ -326,9 +334,9 @@ module PrimaryConnectClient
326
334
 
327
335
  # list orders
328
336
  # @param [Hash] opts the optional parameters
329
- # @option opts [String] :last_order_id Paginate orders with order id
330
- # @option opts [String] :state Filter orders by state, comma delimited
331
- # @return [Object]
337
+ # @option opts [String] :last_order_id Paginate orders with order id. 26 character, sortable id.
338
+ # @option opts [String] :state Filter orders by state, comma delimited.[new, updated, delivered, processing, resulted, errored, canceled, unprocessable]
339
+ # @return [Orders]
332
340
  def list_orders(opts = {})
333
341
  data, _status_code, _headers = list_orders_with_http_info(opts)
334
342
  data
@@ -336,9 +344,9 @@ module PrimaryConnectClient
336
344
 
337
345
  # list orders
338
346
  # @param [Hash] opts the optional parameters
339
- # @option opts [String] :last_order_id Paginate orders with order id
340
- # @option opts [String] :state Filter orders by state, comma delimited
341
- # @return [Array<(Object, Integer, Hash)>] Object data, response status code and response headers
347
+ # @option opts [String] :last_order_id Paginate orders with order id. 26 character, sortable id.
348
+ # @option opts [String] :state Filter orders by state, comma delimited.[new, updated, delivered, processing, resulted, errored, canceled, unprocessable]
349
+ # @return [Array<(Orders, Integer, Hash)>] Orders data, response status code and response headers
342
350
  def list_orders_with_http_info(opts = {})
343
351
  if @api_client.config.debugging
344
352
  @api_client.config.logger.debug 'Calling API: DefaultApi.list_orders ...'
@@ -363,7 +371,7 @@ module PrimaryConnectClient
363
371
  post_body = opts[:debug_body]
364
372
 
365
373
  # return_type
366
- return_type = opts[:debug_return_type] || 'Object'
374
+ return_type = opts[:debug_return_type] || 'Orders'
367
375
 
368
376
  # auth_names
369
377
  auth_names = opts[:debug_auth_names] || ['bearer_auth']
@@ -388,7 +396,7 @@ module PrimaryConnectClient
388
396
  # list results
389
397
  # @param order_id [String] Order id
390
398
  # @param [Hash] opts the optional parameters
391
- # @return [Object]
399
+ # @return [Results]
392
400
  def list_results(order_id, opts = {})
393
401
  data, _status_code, _headers = list_results_with_http_info(order_id, opts)
394
402
  data
@@ -397,7 +405,7 @@ module PrimaryConnectClient
397
405
  # list results
398
406
  # @param order_id [String] Order id
399
407
  # @param [Hash] opts the optional parameters
400
- # @return [Array<(Object, Integer, Hash)>] Object data, response status code and response headers
408
+ # @return [Array<(Results, Integer, Hash)>] Results data, response status code and response headers
401
409
  def list_results_with_http_info(order_id, opts = {})
402
410
  if @api_client.config.debugging
403
411
  @api_client.config.logger.debug 'Calling API: DefaultApi.list_results ...'
@@ -424,7 +432,7 @@ module PrimaryConnectClient
424
432
  post_body = opts[:debug_body]
425
433
 
426
434
  # return_type
427
- return_type = opts[:debug_return_type] || 'Object'
435
+ return_type = opts[:debug_return_type] || 'Results'
428
436
 
429
437
  # auth_names
430
438
  auth_names = opts[:debug_auth_names] || ['bearer_auth']
@@ -445,5 +453,73 @@ module PrimaryConnectClient
445
453
  end
446
454
  return data, status_code, headers
447
455
  end
456
+
457
+ # update order
458
+ # @param id [String] id
459
+ # @param [Hash] opts the optional parameters
460
+ # @option opts [Order] :order
461
+ # @return [OrderIds]
462
+ def update_order(id, opts = {})
463
+ data, _status_code, _headers = update_order_with_http_info(id, opts)
464
+ data
465
+ end
466
+
467
+ # update order
468
+ # @param id [String] id
469
+ # @param [Hash] opts the optional parameters
470
+ # @option opts [Order] :order
471
+ # @return [Array<(OrderIds, Integer, Hash)>] OrderIds data, response status code and response headers
472
+ def update_order_with_http_info(id, opts = {})
473
+ if @api_client.config.debugging
474
+ @api_client.config.logger.debug 'Calling API: DefaultApi.update_order ...'
475
+ end
476
+ # verify the required parameter 'id' is set
477
+ if @api_client.config.client_side_validation && id.nil?
478
+ fail ArgumentError, "Missing the required parameter 'id' when calling DefaultApi.update_order"
479
+ end
480
+ # resource path
481
+ local_var_path = '/api/v1/orders/{id}'.sub('{' + 'id' + '}', CGI.escape(id.to_s))
482
+
483
+ # query parameters
484
+ query_params = opts[:query_params] || {}
485
+
486
+ # header parameters
487
+ header_params = opts[:header_params] || {}
488
+ # HTTP header 'Accept' (if needed)
489
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
490
+ # HTTP header 'Content-Type'
491
+ content_type = @api_client.select_header_content_type(['application/json'])
492
+ if !content_type.nil?
493
+ header_params['Content-Type'] = content_type
494
+ end
495
+
496
+ # form parameters
497
+ form_params = opts[:form_params] || {}
498
+
499
+ # http body (model)
500
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'order'])
501
+
502
+ # return_type
503
+ return_type = opts[:debug_return_type] || 'OrderIds'
504
+
505
+ # auth_names
506
+ auth_names = opts[:debug_auth_names] || ['bearer_auth']
507
+
508
+ new_options = opts.merge(
509
+ :operation => :"DefaultApi.update_order",
510
+ :header_params => header_params,
511
+ :query_params => query_params,
512
+ :form_params => form_params,
513
+ :body => post_body,
514
+ :auth_names => auth_names,
515
+ :return_type => return_type
516
+ )
517
+
518
+ data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
519
+ if @api_client.config.debugging
520
+ @api_client.config.logger.debug "API called: DefaultApi#update_order\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
521
+ end
522
+ return data, status_code, headers
523
+ end
448
524
  end
449
525
  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 # SS: Added to follow redirects
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,13 +147,13 @@ 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
156
+ @timeout = 0
157
157
  @debugging = false
158
158
  @inject_format = false
159
159
  @force_ending_format = false
@@ -289,5 +289,6 @@ module PrimaryConnectClient
289
289
 
290
290
  url
291
291
  end
292
+
292
293
  end
293
294
  end