Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
82 commits
Select commit Hold shift + click to select a range
9838b2d
codegen metadata
stainless-app[bot] Apr 4, 2026
f07badc
feat(api): api update
stainless-app[bot] Apr 5, 2026
22d1e77
feat(api): api update
stainless-app[bot] Apr 5, 2026
a4d91a7
fix: multipart encoding for file arrays
stainless-app[bot] Apr 9, 2026
c523c67
feat(api): api update
stainless-app[bot] Apr 9, 2026
f040683
codegen metadata
stainless-app[bot] Apr 12, 2026
62adcd8
codegen metadata
stainless-app[bot] Apr 12, 2026
c245166
codegen metadata
stainless-app[bot] Apr 12, 2026
d9c7d93
codegen metadata
stainless-app[bot] Apr 12, 2026
3613e92
feat(api): api update
stainless-app[bot] Apr 16, 2026
fdc7418
feat(api): api update
stainless-app[bot] Apr 17, 2026
7dbc953
feat(api): api update
stainless-app[bot] Apr 17, 2026
d7243b6
feat(api): api update
stainless-app[bot] Apr 17, 2026
418f6d7
codegen metadata
stainless-app[bot] Apr 17, 2026
51cf238
feat(api): api update
stainless-app[bot] Apr 17, 2026
0383c2c
codegen metadata
stainless-app[bot] Apr 17, 2026
816eb6e
codegen metadata
stainless-app[bot] Apr 17, 2026
7e9e3f5
feat(api): api update
stainless-app[bot] Apr 17, 2026
de2601f
feat(api): api update
stainless-app[bot] Apr 17, 2026
5129523
feat(api): api update
stainless-app[bot] Apr 17, 2026
93dcfee
feat(api): api update
stainless-app[bot] Apr 17, 2026
8f82145
feat(api): api update
stainless-app[bot] Apr 18, 2026
d3d2560
codegen metadata
stainless-app[bot] Apr 18, 2026
9fcd4e0
codegen metadata
stainless-app[bot] Apr 19, 2026
26aa262
feat(api): api update
stainless-app[bot] Apr 19, 2026
0232980
codegen metadata
stainless-app[bot] Apr 21, 2026
67421f2
chore(internal): more robust bootstrap script
stainless-app[bot] Apr 23, 2026
c20c693
codegen metadata
stainless-app[bot] Apr 23, 2026
53929a4
feat(api): api update
stainless-app[bot] Apr 24, 2026
82f99f7
feat(api): api update
stainless-app[bot] Apr 24, 2026
ac2bf07
feat(api): api update
stainless-app[bot] Apr 24, 2026
a43574f
codegen metadata
stainless-app[bot] Apr 25, 2026
ca48f5d
codegen metadata
stainless-app[bot] Apr 25, 2026
283f267
feat(api): api update
stainless-app[bot] Apr 26, 2026
830701f
codegen metadata
stainless-app[bot] Apr 26, 2026
3c1db2e
feat(api): api update
stainless-app[bot] Apr 26, 2026
c5921ab
feat: support setting headers via env
stainless-app[bot] Apr 28, 2026
bfeaf50
codegen metadata
stainless-app[bot] Apr 30, 2026
140c5aa
codegen metadata
stainless-app[bot] May 1, 2026
80e2d8b
feat(api): api update
stainless-app[bot] May 1, 2026
2e93c17
feat(api): api update
stainless-app[bot] May 6, 2026
d4ee671
feat(api): api update
stainless-app[bot] May 6, 2026
a11472b
codegen metadata
stainless-app[bot] May 7, 2026
2a47d73
feat(api): api update
stainless-app[bot] May 7, 2026
cd834b4
feat(api): api update
stainless-app[bot] May 9, 2026
c1bebc5
feat(api): api update
stainless-app[bot] May 10, 2026
a11b807
codegen metadata
stainless-app[bot] May 11, 2026
22cacc4
codegen metadata
stainless-app[bot] May 11, 2026
9e7cbab
ci: pin GitHub Actions to commit SHAs
stainless-app[bot] May 13, 2026
1b864c8
fix(client): elide content type header on requests without body
stainless-app[bot] May 14, 2026
515175b
codegen metadata
stainless-app[bot] May 16, 2026
cb46674
codegen metadata
stainless-app[bot] May 16, 2026
64e5f11
codegen metadata
stainless-app[bot] May 16, 2026
4ae15f3
codegen metadata
stainless-app[bot] May 16, 2026
ab2ccb1
feat(api): api update
stainless-app[bot] May 19, 2026
4900ffb
codegen metadata
stainless-app[bot] May 30, 2026
2f567ab
codegen metadata
stainless-app[bot] May 31, 2026
c9c0d37
codegen metadata
stainless-app[bot] May 31, 2026
6fd6713
codegen metadata
stainless-app[bot] May 31, 2026
e4653de
codegen metadata
stainless-app[bot] May 31, 2026
147091a
codegen metadata
stainless-app[bot] Jun 1, 2026
df9c063
codegen metadata
stainless-app[bot] Jun 1, 2026
75537f6
codegen metadata
stainless-app[bot] Jun 6, 2026
024b809
codegen metadata
stainless-app[bot] Jun 6, 2026
86191d3
codegen metadata
stainless-app[bot] Jun 6, 2026
bf6d788
codegen metadata
stainless-app[bot] Jun 6, 2026
c7844bf
feat(api): api update
stainless-app[bot] Jun 6, 2026
c9207c7
codegen metadata
stainless-app[bot] Jun 6, 2026
f6a3cd4
feat(api): api update
stainless-app[bot] Jun 7, 2026
bab38c3
feat(api): api update
stainless-app[bot] Jun 7, 2026
8a0ed79
codegen metadata
stainless-app[bot] Jun 8, 2026
54ad2b8
feat(api): api update
stainless-app[bot] Jun 8, 2026
628530d
codegen metadata
stainless-app[bot] Jun 8, 2026
20d96f3
feat(api): api update
stainless-app[bot] Jun 11, 2026
2bc0949
codegen metadata
stainless-app[bot] Jun 11, 2026
71269a9
feat(api): api update
stainless-app[bot] Jun 16, 2026
f01cd6c
codegen metadata
stainless-app[bot] Jun 16, 2026
29df8d6
feat(api): api update
stainless-app[bot] Jun 18, 2026
7beed63
codegen metadata
stainless-app[bot] Jun 18, 2026
fa4b67d
feat(api): api update
stainless-app[bot] Jun 19, 2026
41496ac
codegen metadata
stainless-app[bot] Jun 25, 2026
c09fcff
release: 1.3.0
stainless-app[bot] Jun 25, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,9 @@ jobs:
github.repository == 'stainless-sdks/brand.dev-ruby' &&
(github.event_name == 'push' || github.event.pull_request.head.repo.fork) && (github.event_name != 'push' || github.event.head_commit.message != 'codegen metadata')
steps:
- uses: actions/checkout@v6
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: Set up Ruby
uses: ruby/setup-ruby@v1
uses: ruby/setup-ruby@c4e5b1316158f92e3d49443a9d58b31d25ac0f8f # v1.306.0
with:
bundler-cache: false
- run: |-
Expand All @@ -39,7 +39,7 @@ jobs:
github.repository == 'stainless-sdks/brand.dev-ruby' &&
!startsWith(github.ref, 'refs/heads/stl/')
id: github-oidc
uses: actions/github-script@v8
uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8.0.0
with:
script: core.setOutput('github_token', await core.getIDToken());

Expand All @@ -60,9 +60,9 @@ jobs:
if: github.event_name == 'push' || github.event.pull_request.head.repo.fork

steps:
- uses: actions/checkout@v6
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: Set up Ruby
uses: ruby/setup-ruby@v1
uses: ruby/setup-ruby@c4e5b1316158f92e3d49443a9d58b31d25ac0f8f # v1.306.0
with:
bundler-cache: false
- run: |-
Expand All @@ -76,9 +76,9 @@ jobs:
runs-on: ${{ github.repository == 'stainless-sdks/brand.dev-ruby' && 'depot-ubuntu-24.04' || 'ubuntu-latest' }}
if: github.event_name == 'push' || github.event.pull_request.head.repo.fork
steps:
- uses: actions/checkout@v6
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: Set up Ruby
uses: ruby/setup-ruby@v1
uses: ruby/setup-ruby@c4e5b1316158f92e3d49443a9d58b31d25ac0f8f # v1.306.0
with:
bundler-cache: false
- run: |-
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/publish-gem.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v6
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: Set up Ruby
uses: ruby/setup-ruby@v1
uses: ruby/setup-ruby@c4e5b1316158f92e3d49443a9d58b31d25ac0f8f # v1.306.0
with:
bundler-cache: false
- run: |-
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release-doctor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
if: github.repository == 'context-dot-dev/deprecated-brand-ruby-sdk' && (github.event_name == 'push' || github.event_name == 'workflow_dispatch' || startsWith(github.head_ref, 'release-please') || github.head_ref == 'next')

steps:
- uses: actions/checkout@v6
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2

- name: Check release environment
run: |
Expand Down
2 changes: 1 addition & 1 deletion .release-please-manifest.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
".": "1.2.0"
".": "1.3.0"
}
6 changes: 3 additions & 3 deletions .stats.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
configured_endpoints: 20
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/brand-dev%2Fbrand.dev-05a30711e18b0023520a660352d75595a050d1299bf0e3ee4a8cf55ded36aea2.yml
openapi_spec_hash: 8d0e1115a7d864f27c55cec3255d1e77
configured_endpoints: 16
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/brand-dev/brand.dev-099ed9515b0e036a1afc6a4fb6c5a5f768a78160df084ffb6dd546eb354fb526.yml
openapi_spec_hash: 0aa5154a5822db3536a5f76583b4de1f
config_hash: 91cf2dcefb99c39eb9cd3e98e15d6011
53 changes: 53 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,58 @@
# Changelog

## 1.3.0 (2026-06-25)

Full Changelog: [v1.2.0...v1.3.0](https://github.com/context-dot-dev/deprecated-brand-ruby-sdk/compare/v1.2.0...v1.3.0)

### Features

* **api:** api update ([fa4b67d](https://github.com/context-dot-dev/deprecated-brand-ruby-sdk/commit/fa4b67da957d248a49a46faa58f07be5039aa3d7))
* **api:** api update ([29df8d6](https://github.com/context-dot-dev/deprecated-brand-ruby-sdk/commit/29df8d63546e19deb48cd4e6f5c54b535beb85d8))
* **api:** api update ([71269a9](https://github.com/context-dot-dev/deprecated-brand-ruby-sdk/commit/71269a9843e8a7d01f19f17889bc553c266d5a69))
* **api:** api update ([20d96f3](https://github.com/context-dot-dev/deprecated-brand-ruby-sdk/commit/20d96f34c4016b3739a41020ad1e7cb00736c6a4))
* **api:** api update ([54ad2b8](https://github.com/context-dot-dev/deprecated-brand-ruby-sdk/commit/54ad2b8833f19a4b11c23b1e3a6dad2bc7b194e4))
* **api:** api update ([bab38c3](https://github.com/context-dot-dev/deprecated-brand-ruby-sdk/commit/bab38c3ae6ca2e10722028a4b85c980d1a8c4573))
* **api:** api update ([f6a3cd4](https://github.com/context-dot-dev/deprecated-brand-ruby-sdk/commit/f6a3cd492f1f7e6d412fb34172809db980126423))
* **api:** api update ([c7844bf](https://github.com/context-dot-dev/deprecated-brand-ruby-sdk/commit/c7844bf1d3c8b454fb0bee944920a15b0cb2b06c))
* **api:** api update ([ab2ccb1](https://github.com/context-dot-dev/deprecated-brand-ruby-sdk/commit/ab2ccb17a6ba8b61840a59b1f3a7f3ccc5aa7ad6))
* **api:** api update ([c1bebc5](https://github.com/context-dot-dev/deprecated-brand-ruby-sdk/commit/c1bebc54ac22374b4c12c074ff438fd14d05b0f9))
* **api:** api update ([cd834b4](https://github.com/context-dot-dev/deprecated-brand-ruby-sdk/commit/cd834b4821c2107f10f92b8ee717daa63622ac42))
* **api:** api update ([2a47d73](https://github.com/context-dot-dev/deprecated-brand-ruby-sdk/commit/2a47d733b2de2acd65d6bc262833f4474f76a48f))
* **api:** api update ([d4ee671](https://github.com/context-dot-dev/deprecated-brand-ruby-sdk/commit/d4ee671db627d6d979533c4502acd93b86b74b7c))
* **api:** api update ([2e93c17](https://github.com/context-dot-dev/deprecated-brand-ruby-sdk/commit/2e93c177a7e818df9de785ac89363cba814eaad8))
* **api:** api update ([80e2d8b](https://github.com/context-dot-dev/deprecated-brand-ruby-sdk/commit/80e2d8b61925cb7a062423ea70613953d349201b))
* **api:** api update ([3c1db2e](https://github.com/context-dot-dev/deprecated-brand-ruby-sdk/commit/3c1db2ecd33a5f92eaf9c37dab6ee7956a38f379))
* **api:** api update ([283f267](https://github.com/context-dot-dev/deprecated-brand-ruby-sdk/commit/283f2676e5ef02cccf00ce078b38e63ccd9d3387))
* **api:** api update ([ac2bf07](https://github.com/context-dot-dev/deprecated-brand-ruby-sdk/commit/ac2bf07be9f7b5a636016c3f2ec55ca48b5ae971))
* **api:** api update ([82f99f7](https://github.com/context-dot-dev/deprecated-brand-ruby-sdk/commit/82f99f70cb3753d51c8d7befa710962a96b52f34))
* **api:** api update ([53929a4](https://github.com/context-dot-dev/deprecated-brand-ruby-sdk/commit/53929a404ec27e40072dab7db319060ce9356fdf))
* **api:** api update ([26aa262](https://github.com/context-dot-dev/deprecated-brand-ruby-sdk/commit/26aa262ffcd0e82c130a73f5bf4258a02d5d687d))
* **api:** api update ([8f82145](https://github.com/context-dot-dev/deprecated-brand-ruby-sdk/commit/8f82145769a2d825ab755cf3a4a2e2f3db64c0ad))
* **api:** api update ([93dcfee](https://github.com/context-dot-dev/deprecated-brand-ruby-sdk/commit/93dcfee9c2635974a204ae85d237c83845f5eb0d))
* **api:** api update ([5129523](https://github.com/context-dot-dev/deprecated-brand-ruby-sdk/commit/5129523063458daca62963d01ff1837b54c9babf))
* **api:** api update ([de2601f](https://github.com/context-dot-dev/deprecated-brand-ruby-sdk/commit/de2601f83745aa577c0c7629b4621e78218dbc1b))
* **api:** api update ([7e9e3f5](https://github.com/context-dot-dev/deprecated-brand-ruby-sdk/commit/7e9e3f5012f1d11daef7795087699d3d8914ec0a))
* **api:** api update ([51cf238](https://github.com/context-dot-dev/deprecated-brand-ruby-sdk/commit/51cf238020c1726eed5601387902175c0a911963))
* **api:** api update ([d7243b6](https://github.com/context-dot-dev/deprecated-brand-ruby-sdk/commit/d7243b67c34ed41991ffbfd05c20c3fe91bf6b7a))
* **api:** api update ([7dbc953](https://github.com/context-dot-dev/deprecated-brand-ruby-sdk/commit/7dbc953284d17ffdab94cc0cce1c1577bb5bb37d))
* **api:** api update ([fdc7418](https://github.com/context-dot-dev/deprecated-brand-ruby-sdk/commit/fdc741818cf6202016e5b94278590f8d1aa44079))
* **api:** api update ([3613e92](https://github.com/context-dot-dev/deprecated-brand-ruby-sdk/commit/3613e92029d5702a7b86753162c3dddda5ef88d2))
* **api:** api update ([c523c67](https://github.com/context-dot-dev/deprecated-brand-ruby-sdk/commit/c523c67ab269e7b2c2d6f6f50d93960d1a14da09))
* **api:** api update ([22d1e77](https://github.com/context-dot-dev/deprecated-brand-ruby-sdk/commit/22d1e77b4b4cfd0df257f1e8018187de16ea93a0))
* **api:** api update ([f07badc](https://github.com/context-dot-dev/deprecated-brand-ruby-sdk/commit/f07badc8bf3ef80fe032793339c05cb1f74fe2c2))
* support setting headers via env ([c5921ab](https://github.com/context-dot-dev/deprecated-brand-ruby-sdk/commit/c5921ab5e04c5a0cf08ca6673662f31fc4dcde80))


### Bug Fixes

* **client:** elide content type header on requests without body ([1b864c8](https://github.com/context-dot-dev/deprecated-brand-ruby-sdk/commit/1b864c845999011a26c433ddd801c050aed7a197))
* multipart encoding for file arrays ([a4d91a7](https://github.com/context-dot-dev/deprecated-brand-ruby-sdk/commit/a4d91a72d7bb1a80f9d24c9914e744437eaecbb3))


### Chores

* **internal:** more robust bootstrap script ([67421f2](https://github.com/context-dot-dev/deprecated-brand-ruby-sdk/commit/67421f29c40507b6b9499d80e788914dcf3526b4))

## 1.2.0 (2026-04-03)

Full Changelog: [v1.1.0...v1.2.0](https://github.com/context-dot-dev/deprecated-brand-ruby-sdk/compare/v1.1.0...v1.2.0)
Expand Down
2 changes: 1 addition & 1 deletion Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ GIT
PATH
remote: .
specs:
brand.dev (1.2.0)
brand.dev (1.3.0)
cgi
connection_pool

Expand Down
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ To use this gem, install via Bundler by adding the following to your application
<!-- x-release-please-start-version -->

```ruby
gem "brand.dev", "~> 1.2.0"
gem "brand.dev", "~> 1.3.0"
```

<!-- x-release-please-end -->
Expand Down Expand Up @@ -206,25 +206,25 @@ brand_dev.brand.retrieve(**params)
Since this library does not depend on `sorbet-runtime`, it cannot provide [`T::Enum`](https://sorbet.org/docs/tenum) instances. Instead, we provide "tagged symbols" instead, which is always a primitive at runtime:

```ruby
# :albanian
puts(BrandDev::BrandRetrieveParams::ForceLanguage::ALBANIAN)
# :afrikaans
puts(BrandDev::BrandRetrieveParams::ForceLanguage::AFRIKAANS)

# Revealed type: `T.all(BrandDev::BrandRetrieveParams::ForceLanguage, Symbol)`
T.reveal_type(BrandDev::BrandRetrieveParams::ForceLanguage::ALBANIAN)
T.reveal_type(BrandDev::BrandRetrieveParams::ForceLanguage::AFRIKAANS)
```

Enum parameters have a "relaxed" type, so you can either pass in enum constants or their literal value:

```ruby
# Using the enum constants preserves the tagged type information:
brand_dev.brand.retrieve(
force_language: BrandDev::BrandRetrieveParams::ForceLanguage::ALBANIAN,
force_language: BrandDev::BrandRetrieveParams::ForceLanguage::AFRIKAANS,
# …
)

# Literal values are also permissible:
brand_dev.brand.retrieve(
force_language: :albanian,
force_language: :afrikaans,
# …
)
```
Expand Down
8 changes: 0 additions & 8 deletions lib/brand_dev.rb
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,6 @@
require_relative "brand_dev/models/brand_ai_products_response"
require_relative "brand_dev/models/brand_ai_query_params"
require_relative "brand_dev/models/brand_ai_query_response"
require_relative "brand_dev/models/brand_fonts_params"
require_relative "brand_dev/models/brand_fonts_response"
require_relative "brand_dev/models/brand_identify_from_transaction_params"
require_relative "brand_dev/models/brand_identify_from_transaction_response"
require_relative "brand_dev/models/brand_prefetch_by_email_params"
Expand All @@ -74,16 +72,10 @@
require_relative "brand_dev/models/brand_retrieve_by_name_response"
require_relative "brand_dev/models/brand_retrieve_by_ticker_params"
require_relative "brand_dev/models/brand_retrieve_by_ticker_response"
require_relative "brand_dev/models/brand_retrieve_naics_params"
require_relative "brand_dev/models/brand_retrieve_naics_response"
require_relative "brand_dev/models/brand_retrieve_params"
require_relative "brand_dev/models/brand_retrieve_response"
require_relative "brand_dev/models/brand_retrieve_simplified_params"
require_relative "brand_dev/models/brand_retrieve_simplified_response"
require_relative "brand_dev/models/brand_screenshot_params"
require_relative "brand_dev/models/brand_screenshot_response"
require_relative "brand_dev/models/brand_styleguide_params"
require_relative "brand_dev/models/brand_styleguide_response"
require_relative "brand_dev/models/brand_web_scrape_html_params"
require_relative "brand_dev/models/brand_web_scrape_html_response"
require_relative "brand_dev/models/brand_web_scrape_images_params"
Expand Down
16 changes: 15 additions & 1 deletion lib/brand_dev/client.rb
Original file line number Diff line number Diff line change
Expand Up @@ -58,14 +58,28 @@ def initialize(
raise ArgumentError.new("api_key is required, and can be set via environ: \"BRAND_DEV_API_KEY\"")
end

headers = {}
custom_headers_env = ENV["BRAND_DEV_CUSTOM_HEADERS"]
unless custom_headers_env.nil?
parsed = {}
custom_headers_env.split("\n").each do |line|
colon = line.index(":")
unless colon.nil?
parsed[line[0...colon].strip] = line[(colon + 1)..].strip
end
end
headers = parsed.merge(headers)
end

@api_key = api_key.to_s

super(
base_url: base_url,
timeout: timeout,
max_retries: max_retries,
initial_retry_delay: initial_retry_delay,
max_retry_delay: max_retry_delay
max_retry_delay: max_retry_delay,
headers: headers
)

@brand = BrandDev::Resources::Brand.new(client: self)
Expand Down
5 changes: 5 additions & 0 deletions lib/brand_dev/internal/transport/base_client.rb
Original file line number Diff line number Diff line change
Expand Up @@ -306,6 +306,11 @@ def initialize(
BrandDev::Internal::Util.deep_merge(*[req[:body], opts[:extra_body]].compact)
end

# Generated methods always pass `req[:body]` for operations that define a
# request body, so only elide the content-type header when the operation
# has no body at all, not when an optional body param was omitted.
headers.delete("content-type") if body.nil? && !req.key?(:body)

url = BrandDev::Internal::Util.join_parsed_uri(
@base_url_components,
{**req, path: path, query: query}
Expand Down
2 changes: 1 addition & 1 deletion lib/brand_dev/internal/type/base_model.rb
Original file line number Diff line number Diff line change
Expand Up @@ -442,7 +442,7 @@ def deep_to_h = self.class.recursively_to_h(@data, convert: false)
# brand_retrieve_response => {
# brand: brand,
# code: code,
# status: status
# key_metadata: key_metadata
# }
def deconstruct_keys(keys)
(keys || self.class.known_fields.keys)
Expand Down
4 changes: 3 additions & 1 deletion lib/brand_dev/internal/util.rb
Original file line number Diff line number Diff line change
Expand Up @@ -610,6 +610,7 @@ def encode_query_params(query)
#
# @return [Array(String, Enumerable<String>)]
private def encode_multipart_streaming(body)
# rubocop:disable Style/CaseEquality
# RFC 1521 Section 7.2.1 says we should have 70 char maximum for boundary length
boundary = SecureRandom.urlsafe_base64(46)

Expand All @@ -619,7 +620,7 @@ def encode_query_params(query)
in Hash
body.each do |key, val|
case val
in Array if val.all? { primitive?(_1) }
in Array if val.all? { primitive?(_1) || BrandDev::Internal::Type::FileInput === _1 }
val.each do |v|
write_multipart_chunk(y, boundary: boundary, key: key, val: v, closing: closing)
end
Expand All @@ -635,6 +636,7 @@ def encode_query_params(query)

fused_io = fused_enum(strio) { closing.each(&:call) }
[boundary, fused_io]
# rubocop:enable Style/CaseEquality
end

# @api private
Expand Down
8 changes: 0 additions & 8 deletions lib/brand_dev/models.rb
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,6 @@ module BrandDev

BrandAIQueryParams = BrandDev::Models::BrandAIQueryParams

BrandFontsParams = BrandDev::Models::BrandFontsParams

BrandIdentifyFromTransactionParams = BrandDev::Models::BrandIdentifyFromTransactionParams

BrandPrefetchByEmailParams = BrandDev::Models::BrandPrefetchByEmailParams
Expand All @@ -61,16 +59,10 @@ module BrandDev

BrandRetrieveByTickerParams = BrandDev::Models::BrandRetrieveByTickerParams

BrandRetrieveNaicsParams = BrandDev::Models::BrandRetrieveNaicsParams

BrandRetrieveParams = BrandDev::Models::BrandRetrieveParams

BrandRetrieveSimplifiedParams = BrandDev::Models::BrandRetrieveSimplifiedParams

BrandScreenshotParams = BrandDev::Models::BrandScreenshotParams

BrandStyleguideParams = BrandDev::Models::BrandStyleguideParams

BrandWebScrapeHTMLParams = BrandDev::Models::BrandWebScrapeHTMLParams

BrandWebScrapeImagesParams = BrandDev::Models::BrandWebScrapeImagesParams
Expand Down
19 changes: 15 additions & 4 deletions lib/brand_dev/models/brand_ai_product_params.rb
Original file line number Diff line number Diff line change
Expand Up @@ -13,20 +13,31 @@ class BrandAIProductParams < BrandDev::Internal::Type::BaseModel
# @return [String]
required :url, String

# @!attribute max_age_ms
# Return a cached result if a prior scrape for the same parameters exists and is
# younger than this many milliseconds. Defaults to 7 days (604800000 ms) when
# omitted. Max is 30 days (2592000000 ms). Set to 0 to always scrape fresh.
#
# @return [Integer, nil]
optional :max_age_ms, Integer, api_name: :maxAgeMs

# @!attribute timeout_ms
# Optional timeout in milliseconds for the request. Maximum allowed value is
# 300000ms (5 minutes).
# Optional timeout in milliseconds for the request. If the request takes longer
# than this value, it will be aborted with a 408 status code. Maximum allowed
# value is 300000ms (5 minutes).
#
# @return [Integer, nil]
optional :timeout_ms, Integer, api_name: :timeoutMS

# @!method initialize(url:, timeout_ms: nil, request_options: {})
# @!method initialize(url:, max_age_ms: nil, timeout_ms: nil, request_options: {})
# Some parameter documentations has been truncated, see
# {BrandDev::Models::BrandAIProductParams} for more details.
#
# @param url [String] The product page URL to extract product data from.
#
# @param timeout_ms [Integer] Optional timeout in milliseconds for the request. Maximum allowed value is 30000
# @param max_age_ms [Integer] Return a cached result if a prior scrape for the same parameters exists and is y
#
# @param timeout_ms [Integer] Optional timeout in milliseconds for the request. If the request takes longer th
#
# @param request_options [BrandDev::RequestOptions, Hash{Symbol=>Object}]
end
Expand Down
Loading
Loading