Sha256: 348f62354242962d7d075b434c901b25d36c516f0f0edcbf94693149ee46c05e

Contents?: true

Size: 1023 Bytes

Versions: 5

Compression:

Stored size: 1023 Bytes

Contents

require File.join(File.dirname(__FILE__), '.', 'pagarme/transaction')
require File.join(File.dirname(__FILE__), '.', 'pagarme/request')
require File.join(File.dirname(__FILE__), '.', 'pagarme/errors')

module PagarMe

  @@api_key = nil
  @@api_endpoint = 'https://0.0.0.0:3001'
  @@api_version = '1'
  @@live = true
  @@api_card_encryption_public_key = File.join(File.dirname(__FILE__), '..', 'certs/public_key.pem')

  def self.api_key=(api_key)
	@@api_key = api_key
  end

  def self.api_key
	@@api_key
  end

  def self.api_card_encryption_public_key
	@@api_card_encryption_public_key
  end

  def self.full_api_url(relative_path)
	"#{@@api_endpoint}/#{@@api_version}#{relative_path}"
  end

  def self.live
	@@live
  end

  def self.live=(live)
	@@live = live
  end

  # def self.request(method, url, parameters)
  # 	request_options = {
  # 		:method => method,
  # 		:url => self.full_api_url(url)
  # 		:headers => nil,
  # 		:open_timeout => 30,
  # 		:payload => payload,
  # 		:timeout => 80,
  # 	}
  # end

end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
pagarme-0.15 lib/pagarme.rb
pagarme-0.14 lib/pagarme.rb
pagarme-0.13 lib/pagarme.rb
pagarme-0.12 lib/pagarme.rb
pagarme-0.11 lib/pagarme.rb