Class: TrinsicApi::Provider
- Inherits:
-
ApiModelBase
- Object
- ApiModelBase
- TrinsicApi::Provider
- Defined in:
- lib/trinsic_api/models/provider.rb
Defined Under Namespace
Classes: EnumAttributeValidator
Instance Attribute Summary collapse
-
#available_attachments ⇒ Object
Information about the attachments that this Provider will return in verification results.
-
#available_attributes ⇒ Object
Information about the user attributes that this Provider will return in verification results.
-
#collection_method ⇒ Object
Relevant only to Direct Provider Sessions.
-
#countries ⇒ Object
The countries where this Provider is available (as alpha-2 ISO codes).
-
#description ⇒ Object
A description of the provider’s capabilities.
-
#geography ⇒ Object
Geographic regions where this provider operates.
-
#has_refreshable_content ⇒ Object
Relevant only to Direct Provider Sessions.
-
#has_trinsic_interface ⇒ Object
Whether there exists a Trinsic-hosted UI for this Provider.
-
#id ⇒ Object
The unique identifier of the provider.
-
#launch_method ⇒ Object
Relevant only to Direct Provider Sessions.
-
#licensed ⇒ Object
Whether this provider is licensed for use by your organization.
-
#live_health ⇒ Object
The health for a provider in the live environment.
-
#logo_url ⇒ Object
The URL of the provider’s logo.
-
#name ⇒ Object
The display name of the provider.
-
#regions ⇒ Object
Specific regions supported by this provider.
-
#requires_input ⇒ Object
Relevant to Hosted Provider Sessions and Direct Provider Sessions.
-
#results_may_be_delayed_after_redirect ⇒ Object
If ‘true`, then the results for this Provider may not be available immediately after the user is redirected back to your application.
-
#sub_providers ⇒ Object
Metadata about the sub-providers which are available for this Provider in the current Environment.
-
#subdivisions ⇒ Object
The subdivisions (states, provinces, etc.) where this Provider is available (as alpha-2 ISO codes).
-
#subtext ⇒ Object
The Provider’s subtext recommended to be shown next to the name.
-
#supported_languages ⇒ Object
Languages supported by this Provider’s Trinsic-hosted UI, as BCP 47 language codes.
-
#supports_direct_provider_sessions ⇒ Object
Whether this Provider can be fully whitelabeled/OEMed through the Direct Provider Sessions API.
-
#test_health ⇒ Object
The health for a provider in the test environment.
Class Method Summary collapse
-
.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.
- #eql?(o) ⇒ Boolean
-
#hash ⇒ Integer
Calculates hash code according to all attributes.
-
#initialize(attributes = {}) ⇒ Provider
constructor
Initializes the object.
-
#list_invalid_properties ⇒ Object
Show invalid properties with the reasons.
-
#to_hash ⇒ Hash
Returns the object in the form of hash.
-
#valid? ⇒ Boolean
Check to see if the all the properties in the model are valid.
Methods inherited from ApiModelBase
_deserialize, #_to_hash, #to_body, #to_s
Constructor Details
#initialize(attributes = {}) ⇒ Provider
Initializes the object
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 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 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 336 337 338 339 340 341 342 343 344 345 346 347 348 |
# File 'lib/trinsic_api/models/provider.rb', line 189 def initialize(attributes = {}) if (!attributes.is_a?(Hash)) fail ArgumentError, "The input argument (attributes) must be a hash in `TrinsicApi::Provider` 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::Provider`. 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?(:'id') self.id = attributes[:'id'] else self.id = nil end if attributes.key?(:'name') self.name = attributes[:'name'] else self.name = nil end if attributes.key?(:'logo_url') self.logo_url = attributes[:'logo_url'] else self.logo_url = nil end if attributes.key?(:'subtext') self.subtext = attributes[:'subtext'] else self.subtext = nil end if attributes.key?(:'description') self.description = attributes[:'description'] else self.description = nil end if attributes.key?(:'geography') if (value = attributes[:'geography']).is_a?(Array) self.geography = value end else self.geography = nil end if attributes.key?(:'regions') if (value = attributes[:'regions']).is_a?(Array) self.regions = value end else self.regions = nil end if attributes.key?(:'countries') if (value = attributes[:'countries']).is_a?(Array) self.countries = value end else self.countries = nil end if attributes.key?(:'subdivisions') if (value = attributes[:'subdivisions']).is_a?(Array) self.subdivisions = value end else self.subdivisions = nil end if attributes.key?(:'licensed') self.licensed = attributes[:'licensed'] else self.licensed = nil end if attributes.key?(:'launch_method') self.launch_method = attributes[:'launch_method'] else self.launch_method = nil end if attributes.key?(:'collection_method') self.collection_method = attributes[:'collection_method'] else self.collection_method = nil end if attributes.key?(:'results_may_be_delayed_after_redirect') self.results_may_be_delayed_after_redirect = attributes[:'results_may_be_delayed_after_redirect'] else self.results_may_be_delayed_after_redirect = nil end if attributes.key?(:'has_refreshable_content') self.has_refreshable_content = attributes[:'has_refreshable_content'] else self.has_refreshable_content = nil end if attributes.key?(:'requires_input') self.requires_input = attributes[:'requires_input'] else self.requires_input = nil end if attributes.key?(:'has_trinsic_interface') self.has_trinsic_interface = attributes[:'has_trinsic_interface'] else self.has_trinsic_interface = nil end if attributes.key?(:'supports_direct_provider_sessions') self.supports_direct_provider_sessions = attributes[:'supports_direct_provider_sessions'] else self.supports_direct_provider_sessions = nil end if attributes.key?(:'supported_languages') if (value = attributes[:'supported_languages']).is_a?(Array) self.supported_languages = value end end if attributes.key?(:'available_attributes') if (value = attributes[:'available_attributes']).is_a?(Array) self.available_attributes = value end end if attributes.key?(:'available_attachments') if (value = attributes[:'available_attachments']).is_a?(Array) self. = value end end if attributes.key?(:'sub_providers') if (value = attributes[:'sub_providers']).is_a?(Array) self.sub_providers = value end end if attributes.key?(:'live_health') self.live_health = attributes[:'live_health'] else self.live_health = nil end if attributes.key?(:'test_health') self.test_health = attributes[:'test_health'] else self.test_health = nil end end |
Instance Attribute Details
#available_attachments ⇒ Object
Information about the attachments that this Provider will return in verification results.
76 77 78 |
# File 'lib/trinsic_api/models/provider.rb', line 76 def @available_attachments end |
#available_attributes ⇒ Object
Information about the user attributes that this Provider will return in verification results.
73 74 75 |
# File 'lib/trinsic_api/models/provider.rb', line 73 def available_attributes @available_attributes end |
#collection_method ⇒ Object
Relevant only to Direct Provider Sessions. The ‘CollectionMethod` which must be supported to launch the Provider Session in Direct Provider Sessions.
52 53 54 |
# File 'lib/trinsic_api/models/provider.rb', line 52 def collection_method @collection_method end |
#countries ⇒ Object
The countries where this Provider is available (as alpha-2 ISO codes).
40 41 42 |
# File 'lib/trinsic_api/models/provider.rb', line 40 def countries @countries end |
#description ⇒ Object
A description of the provider’s capabilities
31 32 33 |
# File 'lib/trinsic_api/models/provider.rb', line 31 def description @description end |
#geography ⇒ Object
Geographic regions where this provider operates
34 35 36 |
# File 'lib/trinsic_api/models/provider.rb', line 34 def geography @geography end |
#has_refreshable_content ⇒ Object
Relevant only to Direct Provider Sessions. Whether the Provider requires the ‘RefreshStepContent` capability. For example, Samsung Wallet’s deep links expire every 30 seconds, and must be refreshed periodically for a resilient user flow.
58 59 60 |
# File 'lib/trinsic_api/models/provider.rb', line 58 def has_refreshable_content @has_refreshable_content end |
#has_trinsic_interface ⇒ Object
Whether there exists a Trinsic-hosted UI for this Provider. This is ‘true` for any Provider which is not a simple, OIDC-like redirect flow.
64 65 66 |
# File 'lib/trinsic_api/models/provider.rb', line 64 def has_trinsic_interface @has_trinsic_interface end |
#id ⇒ Object
The unique identifier of the provider
19 20 21 |
# File 'lib/trinsic_api/models/provider.rb', line 19 def id @id end |
#launch_method ⇒ Object
Relevant only to Direct Provider Sessions. The ‘LaunchMethod` which must be supported to launch the Provider Session in Direct Provider Sessions.
49 50 51 |
# File 'lib/trinsic_api/models/provider.rb', line 49 def launch_method @launch_method end |
#licensed ⇒ Object
Whether this provider is licensed for use by your organization
46 47 48 |
# File 'lib/trinsic_api/models/provider.rb', line 46 def licensed @licensed end |
#live_health ⇒ Object
The health for a provider in the live environment
82 83 84 |
# File 'lib/trinsic_api/models/provider.rb', line 82 def live_health @live_health end |
#logo_url ⇒ Object
The URL of the provider’s logo
25 26 27 |
# File 'lib/trinsic_api/models/provider.rb', line 25 def logo_url @logo_url end |
#name ⇒ Object
The display name of the provider
22 23 24 |
# File 'lib/trinsic_api/models/provider.rb', line 22 def name @name end |
#regions ⇒ Object
Specific regions supported by this provider
37 38 39 |
# File 'lib/trinsic_api/models/provider.rb', line 37 def regions @regions end |
#requires_input ⇒ Object
Relevant to Hosted Provider Sessions and Direct Provider Sessions. If ‘true`, this Provider requires provider-specific input on Session creation. If this input is not provided, Trinsic’s Hosted UI will be invoked to collect the input from the user.
61 62 63 |
# File 'lib/trinsic_api/models/provider.rb', line 61 def requires_input @requires_input end |
#results_may_be_delayed_after_redirect ⇒ Object
If ‘true`, then the results for this Provider may not be available immediately after the user is redirected back to your application. In this case, the `GetSessionResults` API must be called until results are available. This is an uncommon scenario, and only applies to Providers which cannot guarantee the availability of results immediately after the user is redirected back to your application.
55 56 57 |
# File 'lib/trinsic_api/models/provider.rb', line 55 def results_may_be_delayed_after_redirect @results_may_be_delayed_after_redirect end |
#sub_providers ⇒ Object
Metadata about the sub-providers which are available for this Provider in the current Environment. For example, Italy’s SPID is a Provider which aggregates access to multiple sub-providers.
79 80 81 |
# File 'lib/trinsic_api/models/provider.rb', line 79 def sub_providers @sub_providers end |
#subdivisions ⇒ Object
The subdivisions (states, provinces, etc.) where this Provider is available (as alpha-2 ISO codes).
43 44 45 |
# File 'lib/trinsic_api/models/provider.rb', line 43 def subdivisions @subdivisions end |
#subtext ⇒ Object
The Provider’s subtext recommended to be shown next to the name. This is flavor text, not a full, human-readable description of the provider.
28 29 30 |
# File 'lib/trinsic_api/models/provider.rb', line 28 def subtext @subtext end |
#supported_languages ⇒ Object
Languages supported by this Provider’s Trinsic-hosted UI, as BCP 47 language codes.
70 71 72 |
# File 'lib/trinsic_api/models/provider.rb', line 70 def supported_languages @supported_languages end |
#supports_direct_provider_sessions ⇒ Object
Whether this Provider can be fully whitelabeled/OEMed through the Direct Provider Sessions API. If ‘false`, the Provider may still be launched through Direct Provider Sessions; however, it will necessarily require a Trinsic-hosted UI to function.
67 68 69 |
# File 'lib/trinsic_api/models/provider.rb', line 67 def supports_direct_provider_sessions @supports_direct_provider_sessions end |
#test_health ⇒ Object
The health for a provider in the test environment
85 86 87 |
# File 'lib/trinsic_api/models/provider.rb', line 85 def test_health @test_health end |
Class Method Details
.acceptable_attribute_map ⇒ Object
Returns attribute mapping this model knows about
139 140 141 |
# File 'lib/trinsic_api/models/provider.rb', line 139 def self.acceptable_attribute_map attribute_map end |
.acceptable_attributes ⇒ Object
Returns all the JSON keys this model knows about
144 145 146 |
# File 'lib/trinsic_api/models/provider.rb', line 144 def self.acceptable_attributes acceptable_attribute_map.values end |
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
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 136 |
# File 'lib/trinsic_api/models/provider.rb', line 110 def self.attribute_map { :'id' => :'id', :'name' => :'name', :'logo_url' => :'logoUrl', :'subtext' => :'subtext', :'description' => :'description', :'geography' => :'geography', :'regions' => :'regions', :'countries' => :'countries', :'subdivisions' => :'subdivisions', :'licensed' => :'licensed', :'launch_method' => :'launchMethod', :'collection_method' => :'collectionMethod', :'results_may_be_delayed_after_redirect' => :'resultsMayBeDelayedAfterRedirect', :'has_refreshable_content' => :'hasRefreshableContent', :'requires_input' => :'requiresInput', :'has_trinsic_interface' => :'hasTrinsicInterface', :'supports_direct_provider_sessions' => :'supportsDirectProviderSessions', :'supported_languages' => :'supportedLanguages', :'available_attributes' => :'availableAttributes', :'available_attachments' => :'availableAttachments', :'sub_providers' => :'subProviders', :'live_health' => :'liveHealth', :'test_health' => :'testHealth' } end |
.build_from_hash(attributes) ⇒ Object
Builds the object from hash
695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 |
# File 'lib/trinsic_api/models/provider.rb', line 695 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
178 179 180 181 182 183 184 185 |
# File 'lib/trinsic_api/models/provider.rb', line 178 def self.openapi_nullable Set.new([ :'supported_languages', :'available_attributes', :'available_attachments', :'sub_providers', ]) end |
.openapi_types ⇒ Object
Attribute type mapping.
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 |
# File 'lib/trinsic_api/models/provider.rb', line 149 def self.openapi_types { :'id' => :'String', :'name' => :'String', :'logo_url' => :'String', :'subtext' => :'String', :'description' => :'String', :'geography' => :'Array<String>', :'regions' => :'Array<String>', :'countries' => :'Array<String>', :'subdivisions' => :'Array<String>', :'licensed' => :'Boolean', :'launch_method' => :'IntegrationLaunchMethod', :'collection_method' => :'ResultCollectionMethod', :'results_may_be_delayed_after_redirect' => :'Boolean', :'has_refreshable_content' => :'Boolean', :'requires_input' => :'Boolean', :'has_trinsic_interface' => :'Boolean', :'supports_direct_provider_sessions' => :'Boolean', :'supported_languages' => :'Array<ProviderSupportedLanguage>', :'available_attributes' => :'Array<ContractAttribute>', :'available_attachments' => :'Array<ContractAttachment>', :'sub_providers' => :'Array<SubProviderMetadata>', :'live_health' => :'ProviderHealth', :'test_health' => :'ProviderHealth' } end |
Instance Method Details
#==(o) ⇒ Object
Checks equality by comparing each attribute.
652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 |
# File 'lib/trinsic_api/models/provider.rb', line 652 def ==(o) return true if self.equal?(o) self.class == o.class && id == o.id && name == o.name && logo_url == o.logo_url && subtext == o.subtext && description == o.description && geography == o.geography && regions == o.regions && countries == o.countries && subdivisions == o.subdivisions && licensed == o.licensed && launch_method == o.launch_method && collection_method == o.collection_method && results_may_be_delayed_after_redirect == o.results_may_be_delayed_after_redirect && has_refreshable_content == o.has_refreshable_content && requires_input == o.requires_input && has_trinsic_interface == o.has_trinsic_interface && supports_direct_provider_sessions == o.supports_direct_provider_sessions && supported_languages == o.supported_languages && available_attributes == o.available_attributes && == o. && sub_providers == o.sub_providers && live_health == o.live_health && test_health == o.test_health end |
#eql?(o) ⇒ Boolean
682 683 684 |
# File 'lib/trinsic_api/models/provider.rb', line 682 def eql?(o) self == o end |
#hash ⇒ Integer
Calculates hash code according to all attributes.
688 689 690 |
# File 'lib/trinsic_api/models/provider.rb', line 688 def hash [id, name, logo_url, subtext, description, geography, regions, countries, subdivisions, licensed, launch_method, collection_method, results_may_be_delayed_after_redirect, has_refreshable_content, requires_input, has_trinsic_interface, supports_direct_provider_sessions, supported_languages, available_attributes, , sub_providers, live_health, test_health].hash end |
#list_invalid_properties ⇒ Object
Show invalid properties with the reasons. Usually used together with valid?
352 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 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 |
# File 'lib/trinsic_api/models/provider.rb', line 352 def list_invalid_properties warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' invalid_properties = Array.new if @id.nil? invalid_properties.push('invalid value for "id", id cannot be nil.') end if @name.nil? invalid_properties.push('invalid value for "name", name cannot be nil.') end if @logo_url.nil? invalid_properties.push('invalid value for "logo_url", logo_url cannot be nil.') end if @subtext.nil? invalid_properties.push('invalid value for "subtext", subtext cannot be nil.') end if @description.nil? invalid_properties.push('invalid value for "description", description cannot be nil.') end if @geography.nil? invalid_properties.push('invalid value for "geography", geography cannot be nil.') end if @regions.nil? invalid_properties.push('invalid value for "regions", regions cannot be nil.') end if @countries.nil? invalid_properties.push('invalid value for "countries", countries cannot be nil.') end if @subdivisions.nil? invalid_properties.push('invalid value for "subdivisions", subdivisions cannot be nil.') end if @licensed.nil? invalid_properties.push('invalid value for "licensed", licensed cannot be nil.') end if @launch_method.nil? invalid_properties.push('invalid value for "launch_method", launch_method cannot be nil.') end if @collection_method.nil? invalid_properties.push('invalid value for "collection_method", collection_method cannot be nil.') end if @results_may_be_delayed_after_redirect.nil? invalid_properties.push('invalid value for "results_may_be_delayed_after_redirect", results_may_be_delayed_after_redirect cannot be nil.') end if @has_refreshable_content.nil? invalid_properties.push('invalid value for "has_refreshable_content", has_refreshable_content cannot be nil.') end if @requires_input.nil? invalid_properties.push('invalid value for "requires_input", requires_input cannot be nil.') end if @has_trinsic_interface.nil? invalid_properties.push('invalid value for "has_trinsic_interface", has_trinsic_interface cannot be nil.') end if @supports_direct_provider_sessions.nil? invalid_properties.push('invalid value for "supports_direct_provider_sessions", supports_direct_provider_sessions cannot be nil.') end if @live_health.nil? invalid_properties.push('invalid value for "live_health", live_health cannot be nil.') end if @test_health.nil? invalid_properties.push('invalid value for "test_health", test_health cannot be nil.') end invalid_properties end |
#to_hash ⇒ Hash
Returns the object in the form of hash
717 718 719 720 721 722 723 724 725 726 727 728 729 |
# File 'lib/trinsic_api/models/provider.rb', line 717 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 |
#valid? ⇒ Boolean
Check to see if the all the properties in the model are valid
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/provider.rb', line 436 def valid? warn '[DEPRECATED] the `valid?` method is obsolete' return false if @id.nil? return false if @name.nil? return false if @logo_url.nil? return false if @subtext.nil? return false if @description.nil? return false if @geography.nil? return false if @regions.nil? return false if @countries.nil? return false if @subdivisions.nil? return false if @licensed.nil? return false if @launch_method.nil? return false if @collection_method.nil? return false if @results_may_be_delayed_after_redirect.nil? return false if @has_refreshable_content.nil? return false if @requires_input.nil? return false if @has_trinsic_interface.nil? return false if @supports_direct_provider_sessions.nil? return false if @live_health.nil? return false if @test_health.nil? true end |