Class: Qravan::Credentials::Response

Inherits:
Object
  • Object
show all
Defined in:
lib/qravan/credentials/response.rb

Overview

Response credentials

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(response_credentials = {}) ⇒ Response

Returns a new instance of Response.



11
12
13
# File 'lib/qravan/credentials/response.rb', line 11

def initialize(response_credentials = {})
  @credentials = response_credentials
end

Instance Attribute Details

#credentialsObject

Returns the value of attribute credentials.



9
10
11
# File 'lib/qravan/credentials/response.rb', line 9

def credentials
  @credentials
end

Instance Method Details

#finished_atObject



36
37
38
# File 'lib/qravan/credentials/response.rb', line 36

def finished_at
  Time.now
end

#idObject



24
25
26
# File 'lib/qravan/credentials/response.rb', line 24

def id
  SecureRandom.uuid
end

#prepareObject



15
16
17
18
19
20
21
22
# File 'lib/qravan/credentials/response.rb', line 15

def prepare
  {
    id: id,
    sub_id: sub_id,
    started_at: started_at,
    finished_at: finished_at
  }
end

#started_atObject



32
33
34
# File 'lib/qravan/credentials/response.rb', line 32

def started_at
  Time.now
end

#sub_idObject



28
29
30
# File 'lib/qravan/credentials/response.rb', line 28

def sub_id
  SecureRandom.uuid
end