Class: Plaid::InstitutionsSearchRequestOptions
- Inherits:
-
BaseModel
- Object
- CoreLibrary::BaseModel
- BaseModel
- Plaid::InstitutionsSearchRequestOptions
- Defined in:
- lib/plaid/models/institutions_search_request_options.rb
Overview
An optional object to filter ‘/institutions/search` results.
Instance Attribute Summary collapse
-
#include_auth_metadata ⇒ TrueClass | FalseClass
When ‘true`, returns metadata related to the Auth product indicating which auth methods are supported.
-
#include_optional_metadata ⇒ TrueClass | FalseClass
When true, return the institution’s homepage URL, logo and primary brand color.
-
#include_payment_initiation_metadata ⇒ TrueClass | FalseClass
When ‘true`, returns metadata related to the Payment Initiation product indicating which payment configurations are supported.
-
#oauth ⇒ TrueClass | FalseClass
Limit results to institutions with or without OAuth login flows.
-
#payment_initiation ⇒ InstitutionsSearchPaymentInitiationOptions
Additional options that will be used to filter institutions by various Payment Initiation configurations.
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(oauth: SKIP, include_optional_metadata: SKIP, include_auth_metadata: false, include_payment_initiation_metadata: false, payment_initiation: SKIP, additional_properties: nil) ⇒ InstitutionsSearchRequestOptions
constructor
A new instance of InstitutionsSearchRequestOptions.
-
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
-
#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(oauth: SKIP, include_optional_metadata: SKIP, include_auth_metadata: false, include_payment_initiation_metadata: false, payment_initiation: SKIP, additional_properties: nil) ⇒ InstitutionsSearchRequestOptions
Returns a new instance of InstitutionsSearchRequestOptions.
65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 |
# File 'lib/plaid/models/institutions_search_request_options.rb', line 65 def initialize(oauth: SKIP, include_optional_metadata: SKIP, include_auth_metadata: false, include_payment_initiation_metadata: false, payment_initiation: SKIP, additional_properties: nil) # Add additional model properties to the instance additional_properties = {} if additional_properties.nil? @oauth = oauth unless oauth == SKIP unless == SKIP @include_optional_metadata = end @include_auth_metadata = unless == SKIP unless == SKIP @include_payment_initiation_metadata = end @payment_initiation = payment_initiation unless payment_initiation == SKIP @additional_properties = additional_properties end |
Instance Attribute Details
#include_auth_metadata ⇒ TrueClass | FalseClass
When ‘true`, returns metadata related to the Auth product indicating which auth methods are supported.
25 26 27 |
# File 'lib/plaid/models/institutions_search_request_options.rb', line 25 def @include_auth_metadata end |
#include_optional_metadata ⇒ TrueClass | FalseClass
When true, return the institution’s homepage URL, logo and primary brand color.
20 21 22 |
# File 'lib/plaid/models/institutions_search_request_options.rb', line 20 def @include_optional_metadata end |
#include_payment_initiation_metadata ⇒ TrueClass | FalseClass
When ‘true`, returns metadata related to the Payment Initiation product indicating which payment configurations are supported.
30 31 32 |
# File 'lib/plaid/models/institutions_search_request_options.rb', line 30 def @include_payment_initiation_metadata end |
#oauth ⇒ TrueClass | FalseClass
Limit results to institutions with or without OAuth login flows. This is primarily relevant to institutions with European country codes
15 16 17 |
# File 'lib/plaid/models/institutions_search_request_options.rb', line 15 def oauth @oauth end |
#payment_initiation ⇒ InstitutionsSearchPaymentInitiationOptions
Additional options that will be used to filter institutions by various Payment Initiation configurations.
35 36 37 |
# File 'lib/plaid/models/institutions_search_request_options.rb', line 35 def payment_initiation @payment_initiation end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 |
# File 'lib/plaid/models/institutions_search_request_options.rb', line 87 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. oauth = hash.key?('oauth') ? hash['oauth'] : SKIP = hash.key?('include_optional_metadata') ? hash['include_optional_metadata'] : SKIP = hash['include_auth_metadata'] ||= false = hash['include_payment_initiation_metadata'] ||= false if hash['payment_initiation'] payment_initiation = InstitutionsSearchPaymentInitiationOptions.from_hash(hash['payment_initiation']) end # Create a new hash for additional properties, removing known properties. new_hash = hash.reject { |k, _| names.value?(k) } additional_properties = APIHelper.get_additional_properties( new_hash, proc { |value| value } ) # Create object from extracted values. InstitutionsSearchRequestOptions.new(oauth: oauth, include_optional_metadata: , include_auth_metadata: , include_payment_initiation_metadata: , payment_initiation: payment_initiation, additional_properties: additional_properties) end |
.names ⇒ Object
A mapping from model property names to API property names.
38 39 40 41 42 43 44 45 46 47 |
# File 'lib/plaid/models/institutions_search_request_options.rb', line 38 def self.names @_hash = {} if @_hash.nil? @_hash['oauth'] = 'oauth' @_hash['include_optional_metadata'] = 'include_optional_metadata' @_hash['include_auth_metadata'] = 'include_auth_metadata' @_hash['include_payment_initiation_metadata'] = 'include_payment_initiation_metadata' @_hash['payment_initiation'] = 'payment_initiation' @_hash end |
.nullables ⇒ Object
An array for nullable fields
61 62 63 |
# File 'lib/plaid/models/institutions_search_request_options.rb', line 61 def self.nullables [] end |
.optionals ⇒ Object
An array for optional fields
50 51 52 53 54 55 56 57 58 |
# File 'lib/plaid/models/institutions_search_request_options.rb', line 50 def self.optionals %w[ oauth include_optional_metadata include_auth_metadata include_payment_initiation_metadata payment_initiation ] end |
Instance Method Details
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
127 128 129 130 131 132 133 134 |
# File 'lib/plaid/models/institutions_search_request_options.rb', line 127 def inspect class_name = self.class.name.split('::').last "<#{class_name} oauth: #{@oauth.inspect}, include_optional_metadata:"\ " #{@include_optional_metadata.inspect}, include_auth_metadata:"\ " #{@include_auth_metadata.inspect}, include_payment_initiation_metadata:"\ " #{@include_payment_initiation_metadata.inspect}, payment_initiation:"\ " #{@payment_initiation.inspect}, additional_properties: #{@additional_properties}>" end |
#to_s ⇒ Object
Provides a human-readable string representation of the object.
118 119 120 121 122 123 124 |
# File 'lib/plaid/models/institutions_search_request_options.rb', line 118 def to_s class_name = self.class.name.split('::').last "<#{class_name} oauth: #{@oauth}, include_optional_metadata: #{@include_optional_metadata},"\ " include_auth_metadata: #{@include_auth_metadata}, include_payment_initiation_metadata:"\ " #{@include_payment_initiation_metadata}, payment_initiation: #{@payment_initiation},"\ " additional_properties: #{@additional_properties}>" end |