Class: ContextDev::Models::AIExtractProductsResponse::Product

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

Defined Under Namespace

Modules: BillingFrequency, PricingModel

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(description:, features:, images:, name:, tags:, target_audience:, billing_frequency: nil, category: nil, currency: nil, image_url: nil, price: nil, pricing_model: nil, url: nil) ⇒ Object

Parameters:

  • description (String)

    Description of the product

  • features (Array<String>)

    List of product features

  • images (Array<String>)

    URLs to product images on the page (up to 7)

  • name (String)

    Name of the product

  • tags (Array<String>)

    Tags associated with the product

  • target_audience (Array<String>)

    Target audience for the product (array of strings)

  • billing_frequency (Symbol, ContextDev::Models::AIExtractProductsResponse::Product::BillingFrequency, nil) (defaults to: nil)

    Billing frequency for the product

  • category (String, nil) (defaults to: nil)

    Category of the product

  • currency (String, nil) (defaults to: nil)

    Currency code for the price (e.g., USD, EUR)

  • image_url (String, nil) (defaults to: nil)

    URL to the product image

  • price (Float, nil) (defaults to: nil)

    Price of the product

  • pricing_model (Symbol, ContextDev::Models::AIExtractProductsResponse::Product::PricingModel, nil) (defaults to: nil)

    Pricing model for the product

  • url (String, nil) (defaults to: nil)

    URL to the product page



17
18
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
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
# File 'lib/context_dev/models/ai_extract_products_response.rb', line 17

class Product < ContextDev::Internal::Type::BaseModel
  # @!attribute description
  #   Description of the product
  #
  #   @return [String]
  required :description, String

  # @!attribute features
  #   List of product features
  #
  #   @return [Array<String>]
  required :features, ContextDev::Internal::Type::ArrayOf[String]

  # @!attribute images
  #   URLs to product images on the page (up to 7)
  #
  #   @return [Array<String>]
  required :images, ContextDev::Internal::Type::ArrayOf[String]

  # @!attribute name
  #   Name of the product
  #
  #   @return [String]
  required :name, String

  # @!attribute tags
  #   Tags associated with the product
  #
  #   @return [Array<String>]
  required :tags, ContextDev::Internal::Type::ArrayOf[String]

  # @!attribute target_audience
  #   Target audience for the product (array of strings)
  #
  #   @return [Array<String>]
  required :target_audience, ContextDev::Internal::Type::ArrayOf[String]

  # @!attribute billing_frequency
  #   Billing frequency for the product
  #
  #   @return [Symbol, ContextDev::Models::AIExtractProductsResponse::Product::BillingFrequency, nil]
  optional :billing_frequency,
           enum: -> { ContextDev::Models::AIExtractProductsResponse::Product::BillingFrequency },
           nil?: true

  # @!attribute category
  #   Category of the product
  #
  #   @return [String, nil]
  optional :category, String, nil?: true

  # @!attribute currency
  #   Currency code for the price (e.g., USD, EUR)
  #
  #   @return [String, nil]
  optional :currency, String, nil?: true

  # @!attribute image_url
  #   URL to the product image
  #
  #   @return [String, nil]
  optional :image_url, String, nil?: true

  # @!attribute price
  #   Price of the product
  #
  #   @return [Float, nil]
  optional :price, Float, nil?: true

  # @!attribute pricing_model
  #   Pricing model for the product
  #
  #   @return [Symbol, ContextDev::Models::AIExtractProductsResponse::Product::PricingModel, nil]
  optional :pricing_model,
           enum: -> { ContextDev::Models::AIExtractProductsResponse::Product::PricingModel },
           nil?: true

  # @!attribute url
  #   URL to the product page
  #
  #   @return [String, nil]
  optional :url, String, nil?: true

  # @!method initialize(description:, features:, images:, name:, tags:, target_audience:, billing_frequency: nil, category: nil, currency: nil, image_url: nil, price: nil, pricing_model: nil, url: nil)
  #   @param description [String] Description of the product
  #
  #   @param features [Array<String>] List of product features
  #
  #   @param images [Array<String>] URLs to product images on the page (up to 7)
  #
  #   @param name [String] Name of the product
  #
  #   @param tags [Array<String>] Tags associated with the product
  #
  #   @param target_audience [Array<String>] Target audience for the product (array of strings)
  #
  #   @param billing_frequency [Symbol, ContextDev::Models::AIExtractProductsResponse::Product::BillingFrequency, nil] Billing frequency for the product
  #
  #   @param category [String, nil] Category of the product
  #
  #   @param currency [String, nil] Currency code for the price (e.g., USD, EUR)
  #
  #   @param image_url [String, nil] URL to the product image
  #
  #   @param price [Float, nil] Price of the product
  #
  #   @param pricing_model [Symbol, ContextDev::Models::AIExtractProductsResponse::Product::PricingModel, nil] Pricing model for the product
  #
  #   @param url [String, nil] URL to the product page

  # Billing frequency for the product
  #
  # @see ContextDev::Models::AIExtractProductsResponse::Product#billing_frequency
  module BillingFrequency
    extend ContextDev::Internal::Type::Enum

    MONTHLY = :monthly
    YEARLY = :yearly
    ONE_TIME = :one_time
    USAGE_BASED = :usage_based

    # @!method self.values
    #   @return [Array<Symbol>]
  end

  # Pricing model for the product
  #
  # @see ContextDev::Models::AIExtractProductsResponse::Product#pricing_model
  module PricingModel
    extend ContextDev::Internal::Type::Enum

    PER_SEAT = :per_seat
    FLAT = :flat
    TIERED = :tiered
    FREEMIUM = :freemium
    CUSTOM = :custom

    # @!method self.values
    #   @return [Array<Symbol>]
  end
end

Instance Attribute Details

#billing_frequencySymbol, ...

Billing frequency for the product



58
59
60
# File 'lib/context_dev/models/ai_extract_products_response.rb', line 58

optional :billing_frequency,
enum: -> { ContextDev::Models::AIExtractProductsResponse::Product::BillingFrequency },
nil?: true

#categoryString?

Category of the product

Returns:

  • (String, nil)


66
# File 'lib/context_dev/models/ai_extract_products_response.rb', line 66

optional :category, String, nil?: true

#currencyString?

Currency code for the price (e.g., USD, EUR)

Returns:

  • (String, nil)


72
# File 'lib/context_dev/models/ai_extract_products_response.rb', line 72

optional :currency, String, nil?: true

#descriptionString

Description of the product

Returns:

  • (String)


22
# File 'lib/context_dev/models/ai_extract_products_response.rb', line 22

required :description, String

#featuresArray<String>

List of product features

Returns:

  • (Array<String>)


28
# File 'lib/context_dev/models/ai_extract_products_response.rb', line 28

required :features, ContextDev::Internal::Type::ArrayOf[String]

#image_urlString?

URL to the product image

Returns:

  • (String, nil)


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

optional :image_url, String, nil?: true

#imagesArray<String>

URLs to product images on the page (up to 7)

Returns:

  • (Array<String>)


34
# File 'lib/context_dev/models/ai_extract_products_response.rb', line 34

required :images, ContextDev::Internal::Type::ArrayOf[String]

#nameString

Name of the product

Returns:

  • (String)


40
# File 'lib/context_dev/models/ai_extract_products_response.rb', line 40

required :name, String

#priceFloat?

Price of the product

Returns:

  • (Float, nil)


84
# File 'lib/context_dev/models/ai_extract_products_response.rb', line 84

optional :price, Float, nil?: true

#pricing_modelSymbol, ...

Pricing model for the product



90
91
92
# File 'lib/context_dev/models/ai_extract_products_response.rb', line 90

optional :pricing_model,
enum: -> { ContextDev::Models::AIExtractProductsResponse::Product::PricingModel },
nil?: true

#tagsArray<String>

Tags associated with the product

Returns:

  • (Array<String>)


46
# File 'lib/context_dev/models/ai_extract_products_response.rb', line 46

required :tags, ContextDev::Internal::Type::ArrayOf[String]

#target_audienceArray<String>

Target audience for the product (array of strings)

Returns:

  • (Array<String>)


52
# File 'lib/context_dev/models/ai_extract_products_response.rb', line 52

required :target_audience, ContextDev::Internal::Type::ArrayOf[String]

#urlString?

URL to the product page

Returns:

  • (String, nil)


98
# File 'lib/context_dev/models/ai_extract_products_response.rb', line 98

optional :url, String, nil?: true

Class Method Details

.valuesArray<Symbol>

Returns:

  • (Array<Symbol>)


# File 'lib/context_dev/models/ai_extract_products_response.rb', line 138