Class: Intrinio::OwnersApi

Inherits:
Object
  • Object
show all
Defined in:
lib/intrinio-sdk/api/owners_api.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(api_client = ApiClient.default) ⇒ OwnersApi

Returns a new instance of OwnersApi.



19
20
21
# File 'lib/intrinio-sdk/api/owners_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/intrinio-sdk/api/owners_api.rb', line 17

def api_client
  @api_client
end

Instance Method Details

#get_all_owners(opts = {}) ⇒ ApiResponseOwners

All Owners Returns all owners and information for all insider and institutional owners of securities covered by Intrinio.

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :institutional (BOOLEAN)

    Returns insider owners who have filed forms 3, 4, or 5 with the SEC only. Possible values are true, false, or omit for both.

  • :page_size (Integer)

    The number of results to return (default to 100)

  • :next_page (String)

    Gets the next page of data from a previous API call

Returns:



30
31
32
33
# File 'lib/intrinio-sdk/api/owners_api.rb', line 30

def get_all_owners(opts = {})
  data, _status_code, _headers = get_all_owners_with_http_info(opts)
  return data
end

#get_all_owners_with_http_info(opts = {}) ⇒ Array<(ApiResponseOwners, Fixnum, Hash)>

All Owners Returns all owners and information for all insider and institutional owners of securities covered by Intrinio.

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :institutional (BOOLEAN)

    Returns insider owners who have filed forms 3, 4, or 5 with the SEC only. Possible values are true, false, or omit for both.

  • :page_size (Integer)

    The number of results to return

  • :next_page (String)

    Gets the next page of data from a previous API call

Returns:

  • (Array<(ApiResponseOwners, Fixnum, Hash)>)

    ApiResponseOwners data, response status code and response headers



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
# File 'lib/intrinio-sdk/api/owners_api.rb', line 42

def get_all_owners_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: OwnersApi.get_all_owners ..."
  end
  if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] > 10000
    fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling OwnersApi.get_all_owners, must be smaller than or equal to 10000.'
  end

  # resource path
  local_var_path = "/owners"

  # query parameters
  query_params = {}
  query_params[:'institutional'] = opts[:'institutional'] if !opts[:'institutional'].nil?
  query_params[:'page_size'] = opts[:'page_size'] if !opts[:'page_size'].nil?
  query_params[:'next_page'] = opts[:'next_page'] if !opts[:'next_page'].nil?

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

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = ['ApiKeyAuth']
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'ApiResponseOwners')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: OwnersApi#get_all_owners\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_owner_by_id(identifier, opts = {}) ⇒ Owner

Owner by ID Returns the Owner with the given ID

Parameters:

  • identifier

    An Intrinio ID or CIK of an Owner

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

    the optional parameters

Returns:



88
89
90
91
# File 'lib/intrinio-sdk/api/owners_api.rb', line 88

def get_owner_by_id(identifier, opts = {})
  data, _status_code, _headers = get_owner_by_id_with_http_info(identifier, opts)
  return data
end

#get_owner_by_id_with_http_info(identifier, opts = {}) ⇒ Array<(Owner, Fixnum, Hash)>

Owner by ID Returns the Owner with the given ID

Parameters:

  • identifier

    An Intrinio ID or CIK of an Owner

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

    the optional parameters

Returns:

  • (Array<(Owner, Fixnum, Hash)>)

    Owner data, response status code and response headers



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
130
131
132
133
134
# File 'lib/intrinio-sdk/api/owners_api.rb', line 98

def get_owner_by_id_with_http_info(identifier, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: OwnersApi.get_owner_by_id ..."
  end
  # verify the required parameter 'identifier' is set
  if @api_client.config.client_side_validation && identifier.nil?
    fail ArgumentError, "Missing the required parameter 'identifier' when calling OwnersApi.get_owner_by_id"
  end
  # resource path
  local_var_path = "/owners/{identifier}".sub('{' + 'identifier' + '}', identifier.to_s)

  # query parameters
  query_params = {}

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

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = ['ApiKeyAuth']
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'Owner')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: OwnersApi#get_owner_by_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#insider_transaction_filings_by_owner(identifier, opts = {}) ⇒ ApiResponseOwnerInsiderTransactionFilings

Insider Transaction Filings by Owner Returns a list of all insider transaction filings by an owner in as many companies as the owner may be considered an insider. Criteria for being an insider include being a director, officer, or 10%+ owner in the company. Transactions are detailed for both non-derivative and derivative transactions by the insider.

Parameters:

  • identifier

    The Central Index Key issued by the SEC, which is the unique identifier all owner filings are issued under.

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

    the optional parameters

Options Hash (opts):

  • :start_date (Date)

    Return Owner&#39;s insider transaction filings on or after this date

  • :end_date (Date)

    Return Owner&#39;s insider transaction filings on or before this date

  • :page_size (Integer)

    The number of results to return (default to 100)

  • :next_page (String)

    Gets the next page of data from a previous API call

Returns:



145
146
147
148
# File 'lib/intrinio-sdk/api/owners_api.rb', line 145

def insider_transaction_filings_by_owner(identifier, opts = {})
  data, _status_code, _headers = insider_transaction_filings_by_owner_with_http_info(identifier, opts)
  return data
end

#insider_transaction_filings_by_owner_with_http_info(identifier, opts = {}) ⇒ Array<(ApiResponseOwnerInsiderTransactionFilings, Fixnum, Hash)>

Insider Transaction Filings by Owner Returns a list of all insider transaction filings by an owner in as many companies as the owner may be considered an insider. Criteria for being an insider include being a director, officer, or 10%+ owner in the company. Transactions are detailed for both non-derivative and derivative transactions by the insider.

Parameters:

  • identifier

    The Central Index Key issued by the SEC, which is the unique identifier all owner filings are issued under.

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

    the optional parameters

Options Hash (opts):

  • :start_date (Date)

    Return Owner&#39;s insider transaction filings on or after this date

  • :end_date (Date)

    Return Owner&#39;s insider transaction filings on or before this date

  • :page_size (Integer)

    The number of results to return

  • :next_page (String)

    Gets the next page of data from a previous API call

Returns:



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
# File 'lib/intrinio-sdk/api/owners_api.rb', line 159

def insider_transaction_filings_by_owner_with_http_info(identifier, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: OwnersApi.insider_transaction_filings_by_owner ..."
  end
  # verify the required parameter 'identifier' is set
  if @api_client.config.client_side_validation && identifier.nil?
    fail ArgumentError, "Missing the required parameter 'identifier' when calling OwnersApi.insider_transaction_filings_by_owner"
  end
  if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] > 10000
    fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling OwnersApi.insider_transaction_filings_by_owner, must be smaller than or equal to 10000.'
  end

  # resource path
  local_var_path = "/owners/{identifier}/insider_transaction_filings".sub('{' + 'identifier' + '}', identifier.to_s)

  # query parameters
  query_params = {}
  query_params[:'start_date'] = opts[:'start_date'] if !opts[:'start_date'].nil?
  query_params[:'end_date'] = opts[:'end_date'] if !opts[:'end_date'].nil?
  query_params[:'page_size'] = opts[:'page_size'] if !opts[:'page_size'].nil?
  query_params[:'next_page'] = opts[:'next_page'] if !opts[:'next_page'].nil?

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

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = ['ApiKeyAuth']
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'ApiResponseOwnerInsiderTransactionFilings')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: OwnersApi#insider_transaction_filings_by_owner\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#institutional_holdings_by_owner(identifier, opts = {}) ⇒ ApiResponseOwnerInstitutionalHoldings

Institutional Holdings by Owner Returns a list of all ownership interests and the value of their interests by a single institutional owner.

Parameters:

  • identifier

    The Central Index Key issued by the SEC, which is the unique identifier all owner filings are issued under.

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

    the optional parameters

Options Hash (opts):

  • :page_size (Integer)

    The number of results to return (default to 100)

  • :as_of_date (Date)

    Return only holdings filed before this date.

  • :next_page (String)

    Gets the next page of data from a previous API call

Returns:



213
214
215
216
# File 'lib/intrinio-sdk/api/owners_api.rb', line 213

def institutional_holdings_by_owner(identifier, opts = {})
  data, _status_code, _headers = institutional_holdings_by_owner_with_http_info(identifier, opts)
  return data
end

#institutional_holdings_by_owner_with_http_info(identifier, opts = {}) ⇒ Array<(ApiResponseOwnerInstitutionalHoldings, Fixnum, Hash)>

Institutional Holdings by Owner Returns a list of all ownership interests and the value of their interests by a single institutional owner.

Parameters:

  • identifier

    The Central Index Key issued by the SEC, which is the unique identifier all owner filings are issued under.

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

    the optional parameters

Options Hash (opts):

  • :page_size (Integer)

    The number of results to return

  • :as_of_date (Date)

    Return only holdings filed before this date.

  • :next_page (String)

    Gets the next page of data from a previous API call

Returns:



226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
# File 'lib/intrinio-sdk/api/owners_api.rb', line 226

def institutional_holdings_by_owner_with_http_info(identifier, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: OwnersApi.institutional_holdings_by_owner ..."
  end
  # verify the required parameter 'identifier' is set
  if @api_client.config.client_side_validation && identifier.nil?
    fail ArgumentError, "Missing the required parameter 'identifier' when calling OwnersApi.institutional_holdings_by_owner"
  end
  if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] > 10000
    fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling OwnersApi.institutional_holdings_by_owner, must be smaller than or equal to 10000.'
  end

  # resource path
  local_var_path = "/owners/{identifier}/institutional_holdings".sub('{' + 'identifier' + '}', identifier.to_s)

  # query parameters
  query_params = {}
  query_params[:'page_size'] = opts[:'page_size'] if !opts[:'page_size'].nil?
  query_params[:'as_of_date'] = opts[:'as_of_date'] if !opts[:'as_of_date'].nil?
  query_params[:'next_page'] = opts[:'next_page'] if !opts[:'next_page'].nil?

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

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = ['ApiKeyAuth']
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'ApiResponseOwnerInstitutionalHoldings')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: OwnersApi#institutional_holdings_by_owner\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#search_owners(query, opts = {}) ⇒ ApiResponseOwners

Search Owners Searches for Owners matching the text ‘query`

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :institutional (BOOLEAN)

    Returns insider owners who have filed forms 3, 4, or 5 with the SEC only. Possible values are true, false, or omit for both.

  • :page_size (Integer)

    The number of results to return (default to 100)

  • :next_page (String)

    Gets the next page of data from a previous API call

Returns:



279
280
281
282
# File 'lib/intrinio-sdk/api/owners_api.rb', line 279

def search_owners(query, opts = {})
  data, _status_code, _headers = search_owners_with_http_info(query, opts)
  return data
end

#search_owners_with_http_info(query, opts = {}) ⇒ Array<(ApiResponseOwners, Fixnum, Hash)>

Search Owners Searches for Owners matching the text &#x60;query&#x60;

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :institutional (BOOLEAN)

    Returns insider owners who have filed forms 3, 4, or 5 with the SEC only. Possible values are true, false, or omit for both.

  • :page_size (Integer)

    The number of results to return

  • :next_page (String)

    Gets the next page of data from a previous API call

Returns:

  • (Array<(ApiResponseOwners, Fixnum, Hash)>)

    ApiResponseOwners data, response status code and response headers



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
333
334
335
336
# File 'lib/intrinio-sdk/api/owners_api.rb', line 292

def search_owners_with_http_info(query, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: OwnersApi.search_owners ..."
  end
  # verify the required parameter 'query' is set
  if @api_client.config.client_side_validation && query.nil?
    fail ArgumentError, "Missing the required parameter 'query' when calling OwnersApi.search_owners"
  end
  if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] > 10000
    fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling OwnersApi.search_owners, must be smaller than or equal to 10000.'
  end

  # resource path
  local_var_path = "/owners/search"

  # query parameters
  query_params = {}
  query_params[:'query'] = query
  query_params[:'institutional'] = opts[:'institutional'] if !opts[:'institutional'].nil?
  query_params[:'page_size'] = opts[:'page_size'] if !opts[:'page_size'].nil?
  query_params[:'next_page'] = opts[:'next_page'] if !opts[:'next_page'].nil?

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

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = ['ApiKeyAuth']
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'ApiResponseOwners')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: OwnersApi#search_owners\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end