Class: LWS::Auth::Company

Inherits:
Generic::Model show all
Defined in:
lib/lws/apps/auth.rb

Overview

The company class

Instance Attribute Summary collapse

Attributes inherited from Generic::Model

#created_at, #id, #updated_at, #url, #url_html

Method Summary

Methods inherited from Generic::Model

#deep_dup, #dig, #reload, #rollback, #save

Instance Attribute Details

#accountsArray<Account>

Returns the accounts that are assigned to the company.

Returns:

  • (Array<Account>)

    the accounts that are assigned to the company



141
# File 'lib/lws/apps/auth.rb', line 141

has_many :accounts

#activatedBoolean

Returns whether the company has been activated.

Returns:

  • (Boolean)

    whether the company has been activated



145
# File 'lib/lws/apps/auth.rb', line 145

attribute :activated

#addressString

Returns the address of the company (at least 2 characters long).

Returns:

  • (String)

    the address of the company (at least 2 characters long)



154
# File 'lib/lws/apps/auth.rb', line 154

attribute :address

#appsArray<App>

Returns the apps that are assigned to the company.

Returns:

  • (Array<App>)

    the apps that are assigned to the company



149
# File 'lib/lws/apps/auth.rb', line 149

has_many :apps

#cityString

Returns the city of the company (at least 2 characters long).

Returns:

  • (String)

    the city of the company (at least 2 characters long)



159
# File 'lib/lws/apps/auth.rb', line 159

attribute :city

#contact_personAccount

Returns the contact person of the company.

Returns:

  • (Account)

    the contact person of the company



163
164
165
# File 'lib/lws/apps/auth.rb', line 163

belongs_to :contact_person, class_name: "LWS::Auth::Account",
foreign_key: :contact_person_id,
uri: "accounts/:id"

#contact_person_idInteger

Returns the ID of the contact person of the company.

Returns:

  • (Integer)

    the ID of the contact person of the company



169
# File 'lib/lws/apps/auth.rb', line 169

attribute :contact_person_id

#contractsArray<Contract>

Returns the contracts of the company.

Returns:

  • (Array<Contract>)

    the contracts of the company



173
# File 'lib/lws/apps/auth.rb', line 173

has_many :contracts, uri: "companies/:company_id/contracts(/:id)"

#countryString

Returns the country of the company (at least 2 characters long).

Returns:

  • (String)

    the country of the company (at least 2 characters long)



178
# File 'lib/lws/apps/auth.rb', line 178

attribute :country

#expireBoolean

Returns whether the company is planned to be discontinued after the contract ends.

Returns:

  • (Boolean)

    whether the company is planned to be discontinued after the contract ends



183
# File 'lib/lws/apps/auth.rb', line 183

attribute :expire

#licensesArray<License>

Returns the licenses of the company.

Returns:

  • (Array<License>)

    the licenses of the company



187
# File 'lib/lws/apps/auth.rb', line 187

has_many :licenses, uri: "companies/:company_id/licenses(/:id)"

#nameString

Returns the name of the company (at least 2 characters long).

Returns:

  • (String)

    the name of the company (at least 2 characters long)



192
# File 'lib/lws/apps/auth.rb', line 192

attribute :name

#numberString

Returns the street address number of the company (at least 1 character long).

Returns:

  • (String)

    the street address number of the company (at least 1 character long)



197
# File 'lib/lws/apps/auth.rb', line 197

attribute :number

#parentCompany?

Returns the parenty company.

Returns:

  • (Company, nil)

    the parenty company



201
202
203
# File 'lib/lws/apps/auth.rb', line 201

belongs_to :parent, class_name: "LWS::Auth::Company",
foreign_key: :parent_id,
uri: "companies/:id"

#parent_idInteger?

Returns the ID of the parenty company.

Returns:

  • (Integer, nil)

    the ID of the parenty company



207
# File 'lib/lws/apps/auth.rb', line 207

attribute :parent_id

#password_expireInteger

Returns the number of days a password is valid for accounts of this company (0 is disabled).

Returns:

  • (Integer)

    the number of days a password is valid for accounts of this company (0 is disabled)



212
# File 'lib/lws/apps/auth.rb', line 212

attribute :password_expire

#telephone_numberString

Returns the telephone number of the company (at least 2 characters long).

Returns:

  • (String)

    the telephone number of the company (at least 2 characters long)



217
# File 'lib/lws/apps/auth.rb', line 217

attribute :telephone_number

#usage_reportsArray<UsageReport>

Returns the usage reports available/generated for the company.

Returns:

  • (Array<UsageReport>)

    the usage reports available/generated for the company



222
# File 'lib/lws/apps/auth.rb', line 222

has_many :usage_reports, uri: "companies/:company_id/reports(/:id)"

#uuidString

Returns the UUID of the company.

Returns:

  • (String)

    the UUID of the company



226
# File 'lib/lws/apps/auth.rb', line 226

attribute :uuid

#zip_codeString

Returns the zip code of the company (at least 2 characters long).

Returns:

  • (String)

    the zip code of the company (at least 2 characters long)



231
# File 'lib/lws/apps/auth.rb', line 231

attribute :zip_code