snaptrade 2.0.88 → 2.0.90
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.
- checksums.yaml +4 -4
- data/Gemfile.lock +2 -2
- data/README.md +2 -2
- data/lib/snaptrade/models/account.rb +15 -15
- data/lib/snaptrade/models/cryptocurrency_pair.rb +1 -1
- data/lib/snaptrade/models/trading_instrument.rb +12 -2
- data/lib/snaptrade/models/trading_search_cryptocurrency_pair_instruments200_response.rb +1 -1
- data/lib/snaptrade/version.rb +1 -1
- data/spec/models/account_spec.rb +4 -4
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e7a8839c7d2556130b77f40b450f92047044677e7f16ab57d8bd55b5589b362d
|
4
|
+
data.tar.gz: 8e9b12d97be891503fe52df30c6763f96e0c4faf0f0c1f6c654d8a0fc4e92942
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 23d12980f2aef1a354708fc2831d583b979d4f3e5f45f063ce43abda69238631cc1eaf2576912e74c4a81288542dc1e2883c0a535c1ed870a356b9aad591ae0b
|
7
|
+
data.tar.gz: fea4091d2294c6a036161bab8ceac5849a015a9b12a1b9ecb101b438ad7fcf00c710fb69587b8ad3be14ca982b4ea93df26ee7e6f031e7a1cc029d25bd434ab6
|
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
snaptrade (2.0.
|
4
|
+
snaptrade (2.0.90)
|
5
5
|
faraday (>= 1.0.1, < 3.0)
|
6
6
|
faraday-multipart (~> 1.0, >= 1.0.4)
|
7
7
|
|
@@ -29,7 +29,7 @@ GEM
|
|
29
29
|
method_source (1.1.0)
|
30
30
|
multipart-post (2.4.1)
|
31
31
|
parallel (1.26.3)
|
32
|
-
parser (3.3.7.
|
32
|
+
parser (3.3.7.4)
|
33
33
|
ast (~> 2.4.1)
|
34
34
|
racc
|
35
35
|
prism (1.4.0)
|
data/README.md
CHANGED
@@ -6,7 +6,7 @@
|
|
6
6
|
|
7
7
|
Connect brokerage accounts to your app for live positions and trading
|
8
8
|
|
9
|
-
[](https://rubygems.org/gems/snaptrade/versions/2.0.90)
|
10
10
|
[](https://snaptrade.com/)
|
11
11
|
|
12
12
|
</div>
|
@@ -81,7 +81,7 @@ Connect brokerage accounts to your app for live positions and trading
|
|
81
81
|
Add to Gemfile:
|
82
82
|
|
83
83
|
```ruby
|
84
|
-
gem 'snaptrade', '~> 2.0.
|
84
|
+
gem 'snaptrade', '~> 2.0.90'
|
85
85
|
```
|
86
86
|
|
87
87
|
## Getting Started<a id="getting-started"></a>
|
@@ -35,6 +35,9 @@ module SnapTrade
|
|
35
35
|
|
36
36
|
attr_accessor :balance
|
37
37
|
|
38
|
+
# The account type as provided by the brokerage
|
39
|
+
attr_accessor :raw_type
|
40
|
+
|
38
41
|
# Additional information about the account, such as account type, status, etc. This information is specific to the brokerage and there's no standard format for this data. This field is deprecated and subject to removal in a future version.
|
39
42
|
attr_accessor :meta
|
40
43
|
|
@@ -44,9 +47,6 @@ module SnapTrade
|
|
44
47
|
# This field is deprecated.
|
45
48
|
attr_accessor :cash_restrictions
|
46
49
|
|
47
|
-
# The account type as provided by the brokerage
|
48
|
-
attr_accessor :raw_type
|
49
|
-
|
50
50
|
# Attribute mapping from ruby-style variable name to JSON key.
|
51
51
|
def self.attribute_map
|
52
52
|
{
|
@@ -58,10 +58,10 @@ module SnapTrade
|
|
58
58
|
:'created_date' => :'created_date',
|
59
59
|
:'sync_status' => :'sync_status',
|
60
60
|
:'balance' => :'balance',
|
61
|
+
:'raw_type' => :'raw_type',
|
61
62
|
:'meta' => :'meta',
|
62
63
|
:'portfolio_group' => :'portfolio_group',
|
63
|
-
:'cash_restrictions' => :'cash_restrictions'
|
64
|
-
:'raw_type' => :'raw_type'
|
64
|
+
:'cash_restrictions' => :'cash_restrictions'
|
65
65
|
}
|
66
66
|
end
|
67
67
|
|
@@ -81,10 +81,10 @@ module SnapTrade
|
|
81
81
|
:'created_date' => :'Time',
|
82
82
|
:'sync_status' => :'AccountSyncStatus',
|
83
83
|
:'balance' => :'AccountBalance',
|
84
|
+
:'raw_type' => :'String',
|
84
85
|
:'meta' => :'Hash<String, Object>',
|
85
86
|
:'portfolio_group' => :'String',
|
86
|
-
:'cash_restrictions' => :'Array<String>'
|
87
|
-
:'raw_type' => :'String'
|
87
|
+
:'cash_restrictions' => :'Array<String>'
|
88
88
|
}
|
89
89
|
end
|
90
90
|
|
@@ -92,7 +92,7 @@ module SnapTrade
|
|
92
92
|
def self.openapi_nullable
|
93
93
|
Set.new([
|
94
94
|
:'name',
|
95
|
-
:'raw_type'
|
95
|
+
:'raw_type',
|
96
96
|
])
|
97
97
|
end
|
98
98
|
|
@@ -143,6 +143,10 @@ module SnapTrade
|
|
143
143
|
self.balance = attributes[:'balance']
|
144
144
|
end
|
145
145
|
|
146
|
+
if attributes.key?(:'raw_type')
|
147
|
+
self.raw_type = attributes[:'raw_type']
|
148
|
+
end
|
149
|
+
|
146
150
|
if attributes.key?(:'meta')
|
147
151
|
if (value = attributes[:'meta']).is_a?(Hash)
|
148
152
|
self.meta = value
|
@@ -158,10 +162,6 @@ module SnapTrade
|
|
158
162
|
self.cash_restrictions = value
|
159
163
|
end
|
160
164
|
end
|
161
|
-
|
162
|
-
if attributes.key?(:'raw_type')
|
163
|
-
self.raw_type = attributes[:'raw_type']
|
164
|
-
end
|
165
165
|
end
|
166
166
|
|
167
167
|
# Show invalid properties with the reasons. Usually used together with valid?
|
@@ -225,10 +225,10 @@ module SnapTrade
|
|
225
225
|
created_date == o.created_date &&
|
226
226
|
sync_status == o.sync_status &&
|
227
227
|
balance == o.balance &&
|
228
|
+
raw_type == o.raw_type &&
|
228
229
|
meta == o.meta &&
|
229
230
|
portfolio_group == o.portfolio_group &&
|
230
|
-
cash_restrictions == o.cash_restrictions
|
231
|
-
raw_type == o.raw_type
|
231
|
+
cash_restrictions == o.cash_restrictions
|
232
232
|
end
|
233
233
|
|
234
234
|
# @see the `==` method
|
@@ -240,7 +240,7 @@ module SnapTrade
|
|
240
240
|
# Calculates hash code according to all attributes.
|
241
241
|
# @return [Integer] Hash code
|
242
242
|
def hash
|
243
|
-
[id, brokerage_authorization, name, number, institution_name, created_date, sync_status, balance, meta, portfolio_group, cash_restrictions
|
243
|
+
[id, brokerage_authorization, name, number, institution_name, created_date, sync_status, balance, raw_type, meta, portfolio_group, cash_restrictions].hash
|
244
244
|
end
|
245
245
|
|
246
246
|
# Builds the object from hash
|
@@ -13,7 +13,7 @@ require 'time'
|
|
13
13
|
module SnapTrade
|
14
14
|
# A cryptocurrency pair instrument.
|
15
15
|
class CryptocurrencyPair
|
16
|
-
# Cryptocurrency pair instrument
|
16
|
+
# Cryptocurrency pair instrument symbol
|
17
17
|
attr_accessor :symbol
|
18
18
|
|
19
19
|
# The base currency of a pair (e.g., \"BTC\" in BTC/USD). Either fiat or cryptocurrency symbol, for fiat use ISO-4217 codes.
|
@@ -12,9 +12,10 @@ require 'time'
|
|
12
12
|
|
13
13
|
module SnapTrade
|
14
14
|
class TradingInstrument
|
15
|
-
# The
|
15
|
+
# The instrument's trading ticker symbol
|
16
16
|
attr_accessor :symbol
|
17
17
|
|
18
|
+
# The type of the instrument
|
18
19
|
attr_accessor :type
|
19
20
|
|
20
21
|
# Attribute mapping from ruby-style variable name to JSON key.
|
@@ -41,7 +42,6 @@ module SnapTrade
|
|
41
42
|
# List of attributes with nullable: true
|
42
43
|
def self.openapi_nullable
|
43
44
|
Set.new([
|
44
|
-
:'type'
|
45
45
|
])
|
46
46
|
end
|
47
47
|
|
@@ -73,12 +73,22 @@ module SnapTrade
|
|
73
73
|
# @return Array for valid properties with the reasons
|
74
74
|
def list_invalid_properties
|
75
75
|
invalid_properties = Array.new
|
76
|
+
if @symbol.nil?
|
77
|
+
invalid_properties.push('invalid value for "symbol", symbol cannot be nil.')
|
78
|
+
end
|
79
|
+
|
80
|
+
if @type.nil?
|
81
|
+
invalid_properties.push('invalid value for "type", type cannot be nil.')
|
82
|
+
end
|
83
|
+
|
76
84
|
invalid_properties
|
77
85
|
end
|
78
86
|
|
79
87
|
# Check to see if the all the properties in the model are valid
|
80
88
|
# @return true if the model is valid
|
81
89
|
def valid?
|
90
|
+
return false if @symbol.nil?
|
91
|
+
return false if @type.nil?
|
82
92
|
true
|
83
93
|
end
|
84
94
|
|
data/lib/snaptrade/version.rb
CHANGED
data/spec/models/account_spec.rb
CHANGED
@@ -68,25 +68,25 @@ describe SnapTrade::Account do
|
|
68
68
|
end
|
69
69
|
end
|
70
70
|
|
71
|
-
describe 'test attribute "
|
71
|
+
describe 'test attribute "raw_type"' do
|
72
72
|
it 'should work' do
|
73
73
|
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
74
74
|
end
|
75
75
|
end
|
76
76
|
|
77
|
-
describe 'test attribute "
|
77
|
+
describe 'test attribute "meta"' do
|
78
78
|
it 'should work' do
|
79
79
|
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
80
80
|
end
|
81
81
|
end
|
82
82
|
|
83
|
-
describe 'test attribute "
|
83
|
+
describe 'test attribute "portfolio_group"' do
|
84
84
|
it 'should work' do
|
85
85
|
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
86
86
|
end
|
87
87
|
end
|
88
88
|
|
89
|
-
describe 'test attribute "
|
89
|
+
describe 'test attribute "cash_restrictions"' do
|
90
90
|
it 'should work' do
|
91
91
|
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
92
92
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: snaptrade
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.0.
|
4
|
+
version: 2.0.90
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- SnapTrade
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2025-
|
11
|
+
date: 2025-04-01 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: faraday
|