Class: Imuze::CreateToken

Inherits:
Struct
  • Object
show all
Defined in:
lib/imuze/create_token.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#emailObject

Returns the value of attribute email

Returns:

  • (Object)

    the current value of email



2
3
4
# File 'lib/imuze/create_token.rb', line 2

def email
  @email
end

#passwordObject

Returns the value of attribute password

Returns:

  • (Object)

    the current value of password



2
3
4
# File 'lib/imuze/create_token.rb', line 2

def password
  @password
end

Class Method Details

.call(*args) ⇒ Object



7
8
9
# File 'lib/imuze/create_token.rb', line 7

def self.call(*args)
  new(*args).call
end

Instance Method Details

#callObject



11
12
13
14
# File 'lib/imuze/create_token.rb', line 11

def call
  response = http.request(put_request)
  JSON.parse(response.read_body)
end