Class: Orb::Models::SubscriptionCreateParams::AddAdjustment
- Inherits:
-
Internal::Type::BaseModel
- Object
- Internal::Type::BaseModel
- Orb::Models::SubscriptionCreateParams::AddAdjustment
- Defined in:
- lib/orb/models/subscription_create_params.rb
Defined Under Namespace
Modules: Adjustment
Instance Attribute Summary collapse
-
#adjustment ⇒ Orb::Models::NewPercentageDiscount, ...
The definition of a new adjustment to create and add to the subscription.
-
#end_date ⇒ Time?
The end date of the adjustment interval.
-
#plan_phase_order ⇒ Integer?
The phase to add this adjustment to.
-
#start_date ⇒ Time?
The start date of the adjustment interval.
Instance Method Summary collapse
-
#initialize(adjustment: , end_date: nil, plan_phase_order: nil, start_date: nil) ⇒ Object
constructor
Some parameter documentations has been truncated, see AddAdjustment for more details.
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(adjustment: , end_date: nil, plan_phase_order: nil, start_date: nil) ⇒ Object
Some parameter documentations has been truncated, see Orb::Models::SubscriptionCreateParams::AddAdjustment for more details.
323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 |
# File 'lib/orb/models/subscription_create_params.rb', line 323 class AddAdjustment < Orb::Internal::Type::BaseModel # @!attribute adjustment # The definition of a new adjustment to create and add to the subscription. # # @return [Orb::Models::NewPercentageDiscount, Orb::Models::NewUsageDiscount, Orb::Models::NewAmountDiscount, Orb::Models::NewMinimum, Orb::Models::NewMaximum] required :adjustment, union: -> { Orb::SubscriptionCreateParams::AddAdjustment::Adjustment } # @!attribute end_date # The end date of the adjustment interval. This is the date that the adjustment # will stop affecting prices on the subscription. # # @return [Time, nil] optional :end_date, Time, nil?: true # @!attribute plan_phase_order # The phase to add this adjustment to. # # @return [Integer, nil] optional :plan_phase_order, Integer, nil?: true # @!attribute start_date # The start date of the adjustment interval. This is the date that the adjustment # will start affecting prices on the subscription. If null, the adjustment will # start when the phase or subscription starts. # # @return [Time, nil] optional :start_date, Time, nil?: true # @!method initialize(adjustment:, end_date: nil, plan_phase_order: nil, start_date: nil) # Some parameter documentations has been truncated, see # {Orb::Models::SubscriptionCreateParams::AddAdjustment} for more details. # # @param adjustment [Orb::Models::NewPercentageDiscount, Orb::Models::NewUsageDiscount, Orb::Models::NewAmountDiscount, Orb::Models::NewMinimum, Orb::Models::NewMaximum] The definition of a new adjustment to create and add to the subscription. # # @param end_date [Time, nil] The end date of the adjustment interval. This is the date that the adjustment wi # # @param plan_phase_order [Integer, nil] The phase to add this adjustment to. # # @param start_date [Time, nil] The start date of the adjustment interval. This is the date that the adjustment # The definition of a new adjustment to create and add to the subscription. # # @see Orb::Models::SubscriptionCreateParams::AddAdjustment#adjustment module Adjustment extend Orb::Internal::Type::Union discriminator :adjustment_type variant :percentage_discount, -> { Orb::NewPercentageDiscount } variant :usage_discount, -> { Orb::NewUsageDiscount } variant :amount_discount, -> { Orb::NewAmountDiscount } variant :minimum, -> { Orb::NewMinimum } variant :maximum, -> { Orb::NewMaximum } # @!method self.variants # @return [Array(Orb::Models::NewPercentageDiscount, Orb::Models::NewUsageDiscount, Orb::Models::NewAmountDiscount, Orb::Models::NewMinimum, Orb::Models::NewMaximum)] end end |
Instance Attribute Details
#adjustment ⇒ Orb::Models::NewPercentageDiscount, ...
The definition of a new adjustment to create and add to the subscription.
328 |
# File 'lib/orb/models/subscription_create_params.rb', line 328 required :adjustment, union: -> { Orb::SubscriptionCreateParams::AddAdjustment::Adjustment } |
#end_date ⇒ Time?
The end date of the adjustment interval. This is the date that the adjustment will stop affecting prices on the subscription.
335 |
# File 'lib/orb/models/subscription_create_params.rb', line 335 optional :end_date, Time, nil?: true |
#plan_phase_order ⇒ Integer?
The phase to add this adjustment to.
341 |
# File 'lib/orb/models/subscription_create_params.rb', line 341 optional :plan_phase_order, Integer, nil?: true |
#start_date ⇒ Time?
The start date of the adjustment interval. This is the date that the adjustment will start affecting prices on the subscription. If null, the adjustment will start when the phase or subscription starts.
349 |
# File 'lib/orb/models/subscription_create_params.rb', line 349 optional :start_date, Time, nil?: true |