schwab-api-ruby 2.2.0 → 2.2.1

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: be363423988093dfb91101597addfe4c045bc1433123b1ca2eec384592f5445f
4
- data.tar.gz: 6e344be9f638a121e8198d1dd473f99738d7cd50cbd2e23d4d132c2acffc9551
3
+ metadata.gz: 0d7bd6bd7149bda50cc32cb02abb5f1badf56901110631a0254af67c74cef767
4
+ data.tar.gz: b6ed53cc5cf9825ebff29274671f7d3bc6851ecf8fa9c785ec49c5003a4fc056
5
5
  SHA512:
6
- metadata.gz: d37d7ae1dfb667ba753a29042332416a6b832216ae3516f9e8e2927f3ff3719d4c85d673ab127fd6636cc89859ba8db2994a576a0d5ad25998062e218336bfc4
7
- data.tar.gz: 5985f75a67f7f75c118b20f68de6dc839eb8183cfa8f149de27f80d69d7d9801bb7510d0ee175548b329c9953282e7722f2fed737470c2b6cdbd7a672fbd555c
6
+ metadata.gz: 11f5def805de4f6455f3fa8dad71c78370227ce40f808d08cd5711e3f6cb6b9c279a8a767146646457d0745bd86a052b6b9df9fb1775fe0ec91f0569297bfa75
7
+ data.tar.gz: fc4606c4e29a20063b0d61b1bcb55253801c33ff765061fd510b16c8d85745f6b30d06918ffb009c8b1bc99996465776921846c6b36f00917228777e9f3b3c38
data/CHANGELOG.md CHANGED
@@ -1,3 +1,6 @@
1
+ Version 2.2.1
2
+ - Expanded "fields" param for `get_quote` so that you can specify more return types
3
+
1
4
  Version 2.2.0
2
5
  - Add new methods: `get_account_numbers`, `get_accounts`, `get_instrument_by_cusip`, `get_transactions`
3
6
 
@@ -3,15 +3,17 @@ require 'schwab/operations/base_operation'
3
3
  module Schwab; module Operations
4
4
  class GetQuotes < BaseOperation
5
5
 
6
- FIELDS = %i[quote fundamental]
6
+ FIELDS = %i[quote extended fundamental reference regular]
7
7
 
8
- def call(symbols: [], fields: nil)
9
- raise(ArgumentError, 'fields must be :quote or :fundamental') if fields.present? && FIELDS.exclude?(fields)
8
+ def call(symbols: [], fields: [])
9
+ if fields.present? && fields.any? { |field| FIELDS.exclude?(field) }
10
+ raise(ArgumentError, "all fields must be in #{FIELDS}, got #{fields}")
11
+ end
10
12
 
11
13
  params = {
12
14
  symbols: symbols.join(','),
13
15
  }
14
- params.merge!(fields:) if fields.present?
16
+ params.merge!(fields: fields.join(',')) if fields.present?
15
17
 
16
18
  perform_api_get_request(
17
19
  url: "https://api.schwabapi.com/marketdata/v1/quotes",
@@ -1,3 +1,3 @@
1
1
  module Schwab
2
- VERSION = '2.2.0'
2
+ VERSION = '2.2.1'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: schwab-api-ruby
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.2.0
4
+ version: 2.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Winston Kotzan
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2025-07-13 00:00:00.000000000 Z
11
+ date: 2025-12-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler