Class: Files::ActionNotificationExport
- Inherits:
-
Object
- Object
- Files::ActionNotificationExport
- Defined in:
- lib/files.com/models/action_notification_export.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
-
.create(params = {}, options = {}) ⇒ Object
Parameters: user_id - int64 - User ID.
-
.find(id, params = {}, options = {}) ⇒ Object
Parameters: id (required) - int64 - Action Notification Export ID.
- .get(id, params = {}, options = {}) ⇒ Object
Instance Method Summary collapse
-
#end_at ⇒ Object
date-time - End date/time of export range.
- #end_at=(value) ⇒ Object
-
#export_version ⇒ Object
string - Version of the underlying records for the export.
- #export_version=(value) ⇒ Object
-
#id ⇒ Object
int64 - History Export ID.
- #id=(value) ⇒ Object
-
#initialize(attributes = {}, options = {}) ⇒ ActionNotificationExport
constructor
A new instance of ActionNotificationExport.
-
#query_folder ⇒ Object
string - Return notifications that were triggered by actions in this folder.
- #query_folder=(value) ⇒ Object
-
#query_message ⇒ Object
string - Error message associated with the request, if any.
- #query_message=(value) ⇒ Object
-
#query_path ⇒ Object
string - Return notifications that were triggered by actions on this specific path.
- #query_path=(value) ⇒ Object
-
#query_request_method ⇒ Object
string - The HTTP request method used by the webhook.
- #query_request_method=(value) ⇒ Object
-
#query_request_url ⇒ Object
string - The target webhook URL.
- #query_request_url=(value) ⇒ Object
-
#query_status ⇒ Object
string - The HTTP status returned from the server in response to the webhook request.
- #query_status=(value) ⇒ Object
-
#query_success ⇒ Object
boolean - true if the webhook request succeeded (i.e. returned a 200 or 204 response status).
- #query_success=(value) ⇒ Object
-
#results_url ⇒ Object
string - If ‘status` is `ready`, this will be a URL where all the results can be downloaded at once as a CSV.
- #results_url=(value) ⇒ Object
- #save ⇒ Object
-
#start_at ⇒ Object
date-time - Start date/time of export range.
- #start_at=(value) ⇒ Object
-
#status ⇒ Object
string - Status of export.
- #status=(value) ⇒ Object
-
#user_id ⇒ Object
int64 - User ID.
- #user_id=(value) ⇒ Object
Constructor Details
#initialize(attributes = {}, options = {}) ⇒ ActionNotificationExport
Returns a new instance of ActionNotificationExport.
7 8 9 10 |
# File 'lib/files.com/models/action_notification_export.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/action_notification_export.rb', line 5 def attributes @attributes end |
#options ⇒ Object (readonly)
Returns the value of attribute options.
5 6 7 |
# File 'lib/files.com/models/action_notification_export.rb', line 5 def @options end |
Class Method Details
.create(params = {}, options = {}) ⇒ Object
Parameters:
user_id - int64 - User ID. Provide a value of `0` to operate the current session's user.
start_at - string - Start date/time of export range.
end_at - string - End date/time of export range.
query_message - string - Error message associated with the request, if any.
query_request_method - string - The HTTP request method used by the webhook.
query_request_url - string - The target webhook URL.
query_status - string - The HTTP status returned from the server in response to the webhook request.
query_success - boolean - true if the webhook request succeeded (i.e. returned a 200 or 204 response status). false otherwise.
query_path - string - Return notifications that were triggered by actions on this specific path.
query_folder - string - Return notifications that were triggered by actions in this folder.
174 175 176 177 178 179 180 181 182 183 184 185 186 187 |
# File 'lib/files.com/models/action_notification_export.rb', line 174 def self.create(params = {}, = {}) raise InvalidParameterError.new("Bad parameter: user_id must be an Integer") if params[:user_id] and !params[:user_id].is_a?(Integer) raise InvalidParameterError.new("Bad parameter: start_at must be an String") if params[:start_at] and !params[:start_at].is_a?(String) raise InvalidParameterError.new("Bad parameter: end_at must be an String") if params[:end_at] and !params[:end_at].is_a?(String) raise InvalidParameterError.new("Bad parameter: query_message must be an String") if params[:query_message] and !params[:query_message].is_a?(String) raise InvalidParameterError.new("Bad parameter: query_request_method must be an String") if params[:query_request_method] and !params[:query_request_method].is_a?(String) raise InvalidParameterError.new("Bad parameter: query_request_url must be an String") if params[:query_request_url] and !params[:query_request_url].is_a?(String) raise InvalidParameterError.new("Bad parameter: query_status must be an String") if params[:query_status] and !params[:query_status].is_a?(String) raise InvalidParameterError.new("Bad parameter: query_path must be an String") if params[:query_path] and !params[:query_path].is_a?(String) raise InvalidParameterError.new("Bad parameter: query_folder must be an String") if params[:query_folder] and !params[:query_folder].is_a?(String) response, = Api.send_request("/action_notification_exports", :post, params, ) ActionNotificationExport.new(response.data, ) end |
.find(id, params = {}, options = {}) ⇒ Object
Parameters:
id (required) - int64 - Action Notification Export ID.
149 150 151 152 153 154 155 156 157 |
# File 'lib/files.com/models/action_notification_export.rb', line 149 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("/action_notification_exports/#{params[:id]}", :get, params, ) ActionNotificationExport.new(response.data, ) end |
.get(id, params = {}, options = {}) ⇒ Object
159 160 161 |
# File 'lib/files.com/models/action_notification_export.rb', line 159 def self.get(id, params = {}, = {}) find(id, params, ) end |
Instance Method Details
#end_at ⇒ Object
date-time - End date/time of export range.
40 41 42 |
# File 'lib/files.com/models/action_notification_export.rb', line 40 def end_at @attributes[:end_at] end |
#end_at=(value) ⇒ Object
44 45 46 |
# File 'lib/files.com/models/action_notification_export.rb', line 44 def end_at=(value) @attributes[:end_at] = value end |
#export_version ⇒ Object
string - Version of the underlying records for the export.
22 23 24 |
# File 'lib/files.com/models/action_notification_export.rb', line 22 def export_version @attributes[:export_version] end |
#export_version=(value) ⇒ Object
26 27 28 |
# File 'lib/files.com/models/action_notification_export.rb', line 26 def export_version=(value) @attributes[:export_version] = value end |
#id ⇒ Object
int64 - History Export ID
13 14 15 |
# File 'lib/files.com/models/action_notification_export.rb', line 13 def id @attributes[:id] end |
#id=(value) ⇒ Object
17 18 19 |
# File 'lib/files.com/models/action_notification_export.rb', line 17 def id=(value) @attributes[:id] = value end |
#query_folder ⇒ Object
string - Return notifications that were triggered by actions in this folder.
67 68 69 |
# File 'lib/files.com/models/action_notification_export.rb', line 67 def query_folder @attributes[:query_folder] end |
#query_folder=(value) ⇒ Object
71 72 73 |
# File 'lib/files.com/models/action_notification_export.rb', line 71 def query_folder=(value) @attributes[:query_folder] = value end |
#query_message ⇒ Object
string - Error message associated with the request, if any.
76 77 78 |
# File 'lib/files.com/models/action_notification_export.rb', line 76 def @attributes[:query_message] end |
#query_message=(value) ⇒ Object
80 81 82 |
# File 'lib/files.com/models/action_notification_export.rb', line 80 def (value) @attributes[:query_message] = value end |
#query_path ⇒ Object
string - Return notifications that were triggered by actions on this specific path.
58 59 60 |
# File 'lib/files.com/models/action_notification_export.rb', line 58 def query_path @attributes[:query_path] end |
#query_path=(value) ⇒ Object
62 63 64 |
# File 'lib/files.com/models/action_notification_export.rb', line 62 def query_path=(value) @attributes[:query_path] = value end |
#query_request_method ⇒ Object
string - The HTTP request method used by the webhook.
85 86 87 |
# File 'lib/files.com/models/action_notification_export.rb', line 85 def query_request_method @attributes[:query_request_method] end |
#query_request_method=(value) ⇒ Object
89 90 91 |
# File 'lib/files.com/models/action_notification_export.rb', line 89 def query_request_method=(value) @attributes[:query_request_method] = value end |
#query_request_url ⇒ Object
string - The target webhook URL.
94 95 96 |
# File 'lib/files.com/models/action_notification_export.rb', line 94 def query_request_url @attributes[:query_request_url] end |
#query_request_url=(value) ⇒ Object
98 99 100 |
# File 'lib/files.com/models/action_notification_export.rb', line 98 def query_request_url=(value) @attributes[:query_request_url] = value end |
#query_status ⇒ Object
string - The HTTP status returned from the server in response to the webhook request.
103 104 105 |
# File 'lib/files.com/models/action_notification_export.rb', line 103 def query_status @attributes[:query_status] end |
#query_status=(value) ⇒ Object
107 108 109 |
# File 'lib/files.com/models/action_notification_export.rb', line 107 def query_status=(value) @attributes[:query_status] = value end |
#query_success ⇒ Object
boolean - true if the webhook request succeeded (i.e. returned a 200 or 204 response status). false otherwise.
112 113 114 |
# File 'lib/files.com/models/action_notification_export.rb', line 112 def query_success @attributes[:query_success] end |
#query_success=(value) ⇒ Object
116 117 118 |
# File 'lib/files.com/models/action_notification_export.rb', line 116 def query_success=(value) @attributes[:query_success] = value end |
#results_url ⇒ Object
string - If ‘status` is `ready`, this will be a URL where all the results can be downloaded at once as a CSV.
121 122 123 |
# File 'lib/files.com/models/action_notification_export.rb', line 121 def results_url @attributes[:results_url] end |
#results_url=(value) ⇒ Object
125 126 127 |
# File 'lib/files.com/models/action_notification_export.rb', line 125 def results_url=(value) @attributes[:results_url] = value end |
#save ⇒ Object
138 139 140 141 142 143 144 145 |
# File 'lib/files.com/models/action_notification_export.rb', line 138 def save if @attributes[:id] raise NotImplementedError.new("The ActionNotificationExport object doesn't support updates.") else new_obj = ActionNotificationExport.create(@attributes, @options) @attributes = new_obj.attributes end end |
#start_at ⇒ Object
date-time - Start date/time of export range.
31 32 33 |
# File 'lib/files.com/models/action_notification_export.rb', line 31 def start_at @attributes[:start_at] end |
#start_at=(value) ⇒ Object
35 36 37 |
# File 'lib/files.com/models/action_notification_export.rb', line 35 def start_at=(value) @attributes[:start_at] = value end |
#status ⇒ Object
string - Status of export. Valid values: ‘building`, `ready`, or `failed`
49 50 51 |
# File 'lib/files.com/models/action_notification_export.rb', line 49 def status @attributes[:status] end |
#status=(value) ⇒ Object
53 54 55 |
# File 'lib/files.com/models/action_notification_export.rb', line 53 def status=(value) @attributes[:status] = value end |
#user_id ⇒ Object
int64 - User ID. Provide a value of ‘0` to operate the current session’s user.
130 131 132 |
# File 'lib/files.com/models/action_notification_export.rb', line 130 def user_id @attributes[:user_id] end |
#user_id=(value) ⇒ Object
134 135 136 |
# File 'lib/files.com/models/action_notification_export.rb', line 134 def user_id=(value) @attributes[:user_id] = value end |