Class: Qravan::Credentials::Request

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

Overview

Request credentials

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(credentials) ⇒ Request

Returns a new instance of Request.



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

def initialize(credentials)
  @credentials = credentials["request"]
end

Instance Attribute Details

#credentialsObject

Returns the value of attribute credentials.



7
8
9
# File 'lib/qravan/credentials/request.rb', line 7

def credentials
  @credentials
end

Instance Method Details

#auditObject



41
42
43
# File 'lib/qravan/credentials/request.rb', line 41

def audit
  @credentials["audit"]
end

#audit_idObject



45
46
47
# File 'lib/qravan/credentials/request.rb', line 45

def audit_id
  @credentials["audit_id"]
end

#audit_tokenObject



49
50
51
# File 'lib/qravan/credentials/request.rb', line 49

def audit_token
  @credentials["audit_token"]
end

#idObject



25
26
27
# File 'lib/qravan/credentials/request.rb', line 25

def id
  @credentials["id"]
end

#nameObject



33
34
35
# File 'lib/qravan/credentials/request.rb', line 33

def name
  @credentials["name"]
end

#prepareObject



13
14
15
16
17
18
19
20
21
22
23
# File 'lib/qravan/credentials/request.rb', line 13

def prepare
  {
    id: id,
    sub_id: sub_id,
    name: name,
    purpose_id: purpose,
    audit: audit,
    audit_id: audit_id,
    audit_token: audit_token
  }
end

#purposeObject



37
38
39
# File 'lib/qravan/credentials/request.rb', line 37

def purpose
  @credentials["purpose_id"]
end

#sub_idObject



29
30
31
# File 'lib/qravan/credentials/request.rb', line 29

def sub_id
  @credentials["sub_id"]
end