snaptrade 1.2.0 → 1.3.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 94070221d47ad113320c08b2d965d00e981276a54c90cdc93a085be5341bf477
4
- data.tar.gz: c83d39fd96912ac321d4078c016d19322c5630efee570d20694170d6886366eb
3
+ metadata.gz: 004f012076f6d84684a0e25e6bc5de19b1069b126e9c998a307d79a59a643a35
4
+ data.tar.gz: c9d7e743f8dbb1eaa6c43474d2b1aae5be6d7f086fdbc7dfa72321f89629296b
5
5
  SHA512:
6
- metadata.gz: 0b7e09f396a8a6d38dd58ca24b7e3c7892ace67d34ce9fe6aead3508c199a3542c2547f7c28d3bd6ea35684b073d08f34b3f4cf1dee56aa658a163bebe243941
7
- data.tar.gz: 40d0d03fc81570d2b77a201e4c7d46cba621d83a97b43ebfdea9c81072526d70ff7b0a406ceb0ab2b2afadca4554f8ae40707d23ddb61c349fcb47ccdb83be90
6
+ metadata.gz: f567b741839a4ebd327044b8b87ec4691d931a3604f1204c0f23353a2121716980bf24f5173adb0dadfac7c538fa1edd54c3fb51cc37f0894764dd2452d44a43
7
+ data.tar.gz: bc73cb1215fc6ee6b9e9b2485cac7ca8f902ce8e941966c66b050b2b0af447933ee3d86c8395b5774060cdf5d3c5d4250798b7c446632ee6174781b39c93b494
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- snaptrade (1.2.0)
4
+ snaptrade (1.3.0)
5
5
  faraday (>= 1.0.1, < 3.0)
6
6
  faraday-multipart (~> 1.0, >= 1.0.4)
7
7
 
data/README.md CHANGED
@@ -9,7 +9,7 @@ For more information, please visit [https://snaptrade.com/](https://snaptrade.co
9
9
  Add to Gemfile:
10
10
 
11
11
  ```ruby
12
- gem 'snaptrade', '~> 1.2.0'
12
+ gem 'snaptrade', '~> 1.3.0'
13
13
  ```
14
14
 
15
15
  ## Getting Started
@@ -14,6 +14,7 @@
14
14
  | **option_type** | **String** | If an option transaction, then it&#39;s type (BUY_TO_OPEN, SELL_TO_CLOSE, etc), otherwise empty string | [optional] |
15
15
  | **price** | **Float** | | [optional] |
16
16
  | **settlement_date** | **String** | | [optional] |
17
+ | **external_reference_id** | **String** | Reference ID from brokerage used to identify related transactions. For example if an order comprises of several transactions (buy, fee, fx), they can be grouped if they share the same external_reference_id | [optional] |
17
18
  | **symbol** | [**Symbol**](Symbol.md) | | [optional] |
18
19
  | **option_symbol** | [**OptionsSymbol**](OptionsSymbol.md) | | [optional] |
19
20
  | **trade_date** | **String** | | [optional] |
@@ -36,6 +37,7 @@ instance = SnapTrade::UniversalActivity.new(
36
37
  option_type: BUY_TO_OPEN,
37
38
  price: 0.4,
38
39
  settlement_date: 2022-01-06T05:00:00.000Z,
40
+ external_reference_id: 2f7dc9b3-5c33-4668-3440-2b31e056ebe6,
39
41
  symbol: null,
40
42
  option_symbol: null,
41
43
  trade_date: 2022-01-06T05:00:00.000Z,
@@ -35,6 +35,9 @@ module SnapTrade
35
35
 
36
36
  attr_accessor :settlement_date
37
37
 
38
+ # Reference ID from brokerage used to identify related transactions. For example if an order comprises of several transactions (buy, fee, fx), they can be grouped if they share the same external_reference_id
39
+ attr_accessor :external_reference_id
40
+
38
41
  attr_accessor :symbol
39
42
 
40
43
  attr_accessor :option_symbol
@@ -60,6 +63,7 @@ module SnapTrade
60
63
  :'option_type' => :'option_type',
61
64
  :'price' => :'price',
62
65
  :'settlement_date' => :'settlement_date',
66
+ :'external_reference_id' => :'external_reference_id',
63
67
  :'symbol' => :'symbol',
64
68
  :'option_symbol' => :'option_symbol',
65
69
  :'trade_date' => :'trade_date',
@@ -86,6 +90,7 @@ module SnapTrade
86
90
  :'option_type' => :'String',
87
91
  :'price' => :'Float',
88
92
  :'settlement_date' => :'String',
93
+ :'external_reference_id' => :'String',
89
94
  :'symbol' => :'Symbol',
90
95
  :'option_symbol' => :'OptionsSymbol',
91
96
  :'trade_date' => :'String',
@@ -98,6 +103,7 @@ module SnapTrade
98
103
  def self.openapi_nullable
99
104
  Set.new([
100
105
  :'amount',
106
+ :'external_reference_id',
101
107
  :'trade_date',
102
108
  ])
103
109
  end
@@ -157,6 +163,10 @@ module SnapTrade
157
163
  self.settlement_date = attributes[:'settlement_date']
158
164
  end
159
165
 
166
+ if attributes.key?(:'external_reference_id')
167
+ self.external_reference_id = attributes[:'external_reference_id']
168
+ end
169
+
160
170
  if attributes.key?(:'symbol')
161
171
  self.symbol = attributes[:'symbol']
162
172
  end
@@ -206,6 +216,7 @@ module SnapTrade
206
216
  option_type == o.option_type &&
207
217
  price == o.price &&
208
218
  settlement_date == o.settlement_date &&
219
+ external_reference_id == o.external_reference_id &&
209
220
  symbol == o.symbol &&
210
221
  option_symbol == o.option_symbol &&
211
222
  trade_date == o.trade_date &&
@@ -222,7 +233,7 @@ module SnapTrade
222
233
  # Calculates hash code according to all attributes.
223
234
  # @return [Integer] Hash code
224
235
  def hash
225
- [id, account, amount, currency, description, fee, institution, option_type, price, settlement_date, symbol, option_symbol, trade_date, type, units].hash
236
+ [id, account, amount, currency, description, fee, institution, option_type, price, settlement_date, external_reference_id, symbol, option_symbol, trade_date, type, units].hash
226
237
  end
227
238
 
228
239
  # Builds the object from hash
@@ -9,5 +9,5 @@ Contact: api@snaptrade.com
9
9
  =end
10
10
 
11
11
  module SnapTrade
12
- VERSION = '1.2.0'
12
+ VERSION = '1.3.0'
13
13
  end
@@ -81,6 +81,12 @@ describe SnapTrade::UniversalActivity do
81
81
  end
82
82
  end
83
83
 
84
+ describe 'test attribute "external_reference_id"' do
85
+ it 'should work' do
86
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
87
+ end
88
+ end
89
+
84
90
  describe 'test attribute "symbol"' do
85
91
  it 'should work' do
86
92
  # 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: 1.2.0
4
+ version: 1.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - SnapTrade
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-05-31 00:00:00.000000000 Z
11
+ date: 2023-06-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday