snaptrade 2.0.5 → 2.0.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/README.md +1 -1
- data/docs/Balance.md +3 -1
- data/docs/Brokerage.md +4 -0
- data/lib/snaptrade/models/balance.rb +15 -5
- data/lib/snaptrade/models/brokerage.rb +21 -1
- data/lib/snaptrade/version.rb +1 -1
- data/spec/models/balance_spec.rb +6 -0
- data/spec/models/brokerage_spec.rb +12 -0
- 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: ea92a80449f02409736d95defad024ad7ed7621eed12b733a1c829659c5e7eb1
|
4
|
+
data.tar.gz: 330f64ff549bf0cad2f4da394b0c3060ef001ac8025ac67e535924288f7d2d3f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: da3472a1af95936e7776218b3bc9b7459df0410b9044520eb67d759237003fe9329e60d92f91e5792fd3aae87d5fd07468a4a445bf392f76189f5fb901dacd74
|
7
|
+
data.tar.gz: 1d4a9ebfccd75507df2eb9525575392ec4de5996a7fb90cfac760f4ff87d991aaad929e832436634163880bbaeff64437e7adfe9c0866f434e2faf0b64d55a67
|
data/Gemfile.lock
CHANGED
data/README.md
CHANGED
data/docs/Balance.md
CHANGED
@@ -6,6 +6,7 @@
|
|
6
6
|
| ---- | ---- | ----------- | ----- |
|
7
7
|
| **currency** | [**Currency**](Currency.md) | | [optional] |
|
8
8
|
| **cash** | **Float** | | [optional] |
|
9
|
+
| **buying_power** | **Float** | | [optional] |
|
9
10
|
|
10
11
|
## Example
|
11
12
|
|
@@ -14,7 +15,8 @@ require 'snaptrade'
|
|
14
15
|
|
15
16
|
instance = SnapTrade::Balance.new(
|
16
17
|
currency: null,
|
17
|
-
cash: 300.71
|
18
|
+
cash: 300.71,
|
19
|
+
buying_power: 410.71
|
18
20
|
)
|
19
21
|
```
|
20
22
|
|
data/docs/Brokerage.md
CHANGED
@@ -9,6 +9,8 @@
|
|
9
9
|
| **display_name** | **String** | | [optional] |
|
10
10
|
| **description** | **String** | | [optional] |
|
11
11
|
| **aws_s3_logo_url** | **String** | | [optional] |
|
12
|
+
| **aws_s3_square_logo_url** | **String** | | [optional] |
|
13
|
+
| **open_url** | **String** | | [optional] |
|
12
14
|
| **slug** | **String** | | [optional] |
|
13
15
|
| **url** | **String** | | [optional] |
|
14
16
|
| **enabled** | **Boolean** | | [optional] |
|
@@ -34,6 +36,8 @@ instance = SnapTrade::Brokerage.new(
|
|
34
36
|
display_name: Questrade,
|
35
37
|
description: Questrade is an online brokerage firm and wealth management firm based in Canada. It is Canada's largest discount broker.,
|
36
38
|
aws_s3_logo_url: https://www.snaptrade.com/questrade.logo,
|
39
|
+
aws_s3_square_logo_url: https://www.snaptrade.com/questrade.logo,
|
40
|
+
open_url: https://www.brokerage.com,
|
37
41
|
slug: QUESTRADE,
|
38
42
|
url: https://www.questrade.com/,
|
39
43
|
enabled: true,
|
@@ -18,11 +18,14 @@ module SnapTrade
|
|
18
18
|
|
19
19
|
attr_accessor :cash
|
20
20
|
|
21
|
+
attr_accessor :buying_power
|
22
|
+
|
21
23
|
# Attribute mapping from ruby-style variable name to JSON key.
|
22
24
|
def self.attribute_map
|
23
25
|
{
|
24
26
|
:'currency' => :'currency',
|
25
|
-
:'cash' => :'cash'
|
27
|
+
:'cash' => :'cash',
|
28
|
+
:'buying_power' => :'buying_power'
|
26
29
|
}
|
27
30
|
end
|
28
31
|
|
@@ -35,14 +38,16 @@ module SnapTrade
|
|
35
38
|
def self.openapi_types
|
36
39
|
{
|
37
40
|
:'currency' => :'Currency',
|
38
|
-
:'cash' => :'Float'
|
41
|
+
:'cash' => :'Float',
|
42
|
+
:'buying_power' => :'Float'
|
39
43
|
}
|
40
44
|
end
|
41
45
|
|
42
46
|
# List of attributes with nullable: true
|
43
47
|
def self.openapi_nullable
|
44
48
|
Set.new([
|
45
|
-
:'cash'
|
49
|
+
:'cash',
|
50
|
+
:'buying_power'
|
46
51
|
])
|
47
52
|
end
|
48
53
|
|
@@ -68,6 +73,10 @@ module SnapTrade
|
|
68
73
|
if attributes.key?(:'cash')
|
69
74
|
self.cash = attributes[:'cash']
|
70
75
|
end
|
76
|
+
|
77
|
+
if attributes.key?(:'buying_power')
|
78
|
+
self.buying_power = attributes[:'buying_power']
|
79
|
+
end
|
71
80
|
end
|
72
81
|
|
73
82
|
# Show invalid properties with the reasons. Usually used together with valid?
|
@@ -89,7 +98,8 @@ module SnapTrade
|
|
89
98
|
return true if self.equal?(o)
|
90
99
|
self.class == o.class &&
|
91
100
|
currency == o.currency &&
|
92
|
-
cash == o.cash
|
101
|
+
cash == o.cash &&
|
102
|
+
buying_power == o.buying_power
|
93
103
|
end
|
94
104
|
|
95
105
|
# @see the `==` method
|
@@ -101,7 +111,7 @@ module SnapTrade
|
|
101
111
|
# Calculates hash code according to all attributes.
|
102
112
|
# @return [Integer] Hash code
|
103
113
|
def hash
|
104
|
-
[currency, cash].hash
|
114
|
+
[currency, cash, buying_power].hash
|
105
115
|
end
|
106
116
|
|
107
117
|
# Builds the object from hash
|
@@ -23,6 +23,10 @@ module SnapTrade
|
|
23
23
|
|
24
24
|
attr_accessor :aws_s3_logo_url
|
25
25
|
|
26
|
+
attr_accessor :aws_s3_square_logo_url
|
27
|
+
|
28
|
+
attr_accessor :open_url
|
29
|
+
|
26
30
|
attr_accessor :slug
|
27
31
|
|
28
32
|
attr_accessor :url
|
@@ -58,6 +62,8 @@ module SnapTrade
|
|
58
62
|
:'display_name' => :'display_name',
|
59
63
|
:'description' => :'description',
|
60
64
|
:'aws_s3_logo_url' => :'aws_s3_logo_url',
|
65
|
+
:'aws_s3_square_logo_url' => :'aws_s3_square_logo_url',
|
66
|
+
:'open_url' => :'open_url',
|
61
67
|
:'slug' => :'slug',
|
62
68
|
:'url' => :'url',
|
63
69
|
:'enabled' => :'enabled',
|
@@ -87,6 +93,8 @@ module SnapTrade
|
|
87
93
|
:'display_name' => :'String',
|
88
94
|
:'description' => :'String',
|
89
95
|
:'aws_s3_logo_url' => :'String',
|
96
|
+
:'aws_s3_square_logo_url' => :'String',
|
97
|
+
:'open_url' => :'String',
|
90
98
|
:'slug' => :'String',
|
91
99
|
:'url' => :'String',
|
92
100
|
:'enabled' => :'Boolean',
|
@@ -106,6 +114,8 @@ module SnapTrade
|
|
106
114
|
# List of attributes with nullable: true
|
107
115
|
def self.openapi_nullable
|
108
116
|
Set.new([
|
117
|
+
:'aws_s3_square_logo_url',
|
118
|
+
:'open_url',
|
109
119
|
:'allows_fractional_units',
|
110
120
|
:'allows_trading',
|
111
121
|
:'has_reporting',
|
@@ -148,6 +158,14 @@ module SnapTrade
|
|
148
158
|
self.aws_s3_logo_url = attributes[:'aws_s3_logo_url']
|
149
159
|
end
|
150
160
|
|
161
|
+
if attributes.key?(:'aws_s3_square_logo_url')
|
162
|
+
self.aws_s3_square_logo_url = attributes[:'aws_s3_square_logo_url']
|
163
|
+
end
|
164
|
+
|
165
|
+
if attributes.key?(:'open_url')
|
166
|
+
self.open_url = attributes[:'open_url']
|
167
|
+
end
|
168
|
+
|
151
169
|
if attributes.key?(:'slug')
|
152
170
|
self.slug = attributes[:'slug']
|
153
171
|
end
|
@@ -226,6 +244,8 @@ module SnapTrade
|
|
226
244
|
display_name == o.display_name &&
|
227
245
|
description == o.description &&
|
228
246
|
aws_s3_logo_url == o.aws_s3_logo_url &&
|
247
|
+
aws_s3_square_logo_url == o.aws_s3_square_logo_url &&
|
248
|
+
open_url == o.open_url &&
|
229
249
|
slug == o.slug &&
|
230
250
|
url == o.url &&
|
231
251
|
enabled == o.enabled &&
|
@@ -250,7 +270,7 @@ module SnapTrade
|
|
250
270
|
# Calculates hash code according to all attributes.
|
251
271
|
# @return [Integer] Hash code
|
252
272
|
def hash
|
253
|
-
[id, name, display_name, description, aws_s3_logo_url, slug, url, enabled, maintenance_mode, allows_fractional_units, allows_trading, has_reporting, is_real_time_connection, allows_trading_through_snaptrade_api, is_scraping_integration, default_currency, brokerage_type, exchanges].hash
|
273
|
+
[id, name, display_name, description, aws_s3_logo_url, aws_s3_square_logo_url, open_url, slug, url, enabled, maintenance_mode, allows_fractional_units, allows_trading, has_reporting, is_real_time_connection, allows_trading_through_snaptrade_api, is_scraping_integration, default_currency, brokerage_type, exchanges].hash
|
254
274
|
end
|
255
275
|
|
256
276
|
# Builds the object from hash
|
data/lib/snaptrade/version.rb
CHANGED
data/spec/models/balance_spec.rb
CHANGED
@@ -51,6 +51,18 @@ describe SnapTrade::Brokerage do
|
|
51
51
|
end
|
52
52
|
end
|
53
53
|
|
54
|
+
describe 'test attribute "aws_s3_square_logo_url"' do
|
55
|
+
it 'should work' do
|
56
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
57
|
+
end
|
58
|
+
end
|
59
|
+
|
60
|
+
describe 'test attribute "open_url"' 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
|
+
|
54
66
|
describe 'test attribute "slug"' do
|
55
67
|
it 'should work' do
|
56
68
|
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
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.7
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- SnapTrade
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-02-
|
11
|
+
date: 2024-02-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: faraday
|