Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update ruby-snaptrade integration test #743

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
564 changes: 399 additions & 165 deletions generator/konfig-integration-tests/sdks/ruby-snaptrade/api.yaml

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,15 @@
require 'snaptrade/models/account_order_record_status'
require 'snaptrade/models/account_simple'
require 'snaptrade/models/account_sync_status'
require 'snaptrade/models/action'
require 'snaptrade/models/action_strict'
require 'snaptrade/models/amount'
require 'snaptrade/models/auth_type'
require 'snaptrade/models/authentication_login_snap_trade_user200_response'
require 'snaptrade/models/balance'
require 'snaptrade/models/brokerage'
require 'snaptrade/models/brokerage_authorization'
require 'snaptrade/models/brokerage_authorization_disabled_confirmation'
require 'snaptrade/models/brokerage_authorization_refresh_confirmation'
require 'snaptrade/models/brokerage_authorization_type'
require 'snaptrade/models/brokerage_authorization_type_read_only'
require 'snaptrade/models/brokerage_authorization_type_read_only_brokerage'
Expand All @@ -54,16 +56,22 @@
require 'snaptrade/models/exchange'
require 'snaptrade/models/exchange_rate_pairs'
require 'snaptrade/models/excluded_asset'
require 'snaptrade/models/figi_instrument'
require 'snaptrade/models/holdings_status'
require 'snaptrade/models/jwt'
require 'snaptrade/models/login_redirect_uri'
require 'snaptrade/models/manual_trade'
require 'snaptrade/models/manual_trade_and_impact'
require 'snaptrade/models/manual_trade_balance'
require 'snaptrade/models/manual_trade_form'
require 'snaptrade/models/manual_trade_form_notional_value'
require 'snaptrade/models/manual_trade_symbol'
require 'snaptrade/models/model400_failed_request_response'
require 'snaptrade/models/model401_failed_request_response'
require 'snaptrade/models/model402_brokerage_auth_already_disabled_exception'
require 'snaptrade/models/model402_brokerage_auth_disabled_response'
require 'snaptrade/models/model403_failed_request_response'
require 'snaptrade/models/model403_feature_not_enabled_response'
require 'snaptrade/models/model404_failed_request_response'
require 'snaptrade/models/model500_unexpected_exception_response'
require 'snaptrade/models/model_asset_class'
Expand All @@ -77,6 +85,8 @@
require 'snaptrade/models/monthly_dividends'
require 'snaptrade/models/net_contributions'
require 'snaptrade/models/net_dividend'
require 'snaptrade/models/notional_value'
require 'snaptrade/models/option_brokerage_symbol'
require 'snaptrade/models/option_chain_inner'
require 'snaptrade/models/option_chain_inner_chain_per_root_inner'
require 'snaptrade/models/option_chain_inner_chain_per_root_inner_chain_per_strike_price_inner'
Expand All @@ -91,7 +101,7 @@
require 'snaptrade/models/options_position'
require 'snaptrade/models/options_position_currency'
require 'snaptrade/models/options_symbol'
require 'snaptrade/models/order_type'
require 'snaptrade/models/order_type_strict'
require 'snaptrade/models/partner_data'
require 'snaptrade/models/past_value'
require 'snaptrade/models/performance_custom'
Expand All @@ -108,6 +118,7 @@
require 'snaptrade/models/snap_trade_api_disclaimer_accept_status'
require 'snaptrade/models/snap_trade_holdings_account'
require 'snaptrade/models/snap_trade_holdings_account_account_id'
require 'snaptrade/models/snap_trade_holdings_account_account_id_balance'
require 'snaptrade/models/snap_trade_holdings_total_value'
require 'snaptrade/models/snap_trade_login_user_request_body'
require 'snaptrade/models/snap_trade_register_user_request_body'
Expand All @@ -125,6 +136,7 @@
require 'snaptrade/models/strategy_type'
require 'snaptrade/models/sub_period_return_rate'
require 'snaptrade/models/symbol'
require 'snaptrade/models/symbol_figi_instrument'
require 'snaptrade/models/symbol_query'
require 'snaptrade/models/symbols_quotes_inner'
require 'snaptrade/models/target_asset'
Expand All @@ -135,7 +147,6 @@
require 'snaptrade/models/trade_execution_status_action'
require 'snaptrade/models/trade_impact'
require 'snaptrade/models/trading_cancel_user_account_order_request'
require 'snaptrade/models/trading_place_oco_order_request'
require 'snaptrade/models/transactions_status'
require 'snaptrade/models/type'
require 'snaptrade/models/us_exchange'
Expand All @@ -145,13 +156,13 @@
require 'snaptrade/models/user_error_log'
require 'snaptrade/models/user_i_dand_secret'
require 'snaptrade/models/user_settings'
require 'snaptrade/models/validated_trade_body'

# APIs
require 'snaptrade/api/account_information_api'
require 'snaptrade/api/api_status_api'
require 'snaptrade/api/authentication_api'
require 'snaptrade/api/connections_api'
require 'snaptrade/api/error_logs_api'
require 'snaptrade/api/options_api'
require 'snaptrade/api/reference_data_api'
require 'snaptrade/api/trading_api'
Expand Down Expand Up @@ -225,7 +236,6 @@ class Client
attr_reader :api_status
attr_reader :authentication
attr_reader :connections
attr_reader :error_logs
attr_reader :options
attr_reader :reference_data
attr_reader :trading
Expand All @@ -237,7 +247,6 @@ def initialize(config = Configuration.default)
@api_status = SnapTrade::APIStatusApi.new(@api_client)
@authentication = SnapTrade::AuthenticationApi.new(@api_client)
@connections = SnapTrade::ConnectionsApi.new(@api_client)
@error_logs = SnapTrade::ErrorLogsApi.new(@api_client)
@options = SnapTrade::OptionsApi.new(@api_client)
@reference_data = SnapTrade::ReferenceDataApi.new(@api_client)
@trading = SnapTrade::TradingApi.new(@api_client)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@ def initialize(api_client = ApiClient.default)

# List all accounts for the user, plus balances, positions, and orders for each account.
#
# Lists balances, positions and orders for the specified account. The data returned is similar to
# the data returned over the more fine-grained **positions**, **orders** and **balances** endpoints.
#
# @param user_id [String]
# @param user_secret [String]
# @param brokerage_authorizations [String] Optional. Comma seperated list of authorization IDs (only use if filtering is needed on one or more authorizations).
Expand All @@ -31,6 +34,9 @@ def get_all_user_holdings(user_id:, user_secret:, brokerage_authorizations: SENT

# List all accounts for the user, plus balances, positions, and orders for each account.
#
# Lists balances, positions and orders for the specified account. The data returned is similar to
# the data returned over the more fine-grained **positions**, **orders** and **balances** endpoints.
#
# @param user_id [String]
# @param user_secret [String]
# @param brokerage_authorizations [String] Optional. Comma seperated list of authorization IDs (only use if filtering is needed on one or more authorizations).
Expand All @@ -41,6 +47,7 @@ def get_all_user_holdings_with_http_info(user_id:, user_secret:, brokerage_autho
end

# List all accounts for the user, plus balances, positions, and orders for each account.
# Lists balances, positions and orders for the specified account. The data returned is similar to the data returned over the more fine-grained **positions**, **orders** and **balances** endpoints.
# @param user_id [String]
# @param user_secret [String]
# @param [Hash] opts the optional parameters
Expand All @@ -52,6 +59,7 @@ def get_all_user_holdings_with_http_info(user_id:, user_secret:, brokerage_autho
end

# List all accounts for the user, plus balances, positions, and orders for each account.
# Lists balances, positions and orders for the specified account. The data returned is similar to the data returned over the more fine-grained **positions**, **orders** and **balances** endpoints.
# @param user_id [String]
# @param user_secret [String]
# @param [Hash] opts the optional parameters
Expand Down Expand Up @@ -218,6 +226,9 @@ def get_user_account_balance_with_http_info(user_id:, user_secret:, account_id:,

# Return details of a specific investment account
#
# Returns an account object with details for the specified account,
# including the total account market value.
#
# @param user_id [String]
# @param user_secret [String]
# @param account_id [String] The ID of the account to get detail of.
Expand All @@ -229,6 +240,9 @@ def get_user_account_details(user_id:, user_secret:, account_id:, extra: {})

# Return details of a specific investment account
#
# Returns an account object with details for the specified account,
# including the total account market value.
#
# @param user_id [String]
# @param user_secret [String]
# @param account_id [String] The ID of the account to get detail of.
Expand All @@ -238,6 +252,7 @@ def get_user_account_details_with_http_info(user_id:, user_secret:, account_id:,
end

# Return details of a specific investment account
# Returns an account object with details for the specified account, including the total account market value.
# @param user_id [String]
# @param user_secret [String]
# @param account_id [String] The ID of the account to get detail of.
Expand All @@ -249,6 +264,7 @@ def get_user_account_details_with_http_info(user_id:, user_secret:, account_id:,
end

# Return details of a specific investment account
# Returns an account object with details for the specified account, including the total account market value.
# @param user_id [String]
# @param user_secret [String]
# @param account_id [String] The ID of the account to get detail of.
Expand Down Expand Up @@ -321,7 +337,7 @@ def get_user_account_details_with_http_info(user_id:, user_secret:, account_id:,
# @param user_secret [String]
# @param account_id [String] The ID of the account to get orders.
# @param state [String] defaults value is set to \"all\"
# @param days [Integer] Number of days in the past to fetch the most recent orders. Defaults to the last 90 days if no value is passed in.
# @param days [Integer] Number of days in the past to fetch the most recent orders. Defaults to the last 30 days if no value is passed in.
# @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
def get_user_account_orders(user_id:, user_secret:, account_id:, state: SENTINEL, days: SENTINEL, extra: {})
extra[:state] = state if state != SENTINEL
Expand All @@ -338,7 +354,7 @@ def get_user_account_orders(user_id:, user_secret:, account_id:, state: SENTINEL
# @param user_secret [String]
# @param account_id [String] The ID of the account to get orders.
# @param state [String] defaults value is set to \"all\"
# @param days [Integer] Number of days in the past to fetch the most recent orders. Defaults to the last 90 days if no value is passed in.
# @param days [Integer] Number of days in the past to fetch the most recent orders. Defaults to the last 30 days if no value is passed in.
# @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
def get_user_account_orders_with_http_info(user_id:, user_secret:, account_id:, state: SENTINEL, days: SENTINEL, extra: {})
extra[:state] = state if state != SENTINEL
Expand All @@ -353,7 +369,7 @@ def get_user_account_orders_with_http_info(user_id:, user_secret:, account_id:,
# @param account_id [String] The ID of the account to get orders.
# @param [Hash] opts the optional parameters
# @option opts [String] :state defaults value is set to \"all\"
# @option opts [Integer] :days Number of days in the past to fetch the most recent orders. Defaults to the last 90 days if no value is passed in.
# @option opts [Integer] :days Number of days in the past to fetch the most recent orders. Defaults to the last 30 days if no value is passed in.
# @return [Array<AccountOrderRecord>]
private def get_user_account_orders_impl(user_id, user_secret, account_id, opts = {})
data, _status_code, _headers = get_user_account_orders_with_http_info(user_id, user_secret, account_id, opts)
Expand All @@ -367,7 +383,7 @@ def get_user_account_orders_with_http_info(user_id:, user_secret:, account_id:,
# @param account_id [String] The ID of the account to get orders.
# @param [Hash] opts the optional parameters
# @option opts [String] :state defaults value is set to \"all\"
# @option opts [Integer] :days Number of days in the past to fetch the most recent orders. Defaults to the last 90 days if no value is passed in.
# @option opts [Integer] :days Number of days in the past to fetch the most recent orders. Defaults to the last 30 days if no value is passed in.
# @return [Array<(Array<AccountOrderRecord>, Integer, Hash)>] Array<AccountOrderRecord> data, response status code and response headers
private def get_user_account_orders_with_http_info_impl(user_id, user_secret, account_id, opts = {})
if @api_client.config.debugging
Expand Down Expand Up @@ -440,6 +456,8 @@ def get_user_account_orders_with_http_info(user_id:, user_secret:, account_id:,

# List account positions
#
# Returns a list of positions in the specified account.
#
# @param user_id [String]
# @param user_secret [String]
# @param account_id [String] The ID of the account to get positions.
Expand All @@ -451,6 +469,8 @@ def get_user_account_positions(user_id:, user_secret:, account_id:, extra: {})

# List account positions
#
# Returns a list of positions in the specified account.
#
# @param user_id [String]
# @param user_secret [String]
# @param account_id [String] The ID of the account to get positions.
Expand All @@ -460,6 +480,7 @@ def get_user_account_positions_with_http_info(user_id:, user_secret:, account_id
end

# List account positions
# Returns a list of positions in the specified account.
# @param user_id [String]
# @param user_secret [String]
# @param account_id [String] The ID of the account to get positions.
Expand All @@ -471,6 +492,7 @@ def get_user_account_positions_with_http_info(user_id:, user_secret:, account_id
end

# List account positions
# Returns a list of positions in the specified account.
# @param user_id [String]
# @param user_secret [String]
# @param account_id [String] The ID of the account to get positions.
Expand Down Expand Up @@ -537,6 +559,10 @@ def get_user_account_positions_with_http_info(user_id:, user_secret:, account_id

# List balances, positions and orders for the specified account
#
# Lists balances, positions and orders for the specified account as well as
# option_positions and account metadata. The data returned is similar to the
# data returned over the more fine-grained **positions**, **orders** and **balances** endpoints.
#
# @param account_id [String] The ID of the account to fetch holdings for.
# @param user_id [String]
# @param user_secret [String]
Expand All @@ -548,6 +574,10 @@ def get_user_holdings(account_id:, user_id:, user_secret:, extra: {})

# List balances, positions and orders for the specified account
#
# Lists balances, positions and orders for the specified account as well as
# option_positions and account metadata. The data returned is similar to the
# data returned over the more fine-grained **positions**, **orders** and **balances** endpoints.
#
# @param account_id [String] The ID of the account to fetch holdings for.
# @param user_id [String]
# @param user_secret [String]
Expand All @@ -557,6 +587,7 @@ def get_user_holdings_with_http_info(account_id:, user_id:, user_secret:, extra:
end

# List balances, positions and orders for the specified account
# Lists balances, positions and orders for the specified account as well as option_positions and account metadata. The data returned is similar to the data returned over the more fine-grained **positions**, **orders** and **balances** endpoints.
# @param account_id [String] The ID of the account to fetch holdings for.
# @param user_id [String]
# @param user_secret [String]
Expand All @@ -568,6 +599,7 @@ def get_user_holdings_with_http_info(account_id:, user_id:, user_secret:, extra:
end

# List balances, positions and orders for the specified account
# Lists balances, positions and orders for the specified account as well as option_positions and account metadata. The data returned is similar to the data returned over the more fine-grained **positions**, **orders** and **balances** endpoints.
# @param account_id [String] The ID of the account to fetch holdings for.
# @param user_id [String]
# @param user_secret [String]
Expand Down Expand Up @@ -634,6 +666,8 @@ def get_user_holdings_with_http_info(account_id:, user_id:, user_secret:, extra:

# List accounts
#
# Get a list of all Account objects for the authenticated SnapTrade user.
#
# @param user_id [String]
# @param user_secret [String]
# @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
Expand All @@ -644,6 +678,8 @@ def list_user_accounts(user_id:, user_secret:, extra: {})

# List accounts
#
# Get a list of all Account objects for the authenticated SnapTrade user.
#
# @param user_id [String]
# @param user_secret [String]
# @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
Expand All @@ -652,6 +688,7 @@ def list_user_accounts_with_http_info(user_id:, user_secret:, extra: {})
end

# List accounts
# Get a list of all Account objects for the authenticated SnapTrade user.
# @param user_id [String]
# @param user_secret [String]
# @param [Hash] opts the optional parameters
Expand All @@ -662,6 +699,7 @@ def list_user_accounts_with_http_info(user_id:, user_secret:, extra: {})
end

# List accounts
# Get a list of all Account objects for the authenticated SnapTrade user.
# @param user_id [String]
# @param user_secret [String]
# @param [Hash] opts the optional parameters
Expand Down Expand Up @@ -723,6 +761,8 @@ def list_user_accounts_with_http_info(user_id:, user_secret:, extra: {})

# Update details of an investment account
#
# Updates various properties of a specified account.
#
# @param user_id [String]
# @param user_secret [String]
# @param account_id [String] The ID of the account to update.
Expand All @@ -734,6 +774,8 @@ def update_user_account(user_id:, user_secret:, account_id:, extra: {})

# Update details of an investment account
#
# Updates various properties of a specified account.
#
# @param user_id [String]
# @param user_secret [String]
# @param account_id [String] The ID of the account to update.
Expand All @@ -743,6 +785,7 @@ def update_user_account_with_http_info(user_id:, user_secret:, account_id:, extr
end

# Update details of an investment account
# Updates various properties of a specified account.
# @param user_id [String]
# @param user_secret [String]
# @param account_id [String] The ID of the account to update.
Expand All @@ -754,6 +797,7 @@ def update_user_account_with_http_info(user_id:, user_secret:, account_id:, extr
end

# Update details of an investment account
# Updates various properties of a specified account.
# @param user_id [String]
# @param user_secret [String]
# @param account_id [String] The ID of the account to update.
Expand Down
Loading
Loading