Skip to content

Commit 6c71e83

Browse files
feat(api): api update
1 parent 5d94310 commit 6c71e83

4 files changed

Lines changed: 242 additions & 2 deletions

File tree

.stats.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
configured_endpoints: 8
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/brand-dev%2Fbrand.dev-4c50b742d3a4fb884d4411dc14921a4a366a6312d028a3d832099d4058b8d372.yml
3-
openapi_spec_hash: 07cf92cb374995584a08f3a6c19c3688
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/brand-dev%2Fbrand.dev-64dee37a21a809941330b048765b0eff4805b5c6959bb17f141da70e61ecb88d.yml
3+
openapi_spec_hash: d0fc0e51311de52c3aaa5c411db0f92b
44
config_hash: 4e76a07aea49753a61313dcd8c10fb0f

src/brand/dev/resources/brand.py

Lines changed: 158 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -122,6 +122,81 @@ def retrieve(
122122
max_speed: bool | Omit = omit,
123123
name: str | Omit = omit,
124124
ticker: str | Omit = omit,
125+
ticker_exchange: Literal[
126+
"AMEX",
127+
"AMS",
128+
"AQS",
129+
"ASX",
130+
"ATH",
131+
"BER",
132+
"BME",
133+
"BRU",
134+
"BSE",
135+
"BUD",
136+
"BUE",
137+
"BVC",
138+
"CBOE",
139+
"CNQ",
140+
"CPH",
141+
"DFM",
142+
"DOH",
143+
"DUB",
144+
"DUS",
145+
"DXE",
146+
"EGX",
147+
"FSX",
148+
"HAM",
149+
"HEL",
150+
"HKSE",
151+
"HOSE",
152+
"ICE",
153+
"IOB",
154+
"IST",
155+
"JKT",
156+
"JNB",
157+
"JPX",
158+
"KLS",
159+
"KOE",
160+
"KSC",
161+
"KUW",
162+
"LIS",
163+
"LSE",
164+
"MCX",
165+
"MEX",
166+
"MIL",
167+
"MUN",
168+
"NASDAQ",
169+
"NEO",
170+
"NSE",
171+
"NYSE",
172+
"NZE",
173+
"OSL",
174+
"OTC",
175+
"PAR",
176+
"PNK",
177+
"PRA",
178+
"RIS",
179+
"SAO",
180+
"SAU",
181+
"SES",
182+
"SET",
183+
"SGO",
184+
"SHH",
185+
"SHZ",
186+
"SIX",
187+
"STO",
188+
"STU",
189+
"TAI",
190+
"TAL",
191+
"TLV",
192+
"TSX",
193+
"TSXV",
194+
"TWO",
195+
"VIE",
196+
"WSE",
197+
"XETRA",
198+
]
199+
| Omit = omit,
125200
timeout_ms: int | Omit = omit,
126201
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
127202
# The extra values given here take precedence over values defined on the client or passed to this method.
@@ -153,6 +228,9 @@ def retrieve(
153228
Must be 1-15 characters, letters/numbers/dots only. Cannot be used with domain
154229
or name parameters.
155230
231+
ticker_exchange: Optional stock exchange for the ticker. Only used when ticker parameter is
232+
provided. Defaults to assume ticker is American if not specified.
233+
156234
timeout_ms: Optional timeout in milliseconds for the request. If the request takes longer
157235
than this value, it will be aborted with a 408 status code. Maximum allowed
158236
value is 300000ms (5 minutes).
@@ -179,6 +257,7 @@ def retrieve(
179257
"max_speed": max_speed,
180258
"name": name,
181259
"ticker": ticker,
260+
"ticker_exchange": ticker_exchange,
182261
"timeout_ms": timeout_ms,
183262
},
184263
brand_retrieve_params.BrandRetrieveParams,
@@ -647,6 +726,81 @@ async def retrieve(
647726
max_speed: bool | Omit = omit,
648727
name: str | Omit = omit,
649728
ticker: str | Omit = omit,
729+
ticker_exchange: Literal[
730+
"AMEX",
731+
"AMS",
732+
"AQS",
733+
"ASX",
734+
"ATH",
735+
"BER",
736+
"BME",
737+
"BRU",
738+
"BSE",
739+
"BUD",
740+
"BUE",
741+
"BVC",
742+
"CBOE",
743+
"CNQ",
744+
"CPH",
745+
"DFM",
746+
"DOH",
747+
"DUB",
748+
"DUS",
749+
"DXE",
750+
"EGX",
751+
"FSX",
752+
"HAM",
753+
"HEL",
754+
"HKSE",
755+
"HOSE",
756+
"ICE",
757+
"IOB",
758+
"IST",
759+
"JKT",
760+
"JNB",
761+
"JPX",
762+
"KLS",
763+
"KOE",
764+
"KSC",
765+
"KUW",
766+
"LIS",
767+
"LSE",
768+
"MCX",
769+
"MEX",
770+
"MIL",
771+
"MUN",
772+
"NASDAQ",
773+
"NEO",
774+
"NSE",
775+
"NYSE",
776+
"NZE",
777+
"OSL",
778+
"OTC",
779+
"PAR",
780+
"PNK",
781+
"PRA",
782+
"RIS",
783+
"SAO",
784+
"SAU",
785+
"SES",
786+
"SET",
787+
"SGO",
788+
"SHH",
789+
"SHZ",
790+
"SIX",
791+
"STO",
792+
"STU",
793+
"TAI",
794+
"TAL",
795+
"TLV",
796+
"TSX",
797+
"TSXV",
798+
"TWO",
799+
"VIE",
800+
"WSE",
801+
"XETRA",
802+
]
803+
| Omit = omit,
650804
timeout_ms: int | Omit = omit,
651805
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
652806
# The extra values given here take precedence over values defined on the client or passed to this method.
@@ -678,6 +832,9 @@ async def retrieve(
678832
Must be 1-15 characters, letters/numbers/dots only. Cannot be used with domain
679833
or name parameters.
680834
835+
ticker_exchange: Optional stock exchange for the ticker. Only used when ticker parameter is
836+
provided. Defaults to assume ticker is American if not specified.
837+
681838
timeout_ms: Optional timeout in milliseconds for the request. If the request takes longer
682839
than this value, it will be aborted with a 408 status code. Maximum allowed
683840
value is 300000ms (5 minutes).
@@ -704,6 +861,7 @@ async def retrieve(
704861
"max_speed": max_speed,
705862
"name": name,
706863
"ticker": ticker,
864+
"ticker_exchange": ticker_exchange,
707865
"timeout_ms": timeout_ms,
708866
},
709867
brand_retrieve_params.BrandRetrieveParams,

src/brand/dev/types/brand_retrieve_params.py

Lines changed: 80 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,86 @@ class BrandRetrieveParams(TypedDict, total=False):
9797
or name parameters.
9898
"""
9999

100+
ticker_exchange: Literal[
101+
"AMEX",
102+
"AMS",
103+
"AQS",
104+
"ASX",
105+
"ATH",
106+
"BER",
107+
"BME",
108+
"BRU",
109+
"BSE",
110+
"BUD",
111+
"BUE",
112+
"BVC",
113+
"CBOE",
114+
"CNQ",
115+
"CPH",
116+
"DFM",
117+
"DOH",
118+
"DUB",
119+
"DUS",
120+
"DXE",
121+
"EGX",
122+
"FSX",
123+
"HAM",
124+
"HEL",
125+
"HKSE",
126+
"HOSE",
127+
"ICE",
128+
"IOB",
129+
"IST",
130+
"JKT",
131+
"JNB",
132+
"JPX",
133+
"KLS",
134+
"KOE",
135+
"KSC",
136+
"KUW",
137+
"LIS",
138+
"LSE",
139+
"MCX",
140+
"MEX",
141+
"MIL",
142+
"MUN",
143+
"NASDAQ",
144+
"NEO",
145+
"NSE",
146+
"NYSE",
147+
"NZE",
148+
"OSL",
149+
"OTC",
150+
"PAR",
151+
"PNK",
152+
"PRA",
153+
"RIS",
154+
"SAO",
155+
"SAU",
156+
"SES",
157+
"SET",
158+
"SGO",
159+
"SHH",
160+
"SHZ",
161+
"SIX",
162+
"STO",
163+
"STU",
164+
"TAI",
165+
"TAL",
166+
"TLV",
167+
"TSX",
168+
"TSXV",
169+
"TWO",
170+
"VIE",
171+
"WSE",
172+
"XETRA",
173+
]
174+
"""Optional stock exchange for the ticker.
175+
176+
Only used when ticker parameter is provided. Defaults to assume ticker is
177+
American if not specified.
178+
"""
179+
100180
timeout_ms: Annotated[int, PropertyInfo(alias="timeoutMS")]
101181
"""Optional timeout in milliseconds for the request.
102182

tests/api_resources/test_brand.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ def test_method_retrieve_with_all_params(self, client: BrandDev) -> None:
4141
max_speed=True,
4242
name="xxx",
4343
ticker="ticker",
44+
ticker_exchange="AMEX",
4445
timeout_ms=1,
4546
)
4647
assert_matches_type(BrandRetrieveResponse, brand, path=["response"])
@@ -434,6 +435,7 @@ async def test_method_retrieve_with_all_params(self, async_client: AsyncBrandDev
434435
max_speed=True,
435436
name="xxx",
436437
ticker="ticker",
438+
ticker_exchange="AMEX",
437439
timeout_ms=1,
438440
)
439441
assert_matches_type(BrandRetrieveResponse, brand, path=["response"])

0 commit comments

Comments
 (0)