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?
Percentage rate (basis points) of the applicable percentage code; null for flat codes (their deduction is
og_price - discounted_price). -
#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 359
|
Instance Attribute Details
#addons ⇒ Array<Dodopayments::Models::CheckoutSessionPreviewResponse::ProductCart::Addon>?
257 258 259 |
# File 'lib/dodopayments/models/checkout_session_preview_response.rb', line 257 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
180 181 |
# File 'lib/dodopayments/models/checkout_session_preview_response.rb', line 180 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
187 |
# File 'lib/dodopayments/models/checkout_session_preview_response.rb', line 187 required :currency, enum: -> { Dodopayments::Currency } |
#description ⇒ String?
264 |
# File 'lib/dodopayments/models/checkout_session_preview_response.rb', line 264 optional :description, String, nil?: true |
#discount_amount ⇒ Integer?
Percentage rate (basis points) of the applicable percentage code; null for flat
codes (their deduction is og_price - discounted_price).
271 |
# File 'lib/dodopayments/models/checkout_session_preview_response.rb', line 271 optional :discount_amount, Integer, nil?: true |
#discount_cycle ⇒ Integer?
number of cycles the discount will apply
277 |
# File 'lib/dodopayments/models/checkout_session_preview_response.rb', line 277 optional :discount_cycle, Integer, nil?: true |
#discounted_price ⇒ Integer
discounted price
193 |
# File 'lib/dodopayments/models/checkout_session_preview_response.rb', line 193 required :discounted_price, Integer |
#is_subscription ⇒ Boolean
Whether this is a subscription product (affects tax calculation in breakup)
199 |
# File 'lib/dodopayments/models/checkout_session_preview_response.rb', line 199 required :is_subscription, Dodopayments::Internal::Type::Boolean |
#is_usage_based ⇒ Boolean
204 |
# File 'lib/dodopayments/models/checkout_session_preview_response.rb', line 204 required :is_usage_based, Dodopayments::Internal::Type::Boolean |
#meters ⇒ Array<Dodopayments::Models::CheckoutSessionPreviewResponse::ProductCart::Meter>
209 210 |
# File 'lib/dodopayments/models/checkout_session_preview_response.rb', line 209 required :meters, -> { Dodopayments::Internal::Type::ArrayOf[Dodopayments::Models::CheckoutSessionPreviewResponse::ProductCart::Meter] } |
#name ⇒ String?
name of the product
283 |
# File 'lib/dodopayments/models/checkout_session_preview_response.rb', line 283 optional :name, String, nil?: true |
#og_currency ⇒ Symbol, Dodopayments::Models::Currency
the product currency
216 |
# File 'lib/dodopayments/models/checkout_session_preview_response.rb', line 216 required :og_currency, enum: -> { Dodopayments::Currency } |
#og_price ⇒ Integer
original price of the product
222 |
# File 'lib/dodopayments/models/checkout_session_preview_response.rb', line 222 required :og_price, Integer |
#product_id ⇒ String
unique id of the product
228 |
# File 'lib/dodopayments/models/checkout_session_preview_response.rb', line 228 required :product_id, String |
#quantity ⇒ Integer
Quanitity
234 |
# File 'lib/dodopayments/models/checkout_session_preview_response.rb', line 234 required :quantity, Integer |
#tax ⇒ Integer?
total tax
289 |
# File 'lib/dodopayments/models/checkout_session_preview_response.rb', line 289 optional :tax, Integer, nil?: true |
#tax_category ⇒ Symbol, Dodopayments::Models::TaxCategory
tax category
240 |
# File 'lib/dodopayments/models/checkout_session_preview_response.rb', line 240 required :tax_category, enum: -> { Dodopayments::TaxCategory } |
#tax_inclusive ⇒ Boolean
Whether tax is included in the price
246 |
# File 'lib/dodopayments/models/checkout_session_preview_response.rb', line 246 required :tax_inclusive, Dodopayments::Internal::Type::Boolean |
#tax_rate ⇒ Integer
tax rate
252 |
# File 'lib/dodopayments/models/checkout_session_preview_response.rb', line 252 required :tax_rate, Integer |
Instance Method Details
#to_hash ⇒ {
200 |
# File 'sig/dodopayments/models/checkout_session_preview_response.rbs', line 200
def to_hash: -> {
|