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 368
|
Instance Attribute Details
#addons ⇒ Array<Dodopayments::Models::CheckoutSessionPreviewResponse::ProductCart::Addon>?
266 267 268 |
# File 'lib/dodopayments/models/checkout_session_preview_response.rb', line 266 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
189 190 |
# File 'lib/dodopayments/models/checkout_session_preview_response.rb', line 189 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
196 |
# File 'lib/dodopayments/models/checkout_session_preview_response.rb', line 196 required :currency, enum: -> { Dodopayments::Currency } |
#description ⇒ String?
273 |
# File 'lib/dodopayments/models/checkout_session_preview_response.rb', line 273 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).
280 |
# File 'lib/dodopayments/models/checkout_session_preview_response.rb', line 280 optional :discount_amount, Integer, nil?: true |
#discount_cycle ⇒ Integer?
number of cycles the discount will apply
286 |
# File 'lib/dodopayments/models/checkout_session_preview_response.rb', line 286 optional :discount_cycle, Integer, nil?: true |
#discounted_price ⇒ Integer
discounted price
202 |
# File 'lib/dodopayments/models/checkout_session_preview_response.rb', line 202 required :discounted_price, Integer |
#is_subscription ⇒ Boolean
Whether this is a subscription product (affects tax calculation in breakup)
208 |
# File 'lib/dodopayments/models/checkout_session_preview_response.rb', line 208 required :is_subscription, Dodopayments::Internal::Type::Boolean |
#is_usage_based ⇒ Boolean
213 |
# File 'lib/dodopayments/models/checkout_session_preview_response.rb', line 213 required :is_usage_based, Dodopayments::Internal::Type::Boolean |
#meters ⇒ Array<Dodopayments::Models::CheckoutSessionPreviewResponse::ProductCart::Meter>
218 219 |
# File 'lib/dodopayments/models/checkout_session_preview_response.rb', line 218 required :meters, -> { Dodopayments::Internal::Type::ArrayOf[Dodopayments::Models::CheckoutSessionPreviewResponse::ProductCart::Meter] } |
#name ⇒ String?
name of the product
292 |
# File 'lib/dodopayments/models/checkout_session_preview_response.rb', line 292 optional :name, String, nil?: true |
#og_currency ⇒ Symbol, Dodopayments::Models::Currency
the product currency
225 |
# File 'lib/dodopayments/models/checkout_session_preview_response.rb', line 225 required :og_currency, enum: -> { Dodopayments::Currency } |
#og_price ⇒ Integer
original price of the product
231 |
# File 'lib/dodopayments/models/checkout_session_preview_response.rb', line 231 required :og_price, Integer |
#product_id ⇒ String
unique id of the product
237 |
# File 'lib/dodopayments/models/checkout_session_preview_response.rb', line 237 required :product_id, String |
#quantity ⇒ Integer
Quanitity
243 |
# File 'lib/dodopayments/models/checkout_session_preview_response.rb', line 243 required :quantity, Integer |
#tax ⇒ Integer?
total tax
298 |
# File 'lib/dodopayments/models/checkout_session_preview_response.rb', line 298 optional :tax, Integer, nil?: true |
#tax_category ⇒ Symbol, Dodopayments::Models::TaxCategory
tax category
249 |
# File 'lib/dodopayments/models/checkout_session_preview_response.rb', line 249 required :tax_category, enum: -> { Dodopayments::TaxCategory } |
#tax_inclusive ⇒ Boolean
Whether tax is included in the price
255 |
# File 'lib/dodopayments/models/checkout_session_preview_response.rb', line 255 required :tax_inclusive, Dodopayments::Internal::Type::Boolean |
#tax_rate ⇒ Integer
tax rate
261 |
# File 'lib/dodopayments/models/checkout_session_preview_response.rb', line 261 required :tax_rate, Integer |
Instance Method Details
#to_hash ⇒ {
205 |
# File 'sig/dodopayments/models/checkout_session_preview_response.rbs', line 205
def to_hash: -> {
|