Class: MetronomeSDK::Models::V1::ContractListSeatBalancesResponse::Data::Commit::LedgerEntry

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

Defined Under Namespace

Modules: Type

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:, timestamp:, type:) ⇒ Object

Parameters:



140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
# File 'lib/metronome_sdk/models/v1/contract_list_seat_balances_response.rb', line 140

class LedgerEntry < MetronomeSDK::Internal::Type::BaseModel
  # @!attribute amount
  #   Amount of the ledger entry
  #
  #   @return [Float]
  required :amount, Float

  # @!attribute timestamp
  #   The datetime when the ledger is created
  #
  #   @return [Time]
  required :timestamp, Time

  # @!attribute type
  #   Commit ledger type
  #
  #   @return [Symbol, MetronomeSDK::Models::V1::ContractListSeatBalancesResponse::Data::Commit::LedgerEntry::Type]
  required :type,
           enum: -> { MetronomeSDK::Models::V1::ContractListSeatBalancesResponse::Data::Commit::LedgerEntry::Type }

  # @!method initialize(amount:, timestamp:, type:)
  #   @param amount [Float] Amount of the ledger entry
  #
  #   @param timestamp [Time] The datetime when the ledger is created
  #
  #   @param type [Symbol, MetronomeSDK::Models::V1::ContractListSeatBalancesResponse::Data::Commit::LedgerEntry::Type] Commit ledger type

  # Commit ledger type
  #
  # @see MetronomeSDK::Models::V1::ContractListSeatBalancesResponse::Data::Commit::LedgerEntry#type
  module Type
    extend MetronomeSDK::Internal::Type::Enum

    PREPAID_COMMIT_SEGMENT_START = :PREPAID_COMMIT_SEGMENT_START
    PREPAID_COMMIT_AUTOMATED_INVOICE_DEDUCTION = :PREPAID_COMMIT_AUTOMATED_INVOICE_DEDUCTION
    PREPAID_COMMIT_ROLLOVER = :PREPAID_COMMIT_ROLLOVER
    PREPAID_COMMIT_EXPIRATION = :PREPAID_COMMIT_EXPIRATION
    PREPAID_COMMIT_CANCELED = :PREPAID_COMMIT_CANCELED
    PREPAID_COMMIT_CREDITED = :PREPAID_COMMIT_CREDITED
    PREPAID_COMMIT_MANUAL = :PREPAID_COMMIT_MANUAL
    PREPAID_COMMIT_SEAT_BASED_ADJUSTMENT = :PREPAID_COMMIT_SEAT_BASED_ADJUSTMENT

    # @!method self.values
    #   @return [Array<Symbol>]
  end
end

Instance Attribute Details

#amountFloat

Amount of the ledger entry

Returns:

  • (Float)


145
# File 'lib/metronome_sdk/models/v1/contract_list_seat_balances_response.rb', line 145

required :amount, Float

#timestampTime

The datetime when the ledger is created

Returns:

  • (Time)


151
# File 'lib/metronome_sdk/models/v1/contract_list_seat_balances_response.rb', line 151

required :timestamp, Time

#typeSymbol, MetronomeSDK::Models::V1::ContractListSeatBalancesResponse::Data::Commit::LedgerEntry::Type

Commit ledger type



157
158
# File 'lib/metronome_sdk/models/v1/contract_list_seat_balances_response.rb', line 157

required :type,
enum: -> { MetronomeSDK::Models::V1::ContractListSeatBalancesResponse::Data::Commit::LedgerEntry::Type }