Class: Files::ScimLog
- Inherits:
-
Object
- Object
- Files::ScimLog
- Defined in:
- lib/files.com/models/scim_log.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 - Scim Log ID.
- .get(id, params = {}, options = {}) ⇒ Object
-
.list(params = {}, options = {}) ⇒ Object
Parameters: cursor - string - Used for pagination.
Instance Method Summary collapse
-
#created_at ⇒ Object
string - The date and time when this SCIM request occurred.
-
#http_response_code ⇒ Object
string - The HTTP response code returned for this request.
-
#id ⇒ Object
int64 - The unique ID of this SCIM request.
-
#initialize(attributes = {}, options = {}) ⇒ ScimLog
constructor
A new instance of ScimLog.
-
#request_json ⇒ Object
string - The JSON payload sent with the request.
-
#request_method ⇒ Object
string - The HTTP method used for this request.
-
#request_path ⇒ Object
string - The path portion of the URL requested.
-
#response_json ⇒ Object
string - The JSON payload returned in the response.
-
#user_agent ⇒ Object
string - The User-Agent header sent with the request.
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 = {}, = {}) @attributes = attributes || {} @options = || {} end |
Instance Attribute Details
#attributes ⇒ Object (readonly)
Returns the value of attribute attributes.
5 6 7 |
# File 'lib/files.com/models/scim_log.rb', line 5 def attributes @attributes end |
#options ⇒ Object (readonly)
Returns the value of attribute options.
5 6 7 |
# File 'lib/files.com/models/scim_log.rb', line 5 def @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 = {}, = {}) list(params, ) 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 = {}, = {}) 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("/scim_logs/#{params[:id]}", :get, params, ) ScimLog.new(response.data, ) end |
.get(id, params = {}, options = {}) ⇒ Object
82 83 84 |
# File 'lib/files.com/models/scim_log.rb', line 82 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 `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 = {}, = {}) 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, ) end end |
Instance Method Details
#created_at ⇒ Object
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_code ⇒ Object
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 |
#id ⇒ Object
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_json ⇒ Object
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_method ⇒ Object
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_path ⇒ Object
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_json ⇒ Object
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_agent ⇒ Object
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 |