Class: LabWhereClient::Scan

Inherits:
Endpoint show all
Includes:
EndpointCreateActions
Defined in:
lib/lab_where_client.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Methods included from EndpointCreateActions

included

Methods inherited from Endpoint

endpoint_name

Constructor Details

#initialize(params) ⇒ Scan

Returns a new instance of Scan.



134
135
136
137
# File 'lib/lab_where_client.rb', line 134

def initialize(params)
  @message = params['message']
  @errors = params['errors']
end

Instance Attribute Details

#errorsObject (readonly)

Returns the value of attribute errors.



130
131
132
# File 'lib/lab_where_client.rb', line 130

def errors
  @errors
end

#messageObject (readonly)

Returns the value of attribute message.



130
131
132
# File 'lib/lab_where_client.rb', line 130

def message
  @message
end

Class Method Details

.creation_params(params) ⇒ Object



143
144
145
146
147
# File 'lib/lab_where_client.rb', line 143

def self.creation_params(params)
  obj = params.dup
  obj[:labware_barcodes] = obj[:labware_barcodes].join("\n")
  { scan: obj }
end

Instance Method Details

#response_messageObject



139
140
141
# File 'lib/lab_where_client.rb', line 139

def response_message
  @message
end

#valid?Boolean

Returns:

  • (Boolean)


149
150
151
# File 'lib/lab_where_client.rb', line 149

def valid?
  @errors.nil?
end