Class: PipelineService::PipelineClient
- Inherits:
-
Object
- Object
- PipelineService::PipelineClient
- Defined in:
- app/services/pipeline_service/pipeline_client.rb
Overview
PipelineClient builds a pipeline message using the object posts it to the endpoint and logs the message that was sent.
Accepts an ActiveRecord object or a hash. If using a hash, you must provide a noun as an optional parameter
PipelineCient.new(object: Enrollment.last) PipelineCient.new(object: { data: { foo: ‘bar’ } }, noun: ‘enrollment’ )
Instance Method Summary collapse
- #call ⇒ Object
-
#initialize(args) ⇒ PipelineClient
constructor
A new instance of PipelineClient.
Constructor Details
#initialize(args) ⇒ PipelineClient
Returns a new instance of PipelineClient.
11 12 13 14 15 |
# File 'app/services/pipeline_service/pipeline_client.rb', line 11 def initialize(args) @args = args @object = args[:object] configure_dependencies end |
Instance Method Details
#call ⇒ Object
17 18 19 20 21 |
# File 'app/services/pipeline_service/pipeline_client.rb', line 17 def call fetch_enrollment_from_hash post self end |