snaptrade 1.17.3 → 1.17.4

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: dc9780823d9dfda53279fb57e020586fad08fc3376e130257ff683ac8aab475d
4
- data.tar.gz: 86b12bc58d21c07c1254d05f4a11dad2fc44ed891d056fad98ac04930a9f05d3
3
+ metadata.gz: 7ee1e44cc2bde366d7731faac581c68b517af3621461ab2a0953c9f2b0a4a6ec
4
+ data.tar.gz: dd2db85f3b6c31d935d5ef6411025e7a8c4139bcbf0701603f51ff2a34074706
5
5
  SHA512:
6
- metadata.gz: ce243da503eab37607f7c4e524c610595586c2b38222f605cb040e2599a428a99640892be4e965e23789f8b75ded0415e007522094422ba40173e3194b17777e
7
- data.tar.gz: f5c76b6e59d65d28bdfd6de6e2a3765ea68f8669838595f1827a9df761e0bf6529f97f1bcf1c934973843b0297475088f0dcc9f710999241d63a0e5377f71193
6
+ metadata.gz: 2379e02876c21f12630d35108960f22b988f2c9d5eb13211f4811d5106eda52132a8bf168e529cbe1dcb0b8f8395b96c4a36a9b8b31a65b5ad8cd5453cc4eead
7
+ data.tar.gz: 2eed9e6b4512eb372a4fa1c0d554ba4664b02d069404275393b88f6ee3956de4624a15541749d0f3fc4e76120bcf6953e8b97713cafe9632955db2c7f33f3494
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- snaptrade (1.17.2)
4
+ snaptrade (1.17.3)
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.17.3'
12
+ gem 'snaptrade', '~> 1.17.4'
13
13
  ```
14
14
 
15
15
  ## Getting Started
@@ -161,8 +161,6 @@ Class | Method | HTTP request | Description
161
161
  - [SnapTrade::OptionsPosition](docs/OptionsPosition.md)
162
162
  - [SnapTrade::OptionsPositionCurrency](docs/OptionsPositionCurrency.md)
163
163
  - [SnapTrade::OptionsSymbol](docs/OptionsSymbol.md)
164
- - [SnapTrade::OrderStrategyExecuteBodyOrderType](docs/OrderStrategyExecuteBodyOrderType.md)
165
- - [SnapTrade::OrderStrategyExecuteBodyTimeInForce](docs/OrderStrategyExecuteBodyTimeInForce.md)
166
164
  - [SnapTrade::OrderType](docs/OrderType.md)
167
165
  - [SnapTrade::PartnerData](docs/PartnerData.md)
168
166
  - [SnapTrade::PastValue](docs/PastValue.md)
@@ -191,9 +189,7 @@ Class | Method | HTTP request | Description
191
189
  - [SnapTrade::StrategyOrderPlaceOrdersInner](docs/StrategyOrderPlaceOrdersInner.md)
192
190
  - [SnapTrade::StrategyOrderPlaceOrdersInnerLegsInner](docs/StrategyOrderPlaceOrdersInnerLegsInner.md)
193
191
  - [SnapTrade::StrategyOrderRecord](docs/StrategyOrderRecord.md)
194
- - [SnapTrade::StrategyOrderRecordOrderType](docs/StrategyOrderRecordOrderType.md)
195
192
  - [SnapTrade::StrategyOrderRecordStatus](docs/StrategyOrderRecordStatus.md)
196
- - [SnapTrade::StrategyOrderRecordTimeInForce](docs/StrategyOrderRecordTimeInForce.md)
197
193
  - [SnapTrade::StrategyQuotes](docs/StrategyQuotes.md)
198
194
  - [SnapTrade::StrategyQuotesGreek](docs/StrategyQuotesGreek.md)
199
195
  - [SnapTrade::StrategyType](docs/StrategyType.md)
data/docs/OptionsApi.md CHANGED
@@ -318,23 +318,23 @@ SnapTrade.client_id = "YOUR_CLIENT_ID"
318
318
  SnapTrade.consumer_key = "YOUR_CONSUMER_KEY"
319
319
 
320
320
  order_type = "Limit"
321
- time_in_force = "DAY"
322
- price = 31.33
321
+ time_in_force = "Day"
323
322
  user_id = "John.doe@snaptrade.com"
324
323
  user_secret = "USERSECRET123"
325
324
  account_id = "2bcd7cc3-e922-4976-bce1-9858296801c3"
326
325
  option_strategy_id = "2bcd7cc3-e922-4976-bce1-9858296801c3"
326
+ price = 31.33
327
327
 
328
328
  begin
329
329
  # Place an option strategy order on the brokerage
330
330
  result = SnapTrade::Options.place_option_strategy(
331
331
  order_type: order_type,
332
332
  time_in_force: time_in_force,
333
- price: price,
334
333
  user_id: user_id,
335
334
  user_secret: user_secret,
336
335
  account_id: account_id,
337
336
  option_strategy_id: option_strategy_id,
337
+ price: price,
338
338
  )
339
339
  p result
340
340
  rescue SnapTrade::ApiError => e
@@ -348,23 +348,23 @@ This returns an Array which contains the response data, status code and headers.
348
348
 
349
349
  ```ruby
350
350
  order_type = "Limit"
351
- time_in_force = "DAY"
352
- price = 31.33
351
+ time_in_force = "Day"
353
352
  user_id = "John.doe@snaptrade.com"
354
353
  user_secret = "USERSECRET123"
355
354
  account_id = "2bcd7cc3-e922-4976-bce1-9858296801c3"
356
355
  option_strategy_id = "2bcd7cc3-e922-4976-bce1-9858296801c3"
356
+ price = 31.33
357
357
 
358
358
  begin
359
359
  # Place an option strategy order on the brokerage
360
360
  data, status_code, headers, response = SnapTrade::Options.place_option_strategy_with_http_info(
361
361
  order_type: order_type,
362
362
  time_in_force: time_in_force,
363
- price: price,
364
363
  user_id: user_id,
365
364
  user_secret: user_secret,
366
365
  account_id: account_id,
367
366
  option_strategy_id: option_strategy_id,
367
+ price: price,
368
368
  )
369
369
  p status_code # => 2xx
370
370
  p headers # => { ... }
@@ -4,9 +4,9 @@
4
4
 
5
5
  | Name | Type | Description | Notes |
6
6
  | ---- | ---- | ----------- | ----- |
7
- | **order_type** | [**OrderStrategyExecuteBodyOrderType**](OrderStrategyExecuteBodyOrderType.md) | | |
8
- | **time_in_force** | [**OrderStrategyExecuteBodyTimeInForce**](OrderStrategyExecuteBodyTimeInForce.md) | | |
9
- | **price** | **Float** | Trade Price if limit or stop limit order | |
7
+ | **order_type** | [**OrderType**](OrderType.md) | | |
8
+ | **time_in_force** | [**TimeInForce**](TimeInForce.md) | | |
9
+ | **price** | **Float** | Trade Price if limit or stop limit order | [optional] |
10
10
 
11
11
  ## Example
12
12
 
@@ -9,8 +9,8 @@
9
9
  | **filled_quantity** | **Float** | | [optional] |
10
10
  | **open_quantity** | **Float** | | [optional] |
11
11
  | **closed_quantity** | **Float** | | [optional] |
12
- | **order_type** | [**StrategyOrderRecordOrderType**](StrategyOrderRecordOrderType.md) | | [optional] |
13
- | **time_in_force** | [**StrategyOrderRecordTimeInForce**](StrategyOrderRecordTimeInForce.md) | | [optional] |
12
+ | **order_type** | [**OrderType**](OrderType.md) | | [optional] |
13
+ | **time_in_force** | [**TimeInForce**](TimeInForce.md) | | [optional] |
14
14
  | **limit_price** | **Float** | Trade Price if limit or stop limit order | [optional] |
15
15
  | **execution_price** | **Float** | Trade Price if limit or stop limit order | [optional] |
16
16
  | **time_placed** | **String** | Time | [optional] |
@@ -445,16 +445,16 @@ module SnapTrade
445
445
 
446
446
 
447
447
  # Place an option strategy order on the brokerage
448
- # @param order_type [OrderStrategyExecuteBodyOrderType]
449
- # @param time_in_force [OrderStrategyExecuteBodyTimeInForce]
450
- # @param price [Float] Trade Price if limit or stop limit order
448
+ # @param order_type [OrderType]
449
+ # @param time_in_force [TimeInForce]
451
450
  # @param user_id [String]
452
451
  # @param user_secret [String]
453
452
  # @param account_id [String] The ID of the account to execute the strategy in.
454
453
  # @param option_strategy_id [String] Option strategy id obtained from response when creating option strategy object
454
+ # @param price [Float] Trade Price if limit or stop limit order
455
455
  # @param body [OptionsPlaceOptionStrategyRequest]
456
456
  # @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
457
- def place_option_strategy(order_type:, time_in_force:, price:, user_id:, user_secret:, account_id:, option_strategy_id:, extra: {})
457
+ def place_option_strategy(order_type:, time_in_force:, user_id:, user_secret:, account_id:, option_strategy_id:, price: SENTINEL, extra: {})
458
458
  _body = {}
459
459
  _body[:order_type] = order_type if order_type != SENTINEL
460
460
  _body[:time_in_force] = time_in_force if time_in_force != SENTINEL
@@ -465,16 +465,16 @@ module SnapTrade
465
465
  end
466
466
 
467
467
  # Place an option strategy order on the brokerage
468
- # @param order_type [OrderStrategyExecuteBodyOrderType]
469
- # @param time_in_force [OrderStrategyExecuteBodyTimeInForce]
470
- # @param price [Float] Trade Price if limit or stop limit order
468
+ # @param order_type [OrderType]
469
+ # @param time_in_force [TimeInForce]
471
470
  # @param user_id [String]
472
471
  # @param user_secret [String]
473
472
  # @param account_id [String] The ID of the account to execute the strategy in.
474
473
  # @param option_strategy_id [String] Option strategy id obtained from response when creating option strategy object
474
+ # @param price [Float] Trade Price if limit or stop limit order
475
475
  # @param body [OptionsPlaceOptionStrategyRequest]
476
476
  # @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
477
- def place_option_strategy_with_http_info(order_type:, time_in_force:, price:, user_id:, user_secret:, account_id:, option_strategy_id:, extra: {})
477
+ def place_option_strategy_with_http_info(order_type:, time_in_force:, user_id:, user_secret:, account_id:, option_strategy_id:, price: SENTINEL, extra: {})
478
478
  _body = {}
479
479
  _body[:order_type] = order_type if order_type != SENTINEL
480
480
  _body[:time_in_force] = time_in_force if time_in_force != SENTINEL
@@ -37,8 +37,8 @@ module SnapTrade
37
37
  # Attribute type mapping.
38
38
  def self.openapi_types
39
39
  {
40
- :'order_type' => :'OrderStrategyExecuteBodyOrderType',
41
- :'time_in_force' => :'OrderStrategyExecuteBodyTimeInForce',
40
+ :'order_type' => :'OrderType',
41
+ :'time_in_force' => :'TimeInForce',
42
42
  :'price' => :'Float'
43
43
  }
44
44
  end
@@ -70,8 +70,8 @@ module SnapTrade
70
70
  :'filled_quantity' => :'Float',
71
71
  :'open_quantity' => :'Float',
72
72
  :'closed_quantity' => :'Float',
73
- :'order_type' => :'StrategyOrderRecordOrderType',
74
- :'time_in_force' => :'StrategyOrderRecordTimeInForce',
73
+ :'order_type' => :'OrderType',
74
+ :'time_in_force' => :'TimeInForce',
75
75
  :'limit_price' => :'Float',
76
76
  :'execution_price' => :'Float',
77
77
  :'time_placed' => :'String',
@@ -9,5 +9,5 @@ Contact: api@snaptrade.com
9
9
  =end
10
10
 
11
11
  module SnapTrade
12
- VERSION = '1.17.3'
12
+ VERSION = '1.17.4'
13
13
  end
data/lib/snaptrade.rb CHANGED
@@ -88,8 +88,6 @@ require 'snaptrade/models/options_place_option_strategy_request'
88
88
  require 'snaptrade/models/options_position'
89
89
  require 'snaptrade/models/options_position_currency'
90
90
  require 'snaptrade/models/options_symbol'
91
- require 'snaptrade/models/order_strategy_execute_body_order_type'
92
- require 'snaptrade/models/order_strategy_execute_body_time_in_force'
93
91
  require 'snaptrade/models/order_type'
94
92
  require 'snaptrade/models/partner_data'
95
93
  require 'snaptrade/models/past_value'
@@ -118,9 +116,7 @@ require 'snaptrade/models/strategy_order_place'
118
116
  require 'snaptrade/models/strategy_order_place_orders_inner'
119
117
  require 'snaptrade/models/strategy_order_place_orders_inner_legs_inner'
120
118
  require 'snaptrade/models/strategy_order_record'
121
- require 'snaptrade/models/strategy_order_record_order_type'
122
119
  require 'snaptrade/models/strategy_order_record_status'
123
- require 'snaptrade/models/strategy_order_record_time_in_force'
124
120
  require 'snaptrade/models/strategy_quotes'
125
121
  require 'snaptrade/models/strategy_quotes_greek'
126
122
  require 'snaptrade/models/strategy_type'
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.17.3
4
+ version: 1.17.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - SnapTrade
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-10-18 00:00:00.000000000 Z
11
+ date: 2023-11-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday
@@ -158,8 +158,6 @@ files:
158
158
  - docs/OptionsPosition.md
159
159
  - docs/OptionsPositionCurrency.md
160
160
  - docs/OptionsSymbol.md
161
- - docs/OrderStrategyExecuteBodyOrderType.md
162
- - docs/OrderStrategyExecuteBodyTimeInForce.md
163
161
  - docs/OrderType.md
164
162
  - docs/PartnerData.md
165
163
  - docs/PastValue.md
@@ -189,9 +187,7 @@ files:
189
187
  - docs/StrategyOrderPlaceOrdersInner.md
190
188
  - docs/StrategyOrderPlaceOrdersInnerLegsInner.md
191
189
  - docs/StrategyOrderRecord.md
192
- - docs/StrategyOrderRecordOrderType.md
193
190
  - docs/StrategyOrderRecordStatus.md
194
- - docs/StrategyOrderRecordTimeInForce.md
195
191
  - docs/StrategyQuotes.md
196
192
  - docs/StrategyQuotesGreek.md
197
193
  - docs/StrategyType.md
@@ -306,8 +302,6 @@ files:
306
302
  - lib/snaptrade/models/options_position.rb
307
303
  - lib/snaptrade/models/options_position_currency.rb
308
304
  - lib/snaptrade/models/options_symbol.rb
309
- - lib/snaptrade/models/order_strategy_execute_body_order_type.rb
310
- - lib/snaptrade/models/order_strategy_execute_body_time_in_force.rb
311
305
  - lib/snaptrade/models/order_type.rb
312
306
  - lib/snaptrade/models/partner_data.rb
313
307
  - lib/snaptrade/models/past_value.rb
@@ -336,9 +330,7 @@ files:
336
330
  - lib/snaptrade/models/strategy_order_place_orders_inner.rb
337
331
  - lib/snaptrade/models/strategy_order_place_orders_inner_legs_inner.rb
338
332
  - lib/snaptrade/models/strategy_order_record.rb
339
- - lib/snaptrade/models/strategy_order_record_order_type.rb
340
333
  - lib/snaptrade/models/strategy_order_record_status.rb
341
- - lib/snaptrade/models/strategy_order_record_time_in_force.rb
342
334
  - lib/snaptrade/models/strategy_quotes.rb
343
335
  - lib/snaptrade/models/strategy_quotes_greek.rb
344
336
  - lib/snaptrade/models/strategy_type.rb
@@ -450,8 +442,6 @@ files:
450
442
  - spec/models/options_position_currency_spec.rb
451
443
  - spec/models/options_position_spec.rb
452
444
  - spec/models/options_symbol_spec.rb
453
- - spec/models/order_strategy_execute_body_order_type_spec.rb
454
- - spec/models/order_strategy_execute_body_time_in_force_spec.rb
455
445
  - spec/models/order_type_spec.rb
456
446
  - spec/models/partner_data_spec.rb
457
447
  - spec/models/past_value_spec.rb
@@ -479,10 +469,8 @@ files:
479
469
  - spec/models/strategy_order_place_orders_inner_legs_inner_spec.rb
480
470
  - spec/models/strategy_order_place_orders_inner_spec.rb
481
471
  - spec/models/strategy_order_place_spec.rb
482
- - spec/models/strategy_order_record_order_type_spec.rb
483
472
  - spec/models/strategy_order_record_spec.rb
484
473
  - spec/models/strategy_order_record_status_spec.rb
485
- - spec/models/strategy_order_record_time_in_force_spec.rb
486
474
  - spec/models/strategy_quotes_greek_spec.rb
487
475
  - spec/models/strategy_quotes_spec.rb
488
476
  - spec/models/strategy_type_spec.rb
@@ -572,7 +560,6 @@ test_files:
572
560
  - spec/models/trading_place_oco_order_request_spec.rb
573
561
  - spec/models/monthly_dividends_spec.rb
574
562
  - spec/models/model_portfolio_security_spec.rb
575
- - spec/models/order_strategy_execute_body_time_in_force_spec.rb
576
563
  - spec/models/strategy_order_place_spec.rb
577
564
  - spec/models/model_asset_class_target_spec.rb
578
565
  - spec/models/option_strategy_spec.rb
@@ -647,7 +634,6 @@ test_files:
647
634
  - spec/models/target_asset_spec.rb
648
635
  - spec/models/user_i_dand_secret_spec.rb
649
636
  - spec/models/strategy_order_place_orders_inner_legs_inner_spec.rb
650
- - spec/models/strategy_order_record_time_in_force_spec.rb
651
637
  - spec/models/us_exchange_spec.rb
652
638
  - spec/models/trade_spec.rb
653
639
  - spec/models/model_portfolio_asset_class_spec.rb
@@ -672,10 +658,8 @@ test_files:
672
658
  - spec/models/session_event_type_spec.rb
673
659
  - spec/models/transactions_status_spec.rb
674
660
  - spec/models/brokerage_authorization_type_read_only_spec.rb
675
- - spec/models/strategy_order_record_order_type_spec.rb
676
661
  - spec/models/symbols_quotes_inner_spec.rb
677
662
  - spec/models/dividend_at_date_spec.rb
678
- - spec/models/order_strategy_execute_body_order_type_spec.rb
679
663
  - spec/models/past_value_spec.rb
680
664
  - spec/models/model_portfolio_spec.rb
681
665
  - spec/spec_helper.rb
@@ -1,15 +0,0 @@
1
- # SnapTrade::OrderStrategyExecuteBodyOrderType
2
-
3
- ## Properties
4
-
5
- | Name | Type | Description | Notes |
6
- | ---- | ---- | ----------- | ----- |
7
-
8
- ## Example
9
-
10
- ```ruby
11
- require 'snaptrade'
12
-
13
- instance = SnapTrade::OrderStrategyExecuteBodyOrderType.new()
14
- ```
15
-
@@ -1,15 +0,0 @@
1
- # SnapTrade::OrderStrategyExecuteBodyTimeInForce
2
-
3
- ## Properties
4
-
5
- | Name | Type | Description | Notes |
6
- | ---- | ---- | ----------- | ----- |
7
-
8
- ## Example
9
-
10
- ```ruby
11
- require 'snaptrade'
12
-
13
- instance = SnapTrade::OrderStrategyExecuteBodyTimeInForce.new()
14
- ```
15
-
@@ -1,15 +0,0 @@
1
- # SnapTrade::StrategyOrderRecordOrderType
2
-
3
- ## Properties
4
-
5
- | Name | Type | Description | Notes |
6
- | ---- | ---- | ----------- | ----- |
7
-
8
- ## Example
9
-
10
- ```ruby
11
- require 'snaptrade'
12
-
13
- instance = SnapTrade::StrategyOrderRecordOrderType.new()
14
- ```
15
-
@@ -1,15 +0,0 @@
1
- # SnapTrade::StrategyOrderRecordTimeInForce
2
-
3
- ## Properties
4
-
5
- | Name | Type | Description | Notes |
6
- | ---- | ---- | ----------- | ----- |
7
-
8
- ## Example
9
-
10
- ```ruby
11
- require 'snaptrade'
12
-
13
- instance = SnapTrade::StrategyOrderRecordTimeInForce.new()
14
- ```
15
-
@@ -1,40 +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
-
9
- =end
10
-
11
- require 'date'
12
- require 'time'
13
-
14
- module SnapTrade
15
- class OrderStrategyExecuteBodyOrderType
16
- LIMIT = "Limit".freeze
17
- MARKET = "Market".freeze
18
- NET_DEBIT = "NetDebit".freeze
19
- NET_CREDIT = "NetCredit".freeze
20
-
21
- def self.all_vars
22
- @all_vars ||= [LIMIT, MARKET, NET_DEBIT, NET_CREDIT].freeze
23
- end
24
-
25
- # Builds the enum from string
26
- # @param [String] The enum value in the form of the string
27
- # @return [String] The enum value
28
- def self.build_from_hash(value)
29
- new.build_from_hash(value)
30
- end
31
-
32
- # Builds the enum from string
33
- # @param [String] The enum value in the form of the string
34
- # @return [String] The enum value
35
- def build_from_hash(value)
36
- return value if OrderStrategyExecuteBodyOrderType.all_vars.include?(value)
37
- raise "Invalid ENUM value #{value} for class #OrderStrategyExecuteBodyOrderType"
38
- end
39
- end
40
- end
@@ -1,38 +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
-
9
- =end
10
-
11
- require 'date'
12
- require 'time'
13
-
14
- module SnapTrade
15
- class OrderStrategyExecuteBodyTimeInForce
16
- DAY = "DAY".freeze
17
- GTC = "GTC".freeze
18
-
19
- def self.all_vars
20
- @all_vars ||= [DAY, GTC].freeze
21
- end
22
-
23
- # Builds the enum from string
24
- # @param [String] The enum value in the form of the string
25
- # @return [String] The enum value
26
- def self.build_from_hash(value)
27
- new.build_from_hash(value)
28
- end
29
-
30
- # Builds the enum from string
31
- # @param [String] The enum value in the form of the string
32
- # @return [String] The enum value
33
- def build_from_hash(value)
34
- return value if OrderStrategyExecuteBodyTimeInForce.all_vars.include?(value)
35
- raise "Invalid ENUM value #{value} for class #OrderStrategyExecuteBodyTimeInForce"
36
- end
37
- end
38
- end
@@ -1,40 +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
-
9
- =end
10
-
11
- require 'date'
12
- require 'time'
13
-
14
- module SnapTrade
15
- class StrategyOrderRecordOrderType
16
- LIMIT = "Limit".freeze
17
- MARKET = "Market".freeze
18
- NET_DEBIT = "NetDebit".freeze
19
- NET_CREDIT = "NetCredit".freeze
20
-
21
- def self.all_vars
22
- @all_vars ||= [LIMIT, MARKET, NET_DEBIT, NET_CREDIT].freeze
23
- end
24
-
25
- # Builds the enum from string
26
- # @param [String] The enum value in the form of the string
27
- # @return [String] The enum value
28
- def self.build_from_hash(value)
29
- new.build_from_hash(value)
30
- end
31
-
32
- # Builds the enum from string
33
- # @param [String] The enum value in the form of the string
34
- # @return [String] The enum value
35
- def build_from_hash(value)
36
- return value if StrategyOrderRecordOrderType.all_vars.include?(value)
37
- raise "Invalid ENUM value #{value} for class #StrategyOrderRecordOrderType"
38
- end
39
- end
40
- end
@@ -1,38 +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
-
9
- =end
10
-
11
- require 'date'
12
- require 'time'
13
-
14
- module SnapTrade
15
- class StrategyOrderRecordTimeInForce
16
- DAY = "DAY".freeze
17
- GTC = "GTC".freeze
18
-
19
- def self.all_vars
20
- @all_vars ||= [DAY, GTC].freeze
21
- end
22
-
23
- # Builds the enum from string
24
- # @param [String] The enum value in the form of the string
25
- # @return [String] The enum value
26
- def self.build_from_hash(value)
27
- new.build_from_hash(value)
28
- end
29
-
30
- # Builds the enum from string
31
- # @param [String] The enum value in the form of the string
32
- # @return [String] The enum value
33
- def build_from_hash(value)
34
- return value if StrategyOrderRecordTimeInForce.all_vars.include?(value)
35
- raise "Invalid ENUM value #{value} for class #StrategyOrderRecordTimeInForce"
36
- end
37
- end
38
- end
@@ -1,24 +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
-
9
- =end
10
-
11
- require 'spec_helper'
12
- require 'json'
13
- require 'date'
14
-
15
- # Unit tests for SnapTrade::OrderStrategyExecuteBodyOrderType
16
- describe SnapTrade::OrderStrategyExecuteBodyOrderType do
17
- let(:instance) { SnapTrade::OrderStrategyExecuteBodyOrderType.new }
18
-
19
- describe 'test an instance of OrderStrategyExecuteBodyOrderType' do
20
- it 'should create an instance of OrderStrategyExecuteBodyOrderType' do
21
- expect(instance).to be_instance_of(SnapTrade::OrderStrategyExecuteBodyOrderType)
22
- end
23
- end
24
- end
@@ -1,24 +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
-
9
- =end
10
-
11
- require 'spec_helper'
12
- require 'json'
13
- require 'date'
14
-
15
- # Unit tests for SnapTrade::OrderStrategyExecuteBodyTimeInForce
16
- describe SnapTrade::OrderStrategyExecuteBodyTimeInForce do
17
- let(:instance) { SnapTrade::OrderStrategyExecuteBodyTimeInForce.new }
18
-
19
- describe 'test an instance of OrderStrategyExecuteBodyTimeInForce' do
20
- it 'should create an instance of OrderStrategyExecuteBodyTimeInForce' do
21
- expect(instance).to be_instance_of(SnapTrade::OrderStrategyExecuteBodyTimeInForce)
22
- end
23
- end
24
- end
@@ -1,24 +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
-
9
- =end
10
-
11
- require 'spec_helper'
12
- require 'json'
13
- require 'date'
14
-
15
- # Unit tests for SnapTrade::StrategyOrderRecordOrderType
16
- describe SnapTrade::StrategyOrderRecordOrderType do
17
- let(:instance) { SnapTrade::StrategyOrderRecordOrderType.new }
18
-
19
- describe 'test an instance of StrategyOrderRecordOrderType' do
20
- it 'should create an instance of StrategyOrderRecordOrderType' do
21
- expect(instance).to be_instance_of(SnapTrade::StrategyOrderRecordOrderType)
22
- end
23
- end
24
- end
@@ -1,24 +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
-
9
- =end
10
-
11
- require 'spec_helper'
12
- require 'json'
13
- require 'date'
14
-
15
- # Unit tests for SnapTrade::StrategyOrderRecordTimeInForce
16
- describe SnapTrade::StrategyOrderRecordTimeInForce do
17
- let(:instance) { SnapTrade::StrategyOrderRecordTimeInForce.new }
18
-
19
- describe 'test an instance of StrategyOrderRecordTimeInForce' do
20
- it 'should create an instance of StrategyOrderRecordTimeInForce' do
21
- expect(instance).to be_instance_of(SnapTrade::StrategyOrderRecordTimeInForce)
22
- end
23
- end
24
- end