Skip to content

Commit

Permalink
Revert "Merge branch 'release/2.0.0' of https://github.com/mercadopag…
Browse files Browse the repository at this point in the history
…o/sdk-ruby into release/2.0.0"

This reverts commit 73c240d, reversing
changes made to dfd1e42.
  • Loading branch information
Pedro Gonçalves committed May 25, 2020
1 parent 7f0366f commit ee91c14
Show file tree
Hide file tree
Showing 2 changed files with 54 additions and 54 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ bin/
config/*yml
pkg/
*.log
*.gem
*.gem
106 changes: 53 additions & 53 deletions lib/mercadopago.rb
Original file line number Diff line number Diff line change
@@ -1,53 +1,53 @@

require 'rubygems'
require 'json'
require 'uri'
require 'net/https'
require 'yaml'
require File.dirname(__FILE__) + '/version'
require 'ssl_options_patch'
require 'card'
require 'cardtoken'
require 'customer'
require 'discountcampaign'
require 'genericcall'
require 'identificationtype'
require 'merchantorder'
require 'payment'
require 'preference'

class MercadoPago
attr_reader :card, :cardtoken, :customer, :discountcampaign, :genericcall, :identificationtype, :merchantorder, :payment, :preference
@@sandbox = false
def initialize(*args)
if args.size < 1 or args.size > 2
raise "Invalid arguments. Use CLIENT_ID and CLIENT SECRET, or ACCESS_TOKEN"
end

@client_id = args.at(0) if args.size == 2
@client_secret = args.at(1) if args.size == 2
@ll_access_token = args.at(0) if args.size == 1

@card = Card.new(@client_id, @client_secret, @ll_access_token)
@cardtoken = CardToken.new(@client_id, @client_secret, @ll_access_token)
@customer = Customer.new(@client_id, @client_secret, @ll_access_token)
@discountcampaign = DiscountCampaign.new(@client_id, @client_secret, @ll_access_token)
@genericcall = GenericCall.new(@client_id, @client_secret, @ll_access_token)
@identificationtype = IdentificationType.new(@client_id, @client_secret, @ll_access_token)
@merchantorder = MerchantOrder.new(@client_id, @client_secret, @ll_access_token)
@payment = Payment.new(@client_id, @client_secret, @ll_access_token)
@preference = Preference.new(@client_id, @client_secret, @ll_access_token)
end

def sandbox_mode(enable=nil)
if not enable.nil?
@@sandbox = enable
end

return @@sandbox
end

def self.sandbox
@@sandbox
end
end

require 'rubygems'
require 'json'
require 'uri'
require 'net/https'
require 'yaml'
require File.dirname(__FILE__) + '/version'
require 'ssl_options_patch'
require 'card'
require 'cardtoken'
require 'customer'
require 'discountcampaign'
require 'genericcall'
require 'identificationtype'
require 'merchantorder'
require 'payment'
require 'preference'

class MercadoPago
attr_reader :card, :cardtoken, :customer, :discountcampaign, :genericcall, :identificationtype, :merchantorder, :payment, :preference
@@sandbox = false
def initialize(*args)
if args.size < 1 or args.size > 2
raise "Invalid arguments. Use CLIENT_ID and CLIENT SECRET, or ACCESS_TOKEN"
end

@client_id = args.at(0) if args.size == 2
@client_secret = args.at(1) if args.size == 2
@ll_access_token = args.at(0) if args.size == 1

@card = Card.new(@client_id, @client_secret, @ll_access_token)
@cardtoken = CardToken.new(@client_id, @client_secret, @ll_access_token)
@customer = Customer.new(@client_id, @client_secret, @ll_access_token)
@discountcampaign = DiscountCampaign.new(@client_id, @client_secret, @ll_access_token)
@genericcall = GenericCall.new(@client_id, @client_secret, @ll_access_token)
@identificationtype = IdentificationType.new(@client_id, @client_secret, @ll_access_token)
@merchantorder = MerchantOrder.new(@client_id, @client_secret, @ll_access_token)
@payment = Payment.new(@client_id, @client_secret, @ll_access_token)
@preference = Preference.new(@client_id, @client_secret, @ll_access_token)
end

def sandbox_mode(enable=nil)
if not enable.nil?
@@sandbox = enable
end

return @@sandbox
end

def self.sandbox
@@sandbox
end
end

0 comments on commit ee91c14

Please sign in to comment.