Module: Justa

Defined in:
lib/justa.rb,
lib/justa/util.rb,
lib/justa/model.rb,
lib/justa/errors.rb,
lib/justa/object.rb,
lib/justa/request.rb,
lib/justa/version.rb,
lib/justa/order_commom.rb,
lib/justa/authenticator.rb,
lib/justa/resources/pix.rb,
lib/justa/token_manager.rb

Defined Under Namespace

Classes: Authenticator, Client, ConnectionError, Error, JustaError, JustaObject, MissingCredentialsError, Model, NotFound, OrderCommom, ParamError, Pix, Request, RequestError, ResponseError, TokenManager, Util, ValidationError

Constant Summary collapse

VERSION =
"0.1.9"

Class Attribute Summary collapse

Class Method Summary collapse

Class Attribute Details

.api_endpointObject (readonly)

Returns the value of attribute api_endpoint.



24
25
26
# File 'lib/justa.rb', line 24

def api_endpoint
  @api_endpoint
end

.callback_urlObject

Returns the value of attribute callback_url.



22
23
24
# File 'lib/justa.rb', line 22

def callback_url
  @callback_url
end

.client_idObject

Returns the value of attribute client_id.



22
23
24
# File 'lib/justa.rb', line 22

def client_id
  @client_id
end

.client_secretObject

Returns the value of attribute client_secret.



22
23
24
# File 'lib/justa.rb', line 22

def client_secret
  @client_secret
end

.credentialsObject

Returns the value of attribute credentials.



22
23
24
# File 'lib/justa.rb', line 22

def credentials
  @credentials
end

.default_client_keyObject

Returns the value of attribute default_client_key.



22
23
24
# File 'lib/justa.rb', line 22

def default_client_key
  @default_client_key
end

.documentObject

Returns the value of attribute document.



22
23
24
# File 'lib/justa.rb', line 22

def document
  @document
end

.integrator_idObject

Returns the value of attribute integrator_id.



22
23
24
# File 'lib/justa.rb', line 22

def integrator_id
  @integrator_id
end

.passwordObject

Returns the value of attribute password.



22
23
24
# File 'lib/justa.rb', line 22

def password
  @password
end

.usernameObject

Returns the value of attribute username.



22
23
24
# File 'lib/justa.rb', line 22

def username
  @username
end

Class Method Details

.production?Boolean

Returns:

  • (Boolean)


26
27
28
29
30
31
32
33
34
35
36
37
38
# File 'lib/justa.rb', line 26

def production?
  env = nil
  begin
    env = ENV["RACK_ENV"] == "production" ||
          ENV["RAILS_ENV"] == "production" ||
          ENV["PRODUCTION"] ||
          ENV["production"] || (Rails.env.production? if Object.const_defined?("::Rails"))
  rescue NameError => e
    return false
  end

  env || false
end