From f452dbdcbf852fbe98213129527f66b7d42228ec Mon Sep 17 00:00:00 2001 From: stainless-bot Date: Tue, 14 May 2024 05:13:32 +0000 Subject: [PATCH] feat(api): update via SDK Studio --- .stats.yml | 2 +- README.md | 1 + option/requestoption.go | 7 +++++++ 3 files changed, 9 insertions(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index 491ae5c..ab485f7 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 2 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/terminal%2Fterminal-a31fc06da5df2a05395e63df9d4fcf6e92094d039d44f2b9cbb606be98b0ebca.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/terminal%2Fterminal-f4a3aca8ff2474533240c82b76ea4f1f7870485abbbf7d8d4caccc707f1a506d.yml diff --git a/README.md b/README.md index 0816325..0a130e4 100644 --- a/README.md +++ b/README.md @@ -43,6 +43,7 @@ import ( func main() { client := terminal.NewClient( option.WithBearerToken("My Bearer Token"), // defaults to os.LookupEnv("TERMINAL_BEARER_TOKEN") + option.WithEnvironmentDev(), // defaults to option.WithEnvironmentProduction() ) productGetResponse, err := client.Product.Get(context.TODO()) if err != nil { diff --git a/option/requestoption.go b/option/requestoption.go index 26afdf2..4450bd0 100644 --- a/option/requestoption.go +++ b/option/requestoption.go @@ -228,6 +228,13 @@ func WithEnvironmentProduction() RequestOption { return WithBaseURL("https://openapi.terminal.shop//") } +// WithEnvironmentDev returns a RequestOption that sets the current +// environment to be the "dev" environment. An environment specifies which base URL +// to use by default. +func WithEnvironmentDev() RequestOption { + return WithBaseURL("https://openapi.dev.terminal.shop//") +} + // WithBearerToken returns a RequestOption that sets the client setting "bearer_token". func WithBearerToken(value string) RequestOption { return func(r *requestconfig.RequestConfig) error {