class JustGiving::Configuration

Constants

BASE_URI_MAP

Public Class Methods

api_endpoint() click to toggle source

The API endpoint

# File lib/just_giving/configuration.rb, line 36
def self.api_endpoint
  raise JustGiving::InvalidApplicationId.new if !application_id
  case environment
    when :sandbox then "https://api-sandbox.justgiving.com/#{application_id}"
    when :staging then "https://api-staging.justgiving.com/#{application_id}"
    else "https://api.justgiving.com/#{application_id}"
  end
end
application_id() click to toggle source

This is your Just Giving application id

# File lib/just_giving/configuration.rb, line 14
def self.application_id
  @@application_id
end
application_id=(id) click to toggle source
# File lib/just_giving/configuration.rb, line 18
def self.application_id=(id)
  @@application_id = id
end
base_uri() click to toggle source
# File lib/just_giving/configuration.rb, line 22
def self.base_uri
  BASE_URI_MAP[self.environment]
end
ca_path() click to toggle source
# File lib/just_giving/configuration.rb, line 50
def self.ca_path
  @@ca_path
end
ca_path=(path) click to toggle source

Path to the systems CA cert bundles

# File lib/just_giving/configuration.rb, line 46
def self.ca_path=(path)
  @@ca_path = path
end
environment() click to toggle source
# File lib/just_giving/configuration.rb, line 31
def self.environment
  @@environment
end
environment=(env) click to toggle source

This can be :sandbox, :staging or :production and sets what endpoint to use

# File lib/just_giving/configuration.rb, line 27
def self.environment=(env)
  @@environment = env
end
password() click to toggle source
# File lib/just_giving/configuration.rb, line 67
def self.password
  @@password
end
password=(password) click to toggle source
# File lib/just_giving/configuration.rb, line 63
def self.password=(password)
  @@password = password
end
username() click to toggle source

Username/password for basic auth

# File lib/just_giving/configuration.rb, line 55
def self.username
  @@username
end
username=(username) click to toggle source
# File lib/just_giving/configuration.rb, line 59
def self.username=(username)
  @@username = username
end