Class: MetronomeSDK::Models::V1::CreditLedgerEntry

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

Instance Attribute 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(amount: , created_by: , credit_grant_id: , effective_at: , reason: , running_balance: , invoice_id: nil) ⇒ Object

Some parameter documentations has been truncated, see MetronomeSDK::Models::V1::CreditLedgerEntry for more details.

Parameters:

  • amount (Float) (defaults to: )

    an amount representing the change to the customer’s credit balance

  • created_by (String) (defaults to: )
  • credit_grant_id (String) (defaults to: )

    the credit grant this entry is related to

  • effective_at (Time) (defaults to: )
  • reason (String) (defaults to: )
  • running_balance (Float) (defaults to: )

    the running balance for this credit type at the time of the ledger entry, includ

  • invoice_id (String, nil) (defaults to: nil)

    if this entry is a deduction, the Metronome ID of the invoice where the credit d



# File 'lib/metronome_sdk/models/v1/credit_ledger_entry.rb', line 49

Instance Attribute Details

#amountFloat

an amount representing the change to the customer’s credit balance

Returns:

  • (Float)


11
# File 'lib/metronome_sdk/models/v1/credit_ledger_entry.rb', line 11

required :amount, Float

#created_byString

Returns:

  • (String)


16
# File 'lib/metronome_sdk/models/v1/credit_ledger_entry.rb', line 16

required :created_by, String

#credit_grant_idString

the credit grant this entry is related to

Returns:

  • (String)


22
# File 'lib/metronome_sdk/models/v1/credit_ledger_entry.rb', line 22

required :credit_grant_id, String

#effective_atTime

Returns:

  • (Time)


27
# File 'lib/metronome_sdk/models/v1/credit_ledger_entry.rb', line 27

required :effective_at, Time

#invoice_idString?

if this entry is a deduction, the Metronome ID of the invoice where the credit deduction was consumed; if this entry is a grant, the Metronome ID of the invoice where the grant’s paid_amount was charged

Returns:

  • (String, nil)


47
# File 'lib/metronome_sdk/models/v1/credit_ledger_entry.rb', line 47

optional :invoice_id, String, nil?: true

#reasonString

Returns:

  • (String)


32
# File 'lib/metronome_sdk/models/v1/credit_ledger_entry.rb', line 32

required :reason, String

#running_balanceFloat

the running balance for this credit type at the time of the ledger entry, including all preceding charges

Returns:

  • (Float)


39
# File 'lib/metronome_sdk/models/v1/credit_ledger_entry.rb', line 39

required :running_balance, Float