Class: MetronomeSDK::Models::V1::ContractCreateParams::Subscription

Inherits:
Internal::Type::BaseModel show all
Defined in:
lib/metronome_sdk/models/v1/contract_create_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::V1::ContractCreateParams::Subscription for more details.

Parameters:



# File 'lib/metronome_sdk/models/v1/contract_create_params.rb', line 3101


Instance Attribute Details

#collection_scheduleSymbol, MetronomeSDK::Models::V1::ContractCreateParams::Subscription::CollectionSchedule



3029
3030
# File 'lib/metronome_sdk/models/v1/contract_create_params.rb', line 3029

required :collection_schedule,
enum: -> { MetronomeSDK::V1::ContractCreateParams::Subscription::CollectionSchedule }

#custom_fieldsHash{Symbol=>String}?

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

Returns:

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


3046
# File 'lib/metronome_sdk/models/v1/contract_create_params.rb', line 3046

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

#descriptionString?

Returns:

  • (String, nil)


3051
# File 'lib/metronome_sdk/models/v1/contract_create_params.rb', line 3051

optional :description, String

#ending_beforeTime?

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

Returns:

  • (Time, nil)


3058
# File 'lib/metronome_sdk/models/v1/contract_create_params.rb', line 3058

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)


3065
# File 'lib/metronome_sdk/models/v1/contract_create_params.rb', line 3065

optional :initial_quantity, Float

#nameString?

Returns:

  • (String, nil)


3070
# File 'lib/metronome_sdk/models/v1/contract_create_params.rb', line 3070

optional :name, String

#prorationMetronomeSDK::Models::V1::ContractCreateParams::Subscription::Proration



3035
# File 'lib/metronome_sdk/models/v1/contract_create_params.rb', line 3035

required :proration, -> { MetronomeSDK::V1::ContractCreateParams::Subscription::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.



3084
3085
# File 'lib/metronome_sdk/models/v1/contract_create_params.rb', line 3084

optional :quantity_management_mode,
enum: -> { MetronomeSDK::V1::ContractCreateParams::Subscription::QuantityManagementMode }

#starting_atTime?

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

Returns:

  • (Time, nil)


3092
# File 'lib/metronome_sdk/models/v1/contract_create_params.rb', line 3092

optional :starting_at, Time

#subscription_rateMetronomeSDK::Models::V1::ContractCreateParams::Subscription::SubscriptionRate



3040
# File 'lib/metronome_sdk/models/v1/contract_create_params.rb', line 3040

required :subscription_rate, -> { MetronomeSDK::V1::ContractCreateParams::Subscription::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)


3099
# File 'lib/metronome_sdk/models/v1/contract_create_params.rb', line 3099

optional :temporary_id, String

Class Method Details

.valuesArray<Symbol>

Returns:

  • (Array<Symbol>)


# File 'lib/metronome_sdk/models/v1/contract_create_params.rb', line 3134