Class: Files::ActionNotificationExportResult

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

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

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

Returns a new instance of ActionNotificationExportResult.



7
8
9
10
# File 'lib/files.com/models/action_notification_export_result.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/action_notification_export_result.rb', line 5

def attributes
  @attributes
end

#optionsObject (readonly)

Returns the value of attribute options.



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

def options
  @options
end

Class Method Details

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



79
80
81
# File 'lib/files.com/models/action_notification_export_result.rb', line 79

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

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

Parameters:

user_id - int64 - User ID.  Provide a value of `0` to operate the current session's user.
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).
action_notification_export_id (required) - int64 - ID of the associated action notification export.


67
68
69
70
71
72
73
74
75
76
77
# File 'lib/files.com/models/action_notification_export_result.rb', line 67

def self.list(params = {}, options = {})
  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: 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: action_notification_export_id must be an Integer") if params[:action_notification_export_id] and !params[:action_notification_export_id].is_a?(Integer)
  raise MissingParameterError.new("Parameter missing: action_notification_export_id") unless params[:action_notification_export_id]

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

Instance Method Details

#created_atObject

int64 - When the notification was sent.



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

def created_at
  @attributes[:created_at]
end

#folderObject

string - The folder associated with the triggering action for this notification.



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

def folder
  @attributes[:folder]
end

#idObject

int64 - Notification ID



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

def id
  @attributes[:id]
end

#messageObject

string - A message indicating the overall status of the webhook notification.



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

def message
  @attributes[:message]
end

#pathObject

string - The path to the actual file that triggered this notification. This must be slash-delimited, but it must neither start nor end with a slash. Maximum of 5000 characters.



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

def path
  @attributes[:path]
end

#request_headersObject

string - A JSON-encoded string with headers that were sent with the webhook.



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

def request_headers
  @attributes[:request_headers]
end

#request_methodObject

string - The HTTP verb used to perform the webhook.



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

def request_method
  @attributes[:request_method]
end

#request_urlObject

string - The webhook request URL.



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

def request_url
  @attributes[:request_url]
end

#statusObject

int64 - HTTP status code returned in the webhook response.



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

def status
  @attributes[:status]
end

#successObject

boolean - ‘true` if the webhook succeeded by receiving a 200 or 204 response.



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

def success
  @attributes[:success]
end