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