Class: Bio::BaseSpace::QueryParametersPurchasedProduct

Inherits:
Object
  • Object
show all
Defined in:
lib/basespace/model/query_parameters_purchased_product.rb

Overview

This class can be passed as an optional argument for a filtering getUserProducts list response.

Constant Summary collapse

{
  'Tags'        => [],
  'ProductIds'  => [],
}

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(pars = {}) ⇒ QueryParametersPurchasedProduct

Create a new QueryParametersPurchasedProduct instance.

pars

Query parameters used for list filtering.



31
32
33
34
35
36
37
# File 'lib/basespace/model/query_parameters_purchased_product.rb', line 31

def initialize(pars = {})
  @passed = {}
  pars.each do |k, v|
    @passed[k] = v
  end
  validate
end

Instance Attribute Details

#passedObject

Returns the value of attribute passed.



21
22
23
# File 'lib/basespace/model/query_parameters_purchased_product.rb', line 21

def passed
  @passed
end

Instance Method Details

#get_parameter_dictObject

Return the query parameters.



50
51
52
# File 'lib/basespace/model/query_parameters_purchased_product.rb', line 50

def get_parameter_dict
  return @passed
end

#to_sObject

Return a string representation of all query parameters.



40
41
42
# File 'lib/basespace/model/query_parameters_purchased_product.rb', line 40

def to_s
  return @passed.to_s
end

#to_strObject

Return debugging information of the object.



45
46
47
# File 'lib/basespace/model/query_parameters_purchased_product.rb', line 45

def to_str
  return self.inspect
end

#validateObject

Check if the query parameters are valid.

Throws UnknownParameterError for illegal parameters.



57
58
59
60
61
# File 'lib/basespace/model/query_parameters_purchased_product.rb', line 57

def validate
  @passed.each do |k, v|
    raise UnknownParameterError.new(k) unless LEGAL.has_key?(k)
  end
end