Class: LWS::Auth::Company

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

Overview

The company class

Instance Attribute Summary collapse

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



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

has_many :accounts

#activatedBoolean

Returns whether the company has been activated.

Returns:

  • (Boolean)

    whether the company has been activated



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

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)



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

attribute :address

#appsArray<App>

Returns the apps that are assigned to the company.

Returns:

  • (Array<App>)

    the apps that are assigned to the company



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

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)



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

attribute :city

#contact_personAccount

Returns the contact person of the company.

Returns:

  • (Account)

    the contact person of the company



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

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

#contact_person_idFixnum

Returns the ID of the contact person of the company.

Returns:

  • (Fixnum)

    the ID of the contact person of the company



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

attribute :contact_person_id

#contractsArray<Contract>

Returns the contracts of the company.

Returns:

  • (Array<Contract>)

    the contracts of the company



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

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)



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

attribute :country

#created_atString (readonly)

Returns the timestamp of when the company was created.

Returns:

  • (String)

    the timestamp of when the company was created



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

attribute :created_at

#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



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

attribute :expire

#idFixnum (readonly)

Returns the (unique) ID of the company.

Returns:

  • (Fixnum)

    the (unique) ID of the company



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

attribute :id

#licensesArray<License>

Returns the licenses of the company.

Returns:

  • (Array<License>)

    the licenses of the company



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

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)



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

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)



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

attribute :number

#parentCompany?

Returns the parenty company.

Returns:

  • (Company, nil)

    the parenty company



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

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

#parent_idFixnum?

Returns the ID of the parenty company.

Returns:

  • (Fixnum, nil)

    the ID of the parenty company



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

attribute :parent_id

#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)



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

attribute :telephone_number

#updated_atString (readonly)

Returns the timestamp of when the company was last updated.

Returns:

  • (String)

    the timestamp of when the company was last updated



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

attribute :updated_at

#usage_reportsArray<UsageReport>

Returns the usage reports available/generated for the company.

Returns:

  • (Array<UsageReport>)

    the usage reports available/generated for the company



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

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

#uuidString

Returns the UUID of the company.

Returns:

  • (String)

    the UUID of the company



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

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)



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

attribute :zip_code