Class: MetronomeSDK::Models::Subscription

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

Defined Under Namespace

Modules: CollectionSchedule, QuantityManagementMode Classes: BillingPeriods, Proration, QuantitySchedule, 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(quantity: , starting_at: , ending_before: nil) ⇒ Object

Parameters:

  • quantity (Float) (defaults to: )
  • starting_at (Time) (defaults to: )
  • ending_before (Time) (defaults to: nil)


# File 'lib/metronome_sdk/models/subscription.rb', line 85


Instance Attribute Details

#billing_periodsMetronomeSDK::Models::Subscription::BillingPeriods

Previous, current, and next billing periods for the subscription.



10
# File 'lib/metronome_sdk/models/subscription.rb', line 10

required :billing_periods, -> { MetronomeSDK::Subscription::BillingPeriods }

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



15
# File 'lib/metronome_sdk/models/subscription.rb', line 15

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

#custom_fieldsHash{Symbol=>String}?

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

Returns:

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


63
# File 'lib/metronome_sdk/models/subscription.rb', line 63

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

#descriptionString?

Returns:

  • (String, nil)


68
# File 'lib/metronome_sdk/models/subscription.rb', line 68

optional :description, String

#ending_beforeTime?

Returns:

  • (Time, nil)


73
# File 'lib/metronome_sdk/models/subscription.rb', line 73

optional :ending_before, Time

#fiat_credit_type_idString?

Returns:

  • (String, nil)


78
# File 'lib/metronome_sdk/models/subscription.rb', line 78

optional :fiat_credit_type_id, String

#idString?

Returns:

  • (String, nil)


57
# File 'lib/metronome_sdk/models/subscription.rb', line 57

optional :id, String

#nameString?

Returns:

  • (String, nil)


83
# File 'lib/metronome_sdk/models/subscription.rb', line 83

optional :name, String

#prorationMetronomeSDK::Models::Subscription::Proration



20
# File 'lib/metronome_sdk/models/subscription.rb', line 20

required :proration, -> { MetronomeSDK::Subscription::Proration }

#quantity_management_modeSymbol, MetronomeSDK::Models::Subscription::QuantityManagementMode

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.



34
# File 'lib/metronome_sdk/models/subscription.rb', line 34

required :quantity_management_mode, enum: -> { MetronomeSDK::Subscription::QuantityManagementMode }

#quantity_scheduleArray<MetronomeSDK::Models::Subscription::QuantitySchedule>

List of quantity schedule items for the subscription. Only includes the current quantity and future quantity changes.



41
42
# File 'lib/metronome_sdk/models/subscription.rb', line 41

required :quantity_schedule,
-> { MetronomeSDK::Internal::Type::ArrayOf[MetronomeSDK::Subscription::QuantitySchedule] }

#starting_atTime

Returns:

  • (Time)


47
# File 'lib/metronome_sdk/models/subscription.rb', line 47

required :starting_at, Time

#subscription_rateMetronomeSDK::Models::Subscription::SubscriptionRate



52
# File 'lib/metronome_sdk/models/subscription.rb', line 52

required :subscription_rate, -> { MetronomeSDK::Subscription::SubscriptionRate }

Class Method Details

.valuesArray<Symbol>

Returns:

  • (Array<Symbol>)


# File 'lib/metronome_sdk/models/subscription.rb', line 198