Sha256: 880238b54e40ffae0659f2f1d5266e45a987bdeac4cb85aa75b16a7a4f242214

Contents?: true

Size: 623 Bytes

Versions: 6

Compression:

Stored size: 623 Bytes

Contents

module Economic
  # The Economic::Session contains details and behaviors for a current
  # connection to the API endpoint.
  class Session
    def self.authentication(private_app_id, access_id)
      @private_app_id = private_app_id
      @access_id = access_id
    end

    def self.app_secret_token
      raise ArgumentError, "Authentication tokens not set, Call Session.authentication" if @private_app_id.nil?

      @private_app_id
    end

    def self.agreement_grant_token
      raise ArgumentError, "Authentication tokens not set, Call Session.authentication" if @access_id.nil?

      @access_id
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
economic-rest-0.4.3 lib/economic/session.rb
economic-rest-0.4.2 lib/economic/session.rb
economic-rest-0.4.1 lib/economic/session.rb
economic-rest-0.4.0 lib/economic/session.rb
economic-rest-0.3.6 lib/economic/session.rb
economic-rest-0.3.5 lib/economic/session.rb