brand.dev 0.0.1.pre.alpha.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.
- checksums.yaml +7 -0
- data/README.md +229 -0
- data/SECURITY.md +23 -0
- data/lib/brand_dev/client.rb +74 -0
- data/lib/brand_dev/errors.rb +192 -0
- data/lib/brand_dev/file_part.rb +55 -0
- data/lib/brand_dev/internal/transport/base_client.rb +555 -0
- data/lib/brand_dev/internal/transport/pooled_net_requester.rb +209 -0
- data/lib/brand_dev/internal/type/array_of.rb +162 -0
- data/lib/brand_dev/internal/type/base_model.rb +484 -0
- data/lib/brand_dev/internal/type/base_page.rb +55 -0
- data/lib/brand_dev/internal/type/boolean.rb +71 -0
- data/lib/brand_dev/internal/type/converter.rb +292 -0
- data/lib/brand_dev/internal/type/enum.rb +120 -0
- data/lib/brand_dev/internal/type/file_input.rb +103 -0
- data/lib/brand_dev/internal/type/hash_of.rb +182 -0
- data/lib/brand_dev/internal/type/request_parameters.rb +42 -0
- data/lib/brand_dev/internal/type/union.rb +227 -0
- data/lib/brand_dev/internal/type/unknown.rb +75 -0
- data/lib/brand_dev/internal/util.rb +915 -0
- data/lib/brand_dev/internal.rb +20 -0
- data/lib/brand_dev/models/brand_identify_from_transaction_params.rb +22 -0
- data/lib/brand_dev/models/brand_identify_from_transaction_response.rb +435 -0
- data/lib/brand_dev/models/brand_retrieve_by_ticker_params.rb +22 -0
- data/lib/brand_dev/models/brand_retrieve_by_ticker_response.rb +432 -0
- data/lib/brand_dev/models/brand_retrieve_naics_params.rb +27 -0
- data/lib/brand_dev/models/brand_retrieve_naics_response.rb +61 -0
- data/lib/brand_dev/models/brand_retrieve_params.rb +91 -0
- data/lib/brand_dev/models/brand_retrieve_response.rb +432 -0
- data/lib/brand_dev/models/brand_search_params.rb +22 -0
- data/lib/brand_dev/models/brand_search_response.rb +35 -0
- data/lib/brand_dev/models.rb +51 -0
- data/lib/brand_dev/request_options.rb +77 -0
- data/lib/brand_dev/resources/brand.rb +130 -0
- data/lib/brand_dev/version.rb +5 -0
- data/lib/brand_dev.rb +64 -0
- data/manifest.yaml +15 -0
- data/rbi/brand_dev/client.rbi +49 -0
- data/rbi/brand_dev/errors.rbi +162 -0
- data/rbi/brand_dev/file_part.rbi +37 -0
- data/rbi/brand_dev/internal/transport/base_client.rbi +293 -0
- data/rbi/brand_dev/internal/transport/pooled_net_requester.rbi +79 -0
- data/rbi/brand_dev/internal/type/array_of.rbi +104 -0
- data/rbi/brand_dev/internal/type/base_model.rbi +302 -0
- data/rbi/brand_dev/internal/type/base_page.rbi +42 -0
- data/rbi/brand_dev/internal/type/boolean.rbi +56 -0
- data/rbi/brand_dev/internal/type/converter.rbi +162 -0
- data/rbi/brand_dev/internal/type/enum.rbi +82 -0
- data/rbi/brand_dev/internal/type/file_input.rbi +59 -0
- data/rbi/brand_dev/internal/type/hash_of.rbi +104 -0
- data/rbi/brand_dev/internal/type/request_parameters.rbi +29 -0
- data/rbi/brand_dev/internal/type/union.rbi +116 -0
- data/rbi/brand_dev/internal/type/unknown.rbi +56 -0
- data/rbi/brand_dev/internal/util.rbi +485 -0
- data/rbi/brand_dev/internal.rbi +16 -0
- data/rbi/brand_dev/models/brand_identify_from_transaction_params.rbi +46 -0
- data/rbi/brand_dev/models/brand_identify_from_transaction_response.rbi +981 -0
- data/rbi/brand_dev/models/brand_retrieve_by_ticker_params.rbi +43 -0
- data/rbi/brand_dev/models/brand_retrieve_by_ticker_response.rbi +976 -0
- data/rbi/brand_dev/models/brand_retrieve_naics_params.rbi +44 -0
- data/rbi/brand_dev/models/brand_retrieve_naics_response.rbi +127 -0
- data/rbi/brand_dev/models/brand_retrieve_params.rbi +344 -0
- data/rbi/brand_dev/models/brand_retrieve_response.rbi +949 -0
- data/rbi/brand_dev/models/brand_search_params.rbi +40 -0
- data/rbi/brand_dev/models/brand_search_response.rbi +63 -0
- data/rbi/brand_dev/models.rbi +14 -0
- data/rbi/brand_dev/request_options.rbi +59 -0
- data/rbi/brand_dev/resources/brand.rbi +89 -0
- data/rbi/brand_dev/version.rbi +5 -0
- data/sig/brand_dev/client.rbs +26 -0
- data/sig/brand_dev/errors.rbs +101 -0
- data/sig/brand_dev/file_part.rbs +21 -0
- data/sig/brand_dev/internal/transport/base_client.rbs +131 -0
- data/sig/brand_dev/internal/transport/pooled_net_requester.rbs +45 -0
- data/sig/brand_dev/internal/type/array_of.rbs +48 -0
- data/sig/brand_dev/internal/type/base_model.rbs +102 -0
- data/sig/brand_dev/internal/type/base_page.rbs +24 -0
- data/sig/brand_dev/internal/type/boolean.rbs +26 -0
- data/sig/brand_dev/internal/type/converter.rbs +56 -0
- data/sig/brand_dev/internal/type/enum.rbs +32 -0
- data/sig/brand_dev/internal/type/file_input.rbs +25 -0
- data/sig/brand_dev/internal/type/hash_of.rbs +48 -0
- data/sig/brand_dev/internal/type/request_parameters.rbs +17 -0
- data/sig/brand_dev/internal/type/union.rbs +52 -0
- data/sig/brand_dev/internal/type/unknown.rbs +26 -0
- data/sig/brand_dev/internal/util.rbs +185 -0
- data/sig/brand_dev/internal.rbs +9 -0
- data/sig/brand_dev/models/brand_identify_from_transaction_params.rbs +24 -0
- data/sig/brand_dev/models/brand_identify_from_transaction_response.rbs +418 -0
- data/sig/brand_dev/models/brand_retrieve_by_ticker_params.rbs +23 -0
- data/sig/brand_dev/models/brand_retrieve_by_ticker_response.rbs +418 -0
- data/sig/brand_dev/models/brand_retrieve_naics_params.rbs +23 -0
- data/sig/brand_dev/models/brand_retrieve_naics_response.rbs +61 -0
- data/sig/brand_dev/models/brand_retrieve_params.rbs +148 -0
- data/sig/brand_dev/models/brand_retrieve_response.rbs +418 -0
- data/sig/brand_dev/models/brand_search_params.rbs +23 -0
- data/sig/brand_dev/models/brand_search_response.rbs +29 -0
- data/sig/brand_dev/models.rbs +11 -0
- data/sig/brand_dev/request_options.rbs +34 -0
- data/sig/brand_dev/resources/brand.rbs +33 -0
- data/sig/brand_dev/version.rbs +3 -0
- metadata +160 -0
@@ -0,0 +1,432 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module BrandDev
|
4
|
+
module Models
|
5
|
+
# @see BrandDev::Resources::Brand#retrieve
|
6
|
+
class BrandRetrieveResponse < BrandDev::Internal::Type::BaseModel
|
7
|
+
# @!attribute brand
|
8
|
+
# Detailed brand information
|
9
|
+
#
|
10
|
+
# @return [BrandDev::Models::BrandRetrieveResponse::Brand, nil]
|
11
|
+
optional :brand, -> { BrandDev::Models::BrandRetrieveResponse::Brand }
|
12
|
+
|
13
|
+
# @!attribute code
|
14
|
+
# HTTP status code
|
15
|
+
#
|
16
|
+
# @return [Integer, nil]
|
17
|
+
optional :code, Integer
|
18
|
+
|
19
|
+
# @!attribute status
|
20
|
+
# Status of the response, e.g., 'ok'
|
21
|
+
#
|
22
|
+
# @return [String, nil]
|
23
|
+
optional :status, String
|
24
|
+
|
25
|
+
# @!method initialize(brand: nil, code: nil, status: nil)
|
26
|
+
# @param brand [BrandDev::Models::BrandRetrieveResponse::Brand] Detailed brand information
|
27
|
+
#
|
28
|
+
# @param code [Integer] HTTP status code
|
29
|
+
#
|
30
|
+
# @param status [String] Status of the response, e.g., 'ok'
|
31
|
+
|
32
|
+
# @see BrandDev::Models::BrandRetrieveResponse#brand
|
33
|
+
class Brand < BrandDev::Internal::Type::BaseModel
|
34
|
+
# @!attribute address
|
35
|
+
# Physical address of the brand
|
36
|
+
#
|
37
|
+
# @return [BrandDev::Models::BrandRetrieveResponse::Brand::Address, nil]
|
38
|
+
optional :address, -> { BrandDev::Models::BrandRetrieveResponse::Brand::Address }
|
39
|
+
|
40
|
+
# @!attribute backdrops
|
41
|
+
# An array of backdrop images for the brand
|
42
|
+
#
|
43
|
+
# @return [Array<BrandDev::Models::BrandRetrieveResponse::Brand::Backdrop>, nil]
|
44
|
+
optional :backdrops,
|
45
|
+
-> { BrandDev::Internal::Type::ArrayOf[BrandDev::Models::BrandRetrieveResponse::Brand::Backdrop] }
|
46
|
+
|
47
|
+
# @!attribute colors
|
48
|
+
# An array of brand colors
|
49
|
+
#
|
50
|
+
# @return [Array<BrandDev::Models::BrandRetrieveResponse::Brand::Color>, nil]
|
51
|
+
optional :colors,
|
52
|
+
-> { BrandDev::Internal::Type::ArrayOf[BrandDev::Models::BrandRetrieveResponse::Brand::Color] }
|
53
|
+
|
54
|
+
# @!attribute description
|
55
|
+
# A brief description of the brand
|
56
|
+
#
|
57
|
+
# @return [String, nil]
|
58
|
+
optional :description, String
|
59
|
+
|
60
|
+
# @!attribute domain
|
61
|
+
# The domain name of the brand
|
62
|
+
#
|
63
|
+
# @return [String, nil]
|
64
|
+
optional :domain, String
|
65
|
+
|
66
|
+
# @!attribute fonts
|
67
|
+
# An array of fonts used by the brand's website
|
68
|
+
#
|
69
|
+
# @return [Array<BrandDev::Models::BrandRetrieveResponse::Brand::Font>, nil]
|
70
|
+
optional :fonts,
|
71
|
+
-> { BrandDev::Internal::Type::ArrayOf[BrandDev::Models::BrandRetrieveResponse::Brand::Font] }
|
72
|
+
|
73
|
+
# @!attribute logos
|
74
|
+
# An array of logos associated with the brand
|
75
|
+
#
|
76
|
+
# @return [Array<BrandDev::Models::BrandRetrieveResponse::Brand::Logo>, nil]
|
77
|
+
optional :logos,
|
78
|
+
-> { BrandDev::Internal::Type::ArrayOf[BrandDev::Models::BrandRetrieveResponse::Brand::Logo] }
|
79
|
+
|
80
|
+
# @!attribute slogan
|
81
|
+
# The brand's slogan
|
82
|
+
#
|
83
|
+
# @return [String, nil]
|
84
|
+
optional :slogan, String
|
85
|
+
|
86
|
+
# @!attribute socials
|
87
|
+
# An array of social media links for the brand
|
88
|
+
#
|
89
|
+
# @return [Array<BrandDev::Models::BrandRetrieveResponse::Brand::Social>, nil]
|
90
|
+
optional :socials,
|
91
|
+
-> { BrandDev::Internal::Type::ArrayOf[BrandDev::Models::BrandRetrieveResponse::Brand::Social] }
|
92
|
+
|
93
|
+
# @!attribute stock
|
94
|
+
# Stock market information for this brand (will be null if not a publicly traded
|
95
|
+
# company)
|
96
|
+
#
|
97
|
+
# @return [BrandDev::Models::BrandRetrieveResponse::Brand::Stock, nil]
|
98
|
+
optional :stock, -> { BrandDev::Models::BrandRetrieveResponse::Brand::Stock }
|
99
|
+
|
100
|
+
# @!attribute title
|
101
|
+
# The title or name of the brand
|
102
|
+
#
|
103
|
+
# @return [String, nil]
|
104
|
+
optional :title, String
|
105
|
+
|
106
|
+
# @!method initialize(address: nil, backdrops: nil, colors: nil, description: nil, domain: nil, fonts: nil, logos: nil, slogan: nil, socials: nil, stock: nil, title: nil)
|
107
|
+
# Some parameter documentations has been truncated, see
|
108
|
+
# {BrandDev::Models::BrandRetrieveResponse::Brand} for more details.
|
109
|
+
#
|
110
|
+
# Detailed brand information
|
111
|
+
#
|
112
|
+
# @param address [BrandDev::Models::BrandRetrieveResponse::Brand::Address] Physical address of the brand
|
113
|
+
#
|
114
|
+
# @param backdrops [Array<BrandDev::Models::BrandRetrieveResponse::Brand::Backdrop>] An array of backdrop images for the brand
|
115
|
+
#
|
116
|
+
# @param colors [Array<BrandDev::Models::BrandRetrieveResponse::Brand::Color>] An array of brand colors
|
117
|
+
#
|
118
|
+
# @param description [String] A brief description of the brand
|
119
|
+
#
|
120
|
+
# @param domain [String] The domain name of the brand
|
121
|
+
#
|
122
|
+
# @param fonts [Array<BrandDev::Models::BrandRetrieveResponse::Brand::Font>] An array of fonts used by the brand's website
|
123
|
+
#
|
124
|
+
# @param logos [Array<BrandDev::Models::BrandRetrieveResponse::Brand::Logo>] An array of logos associated with the brand
|
125
|
+
#
|
126
|
+
# @param slogan [String] The brand's slogan
|
127
|
+
#
|
128
|
+
# @param socials [Array<BrandDev::Models::BrandRetrieveResponse::Brand::Social>] An array of social media links for the brand
|
129
|
+
#
|
130
|
+
# @param stock [BrandDev::Models::BrandRetrieveResponse::Brand::Stock] Stock market information for this brand (will be null if not a publicly traded c
|
131
|
+
#
|
132
|
+
# @param title [String] The title or name of the brand
|
133
|
+
|
134
|
+
# @see BrandDev::Models::BrandRetrieveResponse::Brand#address
|
135
|
+
class Address < BrandDev::Internal::Type::BaseModel
|
136
|
+
# @!attribute city
|
137
|
+
# City name
|
138
|
+
#
|
139
|
+
# @return [String, nil]
|
140
|
+
optional :city, String
|
141
|
+
|
142
|
+
# @!attribute country
|
143
|
+
# Country name
|
144
|
+
#
|
145
|
+
# @return [String, nil]
|
146
|
+
optional :country, String
|
147
|
+
|
148
|
+
# @!attribute country_code
|
149
|
+
# Country code
|
150
|
+
#
|
151
|
+
# @return [String, nil]
|
152
|
+
optional :country_code, String
|
153
|
+
|
154
|
+
# @!attribute postal_code
|
155
|
+
# Postal or ZIP code
|
156
|
+
#
|
157
|
+
# @return [String, nil]
|
158
|
+
optional :postal_code, String
|
159
|
+
|
160
|
+
# @!attribute state_code
|
161
|
+
# State or province code
|
162
|
+
#
|
163
|
+
# @return [String, nil]
|
164
|
+
optional :state_code, String
|
165
|
+
|
166
|
+
# @!attribute state_province
|
167
|
+
# State or province name
|
168
|
+
#
|
169
|
+
# @return [String, nil]
|
170
|
+
optional :state_province, String
|
171
|
+
|
172
|
+
# @!attribute street
|
173
|
+
# Street address
|
174
|
+
#
|
175
|
+
# @return [String, nil]
|
176
|
+
optional :street, String
|
177
|
+
|
178
|
+
# @!method initialize(city: nil, country: nil, country_code: nil, postal_code: nil, state_code: nil, state_province: nil, street: nil)
|
179
|
+
# Physical address of the brand
|
180
|
+
#
|
181
|
+
# @param city [String] City name
|
182
|
+
#
|
183
|
+
# @param country [String] Country name
|
184
|
+
#
|
185
|
+
# @param country_code [String] Country code
|
186
|
+
#
|
187
|
+
# @param postal_code [String] Postal or ZIP code
|
188
|
+
#
|
189
|
+
# @param state_code [String] State or province code
|
190
|
+
#
|
191
|
+
# @param state_province [String] State or province name
|
192
|
+
#
|
193
|
+
# @param street [String] Street address
|
194
|
+
end
|
195
|
+
|
196
|
+
class Backdrop < BrandDev::Internal::Type::BaseModel
|
197
|
+
# @!attribute colors
|
198
|
+
# Array of colors in the backdrop image
|
199
|
+
#
|
200
|
+
# @return [Array<BrandDev::Models::BrandRetrieveResponse::Brand::Backdrop::Color>, nil]
|
201
|
+
optional :colors,
|
202
|
+
-> { BrandDev::Internal::Type::ArrayOf[BrandDev::Models::BrandRetrieveResponse::Brand::Backdrop::Color] }
|
203
|
+
|
204
|
+
# @!attribute resolution
|
205
|
+
# Resolution of the backdrop image
|
206
|
+
#
|
207
|
+
# @return [BrandDev::Models::BrandRetrieveResponse::Brand::Backdrop::Resolution, nil]
|
208
|
+
optional :resolution, -> { BrandDev::Models::BrandRetrieveResponse::Brand::Backdrop::Resolution }
|
209
|
+
|
210
|
+
# @!attribute url
|
211
|
+
# URL of the backdrop image
|
212
|
+
#
|
213
|
+
# @return [String, nil]
|
214
|
+
optional :url, String
|
215
|
+
|
216
|
+
# @!method initialize(colors: nil, resolution: nil, url: nil)
|
217
|
+
# @param colors [Array<BrandDev::Models::BrandRetrieveResponse::Brand::Backdrop::Color>] Array of colors in the backdrop image
|
218
|
+
#
|
219
|
+
# @param resolution [BrandDev::Models::BrandRetrieveResponse::Brand::Backdrop::Resolution] Resolution of the backdrop image
|
220
|
+
#
|
221
|
+
# @param url [String] URL of the backdrop image
|
222
|
+
|
223
|
+
class Color < BrandDev::Internal::Type::BaseModel
|
224
|
+
# @!attribute hex
|
225
|
+
# Color in hexadecimal format
|
226
|
+
#
|
227
|
+
# @return [String, nil]
|
228
|
+
optional :hex, String
|
229
|
+
|
230
|
+
# @!attribute name
|
231
|
+
# Name of the color
|
232
|
+
#
|
233
|
+
# @return [String, nil]
|
234
|
+
optional :name, String
|
235
|
+
|
236
|
+
# @!method initialize(hex: nil, name: nil)
|
237
|
+
# @param hex [String] Color in hexadecimal format
|
238
|
+
#
|
239
|
+
# @param name [String] Name of the color
|
240
|
+
end
|
241
|
+
|
242
|
+
# @see BrandDev::Models::BrandRetrieveResponse::Brand::Backdrop#resolution
|
243
|
+
class Resolution < BrandDev::Internal::Type::BaseModel
|
244
|
+
# @!attribute height
|
245
|
+
# Height of the image in pixels
|
246
|
+
#
|
247
|
+
# @return [Integer, nil]
|
248
|
+
optional :height, Integer
|
249
|
+
|
250
|
+
# @!attribute width
|
251
|
+
# Width of the image in pixels
|
252
|
+
#
|
253
|
+
# @return [Integer, nil]
|
254
|
+
optional :width, Integer
|
255
|
+
|
256
|
+
# @!method initialize(height: nil, width: nil)
|
257
|
+
# Resolution of the backdrop image
|
258
|
+
#
|
259
|
+
# @param height [Integer] Height of the image in pixels
|
260
|
+
#
|
261
|
+
# @param width [Integer] Width of the image in pixels
|
262
|
+
end
|
263
|
+
end
|
264
|
+
|
265
|
+
class Color < BrandDev::Internal::Type::BaseModel
|
266
|
+
# @!attribute hex
|
267
|
+
# Color in hexadecimal format
|
268
|
+
#
|
269
|
+
# @return [String, nil]
|
270
|
+
optional :hex, String
|
271
|
+
|
272
|
+
# @!attribute name
|
273
|
+
# Name of the color
|
274
|
+
#
|
275
|
+
# @return [String, nil]
|
276
|
+
optional :name, String
|
277
|
+
|
278
|
+
# @!method initialize(hex: nil, name: nil)
|
279
|
+
# @param hex [String] Color in hexadecimal format
|
280
|
+
#
|
281
|
+
# @param name [String] Name of the color
|
282
|
+
end
|
283
|
+
|
284
|
+
class Font < BrandDev::Internal::Type::BaseModel
|
285
|
+
# @!attribute name
|
286
|
+
# Name of the font
|
287
|
+
#
|
288
|
+
# @return [String, nil]
|
289
|
+
optional :name, String
|
290
|
+
|
291
|
+
# @!attribute usage
|
292
|
+
# Usage of the font, e.g., 'title', 'body', 'button'
|
293
|
+
#
|
294
|
+
# @return [String, nil]
|
295
|
+
optional :usage, String
|
296
|
+
|
297
|
+
# @!method initialize(name: nil, usage: nil)
|
298
|
+
# @param name [String] Name of the font
|
299
|
+
#
|
300
|
+
# @param usage [String] Usage of the font, e.g., 'title', 'body', 'button'
|
301
|
+
end
|
302
|
+
|
303
|
+
class Logo < BrandDev::Internal::Type::BaseModel
|
304
|
+
# @!attribute colors
|
305
|
+
# Array of colors in the logo
|
306
|
+
#
|
307
|
+
# @return [Array<BrandDev::Models::BrandRetrieveResponse::Brand::Logo::Color>, nil]
|
308
|
+
optional :colors,
|
309
|
+
-> { BrandDev::Internal::Type::ArrayOf[BrandDev::Models::BrandRetrieveResponse::Brand::Logo::Color] }
|
310
|
+
|
311
|
+
# @!attribute group
|
312
|
+
# Group identifier for logos
|
313
|
+
#
|
314
|
+
# @return [Integer, nil]
|
315
|
+
optional :group, Integer
|
316
|
+
|
317
|
+
# @!attribute mode
|
318
|
+
# Mode of the logo, e.g., 'dark', 'light'
|
319
|
+
#
|
320
|
+
# @return [String, nil]
|
321
|
+
optional :mode, String
|
322
|
+
|
323
|
+
# @!attribute resolution
|
324
|
+
# Resolution of the logo image
|
325
|
+
#
|
326
|
+
# @return [BrandDev::Models::BrandRetrieveResponse::Brand::Logo::Resolution, nil]
|
327
|
+
optional :resolution, -> { BrandDev::Models::BrandRetrieveResponse::Brand::Logo::Resolution }
|
328
|
+
|
329
|
+
# @!attribute url
|
330
|
+
# URL of the logo image
|
331
|
+
#
|
332
|
+
# @return [String, nil]
|
333
|
+
optional :url, String
|
334
|
+
|
335
|
+
# @!method initialize(colors: nil, group: nil, mode: nil, resolution: nil, url: nil)
|
336
|
+
# @param colors [Array<BrandDev::Models::BrandRetrieveResponse::Brand::Logo::Color>] Array of colors in the logo
|
337
|
+
#
|
338
|
+
# @param group [Integer] Group identifier for logos
|
339
|
+
#
|
340
|
+
# @param mode [String] Mode of the logo, e.g., 'dark', 'light'
|
341
|
+
#
|
342
|
+
# @param resolution [BrandDev::Models::BrandRetrieveResponse::Brand::Logo::Resolution] Resolution of the logo image
|
343
|
+
#
|
344
|
+
# @param url [String] URL of the logo image
|
345
|
+
|
346
|
+
class Color < BrandDev::Internal::Type::BaseModel
|
347
|
+
# @!attribute hex
|
348
|
+
# Color in hexadecimal format
|
349
|
+
#
|
350
|
+
# @return [String, nil]
|
351
|
+
optional :hex, String
|
352
|
+
|
353
|
+
# @!attribute name
|
354
|
+
# Name of the color
|
355
|
+
#
|
356
|
+
# @return [String, nil]
|
357
|
+
optional :name, String
|
358
|
+
|
359
|
+
# @!method initialize(hex: nil, name: nil)
|
360
|
+
# @param hex [String] Color in hexadecimal format
|
361
|
+
#
|
362
|
+
# @param name [String] Name of the color
|
363
|
+
end
|
364
|
+
|
365
|
+
# @see BrandDev::Models::BrandRetrieveResponse::Brand::Logo#resolution
|
366
|
+
class Resolution < BrandDev::Internal::Type::BaseModel
|
367
|
+
# @!attribute height
|
368
|
+
# Height of the image in pixels
|
369
|
+
#
|
370
|
+
# @return [Integer, nil]
|
371
|
+
optional :height, Integer
|
372
|
+
|
373
|
+
# @!attribute width
|
374
|
+
# Width of the image in pixels
|
375
|
+
#
|
376
|
+
# @return [Integer, nil]
|
377
|
+
optional :width, Integer
|
378
|
+
|
379
|
+
# @!method initialize(height: nil, width: nil)
|
380
|
+
# Resolution of the logo image
|
381
|
+
#
|
382
|
+
# @param height [Integer] Height of the image in pixels
|
383
|
+
#
|
384
|
+
# @param width [Integer] Width of the image in pixels
|
385
|
+
end
|
386
|
+
end
|
387
|
+
|
388
|
+
class Social < BrandDev::Internal::Type::BaseModel
|
389
|
+
# @!attribute type
|
390
|
+
# Type of social media, e.g., 'facebook', 'twitter'
|
391
|
+
#
|
392
|
+
# @return [String, nil]
|
393
|
+
optional :type, String
|
394
|
+
|
395
|
+
# @!attribute url
|
396
|
+
# URL of the social media page
|
397
|
+
#
|
398
|
+
# @return [String, nil]
|
399
|
+
optional :url, String
|
400
|
+
|
401
|
+
# @!method initialize(type: nil, url: nil)
|
402
|
+
# @param type [String] Type of social media, e.g., 'facebook', 'twitter'
|
403
|
+
#
|
404
|
+
# @param url [String] URL of the social media page
|
405
|
+
end
|
406
|
+
|
407
|
+
# @see BrandDev::Models::BrandRetrieveResponse::Brand#stock
|
408
|
+
class Stock < BrandDev::Internal::Type::BaseModel
|
409
|
+
# @!attribute exchange
|
410
|
+
# Stock exchange name
|
411
|
+
#
|
412
|
+
# @return [String, nil]
|
413
|
+
optional :exchange, String
|
414
|
+
|
415
|
+
# @!attribute ticker
|
416
|
+
# Stock ticker symbol
|
417
|
+
#
|
418
|
+
# @return [String, nil]
|
419
|
+
optional :ticker, String
|
420
|
+
|
421
|
+
# @!method initialize(exchange: nil, ticker: nil)
|
422
|
+
# Stock market information for this brand (will be null if not a publicly traded
|
423
|
+
# company)
|
424
|
+
#
|
425
|
+
# @param exchange [String] Stock exchange name
|
426
|
+
#
|
427
|
+
# @param ticker [String] Stock ticker symbol
|
428
|
+
end
|
429
|
+
end
|
430
|
+
end
|
431
|
+
end
|
432
|
+
end
|
@@ -0,0 +1,22 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module BrandDev
|
4
|
+
module Models
|
5
|
+
# @see BrandDev::Resources::Brand#search
|
6
|
+
class BrandSearchParams < BrandDev::Internal::Type::BaseModel
|
7
|
+
extend BrandDev::Internal::Type::RequestParameters::Converter
|
8
|
+
include BrandDev::Internal::Type::RequestParameters
|
9
|
+
|
10
|
+
# @!attribute query
|
11
|
+
# Query string to search brands
|
12
|
+
#
|
13
|
+
# @return [String]
|
14
|
+
required :query, String
|
15
|
+
|
16
|
+
# @!method initialize(query:, request_options: {})
|
17
|
+
# @param query [String] Query string to search brands
|
18
|
+
#
|
19
|
+
# @param request_options [BrandDev::RequestOptions, Hash{Symbol=>Object}]
|
20
|
+
end
|
21
|
+
end
|
22
|
+
end
|
@@ -0,0 +1,35 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module BrandDev
|
4
|
+
module Models
|
5
|
+
class BrandSearchResponseItem < BrandDev::Internal::Type::BaseModel
|
6
|
+
# @!attribute domain
|
7
|
+
# Domain name of the brand
|
8
|
+
#
|
9
|
+
# @return [String, nil]
|
10
|
+
optional :domain, String
|
11
|
+
|
12
|
+
# @!attribute logo
|
13
|
+
# URL of the brand's logo
|
14
|
+
#
|
15
|
+
# @return [String, nil]
|
16
|
+
optional :logo, String
|
17
|
+
|
18
|
+
# @!attribute title
|
19
|
+
# Title or name of the brand
|
20
|
+
#
|
21
|
+
# @return [String, nil]
|
22
|
+
optional :title, String
|
23
|
+
|
24
|
+
# @!method initialize(domain: nil, logo: nil, title: nil)
|
25
|
+
# @param domain [String] Domain name of the brand
|
26
|
+
#
|
27
|
+
# @param logo [String] URL of the brand's logo
|
28
|
+
#
|
29
|
+
# @param title [String] Title or name of the brand
|
30
|
+
end
|
31
|
+
|
32
|
+
# @type [BrandDev::Internal::Type::Converter]
|
33
|
+
BrandSearchResponse = BrandDev::Internal::Type::ArrayOf[-> { BrandDev::Models::BrandSearchResponseItem }]
|
34
|
+
end
|
35
|
+
end
|
@@ -0,0 +1,51 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module BrandDev
|
4
|
+
[BrandDev::Internal::Type::BaseModel, *BrandDev::Internal::Type::BaseModel.subclasses].each do |cls|
|
5
|
+
cls.define_sorbet_constant!(:OrHash) { T.type_alias { T.any(cls, BrandDev::Internal::AnyHash) } }
|
6
|
+
end
|
7
|
+
|
8
|
+
BrandDev::Internal::Util.walk_namespaces(BrandDev::Models).each do |mod|
|
9
|
+
case mod
|
10
|
+
in BrandDev::Internal::Type::Enum | BrandDev::Internal::Type::Union
|
11
|
+
mod.constants.each do |name|
|
12
|
+
case mod.const_get(name)
|
13
|
+
in true | false
|
14
|
+
mod.define_sorbet_constant!(:TaggedBoolean) { T.type_alias { T.all(T::Boolean, mod) } }
|
15
|
+
mod.define_sorbet_constant!(:OrBoolean) { T.type_alias { T::Boolean } }
|
16
|
+
in Integer
|
17
|
+
mod.define_sorbet_constant!(:TaggedInteger) { T.type_alias { T.all(Integer, mod) } }
|
18
|
+
mod.define_sorbet_constant!(:OrInteger) { T.type_alias { Integer } }
|
19
|
+
in Float
|
20
|
+
mod.define_sorbet_constant!(:TaggedFloat) { T.type_alias { T.all(Float, mod) } }
|
21
|
+
mod.define_sorbet_constant!(:OrFloat) { T.type_alias { Float } }
|
22
|
+
in Symbol
|
23
|
+
mod.define_sorbet_constant!(:TaggedSymbol) { T.type_alias { T.all(Symbol, mod) } }
|
24
|
+
mod.define_sorbet_constant!(:OrSymbol) { T.type_alias { T.any(Symbol, String) } }
|
25
|
+
else
|
26
|
+
end
|
27
|
+
end
|
28
|
+
else
|
29
|
+
end
|
30
|
+
end
|
31
|
+
|
32
|
+
BrandDev::Internal::Util.walk_namespaces(BrandDev::Models)
|
33
|
+
.lazy
|
34
|
+
.grep(BrandDev::Internal::Type::Union)
|
35
|
+
.each do |mod|
|
36
|
+
const = :Variants
|
37
|
+
next if mod.sorbet_constant_defined?(const)
|
38
|
+
|
39
|
+
mod.define_sorbet_constant!(const) { T.type_alias { mod.to_sorbet_type } }
|
40
|
+
end
|
41
|
+
|
42
|
+
BrandIdentifyFromTransactionParams = BrandDev::Models::BrandIdentifyFromTransactionParams
|
43
|
+
|
44
|
+
BrandRetrieveByTickerParams = BrandDev::Models::BrandRetrieveByTickerParams
|
45
|
+
|
46
|
+
BrandRetrieveNaicsParams = BrandDev::Models::BrandRetrieveNaicsParams
|
47
|
+
|
48
|
+
BrandRetrieveParams = BrandDev::Models::BrandRetrieveParams
|
49
|
+
|
50
|
+
BrandSearchParams = BrandDev::Models::BrandSearchParams
|
51
|
+
end
|
@@ -0,0 +1,77 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module BrandDev
|
4
|
+
# Specify HTTP behaviour to use for a specific request. These options supplement
|
5
|
+
# or override those provided at the client level.
|
6
|
+
#
|
7
|
+
# When making a request, you can pass an actual {RequestOptions} instance, or
|
8
|
+
# simply pass a Hash with symbol keys matching the attributes on this class.
|
9
|
+
class RequestOptions < BrandDev::Internal::Type::BaseModel
|
10
|
+
# @api private
|
11
|
+
#
|
12
|
+
# @param opts [BrandDev::RequestOptions, Hash{Symbol=>Object}]
|
13
|
+
#
|
14
|
+
# @raise [ArgumentError]
|
15
|
+
def self.validate!(opts)
|
16
|
+
case opts
|
17
|
+
in BrandDev::RequestOptions | Hash
|
18
|
+
opts.to_h.each_key do |k|
|
19
|
+
unless fields.include?(k)
|
20
|
+
raise ArgumentError.new("Request `opts` keys must be one of #{fields.keys}, got #{k.inspect}")
|
21
|
+
end
|
22
|
+
end
|
23
|
+
else
|
24
|
+
raise ArgumentError.new("Request `opts` must be a Hash or RequestOptions, got #{opts.inspect}")
|
25
|
+
end
|
26
|
+
end
|
27
|
+
|
28
|
+
# @!attribute idempotency_key
|
29
|
+
# Idempotency key to send with request and all associated retries. Will only be
|
30
|
+
# sent for write requests.
|
31
|
+
#
|
32
|
+
# @return [String, nil]
|
33
|
+
optional :idempotency_key, String
|
34
|
+
|
35
|
+
# @!attribute extra_query
|
36
|
+
# Extra query params to send with the request. These are `.merge`’d into any
|
37
|
+
# `query` given at the client level.
|
38
|
+
#
|
39
|
+
# @return [Hash{String=>Array<String>, String, nil}, nil]
|
40
|
+
optional :extra_query, BrandDev::Internal::Type::HashOf[BrandDev::Internal::Type::ArrayOf[String]]
|
41
|
+
|
42
|
+
# @!attribute extra_headers
|
43
|
+
# Extra headers to send with the request. These are `.merged`’d into any
|
44
|
+
# `extra_headers` given at the client level.
|
45
|
+
#
|
46
|
+
# @return [Hash{String=>String, nil}, nil]
|
47
|
+
optional :extra_headers, BrandDev::Internal::Type::HashOf[String, nil?: true]
|
48
|
+
|
49
|
+
# @!attribute extra_body
|
50
|
+
# Extra data to send with the request. These are deep merged into any data
|
51
|
+
# generated as part of the normal request.
|
52
|
+
#
|
53
|
+
# @return [Object, nil]
|
54
|
+
optional :extra_body, BrandDev::Internal::Type::HashOf[BrandDev::Internal::Type::Unknown]
|
55
|
+
|
56
|
+
# @!attribute max_retries
|
57
|
+
# Maximum number of retries to attempt after a failed initial request.
|
58
|
+
#
|
59
|
+
# @return [Integer, nil]
|
60
|
+
optional :max_retries, Integer
|
61
|
+
|
62
|
+
# @!attribute timeout
|
63
|
+
# Request timeout in seconds.
|
64
|
+
#
|
65
|
+
# @return [Float, nil]
|
66
|
+
optional :timeout, Float
|
67
|
+
|
68
|
+
# @!method initialize(values = {})
|
69
|
+
# Returns a new instance of RequestOptions.
|
70
|
+
#
|
71
|
+
# @param values [Hash{Symbol=>Object}]
|
72
|
+
|
73
|
+
define_sorbet_constant!(:OrHash) do
|
74
|
+
T.type_alias { T.any(BrandDev::RequestOptions, BrandDev::Internal::AnyHash) }
|
75
|
+
end
|
76
|
+
end
|
77
|
+
end
|