snaptrade 2.0.131 → 2.0.133

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: aa9509ec89bcf39b195b067ed454bcc1a2944e65f8676e8e2770ec1777a5578a
4
- data.tar.gz: 90b79e3638a7a0e2db1b41dd5a71570a4ea360e4be5cf70dc90a6e6db9aa9d40
3
+ metadata.gz: af0d2039a57c1b91759e12516953be9d7b1a9f6060cbaa38dac3fd421770c0da
4
+ data.tar.gz: f3f7a79b4e2c577c5bb505521b7118929e1d04e903a69d01282c372b08215637
5
5
  SHA512:
6
- metadata.gz: 461ea85ac75a96dbff5bd0bcdb0758cb73821d16135c522b2e80b214de08ab1ac16bbdc8c0b5fec5dc751afe7b55cde8ee7237cc59f2b7e0f14e2be2b6400f8c
7
- data.tar.gz: 9eaeeaf04bdbc868f1b04fd4f84c1d07dece87e30a51e12f0aa35a3a2961542ecc757a406ba0fe3548b39d524907b6f7c1bbea3729ba880fffe4685637d141c9
6
+ metadata.gz: 4cbce888d7c200a68a3d84f39185627ed26c68e05c6be286eb9e63b54a97e3e5daf68faf95b7a153c3844bcd7b69775d696b096b83149031749a88f9c50d1078
7
+ data.tar.gz: 14e917dd59562d744a671f5d2fe0136ca719dbabc641e0c4db619028d4c7d9c990dbe4832575ba9dee8e1bd0890149f1f8b85fe6a4d0ed1978158e28abfd62ab
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- snaptrade (2.0.131)
4
+ snaptrade (2.0.133)
5
5
  faraday (>= 1.0.1, < 3.0)
6
6
  faraday-multipart (~> 1.0, >= 1.0.4)
7
7
 
@@ -32,7 +32,7 @@ GEM
32
32
  parser (3.3.9.0)
33
33
  ast (~> 2.4.1)
34
34
  racc
35
- prism (1.4.0)
35
+ prism (1.5.1)
36
36
  pry (0.14.2)
37
37
  coderay (~> 1.1)
38
38
  method_source (~> 1.0)
@@ -42,10 +42,10 @@ GEM
42
42
  racc (1.8.1)
43
43
  rainbow (3.1.1)
44
44
  rake (13.0.6)
45
- regexp_parser (2.11.2)
45
+ regexp_parser (2.11.3)
46
46
  reline (0.6.2)
47
47
  io-console (~> 0.5)
48
- rexml (3.4.2)
48
+ rexml (3.4.4)
49
49
  rspec (3.13.1)
50
50
  rspec-core (~> 3.13.0)
51
51
  rspec-expectations (~> 3.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.131-blue)](https://rubygems.org/gems/snaptrade/versions/2.0.131)
9
+ [![npm](https://img.shields.io/badge/gem-v2.0.133-blue)](https://rubygems.org/gems/snaptrade/versions/2.0.133)
10
10
  [![More Info](https://img.shields.io/badge/More%20Info-Click%20Here-orange)](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.131'
84
+ gem 'snaptrade', '~> 2.0.133'
85
85
  ```
86
86
 
87
87
  ## Getting Started<a id="getting-started"></a>
@@ -322,6 +322,8 @@ p result
322
322
 
323
323
  Returns the detail of a single order using the external order ID provided in the request body.
324
324
 
325
+ This endpoint only works for single-leg orders at this time. Support for multi-leg orders will be added in the future.
326
+
325
327
  This endpoint is always realtime and does not rely on cached data.
326
328
 
327
329
  This endpoint only returns orders placed through SnapTrade. In other words, orders placed outside of the SnapTrade network are not returned by this endpoint.
@@ -448,7 +450,7 @@ A lightweight endpoint that returns a list of orders executed in the last 24 hou
448
450
  This endpoint is realtime and can be used to quickly check if account state has recently changed due to an execution, or check status of recently placed orders
449
451
  Differs from /orders in that it is realtime, and only checks the last 24 hours as opposed to the last 30 days
450
452
  By default only returns executed orders, but that can be changed by setting *only_executed* to false
451
- **Please contact support for access as this endpoint is not enabled by default.**
453
+ **Because of the cost of realtime requests, each call to this endpoint incurs an additional charge. You can find the exact cost for your API key on the [Customer Dashboard billing page](https://dashboard.snaptrade.com/settings/billing)**
452
454
 
453
455
 
454
456
  #### 🛠️ Usage<a id="🛠️-usage"></a>
@@ -958,7 +960,7 @@ p result
958
960
  Trigger a holdings update for all accounts under this connection. Updates will be queued asynchronously. [`ACCOUNT_HOLDINGS_UPDATED` webhook](/docs/webhooks#webhooks-account_holdings_updated) will be sent once the sync completes for each account under the connection.
959
961
  This endpoint will also trigger a transaction sync for the past day if one has not yet occurred.
960
962
 
961
- **Because of the cost of refreshing a connection, each call to this endpoint incurs a additional charge based on your [Pricing Plan](https://snaptrade.com/pricing)**
963
+ **Please contact support before use. Because of the cost of refreshing a connection, each call to this endpoint incurs an additional charge. You can find the exact cost for your API key on the [Customer Dashboard billing page](https://dashboard.snaptrade.com/settings/billing)**
962
964
 
963
965
 
964
966
  #### 🛠️ Usage<a id="🛠️-usage"></a>
@@ -1517,23 +1519,23 @@ Cancels an order in the specified account. Accepts order IDs for all asset types
1517
1519
 
1518
1520
  ```ruby
1519
1521
  result = snaptrade.trading.cancel_order(
1522
+ brokerage_order_id: "66a033fa-da74-4fcf-b527-feefdec9257e",
1520
1523
  user_id: "snaptrade-user-123",
1521
1524
  user_secret: "adf2aa34-8219-40f7-a6b3-60156985cc61",
1522
1525
  account_id: "917c8734-8470-4a3e-a18f-57c3f2ee6631",
1523
- brokerage_order_id: "66a033fa-da74-4fcf-b527-feefdec9257e",
1524
1526
  )
1525
1527
  p result
1526
1528
  ```
1527
1529
 
1528
1530
  #### ⚙️ Parameters<a id="⚙️-parameters"></a>
1529
1531
 
1530
- ##### user_id: `String`<a id="user_id-string"></a>
1531
- ##### user_secret: `String`<a id="user_secret-string"></a>
1532
- ##### account_id: `String`<a id="account_id-string"></a>
1533
1532
  ##### brokerage_order_id: `String`<a id="brokerage_order_id-string"></a>
1534
1533
  Order ID returned by brokerage. This is the unique identifier for the order in
1535
1534
  the brokerage system.
1536
1535
 
1536
+ ##### user_id: `String`<a id="user_id-string"></a>
1537
+ ##### user_secret: `String`<a id="user_secret-string"></a>
1538
+ ##### account_id: `String`<a id="account_id-string"></a>
1537
1539
  #### 🔄 Return<a id="🔄-return"></a>
1538
1540
 
1539
1541
  [CancelOrderResponse](./lib/snaptrade/models/cancel_order_response.rb)
@@ -1558,23 +1560,23 @@ Attempts to cancel an open order with the brokerage. If the order is no longer c
1558
1560
 
1559
1561
  ```ruby
1560
1562
  result = snaptrade.trading.cancel_user_account_order(
1563
+ brokerage_order_id: "66a033fa-da74-4fcf-b527-feefdec9257e",
1561
1564
  user_id: "snaptrade-user-123",
1562
1565
  user_secret: "adf2aa34-8219-40f7-a6b3-60156985cc61",
1563
1566
  account_id: "917c8734-8470-4a3e-a18f-57c3f2ee6631",
1564
- brokerage_order_id: "66a033fa-da74-4fcf-b527-feefdec9257e",
1565
1567
  )
1566
1568
  p result
1567
1569
  ```
1568
1570
 
1569
1571
  #### ⚙️ Parameters<a id="⚙️-parameters"></a>
1570
1572
 
1571
- ##### user_id: `String`<a id="user_id-string"></a>
1572
- ##### user_secret: `String`<a id="user_secret-string"></a>
1573
- ##### account_id: `String`<a id="account_id-string"></a>
1574
1573
  ##### brokerage_order_id: `String`<a id="brokerage_order_id-string"></a>
1575
1574
  Order ID returned by brokerage. This is the unique identifier for the order in
1576
1575
  the brokerage system.
1577
1576
 
1577
+ ##### user_id: `String`<a id="user_id-string"></a>
1578
+ ##### user_secret: `String`<a id="user_secret-string"></a>
1579
+ ##### account_id: `String`<a id="account_id-string"></a>
1578
1580
  #### 🔄 Return<a id="🔄-return"></a>
1579
1581
 
1580
1582
  [AccountOrderRecord](./lib/snaptrade/models/account_order_record.rb)
@@ -501,6 +501,8 @@ module SnapTrade
501
501
  #
502
502
  # Returns the detail of a single order using the external order ID provided in the request body.
503
503
  #
504
+ # This endpoint only works for single-leg orders at this time. Support for multi-leg orders will be added in the future.
505
+ #
504
506
  # This endpoint is always realtime and does not rely on cached data.
505
507
  #
506
508
  # This endpoint only returns orders placed through SnapTrade. In other words, orders placed outside of the SnapTrade network are not returned by this endpoint.
@@ -523,6 +525,8 @@ module SnapTrade
523
525
  #
524
526
  # Returns the detail of a single order using the external order ID provided in the request body.
525
527
  #
528
+ # This endpoint only works for single-leg orders at this time. Support for multi-leg orders will be added in the future.
529
+ #
526
530
  # This endpoint is always realtime and does not rely on cached data.
527
531
  #
528
532
  # This endpoint only returns orders placed through SnapTrade. In other words, orders placed outside of the SnapTrade network are not returned by this endpoint.
@@ -541,7 +545,7 @@ module SnapTrade
541
545
  end
542
546
 
543
547
  # Get account order detail
544
- # Returns the detail of a single order using the external order ID provided in the request body. This endpoint is always realtime and does not rely on cached data. This endpoint only returns orders placed through SnapTrade. In other words, orders placed outside of the SnapTrade network are not returned by this endpoint.
548
+ # Returns the detail of a single order using the external order ID provided in the request body. This endpoint only works for single-leg orders at this time. Support for multi-leg orders will be added in the future. This endpoint is always realtime and does not rely on cached data. This endpoint only returns orders placed through SnapTrade. In other words, orders placed outside of the SnapTrade network are not returned by this endpoint.
545
549
  # @param account_id [String]
546
550
  # @param user_id [String]
547
551
  # @param user_secret [String]
@@ -554,7 +558,7 @@ module SnapTrade
554
558
  end
555
559
 
556
560
  # Get account order detail
557
- # Returns the detail of a single order using the external order ID provided in the request body. This endpoint is always realtime and does not rely on cached data. This endpoint only returns orders placed through SnapTrade. In other words, orders placed outside of the SnapTrade network are not returned by this endpoint.
561
+ # Returns the detail of a single order using the external order ID provided in the request body. This endpoint only works for single-leg orders at this time. Support for multi-leg orders will be added in the future. This endpoint is always realtime and does not rely on cached data. This endpoint only returns orders placed through SnapTrade. In other words, orders placed outside of the SnapTrade network are not returned by this endpoint.
558
562
  # @param account_id [String]
559
563
  # @param user_id [String]
560
564
  # @param user_secret [String]
@@ -871,7 +875,7 @@ module SnapTrade
871
875
  # This endpoint is realtime and can be used to quickly check if account state has recently changed due to an execution, or check status of recently placed orders
872
876
  # Differs from /orders in that it is realtime, and only checks the last 24 hours as opposed to the last 30 days
873
877
  # By default only returns executed orders, but that can be changed by setting *only_executed* to false
874
- # **Please contact support for access as this endpoint is not enabled by default.**
878
+ # **Because of the cost of realtime requests, each call to this endpoint incurs an additional charge. You can find the exact cost for your API key on the [Customer Dashboard billing page](https://dashboard.snaptrade.com/settings/billing)**
875
879
  #
876
880
  # @param user_id [String]
877
881
  # @param user_secret [String]
@@ -890,7 +894,7 @@ module SnapTrade
890
894
  # This endpoint is realtime and can be used to quickly check if account state has recently changed due to an execution, or check status of recently placed orders
891
895
  # Differs from /orders in that it is realtime, and only checks the last 24 hours as opposed to the last 30 days
892
896
  # By default only returns executed orders, but that can be changed by setting *only_executed* to false
893
- # **Please contact support for access as this endpoint is not enabled by default.**
897
+ # **Because of the cost of realtime requests, each call to this endpoint incurs an additional charge. You can find the exact cost for your API key on the [Customer Dashboard billing page](https://dashboard.snaptrade.com/settings/billing)**
894
898
  #
895
899
  # @param user_id [String]
896
900
  # @param user_secret [String]
@@ -903,7 +907,7 @@ module SnapTrade
903
907
  end
904
908
 
905
909
  # List account recent orders (last 24 hours only)
906
- # A lightweight endpoint that returns a list of orders executed in the last 24 hours in the specified account. This endpoint is realtime and can be used to quickly check if account state has recently changed due to an execution, or check status of recently placed orders Differs from /orders in that it is realtime, and only checks the last 24 hours as opposed to the last 30 days By default only returns executed orders, but that can be changed by setting *only_executed* to false **Please contact support for access as this endpoint is not enabled by default.**
910
+ # A lightweight endpoint that returns a list of orders executed in the last 24 hours in the specified account. This endpoint is realtime and can be used to quickly check if account state has recently changed due to an execution, or check status of recently placed orders Differs from /orders in that it is realtime, and only checks the last 24 hours as opposed to the last 30 days By default only returns executed orders, but that can be changed by setting *only_executed* to false **Because of the cost of realtime requests, each call to this endpoint incurs an additional charge. You can find the exact cost for your API key on the [Customer Dashboard billing page](https://dashboard.snaptrade.com/settings/billing)**
907
911
  # @param user_id [String]
908
912
  # @param user_secret [String]
909
913
  # @param account_id [String]
@@ -916,7 +920,7 @@ module SnapTrade
916
920
  end
917
921
 
918
922
  # List account recent orders (last 24 hours only)
919
- # A lightweight endpoint that returns a list of orders executed in the last 24 hours in the specified account. This endpoint is realtime and can be used to quickly check if account state has recently changed due to an execution, or check status of recently placed orders Differs from /orders in that it is realtime, and only checks the last 24 hours as opposed to the last 30 days By default only returns executed orders, but that can be changed by setting *only_executed* to false **Please contact support for access as this endpoint is not enabled by default.**
923
+ # A lightweight endpoint that returns a list of orders executed in the last 24 hours in the specified account. This endpoint is realtime and can be used to quickly check if account state has recently changed due to an execution, or check status of recently placed orders Differs from /orders in that it is realtime, and only checks the last 24 hours as opposed to the last 30 days By default only returns executed orders, but that can be changed by setting *only_executed* to false **Because of the cost of realtime requests, each call to this endpoint incurs an additional charge. You can find the exact cost for your API key on the [Customer Dashboard billing page](https://dashboard.snaptrade.com/settings/billing)**
920
924
  # @param user_id [String]
921
925
  # @param user_secret [String]
922
926
  # @param account_id [String]
@@ -337,7 +337,7 @@ module SnapTrade
337
337
  # Trigger a holdings update for all accounts under this connection. Updates will be queued asynchronously. [`ACCOUNT_HOLDINGS_UPDATED` webhook](/docs/webhooks#webhooks-account_holdings_updated) will be sent once the sync completes for each account under the connection.
338
338
  # This endpoint will also trigger a transaction sync for the past day if one has not yet occurred.
339
339
  #
340
- # **Because of the cost of refreshing a connection, each call to this endpoint incurs a additional charge based on your [Pricing Plan](https://snaptrade.com/pricing)**
340
+ # **Please contact support before use. Because of the cost of refreshing a connection, each call to this endpoint incurs an additional charge. You can find the exact cost for your API key on the [Customer Dashboard billing page](https://dashboard.snaptrade.com/settings/billing)**
341
341
  #
342
342
  # @param authorization_id [String]
343
343
  # @param user_id [String]
@@ -353,7 +353,7 @@ module SnapTrade
353
353
  # Trigger a holdings update for all accounts under this connection. Updates will be queued asynchronously. [`ACCOUNT_HOLDINGS_UPDATED` webhook](/docs/webhooks#webhooks-account_holdings_updated) will be sent once the sync completes for each account under the connection.
354
354
  # This endpoint will also trigger a transaction sync for the past day if one has not yet occurred.
355
355
  #
356
- # **Because of the cost of refreshing a connection, each call to this endpoint incurs a additional charge based on your [Pricing Plan](https://snaptrade.com/pricing)**
356
+ # **Please contact support before use. Because of the cost of refreshing a connection, each call to this endpoint incurs an additional charge. You can find the exact cost for your API key on the [Customer Dashboard billing page](https://dashboard.snaptrade.com/settings/billing)**
357
357
  #
358
358
  # @param authorization_id [String]
359
359
  # @param user_id [String]
@@ -364,7 +364,7 @@ module SnapTrade
364
364
  end
365
365
 
366
366
  # Refresh holdings for a connection
367
- # Trigger a holdings update for all accounts under this connection. Updates will be queued asynchronously. [`ACCOUNT_HOLDINGS_UPDATED` webhook](/docs/webhooks#webhooks-account_holdings_updated) will be sent once the sync completes for each account under the connection. This endpoint will also trigger a transaction sync for the past day if one has not yet occurred. **Because of the cost of refreshing a connection, each call to this endpoint incurs a additional charge based on your [Pricing Plan](https://snaptrade.com/pricing)**
367
+ # Trigger a holdings update for all accounts under this connection. Updates will be queued asynchronously. [`ACCOUNT_HOLDINGS_UPDATED` webhook](/docs/webhooks#webhooks-account_holdings_updated) will be sent once the sync completes for each account under the connection. This endpoint will also trigger a transaction sync for the past day if one has not yet occurred. **Please contact support before use. Because of the cost of refreshing a connection, each call to this endpoint incurs an additional charge. You can find the exact cost for your API key on the [Customer Dashboard billing page](https://dashboard.snaptrade.com/settings/billing)**
368
368
  # @param authorization_id [String]
369
369
  # @param user_id [String]
370
370
  # @param user_secret [String]
@@ -376,7 +376,7 @@ module SnapTrade
376
376
  end
377
377
 
378
378
  # Refresh holdings for a connection
379
- # Trigger a holdings update for all accounts under this connection. Updates will be queued asynchronously. [&#x60;ACCOUNT_HOLDINGS_UPDATED&#x60; webhook](/docs/webhooks#webhooks-account_holdings_updated) will be sent once the sync completes for each account under the connection. This endpoint will also trigger a transaction sync for the past day if one has not yet occurred. **Because of the cost of refreshing a connection, each call to this endpoint incurs a additional charge based on your [Pricing Plan](https://snaptrade.com/pricing)**
379
+ # Trigger a holdings update for all accounts under this connection. Updates will be queued asynchronously. [&#x60;ACCOUNT_HOLDINGS_UPDATED&#x60; webhook](/docs/webhooks#webhooks-account_holdings_updated) will be sent once the sync completes for each account under the connection. This endpoint will also trigger a transaction sync for the past day if one has not yet occurred. **Please contact support before use. Because of the cost of refreshing a connection, each call to this endpoint incurs an additional charge. You can find the exact cost for your API key on the [Customer Dashboard billing page](https://dashboard.snaptrade.com/settings/billing)**
380
380
  # @param authorization_id [String]
381
381
  # @param user_id [String]
382
382
  # @param user_secret [String]
@@ -21,17 +21,17 @@ module SnapTrade
21
21
  #
22
22
  # Cancels an order in the specified account. Accepts order IDs for all asset types.
23
23
  #
24
+ # @param brokerage_order_id [String] Order ID returned by brokerage. This is the unique identifier for the order in the brokerage system.
24
25
  # @param user_id [String]
25
26
  # @param user_secret [String]
26
27
  # @param account_id [String]
27
- # @param brokerage_order_id [String] Order ID returned by brokerage. This is the unique identifier for the order in the brokerage system.
28
- # @param body [TradingCancelUserAccountOrderRequest]
28
+ # @param body [AccountInformationGetUserAccountOrderDetailRequest]
29
29
  # @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
30
- def cancel_order(user_id:, user_secret:, account_id:, brokerage_order_id: SENTINEL, extra: {})
30
+ def cancel_order(brokerage_order_id:, user_id:, user_secret:, account_id:, extra: {})
31
31
  _body = {}
32
32
  _body[:brokerage_order_id] = brokerage_order_id if brokerage_order_id != SENTINEL
33
- trading_cancel_user_account_order_request = _body
34
- data, _status_code, _headers = cancel_order_with_http_info_impl(user_id, user_secret, account_id, trading_cancel_user_account_order_request, extra)
33
+ account_information_get_user_account_order_detail_request = _body
34
+ data, _status_code, _headers = cancel_order_with_http_info_impl(user_id, user_secret, account_id, account_information_get_user_account_order_detail_request, extra)
35
35
  data
36
36
  end
37
37
 
@@ -39,17 +39,17 @@ module SnapTrade
39
39
  #
40
40
  # Cancels an order in the specified account. Accepts order IDs for all asset types.
41
41
  #
42
+ # @param brokerage_order_id [String] Order ID returned by brokerage. This is the unique identifier for the order in the brokerage system.
42
43
  # @param user_id [String]
43
44
  # @param user_secret [String]
44
45
  # @param account_id [String]
45
- # @param brokerage_order_id [String] Order ID returned by brokerage. This is the unique identifier for the order in the brokerage system.
46
- # @param body [TradingCancelUserAccountOrderRequest]
46
+ # @param body [AccountInformationGetUserAccountOrderDetailRequest]
47
47
  # @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
48
- def cancel_order_with_http_info(user_id:, user_secret:, account_id:, brokerage_order_id: SENTINEL, extra: {})
48
+ def cancel_order_with_http_info(brokerage_order_id:, user_id:, user_secret:, account_id:, extra: {})
49
49
  _body = {}
50
50
  _body[:brokerage_order_id] = brokerage_order_id if brokerage_order_id != SENTINEL
51
- trading_cancel_user_account_order_request = _body
52
- cancel_order_with_http_info_impl(user_id, user_secret, account_id, trading_cancel_user_account_order_request, extra)
51
+ account_information_get_user_account_order_detail_request = _body
52
+ cancel_order_with_http_info_impl(user_id, user_secret, account_id, account_information_get_user_account_order_detail_request, extra)
53
53
  end
54
54
 
55
55
  # Cancel order
@@ -57,11 +57,11 @@ module SnapTrade
57
57
  # @param user_id [String]
58
58
  # @param user_secret [String]
59
59
  # @param account_id [String]
60
- # @param trading_cancel_user_account_order_request [TradingCancelUserAccountOrderRequest]
60
+ # @param account_information_get_user_account_order_detail_request [AccountInformationGetUserAccountOrderDetailRequest]
61
61
  # @param [Hash] opts the optional parameters
62
62
  # @return [CancelOrderResponse]
63
- private def cancel_order_impl(user_id, user_secret, account_id, trading_cancel_user_account_order_request, opts = {})
64
- data, _status_code, _headers = cancel_order_with_http_info(user_id, user_secret, account_id, trading_cancel_user_account_order_request, opts)
63
+ private def cancel_order_impl(user_id, user_secret, account_id, account_information_get_user_account_order_detail_request, opts = {})
64
+ data, _status_code, _headers = cancel_order_with_http_info(user_id, user_secret, account_id, account_information_get_user_account_order_detail_request, opts)
65
65
  data
66
66
  end
67
67
 
@@ -70,10 +70,10 @@ module SnapTrade
70
70
  # @param user_id [String]
71
71
  # @param user_secret [String]
72
72
  # @param account_id [String]
73
- # @param trading_cancel_user_account_order_request [TradingCancelUserAccountOrderRequest]
73
+ # @param account_information_get_user_account_order_detail_request [AccountInformationGetUserAccountOrderDetailRequest]
74
74
  # @param [Hash] opts the optional parameters
75
75
  # @return [Array<(CancelOrderResponse, Integer, Hash)>] CancelOrderResponse data, response status code and response headers
76
- private def cancel_order_with_http_info_impl(user_id, user_secret, account_id, trading_cancel_user_account_order_request, opts = {})
76
+ private def cancel_order_with_http_info_impl(user_id, user_secret, account_id, account_information_get_user_account_order_detail_request, opts = {})
77
77
  if @api_client.config.debugging
78
78
  @api_client.config.logger.debug 'Calling API: TradingApi.cancel_order ...'
79
79
  end
@@ -89,9 +89,9 @@ module SnapTrade
89
89
  if @api_client.config.client_side_validation && account_id.nil?
90
90
  fail ArgumentError, "Missing the required parameter 'account_id' when calling TradingApi.cancel_order"
91
91
  end
92
- # verify the required parameter 'trading_cancel_user_account_order_request' is set
93
- if @api_client.config.client_side_validation && trading_cancel_user_account_order_request.nil?
94
- fail ArgumentError, "Missing the required parameter 'trading_cancel_user_account_order_request' when calling TradingApi.cancel_order"
92
+ # verify the required parameter 'account_information_get_user_account_order_detail_request' is set
93
+ if @api_client.config.client_side_validation && account_information_get_user_account_order_detail_request.nil?
94
+ fail ArgumentError, "Missing the required parameter 'account_information_get_user_account_order_detail_request' when calling TradingApi.cancel_order"
95
95
  end
96
96
  # resource path
97
97
  local_var_path = '/accounts/{accountId}/trading/cancel'.sub('{' + 'accountId' + '}', CGI.escape(account_id.to_s))
@@ -115,7 +115,7 @@ module SnapTrade
115
115
  form_params = opts[:form_params] || {}
116
116
 
117
117
  # http body (model)
118
- post_body = opts[:debug_body] || @api_client.object_to_http_body(trading_cancel_user_account_order_request)
118
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(account_information_get_user_account_order_detail_request)
119
119
 
120
120
  # return_type
121
121
  return_type = opts[:debug_return_type] || 'CancelOrderResponse'
@@ -146,17 +146,17 @@ module SnapTrade
146
146
  # **This endpoint is deprecated. Please switch to [the new cancel order endpoint](/reference/Trading/Trading_cancelOrder) **
147
147
  # Attempts to cancel an open order with the brokerage. If the order is no longer cancellable, the request will be rejected.
148
148
  #
149
+ # @param brokerage_order_id [String] Order ID returned by brokerage. This is the unique identifier for the order in the brokerage system.
149
150
  # @param user_id [String]
150
151
  # @param user_secret [String]
151
152
  # @param account_id [String]
152
- # @param brokerage_order_id [String] Order ID returned by brokerage. This is the unique identifier for the order in the brokerage system.
153
- # @param body [TradingCancelUserAccountOrderRequest]
153
+ # @param body [AccountInformationGetUserAccountOrderDetailRequest]
154
154
  # @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
155
- def cancel_user_account_order(user_id:, user_secret:, account_id:, brokerage_order_id: SENTINEL, extra: {})
155
+ def cancel_user_account_order(brokerage_order_id:, user_id:, user_secret:, account_id:, extra: {})
156
156
  _body = {}
157
157
  _body[:brokerage_order_id] = brokerage_order_id if brokerage_order_id != SENTINEL
158
- trading_cancel_user_account_order_request = _body
159
- data, _status_code, _headers = cancel_user_account_order_with_http_info_impl(user_id, user_secret, account_id, trading_cancel_user_account_order_request, extra)
158
+ account_information_get_user_account_order_detail_request = _body
159
+ data, _status_code, _headers = cancel_user_account_order_with_http_info_impl(user_id, user_secret, account_id, account_information_get_user_account_order_detail_request, extra)
160
160
  data
161
161
  end
162
162
 
@@ -165,17 +165,17 @@ module SnapTrade
165
165
  # **This endpoint is deprecated. Please switch to [the new cancel order endpoint](/reference/Trading/Trading_cancelOrder) **
166
166
  # Attempts to cancel an open order with the brokerage. If the order is no longer cancellable, the request will be rejected.
167
167
  #
168
+ # @param brokerage_order_id [String] Order ID returned by brokerage. This is the unique identifier for the order in the brokerage system.
168
169
  # @param user_id [String]
169
170
  # @param user_secret [String]
170
171
  # @param account_id [String]
171
- # @param brokerage_order_id [String] Order ID returned by brokerage. This is the unique identifier for the order in the brokerage system.
172
- # @param body [TradingCancelUserAccountOrderRequest]
172
+ # @param body [AccountInformationGetUserAccountOrderDetailRequest]
173
173
  # @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
174
- def cancel_user_account_order_with_http_info(user_id:, user_secret:, account_id:, brokerage_order_id: SENTINEL, extra: {})
174
+ def cancel_user_account_order_with_http_info(brokerage_order_id:, user_id:, user_secret:, account_id:, extra: {})
175
175
  _body = {}
176
176
  _body[:brokerage_order_id] = brokerage_order_id if brokerage_order_id != SENTINEL
177
- trading_cancel_user_account_order_request = _body
178
- cancel_user_account_order_with_http_info_impl(user_id, user_secret, account_id, trading_cancel_user_account_order_request, extra)
177
+ account_information_get_user_account_order_detail_request = _body
178
+ cancel_user_account_order_with_http_info_impl(user_id, user_secret, account_id, account_information_get_user_account_order_detail_request, extra)
179
179
  end
180
180
 
181
181
  # Cancel equity order
@@ -183,11 +183,11 @@ module SnapTrade
183
183
  # @param user_id [String]
184
184
  # @param user_secret [String]
185
185
  # @param account_id [String]
186
- # @param trading_cancel_user_account_order_request [TradingCancelUserAccountOrderRequest]
186
+ # @param account_information_get_user_account_order_detail_request [AccountInformationGetUserAccountOrderDetailRequest]
187
187
  # @param [Hash] opts the optional parameters
188
188
  # @return [AccountOrderRecord]
189
- private def cancel_user_account_order_impl(user_id, user_secret, account_id, trading_cancel_user_account_order_request, opts = {})
190
- data, _status_code, _headers = cancel_user_account_order_with_http_info(user_id, user_secret, account_id, trading_cancel_user_account_order_request, opts)
189
+ private def cancel_user_account_order_impl(user_id, user_secret, account_id, account_information_get_user_account_order_detail_request, opts = {})
190
+ data, _status_code, _headers = cancel_user_account_order_with_http_info(user_id, user_secret, account_id, account_information_get_user_account_order_detail_request, opts)
191
191
  data
192
192
  end
193
193
 
@@ -196,10 +196,10 @@ module SnapTrade
196
196
  # @param user_id [String]
197
197
  # @param user_secret [String]
198
198
  # @param account_id [String]
199
- # @param trading_cancel_user_account_order_request [TradingCancelUserAccountOrderRequest]
199
+ # @param account_information_get_user_account_order_detail_request [AccountInformationGetUserAccountOrderDetailRequest]
200
200
  # @param [Hash] opts the optional parameters
201
201
  # @return [Array<(AccountOrderRecord, Integer, Hash)>] AccountOrderRecord data, response status code and response headers
202
- private def cancel_user_account_order_with_http_info_impl(user_id, user_secret, account_id, trading_cancel_user_account_order_request, opts = {})
202
+ private def cancel_user_account_order_with_http_info_impl(user_id, user_secret, account_id, account_information_get_user_account_order_detail_request, opts = {})
203
203
  if @api_client.config.debugging
204
204
  @api_client.config.logger.debug 'Calling API: TradingApi.cancel_user_account_order ...'
205
205
  end
@@ -215,9 +215,9 @@ module SnapTrade
215
215
  if @api_client.config.client_side_validation && account_id.nil?
216
216
  fail ArgumentError, "Missing the required parameter 'account_id' when calling TradingApi.cancel_user_account_order"
217
217
  end
218
- # verify the required parameter 'trading_cancel_user_account_order_request' is set
219
- if @api_client.config.client_side_validation && trading_cancel_user_account_order_request.nil?
220
- fail ArgumentError, "Missing the required parameter 'trading_cancel_user_account_order_request' when calling TradingApi.cancel_user_account_order"
218
+ # verify the required parameter 'account_information_get_user_account_order_detail_request' is set
219
+ if @api_client.config.client_side_validation && account_information_get_user_account_order_detail_request.nil?
220
+ fail ArgumentError, "Missing the required parameter 'account_information_get_user_account_order_detail_request' when calling TradingApi.cancel_user_account_order"
221
221
  end
222
222
  # resource path
223
223
  local_var_path = '/accounts/{accountId}/orders/cancel'.sub('{' + 'accountId' + '}', CGI.escape(account_id.to_s))
@@ -241,7 +241,7 @@ module SnapTrade
241
241
  form_params = opts[:form_params] || {}
242
242
 
243
243
  # http body (model)
244
- post_body = opts[:debug_body] || @api_client.object_to_http_body(trading_cancel_user_account_order_request)
244
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(account_information_get_user_account_order_detail_request)
245
245
 
246
246
  # return_type
247
247
  return_type = opts[:debug_return_type] || 'AccountOrderRecord'
@@ -11,7 +11,7 @@ require 'date'
11
11
  require 'time'
12
12
 
13
13
  module SnapTrade
14
- # Details of the stop loss order. Only to be used when order_class = BRACKET. stop_price is required, limit_price is optional
14
+ # Takes in string value for stop_price and limit_price. stop_price is required, limit_price is optional
15
15
  class StopLoss
16
16
  attr_accessor :stop_price
17
17
 
@@ -11,7 +11,7 @@ require 'date'
11
11
  require 'time'
12
12
 
13
13
  module SnapTrade
14
- # Details of the take profit order. Only to be used when order_class = BRACKET.
14
+ # Takes in a string value for limit_price
15
15
  class TakeProfit
16
16
  attr_accessor :limit_price
17
17
 
@@ -8,5 +8,5 @@ Contact: api@snaptrade.com
8
8
  =end
9
9
 
10
10
  module SnapTrade
11
- VERSION = '2.0.131'
11
+ VERSION = '2.0.133'
12
12
  end
data/lib/snaptrade.rb CHANGED
@@ -158,7 +158,6 @@ require 'snaptrade/models/symbols_quotes_inner'
158
158
  require 'snaptrade/models/take_profit'
159
159
  require 'snaptrade/models/time_in_force_strict'
160
160
  require 'snaptrade/models/timeframe'
161
- require 'snaptrade/models/trading_cancel_user_account_order_request'
162
161
  require 'snaptrade/models/trading_instrument'
163
162
  require 'snaptrade/models/trading_instrument_type'
164
163
  require 'snaptrade/models/trading_search_cryptocurrency_pair_instruments200_response'
@@ -90,7 +90,7 @@ describe 'AccountInformationApi' do
90
90
 
91
91
  # unit tests for get_user_account_order_detail
92
92
  # Get account order detail
93
- # Returns the detail of a single order using the external order ID provided in the request body. This endpoint is always realtime and does not rely on cached data. This endpoint only returns orders placed through SnapTrade. In other words, orders placed outside of the SnapTrade network are not returned by this endpoint.
93
+ # Returns the detail of a single order using the external order ID provided in the request body. This endpoint only works for single-leg orders at this time. Support for multi-leg orders will be added in the future. This endpoint is always realtime and does not rely on cached data. This endpoint only returns orders placed through SnapTrade. In other words, orders placed outside of the SnapTrade network are not returned by this endpoint.
94
94
  # @param account_id
95
95
  # @param user_id
96
96
  # @param user_secret
@@ -135,7 +135,7 @@ describe 'AccountInformationApi' do
135
135
 
136
136
  # unit tests for get_user_account_recent_orders
137
137
  # List account recent orders (last 24 hours only)
138
- # A lightweight endpoint that returns a list of orders executed in the last 24 hours in the specified account. This endpoint is realtime and can be used to quickly check if account state has recently changed due to an execution, or check status of recently placed orders Differs from /orders in that it is realtime, and only checks the last 24 hours as opposed to the last 30 days By default only returns executed orders, but that can be changed by setting *only_executed* to false **Please contact support for access as this endpoint is not enabled by default.**
138
+ # A lightweight endpoint that returns a list of orders executed in the last 24 hours in the specified account. This endpoint is realtime and can be used to quickly check if account state has recently changed due to an execution, or check status of recently placed orders Differs from /orders in that it is realtime, and only checks the last 24 hours as opposed to the last 30 days By default only returns executed orders, but that can be changed by setting *only_executed* to false **Because of the cost of realtime requests, each call to this endpoint incurs an additional charge. You can find the exact cost for your API key on the [Customer Dashboard billing page](https://dashboard.snaptrade.com/settings/billing)**
139
139
  # @param user_id
140
140
  # @param user_secret
141
141
  # @param account_id
@@ -70,7 +70,7 @@ describe 'ConnectionsApi' do
70
70
 
71
71
  # unit tests for refresh_brokerage_authorization
72
72
  # Refresh holdings for a connection
73
- # Trigger a holdings update for all accounts under this connection. Updates will be queued asynchronously. [&#x60;ACCOUNT_HOLDINGS_UPDATED&#x60; webhook](/docs/webhooks#webhooks-account_holdings_updated) will be sent once the sync completes for each account under the connection. This endpoint will also trigger a transaction sync for the past day if one has not yet occurred. **Because of the cost of refreshing a connection, each call to this endpoint incurs a additional charge based on your [Pricing Plan](https://snaptrade.com/pricing)**
73
+ # Trigger a holdings update for all accounts under this connection. Updates will be queued asynchronously. [&#x60;ACCOUNT_HOLDINGS_UPDATED&#x60; webhook](/docs/webhooks#webhooks-account_holdings_updated) will be sent once the sync completes for each account under the connection. This endpoint will also trigger a transaction sync for the past day if one has not yet occurred. **Please contact support before use. Because of the cost of refreshing a connection, each call to this endpoint incurs an additional charge. You can find the exact cost for your API key on the [Customer Dashboard billing page](https://dashboard.snaptrade.com/settings/billing)**
74
74
  # @param authorization_id
75
75
  # @param user_id
76
76
  # @param user_secret
@@ -33,7 +33,7 @@ describe 'TradingApi' do
33
33
  # @param user_id
34
34
  # @param user_secret
35
35
  # @param account_id
36
- # @param trading_cancel_user_account_order_request
36
+ # @param account_information_get_user_account_order_detail_request
37
37
  # @param [Hash] opts the optional parameters
38
38
  # @return [CancelOrderResponse]
39
39
  describe 'cancel_order test' do
@@ -48,7 +48,7 @@ describe 'TradingApi' do
48
48
  # @param user_id
49
49
  # @param user_secret
50
50
  # @param account_id
51
- # @param trading_cancel_user_account_order_request
51
+ # @param account_information_get_user_account_order_detail_request
52
52
  # @param [Hash] opts the optional parameters
53
53
  # @return [AccountOrderRecord]
54
54
  describe 'cancel_user_account_order test' do
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.131
4
+ version: 2.0.133
5
5
  platform: ruby
6
6
  authors:
7
7
  - SnapTrade
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2025-09-05 00:00:00.000000000 Z
11
+ date: 2025-09-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday
@@ -237,7 +237,6 @@ files:
237
237
  - lib/snaptrade/models/take_profit.rb
238
238
  - lib/snaptrade/models/time_in_force_strict.rb
239
239
  - lib/snaptrade/models/timeframe.rb
240
- - lib/snaptrade/models/trading_cancel_user_account_order_request.rb
241
240
  - lib/snaptrade/models/trading_instrument.rb
242
241
  - lib/snaptrade/models/trading_instrument_type.rb
243
242
  - lib/snaptrade/models/trading_search_cryptocurrency_pair_instruments200_response.rb
@@ -406,7 +405,6 @@ files:
406
405
  - spec/models/take_profit_spec.rb
407
406
  - spec/models/time_in_force_strict_spec.rb
408
407
  - spec/models/timeframe_spec.rb
409
- - spec/models/trading_cancel_user_account_order_request_spec.rb
410
408
  - spec/models/trading_instrument_spec.rb
411
409
  - spec/models/trading_instrument_type_spec.rb
412
410
  - spec/models/trading_search_cryptocurrency_pair_instruments200_response_spec.rb
@@ -595,7 +593,6 @@ test_files:
595
593
  - spec/models/option_type_spec.rb
596
594
  - spec/models/option_chain_inner_chain_per_root_inner_chain_per_strike_price_inner_spec.rb
597
595
  - spec/models/validated_trade_body_spec.rb
598
- - spec/models/trading_cancel_user_account_order_request_spec.rb
599
596
  - spec/models/underlying_symbol_spec.rb
600
597
  - spec/models/brokerage_authorization_type_read_only_brokerage_spec.rb
601
598
  - spec/models/partner_data_spec.rb
@@ -1,217 +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
- =end
9
-
10
- require 'date'
11
- require 'time'
12
-
13
- module SnapTrade
14
- class TradingCancelUserAccountOrderRequest
15
- # Order ID returned by brokerage. This is the unique identifier for the order in the brokerage system.
16
- attr_accessor :brokerage_order_id
17
-
18
- # Attribute mapping from ruby-style variable name to JSON key.
19
- def self.attribute_map
20
- {
21
- :'brokerage_order_id' => :'brokerage_order_id'
22
- }
23
- end
24
-
25
- # Returns all the JSON keys this model knows about
26
- def self.acceptable_attributes
27
- attribute_map.values
28
- end
29
-
30
- # Attribute type mapping.
31
- def self.openapi_types
32
- {
33
- :'brokerage_order_id' => :'String'
34
- }
35
- end
36
-
37
- # List of attributes with nullable: true
38
- def self.openapi_nullable
39
- Set.new([
40
- ])
41
- end
42
-
43
- # Initializes the object
44
- # @param [Hash] attributes Model attributes in the form of hash
45
- def initialize(attributes = {})
46
- if (!attributes.is_a?(Hash))
47
- fail ArgumentError, "The input argument (attributes) must be a hash in `SnapTrade::TradingCancelUserAccountOrderRequest` initialize method"
48
- end
49
-
50
- # check to see if the attribute exists and convert string to symbol for hash key
51
- attributes = attributes.each_with_object({}) { |(k, v), h|
52
- if (!self.class.attribute_map.key?(k.to_sym))
53
- fail ArgumentError, "`#{k}` is not a valid attribute in `SnapTrade::TradingCancelUserAccountOrderRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
54
- end
55
- h[k.to_sym] = v
56
- }
57
-
58
- if attributes.key?(:'brokerage_order_id')
59
- self.brokerage_order_id = attributes[:'brokerage_order_id']
60
- end
61
- end
62
-
63
- # Show invalid properties with the reasons. Usually used together with valid?
64
- # @return Array for valid properties with the reasons
65
- def list_invalid_properties
66
- invalid_properties = Array.new
67
- invalid_properties
68
- end
69
-
70
- # Check to see if the all the properties in the model are valid
71
- # @return true if the model is valid
72
- def valid?
73
- true
74
- end
75
-
76
- # Checks equality by comparing each attribute.
77
- # @param [Object] Object to be compared
78
- def ==(o)
79
- return true if self.equal?(o)
80
- self.class == o.class &&
81
- brokerage_order_id == o.brokerage_order_id
82
- end
83
-
84
- # @see the `==` method
85
- # @param [Object] Object to be compared
86
- def eql?(o)
87
- self == o
88
- end
89
-
90
- # Calculates hash code according to all attributes.
91
- # @return [Integer] Hash code
92
- def hash
93
- [brokerage_order_id].hash
94
- end
95
-
96
- # Builds the object from hash
97
- # @param [Hash] attributes Model attributes in the form of hash
98
- # @return [Object] Returns the model itself
99
- def self.build_from_hash(attributes)
100
- new.build_from_hash(attributes)
101
- end
102
-
103
- # Builds the object from hash
104
- # @param [Hash] attributes Model attributes in the form of hash
105
- # @return [Object] Returns the model itself
106
- def build_from_hash(attributes)
107
- return nil unless attributes.is_a?(Hash)
108
- attributes = attributes.transform_keys(&:to_sym)
109
- self.class.openapi_types.each_pair do |key, type|
110
- if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
111
- self.send("#{key}=", nil)
112
- elsif type =~ /\AArray<(.*)>/i
113
- # check to ensure the input is an array given that the attribute
114
- # is documented as an array but the input is not
115
- if attributes[self.class.attribute_map[key]].is_a?(Array)
116
- self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
117
- end
118
- elsif !attributes[self.class.attribute_map[key]].nil?
119
- self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
120
- end
121
- end
122
-
123
- self
124
- end
125
-
126
- # Deserializes the data based on type
127
- # @param string type Data type
128
- # @param string value Value to be deserialized
129
- # @return [Object] Deserialized data
130
- def _deserialize(type, value)
131
- case type.to_sym
132
- when :Time
133
- Time.parse(value)
134
- when :Date
135
- Date.parse(value)
136
- when :String
137
- value.to_s
138
- when :Integer
139
- value.to_i
140
- when :Float
141
- value.to_f
142
- when :Boolean
143
- if value.to_s =~ /\A(true|t|yes|y|1)\z/i
144
- true
145
- else
146
- false
147
- end
148
- when :Object
149
- # generic object (usually a Hash), return directly
150
- value
151
- when /\AArray<(?<inner_type>.+)>\z/
152
- inner_type = Regexp.last_match[:inner_type]
153
- value.map { |v| _deserialize(inner_type, v) }
154
- when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
155
- k_type = Regexp.last_match[:k_type]
156
- v_type = Regexp.last_match[:v_type]
157
- {}.tap do |hash|
158
- value.each do |k, v|
159
- hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
160
- end
161
- end
162
- else # model
163
- # models (e.g. Pet) or oneOf
164
- klass = SnapTrade.const_get(type)
165
- klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
166
- end
167
- end
168
-
169
- # Returns the string representation of the object
170
- # @return [String] String presentation of the object
171
- def to_s
172
- to_hash.to_s
173
- end
174
-
175
- # to_body is an alias to to_hash (backward compatibility)
176
- # @return [Hash] Returns the object in the form of hash
177
- def to_body
178
- to_hash
179
- end
180
-
181
- # Returns the object in the form of hash
182
- # @return [Hash] Returns the object in the form of hash
183
- def to_hash
184
- hash = {}
185
- self.class.attribute_map.each_pair do |attr, param|
186
- value = self.send(attr)
187
- if value.nil?
188
- is_nullable = self.class.openapi_nullable.include?(attr)
189
- next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
190
- end
191
-
192
- hash[param] = _to_hash(value)
193
- end
194
- hash
195
- end
196
-
197
- # Outputs non-array value in the form of hash
198
- # For object, use to_hash. Otherwise, just return the value
199
- # @param [Object] value Any valid value
200
- # @return [Hash] Returns the value in the form of hash
201
- def _to_hash(value)
202
- if value.is_a?(Array)
203
- value.compact.map { |v| _to_hash(v) }
204
- elsif value.is_a?(Hash)
205
- {}.tap do |hash|
206
- value.each { |k, v| hash[k] = _to_hash(v) }
207
- end
208
- elsif value.respond_to? :to_hash
209
- value.to_hash
210
- else
211
- value
212
- end
213
- end
214
-
215
- end
216
-
217
- end
@@ -1,29 +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
- =end
9
-
10
- require 'spec_helper'
11
- require 'json'
12
- require 'date'
13
-
14
- # Unit tests for SnapTrade::TradingCancelUserAccountOrderRequest
15
- describe SnapTrade::TradingCancelUserAccountOrderRequest do
16
- let(:instance) { SnapTrade::TradingCancelUserAccountOrderRequest.new }
17
-
18
- describe 'test an instance of TradingCancelUserAccountOrderRequest' do
19
- it 'should create an instance of TradingCancelUserAccountOrderRequest' do
20
- expect(instance).to be_instance_of(SnapTrade::TradingCancelUserAccountOrderRequest)
21
- end
22
- end
23
- describe 'test attribute "brokerage_order_id"' do
24
- it 'should work' do
25
- # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
26
- end
27
- end
28
-
29
- end