Class: MekariSso::Company

Inherits:
Config
  • Object
show all
Defined in:
lib/params/company.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) ⇒ Company

Returns a new instance of Company.



9
10
11
# File 'lib/params/company.rb', line 9

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

Instance Attribute Details

#access_tokenObject

Returns the value of attribute access_token.



7
8
9
# File 'lib/params/company.rb', line 7

def access_token
  @access_token
end

#company_idObject

Returns the value of attribute company_id.



7
8
9
# File 'lib/params/company.rb', line 7

def company_id
  @company_id
end

#pageObject

Returns the value of attribute page.



7
8
9
# File 'lib/params/company.rb', line 7

def page
  @page
end

Instance Method Details

#available_keysObject



13
14
15
# File 'lib/params/company.rb', line 13

def available_keys
  i[access_token company_id]
end

#validate_required!Object



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

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

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