Class: Bio::BaseSpace::Product

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

Overview

Product information model.

Instance Attribute Summary

Attributes inherited from Model

#attributes, #swagger_types

Instance Method Summary collapse

Methods inherited from Model

#get_attr, #method_missing, #set_attr, #to_str

Constructor Details

#initializeProduct

Create a new Product instance.



23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
# File 'lib/basespace/model/product.rb', line 23

def initialize
  @swagger_types = {
    'Id'                 => 'str',
    'Name'               => 'str',
    'Price'              => 'str',
    'Quantity'           => 'str',
    'PersistenceStatus'  => 'str', # NOPERSISTENCE, ACTIVE, EXPIRED
    'Tags'               => 'list<str>',
  }
  @attributes = {
    'Id'                 => nil,
    'Name'               => nil,
    'Price'              => nil,
    'Quantity'           => nil,
    'PersistenceStatus'  => nil,
    'Tags'               => nil,
  }
end

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class Bio::BaseSpace::Model

Instance Method Details

#to_sObject

Return the name of the product.



43
44
45
# File 'lib/basespace/model/product.rb', line 43

def to_s
  return get_attr('Name').to_s
end