Class: ThePlaidApi::DashboardUserGetResponse

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

Overview

Account information associated with a team member with access to the Plaid dashboard.

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(id:, created_at:, email_address:, status:, request_id:, additional_properties: nil) ⇒ DashboardUserGetResponse

Returns a new instance of DashboardUserGetResponse.



60
61
62
63
64
65
66
67
68
69
70
71
# File 'lib/the_plaid_api/models/dashboard_user_get_response.rb', line 60

def initialize(id:, created_at:, email_address:, status:, request_id:,
               additional_properties: nil)
  # Add additional model properties to the instance
  additional_properties = {} if additional_properties.nil?

  @id = id
  @created_at = created_at
  @email_address = email_address
  @status = status
  @request_id = request_id
  @additional_properties = additional_properties
end

Instance Attribute Details

#created_atDateTime

An ISO8601 formatted timestamp.

Returns:

  • (DateTime)


21
22
23
# File 'lib/the_plaid_api/models/dashboard_user_get_response.rb', line 21

def created_at
  @created_at
end

#email_addressString

A valid email address. Must not have leading or trailing spaces and address must be RFC compliant. For more information, see [RFC 3696](datatracker.ietf.org/doc/html/rfc3696).

Returns:

  • (String)


27
28
29
# File 'lib/the_plaid_api/models/dashboard_user_get_response.rb', line 27

def email_address
  @email_address
end

#idString

ID of the associated user. To retrieve the email address or other details of the person corresponding to this id, use ‘/dashboard_user/get`.

Returns:

  • (String)


17
18
19
# File 'lib/the_plaid_api/models/dashboard_user_get_response.rb', line 17

def id
  @id
end

#request_idString

A unique identifier for the request, which can be used for troubleshooting. This identifier, like all Plaid identifiers, is case sensitive.

Returns:

  • (String)


37
38
39
# File 'lib/the_plaid_api/models/dashboard_user_get_response.rb', line 37

def request_id
  @request_id
end

#statusDashboardUserStatus

The current status of the user.

Returns:



31
32
33
# File 'lib/the_plaid_api/models/dashboard_user_get_response.rb', line 31

def status
  @status
end

Class Method Details

.from_hash(hash) ⇒ Object

Creates an instance of the object from a hash.



74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
# File 'lib/the_plaid_api/models/dashboard_user_get_response.rb', line 74

def self.from_hash(hash)
  return nil unless hash

  # Extract variables from the hash.
  id = hash.key?('id') ? hash['id'] : nil
  created_at = if hash.key?('created_at')
                 (DateTimeHelper.from_rfc3339(hash['created_at']) if hash['created_at'])
               end
  email_address = hash.key?('email_address') ? hash['email_address'] : nil
  status = hash.key?('status') ? hash['status'] : nil
  request_id = hash.key?('request_id') ? hash['request_id'] : nil

  # 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.
  DashboardUserGetResponse.new(id: id,
                               created_at: created_at,
                               email_address: email_address,
                               status: status,
                               request_id: request_id,
                               additional_properties: additional_properties)
end

.namesObject

A mapping from model property names to API property names.



40
41
42
43
44
45
46
47
48
# File 'lib/the_plaid_api/models/dashboard_user_get_response.rb', line 40

def self.names
  @_hash = {} if @_hash.nil?
  @_hash['id'] = 'id'
  @_hash['created_at'] = 'created_at'
  @_hash['email_address'] = 'email_address'
  @_hash['status'] = 'status'
  @_hash['request_id'] = 'request_id'
  @_hash
end

.nullablesObject

An array for nullable fields



56
57
58
# File 'lib/the_plaid_api/models/dashboard_user_get_response.rb', line 56

def self.nullables
  []
end

.optionalsObject

An array for optional fields



51
52
53
# File 'lib/the_plaid_api/models/dashboard_user_get_response.rb', line 51

def self.optionals
  []
end

Instance Method Details

#inspectObject

Provides a debugging-friendly string with detailed object information.



115
116
117
118
119
120
# File 'lib/the_plaid_api/models/dashboard_user_get_response.rb', line 115

def inspect
  class_name = self.class.name.split('::').last
  "<#{class_name} id: #{@id.inspect}, created_at: #{@created_at.inspect}, email_address:"\
  " #{@email_address.inspect}, status: #{@status.inspect}, request_id: #{@request_id.inspect},"\
  " additional_properties: #{@additional_properties}>"
end

#to_custom_created_atObject



102
103
104
# File 'lib/the_plaid_api/models/dashboard_user_get_response.rb', line 102

def to_custom_created_at
  DateTimeHelper.to_rfc3339(created_at)
end

#to_sObject

Provides a human-readable string representation of the object.



107
108
109
110
111
112
# File 'lib/the_plaid_api/models/dashboard_user_get_response.rb', line 107

def to_s
  class_name = self.class.name.split('::').last
  "<#{class_name} id: #{@id}, created_at: #{@created_at}, email_address: #{@email_address},"\
  " status: #{@status}, request_id: #{@request_id}, additional_properties:"\
  " #{@additional_properties}>"
end