Class: Dodopayments::Models::ProductListResponse

Inherits:
Internal::Type::BaseModel show all
Defined in:
lib/dodopayments/models/product_list_response.rb

Overview

Instance Attribute 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(business_id: , created_at: , is_recurring: , metadata: , product_id: , tax_category: , updated_at: , currency: nil, description: nil, image: nil, name: nil, price: nil, price_detail: nil, tax_inclusive: nil) ⇒ Object

Some parameter documentations has been truncated, see Dodopayments::Models::ProductListResponse for more details.

Parameters:

  • business_id (String) (defaults to: )

    Unique identifier for the business to which the product belongs.

  • created_at (Time) (defaults to: )

    Timestamp when the product was created.

  • is_recurring (Boolean) (defaults to: )

    Indicates if the product is recurring (e.g., subscriptions).

  • metadata (Hash{Symbol=>String}) (defaults to: )

    Additional custom data associated with the product

  • product_id (String) (defaults to: )

    Unique identifier for the product.

  • tax_category (Symbol, Dodopayments::Models::TaxCategory) (defaults to: )

    Tax category associated with the product.

  • updated_at (Time) (defaults to: )

    Timestamp when the product was last updated.

  • currency (Symbol, Dodopayments::Models::Currency, nil) (defaults to: nil)

    Currency of the price

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

    Description of the product, optional.

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

    URL of the product image, optional.

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

    Name of the product, optional.

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

    Price of the product, optional.

  • price_detail (Dodopayments::Models::Price::OneTimePrice, Dodopayments::Models::Price::RecurringPrice, Dodopayments::Models::Price::UsageBasedPrice, nil) (defaults to: nil)

    Details of the price

  • tax_inclusive (Boolean, nil) (defaults to: nil)

    Indicates if the price is tax inclusive



# File 'lib/dodopayments/models/product_list_response.rb', line 100

Instance Attribute Details

#business_idString

Unique identifier for the business to which the product belongs.

Returns:

  • (String)


11
# File 'lib/dodopayments/models/product_list_response.rb', line 11

required :business_id, String

#created_atTime

Timestamp when the product was created.

Returns:

  • (Time)


17
# File 'lib/dodopayments/models/product_list_response.rb', line 17

required :created_at, Time

#currencySymbol, ...

Currency of the price

Returns:



53
# File 'lib/dodopayments/models/product_list_response.rb', line 53

optional :currency, enum: -> { Dodopayments::Currency }, nil?: true

#descriptionString?

Description of the product, optional.

Returns:

  • (String, nil)


59
# File 'lib/dodopayments/models/product_list_response.rb', line 59

optional :description, String, nil?: true

#imageString?

URL of the product image, optional.

Returns:

  • (String, nil)


65
# File 'lib/dodopayments/models/product_list_response.rb', line 65

optional :image, String, nil?: true

#is_recurringBoolean

Indicates if the product is recurring (e.g., subscriptions).

Returns:

  • (Boolean)


23
# File 'lib/dodopayments/models/product_list_response.rb', line 23

required :is_recurring, Dodopayments::Internal::Type::Boolean

#metadataHash{Symbol=>String}

Additional custom data associated with the product

Returns:

  • (Hash{Symbol=>String})


29
# File 'lib/dodopayments/models/product_list_response.rb', line 29

required :metadata, Dodopayments::Internal::Type::HashOf[String]

#nameString?

Name of the product, optional.

Returns:

  • (String, nil)


71
# File 'lib/dodopayments/models/product_list_response.rb', line 71

optional :name, String, nil?: true

#priceInteger?

Price of the product, optional.

The price is represented in the lowest denomination of the currency. For example:

  • In USD, a price of ‘$12.34` would be represented as `1234` (cents).

  • In JPY, a price of ‘¥1500` would be represented as `1500` (yen).

  • In INR, a price of ‘₹1234.56` would be represented as `123456` (paise).

This ensures precision and avoids floating-point rounding errors.

Returns:

  • (Integer, nil)


86
# File 'lib/dodopayments/models/product_list_response.rb', line 86

optional :price, Integer, nil?: true

#price_detailDodopayments::Models::Price::OneTimePrice, ...

Details of the price



92
# File 'lib/dodopayments/models/product_list_response.rb', line 92

optional :price_detail, union: -> { Dodopayments::Price }, nil?: true

#product_idString

Unique identifier for the product.

Returns:

  • (String)


35
# File 'lib/dodopayments/models/product_list_response.rb', line 35

required :product_id, String

#tax_categorySymbol, Dodopayments::Models::TaxCategory

Tax category associated with the product.



41
# File 'lib/dodopayments/models/product_list_response.rb', line 41

required :tax_category, enum: -> { Dodopayments::TaxCategory }

#tax_inclusiveBoolean?

Indicates if the price is tax inclusive

Returns:

  • (Boolean, nil)


98
# File 'lib/dodopayments/models/product_list_response.rb', line 98

optional :tax_inclusive, Dodopayments::Internal::Type::Boolean, nil?: true

#updated_atTime

Timestamp when the product was last updated.

Returns:

  • (Time)


47
# File 'lib/dodopayments/models/product_list_response.rb', line 47

required :updated_at, Time