brand.dev 0.10.0 → 0.11.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.
@@ -8,6 +8,8 @@ module BrandDev
8
8
 
9
9
  BrandPrefetchParams = BrandDev::Models::BrandPrefetchParams
10
10
 
11
+ BrandRetrieveByEmailParams = BrandDev::Models::BrandRetrieveByEmailParams
12
+
11
13
  BrandRetrieveByNameParams = BrandDev::Models::BrandRetrieveByNameParams
12
14
 
13
15
  BrandRetrieveByTickerParams = BrandDev::Models::BrandRetrieveByTickerParams
@@ -113,6 +113,39 @@ module BrandDev
113
113
  )
114
114
  end
115
115
 
116
+ # Retrieve brand information using an email address while detecting disposable and
117
+ # free email addresses. This endpoint extracts the domain from the email address
118
+ # and returns brand data for that domain. Disposable and free email addresses
119
+ # (like gmail.com, yahoo.com) will throw a 422 error.
120
+ sig do
121
+ params(
122
+ email: String,
123
+ force_language:
124
+ BrandDev::BrandRetrieveByEmailParams::ForceLanguage::OrSymbol,
125
+ max_speed: T::Boolean,
126
+ timeout_ms: Integer,
127
+ request_options: BrandDev::RequestOptions::OrHash
128
+ ).returns(BrandDev::Models::BrandRetrieveByEmailResponse)
129
+ end
130
+ def retrieve_by_email(
131
+ # Email address to retrieve brand data for (e.g., 'contact@example.com'). The
132
+ # domain will be extracted from the email. Free email providers (gmail.com,
133
+ # yahoo.com, etc.) and disposable email addresses are not allowed.
134
+ email:,
135
+ # Optional parameter to force the language of the retrieved brand data.
136
+ force_language: nil,
137
+ # Optional parameter to optimize the API call for maximum speed. When set to true,
138
+ # the API will skip time-consuming operations for faster response at the cost of
139
+ # less comprehensive data.
140
+ max_speed: nil,
141
+ # Optional timeout in milliseconds for the request. If the request takes longer
142
+ # than this value, it will be aborted with a 408 status code. Maximum allowed
143
+ # value is 300000ms (5 minutes).
144
+ timeout_ms: nil,
145
+ request_options: {}
146
+ )
147
+ end
148
+
116
149
  # Retrieve brand information using a company name. This endpoint searches for the
117
150
  # company by name and returns its brand data.
118
151
  sig do
@@ -0,0 +1,162 @@
1
+ module BrandDev
2
+ module Models
3
+ type brand_retrieve_by_email_params =
4
+ {
5
+ email: String,
6
+ force_language: BrandDev::Models::BrandRetrieveByEmailParams::force_language,
7
+ max_speed: bool,
8
+ timeout_ms: Integer
9
+ }
10
+ & BrandDev::Internal::Type::request_parameters
11
+
12
+ class BrandRetrieveByEmailParams < BrandDev::Internal::Type::BaseModel
13
+ extend BrandDev::Internal::Type::RequestParameters::Converter
14
+ include BrandDev::Internal::Type::RequestParameters
15
+
16
+ attr_accessor email: String
17
+
18
+ attr_reader force_language: BrandDev::Models::BrandRetrieveByEmailParams::force_language?
19
+
20
+ def force_language=: (
21
+ BrandDev::Models::BrandRetrieveByEmailParams::force_language
22
+ ) -> BrandDev::Models::BrandRetrieveByEmailParams::force_language
23
+
24
+ attr_reader max_speed: bool?
25
+
26
+ def max_speed=: (bool) -> bool
27
+
28
+ attr_reader timeout_ms: Integer?
29
+
30
+ def timeout_ms=: (Integer) -> Integer
31
+
32
+ def initialize: (
33
+ email: String,
34
+ ?force_language: BrandDev::Models::BrandRetrieveByEmailParams::force_language,
35
+ ?max_speed: bool,
36
+ ?timeout_ms: Integer,
37
+ ?request_options: BrandDev::request_opts
38
+ ) -> void
39
+
40
+ def to_hash: -> {
41
+ email: String,
42
+ force_language: BrandDev::Models::BrandRetrieveByEmailParams::force_language,
43
+ max_speed: bool,
44
+ timeout_ms: Integer,
45
+ request_options: BrandDev::RequestOptions
46
+ }
47
+
48
+ type force_language =
49
+ :albanian
50
+ | :arabic
51
+ | :azeri
52
+ | :bengali
53
+ | :bulgarian
54
+ | :cebuano
55
+ | :croatian
56
+ | :czech
57
+ | :danish
58
+ | :dutch
59
+ | :english
60
+ | :estonian
61
+ | :farsi
62
+ | :finnish
63
+ | :french
64
+ | :german
65
+ | :hausa
66
+ | :hawaiian
67
+ | :hindi
68
+ | :hungarian
69
+ | :icelandic
70
+ | :indonesian
71
+ | :italian
72
+ | :kazakh
73
+ | :kyrgyz
74
+ | :latin
75
+ | :latvian
76
+ | :lithuanian
77
+ | :macedonian
78
+ | :mongolian
79
+ | :nepali
80
+ | :norwegian
81
+ | :pashto
82
+ | :pidgin
83
+ | :polish
84
+ | :portuguese
85
+ | :romanian
86
+ | :russian
87
+ | :serbian
88
+ | :slovak
89
+ | :slovene
90
+ | :somali
91
+ | :spanish
92
+ | :swahili
93
+ | :swedish
94
+ | :tagalog
95
+ | :turkish
96
+ | :ukrainian
97
+ | :urdu
98
+ | :uzbek
99
+ | :vietnamese
100
+ | :welsh
101
+
102
+ module ForceLanguage
103
+ extend BrandDev::Internal::Type::Enum
104
+
105
+ ALBANIAN: :albanian
106
+ ARABIC: :arabic
107
+ AZERI: :azeri
108
+ BENGALI: :bengali
109
+ BULGARIAN: :bulgarian
110
+ CEBUANO: :cebuano
111
+ CROATIAN: :croatian
112
+ CZECH: :czech
113
+ DANISH: :danish
114
+ DUTCH: :dutch
115
+ ENGLISH: :english
116
+ ESTONIAN: :estonian
117
+ FARSI: :farsi
118
+ FINNISH: :finnish
119
+ FRENCH: :french
120
+ GERMAN: :german
121
+ HAUSA: :hausa
122
+ HAWAIIAN: :hawaiian
123
+ HINDI: :hindi
124
+ HUNGARIAN: :hungarian
125
+ ICELANDIC: :icelandic
126
+ INDONESIAN: :indonesian
127
+ ITALIAN: :italian
128
+ KAZAKH: :kazakh
129
+ KYRGYZ: :kyrgyz
130
+ LATIN: :latin
131
+ LATVIAN: :latvian
132
+ LITHUANIAN: :lithuanian
133
+ MACEDONIAN: :macedonian
134
+ MONGOLIAN: :mongolian
135
+ NEPALI: :nepali
136
+ NORWEGIAN: :norwegian
137
+ PASHTO: :pashto
138
+ PIDGIN: :pidgin
139
+ POLISH: :polish
140
+ PORTUGUESE: :portuguese
141
+ ROMANIAN: :romanian
142
+ RUSSIAN: :russian
143
+ SERBIAN: :serbian
144
+ SLOVAK: :slovak
145
+ SLOVENE: :slovene
146
+ SOMALI: :somali
147
+ SPANISH: :spanish
148
+ SWAHILI: :swahili
149
+ SWEDISH: :swedish
150
+ TAGALOG: :tagalog
151
+ TURKISH: :turkish
152
+ UKRAINIAN: :ukrainian
153
+ URDU: :urdu
154
+ UZBEK: :uzbek
155
+ VIETNAMESE: :vietnamese
156
+ WELSH: :welsh
157
+
158
+ def self?.values: -> ::Array[BrandDev::Models::BrandRetrieveByEmailParams::force_language]
159
+ end
160
+ end
161
+ end
162
+ end