Class: MetronomeSDK::Models::V1::PackageCreateParams::Credit

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

Defined Under Namespace

Modules: RateType Classes: AccessSchedule

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:, applicable_product_ids: nil, applicable_product_tags: nil, custom_fields: nil, description: nil, name: nil, priority: nil, rate_type: nil, specifiers: nil) ⇒ Object

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

Parameters:

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

    Schedule for distributing the credit to the customer.

  • product_id (String)
  • applicable_product_ids (Array<String>) (defaults to: nil)

    Which products the credit applies to. If both applicable_product_ids and applica

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

    Which tags the credit applies to. If both applicable*product_ids and applicable*

  • 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.

  • name (String) (defaults to: nil)

    displayed on invoices

  • priority (Float) (defaults to: nil)

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

  • rate_type (Symbol, MetronomeSDK::Models::V1::PackageCreateParams::Credit::RateType) (defaults to: nil)
  • specifiers (Array<MetronomeSDK::Models::CommitSpecifierInput>) (defaults to: nil)

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



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

Instance Attribute Details

#access_scheduleMetronomeSDK::Models::V1::PackageCreateParams::Credit::AccessSchedule

Schedule for distributing the credit to the customer.



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

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

#applicable_product_idsArray<String>?

Which products the credit applies to. If both applicable_product_ids and applicable_product_tags are not provided, the credit applies to all products.

Returns:

  • (Array<String>, nil)


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

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

#applicable_product_tagsArray<String>?

Which tags the credit applies to. If both applicable_product_ids and applicable_product_tags are not provided, the credit applies to all products.

Returns:

  • (Array<String>, nil)


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

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)


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

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

#descriptionString?

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

Returns:

  • (String, nil)


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

optional :description, String

#nameString?

displayed on invoices

Returns:

  • (String, nil)


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

optional :name, String

#priorityFloat?

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

Returns:

  • (Float, nil)


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

optional :priority, Float

#product_idString

Returns:

  • (String)


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

required :product_id, String

#rate_typeSymbol, ...



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

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

#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`.



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

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

Class Method Details

.valuesArray<Symbol>

Returns:

  • (Array<Symbol>)


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