brand.dev 0.7.0 → 0.8.0

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: f50feda932f54681e729abf32d227a1d656a0361750ea41e5ea71443d70a0a93
4
- data.tar.gz: 315072b49cec6b6f60f68e863c0edbcda4862a24fdbd10530f405a70c6415f56
3
+ metadata.gz: b2a777226800e59bc4e2049b62764ebe941bb521595593edb0b046969fd37d82
4
+ data.tar.gz: 3491f48a0bf45538ad64d0eeb21897a181c60c64d4eaa78987c1f86802b2ea59
5
5
  SHA512:
6
- metadata.gz: ebf3e3c91166e69f34ab3e0fba78df2b579bebb323d3a8d5591ad871ab11a16f071d78f5af44912093d8e6a78d02d9077a5f09dd2091d53473cdd36f992322f7
7
- data.tar.gz: c1d51e7e7d3dec11a1c46995b8d9277d68502b590900f16377a9f1a5e3e180db2e66e07c35971c178604f8aead837434b608661aa53b33eedf0143e8ddde5b13
6
+ metadata.gz: e019fe296386830d0bd10ac02f2720a27a568b6553f9dab0f94e11a52f75b29d8ab9dded416615a1236b32daa00df4d862393dc18c146836449f54594417130e
7
+ data.tar.gz: 247ba3c2617791ee32a412d1547bf7b54723d04ccc979c9fe28ee74d6d2d989f238280763c299e0e410b06c6d280e9c2f3f296d5c41b10ba050a6df56707e469
data/CHANGELOG.md CHANGED
@@ -1,5 +1,21 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.8.0 (2025-10-08)
4
+
5
+ Full Changelog: [v0.7.0...v0.8.0](https://github.com/brand-dot-dev/ruby-sdk/compare/v0.7.0...v0.8.0)
6
+
7
+ ### Features
8
+
9
+ * **api:** api update ([fa5a65e](https://github.com/brand-dot-dev/ruby-sdk/commit/fa5a65e269ef946b97bf9fe7f0e9f8dd1239b4e3))
10
+ * **api:** api update ([3c4ec01](https://github.com/brand-dot-dev/ruby-sdk/commit/3c4ec013b262955a26bc2a86100a07b0a28c8e9e))
11
+ * **api:** api update ([e4977c6](https://github.com/brand-dot-dev/ruby-sdk/commit/e4977c64436d23aee0fee29e2a72d912c09e626f))
12
+
13
+
14
+ ### Bug Fixes
15
+
16
+ * always send `filename=...` for multipart requests where a file is expected ([7135624](https://github.com/brand-dot-dev/ruby-sdk/commit/713562474e8ec92fde52cde5329f45c88ba0c594))
17
+ * coroutine leaks from connection pool ([a6e3480](https://github.com/brand-dot-dev/ruby-sdk/commit/a6e348070e779b39f9b80b0ec2fbc9f05910b4b4))
18
+
3
19
  ## 0.7.0 (2025-09-27)
4
20
 
5
21
  Full Changelog: [v0.6.0...v0.7.0](https://github.com/brand-dot-dev/ruby-sdk/compare/v0.6.0...v0.7.0)
data/README.md CHANGED
@@ -17,7 +17,7 @@ To use this gem, install via Bundler by adding the following to your application
17
17
  <!-- x-release-please-start-version -->
18
18
 
19
19
  ```ruby
20
- gem "brand.dev", "~> 0.7.0"
20
+ gem "brand.dev", "~> 0.8.0"
21
21
  ```
22
22
 
23
23
  <!-- x-release-please-end -->
@@ -38,18 +38,21 @@ module BrandDev
38
38
  def to_yaml(*a) = read.to_yaml(*a)
39
39
 
40
40
  # @param content [Pathname, StringIO, IO, String]
41
- # @param filename [String, nil]
41
+ # @param filename [Pathname, String, nil]
42
42
  # @param content_type [String, nil]
43
43
  def initialize(content, filename: nil, content_type: nil)
44
- @content = content
44
+ @content_type = content_type
45
45
  @filename =
46
- case content
47
- in Pathname
48
- filename.nil? ? content.basename.to_path : ::File.basename(filename)
46
+ case [filename, (@content = content)]
47
+ in [String | Pathname, _]
48
+ ::File.basename(filename)
49
+ in [nil, Pathname]
50
+ content.basename.to_path
51
+ in [nil, IO]
52
+ content.to_path
49
53
  else
50
- filename.nil? ? nil : ::File.basename(filename)
54
+ filename
51
55
  end
52
- @content_type = content_type
53
56
  end
54
57
  end
55
58
  end
@@ -134,9 +134,9 @@ module BrandDev
134
134
 
135
135
  # rubocop:disable Metrics/BlockLength
136
136
  enum = Enumerator.new do |y|
137
- with_pool(url, deadline: deadline) do |conn|
138
- next if finished
137
+ next if finished
139
138
 
139
+ with_pool(url, deadline: deadline) do |conn|
140
140
  req, closing = self.class.build_request(request) do
141
141
  self.class.calibrate_socket_timeout(conn, deadline)
142
142
  end
@@ -149,7 +149,7 @@ module BrandDev
149
149
 
150
150
  self.class.calibrate_socket_timeout(conn, deadline)
151
151
  conn.request(req) do |rsp|
152
- y << [conn, req, rsp]
152
+ y << [req, rsp]
153
153
  break if finished
154
154
 
155
155
  rsp.read_body do |bytes|
@@ -160,6 +160,8 @@ module BrandDev
160
160
  end
161
161
  eof = true
162
162
  end
163
+ ensure
164
+ conn.finish if !eof && conn&.started?
163
165
  end
164
166
  rescue Timeout::Error
165
167
  raise BrandDev::Errors::APITimeoutError.new(url: url, request: req)
@@ -168,16 +170,11 @@ module BrandDev
168
170
  end
169
171
  # rubocop:enable Metrics/BlockLength
170
172
 
171
- conn, _, response = enum.next
173
+ _, response = enum.next
172
174
  body = BrandDev::Internal::Util.fused_enum(enum, external: true) do
173
175
  finished = true
174
- tap do
175
- enum.next
176
- rescue StopIteration
177
- nil
178
- end
176
+ loop { enum.next }
179
177
  ensure
180
- conn.finish if !eof && conn&.started?
181
178
  closing&.call
182
179
  end
183
180
  [Integer(response.code), response, body]
@@ -82,17 +82,20 @@ module BrandDev
82
82
  #
83
83
  # @return [Pathname, StringIO, IO, String, Object]
84
84
  def dump(value, state:)
85
- # rubocop:disable Lint/DuplicateBranch
86
85
  case value
86
+ in StringIO | String
87
+ # https://datatracker.ietf.org/doc/html/rfc7578#section-4.2
88
+ # while not required, a filename is recommended, and in practice many servers do expect this
89
+ BrandDev::FilePart.new(value, filename: "upload")
87
90
  in IO
88
91
  state[:can_retry] = false
92
+ value.to_path.nil? ? BrandDev::FilePart.new(value, filename: "upload") : value
89
93
  in BrandDev::FilePart if value.content.is_a?(IO)
90
94
  state[:can_retry] = false
95
+ value
91
96
  else
97
+ value
92
98
  end
93
- # rubocop:enable Lint/DuplicateBranch
94
-
95
- value
96
99
  end
97
100
 
98
101
  # @api private
@@ -39,12 +39,19 @@ module BrandDev
39
39
 
40
40
  # @!attribute ticker
41
41
  # Stock ticker symbol to retrieve brand data for (e.g., 'AAPL', 'GOOGL', 'BRK.A').
42
- # Must be 1-6 characters, letters/numbers/dots only. Cannot be used with domain or
43
- # name parameters.
42
+ # Must be 1-15 characters, letters/numbers/dots only. Cannot be used with domain
43
+ # or name parameters.
44
44
  #
45
45
  # @return [String, nil]
46
46
  optional :ticker, String
47
47
 
48
+ # @!attribute ticker_exchange
49
+ # Optional stock exchange for the ticker. Only used when ticker parameter is
50
+ # provided. Defaults to assume ticker is American if not specified.
51
+ #
52
+ # @return [Symbol, BrandDev::Models::BrandRetrieveParams::TickerExchange, nil]
53
+ optional :ticker_exchange, enum: -> { BrandDev::BrandRetrieveParams::TickerExchange }
54
+
48
55
  # @!attribute timeout_ms
49
56
  # Optional timeout in milliseconds for the request. If the request takes longer
50
57
  # than this value, it will be aborted with a 408 status code. Maximum allowed
@@ -53,7 +60,7 @@ module BrandDev
53
60
  # @return [Integer, nil]
54
61
  optional :timeout_ms, Integer
55
62
 
56
- # @!method initialize(domain: nil, force_language: nil, max_speed: nil, name: nil, ticker: nil, timeout_ms: nil, request_options: {})
63
+ # @!method initialize(domain: nil, force_language: nil, max_speed: nil, name: nil, ticker: nil, ticker_exchange: nil, timeout_ms: nil, request_options: {})
57
64
  # Some parameter documentations has been truncated, see
58
65
  # {BrandDev::Models::BrandRetrieveParams} for more details.
59
66
  #
@@ -67,6 +74,8 @@ module BrandDev
67
74
  #
68
75
  # @param ticker [String] Stock ticker symbol to retrieve brand data for (e.g., 'AAPL', 'GOOGL', 'BRK.A').
69
76
  #
77
+ # @param ticker_exchange [Symbol, BrandDev::Models::BrandRetrieveParams::TickerExchange] Optional stock exchange for the ticker. Only used when ticker parameter is provi
78
+ #
70
79
  # @param timeout_ms [Integer] Optional timeout in milliseconds for the request. If the request takes longer th
71
80
  #
72
81
  # @param request_options [BrandDev::RequestOptions, Hash{Symbol=>Object}]
@@ -132,6 +141,88 @@ module BrandDev
132
141
  # @!method self.values
133
142
  # @return [Array<Symbol>]
134
143
  end
144
+
145
+ # Optional stock exchange for the ticker. Only used when ticker parameter is
146
+ # provided. Defaults to assume ticker is American if not specified.
147
+ module TickerExchange
148
+ extend BrandDev::Internal::Type::Enum
149
+
150
+ AMEX = :AMEX
151
+ AMS = :AMS
152
+ AQS = :AQS
153
+ ASX = :ASX
154
+ ATH = :ATH
155
+ BER = :BER
156
+ BME = :BME
157
+ BRU = :BRU
158
+ BSE = :BSE
159
+ BUD = :BUD
160
+ BUE = :BUE
161
+ BVC = :BVC
162
+ CBOE = :CBOE
163
+ CNQ = :CNQ
164
+ CPH = :CPH
165
+ DFM = :DFM
166
+ DOH = :DOH
167
+ DUB = :DUB
168
+ DUS = :DUS
169
+ DXE = :DXE
170
+ EGX = :EGX
171
+ FSX = :FSX
172
+ HAM = :HAM
173
+ HEL = :HEL
174
+ HKSE = :HKSE
175
+ HOSE = :HOSE
176
+ ICE = :ICE
177
+ IOB = :IOB
178
+ IST = :IST
179
+ JKT = :JKT
180
+ JNB = :JNB
181
+ JPX = :JPX
182
+ KLS = :KLS
183
+ KOE = :KOE
184
+ KSC = :KSC
185
+ KUW = :KUW
186
+ LIS = :LIS
187
+ LSE = :LSE
188
+ MCX = :MCX
189
+ MEX = :MEX
190
+ MIL = :MIL
191
+ MUN = :MUN
192
+ NASDAQ = :NASDAQ
193
+ NEO = :NEO
194
+ NSE = :NSE
195
+ NYSE = :NYSE
196
+ NZE = :NZE
197
+ OSL = :OSL
198
+ OTC = :OTC
199
+ PAR = :PAR
200
+ PNK = :PNK
201
+ PRA = :PRA
202
+ RIS = :RIS
203
+ SAO = :SAO
204
+ SAU = :SAU
205
+ SES = :SES
206
+ SET = :SET
207
+ SGO = :SGO
208
+ SHH = :SHH
209
+ SHZ = :SHZ
210
+ SIX = :SIX
211
+ STO = :STO
212
+ STU = :STU
213
+ TAI = :TAI
214
+ TAL = :TAL
215
+ TLV = :TLV
216
+ TSX = :TSX
217
+ TSXV = :TSXV
218
+ TWO = :TWO
219
+ VIE = :VIE
220
+ WSE = :WSE
221
+ XETRA = :XETRA
222
+
223
+ # @!method self.values
224
+ # @return [Array<Symbol>]
225
+ end
135
226
  end
136
227
  end
137
228
  end
@@ -9,7 +9,7 @@ module BrandDev
9
9
  # Retrieve brand information using one of three methods: domain name, company
10
10
  # name, or stock ticker symbol. Exactly one of these parameters must be provided.
11
11
  #
12
- # @overload retrieve(domain: nil, force_language: nil, max_speed: nil, name: nil, ticker: nil, timeout_ms: nil, request_options: {})
12
+ # @overload retrieve(domain: nil, force_language: nil, max_speed: nil, name: nil, ticker: nil, ticker_exchange: nil, timeout_ms: nil, request_options: {})
13
13
  #
14
14
  # @param domain [String] Domain name to retrieve brand data for (e.g., 'example.com', 'google.com'). Cann
15
15
  #
@@ -21,6 +21,8 @@ module BrandDev
21
21
  #
22
22
  # @param ticker [String] Stock ticker symbol to retrieve brand data for (e.g., 'AAPL', 'GOOGL', 'BRK.A').
23
23
  #
24
+ # @param ticker_exchange [Symbol, BrandDev::Models::BrandRetrieveParams::TickerExchange] Optional stock exchange for the ticker. Only used when ticker parameter is provi
25
+ #
24
26
  # @param timeout_ms [Integer] Optional timeout in milliseconds for the request. If the request takes longer th
25
27
  #
26
28
  # @param request_options [BrandDev::RequestOptions, Hash{Symbol=>Object}, nil]
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module BrandDev
4
- VERSION = "0.7.0"
4
+ VERSION = "0.8.0"
5
5
  end
@@ -27,7 +27,7 @@ module BrandDev
27
27
  sig do
28
28
  params(
29
29
  content: T.any(Pathname, StringIO, IO, String),
30
- filename: T.nilable(String),
30
+ filename: T.nilable(T.any(Pathname, String)),
31
31
  content_type: T.nilable(String)
32
32
  ).returns(T.attached_class)
33
33
  end
@@ -54,14 +54,31 @@ module BrandDev
54
54
  attr_writer :name
55
55
 
56
56
  # Stock ticker symbol to retrieve brand data for (e.g., 'AAPL', 'GOOGL', 'BRK.A').
57
- # Must be 1-6 characters, letters/numbers/dots only. Cannot be used with domain or
58
- # name parameters.
57
+ # Must be 1-15 characters, letters/numbers/dots only. Cannot be used with domain
58
+ # or name parameters.
59
59
  sig { returns(T.nilable(String)) }
60
60
  attr_reader :ticker
61
61
 
62
62
  sig { params(ticker: String).void }
63
63
  attr_writer :ticker
64
64
 
65
+ # Optional stock exchange for the ticker. Only used when ticker parameter is
66
+ # provided. Defaults to assume ticker is American if not specified.
67
+ sig do
68
+ returns(
69
+ T.nilable(BrandDev::BrandRetrieveParams::TickerExchange::OrSymbol)
70
+ )
71
+ end
72
+ attr_reader :ticker_exchange
73
+
74
+ sig do
75
+ params(
76
+ ticker_exchange:
77
+ BrandDev::BrandRetrieveParams::TickerExchange::OrSymbol
78
+ ).void
79
+ end
80
+ attr_writer :ticker_exchange
81
+
65
82
  # Optional timeout in milliseconds for the request. If the request takes longer
66
83
  # than this value, it will be aborted with a 408 status code. Maximum allowed
67
84
  # value is 300000ms (5 minutes).
@@ -79,6 +96,8 @@ module BrandDev
79
96
  max_speed: T::Boolean,
80
97
  name: String,
81
98
  ticker: String,
99
+ ticker_exchange:
100
+ BrandDev::BrandRetrieveParams::TickerExchange::OrSymbol,
82
101
  timeout_ms: Integer,
83
102
  request_options: BrandDev::RequestOptions::OrHash
84
103
  ).returns(T.attached_class)
@@ -99,9 +118,12 @@ module BrandDev
99
118
  # parameters.
100
119
  name: nil,
101
120
  # Stock ticker symbol to retrieve brand data for (e.g., 'AAPL', 'GOOGL', 'BRK.A').
102
- # Must be 1-6 characters, letters/numbers/dots only. Cannot be used with domain or
103
- # name parameters.
121
+ # Must be 1-15 characters, letters/numbers/dots only. Cannot be used with domain
122
+ # or name parameters.
104
123
  ticker: nil,
124
+ # Optional stock exchange for the ticker. Only used when ticker parameter is
125
+ # provided. Defaults to assume ticker is American if not specified.
126
+ ticker_exchange: nil,
105
127
  # Optional timeout in milliseconds for the request. If the request takes longer
106
128
  # than this value, it will be aborted with a 408 status code. Maximum allowed
107
129
  # value is 300000ms (5 minutes).
@@ -119,6 +141,8 @@ module BrandDev
119
141
  max_speed: T::Boolean,
120
142
  name: String,
121
143
  ticker: String,
144
+ ticker_exchange:
145
+ BrandDev::BrandRetrieveParams::TickerExchange::OrSymbol,
122
146
  timeout_ms: Integer,
123
147
  request_options: BrandDev::RequestOptions
124
148
  }
@@ -407,6 +431,389 @@ module BrandDev
407
431
  def self.values
408
432
  end
409
433
  end
434
+
435
+ # Optional stock exchange for the ticker. Only used when ticker parameter is
436
+ # provided. Defaults to assume ticker is American if not specified.
437
+ module TickerExchange
438
+ extend BrandDev::Internal::Type::Enum
439
+
440
+ TaggedSymbol =
441
+ T.type_alias do
442
+ T.all(Symbol, BrandDev::BrandRetrieveParams::TickerExchange)
443
+ end
444
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
445
+
446
+ AMEX =
447
+ T.let(
448
+ :AMEX,
449
+ BrandDev::BrandRetrieveParams::TickerExchange::TaggedSymbol
450
+ )
451
+ AMS =
452
+ T.let(
453
+ :AMS,
454
+ BrandDev::BrandRetrieveParams::TickerExchange::TaggedSymbol
455
+ )
456
+ AQS =
457
+ T.let(
458
+ :AQS,
459
+ BrandDev::BrandRetrieveParams::TickerExchange::TaggedSymbol
460
+ )
461
+ ASX =
462
+ T.let(
463
+ :ASX,
464
+ BrandDev::BrandRetrieveParams::TickerExchange::TaggedSymbol
465
+ )
466
+ ATH =
467
+ T.let(
468
+ :ATH,
469
+ BrandDev::BrandRetrieveParams::TickerExchange::TaggedSymbol
470
+ )
471
+ BER =
472
+ T.let(
473
+ :BER,
474
+ BrandDev::BrandRetrieveParams::TickerExchange::TaggedSymbol
475
+ )
476
+ BME =
477
+ T.let(
478
+ :BME,
479
+ BrandDev::BrandRetrieveParams::TickerExchange::TaggedSymbol
480
+ )
481
+ BRU =
482
+ T.let(
483
+ :BRU,
484
+ BrandDev::BrandRetrieveParams::TickerExchange::TaggedSymbol
485
+ )
486
+ BSE =
487
+ T.let(
488
+ :BSE,
489
+ BrandDev::BrandRetrieveParams::TickerExchange::TaggedSymbol
490
+ )
491
+ BUD =
492
+ T.let(
493
+ :BUD,
494
+ BrandDev::BrandRetrieveParams::TickerExchange::TaggedSymbol
495
+ )
496
+ BUE =
497
+ T.let(
498
+ :BUE,
499
+ BrandDev::BrandRetrieveParams::TickerExchange::TaggedSymbol
500
+ )
501
+ BVC =
502
+ T.let(
503
+ :BVC,
504
+ BrandDev::BrandRetrieveParams::TickerExchange::TaggedSymbol
505
+ )
506
+ CBOE =
507
+ T.let(
508
+ :CBOE,
509
+ BrandDev::BrandRetrieveParams::TickerExchange::TaggedSymbol
510
+ )
511
+ CNQ =
512
+ T.let(
513
+ :CNQ,
514
+ BrandDev::BrandRetrieveParams::TickerExchange::TaggedSymbol
515
+ )
516
+ CPH =
517
+ T.let(
518
+ :CPH,
519
+ BrandDev::BrandRetrieveParams::TickerExchange::TaggedSymbol
520
+ )
521
+ DFM =
522
+ T.let(
523
+ :DFM,
524
+ BrandDev::BrandRetrieveParams::TickerExchange::TaggedSymbol
525
+ )
526
+ DOH =
527
+ T.let(
528
+ :DOH,
529
+ BrandDev::BrandRetrieveParams::TickerExchange::TaggedSymbol
530
+ )
531
+ DUB =
532
+ T.let(
533
+ :DUB,
534
+ BrandDev::BrandRetrieveParams::TickerExchange::TaggedSymbol
535
+ )
536
+ DUS =
537
+ T.let(
538
+ :DUS,
539
+ BrandDev::BrandRetrieveParams::TickerExchange::TaggedSymbol
540
+ )
541
+ DXE =
542
+ T.let(
543
+ :DXE,
544
+ BrandDev::BrandRetrieveParams::TickerExchange::TaggedSymbol
545
+ )
546
+ EGX =
547
+ T.let(
548
+ :EGX,
549
+ BrandDev::BrandRetrieveParams::TickerExchange::TaggedSymbol
550
+ )
551
+ FSX =
552
+ T.let(
553
+ :FSX,
554
+ BrandDev::BrandRetrieveParams::TickerExchange::TaggedSymbol
555
+ )
556
+ HAM =
557
+ T.let(
558
+ :HAM,
559
+ BrandDev::BrandRetrieveParams::TickerExchange::TaggedSymbol
560
+ )
561
+ HEL =
562
+ T.let(
563
+ :HEL,
564
+ BrandDev::BrandRetrieveParams::TickerExchange::TaggedSymbol
565
+ )
566
+ HKSE =
567
+ T.let(
568
+ :HKSE,
569
+ BrandDev::BrandRetrieveParams::TickerExchange::TaggedSymbol
570
+ )
571
+ HOSE =
572
+ T.let(
573
+ :HOSE,
574
+ BrandDev::BrandRetrieveParams::TickerExchange::TaggedSymbol
575
+ )
576
+ ICE =
577
+ T.let(
578
+ :ICE,
579
+ BrandDev::BrandRetrieveParams::TickerExchange::TaggedSymbol
580
+ )
581
+ IOB =
582
+ T.let(
583
+ :IOB,
584
+ BrandDev::BrandRetrieveParams::TickerExchange::TaggedSymbol
585
+ )
586
+ IST =
587
+ T.let(
588
+ :IST,
589
+ BrandDev::BrandRetrieveParams::TickerExchange::TaggedSymbol
590
+ )
591
+ JKT =
592
+ T.let(
593
+ :JKT,
594
+ BrandDev::BrandRetrieveParams::TickerExchange::TaggedSymbol
595
+ )
596
+ JNB =
597
+ T.let(
598
+ :JNB,
599
+ BrandDev::BrandRetrieveParams::TickerExchange::TaggedSymbol
600
+ )
601
+ JPX =
602
+ T.let(
603
+ :JPX,
604
+ BrandDev::BrandRetrieveParams::TickerExchange::TaggedSymbol
605
+ )
606
+ KLS =
607
+ T.let(
608
+ :KLS,
609
+ BrandDev::BrandRetrieveParams::TickerExchange::TaggedSymbol
610
+ )
611
+ KOE =
612
+ T.let(
613
+ :KOE,
614
+ BrandDev::BrandRetrieveParams::TickerExchange::TaggedSymbol
615
+ )
616
+ KSC =
617
+ T.let(
618
+ :KSC,
619
+ BrandDev::BrandRetrieveParams::TickerExchange::TaggedSymbol
620
+ )
621
+ KUW =
622
+ T.let(
623
+ :KUW,
624
+ BrandDev::BrandRetrieveParams::TickerExchange::TaggedSymbol
625
+ )
626
+ LIS =
627
+ T.let(
628
+ :LIS,
629
+ BrandDev::BrandRetrieveParams::TickerExchange::TaggedSymbol
630
+ )
631
+ LSE =
632
+ T.let(
633
+ :LSE,
634
+ BrandDev::BrandRetrieveParams::TickerExchange::TaggedSymbol
635
+ )
636
+ MCX =
637
+ T.let(
638
+ :MCX,
639
+ BrandDev::BrandRetrieveParams::TickerExchange::TaggedSymbol
640
+ )
641
+ MEX =
642
+ T.let(
643
+ :MEX,
644
+ BrandDev::BrandRetrieveParams::TickerExchange::TaggedSymbol
645
+ )
646
+ MIL =
647
+ T.let(
648
+ :MIL,
649
+ BrandDev::BrandRetrieveParams::TickerExchange::TaggedSymbol
650
+ )
651
+ MUN =
652
+ T.let(
653
+ :MUN,
654
+ BrandDev::BrandRetrieveParams::TickerExchange::TaggedSymbol
655
+ )
656
+ NASDAQ =
657
+ T.let(
658
+ :NASDAQ,
659
+ BrandDev::BrandRetrieveParams::TickerExchange::TaggedSymbol
660
+ )
661
+ NEO =
662
+ T.let(
663
+ :NEO,
664
+ BrandDev::BrandRetrieveParams::TickerExchange::TaggedSymbol
665
+ )
666
+ NSE =
667
+ T.let(
668
+ :NSE,
669
+ BrandDev::BrandRetrieveParams::TickerExchange::TaggedSymbol
670
+ )
671
+ NYSE =
672
+ T.let(
673
+ :NYSE,
674
+ BrandDev::BrandRetrieveParams::TickerExchange::TaggedSymbol
675
+ )
676
+ NZE =
677
+ T.let(
678
+ :NZE,
679
+ BrandDev::BrandRetrieveParams::TickerExchange::TaggedSymbol
680
+ )
681
+ OSL =
682
+ T.let(
683
+ :OSL,
684
+ BrandDev::BrandRetrieveParams::TickerExchange::TaggedSymbol
685
+ )
686
+ OTC =
687
+ T.let(
688
+ :OTC,
689
+ BrandDev::BrandRetrieveParams::TickerExchange::TaggedSymbol
690
+ )
691
+ PAR =
692
+ T.let(
693
+ :PAR,
694
+ BrandDev::BrandRetrieveParams::TickerExchange::TaggedSymbol
695
+ )
696
+ PNK =
697
+ T.let(
698
+ :PNK,
699
+ BrandDev::BrandRetrieveParams::TickerExchange::TaggedSymbol
700
+ )
701
+ PRA =
702
+ T.let(
703
+ :PRA,
704
+ BrandDev::BrandRetrieveParams::TickerExchange::TaggedSymbol
705
+ )
706
+ RIS =
707
+ T.let(
708
+ :RIS,
709
+ BrandDev::BrandRetrieveParams::TickerExchange::TaggedSymbol
710
+ )
711
+ SAO =
712
+ T.let(
713
+ :SAO,
714
+ BrandDev::BrandRetrieveParams::TickerExchange::TaggedSymbol
715
+ )
716
+ SAU =
717
+ T.let(
718
+ :SAU,
719
+ BrandDev::BrandRetrieveParams::TickerExchange::TaggedSymbol
720
+ )
721
+ SES =
722
+ T.let(
723
+ :SES,
724
+ BrandDev::BrandRetrieveParams::TickerExchange::TaggedSymbol
725
+ )
726
+ SET =
727
+ T.let(
728
+ :SET,
729
+ BrandDev::BrandRetrieveParams::TickerExchange::TaggedSymbol
730
+ )
731
+ SGO =
732
+ T.let(
733
+ :SGO,
734
+ BrandDev::BrandRetrieveParams::TickerExchange::TaggedSymbol
735
+ )
736
+ SHH =
737
+ T.let(
738
+ :SHH,
739
+ BrandDev::BrandRetrieveParams::TickerExchange::TaggedSymbol
740
+ )
741
+ SHZ =
742
+ T.let(
743
+ :SHZ,
744
+ BrandDev::BrandRetrieveParams::TickerExchange::TaggedSymbol
745
+ )
746
+ SIX =
747
+ T.let(
748
+ :SIX,
749
+ BrandDev::BrandRetrieveParams::TickerExchange::TaggedSymbol
750
+ )
751
+ STO =
752
+ T.let(
753
+ :STO,
754
+ BrandDev::BrandRetrieveParams::TickerExchange::TaggedSymbol
755
+ )
756
+ STU =
757
+ T.let(
758
+ :STU,
759
+ BrandDev::BrandRetrieveParams::TickerExchange::TaggedSymbol
760
+ )
761
+ TAI =
762
+ T.let(
763
+ :TAI,
764
+ BrandDev::BrandRetrieveParams::TickerExchange::TaggedSymbol
765
+ )
766
+ TAL =
767
+ T.let(
768
+ :TAL,
769
+ BrandDev::BrandRetrieveParams::TickerExchange::TaggedSymbol
770
+ )
771
+ TLV =
772
+ T.let(
773
+ :TLV,
774
+ BrandDev::BrandRetrieveParams::TickerExchange::TaggedSymbol
775
+ )
776
+ TSX =
777
+ T.let(
778
+ :TSX,
779
+ BrandDev::BrandRetrieveParams::TickerExchange::TaggedSymbol
780
+ )
781
+ TSXV =
782
+ T.let(
783
+ :TSXV,
784
+ BrandDev::BrandRetrieveParams::TickerExchange::TaggedSymbol
785
+ )
786
+ TWO =
787
+ T.let(
788
+ :TWO,
789
+ BrandDev::BrandRetrieveParams::TickerExchange::TaggedSymbol
790
+ )
791
+ VIE =
792
+ T.let(
793
+ :VIE,
794
+ BrandDev::BrandRetrieveParams::TickerExchange::TaggedSymbol
795
+ )
796
+ WSE =
797
+ T.let(
798
+ :WSE,
799
+ BrandDev::BrandRetrieveParams::TickerExchange::TaggedSymbol
800
+ )
801
+ XETRA =
802
+ T.let(
803
+ :XETRA,
804
+ BrandDev::BrandRetrieveParams::TickerExchange::TaggedSymbol
805
+ )
806
+
807
+ sig do
808
+ override.returns(
809
+ T::Array[
810
+ BrandDev::BrandRetrieveParams::TickerExchange::TaggedSymbol
811
+ ]
812
+ )
813
+ end
814
+ def self.values
815
+ end
816
+ end
410
817
  end
411
818
  end
412
819
  end
@@ -13,6 +13,8 @@ module BrandDev
13
13
  max_speed: T::Boolean,
14
14
  name: String,
15
15
  ticker: String,
16
+ ticker_exchange:
17
+ BrandDev::BrandRetrieveParams::TickerExchange::OrSymbol,
16
18
  timeout_ms: Integer,
17
19
  request_options: BrandDev::RequestOptions::OrHash
18
20
  ).returns(BrandDev::Models::BrandRetrieveResponse)
@@ -33,9 +35,12 @@ module BrandDev
33
35
  # parameters.
34
36
  name: nil,
35
37
  # Stock ticker symbol to retrieve brand data for (e.g., 'AAPL', 'GOOGL', 'BRK.A').
36
- # Must be 1-6 characters, letters/numbers/dots only. Cannot be used with domain or
37
- # name parameters.
38
+ # Must be 1-15 characters, letters/numbers/dots only. Cannot be used with domain
39
+ # or name parameters.
38
40
  ticker: nil,
41
+ # Optional stock exchange for the ticker. Only used when ticker parameter is
42
+ # provided. Defaults to assume ticker is American if not specified.
43
+ ticker_exchange: nil,
39
44
  # Optional timeout in milliseconds for the request. If the request takes longer
40
45
  # than this value, it will be aborted with a 408 status code. Maximum allowed
41
46
  # value is 300000ms (5 minutes).
@@ -14,7 +14,7 @@ module BrandDev
14
14
 
15
15
  def initialize: (
16
16
  Pathname | StringIO | IO | String content,
17
- ?filename: String?,
17
+ ?filename: (Pathname | String)?,
18
18
  ?content_type: String?
19
19
  ) -> void
20
20
  end
@@ -7,6 +7,7 @@ module BrandDev
7
7
  max_speed: bool,
8
8
  name: String,
9
9
  ticker: String,
10
+ ticker_exchange: BrandDev::Models::BrandRetrieveParams::ticker_exchange,
10
11
  timeout_ms: Integer
11
12
  }
12
13
  & BrandDev::Internal::Type::request_parameters
@@ -37,6 +38,12 @@ module BrandDev
37
38
 
38
39
  def ticker=: (String) -> String
39
40
 
41
+ attr_reader ticker_exchange: BrandDev::Models::BrandRetrieveParams::ticker_exchange?
42
+
43
+ def ticker_exchange=: (
44
+ BrandDev::Models::BrandRetrieveParams::ticker_exchange
45
+ ) -> BrandDev::Models::BrandRetrieveParams::ticker_exchange
46
+
40
47
  attr_reader timeout_ms: Integer?
41
48
 
42
49
  def timeout_ms=: (Integer) -> Integer
@@ -47,6 +54,7 @@ module BrandDev
47
54
  ?max_speed: bool,
48
55
  ?name: String,
49
56
  ?ticker: String,
57
+ ?ticker_exchange: BrandDev::Models::BrandRetrieveParams::ticker_exchange,
50
58
  ?timeout_ms: Integer,
51
59
  ?request_options: BrandDev::request_opts
52
60
  ) -> void
@@ -57,6 +65,7 @@ module BrandDev
57
65
  max_speed: bool,
58
66
  name: String,
59
67
  ticker: String,
68
+ ticker_exchange: BrandDev::Models::BrandRetrieveParams::ticker_exchange,
60
69
  timeout_ms: Integer,
61
70
  request_options: BrandDev::RequestOptions
62
71
  }
@@ -173,6 +182,159 @@ module BrandDev
173
182
 
174
183
  def self?.values: -> ::Array[BrandDev::Models::BrandRetrieveParams::force_language]
175
184
  end
185
+
186
+ type ticker_exchange =
187
+ :AMEX
188
+ | :AMS
189
+ | :AQS
190
+ | :ASX
191
+ | :ATH
192
+ | :BER
193
+ | :BME
194
+ | :BRU
195
+ | :BSE
196
+ | :BUD
197
+ | :BUE
198
+ | :BVC
199
+ | :CBOE
200
+ | :CNQ
201
+ | :CPH
202
+ | :DFM
203
+ | :DOH
204
+ | :DUB
205
+ | :DUS
206
+ | :DXE
207
+ | :EGX
208
+ | :FSX
209
+ | :HAM
210
+ | :HEL
211
+ | :HKSE
212
+ | :HOSE
213
+ | :ICE
214
+ | :IOB
215
+ | :IST
216
+ | :JKT
217
+ | :JNB
218
+ | :JPX
219
+ | :KLS
220
+ | :KOE
221
+ | :KSC
222
+ | :KUW
223
+ | :LIS
224
+ | :LSE
225
+ | :MCX
226
+ | :MEX
227
+ | :MIL
228
+ | :MUN
229
+ | :NASDAQ
230
+ | :NEO
231
+ | :NSE
232
+ | :NYSE
233
+ | :NZE
234
+ | :OSL
235
+ | :OTC
236
+ | :PAR
237
+ | :PNK
238
+ | :PRA
239
+ | :RIS
240
+ | :SAO
241
+ | :SAU
242
+ | :SES
243
+ | :SET
244
+ | :SGO
245
+ | :SHH
246
+ | :SHZ
247
+ | :SIX
248
+ | :STO
249
+ | :STU
250
+ | :TAI
251
+ | :TAL
252
+ | :TLV
253
+ | :TSX
254
+ | :TSXV
255
+ | :TWO
256
+ | :VIE
257
+ | :WSE
258
+ | :XETRA
259
+
260
+ module TickerExchange
261
+ extend BrandDev::Internal::Type::Enum
262
+
263
+ AMEX: :AMEX
264
+ AMS: :AMS
265
+ AQS: :AQS
266
+ ASX: :ASX
267
+ ATH: :ATH
268
+ BER: :BER
269
+ BME: :BME
270
+ BRU: :BRU
271
+ BSE: :BSE
272
+ BUD: :BUD
273
+ BUE: :BUE
274
+ BVC: :BVC
275
+ CBOE: :CBOE
276
+ CNQ: :CNQ
277
+ CPH: :CPH
278
+ DFM: :DFM
279
+ DOH: :DOH
280
+ DUB: :DUB
281
+ DUS: :DUS
282
+ DXE: :DXE
283
+ EGX: :EGX
284
+ FSX: :FSX
285
+ HAM: :HAM
286
+ HEL: :HEL
287
+ HKSE: :HKSE
288
+ HOSE: :HOSE
289
+ ICE: :ICE
290
+ IOB: :IOB
291
+ IST: :IST
292
+ JKT: :JKT
293
+ JNB: :JNB
294
+ JPX: :JPX
295
+ KLS: :KLS
296
+ KOE: :KOE
297
+ KSC: :KSC
298
+ KUW: :KUW
299
+ LIS: :LIS
300
+ LSE: :LSE
301
+ MCX: :MCX
302
+ MEX: :MEX
303
+ MIL: :MIL
304
+ MUN: :MUN
305
+ NASDAQ: :NASDAQ
306
+ NEO: :NEO
307
+ NSE: :NSE
308
+ NYSE: :NYSE
309
+ NZE: :NZE
310
+ OSL: :OSL
311
+ OTC: :OTC
312
+ PAR: :PAR
313
+ PNK: :PNK
314
+ PRA: :PRA
315
+ RIS: :RIS
316
+ SAO: :SAO
317
+ SAU: :SAU
318
+ SES: :SES
319
+ SET: :SET
320
+ SGO: :SGO
321
+ SHH: :SHH
322
+ SHZ: :SHZ
323
+ SIX: :SIX
324
+ STO: :STO
325
+ STU: :STU
326
+ TAI: :TAI
327
+ TAL: :TAL
328
+ TLV: :TLV
329
+ TSX: :TSX
330
+ TSXV: :TSXV
331
+ TWO: :TWO
332
+ VIE: :VIE
333
+ WSE: :WSE
334
+ XETRA: :XETRA
335
+
336
+ def self?.values: -> ::Array[BrandDev::Models::BrandRetrieveParams::ticker_exchange]
337
+ end
176
338
  end
177
339
  end
178
340
  end
@@ -7,6 +7,7 @@ module BrandDev
7
7
  ?max_speed: bool,
8
8
  ?name: String,
9
9
  ?ticker: String,
10
+ ?ticker_exchange: BrandDev::Models::BrandRetrieveParams::ticker_exchange,
10
11
  ?timeout_ms: Integer,
11
12
  ?request_options: BrandDev::request_opts
12
13
  ) -> BrandDev::Models::BrandRetrieveResponse
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: brand.dev
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.7.0
4
+ version: 0.8.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Brand Dev
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2025-09-28 00:00:00.000000000 Z
11
+ date: 2025-10-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: connection_pool