Class: MekariSso::UserUpdate

Inherits:
UserRegister show all
Defined in:
lib/params/user_update.rb

Instance Attribute Summary collapse

Attributes inherited from Config

#accept_language, #base_url, #client_id, #client_secret

Instance Method Summary collapse

Methods inherited from Config

#apply

Constructor Details

#initialize(options = nil) ⇒ UserUpdate

Returns a new instance of UserUpdate.



10
11
12
# File 'lib/params/user_update.rb', line 10

def initialize(options = nil)
  apply(options) if options
end

Instance Attribute Details

#access_tokenObject

Returns the value of attribute access_token.



8
9
10
# File 'lib/params/user_update.rb', line 8

def access_token
  @access_token
end

#emailObject

Returns the value of attribute email.



8
9
10
# File 'lib/params/user_update.rb', line 8

def email
  @email
end

#first_nameObject

Returns the value of attribute first_name.



8
9
10
# File 'lib/params/user_update.rb', line 8

def first_name
  @first_name
end

#last_nameObject

Returns the value of attribute last_name.



8
9
10
# File 'lib/params/user_update.rb', line 8

def last_name
  @last_name
end

#passwordObject

Returns the value of attribute password.



8
9
10
# File 'lib/params/user_update.rb', line 8

def password
  @password
end

#phoneObject

Returns the value of attribute phone.



8
9
10
# File 'lib/params/user_update.rb', line 8

def phone
  @phone
end

#user_idObject

Returns the value of attribute user_id.



8
9
10
# File 'lib/params/user_update.rb', line 8

def user_id
  @user_id
end

Instance Method Details

#available_keysObject



14
15
16
# File 'lib/params/user_update.rb', line 14

def available_keys
  super + %i[user_id]
end

#validate_required!Object



18
19
20
21
22
23
24
25
26
# File 'lib/params/user_update.rb', line 18

def validate_required!
  unless @user_id.present?
    raise ArgumentError, "Params user_id is required options"
  end 

  unless @access_token.present?
    raise ArgumentError, "Params access_token is required options"
  end 
end