Class: MetronomeSDK::Models::ContractV2::Credit

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

Defined Under Namespace

Modules: Ledger, Type Classes: Contract, Product

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(id: ) ⇒ Object

Parameters:

  • id (String) (defaults to: )


# File 'lib/metronome_sdk/models/contract_v2.rb', line 1706


Instance Attribute Details

#access_scheduleMetronomeSDK::Models::ScheduleDuration?

The schedule that the customer will gain access to the credits.



1614
# File 'lib/metronome_sdk/models/contract_v2.rb', line 1614

optional :access_schedule, -> { MetronomeSDK::ScheduleDuration }

#applicable_contract_idsArray<String>?

Returns:

  • (Array<String>, nil)


1619
# File 'lib/metronome_sdk/models/contract_v2.rb', line 1619

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

#applicable_product_idsArray<String>?

Returns:

  • (Array<String>, nil)


1624
# File 'lib/metronome_sdk/models/contract_v2.rb', line 1624

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

#applicable_product_tagsArray<String>?

Returns:

  • (Array<String>, nil)


1629
# File 'lib/metronome_sdk/models/contract_v2.rb', line 1629

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

#balanceFloat?

The current balance of the credit or commit. This balance reflects the amount of credit or commit that the customer has access to use at this moment - thus, expired and upcoming credit or commit segments contribute 0 to the balance. The balance will match the sum of all ledger entries with the exception of the case where the sum of negative manual ledger entries exceeds the positive amount remaining on the credit or commit - in that case, the balance will be 0. All manual ledger entries associated with active credit or commit segments are included in the balance, including future-dated manual ledger entries.

Returns:

  • (Float, nil)


1642
# File 'lib/metronome_sdk/models/contract_v2.rb', line 1642

optional :balance, Float

#contractMetronomeSDK::Models::ContractV2::Credit::Contract?



1647
# File 'lib/metronome_sdk/models/contract_v2.rb', line 1647

optional :contract, -> { MetronomeSDK::ContractV2::Credit::Contract }

#custom_fieldsHash{Symbol=>String}?

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

Returns:

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


1653
# File 'lib/metronome_sdk/models/contract_v2.rb', line 1653

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

#descriptionString?

Returns:

  • (String, nil)


1658
# File 'lib/metronome_sdk/models/contract_v2.rb', line 1658

optional :description, String

#hierarchy_configurationMetronomeSDK::Models::CommitHierarchyConfiguration?

Optional configuration for credit hierarchy access control



1664
# File 'lib/metronome_sdk/models/contract_v2.rb', line 1664

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

#idString

Returns:

  • (String)


1598
# File 'lib/metronome_sdk/models/contract_v2.rb', line 1598

required :id, String

#ledgerArray<MetronomeSDK::Models::ContractV2::Credit::Ledger::CreditSegmentStartLedgerEntry, MetronomeSDK::Models::ContractV2::Credit::Ledger::CreditAutomatedInvoiceDeductionLedgerEntry, MetronomeSDK::Models::ContractV2::Credit::Ledger::CreditExpirationLedgerEntry, MetronomeSDK::Models::ContractV2::Credit::Ledger::CreditCanceledLedgerEntry, MetronomeSDK::Models::ContractV2::Credit::Ledger::CreditCreditedLedgerEntry, MetronomeSDK::Models::ContractV2::Credit::Ledger::CreditManualLedgerEntry, MetronomeSDK::Models::ContractV2::Credit::Ledger::CreditSeatBasedAdjustmentLedgerEntry>?

A list of ordered events that impact the balance of a credit. For example, an invoice deduction or an expiration.



1671
1672
# File 'lib/metronome_sdk/models/contract_v2.rb', line 1671

optional :ledger,
-> { MetronomeSDK::Internal::Type::ArrayOf[union: MetronomeSDK::ContractV2::Credit::Ledger] }

#nameString?

Returns:

  • (String, nil)


1677
# File 'lib/metronome_sdk/models/contract_v2.rb', line 1677

optional :name, String

#netsuite_sales_order_idString?

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

Returns:

  • (String, nil)


1683
# File 'lib/metronome_sdk/models/contract_v2.rb', line 1683

optional :netsuite_sales_order_id, String

#priorityFloat?

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

Returns:

  • (Float, nil)


1690
# File 'lib/metronome_sdk/models/contract_v2.rb', line 1690

optional :priority, Float

#productMetronomeSDK::Models::ContractV2::Credit::Product



1603
# File 'lib/metronome_sdk/models/contract_v2.rb', line 1603

required :product, -> { MetronomeSDK::ContractV2::Credit::Product }

#salesforce_opportunity_idString?

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

Returns:

  • (String, nil)


1696
# File 'lib/metronome_sdk/models/contract_v2.rb', line 1696

optional :salesforce_opportunity_id, String

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

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.

Returns:



1704
# File 'lib/metronome_sdk/models/contract_v2.rb', line 1704

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

#typeSymbol, MetronomeSDK::Models::ContractV2::Credit::Type



1608
# File 'lib/metronome_sdk/models/contract_v2.rb', line 1608

required :type, enum: -> { MetronomeSDK::ContractV2::Credit::Type }

Class Method Details

.valuesArray<Symbol>

Returns:

  • (Array<Symbol>)


# File 'lib/metronome_sdk/models/contract_v2.rb', line 1769