Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
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.8.0"
".": "1.9.0"
}
8 changes: 4 additions & 4 deletions .stats.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
configured_endpoints: 21
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/context-dev%2Fcontext.dev-18bb184b75673248917773c4c074813ca4bd966458b2f039b937df63209c029d.yml
openapi_spec_hash: ef79dd2063dd500127748ee843f5e783
config_hash: 7d13dca2b2c6f71fc463cb6062efa5ea
configured_endpoints: 22
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/context-dev%2Fcontext.dev-a831ece9950c336fba69327e01aed391a08418e1898f4aff27a800471f139cc7.yml
openapi_spec_hash: 459258410b739536cdc75b91e8b4eac7
config_hash: 70354330f92ce169beabc98696ebb9a3
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
# Changelog

## 1.9.0 (2026-04-25)

Full Changelog: [v1.8.0...v1.9.0](https://github.com/context-dot-dev/context-ruby-sdk/compare/v1.8.0...v1.9.0)

### Features

* **api:** manual updates ([e1f12de](https://github.com/context-dot-dev/context-ruby-sdk/commit/e1f12de44bcadd047b5746fdddcd828a29107e1e))

## 1.8.0 (2026-04-24)

Full Changelog: [v1.7.0...v1.8.0](https://github.com/context-dot-dev/context-ruby-sdk/compare/v1.7.0...v1.8.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:
context.dev (1.8.0)
context.dev (1.9.0)
cgi
connection_pool

Expand Down
2 changes: 1 addition & 1 deletion 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 "context.dev", "~> 1.8.0"
gem "context.dev", "~> 1.9.0"
```

<!-- x-release-please-end -->
Expand Down
2 changes: 2 additions & 0 deletions lib/context_dev.rb
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,8 @@
require_relative "context_dev/models/brand_retrieve_simplified_response"
require_relative "context_dev/models/industry_retrieve_naics_params"
require_relative "context_dev/models/industry_retrieve_naics_response"
require_relative "context_dev/models/industry_retrieve_sic_params"
require_relative "context_dev/models/industry_retrieve_sic_response"
require_relative "context_dev/models/utility_prefetch_by_email_params"
require_relative "context_dev/models/utility_prefetch_by_email_response"
require_relative "context_dev/models/utility_prefetch_params"
Expand Down
2 changes: 2 additions & 0 deletions lib/context_dev/models.rb
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,8 @@ module ContextDev

IndustryRetrieveNaicsParams = ContextDev::Models::IndustryRetrieveNaicsParams

IndustryRetrieveSicParams = ContextDev::Models::IndustryRetrieveSicParams

UtilityPrefetchByEmailParams = ContextDev::Models::UtilityPrefetchByEmailParams

UtilityPrefetchParams = ContextDev::Models::UtilityPrefetchParams
Expand Down
76 changes: 76 additions & 0 deletions lib/context_dev/models/industry_retrieve_sic_params.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
# frozen_string_literal: true

module ContextDev
module Models
# @see ContextDev::Resources::Industry#retrieve_sic
class IndustryRetrieveSicParams < ContextDev::Internal::Type::BaseModel
extend ContextDev::Internal::Type::RequestParameters::Converter
include ContextDev::Internal::Type::RequestParameters

# @!attribute input
# Brand domain or title to retrieve SIC code for. If a valid domain is provided,
# it will be used for classification, otherwise, we will search for the brand
# using the provided title.
#
# @return [String]
required :input, String

# @!attribute max_results
# Maximum number of SIC codes to return. Must be between 1 and 10. Defaults to 5.
#
# @return [Integer, nil]
optional :max_results, Integer

# @!attribute min_results
# Minimum number of SIC codes to return. Must be at least 1. Defaults to 1.
#
# @return [Integer, nil]
optional :min_results, Integer

# @!attribute timeout_ms
# 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

# @!attribute type
# Which SIC dataset to classify against. `original_sic` uses the 1987 Standard
# Industrial Classification system; `latest_sec` uses the current SIC list as
# published by the SEC. Defaults to `original_sic`.
#
# @return [Symbol, ContextDev::Models::IndustryRetrieveSicParams::Type, nil]
optional :type, enum: -> { ContextDev::IndustryRetrieveSicParams::Type }

# @!method initialize(input:, max_results: nil, min_results: nil, timeout_ms: nil, type: nil, request_options: {})
# Some parameter documentations has been truncated, see
# {ContextDev::Models::IndustryRetrieveSicParams} for more details.
#
# @param input [String] Brand domain or title to retrieve SIC code for. If a valid domain is provided, i
#
# @param max_results [Integer] Maximum number of SIC codes to return. Must be between 1 and 10. Defaults to 5.
#
# @param min_results [Integer] Minimum number of SIC codes to return. Must be at least 1. Defaults to 1.
#
# @param timeout_ms [Integer] Optional timeout in milliseconds for the request. If the request takes longer th
#
# @param type [Symbol, ContextDev::Models::IndustryRetrieveSicParams::Type] Which SIC dataset to classify against. `original_sic` uses the 1987 Standard Ind
#
# @param request_options [ContextDev::RequestOptions, Hash{Symbol=>Object}]

# Which SIC dataset to classify against. `original_sic` uses the 1987 Standard
# Industrial Classification system; `latest_sec` uses the current SIC list as
# published by the SEC. Defaults to `original_sic`.
module Type
extend ContextDev::Internal::Type::Enum

ORIGINAL_SIC = :original_sic
LATEST_SEC = :latest_sec

# @!method self.values
# @return [Array<Symbol>]
end
end
end
end
139 changes: 139 additions & 0 deletions lib/context_dev/models/industry_retrieve_sic_response.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,139 @@
# frozen_string_literal: true

module ContextDev
module Models
# @see ContextDev::Resources::Industry#retrieve_sic
class IndustryRetrieveSicResponse < ContextDev::Internal::Type::BaseModel
# @!attribute classification
# Echoes back which SIC dataset was used to classify the brand.
#
# @return [Symbol, ContextDev::Models::IndustryRetrieveSicResponse::Classification, nil]
optional :classification, enum: -> { ContextDev::Models::IndustryRetrieveSicResponse::Classification }

# @!attribute codes
# Array of SIC codes with confidence scores. Extra fields depend on the requested
# classification: `original_sic` results include `majorGroup` and
# `majorGroupName`; `latest_sec` results include `office`.
#
# @return [Array<ContextDev::Models::IndustryRetrieveSicResponse::Code>, nil]
optional :codes,
-> { ContextDev::Internal::Type::ArrayOf[ContextDev::Models::IndustryRetrieveSicResponse::Code] }

# @!attribute domain
# Domain found for the brand
#
# @return [String, nil]
optional :domain, String

# @!attribute status
# Status of the response, e.g., 'ok'
#
# @return [String, nil]
optional :status, String

# @!attribute type
# Industry classification type, for sic api it will be `sic`
#
# @return [String, nil]
optional :type, String

# @!method initialize(classification: nil, codes: nil, domain: nil, status: nil, type: nil)
# Some parameter documentations has been truncated, see
# {ContextDev::Models::IndustryRetrieveSicResponse} for more details.
#
# @param classification [Symbol, ContextDev::Models::IndustryRetrieveSicResponse::Classification] Echoes back which SIC dataset was used to classify the brand.
#
# @param codes [Array<ContextDev::Models::IndustryRetrieveSicResponse::Code>] Array of SIC codes with confidence scores. Extra fields depend on the requested
#
# @param domain [String] Domain found for the brand
#
# @param status [String] Status of the response, e.g., 'ok'
#
# @param type [String] Industry classification type, for sic api it will be `sic`

# Echoes back which SIC dataset was used to classify the brand.
#
# @see ContextDev::Models::IndustryRetrieveSicResponse#classification
module Classification
extend ContextDev::Internal::Type::Enum

ORIGINAL_SIC = :original_sic
LATEST_SEC = :latest_sec

# @!method self.values
# @return [Array<Symbol>]
end

class Code < ContextDev::Internal::Type::BaseModel
# @!attribute code
# SIC code (4-digit).
#
# @return [String]
required :code, String

# @!attribute confidence
# Confidence level for how well this SIC code matches the company description.
#
# @return [Symbol, ContextDev::Models::IndustryRetrieveSicResponse::Code::Confidence]
required :confidence, enum: -> { ContextDev::Models::IndustryRetrieveSicResponse::Code::Confidence }

# @!attribute name
# SIC industry title.
#
# @return [String]
required :name, String

# @!attribute major_group
# 2-digit major group identifier (the leading two digits of the code). Only
# present when `classification` is `original_sic`.
#
# @return [String, nil]
optional :major_group, String, api_name: :majorGroup

# @!attribute major_group_name
# Description of the 2-digit major group. Only present when `classification` is
# `original_sic`.
#
# @return [String, nil]
optional :major_group_name, String, api_name: :majorGroupName

# @!attribute office
# SEC review office responsible for filings under this code. Only present when
# `classification` is `latest_sec`.
#
# @return [String, nil]
optional :office, String

# @!method initialize(code:, confidence:, name:, major_group: nil, major_group_name: nil, office: nil)
# Some parameter documentations has been truncated, see
# {ContextDev::Models::IndustryRetrieveSicResponse::Code} for more details.
#
# @param code [String] SIC code (4-digit).
#
# @param confidence [Symbol, ContextDev::Models::IndustryRetrieveSicResponse::Code::Confidence] Confidence level for how well this SIC code matches the company description.
#
# @param name [String] SIC industry title.
#
# @param major_group [String] 2-digit major group identifier (the leading two digits of the code). Only presen
#
# @param major_group_name [String] Description of the 2-digit major group. Only present when `classification` is `o
#
# @param office [String] SEC review office responsible for filings under this code. Only present when `cl

# Confidence level for how well this SIC code matches the company description.
#
# @see ContextDev::Models::IndustryRetrieveSicResponse::Code#confidence
module Confidence
extend ContextDev::Internal::Type::Enum

HIGH = :high
MEDIUM = :medium
LOW = :low

# @!method self.values
# @return [Array<Symbol>]
end
end
end
end
end
40 changes: 40 additions & 0 deletions lib/context_dev/resources/industry.rb
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,46 @@ def retrieve_naics(params)
)
end

# Some parameter documentations has been truncated, see
# {ContextDev::Models::IndustryRetrieveSicParams} for more details.
#
# Classify any brand into Standard Industrial Classification (SIC) codes from its
# domain or name. Choose between the original 1987 SIC system (`original_sic`) or
# the latest SIC list maintained by the SEC (`latest_sec`).
#
# @overload retrieve_sic(input:, max_results: nil, min_results: nil, timeout_ms: nil, type: nil, request_options: {})
#
# @param input [String] Brand domain or title to retrieve SIC code for. If a valid domain is provided, i
#
# @param max_results [Integer] Maximum number of SIC codes to return. Must be between 1 and 10. Defaults to 5.
#
# @param min_results [Integer] Minimum number of SIC codes to return. Must be at least 1. Defaults to 1.
#
# @param timeout_ms [Integer] Optional timeout in milliseconds for the request. If the request takes longer th
#
# @param type [Symbol, ContextDev::Models::IndustryRetrieveSicParams::Type] Which SIC dataset to classify against. `original_sic` uses the 1987 Standard Ind
#
# @param request_options [ContextDev::RequestOptions, Hash{Symbol=>Object}, nil]
#
# @return [ContextDev::Models::IndustryRetrieveSicResponse]
#
# @see ContextDev::Models::IndustryRetrieveSicParams
def retrieve_sic(params)
parsed, options = ContextDev::IndustryRetrieveSicParams.dump_request(params)
query = ContextDev::Internal::Util.encode_query_params(parsed)
@client.request(
method: :get,
path: "web/sic",
query: query.transform_keys(
max_results: "maxResults",
min_results: "minResults",
timeout_ms: "timeoutMS"
),
model: ContextDev::Models::IndustryRetrieveSicResponse,
options: options
)
end

# @api private
#
# @param client [ContextDev::Client]
Expand Down
2 changes: 1 addition & 1 deletion lib/context_dev/version.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# frozen_string_literal: true

module ContextDev
VERSION = "1.8.0"
VERSION = "1.9.0"
end
2 changes: 2 additions & 0 deletions rbi/context_dev/models.rbi
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@ module ContextDev

IndustryRetrieveNaicsParams = ContextDev::Models::IndustryRetrieveNaicsParams

IndustryRetrieveSicParams = ContextDev::Models::IndustryRetrieveSicParams

UtilityPrefetchByEmailParams =
ContextDev::Models::UtilityPrefetchByEmailParams

Expand Down
Loading
Loading