Class: LWS::Auth::Company
- Inherits:
-
Generic::Model
- Object
- Spyke::Base
- Generic::Model
- LWS::Auth::Company
- Defined in:
- lib/lws/apps/auth.rb
Overview
The company class
Instance Attribute Summary collapse
-
#account_ids ⇒ Array<Integer>
The IDs of the accounts that are assigned to the company.
-
#accounts ⇒ Array<Account>
The accounts that are assigned to the company.
-
#activated ⇒ Boolean
Whether the company has been activated.
-
#address ⇒ String
The address of the company (at least 2 characters long).
-
#app_ids ⇒ Array<Integer>
The IDs of the apps that are assigned to the company.
-
#apps ⇒ Array<App>
The apps that are assigned to the company.
-
#city ⇒ String
The city of the company (at least 2 characters long).
-
#contact_person ⇒ Account
The contact person of the company.
-
#contact_person_id ⇒ Integer
The ID of the contact person of the company.
-
#contracts ⇒ Array<Contract>
The contracts of the company.
-
#country ⇒ String
The country of the company (at least 2 characters long).
-
#expire ⇒ Boolean
Whether the company is planned to be discontinued after the contract ends.
-
#licence_ids ⇒ Array<Integer>
The IDs of the licenses that provide access to the app.
-
#licenses ⇒ Array<License>
The licenses of the company.
-
#name ⇒ String
The name of the company (at least 2 characters long).
-
#number ⇒ String
The street address number of the company (at least 1 character long).
-
#parent ⇒ Company?
The parenty company.
-
#parent_id ⇒ Integer?
The ID of the parenty company.
-
#password_expire ⇒ Integer
The number of days a password is valid for accounts of this company (0 is disabled).
-
#telephone_number ⇒ String
The telephone number of the company (at least 2 characters long).
-
#usage_report_ids ⇒ Array<Integer>
The IDs of the usage reports available/generated for the company.
-
#usage_reports ⇒ Array<UsageReport>
The usage reports available/generated for the company.
-
#uuid ⇒ String
The UUID of the company.
-
#zip_code ⇒ String
The zip code of the company (at least 2 characters long).
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
#account_ids ⇒ Array<Integer>
Returns the IDs of the accounts that are assigned to the company.
159 |
# File 'lib/lws/apps/auth.rb', line 159 attribute :account_ids |
#accounts ⇒ Array<Account>
Returns the accounts that are assigned to the company.
163 |
# File 'lib/lws/apps/auth.rb', line 163 has_many :accounts |
#activated ⇒ Boolean
Returns whether the company has been activated.
167 |
# File 'lib/lws/apps/auth.rb', line 167 attribute :activated |
#address ⇒ String
Returns the address of the company (at least 2 characters long).
181 |
# File 'lib/lws/apps/auth.rb', line 181 attribute :address |
#app_ids ⇒ Array<Integer>
Returns the IDs of the apps that are assigned to the company.
172 |
# File 'lib/lws/apps/auth.rb', line 172 attribute :app_ids |
#apps ⇒ Array<App>
Returns the apps that are assigned to the company.
176 |
# File 'lib/lws/apps/auth.rb', line 176 has_many :apps |
#city ⇒ String
Returns the city of the company (at least 2 characters long).
186 |
# File 'lib/lws/apps/auth.rb', line 186 attribute :city |
#contact_person ⇒ Account
Returns the contact person of the company.
190 191 192 |
# File 'lib/lws/apps/auth.rb', line 190 belongs_to :contact_person, class_name: "LWS::Auth::Account", foreign_key: :contact_person_id, uri: "accounts/:id" |
#contact_person_id ⇒ Integer
Returns the ID of the contact person of the company.
196 |
# File 'lib/lws/apps/auth.rb', line 196 attribute :contact_person_id |
#contracts ⇒ Array<Contract>
Returns the contracts of the company.
200 |
# File 'lib/lws/apps/auth.rb', line 200 attribute :contract_ids |
#country ⇒ String
Returns the country of the company (at least 2 characters long).
209 |
# File 'lib/lws/apps/auth.rb', line 209 attribute :country |
#expire ⇒ Boolean
Returns whether the company is planned to be discontinued after the contract ends.
214 |
# File 'lib/lws/apps/auth.rb', line 214 attribute :expire |
#licence_ids ⇒ Array<Integer>
Returns the IDs of the licenses that provide access to the app.
218 |
# File 'lib/lws/apps/auth.rb', line 218 attribute :license_ids |
#licenses ⇒ Array<License>
Returns the licenses of the company.
222 |
# File 'lib/lws/apps/auth.rb', line 222 has_many :licenses, uri: "companies/:company_id/licenses(/:id)" |
#name ⇒ String
Returns the name of the company (at least 2 characters long).
227 |
# File 'lib/lws/apps/auth.rb', line 227 attribute :name |
#number ⇒ String
Returns the street address number of the company (at least 1 character long).
232 |
# File 'lib/lws/apps/auth.rb', line 232 attribute :number |
#parent ⇒ Company?
Returns the parenty company.
236 237 238 |
# File 'lib/lws/apps/auth.rb', line 236 belongs_to :parent, class_name: "LWS::Auth::Company", foreign_key: :parent_id, uri: "companies/:id" |
#parent_id ⇒ Integer?
Returns the ID of the parenty company.
242 |
# File 'lib/lws/apps/auth.rb', line 242 attribute :parent_id |
#password_expire ⇒ Integer
Returns the number of days a password is valid for accounts of this company (0 is disabled).
247 |
# File 'lib/lws/apps/auth.rb', line 247 attribute :password_expire |
#telephone_number ⇒ String
Returns the telephone number of the company (at least 2 characters long).
252 |
# File 'lib/lws/apps/auth.rb', line 252 attribute :telephone_number |
#usage_report_ids ⇒ Array<Integer>
Returns the IDs of the usage reports available/generated for the company.
257 |
# File 'lib/lws/apps/auth.rb', line 257 attribute :usage_report_ids |
#usage_reports ⇒ Array<UsageReport>
Returns the usage reports available/generated for the company.
262 |
# File 'lib/lws/apps/auth.rb', line 262 has_many :usage_reports, uri: "companies/:company_id/reports(/:id)" |
#uuid ⇒ String
Returns the UUID of the company.
266 |
# File 'lib/lws/apps/auth.rb', line 266 attribute :uuid |
#zip_code ⇒ String
Returns the zip code of the company (at least 2 characters long).
271 |
# File 'lib/lws/apps/auth.rb', line 271 attribute :zip_code |