Class: ProtonApi::UtilApi

Inherits:
Object
  • Object
show all
Defined in:
lib/proton_api/api/util_api.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(api_client = ApiClient.default) ⇒ UtilApi

Returns a new instance of UtilApi.



19
20
21
# File 'lib/proton_api/api/util_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/proton_api/api/util_api.rb', line 17

def api_client
  @api_client
end

Instance Method Details

#decision_tree_result(decision_tree_result_request, opts = {}) ⇒ Hash<String, Object>

Decision Tree Result Traverse a decision tree and find the resulting leaf node

Parameters:

  • decision_tree_result_request

    Request payload for Decision Tree Result

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

    the optional parameters

Returns:

  • (Hash<String, Object>)


27
28
29
30
# File 'lib/proton_api/api/util_api.rb', line 27

def decision_tree_result(decision_tree_result_request, opts = {})
  data, _status_code, _headers = decision_tree_result_with_http_info(decision_tree_result_request, opts)
  data
end

#decision_tree_result_with_http_info(decision_tree_result_request, opts = {}) ⇒ Array<(Hash<String, Object>, Fixnum, Hash)>

Decision Tree Result Traverse a decision tree and find the resulting leaf node

Parameters:

  • decision_tree_result_request

    Request payload for Decision Tree Result

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

    the optional parameters

Returns:

  • (Array<(Hash<String, Object>, Fixnum, Hash)>)

    Hash<String, Object> data, response status code and response headers



37
38
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
# File 'lib/proton_api/api/util_api.rb', line 37

def decision_tree_result_with_http_info(decision_tree_result_request, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: UtilApi.decision_tree_result ...'
  end
  # verify the required parameter 'decision_tree_result_request' is set
  if @api_client.config.client_side_validation && decision_tree_result_request.nil?
    fail ArgumentError, "Missing the required parameter 'decision_tree_result_request' when calling UtilApi.decision_tree_result"
  end
  # resource path
  local_var_path = '/decision_tree_result'

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = @api_client.object_to_http_body(decision_tree_result_request)
  auth_names = ['oauth2']
  data, status_code, headers = @api_client.call_api(:POST, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'Hash<String, Object>')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: UtilApi#decision_tree_result\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#order_rebalance(order_rebalance_request, opts = {}) ⇒ Hash<String, Object>

Order Rebalance Create orders to rebalance client accounts or portfolios

Parameters:

  • order_rebalance_request

    Request payload for Order Rebalance

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

    the optional parameters

Returns:

  • (Hash<String, Object>)


81
82
83
84
# File 'lib/proton_api/api/util_api.rb', line 81

def order_rebalance(order_rebalance_request, opts = {})
  data, _status_code, _headers = order_rebalance_with_http_info(order_rebalance_request, opts)
  data
end

#order_rebalance_with_http_info(order_rebalance_request, opts = {}) ⇒ Array<(Hash<String, Object>, Fixnum, Hash)>

Order Rebalance Create orders to rebalance client accounts or portfolios

Parameters:

  • order_rebalance_request

    Request payload for Order Rebalance

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

    the optional parameters

Returns:

  • (Array<(Hash<String, Object>, Fixnum, Hash)>)

    Hash<String, Object> data, response status code and response headers



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
125
126
127
128
129
# File 'lib/proton_api/api/util_api.rb', line 91

def order_rebalance_with_http_info(order_rebalance_request, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: UtilApi.order_rebalance ...'
  end
  # verify the required parameter 'order_rebalance_request' is set
  if @api_client.config.client_side_validation && order_rebalance_request.nil?
    fail ArgumentError, "Missing the required parameter 'order_rebalance_request' when calling UtilApi.order_rebalance"
  end
  # resource path
  local_var_path = '/order_rebalance'

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = @api_client.object_to_http_body(order_rebalance_request)
  auth_names = ['oauth2']
  data, status_code, headers = @api_client.call_api(:POST, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'Hash<String, Object>')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: UtilApi#order_rebalance\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#performance_calculator(performance_calculator_request, opts = {}) ⇒ Hash<String, Object>

Performance Calculator Calculate performance/risk metrics for a Nucleus entity

Parameters:

  • performance_calculator_request

    Request payload for Performance Calculator

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

    the optional parameters

Returns:

  • (Hash<String, Object>)


135
136
137
138
# File 'lib/proton_api/api/util_api.rb', line 135

def performance_calculator(performance_calculator_request, opts = {})
  data, _status_code, _headers = performance_calculator_with_http_info(performance_calculator_request, opts)
  data
end

#performance_calculator_with_http_info(performance_calculator_request, opts = {}) ⇒ Array<(Hash<String, Object>, Fixnum, Hash)>

Performance Calculator Calculate performance/risk metrics for a Nucleus entity

Parameters:

  • performance_calculator_request

    Request payload for Performance Calculator

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

    the optional parameters

Returns:

  • (Array<(Hash<String, Object>, Fixnum, Hash)>)

    Hash<String, Object> data, response status code and response headers



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
# File 'lib/proton_api/api/util_api.rb', line 145

def performance_calculator_with_http_info(performance_calculator_request, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: UtilApi.performance_calculator ...'
  end
  # verify the required parameter 'performance_calculator_request' is set
  if @api_client.config.client_side_validation && performance_calculator_request.nil?
    fail ArgumentError, "Missing the required parameter 'performance_calculator_request' when calling UtilApi.performance_calculator"
  end
  # resource path
  local_var_path = '/performance_calculator'

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = @api_client.object_to_http_body(performance_calculator_request)
  auth_names = ['oauth2']
  data, status_code, headers = @api_client.call_api(:POST, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'Hash<String, Object>')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: UtilApi#performance_calculator\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end