|
| 1 | +# frozen_string_literal: true |
| 2 | + |
| 3 | +module ContextDev |
| 4 | + module Models |
| 5 | + # @see ContextDev::Resources::Brand#search |
| 6 | + class BrandSearchResponse < ContextDev::Internal::Type::BaseModel |
| 7 | + # @!attribute results |
| 8 | + # Up to 10 matching brands, most popular first. Empty when nothing matches. |
| 9 | + # |
| 10 | + # @return [Array<ContextDev::Models::BrandSearchResponse::Result>] |
| 11 | + required :results, |
| 12 | + -> { ContextDev::Internal::Type::ArrayOf[ContextDev::Models::BrandSearchResponse::Result] } |
| 13 | + |
| 14 | + # @!attribute key_metadata |
| 15 | + # Metadata about the API key used for the request. Included in every response |
| 16 | + # whenever a valid API key is provided, even when the response status is not 200. |
| 17 | + # |
| 18 | + # @return [ContextDev::Models::BrandSearchResponse::KeyMetadata, nil] |
| 19 | + optional :key_metadata, -> { ContextDev::Models::BrandSearchResponse::KeyMetadata } |
| 20 | + |
| 21 | + # @!method initialize(results:, key_metadata: nil) |
| 22 | + # Some parameter documentations has been truncated, see |
| 23 | + # {ContextDev::Models::BrandSearchResponse} for more details. |
| 24 | + # |
| 25 | + # @param results [Array<ContextDev::Models::BrandSearchResponse::Result>] Up to 10 matching brands, most popular first. Empty when nothing matches. |
| 26 | + # |
| 27 | + # @param key_metadata [ContextDev::Models::BrandSearchResponse::KeyMetadata] Metadata about the API key used for the request. Included in every response when |
| 28 | + |
| 29 | + class Result < ContextDev::Internal::Type::BaseModel |
| 30 | + # @!attribute domain |
| 31 | + # The brand's domain. |
| 32 | + # |
| 33 | + # @return [String] |
| 34 | + required :domain, String |
| 35 | + |
| 36 | + # @!attribute logo |
| 37 | + # Logo link URL that serves the brand's logo, generated per request for the |
| 38 | + # calling organization. |
| 39 | + # |
| 40 | + # @return [String] |
| 41 | + required :logo, String |
| 42 | + |
| 43 | + # @!attribute name |
| 44 | + # The brand's name. Empty string when unknown. |
| 45 | + # |
| 46 | + # @return [String] |
| 47 | + required :name, String |
| 48 | + |
| 49 | + # @!method initialize(domain:, logo:, name:) |
| 50 | + # Some parameter documentations has been truncated, see |
| 51 | + # {ContextDev::Models::BrandSearchResponse::Result} for more details. |
| 52 | + # |
| 53 | + # @param domain [String] The brand's domain. |
| 54 | + # |
| 55 | + # @param logo [String] Logo link URL that serves the brand's logo, generated per request for the callin |
| 56 | + # |
| 57 | + # @param name [String] The brand's name. Empty string when unknown. |
| 58 | + end |
| 59 | + |
| 60 | + # @see ContextDev::Models::BrandSearchResponse#key_metadata |
| 61 | + class KeyMetadata < ContextDev::Internal::Type::BaseModel |
| 62 | + # @!attribute credits_consumed |
| 63 | + # The number of credits consumed by this request. |
| 64 | + # |
| 65 | + # @return [Integer] |
| 66 | + required :credits_consumed, Integer |
| 67 | + |
| 68 | + # @!attribute credits_remaining |
| 69 | + # The number of credits remaining for your organization after this request. |
| 70 | + # |
| 71 | + # @return [Integer] |
| 72 | + required :credits_remaining, Integer |
| 73 | + |
| 74 | + # @!method initialize(credits_consumed:, credits_remaining:) |
| 75 | + # Metadata about the API key used for the request. Included in every response |
| 76 | + # whenever a valid API key is provided, even when the response status is not 200. |
| 77 | + # |
| 78 | + # @param credits_consumed [Integer] The number of credits consumed by this request. |
| 79 | + # |
| 80 | + # @param credits_remaining [Integer] The number of credits remaining for your organization after this request. |
| 81 | + end |
| 82 | + end |
| 83 | + end |
| 84 | +end |
0 commit comments