primary_connect_client 0.7.0 → 1.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +19 -0
- data/README.md +61 -16
- data/docs/Address.md +32 -0
- data/docs/CodedValue.md +22 -0
- data/docs/DefaultApi.md +568 -0
- data/docs/Demographics.md +52 -0
- data/docs/Error.md +18 -0
- data/docs/Event.md +26 -0
- data/docs/Events.md +18 -0
- data/docs/Identifier.md +20 -0
- data/docs/Location.md +26 -0
- data/docs/Meta.md +34 -0
- data/docs/MetaDestinations.md +22 -0
- data/docs/MetaMessage.md +20 -0
- data/docs/MetaSource.md +20 -0
- data/docs/MetaTransmission.md +18 -0
- data/docs/Name.md +22 -0
- data/docs/Order.md +24 -0
- data/docs/OrderIds.md +18 -0
- data/docs/OrderOrder.md +58 -0
- data/docs/OrderOrderClinicalInfo.md +26 -0
- data/docs/OrderOrderDiagnoses.md +22 -0
- data/docs/OrderOrderOrderingFacility.md +22 -0
- data/docs/OrderOrderSpecimen.md +22 -0
- data/docs/OrderWithEventErrors.md +20 -0
- data/docs/Orders.md +18 -0
- data/docs/OrdersOrders.md +22 -0
- data/docs/Patient.md +24 -0
- data/docs/PatientContacts.md +28 -0
- data/docs/PatientDemographics.md +52 -0
- data/docs/PhoneNumber.md +20 -0
- data/docs/Provider.md +32 -0
- data/docs/Result.md +52 -0
- data/docs/ResultIds.md +18 -0
- data/docs/ResultReferenceRange.md +22 -0
- data/docs/ResultReport.md +22 -0
- data/docs/ResultSpecimen.md +22 -0
- data/docs/Results.md +20 -0
- data/docs/Specimen.md +22 -0
- data/docs/Visit.md +36 -0
- data/docs/VisitCompany.md +24 -0
- data/docs/VisitGuarantor.md +40 -0
- data/docs/VisitGuarantorEmployer.md +22 -0
- data/docs/VisitInsurances.md +40 -0
- data/docs/VisitInsured.md +30 -0
- data/docs/VisitPlan.md +22 -0
- data/git_push.sh +5 -6
- data/lib/primary_connect_client/api/default_api.rb +143 -66
- data/lib/primary_connect_client/api_client.rb +5 -6
- data/lib/primary_connect_client/api_error.rb +1 -1
- data/lib/primary_connect_client/configuration.rb +4 -3
- data/lib/primary_connect_client/models/address.rb +281 -0
- data/lib/primary_connect_client/models/coded_value.rb +238 -0
- data/lib/primary_connect_client/models/demographics.rb +466 -0
- data/lib/primary_connect_client/models/error.rb +218 -0
- data/lib/primary_connect_client/models/event.rb +254 -0
- data/lib/primary_connect_client/models/events.rb +221 -0
- data/lib/primary_connect_client/models/identifier.rb +228 -0
- data/lib/primary_connect_client/models/location.rb +255 -0
- data/lib/primary_connect_client/models/meta.rb +327 -0
- data/lib/primary_connect_client/models/meta_destinations.rb +242 -0
- data/lib/primary_connect_client/models/meta_message.rb +227 -0
- data/lib/primary_connect_client/models/meta_source.rb +227 -0
- data/lib/primary_connect_client/models/meta_transmission.rb +218 -0
- data/lib/primary_connect_client/models/name.rb +237 -0
- data/lib/primary_connect_client/models/order.rb +245 -0
- data/lib/primary_connect_client/models/order_ids.rb +221 -0
- data/lib/primary_connect_client/models/order_order.rb +496 -0
- data/lib/primary_connect_client/models/order_order_clinical_info.rb +260 -0
- data/lib/primary_connect_client/models/order_order_diagnoses.rb +272 -0
- data/lib/primary_connect_client/models/order_order_ordering_facility.rb +239 -0
- data/lib/primary_connect_client/models/order_order_specimen.rb +239 -0
- data/lib/primary_connect_client/models/order_with_event_errors.rb +229 -0
- data/lib/primary_connect_client/models/orders.rb +221 -0
- data/lib/primary_connect_client/models/orders_orders.rb +236 -0
- data/lib/primary_connect_client/models/patient.rb +253 -0
- data/lib/primary_connect_client/models/patient_contacts.rb +305 -0
- data/lib/primary_connect_client/models/patient_demographics.rb +466 -0
- data/lib/primary_connect_client/models/phone_number.rb +262 -0
- data/lib/primary_connect_client/models/provider.rb +288 -0
- data/lib/primary_connect_client/models/result.rb +443 -0
- data/lib/primary_connect_client/models/result_ids.rb +221 -0
- data/lib/primary_connect_client/models/result_reference_range.rb +240 -0
- data/lib/primary_connect_client/models/result_report.rb +240 -0
- data/lib/primary_connect_client/models/result_specimen.rb +239 -0
- data/lib/primary_connect_client/models/results.rb +230 -0
- data/lib/primary_connect_client/models/specimen.rb +239 -0
- data/lib/primary_connect_client/models/visit.rb +306 -0
- data/lib/primary_connect_client/models/visit_company.rb +248 -0
- data/lib/primary_connect_client/models/visit_guarantor.rb +358 -0
- data/lib/primary_connect_client/models/visit_guarantor_employer.rb +238 -0
- data/lib/primary_connect_client/models/visit_insurances.rb +386 -0
- data/lib/primary_connect_client/models/visit_insured.rb +322 -0
- data/lib/primary_connect_client/models/visit_plan.rb +238 -0
- data/lib/primary_connect_client/version.rb +12 -2
- data/lib/primary_connect_client.rb +45 -3
- data/primary_connect_client.gemspec +7 -5
- data/spec/api/default_api_spec.rb +44 -41
- data/spec/api_client_spec.rb +3 -3
- data/spec/configuration_spec.rb +1 -1
- data/spec/models/address_spec.rb +76 -0
- data/spec/models/coded_value_spec.rb +46 -0
- data/spec/models/demographics_spec.rb +168 -0
- data/spec/models/error_spec.rb +34 -0
- data/spec/models/event_spec.rb +58 -0
- data/spec/models/events_spec.rb +34 -0
- data/spec/models/identifier_spec.rb +40 -0
- data/spec/models/location_spec.rb +58 -0
- data/spec/models/meta_destinations_spec.rb +46 -0
- data/spec/models/meta_message_spec.rb +40 -0
- data/spec/models/meta_source_spec.rb +40 -0
- data/spec/models/meta_spec.rb +86 -0
- data/spec/models/meta_transmission_spec.rb +34 -0
- data/spec/models/name_spec.rb +46 -0
- data/spec/models/order_ids_spec.rb +34 -0
- data/spec/models/order_order_clinical_info_spec.rb +58 -0
- data/spec/models/order_order_diagnoses_spec.rb +50 -0
- data/spec/models/order_order_ordering_facility_spec.rb +46 -0
- data/spec/models/order_order_spec.rb +170 -0
- data/spec/models/order_order_specimen_spec.rb +46 -0
- data/spec/models/order_spec.rb +52 -0
- data/spec/models/order_with_event_errors_spec.rb +40 -0
- data/spec/models/orders_orders_spec.rb +46 -0
- data/spec/models/orders_spec.rb +34 -0
- data/spec/models/patient_contacts_spec.rb +68 -0
- data/spec/models/patient_demographics_spec.rb +168 -0
- data/spec/models/patient_spec.rb +52 -0
- data/spec/models/phone_number_spec.rb +44 -0
- data/spec/models/provider_spec.rb +76 -0
- data/spec/models/result_ids_spec.rb +34 -0
- data/spec/models/result_reference_range_spec.rb +46 -0
- data/spec/models/result_report_spec.rb +46 -0
- data/spec/models/result_spec.rb +148 -0
- data/spec/models/result_specimen_spec.rb +46 -0
- data/spec/models/results_spec.rb +40 -0
- data/spec/models/specimen_spec.rb +46 -0
- data/spec/models/visit_company_spec.rb +52 -0
- data/spec/models/visit_guarantor_employer_spec.rb +46 -0
- data/spec/models/visit_guarantor_spec.rb +104 -0
- data/spec/models/visit_insurances_spec.rb +112 -0
- data/spec/models/visit_insured_spec.rb +78 -0
- data/spec/models/visit_plan_spec.rb +46 -0
- data/spec/models/visit_spec.rb +88 -0
- data/spec/spec_helper.rb +1 -1
- metadata +177 -20
- 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
|
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 [
|
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<(
|
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
|
-
|
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] || '
|
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
|
-
#
|
82
|
-
# @param
|
84
|
+
# create result
|
85
|
+
# @param order_id [String] Order id
|
83
86
|
# @param [Hash] opts the optional parameters
|
84
|
-
# @
|
85
|
-
|
86
|
-
|
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
|
-
#
|
91
|
-
# @param
|
94
|
+
# create result
|
95
|
+
# @param order_id [String] Order id
|
92
96
|
# @param [Hash] opts the optional parameters
|
93
|
-
# @
|
94
|
-
|
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.
|
101
|
+
@api_client.config.logger.debug 'Calling API: DefaultApi.create_result ...'
|
97
102
|
end
|
98
|
-
# verify the required parameter '
|
99
|
-
if @api_client.config.client_side_validation &&
|
100
|
-
fail ArgumentError, "Missing the required parameter '
|
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/{
|
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] || '
|
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.
|
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(:
|
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#
|
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
|
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]
|
191
|
+
return_type = opts[:debug_return_type]
|
179
192
|
|
180
193
|
# auth_names
|
181
194
|
auth_names = opts[:debug_auth_names] || ['bearer_auth']
|
@@ -194,44 +207,40 @@ module PrimaryConnectClient
|
|
194
207
|
if @api_client.config.debugging
|
195
208
|
@api_client.config.logger.debug "API called: DefaultApi#get_lab_report\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
196
209
|
end
|
197
|
-
return data
|
210
|
+
return data, status_code, headers
|
198
211
|
end
|
199
212
|
|
200
|
-
# show
|
201
|
-
# @param
|
202
|
-
# @param id [String] Result id
|
213
|
+
# show order
|
214
|
+
# @param id [String] id
|
203
215
|
# @param [Hash] opts the optional parameters
|
204
|
-
# @return [
|
205
|
-
def
|
206
|
-
|
207
|
-
|
216
|
+
# @return [OrderWithEventErrors]
|
217
|
+
def get_order(id, opts = {})
|
218
|
+
data, _status_code, _headers = get_order_with_http_info(id, opts)
|
219
|
+
data
|
208
220
|
end
|
209
221
|
|
210
|
-
# show
|
211
|
-
# @param
|
212
|
-
# @param id [String] Result id
|
222
|
+
# show order
|
223
|
+
# @param id [String] id
|
213
224
|
# @param [Hash] opts the optional parameters
|
214
|
-
# @return [Array<(
|
215
|
-
def
|
225
|
+
# @return [Array<(OrderWithEventErrors, Integer, Hash)>] OrderWithEventErrors data, response status code and response headers
|
226
|
+
def get_order_with_http_info(id, opts = {})
|
216
227
|
if @api_client.config.debugging
|
217
|
-
@api_client.config.logger.debug 'Calling API: DefaultApi.
|
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"
|
228
|
+
@api_client.config.logger.debug 'Calling API: DefaultApi.get_order ...'
|
222
229
|
end
|
223
230
|
# verify the required parameter 'id' is set
|
224
231
|
if @api_client.config.client_side_validation && id.nil?
|
225
|
-
fail ArgumentError, "Missing the required parameter 'id' when calling DefaultApi.
|
232
|
+
fail ArgumentError, "Missing the required parameter 'id' when calling DefaultApi.get_order"
|
226
233
|
end
|
227
234
|
# resource path
|
228
|
-
local_var_path = '/api/v1/orders/{
|
235
|
+
local_var_path = '/api/v1/orders/{id}'.sub('{' + 'id' + '}', CGI.escape(id.to_s))
|
229
236
|
|
230
237
|
# query parameters
|
231
238
|
query_params = opts[:query_params] || {}
|
232
239
|
|
233
240
|
# header parameters
|
234
241
|
header_params = opts[:header_params] || {}
|
242
|
+
# HTTP header 'Accept' (if needed)
|
243
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
235
244
|
|
236
245
|
# form parameters
|
237
246
|
form_params = opts[:form_params] || {}
|
@@ -240,13 +249,13 @@ module PrimaryConnectClient
|
|
240
249
|
post_body = opts[:debug_body]
|
241
250
|
|
242
251
|
# return_type
|
243
|
-
return_type = opts[:debug_return_type]
|
252
|
+
return_type = opts[:debug_return_type] || 'OrderWithEventErrors'
|
244
253
|
|
245
254
|
# auth_names
|
246
255
|
auth_names = opts[:debug_auth_names] || ['bearer_auth']
|
247
256
|
|
248
257
|
new_options = opts.merge(
|
249
|
-
:operation => :"DefaultApi.
|
258
|
+
:operation => :"DefaultApi.get_order",
|
250
259
|
:header_params => header_params,
|
251
260
|
:query_params => query_params,
|
252
261
|
:form_params => form_params,
|
@@ -257,16 +266,16 @@ module PrimaryConnectClient
|
|
257
266
|
|
258
267
|
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
259
268
|
if @api_client.config.debugging
|
260
|
-
@api_client.config.logger.debug "API called: DefaultApi#
|
269
|
+
@api_client.config.logger.debug "API called: DefaultApi#get_order\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
261
270
|
end
|
262
271
|
return data, status_code, headers
|
263
272
|
end
|
264
273
|
|
265
274
|
# list events
|
266
275
|
# @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 [
|
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]
|
270
279
|
def list_events(opts = {})
|
271
280
|
data, _status_code, _headers = list_events_with_http_info(opts)
|
272
281
|
data
|
@@ -274,9 +283,9 @@ module PrimaryConnectClient
|
|
274
283
|
|
275
284
|
# list events
|
276
285
|
# @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<(
|
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
|
280
289
|
def list_events_with_http_info(opts = {})
|
281
290
|
if @api_client.config.debugging
|
282
291
|
@api_client.config.logger.debug 'Calling API: DefaultApi.list_events ...'
|
@@ -301,7 +310,7 @@ module PrimaryConnectClient
|
|
301
310
|
post_body = opts[:debug_body]
|
302
311
|
|
303
312
|
# return_type
|
304
|
-
return_type = opts[:debug_return_type] || '
|
313
|
+
return_type = opts[:debug_return_type] || 'Events'
|
305
314
|
|
306
315
|
# auth_names
|
307
316
|
auth_names = opts[:debug_auth_names] || ['bearer_auth']
|
@@ -325,9 +334,9 @@ module PrimaryConnectClient
|
|
325
334
|
|
326
335
|
# list orders
|
327
336
|
# @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 [
|
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]
|
331
340
|
def list_orders(opts = {})
|
332
341
|
data, _status_code, _headers = list_orders_with_http_info(opts)
|
333
342
|
data
|
@@ -335,9 +344,9 @@ module PrimaryConnectClient
|
|
335
344
|
|
336
345
|
# list orders
|
337
346
|
# @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<(
|
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
|
341
350
|
def list_orders_with_http_info(opts = {})
|
342
351
|
if @api_client.config.debugging
|
343
352
|
@api_client.config.logger.debug 'Calling API: DefaultApi.list_orders ...'
|
@@ -362,7 +371,7 @@ module PrimaryConnectClient
|
|
362
371
|
post_body = opts[:debug_body]
|
363
372
|
|
364
373
|
# return_type
|
365
|
-
return_type = opts[:debug_return_type] || '
|
374
|
+
return_type = opts[:debug_return_type] || 'Orders'
|
366
375
|
|
367
376
|
# auth_names
|
368
377
|
auth_names = opts[:debug_auth_names] || ['bearer_auth']
|
@@ -387,7 +396,7 @@ module PrimaryConnectClient
|
|
387
396
|
# list results
|
388
397
|
# @param order_id [String] Order id
|
389
398
|
# @param [Hash] opts the optional parameters
|
390
|
-
# @return [
|
399
|
+
# @return [Results]
|
391
400
|
def list_results(order_id, opts = {})
|
392
401
|
data, _status_code, _headers = list_results_with_http_info(order_id, opts)
|
393
402
|
data
|
@@ -396,7 +405,7 @@ module PrimaryConnectClient
|
|
396
405
|
# list results
|
397
406
|
# @param order_id [String] Order id
|
398
407
|
# @param [Hash] opts the optional parameters
|
399
|
-
# @return [Array<(
|
408
|
+
# @return [Array<(Results, Integer, Hash)>] Results data, response status code and response headers
|
400
409
|
def list_results_with_http_info(order_id, opts = {})
|
401
410
|
if @api_client.config.debugging
|
402
411
|
@api_client.config.logger.debug 'Calling API: DefaultApi.list_results ...'
|
@@ -423,7 +432,7 @@ module PrimaryConnectClient
|
|
423
432
|
post_body = opts[:debug_body]
|
424
433
|
|
425
434
|
# return_type
|
426
|
-
return_type = opts[:debug_return_type] || '
|
435
|
+
return_type = opts[:debug_return_type] || 'Results'
|
427
436
|
|
428
437
|
# auth_names
|
429
438
|
auth_names = opts[:debug_auth_names] || ['bearer_auth']
|
@@ -444,5 +453,73 @@ module PrimaryConnectClient
|
|
444
453
|
end
|
445
454
|
return data, status_code, headers
|
446
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
|
447
524
|
end
|
448
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.
|
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
|
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
|
-
#
|
340
|
-
return
|
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.
|
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
|
-
@
|
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
|