Class: Dodopayments::Models::CheckoutSessionPreviewResponse::ProductCart::Addon
- Inherits:
-
Internal::Type::BaseModel
show all
- Defined in:
- lib/dodopayments/models/checkout_session_preview_response.rb,
sig/dodopayments/models/checkout_session_preview_response.rbs
Instance Attribute Summary collapse
Instance Method Summary
collapse
==, #==, #[], 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
#coerce, coerce, #dump, dump, inspect, #inspect, meta_info, new_coerce_state, type_info
#const_missing, #define_sorbet_constant!, #sorbet_constant_defined?, #to_sorbet_type, to_sorbet_type
Constructor Details
#initialize ⇒ Object
343
|
# File 'sig/dodopayments/models/checkout_session_preview_response.rbs', line 343
def initialize: (
|
Instance Attribute Details
#addon_id ⇒ String
419
|
# File 'lib/dodopayments/models/checkout_session_preview_response.rb', line 419
required :addon_id, String
|
424
|
# File 'lib/dodopayments/models/checkout_session_preview_response.rb', line 424
required :currency, enum: -> { Dodopayments::Currency }
|
#description ⇒ String?
480
|
# File 'lib/dodopayments/models/checkout_session_preview_response.rb', line 480
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).
487
|
# File 'lib/dodopayments/models/checkout_session_preview_response.rb', line 487
optional :discount_amount, Integer, nil?: true
|
#discounted_price ⇒ Integer
429
|
# File 'lib/dodopayments/models/checkout_session_preview_response.rb', line 429
required :discounted_price, Integer
|
#name ⇒ String
434
|
# File 'lib/dodopayments/models/checkout_session_preview_response.rb', line 434
required :name, String
|
439
|
# File 'lib/dodopayments/models/checkout_session_preview_response.rb', line 439
required :og_currency, enum: -> { Dodopayments::Currency }
|
#og_price ⇒ Integer
444
|
# File 'lib/dodopayments/models/checkout_session_preview_response.rb', line 444
required :og_price, Integer
|
#quantity ⇒ Integer
449
|
# File 'lib/dodopayments/models/checkout_session_preview_response.rb', line 449
required :quantity, Integer
|
#single_quantity_price ⇒ Integer
Per-unit price in currency, converted and adaptive-priced but pre-tax and
pre-discount (both depend on quantity and the rest of the cart). Set even when
quantity is 0, so the checkout page can price the addon before the buyer has
selected any.
458
|
# File 'lib/dodopayments/models/checkout_session_preview_response.rb', line 458
required :single_quantity_price, Integer
|
#tax ⇒ Integer?
492
|
# File 'lib/dodopayments/models/checkout_session_preview_response.rb', line 492
optional :tax, Integer, nil?: true
|
Represents the different categories of taxation applicable to various products
and services.
465
|
# File 'lib/dodopayments/models/checkout_session_preview_response.rb', line 465
required :tax_category, enum: -> { Dodopayments::TaxCategory }
|
#tax_inclusive ⇒ Boolean
470
|
# File 'lib/dodopayments/models/checkout_session_preview_response.rb', line 470
required :tax_inclusive, Dodopayments::Internal::Type::Boolean
|
#tax_rate ⇒ Integer
475
|
# File 'lib/dodopayments/models/checkout_session_preview_response.rb', line 475
required :tax_rate, Integer
|
Instance Method Details
#to_hash ⇒ {
360
|
# File 'sig/dodopayments/models/checkout_session_preview_response.rbs', line 360
def to_hash: -> {
|