Class: Dodopayments::Models::CheckoutSessionPreviewResponse

Inherits:
Internal::Type::BaseModel show all
Defined in:
lib/dodopayments/models/checkout_session_preview_response.rb

Overview

Defined Under Namespace

Classes: CurrentBreakup, ProductCart, RecurringBreakup

Instance Attribute Summary collapse

Instance Method Summary collapse

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(addon_id:, currency:, discounted_price:, name:, og_currency:, og_price:, quantity:, tax_category:, tax_inclusive:, tax_rate:, description: nil, discount_amount: nil, tax: nil) ⇒ Object

Some parameter documentations has been truncated, see Dodopayments::Models::CheckoutSessionPreviewResponse::ProductCart::Addon for more details.

Parameters:

  • addon_id (String)
  • currency (Symbol, Dodopayments::Models::Currency)
  • discounted_price (Integer)
  • name (String)
  • og_currency (Symbol, Dodopayments::Models::Currency)
  • og_price (Integer)
  • quantity (Integer)
  • tax_category (Symbol, Dodopayments::Models::TaxCategory)

    Represents the different categories of taxation applicable to various products a

  • tax_inclusive (Boolean)
  • tax_rate (Integer)
  • description (String, nil) (defaults to: nil)
  • discount_amount (Integer, nil) (defaults to: nil)
  • tax (Integer, nil) (defaults to: nil)


# File 'lib/dodopayments/models/checkout_session_preview_response.rb', line 58

Instance Attribute Details

#billing_countrySymbol, Dodopayments::Models::CountryCode

Billing country



11
# File 'lib/dodopayments/models/checkout_session_preview_response.rb', line 11

required :billing_country, enum: -> { Dodopayments::CountryCode }

#currencySymbol, Dodopayments::Models::Currency

Currency in which the calculations were made

Returns:



17
# File 'lib/dodopayments/models/checkout_session_preview_response.rb', line 17

required :currency, enum: -> { Dodopayments::Currency }

#current_breakupDodopayments::Models::CheckoutSessionPreviewResponse::CurrentBreakup

Breakup of the current payment



23
# File 'lib/dodopayments/models/checkout_session_preview_response.rb', line 23

required :current_breakup, -> { Dodopayments::Models::CheckoutSessionPreviewResponse::CurrentBreakup }

#product_cartArray<Dodopayments::Models::CheckoutSessionPreviewResponse::ProductCart>

The total product cart



29
30
# File 'lib/dodopayments/models/checkout_session_preview_response.rb', line 29

required :product_cart,
-> { Dodopayments::Internal::Type::ArrayOf[Dodopayments::Models::CheckoutSessionPreviewResponse::ProductCart] }

#recurring_breakupDodopayments::Models::CheckoutSessionPreviewResponse::RecurringBreakup?

Breakup of recurring payments (None for one-time only)



42
43
44
# File 'lib/dodopayments/models/checkout_session_preview_response.rb', line 42

optional :recurring_breakup,
-> { Dodopayments::Models::CheckoutSessionPreviewResponse::RecurringBreakup },
nil?: true

#tax_id_err_msgString?

Error message if tax ID validation failed

Returns:

  • (String, nil)


50
# File 'lib/dodopayments/models/checkout_session_preview_response.rb', line 50

optional :tax_id_err_msg, String, nil?: true

#total_priceInteger

Total calculate price of the product cart

Returns:

  • (Integer)


36
# File 'lib/dodopayments/models/checkout_session_preview_response.rb', line 36

required :total_price, Integer

#total_taxInteger?

Total tax

Returns:

  • (Integer, nil)


56
# File 'lib/dodopayments/models/checkout_session_preview_response.rb', line 56

optional :total_tax, Integer, nil?: true