Class: MetronomeSDK::Models::V2::ContractEditParams::AddCommit

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

Defined Under Namespace

Modules: RateType, Type Classes: AccessSchedule, InvoiceSchedule, PaymentGateConfig

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(timestamp: , amount: nil, quantity: nil, unit_price: nil) ⇒ Object

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

Parameters:

  • timestamp (Time) (defaults to: )

    timestamp of the scheduled event

  • amount (Float) (defaults to: nil)

    Amount for the charge. Can be provided instead of unit_price and quantity. If am

  • quantity (Float) (defaults to: nil)

    Quantity for the charge. Will be multiplied by unit_price to determine the amoun

  • unit_price (Float) (defaults to: nil)

    Unit price for the charge. Will be multiplied by quantity to determine the amoun



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


Instance Attribute Details

#access_scheduleMetronomeSDK::Models::V2::ContractEditParams::AddCommit::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.



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

optional :access_schedule, -> { MetronomeSDK::V2::ContractEditParams::AddCommit::AccessSchedule }

#amountFloat?

(DEPRECATED) Use access_schedule and invoice_schedule instead.

Returns:

  • (Float, nil)


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

optional :amount, Float

#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)


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

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)


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

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)


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

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

#descriptionString?

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

Returns:

  • (String, nil)


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

optional :description, String

#hierarchy_configurationMetronomeSDK::Models::CommitHierarchyConfiguration?

Optional configuration for commit hierarchy access control



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

optional :hierarchy_configuration, -> { MetronomeSDK::CommitHierarchyConfiguration }

#invoice_scheduleMetronomeSDK::Models::V2::ContractEditParams::AddCommit::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.



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

optional :invoice_schedule, -> { MetronomeSDK::V2::ContractEditParams::AddCommit::InvoiceSchedule }

#nameString?

displayed on invoices

Returns:

  • (String, nil)


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

optional :name, String

#netsuite_sales_order_idString?

This field’s availability is dependent on your client’s configuration.

Returns:

  • (String, nil)


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

optional :netsuite_sales_order_id, String

#payment_gate_configMetronomeSDK::Models::V2::ContractEditParams::AddCommit::PaymentGateConfig?

optionally payment gate this commit



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

optional :payment_gate_config, -> { MetronomeSDK::V2::ContractEditParams::AddCommit::PaymentGateConfig }

#priorityFloat?

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

Returns:

  • (Float, nil)


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

optional :priority, Float

#product_idString

Returns:

  • (String)


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

required :product_id, String

#rate_typeSymbol, ...



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

optional :rate_type, enum: -> { MetronomeSDK::V2::ContractEditParams::AddCommit::RateType }

#rollover_fractionFloat?

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

Returns:

  • (Float, nil)


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

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`. Instead, to target usage by product or product tag, pass those values in the body of `specifiers`.



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

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)


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

optional :temporary_id, String

#typeSymbol, MetronomeSDK::Models::V2::ContractEditParams::AddCommit::Type



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

required :type, enum: -> { MetronomeSDK::V2::ContractEditParams::AddCommit::Type }

Class Method Details

.valuesArray<Symbol>

Returns:

  • (Array<Symbol>)


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