Class: ThePlaidApi::TransferPlatformRequirement

Inherits:
BaseModel
  • Object
show all
Defined in:
lib/the_plaid_api/models/transfer_platform_requirement.rb

Overview

A piece of information that is required for originator onboarding.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from BaseModel

#check_for_conflict, #process_additional_properties, #process_array, #process_basic_value, #process_hash, #to_hash, #to_json

Constructor Details

#initialize(requirement_type: SKIP, person_id: SKIP, additional_properties: nil) ⇒ TransferPlatformRequirement

Returns a new instance of TransferPlatformRequirement.



44
45
46
47
48
49
50
51
52
# File 'lib/the_plaid_api/models/transfer_platform_requirement.rb', line 44

def initialize(requirement_type: SKIP, person_id: SKIP,
               additional_properties: nil)
  # Add additional model properties to the instance
  additional_properties = {} if additional_properties.nil?

  @requirement_type = requirement_type unless requirement_type == SKIP
  @person_id = person_id unless person_id == SKIP
  @additional_properties = additional_properties
end

Instance Attribute Details

#person_idString

UUID of the person associated with the requirement. Only present for individual-scoped requirements.

Returns:

  • (String)


19
20
21
# File 'lib/the_plaid_api/models/transfer_platform_requirement.rb', line 19

def person_id
  @person_id
end

#requirement_typeString

The type of requirement.

Returns:

  • (String)


14
15
16
# File 'lib/the_plaid_api/models/transfer_platform_requirement.rb', line 14

def requirement_type
  @requirement_type
end

Class Method Details

.from_hash(hash) ⇒ Object

Creates an instance of the object from a hash.



55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
# File 'lib/the_plaid_api/models/transfer_platform_requirement.rb', line 55

def self.from_hash(hash)
  return nil unless hash

  # Extract variables from the hash.
  requirement_type =
    hash.key?('requirement_type') ? hash['requirement_type'] : SKIP
  person_id = hash.key?('person_id') ? hash['person_id'] : 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.
  TransferPlatformRequirement.new(requirement_type: requirement_type,
                                  person_id: person_id,
                                  additional_properties: additional_properties)
end

.namesObject

A mapping from model property names to API property names.



22
23
24
25
26
27
# File 'lib/the_plaid_api/models/transfer_platform_requirement.rb', line 22

def self.names
  @_hash = {} if @_hash.nil?
  @_hash['requirement_type'] = 'requirement_type'
  @_hash['person_id'] = 'person_id'
  @_hash
end

.nullablesObject

An array for nullable fields



38
39
40
41
42
# File 'lib/the_plaid_api/models/transfer_platform_requirement.rb', line 38

def self.nullables
  %w[
    person_id
  ]
end

.optionalsObject

An array for optional fields



30
31
32
33
34
35
# File 'lib/the_plaid_api/models/transfer_platform_requirement.rb', line 30

def self.optionals
  %w[
    requirement_type
    person_id
  ]
end

Instance Method Details

#inspectObject

Provides a debugging-friendly string with detailed object information.



84
85
86
87
88
# File 'lib/the_plaid_api/models/transfer_platform_requirement.rb', line 84

def inspect
  class_name = self.class.name.split('::').last
  "<#{class_name} requirement_type: #{@requirement_type.inspect}, person_id:"\
  " #{@person_id.inspect}, additional_properties: #{@additional_properties}>"
end

#to_sObject

Provides a human-readable string representation of the object.



77
78
79
80
81
# File 'lib/the_plaid_api/models/transfer_platform_requirement.rb', line 77

def to_s
  class_name = self.class.name.split('::').last
  "<#{class_name} requirement_type: #{@requirement_type}, person_id: #{@person_id},"\
  " additional_properties: #{@additional_properties}>"
end