Class: MarbleApiClient::Requests::Index
- Inherits:
-
Object
- Object
- MarbleApiClient::Requests::Index
- Defined in:
- lib/marble_api_client/requests/index.rb
Overview
Request object for sending index requests. Uses context, record, page, and page_size to send data that the service model can use in controllers
Instance Method Summary collapse
-
#initialize(context: {}, record: {}, page: 1, page_size: 25) ⇒ Index
constructor
A new instance of Index.
- #request_body ⇒ Object
Constructor Details
#initialize(context: {}, record: {}, page: 1, page_size: 25) ⇒ Index
Returns a new instance of Index.
18 19 20 21 22 23 24 |
# File 'lib/marble_api_client/requests/index.rb', line 18 def initialize(context: {}, record: {}, page: 1, page_size: 25) @context = context @record = record @page = page @page_size = page_size freeze end |
Instance Method Details
#request_body ⇒ Object
26 27 28 29 30 31 32 33 |
# File 'lib/marble_api_client/requests/index.rb', line 26 def request_body { context: @context, record: @record, page: @page, page_size: @page_size }.to_json end |