Class: MetronomeSDK::Models::V1::PackageCreateParams::Commit

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

Defined Under Namespace

Modules: RateType, Type Classes: AccessSchedule, InvoiceSchedule

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(access_schedule:, product_id:, type:, applicable_product_ids: nil, applicable_product_tags: nil, custom_fields: nil, description: nil, invoice_schedule: nil, name: nil, priority: nil, rate_type: nil, rollover_fraction: nil, specifiers: nil, temporary_id: nil) ⇒ Object

Some parameter documentations has been truncated, see MetronomeSDK::Models::V1::PackageCreateParams::Commit for more details.

Parameters:

  • access_schedule (MetronomeSDK::Models::V1::PackageCreateParams::Commit::AccessSchedule)

    Required: Schedule for distributing the commit to the customer. For “POSTPAID” c

  • product_id (String)
  • type (Symbol, MetronomeSDK::Models::V1::PackageCreateParams::Commit::Type)
  • applicable_product_ids (Array<String>) (defaults to: nil)

    Which products the commit applies to. If applicable_product_ids, applicable_prod

  • applicable_product_tags (Array<String>) (defaults to: nil)

    Which tags the commit applies to. If applicable*product_ids, applicable_product*

  • custom_fields (Hash{Symbol=>String}) (defaults to: nil)

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

  • description (String) (defaults to: nil)

    Used only in UI/API. It is not exposed to end customers.

  • invoice_schedule (MetronomeSDK::Models::V1::PackageCreateParams::Commit::InvoiceSchedule) (defaults to: nil)

    Required for “POSTPAID” commits: the true up invoice will be generated at this t

  • name (String) (defaults to: nil)

    displayed on invoices

  • priority (Float) (defaults to: nil)

    If multiple commits are applicable, the one with the lower priority will apply f

  • rate_type (Symbol, MetronomeSDK::Models::V1::PackageCreateParams::Commit::RateType) (defaults to: nil)
  • rollover_fraction (Float) (defaults to: nil)

    Fraction of unused segments that will be rolled over. Must be between 0 and 1.

  • specifiers (Array<MetronomeSDK::Models::CommitSpecifierInput>) (defaults to: nil)

    List of filters that determine what kind of customer usage draws down a commit o

  • temporary_id (String) (defaults to: nil)

    A temporary ID for the commit that can be used to reference the commit for commi



# File 'lib/metronome_sdk/models/v1/package_create_params.rb', line 347

Instance Attribute Details

#access_scheduleMetronomeSDK::Models::V1::PackageCreateParams::Commit::AccessSchedule

Required: Schedule for distributing the commit to the customer. For “POSTPAID” commits only one schedule item is allowed and amount must match invoice_schedule total.



258
# File 'lib/metronome_sdk/models/v1/package_create_params.rb', line 258

required :access_schedule, -> { MetronomeSDK::V1::PackageCreateParams::Commit::AccessSchedule }

#applicable_product_idsArray<String>?

Which products the commit applies to. If applicable_product_ids, applicable_product_tags or specifiers are not provided, the commit applies to all products.

Returns:

  • (Array<String>, nil)


276
# File 'lib/metronome_sdk/models/v1/package_create_params.rb', line 276

optional :applicable_product_ids, MetronomeSDK::Internal::Type::ArrayOf[String]

#applicable_product_tagsArray<String>?

Which tags the commit applies to. If applicable_product_ids, applicable_product_tags or specifiers are not provided, the commit applies to all products.

Returns:

  • (Array<String>, nil)


284
# File 'lib/metronome_sdk/models/v1/package_create_params.rb', line 284

optional :applicable_product_tags, MetronomeSDK::Internal::Type::ArrayOf[String]

#custom_fieldsHash{Symbol=>String}?

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

Returns:

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


290
# File 'lib/metronome_sdk/models/v1/package_create_params.rb', line 290

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

#descriptionString?

Used only in UI/API. It is not exposed to end customers.

Returns:

  • (String, nil)


296
# File 'lib/metronome_sdk/models/v1/package_create_params.rb', line 296

optional :description, String

#invoice_scheduleMetronomeSDK::Models::V1::PackageCreateParams::Commit::InvoiceSchedule?

Required for “POSTPAID” commits: the true up invoice will be generated at this time and only one schedule item is allowed; the total must match access_schedule amount. Optional for “PREPAID” commits: if not provided, this will be a “complimentary” commit with no invoice.



305
# File 'lib/metronome_sdk/models/v1/package_create_params.rb', line 305

optional :invoice_schedule, -> { MetronomeSDK::V1::PackageCreateParams::Commit::InvoiceSchedule }

#nameString?

displayed on invoices

Returns:

  • (String, nil)


311
# File 'lib/metronome_sdk/models/v1/package_create_params.rb', line 311

optional :name, String

#priorityFloat?

If multiple commits are applicable, the one with the lower priority will apply first.

Returns:

  • (Float, nil)


318
# File 'lib/metronome_sdk/models/v1/package_create_params.rb', line 318

optional :priority, Float

#product_idString

Returns:

  • (String)


263
# File 'lib/metronome_sdk/models/v1/package_create_params.rb', line 263

required :product_id, String

#rate_typeSymbol, ...



323
# File 'lib/metronome_sdk/models/v1/package_create_params.rb', line 323

optional :rate_type, enum: -> { MetronomeSDK::V1::PackageCreateParams::Commit::RateType }

#rollover_fractionFloat?

Fraction of unused segments that will be rolled over. Must be between 0 and 1.

Returns:

  • (Float, nil)


329
# File 'lib/metronome_sdk/models/v1/package_create_params.rb', line 329

optional :rollover_fraction, Float

#specifiersArray<MetronomeSDK::Models::CommitSpecifierInput>?

List of filters that determine what kind of customer usage draws down a commit or credit. A customer’s usage needs to meet the condition of at least one of the specifiers to contribute to a commit’s or credit’s drawdown. This field cannot be used together with ‘applicable_product_ids` or `applicable_product_tags`.



338
# File 'lib/metronome_sdk/models/v1/package_create_params.rb', line 338

optional :specifiers, -> { MetronomeSDK::Internal::Type::ArrayOf[MetronomeSDK::CommitSpecifierInput] }

#temporary_idString?

A temporary ID for the commit that can be used to reference the commit for commit specific overrides.

Returns:

  • (String, nil)


345
# File 'lib/metronome_sdk/models/v1/package_create_params.rb', line 345

optional :temporary_id, String

#typeSymbol, MetronomeSDK::Models::V1::PackageCreateParams::Commit::Type



268
# File 'lib/metronome_sdk/models/v1/package_create_params.rb', line 268

required :type, enum: -> { MetronomeSDK::V1::PackageCreateParams::Commit::Type }

Class Method Details

.valuesArray<Symbol>

Returns:

  • (Array<Symbol>)


# File 'lib/metronome_sdk/models/v1/package_create_params.rb', line 496