lib/pagarme.rb in pagarme-0.15 vs lib/pagarme.rb in pagarme-1.0

- old
+ new

@@ -1,48 +1,44 @@ -require File.join(File.dirname(__FILE__), '.', 'pagarme/transaction') -require File.join(File.dirname(__FILE__), '.', 'pagarme/request') -require File.join(File.dirname(__FILE__), '.', 'pagarme/errors') +require 'pagarme/pagarme_object' +require 'pagarme/util' +require 'pagarme/model' +require 'pagarme/transaction_common' +require 'pagarme/customer' +require 'pagarme/phone' +require 'pagarme/address' +require 'pagarme/subscription' +require 'pagarme/transaction' +require 'pagarme/plan' +require 'pagarme/request' +require 'pagarme/errors' module PagarMe - @@api_key = nil - @@api_endpoint = 'https://0.0.0.0:3001' + @@api_endpoint = 'https://api.pagar.me' @@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 + @@api_key = api_key end def self.api_key - @@api_key + @@api_key end def self.api_card_encryption_public_key - @@api_card_encryption_public_key + @@api_card_encryption_public_key end def self.full_api_url(relative_path) - "#{@@api_endpoint}/#{@@api_version}#{relative_path}" + "#{@@api_endpoint}/#{@@api_version}#{relative_path}" end def self.live - @@live + @@live end def self.live=(live) - @@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