Class: TrinsicApi::LaWalletProviderOutput
- Inherits:
-
Object
- Object
- TrinsicApi::LaWalletProviderOutput
- Defined in:
- lib/trinsic_api/models/la_wallet_provider_output.rb
Overview
Exposed properties for the ‘usa-louisiana-wallet` Provider which do not directly map to the normalized IdentityData model.
Instance Attribute Summary collapse
-
#address_city ⇒ Object
The address’ city from the LA Wallet credential.
-
#address_line1 ⇒ Object
The address’ line 1 from the LA Wallet credential.
-
#address_line2 ⇒ Object
The address’ line 2 from the LA Wallet credential.
-
#address_state ⇒ Object
The address’ state from the LA Wallet credential.
-
#address_zip ⇒ Object
The address’ ZIP from the LA Wallet credential.
-
#audit_number ⇒ Object
The 4-digit audit number of the driver’s license used to create the LA Wallet credential.
-
#coarse_age ⇒ Object
The coarse age returned by LA Wallet for this credential Possible values: - "Under 18" - "Under 21" - "Over 21".
-
#county ⇒ Object
The county ("parish") code from the LA Wallet credential.
-
#date_of_birth ⇒ Object
The date of birth from the LA Wallet credential.
-
#drivers_license_number ⇒ Object
The number of the driver’s license used to create the LA Wallet credential.
-
#expiration_date ⇒ Object
The expiration date of the driver’s license used to create the LA Wallet credential.
-
#first_name ⇒ Object
The first name from the LA Wallet credential.
-
#issue_date ⇒ Object
The issue date of the driver’s license used to create the LA Wallet credential.
-
#last_name ⇒ Object
The last name from the LA Wallet credential.
-
#license_class ⇒ Object
The license class from the LA Wallet credential Possible values: - "A": Commercial Driver’s License, Combination Vehicles - "B": Commercial Driver’s License, Heavy Straight Vehicle - "C": Commercial Driver’s License, Light Straight Vehicle - "D": Chauffeur’s Driver’s License - "E": Driver’s License for Personal Vehicle.
-
#license_status ⇒ Object
The license status from the LA Wallet credential.
-
#middle_name ⇒ Object
The middle name from the LA Wallet credential.
-
#sex ⇒ Object
The sex from the LA Wallet credential.
Class Method Summary collapse
-
._deserialize(type, value) ⇒ Object
Deserializes the data based on type.
-
.acceptable_attribute_map ⇒ Object
Returns attribute mapping this model knows about.
-
.acceptable_attributes ⇒ Object
Returns all the JSON keys this model knows about.
-
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
-
.build_from_hash(attributes) ⇒ Object
Builds the object from hash.
-
.openapi_nullable ⇒ Object
List of attributes with nullable: true.
-
.openapi_types ⇒ Object
Attribute type mapping.
Instance Method Summary collapse
-
#==(o) ⇒ Object
Checks equality by comparing each attribute.
-
#_to_hash(value) ⇒ Hash
Outputs non-array value in the form of hash For object, use to_hash.
- #eql?(o) ⇒ Boolean
-
#hash ⇒ Integer
Calculates hash code according to all attributes.
-
#initialize(attributes = {}) ⇒ LaWalletProviderOutput
constructor
Initializes the object.
-
#list_invalid_properties ⇒ Object
Show invalid properties with the reasons.
-
#to_body ⇒ Hash
to_body is an alias to to_hash (backward compatibility).
-
#to_hash ⇒ Hash
Returns the object in the form of hash.
-
#to_s ⇒ String
Returns the string representation of the object.
-
#valid? ⇒ Boolean
Check to see if the all the properties in the model are valid.
Constructor Details
#initialize(attributes = {}) ⇒ LaWalletProviderOutput
Initializes the object
140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 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 200 201 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 |
# File 'lib/trinsic_api/models/la_wallet_provider_output.rb', line 140 def initialize(attributes = {}) if (!attributes.is_a?(Hash)) fail ArgumentError, "The input argument (attributes) must be a hash in `TrinsicApi::LaWalletProviderOutput` initialize method" end # check to see if the attribute exists and convert string to symbol for hash key acceptable_attribute_map = self.class.acceptable_attribute_map attributes = attributes.each_with_object({}) { |(k, v), h| if (!acceptable_attribute_map.key?(k.to_sym)) fail ArgumentError, "`#{k}` is not a valid attribute in `TrinsicApi::LaWalletProviderOutput`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect end h[k.to_sym] = v } if attributes.key?(:'drivers_license_number') self.drivers_license_number = attributes[:'drivers_license_number'] else self.drivers_license_number = nil end if attributes.key?(:'issue_date') self.issue_date = attributes[:'issue_date'] else self.issue_date = nil end if attributes.key?(:'expiration_date') self.expiration_date = attributes[:'expiration_date'] else self.expiration_date = nil end if attributes.key?(:'audit_number') self.audit_number = attributes[:'audit_number'] else self.audit_number = nil end if attributes.key?(:'license_status') self.license_status = attributes[:'license_status'] else self.license_status = nil end if attributes.key?(:'license_class') self.license_class = attributes[:'license_class'] else self.license_class = nil end if attributes.key?(:'first_name') self.first_name = attributes[:'first_name'] else self.first_name = nil end if attributes.key?(:'middle_name') self.middle_name = attributes[:'middle_name'] else self.middle_name = nil end if attributes.key?(:'last_name') self.last_name = attributes[:'last_name'] else self.last_name = nil end if attributes.key?(:'date_of_birth') self.date_of_birth = attributes[:'date_of_birth'] else self.date_of_birth = nil end if attributes.key?(:'sex') self.sex = attributes[:'sex'] else self.sex = nil end if attributes.key?(:'address_line1') self.address_line1 = attributes[:'address_line1'] else self.address_line1 = nil end if attributes.key?(:'address_line2') self.address_line2 = attributes[:'address_line2'] end if attributes.key?(:'address_city') self.address_city = attributes[:'address_city'] else self.address_city = nil end if attributes.key?(:'address_state') self.address_state = attributes[:'address_state'] else self.address_state = nil end if attributes.key?(:'address_zip') self.address_zip = attributes[:'address_zip'] else self.address_zip = nil end if attributes.key?(:'county') self.county = attributes[:'county'] else self.county = nil end if attributes.key?(:'coarse_age') self.coarse_age = attributes[:'coarse_age'] else self.coarse_age = nil end end |
Instance Attribute Details
#address_city ⇒ Object
The address’ city from the LA Wallet credential
59 60 61 |
# File 'lib/trinsic_api/models/la_wallet_provider_output.rb', line 59 def address_city @address_city end |
#address_line1 ⇒ Object
The address’ line 1 from the LA Wallet credential
53 54 55 |
# File 'lib/trinsic_api/models/la_wallet_provider_output.rb', line 53 def address_line1 @address_line1 end |
#address_line2 ⇒ Object
The address’ line 2 from the LA Wallet credential
56 57 58 |
# File 'lib/trinsic_api/models/la_wallet_provider_output.rb', line 56 def address_line2 @address_line2 end |
#address_state ⇒ Object
The address’ state from the LA Wallet credential
62 63 64 |
# File 'lib/trinsic_api/models/la_wallet_provider_output.rb', line 62 def address_state @address_state end |
#address_zip ⇒ Object
The address’ ZIP from the LA Wallet credential
65 66 67 |
# File 'lib/trinsic_api/models/la_wallet_provider_output.rb', line 65 def address_zip @address_zip end |
#audit_number ⇒ Object
The 4-digit audit number of the driver’s license used to create the LA Wallet credential
29 30 31 |
# File 'lib/trinsic_api/models/la_wallet_provider_output.rb', line 29 def audit_number @audit_number end |
#coarse_age ⇒ Object
The coarse age returned by LA Wallet for this credential Possible values: - "Under 18" - "Under 21" - "Over 21"
71 72 73 |
# File 'lib/trinsic_api/models/la_wallet_provider_output.rb', line 71 def coarse_age @coarse_age end |
#county ⇒ Object
The county ("parish") code from the LA Wallet credential. This is a number from 1 to 64, representing one of Louisiana’s 64 parishes.
68 69 70 |
# File 'lib/trinsic_api/models/la_wallet_provider_output.rb', line 68 def county @county end |
#date_of_birth ⇒ Object
The date of birth from the LA Wallet credential
47 48 49 |
# File 'lib/trinsic_api/models/la_wallet_provider_output.rb', line 47 def date_of_birth @date_of_birth end |
#drivers_license_number ⇒ Object
The number of the driver’s license used to create the LA Wallet credential
20 21 22 |
# File 'lib/trinsic_api/models/la_wallet_provider_output.rb', line 20 def drivers_license_number @drivers_license_number end |
#expiration_date ⇒ Object
The expiration date of the driver’s license used to create the LA Wallet credential
26 27 28 |
# File 'lib/trinsic_api/models/la_wallet_provider_output.rb', line 26 def expiration_date @expiration_date end |
#first_name ⇒ Object
The first name from the LA Wallet credential
38 39 40 |
# File 'lib/trinsic_api/models/la_wallet_provider_output.rb', line 38 def first_name @first_name end |
#issue_date ⇒ Object
The issue date of the driver’s license used to create the LA Wallet credential
23 24 25 |
# File 'lib/trinsic_api/models/la_wallet_provider_output.rb', line 23 def issue_date @issue_date end |
#last_name ⇒ Object
The last name from the LA Wallet credential
44 45 46 |
# File 'lib/trinsic_api/models/la_wallet_provider_output.rb', line 44 def last_name @last_name end |
#license_class ⇒ Object
The license class from the LA Wallet credential Possible values: - "A": Commercial Driver’s License, Combination Vehicles - "B": Commercial Driver’s License, Heavy Straight Vehicle - "C": Commercial Driver’s License, Light Straight Vehicle - "D": Chauffeur’s Driver’s License - "E": Driver’s License for Personal Vehicle
35 36 37 |
# File 'lib/trinsic_api/models/la_wallet_provider_output.rb', line 35 def license_class @license_class end |
#license_status ⇒ Object
The license status from the LA Wallet credential
32 33 34 |
# File 'lib/trinsic_api/models/la_wallet_provider_output.rb', line 32 def license_status @license_status end |
#middle_name ⇒ Object
The middle name from the LA Wallet credential
41 42 43 |
# File 'lib/trinsic_api/models/la_wallet_provider_output.rb', line 41 def middle_name @middle_name end |
#sex ⇒ Object
The sex from the LA Wallet credential
50 51 52 |
# File 'lib/trinsic_api/models/la_wallet_provider_output.rb', line 50 def sex @sex end |
Class Method Details
._deserialize(type, value) ⇒ Object
Deserializes the data based on type
595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 |
# File 'lib/trinsic_api/models/la_wallet_provider_output.rb', line 595 def self._deserialize(type, value) case type.to_sym when :Time Time.parse(value) when :Date Date.parse(value) when :String value.to_s when :Integer value.to_i when :Float value.to_f when :Boolean if value.to_s =~ /\A(true|t|yes|y|1)\z/i true else false end when :Object # generic object (usually a Hash), return directly value when /\AArray<(?<inner_type>.+)>\z/ inner_type = Regexp.last_match[:inner_type] value.map { |v| _deserialize(inner_type, v) } when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/ k_type = Regexp.last_match[:k_type] v_type = Regexp.last_match[:v_type] {}.tap do |hash| value.each do |k, v| hash[_deserialize(k_type, k)] = _deserialize(v_type, v) end end else # model # models (e.g. Pet) or oneOf klass = TrinsicApi.const_get(type) klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end |
.acceptable_attribute_map ⇒ Object
Returns attribute mapping this model knows about
98 99 100 |
# File 'lib/trinsic_api/models/la_wallet_provider_output.rb', line 98 def self.acceptable_attribute_map attribute_map end |
.acceptable_attributes ⇒ Object
Returns all the JSON keys this model knows about
103 104 105 |
# File 'lib/trinsic_api/models/la_wallet_provider_output.rb', line 103 def self.acceptable_attributes acceptable_attribute_map.values end |
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 |
# File 'lib/trinsic_api/models/la_wallet_provider_output.rb', line 74 def self.attribute_map { :'drivers_license_number' => :'driversLicenseNumber', :'issue_date' => :'issueDate', :'expiration_date' => :'expirationDate', :'audit_number' => :'auditNumber', :'license_status' => :'licenseStatus', :'license_class' => :'licenseClass', :'first_name' => :'firstName', :'middle_name' => :'middleName', :'last_name' => :'lastName', :'date_of_birth' => :'dateOfBirth', :'sex' => :'sex', :'address_line1' => :'addressLine1', :'address_line2' => :'addressLine2', :'address_city' => :'addressCity', :'address_state' => :'addressState', :'address_zip' => :'addressZip', :'county' => :'county', :'coarse_age' => :'coarseAge' } end |
.build_from_hash(attributes) ⇒ Object
Builds the object from hash
571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 |
# File 'lib/trinsic_api/models/la_wallet_provider_output.rb', line 571 def self.build_from_hash(attributes) return nil unless attributes.is_a?(Hash) attributes = attributes.transform_keys(&:to_sym) transformed_hash = {} openapi_types.each_pair do |key, type| if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? transformed_hash["#{key}"] = nil elsif type =~ /\AArray<(.*)>/i # check to ensure the input is an array given that the attribute # is documented as an array but the input is not if attributes[attribute_map[key]].is_a?(Array) transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } end elsif !attributes[attribute_map[key]].nil? transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) end end new(transformed_hash) end |
.openapi_nullable ⇒ Object
List of attributes with nullable: true
132 133 134 135 136 |
# File 'lib/trinsic_api/models/la_wallet_provider_output.rb', line 132 def self.openapi_nullable Set.new([ :'address_line2', ]) end |
.openapi_types ⇒ Object
Attribute type mapping.
108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 |
# File 'lib/trinsic_api/models/la_wallet_provider_output.rb', line 108 def self.openapi_types { :'drivers_license_number' => :'String', :'issue_date' => :'Date', :'expiration_date' => :'Date', :'audit_number' => :'String', :'license_status' => :'String', :'license_class' => :'String', :'first_name' => :'String', :'middle_name' => :'String', :'last_name' => :'String', :'date_of_birth' => :'Date', :'sex' => :'String', :'address_line1' => :'String', :'address_line2' => :'String', :'address_city' => :'String', :'address_state' => :'String', :'address_zip' => :'String', :'county' => :'String', :'coarse_age' => :'String' } end |
Instance Method Details
#==(o) ⇒ Object
Checks equality by comparing each attribute.
533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 |
# File 'lib/trinsic_api/models/la_wallet_provider_output.rb', line 533 def ==(o) return true if self.equal?(o) self.class == o.class && drivers_license_number == o.drivers_license_number && issue_date == o.issue_date && expiration_date == o.expiration_date && audit_number == o.audit_number && license_status == o.license_status && license_class == o.license_class && first_name == o.first_name && middle_name == o.middle_name && last_name == o.last_name && date_of_birth == o.date_of_birth && sex == o.sex && address_line1 == o.address_line1 && address_line2 == o.address_line2 && address_city == o.address_city && address_state == o.address_state && address_zip == o.address_zip && county == o.county && coarse_age == o.coarse_age end |
#_to_hash(value) ⇒ Hash
Outputs non-array value in the form of hash For object, use to_hash. Otherwise, just return the value
666 667 668 669 670 671 672 673 674 675 676 677 678 |
# File 'lib/trinsic_api/models/la_wallet_provider_output.rb', line 666 def _to_hash(value) if value.is_a?(Array) value.compact.map { |v| _to_hash(v) } elsif value.is_a?(Hash) {}.tap do |hash| value.each { |k, v| hash[k] = _to_hash(v) } end elsif value.respond_to? :to_hash value.to_hash else value end end |
#eql?(o) ⇒ Boolean
558 559 560 |
# File 'lib/trinsic_api/models/la_wallet_provider_output.rb', line 558 def eql?(o) self == o end |
#hash ⇒ Integer
Calculates hash code according to all attributes.
564 565 566 |
# File 'lib/trinsic_api/models/la_wallet_provider_output.rb', line 564 def hash [drivers_license_number, issue_date, expiration_date, audit_number, license_status, license_class, first_name, middle_name, last_name, date_of_birth, sex, address_line1, address_line2, address_city, address_state, address_zip, county, coarse_age].hash end |
#list_invalid_properties ⇒ Object
Show invalid properties with the reasons. Usually used together with valid?
263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 |
# File 'lib/trinsic_api/models/la_wallet_provider_output.rb', line 263 def list_invalid_properties warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' invalid_properties = Array.new if @drivers_license_number.nil? invalid_properties.push('invalid value for "drivers_license_number", drivers_license_number cannot be nil.') end if @issue_date.nil? invalid_properties.push('invalid value for "issue_date", issue_date cannot be nil.') end if @expiration_date.nil? invalid_properties.push('invalid value for "expiration_date", expiration_date cannot be nil.') end if @audit_number.nil? invalid_properties.push('invalid value for "audit_number", audit_number cannot be nil.') end if @license_status.nil? invalid_properties.push('invalid value for "license_status", license_status cannot be nil.') end if @license_class.nil? invalid_properties.push('invalid value for "license_class", license_class cannot be nil.') end if @first_name.nil? invalid_properties.push('invalid value for "first_name", first_name cannot be nil.') end if @middle_name.nil? invalid_properties.push('invalid value for "middle_name", middle_name cannot be nil.') end if @last_name.nil? invalid_properties.push('invalid value for "last_name", last_name cannot be nil.') end if @date_of_birth.nil? invalid_properties.push('invalid value for "date_of_birth", date_of_birth cannot be nil.') end if @sex.nil? invalid_properties.push('invalid value for "sex", sex cannot be nil.') end if @address_line1.nil? invalid_properties.push('invalid value for "address_line1", address_line1 cannot be nil.') end if @address_city.nil? invalid_properties.push('invalid value for "address_city", address_city cannot be nil.') end if @address_state.nil? invalid_properties.push('invalid value for "address_state", address_state cannot be nil.') end if @address_zip.nil? invalid_properties.push('invalid value for "address_zip", address_zip cannot be nil.') end if @county.nil? invalid_properties.push('invalid value for "county", county cannot be nil.') end if @coarse_age.nil? invalid_properties.push('invalid value for "coarse_age", coarse_age cannot be nil.') end invalid_properties end |
#to_body ⇒ Hash
to_body is an alias to to_hash (backward compatibility)
642 643 644 |
# File 'lib/trinsic_api/models/la_wallet_provider_output.rb', line 642 def to_body to_hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
648 649 650 651 652 653 654 655 656 657 658 659 660 |
# File 'lib/trinsic_api/models/la_wallet_provider_output.rb', line 648 def to_hash hash = {} self.class.attribute_map.each_pair do |attr, param| value = self.send(attr) if value.nil? is_nullable = self.class.openapi_nullable.include?(attr) next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) end hash[param] = _to_hash(value) end hash end |
#to_s ⇒ String
Returns the string representation of the object
636 637 638 |
# File 'lib/trinsic_api/models/la_wallet_provider_output.rb', line 636 def to_s to_hash.to_s end |
#valid? ⇒ Boolean
Check to see if the all the properties in the model are valid
339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 |
# File 'lib/trinsic_api/models/la_wallet_provider_output.rb', line 339 def valid? warn '[DEPRECATED] the `valid?` method is obsolete' return false if @drivers_license_number.nil? return false if @issue_date.nil? return false if @expiration_date.nil? return false if @audit_number.nil? return false if @license_status.nil? return false if @license_class.nil? return false if @first_name.nil? return false if @middle_name.nil? return false if @last_name.nil? return false if @date_of_birth.nil? return false if @sex.nil? return false if @address_line1.nil? return false if @address_city.nil? return false if @address_state.nil? return false if @address_zip.nil? return false if @county.nil? return false if @coarse_age.nil? true end |