Class: ShellDataReportingApIs::EIDAccess
- Inherits:
-
BaseModel
- Object
- CoreLibrary::BaseModel
- BaseModel
- ShellDataReportingApIs::EIDAccess
- Defined in:
- lib/shell_data_reporting_ap_is/models/eid_access.rb
Overview
EIDAccess Model.
Instance Attribute Summary collapse
-
#account_group_id ⇒ String
Identifier for the EID account group configured for the user.
-
#col_co_code ⇒ Integer
Collecting company Code.
-
#col_co_id ⇒ String
Collecting company id.
Class Method Summary collapse
-
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
-
.names ⇒ Object
A mapping from model property names to API property names.
-
.nullables ⇒ Object
An array for nullable fields.
-
.optionals ⇒ Object
An array for optional fields.
Instance Method Summary collapse
-
#initialize(col_co_id = SKIP, col_co_code = SKIP, account_group_id = SKIP) ⇒ EIDAccess
constructor
A new instance of EIDAccess.
Methods inherited from BaseModel
Constructor Details
#initialize(col_co_id = SKIP, col_co_code = SKIP, account_group_id = SKIP) ⇒ EIDAccess
Returns a new instance of EIDAccess.
51 52 53 54 55 56 |
# File 'lib/shell_data_reporting_ap_is/models/eid_access.rb', line 51 def initialize(col_co_id = SKIP, col_co_code = SKIP, account_group_id = SKIP) @col_co_id = col_co_id unless col_co_id == SKIP @col_co_code = col_co_code unless col_co_code == SKIP @account_group_id = account_group_id unless account_group_id == SKIP end |
Instance Attribute Details
#account_group_id ⇒ String
Identifier for the EID account group configured for the user.
22 23 24 |
# File 'lib/shell_data_reporting_ap_is/models/eid_access.rb', line 22 def account_group_id @account_group_id end |
#col_co_code ⇒ Integer
Collecting company Code
18 19 20 |
# File 'lib/shell_data_reporting_ap_is/models/eid_access.rb', line 18 def col_co_code @col_co_code end |
#col_co_id ⇒ String
Collecting company id.
14 15 16 |
# File 'lib/shell_data_reporting_ap_is/models/eid_access.rb', line 14 def col_co_id @col_co_id end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
59 60 61 62 63 64 65 66 67 68 69 70 71 72 |
# File 'lib/shell_data_reporting_ap_is/models/eid_access.rb', line 59 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. col_co_id = hash.key?('ColCoId') ? hash['ColCoId'] : SKIP col_co_code = hash.key?('ColCoCode') ? hash['ColCoCode'] : SKIP account_group_id = hash.key?('AccountGroupId') ? hash['AccountGroupId'] : SKIP # Create object from extracted values. EIDAccess.new(col_co_id, col_co_code, account_group_id) end |
.names ⇒ Object
A mapping from model property names to API property names.
25 26 27 28 29 30 31 |
# File 'lib/shell_data_reporting_ap_is/models/eid_access.rb', line 25 def self.names @_hash = {} if @_hash.nil? @_hash['col_co_id'] = 'ColCoId' @_hash['col_co_code'] = 'ColCoCode' @_hash['account_group_id'] = 'AccountGroupId' @_hash end |
.nullables ⇒ Object
An array for nullable fields
43 44 45 46 47 48 49 |
# File 'lib/shell_data_reporting_ap_is/models/eid_access.rb', line 43 def self.nullables %w[ col_co_id col_co_code account_group_id ] end |
.optionals ⇒ Object
An array for optional fields
34 35 36 37 38 39 40 |
# File 'lib/shell_data_reporting_ap_is/models/eid_access.rb', line 34 def self.optionals %w[ col_co_id col_co_code account_group_id ] end |