Class: Files::ExpectationEvaluation

Inherits:
Object
  • Object
show all
Defined in:
lib/files.com/models/expectation_evaluation.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(attributes = {}, options = {}) ⇒ ExpectationEvaluation

Returns a new instance of ExpectationEvaluation.



7
8
9
10
# File 'lib/files.com/models/expectation_evaluation.rb', line 7

def initialize(attributes = {}, options = {})
  @attributes = attributes || {}
  @options = options || {}
end

Instance Attribute Details

#attributesObject (readonly)

Returns the value of attribute attributes.



5
6
7
# File 'lib/files.com/models/expectation_evaluation.rb', line 5

def attributes
  @attributes
end

#optionsObject (readonly)

Returns the value of attribute options.



5
6
7
# File 'lib/files.com/models/expectation_evaluation.rb', line 5

def options
  @options
end

Class Method Details

.all(params = {}, options = {}) ⇒ Object



118
119
120
# File 'lib/files.com/models/expectation_evaluation.rb', line 118

def self.all(params = {}, options = {})
  list(params, options)
end

.find(id, params = {}, options = {}) ⇒ Object

Parameters:

id (required) - int64 - Expectation Evaluation ID.


124
125
126
127
128
129
130
131
132
# File 'lib/files.com/models/expectation_evaluation.rb', line 124

def self.find(id, params = {}, options = {})
  params ||= {}
  params[:id] = id
  raise InvalidParameterError.new("Bad parameter: id must be an Integer") if params[:id] and !params[:id].is_a?(Integer)
  raise MissingParameterError.new("Parameter missing: id") unless params[:id]

  response, options = Api.send_request("/expectation_evaluations/#{params[:id]}", :get, params, options)
  ExpectationEvaluation.new(response.data, options)
end

.get(id, params = {}, options = {}) ⇒ Object



134
135
136
# File 'lib/files.com/models/expectation_evaluation.rb', line 134

def self.get(id, params = {}, options = {})
  find(id, params, options)
end

.list(params = {}, options = {}) ⇒ Object

Parameters:

cursor - string - Used for pagination.  When a list request has more records available, cursors are provided in the response headers `X-Files-Cursor-Next` and `X-Files-Cursor-Prev`.  Send one of those cursor value here to resume an existing list from the next available record.  Note: many of our SDKs have iterator methods that will automatically handle cursor-based pagination.
per_page - int64 - Number of records to show per page.  (Max: 10,000, 1,000 or less is recommended).
sort_by - object - If set, sort records by the specified field in either `asc` or `desc` direction. Valid fields are `workspace_id`, `created_at` or `expectation_id`.
filter - object - If set, return records where the specified field is equal to the supplied value. Valid fields are `expectation_id` and `workspace_id`. Valid field combinations are `[ workspace_id, expectation_id ]`.


107
108
109
110
111
112
113
114
115
116
# File 'lib/files.com/models/expectation_evaluation.rb', line 107

def self.list(params = {}, options = {})
  raise InvalidParameterError.new("Bad parameter: cursor must be an String") if params[:cursor] and !params[:cursor].is_a?(String)
  raise InvalidParameterError.new("Bad parameter: per_page must be an Integer") if params[:per_page] and !params[:per_page].is_a?(Integer)
  raise InvalidParameterError.new("Bad parameter: sort_by must be an Hash") if params[:sort_by] and !params[:sort_by].is_a?(Hash)
  raise InvalidParameterError.new("Bad parameter: filter must be an Hash") if params[:filter] and !params[:filter].is_a?(Hash)

  List.new(ExpectationEvaluation, params) do
    Api.send_request("/expectation_evaluations", :get, params, options)
  end
end

Instance Method Details

#closed_atObject

date-time - When the evaluation row was finalized.



68
69
70
# File 'lib/files.com/models/expectation_evaluation.rb', line 68

def closed_at
  @attributes[:closed_at]
end

#created_atObject

date-time - Creation time.



93
94
95
# File 'lib/files.com/models/expectation_evaluation.rb', line 93

def created_at
  @attributes[:created_at]
end

#criteria_errorsObject

array(object) - Captured criteria failures for the window.



83
84
85
# File 'lib/files.com/models/expectation_evaluation.rb', line 83

def criteria_errors
  @attributes[:criteria_errors]
end

#deadline_atObject

date-time - Logical due boundary for schedule-driven windows.



53
54
55
# File 'lib/files.com/models/expectation_evaluation.rb', line 53

def deadline_at
  @attributes[:deadline_at]
end

#expectation_idObject

int64 - Expectation ID.



23
24
25
# File 'lib/files.com/models/expectation_evaluation.rb', line 23

def expectation_id
  @attributes[:expectation_id]
end

#hard_close_atObject

date-time - Hard stop after which the window may not remain open.



63
64
65
# File 'lib/files.com/models/expectation_evaluation.rb', line 63

def hard_close_at
  @attributes[:hard_close_at]
end

#idObject

int64 - ExpectationEvaluation ID



13
14
15
# File 'lib/files.com/models/expectation_evaluation.rb', line 13

def id
  @attributes[:id]
end

#late_acceptance_cutoff_atObject

date-time - Logical cutoff for late acceptance, when present.



58
59
60
# File 'lib/files.com/models/expectation_evaluation.rb', line 58

def late_acceptance_cutoff_at
  @attributes[:late_acceptance_cutoff_at]
end

#matched_filesObject

array(object) - Captured evidence for files that matched the window.



73
74
75
# File 'lib/files.com/models/expectation_evaluation.rb', line 73

def matched_files
  @attributes[:matched_files]
end

#missing_filesObject

array(object) - Captured evidence for required files that were missing.



78
79
80
# File 'lib/files.com/models/expectation_evaluation.rb', line 78

def missing_files
  @attributes[:missing_files]
end

#opened_atObject

date-time - When the evaluation row was opened.



38
39
40
# File 'lib/files.com/models/expectation_evaluation.rb', line 38

def opened_at
  @attributes[:opened_at]
end

#opened_viaObject

string - How the evaluation window was opened.



33
34
35
# File 'lib/files.com/models/expectation_evaluation.rb', line 33

def opened_via
  @attributes[:opened_via]
end

#statusObject

string - Evaluation status.



28
29
30
# File 'lib/files.com/models/expectation_evaluation.rb', line 28

def status
  @attributes[:status]
end

#summaryObject

object - Compact evaluator summary payload.



88
89
90
# File 'lib/files.com/models/expectation_evaluation.rb', line 88

def summary
  @attributes[:summary]
end

#updated_atObject

date-time - Last update time.



98
99
100
# File 'lib/files.com/models/expectation_evaluation.rb', line 98

def updated_at
  @attributes[:updated_at]
end

#window_end_atObject

date-time - Actual candidate cutoff boundary for the window.



48
49
50
# File 'lib/files.com/models/expectation_evaluation.rb', line 48

def window_end_at
  @attributes[:window_end_at]
end

#window_start_atObject

date-time - Logical start of the candidate window.



43
44
45
# File 'lib/files.com/models/expectation_evaluation.rb', line 43

def window_start_at
  @attributes[:window_start_at]
end

#workspace_idObject

int64 - Workspace ID. ‘0` means the default workspace.



18
19
20
# File 'lib/files.com/models/expectation_evaluation.rb', line 18

def workspace_id
  @attributes[:workspace_id]
end