Sha256: fb4ac66bc8f0108b77f6d6d967e1eee0d358962d26fc8e5eeb52a4653ae57332

Contents?: true

Size: 1.25 KB

Versions: 20

Compression:

Stored size: 1.25 KB

Contents

module Plaid
  # Public: Class used to call the Liabilities product.
  class Liabilities < BaseProduct
    # Public: Get liabilities information.
    #
    # Does a POST /liabilities/get call which fetches liabilities associated
    # with an access_token's item.
    #
    # access_token - access_token of an item to fetch liabilities for.
    # account_ids  - Specific account ids to fetch liabilities for
    #                (optional).
    #
    # Returns the LiabilitiesResponse object with liabilities data.
    def get(access_token, account_ids: nil)
      post_with_auth 'liabilities/get',
                     LiabilitiesResponse,
                     build_payload(access_token,
                                   account_ids: account_ids)
    end
  end

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

    ##
    # :attr_reader:
    # Public: The liabilities: Plaid::Models::Liabilities.
    property :liabilities, coerce: Models::Liabilities

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

Version data entries

20 entries across 20 versions & 1 rubygems

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