Class: FdxV660Api::AccountSelectionFilters
- Inherits:
-
BaseModel
- Object
- CoreLibrary::BaseModel
- BaseModel
- FdxV660Api::AccountSelectionFilters
- Defined in:
- lib/fdx_v660_api/models/account_selection_filters.rb
Overview
Set of optional filters indicating which account constraints are eligible for, or required by, the Data Recipient for authorization, If any are present, the Data Provider SHOULD restrict account selection to only accounts matching the provided values
Instance Attribute Summary collapse
-
#account_categories ⇒ Array[AccountCategoryType]
Optional array of account categories eligible for selection during authorization.
-
#account_types ⇒ Array[AccountType]
Optional array of account types eligible for selection during authorization.
-
#cardinality ⇒ CardinalityFilterType2
Optional selection constraint defining the number of accounts that may or must be selected by customer during authorization.
-
#lines_of_business ⇒ Array[LineOfBusinessType]
Optional filter indicating which line of business accounts are eligible for authorization.
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(account_types: SKIP, account_categories: SKIP, cardinality: SKIP, lines_of_business: SKIP, additional_properties: nil) ⇒ AccountSelectionFilters
constructor
A new instance of AccountSelectionFilters.
-
#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(account_types: SKIP, account_categories: SKIP, cardinality: SKIP, lines_of_business: SKIP, additional_properties: nil) ⇒ AccountSelectionFilters
Returns a new instance of AccountSelectionFilters.
75 76 77 78 79 80 81 82 83 84 85 86 |
# File 'lib/fdx_v660_api/models/account_selection_filters.rb', line 75 def initialize(account_types: SKIP, account_categories: SKIP, cardinality: SKIP, lines_of_business: SKIP, additional_properties: nil) # Add additional model properties to the instance additional_properties = {} if additional_properties.nil? @account_types = account_types unless account_types == SKIP @account_categories = account_categories unless account_categories == SKIP @cardinality = cardinality unless cardinality == SKIP @lines_of_business = lines_of_business unless lines_of_business == SKIP @additional_properties = additional_properties end |
Instance Attribute Details
#account_categories ⇒ Array[AccountCategoryType]
Optional array of account categories eligible for selection during
authorization. If present, the Data Provider SHOULD restrict account
selection to only accounts matching one of the provided values. See
corresponding parameter at
./fdxapi.components.yaml#/components/parameters/AccountCategoriesQuery
29 30 31 |
# File 'lib/fdx_v660_api/models/account_selection_filters.rb', line 29 def account_categories @account_categories end |
#account_types ⇒ Array[AccountType]
Optional array of account types eligible for selection during
authorization. If present, the Data Provider SHOULD restrict account
selection to only accounts matching one of the provided values. See
corresponding parameter at
./fdxapi.components.yaml#/components/parameters/AccountTypesQuery
21 22 23 |
# File 'lib/fdx_v660_api/models/account_selection_filters.rb', line 21 def account_types @account_types end |
#cardinality ⇒ CardinalityFilterType2
Optional selection constraint defining the number of accounts that may or
must be selected by customer during authorization. If present, the Data
Provider SHOULD restrict account selection to number of accounts matching
the provided value. Possible values SINGLE, MULTIPLE, or ALL. See
corresponding parameter at
./fdxapi.components.yaml#/components/parameters/CardinalityQuery
38 39 40 |
# File 'lib/fdx_v660_api/models/account_selection_filters.rb', line 38 def cardinality @cardinality end |
#lines_of_business ⇒ Array[LineOfBusinessType]
Optional filter indicating which line of business accounts are eligible
for authorization. Expected values are CONSUMER, SMALL_BUSINESS, and/or
COMMERCIAL. (LOB type OTHER wouldn't restrict account selections.) If
present, the Data Provider SHOULD restrict account selection to only
accounts in one of the provided business types. See corresponding
parameter at
./fdxapi.components.yaml#/components/parameters/LinesOfBusinessQuery
48 49 50 |
# File 'lib/fdx_v660_api/models/account_selection_filters.rb', line 48 def lines_of_business @lines_of_business end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
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 |
# File 'lib/fdx_v660_api/models/account_selection_filters.rb', line 89 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. account_types = hash.key?('accountTypes') ? hash['accountTypes'] : SKIP account_categories = hash.key?('accountCategories') ? hash['accountCategories'] : SKIP cardinality = hash.key?('cardinality') ? hash['cardinality'] : SKIP lines_of_business = hash.key?('linesOfBusiness') ? hash['linesOfBusiness'] : SKIP # 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. AccountSelectionFilters.new(account_types: account_types, account_categories: account_categories, cardinality: cardinality, lines_of_business: lines_of_business, additional_properties: additional_properties) end |
.names ⇒ Object
A mapping from model property names to API property names.
51 52 53 54 55 56 57 58 |
# File 'lib/fdx_v660_api/models/account_selection_filters.rb', line 51 def self.names @_hash = {} if @_hash.nil? @_hash['account_types'] = 'accountTypes' @_hash['account_categories'] = 'accountCategories' @_hash['cardinality'] = 'cardinality' @_hash['lines_of_business'] = 'linesOfBusiness' @_hash end |
.nullables ⇒ Object
An array for nullable fields
71 72 73 |
# File 'lib/fdx_v660_api/models/account_selection_filters.rb', line 71 def self.nullables [] end |
.optionals ⇒ Object
An array for optional fields
61 62 63 64 65 66 67 68 |
# File 'lib/fdx_v660_api/models/account_selection_filters.rb', line 61 def self.optionals %w[ account_types account_categories cardinality lines_of_business ] end |
Instance Method Details
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
124 125 126 127 128 129 |
# File 'lib/fdx_v660_api/models/account_selection_filters.rb', line 124 def inspect class_name = self.class.name.split('::').last "<#{class_name} account_types: #{@account_types.inspect}, account_categories:"\ " #{@account_categories.inspect}, cardinality: #{@cardinality.inspect}, lines_of_business:"\ " #{@lines_of_business.inspect}, additional_properties: #{@additional_properties}>" end |
#to_s ⇒ Object
Provides a human-readable string representation of the object.
116 117 118 119 120 121 |
# File 'lib/fdx_v660_api/models/account_selection_filters.rb', line 116 def to_s class_name = self.class.name.split('::').last "<#{class_name} account_types: #{@account_types}, account_categories:"\ " #{@account_categories}, cardinality: #{@cardinality}, lines_of_business:"\ " #{@lines_of_business}, additional_properties: #{@additional_properties}>" end |