Class: ContextDev::Models::AIExtractProductResponse

Inherits:
Internal::Type::BaseModel show all
Defined in:
lib/context_dev/models/ai_extract_product_response.rb

Overview

Defined Under Namespace

Modules: Platform Classes: KeyMetadata, Product

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Internal::Type::BaseModel

==, #==, #[], coerce, #deconstruct_keys, #deep_to_h, dump, fields, hash, #hash, inherited, inspect, #inspect, known_fields, optional, recursively_to_h, required, #to_h, #to_json, #to_s, to_sorbet_type, #to_yaml

Methods included from Internal::Type::Converter

#coerce, coerce, #dump, dump, #inspect, inspect, meta_info, new_coerce_state, type_info

Methods included from Internal::Util::SorbetRuntimeSupport

#const_missing, #define_sorbet_constant!, #sorbet_constant_defined?, #to_sorbet_type, to_sorbet_type

Constructor Details

#initialize(credits_consumed:, credits_remaining:) ⇒ Object

Metadata about the API key used for the request. Included in every response whenever a valid API key is provided, even when the response status is not 200.

Parameters:

  • credits_consumed (Integer)

    The number of credits consumed by this request.

  • credits_remaining (Integer)

    The number of credits remaining for your organization after this request.



# File 'lib/context_dev/models/ai_extract_product_response.rb', line 32

Instance Attribute Details

#is_product_pageBoolean?

Whether the given URL is a product detail page

Returns:

  • (Boolean, nil)


11
# File 'lib/context_dev/models/ai_extract_product_response.rb', line 11

optional :is_product_page, ContextDev::Internal::Type::Boolean

#key_metadataContextDev::Models::AIExtractProductResponse::KeyMetadata?

Metadata about the API key used for the request. Included in every response whenever a valid API key is provided, even when the response status is not 200.



18
# File 'lib/context_dev/models/ai_extract_product_response.rb', line 18

optional :key_metadata, -> { ContextDev::Models::AIExtractProductResponse::KeyMetadata }

#platformSymbol, ...

The detected ecommerce platform, or null if not a product page



24
# File 'lib/context_dev/models/ai_extract_product_response.rb', line 24

optional :platform, enum: -> { ContextDev::Models::AIExtractProductResponse::Platform }, nil?: true

#productContextDev::Models::AIExtractProductResponse::Product?

The extracted product data, or null if not a product page



30
# File 'lib/context_dev/models/ai_extract_product_response.rb', line 30

optional :product, -> { ContextDev::Models::AIExtractProductResponse::Product }, nil?: true

Class Method Details

.valuesArray<Symbol>

Returns:

  • (Array<Symbol>)


# File 'lib/context_dev/models/ai_extract_product_response.rb', line 78