Class: Apiphobic::Errors::Unavailable

Inherits:
Erratum::Errors::InvalidToken
  • Object
show all
Defined in:
lib/apiphobic/errors/unavailable.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#available_atObject

Returns the value of attribute available_at.



8
9
10
# File 'lib/apiphobic/errors/unavailable.rb', line 8

def available_at
  @available_at
end

Instance Method Details

#detailObject



14
15
16
17
18
19
# File 'lib/apiphobic/errors/unavailable.rb', line 14

def detail
  <<~HEREDOC.chomp.tr("\n", ' ')
    The token you passed is not yet usable. Please wait until
    '#{available_at.iso8601}' to try again.
  HEREDOC
end

#sourceObject



21
22
23
24
25
# File 'lib/apiphobic/errors/unavailable.rb', line 21

def source
  {
    'available_at' => available_at,
  }
end

#titleObject



10
11
12
# File 'lib/apiphobic/errors/unavailable.rb', line 10

def title
  'Token Is Unavailable'
end