brand.dev 0.2.0 → 0.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (39) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +26 -0
  3. data/README.md +1 -1
  4. data/lib/brand_dev/internal/transport/base_client.rb +1 -1
  5. data/lib/brand_dev/internal/type/array_of.rb +1 -0
  6. data/lib/brand_dev/internal/type/base_model.rb +3 -1
  7. data/lib/brand_dev/internal/type/converter.rb +27 -0
  8. data/lib/brand_dev/internal/type/hash_of.rb +1 -0
  9. data/lib/brand_dev/internal/type/union.rb +9 -7
  10. data/lib/brand_dev/models/brand_identify_from_transaction_response.rb +311 -1
  11. data/lib/brand_dev/models/brand_retrieve_params.rb +32 -9
  12. data/lib/brand_dev/models/brand_retrieve_response.rb +310 -1
  13. data/lib/brand_dev/models.rb +0 -2
  14. data/lib/brand_dev/resources/brand.rb +10 -32
  15. data/lib/brand_dev/version.rb +1 -1
  16. data/lib/brand_dev.rb +0 -2
  17. data/rbi/brand_dev/internal/transport/base_client.rbi +1 -1
  18. data/rbi/brand_dev/internal/type/converter.rbi +54 -0
  19. data/rbi/brand_dev/internal/type/union.rbi +9 -2
  20. data/rbi/brand_dev/models/brand_identify_from_transaction_response.rbi +1409 -0
  21. data/rbi/brand_dev/models/brand_retrieve_params.rbi +48 -10
  22. data/rbi/brand_dev/models/brand_retrieve_response.rbi +1409 -0
  23. data/rbi/brand_dev/models.rbi +0 -2
  24. data/rbi/brand_dev/resources/brand.rbi +18 -24
  25. data/sig/brand_dev/internal/transport/base_client.rbs +1 -1
  26. data/sig/brand_dev/internal/type/converter.rbs +17 -0
  27. data/sig/brand_dev/internal/type/union.rbs +2 -2
  28. data/sig/brand_dev/models/brand_identify_from_transaction_response.rbs +558 -0
  29. data/sig/brand_dev/models/brand_retrieve_params.rbs +18 -2
  30. data/sig/brand_dev/models/brand_retrieve_response.rbs +558 -0
  31. data/sig/brand_dev/models.rbs +0 -2
  32. data/sig/brand_dev/resources/brand.rbs +3 -7
  33. metadata +2 -8
  34. data/lib/brand_dev/models/brand_retrieve_by_ticker_params.rb +0 -35
  35. data/lib/brand_dev/models/brand_retrieve_by_ticker_response.rb +0 -478
  36. data/rbi/brand_dev/models/brand_retrieve_by_ticker_params.rbi +0 -61
  37. data/rbi/brand_dev/models/brand_retrieve_by_ticker_response.rbi +0 -1081
  38. data/sig/brand_dev/models/brand_retrieve_by_ticker_params.rbs +0 -30
  39. data/sig/brand_dev/models/brand_retrieve_by_ticker_response.rbs +0 -467
@@ -8,8 +8,6 @@ module BrandDev
8
8
 
9
9
  BrandPrefetchParams = BrandDev::Models::BrandPrefetchParams
10
10
 
11
- BrandRetrieveByTickerParams = BrandDev::Models::BrandRetrieveByTickerParams
12
-
13
11
  BrandRetrieveNaicsParams = BrandDev::Models::BrandRetrieveNaicsParams
14
12
 
15
13
  BrandRetrieveParams = BrandDev::Models::BrandRetrieveParams
@@ -3,26 +3,39 @@
3
3
  module BrandDev
4
4
  module Resources
5
5
  class Brand
6
- # Retrieve brand data by domain
6
+ # Retrieve brand information using one of three methods: domain name, company
7
+ # name, or stock ticker symbol. Exactly one of these parameters must be provided.
7
8
  sig do
8
9
  params(
9
10
  domain: String,
10
11
  force_language:
11
12
  BrandDev::BrandRetrieveParams::ForceLanguage::OrSymbol,
12
13
  max_speed: T::Boolean,
14
+ name: String,
15
+ ticker: String,
13
16
  timeout_ms: Integer,
14
17
  request_options: BrandDev::RequestOptions::OrHash
15
18
  ).returns(BrandDev::Models::BrandRetrieveResponse)
16
19
  end
17
20
  def retrieve(
18
- # Domain name to retrieve brand data for
19
- domain:,
20
- # Optional parameter to force the language of the retrieved brand data
21
+ # Domain name to retrieve brand data for (e.g., 'example.com', 'google.com').
22
+ # Cannot be used with name or ticker parameters.
23
+ domain: nil,
24
+ # Optional parameter to force the language of the retrieved brand data. Works with
25
+ # all three lookup methods.
21
26
  force_language: nil,
22
27
  # Optional parameter to optimize the API call for maximum speed. When set to true,
23
28
  # the API will skip time-consuming operations for faster response at the cost of
24
- # less comprehensive data.
29
+ # less comprehensive data. Works with all three lookup methods.
25
30
  max_speed: nil,
31
+ # Company name to retrieve brand data for (e.g., 'Apple Inc', 'Microsoft
32
+ # Corporation'). Must be 3-30 characters. Cannot be used with domain or ticker
33
+ # parameters.
34
+ name: nil,
35
+ # Stock ticker symbol to retrieve brand data for (e.g., 'AAPL', 'GOOGL', 'BRK.A').
36
+ # Must be 1-6 characters, letters/numbers/dots only. Cannot be used with domain or
37
+ # name parameters.
38
+ ticker: nil,
26
39
  # Optional timeout in milliseconds for the request. If the request takes longer
27
40
  # than this value, it will be aborted with a 408 status code. Maximum allowed
28
41
  # value is 300000ms (5 minutes).
@@ -101,25 +114,6 @@ module BrandDev
101
114
  )
102
115
  end
103
116
 
104
- # Retrieve brand data by stock ticker (e.g. AAPL, TSLA, etc.)
105
- sig do
106
- params(
107
- ticker: String,
108
- timeout_ms: Integer,
109
- request_options: BrandDev::RequestOptions::OrHash
110
- ).returns(BrandDev::Models::BrandRetrieveByTickerResponse)
111
- end
112
- def retrieve_by_ticker(
113
- # Stock ticker symbol to retrieve brand data for (e.g. AAPL, TSLA, etc.)
114
- ticker:,
115
- # Optional timeout in milliseconds for the request. If the request takes longer
116
- # than this value, it will be aborted with a 408 status code. Maximum allowed
117
- # value is 300000ms (5 minutes).
118
- timeout_ms: nil,
119
- request_options: {}
120
- )
121
- end
122
-
123
117
  # Endpoint to classify any brand into a 2022 NAICS code.
124
118
  sig do
125
119
  params(
@@ -99,7 +99,7 @@ module BrandDev
99
99
  retry_count: Integer
100
100
  ) -> Float
101
101
 
102
- private def send_request: (
102
+ def send_request: (
103
103
  BrandDev::Internal::Transport::BaseClient::request_input request,
104
104
  redirect_count: Integer,
105
105
  retry_count: Integer,
@@ -39,6 +39,23 @@ module BrandDev
39
39
  | BrandDev::Internal::Type::Converter::input spec
40
40
  ) -> (^-> top)
41
41
 
42
+ def self.meta_info: (
43
+ {
44
+ const: (nil | bool | Integer | Float | Symbol)?,
45
+ enum: ^-> BrandDev::Internal::Type::Converter::input?,
46
+ union: ^-> BrandDev::Internal::Type::Converter::input?
47
+ }
48
+ | ^-> BrandDev::Internal::Type::Converter::input
49
+ | BrandDev::Internal::Type::Converter::input type_info,
50
+ {
51
+ const: (nil | bool | Integer | Float | Symbol)?,
52
+ enum: ^-> BrandDev::Internal::Type::Converter::input?,
53
+ union: ^-> BrandDev::Internal::Type::Converter::input?
54
+ }
55
+ | ^-> BrandDev::Internal::Type::Converter::input
56
+ | BrandDev::Internal::Type::Converter::input spec
57
+ ) -> ::Hash[Symbol, top]
58
+
42
59
  def self.new_coerce_state: (
43
60
  ?translate_names: bool
44
61
  ) -> BrandDev::Internal::Type::Converter::coerce_state
@@ -5,9 +5,9 @@ module BrandDev
5
5
  include BrandDev::Internal::Type::Converter
6
6
  include BrandDev::Internal::Util::SorbetRuntimeSupport
7
7
 
8
- private def self.known_variants: -> ::Array[[Symbol?, (^-> BrandDev::Internal::Type::Converter::input)]]
8
+ private def self.known_variants: -> ::Array[[Symbol?, (^-> BrandDev::Internal::Type::Converter::input), ::Hash[Symbol, top]]]
9
9
 
10
- def self.derefed_variants: -> ::Array[[Symbol?, top]]
10
+ def self.derefed_variants: -> ::Array[[Symbol?, top, ::Hash[Symbol, top]]]
11
11
 
12
12
  def self.variants: -> ::Array[top]
13
13