Class: MetronomeSDK::Models::Commit
- Inherits:
-
Internal::Type::BaseModel
- Object
- Internal::Type::BaseModel
- MetronomeSDK::Models::Commit
- Defined in:
- lib/metronome_sdk/models/commit.rb,
sig/metronome_sdk/models/commit.rbs
Defined Under Namespace
Modules: Ledger, RateType, Type Classes: Contract, InvoiceContract, Product, RolledOverFrom, SpendTrackerAttributes, SubscriptionConfig
Constant Summary collapse
- MetronomeSDK =
Instance Attribute Summary collapse
-
#access_schedule ⇒ MetronomeSDK::Models::ScheduleDuration?
The schedule that the customer will gain access to the credits purposed with this commit.
-
#amount ⇒ Float?
(DEPRECATED) Use access_schedule + invoice_schedule instead.
- #applicable_contract_ids ⇒ Array<String>?
- #applicable_product_ids ⇒ Array<String>?
- #applicable_product_tags ⇒ Array<String>?
-
#archived_at ⇒ Time?
RFC 3339 timestamp indicating when the commit was archived.
-
#balance ⇒ Float?
The current balance of the credit or commit.
- #contract ⇒ MetronomeSDK::Models::Commit::Contract?
-
#cost_basis ⇒ Float?
The ratio of the amount paid for the commit to the amount of credit granted.
-
#created_at ⇒ Time
Timestamp of when the commit was created.
-
#created_by ⇒ String?
The actor who created this commit.
-
#custom_fields ⇒ Hash{Symbol=>String}?
Custom fields to be added eg.
- #description ⇒ String?
-
#hierarchy_configuration ⇒ MetronomeSDK::Models::CommitHierarchyConfiguration?
Optional configuration for commit hierarchy access control.
- #id ⇒ String
-
#invoice_contract ⇒ MetronomeSDK::Models::Commit::InvoiceContract?
The contract that this commit will be billed on.
-
#invoice_schedule ⇒ MetronomeSDK::Models::SchedulePointInTime?
The schedule that the customer will be invoiced for this commit.
-
#ledger ⇒ Array<MetronomeSDK::Models::Commit::Ledger::PrepaidCommitSegmentStartLedgerEntry, MetronomeSDK::Models::Commit::Ledger::PrepaidCommitAutomatedInvoiceDeductionLedgerEntry, MetronomeSDK::Models::Commit::Ledger::PrepaidCommitRolloverLedgerEntry, MetronomeSDK::Models::Commit::Ledger::PrepaidCommitExpirationLedgerEntry, MetronomeSDK::Models::Commit::Ledger::PrepaidCommitCanceledLedgerEntry, MetronomeSDK::Models::Commit::Ledger::PrepaidCommitCreditedLedgerEntry, MetronomeSDK::Models::Commit::Ledger::PrepaidCommitSeatBasedAdjustmentLedgerEntry, MetronomeSDK::Models::Commit::Ledger::PostpaidCommitInitialBalanceLedgerEntry, MetronomeSDK::Models::Commit::Ledger::PostpaidCommitAutomatedInvoiceDeductionLedgerEntry, MetronomeSDK::Models::Commit::Ledger::PostpaidCommitRolloverLedgerEntry, MetronomeSDK::Models::Commit::Ledger::PostpaidCommitTrueupLedgerEntry, MetronomeSDK::Models::Commit::Ledger::PrepaidCommitManualLedgerEntry, MetronomeSDK::Models::Commit::Ledger::PostpaidCommitManualLedgerEntry, MetronomeSDK::Models::Commit::Ledger::PostpaidCommitExpirationLedgerEntry>?
A list of ordered events that impact the balance of a commit.
- #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::Commit::Product
- #rate_type ⇒ Symbol, ...
-
#recurring_commit_id ⇒ String?
The ID of the recurring commit that this commit was generated from, if applicable.
- #rolled_over_from ⇒ MetronomeSDK::Models::Commit::RolledOverFrom?
- #rollover_fraction ⇒ Float?
-
#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.
-
#spend_tracker_attributes ⇒ MetronomeSDK::Models::Commit::SpendTrackerAttributes?
Optional attributes controlling how this commit interacts with spend trackers.
-
#subscription_config ⇒ MetronomeSDK::Models::Commit::SubscriptionConfig?
The subscription configuration for this commit, if it was generated from a recurring commit with a subscription attached.
- #type ⇒ Symbol, MetronomeSDK::Models::Commit::Type
-
#uniqueness_key ⇒ String?
Prevents the creation of duplicates.
Class Method Summary collapse
- .values ⇒ Array<Symbol>
- .variants ⇒ Array(MetronomeSDK::Models::Commit::Ledger::PrepaidCommitSegmentStartLedgerEntry, MetronomeSDK::Models::Commit::Ledger::PrepaidCommitAutomatedInvoiceDeductionLedgerEntry, MetronomeSDK::Models::Commit::Ledger::PrepaidCommitRolloverLedgerEntry, MetronomeSDK::Models::Commit::Ledger::PrepaidCommitExpirationLedgerEntry, MetronomeSDK::Models::Commit::Ledger::PrepaidCommitCanceledLedgerEntry, MetronomeSDK::Models::Commit::Ledger::PrepaidCommitCreditedLedgerEntry, MetronomeSDK::Models::Commit::Ledger::PrepaidCommitSeatBasedAdjustmentLedgerEntry, MetronomeSDK::Models::Commit::Ledger::PostpaidCommitInitialBalanceLedgerEntry, MetronomeSDK::Models::Commit::Ledger::PostpaidCommitAutomatedInvoiceDeductionLedgerEntry, MetronomeSDK::Models::Commit::Ledger::PostpaidCommitRolloverLedgerEntry, MetronomeSDK::Models::Commit::Ledger::PostpaidCommitTrueupLedgerEntry, MetronomeSDK::Models::Commit::Ledger::PrepaidCommitManualLedgerEntry, MetronomeSDK::Models::Commit::Ledger::PostpaidCommitManualLedgerEntry, MetronomeSDK::Models::Commit::Ledger::PostpaidCommitExpirationLedgerEntry)
Instance Method Summary collapse
-
#initialize(counts_as_discounted:) ⇒ Object
constructor
Some parameter documentations has been truncated, see SpendTrackerAttributes for more details.
- #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(counts_as_discounted:) ⇒ Object
Some parameter documentations has been truncated, see SpendTrackerAttributes for more details.
Optional attributes controlling how this commit interacts with spend trackers.
|
|
# File 'lib/metronome_sdk/models/commit.rb', line 209
|
Instance Attribute Details
#access_schedule ⇒ MetronomeSDK::Models::ScheduleDuration?
The schedule that the customer will gain access to the credits purposed with this commit.
36 |
# File 'lib/metronome_sdk/models/commit.rb', line 36 optional :access_schedule, -> { MetronomeSDK::ScheduleDuration } |
#amount ⇒ Float?
(DEPRECATED) Use access_schedule + invoice_schedule instead.
42 |
# File 'lib/metronome_sdk/models/commit.rb', line 42 optional :amount, Float |
#applicable_contract_ids ⇒ Array<String>?
47 |
# File 'lib/metronome_sdk/models/commit.rb', line 47 optional :applicable_contract_ids, MetronomeSDK::Internal::Type::ArrayOf[String] |
#applicable_product_ids ⇒ Array<String>?
52 |
# File 'lib/metronome_sdk/models/commit.rb', line 52 optional :applicable_product_ids, MetronomeSDK::Internal::Type::ArrayOf[String] |
#applicable_product_tags ⇒ Array<String>?
57 |
# File 'lib/metronome_sdk/models/commit.rb', line 57 optional :applicable_product_tags, MetronomeSDK::Internal::Type::ArrayOf[String] |
#archived_at ⇒ Time?
RFC 3339 timestamp indicating when the commit was archived. If not provided, the commit is not archived.
64 |
# File 'lib/metronome_sdk/models/commit.rb', line 64 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.
77 |
# File 'lib/metronome_sdk/models/commit.rb', line 77 optional :balance, Float |
#contract ⇒ MetronomeSDK::Models::Commit::Contract?
82 |
# File 'lib/metronome_sdk/models/commit.rb', line 82 optional :contract, -> { MetronomeSDK::Commit::Contract } |
#cost_basis ⇒ Float?
The ratio of the amount paid for the commit to the amount of credit granted.
88 |
# File 'lib/metronome_sdk/models/commit.rb', line 88 optional :cost_basis, Float |
#created_at ⇒ Time
Timestamp of when the commit was created.
- Recurring commits: latter of commit service period date and parent commit start date
- Rollover commits: when the new contract started
19 |
# File 'lib/metronome_sdk/models/commit.rb', line 19 required :created_at, Time |
#created_by ⇒ String?
The actor who created this commit. Omitted for system-generated commits such as recurring commits, rollover commits, and threshold commits.
95 |
# File 'lib/metronome_sdk/models/commit.rb', line 95 optional :created_by, String |
#custom_fields ⇒ Hash{Symbol=>String}?
Custom fields to be added eg. { "key1": "value1", "key2": "value2" }
101 |
# File 'lib/metronome_sdk/models/commit.rb', line 101 optional :custom_fields, MetronomeSDK::Internal::Type::HashOf[String] |
#description ⇒ String?
106 |
# File 'lib/metronome_sdk/models/commit.rb', line 106 optional :description, String |
#hierarchy_configuration ⇒ MetronomeSDK::Models::CommitHierarchyConfiguration?
Optional configuration for commit hierarchy access control
112 |
# File 'lib/metronome_sdk/models/commit.rb', line 112 optional :hierarchy_configuration, -> { MetronomeSDK::CommitHierarchyConfiguration } |
#id ⇒ String
9 |
# File 'lib/metronome_sdk/models/commit.rb', line 9 required :id, String |
#invoice_contract ⇒ MetronomeSDK::Models::Commit::InvoiceContract?
The contract that this commit will be billed on.
118 |
# File 'lib/metronome_sdk/models/commit.rb', line 118 optional :invoice_contract, -> { MetronomeSDK::Commit::InvoiceContract } |
#invoice_schedule ⇒ MetronomeSDK::Models::SchedulePointInTime?
The schedule that the customer will be invoiced for this commit.
124 |
# File 'lib/metronome_sdk/models/commit.rb', line 124 optional :invoice_schedule, -> { MetronomeSDK::SchedulePointInTime } |
#ledger ⇒ Array<MetronomeSDK::Models::Commit::Ledger::PrepaidCommitSegmentStartLedgerEntry, MetronomeSDK::Models::Commit::Ledger::PrepaidCommitAutomatedInvoiceDeductionLedgerEntry, MetronomeSDK::Models::Commit::Ledger::PrepaidCommitRolloverLedgerEntry, MetronomeSDK::Models::Commit::Ledger::PrepaidCommitExpirationLedgerEntry, MetronomeSDK::Models::Commit::Ledger::PrepaidCommitCanceledLedgerEntry, MetronomeSDK::Models::Commit::Ledger::PrepaidCommitCreditedLedgerEntry, MetronomeSDK::Models::Commit::Ledger::PrepaidCommitSeatBasedAdjustmentLedgerEntry, MetronomeSDK::Models::Commit::Ledger::PostpaidCommitInitialBalanceLedgerEntry, MetronomeSDK::Models::Commit::Ledger::PostpaidCommitAutomatedInvoiceDeductionLedgerEntry, MetronomeSDK::Models::Commit::Ledger::PostpaidCommitRolloverLedgerEntry, MetronomeSDK::Models::Commit::Ledger::PostpaidCommitTrueupLedgerEntry, MetronomeSDK::Models::Commit::Ledger::PrepaidCommitManualLedgerEntry, MetronomeSDK::Models::Commit::Ledger::PostpaidCommitManualLedgerEntry, MetronomeSDK::Models::Commit::Ledger::PostpaidCommitExpirationLedgerEntry>?
A list of ordered events that impact the balance of a commit. For example, an invoice deduction or a rollover.
131 |
# File 'lib/metronome_sdk/models/commit.rb', line 131 optional :ledger, -> { MetronomeSDK::Internal::Type::ArrayOf[union: MetronomeSDK::Commit::Ledger] } |
#name ⇒ String?
136 |
# File 'lib/metronome_sdk/models/commit.rb', line 136 optional :name, String |
#netsuite_sales_order_id ⇒ String?
This field's availability is dependent on your client's configuration.
142 |
# File 'lib/metronome_sdk/models/commit.rb', line 142 optional :netsuite_sales_order_id, String |
#priority ⇒ Float?
If multiple credits or commits are applicable, the one with the lower priority will apply first.
149 |
# File 'lib/metronome_sdk/models/commit.rb', line 149 optional :priority, Float |
#product ⇒ MetronomeSDK::Models::Commit::Product
24 |
# File 'lib/metronome_sdk/models/commit.rb', line 24 required :product, -> { MetronomeSDK::Commit::Product } |
#rate_type ⇒ Symbol, ...
154 |
# File 'lib/metronome_sdk/models/commit.rb', line 154 optional :rate_type, enum: -> { MetronomeSDK::Commit::RateType } |
#recurring_commit_id ⇒ String?
The ID of the recurring commit that this commit was generated from, if applicable.
161 |
# File 'lib/metronome_sdk/models/commit.rb', line 161 optional :recurring_commit_id, String |
#rolled_over_from ⇒ MetronomeSDK::Models::Commit::RolledOverFrom?
166 |
# File 'lib/metronome_sdk/models/commit.rb', line 166 optional :rolled_over_from, -> { MetronomeSDK::Commit::RolledOverFrom } |
#rollover_fraction ⇒ Float?
171 |
# File 'lib/metronome_sdk/models/commit.rb', line 171 optional :rollover_fraction, Float |
#salesforce_opportunity_id ⇒ String?
This field's availability is dependent on your client's configuration.
177 |
# File 'lib/metronome_sdk/models/commit.rb', line 177 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.
185 |
# File 'lib/metronome_sdk/models/commit.rb', line 185 optional :specifiers, -> { MetronomeSDK::Internal::Type::ArrayOf[MetronomeSDK::CommitSpecifier] } |
#spend_tracker_attributes ⇒ MetronomeSDK::Models::Commit::SpendTrackerAttributes?
Optional attributes controlling how this commit interacts with spend trackers.
191 |
# File 'lib/metronome_sdk/models/commit.rb', line 191 optional :spend_tracker_attributes, -> { MetronomeSDK::Commit::SpendTrackerAttributes } |
#subscription_config ⇒ MetronomeSDK::Models::Commit::SubscriptionConfig?
The subscription configuration for this commit, if it was generated from a recurring commit with a subscription attached.
198 |
# File 'lib/metronome_sdk/models/commit.rb', line 198 optional :subscription_config, -> { MetronomeSDK::Commit::SubscriptionConfig } |
#type ⇒ Symbol, MetronomeSDK::Models::Commit::Type
29 |
# File 'lib/metronome_sdk/models/commit.rb', line 29 required :type, enum: -> { MetronomeSDK::Commit::Type } |
#uniqueness_key ⇒ String?
Prevents the creation of duplicates. If a request to create a commit or credit is made with a uniqueness key that was previously used to create a commit or credit, a new record will not be created and the request will fail with a 409 error.
207 |
# File 'lib/metronome_sdk/models/commit.rb', line 207 optional :uniqueness_key, String |
Class Method Details
.values ⇒ Array<Symbol>
|
|
# File 'lib/metronome_sdk/models/commit.rb', line 301
|
.variants ⇒ Array(MetronomeSDK::Models::Commit::Ledger::PrepaidCommitSegmentStartLedgerEntry, MetronomeSDK::Models::Commit::Ledger::PrepaidCommitAutomatedInvoiceDeductionLedgerEntry, MetronomeSDK::Models::Commit::Ledger::PrepaidCommitRolloverLedgerEntry, MetronomeSDK::Models::Commit::Ledger::PrepaidCommitExpirationLedgerEntry, MetronomeSDK::Models::Commit::Ledger::PrepaidCommitCanceledLedgerEntry, MetronomeSDK::Models::Commit::Ledger::PrepaidCommitCreditedLedgerEntry, MetronomeSDK::Models::Commit::Ledger::PrepaidCommitSeatBasedAdjustmentLedgerEntry, MetronomeSDK::Models::Commit::Ledger::PostpaidCommitInitialBalanceLedgerEntry, MetronomeSDK::Models::Commit::Ledger::PostpaidCommitAutomatedInvoiceDeductionLedgerEntry, MetronomeSDK::Models::Commit::Ledger::PostpaidCommitRolloverLedgerEntry, MetronomeSDK::Models::Commit::Ledger::PostpaidCommitTrueupLedgerEntry, MetronomeSDK::Models::Commit::Ledger::PrepaidCommitManualLedgerEntry, MetronomeSDK::Models::Commit::Ledger::PostpaidCommitManualLedgerEntry, MetronomeSDK::Models::Commit::Ledger::PostpaidCommitExpirationLedgerEntry)
|
|
# File 'lib/metronome_sdk/models/commit.rb', line 949
|
Instance Method Details
#to_hash ⇒ {
217 |
# File 'sig/metronome_sdk/models/commit.rbs', line 217
def to_hash: -> {
|