Exception: UserPattern::ThresholdExceeded

Inherits:
StandardError
  • Object
show all
Defined in:
lib/userpattern/threshold_exceeded.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(endpoint:, user_id:, model_type:, period:, count:, limit:) ⇒ ThresholdExceeded

Returns a new instance of ThresholdExceeded.



7
8
9
10
11
12
13
14
15
# File 'lib/userpattern/threshold_exceeded.rb', line 7

def initialize(endpoint:, user_id:, model_type:, period:, count:, limit:)
  @endpoint = endpoint
  @user_id = user_id
  @model_type = model_type
  @period = period
  @count = count
  @limit = limit
  super(build_message)
end

Instance Attribute Details

#countObject (readonly)

Returns the value of attribute count.



5
6
7
# File 'lib/userpattern/threshold_exceeded.rb', line 5

def count
  @count
end

#endpointObject (readonly)

Returns the value of attribute endpoint.



5
6
7
# File 'lib/userpattern/threshold_exceeded.rb', line 5

def endpoint
  @endpoint
end

#limitObject (readonly)

Returns the value of attribute limit.



5
6
7
# File 'lib/userpattern/threshold_exceeded.rb', line 5

def limit
  @limit
end

#model_typeObject (readonly)

Returns the value of attribute model_type.



5
6
7
# File 'lib/userpattern/threshold_exceeded.rb', line 5

def model_type
  @model_type
end

#periodObject (readonly)

Returns the value of attribute period.



5
6
7
# File 'lib/userpattern/threshold_exceeded.rb', line 5

def period
  @period
end

#user_idObject (readonly)

Returns the value of attribute user_id.



5
6
7
# File 'lib/userpattern/threshold_exceeded.rb', line 5

def user_id
  @user_id
end