Class: MetronomeSDK::Models::V1::ContractCreateParams::Commit

Inherits:
Internal::Type::BaseModel show all
Defined in:
lib/metronome_sdk/models/v1/contract_create_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::V1::ContractCreateParams::Commit::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/v1/contract_create_params.rb', line 473

Instance Attribute Details

#access_scheduleMetronomeSDK::Models::V1::ContractCreateParams::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.



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

optional :access_schedule, -> { MetronomeSDK::V1::ContractCreateParams::Commit::AccessSchedule }

#amountFloat?

(DEPRECATED) Use access_schedule and invoice_schedule instead.

Returns:

  • (Float, nil)


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

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)


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

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)


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

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)


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

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

#descriptionString?

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

Returns:

  • (String, nil)


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

optional :description, String

#hierarchy_configurationMetronomeSDK::Models::CommitHierarchyConfiguration?

Optional configuration for commit hierarchy access control



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

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

#invoice_scheduleMetronomeSDK::Models::V1::ContractCreateParams::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.



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

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

#nameString?

displayed on invoices

Returns:

  • (String, nil)


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

optional :name, String

#netsuite_sales_order_idString?

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

Returns:

  • (String, nil)


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

optional :netsuite_sales_order_id, String

#payment_gate_configMetronomeSDK::Models::V1::ContractCreateParams::Commit::PaymentGateConfig?

optionally payment gate this commit



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

optional :payment_gate_config, -> { MetronomeSDK::V1::ContractCreateParams::Commit::PaymentGateConfig }

#priorityFloat?

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

Returns:

  • (Float, nil)


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

optional :priority, Float

#product_idString

Returns:

  • (String)


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

required :product_id, String

#rate_typeSymbol, ...



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

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

#rollover_fractionFloat?

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

Returns:

  • (Float, nil)


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

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



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

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)


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

optional :temporary_id, String

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



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

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

Class Method Details

.valuesArray<Symbol>

Returns:

  • (Array<Symbol>)


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