Class: Dodopayments::Models::Products::LocalizedPrice
- Inherits:
-
Internal::Type::BaseModel
- Object
- Internal::Type::BaseModel
- Dodopayments::Models::Products::LocalizedPrice
- Defined in:
- lib/dodopayments/models/products/localized_price.rb
Overview
Instance Attribute Summary collapse
-
#amount ⇒ Integer
Amount in the smallest currency unit (e.g., cents).
-
#country_code ⇒ Symbol, ...
Country the rule applies to.
-
#created_at ⇒ Time
Timestamp when the localized price was created.
-
#currency ⇒ Symbol, Dodopayments::Models::Currency
Currency to charge in.
-
#id ⇒ String
Unique identifier for the localized price.
-
#mode ⇒ Symbol, Dodopayments::Models::Products::PricingMode
Pricing mode of the rule: by_currency or by_country.
-
#product_id ⇒ String
Product this localized price belongs to.
-
#updated_at ⇒ Time
Timestamp when the localized price was last updated.
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:, amount:, created_at:, currency:, mode:, product_id:, updated_at:, country_code: nil) ⇒ Object
|
|
# File 'lib/dodopayments/models/products/localized_price.rb', line 56
|
Instance Attribute Details
#amount ⇒ Integer
Amount in the smallest currency unit (e.g., cents).
18 |
# File 'lib/dodopayments/models/products/localized_price.rb', line 18 required :amount, Integer |
#country_code ⇒ Symbol, ...
Country the rule applies to. Only set when mode is by_country.
54 |
# File 'lib/dodopayments/models/products/localized_price.rb', line 54 optional :country_code, enum: -> { Dodopayments::CountryCode }, nil?: true |
#created_at ⇒ Time
Timestamp when the localized price was created.
24 |
# File 'lib/dodopayments/models/products/localized_price.rb', line 24 required :created_at, Time |
#currency ⇒ Symbol, Dodopayments::Models::Currency
Currency to charge in.
30 |
# File 'lib/dodopayments/models/products/localized_price.rb', line 30 required :currency, enum: -> { Dodopayments::Currency } |
#id ⇒ String
Unique identifier for the localized price.
12 |
# File 'lib/dodopayments/models/products/localized_price.rb', line 12 required :id, String |
#mode ⇒ Symbol, Dodopayments::Models::Products::PricingMode
Pricing mode of the rule: by_currency or by_country.
36 |
# File 'lib/dodopayments/models/products/localized_price.rb', line 36 required :mode, enum: -> { Dodopayments::Products::PricingMode } |
#product_id ⇒ String
Product this localized price belongs to.
42 |
# File 'lib/dodopayments/models/products/localized_price.rb', line 42 required :product_id, String |
#updated_at ⇒ Time
Timestamp when the localized price was last updated.
48 |
# File 'lib/dodopayments/models/products/localized_price.rb', line 48 required :updated_at, Time |