lib/mercadopago/client.rb
def handle_auth(auth)
      mandatory_keys = %w{ access_token refresh_token }

      if (auth.keys & mandatory_keys) == mandatory_keys
        @access_token   = auth['access_token']
        @refresh_token  = auth['refresh_token']
        @expires_in     = auth['expires_in']
      else
        raise AccessError, auth['message']
      end
    end
#
# Loads the tokens from the authentication hash.
#
# - auth: the authentication hash returned by MercadoPago.
#
Loads the tokens from the authentication hash.
auth: the authentication hash returned by MercadoPago.
Loads the tokens from the authentication hash . auth : the authentication hash returned by MercadoPago .
def handle_auth(auth)
      mandatory_keys = %w{ access_token refresh_token }
      if (auth.keys & mandatory_keys) == mandatory_keys
        @access_token   = auth['access_token']
        @refresh_token  = auth['refresh_token']
        @expires_in     = auth['expires_in']
      else
        raise AccessError, auth['message']
      end
    end
def handle_auth ( auth ) mandatory_keys = %w{ access_token refresh_token } if ( auth . keys & mandatory_keys ) == mandatory_keys @access_token = auth [ 'access_token' ] @refresh_token = auth [ 'refresh_token' ] @expires_in = auth [ 'expires_in' ] else raise AccessError , auth [ 'message' ] end end
Loads the tokens from the authentication hash.
Loads the tokens from the authentication hash .
auth