Class: ShellDataReportingApIs::AccountAccess
- Inherits:
-
BaseModel
- Object
- CoreLibrary::BaseModel
- BaseModel
- ShellDataReportingApIs::AccountAccess
- Defined in:
- lib/shell_data_reporting_ap_is/models/account_access.rb
Overview
AccountAccess Model.
Instance Attribute Summary collapse
-
#account_id ⇒ Integer
Account Id to which the user has access.
-
#account_name ⇒ String
Name of the Account to which the user has access.
-
#account_number ⇒ String
Account Number to which the user has access.
-
#colco_code ⇒ Integer
Collecting company code.
-
#colco_id ⇒ Integer
Collecting company id.
-
#payer_id ⇒ Integer
Payer Id to which the user has access.
-
#payer_name ⇒ String
Name of the Payer to which the user has access.
-
#payer_number ⇒ String
Payer Number to which the user has access.
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(colco_id = SKIP, colco_code = SKIP, payer_id = SKIP, payer_number = SKIP, payer_name = SKIP, account_id = SKIP, account_number = SKIP, account_name = SKIP) ⇒ AccountAccess
constructor
A new instance of AccountAccess.
Methods inherited from BaseModel
Constructor Details
#initialize(colco_id = SKIP, colco_code = SKIP, payer_id = SKIP, payer_number = SKIP, payer_name = SKIP, account_id = SKIP, account_number = SKIP, account_name = SKIP) ⇒ AccountAccess
Returns a new instance of AccountAccess.
85 86 87 88 89 90 91 92 93 94 95 96 |
# File 'lib/shell_data_reporting_ap_is/models/account_access.rb', line 85 def initialize(colco_id = SKIP, colco_code = SKIP, payer_id = SKIP, payer_number = SKIP, payer_name = SKIP, account_id = SKIP, account_number = SKIP, account_name = SKIP) @colco_id = colco_id unless colco_id == SKIP @colco_code = colco_code unless colco_code == SKIP @payer_id = payer_id unless payer_id == SKIP @payer_number = payer_number unless payer_number == SKIP @payer_name = payer_name unless payer_name == SKIP @account_id = account_id unless account_id == SKIP @account_number = account_number unless account_number == SKIP @account_name = account_name unless account_name == SKIP end |
Instance Attribute Details
#account_id ⇒ Integer
Account Id to which the user has access
34 35 36 |
# File 'lib/shell_data_reporting_ap_is/models/account_access.rb', line 34 def account_id @account_id end |
#account_name ⇒ String
Name of the Account to which the user has access
42 43 44 |
# File 'lib/shell_data_reporting_ap_is/models/account_access.rb', line 42 def account_name @account_name end |
#account_number ⇒ String
Account Number to which the user has access
38 39 40 |
# File 'lib/shell_data_reporting_ap_is/models/account_access.rb', line 38 def account_number @account_number end |
#colco_code ⇒ Integer
Collecting company code.
18 19 20 |
# File 'lib/shell_data_reporting_ap_is/models/account_access.rb', line 18 def colco_code @colco_code end |
#colco_id ⇒ Integer
Collecting company id.
14 15 16 |
# File 'lib/shell_data_reporting_ap_is/models/account_access.rb', line 14 def colco_id @colco_id end |
#payer_id ⇒ Integer
Payer Id to which the user has access
22 23 24 |
# File 'lib/shell_data_reporting_ap_is/models/account_access.rb', line 22 def payer_id @payer_id end |
#payer_name ⇒ String
Name of the Payer to which the user has access
30 31 32 |
# File 'lib/shell_data_reporting_ap_is/models/account_access.rb', line 30 def payer_name @payer_name end |
#payer_number ⇒ String
Payer Number to which the user has access
26 27 28 |
# File 'lib/shell_data_reporting_ap_is/models/account_access.rb', line 26 def payer_number @payer_number end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 |
# File 'lib/shell_data_reporting_ap_is/models/account_access.rb', line 99 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. colco_id = hash.key?('ColcoId') ? hash['ColcoId'] : SKIP colco_code = hash.key?('ColcoCode') ? hash['ColcoCode'] : SKIP payer_id = hash.key?('PayerId') ? hash['PayerId'] : SKIP payer_number = hash.key?('PayerNumber') ? hash['PayerNumber'] : SKIP payer_name = hash.key?('PayerName') ? hash['PayerName'] : SKIP account_id = hash.key?('AccountId') ? hash['AccountId'] : SKIP account_number = hash.key?('AccountNumber') ? hash['AccountNumber'] : SKIP account_name = hash.key?('AccountName') ? hash['AccountName'] : SKIP # Create object from extracted values. AccountAccess.new(colco_id, colco_code, payer_id, payer_number, payer_name, account_id, account_number, account_name) end |
.names ⇒ Object
A mapping from model property names to API property names.
45 46 47 48 49 50 51 52 53 54 55 56 |
# File 'lib/shell_data_reporting_ap_is/models/account_access.rb', line 45 def self.names @_hash = {} if @_hash.nil? @_hash['colco_id'] = 'ColcoId' @_hash['colco_code'] = 'ColcoCode' @_hash['payer_id'] = 'PayerId' @_hash['payer_number'] = 'PayerNumber' @_hash['payer_name'] = 'PayerName' @_hash['account_id'] = 'AccountId' @_hash['account_number'] = 'AccountNumber' @_hash['account_name'] = 'AccountName' @_hash end |
.nullables ⇒ Object
An array for nullable fields
73 74 75 76 77 78 79 80 81 82 83 |
# File 'lib/shell_data_reporting_ap_is/models/account_access.rb', line 73 def self.nullables %w[ colco_id colco_code payer_id payer_number payer_name account_id account_name ] end |
.optionals ⇒ Object
An array for optional fields
59 60 61 62 63 64 65 66 67 68 69 70 |
# File 'lib/shell_data_reporting_ap_is/models/account_access.rb', line 59 def self.optionals %w[ colco_id colco_code payer_id payer_number payer_name account_id account_number account_name ] end |