Class: Files::ScimLog

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

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

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

Returns a new instance of ScimLog.



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

def attributes
  @attributes
end

#optionsObject (readonly)

Returns the value of attribute options.



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

def options
  @options
end

Class Method Details

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



66
67
68
# File 'lib/files.com/models/scim_log.rb', line 66

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

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

Parameters:

id (required) - int64 - Scim Log ID.


72
73
74
75
76
77
78
79
80
# File 'lib/files.com/models/scim_log.rb', line 72

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("/scim_logs/#{params[:id]}", :get, params, options)
  ScimLog.new(response.data, options)
end

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



82
83
84
# File 'lib/files.com/models/scim_log.rb', line 82

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 `created_at`.


56
57
58
59
60
61
62
63
64
# File 'lib/files.com/models/scim_log.rb', line 56

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)

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

Instance Method Details

#created_atObject

string - The date and time when this SCIM request occurred.



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

def created_at
  @attributes[:created_at]
end

#http_response_codeObject

string - The HTTP response code returned for this request.



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

def http_response_code
  @attributes[:http_response_code]
end

#idObject

int64 - The unique ID of this SCIM request.



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

def id
  @attributes[:id]
end

#request_jsonObject

string - The JSON payload sent with the request.



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

def request_json
  @attributes[:request_json]
end

#request_methodObject

string - The HTTP method used for this request.



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

def request_method
  @attributes[:request_method]
end

#request_pathObject

string - The path portion of the URL requested.



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

def request_path
  @attributes[:request_path]
end

#response_jsonObject

string - The JSON payload returned in the response.



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

def response_json
  @attributes[:response_json]
end

#user_agentObject

string - The User-Agent header sent with the request.



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

def user_agent
  @attributes[:user_agent]
end