Class: Moov::Models::Components::IssuedVelocityLimit

Inherits:
Object
  • Object
show all
Extended by:
T::Sig
Includes:
Crystalline::MetadataFields
Defined in:
lib/moov/models/components/issuedvelocitylimit.rb

Overview

A velocity limit with its current runtime state.

Instance Method Summary collapse

Methods included from Crystalline::MetadataFields

#field, #fields, included, #marshal_single, #to_dict, #to_json

Constructor Details

#initialize(interval:, amount: nil, count: nil, amount_used: nil, amount_remaining: nil, count_used: nil, count_remaining: nil, resets_on: nil) ⇒ IssuedVelocityLimit

Returns a new instance of IssuedVelocityLimit.



33
34
35
36
37
38
39
40
41
42
# File 'lib/moov/models/components/issuedvelocitylimit.rb', line 33

def initialize(interval:, amount: nil, count: nil, amount_used: nil, amount_remaining: nil, count_used: nil, count_remaining: nil, resets_on: nil)
  @interval = interval
  @amount = amount
  @count = count
  @amount_used = amount_used
  @amount_remaining = amount_remaining
  @count_used = count_used
  @count_remaining = count_remaining
  @resets_on = resets_on
end

Instance Method Details

#==(other) ⇒ Object



45
46
47
48
49
50
51
52
53
54
55
56
# File 'lib/moov/models/components/issuedvelocitylimit.rb', line 45

def ==(other)
  return false unless other.is_a? self.class
  return false unless @interval == other.interval
  return false unless @amount == other.amount
  return false unless @count == other.count
  return false unless @amount_used == other.amount_used
  return false unless @amount_remaining == other.amount_remaining
  return false unless @count_used == other.count_used
  return false unless @count_remaining == other.count_remaining
  return false unless @resets_on == other.resets_on
  true
end