Class: Orb::Models::PlanCreateParams::Price

Inherits:
Internal::Type::BaseModel show all
Defined in:
lib/orb/models/plan_create_params.rb

Defined Under Namespace

Modules: Price

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(allocation_price: nil, plan_phase_order: nil, price: nil) ⇒ Object



107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
# File 'lib/orb/models/plan_create_params.rb', line 107

class Price < Orb::Internal::Type::BaseModel
  # @!attribute allocation_price
  #   The allocation price to add to the plan.
  #
  #   @return [Orb::Models::NewAllocationPrice, nil]
  optional :allocation_price, -> { Orb::NewAllocationPrice }, nil?: true

  # @!attribute plan_phase_order
  #   The phase to add this price to.
  #
  #   @return [Integer, nil]
  optional :plan_phase_order, Integer, nil?: true

  # @!attribute price
  #   The price to add to the plan
  #
  #   @return [Orb::Models::NewPlanUnitPrice, Orb::Models::NewPlanPackagePrice, Orb::Models::NewPlanMatrixPrice, Orb::Models::NewPlanTieredPrice, Orb::Models::NewPlanTieredBPSPrice, Orb::Models::NewPlanBPSPrice, Orb::Models::NewPlanBulkBPSPrice, Orb::Models::NewPlanBulkPrice, Orb::Models::NewPlanThresholdTotalAmountPrice, Orb::Models::NewPlanTieredPackagePrice, Orb::Models::NewPlanTieredWithMinimumPrice, Orb::Models::NewPlanUnitWithPercentPrice, Orb::Models::NewPlanPackageWithAllocationPrice, Orb::Models::NewPlanTierWithProrationPrice, Orb::Models::NewPlanUnitWithProrationPrice, Orb::Models::NewPlanGroupedAllocationPrice, Orb::Models::NewPlanGroupedWithProratedMinimumPrice, Orb::Models::NewPlanGroupedWithMeteredMinimumPrice, Orb::Models::NewPlanMatrixWithDisplayNamePrice, Orb::Models::NewPlanBulkWithProrationPrice, Orb::Models::NewPlanGroupedTieredPackagePrice, Orb::Models::NewPlanMaxGroupTieredPackagePrice, Orb::Models::NewPlanScalableMatrixWithUnitPricingPrice, Orb::Models::NewPlanScalableMatrixWithTieredPricingPrice, Orb::Models::NewPlanCumulativeGroupedBulkPrice, Orb::Models::NewPlanTieredPackageWithMinimumPrice, Orb::Models::NewPlanMatrixWithAllocationPrice, Orb::Models::NewPlanGroupedTieredPrice, nil]
  optional :price, union: -> { Orb::PlanCreateParams::Price::Price }, nil?: true

  # @!method initialize(allocation_price: nil, plan_phase_order: nil, price: nil)
  #   @param allocation_price [Orb::Models::NewAllocationPrice, nil] The allocation price to add to the plan.
  #
  #   @param plan_phase_order [Integer, nil] The phase to add this price to.
  #
  #   @param price [Orb::Models::NewPlanUnitPrice, Orb::Models::NewPlanPackagePrice, Orb::Models::NewPlanMatrixPrice, Orb::Models::NewPlanTieredPrice, Orb::Models::NewPlanTieredBPSPrice, Orb::Models::NewPlanBPSPrice, Orb::Models::NewPlanBulkBPSPrice, Orb::Models::NewPlanBulkPrice, Orb::Models::NewPlanThresholdTotalAmountPrice, Orb::Models::NewPlanTieredPackagePrice, Orb::Models::NewPlanTieredWithMinimumPrice, Orb::Models::NewPlanUnitWithPercentPrice, Orb::Models::NewPlanPackageWithAllocationPrice, Orb::Models::NewPlanTierWithProrationPrice, Orb::Models::NewPlanUnitWithProrationPrice, Orb::Models::NewPlanGroupedAllocationPrice, Orb::Models::NewPlanGroupedWithProratedMinimumPrice, Orb::Models::NewPlanGroupedWithMeteredMinimumPrice, Orb::Models::NewPlanMatrixWithDisplayNamePrice, Orb::Models::NewPlanBulkWithProrationPrice, Orb::Models::NewPlanGroupedTieredPackagePrice, Orb::Models::NewPlanMaxGroupTieredPackagePrice, Orb::Models::NewPlanScalableMatrixWithUnitPricingPrice, Orb::Models::NewPlanScalableMatrixWithTieredPricingPrice, Orb::Models::NewPlanCumulativeGroupedBulkPrice, Orb::Models::NewPlanTieredPackageWithMinimumPrice, Orb::Models::NewPlanMatrixWithAllocationPrice, Orb::Models::NewPlanGroupedTieredPrice, nil] The price to add to the plan

  # The price to add to the plan
  #
  # @see Orb::Models::PlanCreateParams::Price#price
  module Price
    extend Orb::Internal::Type::Union

    discriminator :model_type

    variant :unit, -> { Orb::NewPlanUnitPrice }

    variant :package, -> { Orb::NewPlanPackagePrice }

    variant :matrix, -> { Orb::NewPlanMatrixPrice }

    variant :tiered, -> { Orb::NewPlanTieredPrice }

    variant :tiered_bps, -> { Orb::NewPlanTieredBPSPrice }

    variant :bps, -> { Orb::NewPlanBPSPrice }

    variant :bulk_bps, -> { Orb::NewPlanBulkBPSPrice }

    variant :bulk, -> { Orb::NewPlanBulkPrice }

    variant :threshold_total_amount, -> { Orb::NewPlanThresholdTotalAmountPrice }

    variant :tiered_package, -> { Orb::NewPlanTieredPackagePrice }

    variant :tiered_with_minimum, -> { Orb::NewPlanTieredWithMinimumPrice }

    variant :unit_with_percent, -> { Orb::NewPlanUnitWithPercentPrice }

    variant :package_with_allocation, -> { Orb::NewPlanPackageWithAllocationPrice }

    variant :tiered_with_proration, -> { Orb::NewPlanTierWithProrationPrice }

    variant :unit_with_proration, -> { Orb::NewPlanUnitWithProrationPrice }

    variant :grouped_allocation, -> { Orb::NewPlanGroupedAllocationPrice }

    variant :grouped_with_prorated_minimum, -> { Orb::NewPlanGroupedWithProratedMinimumPrice }

    variant :grouped_with_metered_minimum, -> { Orb::NewPlanGroupedWithMeteredMinimumPrice }

    variant :matrix_with_display_name, -> { Orb::NewPlanMatrixWithDisplayNamePrice }

    variant :bulk_with_proration, -> { Orb::NewPlanBulkWithProrationPrice }

    variant :grouped_tiered_package, -> { Orb::NewPlanGroupedTieredPackagePrice }

    variant :max_group_tiered_package, -> { Orb::NewPlanMaxGroupTieredPackagePrice }

    variant :scalable_matrix_with_unit_pricing, -> { Orb::NewPlanScalableMatrixWithUnitPricingPrice }

    variant :scalable_matrix_with_tiered_pricing, -> { Orb::NewPlanScalableMatrixWithTieredPricingPrice }

    variant :cumulative_grouped_bulk, -> { Orb::NewPlanCumulativeGroupedBulkPrice }

    variant :tiered_package_with_minimum, -> { Orb::NewPlanTieredPackageWithMinimumPrice }

    variant :matrix_with_allocation, -> { Orb::NewPlanMatrixWithAllocationPrice }

    variant :grouped_tiered, -> { Orb::NewPlanGroupedTieredPrice }

    # @!method self.variants
    #   @return [Array(Orb::Models::NewPlanUnitPrice, Orb::Models::NewPlanPackagePrice, Orb::Models::NewPlanMatrixPrice, Orb::Models::NewPlanTieredPrice, Orb::Models::NewPlanTieredBPSPrice, Orb::Models::NewPlanBPSPrice, Orb::Models::NewPlanBulkBPSPrice, Orb::Models::NewPlanBulkPrice, Orb::Models::NewPlanThresholdTotalAmountPrice, Orb::Models::NewPlanTieredPackagePrice, Orb::Models::NewPlanTieredWithMinimumPrice, Orb::Models::NewPlanUnitWithPercentPrice, Orb::Models::NewPlanPackageWithAllocationPrice, Orb::Models::NewPlanTierWithProrationPrice, Orb::Models::NewPlanUnitWithProrationPrice, Orb::Models::NewPlanGroupedAllocationPrice, Orb::Models::NewPlanGroupedWithProratedMinimumPrice, Orb::Models::NewPlanGroupedWithMeteredMinimumPrice, Orb::Models::NewPlanMatrixWithDisplayNamePrice, Orb::Models::NewPlanBulkWithProrationPrice, Orb::Models::NewPlanGroupedTieredPackagePrice, Orb::Models::NewPlanMaxGroupTieredPackagePrice, Orb::Models::NewPlanScalableMatrixWithUnitPricingPrice, Orb::Models::NewPlanScalableMatrixWithTieredPricingPrice, Orb::Models::NewPlanCumulativeGroupedBulkPrice, Orb::Models::NewPlanTieredPackageWithMinimumPrice, Orb::Models::NewPlanMatrixWithAllocationPrice, Orb::Models::NewPlanGroupedTieredPrice)]
  end
end

Instance Attribute Details

#allocation_priceOrb::Models::NewAllocationPrice?

The allocation price to add to the plan.



112
# File 'lib/orb/models/plan_create_params.rb', line 112

optional :allocation_price, -> { Orb::NewAllocationPrice }, nil?: true

#plan_phase_orderInteger?

The phase to add this price to.

Returns:

  • (Integer, nil)


118
# File 'lib/orb/models/plan_create_params.rb', line 118

optional :plan_phase_order, Integer, nil?: true

#priceOrb::Models::NewPlanUnitPrice, ...

The price to add to the plan



124
# File 'lib/orb/models/plan_create_params.rb', line 124

optional :price, union: -> { Orb::PlanCreateParams::Price::Price }, nil?: true