Class: Unit::Application::ListApplicationParams
- Inherits:
-
Object
- Object
- Unit::Application::ListApplicationParams
- Defined in:
- lib/unit/models/application/list_application_params.rb
Instance Attribute Summary collapse
-
#email ⇒ Object
readonly
Returns the value of attribute email.
-
#limit ⇒ Object
readonly
Returns the value of attribute limit.
-
#offset ⇒ Object
readonly
Returns the value of attribute offset.
-
#query ⇒ Object
readonly
Returns the value of attribute query.
-
#sort ⇒ Object
readonly
Returns the value of attribute sort.
-
#status ⇒ Object
readonly
Returns the value of attribute status.
-
#tags ⇒ Object
readonly
Returns the value of attribute tags.
Instance Method Summary collapse
-
#initialize(offset = APPLICATION_LIST_OFFSET, limit = APPLICATION_LIST_LIMIT, email = nil, tags = nil, query = nil, status = nil, sort = nil) ⇒ ListApplicationParams
constructor
A new instance of ListApplicationParams.
- #to_hash ⇒ Object
Constructor Details
#initialize(offset = APPLICATION_LIST_OFFSET, limit = APPLICATION_LIST_LIMIT, email = nil, tags = nil, query = nil, status = nil, sort = nil) ⇒ ListApplicationParams
Returns a new instance of ListApplicationParams.
19 20 21 22 23 24 25 26 27 28 |
# File 'lib/unit/models/application/list_application_params.rb', line 19 def initialize(offset = APPLICATION_LIST_OFFSET, limit = APPLICATION_LIST_LIMIT, email = nil, = nil, query = nil, status = nil, sort = nil) @offset = offset @limit = limit @email = email @tags = @query = query @status = status @sort = sort end |
Instance Attribute Details
#email ⇒ Object (readonly)
Returns the value of attribute email.
8 9 10 |
# File 'lib/unit/models/application/list_application_params.rb', line 8 def email @email end |
#limit ⇒ Object (readonly)
Returns the value of attribute limit.
8 9 10 |
# File 'lib/unit/models/application/list_application_params.rb', line 8 def limit @limit end |
#offset ⇒ Object (readonly)
Returns the value of attribute offset.
8 9 10 |
# File 'lib/unit/models/application/list_application_params.rb', line 8 def offset @offset end |
#query ⇒ Object (readonly)
Returns the value of attribute query.
8 9 10 |
# File 'lib/unit/models/application/list_application_params.rb', line 8 def query @query end |
#sort ⇒ Object (readonly)
Returns the value of attribute sort.
8 9 10 |
# File 'lib/unit/models/application/list_application_params.rb', line 8 def sort @sort end |
#status ⇒ Object (readonly)
Returns the value of attribute status.
8 9 10 |
# File 'lib/unit/models/application/list_application_params.rb', line 8 def status @status end |
#tags ⇒ Object (readonly)
Returns the value of attribute tags.
8 9 10 |
# File 'lib/unit/models/application/list_application_params.rb', line 8 def @tags end |
Instance Method Details
#to_hash ⇒ Object
30 31 32 33 34 35 36 37 38 39 |
# File 'lib/unit/models/application/list_application_params.rb', line 30 def to_hash params = { "page[limit]": limit, "page[offset]": offset, "filter[email]": email, "filter[tags]": , "filter[query]": query, "filter[status]": status, "sort": sort } params.compact end |