Class: Dodopayments::Models::CheckoutSessionPreviewResponse::ProductCart
- Inherits:
-
Internal::Type::BaseModel
- Object
- Internal::Type::BaseModel
- Dodopayments::Models::CheckoutSessionPreviewResponse::ProductCart
- Defined in:
- lib/dodopayments/models/checkout_session_preview_response.rb,
sig/dodopayments/models/checkout_session_preview_response.rbs
Defined Under Namespace
Classes: Addon, CreditEntitlement, Meter
Instance Attribute Summary collapse
- #addons ⇒ Array<Dodopayments::Models::CheckoutSessionPreviewResponse::ProductCart::Addon>?
-
#credit_entitlements ⇒ Array<Dodopayments::Models::CheckoutSessionPreviewResponse::ProductCart::CreditEntitlement>
Credit entitlements that will be granted upon purchase.
-
#currency ⇒ Symbol, Dodopayments::Models::Currency
the currency in which the calculatiosn were made.
- #description ⇒ String?
-
#discount_amount ⇒ Integer?
discount percentage.
-
#discount_cycle ⇒ Integer?
number of cycles the discount will apply.
-
#discounted_price ⇒ Integer
discounted price.
-
#is_subscription ⇒ Boolean
Whether this is a subscription product (affects tax calculation in breakup).
- #is_usage_based ⇒ Boolean
- #meters ⇒ Array<Dodopayments::Models::CheckoutSessionPreviewResponse::ProductCart::Meter>
-
#name ⇒ String?
name of the product.
-
#og_currency ⇒ Symbol, Dodopayments::Models::Currency
the product currency.
-
#og_price ⇒ Integer
original price of the product.
-
#product_id ⇒ String
unique id of the product.
-
#quantity ⇒ Integer
Quanitity.
-
#tax ⇒ Integer?
total tax.
-
#tax_category ⇒ Symbol, Dodopayments::Models::TaxCategory
tax category.
-
#tax_inclusive ⇒ Boolean
Whether tax is included in the price.
-
#tax_rate ⇒ Integer
tax rate.
Instance Method Summary collapse
- #initialize(measurement_unit:, name:, price_per_unit:, description: nil, free_threshold: nil) ⇒ Object constructor
- #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(measurement_unit:, name:, price_per_unit:, description: nil, free_threshold: nil) ⇒ Object
|
|
# File 'lib/dodopayments/models/checkout_session_preview_response.rb', line 335
|
Instance Attribute Details
#addons ⇒ Array<Dodopayments::Models::CheckoutSessionPreviewResponse::ProductCart::Addon>?
238 239 240 |
# File 'lib/dodopayments/models/checkout_session_preview_response.rb', line 238 optional :addons, -> { Dodopayments::Internal::Type::ArrayOf[Dodopayments::Models::CheckoutSessionPreviewResponse::ProductCart::Addon] }, nil?: true |
#credit_entitlements ⇒ Array<Dodopayments::Models::CheckoutSessionPreviewResponse::ProductCart::CreditEntitlement>
Credit entitlements that will be granted upon purchase
161 162 |
# File 'lib/dodopayments/models/checkout_session_preview_response.rb', line 161 required :credit_entitlements, -> { Dodopayments::Internal::Type::ArrayOf[Dodopayments::Models::CheckoutSessionPreviewResponse::ProductCart::CreditEntitlement] } |
#currency ⇒ Symbol, Dodopayments::Models::Currency
the currency in which the calculatiosn were made
168 |
# File 'lib/dodopayments/models/checkout_session_preview_response.rb', line 168 required :currency, enum: -> { Dodopayments::Currency } |
#description ⇒ String?
245 |
# File 'lib/dodopayments/models/checkout_session_preview_response.rb', line 245 optional :description, String, nil?: true |
#discount_amount ⇒ Integer?
discount percentage
251 |
# File 'lib/dodopayments/models/checkout_session_preview_response.rb', line 251 optional :discount_amount, Integer, nil?: true |
#discount_cycle ⇒ Integer?
number of cycles the discount will apply
257 |
# File 'lib/dodopayments/models/checkout_session_preview_response.rb', line 257 optional :discount_cycle, Integer, nil?: true |
#discounted_price ⇒ Integer
discounted price
174 |
# File 'lib/dodopayments/models/checkout_session_preview_response.rb', line 174 required :discounted_price, Integer |
#is_subscription ⇒ Boolean
Whether this is a subscription product (affects tax calculation in breakup)
180 |
# File 'lib/dodopayments/models/checkout_session_preview_response.rb', line 180 required :is_subscription, Dodopayments::Internal::Type::Boolean |
#is_usage_based ⇒ Boolean
185 |
# File 'lib/dodopayments/models/checkout_session_preview_response.rb', line 185 required :is_usage_based, Dodopayments::Internal::Type::Boolean |
#meters ⇒ Array<Dodopayments::Models::CheckoutSessionPreviewResponse::ProductCart::Meter>
190 191 |
# File 'lib/dodopayments/models/checkout_session_preview_response.rb', line 190 required :meters, -> { Dodopayments::Internal::Type::ArrayOf[Dodopayments::Models::CheckoutSessionPreviewResponse::ProductCart::Meter] } |
#name ⇒ String?
name of the product
263 |
# File 'lib/dodopayments/models/checkout_session_preview_response.rb', line 263 optional :name, String, nil?: true |
#og_currency ⇒ Symbol, Dodopayments::Models::Currency
the product currency
197 |
# File 'lib/dodopayments/models/checkout_session_preview_response.rb', line 197 required :og_currency, enum: -> { Dodopayments::Currency } |
#og_price ⇒ Integer
original price of the product
203 |
# File 'lib/dodopayments/models/checkout_session_preview_response.rb', line 203 required :og_price, Integer |
#product_id ⇒ String
unique id of the product
209 |
# File 'lib/dodopayments/models/checkout_session_preview_response.rb', line 209 required :product_id, String |
#quantity ⇒ Integer
Quanitity
215 |
# File 'lib/dodopayments/models/checkout_session_preview_response.rb', line 215 required :quantity, Integer |
#tax ⇒ Integer?
total tax
269 |
# File 'lib/dodopayments/models/checkout_session_preview_response.rb', line 269 optional :tax, Integer, nil?: true |
#tax_category ⇒ Symbol, Dodopayments::Models::TaxCategory
tax category
221 |
# File 'lib/dodopayments/models/checkout_session_preview_response.rb', line 221 required :tax_category, enum: -> { Dodopayments::TaxCategory } |
#tax_inclusive ⇒ Boolean
Whether tax is included in the price
227 |
# File 'lib/dodopayments/models/checkout_session_preview_response.rb', line 227 required :tax_inclusive, Dodopayments::Internal::Type::Boolean |
#tax_rate ⇒ Integer
tax rate
233 |
# File 'lib/dodopayments/models/checkout_session_preview_response.rb', line 233 required :tax_rate, Integer |
Instance Method Details
#to_hash ⇒ {
190 |
# File 'sig/dodopayments/models/checkout_session_preview_response.rbs', line 190
def to_hash: -> {
|