lib/apple_vpp/client.rb
# param_name_array is an array of required parameters. Include a sub-array of parameters for || requirement.
param_name_array is an array of required parameters. Include a sub-array of parameters for || requirement.
param_name_array is an array of required parameters . Include a sub - array of parameters for || requirement .
def require_params param_name_array, params
      param_name_array = [param_name_array] unless param_name_array.kind_of? Array 
      param_name_array.each do |param_names|
        param_names = [param_names] unless param_names.kind_of?(Array)
        param_found = false
        param_names.each do |param_name|
          if params[param_name]
            param_found = true
            break
          end
        end
        unless param_found
          raise ArgumentError, "#{param_names.join(' or ')} must be provided"
        end
      end
    end
def require_params param_name_array , params param_name_array = [ param_name_array ] unless param_name_array . kind_of? Array param_name_array . each do | param_names | param_names = [ param_names ] unless param_names . kind_of? ( Array ) param_found = false param_names . each do | param_name | if params [ param_name ] param_found = true break end end unless param_found raise ArgumentError , "#{param_names.join(' or ')} must be provided" end end end
param_name_array is an array of required parameters.
param_name_array is an array of required parameters .
param_name_array
params