Sha256: 10126829e1664c0b2253b8d026ecb91cb54f2a4718d43fed5907a43f7c776a21

Contents?: true

Size: 1.4 KB

Versions: 29

Compression:

Stored size: 1.4 KB

Contents

module Plaid
  # Public: Class used to call the Auth product.
  class Auth < BaseProduct
    # Public: Get information about account and routing numbers for checking
    # and savings accounts.
    #
    # Does a POST /auth/get call which returns high level account information
    # along with account and routing numbers for checking and savings
    # accounts.
    #
    # access_token - access_token who's item to fetch Auth for.
    # account_ids  - Specific account ids to fetch numbers for (optional).
    # options      - Additional options to merge into API request.
    #
    # Returns AuthResponse.
    def get(access_token, account_ids: nil, options: nil)
      post_with_auth 'auth/get',
                     AuthResponse,
                     build_payload(access_token,
                                   account_ids: account_ids,
                                   options: options)
    end
  end

  # Public: Response wrapper for /accounts/get and /accounts/balance/get
  class AuthResponse < Models::BaseResponse
    ##
    # :attr_reader:
    # Public: The list of accounts: Array of Plaid::Models::Account.
    property :accounts, coerce: Array[Models::Account]

    ##
    # :attr_reader:
    # Public: The item: Plaid::Models::Numbers.
    property :numbers, coerce: Models::Numbers

    ##
    # :attr_reader:
    # Public: The item: Plaid::Models::Item.
    property :item, coerce: Models::Item
  end
end

Version data entries

29 entries across 29 versions & 1 rubygems

Version Path
plaid-11.1.1 lib/plaid/products/auth.rb
plaid-13.2.0 lib/plaid/products/auth.rb
plaid-13.1.0 lib/plaid/products/auth.rb
plaid-13.0.1 lib/plaid/products/auth.rb
plaid-13.0.0 lib/plaid/products/auth.rb
plaid-12.0.0 lib/plaid/products/auth.rb
plaid-11.1.0 lib/plaid/products/auth.rb
plaid-11.0.0 lib/plaid/products/auth.rb
plaid-10.1.0 lib/plaid/products/auth.rb
plaid-10.0.0 lib/plaid/products/auth.rb
plaid-9.0.0 lib/plaid/products/auth.rb
plaid-8.9.0 lib/plaid/products/auth.rb
plaid-8.8.0 lib/plaid/products/auth.rb
plaid-8.7.0 lib/plaid/products/auth.rb
plaid-8.6.0 lib/plaid/products/auth.rb
plaid-8.5.0 lib/plaid/products/auth.rb
plaid-8.4.0 lib/plaid/products/auth.rb
plaid-8.3.0 lib/plaid/products/auth.rb
plaid-8.2.0 lib/plaid/products/auth.rb
plaid-8.1.0 lib/plaid/products/auth.rb