Class: MetronomeSDK::Models::V2::ContractEditParams::AddSubscription

Inherits:
Internal::Type::BaseModel show all
Defined in:
lib/metronome_sdk/models/v2/contract_edit_params.rb

Defined Under Namespace

Modules: CollectionSchedule, QuantityManagementMode Classes: Proration, SubscriptionRate

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(collection_schedule: , proration: , subscription_rate: , custom_fields: nil, description: nil, ending_before: nil, initial_quantity: nil, name: nil, quantity_management_mode: nil, starting_at: nil, temporary_id: nil) ⇒ Object

Some parameter documentations has been truncated, see MetronomeSDK::Models::V2::ContractEditParams::AddSubscription for more details.

Parameters:



# File 'lib/metronome_sdk/models/v2/contract_edit_params.rb', line 2979


Instance Attribute Details

#collection_scheduleSymbol, MetronomeSDK::Models::V2::ContractEditParams::AddSubscription::CollectionSchedule



2906
2907
# File 'lib/metronome_sdk/models/v2/contract_edit_params.rb', line 2906

required :collection_schedule,
enum: -> { MetronomeSDK::V2::ContractEditParams::AddSubscription::CollectionSchedule }

#custom_fieldsHash{Symbol=>String}?

Custom fields to be added eg. { “key1”: “value1”, “key2”: “value2” }

Returns:

  • (Hash{Symbol=>String}, nil)


2924
# File 'lib/metronome_sdk/models/v2/contract_edit_params.rb', line 2924

optional :custom_fields, MetronomeSDK::Internal::Type::HashOf[String]

#descriptionString?

Returns:

  • (String, nil)


2929
# File 'lib/metronome_sdk/models/v2/contract_edit_params.rb', line 2929

optional :description, String

#ending_beforeTime?

Exclusive end time for the subscription. If not provided, subscription inherits contract end date.

Returns:

  • (Time, nil)


2936
# File 'lib/metronome_sdk/models/v2/contract_edit_params.rb', line 2936

optional :ending_before, Time

#initial_quantityFloat?

The initial quantity for the subscription. It must be non-negative value. Required if quantity_management_mode is QUANTITY_ONLY.

Returns:

  • (Float, nil)


2943
# File 'lib/metronome_sdk/models/v2/contract_edit_params.rb', line 2943

optional :initial_quantity, Float

#nameString?

Returns:

  • (String, nil)


2948
# File 'lib/metronome_sdk/models/v2/contract_edit_params.rb', line 2948

optional :name, String

#prorationMetronomeSDK::Models::V2::ContractEditParams::AddSubscription::Proration



2912
# File 'lib/metronome_sdk/models/v2/contract_edit_params.rb', line 2912

required :proration, -> { MetronomeSDK::V2::ContractEditParams::AddSubscription::Proration }

#quantity_management_modeSymbol, ...

Determines how the subscription’s quantity is controlled. Defaults to QUANTITY_ONLY. QUANTITY_ONLY: The subscription quantity is specified directly on the subscription. ‘initial_quantity` must be provided with this option. Compatible with recurring commits/credits that use POOLED allocation. SEAT_BASED: (BETA) Use when you want to pass specific seat identifiers (e.g. add user_123) to increment and decrement a subscription quantity, rather than directly providing the quantity. You must use a SEAT_BASED subscription to use a linked recurring credit with an allocation per seat. `seat_config` must be provided with this option.



2962
2963
# File 'lib/metronome_sdk/models/v2/contract_edit_params.rb', line 2962

optional :quantity_management_mode,
enum: -> { MetronomeSDK::V2::ContractEditParams::AddSubscription::QuantityManagementMode }

#starting_atTime?

Inclusive start time for the subscription. If not provided, defaults to contract start date

Returns:

  • (Time, nil)


2970
# File 'lib/metronome_sdk/models/v2/contract_edit_params.rb', line 2970

optional :starting_at, Time

#subscription_rateMetronomeSDK::Models::V2::ContractEditParams::AddSubscription::SubscriptionRate



2917
2918
# File 'lib/metronome_sdk/models/v2/contract_edit_params.rb', line 2917

required :subscription_rate,
-> { MetronomeSDK::V2::ContractEditParams::AddSubscription::SubscriptionRate }

#temporary_idString?

A temporary ID used to reference the subscription in recurring commit/credit subscription configs created within the same payload.

Returns:

  • (String, nil)


2977
# File 'lib/metronome_sdk/models/v2/contract_edit_params.rb', line 2977

optional :temporary_id, String

Class Method Details

.valuesArray<Symbol>

Returns:

  • (Array<Symbol>)


# File 'lib/metronome_sdk/models/v2/contract_edit_params.rb', line 3013