Sha256: 88b5958934ca64c488c6c9627e76149fa69fa7c8f87f9310c4b4bdae34644bb6

Contents?: true

Size: 1.35 KB

Versions: 30

Compression:

Stored size: 1.35 KB

Contents

module Plaid
  # Public: Class used to call the CreditDetails product.
  class CreditDetails < BaseProduct
    # Public: Get information about all available credit_details.
    #
    # Does a POST /credit_details/get call which fetches credit details
    # associated with an access_token's item.
    #
    # access_token - access_token of an item to fetch credit details for.
    # account_ids  - Specific account ids to fetch credit details for
    #                (optional).
    #
    # Returns the CreditDetailsResponse object with credit details info.
    def get(access_token, account_ids: nil)
      post_with_auth 'credit_details/get',
                     CreditDetailsResponse,
                     build_payload(access_token,
                                   account_ids: account_ids)
    end
  end

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

    ##
    # :attr_reader:
    # Public: The list of credit details: Array of
    # Plaid::Models::CreditDetails.
    property :credit_details, coerce: Array[Models::CreditDetails]

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

Version data entries

30 entries across 30 versions & 1 rubygems

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