lib/soaspec/exchange_handlers/rest_handler.rb in soaspec-0.0.69 vs lib/soaspec/exchange_handlers/rest_handler.rb in soaspec-0.0.70

- old
+ new

@@ -23,11 +23,11 @@ end # Will create access_token method based on passed parameters def oauth2(client_id: nil, client_secret: nil, token_url: nil, username: nil, password: nil, security_token: nil) define_method('oauth_response') do - username = ERB.new(username).result(binding) if username + username = api_username || ERB.new(username).result(binding) if username security_token = ERB.new(security_token).result(binding) if security_token token_url = ERB.new(token_url).result(binding) if token_url password = ERB.new(password).result(binding) if password payload = if password && username { @@ -102,9 +102,11 @@ # Savon client used to make SOAP calls attr_accessor :client # SOAP Operation to use by default attr_accessor :operation + # User used in making API calls + attr_accessor :api_username # Set through following method. Base URL in REST requests. def base_url_value nil end \ No newline at end of file