Class: Files::ExpectationEvaluation
- Inherits:
-
Object
- Object
- Files::ExpectationEvaluation
- Defined in:
- lib/files.com/models/expectation_evaluation.rb
Instance Attribute Summary collapse
-
#attributes ⇒ Object
readonly
Returns the value of attribute attributes.
-
#options ⇒ Object
readonly
Returns the value of attribute options.
Class Method Summary collapse
- .all(params = {}, options = {}) ⇒ Object
-
.find(id, params = {}, options = {}) ⇒ Object
Parameters: id (required) - int64 - Expectation Evaluation ID.
- .get(id, params = {}, options = {}) ⇒ Object
-
.list(params = {}, options = {}) ⇒ Object
Parameters: cursor - string - Used for pagination.
Instance Method Summary collapse
-
#closed_at ⇒ Object
date-time - When the evaluation row was finalized.
-
#created_at ⇒ Object
date-time - Creation time.
-
#criteria_errors ⇒ Object
array(object) - Captured criteria failures for the window.
-
#deadline_at ⇒ Object
date-time - Logical due boundary for schedule-driven windows.
-
#expectation_id ⇒ Object
int64 - Expectation ID.
-
#hard_close_at ⇒ Object
date-time - Hard stop after which the window may not remain open.
-
#id ⇒ Object
int64 - ExpectationEvaluation ID.
-
#initialize(attributes = {}, options = {}) ⇒ ExpectationEvaluation
constructor
A new instance of ExpectationEvaluation.
-
#late_acceptance_cutoff_at ⇒ Object
date-time - Logical cutoff for late acceptance, when present.
-
#matched_files ⇒ Object
array(object) - Captured evidence for files that matched the window.
-
#missing_files ⇒ Object
array(object) - Captured evidence for required files that were missing.
-
#opened_at ⇒ Object
date-time - When the evaluation row was opened.
-
#opened_via ⇒ Object
string - How the evaluation window was opened.
-
#status ⇒ Object
string - Evaluation status.
-
#summary ⇒ Object
object - Compact evaluator summary payload.
-
#updated_at ⇒ Object
date-time - Last update time.
-
#window_end_at ⇒ Object
date-time - Actual candidate cutoff boundary for the window.
-
#window_start_at ⇒ Object
date-time - Logical start of the candidate window.
-
#workspace_id ⇒ Object
int64 - Workspace ID.
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 = {}, = {}) @attributes = attributes || {} @options = || {} end |
Instance Attribute Details
#attributes ⇒ Object (readonly)
Returns the value of attribute attributes.
5 6 7 |
# File 'lib/files.com/models/expectation_evaluation.rb', line 5 def attributes @attributes end |
#options ⇒ Object (readonly)
Returns the value of attribute options.
5 6 7 |
# File 'lib/files.com/models/expectation_evaluation.rb', line 5 def @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 = {}, = {}) list(params, ) 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 = {}, = {}) 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, = Api.send_request("/expectation_evaluations/#{params[:id]}", :get, params, ) ExpectationEvaluation.new(response.data, ) end |
.get(id, params = {}, options = {}) ⇒ Object
134 135 136 |
# File 'lib/files.com/models/expectation_evaluation.rb', line 134 def self.get(id, params = {}, = {}) find(id, params, ) 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 = {}, = {}) 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, ) end end |
Instance Method Details
#closed_at ⇒ Object
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_at ⇒ Object
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_errors ⇒ Object
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_at ⇒ Object
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_id ⇒ Object
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_at ⇒ Object
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 |
#id ⇒ Object
int64 - ExpectationEvaluation ID
13 14 15 |
# File 'lib/files.com/models/expectation_evaluation.rb', line 13 def id @attributes[:id] end |
#late_acceptance_cutoff_at ⇒ Object
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_files ⇒ Object
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_files ⇒ Object
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_at ⇒ Object
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_via ⇒ Object
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 |
#status ⇒ Object
string - Evaluation status.
28 29 30 |
# File 'lib/files.com/models/expectation_evaluation.rb', line 28 def status @attributes[:status] end |
#summary ⇒ Object
object - Compact evaluator summary payload.
88 89 90 |
# File 'lib/files.com/models/expectation_evaluation.rb', line 88 def summary @attributes[:summary] end |
#updated_at ⇒ Object
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_at ⇒ Object
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_at ⇒ Object
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_id ⇒ Object
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 |