Class: ThePlaidApi::PartnerEndCustomerOauthInstitution
- Inherits:
-
BaseModel
- Object
- CoreLibrary::BaseModel
- BaseModel
- ThePlaidApi::PartnerEndCustomerOauthInstitution
- Defined in:
- lib/the_plaid_api/models/partner_end_customer_oauth_institution.rb
Overview
The OAuth registration information for an institution.
Instance Attribute Summary collapse
-
#classic_disablement_date ⇒ String
The date on which non-OAuth Item adds will no longer be supported for this institution, or an empty string if no such date has been set by the institution.
-
#environments ⇒ PartnerEndCustomerOauthInstitutionEnvironments
Registration statuses by environment.
-
#errors ⇒ Array[Error]
The errors encountered while registering the end customer’s application with the institutions.
-
#institution_id ⇒ String
TODO: Write general description for this method.
-
#name ⇒ String
TODO: Write general description for this method.
-
#production_enablement_date ⇒ String
The date on which the end customer’s application was approved by the institution, or an empty string if their application has not yet been approved.
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(name: SKIP, institution_id: SKIP, environments: SKIP, production_enablement_date: SKIP, classic_disablement_date: SKIP, errors: SKIP, additional_properties: nil) ⇒ PartnerEndCustomerOauthInstitution
constructor
A new instance of PartnerEndCustomerOauthInstitution.
-
#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(name: SKIP, institution_id: SKIP, environments: SKIP, production_enablement_date: SKIP, classic_disablement_date: SKIP, errors: SKIP, additional_properties: nil) ⇒ PartnerEndCustomerOauthInstitution
Returns a new instance of PartnerEndCustomerOauthInstitution.
73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 |
# File 'lib/the_plaid_api/models/partner_end_customer_oauth_institution.rb', line 73 def initialize(name: SKIP, institution_id: SKIP, environments: SKIP, production_enablement_date: SKIP, classic_disablement_date: SKIP, errors: SKIP, additional_properties: nil) # Add additional model properties to the instance additional_properties = {} if additional_properties.nil? @name = name unless name == SKIP @institution_id = institution_id unless institution_id == SKIP @environments = environments unless environments == SKIP unless production_enablement_date == SKIP @production_enablement_date = production_enablement_date end @classic_disablement_date = classic_disablement_date unless classic_disablement_date == SKIP @errors = errors unless errors == SKIP @additional_properties = additional_properties end |
Instance Attribute Details
#classic_disablement_date ⇒ String
The date on which non-OAuth Item adds will no longer be supported for this institution, or an empty string if no such date has been set by the institution.
34 35 36 |
# File 'lib/the_plaid_api/models/partner_end_customer_oauth_institution.rb', line 34 def classic_disablement_date @classic_disablement_date end |
#environments ⇒ PartnerEndCustomerOauthInstitutionEnvironments
Registration statuses by environment.
22 23 24 |
# File 'lib/the_plaid_api/models/partner_end_customer_oauth_institution.rb', line 22 def environments @environments end |
#errors ⇒ Array[Error]
The errors encountered while registering the end customer’s application with the institutions.
39 40 41 |
# File 'lib/the_plaid_api/models/partner_end_customer_oauth_institution.rb', line 39 def errors @errors end |
#institution_id ⇒ String
TODO: Write general description for this method
18 19 20 |
# File 'lib/the_plaid_api/models/partner_end_customer_oauth_institution.rb', line 18 def institution_id @institution_id end |
#name ⇒ String
TODO: Write general description for this method
14 15 16 |
# File 'lib/the_plaid_api/models/partner_end_customer_oauth_institution.rb', line 14 def name @name end |
#production_enablement_date ⇒ String
The date on which the end customer’s application was approved by the institution, or an empty string if their application has not yet been approved.
28 29 30 |
# File 'lib/the_plaid_api/models/partner_end_customer_oauth_institution.rb', line 28 def production_enablement_date @production_enablement_date end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
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 120 121 122 123 124 125 126 127 128 129 130 131 132 133 |
# File 'lib/the_plaid_api/models/partner_end_customer_oauth_institution.rb', line 93 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. name = hash.key?('name') ? hash['name'] : SKIP institution_id = hash.key?('institution_id') ? hash['institution_id'] : SKIP if hash['environments'] environments = PartnerEndCustomerOauthInstitutionEnvironments.from_hash(hash['environments']) end production_enablement_date = hash.key?('production_enablement_date') ? hash['production_enablement_date'] : SKIP classic_disablement_date = hash.key?('classic_disablement_date') ? hash['classic_disablement_date'] : SKIP # Parameter is an array, so we need to iterate through it errors = nil unless hash['errors'].nil? errors = [] hash['errors'].each do |structure| errors << (Error.from_hash(structure) if structure) end end errors = SKIP unless hash.key?('errors') # 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. PartnerEndCustomerOauthInstitution.new(name: name, institution_id: institution_id, environments: environments, production_enablement_date: production_enablement_date, classic_disablement_date: classic_disablement_date, errors: errors, additional_properties: additional_properties) end |
.names ⇒ Object
A mapping from model property names to API property names.
42 43 44 45 46 47 48 49 50 51 |
# File 'lib/the_plaid_api/models/partner_end_customer_oauth_institution.rb', line 42 def self.names @_hash = {} if @_hash.nil? @_hash['name'] = 'name' @_hash['institution_id'] = 'institution_id' @_hash['environments'] = 'environments' @_hash['production_enablement_date'] = 'production_enablement_date' @_hash['classic_disablement_date'] = 'classic_disablement_date' @_hash['errors'] = 'errors' @_hash end |
.nullables ⇒ Object
An array for nullable fields
66 67 68 69 70 71 |
# File 'lib/the_plaid_api/models/partner_end_customer_oauth_institution.rb', line 66 def self.nullables %w[ production_enablement_date classic_disablement_date ] end |
.optionals ⇒ Object
An array for optional fields
54 55 56 57 58 59 60 61 62 63 |
# File 'lib/the_plaid_api/models/partner_end_customer_oauth_institution.rb', line 54 def self.optionals %w[ name institution_id environments production_enablement_date classic_disablement_date errors ] end |
Instance Method Details
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
145 146 147 148 149 150 151 152 |
# File 'lib/the_plaid_api/models/partner_end_customer_oauth_institution.rb', line 145 def inspect class_name = self.class.name.split('::').last "<#{class_name} name: #{@name.inspect}, institution_id: #{@institution_id.inspect},"\ " environments: #{@environments.inspect}, production_enablement_date:"\ " #{@production_enablement_date.inspect}, classic_disablement_date:"\ " #{@classic_disablement_date.inspect}, errors: #{@errors.inspect}, additional_properties:"\ " #{@additional_properties}>" end |
#to_s ⇒ Object
Provides a human-readable string representation of the object.
136 137 138 139 140 141 142 |
# File 'lib/the_plaid_api/models/partner_end_customer_oauth_institution.rb', line 136 def to_s class_name = self.class.name.split('::').last "<#{class_name} name: #{@name}, institution_id: #{@institution_id}, environments:"\ " #{@environments}, production_enablement_date: #{@production_enablement_date},"\ " classic_disablement_date: #{@classic_disablement_date}, errors: #{@errors},"\ " additional_properties: #{@additional_properties}>" end |