Class: AdsCommonForAdcenter::ParametersValidator

Inherits:
AdsCommon::ParametersValidator
  • Object
show all
Defined in:
lib/ads_common_for_adcenter/parameters_validator.rb

Instance Method Summary collapse

Instance Method Details

#validate_args(action_name, args) ⇒ Object

Validates input parameters to:

  • add parameter names;

  • resolve xsi:type where required;

  • convert some native types to XML.



8
9
10
11
12
13
14
# File 'lib/ads_common_for_adcenter/parameters_validator.rb', line 8

def validate_args(action_name, args)
  in_params = @registry.get_method_signature(action_name)[:input] # Hash like {:name=>"get_accounts_info_request", :fields=>[]}
  # TODO: compare number of parameters.
  args_hash = args#{in_params[:name] => deep_copy(args)}
  #validate_arguments(args_hash, in_params)
  return args_hash
end