snaptrade 2.0.104 → 2.0.106

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 6030621749568baba852491cb28ba13cf301e9561c1dca92a9d5f8060c9950c6
4
- data.tar.gz: 45af5441b713135bc608a7d09711f1ec84ba82b03dfe2ad54e494431858e096a
3
+ metadata.gz: 1611d480f5dd625ad7df1e674bdc8ba7b32030d48f811568db3448e47b2c274c
4
+ data.tar.gz: 4c06ba8c70d0ac739aee6fcbddfc52223d46582d6d475e89637679345aba962f
5
5
  SHA512:
6
- metadata.gz: 6acd2d099ffaf936e6738996f6b3151b3e65dec18adbefc0fe9b5421e8746fd300915bcfd118bfa37fa8d669adc17d13d8a19a0645d11ea22550ec522430265d
7
- data.tar.gz: 6784c81306225db90100543173ed90c94ef2316ba4f2c6f00979838e66fbe9cc2dd5b3c2083fd6a21281a6b172cd41523cb32509f930c0d3146cdc6b00cdf43f
6
+ metadata.gz: 4bc435eeaa5a2fe733076753bf8cc05d1f209c9fe5c226579b70622b36411709b3aedd355db64f17a7cb3d46b097e177ef095227773fe58c359eec4e5900cf00
7
+ data.tar.gz: a7755b019cb24bf171c5c53979226530a8c1e910950934b1fd0b0eaaa4b3f54e86f29278bc4b0f01b2b7c0c2d2025df6abbb58e2a90bbf0945735ef107972561
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- snaptrade (2.0.104)
4
+ snaptrade (2.0.106)
5
5
  faraday (>= 1.0.1, < 3.0)
6
6
  faraday-multipart (~> 1.0, >= 1.0.4)
7
7
 
@@ -68,7 +68,7 @@ GEM
68
68
  rubocop-ast (>= 1.2.0, < 2.0)
69
69
  ruby-progressbar (~> 1.7)
70
70
  unicode-display_width (>= 1.4.0, < 3.0)
71
- rubocop-ast (1.44.1)
71
+ rubocop-ast (1.45.1)
72
72
  parser (>= 3.3.7.2)
73
73
  prism (~> 1.4)
74
74
  ruby-progressbar (1.13.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
- [![npm](https://img.shields.io/badge/gem-v2.0.104-blue)](https://rubygems.org/gems/snaptrade/versions/2.0.104)
9
+ [![npm](https://img.shields.io/badge/gem-v2.0.106-blue)](https://rubygems.org/gems/snaptrade/versions/2.0.106)
10
10
  [![More Info](https://img.shields.io/badge/More%20Info-Click%20Here-orange)](https://snaptrade.com/)
11
11
 
12
12
  </div>
@@ -82,7 +82,7 @@ Connect brokerage accounts to your app for live positions and trading
82
82
  Add to Gemfile:
83
83
 
84
84
  ```ruby
85
- gem 'snaptrade', '~> 2.0.104'
85
+ gem 'snaptrade', '~> 2.0.106'
86
86
  ```
87
87
 
88
88
  ## Getting Started<a id="getting-started"></a>
@@ -2021,6 +2021,7 @@ result = snaptrade.trading.place_mleg_order(
2021
2021
  account_id: "917c8734-8470-4a3e-a18f-57c3f2ee6631",
2022
2022
  limit_price: "",
2023
2023
  stop_price: "",
2024
+ price_effect: "DEBIT",
2024
2025
  )
2025
2026
  p result
2026
2027
  ```
@@ -2050,6 +2051,7 @@ The limit price. Required if the order type is LIMIT, STOP_LOSS_LIMIT.
2050
2051
  ##### stop_price: `Float`<a id="stop_price-float"></a>
2051
2052
  The stop price. Required if the order type is STOP_LOSS_MARKET, STOP_LOSS_LIMIT.
2052
2053
 
2054
+ ##### price_effect: [`String`](./lib/snaptrade/models/string.rb)<a id="price_effect-stringlibsnaptrademodelsstringrb"></a>
2053
2055
  #### 🔄 Return<a id="🔄-return"></a>
2054
2056
 
2055
2057
  [MlegOrderResponse](./lib/snaptrade/models/mleg_order_response.rb)
@@ -964,14 +964,16 @@ module SnapTrade
964
964
  # @param account_id [String]
965
965
  # @param limit_price [Float] The limit price. Required if the order type is LIMIT, STOP_LOSS_LIMIT.
966
966
  # @param stop_price [Float] The stop price. Required if the order type is STOP_LOSS_MARKET, STOP_LOSS_LIMIT.
967
+ # @param price_effect [String]
967
968
  # @param body [MlegTradeForm]
968
969
  # @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
969
- def place_mleg_order(order_type:, time_in_force:, legs:, user_id:, user_secret:, account_id:, limit_price: SENTINEL, stop_price: SENTINEL, extra: {})
970
+ def place_mleg_order(order_type:, time_in_force:, legs:, user_id:, user_secret:, account_id:, limit_price: SENTINEL, stop_price: SENTINEL, price_effect: SENTINEL, extra: {})
970
971
  _body = {}
971
972
  _body[:order_type] = order_type if order_type != SENTINEL
972
973
  _body[:time_in_force] = time_in_force if time_in_force != SENTINEL
973
974
  _body[:limit_price] = limit_price if limit_price != SENTINEL
974
975
  _body[:stop_price] = stop_price if stop_price != SENTINEL
976
+ _body[:price_effect] = price_effect if price_effect != SENTINEL
975
977
  _body[:legs] = legs if legs != SENTINEL
976
978
  mleg_trade_form = _body
977
979
  data, _status_code, _headers = place_mleg_order_with_http_info_impl(user_id, user_secret, account_id, mleg_trade_form, extra)
@@ -990,14 +992,16 @@ module SnapTrade
990
992
  # @param account_id [String]
991
993
  # @param limit_price [Float] The limit price. Required if the order type is LIMIT, STOP_LOSS_LIMIT.
992
994
  # @param stop_price [Float] The stop price. Required if the order type is STOP_LOSS_MARKET, STOP_LOSS_LIMIT.
995
+ # @param price_effect [String]
993
996
  # @param body [MlegTradeForm]
994
997
  # @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
995
- def place_mleg_order_with_http_info(order_type:, time_in_force:, legs:, user_id:, user_secret:, account_id:, limit_price: SENTINEL, stop_price: SENTINEL, extra: {})
998
+ def place_mleg_order_with_http_info(order_type:, time_in_force:, legs:, user_id:, user_secret:, account_id:, limit_price: SENTINEL, stop_price: SENTINEL, price_effect: SENTINEL, extra: {})
996
999
  _body = {}
997
1000
  _body[:order_type] = order_type if order_type != SENTINEL
998
1001
  _body[:time_in_force] = time_in_force if time_in_force != SENTINEL
999
1002
  _body[:limit_price] = limit_price if limit_price != SENTINEL
1000
1003
  _body[:stop_price] = stop_price if stop_price != SENTINEL
1004
+ _body[:price_effect] = price_effect if price_effect != SENTINEL
1001
1005
  _body[:legs] = legs if legs != SENTINEL
1002
1006
  mleg_trade_form = _body
1003
1007
  place_mleg_order_with_http_info_impl(user_id, user_secret, account_id, mleg_trade_form, extra)
@@ -35,7 +35,7 @@ module SnapTrade
35
35
 
36
36
  attr_accessor :balance
37
37
 
38
- # The current status of the account. Can be either \"open\", \"closed\", or null if the status is unknown or not provided by the brokerage.
38
+ # The current status of the account. Can be either \"open\", \"closed\", \"archived\" or null if the status is unknown or not provided by the brokerage.
39
39
  attr_accessor :status
40
40
 
41
41
  # The account type as provided by the brokerage
@@ -14,9 +14,10 @@ module SnapTrade
14
14
  class AccountStatus
15
15
  OPEN = "open".freeze
16
16
  CLOSED = "closed".freeze
17
+ ARCHIVED = "archived".freeze
17
18
 
18
19
  def self.all_vars
19
- @all_vars ||= [OPEN, CLOSED].freeze
20
+ @all_vars ||= [OPEN, CLOSED, ARCHIVED].freeze
20
21
  end
21
22
 
22
23
  # Builds the enum from string
@@ -25,6 +25,8 @@ module SnapTrade
25
25
  # The stop price. Required if the order type is STOP_LOSS_MARKET, STOP_LOSS_LIMIT.
26
26
  attr_accessor :stop_price
27
27
 
28
+ attr_accessor :price_effect
29
+
28
30
  attr_accessor :legs
29
31
 
30
32
  # Attribute mapping from ruby-style variable name to JSON key.
@@ -34,6 +36,7 @@ module SnapTrade
34
36
  :'time_in_force' => :'time_in_force',
35
37
  :'limit_price' => :'limit_price',
36
38
  :'stop_price' => :'stop_price',
39
+ :'price_effect' => :'price_effect',
37
40
  :'legs' => :'legs'
38
41
  }
39
42
  end
@@ -50,6 +53,7 @@ module SnapTrade
50
53
  :'time_in_force' => :'TimeInForceStrict',
51
54
  :'limit_price' => :'Float',
52
55
  :'stop_price' => :'Float',
56
+ :'price_effect' => :'String',
53
57
  :'legs' => :'Array<MlegLeg>'
54
58
  }
55
59
  end
@@ -59,6 +63,7 @@ module SnapTrade
59
63
  Set.new([
60
64
  :'limit_price',
61
65
  :'stop_price',
66
+ :'price_effect',
62
67
  ])
63
68
  end
64
69
 
@@ -93,6 +98,10 @@ module SnapTrade
93
98
  self.stop_price = attributes[:'stop_price']
94
99
  end
95
100
 
101
+ if attributes.key?(:'price_effect')
102
+ self.price_effect = attributes[:'price_effect']
103
+ end
104
+
96
105
  if attributes.key?(:'legs')
97
106
  if (value = attributes[:'legs']).is_a?(Array)
98
107
  self.legs = value
@@ -137,6 +146,7 @@ module SnapTrade
137
146
  time_in_force == o.time_in_force &&
138
147
  limit_price == o.limit_price &&
139
148
  stop_price == o.stop_price &&
149
+ price_effect == o.price_effect &&
140
150
  legs == o.legs
141
151
  end
142
152
 
@@ -149,7 +159,7 @@ module SnapTrade
149
159
  # Calculates hash code according to all attributes.
150
160
  # @return [Integer] Hash code
151
161
  def hash
152
- [order_type, time_in_force, limit_price, stop_price, legs].hash
162
+ [order_type, time_in_force, limit_price, stop_price, price_effect, legs].hash
153
163
  end
154
164
 
155
165
  # Builds the object from hash
@@ -8,5 +8,5 @@ Contact: api@snaptrade.com
8
8
  =end
9
9
 
10
10
  module SnapTrade
11
- VERSION = '2.0.104'
11
+ VERSION = '2.0.106'
12
12
  end
@@ -44,6 +44,12 @@ describe SnapTrade::MlegTradeForm do
44
44
  end
45
45
  end
46
46
 
47
+ describe 'test attribute "price_effect"' 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
+
47
53
  describe 'test attribute "legs"' do
48
54
  it 'should work' do
49
55
  # 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.104
4
+ version: 2.0.106
5
5
  platform: ruby
6
6
  authors:
7
7
  - SnapTrade
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2025-06-03 00:00:00.000000000 Z
11
+ date: 2025-06-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday