Class: SparteraApiSdk::AssetPriceHistoryApi

Inherits:
Object
  • Object
show all
Defined in:
lib/spartera_api_sdk/api/asset_price_history_api.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(api_client = ApiClient.default) ⇒ AssetPriceHistoryApi

Returns a new instance of AssetPriceHistoryApi.



19
20
21
# File 'lib/spartera_api_sdk/api/asset_price_history_api.rb', line 19

def initialize(api_client = ApiClient.default)
  @api_client = api_client
end

Instance Attribute Details

#api_clientObject

Returns the value of attribute api_client.



17
18
19
# File 'lib/spartera_api_sdk/api/asset_price_history_api.rb', line 17

def api_client
  @api_client
end

Instance Method Details

#create_asset_price_history(company_id, asset_id, asset_price_history_input, opts = {}) ⇒ CreateAssetPriceHistory200Response

Create a new price history record for an asset

Parameters:

  • company_id (String)

    Unique identifier for the Company

  • asset_id (String)

    Unique identifier for the Asset

  • asset_price_history_input (AssetPriceHistoryInput)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



28
29
30
31
# File 'lib/spartera_api_sdk/api/asset_price_history_api.rb', line 28

def create_asset_price_history(company_id, asset_id, asset_price_history_input, opts = {})
  data, _status_code, _headers = create_asset_price_history_with_http_info(company_id, asset_id, asset_price_history_input, opts)
  data
end

#create_asset_price_history_prices_calculate_credits(company_id, asset_id, asset_price_history_input, opts = {}) ⇒ CreateAssetPriceHistory200Response

Calculate the credit equivalent for a given USD price without saving

Parameters:

  • company_id (String)

    Unique identifier for the Company

  • asset_id (String)

    Unique identifier for the Asset

  • asset_price_history_input (AssetPriceHistoryInput)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



132
133
134
135
# File 'lib/spartera_api_sdk/api/asset_price_history_api.rb', line 132

def create_asset_price_history_prices_calculate_credits(company_id, asset_id, asset_price_history_input, opts = {})
  data, _status_code, _headers = create_asset_price_history_prices_calculate_credits_with_http_info(company_id, asset_id, asset_price_history_input, opts)
  data
end

#create_asset_price_history_prices_calculate_credits_with_http_info(company_id, asset_id, asset_price_history_input, opts = {}) ⇒ Array<(CreateAssetPriceHistory200Response, Integer, Hash)>

Calculate the credit equivalent for a given USD price without saving

Parameters:

  • company_id (String)

    Unique identifier for the Company

  • asset_id (String)

    Unique identifier for the Asset

  • asset_price_history_input (AssetPriceHistoryInput)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
# File 'lib/spartera_api_sdk/api/asset_price_history_api.rb', line 143

def create_asset_price_history_prices_calculate_credits_with_http_info(company_id, asset_id, asset_price_history_input, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: AssetPriceHistoryApi.create_asset_price_history_prices_calculate_credits ...'
  end
  # verify the required parameter 'company_id' is set
  if @api_client.config.client_side_validation && company_id.nil?
    fail ArgumentError, "Missing the required parameter 'company_id' when calling AssetPriceHistoryApi.create_asset_price_history_prices_calculate_credits"
  end
  if @api_client.config.client_side_validation && company_id.to_s.length > 255
    fail ArgumentError, 'invalid value for "company_id" when calling AssetPriceHistoryApi.create_asset_price_history_prices_calculate_credits, the character length must be smaller than or equal to 255.'
  end

  if @api_client.config.client_side_validation && company_id.to_s.length < 1
    fail ArgumentError, 'invalid value for "company_id" when calling AssetPriceHistoryApi.create_asset_price_history_prices_calculate_credits, the character length must be greater than or equal to 1.'
  end

  pattern = Regexp.new(/^[a-zA-Z0-9_-]+$/)
  if @api_client.config.client_side_validation && company_id !~ pattern
    fail ArgumentError, "invalid value for 'company_id' when calling AssetPriceHistoryApi.create_asset_price_history_prices_calculate_credits, must conform to the pattern #{pattern}."
  end

  # verify the required parameter 'asset_id' is set
  if @api_client.config.client_side_validation && asset_id.nil?
    fail ArgumentError, "Missing the required parameter 'asset_id' when calling AssetPriceHistoryApi.create_asset_price_history_prices_calculate_credits"
  end
  if @api_client.config.client_side_validation && asset_id.to_s.length > 255
    fail ArgumentError, 'invalid value for "asset_id" when calling AssetPriceHistoryApi.create_asset_price_history_prices_calculate_credits, the character length must be smaller than or equal to 255.'
  end

  if @api_client.config.client_side_validation && asset_id.to_s.length < 1
    fail ArgumentError, 'invalid value for "asset_id" when calling AssetPriceHistoryApi.create_asset_price_history_prices_calculate_credits, the character length must be greater than or equal to 1.'
  end

  pattern = Regexp.new(/^[a-zA-Z0-9_-]+$/)
  if @api_client.config.client_side_validation && asset_id !~ pattern
    fail ArgumentError, "invalid value for 'asset_id' when calling AssetPriceHistoryApi.create_asset_price_history_prices_calculate_credits, must conform to the pattern #{pattern}."
  end

  # verify the required parameter 'asset_price_history_input' is set
  if @api_client.config.client_side_validation && asset_price_history_input.nil?
    fail ArgumentError, "Missing the required parameter 'asset_price_history_input' when calling AssetPriceHistoryApi.create_asset_price_history_prices_calculate_credits"
  end
  # resource path
  local_var_path = '/companies/{company_id}/assets/{asset_id}/prices/calculate_credits'.sub('{' + 'company_id' + '}', CGI.escape(company_id.to_s)).sub('{' + 'asset_id' + '}', CGI.escape(asset_id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
  # HTTP header 'Content-Type'
  content_type = @api_client.select_header_content_type(['application/json'])
  if !content_type.nil?
      header_params['Content-Type'] = content_type
  end

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body] || @api_client.object_to_http_body(asset_price_history_input)

  # return_type
  return_type = opts[:debug_return_type] || 'CreateAssetPriceHistory200Response'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['ApiKeyAuth']

  new_options = opts.merge(
    :operation => :"AssetPriceHistoryApi.create_asset_price_history_prices_calculate_credits",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: AssetPriceHistoryApi#create_asset_price_history_prices_calculate_credits\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#create_asset_price_history_prices_discount(company_id, asset_id, asset_price_history_input, opts = {}) ⇒ CreateAssetPriceHistory200Response

POST /companies/company_id/assets/asset_id/prices/discount

Parameters:

  • company_id (String)

    Unique identifier for the Company

  • asset_id (String)

    Unique identifier for the Asset

  • asset_price_history_input (AssetPriceHistoryInput)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



236
237
238
239
# File 'lib/spartera_api_sdk/api/asset_price_history_api.rb', line 236

def create_asset_price_history_prices_discount(company_id, asset_id, asset_price_history_input, opts = {})
  data, _status_code, _headers = create_asset_price_history_prices_discount_with_http_info(company_id, asset_id, asset_price_history_input, opts)
  data
end

#create_asset_price_history_prices_discount_with_http_info(company_id, asset_id, asset_price_history_input, opts = {}) ⇒ Array<(CreateAssetPriceHistory200Response, Integer, Hash)>

POST /companies/company_id/assets/asset_id/prices/discount

Parameters:

  • company_id (String)

    Unique identifier for the Company

  • asset_id (String)

    Unique identifier for the Asset

  • asset_price_history_input (AssetPriceHistoryInput)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
# File 'lib/spartera_api_sdk/api/asset_price_history_api.rb', line 247

def create_asset_price_history_prices_discount_with_http_info(company_id, asset_id, asset_price_history_input, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: AssetPriceHistoryApi.create_asset_price_history_prices_discount ...'
  end
  # verify the required parameter 'company_id' is set
  if @api_client.config.client_side_validation && company_id.nil?
    fail ArgumentError, "Missing the required parameter 'company_id' when calling AssetPriceHistoryApi.create_asset_price_history_prices_discount"
  end
  if @api_client.config.client_side_validation && company_id.to_s.length > 255
    fail ArgumentError, 'invalid value for "company_id" when calling AssetPriceHistoryApi.create_asset_price_history_prices_discount, the character length must be smaller than or equal to 255.'
  end

  if @api_client.config.client_side_validation && company_id.to_s.length < 1
    fail ArgumentError, 'invalid value for "company_id" when calling AssetPriceHistoryApi.create_asset_price_history_prices_discount, the character length must be greater than or equal to 1.'
  end

  pattern = Regexp.new(/^[a-zA-Z0-9_-]+$/)
  if @api_client.config.client_side_validation && company_id !~ pattern
    fail ArgumentError, "invalid value for 'company_id' when calling AssetPriceHistoryApi.create_asset_price_history_prices_discount, must conform to the pattern #{pattern}."
  end

  # verify the required parameter 'asset_id' is set
  if @api_client.config.client_side_validation && asset_id.nil?
    fail ArgumentError, "Missing the required parameter 'asset_id' when calling AssetPriceHistoryApi.create_asset_price_history_prices_discount"
  end
  if @api_client.config.client_side_validation && asset_id.to_s.length > 255
    fail ArgumentError, 'invalid value for "asset_id" when calling AssetPriceHistoryApi.create_asset_price_history_prices_discount, the character length must be smaller than or equal to 255.'
  end

  if @api_client.config.client_side_validation && asset_id.to_s.length < 1
    fail ArgumentError, 'invalid value for "asset_id" when calling AssetPriceHistoryApi.create_asset_price_history_prices_discount, the character length must be greater than or equal to 1.'
  end

  pattern = Regexp.new(/^[a-zA-Z0-9_-]+$/)
  if @api_client.config.client_side_validation && asset_id !~ pattern
    fail ArgumentError, "invalid value for 'asset_id' when calling AssetPriceHistoryApi.create_asset_price_history_prices_discount, must conform to the pattern #{pattern}."
  end

  # verify the required parameter 'asset_price_history_input' is set
  if @api_client.config.client_side_validation && asset_price_history_input.nil?
    fail ArgumentError, "Missing the required parameter 'asset_price_history_input' when calling AssetPriceHistoryApi.create_asset_price_history_prices_discount"
  end
  # resource path
  local_var_path = '/companies/{company_id}/assets/{asset_id}/prices/discount'.sub('{' + 'company_id' + '}', CGI.escape(company_id.to_s)).sub('{' + 'asset_id' + '}', CGI.escape(asset_id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
  # HTTP header 'Content-Type'
  content_type = @api_client.select_header_content_type(['application/json'])
  if !content_type.nil?
      header_params['Content-Type'] = content_type
  end

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body] || @api_client.object_to_http_body(asset_price_history_input)

  # return_type
  return_type = opts[:debug_return_type] || 'CreateAssetPriceHistory200Response'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['ApiKeyAuth']

  new_options = opts.merge(
    :operation => :"AssetPriceHistoryApi.create_asset_price_history_prices_discount",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: AssetPriceHistoryApi#create_asset_price_history_prices_discount\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#create_asset_price_history_with_http_info(company_id, asset_id, asset_price_history_input, opts = {}) ⇒ Array<(CreateAssetPriceHistory200Response, Integer, Hash)>

Create a new price history record for an asset

Parameters:

  • company_id (String)

    Unique identifier for the Company

  • asset_id (String)

    Unique identifier for the Asset

  • asset_price_history_input (AssetPriceHistoryInput)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
# File 'lib/spartera_api_sdk/api/asset_price_history_api.rb', line 39

def create_asset_price_history_with_http_info(company_id, asset_id, asset_price_history_input, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: AssetPriceHistoryApi.create_asset_price_history ...'
  end
  # verify the required parameter 'company_id' is set
  if @api_client.config.client_side_validation && company_id.nil?
    fail ArgumentError, "Missing the required parameter 'company_id' when calling AssetPriceHistoryApi.create_asset_price_history"
  end
  if @api_client.config.client_side_validation && company_id.to_s.length > 255
    fail ArgumentError, 'invalid value for "company_id" when calling AssetPriceHistoryApi.create_asset_price_history, the character length must be smaller than or equal to 255.'
  end

  if @api_client.config.client_side_validation && company_id.to_s.length < 1
    fail ArgumentError, 'invalid value for "company_id" when calling AssetPriceHistoryApi.create_asset_price_history, the character length must be greater than or equal to 1.'
  end

  pattern = Regexp.new(/^[a-zA-Z0-9_-]+$/)
  if @api_client.config.client_side_validation && company_id !~ pattern
    fail ArgumentError, "invalid value for 'company_id' when calling AssetPriceHistoryApi.create_asset_price_history, must conform to the pattern #{pattern}."
  end

  # verify the required parameter 'asset_id' is set
  if @api_client.config.client_side_validation && asset_id.nil?
    fail ArgumentError, "Missing the required parameter 'asset_id' when calling AssetPriceHistoryApi.create_asset_price_history"
  end
  if @api_client.config.client_side_validation && asset_id.to_s.length > 255
    fail ArgumentError, 'invalid value for "asset_id" when calling AssetPriceHistoryApi.create_asset_price_history, the character length must be smaller than or equal to 255.'
  end

  if @api_client.config.client_side_validation && asset_id.to_s.length < 1
    fail ArgumentError, 'invalid value for "asset_id" when calling AssetPriceHistoryApi.create_asset_price_history, the character length must be greater than or equal to 1.'
  end

  pattern = Regexp.new(/^[a-zA-Z0-9_-]+$/)
  if @api_client.config.client_side_validation && asset_id !~ pattern
    fail ArgumentError, "invalid value for 'asset_id' when calling AssetPriceHistoryApi.create_asset_price_history, must conform to the pattern #{pattern}."
  end

  # verify the required parameter 'asset_price_history_input' is set
  if @api_client.config.client_side_validation && asset_price_history_input.nil?
    fail ArgumentError, "Missing the required parameter 'asset_price_history_input' when calling AssetPriceHistoryApi.create_asset_price_history"
  end
  # resource path
  local_var_path = '/companies/{company_id}/assets/{asset_id}/prices'.sub('{' + 'company_id' + '}', CGI.escape(company_id.to_s)).sub('{' + 'asset_id' + '}', CGI.escape(asset_id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
  # HTTP header 'Content-Type'
  content_type = @api_client.select_header_content_type(['application/json'])
  if !content_type.nil?
      header_params['Content-Type'] = content_type
  end

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body] || @api_client.object_to_http_body(asset_price_history_input)

  # return_type
  return_type = opts[:debug_return_type] || 'CreateAssetPriceHistory200Response'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['ApiKeyAuth']

  new_options = opts.merge(
    :operation => :"AssetPriceHistoryApi.create_asset_price_history",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: AssetPriceHistoryApi#create_asset_price_history\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#delete_asset_price_history(company_id, asset_id, aph_id, opts = {}) ⇒ DeleteAssetPriceHistory200Response

Delete single price history record by ID

Parameters:

  • company_id (String)

    Unique identifier for the Company

  • asset_id (String)

    Unique identifier for the Asset

  • aph_id (String)

    Unique identifier for the Aph

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



340
341
342
343
# File 'lib/spartera_api_sdk/api/asset_price_history_api.rb', line 340

def delete_asset_price_history(company_id, asset_id, aph_id, opts = {})
  data, _status_code, _headers = delete_asset_price_history_with_http_info(company_id, asset_id, aph_id, opts)
  data
end

#delete_asset_price_history_with_http_info(company_id, asset_id, aph_id, opts = {}) ⇒ Array<(DeleteAssetPriceHistory200Response, Integer, Hash)>

Delete single price history record by ID

Parameters:

  • company_id (String)

    Unique identifier for the Company

  • asset_id (String)

    Unique identifier for the Asset

  • aph_id (String)

    Unique identifier for the Aph

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
# File 'lib/spartera_api_sdk/api/asset_price_history_api.rb', line 351

def delete_asset_price_history_with_http_info(company_id, asset_id, aph_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: AssetPriceHistoryApi.delete_asset_price_history ...'
  end
  # verify the required parameter 'company_id' is set
  if @api_client.config.client_side_validation && company_id.nil?
    fail ArgumentError, "Missing the required parameter 'company_id' when calling AssetPriceHistoryApi.delete_asset_price_history"
  end
  if @api_client.config.client_side_validation && company_id.to_s.length > 255
    fail ArgumentError, 'invalid value for "company_id" when calling AssetPriceHistoryApi.delete_asset_price_history, the character length must be smaller than or equal to 255.'
  end

  if @api_client.config.client_side_validation && company_id.to_s.length < 1
    fail ArgumentError, 'invalid value for "company_id" when calling AssetPriceHistoryApi.delete_asset_price_history, the character length must be greater than or equal to 1.'
  end

  pattern = Regexp.new(/^[a-zA-Z0-9_-]+$/)
  if @api_client.config.client_side_validation && company_id !~ pattern
    fail ArgumentError, "invalid value for 'company_id' when calling AssetPriceHistoryApi.delete_asset_price_history, must conform to the pattern #{pattern}."
  end

  # verify the required parameter 'asset_id' is set
  if @api_client.config.client_side_validation && asset_id.nil?
    fail ArgumentError, "Missing the required parameter 'asset_id' when calling AssetPriceHistoryApi.delete_asset_price_history"
  end
  if @api_client.config.client_side_validation && asset_id.to_s.length > 255
    fail ArgumentError, 'invalid value for "asset_id" when calling AssetPriceHistoryApi.delete_asset_price_history, the character length must be smaller than or equal to 255.'
  end

  if @api_client.config.client_side_validation && asset_id.to_s.length < 1
    fail ArgumentError, 'invalid value for "asset_id" when calling AssetPriceHistoryApi.delete_asset_price_history, the character length must be greater than or equal to 1.'
  end

  pattern = Regexp.new(/^[a-zA-Z0-9_-]+$/)
  if @api_client.config.client_side_validation && asset_id !~ pattern
    fail ArgumentError, "invalid value for 'asset_id' when calling AssetPriceHistoryApi.delete_asset_price_history, must conform to the pattern #{pattern}."
  end

  # verify the required parameter 'aph_id' is set
  if @api_client.config.client_side_validation && aph_id.nil?
    fail ArgumentError, "Missing the required parameter 'aph_id' when calling AssetPriceHistoryApi.delete_asset_price_history"
  end
  if @api_client.config.client_side_validation && aph_id.to_s.length > 255
    fail ArgumentError, 'invalid value for "aph_id" when calling AssetPriceHistoryApi.delete_asset_price_history, the character length must be smaller than or equal to 255.'
  end

  if @api_client.config.client_side_validation && aph_id.to_s.length < 1
    fail ArgumentError, 'invalid value for "aph_id" when calling AssetPriceHistoryApi.delete_asset_price_history, the character length must be greater than or equal to 1.'
  end

  pattern = Regexp.new(/^[a-zA-Z0-9_-]+$/)
  if @api_client.config.client_side_validation && aph_id !~ pattern
    fail ArgumentError, "invalid value for 'aph_id' when calling AssetPriceHistoryApi.delete_asset_price_history, must conform to the pattern #{pattern}."
  end

  # resource path
  local_var_path = '/companies/{company_id}/assets/{asset_id}/prices/{aph_id}'.sub('{' + 'company_id' + '}', CGI.escape(company_id.to_s)).sub('{' + 'asset_id' + '}', CGI.escape(asset_id.to_s)).sub('{' + 'aph_id' + '}', CGI.escape(aph_id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'DeleteAssetPriceHistory200Response'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['ApiKeyAuth']

  new_options = opts.merge(
    :operation => :"AssetPriceHistoryApi.delete_asset_price_history",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: AssetPriceHistoryApi#delete_asset_price_history\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_asset_price_history_by_id(company_id, asset_id, opts = {}) ⇒ GetAssetPriceHistoryById200Response

Get all price history records for a specific asset

Parameters:

  • company_id (String)

    Unique identifier for the Company

  • asset_id (String)

    Unique identifier for the Asset

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



451
452
453
454
# File 'lib/spartera_api_sdk/api/asset_price_history_api.rb', line 451

def get_asset_price_history_by_id(company_id, asset_id, opts = {})
  data, _status_code, _headers = get_asset_price_history_by_id_with_http_info(company_id, asset_id, opts)
  data
end

#get_asset_price_history_by_id_assets_prices(company_id, asset_id, aph_id, opts = {}) ⇒ GetAssetPriceHistoryById200Response

Get single price history record by ID

Parameters:

  • company_id (String)

    Unique identifier for the Company

  • asset_id (String)

    Unique identifier for the Asset

  • aph_id (String)

    Unique identifier for the Aph

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



545
546
547
548
# File 'lib/spartera_api_sdk/api/asset_price_history_api.rb', line 545

def get_asset_price_history_by_id_assets_prices(company_id, asset_id, aph_id, opts = {})
  data, _status_code, _headers = get_asset_price_history_by_id_assets_prices_with_http_info(company_id, asset_id, aph_id, opts)
  data
end

#get_asset_price_history_by_id_assets_prices_with_http_info(company_id, asset_id, aph_id, opts = {}) ⇒ Array<(GetAssetPriceHistoryById200Response, Integer, Hash)>

Get single price history record by ID

Parameters:

  • company_id (String)

    Unique identifier for the Company

  • asset_id (String)

    Unique identifier for the Asset

  • aph_id (String)

    Unique identifier for the Aph

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
# File 'lib/spartera_api_sdk/api/asset_price_history_api.rb', line 556

def get_asset_price_history_by_id_assets_prices_with_http_info(company_id, asset_id, aph_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: AssetPriceHistoryApi.get_asset_price_history_by_id_assets_prices ...'
  end
  # verify the required parameter 'company_id' is set
  if @api_client.config.client_side_validation && company_id.nil?
    fail ArgumentError, "Missing the required parameter 'company_id' when calling AssetPriceHistoryApi.get_asset_price_history_by_id_assets_prices"
  end
  if @api_client.config.client_side_validation && company_id.to_s.length > 255
    fail ArgumentError, 'invalid value for "company_id" when calling AssetPriceHistoryApi.get_asset_price_history_by_id_assets_prices, the character length must be smaller than or equal to 255.'
  end

  if @api_client.config.client_side_validation && company_id.to_s.length < 1
    fail ArgumentError, 'invalid value for "company_id" when calling AssetPriceHistoryApi.get_asset_price_history_by_id_assets_prices, the character length must be greater than or equal to 1.'
  end

  pattern = Regexp.new(/^[a-zA-Z0-9_-]+$/)
  if @api_client.config.client_side_validation && company_id !~ pattern
    fail ArgumentError, "invalid value for 'company_id' when calling AssetPriceHistoryApi.get_asset_price_history_by_id_assets_prices, must conform to the pattern #{pattern}."
  end

  # verify the required parameter 'asset_id' is set
  if @api_client.config.client_side_validation && asset_id.nil?
    fail ArgumentError, "Missing the required parameter 'asset_id' when calling AssetPriceHistoryApi.get_asset_price_history_by_id_assets_prices"
  end
  if @api_client.config.client_side_validation && asset_id.to_s.length > 255
    fail ArgumentError, 'invalid value for "asset_id" when calling AssetPriceHistoryApi.get_asset_price_history_by_id_assets_prices, the character length must be smaller than or equal to 255.'
  end

  if @api_client.config.client_side_validation && asset_id.to_s.length < 1
    fail ArgumentError, 'invalid value for "asset_id" when calling AssetPriceHistoryApi.get_asset_price_history_by_id_assets_prices, the character length must be greater than or equal to 1.'
  end

  pattern = Regexp.new(/^[a-zA-Z0-9_-]+$/)
  if @api_client.config.client_side_validation && asset_id !~ pattern
    fail ArgumentError, "invalid value for 'asset_id' when calling AssetPriceHistoryApi.get_asset_price_history_by_id_assets_prices, must conform to the pattern #{pattern}."
  end

  # verify the required parameter 'aph_id' is set
  if @api_client.config.client_side_validation && aph_id.nil?
    fail ArgumentError, "Missing the required parameter 'aph_id' when calling AssetPriceHistoryApi.get_asset_price_history_by_id_assets_prices"
  end
  if @api_client.config.client_side_validation && aph_id.to_s.length > 255
    fail ArgumentError, 'invalid value for "aph_id" when calling AssetPriceHistoryApi.get_asset_price_history_by_id_assets_prices, the character length must be smaller than or equal to 255.'
  end

  if @api_client.config.client_side_validation && aph_id.to_s.length < 1
    fail ArgumentError, 'invalid value for "aph_id" when calling AssetPriceHistoryApi.get_asset_price_history_by_id_assets_prices, the character length must be greater than or equal to 1.'
  end

  pattern = Regexp.new(/^[a-zA-Z0-9_-]+$/)
  if @api_client.config.client_side_validation && aph_id !~ pattern
    fail ArgumentError, "invalid value for 'aph_id' when calling AssetPriceHistoryApi.get_asset_price_history_by_id_assets_prices, must conform to the pattern #{pattern}."
  end

  # resource path
  local_var_path = '/companies/{company_id}/assets/{asset_id}/prices/{aph_id}'.sub('{' + 'company_id' + '}', CGI.escape(company_id.to_s)).sub('{' + 'asset_id' + '}', CGI.escape(asset_id.to_s)).sub('{' + 'aph_id' + '}', CGI.escape(aph_id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'GetAssetPriceHistoryById200Response'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['ApiKeyAuth']

  new_options = opts.merge(
    :operation => :"AssetPriceHistoryApi.get_asset_price_history_by_id_assets_prices",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: AssetPriceHistoryApi#get_asset_price_history_by_id_assets_prices\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_asset_price_history_by_id_prices_active(company_id, asset_id, opts = {}) ⇒ GetAssetPriceHistoryById200Response

Get the currently active price for an asset

Parameters:

  • company_id (String)

    Unique identifier for the Company

  • asset_id (String)

    Unique identifier for the Asset

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



656
657
658
659
# File 'lib/spartera_api_sdk/api/asset_price_history_api.rb', line 656

def get_asset_price_history_by_id_prices_active(company_id, asset_id, opts = {})
  data, _status_code, _headers = get_asset_price_history_by_id_prices_active_with_http_info(company_id, asset_id, opts)
  data
end

#get_asset_price_history_by_id_prices_active_with_http_info(company_id, asset_id, opts = {}) ⇒ Array<(GetAssetPriceHistoryById200Response, Integer, Hash)>

Get the currently active price for an asset

Parameters:

  • company_id (String)

    Unique identifier for the Company

  • asset_id (String)

    Unique identifier for the Asset

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
# File 'lib/spartera_api_sdk/api/asset_price_history_api.rb', line 666

def get_asset_price_history_by_id_prices_active_with_http_info(company_id, asset_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: AssetPriceHistoryApi.get_asset_price_history_by_id_prices_active ...'
  end
  # verify the required parameter 'company_id' is set
  if @api_client.config.client_side_validation && company_id.nil?
    fail ArgumentError, "Missing the required parameter 'company_id' when calling AssetPriceHistoryApi.get_asset_price_history_by_id_prices_active"
  end
  if @api_client.config.client_side_validation && company_id.to_s.length > 255
    fail ArgumentError, 'invalid value for "company_id" when calling AssetPriceHistoryApi.get_asset_price_history_by_id_prices_active, the character length must be smaller than or equal to 255.'
  end

  if @api_client.config.client_side_validation && company_id.to_s.length < 1
    fail ArgumentError, 'invalid value for "company_id" when calling AssetPriceHistoryApi.get_asset_price_history_by_id_prices_active, the character length must be greater than or equal to 1.'
  end

  pattern = Regexp.new(/^[a-zA-Z0-9_-]+$/)
  if @api_client.config.client_side_validation && company_id !~ pattern
    fail ArgumentError, "invalid value for 'company_id' when calling AssetPriceHistoryApi.get_asset_price_history_by_id_prices_active, must conform to the pattern #{pattern}."
  end

  # verify the required parameter 'asset_id' is set
  if @api_client.config.client_side_validation && asset_id.nil?
    fail ArgumentError, "Missing the required parameter 'asset_id' when calling AssetPriceHistoryApi.get_asset_price_history_by_id_prices_active"
  end
  if @api_client.config.client_side_validation && asset_id.to_s.length > 255
    fail ArgumentError, 'invalid value for "asset_id" when calling AssetPriceHistoryApi.get_asset_price_history_by_id_prices_active, the character length must be smaller than or equal to 255.'
  end

  if @api_client.config.client_side_validation && asset_id.to_s.length < 1
    fail ArgumentError, 'invalid value for "asset_id" when calling AssetPriceHistoryApi.get_asset_price_history_by_id_prices_active, the character length must be greater than or equal to 1.'
  end

  pattern = Regexp.new(/^[a-zA-Z0-9_-]+$/)
  if @api_client.config.client_side_validation && asset_id !~ pattern
    fail ArgumentError, "invalid value for 'asset_id' when calling AssetPriceHistoryApi.get_asset_price_history_by_id_prices_active, must conform to the pattern #{pattern}."
  end

  # resource path
  local_var_path = '/companies/{company_id}/assets/{asset_id}/prices/active'.sub('{' + 'company_id' + '}', CGI.escape(company_id.to_s)).sub('{' + 'asset_id' + '}', CGI.escape(asset_id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'GetAssetPriceHistoryById200Response'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['ApiKeyAuth']

  new_options = opts.merge(
    :operation => :"AssetPriceHistoryApi.get_asset_price_history_by_id_prices_active",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: AssetPriceHistoryApi#get_asset_price_history_by_id_prices_active\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_asset_price_history_by_id_with_http_info(company_id, asset_id, opts = {}) ⇒ Array<(GetAssetPriceHistoryById200Response, Integer, Hash)>

Get all price history records for a specific asset

Parameters:

  • company_id (String)

    Unique identifier for the Company

  • asset_id (String)

    Unique identifier for the Asset

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
# File 'lib/spartera_api_sdk/api/asset_price_history_api.rb', line 461

def get_asset_price_history_by_id_with_http_info(company_id, asset_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: AssetPriceHistoryApi.get_asset_price_history_by_id ...'
  end
  # verify the required parameter 'company_id' is set
  if @api_client.config.client_side_validation && company_id.nil?
    fail ArgumentError, "Missing the required parameter 'company_id' when calling AssetPriceHistoryApi.get_asset_price_history_by_id"
  end
  if @api_client.config.client_side_validation && company_id.to_s.length > 255
    fail ArgumentError, 'invalid value for "company_id" when calling AssetPriceHistoryApi.get_asset_price_history_by_id, the character length must be smaller than or equal to 255.'
  end

  if @api_client.config.client_side_validation && company_id.to_s.length < 1
    fail ArgumentError, 'invalid value for "company_id" when calling AssetPriceHistoryApi.get_asset_price_history_by_id, the character length must be greater than or equal to 1.'
  end

  pattern = Regexp.new(/^[a-zA-Z0-9_-]+$/)
  if @api_client.config.client_side_validation && company_id !~ pattern
    fail ArgumentError, "invalid value for 'company_id' when calling AssetPriceHistoryApi.get_asset_price_history_by_id, must conform to the pattern #{pattern}."
  end

  # verify the required parameter 'asset_id' is set
  if @api_client.config.client_side_validation && asset_id.nil?
    fail ArgumentError, "Missing the required parameter 'asset_id' when calling AssetPriceHistoryApi.get_asset_price_history_by_id"
  end
  if @api_client.config.client_side_validation && asset_id.to_s.length > 255
    fail ArgumentError, 'invalid value for "asset_id" when calling AssetPriceHistoryApi.get_asset_price_history_by_id, the character length must be smaller than or equal to 255.'
  end

  if @api_client.config.client_side_validation && asset_id.to_s.length < 1
    fail ArgumentError, 'invalid value for "asset_id" when calling AssetPriceHistoryApi.get_asset_price_history_by_id, the character length must be greater than or equal to 1.'
  end

  pattern = Regexp.new(/^[a-zA-Z0-9_-]+$/)
  if @api_client.config.client_side_validation && asset_id !~ pattern
    fail ArgumentError, "invalid value for 'asset_id' when calling AssetPriceHistoryApi.get_asset_price_history_by_id, must conform to the pattern #{pattern}."
  end

  # resource path
  local_var_path = '/companies/{company_id}/assets/{asset_id}/prices'.sub('{' + 'company_id' + '}', CGI.escape(company_id.to_s)).sub('{' + 'asset_id' + '}', CGI.escape(asset_id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'GetAssetPriceHistoryById200Response'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['ApiKeyAuth']

  new_options = opts.merge(
    :operation => :"AssetPriceHistoryApi.get_asset_price_history_by_id",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: AssetPriceHistoryApi#get_asset_price_history_by_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#update_asset_price_history(company_id, asset_id, aph_id, asset_price_history_update, opts = {}) ⇒ UpdateAssetPriceHistory200Response

Update an existing price history record by ID

Parameters:

  • company_id (String)

    Unique identifier for the Company

  • asset_id (String)

    Unique identifier for the Asset

  • aph_id (String)

    Unique identifier for the Aph

  • asset_price_history_update (AssetPriceHistoryUpdate)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



751
752
753
754
# File 'lib/spartera_api_sdk/api/asset_price_history_api.rb', line 751

def update_asset_price_history(company_id, asset_id, aph_id, asset_price_history_update, opts = {})
  data, _status_code, _headers = update_asset_price_history_with_http_info(company_id, asset_id, aph_id, asset_price_history_update, opts)
  data
end

#update_asset_price_history_with_http_info(company_id, asset_id, aph_id, asset_price_history_update, opts = {}) ⇒ Array<(UpdateAssetPriceHistory200Response, Integer, Hash)>

Update an existing price history record by ID

Parameters:

  • company_id (String)

    Unique identifier for the Company

  • asset_id (String)

    Unique identifier for the Asset

  • aph_id (String)

    Unique identifier for the Aph

  • asset_price_history_update (AssetPriceHistoryUpdate)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
# File 'lib/spartera_api_sdk/api/asset_price_history_api.rb', line 763

def update_asset_price_history_with_http_info(company_id, asset_id, aph_id, asset_price_history_update, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: AssetPriceHistoryApi.update_asset_price_history ...'
  end
  # verify the required parameter 'company_id' is set
  if @api_client.config.client_side_validation && company_id.nil?
    fail ArgumentError, "Missing the required parameter 'company_id' when calling AssetPriceHistoryApi.update_asset_price_history"
  end
  if @api_client.config.client_side_validation && company_id.to_s.length > 255
    fail ArgumentError, 'invalid value for "company_id" when calling AssetPriceHistoryApi.update_asset_price_history, the character length must be smaller than or equal to 255.'
  end

  if @api_client.config.client_side_validation && company_id.to_s.length < 1
    fail ArgumentError, 'invalid value for "company_id" when calling AssetPriceHistoryApi.update_asset_price_history, the character length must be greater than or equal to 1.'
  end

  pattern = Regexp.new(/^[a-zA-Z0-9_-]+$/)
  if @api_client.config.client_side_validation && company_id !~ pattern
    fail ArgumentError, "invalid value for 'company_id' when calling AssetPriceHistoryApi.update_asset_price_history, must conform to the pattern #{pattern}."
  end

  # verify the required parameter 'asset_id' is set
  if @api_client.config.client_side_validation && asset_id.nil?
    fail ArgumentError, "Missing the required parameter 'asset_id' when calling AssetPriceHistoryApi.update_asset_price_history"
  end
  if @api_client.config.client_side_validation && asset_id.to_s.length > 255
    fail ArgumentError, 'invalid value for "asset_id" when calling AssetPriceHistoryApi.update_asset_price_history, the character length must be smaller than or equal to 255.'
  end

  if @api_client.config.client_side_validation && asset_id.to_s.length < 1
    fail ArgumentError, 'invalid value for "asset_id" when calling AssetPriceHistoryApi.update_asset_price_history, the character length must be greater than or equal to 1.'
  end

  pattern = Regexp.new(/^[a-zA-Z0-9_-]+$/)
  if @api_client.config.client_side_validation && asset_id !~ pattern
    fail ArgumentError, "invalid value for 'asset_id' when calling AssetPriceHistoryApi.update_asset_price_history, must conform to the pattern #{pattern}."
  end

  # verify the required parameter 'aph_id' is set
  if @api_client.config.client_side_validation && aph_id.nil?
    fail ArgumentError, "Missing the required parameter 'aph_id' when calling AssetPriceHistoryApi.update_asset_price_history"
  end
  if @api_client.config.client_side_validation && aph_id.to_s.length > 255
    fail ArgumentError, 'invalid value for "aph_id" when calling AssetPriceHistoryApi.update_asset_price_history, the character length must be smaller than or equal to 255.'
  end

  if @api_client.config.client_side_validation && aph_id.to_s.length < 1
    fail ArgumentError, 'invalid value for "aph_id" when calling AssetPriceHistoryApi.update_asset_price_history, the character length must be greater than or equal to 1.'
  end

  pattern = Regexp.new(/^[a-zA-Z0-9_-]+$/)
  if @api_client.config.client_side_validation && aph_id !~ pattern
    fail ArgumentError, "invalid value for 'aph_id' when calling AssetPriceHistoryApi.update_asset_price_history, must conform to the pattern #{pattern}."
  end

  # verify the required parameter 'asset_price_history_update' is set
  if @api_client.config.client_side_validation && asset_price_history_update.nil?
    fail ArgumentError, "Missing the required parameter 'asset_price_history_update' when calling AssetPriceHistoryApi.update_asset_price_history"
  end
  # resource path
  local_var_path = '/companies/{company_id}/assets/{asset_id}/prices/{aph_id}'.sub('{' + 'company_id' + '}', CGI.escape(company_id.to_s)).sub('{' + 'asset_id' + '}', CGI.escape(asset_id.to_s)).sub('{' + 'aph_id' + '}', CGI.escape(aph_id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
  # HTTP header 'Content-Type'
  content_type = @api_client.select_header_content_type(['application/json'])
  if !content_type.nil?
      header_params['Content-Type'] = content_type
  end

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body] || @api_client.object_to_http_body(asset_price_history_update)

  # return_type
  return_type = opts[:debug_return_type] || 'UpdateAssetPriceHistory200Response'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['ApiKeyAuth']

  new_options = opts.merge(
    :operation => :"AssetPriceHistoryApi.update_asset_price_history",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: AssetPriceHistoryApi#update_asset_price_history\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end