Exception: PyrxSynapse::SynapsePlanLimitError

Inherits:
SynapseError
  • Object
show all
Defined in:
lib/pyrx_synapse/errors.rb

Overview

Raised on 403 with code ‘plan_limit_reached’.

Instance Attribute Summary collapse

Attributes inherited from SynapseError

#code, #request_id, #status

Instance Method Summary collapse

Constructor Details

#initialize(message, status:, code: nil, request_id: nil, limit_type: "", current: 0, maximum: 0, plan: "") ⇒ SynapsePlanLimitError

Returns a new instance of SynapsePlanLimitError.



33
34
35
36
37
38
39
40
# File 'lib/pyrx_synapse/errors.rb', line 33

def initialize(message, status:, code: nil, request_id: nil,
               limit_type: "", current: 0, maximum: 0, plan: "")
  super(message, status: status, code: code, request_id: request_id)
  @limit_type = limit_type
  @current = current.to_i
  @maximum = maximum.to_i
  @plan = plan
end

Instance Attribute Details

#currentObject (readonly)

Returns the value of attribute current.



31
32
33
# File 'lib/pyrx_synapse/errors.rb', line 31

def current
  @current
end

#limit_typeObject (readonly)

Returns the value of attribute limit_type.



31
32
33
# File 'lib/pyrx_synapse/errors.rb', line 31

def limit_type
  @limit_type
end

#maximumObject (readonly)

Returns the value of attribute maximum.



31
32
33
# File 'lib/pyrx_synapse/errors.rb', line 31

def maximum
  @maximum
end

#planObject (readonly)

Returns the value of attribute plan.



31
32
33
# File 'lib/pyrx_synapse/errors.rb', line 31

def plan
  @plan
end