Sha256: c2171c64d2dbba9130b55b27c5a0bc8a0454c64e4decc6770fc6ff470304fddc

Contents?: true

Size: 1.03 KB

Versions: 8

Compression:

Stored size: 1.03 KB

Contents

module Plaid
  # Public: Class used to call the Identity product.
  class Identity < BaseProduct
    # Public: Get Identity information.
    #
    # Does a POST /identity/get call to retrieve all info for a given
    # access_token's item.
    #
    # access_token - access_token who's item to fetch Identity data for.
    #
    # Returns the IdentityResponse object with Identity info.
    def get(access_token)
      post_with_auth 'identity/get',
                     IdentityResponse,
                     access_token: access_token
    end
  end

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

    ##
    # :attr_reader:
    # Public: Identity information: Plaid::Models::Identity.
    property :identity, coerce: Models::Identity

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

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
plaid-6.3.1 lib/plaid/products/identity.rb
plaid-7.0.0.rc0 lib/plaid/products/identity.rb
plaid-6.3.0 lib/plaid/products/identity.rb
plaid-6.2.1 lib/plaid/products/identity.rb
plaid-6.2.0 lib/plaid/products/identity.rb
plaid-6.1.0 lib/plaid/products/identity.rb
plaid-6.0.0 lib/plaid/products/identity.rb
plaid-5.0.0 lib/plaid/products/identity.rb