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
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
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 294
|
Instance Attribute Details
#addons ⇒ Array<Dodopayments::Models::CheckoutSessionPreviewResponse::ProductCart::Addon>?
197 198 199 |
# File 'lib/dodopayments/models/checkout_session_preview_response.rb', line 197 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
120 121 |
# File 'lib/dodopayments/models/checkout_session_preview_response.rb', line 120 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
127 |
# File 'lib/dodopayments/models/checkout_session_preview_response.rb', line 127 required :currency, enum: -> { Dodopayments::Currency } |
#description ⇒ String?
204 |
# File 'lib/dodopayments/models/checkout_session_preview_response.rb', line 204 optional :description, String, nil?: true |
#discount_amount ⇒ Integer?
discount percentage
210 |
# File 'lib/dodopayments/models/checkout_session_preview_response.rb', line 210 optional :discount_amount, Integer, nil?: true |
#discount_cycle ⇒ Integer?
number of cycles the discount will apply
216 |
# File 'lib/dodopayments/models/checkout_session_preview_response.rb', line 216 optional :discount_cycle, Integer, nil?: true |
#discounted_price ⇒ Integer
discounted price
133 |
# File 'lib/dodopayments/models/checkout_session_preview_response.rb', line 133 required :discounted_price, Integer |
#is_subscription ⇒ Boolean
Whether this is a subscription product (affects tax calculation in breakup)
139 |
# File 'lib/dodopayments/models/checkout_session_preview_response.rb', line 139 required :is_subscription, Dodopayments::Internal::Type::Boolean |
#is_usage_based ⇒ Boolean
144 |
# File 'lib/dodopayments/models/checkout_session_preview_response.rb', line 144 required :is_usage_based, Dodopayments::Internal::Type::Boolean |
#meters ⇒ Array<Dodopayments::Models::CheckoutSessionPreviewResponse::ProductCart::Meter>
149 150 |
# File 'lib/dodopayments/models/checkout_session_preview_response.rb', line 149 required :meters, -> { Dodopayments::Internal::Type::ArrayOf[Dodopayments::Models::CheckoutSessionPreviewResponse::ProductCart::Meter] } |
#name ⇒ String?
name of the product
222 |
# File 'lib/dodopayments/models/checkout_session_preview_response.rb', line 222 optional :name, String, nil?: true |
#og_currency ⇒ Symbol, Dodopayments::Models::Currency
the product currency
156 |
# File 'lib/dodopayments/models/checkout_session_preview_response.rb', line 156 required :og_currency, enum: -> { Dodopayments::Currency } |
#og_price ⇒ Integer
original price of the product
162 |
# File 'lib/dodopayments/models/checkout_session_preview_response.rb', line 162 required :og_price, Integer |
#product_id ⇒ String
unique id of the product
168 |
# File 'lib/dodopayments/models/checkout_session_preview_response.rb', line 168 required :product_id, String |
#quantity ⇒ Integer
Quanitity
174 |
# File 'lib/dodopayments/models/checkout_session_preview_response.rb', line 174 required :quantity, Integer |
#tax ⇒ Integer?
total tax
228 |
# File 'lib/dodopayments/models/checkout_session_preview_response.rb', line 228 optional :tax, Integer, nil?: true |
#tax_category ⇒ Symbol, Dodopayments::Models::TaxCategory
tax category
180 |
# File 'lib/dodopayments/models/checkout_session_preview_response.rb', line 180 required :tax_category, enum: -> { Dodopayments::TaxCategory } |
#tax_inclusive ⇒ Boolean
Whether tax is included in the price
186 |
# File 'lib/dodopayments/models/checkout_session_preview_response.rb', line 186 required :tax_inclusive, Dodopayments::Internal::Type::Boolean |
#tax_rate ⇒ Integer
tax rate
192 |
# File 'lib/dodopayments/models/checkout_session_preview_response.rb', line 192 required :tax_rate, Integer |