Class: TerminalShop::Models::ProductAPI

Inherits:
Internal::Type::BaseModel show all
Defined in:
lib/terminal_shop/models/product.rb

Defined Under Namespace

Modules: Subscription Classes: Tags

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(id: , description: , name: , variants: , order: nil, subscription: nil, tags: nil, time_hidden: nil) ⇒ Object

Some parameter documentations has been truncated, see TerminalShop::Models::ProductAPI for more details.

Product sold in the Terminal shop.

Parameters:

  • id (String) (defaults to: )

    Unique object identifier.

  • description (String) (defaults to: )

    Description of the product.

  • name (String) (defaults to: )

    Name of the product.

  • variants (Array<TerminalShop::Models::ProductVariant>) (defaults to: )

    List of variants of the product.

  • order (Integer) (defaults to: nil)

    Order of the product used when displaying a sorted list of products.

  • subscription (Symbol, TerminalShop::Models::ProductAPI::Subscription) (defaults to: nil)

    Whether the product must be or can be subscribed to.

  • tags (TerminalShop::Models::ProductAPI::Tags) (defaults to: nil)

    Tags for the product.

  • time_hidden (String) (defaults to: nil)

    Timestamp when the product was hidden from public view.



# File 'lib/terminal_shop/models/product.rb', line 54

Instance Attribute Details

#descriptionString

Description of the product.

Returns:

  • (String)


16
# File 'lib/terminal_shop/models/product.rb', line 16

required :description, String

#idString

Unique object identifier. The format and length of IDs may change over time.

Returns:

  • (String)


10
# File 'lib/terminal_shop/models/product.rb', line 10

required :id, String

#nameString

Name of the product.

Returns:

  • (String)


22
# File 'lib/terminal_shop/models/product.rb', line 22

required :name, String

#orderInteger?

Order of the product used when displaying a sorted list of products.

Returns:

  • (Integer, nil)


34
# File 'lib/terminal_shop/models/product.rb', line 34

optional :order, Integer

#subscriptionSymbol, ...

Whether the product must be or can be subscribed to.



40
# File 'lib/terminal_shop/models/product.rb', line 40

optional :subscription, enum: -> { TerminalShop::ProductAPI::Subscription }

#tagsTerminalShop::Models::ProductAPI::Tags?

Tags for the product.



46
# File 'lib/terminal_shop/models/product.rb', line 46

optional :tags, -> { TerminalShop::ProductAPI::Tags }

#time_hiddenString?

Timestamp when the product was hidden from public view.

Returns:

  • (String, nil)


52
# File 'lib/terminal_shop/models/product.rb', line 52

optional :time_hidden, String, api_name: :timeHidden

#variantsArray<TerminalShop::Models::ProductVariant>

List of variants of the product.



28
# File 'lib/terminal_shop/models/product.rb', line 28

required :variants, -> { TerminalShop::Internal::Type::ArrayOf[TerminalShop::ProductVariant] }

Class Method Details

.valuesArray<Symbol>

Returns:

  • (Array<Symbol>)


# File 'lib/terminal_shop/models/product.rb', line 85