Class: TrinsicApi::SpidProviderOutput
- Inherits:
-
Object
- Object
- TrinsicApi::SpidProviderOutput
- Defined in:
- lib/trinsic_api/models/spid_provider_output.rb
Overview
Exposed properties for the ‘italy-spid` Provider which do not directly map to the normalized IdentityData model.
Instance Attribute Summary collapse
-
#billing_information ⇒ Object
Information about the billable status of this SPID Verification.
-
#company_fiscal_number ⇒ Object
The fiscal tax number of the organization which was verified, or of the organization which the verified individual is associated with.
-
#company_name ⇒ Object
The name of the organization which was verified, or of the organization which the verified individual is associated with.
-
#county_of_birth ⇒ Object
The individual’s county (province) of birth, abbreviated.
-
#date_of_birth ⇒ Object
The date of birth of the individual.
-
#digital_address ⇒ Object
The PEC (Italian Certified Email) address of the individual or organization.
-
#domicile_municipality ⇒ Object
The municipality of the individual’s residence.
-
#domicile_nation ⇒ Object
The 2-digit country code of the individual’s residence.
-
#domicile_postal_code ⇒ Object
The postal code of the individual’s residence.
-
#domicile_province ⇒ Object
The province of the individual’s residence.
-
#domicile_street_address ⇒ Object
The street address of the individual’s residence.
-
#email ⇒ Object
The email address of the individual.
-
#family_name ⇒ Object
The individual’s last / family name(s).
-
#fiscal_number ⇒ Object
Fiscal tax number for the individual.
-
#gender ⇒ Object
The gender of the individual.
-
#given_name ⇒ Object
The individual’s first / given name(s).
-
#identity_provider_entity_id ⇒ Object
The SPID Entity ID of the Identity Provider which issued the SPID identity.
-
#iva_code ⇒ Object
The VAT number of the organization which was verified, or of the organization which the verified individual is associated with.
-
#mobile_phone ⇒ Object
The mobile phone number of the individual, in Italian format.
-
#place_of_birth ⇒ Object
The individual’s place of birth.
-
#raw_id_card ⇒ Object
The raw, space-separated string value for the "IdCard" field from the SPID credential.
-
#registered_office ⇒ Object
The registered office address of the organization which was verified, or of the organization which the verified individual is associated with.
-
#spid_code ⇒ Object
The identifier of the SPID credential, uniquely identifying it within the SPID federation.
-
#spid_credential_expiration_date ⇒ Object
Expiration date of the SPID 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 = {}) ⇒ SpidProviderOutput
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 = {}) ⇒ SpidProviderOutput
Initializes the object
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 260 261 262 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 |
# File 'lib/trinsic_api/models/spid_provider_output.rb', line 191 def initialize(attributes = {}) if (!attributes.is_a?(Hash)) fail ArgumentError, "The input argument (attributes) must be a hash in `TrinsicApi::SpidProviderOutput` 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::SpidProviderOutput`. 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?(:'billing_information') self.billing_information = attributes[:'billing_information'] end if attributes.key?(:'identity_provider_entity_id') self.identity_provider_entity_id = attributes[:'identity_provider_entity_id'] else self.identity_provider_entity_id = nil end if attributes.key?(:'spid_code') self.spid_code = attributes[:'spid_code'] else self.spid_code = nil end if attributes.key?(:'spid_credential_expiration_date') self.spid_credential_expiration_date = attributes[:'spid_credential_expiration_date'] end if attributes.key?(:'raw_id_card') self.raw_id_card = attributes[:'raw_id_card'] end if attributes.key?(:'given_name') self.given_name = attributes[:'given_name'] end if attributes.key?(:'family_name') self.family_name = attributes[:'family_name'] end if attributes.key?(:'date_of_birth') self.date_of_birth = attributes[:'date_of_birth'] end if attributes.key?(:'gender') self.gender = attributes[:'gender'] end if attributes.key?(:'place_of_birth') self.place_of_birth = attributes[:'place_of_birth'] end if attributes.key?(:'county_of_birth') self.county_of_birth = attributes[:'county_of_birth'] end if attributes.key?(:'domicile_street_address') self.domicile_street_address = attributes[:'domicile_street_address'] end if attributes.key?(:'domicile_postal_code') self.domicile_postal_code = attributes[:'domicile_postal_code'] end if attributes.key?(:'domicile_municipality') self.domicile_municipality = attributes[:'domicile_municipality'] end if attributes.key?(:'domicile_province') self.domicile_province = attributes[:'domicile_province'] end if attributes.key?(:'domicile_nation') self.domicile_nation = attributes[:'domicile_nation'] end if attributes.key?(:'email') self.email = attributes[:'email'] end if attributes.key?(:'mobile_phone') self.mobile_phone = attributes[:'mobile_phone'] end if attributes.key?(:'digital_address') self.digital_address = attributes[:'digital_address'] end if attributes.key?(:'fiscal_number') self.fiscal_number = attributes[:'fiscal_number'] end if attributes.key?(:'iva_code') self.iva_code = attributes[:'iva_code'] end if attributes.key?(:'company_name') self.company_name = attributes[:'company_name'] end if attributes.key?(:'company_fiscal_number') self.company_fiscal_number = attributes[:'company_fiscal_number'] end if attributes.key?(:'registered_office') self.registered_office = attributes[:'registered_office'] end end |
Instance Attribute Details
#billing_information ⇒ Object
Information about the billable status of this SPID Verification. Present only if your account has period-based billing enabled for SPID. Contact Trinsic to enable this.
20 21 22 |
# File 'lib/trinsic_api/models/spid_provider_output.rb', line 20 def billing_information @billing_information end |
#company_fiscal_number ⇒ Object
The fiscal tax number of the organization which was verified, or of the organization which the verified individual is associated with.
86 87 88 |
# File 'lib/trinsic_api/models/spid_provider_output.rb', line 86 def company_fiscal_number @company_fiscal_number end |
#company_name ⇒ Object
The name of the organization which was verified, or of the organization which the verified individual is associated with.
83 84 85 |
# File 'lib/trinsic_api/models/spid_provider_output.rb', line 83 def company_name @company_name end |
#county_of_birth ⇒ Object
The individual’s county (province) of birth, abbreviated. For foreign births, this is "EE".
50 51 52 |
# File 'lib/trinsic_api/models/spid_provider_output.rb', line 50 def county_of_birth @county_of_birth end |
#date_of_birth ⇒ Object
The date of birth of the individual
41 42 43 |
# File 'lib/trinsic_api/models/spid_provider_output.rb', line 41 def date_of_birth @date_of_birth end |
#digital_address ⇒ Object
The PEC (Italian Certified Email) address of the individual or organization.
74 75 76 |
# File 'lib/trinsic_api/models/spid_provider_output.rb', line 74 def digital_address @digital_address end |
#domicile_municipality ⇒ Object
The municipality of the individual’s residence
59 60 61 |
# File 'lib/trinsic_api/models/spid_provider_output.rb', line 59 def domicile_municipality @domicile_municipality end |
#domicile_nation ⇒ Object
The 2-digit country code of the individual’s residence
65 66 67 |
# File 'lib/trinsic_api/models/spid_provider_output.rb', line 65 def domicile_nation @domicile_nation end |
#domicile_postal_code ⇒ Object
The postal code of the individual’s residence
56 57 58 |
# File 'lib/trinsic_api/models/spid_provider_output.rb', line 56 def domicile_postal_code @domicile_postal_code end |
#domicile_province ⇒ Object
The province of the individual’s residence
62 63 64 |
# File 'lib/trinsic_api/models/spid_provider_output.rb', line 62 def domicile_province @domicile_province end |
#domicile_street_address ⇒ Object
The street address of the individual’s residence. This includes street name, street type, and house number, in the standard format for the given state.
53 54 55 |
# File 'lib/trinsic_api/models/spid_provider_output.rb', line 53 def domicile_street_address @domicile_street_address end |
#email ⇒ Object
The email address of the individual
68 69 70 |
# File 'lib/trinsic_api/models/spid_provider_output.rb', line 68 def email @email end |
#family_name ⇒ Object
The individual’s last / family name(s)
38 39 40 |
# File 'lib/trinsic_api/models/spid_provider_output.rb', line 38 def family_name @family_name end |
#fiscal_number ⇒ Object
Fiscal tax number for the individual.
77 78 79 |
# File 'lib/trinsic_api/models/spid_provider_output.rb', line 77 def fiscal_number @fiscal_number end |
#gender ⇒ Object
The gender of the individual. Possible values: "M" | "F"
44 45 46 |
# File 'lib/trinsic_api/models/spid_provider_output.rb', line 44 def gender @gender end |
#given_name ⇒ Object
The individual’s first / given name(s)
35 36 37 |
# File 'lib/trinsic_api/models/spid_provider_output.rb', line 35 def given_name @given_name end |
#identity_provider_entity_id ⇒ Object
The SPID Entity ID of the Identity Provider which issued the SPID identity. This is an HTTPS URI which uniquely identifies the IdP within the SPID federation. A normalized / simplified representation of this value is present in the ‘originatingSubProviderId` field in Trinsic’s normalized data model.
23 24 25 |
# File 'lib/trinsic_api/models/spid_provider_output.rb', line 23 def identity_provider_entity_id @identity_provider_entity_id end |
#iva_code ⇒ Object
The VAT number of the organization which was verified, or of the organization which the verified individual is associated with.
80 81 82 |
# File 'lib/trinsic_api/models/spid_provider_output.rb', line 80 def iva_code @iva_code end |
#mobile_phone ⇒ Object
The mobile phone number of the individual, in Italian format.
71 72 73 |
# File 'lib/trinsic_api/models/spid_provider_output.rb', line 71 def mobile_phone @mobile_phone end |
#place_of_birth ⇒ Object
The individual’s place of birth. This is a 4-digit Belfiore Code identifying either the municipality of birth (for births in Italy) or a foreign country (for births outside Italy).
47 48 49 |
# File 'lib/trinsic_api/models/spid_provider_output.rb', line 47 def place_of_birth @place_of_birth end |
#raw_id_card ⇒ Object
The raw, space-separated string value for the "IdCard" field from the SPID credential. Trinsic additionally parses this field and uses it to populate the ‘Document` object in the normalized data model.
32 33 34 |
# File 'lib/trinsic_api/models/spid_provider_output.rb', line 32 def raw_id_card @raw_id_card end |
#registered_office ⇒ Object
The registered office address of the organization which was verified, or of the organization which the verified individual is associated with.
89 90 91 |
# File 'lib/trinsic_api/models/spid_provider_output.rb', line 89 def registered_office @registered_office end |
#spid_code ⇒ Object
The identifier of the SPID credential, uniquely identifying it within the SPID federation. The format of this string is specific to each individual Identity Provider.
26 27 28 |
# File 'lib/trinsic_api/models/spid_provider_output.rb', line 26 def spid_code @spid_code end |
#spid_credential_expiration_date ⇒ Object
Expiration date of the SPID credential. This is not the same as the expiration date of the underlying identity document (such as a passport) which was used to create the SPID identity.
29 30 31 |
# File 'lib/trinsic_api/models/spid_provider_output.rb', line 29 def spid_credential_expiration_date @spid_credential_expiration_date end |
Class Method Details
._deserialize(type, value) ⇒ Object
Deserializes the data based on type
421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 |
# File 'lib/trinsic_api/models/spid_provider_output.rb', line 421 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
122 123 124 |
# File 'lib/trinsic_api/models/spid_provider_output.rb', line 122 def self.acceptable_attribute_map attribute_map end |
.acceptable_attributes ⇒ Object
Returns all the JSON keys this model knows about
127 128 129 |
# File 'lib/trinsic_api/models/spid_provider_output.rb', line 127 def self.acceptable_attributes acceptable_attribute_map.values end |
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 |
# File 'lib/trinsic_api/models/spid_provider_output.rb', line 92 def self.attribute_map { :'billing_information' => :'billingInformation', :'identity_provider_entity_id' => :'identityProviderEntityId', :'spid_code' => :'spidCode', :'spid_credential_expiration_date' => :'spidCredentialExpirationDate', :'raw_id_card' => :'rawIdCard', :'given_name' => :'givenName', :'family_name' => :'familyName', :'date_of_birth' => :'dateOfBirth', :'gender' => :'gender', :'place_of_birth' => :'placeOfBirth', :'county_of_birth' => :'countyOfBirth', :'domicile_street_address' => :'domicileStreetAddress', :'domicile_postal_code' => :'domicilePostalCode', :'domicile_municipality' => :'domicileMunicipality', :'domicile_province' => :'domicileProvince', :'domicile_nation' => :'domicileNation', :'email' => :'email', :'mobile_phone' => :'mobilePhone', :'digital_address' => :'digitalAddress', :'fiscal_number' => :'fiscalNumber', :'iva_code' => :'ivaCode', :'company_name' => :'companyName', :'company_fiscal_number' => :'companyFiscalNumber', :'registered_office' => :'registeredOffice' } end |
.build_from_hash(attributes) ⇒ Object
Builds the object from hash
397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 |
# File 'lib/trinsic_api/models/spid_provider_output.rb', line 397 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
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 |
# File 'lib/trinsic_api/models/spid_provider_output.rb', line 162 def self.openapi_nullable Set.new([ :'billing_information', :'spid_credential_expiration_date', :'raw_id_card', :'given_name', :'family_name', :'date_of_birth', :'gender', :'place_of_birth', :'county_of_birth', :'domicile_street_address', :'domicile_postal_code', :'domicile_municipality', :'domicile_province', :'domicile_nation', :'email', :'mobile_phone', :'digital_address', :'fiscal_number', :'iva_code', :'company_name', :'company_fiscal_number', :'registered_office' ]) end |
.openapi_types ⇒ Object
Attribute type mapping.
132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 |
# File 'lib/trinsic_api/models/spid_provider_output.rb', line 132 def self.openapi_types { :'billing_information' => :'SpidBillingInformation', :'identity_provider_entity_id' => :'String', :'spid_code' => :'String', :'spid_credential_expiration_date' => :'Date', :'raw_id_card' => :'String', :'given_name' => :'String', :'family_name' => :'String', :'date_of_birth' => :'Date', :'gender' => :'String', :'place_of_birth' => :'String', :'county_of_birth' => :'String', :'domicile_street_address' => :'String', :'domicile_postal_code' => :'String', :'domicile_municipality' => :'String', :'domicile_province' => :'String', :'domicile_nation' => :'String', :'email' => :'String', :'mobile_phone' => :'String', :'digital_address' => :'String', :'fiscal_number' => :'String', :'iva_code' => :'String', :'company_name' => :'String', :'company_fiscal_number' => :'String', :'registered_office' => :'String' } end |
Instance Method Details
#==(o) ⇒ Object
Checks equality by comparing each attribute.
353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 |
# File 'lib/trinsic_api/models/spid_provider_output.rb', line 353 def ==(o) return true if self.equal?(o) self.class == o.class && billing_information == o.billing_information && identity_provider_entity_id == o.identity_provider_entity_id && spid_code == o.spid_code && spid_credential_expiration_date == o.spid_credential_expiration_date && raw_id_card == o.raw_id_card && given_name == o.given_name && family_name == o.family_name && date_of_birth == o.date_of_birth && gender == o.gender && place_of_birth == o.place_of_birth && county_of_birth == o.county_of_birth && domicile_street_address == o.domicile_street_address && domicile_postal_code == o.domicile_postal_code && domicile_municipality == o.domicile_municipality && domicile_province == o.domicile_province && domicile_nation == o.domicile_nation && email == o.email && mobile_phone == o.mobile_phone && digital_address == o.digital_address && fiscal_number == o.fiscal_number && iva_code == o.iva_code && company_name == o.company_name && company_fiscal_number == o.company_fiscal_number && registered_office == o.registered_office end |
#_to_hash(value) ⇒ Hash
Outputs non-array value in the form of hash For object, use to_hash. Otherwise, just return the value
492 493 494 495 496 497 498 499 500 501 502 503 504 |
# File 'lib/trinsic_api/models/spid_provider_output.rb', line 492 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
384 385 386 |
# File 'lib/trinsic_api/models/spid_provider_output.rb', line 384 def eql?(o) self == o end |
#hash ⇒ Integer
Calculates hash code according to all attributes.
390 391 392 |
# File 'lib/trinsic_api/models/spid_provider_output.rb', line 390 def hash [billing_information, identity_provider_entity_id, spid_code, spid_credential_expiration_date, raw_id_card, given_name, family_name, date_of_birth, gender, place_of_birth, county_of_birth, domicile_street_address, domicile_postal_code, domicile_municipality, domicile_province, domicile_nation, email, mobile_phone, digital_address, fiscal_number, iva_code, company_name, company_fiscal_number, registered_office].hash end |
#list_invalid_properties ⇒ Object
Show invalid properties with the reasons. Usually used together with valid?
308 309 310 311 312 313 314 315 316 317 318 319 320 |
# File 'lib/trinsic_api/models/spid_provider_output.rb', line 308 def list_invalid_properties warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' invalid_properties = Array.new if @identity_provider_entity_id.nil? invalid_properties.push('invalid value for "identity_provider_entity_id", identity_provider_entity_id cannot be nil.') end if @spid_code.nil? invalid_properties.push('invalid value for "spid_code", spid_code cannot be nil.') end invalid_properties end |
#to_body ⇒ Hash
to_body is an alias to to_hash (backward compatibility)
468 469 470 |
# File 'lib/trinsic_api/models/spid_provider_output.rb', line 468 def to_body to_hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
474 475 476 477 478 479 480 481 482 483 484 485 486 |
# File 'lib/trinsic_api/models/spid_provider_output.rb', line 474 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
462 463 464 |
# File 'lib/trinsic_api/models/spid_provider_output.rb', line 462 def to_s to_hash.to_s end |
#valid? ⇒ Boolean
Check to see if the all the properties in the model are valid
324 325 326 327 328 329 |
# File 'lib/trinsic_api/models/spid_provider_output.rb', line 324 def valid? warn '[DEPRECATED] the `valid?` method is obsolete' return false if @identity_provider_entity_id.nil? return false if @spid_code.nil? true end |