Class: Verizon::ResourceUser
- Defined in:
- lib/verizon/models/resource_user.rb
Overview
ResourceUser Model.
Instance Attribute Summary collapse
-
#accountclientid ⇒ String
Not used in this release, future functionality.
-
#ackterms ⇒ TrueClass | FalseClass
Indicates if terms are agreed to (true) or not.
-
#acktermson ⇒ DateTime
Indicates if terms are agreed to (true) or not.
-
#billingaccountid ⇒ String
The billing account ID.
-
#createdon ⇒ DateTime
Timestamp of the record.
-
#credentialsid ⇒ String
User credentials.
-
#credentialstype ⇒ String
The type of credential represented by the ID.
-
#customdata ⇒ Hash[String, Object]
Name/value pair, where the value is client defined.
-
#description ⇒ String
a short description.
-
#displayname ⇒ String
the user name value to display.
-
#email ⇒ String
Contact email for the group.
-
#firstname ⇒ String
The first name in the user record.
-
#foreignid ⇒ String
UUID of the ECPD account the user belongs to.
-
#id ⇒ String
UUID of the user record, assigned at creation.
-
#lastname ⇒ String
The last name in the user record.
-
#lastupdated ⇒ DateTime
Timestamp of the record.
-
#mdn ⇒ String
The Mobile Directory Number.
-
#middlename ⇒ String
optional field for middle name or initial.
-
#name ⇒ String
User defined name of the record.
-
#secondarybillingaccountids ⇒ Array[String]
Virtual field; will not be used in this implementation.
-
#state ⇒ String
The current status of the device or transaction and will be ‘success` or `failed`.
-
#version ⇒ String
The resource version.
-
#versionid ⇒ String
The UUID of the resource version.
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(createdon:, credentialstype:, foreignid:, lastupdated:, versionid:, accountclientid: SKIP, ackterms: SKIP, acktermson: SKIP, billingaccountid: SKIP, credentialsid: SKIP, customdata: SKIP, description: SKIP, displayname: SKIP, email: SKIP, firstname: SKIP, id: SKIP, lastname: SKIP, mdn: SKIP, middlename: SKIP, name: SKIP, secondarybillingaccountids: SKIP, state: SKIP, version: SKIP) ⇒ ResourceUser
constructor
A new instance of ResourceUser.
-
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
- #to_custom_acktermson ⇒ Object
- #to_custom_createdon ⇒ Object
- #to_custom_lastupdated ⇒ Object
-
#to_s ⇒ Object
Provides a human-readable string representation of the object.
Methods inherited from BaseModel
#check_for_conflict, #process_additional_properties, #process_array, #process_basic_value, #process_hash, #to_hash, #to_json
Constructor Details
#initialize(createdon:, credentialstype:, foreignid:, lastupdated:, versionid:, accountclientid: SKIP, ackterms: SKIP, acktermson: SKIP, billingaccountid: SKIP, credentialsid: SKIP, customdata: SKIP, description: SKIP, displayname: SKIP, email: SKIP, firstname: SKIP, id: SKIP, lastname: SKIP, mdn: SKIP, middlename: SKIP, name: SKIP, secondarybillingaccountids: SKIP, state: SKIP, version: SKIP) ⇒ ResourceUser
Returns a new instance of ResourceUser.
166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 |
# File 'lib/verizon/models/resource_user.rb', line 166 def initialize(createdon:, credentialstype:, foreignid:, lastupdated:, versionid:, accountclientid: SKIP, ackterms: SKIP, acktermson: SKIP, billingaccountid: SKIP, credentialsid: SKIP, customdata: SKIP, description: SKIP, displayname: SKIP, email: SKIP, firstname: SKIP, id: SKIP, lastname: SKIP, mdn: SKIP, middlename: SKIP, name: SKIP, secondarybillingaccountids: SKIP, state: SKIP, version: SKIP) @accountclientid = accountclientid unless accountclientid == SKIP @ackterms = ackterms unless ackterms == SKIP @acktermson = acktermson unless acktermson == SKIP @billingaccountid = billingaccountid unless billingaccountid == SKIP @createdon = createdon @credentialsid = credentialsid unless credentialsid == SKIP @credentialstype = credentialstype @customdata = customdata unless customdata == SKIP @description = description unless description == SKIP @displayname = displayname unless displayname == SKIP @email = email unless email == SKIP @firstname = firstname unless firstname == SKIP @foreignid = foreignid @id = id unless id == SKIP @lastname = lastname unless lastname == SKIP @lastupdated = lastupdated @mdn = mdn unless mdn == SKIP @middlename = middlename unless middlename == SKIP @name = name unless name == SKIP unless secondarybillingaccountids == SKIP @secondarybillingaccountids = secondarybillingaccountids end @state = state unless state == SKIP @version = version unless version == SKIP @versionid = versionid end |
Instance Attribute Details
#accountclientid ⇒ String
Not used in this release, future functionality
15 16 17 |
# File 'lib/verizon/models/resource_user.rb', line 15 def accountclientid @accountclientid end |
#ackterms ⇒ TrueClass | FalseClass
Indicates if terms are agreed to (true) or not
19 20 21 |
# File 'lib/verizon/models/resource_user.rb', line 19 def ackterms @ackterms end |
#acktermson ⇒ DateTime
Indicates if terms are agreed to (true) or not
23 24 25 |
# File 'lib/verizon/models/resource_user.rb', line 23 def acktermson @acktermson end |
#billingaccountid ⇒ String
The billing account ID. This is the same value as the Account ID
27 28 29 |
# File 'lib/verizon/models/resource_user.rb', line 27 def billingaccountid @billingaccountid end |
#createdon ⇒ DateTime
Timestamp of the record
31 32 33 |
# File 'lib/verizon/models/resource_user.rb', line 31 def createdon @createdon end |
#credentialsid ⇒ String
User credentials. The only valid value is an email address
35 36 37 |
# File 'lib/verizon/models/resource_user.rb', line 35 def credentialsid @credentialsid end |
#credentialstype ⇒ String
The type of credential represented by the ID. The only valid value is ‘email`
40 41 42 |
# File 'lib/verizon/models/resource_user.rb', line 40 def credentialstype @credentialstype end |
#customdata ⇒ Hash[String, Object]
Name/value pair, where the value is client defined. The purpose is to keep track of current state per device action.
45 46 47 |
# File 'lib/verizon/models/resource_user.rb', line 45 def customdata @customdata end |
#description ⇒ String
a short description
49 50 51 |
# File 'lib/verizon/models/resource_user.rb', line 49 def description @description end |
#displayname ⇒ String
the user name value to display
53 54 55 |
# File 'lib/verizon/models/resource_user.rb', line 53 def displayname @displayname end |
#email ⇒ String
Contact email for the group
57 58 59 |
# File 'lib/verizon/models/resource_user.rb', line 57 def email @email end |
#firstname ⇒ String
The first name in the user record
61 62 63 |
# File 'lib/verizon/models/resource_user.rb', line 61 def firstname @firstname end |
#foreignid ⇒ String
UUID of the ECPD account the user belongs to
65 66 67 |
# File 'lib/verizon/models/resource_user.rb', line 65 def foreignid @foreignid end |
#id ⇒ String
UUID of the user record, assigned at creation
69 70 71 |
# File 'lib/verizon/models/resource_user.rb', line 69 def id @id end |
#lastname ⇒ String
The last name in the user record
73 74 75 |
# File 'lib/verizon/models/resource_user.rb', line 73 def lastname @lastname end |
#lastupdated ⇒ DateTime
Timestamp of the record
77 78 79 |
# File 'lib/verizon/models/resource_user.rb', line 77 def lastupdated @lastupdated end |
#mdn ⇒ String
The Mobile Directory Number
81 82 83 |
# File 'lib/verizon/models/resource_user.rb', line 81 def mdn @mdn end |
#middlename ⇒ String
optional field for middle name or initial
85 86 87 |
# File 'lib/verizon/models/resource_user.rb', line 85 def middlename @middlename end |
#name ⇒ String
User defined name of the record
89 90 91 |
# File 'lib/verizon/models/resource_user.rb', line 89 def name @name end |
#secondarybillingaccountids ⇒ Array[String]
Virtual field; will not be used in this implementation
93 94 95 |
# File 'lib/verizon/models/resource_user.rb', line 93 def secondarybillingaccountids @secondarybillingaccountids end |
#state ⇒ String
The current status of the device or transaction and will be ‘success` or `failed`
98 99 100 |
# File 'lib/verizon/models/resource_user.rb', line 98 def state @state end |
#version ⇒ String
The resource version
102 103 104 |
# File 'lib/verizon/models/resource_user.rb', line 102 def version @version end |
#versionid ⇒ String
The UUID of the resource version
106 107 108 |
# File 'lib/verizon/models/resource_user.rb', line 106 def versionid @versionid end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 |
# File 'lib/verizon/models/resource_user.rb', line 202 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. createdon = if hash.key?('createdon') (DateTimeHelper.from_rfc3339(hash['createdon']) if hash['createdon']) end credentialstype = hash.key?('credentialstype') ? hash['credentialstype'] : nil foreignid = hash.key?('foreignid') ? hash['foreignid'] : nil lastupdated = if hash.key?('lastupdated') (DateTimeHelper.from_rfc3339(hash['lastupdated']) if hash['lastupdated']) end versionid = hash.key?('versionid') ? hash['versionid'] : nil accountclientid = hash.key?('accountclientid') ? hash['accountclientid'] : SKIP ackterms = hash.key?('ackterms') ? hash['ackterms'] : SKIP acktermson = if hash.key?('acktermson') (DateTimeHelper.from_rfc3339(hash['acktermson']) if hash['acktermson']) else SKIP end billingaccountid = hash.key?('billingaccountid') ? hash['billingaccountid'] : SKIP credentialsid = hash.key?('credentialsid') ? hash['credentialsid'] : SKIP customdata = hash.key?('customdata') ? hash['customdata'] : SKIP description = hash.key?('description') ? hash['description'] : SKIP displayname = hash.key?('displayname') ? hash['displayname'] : SKIP email = hash.key?('email') ? hash['email'] : SKIP firstname = hash.key?('firstname') ? hash['firstname'] : SKIP id = hash.key?('id') ? hash['id'] : SKIP lastname = hash.key?('lastname') ? hash['lastname'] : SKIP mdn = hash.key?('mdn') ? hash['mdn'] : SKIP middlename = hash.key?('middlename') ? hash['middlename'] : SKIP name = hash.key?('name') ? hash['name'] : SKIP secondarybillingaccountids = hash.key?('secondarybillingaccountids') ? hash['secondarybillingaccountids'] : SKIP state = hash.key?('state') ? hash['state'] : SKIP version = hash.key?('version') ? hash['version'] : SKIP # Create object from extracted values. ResourceUser.new(createdon: createdon, credentialstype: credentialstype, foreignid: foreignid, lastupdated: lastupdated, versionid: versionid, accountclientid: accountclientid, ackterms: ackterms, acktermson: acktermson, billingaccountid: billingaccountid, credentialsid: credentialsid, customdata: customdata, description: description, displayname: displayname, email: email, firstname: firstname, id: id, lastname: lastname, mdn: mdn, middlename: middlename, name: name, secondarybillingaccountids: secondarybillingaccountids, state: state, version: version) end |
.names ⇒ Object
A mapping from model property names to API property names.
109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 |
# File 'lib/verizon/models/resource_user.rb', line 109 def self.names @_hash = {} if @_hash.nil? @_hash['accountclientid'] = 'accountclientid' @_hash['ackterms'] = 'ackterms' @_hash['acktermson'] = 'acktermson' @_hash['billingaccountid'] = 'billingaccountid' @_hash['createdon'] = 'createdon' @_hash['credentialsid'] = 'credentialsid' @_hash['credentialstype'] = 'credentialstype' @_hash['customdata'] = 'customdata' @_hash['description'] = 'description' @_hash['displayname'] = 'displayname' @_hash['email'] = 'email' @_hash['firstname'] = 'firstname' @_hash['foreignid'] = 'foreignid' @_hash['id'] = 'id' @_hash['lastname'] = 'lastname' @_hash['lastupdated'] = 'lastupdated' @_hash['mdn'] = 'mdn' @_hash['middlename'] = 'middlename' @_hash['name'] = 'name' @_hash['secondarybillingaccountids'] = 'secondarybillingaccountids' @_hash['state'] = 'state' @_hash['version'] = 'version' @_hash['versionid'] = 'versionid' @_hash end |
.nullables ⇒ Object
An array for nullable fields
162 163 164 |
# File 'lib/verizon/models/resource_user.rb', line 162 def self.nullables [] end |
.optionals ⇒ Object
An array for optional fields
138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 |
# File 'lib/verizon/models/resource_user.rb', line 138 def self.optionals %w[ accountclientid ackterms acktermson billingaccountid credentialsid customdata description displayname email firstname id lastname mdn middlename name secondarybillingaccountids state version ] end |
Instance Method Details
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
294 295 296 297 298 299 300 301 302 303 304 305 306 307 |
# File 'lib/verizon/models/resource_user.rb', line 294 def inspect class_name = self.class.name.split('::').last "<#{class_name} accountclientid: #{@accountclientid.inspect}, ackterms:"\ " #{@ackterms.inspect}, acktermson: #{@acktermson.inspect}, billingaccountid:"\ " #{@billingaccountid.inspect}, createdon: #{@createdon.inspect}, credentialsid:"\ " #{@credentialsid.inspect}, credentialstype: #{@credentialstype.inspect}, customdata:"\ " #{@customdata.inspect}, description: #{@description.inspect}, displayname:"\ " #{@displayname.inspect}, email: #{@email.inspect}, firstname: #{@firstname.inspect},"\ " foreignid: #{@foreignid.inspect}, id: #{@id.inspect}, lastname: #{@lastname.inspect},"\ " lastupdated: #{@lastupdated.inspect}, mdn: #{@mdn.inspect}, middlename:"\ " #{@middlename.inspect}, name: #{@name.inspect}, secondarybillingaccountids:"\ " #{@secondarybillingaccountids.inspect}, state: #{@state.inspect}, version:"\ " #{@version.inspect}, versionid: #{@versionid.inspect}>" end |
#to_custom_acktermson ⇒ Object
268 269 270 |
# File 'lib/verizon/models/resource_user.rb', line 268 def to_custom_acktermson DateTimeHelper.to_rfc3339(acktermson) end |
#to_custom_createdon ⇒ Object
272 273 274 |
# File 'lib/verizon/models/resource_user.rb', line 272 def to_custom_createdon DateTimeHelper.to_rfc3339(createdon) end |
#to_custom_lastupdated ⇒ Object
276 277 278 |
# File 'lib/verizon/models/resource_user.rb', line 276 def to_custom_lastupdated DateTimeHelper.to_rfc3339(lastupdated) end |
#to_s ⇒ Object
Provides a human-readable string representation of the object.
281 282 283 284 285 286 287 288 289 290 291 |
# File 'lib/verizon/models/resource_user.rb', line 281 def to_s class_name = self.class.name.split('::').last "<#{class_name} accountclientid: #{@accountclientid}, ackterms: #{@ackterms}, acktermson:"\ " #{@acktermson}, billingaccountid: #{@billingaccountid}, createdon: #{@createdon},"\ " credentialsid: #{@credentialsid}, credentialstype: #{@credentialstype}, customdata:"\ " #{@customdata}, description: #{@description}, displayname: #{@displayname}, email:"\ " #{@email}, firstname: #{@firstname}, foreignid: #{@foreignid}, id: #{@id}, lastname:"\ " #{@lastname}, lastupdated: #{@lastupdated}, mdn: #{@mdn}, middlename: #{@middlename},"\ " name: #{@name}, secondarybillingaccountids: #{@secondarybillingaccountids}, state:"\ " #{@state}, version: #{@version}, versionid: #{@versionid}>" end |