Class: Himari::LifetimeValue

Inherits:
Struct
  • Object
show all
Defined in:
lib/himari/lifetime_value.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#access_tokenObject

Returns the value of attribute access_token

Returns:

  • (Object)

    the current value of access_token



2
3
4
# File 'lib/himari/lifetime_value.rb', line 2

def access_token
  @access_token
end

#codeObject

Returns the value of attribute code

Returns:

  • (Object)

    the current value of code



2
3
4
# File 'lib/himari/lifetime_value.rb', line 2

def code
  @code
end

#id_tokenObject

Returns the value of attribute id_token

Returns:

  • (Object)

    the current value of id_token



2
3
4
# File 'lib/himari/lifetime_value.rb', line 2

def id_token
  @id_token
end

Class Method Details

.from_integer(i) ⇒ Object



3
4
5
# File 'lib/himari/lifetime_value.rb', line 3

def self.from_integer(i)
  new(access_token: i, id_token: i, code: nil)
end

Instance Method Details

#as_jsonObject



11
12
13
# File 'lib/himari/lifetime_value.rb', line 11

def as_json
  {access_token: access_token, id_token: id_token, code: code}
end

#as_logObject



7
8
9
# File 'lib/himari/lifetime_value.rb', line 7

def as_log
  as_json&.compact
end