snaptrade 2.0.129 → 2.0.131

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: fec778920b549791f66f45c16297693da67c706839886de97a8fbb522a81b8bf
4
- data.tar.gz: 90405fd88ab9edf3b6c27409e5331e40c5722a49abc00384b487832d2240bf2d
3
+ metadata.gz: aa9509ec89bcf39b195b067ed454bcc1a2944e65f8676e8e2770ec1777a5578a
4
+ data.tar.gz: 90b79e3638a7a0e2db1b41dd5a71570a4ea360e4be5cf70dc90a6e6db9aa9d40
5
5
  SHA512:
6
- metadata.gz: fd847e8941992c09c6fbea2a2817ae638aeded1ae781cfa0bddee54ccbfd8f8a5dd5a6a37b2bf1c14c27bbe41b31bd9f251bd53a030ac5da38388be4de89dcb9
7
- data.tar.gz: f746f821017a9ac832b655a81f84a4878858e95ff0ea933f7485e1f849804d5a22ed14f16e1676c1f8f6e9858b3da6492f8bd73c116e404e08ce46d328871cf9
6
+ metadata.gz: 461ea85ac75a96dbff5bd0bcdb0758cb73821d16135c522b2e80b214de08ab1ac16bbdc8c0b5fec5dc751afe7b55cde8ee7237cc59f2b7e0f14e2be2b6400f8c
7
+ data.tar.gz: 9eaeeaf04bdbc868f1b04fd4f84c1d07dece87e30a51e12f0aa35a3a2961542ecc757a406ba0fe3548b39d524907b6f7c1bbea3729ba880fffe4685637d141c9
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- snaptrade (2.0.129)
4
+ snaptrade (2.0.131)
5
5
  faraday (>= 1.0.1, < 3.0)
6
6
  faraday-multipart (~> 1.0, >= 1.0.4)
7
7
 
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.129-blue)](https://rubygems.org/gems/snaptrade/versions/2.0.129)
9
+ [![npm](https://img.shields.io/badge/gem-v2.0.131-blue)](https://rubygems.org/gems/snaptrade/versions/2.0.131)
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.129'
84
+ gem 'snaptrade', '~> 2.0.131'
85
85
  ```
86
86
 
87
87
  ## Getting Started<a id="getting-started"></a>
@@ -331,7 +331,7 @@ This endpoint only returns orders placed through SnapTrade. In other words, orde
331
331
 
332
332
  ```ruby
333
333
  result = snaptrade.account_information.get_user_account_order_detail(
334
- external_order_id: "66a033fa-da74-4fcf-b527-feefdec9257e",
334
+ brokerage_order_id: "66a033fa-da74-4fcf-b527-feefdec9257e",
335
335
  account_id: "917c8734-8470-4a3e-a18f-57c3f2ee6631",
336
336
  user_id: "snaptrade-user-123",
337
337
  user_secret: "adf2aa34-8219-40f7-a6b3-60156985cc61",
@@ -341,7 +341,7 @@ p result
341
341
 
342
342
  #### ⚙️ Parameters<a id="⚙️-parameters"></a>
343
343
 
344
- ##### external_order_id: `String`<a id="external_order_id-string"></a>
344
+ ##### brokerage_order_id: `String`<a id="brokerage_order_id-string"></a>
345
345
  Order ID returned by brokerage. This is the unique identifier for the order in
346
346
  the brokerage system.
347
347
 
@@ -747,8 +747,10 @@ left empty unless you are reconnecting a disabled connection. See the [guide on
747
747
  fixing broken connections](/docs/fix-broken-connections) for more information.
748
748
 
749
749
  ##### connectionType: [`ConnectionType`](./lib/snaptrade/models/connection_type.rb)<a id="connectiontype-connectiontypelibsnaptrademodelsconnection_typerb"></a>
750
- Sets whether the connection should be read-only or trade-enabled. Defaults to
751
- read-only if not specified.
750
+ Determines connection permissions (default: read) - `read`: Data access only. -
751
+ `trade`: Data and trading access. - `trade-if-available`: Attempts to establish
752
+ a trading connection if the brokerage supports it, otherwise falls back to
753
+ read-only access automatically.
752
754
 
753
755
  ##### connectionPortalVersion: [`ConnectionPortalVersion`](./lib/snaptrade/models/connection_portal_version.rb)<a id="connectionportalversion-connectionportalversionlibsnaptrademodelsconnection_portal_versionrb"></a>
754
756
  Sets the connection portal version to render. Currently only v4 is supported and
@@ -505,15 +505,15 @@ module SnapTrade
505
505
  #
506
506
  # This endpoint only returns orders placed through SnapTrade. In other words, orders placed outside of the SnapTrade network are not returned by this endpoint.
507
507
  #
508
- # @param external_order_id [String] Order ID returned by brokerage. This is the unique identifier for the order in the brokerage system.
508
+ # @param brokerage_order_id [String] Order ID returned by brokerage. This is the unique identifier for the order in the brokerage system.
509
509
  # @param account_id [String]
510
510
  # @param user_id [String]
511
511
  # @param user_secret [String]
512
512
  # @param body [AccountInformationGetUserAccountOrderDetailRequest]
513
513
  # @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
514
- def get_user_account_order_detail(external_order_id:, account_id:, user_id:, user_secret:, extra: {})
514
+ def get_user_account_order_detail(brokerage_order_id:, account_id:, user_id:, user_secret:, extra: {})
515
515
  _body = {}
516
- _body[:external_order_id] = external_order_id if external_order_id != SENTINEL
516
+ _body[:brokerage_order_id] = brokerage_order_id if brokerage_order_id != SENTINEL
517
517
  account_information_get_user_account_order_detail_request = _body
518
518
  data, _status_code, _headers = get_user_account_order_detail_with_http_info_impl(account_id, user_id, user_secret, account_information_get_user_account_order_detail_request, extra)
519
519
  data
@@ -527,15 +527,15 @@ module SnapTrade
527
527
  #
528
528
  # This endpoint only returns orders placed through SnapTrade. In other words, orders placed outside of the SnapTrade network are not returned by this endpoint.
529
529
  #
530
- # @param external_order_id [String] Order ID returned by brokerage. This is the unique identifier for the order in the brokerage system.
530
+ # @param brokerage_order_id [String] Order ID returned by brokerage. This is the unique identifier for the order in the brokerage system.
531
531
  # @param account_id [String]
532
532
  # @param user_id [String]
533
533
  # @param user_secret [String]
534
534
  # @param body [AccountInformationGetUserAccountOrderDetailRequest]
535
535
  # @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
536
- def get_user_account_order_detail_with_http_info(external_order_id:, account_id:, user_id:, user_secret:, extra: {})
536
+ def get_user_account_order_detail_with_http_info(brokerage_order_id:, account_id:, user_id:, user_secret:, extra: {})
537
537
  _body = {}
538
- _body[:external_order_id] = external_order_id if external_order_id != SENTINEL
538
+ _body[:brokerage_order_id] = brokerage_order_id if brokerage_order_id != SENTINEL
539
539
  account_information_get_user_account_order_detail_request = _body
540
540
  get_user_account_order_detail_with_http_info_impl(account_id, user_id, user_secret, account_information_get_user_account_order_detail_request, extra)
541
541
  end
@@ -192,7 +192,7 @@ module SnapTrade
192
192
  # @param immediate_redirect [Boolean] When set to `true`, user will be redirected back to the partner's site instead of the connection portal. This parameter is ignored if the connection portal is loaded inside an iframe. See the [guide on ways to integrate the connection portal](/docs/implement-connection-portal) for more information.
193
193
  # @param custom_redirect [String] URL to redirect the user to after the user connects their brokerage account. This parameter is ignored if the connection portal is loaded inside an iframe. See the [guide on ways to integrate the connection portal](/docs/implement-connection-portal) for more information.
194
194
  # @param reconnect [String] The UUID of the brokerage connection to be reconnected. This parameter should be left empty unless you are reconnecting a disabled connection. See the [guide on fixing broken connections](/docs/fix-broken-connections) for more information.
195
- # @param connection_type [ConnectionType] Sets whether the connection should be read-only or trade-enabled. Defaults to read-only if not specified.
195
+ # @param connection_type [ConnectionType] Determines connection permissions (default: read) - `read`: Data access only. - `trade`: Data and trading access. - `trade-if-available`: Attempts to establish a trading connection if the brokerage supports it, otherwise falls back to read-only access automatically.
196
196
  # @param connection_portal_version [ConnectionPortalVersion] Sets the connection portal version to render. Currently only v4 is supported and is the default. All other versions are deprecated and will automatically be set to v4.
197
197
  # @param body [SnapTradeLoginUserRequestBody]
198
198
  # @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
@@ -221,7 +221,7 @@ module SnapTrade
221
221
  # @param immediate_redirect [Boolean] When set to `true`, user will be redirected back to the partner's site instead of the connection portal. This parameter is ignored if the connection portal is loaded inside an iframe. See the [guide on ways to integrate the connection portal](/docs/implement-connection-portal) for more information.
222
222
  # @param custom_redirect [String] URL to redirect the user to after the user connects their brokerage account. This parameter is ignored if the connection portal is loaded inside an iframe. See the [guide on ways to integrate the connection portal](/docs/implement-connection-portal) for more information.
223
223
  # @param reconnect [String] The UUID of the brokerage connection to be reconnected. This parameter should be left empty unless you are reconnecting a disabled connection. See the [guide on fixing broken connections](/docs/fix-broken-connections) for more information.
224
- # @param connection_type [ConnectionType] Sets whether the connection should be read-only or trade-enabled. Defaults to read-only if not specified.
224
+ # @param connection_type [ConnectionType] Determines connection permissions (default: read) - `read`: Data access only. - `trade`: Data and trading access. - `trade-if-available`: Attempts to establish a trading connection if the brokerage supports it, otherwise falls back to read-only access automatically.
225
225
  # @param connection_portal_version [ConnectionPortalVersion] Sets the connection portal version to render. Currently only v4 is supported and is the default. All other versions are deprecated and will automatically be set to v4.
226
226
  # @param body [SnapTradeLoginUserRequestBody]
227
227
  # @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
@@ -13,12 +13,12 @@ require 'time'
13
13
  module SnapTrade
14
14
  class AccountInformationGetUserAccountOrderDetailRequest
15
15
  # Order ID returned by brokerage. This is the unique identifier for the order in the brokerage system.
16
- attr_accessor :external_order_id
16
+ attr_accessor :brokerage_order_id
17
17
 
18
18
  # Attribute mapping from ruby-style variable name to JSON key.
19
19
  def self.attribute_map
20
20
  {
21
- :'external_order_id' => :'external_order_id'
21
+ :'brokerage_order_id' => :'brokerage_order_id'
22
22
  }
23
23
  end
24
24
 
@@ -30,7 +30,7 @@ module SnapTrade
30
30
  # Attribute type mapping.
31
31
  def self.openapi_types
32
32
  {
33
- :'external_order_id' => :'String'
33
+ :'brokerage_order_id' => :'String'
34
34
  }
35
35
  end
36
36
 
@@ -55,8 +55,8 @@ module SnapTrade
55
55
  h[k.to_sym] = v
56
56
  }
57
57
 
58
- if attributes.key?(:'external_order_id')
59
- self.external_order_id = attributes[:'external_order_id']
58
+ if attributes.key?(:'brokerage_order_id')
59
+ self.brokerage_order_id = attributes[:'brokerage_order_id']
60
60
  end
61
61
  end
62
62
 
@@ -64,8 +64,8 @@ module SnapTrade
64
64
  # @return Array for valid properties with the reasons
65
65
  def list_invalid_properties
66
66
  invalid_properties = Array.new
67
- if @external_order_id.nil?
68
- invalid_properties.push('invalid value for "external_order_id", external_order_id cannot be nil.')
67
+ if @brokerage_order_id.nil?
68
+ invalid_properties.push('invalid value for "brokerage_order_id", brokerage_order_id cannot be nil.')
69
69
  end
70
70
 
71
71
  invalid_properties
@@ -74,7 +74,7 @@ module SnapTrade
74
74
  # Check to see if the all the properties in the model are valid
75
75
  # @return true if the model is valid
76
76
  def valid?
77
- return false if @external_order_id.nil?
77
+ return false if @brokerage_order_id.nil?
78
78
  true
79
79
  end
80
80
 
@@ -83,7 +83,7 @@ module SnapTrade
83
83
  def ==(o)
84
84
  return true if self.equal?(o)
85
85
  self.class == o.class &&
86
- external_order_id == o.external_order_id
86
+ brokerage_order_id == o.brokerage_order_id
87
87
  end
88
88
 
89
89
  # @see the `==` method
@@ -95,7 +95,7 @@ module SnapTrade
95
95
  # Calculates hash code according to all attributes.
96
96
  # @return [Integer] Hash code
97
97
  def hash
98
- [external_order_id].hash
98
+ [brokerage_order_id].hash
99
99
  end
100
100
 
101
101
  # Builds the object from hash
@@ -14,9 +14,10 @@ module SnapTrade
14
14
  class ConnectionType
15
15
  READ = "read".freeze
16
16
  TRADE = "trade".freeze
17
+ TRADE_IF_AVAILABLE = "trade-if-available".freeze
17
18
 
18
19
  def self.all_vars
19
- @all_vars ||= [READ, TRADE].freeze
20
+ @all_vars ||= [READ, TRADE, TRADE_IF_AVAILABLE].freeze
20
21
  end
21
22
 
22
23
  # Builds the enum from string
@@ -25,7 +25,7 @@ module SnapTrade
25
25
  # The UUID of the brokerage connection to be reconnected. This parameter should be left empty unless you are reconnecting a disabled connection. See the [guide on fixing broken connections](/docs/fix-broken-connections) for more information.
26
26
  attr_accessor :reconnect
27
27
 
28
- # Sets whether the connection should be read-only or trade-enabled. Defaults to read-only if not specified.
28
+ # Determines connection permissions (default: read) - `read`: Data access only. - `trade`: Data and trading access. - `trade-if-available`: Attempts to establish a trading connection if the brokerage supports it, otherwise falls back to read-only access automatically.
29
29
  attr_accessor :connection_type
30
30
 
31
31
  # Sets the connection portal version to render. Currently only v4 is supported and is the default. All other versions are deprecated and will automatically be set to v4.
@@ -8,5 +8,5 @@ Contact: api@snaptrade.com
8
8
  =end
9
9
 
10
10
  module SnapTrade
11
- VERSION = '2.0.129'
11
+ VERSION = '2.0.131'
12
12
  end
@@ -20,7 +20,7 @@ describe SnapTrade::AccountInformationGetUserAccountOrderDetailRequest do
20
20
  expect(instance).to be_instance_of(SnapTrade::AccountInformationGetUserAccountOrderDetailRequest)
21
21
  end
22
22
  end
23
- describe 'test attribute "external_order_id"' do
23
+ describe 'test attribute "brokerage_order_id"' do
24
24
  it 'should work' do
25
25
  # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
26
26
  end
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.129
4
+ version: 2.0.131
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-03 00:00:00.000000000 Z
11
+ date: 2025-09-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday