Class: FdxV660Api::AccountSelectionFilters1
- Inherits:
-
BaseModel
- Object
- CoreLibrary::BaseModel
- BaseModel
- FdxV660Api::AccountSelectionFilters1
- Defined in:
- lib/fdx_v660_api/models/account_selection_filters1.rb
Overview
Optional filters indicating which account constraints are eligible for, or required by, the Data Recipient for authorization
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) ⇒ AccountSelectionFilters1
constructor
A new instance of AccountSelectionFilters1.
-
#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) ⇒ AccountSelectionFilters1
Returns a new instance of AccountSelectionFilters1.
73 74 75 76 77 78 79 80 81 82 83 84 |
# File 'lib/fdx_v660_api/models/account_selection_filters1.rb', line 73 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
27 28 29 |
# File 'lib/fdx_v660_api/models/account_selection_filters1.rb', line 27 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
19 20 21 |
# File 'lib/fdx_v660_api/models/account_selection_filters1.rb', line 19 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
36 37 38 |
# File 'lib/fdx_v660_api/models/account_selection_filters1.rb', line 36 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
46 47 48 |
# File 'lib/fdx_v660_api/models/account_selection_filters1.rb', line 46 def lines_of_business @lines_of_business 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 |
# File 'lib/fdx_v660_api/models/account_selection_filters1.rb', line 87 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. AccountSelectionFilters1.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.
49 50 51 52 53 54 55 56 |
# File 'lib/fdx_v660_api/models/account_selection_filters1.rb', line 49 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
69 70 71 |
# File 'lib/fdx_v660_api/models/account_selection_filters1.rb', line 69 def self.nullables [] end |
.optionals ⇒ Object
An array for optional fields
59 60 61 62 63 64 65 66 |
# File 'lib/fdx_v660_api/models/account_selection_filters1.rb', line 59 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.
122 123 124 125 126 127 |
# File 'lib/fdx_v660_api/models/account_selection_filters1.rb', line 122 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.
114 115 116 117 118 119 |
# File 'lib/fdx_v660_api/models/account_selection_filters1.rb', line 114 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 |