Class: Mercadopago::Api
- Inherits:
-
Object
- Object
- Mercadopago::Api
- Includes:
- Core::Oauth, Core::Payments
- Defined in:
- lib/mercadopago/api.rb
Instance Attribute Summary collapse
-
#access_token ⇒ Object
Returns the value of attribute access_token.
Instance Method Summary collapse
- #get_last_response ⇒ Object
- #get_last_result ⇒ Object
-
#initialize(args = {}) ⇒ Api
constructor
A new instance of Api.
Methods included from Core::Payments
#get_payment, #get_payment_request, #request_payment, #search_payments
Methods included from Core::Oauth
#authenticate, #authenticate_url, #create_token, #update_token
Constructor Details
#initialize(args = {}) ⇒ Api
Returns a new instance of Api.
5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 |
# File 'lib/mercadopago/api.rb', line 5 def initialize(args={}) @app_key = args[:app_key] @app_secret = args[:app_secret] @callback_url = args[:callback_url] @access_token = args[:access_token] if args[:endpoint_url].present? @endpoint_url = args[:endpoint_url] else @endpoint_url = 'https://api.mercadopago.com' end if args[:auth_url].present? @auth_url = args[:auth_url] else @auth_url = 'https://auth.mercadopago.com.ar' end @site = args[:site] end |
Instance Attribute Details
#access_token ⇒ Object
Returns the value of attribute access_token.
3 4 5 |
# File 'lib/mercadopago/api.rb', line 3 def access_token @access_token end |
Instance Method Details
#get_last_response ⇒ Object
29 30 31 |
# File 'lib/mercadopago/api.rb', line 29 def get_last_response @last_response end |
#get_last_result ⇒ Object
33 34 35 |
# File 'lib/mercadopago/api.rb', line 33 def get_last_result @last_result end |