Class: Dodopayments::Models::ProductListResponse

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

Overview

Defined Under Namespace

Classes: Entitlement

Instance Attribute Summary collapse

Method Summary

Methods inherited from Internal::Type::BaseModel

==, #==, #[], coerce, #deconstruct_keys, #deep_to_h, dump, fields, hash, #hash, inherited, #initialize, 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

This class inherits a constructor from Dodopayments::Internal::Type::BaseModel

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:



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

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

#descriptionString?

Description of the product, optional.

Returns:

  • (String, nil)


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

optional :description, String, nil?: true

#entitlementsArray<Dodopayments::Models::ProductListResponse::Entitlement>

Entitlements linked to this product



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

required :entitlements,
-> { Dodopayments::Internal::Type::ArrayOf[Dodopayments::Models::ProductListResponse::Entitlement] }

#imageString?

URL of the product image, optional.

Returns:

  • (String, nil)


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

optional :image, String, nil?: true

#is_recurringBoolean

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

Returns:

  • (Boolean)


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

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

#metadataHash{Symbol=>String}

Additional custom data associated with the product

Returns:

  • (Hash{Symbol=>String})


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

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

#nameString?

Name of the product, optional.

Returns:

  • (String, nil)


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

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)


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

optional :price, Integer, nil?: true

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

Details of the price



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

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

#product_idString

Unique identifier for the product.

Returns:

  • (String)


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

required :product_id, String

#tax_categorySymbol, Dodopayments::Models::TaxCategory

Tax category associated with the product.



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

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

#tax_inclusiveBoolean?

Indicates if the price is tax inclusive

Returns:

  • (Boolean, nil)


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

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

#updated_atTime

Timestamp when the product was last updated.

Returns:

  • (Time)


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

required :updated_at, Time