Class: ThePlaidApi::FdxRecipientMetadata
- Inherits:
-
BaseModel
- Object
- CoreLibrary::BaseModel
- BaseModel
- ThePlaidApi::FdxRecipientMetadata
- Defined in:
- lib/the_plaid_api/models/fdx_recipient_metadata.rb
Overview
Recipient metadata fields that are defined by FDX
Instance Attribute Summary collapse
-
#client_name ⇒ String
The recipient name displayed by the Data Provider during the consent flow.
-
#logo_uri ⇒ String
Data Recipient Logo URL location.
-
#recipient_id ⇒ String
The recipient identifier.
-
#third_party_legal_name ⇒ String
The legal name of the recipient.
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(recipient_id:, client_name:, third_party_legal_name:, logo_uri: SKIP, additional_properties: nil) ⇒ FdxRecipientMetadata
constructor
A new instance of FdxRecipientMetadata.
-
#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(recipient_id:, client_name:, third_party_legal_name:, logo_uri: SKIP, additional_properties: nil) ⇒ FdxRecipientMetadata
Returns a new instance of FdxRecipientMetadata.
52 53 54 55 56 57 58 59 60 61 62 |
# File 'lib/the_plaid_api/models/fdx_recipient_metadata.rb', line 52 def initialize(recipient_id:, client_name:, third_party_legal_name:, logo_uri: SKIP, additional_properties: nil) # Add additional model properties to the instance additional_properties = {} if additional_properties.nil? @recipient_id = recipient_id @client_name = client_name @logo_uri = logo_uri unless logo_uri == SKIP @third_party_legal_name = third_party_legal_name @additional_properties = additional_properties end |
Instance Attribute Details
#client_name ⇒ String
The recipient name displayed by the Data Provider during the consent flow
18 19 20 |
# File 'lib/the_plaid_api/models/fdx_recipient_metadata.rb', line 18 def client_name @client_name end |
#logo_uri ⇒ String
Data Recipient Logo URL location
22 23 24 |
# File 'lib/the_plaid_api/models/fdx_recipient_metadata.rb', line 22 def logo_uri @logo_uri end |
#recipient_id ⇒ String
The recipient identifier
14 15 16 |
# File 'lib/the_plaid_api/models/fdx_recipient_metadata.rb', line 14 def recipient_id @recipient_id end |
#third_party_legal_name ⇒ String
The legal name of the recipient
26 27 28 |
# File 'lib/the_plaid_api/models/fdx_recipient_metadata.rb', line 26 def third_party_legal_name @third_party_legal_name end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 |
# File 'lib/the_plaid_api/models/fdx_recipient_metadata.rb', line 65 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. recipient_id = hash.key?('recipient_id') ? hash['recipient_id'] : nil client_name = hash.key?('client_name') ? hash['client_name'] : nil third_party_legal_name = hash.key?('third_party_legal_name') ? hash['third_party_legal_name'] : nil logo_uri = hash.key?('logo_uri') ? hash['logo_uri'] : 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. FdxRecipientMetadata.new(recipient_id: recipient_id, client_name: client_name, third_party_legal_name: third_party_legal_name, logo_uri: logo_uri, additional_properties: additional_properties) end |
.names ⇒ Object
A mapping from model property names to API property names.
29 30 31 32 33 34 35 36 |
# File 'lib/the_plaid_api/models/fdx_recipient_metadata.rb', line 29 def self.names @_hash = {} if @_hash.nil? @_hash['recipient_id'] = 'recipient_id' @_hash['client_name'] = 'client_name' @_hash['logo_uri'] = 'logo_uri' @_hash['third_party_legal_name'] = 'third_party_legal_name' @_hash end |
.nullables ⇒ Object
An array for nullable fields
46 47 48 49 50 |
# File 'lib/the_plaid_api/models/fdx_recipient_metadata.rb', line 46 def self.nullables %w[ logo_uri ] end |
.optionals ⇒ Object
An array for optional fields
39 40 41 42 43 |
# File 'lib/the_plaid_api/models/fdx_recipient_metadata.rb', line 39 def self.optionals %w[ logo_uri ] end |
Instance Method Details
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
99 100 101 102 103 104 |
# File 'lib/the_plaid_api/models/fdx_recipient_metadata.rb', line 99 def inspect class_name = self.class.name.split('::').last "<#{class_name} recipient_id: #{@recipient_id.inspect}, client_name:"\ " #{@client_name.inspect}, logo_uri: #{@logo_uri.inspect}, third_party_legal_name:"\ " #{@third_party_legal_name.inspect}, additional_properties: #{@additional_properties}>" end |
#to_s ⇒ Object
Provides a human-readable string representation of the object.
91 92 93 94 95 96 |
# File 'lib/the_plaid_api/models/fdx_recipient_metadata.rb', line 91 def to_s class_name = self.class.name.split('::').last "<#{class_name} recipient_id: #{@recipient_id}, client_name: #{@client_name}, logo_uri:"\ " #{@logo_uri}, third_party_legal_name: #{@third_party_legal_name}, additional_properties:"\ " #{@additional_properties}>" end |