Skip to content

Commit 3cab6d8

Browse files
authored
Merge pull request #45 from brand-dot-dev/release-please--branches--main--changes--next
release: 0.24.0
2 parents 3811b5d + ed1e105 commit 3cab6d8

File tree

20 files changed

+914
-8
lines changed

20 files changed

+914
-8
lines changed

.release-please-manifest.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
{
2-
".": "0.23.0"
2+
".": "0.24.0"
33
}

.stats.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
configured_endpoints: 15
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/brand-dev%2Fbrand.dev-10f7ae53f4fe4f2394c22788b648d9db742a178ed41a87beb39de741660e646b.yml
3-
openapi_spec_hash: 9885c47a02677471a38f16dddbad1823
4-
config_hash: 6f10592c7d0c3bafefc1271472283217
1+
configured_endpoints: 16
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/brand-dev%2Fbrand.dev-f6fec0ae4fa4572aefa111e660f98f6acfb6149c22cbd413bd3defad6c100478.yml
3+
openapi_spec_hash: a82bf07982eae3814e8a60eb368e0ce5
4+
config_hash: c3aaaa9794dba44d524c06591ab17894

CHANGELOG.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,13 @@
11
# Changelog
22

3+
## 0.24.0 (2026-02-09)
4+
5+
Full Changelog: [v0.23.0...v0.24.0](https://github.com/brand-dot-dev/ruby-sdk/compare/v0.23.0...v0.24.0)
6+
7+
### Features
8+
9+
* **api:** manual updates ([d51dcea](https://github.com/brand-dot-dev/ruby-sdk/commit/d51dcea705ad031b9010a391b7ed3a26c115beab))
10+
311
## 0.23.0 (2026-02-07)
412

513
Full Changelog: [v0.22.0...v0.23.0](https://github.com/brand-dot-dev/ruby-sdk/compare/v0.22.0...v0.23.0)

Gemfile.lock

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ GIT
1111
PATH
1212
remote: .
1313
specs:
14-
brand.dev (0.23.0)
14+
brand.dev (0.24.0)
1515
cgi
1616
connection_pool
1717

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ To use this gem, install via Bundler by adding the following to your application
2626
<!-- x-release-please-start-version -->
2727

2828
```ruby
29-
gem "brand.dev", "~> 0.23.0"
29+
gem "brand.dev", "~> 0.24.0"
3030
```
3131

3232
<!-- x-release-please-end -->

lib/brand_dev.rb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,8 @@
5252
require_relative "brand_dev/internal/transport/base_client"
5353
require_relative "brand_dev/internal/transport/pooled_net_requester"
5454
require_relative "brand_dev/client"
55+
require_relative "brand_dev/models/brand_ai_product_params"
56+
require_relative "brand_dev/models/brand_ai_product_response"
5557
require_relative "brand_dev/models/brand_ai_products_params"
5658
require_relative "brand_dev/models/brand_ai_products_response"
5759
require_relative "brand_dev/models/brand_ai_query_params"

lib/brand_dev/models.rb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,8 @@ module BrandDev
3939
mod.define_sorbet_constant!(const) { T.type_alias { mod.to_sorbet_type } }
4040
end
4141

42+
BrandAIProductParams = BrandDev::Models::BrandAIProductParams
43+
4244
BrandAIProductsParams = BrandDev::Models::BrandAIProductsParams
4345

4446
BrandAIQueryParams = BrandDev::Models::BrandAIQueryParams
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
# frozen_string_literal: true
2+
3+
module BrandDev
4+
module Models
5+
# @see BrandDev::Resources::Brand#ai_product
6+
class BrandAIProductParams < BrandDev::Internal::Type::BaseModel
7+
extend BrandDev::Internal::Type::RequestParameters::Converter
8+
include BrandDev::Internal::Type::RequestParameters
9+
10+
# @!attribute url
11+
# The product page URL to extract product data from.
12+
#
13+
# @return [String]
14+
required :url, String
15+
16+
# @!attribute timeout_ms
17+
# Optional timeout in milliseconds for the request. Maximum allowed value is
18+
# 300000ms (5 minutes).
19+
#
20+
# @return [Integer, nil]
21+
optional :timeout_ms, Integer, api_name: :timeoutMS
22+
23+
# @!method initialize(url:, timeout_ms: nil, request_options: {})
24+
# Some parameter documentations has been truncated, see
25+
# {BrandDev::Models::BrandAIProductParams} for more details.
26+
#
27+
# @param url [String] The product page URL to extract product data from.
28+
#
29+
# @param timeout_ms [Integer] Optional timeout in milliseconds for the request. Maximum allowed value is 30000
30+
#
31+
# @param request_options [BrandDev::RequestOptions, Hash{Symbol=>Object}]
32+
end
33+
end
34+
end
Lines changed: 185 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,185 @@
1+
# frozen_string_literal: true
2+
3+
module BrandDev
4+
module Models
5+
# @see BrandDev::Resources::Brand#ai_product
6+
class BrandAIProductResponse < BrandDev::Internal::Type::BaseModel
7+
# @!attribute is_product_page
8+
# Whether the given URL is a product detail page
9+
#
10+
# @return [Boolean, nil]
11+
optional :is_product_page, BrandDev::Internal::Type::Boolean
12+
13+
# @!attribute platform
14+
# The detected ecommerce platform, or null if not a product page
15+
#
16+
# @return [Symbol, BrandDev::Models::BrandAIProductResponse::Platform, nil]
17+
optional :platform, enum: -> { BrandDev::Models::BrandAIProductResponse::Platform }, nil?: true
18+
19+
# @!attribute product
20+
# The extracted product data, or null if not a product page
21+
#
22+
# @return [BrandDev::Models::BrandAIProductResponse::Product, nil]
23+
optional :product, -> { BrandDev::Models::BrandAIProductResponse::Product }, nil?: true
24+
25+
# @!method initialize(is_product_page: nil, platform: nil, product: nil)
26+
# @param is_product_page [Boolean] Whether the given URL is a product detail page
27+
#
28+
# @param platform [Symbol, BrandDev::Models::BrandAIProductResponse::Platform, nil] The detected ecommerce platform, or null if not a product page
29+
#
30+
# @param product [BrandDev::Models::BrandAIProductResponse::Product, nil] The extracted product data, or null if not a product page
31+
32+
# The detected ecommerce platform, or null if not a product page
33+
#
34+
# @see BrandDev::Models::BrandAIProductResponse#platform
35+
module Platform
36+
extend BrandDev::Internal::Type::Enum
37+
38+
AMAZON = :amazon
39+
TIKTOK_SHOP = :tiktok_shop
40+
ETSY = :etsy
41+
GENERIC = :generic
42+
43+
# @!method self.values
44+
# @return [Array<Symbol>]
45+
end
46+
47+
# @see BrandDev::Models::BrandAIProductResponse#product
48+
class Product < BrandDev::Internal::Type::BaseModel
49+
# @!attribute description
50+
# Description of the product
51+
#
52+
# @return [String]
53+
required :description, String
54+
55+
# @!attribute features
56+
# List of product features
57+
#
58+
# @return [Array<String>]
59+
required :features, BrandDev::Internal::Type::ArrayOf[String]
60+
61+
# @!attribute name
62+
# Name of the product
63+
#
64+
# @return [String]
65+
required :name, String
66+
67+
# @!attribute tags
68+
# Tags associated with the product
69+
#
70+
# @return [Array<String>]
71+
required :tags, BrandDev::Internal::Type::ArrayOf[String]
72+
73+
# @!attribute target_audience
74+
# Target audience for the product (array of strings)
75+
#
76+
# @return [Array<String>]
77+
required :target_audience, BrandDev::Internal::Type::ArrayOf[String]
78+
79+
# @!attribute billing_frequency
80+
# Billing frequency for the product
81+
#
82+
# @return [Symbol, BrandDev::Models::BrandAIProductResponse::Product::BillingFrequency, nil]
83+
optional :billing_frequency,
84+
enum: -> { BrandDev::Models::BrandAIProductResponse::Product::BillingFrequency },
85+
nil?: true
86+
87+
# @!attribute category
88+
# Category of the product
89+
#
90+
# @return [String, nil]
91+
optional :category, String, nil?: true
92+
93+
# @!attribute currency
94+
# Currency code for the price (e.g., USD, EUR)
95+
#
96+
# @return [String, nil]
97+
optional :currency, String, nil?: true
98+
99+
# @!attribute image_url
100+
# URL to the product image
101+
#
102+
# @return [String, nil]
103+
optional :image_url, String, nil?: true
104+
105+
# @!attribute price
106+
# Price of the product
107+
#
108+
# @return [Float, nil]
109+
optional :price, Float, nil?: true
110+
111+
# @!attribute pricing_model
112+
# Pricing model for the product
113+
#
114+
# @return [Symbol, BrandDev::Models::BrandAIProductResponse::Product::PricingModel, nil]
115+
optional :pricing_model,
116+
enum: -> { BrandDev::Models::BrandAIProductResponse::Product::PricingModel },
117+
nil?: true
118+
119+
# @!attribute url
120+
# URL to the product page
121+
#
122+
# @return [String, nil]
123+
optional :url, String, nil?: true
124+
125+
# @!method initialize(description:, features:, name:, tags:, target_audience:, billing_frequency: nil, category: nil, currency: nil, image_url: nil, price: nil, pricing_model: nil, url: nil)
126+
# The extracted product data, or null if not a product page
127+
#
128+
# @param description [String] Description of the product
129+
#
130+
# @param features [Array<String>] List of product features
131+
#
132+
# @param name [String] Name of the product
133+
#
134+
# @param tags [Array<String>] Tags associated with the product
135+
#
136+
# @param target_audience [Array<String>] Target audience for the product (array of strings)
137+
#
138+
# @param billing_frequency [Symbol, BrandDev::Models::BrandAIProductResponse::Product::BillingFrequency, nil] Billing frequency for the product
139+
#
140+
# @param category [String, nil] Category of the product
141+
#
142+
# @param currency [String, nil] Currency code for the price (e.g., USD, EUR)
143+
#
144+
# @param image_url [String, nil] URL to the product image
145+
#
146+
# @param price [Float, nil] Price of the product
147+
#
148+
# @param pricing_model [Symbol, BrandDev::Models::BrandAIProductResponse::Product::PricingModel, nil] Pricing model for the product
149+
#
150+
# @param url [String, nil] URL to the product page
151+
152+
# Billing frequency for the product
153+
#
154+
# @see BrandDev::Models::BrandAIProductResponse::Product#billing_frequency
155+
module BillingFrequency
156+
extend BrandDev::Internal::Type::Enum
157+
158+
MONTHLY = :monthly
159+
YEARLY = :yearly
160+
ONE_TIME = :one_time
161+
USAGE_BASED = :usage_based
162+
163+
# @!method self.values
164+
# @return [Array<Symbol>]
165+
end
166+
167+
# Pricing model for the product
168+
#
169+
# @see BrandDev::Models::BrandAIProductResponse::Product#pricing_model
170+
module PricingModel
171+
extend BrandDev::Internal::Type::Enum
172+
173+
PER_SEAT = :per_seat
174+
FLAT = :flat
175+
TIERED = :tiered
176+
FREEMIUM = :freemium
177+
CUSTOM = :custom
178+
179+
# @!method self.values
180+
# @return [Array<Symbol>]
181+
end
182+
end
183+
end
184+
end
185+
end

lib/brand_dev/resources/brand.rb

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,35 @@ def retrieve(params)
3535
)
3636
end
3737

38+
# Some parameter documentations has been truncated, see
39+
# {BrandDev::Models::BrandAIProductParams} for more details.
40+
#
41+
# Beta feature: Given a single URL, determines if it is a product detail page,
42+
# classifies the platform/product type, and extracts the product information.
43+
# Supports Amazon, TikTok Shop, Etsy, and generic ecommerce sites.
44+
#
45+
# @overload ai_product(url:, timeout_ms: nil, request_options: {})
46+
#
47+
# @param url [String] The product page URL to extract product data from.
48+
#
49+
# @param timeout_ms [Integer] Optional timeout in milliseconds for the request. Maximum allowed value is 30000
50+
#
51+
# @param request_options [BrandDev::RequestOptions, Hash{Symbol=>Object}, nil]
52+
#
53+
# @return [BrandDev::Models::BrandAIProductResponse]
54+
#
55+
# @see BrandDev::Models::BrandAIProductParams
56+
def ai_product(params)
57+
parsed, options = BrandDev::BrandAIProductParams.dump_request(params)
58+
@client.request(
59+
method: :post,
60+
path: "brand/ai/product",
61+
body: parsed,
62+
model: BrandDev::Models::BrandAIProductResponse,
63+
options: options
64+
)
65+
end
66+
3867
# Some parameter documentations has been truncated, see
3968
# {BrandDev::Models::BrandAIProductsParams} for more details.
4069
#

0 commit comments

Comments
 (0)