Sha256: 0b698409fa688b3a3615b58bc8039acc9569c0ee4871b129b0b0e86e316c1c4d

Contents?: true

Size: 1.05 KB

Versions: 2

Compression:

Stored size: 1.05 KB

Contents

module AfterbanksPSD2
  class Account < Resource
    has_fields product:           { type: :string },
               type:              { type: :string },
               balance:           { type: :decimal },
               countable_balance: { type: :decimal },
               arranged_balance:  { type: :decimal },
               currency:          { type: :string },
               description:       { type: :string },
               iban:              { type: :string },
               is_owner:          { type: :boolean },
               holders:           { type: :hash }

    def self.list(token:)
      params = {
        servicekey: AfterbanksPSD2.configuration.servicekey,
        token:      token,
        products:   'GLOBAL'
      }

      response, debug_id = AfterbanksPSD2.api_call(
        method: :post,
        path:   '/transactions/',
        params: params
      )

      Response.new(
        result:   Collection.new(
          response,
          self
        ),
        body:     response,
        debug_id: debug_id
      )
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
afterbanks-psd2-api-ruby-0.1.1 lib/afterbanks_psd2/resources/account.rb
afterbanks-psd2-api-ruby-0.1.0 lib/afterbanks_psd2/resources/account.rb