Class: Economic::Session

Inherits:
Object
  • Object
show all
Defined in:
lib/economic/session.rb

Overview

The Economic::Session contains details and behaviors for a current connection to the API endpoint.

Class Method Summary collapse

Class Method Details

.agreement_grant_tokenObject

Raises:

  • (ArgumentError)


18
19
20
21
22
# File 'lib/economic/session.rb', line 18

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

  @access_id
end

.app_secret_tokenObject

Raises:

  • (ArgumentError)


12
13
14
15
16
# File 'lib/economic/session.rb', line 12

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

  @private_app_id
end

.authentication(private_app_id, access_id) ⇒ Object Also known as: authenticate



6
7
8
9
# File 'lib/economic/session.rb', line 6

def authentication(private_app_id, access_id)
  @private_app_id = private_app_id
  @access_id = access_id
end