Class: MekariSso::CompanyUpdate

Inherits:
CompanyRegister show all
Defined in:
lib/params/company_update.rb

Instance Attribute Summary collapse

Attributes inherited from Config

#accept_language, #base_url, #client_id, #client_secret, #scope

Instance Method Summary collapse

Methods inherited from Config

#apply

Constructor Details

#initialize(options = nil) ⇒ CompanyUpdate

Returns a new instance of CompanyUpdate.



11
12
13
# File 'lib/params/company_update.rb', line 11

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_update.rb', line 7

def access_token
  @access_token
end

#billing_emailObject

Returns the value of attribute billing_email.



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

def billing_email
  @billing_email
end

#billing_nameObject

Returns the value of attribute billing_name.



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

def billing_name
  @billing_name
end

#billing_phoneObject

Returns the value of attribute billing_phone.



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

def billing_phone
  @billing_phone
end

#brand_nameObject

Returns the value of attribute brand_name.



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

def brand_name
  @brand_name
end

#company_idObject

Returns the value of attribute company_id.



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

def company_id
  @company_id
end

#emailObject

Returns the value of attribute email.



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

def email
  @email
end

#industry_idObject

Returns the value of attribute industry_id.



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

def industry_id
  @industry_id
end

#industry_nameObject

Returns the value of attribute industry_name.



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

def industry_name
  @industry_name
end

#main_addressObject

Returns the value of attribute main_address.



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

def main_address
  @main_address
end

#nameObject

Returns the value of attribute name.



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

def name
  @name
end

#phoneObject

Returns the value of attribute phone.



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

def phone
  @phone
end

#secondary_addressObject

Returns the value of attribute secondary_address.



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

def secondary_address
  @secondary_address
end

#tax_nameObject

Returns the value of attribute tax_name.



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

def tax_name
  @tax_name
end

#tax_numberObject

Returns the value of attribute tax_number.



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

def tax_number
  @tax_number
end

#user_idObject

Returns the value of attribute user_id.



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

def user_id
  @user_id
end

Instance Method Details

#available_keysObject



15
16
17
# File 'lib/params/company_update.rb', line 15

def available_keys
  super + %i[company_id]
end

#validate_required!Object



19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
# File 'lib/params/company_update.rb', line 19

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

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

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

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