Class: Dodopayments::Models::ProductListResponse
- Inherits:
-
Internal::Type::BaseModel
- Object
- Internal::Type::BaseModel
- Dodopayments::Models::ProductListResponse
- Defined in:
- lib/dodopayments/models/product_list_response.rb,
sig/dodopayments/models/product_list_response.rbs
Overview
Instance Attribute Summary collapse
-
#business_id ⇒ String
Unique identifier for the business to which the product belongs.
-
#created_at ⇒ Time
Timestamp when the product was created.
-
#currency ⇒ Symbol, ...
Currency of the price.
-
#description ⇒ String?
Description of the product, optional.
-
#entitlements ⇒ Array<Dodopayments::Models::ProductEntitlementSummary>
Entitlements linked to this product.
-
#image ⇒ String?
URL of the product image, optional.
-
#is_recurring ⇒ Boolean
Indicates if the product is recurring (e.g., subscriptions).
-
#metadata ⇒ Hash{Symbol=>String, Float, Boolean}
Additional custom data associated with the product.
-
#name ⇒ String?
Name of the product, optional.
-
#price ⇒ Integer?
Price of the product, optional.
-
#price_detail ⇒ Dodopayments::Models::Price::OneTimePrice, ...
Details of the price.
-
#pricing_mode ⇒ Symbol, ...
Pricing mode for localized pricing.
-
#product_id ⇒ String
Unique identifier for the product.
-
#tax_category ⇒ Symbol, Dodopayments::Models::TaxCategory
Tax category associated with the product.
-
#tax_inclusive ⇒ Boolean?
Indicates if the price is tax inclusive.
-
#updated_at ⇒ Time
Timestamp when the product was last updated.
Instance Method Summary collapse
-
#initialize(business_id:, created_at:, entitlements:, is_recurring:, metadata:, product_id:, tax_category:, updated_at:, currency: nil, description: nil, image: nil, name: nil, price: nil, price_detail: nil, pricing_mode: nil, tax_inclusive: nil) ⇒ Object
constructor
Some parameter documentations has been truncated, see ProductListResponse for more details.
- #to_hash ⇒ {
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:, entitlements:, is_recurring:, metadata:, product_id:, tax_category:, updated_at:, currency: nil, description: nil, image: nil, name: nil, price: nil, price_detail: nil, pricing_mode: nil, tax_inclusive: nil) ⇒ Object
Some parameter documentations has been truncated, see Dodopayments::Models::ProductListResponse for more details.
|
|
# File 'lib/dodopayments/models/product_list_response.rb', line 114
|
Instance Attribute Details
#business_id ⇒ String
Unique identifier for the business to which the product belongs.
11 |
# File 'lib/dodopayments/models/product_list_response.rb', line 11 required :business_id, String |
#created_at ⇒ Time
Timestamp when the product was created.
17 |
# File 'lib/dodopayments/models/product_list_response.rb', line 17 required :created_at, Time |
#currency ⇒ Symbol, ...
Currency of the price
60 |
# File 'lib/dodopayments/models/product_list_response.rb', line 60 optional :currency, enum: -> { Dodopayments::Currency }, nil?: true |
#description ⇒ String?
Description of the product, optional.
66 |
# File 'lib/dodopayments/models/product_list_response.rb', line 66 optional :description, String, nil?: true |
#entitlements ⇒ Array<Dodopayments::Models::ProductEntitlementSummary>
Entitlements linked to this product
23 24 |
# File 'lib/dodopayments/models/product_list_response.rb', line 23 required :entitlements, -> { Dodopayments::Internal::Type::ArrayOf[Dodopayments::ProductEntitlementSummary] } |
#image ⇒ String?
URL of the product image, optional.
72 |
# File 'lib/dodopayments/models/product_list_response.rb', line 72 optional :image, String, nil?: true |
#is_recurring ⇒ Boolean
Indicates if the product is recurring (e.g., subscriptions).
30 |
# File 'lib/dodopayments/models/product_list_response.rb', line 30 required :is_recurring, Dodopayments::Internal::Type::Boolean |
#metadata ⇒ Hash{Symbol=>String, Float, Boolean}
Additional custom data associated with the product
36 |
# File 'lib/dodopayments/models/product_list_response.rb', line 36 required :metadata, -> { Dodopayments::Internal::Type::HashOf[union: Dodopayments::MetadataItem] } |
#name ⇒ String?
Name of the product, optional.
78 |
# File 'lib/dodopayments/models/product_list_response.rb', line 78 optional :name, String, nil?: true |
#price ⇒ Integer?
Price of the product, optional.
The price is represented in the lowest denomination of the currency. For example:
- In USD, a price of
$12.34would be represented as1234(cents). - In JPY, a price of
¥1500would be represented as1500(yen). - In INR, a price of
₹1234.56would be represented as123456(paise).
This ensures precision and avoids floating-point rounding errors.
93 |
# File 'lib/dodopayments/models/product_list_response.rb', line 93 optional :price, Integer, nil?: true |
#price_detail ⇒ Dodopayments::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 |
#pricing_mode ⇒ Symbol, ...
Pricing mode for localized pricing. NULL means base-only (no localized rules apply).
106 |
# File 'lib/dodopayments/models/product_list_response.rb', line 106 optional :pricing_mode, enum: -> { Dodopayments::Products::PricingMode }, nil?: true |
#product_id ⇒ String
Unique identifier for the product.
42 |
# File 'lib/dodopayments/models/product_list_response.rb', line 42 required :product_id, String |
#tax_category ⇒ Symbol, 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_inclusive ⇒ Boolean?
Indicates if the price is tax inclusive
112 |
# File 'lib/dodopayments/models/product_list_response.rb', line 112 optional :tax_inclusive, Dodopayments::Internal::Type::Boolean, nil?: true |
#updated_at ⇒ Time
Timestamp when the product was last updated.
54 |
# File 'lib/dodopayments/models/product_list_response.rb', line 54 required :updated_at, Time |
Instance Method Details
#to_hash ⇒ {
75 |
# File 'sig/dodopayments/models/product_list_response.rbs', line 75
def to_hash: -> {
|