Class: SimpleSegment::Operations::Alias
- Defined in:
- lib/simple_segment/operations/alias.rb
Constant Summary
Constants inherited from Operation
Instance Method Summary collapse
Methods inherited from Operation
Methods included from Utils
included, #isoify_dates, #isoify_dates!, #maybe_datetime_in_iso8601, #symbolize_keys
Constructor Details
This class inherits a constructor from SimpleSegment::Operations::Operation
Instance Method Details
#build_payload ⇒ Object
10 11 12 13 14 15 16 17 |
# File 'lib/simple_segment/operations/alias.rb', line 10 def build_payload raise ArgumentError, 'previous_id must be present' \ unless [:previous_id] base_payload.merge( previousId: [:previous_id] ) end |
#call ⇒ Object
6 7 8 |
# File 'lib/simple_segment/operations/alias.rb', line 6 def call request.post('/v1/alias', build_payload) end |