Class: ThePlaidApi::DashboardUserGetRequest

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

Overview

Request input for fetching a dashboard user

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(dashboard_user_id:, secret: SKIP, client_id: SKIP, additional_properties: nil) ⇒ DashboardUserGetRequest

Returns a new instance of DashboardUserGetRequest.



50
51
52
53
54
55
56
57
58
59
# File 'lib/the_plaid_api/models/dashboard_user_get_request.rb', line 50

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

  @dashboard_user_id = dashboard_user_id
  @secret = secret unless secret == SKIP
  @client_id = client_id unless client_id == SKIP
  @additional_properties = additional_properties
end

Instance Attribute Details

#client_idString

Your Plaid API ‘client_id`. The `client_id` is required and may be provided either in the `PLAID-CLIENT-ID` header or as part of a request body.

Returns:

  • (String)


26
27
28
# File 'lib/the_plaid_api/models/dashboard_user_get_request.rb', line 26

def client_id
  @client_id
end

#dashboard_user_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)


15
16
17
# File 'lib/the_plaid_api/models/dashboard_user_get_request.rb', line 15

def dashboard_user_id
  @dashboard_user_id
end

#secretString

Your Plaid API ‘secret`. The `secret` is required and may be provided either in the `PLAID-SECRET` header or as part of a request body.

Returns:

  • (String)


20
21
22
# File 'lib/the_plaid_api/models/dashboard_user_get_request.rb', line 20

def secret
  @secret
end

Class Method Details

.from_hash(hash) ⇒ Object

Creates an instance of the object from a hash.



62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
# File 'lib/the_plaid_api/models/dashboard_user_get_request.rb', line 62

def self.from_hash(hash)
  return nil unless hash

  # Extract variables from the hash.
  dashboard_user_id =
    hash.key?('dashboard_user_id') ? hash['dashboard_user_id'] : nil
  secret = hash.key?('secret') ? hash['secret'] : SKIP
  client_id = hash.key?('client_id') ? hash['client_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.
  DashboardUserGetRequest.new(dashboard_user_id: dashboard_user_id,
                              secret: secret,
                              client_id: client_id,
                              additional_properties: additional_properties)
end

.namesObject

A mapping from model property names to API property names.



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

def self.names
  @_hash = {} if @_hash.nil?
  @_hash['dashboard_user_id'] = 'dashboard_user_id'
  @_hash['secret'] = 'secret'
  @_hash['client_id'] = 'client_id'
  @_hash
end

.nullablesObject

An array for nullable fields



46
47
48
# File 'lib/the_plaid_api/models/dashboard_user_get_request.rb', line 46

def self.nullables
  []
end

.optionalsObject

An array for optional fields



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

def self.optionals
  %w[
    secret
    client_id
  ]
end

Instance Method Details

#inspectObject

Provides a debugging-friendly string with detailed object information.



93
94
95
96
97
98
# File 'lib/the_plaid_api/models/dashboard_user_get_request.rb', line 93

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

#to_sObject

Provides a human-readable string representation of the object.



86
87
88
89
90
# File 'lib/the_plaid_api/models/dashboard_user_get_request.rb', line 86

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