Representation of user information.
Sections
Methods
Public
Attributes
[R] | addresses | The Array of Hash user address information. E.g. [{ primary: true, data: { “street” => “1 Hobbit Way”, “city” => “The Shire”, “state” => “CA”, “zip” => “94108”}}] |
[R] | emails | The Array of Hash user emails information. E.g. [{data: “frodo.baggins@plaid.com”, type: :primary}, …] |
[R] | names | The Array of String user names. E.g. [“Frodo Baggins”, “Samwise Gamgee”]. |
[R] | phone_numbers | The Array of Hash user phone number information. E.g. [{data: “111-222-3456”, type: :work, primary: false}, {data: “123-456-7891”, type: :mobile, primary: true}] |
Instance Public methods
inspect()
Link
Also aliased as: to_s
Source: show
# File lib/plaid/info.rb, line 48 def inspect "#<Plaid::Info names=#{names.inspect}, ...>" end
Internal
Class Public methods
new(fields)
Link
Construct the Info object.
Source: show
# File lib/plaid/info.rb, line 30 def initialize(fields) @names = fields['names'] @emails = fields['emails'].map do |h| symbolize_values Plaid.symbolize_hash(h), :type end @phone_numbers = fields['phone_numbers'].map do |h| symbolize_values Plaid.symbolize_hash(h), :type end @addresses = fields['addresses'].map do |h| Plaid.symbolize_hash(h) end end