Module: ContextDev::Models::AIExtractProductsParams::Body
- Extended by:
- Internal::Type::Union
- Defined in:
- lib/context_dev/models/ai_extract_products_params.rb
Defined Under Namespace
Classes: ByDirectURL, ByDomain
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(domain:, max_age_ms: nil, max_products: nil, timeout_ms: nil) ⇒ Object
Some parameter documentations has been truncated, see ByDomain for more details.
Methods included from Internal::Type::Union
==, ===, coerce, dump, hash, inspect, to_sorbet_type, variants
Methods included from Internal::Util::SorbetRuntimeSupport
#const_missing, #define_sorbet_constant!, #sorbet_constant_defined?, #to_sorbet_type, to_sorbet_type
Methods included from Internal::Type::Converter
#coerce, coerce, #dump, dump, #inspect, inspect, meta_info, new_coerce_state, type_info
Class Method Details
.variants ⇒ Array(ContextDev::Models::AIExtractProductsParams::Body::ByDomain, ContextDev::Models::AIExtractProductsParams::Body::ByDirectURL)
|
|
# File 'lib/context_dev/models/ai_extract_products_params.rb', line 110
|
Instance Method Details
#initialize(domain:, max_age_ms: nil, max_products: nil, timeout_ms: nil) ⇒ Object
Some parameter documentations has been truncated, see ByDomain for more details.
19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 |
# File 'lib/context_dev/models/ai_extract_products_params.rb', line 19 module Body extend ContextDev::Internal::Type::Union variant -> { ContextDev::AIExtractProductsParams::Body::ByDomain } variant -> { ContextDev::AIExtractProductsParams::Body::ByDirectURL } class ByDomain < ContextDev::Internal::Type::BaseModel # @!attribute domain # The domain name to analyze. # # @return [String] required :domain, String # @!attribute max_age_ms # Return a cached result if a prior scrape for the same parameters exists and is # younger than this many milliseconds. Defaults to 7 days (604800000 ms) when # omitted. Max is 30 days (2592000000 ms). Set to 0 to always scrape fresh. # # @return [Integer, nil] optional :max_age_ms, Integer, api_name: :maxAgeMs # @!attribute max_products # Maximum number of products to extract. # # @return [Integer, nil] optional :max_products, Integer, api_name: :maxProducts # @!attribute timeout_ms # Optional timeout in milliseconds for the request. Maximum allowed value is # 300000ms (5 minutes). # # @return [Integer, nil] optional :timeout_ms, Integer, api_name: :timeoutMS # @!method initialize(domain:, max_age_ms: nil, max_products: nil, timeout_ms: nil) # Some parameter documentations has been truncated, see # {ContextDev::Models::AIExtractProductsParams::Body::ByDomain} for more details. # # @param domain [String] The domain name to analyze. # # @param max_age_ms [Integer] Return a cached result if a prior scrape for the same parameters exists and is y # # @param max_products [Integer] Maximum number of products to extract. # # @param timeout_ms [Integer] Optional timeout in milliseconds for the request. Maximum allowed value is 30000 end class ByDirectURL < ContextDev::Internal::Type::BaseModel # @!attribute direct_url # A specific URL to use directly as the starting point for extraction without # domain resolution. # # @return [String] required :direct_url, String, api_name: :directUrl # @!attribute max_age_ms # Return a cached result if a prior scrape for the same parameters exists and is # younger than this many milliseconds. Defaults to 7 days (604800000 ms) when # omitted. Max is 30 days (2592000000 ms). Set to 0 to always scrape fresh. # # @return [Integer, nil] optional :max_age_ms, Integer, api_name: :maxAgeMs # @!attribute max_products # Maximum number of products to extract. # # @return [Integer, nil] optional :max_products, Integer, api_name: :maxProducts # @!attribute timeout_ms # Optional timeout in milliseconds for the request. Maximum allowed value is # 300000ms (5 minutes). # # @return [Integer, nil] optional :timeout_ms, Integer, api_name: :timeoutMS # @!method initialize(direct_url:, max_age_ms: nil, max_products: nil, timeout_ms: nil) # Some parameter documentations has been truncated, see # {ContextDev::Models::AIExtractProductsParams::Body::ByDirectURL} for more # details. # # @param direct_url [String] A specific URL to use directly as the starting point for extraction without doma # # @param max_age_ms [Integer] Return a cached result if a prior scrape for the same parameters exists and is y # # @param max_products [Integer] Maximum number of products to extract. # # @param timeout_ms [Integer] Optional timeout in milliseconds for the request. Maximum allowed value is 30000 end # @!method self.variants # @return [Array(ContextDev::Models::AIExtractProductsParams::Body::ByDomain, ContextDev::Models::AIExtractProductsParams::Body::ByDirectURL)] end |