The Plaid namespace.

Sections
Namespace
Methods
C
S
Constants
PRODUCTS = %i(connect auth info income risk).freeze
 

Available Plaid products.

VERSION = '3.0.0'.freeze
 
Public
Constants
PRODUCTS = %i(connect auth info income risk).freeze
 

Available Plaid products.

VERSION = '3.0.0'.freeze
 
Attributes
[RW] client

The default Client.

[RW] read_timeout

The Integer read timeout for requests to Plaid HTTP API. Should be specified in seconds. Default value is 120 (2 minutes).

Class Public methods
config()

A helper function to ease configuration.

Yields self.

Examples

Plaid.configure do |p|
  p.client_id = 'Plaid provided client ID here'
  p.secret = 'Plaid provided secret key here'
  p.env = :tartan
  p.read_timeout = 300   # it's 5 minutes, yay!
end

Returns

Returns nothing.

# File lib/plaid.rb, line 42
def config
  client = Client.new
  yield client
  self.client = client
end
Internal
Class Public methods
symbolize_hash(hash, values: false)

Symbolize keys (and values) for a hash.

hash

The Hash with string keys (or nil).

values

The Boolean flag telling the function to symbolize values as well.

Returns

Returns a Hash with keys.to_sym (or nil if hash is nil).

# File lib/plaid.rb, line 55
def symbolize_hash(hash, values: false)
  return unless hash
  return hash.map { |h| symbolize_hash(h) } if hash.is_a?(Array)

  hash.each_with_object({}) do |(k, v), memo|
    memo[k.to_sym] = values ? v.to_sym : v
  end
end