Sha256: 0000963ad37e51218dafb0401eb0609d64ec3164e29fc72a9619c682923b4030

Contents?: true

Size: 1.02 KB

Versions: 4

Compression:

Stored size: 1.02 KB

Contents

require_relative 'resource'
require_relative 'monetary_account'
require_relative 'monetary_accounts'
require_relative 'draft_share_invite_bank'
require_relative 'draft_share_invite_banks'
require_relative 'certificate_pinned'
require_relative 'card'
require_relative 'cards'

module Bunq
  class User
    def initialize(client, id)
      @resource = Bunq::Resource.new(client, "/v1/user/#{id}")
    end

    def monetary_account(id)
      Bunq::MonetaryAccount.new(@resource, id)
    end

    def monetary_accounts
      Bunq::MonetaryAccounts.new(@resource)
    end

    def draft_share_invite_bank(id)
      Bunq::DraftShareInviteBank.new(@resource, id)
    end

    def draft_share_invite_banks
      Bunq::DraftShareInviteBanks.new(@resource)
    end

    def certificate_pinned
      Bunq::CertificatePinned.new(@resource)
    end

    def card(id)
      Bunq::Card.new(@resource, id)
    end

    def cards
      Bunq::Cards.new(@resource)
    end

    def show
      @resource.with_session { @resource.get }['Response']
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
bunq-client-0.4.1 lib/bunq/user.rb
bunq-client-0.4.0 lib/bunq/user.rb
bunq-client-0.3.0 lib/bunq/user.rb
bunq-client-0.2.0 lib/bunq/user.rb