Class: ModernTreasury::Models::LedgerAccountRetrieveParams::Balances

Inherits:
Internal::Type::BaseModel show all
Defined in:
lib/modern_treasury/models/ledger_account_retrieve_params.rb,
sig/modern_treasury/models/ledger_account_retrieve_params.rbs

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(as_of_date: nil, as_of_lock_version: nil, effective_at: nil, effective_at_lower_bound: nil, effective_at_upper_bound: nil) ⇒ Object

Use balances[effective_at_lower_bound] and balances[effective_at_upper_bound] to get the balances change between the two timestamps. The lower bound is inclusive while the upper bound is exclusive of the provided timestamps. If no value is supplied the balances will be retrieved not including that bound. Use balances[as_of_lock_version] to retrieve a balance as of a specific Ledger Account lock_version.

Parameters:

  • as_of_date (Date) (defaults to: nil)
  • as_of_lock_version (Integer) (defaults to: nil)
  • effective_at (Time) (defaults to: nil)
  • effective_at_lower_bound (Time) (defaults to: nil)
  • effective_at_upper_bound (Time) (defaults to: nil)


36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
# File 'lib/modern_treasury/models/ledger_account_retrieve_params.rb', line 36

class Balances < ModernTreasury::Internal::Type::BaseModel
  # @!attribute as_of_date
  #
  #   @return [Date, nil]
  optional :as_of_date, Date

  # @!attribute as_of_lock_version
  #
  #   @return [Integer, nil]
  optional :as_of_lock_version, Integer

  # @!attribute effective_at
  #
  #   @return [Time, nil]
  optional :effective_at, Time

  # @!attribute effective_at_lower_bound
  #
  #   @return [Time, nil]
  optional :effective_at_lower_bound, Time

  # @!attribute effective_at_upper_bound
  #
  #   @return [Time, nil]
  optional :effective_at_upper_bound, Time

  # @!method initialize(as_of_date: nil, as_of_lock_version: nil, effective_at: nil, effective_at_lower_bound: nil, effective_at_upper_bound: nil)
  #   Use `balances[effective_at_lower_bound]` and
  #   `balances[effective_at_upper_bound]` to get the balances change between the two
  #   timestamps. The lower bound is inclusive while the upper bound is exclusive of
  #   the provided timestamps. If no value is supplied the balances will be retrieved
  #   not including that bound. Use `balances[as_of_lock_version]` to retrieve a
  #   balance as of a specific Ledger Account `lock_version`.
  #
  #   @param as_of_date [Date]
  #   @param as_of_lock_version [Integer]
  #   @param effective_at [Time]
  #   @param effective_at_lower_bound [Time]
  #   @param effective_at_upper_bound [Time]
end

Instance Attribute Details

#as_of_dateDate?

Parameters:

  • (Date)

Returns:

  • (Date, nil)


40
# File 'lib/modern_treasury/models/ledger_account_retrieve_params.rb', line 40

optional :as_of_date, Date

#as_of_lock_versionInteger?

Parameters:

  • (Integer)

Returns:

  • (Integer, nil)


45
# File 'lib/modern_treasury/models/ledger_account_retrieve_params.rb', line 45

optional :as_of_lock_version, Integer

#effective_atTime?

Parameters:

  • (Time)

Returns:

  • (Time, nil)


50
# File 'lib/modern_treasury/models/ledger_account_retrieve_params.rb', line 50

optional :effective_at, Time

#effective_at_lower_boundTime?

Parameters:

  • (Time)

Returns:

  • (Time, nil)


55
# File 'lib/modern_treasury/models/ledger_account_retrieve_params.rb', line 55

optional :effective_at_lower_bound, Time

#effective_at_upper_boundTime?

Parameters:

  • (Time)

Returns:

  • (Time, nil)


60
# File 'lib/modern_treasury/models/ledger_account_retrieve_params.rb', line 60

optional :effective_at_upper_bound, Time

Instance Method Details

#to_hash{

Returns:

  • ({)


72
# File 'sig/modern_treasury/models/ledger_account_retrieve_params.rbs', line 72

def to_hash: -> {