Class: MetronomeSDK::Models::ContractV2::Credit
- Inherits:
-
Internal::Type::BaseModel
- Object
- Internal::Type::BaseModel
- MetronomeSDK::Models::ContractV2::Credit
- Defined in:
- lib/metronome_sdk/models/contract_v2.rb,
sig/metronome_sdk/models/contract_v2.rbs
Defined Under Namespace
Modules: Ledger, Type Classes: Contract, Product, RolledOverFrom
Constant Summary collapse
- MetronomeSDK =
Instance Attribute Summary collapse
-
#access_schedule ⇒ MetronomeSDK::Models::ScheduleDuration?
The schedule that the customer will gain access to the credits.
- #applicable_contract_ids ⇒ Array<String>?
- #applicable_product_ids ⇒ Array<String>?
- #applicable_product_tags ⇒ Array<String>?
- #archived_at ⇒ Time?
-
#balance ⇒ Float?
The current balance of the credit or commit.
- #contract ⇒ MetronomeSDK::Models::ContractV2::Credit::Contract?
-
#created_at ⇒ Time?
Timestamp of when the credit was created.
-
#created_by ⇒ String?
The actor who created this credit.
-
#custom_fields ⇒ Hash{Symbol=>String}?
Custom fields to be added eg.
- #description ⇒ String?
-
#hierarchy_configuration ⇒ MetronomeSDK::Models::CommitHierarchyConfiguration?
Optional configuration for credit hierarchy access control.
- #id ⇒ String
-
#ledger ⇒ Array<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, MetronomeSDK::Models::ContractV2::Credit::Ledger::CreditRolloverLedgerEntry>?
A list of ordered events that impact the balance of a credit.
- #name ⇒ String?
-
#netsuite_sales_order_id ⇒ String?
This field's availability is dependent on your client's configuration.
-
#priority ⇒ Float?
If multiple credits or commits are applicable, the one with the lower priority will apply first.
- #product ⇒ MetronomeSDK::Models::ContractV2::Credit::Product
-
#recurring_credit_id ⇒ String?
The ID of the recurring credit that created this credit.
- #rolled_over_from ⇒ MetronomeSDK::Models::ContractV2::Credit::RolledOverFrom?
-
#salesforce_opportunity_id ⇒ String?
This field's availability is dependent on your client's configuration.
-
#specifiers ⇒ Array<MetronomeSDK::Models::CommitSpecifier>?
List of filters that determine what kind of customer usage draws down a commit or credit.
-
#subscription_config ⇒ MetronomeSDK::Models::RecurringCommitSubscriptionConfig?
Attach a subscription to the recurring commit/credit.
- #type ⇒ Symbol, MetronomeSDK::Models::ContractV2::Credit::Type
Class Method Summary collapse
- .values ⇒ Array<Symbol>
- .variants ⇒ Array(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, MetronomeSDK::Models::ContractV2::Credit::Ledger::CreditRolloverLedgerEntry)
Instance Method Summary collapse
- #initialize(id:) ⇒ Object constructor
- #to_hash ⇒ {
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
|
|
# File 'lib/metronome_sdk/models/contract_v2.rb', line 1985
|
Instance Attribute Details
#access_schedule ⇒ MetronomeSDK::Models::ScheduleDuration?
The schedule that the customer will gain access to the credits.
1855 |
# File 'lib/metronome_sdk/models/contract_v2.rb', line 1855 optional :access_schedule, -> { MetronomeSDK::ScheduleDuration } |
#applicable_contract_ids ⇒ Array<String>?
1860 |
# File 'lib/metronome_sdk/models/contract_v2.rb', line 1860 optional :applicable_contract_ids, MetronomeSDK::Internal::Type::ArrayOf[String] |
#applicable_product_ids ⇒ Array<String>?
1865 |
# File 'lib/metronome_sdk/models/contract_v2.rb', line 1865 optional :applicable_product_ids, MetronomeSDK::Internal::Type::ArrayOf[String] |
#applicable_product_tags ⇒ Array<String>?
1870 |
# File 'lib/metronome_sdk/models/contract_v2.rb', line 1870 optional :applicable_product_tags, MetronomeSDK::Internal::Type::ArrayOf[String] |
#archived_at ⇒ Time?
1875 |
# File 'lib/metronome_sdk/models/contract_v2.rb', line 1875 optional :archived_at, Time |
#balance ⇒ Float?
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.
1888 |
# File 'lib/metronome_sdk/models/contract_v2.rb', line 1888 optional :balance, Float |
#contract ⇒ MetronomeSDK::Models::ContractV2::Credit::Contract?
1893 |
# File 'lib/metronome_sdk/models/contract_v2.rb', line 1893 optional :contract, -> { MetronomeSDK::ContractV2::Credit::Contract } |
#created_at ⇒ Time?
Timestamp of when the credit was created.
- Recurring credits: latter of credit service period date and parent credit start date
1902 |
# File 'lib/metronome_sdk/models/contract_v2.rb', line 1902 optional :created_at, Time |
#created_by ⇒ String?
The actor who created this credit. Omitted for system-generated credits such as recurring credits.
1909 |
# File 'lib/metronome_sdk/models/contract_v2.rb', line 1909 optional :created_by, String |
#custom_fields ⇒ Hash{Symbol=>String}?
Custom fields to be added eg. { "key1": "value1", "key2": "value2" }
1915 |
# File 'lib/metronome_sdk/models/contract_v2.rb', line 1915 optional :custom_fields, MetronomeSDK::Internal::Type::HashOf[String] |
#description ⇒ String?
1920 |
# File 'lib/metronome_sdk/models/contract_v2.rb', line 1920 optional :description, String |
#hierarchy_configuration ⇒ MetronomeSDK::Models::CommitHierarchyConfiguration?
Optional configuration for credit hierarchy access control
1926 |
# File 'lib/metronome_sdk/models/contract_v2.rb', line 1926 optional :hierarchy_configuration, -> { MetronomeSDK::CommitHierarchyConfiguration } |
#id ⇒ String
1839 |
# File 'lib/metronome_sdk/models/contract_v2.rb', line 1839 required :id, String |
#ledger ⇒ Array<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, MetronomeSDK::Models::ContractV2::Credit::Ledger::CreditRolloverLedgerEntry>?
A list of ordered events that impact the balance of a credit. For example, an invoice deduction or an expiration.
1933 1934 |
# File 'lib/metronome_sdk/models/contract_v2.rb', line 1933 optional :ledger, -> { MetronomeSDK::Internal::Type::ArrayOf[union: MetronomeSDK::ContractV2::Credit::Ledger] } |
#name ⇒ String?
1939 |
# File 'lib/metronome_sdk/models/contract_v2.rb', line 1939 optional :name, String |
#netsuite_sales_order_id ⇒ String?
This field's availability is dependent on your client's configuration.
1945 |
# File 'lib/metronome_sdk/models/contract_v2.rb', line 1945 optional :netsuite_sales_order_id, String |
#priority ⇒ Float?
If multiple credits or commits are applicable, the one with the lower priority will apply first.
1952 |
# File 'lib/metronome_sdk/models/contract_v2.rb', line 1952 optional :priority, Float |
#product ⇒ MetronomeSDK::Models::ContractV2::Credit::Product
1844 |
# File 'lib/metronome_sdk/models/contract_v2.rb', line 1844 required :product, -> { MetronomeSDK::ContractV2::Credit::Product } |
#recurring_credit_id ⇒ String?
The ID of the recurring credit that created this credit
1958 |
# File 'lib/metronome_sdk/models/contract_v2.rb', line 1958 optional :recurring_credit_id, String |
#rolled_over_from ⇒ MetronomeSDK::Models::ContractV2::Credit::RolledOverFrom?
1963 |
# File 'lib/metronome_sdk/models/contract_v2.rb', line 1963 optional :rolled_over_from, -> { MetronomeSDK::ContractV2::Credit::RolledOverFrom } |
#salesforce_opportunity_id ⇒ String?
This field's availability is dependent on your client's configuration.
1969 |
# File 'lib/metronome_sdk/models/contract_v2.rb', line 1969 optional :salesforce_opportunity_id, String |
#specifiers ⇒ Array<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.
1977 |
# File 'lib/metronome_sdk/models/contract_v2.rb', line 1977 optional :specifiers, -> { MetronomeSDK::Internal::Type::ArrayOf[MetronomeSDK::CommitSpecifier] } |
#subscription_config ⇒ MetronomeSDK::Models::RecurringCommitSubscriptionConfig?
Attach a subscription to the recurring commit/credit.
1983 |
# File 'lib/metronome_sdk/models/contract_v2.rb', line 1983 optional :subscription_config, -> { MetronomeSDK::RecurringCommitSubscriptionConfig } |
#type ⇒ Symbol, MetronomeSDK::Models::ContractV2::Credit::Type
1849 |
# File 'lib/metronome_sdk/models/contract_v2.rb', line 1849 required :type, enum: -> { MetronomeSDK::ContractV2::Credit::Type } |
Class Method Details
.values ⇒ Array<Symbol>
|
|
# File 'lib/metronome_sdk/models/contract_v2.rb', line 2060
|
.variants ⇒ Array(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, MetronomeSDK::Models::ContractV2::Credit::Ledger::CreditRolloverLedgerEntry)
|
|
# File 'lib/metronome_sdk/models/contract_v2.rb', line 2442
|
Instance Method Details
#to_hash ⇒ {
1993 |
# File 'sig/metronome_sdk/models/contract_v2.rbs', line 1993
def to_hash: -> {
|