snaptrade 2.1.0 → 3.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,66 +0,0 @@
1
- =begin
2
- #SnapTrade
3
-
4
- #Connect brokerage accounts to your app for live positions and trading
5
-
6
- The version of the OpenAPI document: 1.0.0
7
- Contact: api@snaptrade.com
8
- =end
9
-
10
- require 'spec_helper'
11
- require 'json'
12
-
13
- # Unit tests for SnapTrade::TransactionsAndReportingApi
14
- describe 'TransactionsAndReportingApi' do
15
- before do
16
- # run before each test
17
- @api_instance = SnapTrade::TransactionsAndReportingApi.new
18
- end
19
-
20
- after do
21
- # run after each test
22
- end
23
-
24
- describe 'test an instance of TransactionsAndReportingApi' do
25
- it 'should create an instance of TransactionsAndReportingApi' do
26
- expect(@api_instance).to be_instance_of(SnapTrade::TransactionsAndReportingApi)
27
- end
28
- end
29
-
30
- # unit tests for get_activities
31
- # Get transaction history for a user
32
- # **Deprecated.** Use [the account level endpoint](/reference/Account%20Information/AccountInformation_getAccountActivities) instead, if possible. This endpoint will return HTTP 410 Gone for all customers that sign up after April 25, 2026. Returns all historical transactions for the specified user and filtering criteria. It's recommended to use `startDate` and `endDate` to paginate through the data, as the response may be very large for accounts with a long history and/or a lot of activity. There's a max number of 10000 transactions returned per request. There is no guarantee to the ordering of the transactions returned. Please sort the transactions based on the `trade_date` field if you need them in a specific order. This endpoint returns Daily data. Daily data is cached and refreshed once a day. Exact refresh timing may vary by brokerage.
33
- # @param user_id
34
- # @param user_secret
35
- # @param [Hash] opts the optional parameters
36
- # @option opts [Date] :start_date The start date (inclusive) of the transaction history to retrieve. If not provided, the default is the first transaction known to SnapTrade based on `trade_date`.
37
- # @option opts [Date] :end_date The end date (inclusive) of the transaction history to retrieve. If not provided, the default is the last transaction known to SnapTrade based on `trade_date`.
38
- # @option opts [String] :accounts Optional comma separated list of SnapTrade Account IDs used to filter the request to specific accounts. If not provided, the default is all known brokerage accounts for the user. The `brokerageAuthorizations` parameter takes precedence over this parameter.
39
- # @option opts [String] :brokerage_authorizations Optional comma separated list of SnapTrade Connection (Brokerage Authorization) IDs used to filter the request to only accounts that belong to those connections. If not provided, the default is all connections for the user. This parameter takes precedence over the `accounts` parameter.
40
- # @option opts [String] :type Optional comma separated list of transaction types to filter by. SnapTrade does a best effort to categorize brokerage transaction types into a common set of values. Here are some of the most popular values: - `BUY` - Asset bought. - `SELL` - Asset sold. - `DIVIDEND` - Dividend payout. - `SUBSTITUTE_DIVIDEND` - Payment in lieu of a dividend. - `CONTRIBUTION` - Cash contribution. - `WITHDRAWAL` - Cash withdrawal. - `REI` - Dividend reinvestment. - `INTEREST` - Interest deposited into the account. - `FEE` - Fee withdrawn from the account. - `OPTIONEXPIRATION` - Option expiration event. - `OPTIONASSIGNMENT` - Option assignment event. - `OPTIONEXERCISE` - Option exercise event. - `TRANSFER` - Transfer of assets from one account to another
41
- # @return [Array<UniversalActivity>]
42
- describe 'get_activities test' do
43
- it 'should work' do
44
- # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
45
- end
46
- end
47
-
48
- # unit tests for get_reporting_custom_range
49
- # Get performance information for a specific timeframe
50
- # **Deprecated.** Returns performance information (contributions, dividends, rate of return, etc) for a specific timeframe. Please note that Total Equity Timeframe and Rate of Returns are experimental features. Please contact support@snaptrade.com if you notice any inconsistencies.
51
- # @param start_date
52
- # @param end_date
53
- # @param user_id
54
- # @param user_secret
55
- # @param [Hash] opts the optional parameters
56
- # @option opts [String] :accounts Optional comma separated list of account IDs used to filter the request on specific accounts
57
- # @option opts [Boolean] :detailed Optional, increases frequency of data points for the total value and contribution charts if set to true
58
- # @option opts [String] :frequency Optional frequency for the rate of return chart (defaults to monthly). Possible values are daily, weekly, monthly, quarterly, yearly.
59
- # @return [PerformanceCustom]
60
- describe 'get_reporting_custom_range test' do
61
- it 'should work' do
62
- # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
63
- end
64
- end
65
-
66
- end
@@ -1,65 +0,0 @@
1
- =begin
2
- #SnapTrade
3
-
4
- #Connect brokerage accounts to your app for live positions and trading
5
-
6
- The version of the OpenAPI document: 1.0.0
7
- Contact: api@snaptrade.com
8
- =end
9
-
10
- require 'spec_helper'
11
- require 'json'
12
- require 'date'
13
-
14
- # Unit tests for SnapTrade::ConnectionsSessionEvents200ResponseInner
15
- describe SnapTrade::ConnectionsSessionEvents200ResponseInner do
16
- let(:instance) { SnapTrade::ConnectionsSessionEvents200ResponseInner.new }
17
-
18
- describe 'test an instance of ConnectionsSessionEvents200ResponseInner' do
19
- it 'should create an instance of ConnectionsSessionEvents200ResponseInner' do
20
- expect(instance).to be_instance_of(SnapTrade::ConnectionsSessionEvents200ResponseInner)
21
- end
22
- end
23
- describe 'test attribute "id"' do
24
- it 'should work' do
25
- # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
26
- end
27
- end
28
-
29
- describe 'test attribute "session_event_type"' do
30
- it 'should work' do
31
- # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
32
- end
33
- end
34
-
35
- describe 'test attribute "session_id"' do
36
- it 'should work' do
37
- # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
38
- end
39
- end
40
-
41
- describe 'test attribute "user_id"' do
42
- it 'should work' do
43
- # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
44
- end
45
- end
46
-
47
- describe 'test attribute "created_date"' do
48
- it 'should work' do
49
- # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
50
- end
51
- end
52
-
53
- describe 'test attribute "brokerage_status_code"' do
54
- it 'should work' do
55
- # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
56
- end
57
- end
58
-
59
- describe 'test attribute "brokerage_authorization_id"' do
60
- it 'should work' do
61
- # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
62
- end
63
- end
64
-
65
- end