Sha256: ca5d880674f29c90a21ebfedfe8c76cfea488ed9eab35521bdda36af2f843549

Contents?: true

Size: 493 Bytes

Versions: 11

Compression:

Stored size: 493 Bytes

Contents

module Bunq
  ##
  # https://doc.bunq.com/api/1/call/session-server
  class SessionServers
    def initialize(client)
      @resource = Bunq::Resource.new(client, "/v1/session-server")
      @api_key = client.configuration.api_key
    end

    ##
    # https://doc.bunq.com/api/1/call/session-server/method/post
    def create
      fail 'Cannot create session, please add the api_key to your configuration' unless @api_key
      @resource.post(secret: @api_key)['Response']
    end
  end
end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
bunq-client-0.7.2 lib/bunq/session_servers.rb
bunq-client-0.7.1 lib/bunq/session_servers.rb
bunq-client-0.7.0 lib/bunq/session_servers.rb
bunq-client-0.6.1 lib/bunq/session_servers.rb
bunq-client-0.6.0 lib/bunq/session_servers.rb
bunq-client-0.5.0 lib/bunq/session_servers.rb
bunq-client-0.4.2 lib/bunq/session_servers.rb
bunq-client-0.4.1 lib/bunq/session_servers.rb
bunq-client-0.4.0 lib/bunq/session_servers.rb
bunq-client-0.3.0 lib/bunq/session_servers.rb
bunq-client-0.2.0 lib/bunq/session_servers.rb