Class: Dodopayments::Models::SubscriptionPreviewChangePlanResponse::ImmediateCharge

Inherits:
Internal::Type::BaseModel show all
Defined in:
lib/dodopayments/models/subscription_preview_change_plan_response.rb,
sig/dodopayments/models/subscription_preview_change_plan_response.rbs

Overview

See Also:

  • Dodopayments::Models::SubscriptionPreviewChangePlanResponse#immediate_charge

Defined Under Namespace

Modules: LineItem Classes: Summary

Instance Attribute Summary collapse

Class Method 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(id:, chargeable_units:, currency:, free_threshold:, name:, price_per_unit:, subtotal:, tax_inclusive:, tax_rate:, units_consumed:, description: nil, tax: nil, type: :meter) ⇒ Object

Parameters:

  • id (String)
  • chargeable_units (String)
  • currency (Symbol, Dodopayments::Models::Currency)
  • free_threshold (Integer)
  • name (String)
  • price_per_unit (String)
  • subtotal (Integer)
  • tax_inclusive (Boolean)
  • tax_rate (Float)
  • units_consumed (String)
  • description (String, nil) (defaults to: nil)
  • tax (Integer, nil) (defaults to: nil)
  • type (Symbol, :meter) (defaults to: :meter)


# File 'lib/dodopayments/models/subscription_preview_change_plan_response.rb', line 300

Instance Attribute Details

#effective_atTime

When the plan change will be effective

Parameters:

  • value (Time)

Returns:

  • (Time)


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

required :effective_at, Time

#line_itemsArray<Dodopayments::Models::SubscriptionPreviewChangePlanResponse::ImmediateCharge::LineItem::Subscription, Dodopayments::Models::SubscriptionPreviewChangePlanResponse::ImmediateCharge::LineItem::Addon, Dodopayments::Models::SubscriptionPreviewChangePlanResponse::ImmediateCharge::LineItem::Meter>



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

required :line_items,
-> { Dodopayments::Internal::Type::ArrayOf[union: Dodopayments::Models::SubscriptionPreviewChangePlanResponse::ImmediateCharge::LineItem] }

#summaryDodopayments::Models::SubscriptionPreviewChangePlanResponse::ImmediateCharge::Summary



41
42
# File 'lib/dodopayments/models/subscription_preview_change_plan_response.rb', line 41

required :summary,
-> { Dodopayments::Models::SubscriptionPreviewChangePlanResponse::ImmediateCharge::Summary }

Instance Method Details

#to_hash{

Returns:

  • ({)


44
# File 'sig/dodopayments/models/subscription_preview_change_plan_response.rbs', line 44

def to_hash: -> {